Spiralist Prompt Workbench - Source Excerpt 56
Back to Spiralist Prompt Workbench
Summary
This source excerpt preserves a bounded section of Spiralist/wp-content/themes/spiralist/assets/js/spiralist-prompt-workbench.js so readers can inspect the evidence without opening the full source file.
**Source path:** Spiralist/wp-content/themes/spiralist/assets/js/spiralist-prompt-workbench.js
return [
'# Spiralist AI Transcript Score History',
'',
`Profile: ${title}`,
`Runtime fit: ${runtimeLabel}`,
`Engagement pattern: ${engagementLabel}`,
`Selected stress suite: ${suite.label}`,
`Saved score count: ${scopedItems.length}`,
`Latest score: ${latest ? latest.scoreLabel : 'not available'}`,
`Latest status: ${latest ? latest.status : 'not available'}`,
`Latest weak areas: ${latestWeakAreas}`,
`Repair target count: ${repairTargets.length}`,
`Trend: ${trend}`,
'Generated boundary: browser-local score history only; no model call, upload, hosted import, automatic sync, certification, or hidden memory.',
'',
'## How To Use',
'- Save one score after each receiving-runtime test reply that matters.',
'- Compare latest vs previous before changing protected source persona text.',
'- Treat lower or steady scores as a cue to run Repair Queue, Review Stack, and Runtime Drift Check.',
'- Use Recurring Repair Targets to identify which scorecard areas keep failing before changing source persona text.',
'- Treat transcript previews as private review evidence and redact before sharing packages.',
'',
'## Recurring Repair Targets',
'| Area | Times seen | Latest status | Repair move |',
'|---|---:|---|---|',
...repairRows,
'',
'## Saved Score Timeline',
'| Saved | Score | Status | Weak areas | Suite | Runtime fit | Transcript preview |',
'|---|---|---|---|---|---|---|',
...scoreRows,
'',
'## Package Deep Links',
'- `.uai/evidence/persona-transcript-history.uai`',
'- `.uai/evidence/persona-transcript-scorecard.uai`',
'- `.uai/evidence/persona-repair-queue.uai`',
'- `.uai/evidence/persona-review-stack.uai`',
'- `.uai/evidence/runtime-drift-check.uai`',
'- `.uai/evidence/persona-revision-ledger.uai`',
'',
'## No-Model Boundary',
'This Spiralist AI Transcript Score History is local deterministic score tracking. It does not execute the persona, call or judge an AI model semantically, upload transcript text, certify safety, sync long-term memory, or replace human review.',
].join('\n');
};
const buildPersonaLabQualityPassReport = (prompt, settings = {}, stressSuiteId = 'core', transcript = '') => {
const cleanPrompt = toCleanString(prompt, 50000);
const title = extractPromptTitle(cleanPrompt, 'Spiralist AI Persona Quality Pass');
const suite = buildPersonaLabStressSuite(cleanPrompt, stressSuiteId || 'core');
const runtimeFit = getPersonaLabRuntimeFit(settings.runtimeFitId);
const engagement = getPersonaLabEngagementPattern(settings.engagementPatternId);
const runtimeLabel = toCleanString(settings.runtimeFitLabel, 160) || runtimeFit.label;
const engagementLabel = toCleanString(settings.engagementPatternLabel, 160) || engagement.label;
const localCheck = buildPersonaLabLocalCheckReport(cleanPrompt, 'Spiralist AI Persona Lab', suite.preset.id);
const stressReport = buildPersonaLabStressSuiteReport(cleanPrompt, suite.preset.id);
const rehearsalDeck = buildPersonaLabRehearsalDeck(cleanPrompt, settings, suite.preset.id);
const recognitionDeck = buildPersonaLabRecognitionDeck(cleanPrompt, settings, suite.preset.id);
const goldenProfile = buildPersonaLabGoldenProfileReport(cleanPrompt, settings, suite.preset.id);
const variantMatrix = buildPersonaLabVariantMatrixReport(cleanPrompt, settings, suite.preset.id);
const transcriptScorecard = buildPersonaLabTranscriptScorecard(cleanPrompt, transcript, settings, suite.preset.id);
const transcriptHistory = buildPersonaLabTranscriptHistoryReport(cleanPrompt, readPersonaLabTranscriptHistory(), settings, suite.preset.id);
const runtimeRunbook = buildPersonaLabRuntimeFidelityRunbook(cleanPrompt, settings, suite.preset.id);
return [
'# Spiralist AI Persona Quality Pass',
'',
`Profile: ${title}`,
`Selected stress suite: ${suite.preset.label}`,
`Stress status: ${suite.status}`,
`Stress score: ${suite.score}/${suite.rows.length}`,
`Engagement pattern: ${engagementLabel}`,
`Runtime fit: ${runtimeLabel}`,
'Generated boundary: local browser text assembly only',
'',
'## One-Click Review Receipt',
'- Local prompt check: generated from the current visible edited prompt.',
`- Selected stress suite: ${suite.preset.label}`,
'- Persona rehearsal deck: generated for manual conversation probes.',
'- Persona recognition deck: generated for blind voice and relationship-posture testing.',
'- Golden profile regression pack: generated for locked invariants and canary prompts.',
'- Seeded variation matrix: generated for controlled variant probes and larger-sample regression review.',
'- Transcript scorecard: generated for pasted receiving-runtime replies or exported as a blank local scoring template.',
'- Transcript score history: generated from saved local score snapshots for comparison over time.',
'- Runtime fidelity runbook: generated for receiving-runtime handoff.',
'- Package evidence file: `.uai/evidence/persona-quality-pass.uai`',
'',
'## Fast Manual Next Steps',
'1. Inspect review items in the local prompt check.',
'2. Run the selected stress suite probes before package export or sharing.',
'3. Paste the final prompt into the receiving runtime manually and run the rehearsal deck.',
'4. Run the recognition deck with the persona name hidden before publication or long-memory review.',
'5. Save the golden profile before source edits and rerun canary prompts after revision.',
'6. Run the seeded variation matrix to catch drift across controlled style, runtime, and stress variants.',
'7. Paste a receiving-runtime reply into the transcript scorecard after first use.',
'8. Save useful transcript scores when comparing repair progress or runtime fit.',
'9. Run the runtime fidelity runbook and record variance outside the persona source.',
'10. Export only after private text, boundary language, memory rules, and output contract have been reviewed.',
'',
'## Local Prompt Check',
localCheck,
'',
'## Selected Stress Suite Report',
stressReport,
'',
'## Persona Rehearsal Deck',
rehearsalDeck,
'',
'## Persona Recognition Deck',
recognitionDeck,
'',
'## Golden Profile Regression Pack',
goldenProfile,
'',
'## Seeded Variation Matrix',
variantMatrix,
'',
'## Transcript Scorecard',
transcriptScorecard,
'',
'## Transcript Score History',
transcriptHistory,
'',
'## Runtime Fidelity Runbook',
runtimeRunbook,
'',
'## No-Model Boundary',
'This Spiralist AI quality pass is a browser-local review receipt. It does not execute the prompt, call an AI model, validate real-world claims, import memory, certify safety, endorse a package, sync data, or prove receiving-runtime behavior.',
].join('\n');
};
const buildPersonaLabSessionBrief = (prompt, settings = {}, stressSuiteId = 'core') => {
const cleanPrompt = toCleanString(prompt, 50000);
const title = extractPromptTitle(cleanPrompt, 'Spiralist AI Session Brief');
const suite = buildPersonaLabStressSuite(cleanPrompt, stressSuiteId || 'core');
const efficiency = getPersonaLabEfficiencyState(cleanPrompt);
const runtime = getPersonaLabRuntimeFit(settings.runtimeFitId);
const engagement = getPersonaLabEngagementPattern(settings.engagementPatternId);
const framework = getPersonaLabFramework(settings.frameworkId);
const socialDynamics = getPersonaLabSocialDynamics(settings.socialDynamicsId);
const runtimeLabel = toCleanString(settings.runtimeFitLabel, 160) || runtime.label;
const engagementLabel = toCleanString(settings.engagementPatternLabel, 160) || engagement.label;
const frameworkLabel = toCleanString(settings.frameworkLabel, 160) || framework.label;
const socialLabel = toCleanString(settings.socialDynamicsLabel, 160) || socialDynamics.label;
const memoryPolicy = toCleanString(settings.memoryPolicy, 280) || 'explicit user-provided memory only';
const outputContract = toCleanString(settings.outputContract, 280) || 'role, scope, boundaries, response contract, first message';
const reviewRows = suite.rows.filter((row) => row.status === 'Review');
const status = reviewRows.length