qfai 1.7.13 → 1.7.15

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 (74) hide show
  1. package/README.md +35 -8
  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/agents/product-surface-reviewer.md +1 -1
  5. package/assets/init/.qfai/assistant/instructions/agent-selection.md +2 -0
  6. package/assets/init/.qfai/assistant/instructions/shared-skill-delegation-baseline.md +88 -0
  7. package/assets/init/.qfai/assistant/instructions/shared-skill-operating-baseline.md +49 -0
  8. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +28 -88
  9. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +50 -114
  10. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +137 -208
  11. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/design-md-brand-catalog.md +90 -0
  12. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-completion-matrix.md +26 -0
  13. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-coverage-checklist.md +20 -0
  14. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/example-mapping-guide.md +18 -0
  15. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/oq-and-deferred-rules.md +41 -0
  16. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md +22 -0
  17. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md +50 -0
  18. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/platform_baselines.md +107 -0
  19. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/review_audit_playbook.md +104 -0
  20. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/trend_scan_playbook.md +76 -0
  21. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux_best_practices.md +143 -1005
  22. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/01_Context.md +9 -0
  23. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +1 -1
  24. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/04_Sources.md +83 -32
  25. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +7 -7
  26. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/prototyping.yaml +12 -4
  27. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +2 -2
  28. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/review_request.md +2 -2
  29. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/10_implementation_strategy.md +31 -13
  30. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/12_design_system.md +115 -0
  31. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/21_design_eval_trend_derived.md +86 -24
  32. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/23_design_eval_aggregate.md +12 -0
  33. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_screen_contracts.md +1 -1
  34. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +2 -0
  35. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +27 -27
  36. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +145 -155
  37. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +118 -355
  38. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/review-cycle-playbook.md +30 -0
  39. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-execution-playbook.md +29 -0
  40. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-phase-checklists.md +37 -0
  41. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-quality-gate.md +32 -0
  42. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md +33 -0
  43. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +50 -115
  44. package/assets/init/.qfai/assistant/steering/agent-catalog.yml +1 -1
  45. package/assets/init/.qfai/assistant/steering/agent-routing.yml +20 -8
  46. package/assets/init/.qfai/assistant/steering/manifest.md +4 -7
  47. package/assets/init/.qfai/assistant/steering/product.md +6 -6
  48. package/assets/init/.qfai/assistant/steering/review-profiles.yml +3 -0
  49. package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +7 -7
  50. package/assets/init/.qfai/contracts/README.md +15 -8
  51. package/assets/init/.qfai/contracts/ui/README.md +24 -26
  52. package/assets/init/.qfai/discussion/README.md +35 -32
  53. package/assets/init/.qfai/evidence/README.md +65 -181
  54. package/assets/init/.qfai/evidence/calibration.yaml +26 -0
  55. package/assets/init/.qfai/review/README.md +56 -11
  56. package/assets/init/.qfai/specs/README.md +2 -2
  57. package/assets/init/root/qfai.config.yaml +5 -6
  58. package/assets/scripts/capture-screenshots.js +128 -0
  59. package/assets/uix-rev/comparison-review.md +3 -15
  60. package/assets/uix-rev/contracts-review.md +5 -2
  61. package/assets/uix-rev/scoring-review.md +10 -2
  62. package/assets/uix-rev/strategy-review.md +11 -7
  63. package/dist/cli/index.cjs +8532 -4204
  64. package/dist/cli/index.cjs.map +1 -1
  65. package/dist/cli/index.mjs +8599 -4271
  66. package/dist/cli/index.mjs.map +1 -1
  67. package/dist/index.cjs +9808 -5532
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.d.cts +467 -277
  70. package/dist/index.d.ts +467 -277
  71. package/dist/index.mjs +8909 -4647
  72. package/dist/index.mjs.map +1 -1
  73. package/package.json +1 -1
  74. package/assets/uix-rev/migration-review.md +0 -17
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: qfai-discussion
3
3
  title: QFAI Discussion (Unified Discuss + Require)
4
- description: "Run structured discussion that merges discuss and require into a single 15-file discussion pack with required prototyping.yaml and OQ-driven exit."
4
+ description: "Run structured discussion that merges discuss and require into a single 15-file discussion pack with classification-aware prototyping.yaml requiredness and OQ-driven exit."
5
5
  argument-hint: "<idea-or-problem> [--auto]"
6
6
  allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
7
7
  roles:
@@ -33,59 +33,52 @@ QFAI Skill Body (SSOT)
33
33
 
34
34
  ## User Questions (AskUserQuestion Protocol)
35
35
 
36
- - When a question to the user is needed (e.g., Simulation mode approval, scope confirmation),
37
- the agent MUST use AskUserQuestion if the tool is available.
38
- - When AskUserQuestion supports structured choices (radio/multi-select),
39
- the agent MUST prefer structured choices over free-text input.
40
- - If AskUserQuestion is technically unavailable, present the same question as a normal message
41
- with explicit numbered choices.
42
- The agent SHOULD preserve structured choice semantics (enumerated options, selection constraints).
43
- The reason for unavailability MUST be stated.
36
+ Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#user-questions-askuserquestion-protocol`.
37
+
38
+ Skill-specific examples:
39
+
40
+ - scope confirmation
44
41
 
45
42
  ## FORMAT SSOT (Mandatory)
46
43
 
47
- - Before writing artifacts, read and follow:
44
+ - Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#format-ssot-mandatory`.
45
+ - Before writing artifacts, read:
48
46
  - `.qfai/discussion/README.md`
49
47
  - `.qfai/specs/README.md`
50
48
  - `.qfai/evidence/README.md`
51
49
  - `.qfai/assistant/steering/agent-catalog.yml`
