qfai 1.8.1 → 1.8.2

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 (55) hide show
  1. package/README.md +1 -1
  2. package/assets/init/.qfai/assistant/agents/frontend-engineer.md +2 -2
  3. package/assets/init/.qfai/assistant/agents/product-experience-architect.md +2 -2
  4. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +3 -0
  5. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +2 -1
  6. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +60 -330
  7. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +15 -16
  8. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/00_index.md +13 -21
  9. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/30_exploration_brief.md +29 -0
  10. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_reference_pool.md +13 -0
  11. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/32_design_anti_goals.md +10 -0
  12. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/33_exploration_rubric.md +27 -0
  13. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/34_evaluator_calibration.md +17 -0
  14. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +16 -22
  15. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +5 -2
  16. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +82 -67
  17. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +4 -2
  18. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/design-system.sample.yaml +4 -0
  19. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluation-rubric.sample.yaml +16 -0
  20. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluator-calibration.sample.yaml +9 -0
  21. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/exploration-brief.sample.yaml +10 -0
  22. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/selected-direction.sample.yaml +7 -0
  23. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +1 -0
  24. package/assets/init/.qfai/assistant/steering/agent-catalog.yml +1 -1
  25. package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +6 -6
  26. package/assets/init/.qfai/contracts/README.md +5 -3
  27. package/assets/init/.qfai/contracts/design/README.md +13 -9
  28. package/assets/init/.qfai/discussion/README.md +18 -18
  29. package/assets/uix-rev/comparison-review.md +8 -10
  30. package/assets/uix-rev/contracts-review.md +1 -1
  31. package/assets/uix-rev/scoring-review.md +20 -46
  32. package/assets/uix-rev/strategy-review.md +11 -16
  33. package/dist/cli/index.cjs +902 -1971
  34. package/dist/cli/index.cjs.map +1 -1
  35. package/dist/cli/index.mjs +886 -1955
  36. package/dist/cli/index.mjs.map +1 -1
  37. package/dist/index.cjs +897 -1977
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +12 -0
  40. package/dist/index.d.ts +12 -0
  41. package/dist/index.mjs +875 -1955
  42. package/dist/index.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/10_implementation_strategy.md +0 -38
  45. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/11_design_taste_interview.md +0 -45
  46. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/12_design_system.md +0 -115
  47. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/20_design_eval_invariant.md +0 -68
  48. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/21_design_eval_trend_derived.md +0 -130
  49. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/22_design_eval_product_specific.md +0 -68
  50. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/23_design_eval_aggregate.md +0 -53
  51. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/24_design_eval_dynamic_overrides.md +0 -28
  52. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/30_option_comparison.md +0 -56
  53. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_selected_anchor_screen.md +0 -42
  54. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/anchor-selection.sample.yaml +0 -7
  55. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluation-axes.sample.yaml +0 -24
