Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
6640e94
feat: add Prompt Studio v9 generation evaluation and decision engine
IMONsergey Aug 8, 2026
99e5c2b
feat: add Prompt Studio v9 cross-layer evaluation draft guard
IMONsergey Aug 8, 2026
5c08b69
feat: add Prompt Studio v9 Generation Console and evaluation UI
IMONsergey Aug 8, 2026
dab77d8
schema: add Prompt Studio v9 generation evaluation extensions
IMONsergey Aug 8, 2026
0fcea64
feat: mount Prompt Studio v9 Generation Console
IMONsergey Aug 8, 2026
2d8868c
style: add Prompt Studio v9 Generation Console UI
IMONsergey Aug 8, 2026
d1b8906
test: add Prompt Studio v9 evaluation comparison winner and retake co…
IMONsergey Aug 8, 2026
5294550
test: add Prompt Studio v9 Generation Console JSDOM workflow contract
IMONsergey Aug 8, 2026
408486f
test: add canonical Prompt Studio v9 Generation Console UI contract
IMONsergey Aug 8, 2026
23ae75c
docs: define Prompt Studio v9 Generation Console evaluation workflow
IMONsergey Aug 8, 2026
ed824c1
test: add Prompt Studio v9 production and project-memory contract
IMONsergey Aug 8, 2026
5ec9573
ci: add Prompt Studio v9 Generation Console evaluation matrix
IMONsergey Aug 8, 2026
07feca5
docs: add machine-readable Prompt Studio v9 implementation state
IMONsergey Aug 8, 2026
438fee2
docs: record V9 human-winner architecture decision
IMONsergey Aug 8, 2026
2a3317a
docs: record V9 one-lever Retake Draft decision
IMONsergey Aug 8, 2026
053050c
ci: add V9 Pages preflight without duplicating deployment
IMONsergey Aug 8, 2026
c7a1a37
test: add final V9 Console UI contract with render-safe interactions
IMONsergey Aug 8, 2026
f179147
docs: add V9 implementation notes and current blockers
IMONsergey Aug 8, 2026
284e47b
feat: add Prompt Studio v9 decision lineage auditor
IMONsergey Aug 8, 2026
2a28f6b
test: add V9 generation decision lineage audit contract
IMONsergey Aug 8, 2026
413e349
ci: add authoritative Prompt Studio v9 release matrix
IMONsergey Aug 8, 2026
5340a35
docs: record current Prompt Studio v9 release audit state
IMONsergey Aug 8, 2026
7f02cfc
fix: harden V9 human decision semantics and evaluation readiness
IMONsergey Aug 8, 2026
0509bb7
schema: harden V9 evaluation readiness winner and retake contracts
IMONsergey Aug 8, 2026
fd4b259
fix: guard direct Prompt Studio source opens while V9 drafts are dirty
IMONsergey Aug 8, 2026
55c6e0c
feat: expose V9 decision readiness and restrict visual decisions to s…
IMONsergey Aug 8, 2026
8118a66
fix: audit raw V9 decision state and decision-readiness integrity
IMONsergey Aug 8, 2026
8ed2380
test: lock V9 decision-readiness rationale and retake safety contracts
IMONsergey Aug 8, 2026
05bba1e
test: harden V9 decision audit against raw invalid state
IMONsergey Aug 8, 2026
8a0300d
test: validate decision-ready Console UX and direct source-open guard
IMONsergey Aug 8, 2026
bf56a18
feat: mount Prompt Studio v9 before command palette
IMONsergey Aug 8, 2026
a23b74f
chore: gate GitHub Pages on Prompt Studio v9 production contracts
IMONsergey Aug 8, 2026
f6d1493
test: extend central Pages contract through Prompt Studio v9
IMONsergey Aug 8, 2026
608378a
test: harden V9 production contract for decision readiness and real P…
IMONsergey Aug 8, 2026
53c41b6
ci: consolidate Prompt Studio v9 release validation
IMONsergey Aug 8, 2026
d9beb8f
chore: remove duplicate V9 Pages preflight workflow
IMONsergey Aug 8, 2026
6a1190e
chore: remove duplicate V9 release workflow
IMONsergey Aug 8, 2026
baee05d
chore: remove superseded V9 draft UI contract
IMONsergey Aug 8, 2026
3004fcb
chore: remove superseded duplicate V9 Console contract
IMONsergey Aug 8, 2026
d4f66cb
docs: update V9 state with decision-readiness and release hardening
IMONsergey Aug 8, 2026
080ef03
docs: bind canonical project memory to V9 PR 48 and decision-readines…
IMONsergey Aug 8, 2026
d64142c
docs: harden V9 human winner decision-readiness contract
IMONsergey Aug 8, 2026
79c526e
docs: require evidence expected improvement and retained locks for V9…
IMONsergey Aug 8, 2026
b512bfe
docs: record V9 decision readiness and evidence gates
IMONsergey Aug 8, 2026
f7c275c
ci: include V9 state and release-memory documents in triggers
IMONsergey Aug 8, 2026
2aa9661
refactor: centralize V9 verdicts retake levers and evidence prerequis…
IMONsergey Aug 8, 2026
ab40b17
refactor: consume canonical V9 verdict and retake lever registries
IMONsergey Aug 8, 2026
1471238
fix: audit V9 raw verdict lever comparison and winner-key integrity
IMONsergey Aug 8, 2026
dfc1ce2
test: align V9 production contract with canonical verdict and retake …
IMONsergey Aug 8, 2026
8387f46
feat: add explicit opt-in video review preview to V9 Console
IMONsergey Aug 8, 2026
06a24ae
style: add V9 explicit review preview and decision readiness states
IMONsergey Aug 8, 2026
9ca51d6
test: enforce explicit preload-none V9 media preview boundary
IMONsergey Aug 8, 2026
2fc1881
test: lock V9 explicit preload-none review preview behavior
IMONsergey Aug 8, 2026
d4dabdd
fix: prevent overlapping V9 and foreign staged drafts at creation time
IMONsergey Aug 8, 2026
e61c1f2
test: add adversarial raw-state cases to V9 decision audit
IMONsergey Aug 8, 2026
3d3295e
docs: rewrite V9 product contract for decision readiness explicit pre…
IMONsergey Aug 8, 2026
2124021
feat: require comparison-wide review readiness and snapshot winner ev…
IMONsergey Aug 8, 2026
dbd8e67
schema: persist V9 decision evidence snapshots for winners and retakes
IMONsergey Aug 8, 2026
129c523
feat: audit V9 winner and retake evaluation evidence snapshots for la…
IMONsergey Aug 8, 2026
eef78b7
test: require comparison-wide readiness and decision evidence snapshots
IMONsergey Aug 8, 2026
fc7a40d
feat: gate Winner UX on comparison-wide review readiness
IMONsergey Aug 8, 2026
2de4828
test: require all comparison candidates reviewed before V9 Winner UI …
IMONsergey Aug 8, 2026
a6b6d35
test: verify historical winner and retake evidence drift auditing
IMONsergey Aug 8, 2026
aaedf67
test: require comparison-wide readiness and evidence snapshots in V9 …
IMONsergey Aug 8, 2026
46d0792
docs: define comparison-wide readiness and historical evaluation snap…
IMONsergey Aug 8, 2026
fa885b5
docs: require full comparison readiness and snapshot candidate eviden…
IMONsergey Aug 8, 2026
ada123c
docs: snapshot source Evaluation when creating one-lever Retake hypot…
IMONsergey Aug 8, 2026
b1dba0e
docs: consolidate current V9 Generation Console release contract
IMONsergey Aug 8, 2026
4f9e00e
docs: finalize V9 project memory with comparison readiness and eviden…
IMONsergey Aug 8, 2026
f05086e
docs: mark V9 release candidate with comparison-wide evidence snapshots
IMONsergey Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 20 additions & 76 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,189 +28,133 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm install

