qfai 1.8.8 → 1.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +27 -10
  2. package/assets/init/.qfai/assistant/agents/product-experience-architect.md +3 -2
  3. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +20 -31
  4. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/design-dna-intake.md +45 -15
  5. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-artifact-rules.md +2 -4
  6. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md +5 -10
  7. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +9 -13
  8. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/00_index.md +16 -13
  9. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +8 -12
  10. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +7 -23
  11. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +135 -48
  12. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/design-md-spec.md +114 -0
  13. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/generator-prompt.md +77 -19
  14. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/handoff.md +51 -14
  15. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-loop.md +38 -14
  16. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/reviewer-prompt.md +96 -43
  17. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/DESIGN.md.sample +74 -0
  18. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/contracts/prototype-handoff.sample.yaml +5 -2
  19. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +34 -2
  20. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md +1 -1
  21. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/ui-design-contract-normalization.md +62 -25
  22. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/design-md-lock.sample.yaml +23 -0
  23. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +3 -10
  24. package/assets/init/.qfai/assistant/steering/agent-routing.yml +5 -3
  25. package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +5 -10
  26. package/assets/init/root/DESIGN.md +83 -0
  27. package/assets/uix-rev/comparison-review.md +1 -1
  28. package/assets/uix-rev/contracts-review.md +1 -1
  29. package/assets/uix-rev/scoring-review.md +15 -13
  30. package/assets/uix-rev/strategy-review.md +7 -9
  31. package/assets/validators/layoutAntiPatterns.json +42 -0
  32. package/dist/cli/index.cjs +4048 -1241
  33. package/dist/cli/index.cjs.map +1 -1
  34. package/dist/cli/index.mjs +4082 -1275
  35. package/dist/cli/index.mjs.map +1 -1
  36. package/dist/index.cjs +1906 -891
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +74 -1
  39. package/dist/index.d.ts +74 -1
  40. package/dist/index.mjs +1948 -941
  41. package/dist/index.mjs.map +1 -1
  42. package/package.json +17 -18
  43. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/30_exploration_brief.md +0 -29
  44. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_reference_pool.md +0 -13
  45. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/32_design_anti_goals.md +0 -10
  46. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/brand-design.sample.yaml +0 -19
  47. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/exploration-brief.sample.yaml +0 -19
  48. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/reference-pool.sample.yaml +0 -14
  49. package/assets/validators/designSlopPatterns.json +0 -56
package/README.md CHANGED
@@ -18,11 +18,19 @@ The agent reads the repository, produces the required artifacts, and iterates un
18
18
  ## Release status
19
19
 
20
20
  - Release posture: runtime truthfulness is enforced.
21
- - Prototyping is UI-only and runs a single-thread evolution loop driven by
22
- `qfai prototyping iterate --cycle <n>`, with deterministic stop conditions
23
- (exit codes 0 continue / 64 convergence / 65 max-iterations / 2 input error).
21
+ - Prototyping is UI-only and runs a multi-spec evolution loop driven by
22
+ `qfai prototyping iterate --cycle <n>`. The skill resolves every
23
+ UI-bearing spec in one invocation, freezes that set at cycle 0, and
24
+ iterates `cycle 0..9` (max 10 cycles) with deterministic stop conditions
25
+ (exit codes 0 continue / 64 convergence / 65 max-iterations /
26
+ 66 license-verify failure / 2 input or lock drift).
24
27
  - Runtime observation is observed-only (no synthetic 200 / API / DB prototyping coverage).
25
- - Per-iter evidence is `screenshot.png` + `index.html` per declared screen plus a single `review.json` (4-axis ordinal, prose critique, anti-slop detection, pivot directive).
28
+ - Per-iter evidence is a single `<screen>.review.json` per declared spec ×
29
+ screen pair (4-axis ordinal verdicts, 6 `*Feel` short-prose impressions
30
+ bounded to 200 words each, `layoutAntiPatternsDetected[]`,
31
+ `designMdViolations[]`, and `pivotDirective`). Reviewer-emitted
32
+ `<screen>.review.json` is the only per-cycle artifact — no `screenshot.png`,
33
+ `index.html`, or `interaction.json`.
26
34
  - Calibration SSOT is the calibration pack referenced by `calibrationRef.packPath`.
27
35
 
28
36
  ## Quick start
@@ -66,8 +74,8 @@ npx qfai report
66
74
  Use `npx qfai prototyping preflight --target-url <url>` for a focused
67
75
  prototyping preflight before the skill starts; it surfaces blocking
68
76
  `QFAI-DCON-*` design-contract issues alongside runtime assumptions and resolves a runnable Playwright CLI launcher.