@@ -0,0 +1,29 @@
1
+ # 30 Exploration Brief
2
+
3
+ ## Product Intent
4
+
5
+ - What the product should feel like:
6
+ - What users should immediately understand:
7
+
8
+ ## Must-preserve Interactions
9
+
10
+ - Primary task:
11
+ - Secondary task:
12
+ - Critical state changes:
13
+
14
+ ## Brand Signals
15
+
16
+ - Desired tone:
17
+ - Desired visual character:
18
+ - Must-avoid brand signals:
19
+
20
+ ## Differentiation Targets
21
+
22
+ - How this surface should avoid generic layouts:
23
+ - Where deliberate originality should show up:
24
+
25
+ ## Implementation Constraints
26
+
27
+ - Technical constraints:
28
+ - Accessibility constraints:
29
+ - Operational constraints:
@@ -0,0 +1,13 @@
1
+ # 31 Reference Pool
2
+
3
+ ## Exploration References
4
+
5
+ | Ref | Type | Why it matters | Adopted points | Rejected points | Local translation |
6
+ | ------- | ------- | -------------- | -------------- | --------------- | ----------------- |
7
+ | REF-001 | Product | [why] | [adopted] | [rejected] | [translation] |
8
+
9
+ ## Design Guideline Research
10
+
11
+ | Ref | Guideline | Rule refs | Why it matters | Local translation |
12
+ | ------ | ----------- | ----------- | -------------- | ----------------- |
13
+ | GL-001 | [guideline] | [rule refs] | [why] | [translation] |
@@ -0,0 +1,10 @@
1
+ # 32 Design Anti-goals
2
+
3
+ ## Anti-goals
4
+
5
+ - Avoid generic library-default dashboards with no product character.
6
+ - Avoid AI-slop patterns such as purple gradients over white cards without product rationale.
7
+
8
+ ## Recurrence Prevention
9
+
10
+ - If a later iteration drifts toward a rejected direction, log the trigger and explicitly restate why the pattern is banned.
@@ -0,0 +1,27 @@
1
+ # 33 Exploration Rubric
2
+
3
+ ## Design Quality
4
+
5
+ - What counts as coherent:
6
+ - What breaks coherence:
7
+
8
+ ## Originality
9
+
10
+ - What counts as deliberate design:
11
+ - What counts as generic or AI-slop:
12
+
13
+ ## Craft
14
+
15
+ - Typography, spacing, color, and contrast competence:
16
+
17
+ ## Functionality
18
+
19
+ - Whether users can understand and complete the core task:
20
+
21
+ ## Accessibility Risk
22
+
23
+ - Which issues are hard fails:
24
+
25
+ ## Implementation Plausibility
26
+
27
+ - What level of complexity is acceptable for the current slice:
@@ -0,0 +1,17 @@
1
+ # 34 Evaluator Calibration
2
+
3
+ ## Good Critique
4
+
5
+ - Example of a skeptical but actionable critique:
6
+
7
+ ## Too Lenient
8
+
9
+ - Example of praise that should be rejected because it ignores obvious blandness or usability issues:
10
+
11
+ ## Blandness Fail
12
+
13
+ - Example of a design that is technically competent but too generic to pass:
14
+
15
+ ## Originality Fail
16
+
17
+ - Example of a design that copies defaults without deliberate product-specific choices:
@@ -6,33 +6,27 @@ 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
- | Strategy | `uiux/10_implementation_strategy.md` | [draft/reviewed/approved] |
12
- | Taste interview | `uiux/11_design_taste_interview.md` | [draft/reviewed/approved] |
13
- | Trend scan | `04_Sources.md#Trend Scan` | [draft/reviewed/approved] |
14
- | Invariant layer | `uiux/20_design_eval_invariant.md` | [draft/reviewed/approved] |
15
- | Trend-derived layer | `uiux/21_design_eval_trend_derived.md` | [draft/reviewed/approved] |
16
- | Product-specific layer | `uiux/22_design_eval_product_specific.md` | [draft/reviewed/approved] |
17
- | Aggregate layer | `uiux/23_design_eval_aggregate.md` | [draft/reviewed/approved] |
18
- | Dynamic overrides | `uiux/24_design_eval_dynamic_overrides.md` | [optional] |
19
- | Option comparison | `uiux/30_option_comparison.md` | [draft/reviewed/approved] |
20
- | Selected anchor | `uiux/31_selected_anchor_screen.md` | [draft/reviewed/approved] |
21
- | Screen contracts | `uiux/40_screen_contracts.md` | [draft/reviewed/approved] |
22
- | Prototyping recommendation | `../prototyping.yaml` | [draft/reviewed/approved] |
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] |
23
18
 
24
19
  ## Trend-derived review focus
25
20
 
26
- - Required trend categories are all present and complete.
21
+ - Required references are all present and complete.
27
22
  - Stale / overused AI slop patterns are explicitly avoided.
28
- - Trend research is translated into scoring, comparison, and selected anchor decisions.
29
- - Scoring-ready axes use canonical fields: `origin`, `layer`, `source_refs`, `goal_refs`, `evidence_required`, `review_questions`.
23
+ - Reference research is translated into exploration and evaluator calibration inputs.
24
+ - Later iterations are not automatically preferred over stronger middle iterations.
30
25
 
31
26
  ## Review Checklist
32
27
 
33
- - [ ] Strategy aligns with surface type and project constraints
34
- - [ ] Trend categories are complete and translated into local design decisions
35
- - [ ] Competitive references include adopted_points, rejected_points, and local_translation
36
- - [ ] Scoring-ready axes expose canonical fields including origin/source_refs/goal_refs/evidence_required/review_questions
37
- - [ ] Selected anchor clearly documents rationale and downstream implications
28
+ - [ ] Exploration brief aligns with surface type and project constraints
29
+ - [ ] Reference pool is complete and translated into local design decisions
30
+ - [ ] Evaluator calibration includes skeptical critique examples
31
+ - [ ] Best-of-history handling is explicit
38
32
  - [ ] Screen contracts cover all required states
@@ -77,8 +77,11 @@ Execute the TDD micro-cycle for each pending item in `test-list.md`, transitioni
77
77
  - Review rendered output, screenshot evidence, or HTML output before closing any UI-affecting item.
78
78
  - Read spec + contract inputs first whenever implementation touches UI or critique-driven behavior.
