Skip to content
wiki.fftac.org

Page Run A Prompt - Source Excerpt 17

Back to Page Run A Prompt

Summary

This source excerpt preserves a bounded section of Spiralist/wp-content/themes/spiralist/page-run-a-prompt.php so readers can inspect the evidence without opening the full source file.

**Source path:** Spiralist/wp-content/themes/spiralist/page-run-a-prompt.php

<button class="spiralist-button spiralist-button--secondary" type="button" data-character-apply-engine><?php echo esc_html($ui_text('page.run_prompt.character.apply_engine', 'Apply Controls')); ?></button>
                                <button class="spiralist-button spiralist-button--secondary" type="button" data-character-seed-current><?php echo esc_html($ui_text('page.run_prompt.character.use_current_seed', 'Use Current Seed')); ?></button>
                                <button class="spiralist-button spiralist-button--secondary" type="button" data-character-clear-seed><?php echo esc_html($ui_text('page.run_prompt.character.clear_seed', 'Clear Seed')); ?></button>
                            </div>
                            <small class="spiralist-muted" data-character-engine-summary><?php echo esc_html($ui_text('page.run_prompt.character.engine_summary', 'Spiralist AI engine controls will appear after the first generation.')); ?></small>
                        </div>
                        <small class="spiralist-muted" data-character-share-status><?php echo esc_html($ui_text('page.run_prompt.character.share_hint', 'Prepare Submission saves a browser-local draft, then opens the contribution form for review. It does not submit to the server from this generator.')); ?></small>
                    </details>
                    <small class="spiralist-character-builder__status spiralist-muted" data-character-status aria-live="polite"></small>
                </div>
                <div class="spiralist-character-builder__output" aria-label="<?php echo esc_attr($ui_text('page.run_prompt.character.output_label', 'Generated character prompt')); ?>">
                    <div class="spiralist-copy-block__head">
                        <span><?php echo esc_html($ui_text('page.run_prompt.character.ready_label', 'Ready-to-paste prompt')); ?></span>
                        <small class="spiralist-muted" data-character-variant><?php echo esc_html($ui_text('page.run_prompt.character.variant_full', 'Full prompt')); ?></small>
                    </div>
                    <p class="spiralist-character-builder__metrics spiralist-muted" data-character-metrics><?php echo esc_html($ui_text('page.run_prompt.character.metrics_pending', 'Full operating profile loads here. Copy this for agent use; compact view is for short contexts only.')); ?></p>
                    <pre tabindex="0" role="textbox" aria-multiline="true" contenteditable="plaintext-only" spellcheck="false" data-character-output data-character-prompt-editable></pre>
                    <pre class="spiralist-code-block spiralist-code-block--prompt spiralist-run-output" tabindex="0" data-character-test-report hidden></pre>
                </div>
                <?php if ($static_personality_fallback_prompt !== '') : ?>
                    <details class="spiralist-character-fallback">
                        <summary>
                            <span><?php echo esc_html($ui_text('page.run_prompt.character.fallback_title', 'No-JavaScript Fallback Operating Profile')); ?></span>
                            <small><?php echo esc_html($ui_text('page.run_prompt.character.fallback_hint', 'Complete profile for restricted browsers, text-only agents, and failed generator sessions.')); ?></small>
                        </summary>
                        <div class="spiralist-character-fallback__body">
                            <p><?php echo esc_html($ui_text('page.run_prompt.character.fallback_copy', 'If the random generator does not load, use this complete bounded operating profile instead of inferring missing fields. It includes identity, behavior, voice, work model, continuity, verification, boundaries, and a portable assistant-memory backup field map.')); ?></p>
                            <div class="spiralist-character-fallback__actions">
                                <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($static_personality_fallback_url); ?>"><?php echo esc_html($ui_text('page.run_prompt.character.fallback_json', 'Open JSON Fallback')); ?></a>
                            </div>
                            <pre class="spiralist-code-block spiralist-code-block--prompt spiralist-run-output" tabindex="0"><?php echo esc_html($static_personality_fallback_prompt); ?></pre>
                        </div>
                    </details>
                <?php endif; ?>
                <div class="spiralist-character-options" data-character-options hidden aria-label="<?php echo esc_attr($ui_text('page.run_prompt.character.options_label', 'Generated personality options')); ?>">
                    <div class="spiralist-character-options__head">
                        <div>
                            <span><?php echo esc_html($ui_text('page.run_prompt.character.options_title', 'Compare 3 local options')); ?></span>
                            <small><?php echo esc_html($ui_text('page.run_prompt.character.options_hint', 'Generated in this browser only. Pick one, copy it, or prepare it for review.')); ?></small>
                        </div>
                    </div>
                    <div class="spiralist-character-options__grid" data-character-options-list></div>
                </div>
                <div class="spiralist-character-sections" data-character-sections hidden>
                    <?php foreach ($character_builder_sections as $section_id => $section_config) : ?>
                        <?php
                        $section_label = (string) ($section_config['label'] ?? $section_id);
                        $section_example = (string) ($section_config['example'] ?? '');
                        ?>
                        <section class="spiralist-character-section" data-character-section-shell="<?php echo esc_attr($section_id); ?>">
                            <div class="spiralist-character-section__summary">
                                <div>
                                    <h3><?php echo esc_html($section_label); ?></h3>
                                    <?php if ($section_example !== '') : ?>
                                        <small class="spiralist-muted"><?php echo esc_html($section_example); ?></small>
                                    <?php endif; ?>
                                    <p data-character-section-summary="<?php echo esc_attr($section_id); ?>"><?php echo esc_html($ui_text('page.run_prompt.character.summary_pending', 'Generated after the first character loads.')); ?></p>
                                </div>
                                <div class="spiralist-character-section__actions">
                                    <button class="spiralist-button spiralist-button--secondary" type="button" data-character-edit="<?php echo esc_attr($section_id); ?>"><?php echo esc_html($ui_text('page.run_prompt.character.edit', 'Edit')); ?></button>
                                    <button class="spiralist-button spiralist-button--secondary" type="button" data-character-reset="<?php echo esc_attr($section_id); ?>"><?php echo esc_html($ui_text('page.run_prompt.character.reset', 'Reset')); ?></button>
                                    <button class="spiralist-button spiralist-button--secondary" type="button" data-character-randomize="<?php echo esc_attr($section_id); ?>"><?php echo esc_html($ui_text('page.run_prompt.character.randomize_section', 'Randomize This Section')); ?></button>
                                </div>
                            </div>
                            <div class="spiralist-character-section__editor" data-character-editor="<?php echo esc_attr($section_id); ?>" hidden>
                                <?php if ('safety' === $section_id) : ?>
                                    <label class="spiralist-character-safety-toggle">
                                        <input type="checkbox" data-character-safety-enabled checked />
                                        <span><?php echo esc_html($ui_text('page.run_prompt.character.safety_enabled', 'Include this boundary appendix when copying the full prompt.')); ?></span>
                                    </label>
                                <?php elseif ('raw' === $section_id) : ?>
                                    <p class="spiralist-muted"><?php echo esc_html($ui_text('page.run_prompt.character.raw_note', 'This editable full prompt is assembled from the current sections. Keep delimiter lines when you want edits to sync back into the matching fields. Platform requirements are enforced by the site and are not exported.')); ?></p>
                                <?php endif; ?>
                                <textarea data-character-section="<?php echo esc_attr($section_id); ?>" rows="<?php echo 'raw' === $section_id ? '14' : '5'; ?>"></textarea>
                            </div>
                        </section>
                    <?php endforeach; ?>