Skip to content
wiki.fftac.org

Workspace - Source Excerpt 02

Back to Workspace

Summary

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

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

<p>The public prompt library is open for reading, but authoring, forking, packet rendering, and conversation remain authenticated member actions.</p>
                        <div class="spiralist-cta-row spiralist-cta-row--start">
                            <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($login_url); ?>">Log In</a>
                            <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($register_url); ?>">Register</a>
                        </div>
                    </article>
                    <article class="spiralist-panel">
                        <p class="spiralist-section-tag">What Unlocks</p>
                        <h2 class="spiralist-section-title">Workspace capabilities</h2>
                        <ul class="spiralist-checklist">
                            <li>Save private prompt scripts with immutable versions.</li>
                            <li>Share prompts with members or specific users.</li>
                            <li>Render prompts into auditable prompt/art packets.</li>
                            <li>Start private prompt-governed conversations.</li>
                            <li>Fork public prompts into your own library.</li>
                        </ul>
                    </article>
                </div>
            <?php else : ?>
                <div class="spiralist-grid spiralist-grid--split">
                    <article class="spiralist-panel">
                        <p class="spiralist-section-tag">Authoring</p>
                        <h2 class="spiralist-section-title"><?php echo !empty($form_prompt['id']) ? 'Edit prompt manuscript' : 'Create a new prompt manuscript'; ?></h2>
                        <form
                            class="spiralist-workspace-form"
                            data-prompt-form
                            data-auth-required-form="prompt-authoring"
                            data-prompt-id="<?php echo esc_attr((string) ($form_prompt['id'] ?? 0)); ?>"
                        >
                            <div class="spiralist-workspace-input-grid">
                                <label class="spiralist-form__field">
                                    <span>Title</span>
                                    <input data-placeholder-source type="text" name="title" value="<?php echo esc_attr((string) ($form_prompt['title'] ?? '')); ?>" required />
                                </label>
                                <label class="spiralist-form__field">
                                    <span>Summary</span>
                                    <input type="text" name="summary" value="<?php echo esc_attr((string) ($form_prompt['summary'] ?? '')); ?>" />
                                </label>
                            </div>
                            <div class="spiralist-workspace-input-grid">
                                <label class="spiralist-form__field">
                                    <span>Category</span>
                                    <select name="category">
                                        <?php foreach ($categories as $category_record) : ?>
                                            <?php $category = (string) ($category_record['category'] ?? ''); ?>
                                            <option value="<?php echo esc_attr($category); ?>" <?php selected((string) ($form_prompt['category'] ?? ''), $category); ?>><?php echo esc_html($category); ?></option>
                                        <?php endforeach; ?>
                                    </select>
                                </label>
                                <label class="spiralist-form__field">
                                    <span>Subcategory</span>
                                    <select name="subcategory">
                                        <?php foreach ($categories as $category_record) : ?>
                                            <?php $category = (string) ($category_record['category'] ?? ''); ?>
                                            <optgroup label="<?php echo esc_attr($category); ?>">
                                                <?php foreach ((array) ($category_record['subcategories'] ?? []) as $subcategory) : ?>
                                                    <option value="<?php echo esc_attr((string) $subcategory); ?>" <?php selected((string) ($form_prompt['subcategory'] ?? ''), (string) $subcategory); ?>><?php echo esc_html((string) $subcategory); ?></option>
                                                <?php endforeach; ?>
                                            </optgroup>
                                        <?php endforeach; ?>
                                    </select>
                                </label>
                            </div>
                            <label class="spiralist-form__field">
                                <span>Instruction</span>
                                <textarea data-placeholder-source rows="4" name="structured_prompt[instruction]" placeholder="Tell the model exactly what to do."><?php echo esc_textarea((string) ($form_prompt['structured_prompt']['instruction'] ?? '')); ?></textarea>
                            </label>
                            <div class="spiralist-workspace-input-grid">
                                <label class="spiralist-form__field">
                                    <span>Context</span>
                                    <textarea data-placeholder-source rows="5" name="structured_prompt[context]" placeholder="Relevant background, audience, source material, or operating context."><?php echo esc_textarea((string) ($form_prompt['structured_prompt']['context'] ?? '')); ?></textarea>
                                </label>
                                <label class="spiralist-form__field">
                                    <span>Constraints</span>
                                    <textarea data-placeholder-source rows="5" name="structured_prompt[constraints]" placeholder="Rules, boundaries, exclusions, style, safety, and quality checks."><?php echo esc_textarea((string) ($form_prompt['structured_prompt']['constraints'] ?? '')); ?></textarea>
                                </label>
                            </div>
                            <div class="spiralist-workspace-input-grid">
                                <label class="spiralist-form__field">
                                    <span>Examples</span>
                                    <textarea data-placeholder-source rows="5" name="structured_prompt[examples]" placeholder="Input/output examples or counterexamples."><?php echo esc_textarea((string) ($form_prompt['structured_prompt']['examples'] ?? '')); ?></textarea>
                                </label>
                                <label class="spiralist-form__field">
                                    <span>Output Format</span>
                                    <textarea data-placeholder-source rows="5" name="structured_prompt[output_format]" placeholder="Markdown, JSON schema, table, checklist, or exact response shape."><?php echo esc_textarea((string) ($form_prompt['structured_prompt']['output_format'] ?? '')); ?></textarea>
                                </label>
                            </div>
                            <label class="spiralist-form__field">
                                <span>User Prompt Template</span>
                                <textarea data-placeholder-source rows="5" name="user_prompt_template"><?php echo esc_textarea((string) ($form_prompt['user_prompt_template'] ?? '')); ?></textarea>
                            </label>
                            <label class="spiralist-form__field">
                                <span>Prompt System Steps</span>
                                <textarea rows="4" name="system_steps_text" placeholder="One prompt ID per line. The output of each step becomes the input to the next."><?php echo esc_textarea($system_steps_text); ?></textarea>
                            </label>
                            <details class="spiralist-workspace-details" open>
                                <summary>Spiral Script v0.1</summary>
                                <label class="spiralist-form__field">
                                    <span>Spiral Script Source</span>