- name: Validate Pages production artifact contract
run: node scripts/validate-pages-contract.mjs

- name: Validate Deep Review Workspace contract
run: node scripts/validate-deep-review-workspace.mjs

- name: Validate Review Player evidence boundary
run: node scripts/validate-review-player.mjs

- name: Validate Promotion Workspace contract
run: node scripts/validate-promotion-workspace.mjs

- name: Validate strategic Coverage Planner contract
run: node scripts/validate-coverage-planner.mjs

- name: Validate source adapter registry, risk policy and health engine
run: node scripts/validate-source-adapters.mjs

- name: Validate Operations Command Center
run: node scripts/validate-operations-command-center.mjs

- name: Validate Operations production wiring
run: node scripts/validate-operations-production.mjs

- name: Validate global Command Palette
run: node scripts/validate-command-palette.mjs

- name: Validate Command Palette production wiring
run: node scripts/validate-command-palette-production.mjs

- name: Validate Workspace Evidence Bundles
run: node scripts/validate-workspace-bundles.mjs

- name: Validate Workspace Bundle production wiring
run: node scripts/validate-workspace-bundles-production.mjs

- name: Validate Curated Rotation Planner
run: node scripts/validate-rotation-planner.mjs

- name: Validate Curated Rotation production wiring
run: node scripts/validate-rotation-production.mjs