69
- Use `npx qfai prototyping iterate --cycle <n> --target-url <url>` to drive each cycle of the single-thread
70
- evolution loop. Exit codes: 0 (continue), 64 (convergence), 65 (max-iterations), 2 (input error).
77
+ Use `npx qfai prototyping iterate --cycle <n> --target-url <url>` to drive each cycle of the multi-spec
78
+ evolution loop. Exit codes: 0 (continue), 64 (convergence), 65 (max-iterations), 66 (license-verify failure), 2 (input or lock drift).
71
79
  Traceability refs inside prototyping evidence must use repo-root-relative concrete artifact refs
72
80
  (for example `.qfai/specs/spec-0001/01_Spec.md#L3` or `.qfai/evidence/prototyping/iter-03/home.png`).
73
81
  Absolute paths are invalid. The same strict ref grammar is enforced for top-level and leaf evidence-bearing fields, including
@@ -132,10 +140,19 @@ QFAI includes a small set of custom skills (stored under `.qfai/assistant/skills
132
140
  in `.qfai/specs/_policies/03_Capabilities.md` before the row is accepted
133
141
  (`QFAI-TRIAGE-006`). Every `01_Spec.md` declares a lifecycle
134
142
  `Status: active | superseded | deprecated | removed` (`QFAI-STATUS-001..006`).
135
- - **qfai-prototyping**: Single-thread design evolution loop. One prototype iterated through up to
136
- 15 cycles of generate -> capture -> review with a 4-axis ordinal rubric, anti-slop detection,
137
- prose critique, and explicit pivot permission. Stops deterministically when all four axes hit
138
- `exceptional` (exit 64) or the iteration budget is exhausted (exit 65).
143
+ - **qfai-prototyping**: Multi-spec parallel design evolution loop. Resolves
144
+ every UI-bearing spec in one invocation, freezes that set at cycle 0,
145
+ and iterates each `spec × screen` pair through up to 10 cycles
146
+ (`cycle 0..9`) of generate capture review with a 4-axis ordinal
147
+ rubric, 6 `*Feel` short-prose impressions (200-word bounded), explicit
148
+ layout anti-pattern detection (`lap-001..lap-008`), DESIGN.md token
149
+ violation detection, and explicit pivot permission. Stops
150
+ deterministically when every `spec × screen` pair satisfies the AND
151
+ convergence condition (all four ordinal axes `exceptional` AND
152
+ `layoutAntiPatternsDetected` empty AND `designMdViolations` empty)
153
+ (exit 64), when the 10-cycle budget is exhausted (exit 65), or when a
154
+ stock-photo source violates the cycle-0 frozen license catalog
155
+ (exit 66). Lock drift / input errors exit 2.
139
156
  - **qfai-atdd**: Implement acceptance tests driven by specs/scenarios.
140
157
  - **qfai-implement**: Unified TDD micro-cycle (Red/Green/Refactor) one test at a time using `test-list.md` as the execution ledger, including ledger status updates and exception closure.
141
158
  - **qfai-verify**: Run full-scan local quality gates (`validate --fail-on error`, `report`, repo gates) and produce reviewer-approved evidence under `.qfai/evidence/`.
@@ -28,8 +28,9 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
28
28
  - .qfai/specs/spec-\*/09_delta.md
29
29
  - .qfai/specs/spec-\*/01_Spec.md
30
30
  - .github/instructions/principles.instructions.md
31
- - Exploration brief, reference pool, evaluation rubric, evaluator calibration, selected direction, finalized design system,
32
- screen contracts, optional tokens, optional fallback HTML/CSS mock, and Mermaid flows
31
+ - Root `DESIGN.md` (brand SSOT: front-matter tokens plus `# Brand Philosophy` body)
32
+ - Reference pool framed as deviate-from inputs, screen contracts (`uiux/40_screen_contracts.md`), optional tokens, optional fallback HTML/CSS mock, and Mermaid flows
33
+ - Evaluator axes are fixed in `core/prototyping/evaluatorReview.ts#ORDINAL_AXES` (information architecture / navigation flow / usability / functionality) and no longer authored as sidecar files
33
34
  - Runtime screenshots or rendered evidence when available
34
35
 
35
36
  ## Deliverables
@@ -32,47 +32,41 @@ Produce a unified 15-file discussion pack plus exploration-first UI sidecars so
32
32
  ## CRITICAL CONSTRAINTS (Read First)
33
33
 
34
34
  - Output path is fixed: `.qfai/discussion/discussion-YYYYMMDDhhmmssSSS/`.
35
- - Required fixed files (all 15 are mandatory) remain unchanged.
35
+ - All 15 mandatory fixed files remain unchanged.
36
36
  - UI-bearing discussion packs may include `prototyping.yaml` as an optional recommendation artifact; non-ui discussion packs typically omit it.
37
- - Discussion completion requires `Disposition: open` count to be zero in `11_OQ-Register.md`.
37
+ - Completion requires `Disposition: open` count to be zero in `11_OQ-Register.md`.
38
38
  - If UI requirements exist, behavior obligations are primary and HTML+CSS mock is optional fallback only.
39
39
  - Discussion is planner-first: do not select a single visual winner and do not finalize the design system here.
40
40
  - Use artifact files, not conversational summaries, as the downstream handoff.
41
41
 
42
42
  ## UI-bearing Canonical Sidecar Family
43
43
 
44
- UI-bearing packs must produce the following sidecars as primary truth:
44
+ UI-bearing packs must produce, as primary truth: `uiux/40_screen_contracts.md`, `uiux/50_review_input_bundle.md`. They MUST also emit a draft brand SSOT at the **consuming-project root**:
45
45
 
46
- - `uiux/30_exploration_brief.md`
47
- - `uiux/31_reference_pool.md`
48
- - `uiux/32_design_anti_goals.md`
49
- - `uiux/40_screen_contracts.md`
50
- - `uiux/50_review_input_bundle.md`
46
+ - `<consuming-project-root>/DESIGN.md` — brand SSOT consumed by `/qfai-sdd` (freezes its sha256 in `.qfai/contracts/design/DESIGN.md.lock.yaml`) and by `/qfai-prototyping` (iterates against locked tokens). Brand intent (product intent, brand signals, anti-goals, reference pool framed as deviate-from inputs) lives in front-matter + `# Brand Philosophy` body — no separate per-aspect sidecar.
51
47
 
52
48
  ## Required Process
53
49
 
54
50
  1. Run the core interview for concept, scope, stakeholders, and constraints.
55
51
  2. Run Inception Deck and include at least one Mermaid diagram.
56
- 3. Run Story Workshop, capture user stories and user flows, and keep HTML+CSS mock as optional fallback only.
52
+ 3. Run Story Workshop, capture user stories and user flows; HTML+CSS mock is optional fallback only.
57
53
  4. Register source traceability and reference research in `04_Sources.md`.
58
54
  5. Capture scope, REQ, NFR, glossary, constraints, and policies.
59
55
  6. Run Example Mapping and capture `Example Seeds`.
60
56
  7. Update `11_OQ-Register.md`, resolve OQs until open count is zero, and move deferred items to `13_Deferred.md`.
61
57
  8. Generate the exploration-first sidecar family for UI-bearing targets.
62
- 9. Generate `prototyping.yaml` only when the latest discussion pack is UI-bearing and an explicit prototyping recommendation is useful.
63
- 10. Request review and record the Reviewer result.
58
+ 9. **Emit root `DESIGN.md` draft** for UI-bearing targets per `references/design-dna-intake.md`. Required when UI-bearing; skip otherwise.
59
+ 10. Generate `prototyping.yaml` only when the latest discussion pack is UI-bearing and an explicit prototyping recommendation is useful.
60
+ 11. Request review and record the Reviewer result.
64
61
 
65
62
  For UI-bearing targets, follow `references/design-dna-intake.md` while authoring the UI/UX sidecars. Keep this `SKILL.md` compact; put detailed interview prompts and examples in the reference file.
66
63
 
67
64
  ## UI-bearing Authoring Requirements
68
65
 
69
- - `30_exploration_brief.md` must define product intent, brand signals, and differentiation targets.
70
- - `31_reference_pool.md` must define exploration references with adopted points, rejected points, and copy risk framed as **deviate-from** inputs (not imitate-this) for downstream `/qfai-prototyping` reviewer.
71
- - `32_design_anti_goals.md` must contain explicit anti-goals; this also feeds the global anti-slop pattern list consulted by the prototyping reviewer.
72
- - `50_review_input_bundle.md` must document review inputs for downstream skills.
73
-
74
- Evaluation axes are global constants (4-step ordinal: weak / acceptable /
75
- strong / exceptional) and are not authored as discussion sidecars.
66
+ - Root `DESIGN.md` front-matter must define `brand` (name, archetype, voice), `audience` (emotion, do_not_look_like), and the full `visual.*` token tree (colors, typography, spacing, radius, shadow).
67
+ - `# Brand Philosophy` body documents do/don't, brand signals, and exploration references framed as **deviate-from** inputs (not imitate-this) for the downstream `/qfai-prototyping` reviewer.
68
+ - `40_screen_contracts.md` defines each screen contract per the template schema; `50_review_input_bundle.md` documents review inputs for downstream skills.
69
+ - Evaluation axes are global constants (4-step ordinal: weak / acceptable / strong / exceptional) and are not authored as discussion sidecars.
76
70
 
77
71
  ## Completion Contract (Shared)
78
72
 
@@ -84,7 +78,7 @@ Before declaring completion, you MUST:
84
78
  - ensure `Disposition: open` count is zero in `11_OQ-Register.md`;
85
79
  - ensure every deferred item has full metadata in `13_Deferred.md`;
86
80
  - ensure `02_Inception-Deck.md` and `03_Story-Workshop.md` include Mermaid diagrams;
87
- - ensure the UI-bearing sidecar family is complete;
81
+ - ensure the UI-bearing sidecar family is complete and the root `DESIGN.md` draft exists at the consuming-project root and parses as valid front-matter;
88
82
  - run `qfai validate --profile discussion --fail-on error` and fix discussion-owned findings;
89
83
  - avoid selecting a single visual winner in discussion artifacts.
90
84
 
@@ -92,15 +86,12 @@ Before declaring completion, you MUST:
92
86
 
93
87
  Reviewer checks must confirm:
94
88
 
95
- - the 15-file discussion pack is complete
96
- - `Disposition: open` count is zero in `11_OQ-Register.md`
97
- - the UI-bearing sidecar family is complete when the pack is UI-bearing
98
- - discussion stayed planner-first and did not choose a single visual winner
99
- - Drift Protocol is enforced
100
- - review policy is checked against `.qfai/assistant/steering/test-layers.md`
101
- - planning and coverage heuristics are signals, not gates
102
- - review findings end with `Status (PASS/REVISE)`
103
- - Reviewer result is explicit as `PASS` or `REVISE`
89
+ - the 15-file discussion pack is complete; `Disposition: open` count is zero in `11_OQ-Register.md`;
90
+ - the UI-bearing sidecar family is complete when the pack is UI-bearing;
91
+ - discussion stayed planner-first and did not choose a single visual winner;
92
+ - Drift Protocol is enforced; review policy is checked against `.qfai/assistant/steering/test-layers.md`;
93
+ - planning and coverage heuristics are signals, not gates;
94
+ - review findings end with `Status (PASS/REVISE)` and Reviewer result is explicit as `PASS` or `REVISE`.
104
95
 
105
96
  ## Sub-agent Delegation (MANDATORY)
106
97
 
@@ -108,9 +99,7 @@ Follow `.qfai/assistant/instructions/shared-skill-delegation-baseline.md`.
108
99
 
109
100
  ### Orchestrator Protocol (MUST)
110
101
 
111
- - do not self-approve
112
- - use artifact files as the handoff surface
113
- - integrate delegated outputs only after checking pack completeness
102
+ - do not self-approve; use artifact files as the handoff surface; integrate delegated outputs only after checking pack completeness.
114
103
 
115
104
  ### Capability Probe (MUST)
116
105
 
@@ -6,24 +6,54 @@ Use this reference only for UI-bearing discussion packs.
6
6
 
7
7
  - Brand personality: list 3-5 traits the product should express.
8
8
  - Audience emotion: define what users should feel after the primary task.
9
- - Category conventions: name the expected layout and interaction patterns for this market.
10
- - Differentiation targets: state what must feel unlike generic SaaS, generic shadcn, or direct competitors.
11
- - Anti-template constraints: name default visual patterns that must not survive into prototyping.
12
- - Reference strategy: collect competitor, adjacent, aspirational, template-seed, and anti-pattern references.
9
+ - Category conventions: name the expected layout and interaction
10
+ patterns for this market.
11
+ - Differentiation targets: state what must feel unlike generic SaaS or
12
+ direct competitors.
13
+ - Anti-template constraints: name default visual patterns that must
14
+ not survive into prototyping.
15
+ - Reference strategy: collect competitor, adjacent, aspirational,
16
+ template-seed, and anti-pattern references.
13
17
 
14
18
  ## Reference Rules
15
19
 
16
20
  - Treat templates as seeds, not winners.
17
21
  - Capture both adopted and rejected points for every reference.
18
- - Translate references into local product rules instead of copying visual surfaces.
22
+ - Translate references into local product rules instead of copying
23
+ visual surfaces.
19
24
  - Record copy risk as `low`, `medium`, or `high`.
20
- - Record template usage policy as `none`, `reference-only`, or `implementation-seed`.
21
-
22
- ## Output Mapping
23
-
24
- - Put product intent and brand signals in `30_exploration_brief.md`.
25
- - Put all reference decisions in `31_reference_pool.md` (deviate-from input, not imitate).
26
- - Put prohibited visual directions in `32_design_anti_goals.md` (also feeds reviewer anti-slop).
27
-
28
- Evaluation axes are global constants (4-step ordinal: weak / acceptable /
29
- strong / exceptional) and are not authored as discussion sidecars.
25
+ - Record template usage policy as `none`, `reference-only`, or
26
+ `implementation-seed`.
27
+
28
+ ## Output Mapping (new SSOT path)
29
+
30
+ The interview produces **one root `DESIGN.md`** at
31
+ `<consuming-project-root>/DESIGN.md`. This file is the brand SSOT
32
+ consumed by `/qfai-sdd` (which freezes its sha256) and by
33
+ `/qfai-prototyping` (which iterates under its tokens).
34
+
35
+ Map the interview answers into `DESIGN.md` as follows:
36
+
37
+ - Brand personality → `brand.voice` (1..N short trait words) and the
38
+ `# Brand Philosophy` body.
39
+ - Brand archetype → `brand.archetype`. Allowed values are the
40
+ 8-archetype catalog in `design-md-brand-catalog.md`
41
+ (`minimal | bold | corporate | playful | organic | tech | elegant |
42
+ casual`). Use `aesthetic_properties` from the catalog as defaults.
43
+ - Audience emotion → `audience.emotion`.
44
+ - Anti-template constraints + rejected references →
45
+ `audience.do_not_look_like` and the **Don't** subsection of the
46
+ `# Brand Philosophy` body.
47
+ - Visual decisions (color, typography, radius, shadow) → the
48
+ `visual.*` token tree. Schema and validation rules live in
49
+ `.qfai/assistant/skills/qfai-prototyping/references/design-md-spec.md`.
50
+ - Adopted reference points → the **Do** subsection of
51
+ `# Brand Philosophy`.
52
+
53
+ For the schema (12 colors, 3 fonts, 4 radii, 3 shadows, 8 archetypes),
54
+ read `qfai-prototyping/references/design-md-spec.md` and use the
55
+ sample at `qfai-prototyping/templates/DESIGN.md.sample` as a starting
56
+ shape.
57
+
58
+ Evaluation axes are global constants (4-step ordinal: weak / acceptable
59
+ / strong / exceptional) and are not authored as discussion sidecars.
@@ -41,12 +41,10 @@ UI-bearing discussion packs may include `prototyping.yaml` as an optional recomm
41
41
  For UI-bearing packs, use:
42
42
 
43
43
  - `04_Sources.md` for trend translation and competitive reference registry
44
- - `uiux/30_exploration_brief.md`
45
- - `uiux/31_reference_pool.md`
46
- - `uiux/32_design_anti_goals.md`
44
+ - `DESIGN.md` (root) — brand SSOT draft (front-matter + `# Brand Philosophy` body); `/qfai-sdd` Phase 0 freezes it into `.qfai/contracts/design/DESIGN.md.lock.yaml`
47
45
  - `uiux/40_screen_contracts.md`
48
46
 
49
- Discussion is exploration-first and must not choose a single visual winner or final design system. Those are downstream prototyping outputs.
47
+ Discussion is exploration-first and must not choose a single visual winner or final design system. The brand decision is captured once in root `DESIGN.md`; downstream prototyping consumes the frozen tokens.
50
48
 
51
49
  ## `prototyping.yaml`
52
50
 
@@ -26,17 +26,12 @@ Use this file when `/qfai-discussion` needs the full UI-bearing decision logic.
26
26
 
27
27
  ## Sidecar Family SSOT
28
28
 
29
+ For UI-bearing packs the brand SSOT is root `DESIGN.md` (drafted by
30
+ `/qfai-discussion` and frozen by `/qfai-sdd` Phase 0 into
31
+ `.qfai/contracts/design/DESIGN.md.lock.yaml`). The remaining sidecars are
32
+ the screen-level UX inputs:
33
+
29
34
  - `uiux/00_index.md`
30
- - `uiux/10_implementation_strategy.md`
31
- - `uiux/11_design_taste_interview.md`
32
- - `uiux/12_design_system.md`
33
- - `uiux/20_design_eval_invariant.md`
34
- - `uiux/21_design_eval_trend_derived.md`
35
- - `uiux/22_design_eval_product_specific.md`
36
- - `uiux/23_design_eval_aggregate.md`
37
- - `uiux/24_design_eval_dynamic_overrides.md`
38
- - `uiux/30_option_comparison.md`
39
- - `uiux/31_selected_anchor_screen.md`
40
35
  - `uiux/40_screen_contracts.md`
41
36
  - `uiux/50_review_input_bundle.md`
42
37
 
@@ -35,10 +35,10 @@
35
35
  - Acceptance criteria are consistent with flows/state transitions
36
36
  - Security/operations risks are reflected in diagrams where relevant
37
37
  - Mermaid diagrams use ` ```mermaid ` fences only
38
- - Exploration brief completeness and differentiation clarity (when UI-bearing)
39
- - Reference pool freshness and translation quality (when UI-bearing)
40
- - Exploration rubric quality and evaluation traceability (when UI-bearing)
41
- - Evaluator calibration skepticism and blandness rejection quality (when UI-bearing)
38
+ - Root `DESIGN.md` completeness and differentiation clarity (when UI-bearing)
39
+ - Reference pool freshness and translation quality into `DESIGN.md` (when UI-bearing)
40
+ - Evaluator scoring covers all four canonical UX axes — information architecture / navigation flow / usability / functionality, fixed in `core/prototyping/evaluatorReview.ts#ORDINAL_AXES` (when UI-bearing)
41
+ - Evaluator critique skepticism and blandness rejection quality applied against the four axes (when UI-bearing)
42
42
  - Best-of-history handling and winner selection consistency (when UI-bearing)
43
43
  - Screen contract sufficiency and strong schema completeness (when UI-bearing)
44
44
  - Generic fallback risk — ensure no unreviewed generic/placeholder UI remains (when UI-bearing)
@@ -47,21 +47,17 @@
47
47
 
48
48
  ## Exploration Direction Consistency
49
49
 
50
- <!-- Required for UI-bearing packs. Verifies sidecar-family alignment. -->
50
+ <!-- Required for UI-bearing packs. Verifies brand SSOT and sidecar alignment. -->
51
51
 
52
- - Exploration brief: verify `uiux/30_exploration_brief.md` defines product intent, must-preserve interactions, brand signals, and differentiation targets
53
- - Evaluation alignment: verify `uiux/33_exploration_rubric.md` and `uiux/34_evaluator_calibration.md` support skeptical evaluation and originality pressure
52
+ - Brand SSOT: verify root `DESIGN.md` defines `brand`, `audience`, and `visual.*` tokens, and that `# Brand Philosophy` body documents product intent, must-preserve interactions, brand signals, and differentiation targets
53
+ - Evaluator axes: confirm reviewers will score against the four canonical UX axes (information architecture / navigation flow / usability / functionality) — these are fixed in `core/prototyping/evaluatorReview.ts#ORDINAL_AXES` and no longer authored as sidecar files
54
54
  - History handling: verify `uiux/50_review_input_bundle.md` documents best-of-history comparison instead of latest-only preference
55
55
 
56
56
  ## Sidecar Artifact Review Scope
57
57
 
58
- <!-- Required for UI-bearing packs. Reviews uiux/ sidecar artifacts. -->
58
+ <!-- Required for UI-bearing packs. Reviews root DESIGN.md + uiux/ sidecar artifacts. -->
59
59
 
60
- - Verify exploration sidecars are present and complete (`30` to `34`, `40`, `50`)
61
- - Verify `uiux/30_exploration_brief.md` is specific enough to support divergent exploration
62
- - Verify `uiux/31_reference_pool.md` documents adopted, rejected, and locally translated references
63
- - Verify `uiux/33_exploration_rubric.md` weights design quality and originality explicitly
64
- - Verify `uiux/34_evaluator_calibration.md` contains good-critique / too-lenient / blandness-fail / originality-fail examples
60
+ - Verify root `DESIGN.md` is specific enough to support divergent exploration (front-matter populated, `# Brand Philosophy` body written, do/don't and reference notes framed as deviate-from inputs)
65
61
  - Verify `uiux/50_review_input_bundle.md` preserves best-of-history handling
66
62
  - Verify screen contracts use nested strong schema with all 4 required states (default/loading/empty/error) and treat `uiux/40_screen_contracts.md` as the state SSOT
67
63
 
@@ -6,27 +6,30 @@ Manifest of all UI/UX sidecar artifacts produced during a UI-bearing discussion.
6
6
 
7
7
  ## File Inventory
8
8
 
9
- | File | Purpose | Required |
10
- | --------------------------- | -------------------------------------------- | -------- |
11
- | 00_index.md | This manifest | Yes |
12
- | 30_exploration_brief.md | Exploration brief and design intent | Yes |
13
- | 31_reference_pool.md | Exploration references and local translation | Yes |
14
- | 32_design_anti_goals.md | Anti-goals and recurrence prevention | Yes |
15
- | 33_exploration_rubric.md | Evaluator rubric | Yes |
16
- | 34_evaluator_calibration.md | Evaluator calibration examples | Yes |
17
- | 40_screen_contracts.md | Screen interaction contracts (11 fields) | Yes |
18
- | 50_review_input_bundle.md | Review input bundle | Yes |
9
+ Brand-level intent (product intent, brand signals, anti-goals,
10
+ reference pool framed as deviate-from inputs) lives in root
11
+ `DESIGN.md` (front-matter + `# Brand Philosophy` body), not in this
12
+ sidecar family.
13
+
14
+ | File | Purpose | Required |
15
+ | ------------------------- | ---------------------------------------- | -------- |
16
+ | 00_index.md | This manifest | Yes |
17
+ | 40_screen_contracts.md | Screen interaction contracts (11 fields) | Yes |
18
+ | 50_review_input_bundle.md | Review input bundle | Yes |
19
19
 
20
20
  ## Completeness Rule
21
21
 
22
- All required files (8 files) MUST be present for a UI-bearing pack. Partial generation is not permitted (BR-0026-0002).
22
+ All required files MUST be present for a UI-bearing pack alongside root
23
+ `DESIGN.md`. Partial generation is not permitted.
23
24
 
24
25
  ## Forbidden Legacy Files
25
26
 
26
27
  The following files are NOT part of the canonical family and must NOT be created in new packs:
27
28
 
28
- - `30_option_comparison.md` — replaced by `30_exploration_brief.md`
29
- - `31_selected_anchor_screen.md` — replaced by `31_reference_pool.md` + `selected-direction.yaml`
29
+ - `30_option_comparison.md` — replaced by root `DESIGN.md`
30
+ - `31_selected_anchor_screen.md` — replaced by root `DESIGN.md`
31
+ - `33_exploration_rubric.md` — replaced by `core/prototyping/evaluatorReview.ts#ORDINAL_AXES`
32
+ - `34_evaluator_calibration.md` — replaced by `core/prototyping/evaluatorReview.ts#ORDINAL_AXES`
30
33
  - `40_contracts.md` — replaced by `40_screen_contracts.md`
31
34
  - `50_review_bundle.md` — replaced by `50_review_input_bundle.md`
32
35
  - `60_critique_loop.md` — removed (critique integrated into review bundle)
@@ -6,27 +6,23 @@ Consolidate all sidecar artifacts into a review-ready bundle for design reviewer
6
6
 
7
7
  ## Bundle Contents
8
8
 
9
- | Artifact | Path | Status |
10
- | -------------------------- | ---------------------------------- | ------------------------- |
11
- | Exploration brief | `uiux/30_exploration_brief.md` | [draft/reviewed/approved] |
12
- | Reference pool | `uiux/31_reference_pool.md` | [draft/reviewed/approved] |
13
- | Design anti-goals | `uiux/32_design_anti_goals.md` | [draft/reviewed/approved] |
14
- | Exploration rubric | `uiux/33_exploration_rubric.md` | [draft/reviewed/approved] |
15
- | Evaluator calibration | `uiux/34_evaluator_calibration.md` | [draft/reviewed/approved] |
16
- | Screen contracts | `uiux/40_screen_contracts.md` | [draft/reviewed/approved] |
17
- | Prototyping recommendation | `../prototyping.yaml` | [draft/reviewed/approved] |
9
+ | Artifact | Path | Status |
10
+ | -------------------------- | ----------------------------- | ------------------------- |
11
+ | Brand SSOT (root) | `DESIGN.md` | [draft/reviewed/approved] |
12
+ | Screen contracts | `uiux/40_screen_contracts.md` | [draft/reviewed/approved] |
13
+ | Prototyping recommendation | `../prototyping.yaml` | [draft/reviewed/approved] |
18
14
 
19
15
  ## Trend-derived review focus
20
16
 
21
17
  - Required references are all present and complete.
22
18
  - Stale / overused AI slop patterns are explicitly avoided.
23
- - Reference research is translated into exploration and evaluator calibration inputs.
19
+ - Reference research is translated into local design decisions on root `DESIGN.md` and screen contracts.
24
20
  - Later iterations are not automatically preferred over stronger middle iterations.
25
21
 
26
22
  ## Review Checklist
27
23
 
28
- - [ ] Exploration brief aligns with surface type and project constraints
24
+ - [ ] Root `DESIGN.md` aligns with surface type and project constraints
29
25
  - [ ] Reference pool is complete and translated into local design decisions
30
- - [ ] Evaluator calibration includes skeptical critique examples
26
+ - [ ] Evaluator scoring covers all four canonical UX axes (information architecture / navigation flow / usability / functionality) — fixed in `core/prototyping/evaluatorReview.ts#ORDINAL_AXES`
31
27
  - [ ] Best-of-history handling is explicit
32
28
  - [ ] Screen contracts cover all required states
@@ -33,19 +33,13 @@ QFAI Skill Body (SSOT)
33
33
 
34
34
  ## Spec Auto-Discovery Protocol
35
35
 
36
- When no explicit argument is given, detect the candidate spec and constrain execution to one spec only.
37
-
38
- ### One-Spec-at-a-Time Guarantee
39
-
40
- - Auto-discovery selects at most one spec for this run.
41
- - This protocol does NOT enable multi-spec parallel execution.
42
- - If multiple candidate specs are detected, do not start implementation until the user selects exactly one spec.
36
+ When no explicit argument is given, detect the candidate spec and constrain execution to one spec only. Auto-discovery selects at most one spec; this protocol does NOT enable multi-spec parallel execution.
43
37
 
44
38
  ### User Selection Flow
45
39
 
46
- - Single spec detected: announce the detected spec and ask for confirmation when scope is ambiguous.
47
- - Multiple specs detected: display the candidates and require the user to choose one spec.
48
- - Zero specs detected: stop and ask the user to provide the target spec explicitly.
40
+ - Single spec: announce the detected spec; ask for confirmation when scope is ambiguous.
41
+ - Multiple specs: display the candidates and require the user to choose one spec.
42
+ - Zero specs: stop and ask the user to provide the target spec explicitly.
49
43
 
50
44
  ## User Questions (AskUserQuestion Protocol)
51
45
 
@@ -75,20 +69,10 @@ Execute the TDD micro-cycle for each pending item in `test-list.md`, transitioni
75
69
  ## Visual Review Guard
76
70
 
77
71
  - Review rendered output, screenshot evidence, or HTML output before closing any UI-affecting item.
78
- - Read spec + contract inputs first whenever implementation touches UI or critique-driven behavior.
79
- - Read order: `01_Spec.md` → `03_Acceptance-Criteria.md` → `05_Examples.md` →
80
- `.qfai/contracts/design/exploration-brief.yaml` →
81
- `.qfai/contracts/design/reference-pool.yaml` → `.qfai/contracts/design/brand-design.yaml` →
82
- `.qfai/contracts/design/design-system.yaml` (extracted from final iter) →
83
- `.qfai/contracts/design/prototype-handoff.yaml` → `.qfai/contracts/ui/*.yaml` →
84
- canonical prototype evidence under `.qfai/evidence/prototyping/iter-NN/<screen>.{png,html}` →
85
- `.qfai/prototypes/final/index.html`.
72
+ - Read spec + contract inputs first whenever implementation touches UI or critique-driven behavior. Read order: `01_Spec.md` → `03_Acceptance-Criteria.md` → `05_Examples.md` → root `DESIGN.md` → `.qfai/contracts/design/DESIGN.md.lock.yaml` → `.qfai/contracts/design/design-system.yaml` (post-loop token mirror) → `.qfai/contracts/design/prototype-handoff.yaml` → `.qfai/contracts/ui/*.yaml` → `.qfai/evidence/prototyping/iter-NN/<screen>.{png,html}` → `.qfai/prototypes/final/index.html`.
86
73
  - Do not read discussion-pack UI/UX sidecars or fallback mocks.
87
- - Prototype HTML is analysis input, not production source. Reimplement with project-native
88
- patterns while preserving the visual identity captured in `prototype-handoff.yaml`
89
- `implementationNotes` (free-form prose).
90
- - UI-affecting items require product-surface-reviewer prototype parity review before `done`.
91
- - If code intent and rendered output diverge, treat the rendered/HTML result as the blocking review input and reconcile before DONE.
74
+ - Prototype HTML is analysis input, not production source. Reimplement with project-native patterns while preserving the visual identity captured in `prototype-handoff.yaml` `implementationNotes` (free-form prose).
75
+ - UI-affecting items require product-surface-reviewer prototype parity review before `done`. If code intent and rendered output diverge, treat the rendered/HTML result as the blocking review input and reconcile before DONE.
92
76
 
93
77
  ## Non-goals
94
78