qfai 1.8.1 → 1.8.3

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 (69) hide show
  1. package/README.md +10 -5
  2. package/assets/init/.qfai/assistant/agents/frontend-engineer.md +2 -2
  3. package/assets/init/.qfai/assistant/agents/product-experience-architect.md +3 -2
  4. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +7 -4
  5. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +3 -2
  6. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +61 -330
  7. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md +1 -1
  8. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +15 -16
  9. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/00_index.md +13 -21
  10. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/30_exploration_brief.md +29 -0
  11. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_reference_pool.md +13 -0
  12. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/32_design_anti_goals.md +10 -0
  13. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/33_exploration_rubric.md +27 -0
  14. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/34_evaluator_calibration.md +17 -0
  15. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +16 -22
  16. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +8 -3
  17. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +176 -102
  18. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +43 -12
  19. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-cycle.md +46 -14
  20. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/l1-review-guide.md +13 -12
  21. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/l2-review-guide.md +16 -10
  22. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/reviewer-gate.md +25 -4
  23. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +7 -5
  24. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/rcp_footer.md +1 -1
  25. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-quality-gate.md +1 -1
  26. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/absorption-policy.sample.yaml +7 -0
  27. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/design-system.sample.yaml +4 -0
  28. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluation-rubric.sample.yaml +33 -0
  29. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluator-calibration.sample.yaml +15 -0
  30. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/exploration-brief.sample.yaml +19 -0
  31. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/selected-direction.sample.yaml +7 -0
  32. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +7 -6
  33. package/assets/init/.qfai/assistant/steering/agent-catalog.yml +1 -1
  34. package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +6 -6
  35. package/assets/init/.qfai/contracts/README.md +5 -3
  36. package/assets/init/.qfai/contracts/design/README.md +18 -9
  37. package/assets/init/.qfai/contracts/ui/README.md +2 -0
  38. package/assets/init/.qfai/discussion/README.md +30 -25
  39. package/assets/init/.qfai/evidence/README.md +66 -46
  40. package/assets/init/root/.github/workflows/qfai-validate.yml +39 -0
  41. package/assets/init/root/qfai.config.yaml +1 -2
  42. package/assets/uix-rev/comparison-review.md +8 -10
  43. package/assets/uix-rev/contracts-review.md +1 -1
  44. package/assets/uix-rev/scoring-review.md +20 -46
  45. package/assets/uix-rev/strategy-review.md +11 -16
  46. package/dist/cli/index.cjs +6747 -6204
  47. package/dist/cli/index.cjs.map +1 -1
  48. package/dist/cli/index.mjs +12594 -12051
  49. package/dist/cli/index.mjs.map +1 -1
  50. package/dist/index.cjs +1966 -2347
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +107 -23
  53. package/dist/index.d.ts +107 -23
  54. package/dist/index.mjs +1961 -2341
  55. package/dist/index.mjs.map +1 -1
  56. package/package.json +3 -2
  57. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/10_implementation_strategy.md +0 -38
  58. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/11_design_taste_interview.md +0 -45
  59. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/12_design_system.md +0 -115
  60. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/20_design_eval_invariant.md +0 -68
  61. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/21_design_eval_trend_derived.md +0 -130
  62. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/22_design_eval_product_specific.md +0 -68
  63. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/23_design_eval_aggregate.md +0 -53
  64. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/24_design_eval_dynamic_overrides.md +0 -28
  65. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/30_option_comparison.md +0 -56
  66. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/31_selected_anchor_screen.md +0 -42
  67. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/anchor-selection.sample.yaml +0 -7
  68. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/evaluation-axes.sample.yaml +0 -24
  69. package/assets/scripts/capture-screenshots.js +0 -128
package/README.md CHANGED
@@ -52,13 +52,16 @@ npx qfai report
52
52
  (`.qfai/review/review-*/summary.json` + minimum schema), writes `.qfai/report/validate.json`,
53
53
  and appends run logs to `.qfai/report/run-*/`; use `--fail-on error` (or `--fail-on warning`) to turn it into a CI gate,
54
54
  and `--format github` to emit GitHub-friendly annotations.