- name: Validate Prompt Studio engine and safety contract
run: node scripts/validate-prompt-studio.mjs

- name: Validate Prompt Studio local AI contract
run: node scripts/validate-prompt-studio-ai.mjs

- name: Validate Prompt Studio production wiring
run: node scripts/validate-prompt-studio-production.mjs

- name: Validate Prompt Studio v2 Rule Packs
run: node scripts/validate-prompt-studio-v2-rule-packs.mjs

- name: Validate Prompt Studio v2 production wiring
run: node scripts/validate-prompt-studio-v2-production.mjs

- name: Validate Prompt Studio v3 Variables Ingredients and Timeline
run: node scripts/validate-prompt-studio-production-tools.mjs

- name: Validate Prompt Studio v3 Shared Ingredient Library
run: node scripts/validate-prompt-studio-ingredient-library.mjs

- name: Validate Prompt Studio v3 extension persistence
run: node scripts/validate-prompt-studio-v3-persistence.mjs

- name: Validate Prompt Studio v3 production wiring
run: node scripts/validate-prompt-studio-v3-production.mjs

- name: Validate Prompt Studio v4 Storyboard Variants and Handoff engines
run: node scripts/validate-prompt-studio-v4-engines.mjs

- name: Validate Prompt Studio v4 workflow guard behavior
run: node scripts/validate-prompt-studio-v4-workflow-guard.mjs

- name: Validate Prompt Studio v4 production wiring
run: node scripts/validate-prompt-studio-v4-production.mjs

- name: Validate Prompt Studio v5 Repair Blueprints and Seedance engines
run: node scripts/validate-prompt-studio-v5-engines.mjs

- name: Validate Prompt Studio v5 workflow guard behavior
run: node scripts/validate-prompt-studio-v5-workflow-guard.mjs

- name: Validate Prompt Studio v5 production wiring
run: node scripts/validate-prompt-studio-v5-production.mjs

- name: Validate Prompt Studio v6 audio reference engine
run: node scripts/validate-prompt-studio-v6-audio.mjs

- name: Validate Prompt Studio v6 audio reference UI
run: node scripts/validate-prompt-studio-v6-audio-ui.mjs

- name: Validate Prompt Studio v6 production wiring
run: node scripts/validate-prompt-studio-v6-production.mjs

- name: Validate Prompt Studio v7 Generation Results engine
run: node scripts/validate-prompt-studio-v7-generation-results.mjs

- name: Validate Prompt Studio v7 staged UI
run: node scripts/validate-prompt-studio-v7-ui.mjs