79
79
  - Read order: `01_Spec.md` → `03_Acceptance-Criteria.md` → `05_Examples.md` →
80
- `.qfai/contracts/design/anchor-selection.yaml` → `.qfai/contracts/design/evaluation-axes.yaml` →
81
- `.qfai/contracts/design/design-system.yaml` `.qfai/contracts/ui/*.yaml`
80
+ `.qfai/contracts/design/exploration-brief.yaml` →
81
+ `.qfai/contracts/design/anchor-selection.yaml` (legacy alias, when present)
82
+ `.qfai/contracts/design/evaluation-axes.yaml` (legacy alias, when present) →
83
+ `.qfai/contracts/design/evaluation-rubric.yaml` → `.qfai/contracts/design/evaluator-calibration.yaml` →
84
+ `.qfai/contracts/design/selected-direction.yaml` → `.qfai/contracts/design/design-system.yaml` → `.qfai/contracts/ui/*.yaml` →
82
85
  optional design tokens → optional fallback mock → mermaid flows.
83
86
  - If code intent and rendered output diverge, treat the rendered/HTML result as the blocking review input and reconcile before DONE.
84
87
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: qfai-prototyping
3
- title: QFAI Prototyping (Skill-Orchestrated)
4
- description: "Build a contract-aligned UI prototype, run agent-led visual evaluation, and gate completion through validate/verify."
3
+ title: QFAI Prototyping (Exploration-First Harness)
4
+ description: "Run a planner/generator/evaluator UI harness with a 5→3→2→1 direction funnel, breakthrough detection, and final design-system extraction."
5
5
  argument-hint: "[--auto]"
6
6
  allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
7
7
  roles:
@@ -39,14 +39,13 @@ Do not rely on a CLI entrypoint or package runtime loop.
39
39
  - Supported UI prototyping surfaces are `web`, `mobile`, `desktop`, and `mixed`.
40
40
  - `cli`, API-only, backend-only, and `ui_bearing: false` classifications are not prototyping execution targets.
41
41
  - `cli` is not supported and is not an execution target for prototyping.
42
- - Canonical screen contracts in `.qfai/contracts/ui/*.yaml` are mandatory.
43
- - Evaluation is performed by sub-agents; machine checks are limited to schema/evidence validation.
44
- - Evaluation reviewer findings must be fixed or explicitly dispositioned before PASS.
45
- - Shared evidence vocabulary includes `render.json` and `browser-qa.json` alongside screenshot and HTML evidence.
42
+ - Evaluation is performed by sub-agents; machine checks are limited to schema/evidence validation and breakthrough trigger detection.
43
+ - Shared evidence vocabulary includes `render.json`, `browser-qa.json`, `prototyping.json`, and `breakthrough.json`.
44
+ - static-first evidence capture remains mandatory even when interactive review is used.
46
45
 
47
46
  ## Goal
48
47
 
49
- Build the minimum runnable slice for all specs and produce reviewable screenshot/HTML evidence for every declared screen.
48
+ Generate multiple design directions, converge on a winner, extract the selected direction and final design system, and keep the winner open to breakthrough pivots during later polish iterations.
50
49
 
51
50
  ## Surface / Mode
52
51
 
@@ -62,8 +61,11 @@ Read and follow these references before execution:
62
61
  - `.qfai/assistant/skills/qfai-prototyping/references/iteration-cycle.md`
63
62
  - `.qfai/assistant/skills/qfai-prototyping/references/l1-review-guide.md`
64
63
  - `.qfai/assistant/skills/qfai-prototyping/references/l2-review-guide.md`
64
+ - `.qfai/contracts/design/anchor-selection.yaml` when legacy validator slices are exercised
65
+ - `.qfai/contracts/design/evaluation-axes.yaml` when legacy validator slices are exercised
65
66
  - `.qfai/assistant/skills/qfai-prototyping/references/design-system-compliance.md`
66
67
  - `.qfai/assistant/skills/qfai-prototyping/references/reviewer-gate.md`
68
+ - `.qfai/assistant/steering/test-layers.md`
67
69
 
68
70
  ## Delegation Scope Table
69
71
 
@@ -71,12 +73,13 @@ All sub-agent delegation in this skill MUST follow the category-to-role mapping
71
73
  Assigning a task to a role not listed for the category is a violation and MUST be flagged.
72
74
  Evaluation scoring and screenshot capture must use only the allowed roles below.
73
75
 