52
50
  - `.qfai/assistant/steering/agent-routing.yml`
53
51
  - `.qfai/assistant/steering/review-profiles.yml`
54
- - `.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md`
52
+ - `.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md`
55
53
  - Keep templates as source of truth and preserve file naming/order.
56
54
 
57
55
  ## Sub-agent Delegation (MANDATORY)
58
56
 
57
+ Follow `.qfai/assistant/instructions/shared-skill-delegation-baseline.md`.
58
+
59
59
  ### Orchestrator Protocol (MUST)
60
60
 
61
- - Orchestrator may only create work orders, delegate tasks, integrate outputs, and present results.
62
- - Orchestrator MUST NOT generate the primary artifact first draft.
63
- - Orchestrator MUST NOT self-approve.
61
+ - No additional overrides.
64
62
 
65
63
  ### Capability Probe (MUST)
66
64
 
67
- 1. Run one harmless Probe Task once at stage start.
68
- 2. If subagents are unavailable, explicitly ask for Simulation mode approval.
69
- 3. Without explicit approval, stop the stage.
65
+ 1. Attempt the first required delegation at stage start.
66
+ 2. Treat that real delegation attempt as the capability check.
67
+ 3. If the delegation fails, stop the stage immediately and report remediation.
70
68
 
71
- ### Simulation mode (Opt-in only)
69
+ ### Delegation Failure (Hard Stop)
72
70
 
73
- - Allowed only when user explicitly states `Simulation mode allowed`.
74
- - Record both:
75
- - `Subagents: simulated (reason: <why unavailable>)`
76
- - `User approval: <quote or reference>`
71
+ - No additional overrides.
72
+ - Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
77
73
 
78
74
  ## Work Orders Summary
79
75
 
80
- Every major artifact in this stage MUST include this table schema:
81
-
82
- | Step | Role (sub-agent) | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE) |
83
- | ---- | ---------------- | ---------- | ------------ | ------------- | -------------------- |
84
- | 1 | <role> | <task> | <refs> | <refs> | PASS/REVISE |
76
+ Use the shared schema (per-row `Status (PASS/REVISE)` column, reviewer response `Result: PASS | REVISE`).
85
77
 
86
78
  ### Reviewer Gate (MUST)
87
79
 
88
80
  - Delegate final completion gate to an independent `completion-reviewer`.