- name: Validate Prompt Studio v7 production wiring
run: node scripts/validate-prompt-studio-v7-production.mjs

- name: Validate Prompt Studio v8 variant batch plan
run: node scripts/validate-prompt-studio-v8-batch.mjs

- name: Validate Prompt Studio v8 batch UI
run: node scripts/validate-prompt-studio-v8-ui.mjs

- name: Validate Prompt Studio v8 production wiring
run: node scripts/validate-prompt-studio-v8-production.mjs

- name: Validate Prompt Studio v9 evaluation and decision readiness
run: node scripts/validate-prompt-studio-v9-evaluation.mjs
- name: Validate Prompt Studio v9 decision integrity audit
run: node scripts/validate-prompt-studio-v9-decision-audit.mjs
- name: Validate Prompt Studio v9 Generation Console and guards
run: node scripts/validate-prompt-studio-v9-console-ui.mjs
- name: Validate Prompt Studio v9 production wiring
run: node scripts/validate-prompt-studio-v9-production.mjs
- name: Validate protected exact-100 browser render
run: npm run validate:render

- name: Build Research Corpus + strategic operations snapshots for Pages
continue-on-error: true
run: npm run case:refresh

- name: Prepare static Pages site
shell: bash
run: |
set -euo pipefail
rm -rf _site
mkdir -p _site

cp studio/library.html _site/index.html

# Every browser module and stylesheet in Studio is published automatically.
# `validate-pages-contract.mjs` verifies the import graph and critical assets
# before this step, so new workspaces cannot silently 404 in production.
find studio -maxdepth 1 -type f \( -name '*.js' -o -name '*.css' \) -exec cp {} _site/ \;

# Research/operations snapshots are best-effort. The curated app stays live
# if an upstream source is temporarily unavailable.
for snapshot in case-candidates.json case-review-queue.json coverage-plan.json source-health.json; do
if [[ -f "studio/$snapshot" ]]; then
cp "studio/$snapshot" "_site/$snapshot"
fi
if [[ -f "studio/$snapshot" ]]; then cp "studio/$snapshot" "_site/$snapshot"; fi
done

touch _site/.nojekyll

# Project Pages is hosted under /Seedance-Porter/, so local root-relative
# entry assets become relative in the published index.
sed -i 's|href="/library.css"|href="./library.css"|g' _site/index.html
sed -i 's|href="/digest.css"|href="./digest.css"|g' _site/index.html
sed -i 's|href="/case-intelligence.css"|href="./case-intelligence.css"|g' _site/index.html
sed -i 's|href="/case-corpus.css"|href="./case-corpus.css"|g' _site/index.html
sed -i 's|src="/library.js"|src="./library.js"|g' _site/index.html
sed -i 's|src="/sidebar.js"|src="./sidebar.js"|g' _site/index.html
sed -i 's|src="/case-ui.js"|src="./case-ui.js"|g' _site/index.html

test -f _site/sidebar.js
test -f _site/prompt-studio-ui.js
test -f _site/prompt-studio.css
test -f _site/prompt-studio-rule-packs-bootstrap.js
test -f _site/prompt-studio-production-tools-bootstrap.js
test -f _site/prompt-studio-v4-bootstrap.js
test -f _site/prompt-studio-v4.css
test -f _site/prompt-studio-v5-bootstrap.js
test -f _site/prompt-studio-v5.css
test -f _site/prompt-studio-v6-bootstrap.js
test -f _site/prompt-studio-v6.css
test -f _site/prompt-studio-v7-bootstrap.js
test -f _site/prompt-studio-v7.css
test -f _site/prompt-studio-v8-bootstrap.js
test -f _site/prompt-studio-v8.css