74
- | Category | Allowed Role(s) |
75
- | ------------------ | ------------------------------------------------------ |
76
- | UI implementation | frontend-engineer, product-experience-architect |
77
- | Screenshot capture | devops-ci-engineer |
78
- | Evaluation review | product-surface-reviewer, product-experience-architect |
79
- | Build | devops-ci-engineer, backend-engineer |
76
+ | Category | Allowed Role(s) |
77
+ | --------------------- | ------------------------------------------------------ |
78
+ | UI implementation | frontend-engineer, product-experience-architect |
79
+ | Screenshot capture | devops-ci-engineer |
80
+ | Evaluation scoring | product-surface-reviewer, product-experience-architect |
81
+ | Build | devops-ci-engineer, backend-engineer |
82
+ | Breakthrough planning | product-experience-architect, frontend-engineer |
80
83
 
81
84
  Any delegation map entry that assigns a category to an undefined or unlisted role MUST produce a violation finding naming the undefined role and the category.
82
85
 
@@ -89,7 +92,8 @@ Before any code is written, create an execution plan record in the work evidence
89
92
  Required fields:
90
93
 
91
94
  - `targetIterations`: integer; minimum 2
92
- - `evaluationAxesSource`: ref to `.qfai/contracts/design/evaluation-axes.yaml`
95
+ - `funnelPolicy`: `5->3->2->1`
96
+ - `evaluationAxesSource`: ref to `.qfai/contracts/design/evaluation-rubric.yaml`
93
97
  - `delegationMap`: category-to-role assignments per Delegation Scope Table
94
98
  - `plannedAt`: ISO-8601 timestamp
95
99
 
@@ -99,19 +103,27 @@ Read the downstream-ready spec/contract inputs and verify:
99
103
 
100
104
  - `.qfai/specs/<spec-id>/01_Spec.md`
101
105
  - `.qfai/specs/<spec-id>/03_Acceptance-Criteria.md`
102
- - `.qfai/contracts/design/evaluation-axes.yaml`
103
- - `.qfai/contracts/design/anchor-selection.yaml`
104
- - `.qfai/contracts/design/design-system.yaml` when required by the spec
106
+ - `.qfai/contracts/design/exploration-brief.yaml`
107
+ - `.qfai/contracts/design/evaluation-rubric.yaml`
108
+ - `.qfai/contracts/design/evaluator-calibration.yaml`
109
+ - `.qfai/contracts/design/anchor-selection.yaml` when legacy validator slices are exercised
110
+ - `.qfai/contracts/design/evaluation-axes.yaml` when legacy validator slices are exercised
111
+ - `.qfai/contracts/design/selected-direction.yaml` when already created
112
+ - `.qfai/contracts/design/design-system.yaml` when already created
105
113
  - `.qfai/contracts/ui/*.yaml`
106
114
 
107
115
  Read order:
108
116
 
109
117
  1. `.qfai/specs/<spec-id>/01_Spec.md`
110
118
  2. `.qfai/specs/<spec-id>/03_Acceptance-Criteria.md`
111
- 3. `.qfai/contracts/design/anchor-selection.yaml`
112
- 4. `.qfai/contracts/design/evaluation-axes.yaml`
113
- 5. `.qfai/contracts/design/design-system.yaml`
114
- 6. `.qfai/contracts/ui/*.yaml`
119
+ 3. `.qfai/contracts/design/exploration-brief.yaml`
120
+ 4. `.qfai/contracts/design/evaluation-rubric.yaml`
121
+ 5. `.qfai/contracts/design/evaluator-calibration.yaml`
122
+ 6. `.qfai/contracts/design/anchor-selection.yaml` (legacy validator alias, when present)
123
+ 7. `.qfai/contracts/design/evaluation-axes.yaml` (legacy validator alias, when present)
124
+ 8. `.qfai/contracts/design/selected-direction.yaml`
125
+ 9. `.qfai/contracts/design/design-system.yaml`
126
+ 10. `.qfai/contracts/ui/*.yaml`
115
127
 
116
128
  ### Step 2 — Verify Execution Preconditions
117
129
 
@@ -120,16 +132,16 @@ Confirm all of the following before any evaluation:
120
132
  - classification is UI-bearing
121
133
  - surface is `web`, `mobile`, `desktop`, or `mixed`
122
134
  - every declared screen has a stable `screen-id`
123
- - the design evaluation contract satisfies the required schema
124
- - the design system checklist is available when required
135
+ - the exploration brief, evaluation rubric, and evaluator calibration contracts satisfy the required schema
125
136
 
126
- ### Step 3 — Implement the Minimum Runnable Slice
137
+ ### Step 3 — Generate Divergent Directions
127
138
 
128
- Implement the smallest UI slice that covers all declared screens and primary interactions.
139
+ Generate 5 clearly distinct design directions before selecting a winner.
140
+ Do not begin with a single incumbent direction.
129
141
 
