feat: add Prompt Studio v9 Generation Console and Evaluation Loop - #48
Draft
IMONsergey wants to merge 70 commits into
Draft
feat: add Prompt Studio v9 Generation Console and Evaluation Loop#48IMONsergey wants to merge 70 commits into
IMONsergey wants to merge 70 commits into
Conversation
Owner
Author
V9 release audit — current stateImplementation is intentionally still draft. Do not treat queued GitHub Actions as passing execution. Completed in branch:
Known release blockers before Ready/Merge:
These blockers are also recorded in |
…ce at Winner time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prompt Studio v9 turns returned single/batch Seedance generations into an evidence-based human production review and controlled iteration system.
Production loop
V7/V8 generation history → Generation Console → structured Evaluation → saved Comparison → explicit human Winner → explicit continuation or one-lever Retake DraftNo provider submission or credential moves into the browser.
Generation Console
New browser runtime:
prompt-studio-generation-evaluation.jsprompt-studio-v9-workflow-guard.jsprompt-studio-v9-console-ui.jsprompt-studio-v9-bootstrap.jsprompt-studio-v9.cssConsole reads canonical V7/V8 generation history and surfaces:
Generated video/images are not auto-embedded or automatically downloaded.
Structured production Evaluation
13 explicit dimensions:
Each dimension supports score 1–5 or unrated, reviewer note, and evidence/observation.
overallScoreis the transparent arithmetic average of rated dimensions only. It is not AI confidence.Extension state:
generationEvaluations— max 200Score ≠ Winner
Winner state is deliberately separate from numeric evaluation.
Saved comparison:
Winner:
Architecture decision:
docs/ADR-017-V9-HUMAN-WINNER.md.Explicit winner continuation
After winner selection, V9 reuses the existing guarded V7 continuation path:
@refNN,mediaType:video,role:motion@refNN,mediaType:image,role:first-frame, lockedNo output attaches automatically simply because it won.
One-lever Retake Draft
Retake stores:
status:draftSaving a Retake Draft does not:
Architecture decision:
docs/ADR-018-V9-ONE-LEVER-RETAKE.md.Extension-safe V9 state
generationEvaluations— max 200generationComparisons— max 100generationWinners— comparison-keyed mapgenerationRetakes— max 100New closed schema:
schemas/prompt-studio-generation-evaluation.schema.jsonCore Prompt Studio schema remains unchanged.
Cross-layer staged-work safety
V9 mutating decisions are blocked while any overlapping production draft is staged:
V9 also exposes its own dirty Evaluation/Retake draft state.
While V9 is dirty, capture-phase guard blocks project-changing actions such as project switch/new/import/delete, source Fork, revision Restore and mutations in V4/V5/V7/V8 until Save/Discard.
If an external/public project mutation still occurs, the unsaved V9 draft invalidates visibly rather than applying to a newer project version.
Public mutation boundary
All saved V9 decisions use:
window.porterPromptStudio.replaceProject(..., { snapshot:true, preserveIdentity:true })No private Prompt Studio project state access.
Browser security boundary
V9 browser runtime contains no:
fetchpathARK_API_KEYV9 is a review/decision layer over result manifests already returned through V7/V8.
Tests / CI
New behavioral contracts:
validate-prompt-studio-v9-evaluation.mjsvalidate-prompt-studio-v9-console-ui.mjs(canonical UI contract)validate-prompt-studio-v9-production.mjsDedicated Node 20/22/24 CI runs:
GitHub-native project memory
Durable V9 context is stored in:
docs/PROJECT-MEMORY.mddocs/PROJECT-MEMORY.jsondocs/PROMPT-STUDIO-V9-GENERATION-CONSOLE.mddocs/PROMPT-STUDIO-V9-STATE.jsonThe V9 state file records branch/PR/exit criteria. Project planning must not depend on chat history.
Protected invariants
Unchanged:
Next
After V9:
This PR remains draft until final source/contract audit verifies mount order, browser zero-network boundary, cross-layer guards and current GitHub project memory.