Spiralist Prompt Workbench - Source Excerpt 76
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
renderPersonaLabStressSuite(container, suite, stressReport);
renderPersonaLabRehearsalDeck(container, deck, settings, suiteId);
renderPersonaLabRecognitionDeck(container, recognitionDeck, settings, suiteId);
renderPersonaLabGoldenProfile(container, goldenProfile, settings, suiteId);
renderPersonaLabVariantMatrix(container, variantMatrix, settings, suiteId);
renderPersonaLabTranscriptScorecard(container, transcriptScorecard, transcript, suiteId);
renderPersonaLabRuntimeRunbook(container, runbook, settings, suiteId);
renderPersonaLabQualityPass(container, qualityPass, suite, settings);
if (testOutput) {
testOutput.textContent = qualityPass;
testOutput.hidden = false;
testOutput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
setPersonaLabPackageState(container, `Quality pass ${suite.score}/${suite.rows.length}`);
setStatus(t('portablePromptPersonaLabQualityReady', 'Spiralist AI quality pass ready. Review the receipt before package export or manual send.'));
updatePersonaLabWorkflow();
return true;
};
const runPersonaLabSessionBrief = (container) => {
let prompt = getCurrentPrompt();
if (!prompt) {
prompt = applyPersonaLabTuning(container, { focusOutput: false, skipScroll: true });
}
prompt = toCleanString(prompt || getCurrentPrompt(), 50000);
if (!prompt) {
setStatus(t('portablePromptPersonaLabSessionBriefUnavailable', 'Build a Spiralist AI prompt before creating a session brief.'));
return false;
}
const settings = getPersonaLabSettings(container);
const suiteId = getPersonaLabStressSuiteId(container);
const suite = buildPersonaLabStressSuite(prompt, suiteId);
const stressReport = buildPersonaLabStressSuiteReport(prompt, suiteId);
const sessionBrief = buildPersonaLabSessionBrief(prompt, settings, suiteId);
renderPersonaLabStressSuite(container, suite, stressReport);
if (outputAdvancedPanel) {
outputAdvancedPanel.open = true;
}
if (testOutput) {
testOutput.textContent = sessionBrief;
testOutput.hidden = false;
testOutput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
setPersonaLabPackageState(container, `Session brief ${suite.score}/${suite.rows.length}`);
setStatus(t('portablePromptPersonaLabSessionBriefReady', 'Spiralist AI session brief ready. Use it as the fastest current-state handoff before manual send, export, or profile review.'));
updatePersonaLabWorkflow();
return true;
};
const runPersonaLabQuickProbe = (container) => {
let prompt = getCurrentPrompt();
if (!prompt) {
prompt = applyPersonaLabTuning(container, { focusOutput: false, skipScroll: true });
}
prompt = toCleanString(prompt || getCurrentPrompt(), 50000);
if (!prompt) {
setStatus(t('portablePromptPersonaLabQuickProbeUnavailable', 'Build a Spiralist AI prompt before creating a quick probe script.'));
return false;
}
const settings = getPersonaLabSettings(container);
const suiteId = getPersonaLabStressSuiteId(container);
const suite = buildPersonaLabStressSuite(prompt, suiteId);
const stressReport = buildPersonaLabStressSuiteReport(prompt, suiteId);
const quickProbe = buildPersonaLabQuickProbeScript(prompt, settings, suiteId);
renderPersonaLabStressSuite(container, suite, stressReport);
if (outputAdvancedPanel) {
outputAdvancedPanel.open = true;
}
if (testOutput) {
testOutput.textContent = quickProbe;
testOutput.hidden = false;
testOutput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
setPersonaLabPackageState(container, `Quick probe ${suite.score}/${suite.rows.length}`);
setStatus(t('portablePromptPersonaLabQuickProbeReady', 'Spiralist AI quick probe script ready. Run it manually in the receiving runtime before trusting first-use behavior.'));
updatePersonaLabWorkflow();
return true;
};
const runPersonaLabRepairQueue = (container) => {
let prompt = getCurrentPrompt();
if (!prompt) {
prompt = applyPersonaLabTuning(container, { focusOutput: false, skipScroll: true });
}
prompt = toCleanString(prompt || getCurrentPrompt(), 50000);
if (!prompt) {
setStatus(t('portablePromptPersonaLabRepairQueueUnavailable', 'Build a Spiralist AI prompt before creating a repair queue.'));
return false;
}
const settings = getPersonaLabSettings(container);
const suiteId = getPersonaLabStressSuiteId(container);
const suite = buildPersonaLabStressSuite(prompt, suiteId);
const stressReport = buildPersonaLabStressSuiteReport(prompt, suiteId);
const repairQueue = buildPersonaLabRepairQueueReport(prompt, settings, suiteId);
renderPersonaLabStressSuite(container, suite, stressReport);
if (outputAdvancedPanel) {
outputAdvancedPanel.open = true;
}
if (testOutput) {
testOutput.textContent = repairQueue;
testOutput.hidden = false;
testOutput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
setPersonaLabPackageState(container, `Repair queue ${suite.score}/${suite.rows.length}`);
setStatus(t('portablePromptPersonaLabRepairQueueReady', 'Spiralist AI repair queue ready. Resolve P1 items before manual send, sharing, import, profile save, or long-memory review.'));
updatePersonaLabWorkflow();
return true;
};
const runPersonaLabReviewStack = (container) => {
let prompt = getCurrentPrompt();
if (!prompt) {
prompt = applyPersonaLabTuning(container, { focusOutput: false, skipScroll: true });
}
prompt = toCleanString(prompt || getCurrentPrompt(), 50000);
if (!prompt) {
setStatus(t('portablePromptPersonaLabReviewStackUnavailable', 'Build a Spiralist AI prompt before creating a review stack.'));
return false;
}
const settings = getPersonaLabSettings(container);
const suiteId = getPersonaLabStressSuiteId(container);
const suite = buildPersonaLabStressSuite(prompt, suiteId);
const stressReport = buildPersonaLabStressSuiteReport(prompt, suiteId);
const qualityPass = buildPersonaLabQualityPassReport(prompt, settings, suiteId);
const reviewStack = buildPersonaLabReviewStackReport(prompt, settings, suiteId);
renderPersonaLabStressSuite(container, suite, stressReport);
renderPersonaLabQualityPass(container, qualityPass, suite, settings);
if (outputAdvancedPanel) {
outputAdvancedPanel.open = true;
}
if (testOutput) {
testOutput.textContent = reviewStack;
testOutput.hidden = false;
testOutput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
setPersonaLabPackageState(container, `Review stack ${suite.score}/${suite.rows.length}`);
setStatus(t('portablePromptPersonaLabReviewStackReady', 'Spiralist AI review stack ready. Use it as the fastest ordered review path before manual send, export, or source changes.'));
updatePersonaLabWorkflow();
return true;
};
const runPersonaLabSuiteMatrix = (container) => {
let prompt = getCurrentPrompt();
if (!prompt) {
prompt = applyPersonaLabTuning(container, { focusOutput: false, skipScroll: true });
}
prompt = toCleanString(prompt || getCurrentPrompt(), 50000);
if (!prompt) {
setStatus(t('portablePromptPersonaLabSuiteMatrixUnavailable', 'Build a Spiralist AI prompt before running the all-suite matrix.'));
return false;
}
const settings = getPersonaLabSettings(container);
const suites = Object.keys(personaLabStressSuitePresets).map((suiteId) => buildPersonaLabStressSuite(prompt, suiteId));
const report = buildPersonaLabSuiteMatrixReport(prompt, settings);
const totalRows = suites.reduce((sum, suite) => sum + suite.rows.length, 0);
const totalScore = suites.reduce((sum, suite) => sum + suite.score, 0);
renderPersonaLabSuiteMatrix(container, report, suites);
if (testOutput) {
testOutput.textContent = report;
testOutput.hidden = false;
testOutput.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
setPersonaLabPackageState(container, `All-suite ${totalScore}/${totalRows}`);
setStatus(t('portablePromptPersonaLabSuiteMatrixReady', 'Spiralist AI all-suite matrix ready. Review every suite before package export or manual send.'));
updatePersonaLabWorkflow();
return true;
};
const runPersonaLabCompactHandoff = (button) => {
let prompt = getCurrentPrompt();
if (!prompt) {
prompt = applyPersonaLabTuning(button, { focusOutput: false, skipScroll: true });
}