55
- Use `--phase refinement` only for local refinement checks; CI should use default/full validation.
55
+ Use `--profile discussion|sdd|prototyping|atdd|tdd|verify` for local skill-owned checks; CI should use default/full validation (or `verify` / `tdd` for the dedicated CI gates).
56
56
  - `npx qfai report`
57
57
  - Produces a human-readable report (`report.md` by default) or an internal JSON export (`report.json`) from `validate.json`; use `--base-url` to link file paths in Markdown to your repository viewer.
58
58
  - `npx qfai doctor`
59
59
  - Diagnoses configuration discovery, path resolution, glob scanning, and `validate.json` inputs before running validate/report; use `--fail-on` to enforce failures in CI.
60
60
  Note: prototyping evidence (`.qfai/evidence/prototyping.json`) is produced by the AI workflow / skills
61
- (`/qfai-prototyping` with `mode=full-harness` for supported UI surfaces only), not by a general-purpose end-user CLI flow.
61
+ (`/qfai-prototyping` any mode; modes differ only in `maxCycles`, see spec-0012), not by a general-purpose end-user CLI flow.
62
+ Use `npx qfai prototyping round-start --round <r5|r3|r2|r1> --candidates <csv> --target-url <url> --mode <mode>`
63
+ to generate the round-scoped review bundle and command plans the AI evaluator sub-agent consumes, then use
64
+ `round-harvest`, `round-narrow`, `round-absorb`, and `round-reimplement-verify` to advance the candidate funnel.
62
65
  `qfai validate` consumes the resulting evidence files, including `mode.effective` and `fullHarness` metadata when present.
63
66
  Traceability refs inside prototyping evidence must use repo-root-relative concrete artifact refs (for example `.qfai/specs/spec-0001/01_Spec.md#L3` or `.qfai/evidence/render.json#/screens/0`).
64
67
  Absolute paths are invalid. The same strict ref grammar is enforced for top-level and leaf evidence-bearing fields, including