130
142
  ### Step 4 — Capture Mandatory Evidence
131
143
 
132
- For every declared screen:
144
+ For every declared screen and every active direction:
133
145
 
134
146
  - capture one screenshot and store it at the canonical screenshot path
135
147
  - capture one HTML snapshot and store it at the canonical HTML path
@@ -141,57 +153,52 @@ Launch evaluation reviewer sub-agents with the full context bundle:
141
153
 
142
154
  - screenshots from Step 4
143
155
  - HTML snapshots from Step 4
144
- - `axisDefs` from `.qfai/contracts/design/evaluation-axes.yaml`
156
+ - `axisDefs` from `.qfai/contracts/design/evaluation-rubric.yaml`
145
157
  - `previousScore` from the prior iteration (`null` for iteration 1)
146
158
  - `designSystemChecklist` from `.qfai/contracts/design/design-system.yaml`
147
159
 
148
- If any required input is missing, stop the evaluation and classify the screen as `0` points with rerun required.
160
+ ### Step 6 Direction Funnel
149
161
 
150
- ### Step 6 Aggregate Findings
162
+ Run the mandatory convergence funnel:
151
163
 
152
- Aggregate reviewer findings and classify them as:
164
+ - 5 directions -> top 3
165
+ - top 3 remixed -> top 2
166
+ - top 2 -> selected winner 1
153
167
 
154
- - blocking
155
- - immediate-fix
156
- - revise
157
- - manual-review
168
+ ### Step 7 — Extract Winner Contracts
158
169
 
159
- ### Step 7 Fix and Re-capture
170
+ After the first winner is selected:
160
171
 
161
- Apply fixes per finding disposition, then re-capture screenshot and HTML evidence for every changed screen.
162
- Do not close a finding without fresh evidence.
172
+ - write `.qfai/contracts/design/selected-direction.yaml`
173
+ - extract `.qfai/contracts/design/design-system.yaml`
163
174
 
164
- ### Step 8 — Re-evaluate
175
+ ### Step 8 — Polish the Winner
165
176
 
166
- Repeat Steps 4–7 until:
167
-
168
- - at least 2 iterations have completed
169
- - all declared screens have screenshot + HTML evidence
170
- - blocking findings are closed or dispositioned
171
- - validate can pass on required schema/evidence gates
177
+ Iterate on the selected winner with normal critique/rework loops.
178
+ Do not assume the latest iteration is automatically best; keep best-of-history in evidence.
172
179
 
173
180
  ## Iteration Gate
174
181
 
175
- - minimum 2 iterations are required before phase transition to validation or review.
176
- - if the iteration gate is not satisfied, phase transition is blocked.
177
- - terminationCondition cannot bypass the minimum 2 iterations rule.
182
+ - Minimum 2 iterations are required before any terminal phase transition is allowed.
183
+ - Do not mark the run as converged or complete after a single iteration.
184
+ - Any phase transition to completion must pass through the iteration gate and reviewer gate.
185
+
186
+ ### Step 9 — Breakthrough Detection
178
187
 
179
- ## Full-harness
188
+ After each polish iteration, run the mechanical breakthrough detector.
189
+ If `allItemsPass95` is false and score improvement is below the configured plateau threshold and code change is below the configured diff threshold, trigger breakthrough branching.
180
190
 
181
- - `full-harness` applies only after explicit escalation from the default `standard` path.
182
- - `full-harness` carries review-heavy obligations and stricter evidence checks.
191
+ ### Step 10 Breakthrough Branch Loop
183
192
 
184
- ## Obligation matrix
193
+ When breakthrough is triggered:
185
194
 
186
- | surface / mode | obligation profile |
187
- | ----------------------- | ----------------------------------- |
188
- | web / default route | static-first obligations (standard) |
189
- | web / full-harness | review-heavy obligations |
190
- | mobile / default route | static-first obligations (standard) |
191
- | desktop / default route | static-first obligations (standard) |
192
- | mixed / full-harness | review-heavy obligations |
195
+ - generate exactly 2 branch directions
196
+ - compare incumbent + 2 branches
197
+ - replace the mainline if a branch wins
198
+ - refresh selected-direction/design-system if the winner changes
199
+ - record the decision in `.qfai/evidence/breakthrough.json`
193
200
 
194
- ### Step 9 — Validate and Verify
201
+ ### Step 11 — Validate and Verify
195
202
 
196
203
  - Run `qfai validate --fail-on error`.
197
204
  - Route `/qfai-verify` or its equivalent gate workflow for final quality approval.
