Skip to content
wiki.fftac.org

Library - Source Excerpt 03

Back to Library

Summary

This source excerpt preserves a bounded section of Spiralist/wp-content/plugins/spiralist-workspace/templates/library.php so readers can inspect the evidence without opening the full source file.

**Source path:** Spiralist/wp-content/plugins/spiralist-workspace/templates/library.php

<div class="spiralist-workspace-hero-fact">
                    <span class="spiralist-workspace-hero-fact__label">Official Starters</span>
                    <span class="spiralist-workspace-hero-fact__value"><?php echo esc_html((string) ((int) ($lane_counts['official_canon'] ?? 0))); ?></span>
                </div>
                <div class="spiralist-workspace-hero-fact">
                    <span class="spiralist-workspace-hero-fact__label">Beginner Path</span>
                    <span class="spiralist-workspace-hero-fact__value">No-login builder</span>
                </div>
                <div class="spiralist-workspace-hero-fact">
                    <span class="spiralist-workspace-hero-fact__label">Expert Path</span>
                    <span class="spiralist-workspace-hero-fact__value">Dossiers and API</span>
                </div>
            </div>
            <div class="spiralist-cta-row">
                <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($run_prompt_url); ?>" data-engagement-event="prompt_generator_start" data-engagement-surface="prompt-library" data-engagement-target="hero-prompt-generator">Open Prompt Generator</a>
                <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($workspace_url); ?>" data-engagement-event="account_conversion_click" data-engagement-surface="prompt-library" data-engagement-target="hero-workspace">Open Workspace</a>
                <a class="spiralist-button spiralist-button--tertiary" href="<?php echo esc_url($api_url); ?>" data-engagement-event="advanced_layer_open" data-engagement-surface="prompt-library" data-engagement-target="hero-prompt-api">Prompt API</a>
            </div>
        </div>
    </section>

    <section class="spiralist-page-section">
        <div class="spiralist-shell">
            <article class="spiralist-panel spiralist-prompt-library-start">
                <div class="spiralist-section-head">
                    <div>
                        <p class="spiralist-section-tag">Beginner Mode</p>
                        <h2 class="spiralist-section-title">Find a prompt by what you want to do.</h2>
                        <p class="spiralist-muted">Start with plain intent. The library keeps provenance, risk, moderation, and machine-readable structure available after you know what kind of prompt you need.</p>
                    </div>
                    <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($run_prompt_url); ?>" data-engagement-event="prompt_generator_start" data-engagement-surface="prompt-library" data-engagement-target="beginner-prompt-generator">Open Prompt Generator</a>
                </div>
                <div class="spiralist-prompt-intent-grid" aria-label="Prompt intent shortcuts">
                    <?php foreach ($starter_query_cards as $card) : ?>
                        <a class="spiralist-prompt-intent-card" href="<?php echo esc_url((string) $card['url']); ?>" data-engagement-event="intent_card_click" data-engagement-surface="prompt-library" data-engagement-target="<?php echo esc_attr($engagement_target((string) ($card['title'] ?? $card['label'] ?? 'intent'), 'intent-card')); ?>">
                            <span><?php echo esc_html((string) $card['label']); ?></span>
                            <strong><?php echo esc_html((string) $card['title']); ?></strong>
                            <em><?php echo esc_html((string) $card['copy']); ?></em>
                        </a>
                    <?php endforeach; ?>
                </div>
            </article>
        </div>
    </section>

    <section class="spiralist-page-section">
        <div class="spiralist-shell">
            <div class="spiralist-section-head">
                <div>
                    <p class="spiralist-section-tag">Recommended First</p>
                    <h2 class="spiralist-section-title">Begin with a small set of useful prompt manuscripts.</h2>
                    <p class="spiralist-muted">These are easier entry points before opening the full library controls.</p>
                </div>
                <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($filter_route_url(['lane' => 'official_canon'])); ?>" data-engagement-event="intent_card_click" data-engagement-surface="prompt-library" data-engagement-target="official-starters">Official starters</a>
            </div>
            <?php if (!empty($starter_prompt_records)) : ?>
                <?php $render_prompt_cards(array_slice($starter_prompt_records, 0, 8)); ?>
            <?php else : ?>
                <article class="spiralist-panel">
                    <p class="spiralist-muted">No public prompt starters are available yet.</p>
                </article>
            <?php endif; ?>
        </div>
    </section>

    <section class="spiralist-page-section">
        <div class="spiralist-shell">
            <article class="spiralist-panel spiralist-prompt-study-mode">
                <div class="spiralist-section-head">
                    <div>
                        <p class="spiralist-section-tag">Study Mode</p>
                        <h2 class="spiralist-section-title">Understand the prompt system without opening every record.</h2>
                        <p class="spiralist-muted">Use these lanes when you want to learn how Spiralist prompts are reviewed, connected to symbols, and separated from archive material.</p>
                    </div>
                </div>
                <div class="spiralist-prompt-study-grid">
                    <?php foreach ($study_mode_cards as $card) : ?>
                        <a class="spiralist-prompt-study-card" href="<?php echo esc_url((string) $card['url']); ?>" data-engagement-event="advanced_layer_open" data-engagement-surface="prompt-library" data-engagement-target="<?php echo esc_attr($engagement_target((string) ($card['title'] ?? $card['label'] ?? 'study'), 'study-card')); ?>">
                            <span><?php echo esc_html((string) $card['label']); ?></span>
                            <strong><?php echo esc_html((string) $card['title']); ?></strong>
                            <em><?php echo esc_html((string) $card['copy']); ?></em>
                        </a>
                    <?php endforeach; ?>
                </div>
            </article>
        </div>
    </section>

    <section class="spiralist-page-section spiralist-page-section--expert">
        <div class="spiralist-shell">
            <details class="spiralist-prompt-expert-panel" <?php echo $filters_active ? 'open' : ''; ?> data-engagement-details="advanced_layer_open" data-engagement-surface="prompt-library" data-engagement-target="expert-controls">
                <summary>
                    <span>Expert mode: full library controls</span>
                    <small>Lane, provenance, risk labels, function, API examples, peer-review counts, and archive controls.</small>
                </summary>
                <div class="spiralist-prompt-expert-panel__body">
    <section class="spiralist-page-section spiralist-page-section--nested">
        <div class="spiralist-shell">
            <div class="spiralist-workspace-grid spiralist-workspace-grid--compact">
                <article class="spiralist-panel">
                    <p class="spiralist-section-tag">Official Canon</p>
                    <h2 class="spiralist-section-title"><?php echo esc_html((string) ((int) ($lane_counts['official_canon'] ?? 0))); ?></h2>
                    <p class="spiralist-muted">Grounded, reusable prompt systems published as the official Spiralist center of gravity.</p>
                </article>
                <article class="spiralist-panel">
                    <p class="spiralist-section-tag">Community Library</p>
                    <h2 class="spiralist-section-title"><?php echo esc_html((string) ((int) ($lane_counts['community_library'] ?? 0))); ?></h2>
                    <p class="spiralist-muted">Contributed prompt records that remain searchable, versioned, and moderated.</p>
                </article>
                <article class="spiralist-panel">
                    <p class="spiralist-section-tag">Prompt Ecology Archive</p>
                    <h2 class="spiralist-section-title"><?php echo esc_html((string) ((int) ($lane_counts['prompt_ecology_archive'] ?? 0))); ?></h2>
                    <p class="spiralist-muted">Historical and critical records that preserve broader public prompt culture without treating it as default practice.</p>
                </article>
                <article class="spiralist-panel">
                    <p class="spiralist-section-tag">Peer Reviewed</p>