@@ -110,9 +113,11 @@ QFAI includes a small set of custom skills (stored under `.qfai/assistant/skills
110
113
  Run this once right after `npx qfai init`, and re-run it when the repository structure changes.
111
114
  - **qfai-discussion**: Run a unified structured discussion that produces and maintains the latest discussion pack
112
115
  as 15 required markdown files under `.qfai/discussion/discussion-<ts>/`.
113
- UI-bearing discussion packs require `prototyping.yaml`; non-ui discussion packs do not.
116
+ UI-bearing discussion packs may include `prototyping.yaml` as an optional recommendation artifact; non-ui discussion packs typically omit it.
114
117
  - **qfai-sdd**: Unified SDD entrypoint with discussion-pack preflight guard (missing/incomplete/blocking OQ causes stop + next action guidance).
115
- - **qfai-prototyping**: Build a contract-aligned UI prototype under the `full-harness` only / UI-only contract, with calibration-pack SSOT and screen-level Browser QA evidence.
118
+ - **qfai-prototyping**: Build a contract-aligned UI prototype using the Playwright CLI + AI
119
+ evaluator harness (spec-0012). Modes (`low-cost`/`standard`/`full-harness`) run the same
120
+ strictest review cycle; only `maxCycles` (1/3/20) differs.
116
121
  - **qfai-atdd**: Implement acceptance tests driven by specs/scenarios.
117
122
  - **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.
118
123
  - **qfai-verify**: Run full-scan local quality gates (`validate --fail-on error`, `report`, repo gates) and produce reviewer-approved evidence under `.qfai/evidence/`.
@@ -286,7 +291,7 @@ npx qfai validate --fail-on error
286
291
 
287
292
  Recommended baseline.
288
293
 
289
- - Keep CI on default/full validation (`qfai validate --fail-on error`); do not use `--phase refinement` in CI.
294
+ - Keep CI on default/full validation (`qfai validate --fail-on error` or `qfai validate --profile verify --fail-on error`); do not use partial profiles in CI.
290
295
  - Keep `pnpm check-types:future` as a separate mandatory gate so future TS compatibility runs once without duplicating `pnpm ci:gate`.
291
296
  - Add a report step (`npx qfai report`) when you need a human-readable artifact.
292
297
  - Tune traceability globs in `qfai.config.yaml` to match your test layout.
@@ -2,12 +2,12 @@
2
2
 
3
3
  ## Mission
4
4
 
5
- - Implement frontend behavior aligned with selected anchor, strategy, screen contracts, and product experience decisions.
5
+ - Implement frontend behavior aligned with the selected direction, finalized design system, screen contracts, and product experience decisions.
6
6
 
7
7
  ## Domain Responsibilities
8
8
 
9
9
  - Build UI components, states, interactions, and user-facing flows.
10
- - Respect selected anchor, strategy, screen contracts, optional design tokens, optional fallback HTML/CSS mock, and screen flow constraints.
10
+ - Respect the selected direction, finalized design system, screen contracts, optional design tokens, optional fallback HTML/CSS mock, and screen flow constraints.
11
11
  - Coordinate with backend changes without breaking surface contracts.
12
12
  - Implement with KISS and YAGNI: prefer the simplest component/state structure that satisfies the current contract, and do not add speculative hooks, props, flags, or abstraction layers.
13
13
  - Keep UI code cohesive and readable: isolate concerns, minimize hidden coupling, avoid duplication, and use existing patterns/utilities before inventing new ones.
@@ -9,7 +9,7 @@
9
9
  - Define UX direction, user journeys, interaction patterns, and accessibility expectations.
10
10
  - Define visual design direction, tokens, typography, color, and layout hierarchy.
11
11
  - Design navigation structures, IA, and screen transition logic.
12
- - Integrate selected anchor, strategy, screen contracts, evaluation sidecars, and Mermaid flow consistency.
12
+ - Integrate exploration artifacts, selected direction, finalized design system, screen contracts, and Mermaid flow consistency.
13
13
  - Resolve conflicts between specialist design perspectives as a unified product experience decision.
14
14
  - Apply KISS and YAGNI to product-surface design: only add screens, controls, states, and branching flows that are justified by the current user goal.
15
15
  - Keep product experience decisions cohesive and unsurprising across copy, IA, navigation, transitions, and visual hierarchy.
@@ -24,7 +24,8 @@
24
24
  - .github/instructions/principles.instructions.md
25
25
  - .instruction/00_universal/development-principles-checklist.md
26
26
  - .instruction/01_specialties/design.md
27
- - Selected anchor, strategy, screen contracts, evaluation sidecars, optional tokens, optional fallback HTML/CSS mock, and Mermaid flows
27
+ - Exploration brief, reference pool, evaluation rubric, evaluator calibration, selected direction, finalized design system,
28
+ screen contracts, optional tokens, optional fallback HTML/CSS mock, and Mermaid flows
28
29
  - Runtime screenshots or rendered evidence when available
29
30
 
30
31
  ## Deliverables
@@ -111,7 +111,10 @@ Use the shared schema.
111
111
  - ATDD-specific reviewer checks:
112
112
  - coverage obligations met: E2E covers `US`, Integration covers `TC`, API covers `CON-API`;
113
113
  - Coverage Depth Matrix is reviewed and no unjustified `X` cells remain;
114
- - validation evidence exists and `qfai validate --fail-on error` passes;
114
+ - validation evidence exists and `qfai validate --profile atdd --fail-on error` passes;
115
+ - Drift Protocol is enforced;
116
+ - test-layer policy is checked against `.qfai/assistant/steering/test-layers.md`;
117
+ - coverage floors and ratios are signals, not gates;
115
118
  - `scenario.feature` and coverage ledgers remain optional legacy inputs, not completion gates.
116
119
  - Route specialist reviewers from `.qfai/assistant/steering/agent-routing.yml`.
117
120
  - Default ATDD review set:
@@ -143,7 +146,7 @@ Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#delta-re
143
146
  - Do NOT declare completion based on unit/component tests.
144
147
  - `10_Plan.md` is the primary How SSOT for execution phases.
145
148
  - If `10_Plan.md` is missing, stop and run owner planning flow before proceeding.
146
- - Completion gate is validation with zero errors (`qfai validate --fail-on error`).
149
+ - Completion gate is validation with zero errors (`qfai validate --profile atdd --fail-on error`).
147
150
  - Coverage obligations are mandatory:
148
151
  - `tests/e2e/**` must cover all required `US-*`.
149
152
  - `tests/integration/**` must cover all required `TC-*`.
@@ -216,7 +219,7 @@ Notes:
216
219
  - All required `US` are covered by E2E tests.
217
220
  - All required `TC` are covered by integration tests.
218
221
  - All required `CON-API` are covered by API tests.
219
- - Validation passes: `qfai validate --fail-on error`.
222
+ - Validation passes: `qfai validate --profile atdd --fail-on error`.
220
223
  - Repository quality gates (format/lint/type/tests/pack) pass with evidence.
221
224
  - Evidence file exists and includes work orders + reviewer notes.
222
225
  - Completion is approved by a reviewer who did not implement tests.
@@ -315,7 +318,7 @@ Before declaring completion:
315
318
  2. Run:
316
319
 
317
320
  ```bash
318
- qfai validate --fail-on error
321
+ qfai validate --profile atdd --fail-on error
319
322
  ```
320
323
 
321
324
  3. Run repository standard gates:
@@ -88,9 +88,10 @@ Use the shared schema.
88
88
  - Follow `.qfai/assistant/instructions/shared-skill-delegation-baseline.md#reviewer-gate-baseline`.
89
89
  - Reviewer checks:
90
90
  - required roles were delegated;
91
- - validate evidence exists: `qfai validate --fail-on error` completed with `error=0`;
91
+ - doctor evidence exists: `qfai doctor --fail-on error` completed without failing checks;
92
92
  - Drift Protocol enforced;
93
- - test-layer policy enforced where applicable.
93
+ - test-layer policy enforced against `.qfai/assistant/steering/test-layers.md`;
94
+ - tool-count heuristics are signals, not gates.
94
95
  - Route specialist reviewers from `.qfai/assistant/steering/agent-routing.yml`.
95
96
  - Default configure review set:
96
97
  - `completion-reviewer`
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: qfai-discussion
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 classification-aware prototyping.yaml requiredness and OQ-driven exit."
3
+ title: QFAI Discussion (Exploration Planner)
4
+ description: "Run structured discussion that defines exploration conditions, evaluation rubric, and anti-goals for downstream prototyping."
5
5
  argument-hint: "<idea-or-problem> [--auto]"
6
6
  allowed-tools: [Read, Glob, Write, TodoWrite, Task, Bash]
7
7
  roles:
@@ -21,366 +21,106 @@ routing-profile: requirements-heavy
21
21
  mode: interactive-by-default
22
22
  ---
23
23
 
24
- <!--
25
- QFAI Skill Body (SSOT)
26
- - This file is intended to be referenced by tool-specific wrappers (e.g., GitHub/Claude/Codex skills).
27
- - Keep wrappers thin and route users to this skill body.
28
- -->
29
-
30
- ## /qfai-discussion - Unified Discuss + Require
24
+ ## /qfai-discussion - Exploration Planner
31
25
 
32
26
  [DRIFT-PROTOCOL:MANDATORY]
33
27
 
34
- ## User Questions (AskUserQuestion Protocol)
35
-
36
- Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#user-questions-askuserquestion-protocol`.
37
-
38
- Skill-specific examples:
39
-
40
- - scope confirmation
41
-
42
- ## FORMAT SSOT (Mandatory)
43
-
44
- - Follow `.qfai/assistant/instructions/shared-skill-operating-baseline.md#format-ssot-mandatory`.
45
- - Before writing artifacts, read:
46
- - `.qfai/discussion/README.md`
47
- - `.qfai/specs/README.md`
48
- - `.qfai/evidence/README.md`
49
- - `.qfai/assistant/steering/agent-catalog.yml`
50
- - `.qfai/assistant/steering/agent-routing.yml`
51
- - `.qfai/assistant/steering/review-profiles.yml`
52
- - `.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md`
53
- - Keep templates as source of truth and preserve file naming/order.
54
-
55
- ## Sub-agent Delegation (MANDATORY)
56
-
57
- Follow `.qfai/assistant/instructions/shared-skill-delegation-baseline.md`.
58
-
59
- ### Orchestrator Protocol (MUST)
60
-
61
- - No additional overrides.
62
-
63
- ### Capability Probe (MUST)
64
-
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.
68
-
69
- ### Delegation Failure (Hard Stop)
70
-
71
- - No additional overrides.
72
- - Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
73
-
74
- ## Work Orders Summary
75
-
76
- Use the shared schema (per-row `Status (PASS/REVISE)` column, reviewer response `Result: PASS | REVISE`).
77
-
78
- ### Reviewer Gate (MUST)
28
+ ## Goal
79
29
 
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).
82
- - Route specialist reviewers from `.qfai/assistant/steering/agent-routing.yml` and `.qfai/assistant/steering/review-profiles.yml`.
83
- - Default discussion review set:
84
- - `completion-reviewer`
85
- - `requirements-reviewer`
86
- - Conditional discussion reviewers:
87
- - `architecture-reviewer` when architecture-affecting decisions exist
88
- - `product-surface-reviewer` when the pack is UI-bearing
89
- - Reviewers must check Drift Protocol compliance and alignment with `.qfai/assistant/steering/test-layers.md`.
90
- - Test volume floors or ratios are not gates; they are risk signals.
91
- - Do not declare DONE until all routed blocking reviewers return `PASS`; otherwise apply `REVISE`.
30
+ Produce a unified 15-file discussion pack plus exploration-first UI sidecars so `/qfai-sdd` and `/qfai-prototyping` can operate without forcing an early visual direction decision.
92
31
 
93
32
  ## CRITICAL CONSTRAINTS (Read First)
94
33
 
95
34
  - Output path is fixed: `.qfai/discussion/discussion-YYYYMMDDhhmmssSSS/`.
96
- - Timestamp format is fixed to `YYYYMMDDhhmmssSSS`.
97
- - Required fixed files (all 15 are mandatory):
98
- - `01_Context.md`
99
- - `02_Inception-Deck.md`
100
- - `03_Story-Workshop.md`
101
- - `04_Sources.md`
102
- - `05_Scope.md`
103
- - `06_REQ.md`
104
- - `07_NFR.md`
105
- - `08_Glossary.md`
106
- - `09_Constraints.md`
107
- - `10_Policy.md`
108
- - `11_OQ-Register.md`
109
- - `12_OQ-Resolution-Log.md`
110
- - `13_Deferred.md`
111
- - `14_Review-Request.md`
112
- - `99_delta.md`
35
+ - Required fixed files (all 15 are mandatory) remain unchanged.
36
+ - UI-bearing discussion packs may include `prototyping.yaml` as an optional recommendation artifact; non-ui discussion packs typically omit it.
113
37
  - Discussion completion requires `Disposition: open` count to be zero in `11_OQ-Register.md`.
114
- - `deferred` is allowed only when required metadata is complete in `13_Deferred.md`.
115
- - `02_Inception-Deck.md` and `03_Story-Workshop.md` MUST contain Mermaid diagrams in ` ```mermaid ` fences.
116
38
  - 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.
123
- - Reviewer routing is derived from `.qfai/assistant/steering/agent-routing.yml` and `.qfai/assistant/steering/review-profiles.yml`.
124
- - RCP wording must be sourced from `.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md`.
125
- - Discussion artifacts are logs and rationale; avoid duplicating finalized spec SSOT.
126
- - Example Mapping is mandatory and must be captured as `Example Seeds` sections in `03_Story-Workshop.md`.
127
- - OQ Register and Deferred tables must contain the canonical fields defined in the references.
128
-
129
- ## UI-bearing Detection
130
-
131
- Use `.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md` for the full playbook.
132
-
133
- ### Surface Classification
134
-
135
- Classification is based on surface type, not interaction complexity.
136
-
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 |
145
-
146
- ### Detection Signals
147
-
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.
151
-
152
- ### Sidecar Generation Flow
153
-
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.
155
-
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.
162
-
163
- ### UI-bearing Completion Conditions
164
-
165
- Use `.qfai/assistant/skills/qfai-discussion/references/discussion-completion-matrix.md` for the full matrix.
39
+ - Discussion is planner-first: do not select a single visual winner and do not finalize the design system here.
40
+ - Use artifact files, not conversational summaries, as the downstream handoff.
166
41
 
167
- UI-bearing completion is blocked until all of the following are true:
42
+ ## UI-bearing Canonical Sidecar Family
168
43
 
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`.
44
+ UI-bearing packs must produce the following sidecars as primary truth:
173
45
 
174
- ### Non-UI Completion
175
-
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`.
183
-
184
- ## Goal
185
-
186
- Produce a unified 15-file discussion pack with explicit decisions, requirements, OQ states, and rationale so `/qfai-sdd` starts without unresolved blockers.
187
-
188
- ## Non-goals
189
-
190
- - Editing `.qfai/specs/**` directly
191
- - Writing implementation-level details
192
- - Leaving open blockers hidden in free text
193
-
194
- ## Mandatory Outputs
195
-
196
- - `.qfai/discussion/discussion-*/01_Context.md`
197
- - `.qfai/discussion/discussion-*/02_Inception-Deck.md`
198
- - `.qfai/discussion/discussion-*/03_Story-Workshop.md`
199
- - `.qfai/discussion/discussion-*/04_Sources.md`
200
- - `.qfai/discussion/discussion-*/05_Scope.md`
201
- - `.qfai/discussion/discussion-*/06_REQ.md`
202
- - `.qfai/discussion/discussion-*/07_NFR.md`
203
- - `.qfai/discussion/discussion-*/08_Glossary.md`
204
- - `.qfai/discussion/discussion-*/09_Constraints.md`
205
- - `.qfai/discussion/discussion-*/10_Policy.md`
206
- - `.qfai/discussion/discussion-*/11_OQ-Register.md`
207
- - `.qfai/discussion/discussion-*/12_OQ-Resolution-Log.md`
208
- - `.qfai/discussion/discussion-*/13_Deferred.md`
209
- - `.qfai/discussion/discussion-*/14_Review-Request.md`
210
- - `.qfai/discussion/discussion-*/99_delta.md`
211
- - review artifacts under `.qfai/review/review-YYYYMMDDhhmmssSSS/`
212
- - `.qfai/discussion/discussion-*/prototyping.yaml` when the latest discussion pack is `ui_bearing: true`
213
- - Evidence file: `.qfai/evidence/discussion-YYYYMMDDhhmmssSSS.md`
214
- - Reviewer notes (`PASS` or `REVISE`)
46
+ - `uiux/30_exploration_brief.md`
47
+ - `uiux/31_reference_pool.md`
48
+ - `uiux/32_design_anti_goals.md`
49
+ - `uiux/33_exploration_rubric.md`
50
+ - `uiux/34_evaluator_calibration.md`
51
+ - `uiux/40_screen_contracts.md`
52
+ - `uiux/50_review_input_bundle.md`
215
53
 
216
54
  ## Required Process
217
55
 
218
56
  1. Run the core interview for concept, scope, stakeholders, and constraints.
219
57
  2. Run Inception Deck and include at least one Mermaid diagram.
220
58
  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`.
59
+ 4. Register source traceability and reference research in `04_Sources.md`.
222
60
  5. Capture scope, REQ, NFR, glossary, constraints, and policies.
223
61
  6. Run Example Mapping and capture `Example Seeds`.
224
62
  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.
63
+ 8. Generate the exploration-first sidecar family for UI-bearing targets.
64
+ 9. Generate `prototyping.yaml` only when the latest discussion pack is UI-bearing and an explicit prototyping recommendation is useful.
227
65
  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`
243
-
244
- ## Example Mapping Perspectives (Mandatory)
245
66
 
246
- Use `.qfai/assistant/skills/qfai-discussion/references/example-mapping-guide.md`.
247
-
248
- Minimum perspectives that must remain visible:
249
-
250
- 1. Happy path
251
- 2. Negative path
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
256
-
257
- ## OQ Data Model (Mandatory)
258
-
259
- `11_OQ-Register.md` must use the canonical fields from `.qfai/assistant/skills/qfai-discussion/references/oq-and-deferred-rules.md`, including:
260
-
261
- - `OQ-ID`
262
- - `Gate` (`discussion|sdd|atdd|tdd|ops`)
263
- - `Disposition`
264
- - `Owner`
265
- - `Recommendation`
266
- - `Next-Decision-Point`
267
- - `Evidence`
268
-
269
- ## Deferred Metadata Rules (Mandatory)
67
+ ## UI-bearing Authoring Requirements
270
68
 
271
- `13_Deferred.md` must use the canonical deferred fields from `.qfai/assistant/skills/qfai-discussion/references/oq-and-deferred-rules.md`.
69
+ - `30_exploration_brief.md` must define product intent, must-preserve interactions, brand signals, and differentiation targets.
70
+ - `31_reference_pool.md` must define exploration references, adopted points, rejected points, and local translation.
71
+ - `32_design_anti_goals.md` must contain explicit anti-goals and recurrence prevention notes.
72
+ - `33_exploration_rubric.md` must define design quality, originality, craft, and functionality grading criteria.
73
+ - `34_evaluator_calibration.md` must include good critique examples, too-lenient examples, blandness-fail examples, and originality-fail examples.
74
+ - `50_review_input_bundle.md` must document best-of-history handling so later iterations are not automatically preferred.
272
75
 
273
- ## Drift Protocol (Mandatory)
76
+ ## Completion Contract (Shared)
274
77
 
275
- At any point during discussion:
78
+ Before declaring completion, you MUST:
276
79
 
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.
80
+ - verify all 15 mandatory output files exist and are populated;
81
+ - ensure `Disposition: open` count is zero in `11_OQ-Register.md`;
82
+ - ensure every deferred item has full metadata in `13_Deferred.md`;
83
+ - ensure `02_Inception-Deck.md` and `03_Story-Workshop.md` include Mermaid diagrams;
84
+ - ensure the UI-bearing sidecar family is complete;
85
+ - run `qfai validate --profile discussion --fail-on error` and fix discussion-owned findings;
86
+ - avoid selecting a single visual winner in discussion artifacts.
281
87
 
282
- ## Review Gate Artifacts (RCP)
88
+ ### Reviewer Gate (MUST)
283
89
 
284
- For each review cycle, create:
90
+ Reviewer checks must confirm:
285
91
 
286
- - `.qfai/review/review-<timestamp>/review_request.md`
287
- - `.qfai/review/review-<timestamp>/R01_<reviewer>.md`, `R02_<reviewer>.md`, ...
288
- - `.qfai/review/review-<timestamp>/summary.json`
92
+ - the 15-file discussion pack is complete
93
+ - `Disposition: open` count is zero in `11_OQ-Register.md`
94
+ - the UI-bearing sidecar family is complete when the pack is UI-bearing
95
+ - discussion stayed planner-first and did not choose a single visual winner
96
+ - Drift Protocol is enforced
97
+ - review policy is checked against `.qfai/assistant/steering/test-layers.md`
98
+ - planning and coverage heuristics are signals, not gates
99
+ - review findings end with `Status (PASS/REVISE)`
100
+ - Reviewer result is explicit as `PASS` or `REVISE`
289
101
 
290
- Use `.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md` for append-only review pack rules, rerun rules, and `summary.json` requirements.
102
+ ## Sub-agent Delegation (MANDATORY)
291
103
 
292
- ## RCP Footer Include (MUST)
104
+ Follow `.qfai/assistant/instructions/shared-skill-delegation-baseline.md`.
293
105
 
294
- - Include and follow `.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md`.
295
- - Routing and rerun rules must stay synchronized with `agent-routing.yml` and the footer SSOT.
106
+ ### Orchestrator Protocol (MUST)
296
107
 
297
- ## Required Coverage Topics
108
+ - do not self-approve
109
+ - use artifact files as the handoff surface
110
+ - integrate delegated outputs only after checking pack completeness
298
111
 
299
- Use `.qfai/assistant/skills/qfai-discussion/references/discussion-coverage-checklist.md`.
112
+ ### Capability Probe (MUST)
300
113
 
301
- Minimum topics that must remain covered:
114
+ - No additional overrides.
302
115
 
303
- 1. product concept and target users
304
- 2. scope boundary and anti-goals
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
116
+ ### Delegation Failure (Hard Stop)
311
117
 
312
- ## Completion Contract (Shared)
118
+ - No additional overrides.
119
+ - Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
313
120
 
314
- Before declaring completion, you MUST:
121
+ ## Work Orders Summary
315
122
 
316
- - verify all 15 mandatory output files exist and are populated;
317
- - ensure `Disposition: open` count is zero in `11_OQ-Register.md`;
318
- - ensure every deferred item has full metadata in `13_Deferred.md`;
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;
323
- - avoid duplicating finalized spec content in discussion outputs.
324
-
325
- ## Evidence (MANDATORY)
326
-
327
- Create/update: `.qfai/evidence/discussion-YYYYMMDDhhmmssSSS.md`
328
-
329
- Required sections:
330
-
331
- - Objective
332
- - Inputs reviewed (files/paths)
333
- - Interview summary
334
- - Inception Deck summary
335
- - Story Workshop summary
336
- - Requirements summary (REQ count, NFR count)
337
- - OQ register summary
338
- - Deferred summary
339
- - Work Orders Summary
340
- - Reviewer result (`PASS`/`REVISE`)
341
-
342
- ## DONE Declaration (Mandatory Output)
343
-
344
- When done, report:
345
-
346
- - generated discussion path (`.qfai/discussion/discussion-*/`)
347
- - open OQ count
348
- - deferred OQ count
349
- - REQ count
350
- - NFR count
351
- - reviewer result
352
- - ready-for-next command (`/qfai-sdd`)
353
-
354
- ## FINAL CHECKLIST (Check Last)
355
-
356
- - [ ] CRITICAL CONSTRAINTS were followed.
357
- - [ ] All 15 required discussion files `01..14, 99` were produced.
358
- - [ ] OQ register fields follow the canonical data model.
359
- - [ ] Deferred table fields follow the canonical deferred data model.
360
- - [ ] `Disposition: open` count is zero at completion.
361
- - [ ] Deferred items include required metadata.
362
- - [ ] `02_Inception-Deck.md` includes at least one Mermaid diagram.
363
- - [ ] `03_Story-Workshop.md` includes at least one Mermaid diagram.
364
- - [ ] UI-related stories include behavior obligations in `03_Story-Workshop.md`.
365
- - [ ] Mermaid fence rules were satisfied when diagrams were used.
366
- - [ ] Evidence file exists and includes Work Orders Summary + Reviewer result.
367
- - [ ] Reviewer returned `PASS`.
368
-
369
- ## Completion Checklist (MUST)
370
-
371
- - [ ] This skill's Definition of Done is satisfied.
372
- - [ ] Required artifacts were produced or updated.
373
- - [ ] Diagram artifacts follow Mermaid fence rules.
374
- - [ ] Open questions were logged to the proper OQ file.
375
- - [ ] The completion message was presented to the user.
376
- - [ ] Next actions were enumerated for all available options.
377
-
378
- ## Review Cycle Checklist (MUST)
379
-
380
- - [ ] Review artifacts were generated for each required discussion review cycle.
381
- - [ ] All required reviewers completed their reviews for each review pack.
382
- - [ ] Any feedback triggered return/fix and a new review pack was appended.
383
- - [ ] `summary.json` satisfies the required schema with `target.kind: "discussion"`.
123
+ Use the shared schema (per-row `Status (PASS/REVISE)` column, reviewer response `Result: PASS | REVISE`).
384
124
 
385
125
  ## Completion Message & Next Actions (MUST)
386
126
 
@@ -388,12 +128,3 @@ You MUST end the user-facing output with a handoff sentence to `/qfai-sdd` in th
388
128
 
389
129
  - Japanese output (use this exact sentence):
390
130
  ディスカッションが完了しました。他に要望などがあればご提示ください。問題なければ『/qfai-sdd』と入力してください。
391
- - Non-Japanese output:
392
- Use the same meaning in the active user language, and keep `/qfai-sdd` as a literal command token.
393
-
394
- - Proceed (recommended): `/qfai-sdd`.
395
- Action: run preflight on the latest discussion pack and generate shared/spec artifacts.
396
- - Upstream idea is still unclear: rerun `/qfai-discussion`.
397
- Action: continue discussion loops until OQ states are explicit and complete.
398
- - Need additional risk analysis before SDD:
399
- Action: update `03_Story-Workshop.md` and `11_OQ-Register.md` with additional findings.
@@ -28,7 +28,7 @@
28
28
 
29
29
  ## Validate Hard Gate(必須)
30
30
 
31
- - 各 review cycle で `qfai validate --fail-on error --format github` を実行していること
31
+ - 各 review cycle で `qfai validate --profile discussion --fail-on error --format github` を実行していること
32
32
  - `.qfai/report/validate.log` が存在し、最新の成果物に対応していること
33
33
 
34
34
  ---