@@ -211,26 +218,29 @@ When launching any evaluation reviewer sub-agent, all 5 elements MUST be present
211
218
 
212
219
  Each iteration evaluation MUST score all 6 visual categories:
213
220
 
214
- 1. Color
215
- 2. Typography
216
- 3. Spacing
217
- 4. Border radius
218
- 5. Shadow
219
- 6. Do's&Don'ts
221
+ 1. Design quality
222
+ 2. Originality
223
+ 3. Craft
224
+ 4. Functionality
225
+ 5. Accessibility risk
226
+ 6. Implementation plausibility
220
227
 
221
228
  ### Reviewer Gate (MUST)
222
229
 
223
230
  Reviewer checks are defined in:
224
231
 
225
232
  - `.qfai/assistant/skills/qfai-prototyping/references/reviewer-gate.md`
233
+ - `.qfai/assistant/steering/test-layers.md`
226
234
 
227
235
  Minimum reviewer responsibilities:
228
236
 
237
+ - enforce the Drift Protocol before approving a completion transition
229
238
  - verify mandatory screenshot/HTML evidence exists for every declared screen
230
- - verify 3-layer evaluation references were used
239
+ - verify exploration brief, evaluation rubric, and evaluator calibration were used
231
240
  - verify missing evidence caused rerun rather than waiver
232
241
  - verify `qfai validate --fail-on error` completed successfully
233
- - verify Drift Protocol compliance and alignment with `.qfai/assistant/steering/test-layers.md`
242
+ - verify breakthrough trigger evidence is present
243
+ - verify best-of-history handling is documented
234
244
  - treat score/volume heuristics as signals, not gates
235
245
  - return `Result: PASS | REVISE`
236
246
 
@@ -265,6 +275,9 @@ Prototyping-specific additions:
265
275
 
266
276
  - all specs are covered
267
277
  - all declared screens have screenshot + HTML evidence
278
+ - `selected-direction.yaml` exists
279
+ - `design-system.yaml` exists
280
+ - `breakthrough.json` exists
268
281
  - `qfai validate --fail-on error` passes
269
282
  - reviewer returns `PASS`
270
283
 
@@ -274,6 +287,8 @@ Prototyping-specific additions:
274
287
  - Every declared screen has screenshot evidence.
275
288
  - Every declared screen has HTML evidence.
276
289
  - Missing evidence triggered rerun instead of waiver.
290
+ - Direction funnel `5->3->2->1` completed.
291
+ - Breakthrough detector ran after polish iterations.
277
292
  - Reviewer returned PASS; otherwise status is REVISE.
278
293
 
279
294
  ## Completion Message & Next Actions (MUST)
@@ -223,9 +223,11 @@ Create or update layered SDD artifacts in one run so downstream execution phases
223
223
  - Target `spec-XXXX/01..10` layered files
224
224
  - Updated contracts under `.qfai/contracts/**`
225
225
  - UI-bearing normalized contracts:
226
+ - `.qfai/contracts/design/exploration-brief.yaml`
227
+ - `.qfai/contracts/design/evaluation-rubric.yaml`
228
+ - `.qfai/contracts/design/evaluator-calibration.yaml`
229
+ - `.qfai/contracts/design/selected-direction.yaml`
226
230
  - `.qfai/contracts/design/design-system.yaml`
227
- - `.qfai/contracts/design/evaluation-axes.yaml`
228
- - `.qfai/contracts/design/anchor-selection.yaml`
229
231
  - `.qfai/contracts/ui/*.yaml`
230
232
  - `.qfai/report/preflight_summary.md`
231
233
  - Evidence file: `.qfai/evidence/sdd-spec-XXXX.md`
@@ -16,3 +16,7 @@ checklist:
16
16
  dos_and_donts:
17
17
  - do: maintain clear hierarchy on the primary screen
18
18
  - dont: mix multiple accent palettes on one screen