for asset in \
sidebar.js prompt-studio-ui.js prompt-studio.css \
prompt-studio-rule-packs-bootstrap.js prompt-studio-production-tools-bootstrap.js \
prompt-studio-v4-bootstrap.js prompt-studio-v4.css \
prompt-studio-v5-bootstrap.js prompt-studio-v5.css \
prompt-studio-v6-bootstrap.js prompt-studio-v6.css \
prompt-studio-v7-bootstrap.js prompt-studio-v7-workflow-guard.js prompt-studio-v7-results-ui.js prompt-studio-v7.css \
prompt-studio-v8-bootstrap.js prompt-studio-v8-batch-ui.js prompt-studio-generation-batch.js prompt-studio-v8.css \
prompt-studio-v9-bootstrap.js prompt-studio-v9-workflow-guard.js prompt-studio-v9-console-ui.js prompt-studio-generation-evaluation.js prompt-studio-generation-evaluation-audit.js prompt-studio-v9.css; do
test -f "_site/$asset"
done
- name: Configure Pages
uses: actions/configure-pages@v6

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/prompt-studio-v9-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Prompt Studio v9 Generation Console CI

on:
pull_request:
paths:
- 'studio/prompt-studio-*.js'
- 'studio/prompt-studio*.css'
- 'studio/sidebar.js'
- 'schemas/prompt-studio-generation*.json'
- 'scripts/validate-prompt-studio-v7-*.mjs'
- 'scripts/validate-prompt-studio-v8-*.mjs'
- 'scripts/validate-prompt-studio-v9-*.mjs'
- 'scripts/validate-pages-contract.mjs'
- 'docs/PROJECT-MEMORY*'
- 'docs/PROMPT-STUDIO-V9-*.md'
- 'docs/PROMPT-STUDIO-V9-STATE.json'
- 'docs/V9-*.md'
- 'docs/ADR-017-*.md'
- 'docs/ADR-018-*.md'
- '.github/workflows/pages.yml'
- '.github/workflows/prompt-studio-v9-ci.yml'
push:
branches: [main]
paths:
- 'studio/prompt-studio-*.js'
- 'studio/prompt-studio*.css'
- 'studio/sidebar.js'
- 'schemas/prompt-studio-generation*.json'
- 'scripts/validate-prompt-studio-v7-*.mjs'
- 'scripts/validate-prompt-studio-v8-*.mjs'
- 'scripts/validate-prompt-studio-v9-*.mjs'
- 'scripts/validate-pages-contract.mjs'
- 'docs/PROJECT-MEMORY*'
- 'docs/PROMPT-STUDIO-V9-*.md'
- 'docs/PROMPT-STUDIO-V9-STATE.json'
- 'docs/V9-*.md'
- 'docs/ADR-017-*.md'
- 'docs/ADR-018-*.md'
- '.github/workflows/pages.yml'
- '.github/workflows/prompt-studio-v9-ci.yml'
workflow_dispatch:

jobs:
v9:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [20,22,24]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run check
- run: npm test
- name: Validate V4 Variant/Handoff baseline
run: node scripts/validate-prompt-studio-v4-engines.mjs
- name: Validate V7 Generation Results baseline
run: node scripts/validate-prompt-studio-v7-generation-results.mjs
- name: Validate V7 staged UI baseline
run: node scripts/validate-prompt-studio-v7-ui.mjs
- name: Validate V7 production baseline
run: node scripts/validate-prompt-studio-v7-production.mjs
- name: Validate V8 Variant Batch baseline
run: node scripts/validate-prompt-studio-v8-batch.mjs
- name: Validate V8 return-path UI baseline
run: node scripts/validate-prompt-studio-v8-ui.mjs
- name: Validate V8 production baseline
run: node scripts/validate-prompt-studio-v8-production.mjs
- name: Validate V9 evaluation/readiness/winner/retake engine
run: node scripts/validate-prompt-studio-v9-evaluation.mjs
- name: Validate V9 decision integrity audit
run: node scripts/validate-prompt-studio-v9-decision-audit.mjs
- name: Validate V9 Generation Console UI and workflow guards
run: node scripts/validate-prompt-studio-v9-console-ui.mjs
- name: Validate V9 production and project-memory wiring
run: node scripts/validate-prompt-studio-v9-production.mjs
- name: Validate generalized Pages browser module graph
run: node scripts/validate-pages-contract.mjs
- name: Validate protected exact-100 renderer
run: npm run validate:render
- name: Parse V9 schema/state/memory JSON
run: |
node -e "for (const p of ['schemas/prompt-studio-generation-evaluation.schema.json','docs/PROJECT-MEMORY.json','docs/PROMPT-STUDIO-V9-STATE.json']) JSON.parse(require('fs').readFileSync(p,'utf8')); console.log('json-ok')"
- name: Syntax-check V9 runtime and contracts
run: |
node --check studio/prompt-studio-generation-evaluation.js
node --check studio/prompt-studio-generation-evaluation-audit.js
node --check studio/prompt-studio-v9-workflow-guard.js
node --check studio/prompt-studio-v9-console-ui.js
node --check studio/prompt-studio-v9-bootstrap.js
node --check studio/sidebar.js
node --check scripts/validate-prompt-studio-v9-evaluation.mjs
node --check scripts/validate-prompt-studio-v9-decision-audit.mjs
node --check scripts/validate-prompt-studio-v9-console-ui.mjs
node --check scripts/validate-prompt-studio-v9-production.mjs
node --check scripts/validate-pages-contract.mjs
88 changes: 88 additions & 0 deletions docs/ADR-017-V9-HUMAN-WINNER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# ADR-017 — Winner is a human decision after full comparison review

Status: Accepted
Date: 2026-08-08
Scope: Prompt Studio v9 Generation Console

## Context

V9 has a 13-dimension production Evaluation and transparent average score. The score helps inspection but cannot safely answer the final production question by itself.

Two failure modes must be prevented:

1. highest score silently becomes Winner;
2. preferred candidate is reviewed deeply while alternatives are barely reviewed, then Winner is selected anyway.

A third problem appears later: if Evaluations are edited after the decision, future learning must still know which evidence existed **at decision time**.

## Decision

Evaluation, Decision Readiness and Winner are separate states.

### Evaluation

- one canonical Evaluation per generated task;
- verdict is `candidate | retake | reject`;
- `winner` is not an Evaluation verdict;
- overall score is only the average of rated dimensions.

### Per-candidate readiness

An Evaluation is decision-ready only when:

- at least 5 dimensions are rated;
- at least 3 dimensions contain note/evidence;
- production-readiness is rated.

### Comparison-wide readiness

A Comparison contains 2–8 unique succeeded visual results.

**Every candidate must be decision-ready before any Winner action is enabled or accepted by the engine.**

### Human Winner

Winner requires:

- comparison is decision-ready;
- selected task belongs to comparison;
- task/export lineage is intact;
- non-empty human rationale;
- explicit user action.

No numeric score, threshold or ranking automatically chooses the Winner.

### Historical evidence snapshot

At Winner selection time, V9 snapshots the Evaluation version for **all comparison candidates**:

- task ID;
- Evaluation ID;
- Evaluation updatedAt;
- overall score;
- verdict;
- rated/evidence counts;
- decision-ready flag.

Later Evaluation edits do not rewrite the Winner.

Decision Audit reports post-decision review changes as `winner-evidence-drift` warning. A malformed or incomplete snapshot set is a hard integrity error.

## Consequences

Positive:

- alternatives receive symmetric minimum review;
- score remains evidence, not authority;
- rationale remains human and durable;
- historical decision evidence is reconstructable;
- V10 can learn from the evidence state that actually produced the decision, not from later edits.

Tradeoffs:

- Winner requires more review work;
- changing an Evaluation after Winner may produce an audit warning until the team deliberately re-evaluates the decision.

## Invariant

**Review every candidate. Then decide explicitly. Snapshot the evidence state that existed when the decision was made.**
Loading
Loading