81
+ - Reviewer response must include `Result: PASS | REVISE` (matching shared-skill-delegation-baseline.md#reviewer-response-template).
89
82
  - Route specialist reviewers from `.qfai/assistant/steering/agent-routing.yml` and `.qfai/assistant/steering/review-profiles.yml`.
90
83
  - Default discussion review set:
91
84
  - `completion-reviewer`
@@ -94,14 +87,13 @@ Every major artifact in this stage MUST include this table schema:
94
87
  - `architecture-reviewer` when architecture-affecting decisions exist
95
88
  - `product-surface-reviewer` when the pack is UI-bearing
96
89
  - Reviewers must check Drift Protocol compliance and alignment with `.qfai/assistant/steering/test-layers.md`.
97
- - Test volume floors/ratios are not gates; they are risk signals.
90
+ - Test volume floors or ratios are not gates; they are risk signals.
98
91
  - Do not declare DONE until all routed blocking reviewers return `PASS`; otherwise apply `REVISE`.
99
- - Every reviewer MUST provide a concrete alternative or fix proposal when returning `FAIL`.
100
92
 
101
93
  ## CRITICAL CONSTRAINTS (Read First)
102
94
 
103
95
  - Output path is fixed: `.qfai/discussion/discussion-YYYYMMDDhhmmssSSS/`.
104
- - Timestamp format is fixed to `YYYYMMDDhhmmssSSS` (3-digit milliseconds).
96
+ - Timestamp format is fixed to `YYYYMMDDhhmmssSSS`.
105
97
  - Required fixed files (all 15 are mandatory):
106
98
  - `01_Context.md`
107
99
  - `02_Inception-Deck.md`
@@ -120,113 +112,84 @@ Every major artifact in this stage MUST include this table schema:
120
112
  - `99_delta.md`
121
113
  - Discussion completion requires `Disposition: open` count to be zero in `11_OQ-Register.md`.
122
114
  - `deferred` is allowed only when required metadata is complete in `13_Deferred.md`.
123
- - `02_Inception-Deck.md` MUST contain at least one Mermaid diagram in ` ```mermaid ` fences.
124
- - `03_Story-Workshop.md` MUST contain at least one Mermaid diagram in ` ```mermaid ` fences.
125
- - If UI requirements exist, behavior obligations and sidecar artifacts are primary; HTML+CSS visual mock is optional fallback only.
126
- - **UI-bearing Authoring Requirements**:
127
- - UI-bearing detection is based on **surface type classification**
128
- (see `## UI-bearing Detection` below).
129
- - Content signals in `03_Story-Workshop.md`
130
- (HTML tags, Mermaid screen flows) serve as supplementary detection hints,
131
- not the primary SSOT.
132
- - UI-bearing packs rely on the **canonical sidecar family** as primary truth for design direction:
133
- - `uiux/10_implementation_strategy.md` — implementation strategy with strict canonical schema
134
- - `uiux/11_design_taste_interview.md` — design taste interview (10 sections)
135
- - `04_Sources.md#Trend Scan` — trend scan with required category coverage and per-entry completeness
136
- - `uiux/20-24` — 3-layer evaluation family (invariant, trend-derived, product-specific, aggregate, dynamic overrides)
137
- - `uiux/30_option_comparison.md` — option comparison
138
- - `uiux/31_selected_anchor_screen.md` — selected anchor screen (Selected Direction single source of truth)
139
- - `uiux/40_screen_contracts.md` — screen contracts (strong schema)
140
- - `uiux/50_review_input_bundle.md` — review input bundle
141
- - `04_Sources.md` `## Trend Scan` must include all required categories, and each entry must include: `reference`, `observation`, `freshness_date`, `confidence`, `source_translation`, `local_implication`
142
- - `04_Sources.md` `## Competitive Reference Registry` entries must include:
143
- - `adopted_points`: what was adopted and why
144
- - `rejected_points`: what was not adopted and why
145
- - `local_translation`: how adopted points were adapted
146
- - Placeholder-like values (TBD, N/A, TODO, empty) are treated as missing
147
- - `14_Review-Request.md` must review selected direction from `uiux/31_selected_anchor_screen.md` and strategy alignment from `uiux/10_implementation_strategy.md`.
148
- - `99_delta.md` must include a `## Rejected Visual Directions` section with rationale and recurrence prevention.
149
- - `04_Sources.md` must include a `## Trend Scan` section where each required category has at least one complete entry.
150
- - `04_Sources.md` must include a `## Competitive Reference Registry` where each entry has: `adopted_points`, `rejected_points`, `local_translation` fields populated.
151
- - Sidecar-family validators (UIX-VAL series) are the primary quality gates for UI-bearing packs.
152
- - Non-UI packs are exempt from all sidecar validators (zero new issues).
115
+ - `02_Inception-Deck.md` and `03_Story-Workshop.md` MUST contain Mermaid diagrams in ` ```mermaid ` fences.
116
+ - If UI requirements exist, behavior obligations are primary and HTML+CSS mock is optional fallback only.
117
+ - UI-bearing discussion packs require `prototyping.yaml`; non-ui discussion packs do not.
118
+ - `ui_bearing: true` requires `prototyping.yaml`.
119
+ - `ui_bearing: false` means `prototyping.yaml` is not required.
120
+ - `prototyping.yaml` must use the canonical namespaced schema under `prototyping:`.
121
+ - The canonical namespaced block must include `recommended_mode`, `rationale`, `allowed_modes`, and `surface`.
122
+ - Top-level recommendation keys are not supported, and coexistence with namespaced keys is invalid.
153
123
  - Reviewer routing is derived from `.qfai/assistant/steering/agent-routing.yml` and `.qfai/assistant/steering/review-profiles.yml`.
154
124
  - RCP wording must be sourced from `.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md`.
155
- - Discussion artifacts are logs/rationale and must not duplicate spec SSOT.
156
- - If diagrams are written, Mermaid syntax must be in ` ```mermaid ` fences only.
157
- - Do not enforce fixed EX/BR or TC/EX ratios in this phase.
125
+ - Discussion artifacts are logs and rationale; avoid duplicating finalized spec SSOT.
158
126
  - Example Mapping is mandatory and must be captured as `Example Seeds` sections in `03_Story-Workshop.md`.
159
- - OQ Register must include all mandatory columns: OQ-ID, Title, Gate, Disposition, Owner, Rationale, Options, Recommendation, Next-Decision-Point, Due, Evidence.
160
- - Deferred table must include all mandatory columns: OQ-ID, Title, Gate, Deferred-Reason, Deferred-Until, Owner, Due, Severity, Impact, Mitigation, Evidence.
127
+ - OQ Register and Deferred tables must contain the canonical fields defined in the references.
161
128
 
162
129
  ## UI-bearing Detection
163
130
 
131
+ Use `.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md` for the full playbook.
132
+
164
133
  ### Surface Classification
165
134
 
166
- Classify the project's surface type to determine whether UI/UX sidecar artifacts are required.
167
- Classification is based on **surface type only**, not interaction complexity (DR-0057).
135
+ Classification is based on surface type, not interaction complexity.
168
136
 
169
- | Surface Type | UI-bearing | Sidecar Generation | Example |
170
- | ------------ | ---------- | ---------------------------------------- | ---------------------------------------- |
171
- | web | Yes | Full 11-file uiux/ sidecar | Web application with user-facing screens |
172
- | mobile | Yes | Full 11-file uiux/ sidecar | Mobile app with touch interactions |
173
- | desktop | Yes | Full 11-file uiux/ sidecar | Desktop application with GUI |
174
- | cli | No | No uiux/ directory, no sidecar generated | CLI tool, terminal application |
175
- | mixed | Yes | Full 11-file uiux/ sidecar | Cross-platform with UI components |
176
- | non-ui | No | No uiux/ directory, no sidecar generated | API service, library |
137
+ | Surface Type | UI-bearing | Sidecar Generation | Notes |
138
+ | ------------ | ---------- | ------------------ | ---------------------------- |
139
+ | web | Yes | Full uiux/ sidecar | UI-bearing |
140
+ | mobile | Yes | Full uiux/ sidecar | UI-bearing |
141
+ | desktop | Yes | Full uiux/ sidecar | UI-bearing |
142
+ | cli | Yes | Full uiux/ sidecar | UI-bearing |
143
+ | mixed | Yes | Full uiux/ sidecar | UI-bearing |
144
+ | non-ui | No | No uiux/ directory | non-ui sidecar not generated |
177
145
 
178
146
  ### Detection Signals
179
147
 
180
- - Check `01_Context.md` for explicit surface type declarations
181
- - Check `03_Story-Workshop.md` for HTML tags, screen flows, or UI-related user stories
182
- - When ambiguous (e.g., web endpoint without UI components), classify by surface type, not by interaction complexity
148
+ - Prefer explicit surface declarations in `01_Context.md`.
149
+ - HTML tags, Mermaid screen flows, and UI-related stories are supporting signals.
150
+ - Classify by surface type, not by interaction complexity.
183
151
 
184
152
  ### Sidecar Generation Flow
185
153
 
186
- When UI-bearing is detected:
154
+ Sidecar steps must execute in the order below. **(no parallel)** across Step 1c and Step 1d — Step 1c MUST complete before Step 1d starts.
187
155
 
188
- 1. Generate all 11 uiux/ sidecar files (partial generation is not permitted)
189
- 2. Apply UX intent cross-references to core templates
190
- 3. Add UI-bearing completion conditions
191
-
192
- When non-ui is detected:
193
-
194
- - Skip uiux/ sidecar generation entirely — no uiux/ directory, no errors
195
- - Core 15-file pack plus required prototyping.yaml is generated as before
196
- - No additional UI/UX completion conditions apply
156
+ - Step 1a Detect surface type from `01_Context.md`.
157
+ - Step 1b If non-UI, skip steps 1c–1d; no uiux/ directory is created.
158
+ - Step 1c — Populate `04_Sources.md` Trend Scan entries for all visual categories (color, typography, visual motif, spacing, shape, imagery), each with an `evaluation_connection` field. **This step MUST finish before Step 1d.**
159
+ - Step 1d — Derive trend-based evaluation axes in `uiux/21_design_eval_trend_derived.md`, drawing `source_refs` from the entries completed in Step 1c. Parallel execution with Step 1c is forbidden.
160
+ - UI-bearing: generate the full sidecar family and apply UX intent cross-references.
161
+ - non-ui: skip sidecar generation entirely; no uiux/ directory, no additional completion conditions.
197
162
 
198
163
  ### UI-bearing Completion Conditions
199
164
 
200
- For UI-bearing projects, the following conditions must ALL be satisfied before discussion completion:
165
+ Use `.qfai/assistant/skills/qfai-discussion/references/discussion-completion-matrix.md` for the full matrix.
201
166
 
202
- 1. **Strategy selected**: `uiux/10_implementation_strategy.md` is populated with a canonical implementation approach
203
- 2. **Taste interview completed**: `uiux/11_design_taste_interview.md` has all 10 sections populated
204
- 3. **Scoring axes defined (3-layer)**:
205
- `uiux/20_design_eval_invariant.md`,
206
- `uiux/21_design_eval_trend_derived.md`,
207
- `uiux/22_design_eval_product_specific.md`,
208
- `uiux/23_design_eval_aggregate.md`
209
- have invariant, trend-derived, and product-specific evaluation criteria
210
- 4. **Dynamic overrides documented**: `uiux/24_design_eval_dynamic_overrides.md` lists any override rules
211
- 5. **Comparison completed**: `uiux/30_option_comparison.md` documents option comparison against scoring axes
212
- 6. **Anchor screen selected**: `uiux/31_selected_anchor_screen.md` documents the selected direction and anchor screen
213
- 7. **Contracts drafted**: `uiux/40_screen_contracts.md` contains screen interaction contracts
167
+ UI-bearing completion is blocked until all of the following are true:
214
168
 
215
- Completion is blocked until all 7 conditions are met. Skipping any condition prevents the discussion from being marked as complete.
169
+ 1. Strategy is selected in `uiux/10_implementation_strategy.md`.
170
+ 2. Scoring axes are defined through the 3-layer evaluation family (`uiux/20_design_eval_invariant.md`, `uiux/21_design_eval_trend_derived.md`, `uiux/22_design_eval_product_specific.md`, `uiux/23_design_eval_aggregate.md`, `uiux/24_design_eval_dynamic_overrides.md`).
171
+ 3. Comparison completed and selected anchor documented in `uiux/30_option_comparison.md` and `uiux/31_selected_anchor_screen.md`.
172
+ 4. Contracts drafted in `uiux/40_screen_contracts.md`.
216
173
 
217
174
  ### Non-UI Completion
218
175
 
219
- For non-ui projects, completion conditions remain unchanged from prior versions. No additional UI/UX conditions apply; no sidecar artifacts are required.
176
+ For non-UI projects, no additional UI/UX conditions apply, no sidecar artifacts are required, and `prototyping.yaml` is not required. uiux sidecar generation is skipped.
177
+
178
+ ## UI-bearing Authoring Requirements
179
+
180
+ - Detection uses **surface type classification** as primary SSOT; HTML tags / Mermaid flows are **supplementary detection hints, not the primary SSOT**. **Non-UI packs are exempt** from sidecar validators (UIX-VAL series) — **zero new issues** when properly classified.
181
+ - UI-bearing packs rely on the **canonical sidecar family** as primary truth: `uiux/10_implementation_strategy.md`, `uiux/11_design_taste_interview.md`, `uiux/12_design_system.md`, `uiux/20..24_design_eval_*.md`, `uiux/30_option_comparison.md` (**option comparison**), `uiux/31_selected_anchor_screen.md`, `uiux/40_screen_contracts.md`, `uiux/50_review_input_bundle.md`.
182
+ - **Competitive Reference Registry** (`04_Sources.md`) entries must populate `adopted_points`, `rejected_points`, `local_translation`. **Placeholder-like values (TBD/N/A/TODO/empty) are treated as missing**. `99_delta.md` must include `## Rejected Visual Directions` with rationale and recurrence prevention. **Sidecar-family validators** (UIX-VAL series) are the primary quality gates for UI-bearing packs; non-ui packs stay exempt. Playbook detail: `references/ui-bearing-playbook.md` / `references/discussion-completion-matrix.md`.
220
183
 
221
184
  ## Goal
222
185
 
223
- Produce a unified 15-file discussion pack plus required prototyping.yaml with explicit decisions, requirements, OQ states, and rationale so `/qfai-sdd` starts without unresolved blockers.
186
+ Produce a unified 15-file discussion pack with explicit decisions, requirements, OQ states, and rationale so `/qfai-sdd` starts without unresolved blockers.
224
187
 
225
188
  ## Non-goals
226
189
 
227
- - Editing `.qfai/specs/**` directly.
228
- - Writing implementation-level details.
229
- - Leaving open blockers hidden in free text.
190
+ - Editing `.qfai/specs/**` directly
191
+ - Writing implementation-level details
192
+ - Leaving open blockers hidden in free text
230
193
 
231
194
  ## Mandatory Outputs
232
195
 
@@ -246,96 +209,75 @@ Produce a unified 15-file discussion pack plus required prototyping.yaml with ex
246
209
  - `.qfai/discussion/discussion-*/14_Review-Request.md`
247
210
  - `.qfai/discussion/discussion-*/99_delta.md`
248
211
  - review artifacts under `.qfai/review/review-YYYYMMDDhhmmssSSS/`
249
- - `.qfai/discussion/discussion-*/prototyping.yaml`
212
+ - `.qfai/discussion/discussion-*/prototyping.yaml` when the latest discussion pack is `ui_bearing: true`
250
213
  - Evidence file: `.qfai/evidence/discussion-YYYYMMDDhhmmssSSS.md`
251
214
  - Reviewer notes (`PASS` or `REVISE`)
252
215
 
253
216
  ## Required Process
254
217
 
255
- 1. Run the core interview for product concept, scope, stakeholders, and constraints (`01_Context.md`).
256
- 2. Run Inception Deck (10 questions) for ambiguity removal and project alignment, and include at least one Mermaid diagram (`02_Inception-Deck.md`).
257
- 3. Run Story Workshop to capture user stories, user flows, and at least one Mermaid diagram; HTML+CSS visual mock is optional fallback only when it materially clarifies the selected direction (`03_Story-Workshop.md`).
258
- 4. Register source traceability in `04_Sources.md` with stable `SRC-XXXX` identifiers.
259
- 5. Define scope boundaries and success criteria in `05_Scope.md`.
260
- 6. Capture functional requirements in `06_REQ.md` with `REQ-0001` format.
261
- 7. Capture non-functional requirements in `07_NFR.md` with `NFR-0001` format.
262
- 8. Capture domain terms and definitions in `08_Glossary.md`.
263
- 9. Capture constraints (technical, operational, legal, budget, deadline) in `09_Constraints.md`.
264
- 10. Capture policies (security, compliance, etc.) in `10_Policy.md`.
265
- 11. Run Example Mapping pass for each BR/AC candidate and capture `Example Seeds` in `03_Story-Workshop.md`.
266
- 12. Update `11_OQ-Register.md` with all identified OQs using all mandatory columns.
267
- 13. Run OQ resolution hearing repeatedly until open count is zero.
268
- 14. Move deferred items to `13_Deferred.md` with all mandatory metadata columns.
269
- 15. Update `12_OQ-Resolution-Log.md`, `14_Review-Request.md`, and `99_delta.md`.
270
- 16. Generate `prototyping.yaml` at the discussion pack top level for downstream prototyping recommendation.
271
- - MUST use the **namespaced canonical schema** with `prototyping.recommended_mode` (not top-level `recommended_mode`).
272
- - Top-level `recommended_mode` is legacy compatibility only and MUST NOT be emitted in new artifacts.
273
- - All fields (`recommended_mode`, `rationale`, `allowed_modes`, `surface`) are required under the `prototyping:` key.
274
- 17. Choose `recommended_mode` with these defaults:
275
-
276
- - `low-cost`: rough draft or strong cost priority
277
- - `standard`: normal customer-presentable path
278
- - `full-harness`: only when the premium runtime loop is justified
279
-
280
- 18. Request review and record Reviewer result.
218
+ 1. Run the core interview for concept, scope, stakeholders, and constraints.
219
+ 2. Run Inception Deck and include at least one Mermaid diagram.
220
+ 3. Run Story Workshop, capture user stories and user flows, and keep HTML+CSS mock as optional fallback only.
221
+ 4. Register source traceability in `04_Sources.md`.
222
+ 5. Capture scope, REQ, NFR, glossary, constraints, and policies.
223
+ 6. Run Example Mapping and capture `Example Seeds`.
224
+ 7. Update `11_OQ-Register.md`, resolve OQs until open count is zero, and move deferred items to `13_Deferred.md`.
225
+ 8. Update `12_OQ-Resolution-Log.md`, `14_Review-Request.md`, and `99_delta.md`.
226
+ 9. Generate `prototyping.yaml` only when the latest discussion pack is UI-bearing.
227
+ 10. Request review and record the Reviewer result.
228
+ 11. **UI-bearing only Design system initialization.**
229
+ - **Step 11.3 Brand archetype selection and design system scaffold (autonomous; skip when `surface: non-ui`).**
230
+ - Phase A (brand autonomous selection): The agent MUST select one of the 8 canonical brand archetypes from `references/design-md-brand-catalog.md` by scoring each archetype against the taste-interview data in `uiux/11_design_taste_interview.md`. No human-confirmation prompt is issued; the agent selects autonomously using the highest aggregate score. When two archetypes tie, apply the tie-breaker: highest visual-theme weight, then alphabetical archetype name. The selected archetype name and rationale MUST be written into `uiux/12_design_system.md` under `## Visual Theme`.
231
+ - Phase B (customization): Apply the selected archetype's `aesthetic_properties` as defaults for Color Palette, Typography, Spacing & Layout, Component Style, and Animation & Motion. Override any default that conflicts with explicit constraints captured in `06_REQ.md`, `09_Constraints.md`, or taste-interview directives. Record each override and its rationale.
232
+ - Step 11.3 is idempotent: running it twice against the same `11_design_taste_interview.md` MUST produce byte-identical `12_design_system.md`.
233
+ - **Step 11.5 Visual-axis derivation mandate (UI-bearing packs with visual-category Trend Scan entries).**
234
+ Before trend-derived axis finalization for any UI-bearing run, the agent MUST perform design guideline research against the applicable platform or library guidance and record the findings in `04_Sources.md` under `design_guideline_research`. The resulting TRD-XX visual axes MUST then be written in `uiux/21_design_eval_trend_derived.md`.
235
+ For every visual-category Trend Scan entry in `04_Sources.md` (color, typography, visual motif, spacing, shape, imagery), the agent MUST derive at least one corresponding TRD-XX axis in `uiux/21_design_eval_trend_derived.md` with `source_refs` pointing to that entry. If no visual axis is derived despite visual Trend Scan entries existing, UIX-VAL-T04 (WARNING per NFR-0007) will fire at validation time.
236
+
237
+ Detailed execution guidance lives in:
238
+
239
+ - `.qfai/assistant/skills/qfai-discussion/references/example-mapping-guide.md`
240
+ - `.qfai/assistant/skills/qfai-discussion/references/oq-and-deferred-rules.md`
241
+ - `.qfai/assistant/skills/qfai-discussion/references/discussion-coverage-checklist.md`
242
+ - `.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md`
281
243
 
282
244
  ## Example Mapping Perspectives (Mandatory)
283
245
 
284
- For each BR/AC candidate, enumerate concrete example seeds with these perspectives:
246
+ Use `.qfai/assistant/skills/qfai-discussion/references/example-mapping-guide.md`.
247
+
248
+ Minimum perspectives that must remain visible:
285
249
 
286
250
  1. Happy path
287
251
  2. Negative path
288
- 3. Edge / boundary
289
- 4. Permission / role
290
- 5. State transition (if stateful)
291
- 6. Idempotency / retry (if external I/O exists)
292
-
293
- Rules:
294
-
295
- - Use perspective coverage as the gate, not raw case counts.
296
- - Mark intentionally skipped perspectives with reason and follow-up.
297
- - Feed unresolved seeds into OQ items with owner and decision point.
252
+ 3. Edge or boundary
253
+ 4. Permission or role
254
+ 5. State transition when stateful
255
+ 6. Idempotency or retry when external I/O exists
298
256
 
299
257
  ## OQ Data Model (Mandatory)
300
258
 
301
- `11_OQ-Register.md` must include these fields for each OQ:
259
+ `11_OQ-Register.md` must use the canonical fields from `.qfai/assistant/skills/qfai-discussion/references/oq-and-deferred-rules.md`, including:
302
260
 
303
- - `OQ-ID` (`OQ-0001` format)
304
- - `Title`
261
+ - `OQ-ID`
305
262
  - `Gate` (`discussion|sdd|atdd|tdd|ops`)
306
- - `Disposition` (`open|resolved|deferred|rejected`)
307
- - `Owner` (`user|agent|team`)
308
- - `Rationale` (required for deferred/rejected)
309
- - `Options` (at least two alternatives and one recommended option)
310
- - `Recommendation` (explicitly stated recommended option)
311
- - `Next-Decision-Point` (required for deferred)
312
- - `Due` (target date or milestone)
263
+ - `Disposition`
264
+ - `Owner`
265
+ - `Recommendation`
266
+ - `Next-Decision-Point`
313
267
  - `Evidence`
314
268
 
315
269
  ## Deferred Metadata Rules (Mandatory)
316
270
 
317
- `13_Deferred.md` must include:
318
-
319
- - `OQ-ID`
320
- - `Title`
321
- - `Gate`
322
- - `Deferred-Reason`
323
- - `Deferred-Until`
324
- - `Owner`
325
- - `Due`
326
- - `Severity` (`high|medium|low`)
327
- - `Impact` (spec/tests/implementation/operations)
328
- - `Mitigation`
329
- - `Evidence`
271
+ `13_Deferred.md` must use the canonical deferred fields from `.qfai/assistant/skills/qfai-discussion/references/oq-and-deferred-rules.md`.
330
272
 
331
273
  ## Drift Protocol (Mandatory)
332
274
 
333
- At any point during discussion, if the user changes direction or scope:
275
+ At any point during discussion:
334
276
 
335
- 1. Record the drift event in `99_delta.md` with Change Type = `Drift`.
336
- 2. Assess impact on all 15 files plus prototyping.yaml.
337
- 3. Update affected files and re-validate OQ register exit condition.
338
- 4. If drift contradicts a previously rejected option, record in `99_delta.md` Rejected section with `Recurrence Prevention`.
277
+ 1. Record the drift event in `99_delta.md`.
278
+ 2. Assess impact on all 15 files plus `prototyping.yaml`.
279
+ 3. Update affected files and re-validate OQ exit conditions.
280
+ 4. If drift contradicts a rejected option, record recurrence prevention.
339
281
 
340
282
  ## Review Gate Artifacts (RCP)
341
283
 
@@ -345,34 +287,27 @@ For each review cycle, create:
345
287
  - `.qfai/review/review-<timestamp>/R01_<reviewer>.md`, `R02_<reviewer>.md`, ...
346
288
  - `.qfai/review/review-<timestamp>/summary.json`
347
289
 
348
- RCP rules:
349
-
350
- - Append-only: create a new review pack for each cycle.
351
- - Apply `.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md` as the common footer rule set.
352
- - Run only the reviewers routed by `agent-routing.yml` for the current phase and conditions.
353
- - On `FAIL`, rerun only the failed reviewer and any reviewers whose scope changed because of the fix.
354
- - Mark fixed only when all routed blocking reviewers are `PASS`.
355
- - `summary.json` `target.kind` must be `"discussion"`.
290
+ Use `.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md` for append-only review pack rules, rerun rules, and `summary.json` requirements.
356
291
 
357
292
  ## RCP Footer Include (MUST)
358
293
 
359
- - Include and follow `.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md` without rewriting it per skill.
294
+ - Include and follow `.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md`.
360
295
  - Routing and rerun rules must stay synchronized with `agent-routing.yml` and the footer SSOT.
361
296
 
362
297
  ## Required Coverage Topics
363
298
 
364
- Before completion, confirm all are covered:
299
+ Use `.qfai/assistant/skills/qfai-discussion/references/discussion-coverage-checklist.md`.
300
+
301
+ Minimum topics that must remain covered:
365
302
 
366
303
  1. product concept and target users
367
304
  2. scope boundary and anti-goals
368
- 3. user stories and user flows (with Mermaid diagrams)
369
- 4. functional requirements (REQ) with source traceability
370
- 5. non-functional requirements (NFR) with measurable targets
371
- 6. performance constraints and SLO assumptions
372
- 7. security constraints and risk controls
373
- 8. domain glossary consistency
374
- 9. technical and operational constraints
375
- 10. project policies
305
+ 3. user stories and user flows
306
+ 4. functional requirements with source traceability
307
+ 5. non-functional requirements with measurable targets
308
+ 6. security, performance, and operational constraints
309
+ 7. domain glossary consistency
310
+ 8. project policies
376
311
 
377
312
  ## Completion Contract (Shared)
378
313
 
@@ -381,16 +316,10 @@ Before declaring completion, you MUST:
381
316
  - verify all 15 mandatory output files exist and are populated;
382
317
  - ensure `Disposition: open` count is zero in `11_OQ-Register.md`;
383
318
  - ensure every deferred item has full metadata in `13_Deferred.md`;
384
- - ensure `02_Inception-Deck.md` includes at least one Mermaid diagram;
385
- - ensure `Example Seeds` sections are present and perspective coverage is explicit in `03_Story-Workshop.md`;
386
- - ensure `03_Story-Workshop.md` includes at least one Mermaid diagram;
387
- - ensure UI-related stories include behavior obligations in `03_Story-Workshop.md` (HTML+CSS mock is optional fallback);
388
- - ensure `uiux/11_design_taste_interview.md` is complete (all 10 sections) when UI-bearing;
389
- - ensure `04_Sources.md` includes a `## Trend Scan` section with freshness metadata when UI-bearing;
390
- - ensure 3-layer evaluation family files (20-24) are populated when UI-bearing;
391
- - ensure `uiux/10_implementation_strategy.md` uses the strict canonical schema when UI-bearing;
392
- - ensure `uiux/40_screen_contracts.md` uses the strong screen contract schema when UI-bearing;
393
- - ensure `uiux/50_review_input_bundle.md` is review-ready when UI-bearing;
319
+ - ensure `02_Inception-Deck.md` and `03_Story-Workshop.md` include Mermaid diagrams;
320
+ - ensure `Example Seeds` coverage is explicit in `03_Story-Workshop.md`;
321
+ - ensure UI-related stories include behavior obligations in `03_Story-Workshop.md`;
322
+ - ensure UI-bearing sidecars satisfy the completion matrix;
394
323
  - avoid duplicating finalized spec content in discussion outputs.
395
324
 
396
325
  ## Evidence (MANDATORY)
@@ -426,13 +355,13 @@ When done, report:
426
355
 
427
356
  - [ ] CRITICAL CONSTRAINTS were followed.
428
357
  - [ ] All 15 required discussion files `01..14, 99` were produced.
429
- - [ ] OQ register fields follow the mandatory data model (all 11 columns present).
430
- - [ ] Deferred table fields follow the mandatory data model (all 11 columns present).
358
+ - [ ] OQ register fields follow the canonical data model.
359
+ - [ ] Deferred table fields follow the canonical deferred data model.
431
360
  - [ ] `Disposition: open` count is zero at completion.
432
361
  - [ ] Deferred items include required metadata.
433
362
  - [ ] `02_Inception-Deck.md` includes at least one Mermaid diagram.
434
363
  - [ ] `03_Story-Workshop.md` includes at least one Mermaid diagram.
435
- - [ ] UI-related stories include behavior obligations in `03_Story-Workshop.md` (HTML+CSS mock is optional fallback only).
364
+ - [ ] UI-related stories include behavior obligations in `03_Story-Workshop.md`.
436
365
  - [ ] Mermaid fence rules were satisfied when diagrams were used.
437
366
  - [ ] Evidence file exists and includes Work Orders Summary + Reviewer result.
438
367
  - [ ] Reviewer returned `PASS`.
@@ -440,9 +369,9 @@ When done, report:
440
369
  ## Completion Checklist (MUST)
441
370
 
442
371
  - [ ] This skill's Definition of Done is satisfied.
443
- - [ ] Required artifacts were produced or updated (if applicable).
444
- - [ ] Diagram artifacts follow Mermaid fence rules (if diagrams were used).
445
- - [ ] Open questions were logged to the proper OQ file (if applicable).
372
+ - [ ] Required artifacts were produced or updated.
373
+ - [ ] Diagram artifacts follow Mermaid fence rules.
374
+ - [ ] Open questions were logged to the proper OQ file.
446
375
  - [ ] The completion message was presented to the user.
447
376
  - [ ] Next actions were enumerated for all available options.
448
377
 
@@ -460,7 +389,7 @@ You MUST end the user-facing output with a handoff sentence to `/qfai-sdd` in th
460
389
  - Japanese output (use this exact sentence):
461
390
  ディスカッションが完了しました。他に要望などがあればご提示ください。問題なければ『/qfai-sdd』と入力してください。
462
391
  - Non-Japanese output:
463
- Use the same meaning in the user's language, and keep `/qfai-sdd` as a literal command token.
392
+ Use the same meaning in the active user language, and keep `/qfai-sdd` as a literal command token.
464
393
 
465
394
  - Proceed (recommended): `/qfai-sdd`.
466
395
  Action: run preflight on the latest discussion pack and generate shared/spec artifacts.
@@ -0,0 +1,90 @@
1
+ # Design-MD Brand Catalog
2
+
3
+ Reference catalog of 8 canonical brand archetypes for Step 11.3 Phase A autonomous selection.
4
+ Each archetype supplies defaults that the agent maps to the project's design system.
5
+
6
+ ---
7
+
8
+ ## Archetype: Minimal
9
+
10
+ - representative_brand: Apple, Notion, Linear
11
+ - aesthetic_properties:
12
+ - color_tendency: Near-white backgrounds, single accent hue, generous negative space
13
+ - typography: Geometric or humanist sans-serif at regular weight; large scale ratios
14
+ - spacing: Extra-generous gutters; element counts kept deliberately low per screen
15
+ - interaction: Subtle transitions; interactions feel frictionless and obvious
16
+
17
+ ## Archetype: Bold
18
+
19
+ - representative_brand: Nike, Spotify, Figma
20
+ - aesthetic_properties:
21
+ - color_tendency: High-saturation primary colors; dark backgrounds with vivid accent pops
22
+ - typography: Condensed or display weights; heavy headlines that command attention
23
+ - spacing: Tight internal component spacing; breath introduced only at section level
24
+ - interaction: Snappy, energetic micro-animations; decisive hover states
25
+
26
+ ## Archetype: Corporate
27
+
28
+ - representative_brand: IBM, Salesforce, Microsoft 365
29
+ - aesthetic_properties:
30
+ - color_tendency: Mid-range blues and grays; structured palette with clear semantic mapping
31
+ - typography: Neutral grotesque or humanist sans-serif; consistent weight hierarchy
32
+ - spacing: Grid-aligned with predictable rhythm; density leans compact
33
+ - interaction: Minimal animation; reliability and predictability over delight
34
+
35
+ ## Archetype: Playful
36
+
37
+ - representative_brand: Duolingo, Mailchimp, Discord
38
+ - aesthetic_properties:
39
+ - color_tendency: Multi-hue palette with 3–4 accent colors; high brightness
40
+ - typography: Rounded or quirky sans-serif; variable weight for personality
41
+ - spacing: Moderate; breathing room balanced with visual richness
42
+ - interaction: Bouncy easing curves; celebratory moments on key actions
43
+
44
+ ## Archetype: Organic
45
+
46
+ - representative_brand: Airbnb, Etsy, Headspace
47
+ - aesthetic_properties:
48
+ - color_tendency: Earth tones, warm neutrals, terracotta, sage; low saturation
49
+ - typography: Serif or humanist sans-serif with organic curves; medium weight
50
+ - spacing: Comfortable; asymmetry acceptable to evoke craft and warmth
51
+ - interaction: Slow, gentle ease-in-out; softness preferred over speed
52
+
53
+ ## Archetype: Tech
54
+
55
+ - representative_brand: Tesla, Vercel, Raycast
56
+ - aesthetic_properties:
57
+ - color_tendency: Dark-mode-first; monochrome base with electric accent (cyan, neon)
58
+ - typography: Monospace or sharp geometric sans; uppercase labels common
59
+ - spacing: Dense with strong grid discipline; every pixel intentional
60
+ - interaction: Instant response; minimal duration; mechanical precision
61
+
62
+ ## Archetype: Elegant
63
+
64
+ - representative_brand: Chanel, Aesop, Stripe
65
+ - aesthetic_properties:
66
+ - color_tendency: Neutral palette — ivory, charcoal, gold accent; restraint is the rule
67
+ - typography: Classic serif for headlines; refined sans for body; wide letter-spacing
68
+ - spacing: Generous; content-to-whitespace ratio strongly favors whitespace
69
+ - interaction: Slow, fade-based transitions; no sudden movements
70
+
71
+ ## Archetype: Casual
72
+
73
+ - representative_brand: Slack, Dropbox, Buffer
74
+ - aesthetic_properties:
75
+ - color_tendency: Friendly mid-tones, bright but not garish; warm secondary hues
76
+ - typography: Rounded humanist sans-serif; approachable weight and scale
77
+ - spacing: Comfortable; interface feels familiar and non-intimidating
78
+ - interaction: Light spring easing; feedback is immediate but unobtrusive
79
+
80
+ ---
81
+
82
+ ## Selection Guide
83
+
84
+ Use this catalog during Step 11.3 Phase A:
85
+
86
+ 1. Score each archetype against the taste-interview results from `uiux/11_design_taste_interview.md`.
87
+ 2. Apply the archetype tie-breaker when two archetypes tie: highest visual-theme weight wins, then alphabetical name.
88
+ 3. Record the selected archetype in `uiux/12_design_system.md` under `## Visual Theme`.
89
+ 4. The selected archetype's `aesthetic_properties` become the defaults for Color Palette, Typography, Spacing, and Animation sections.
90
+ 5. Step 11.3 Phase B then customizes those defaults to project-specific overrides.