19
+ component_tone:
20
+ - keep components visibly related to the chosen direction
21
+ motion_rules:
22
+ - use motion to clarify hierarchy and state change
@@ -0,0 +1,16 @@
1
+ # Downstream evaluation rubric generated by /qfai-sdd
2
+ axes:
3
+ - id: design-quality
4
+ weight: 3
5
+ - id: originality
6
+ weight: 3
7
+ - id: craft
8
+ weight: 1
9
+ - id: functionality
10
+ weight: 1
11
+ hard_floors:
12
+ - functionality
13
+ - accessibility-risk
14
+ weighted_axes:
15
+ - design-quality
16
+ - originality
@@ -0,0 +1,9 @@
1
+ # Downstream evaluator calibration generated by /qfai-sdd
2
+ good_critique_examples:
3
+ - Skeptical, specific, and actionable feedback
4
+ too_lenient_examples:
5
+ - Praise that ignores blandness
6
+ blandness_fail_examples:
7
+ - Technically correct but generic
8
+ originality_fail_examples:
9
+ - Library defaults with no product-specific decisions
@@ -0,0 +1,10 @@
1
+ # Downstream exploration brief generated by /qfai-sdd
2
+ product_intent: Create a deliberate, non-generic product surface.
3
+ target_users:
4
+ - Primary end users
5
+ must_preserve_interactions:
6
+ - Primary task remains obvious
7
+ brand_signals:
8
+ - Confident
9
+ differentiation_targets:
10
+ - Avoid generic dashboard defaults
@@ -0,0 +1,7 @@
1
+ # Downstream selected direction generated by /qfai-prototyping
2
+ chosen_direction_id: DIR-001
3
+ winning_rationale: Strongest balance of originality and clarity.
4
+ carry_forward_rules:
5
+ - Preserve hierarchy strategy
6
+ rejected_summary:
7
+ - DIR-002: too generic
@@ -99,6 +99,7 @@ Use the shared schema.
99
99
  - declared screens have mandatory screenshot and HTML evidence under `.qfai/evidence/prototyping/`;
100
100
  - Drift Protocol enforced;
101
101
  - test-layer policy enforced against `test-layers.md`.
102
+ - gate counts and ratios are signals, not gates.
102
103
  - Route specialist reviewers from `.qfai/assistant/steering/agent-routing.yml`.
103
104
  - Default verify review set:
104
105
  - `qa-gatekeeper`
@@ -65,7 +65,7 @@ agents:
65
65
  - id: frontend-engineer
66
66
  kind: worker
67
67
  domain: frontend
68
- mission: Implement frontend behavior aligned with selected anchor, strategy, screen contracts, and product-surface decisions.
68
+ mission: Implement frontend behavior aligned with selected direction, finalized design system, screen contracts, and product-surface decisions.
69
69
  owned_artifacts: [ui-implementation, surface-evidence]
70
70
  tool_profile: frontend
71
71
  permission_profile: authoring
@@ -8,11 +8,11 @@ spec-0013 (CAP-0013) で定義された、下流 skill(prototyping / ATDD / TD
8
8
  **Primary truth** は step 1 の discussion sidecar artifacts にある。step 2 以降は **存在する場合のみ読む supporting input / fallback** であり、init 直後に未作成でも正常である。
9
9
 
10
10
  1. **Discussion-side UI/UX Sidecar Artifacts** (`discussion-*/uiux/`) — **primary source of truth**
11
- - `30_option_comparison.md` — オプション比較(比較 artifact
12
- - `31_selected_anchor_screen.md` — 選定結果 + selected anchor の SSOT
13
- - `10_implementation_strategy.md` — 実装戦略(strict canonical schema)
14
- - `11_design_taste_interview.md` — デザインテイストインタビュー
15
- - `20-24` — 3-layer 評価ファミリー(**invariant / trend-derived / product-specific / aggregate / dynamic overrides** の 5 sidecar のみ。`20` は invariant axes, **Trend Scan は sidecar ではなく `04_Sources.md#Trend Scan` が正本**。旧 `uiux/20_trend_scan.md` は廃止。)
11
+ - `30_exploration_brief.md` — 探索ブリーフ(product intent / brand signals / must-preserve interactions
12
+ - `31_reference_pool.md` — 参照プール(reference registry + local translation)
13
+ - `32_design_anti_goals.md` — 避けるべきデザイン方向
14
+ - `33_exploration_rubric.md` — 探索評価基準
15
+ - `34_evaluator_calibration.md` — evaluator 較正用 examples
16
16
  - `40_screen_contracts.md` — スクリーンコントラクト(strong schema)
17
17
  - `50_review_input_bundle.md` — レビュー入力バンドル
18
18
 
@@ -47,7 +47,7 @@ spec-0013 (CAP-0013) で定義された、下流 skill(prototyping / ATDD / TD
47
47
 
48
48
  ## Priority and Override Semantics
49
49
 
50
- - discussion sidecar artifacts が **primary truth**。具体的には (a) `uiux/30_option_comparison.md`(option comparison)、(b) `uiux/31_selected_anchor_screen.md`(selected anchor)、(c) `uiux/10_implementation_strategy.md`(implementation strategy)、(d) `uiux/40_screen_contracts.md`(screen contracts / 強スキーマ)の順で読む。
50
+ - discussion sidecar artifacts が **primary truth**。具体的には (a) `uiux/30_exploration_brief.md`、(b) `uiux/31_reference_pool.md`、(c) `uiux/33_exploration_rubric.md`、(d) `uiux/34_evaluator_calibration.md`、(e) `uiux/40_screen_contracts.md` の順で読む。
51
51
  - `.qfai/contracts/ui/` の UI Contracts と Design Token は **存在する場合のみ読む supporting input**(primary truth ではない)。
52
52
  - Optional fallback mock はさらに後順位の **fallback**。
53
53
  - Design Token の値と HTML Mock の fallback 値が矛盾する場合は warning を発行。
@@ -18,7 +18,7 @@ QFAI organizes this directory into four subdirectories:
18
18
  .qfai/contracts/
19
19
  ├── api/ # OpenAPI YAML (endpoints, request/response)
20
20
  ├── db/ # SQL schema contracts (tables, columns, constraints)
21
- ├── design/ # Design system / axes / anchor YAML
21
+ ├── design/ # Exploration brief / rubric / selected direction / design system YAML
22
22
  └── ui/ # UI contract YAML (screens, elements, user actions)
23
23
  ```
24
24
 
@@ -42,9 +42,11 @@ QFAI organizes this directory into four subdirectories:
42
42
  │ └── db-0001-<slug>.sql
43
43
  ├── design/
44
44
  │ ├── README.md
45
+ │ ├── exploration-brief.yaml
46
+ │ ├── evaluation-rubric.yaml
47
+ │ ├── evaluator-calibration.yaml
48
+ │ ├── selected-direction.yaml
45
49
  │ ├── design-system.yaml
46
- │ ├── evaluation-axes.yaml
47
- │ ├── anchor-selection.yaml
48
50
  │ └── design-tokens.yaml (optional)
49
51
  └── ui/
50
52
  ├── README.md
@@ -1,8 +1,8 @@
1
- # contracts/design (Design Execution Inputs)
1
+ # contracts/design (Exploration + Design Execution Inputs)
2
2
 
3
3
  ## Purpose
4
4
 
5
- Provide the downstream execution truth for design-system and design-evaluation inputs that `/qfai-sdd` normalizes from UI-bearing discussion packs.
5
+ Provide the downstream execution truth for exploration-first prototyping and final design-system extraction that `/qfai-sdd` and `/qfai-prototyping` normalize from UI-bearing discussion packs.
6
6
 
7
7
  These files are version-managed and may be read directly by `/qfai-prototyping`, `/qfai-implement`, `/qfai-atdd`, and `qfai validate`.
8
8
 
@@ -12,20 +12,24 @@ After `qfai init`, this directory contains only this README. This is the normal
12
12
 
13
13
  The absence of design files is not a defect for non-UI capabilities. For UI-bearing capabilities, missing required design files should be resolved in `/qfai-sdd`.
14
14
 
15
- ## When Design Tokens Are Used
15
+ ## Typical Exploration-first Files
16
16
 
17
17
  Typical files:
18
18
 
19
- - `design-system.yaml` — normalized checklist for color, typography, spacing, radius, shadow, and do/don't rules
20
- - `evaluation-axes.yaml` — normalized invariant / trend-derived / product-specific / aggregate axes
21
- - `anchor-selection.yaml` — selected anchor and adoption rationale needed by downstream review
19
+ - `exploration-brief.yaml` — machine-readable exploration brief generated from discussion
20
+ - `evaluation-rubric.yaml` — machine-readable evaluator rubric with weighted originality/design criteria
21
+ - `evaluator-calibration.yaml` — evaluator alignment examples and anti-leniency guidance
22
+ - `selected-direction.yaml` — current winning direction, rationale, and carry-forward rules
23
+ - `design-system.yaml` — extracted final design system produced after direction convergence
22
24
  - `design-tokens*.yaml` — optional token definitions
23
25
 
24
26
  ## Expected File Names
25
27
 
28
+ - `exploration-brief.yaml`
29
+ - `evaluation-rubric.yaml`
30
+ - `evaluator-calibration.yaml`
31
+ - `selected-direction.yaml`
26
32
  - `design-system.yaml`
27
- - `evaluation-axes.yaml`
28
- - `anchor-selection.yaml`
29
33
  - `design-tokens.yaml`
30
34
  - `design-tokens.mobile.yaml`
31
35
 
@@ -33,4 +37,4 @@ Typical files:
33
37
 
34
38
  - **Not** a replacement for specs or UI contracts
35
39
  - **Not** an excuse for downstream skills to read discussion-side artifacts directly
36
- - **Not** limited to optional token files only
40
+ - **Not** a place to finalize a winner before prototyping convergence