qfai 1.9.2 → 1.10.0

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 (123) hide show
  1. package/README.md +48 -2
  2. package/assets/init/.qfai/assistant/agents/acceptance-test-engineer.md +1 -0
  3. package/assets/init/.qfai/assistant/agents/backend-engineer.md +1 -0
  4. package/assets/init/.qfai/assistant/agents/completion-reviewer.md +13 -2
  5. package/assets/init/.qfai/assistant/agents/delivery-planner.md +9 -0
  6. package/assets/init/.qfai/assistant/agents/frontend-engineer.md +1 -0
  7. package/assets/init/.qfai/assistant/agents/implementation-reviewer.md +6 -0
  8. package/assets/init/.qfai/assistant/agents/orchestrator.md +2 -2
  9. package/assets/init/.qfai/assistant/agents/qa-gatekeeper.md +96 -3
  10. package/assets/init/.qfai/assistant/agents/test-design-analyst.md +20 -3
  11. package/assets/init/.qfai/assistant/catalog/cli-ux-guidelines.md +2 -2
  12. package/assets/init/.qfai/assistant/catalog/spec_required_files.json +2 -1
  13. package/assets/init/.qfai/assistant/catalog/test-layers.md +355 -14
  14. package/assets/init/.qfai/assistant/catalog/worklog-entry.schema.md +165 -0
  15. package/assets/init/.qfai/assistant/constitution/communication.md +1 -1
  16. package/assets/init/.qfai/assistant/constitution/drift-protocol.md +304 -10
  17. package/assets/init/.qfai/assistant/constitution/quality.md +35 -5
  18. package/assets/init/.qfai/assistant/constitution/requirements-decomposition.md +37 -0
  19. package/assets/init/.qfai/assistant/constitution/shared-skill-delegation-baseline.md +244 -8
  20. package/assets/init/.qfai/assistant/constitution/shared-skill-operating-baseline.md +122 -5
  21. package/assets/init/.qfai/assistant/constitution/workflow.md +53 -7
  22. package/assets/init/.qfai/assistant/manifest/agent-catalog.yml +316 -945
  23. package/assets/init/.qfai/assistant/manifest/agent-routing.yml +50 -4
  24. package/assets/init/.qfai/assistant/manifest/review-profiles.yml +9 -0
  25. package/assets/init/.qfai/assistant/process/migrations/v1.4.27-atdd-alignment.md +1 -1
  26. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +61 -21
  27. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/test-case-depth-checklist.md +23 -4
  28. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +15 -7
  29. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +8 -4
  30. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/design-md-brand-catalog.md +2 -2
  31. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-completion-matrix.md +17 -7
  32. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md +10 -4
  33. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md +1 -1
  34. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md +4 -4
  35. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/review_audit_playbook.md +1 -1
  36. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/trend_scan_playbook.md +1 -1
  37. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux_best_practices.md +17 -7
  38. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/01_Context.md +1 -1
  39. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/02_Inception-Deck.md +1 -1
  40. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +11 -3
  41. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/05_Scope.md +5 -2
  42. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/07_NFR.md +1 -1
  43. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/09_Constraints.md +7 -4
  44. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/10_Policy.md +1 -1
  45. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/11_OQ-Register.md +1 -1
  46. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/12_OQ-Resolution-Log.md +1 -1
  47. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +14 -7
  48. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/99_delta.md +1 -1
  49. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +16 -7
  50. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/review_request.md +9 -6
  51. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_screen_contracts.md +3 -2
  52. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +4 -2
  53. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +250 -128
  54. package/assets/init/.qfai/assistant/skills/qfai-implement/references/change-request-reset.md +93 -0
  55. package/assets/init/.qfai/assistant/skills/qfai-implement/references/checkpoint-verification.md +106 -0
  56. package/assets/init/.qfai/assistant/skills/qfai-implement/references/cross-spec-ownership.md +73 -0
  57. package/assets/init/.qfai/assistant/skills/qfai-implement/references/evidence-revision.md +77 -0
  58. package/assets/init/.qfai/assistant/skills/qfai-implement/references/execution-ledger.md +303 -0
  59. package/assets/init/.qfai/assistant/skills/qfai-implement/references/final-checklist.md +19 -0
  60. package/assets/init/.qfai/assistant/skills/qfai-implement/references/finding-classification.md +49 -0
  61. package/assets/init/.qfai/assistant/skills/qfai-implement/references/ledger-preconditions.md +55 -0
  62. package/assets/init/.qfai/assistant/skills/qfai-implement/references/oracle-strength.md +81 -0
  63. package/assets/init/.qfai/assistant/skills/qfai-implement/references/parallelization-policy.md +235 -0
  64. package/assets/init/.qfai/assistant/skills/qfai-implement/references/red-admissibility.md +91 -0
  65. package/assets/init/.qfai/assistant/skills/qfai-implement/references/red-not-observable.md +70 -0
  66. package/assets/init/.qfai/assistant/skills/qfai-implement/references/relevant-test-suite.md +87 -0
  67. package/assets/init/.qfai/assistant/skills/qfai-implement/references/review-artifact-layout.md +31 -0
  68. package/assets/init/.qfai/assistant/skills/qfai-implement/references/round-evidence.md +102 -0
  69. package/assets/init/.qfai/assistant/skills/qfai-implement/references/selector-granularity.md +24 -0
  70. package/assets/init/.qfai/assistant/skills/qfai-implement/references/volume-policy.md +149 -0
  71. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +35 -18
  72. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +1 -1
  73. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/generator-prompt.md +106 -7
  74. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/handoff.md +40 -11
  75. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-loop.md +48 -1
  76. package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/DESIGN.md.sample +6 -0
  77. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +82 -22
  78. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md +148 -0
  79. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/rcp_footer.md +10 -4
  80. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/review-cycle-playbook.md +1 -1
  81. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-execution-playbook.md +4 -2
  82. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-phase-checklists.md +18 -0
  83. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-quality-gate.md +44 -3
  84. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-triage.md +60 -7
  85. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md +157 -5
  86. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/change-request.md +125 -0
  87. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/db-contract.sample.sql +6 -0
  88. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/evidence/sdd-spec.md +92 -0
  89. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/01_Objective.md +27 -0
  90. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/02_Initiative.md +30 -0
  91. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/05_Contracts.md +16 -6
  92. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/06_Glossary.md +19 -0
  93. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/07_Constraints.md +25 -0
  94. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/08_Decisions.md +22 -2
  95. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/11_Slice-Policy.md +37 -10
  96. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/02_User-stories.md +20 -0
  97. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/03_Acceptance-Criteria.md +19 -0
  98. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/04_Business-Rules.md +32 -3
  99. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/06_Test-Cases.md +56 -0
  100. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/07_Decisions.md +29 -2
  101. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/10_Plan.md +41 -0
  102. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/16_Traceability-ledger.md +58 -0
  103. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/tdd/test-list.md +56 -0
  104. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +57 -102
  105. package/assets/init/.qfai/assistant/skills/qfai-verify/references/articles.md +24 -0
  106. package/assets/init/.qfai/assistant/skills/qfai-verify/references/context-load.md +22 -0
  107. package/assets/init/.qfai/assistant/skills/qfai-verify/references/verify-output-contract.md +48 -0
  108. package/assets/init/.qfai/assistant/skills/qfai-verify/templates/verify-evidence.md +48 -0
  109. package/assets/init/.qfai/assistant/skills/web-research/SKILL.md +25 -7
  110. package/assets/init/.qfai/waivers.yml +11 -5
  111. package/assets/init/root/DESIGN.md +6 -0
  112. package/assets/init/root/qfai.config.yaml +15 -12
  113. package/dist/cli/index.cjs +11023 -7139
  114. package/dist/cli/index.cjs.map +1 -1
  115. package/dist/cli/index.mjs +10963 -7080
  116. package/dist/cli/index.mjs.map +1 -1
  117. package/dist/index.cjs +8782 -5257
  118. package/dist/index.cjs.map +1 -1
  119. package/dist/index.d.cts +280 -8
  120. package/dist/index.d.ts +280 -8
  121. package/dist/index.mjs +11776 -8264
  122. package/dist/index.mjs.map +1 -1
  123. package/package.json +18 -19
@@ -48,34 +48,70 @@ routing:
48
48
  rerun_policy: changed-scope-dependents
49
49
  review_profile: default
50
50
 
51
+ # `parallel_groups` describes ROLE FAN-OUT within a phase, not item
52
+ # dispatch. An empty list means no roles run concurrently; it says
53
+ # nothing about item-level parallelism, which `qfai-implement/SKILL.md`
54
+ # `## Parallelization Policy` governs.
55
+ # `iteration` says how often a phase runs. `qfai-implement` drives the TDD
56
+ # micro-cycle one ledger row at a time, so `red`, `build` and `test` run once
57
+ # per row. Without this key the whole phase list read as a single pass over
58
+ # the batch, and the only slot `qa-gatekeeper` had was the terminal `review`
59
+ # phase — by which point production code exists and the RED state the
60
+ # gatekeeper is supposed to observe has been destroyed. The gate could then
61
+ # adjudicate nothing but the implementer's own written account, which is the
62
+ # self-attestation it exists to prevent.
51
63
  - skill: qfai-implement
52
64
  phases:
53
65
  - id: plan
66
+ iteration: per-invocation
54
67
  mandatory_agents: [delivery-planner, test-design-analyst]
55
68
  conditional_agents: []
56
69
  parallel_groups: []
57
70
  blocking_agents: [delivery-planner]
58
71
  rerun_policy: failed-agents-only
72
+ # The failing test exists and no production code does. This is the only
73
+ # window in which "watch it fail" is a first-hand observation, so the
74
+ # gatekeeper is mandatory AND blocking here: RED must be confirmed before
75
+ # the row is allowed to proceed to `build`.
76
+ - id: red
77
+ iteration: per-ledger-item
78
+ mandatory_agents: [qa-gatekeeper]
79
+ conditional_agents: []
80
+ parallel_groups: []
81
+ blocking_agents: [qa-gatekeeper]
82
+ rerun_policy: failed-agents-only
59
83
  - id: build
60
- mandatory_agents: []
84
+ iteration: per-ledger-item
85
+ mandatory_agents: [qa-gatekeeper]
61
86
  conditional_agents: [frontend-engineer, backend-engineer]
62
87
  parallel_groups:
63
88
  - [frontend-engineer, backend-engineer]
64
- blocking_agents: []
89
+ blocking_agents: [qa-gatekeeper]
65
90
  rerun_policy: changed-scope-dependents
66
91
  - id: test
92
+ iteration: per-ledger-item
67
93
  mandatory_agents: []
68
94
  conditional_agents: [acceptance-test-engineer, qa-strategist]
69
95
  parallel_groups: []
70
96
  blocking_agents: []
71
97
  rerun_policy: changed-scope-dependents
98
+ # Still per-item: the reviewers judge one row (or one T1 coherent group),
99
+ # never the whole ledger at once. `qa-gatekeeper` stays listed because the
100
+ # completion gate re-reads its verdicts here; its RED/GREEN observations
101
+ # were already made in `red` and `build`.
72
102
  - id: review
103
+ iteration: per-ledger-item
73
104
  mandatory_agents: [implementation-reviewer, qa-gatekeeper, completion-reviewer]
74
105
  conditional_agents: [product-surface-reviewer]
75
106
  parallel_groups: []
76
- blocking_agents: [qa-gatekeeper, completion-reviewer]
107
+ # `implementation-reviewer` is blocking, not advisory: it is item 8 of the
108
+ # unconditional 11-point gate in qfai-implement/SKILL.md, and every DONE
109
+ # rule in the skill and in shared-skill-delegation-baseline.md is phrased
110
+ # over *blocking* reviewers. Listing it as mandatory-only let an item
111
+ # reach `done` with the code-quality reviewer sitting at REVISE.
112
+ blocking_agents: [implementation-reviewer, qa-gatekeeper, completion-reviewer]
77
113
  rerun_policy: changed-scope-dependents
78
- review_profile: runtime-heavy
114
+ review_profile: implementation-heavy
79
115
 
80
116
  - skill: qfai-atdd
81
117
  phases:
@@ -176,3 +212,13 @@ routing:
176
212
  blocking_agents: [qa-gatekeeper, completion-reviewer]
177
213
  rerun_policy: changed-scope-dependents
178
214
  review_profile: runtime-heavy
215
+
216
+ # `rerun_policy` vocabulary (validated by `QFAI-AGENT-013`):
217
+ #
218
+ # - `failed-agents-only` re-run only the agents that did not return PASS
219
+ # - `changed-scope-dependents` re-run every agent whose inputs the change
220
+ # touched, including ones that passed
221
+ #
222
+ # The key was previously on all 23 phases, defined nowhere and read by nothing,
223
+ # so a typo in it was invisible. `constitution/drift-protocol.md` step 4 uses the
224
+ # same vocabulary when a Change Request names its rerun mode.
@@ -16,6 +16,15 @@ profiles:
16
16
  runtime-heavy:
17
17
  always_required: [completion-reviewer, qa-gatekeeper]
18
18
  conditional_required: [implementation-reviewer]
19
+ # `qfai-implement` makes `implementation-reviewer` PASS item 8 of its
20
+ # unconditional 11-point gate, so for that skill the code-quality review is
21
+ # always required and always blocking. It shares `runtime-heavy` with
22
+ # qfai-atdd / qfai-configure / qfai-verify, where the same reviewer is
23
+ # genuinely conditional — hence a profile of its own rather than widening
24
+ # runtime-heavy for all four.
25
+ implementation-heavy:
26
+ always_required: [completion-reviewer, qa-gatekeeper, implementation-reviewer]
27
+ conditional_required: []
19
28
 
20
29
  optional_modes:
21
30
  devils-advocate:
@@ -27,7 +27,7 @@
27
27
  - `tests/integration`
28
28
  4. Remove forbidden references (`TC` annotations in API/E2E tests).
29
29
  5. Re-run:
30
- - `qfai validate --fail-on error`
30
+ - `npx qfai validate --fail-on error`
31
31
 
32
32
  ## Legacy Compatibility
33
33
 
@@ -54,8 +54,9 @@ When unsure, read inputs in this order:
54
54
  - `.qfai/specs/<spec-id>/05_Examples.md` (EX)
55
55
  - `.qfai/specs/<spec-id>/06_Test-Cases.md` (TC)
56
56
  - `.qfai/contracts/api/**` (CON-API)
57
+ - `.qfai/contracts/db/**` (CON-DB)
57
58
  - `.qfai/contracts/ui/**` and `.qfai/contracts/design/**` when the target spec is UI-bearing
58
- - P5: `.qfai/specs/<spec-id>/09_delta.md` (Decision Records; if no spec yet, state "not applicable")
59
+ - P5: `.qfai/specs/<spec-id>/07_Decisions.md` + `.qfai/specs/_policies/08_Decisions.md` (Decision Records, `DR-*`; if no spec yet, state "not applicable")
59
60
  - P6: legacy artifacts (optional only)
60
61
  - `.qfai/specs/<spec-id>/scenario.feature`
61
62
  - coverage ledger files
@@ -91,7 +92,7 @@ Follow `.qfai/assistant/constitution/shared-skill-delegation-baseline.md`.
91
92
  ### Delegation Failure (Hard Stop)
92
93
 
93
94
  - No additional overrides.
94
- - Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
95
+ - Do not simulate roles. Classify the failure per the baseline taxonomy first: `unavailable` stops the stage with a remediation report; `saturated` uses the bounded retry branch and keeps the stage open.
95
96
 
96
97
  ## Work Orders Summary
97
98
 
@@ -111,9 +112,9 @@ Use the shared schema.
111
112
  - Follow `.qfai/assistant/constitution/shared-skill-delegation-baseline.md#reviewer-gate-baseline`.
112
113
  - Final completion gate MUST be delegated to an independent `completion-reviewer`.
113
114
  - ATDD-specific reviewer checks:
114
- - coverage obligations met: E2E covers `US`, Integration covers `TC`, API covers `CON-API`;
115
+ - coverage obligations met: E2E covers `US`, API covers `CON-API`, and every `TC` is covered from the directory its declared `Level` routes to;
115
116
  - Coverage Depth Matrix is reviewed and no unjustified `X` cells remain;
116
- - validation evidence exists and `qfai validate --profile atdd --fail-on error` passes;
117
+ - validation evidence exists and `npx qfai validate --profile atdd --fail-on error` passes;
117
118
  - Drift Protocol is enforced;
118
119
  - test-layer policy is checked against `.qfai/assistant/catalog/test-layers.md`;
119
120
  - coverage floors and ratios are signals, not gates;
@@ -133,7 +134,7 @@ Use the shared template.
133
134
 
134
135
  Use the shared template.
135
136
 
136
- - Required field: `Status (PASS/REVISE)`.
137
+ - Required field: `Status (PASS/REVISE/PENDING)`. `PENDING` marks a gate that could not be run (see the baseline's reviewer-budget branch); it never counts as `PASS`.
137
138
 
138
139
  ## Stage 0 — Steering completion refresh (mandatory)
139
140
 
@@ -148,18 +149,28 @@ Follow `.qfai/assistant/constitution/shared-skill-operating-baseline.md#delta-re
148
149
  - Do NOT declare completion based on unit/component tests.
149
150
  - `10_Plan.md` is the primary How SSOT for execution phases.
150
151
  - If `10_Plan.md` is missing, stop and run owner planning flow before proceeding.
151
- - Completion gate is validation with zero errors (`qfai validate --profile atdd --fail-on error`).
152
+ - Completion gate is validation with zero errors (`npx qfai validate --profile atdd --fail-on error`).
152
153
  - Coverage obligations are mandatory:
153
154
  - `tests/e2e/**` must cover all required `US-*`.
154
- - `tests/integration/**` must cover all required `TC-*`.
155
+ - Every `TC-*` must be covered from the directory its declared `Level` routes
156
+ to: `L3`/`Integration` -> `tests/integration/**`, `L4`/`API` ->
157
+ `tests/api/**`, `L5`/`E2E` -> `tests/e2e/**`. A TC with no declared `Level`
158
+ routes to `tests/integration/**`.
155
159
  - `tests/api/**` must cover all required `CON-API-*`.
156
- - Forbidden references:
157
- - `tests/api/**` must not contain `QFAI:SPEC-XXXX:TC-YYYY`.
158
- - `tests/e2e/**` must not contain `QFAI:SPEC-XXXX:TC-YYYY`.
160
+ - Forbidden references (a TC annotation outside its declared home):
161
+ - `tests/api/**` must not contain `QFAI:SPEC-XXXX:TC-YYYY` unless that TC
162
+ declares `Level` `L4`/`API`.
163
+ - `tests/e2e/**` must not contain `QFAI:SPEC-XXXX:TC-YYYY` unless that TC
164
+ declares `Level` `L5`/`E2E`.
159
165
  - Unknown references (`US/TC/CON-API` not declared) must be treated as errors.
160
166
  - Floors/ratios are planning signals only, not gates.
161
167
  - Legacy `scenario.feature` or coverage ledgers may exist but are not mandatory inputs for completion.
162
- - Evidence file is required under `.qfai/evidence/` and must not be committed.
168
+ - Evidence file is required under `.qfai/evidence/`. Stage evidence is
169
+ **regenerable** and is not committed. **Governance records are different**:
170
+ Change Requests (`.qfai/decisions/CR-*.md`) and durable decision records
171
+ (`.qfai/evidence/decisions/*.json`) carry user approval, are not
172
+ regenerable, and stay in version control — the managed `.gitignore` block
173
+ negates them for that reason.
163
174
 
164
175
  ## Completion Contract (Shared)
165
176
 
@@ -168,7 +179,7 @@ Follow `.qfai/assistant/constitution/shared-skill-operating-baseline.md#gate-fai
168
179
 
169
180
  ## Goal
170
181
 
171
- Turn specs/contracts obligations (`US` / `TC` / `CON-API`) into runnable acceptance tests in this repository.
182
+ Turn specs/contracts obligations (`US` / `TC` / `CON-API` / `CON-DB`) into runnable acceptance tests in this repository.
172
183
 
173
184
  ## Scope (ATDD only)
174
185
 
@@ -204,25 +215,54 @@ Turn specs/contracts obligations (`US` / `TC` / `CON-API`) into runnable accepta
204
215
  | API | #CON | API_s | API contracts | |
205
216
  | Integration | #TC | INT_s | test cases | |
206
217
 
218
+ ## Scaffolding
219
+
220
+ `npx qfai atdd scaffold --spec <spec-id>` bulk-emits one placeholder test per
221
+ coverage-target `TC-*`, each carrying its `QFAI:SPEC-XXXX:TC-YYYY` annotation.
222
+ Skeletons land in `tests/integration/<spec-id>/` — the directory
223
+ `QFAI-ATDD-112` scans — so a filled-in skeleton counts as coverage. It is
224
+ idempotent: existing files are left untouched.
225
+
226
+ A skeleton left in placeholder shape across repeated validate runs escalates
227
+ (`qfai.config.yaml#atdd.scaffoldEscalateCycles`), so scaffolding is a start, not
228
+ a discharge of the obligation.
229
+
207
230
  ## Annotation obligations (mandatory)
208
231
 
209
232
  Every generated ATDD test MUST include QFAI annotations by layer:
210
233
 
211
- - `tests/e2e/**`: `QFAI:SPEC-XXXX:US-YYYY`
212
- - `tests/integration/**`: `QFAI:SPEC-XXXX:TC-YYYY`
213
- - `tests/api/**`: `QFAI:CON-API-XXXX`
234
+ - `tests/e2e/**`: `QFAI:SPEC-XXXX:US-YYYY` (plus `QFAI:SPEC-XXXX:TC-YYYY` for a
235
+ TC that declares `Level` `L5`/`E2E`)
236
+ - `tests/integration/**`: `QFAI:SPEC-XXXX:TC-YYYY` (TCs declaring `L3`/
237
+ `Integration`, and TCs with no declared `Level`)
238
+ - `tests/api/**`: `QFAI:CON-API-XXXX` (plus `QFAI:SPEC-XXXX:TC-YYYY` for a TC
239
+ that declares `Level` `L4`/`API`)
240
+ - `tests/integration/**` also carries `QFAI:CON-DB-XXXX` for every declared DB
241
+ contract the slice exercises
214
242
 
215
243
  Notes:
216
244
 
245
+ - A TC's annotation belongs in exactly one directory — the one its declared
246
+ `Level` routes to. Placing it elsewhere is both uncovered (`QFAI-ATDD-112`)
247
+ and forbidden (`QFAI-ATDD-121` / `QFAI-ATDD-122` / `QFAI-ATDD-123`). The rule
248
+ is symmetric: an annotation left behind in `tests/integration/**` after the
249
+ TC moved to `L4`/`L5` is rejected by `QFAI-ATDD-123` just as an early one in
250
+ `tests/api/**` is rejected by `QFAI-ATDD-121`.
217
251
  - AC annotations are optional in code.
218
252
  - `QFAI:CON-API-*` in E2E is not forbidden, but contract guarantee belongs to API tests.
219
253
 
220
254
  ## Success Criteria (Definition of Done)
221
255
 
222
256
  - All required `US` are covered by E2E tests.
223
- - All required `TC` are covered by integration tests.
257
+ - All required `TC` are covered from the directory their declared `Level` routes
258
+ to (`L3`/`Integration` -> `tests/integration/**`, `L4`/`API` ->
259
+ `tests/api/**`, `L5`/`E2E` -> `tests/e2e/**`, no declared `Level` ->
260
+ `tests/integration/**`). Duplicating a TC into a second layer is a
261
+ not-done condition, not extra credit.
224
262
  - All required `CON-API` are covered by API tests.
225
- - Validation passes: `qfai validate --profile atdd --fail-on error`.
263
+ - All required `CON-DB` are covered by integration tests (`QFAI-ATDD-115`); a contract
264
+ outside the current slice is deferred with `-- x-qfai-status: planned`, not left uncovered.
265
+ - Validation passes: `npx qfai validate --profile atdd --fail-on error`.
226
266
  - Repository quality gates (format/lint/type/tests/pack) pass with evidence.
227
267
  - Evidence file exists and includes work orders + reviewer notes.
228
268
  - Completion is approved by a reviewer who did not implement tests.
@@ -304,7 +344,7 @@ Template:
304
344
  ## Stage Gates (Do not skip)
305
345
 
306
346
  - P0: Plan and obligations checklist prepared.
307
- - P1: Layer assignment validated.
347
+ - P1: Layer assignment validated against `.qfai/assistant/catalog/test-layers.md#layer-derivation-procedure-normative`.
308
348
  - P2: E2E implementation completed.
309
349
  - P3: API implementation completed.
310
350
  - P4: Integration implementation completed.
@@ -321,7 +361,7 @@ Before declaring completion:
321
361
  2. Run:
322
362
 
323
363
  ```bash
324
- qfai validate --profile atdd --fail-on error
364
+ npx qfai validate --profile atdd --fail-on error
325
365
  ```
326
366
 
327
367
  3. Run repository standard gates:
@@ -397,6 +437,6 @@ A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it.
397
437
 
398
438
  project_memory:
399
439
 
400
- - Coverage obligations stay layer-pinned: tests/e2e/** must cover all required US; tests/integration/** all required TC; tests/api/\*\* all required CON-API.
401
- - Forbidden references guard the test-layer policy: tests/api/** must not carry QFAI:SPEC-XXXX:TC-YYYY annotations; tests/e2e/** likewise.
440
+ - Coverage obligations stay layer-pinned for US and CON-API: tests/e2e/** must cover all required US; tests/api/\*\* all required CON-API. Each TC is covered from the directory its declared Level routes to (L3/Integration -> tests/integration/**, L4/API -> tests/api/\*\*, L5/E2E -> tests/e2e/\*\*; no declared Level -> tests/integration/\*\*).
441
+ - Forbidden references guard the test-layer policy: a TC annotation outside its declared home is rejected — tests/api/** must not carry QFAI:SPEC-XXXX:TC-YYYY unless that TC declares L4/API, and tests/e2e/** likewise unless it declares L5/E2E.
402
442
  - Floor / ratio signals are planning hints, never gates; legacy scenario.feature / coverage ledger files remain optional inputs.
@@ -56,6 +56,22 @@ When multiple conditions interact:
56
56
  - [ ] Every BR-\* referenced in 04_Business-Rules.md has at least one positive and one negative test case.
57
57
  - [ ] Conditional business rules have test cases for each branch.
58
58
 
59
+ ## 8. Oracle Strength (オラクル強度)
60
+
61
+ The seven sections above count **case categories**. This one asks whether each
62
+ case's assertion can fail. A test that cannot fail satisfies every category.
63
+
64
+ - [ ] No assertion uses truthiness where the boundary's own value is available
65
+ (`toBeTruthy()` on a result whose expected value is in hand).
66
+ - [ ] No assertion compares a stored value against the same helper the fixture
67
+ wrote it with — that holds for every implementation, including a wrong one.
68
+ - [ ] No loop asserts over a collection that is empty by construction.
69
+ - [ ] No assertion observes a field the transport discards or a log the harness
70
+ swallows.
71
+ - [ ] No assertion merely verifies a mock was called with what the test passed it.
72
+ - [ ] Each case has a named production mutation that makes it fail, or a recorded
73
+ `equivalent-mutant` with the weaker contract clause named.
74
+
59
75
  ---
60
76
 
61
77
  ## Coverage Depth Matrix (テンプレート)
@@ -63,14 +79,17 @@ When multiple conditions interact:
63
79
  Reviewers and test-design-analysts MUST produce this matrix for each spec under review.
64
80
  Mark each cell: ✅ covered, ⚠️ partial, ❌ missing.
65
81
 
66
- | US/TC ID | Normal path | Error path | Boundary values | Special values | State transitions | Combinatorial | Status |
67
- | -------- | ----------- | ---------- | --------------- | -------------- | ----------------- | ------------- | ------ |
68
- | US-0001 | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | — |
69
- | TC-0001 | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | — |
82
+ | US/TC ID | Normal path | Error path | Boundary values | Special values | State transitions | Combinatorial | Oracle strength | Status |
83
+ | -------- | ----------- | ---------- | --------------- | -------------- | ----------------- | ------------- | --------------- | ------ |
84
+ | US-0001 | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | — |
85
+ | TC-0001 | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | ✅/⚠️/❌ | — |
70
86
 
71
87
  ### Evaluation criteria
72
88
 
73
89
  - **PASS**: All cells are ✅ or ⚠️ with documented rationale for partial coverage.
90
+ - **Oracle strength is not waivable by category coverage.** A row whose six
91
+ category cells are ✅ and whose Oracle strength cell is ❌ is a REVISE: it has
92
+ cases in every category and no evidence that any of them can fail.
74
93
  - **REVISE**: Any cell is ❌ without an explicit justification (e.g., Decision Record).
75
94
 
76
95
  ### Usage
@@ -52,7 +52,7 @@ When unsure, read inputs in this order:
52
52
 
53
53
  - P1: `.qfai/assistant/constitution/*`
54
54
  - P2: `.qfai/assistant/manifest/*` + `.qfai/assistant/catalog/*`
55
- - P3: `.qfai/specs/<spec-id>/09_delta.md` (Decision Records; if no spec yet, state "not applicable")
55
+ - P3: `.qfai/specs/<spec-id>/07_Decisions.md` + `.qfai/specs/_policies/08_Decisions.md` (Decision Records, `DR-*`; if no spec yet, state "not applicable")
56
56
  - P4: other artifacts (01_Spec.md, contracts, evidence, optional legacy `scenario.feature` / coverage ledgers)
57
57
 
58
58
  ## Sub-agent Delegation (MANDATORY)
@@ -70,7 +70,7 @@ Follow `.qfai/assistant/constitution/shared-skill-delegation-baseline.md`.
70
70
  ### Delegation Failure (Hard Stop)
71
71
 
72
72
  - No additional overrides.
73
- - Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
73
+ - Do not simulate roles. Classify the failure per the baseline taxonomy first: `unavailable` stops the stage with a remediation report; `saturated` uses the bounded retry branch and keeps the stage open.
74
74
 
75
75
  ### Work Orders Summary (MANDATORY evidence)
76
76
 
@@ -88,7 +88,7 @@ Use the shared schema.
88
88
  - Follow `.qfai/assistant/constitution/shared-skill-delegation-baseline.md#reviewer-gate-baseline`.
89
89
  - Reviewer checks:
90
90
  - required roles were delegated;
91
- - doctor evidence exists: `qfai doctor --fail-on error` completed without failing checks;
91
+ - doctor evidence exists: `npx qfai doctor --fail-on error` completed without failing checks;
92
92
  - Drift Protocol enforced;
93
93
  - test-layer policy enforced against `.qfai/assistant/catalog/test-layers.md`;
94
94
  - tool-count heuristics are signals, not gates.
@@ -106,7 +106,7 @@ Use the shared template.
106
106
 
107
107
  Use the shared template.
108
108
 
109
- - Required field: `Status (PASS/REVISE)`.
109
+ - Required field: `Status (PASS/REVISE/PENDING)`. `PENDING` marks a gate that could not be run (see the baseline's reviewer-budget branch); it never counts as `PASS`.
110
110
 
111
111
  ## Stage 0 — Steering completion refresh (mandatory)
112
112
 
@@ -120,9 +120,9 @@ Follow `.qfai/assistant/constitution/shared-skill-operating-baseline.md#delta-re
120
120
 
121
121
  ## CRITICAL CONSTRAINTS (Read First)
122
122
 
123
- - Only update `qfai.config.yaml`, `.qfai/assistant/manifest/*` + `.qfai/assistant/catalog/*`, and `.qfai/evidence/configure-<run-id>.md` unless explicitly asked.
123
+ - Only update `qfai.config.yaml`, `.qfai/assistant/manifest/*` + `.qfai/assistant/catalog/*`, `.qfai/assistant/constitution/quality.md` (gate capabilities only — never the surrounding rules), and `.qfai/evidence/configure-<run-id>.md` unless explicitly asked.
124
124
  - You MUST produce the required evidence file: `.qfai/evidence/configure-<run-id>.md`.
125
- - `.qfai/evidence/` is intentionally NOT tracked by Git (it ships with a local `.gitignore`).
125
+ - `.qfai/evidence/` is intentionally NOT tracked by Git. The mechanism is the QFAI-managed block `npx qfai init` writes into the **project root** `.gitignore` (marker `# ── QFAI managed (generated by qfai init) ──`), which carries `.qfai/evidence/*`. A project generated by `npx qfai init` has no per-directory `.qfai/evidence/.gitignore`: nothing under the init asset set ships one, so an operator who needs to change what is tracked edits the root file, not a directory-local one. (qfai's own repository does carry that file, as a working-tree file outside the init assets — which is why the claim above used to read the other way.)
126
126
  - Do NOT commit evidence files; summarize key outcomes in the PR description instead.
127
127
  - You MUST run the mandatory checks listed below and record outcomes.
128
128
  - You MUST stop and escalate if tooling choices or runnable path remain ambiguous.
@@ -144,6 +144,10 @@ Note: /qfai-sdd includes a preflight step that bootstraps missing config/steerin
144
144
 
145
145
  - `qfai.config.yaml` is updated with a **minimal diff** focused on traceability globs.
146
146
  - `validation.traceability.testFileGlobs` reflects the real test layout.
147
+ - `npx qfai init` ships this empty on purpose. Detect the stack before setting it — `pyproject.toml` / `setup.cfg` (Python), `go.mod` (Go), `pom.xml` / `build.gradle` (JVM), `Cargo.toml` (Rust), `package.json` (JS/TS), `Gemfile` (Ruby), `composer.json` (PHP) — and derive globs from the test paths that actually exist, not from the language's convention alone.
148
+ - Cross-check against the test paths the spec ledgers declare (`.qfai/specs/*/tdd/test-list.md`, `06_Test-Cases.md`). Globs that do not cover the declared paths leave the traceability gate reporting success while covering nothing.
149
+ - The evidence file MUST show at least one matched file per declared test layer (unit / integration / api / e2e / component as applicable). A layer with zero matched files is a blocking gap, not a note.
150
+ - `npx qfai validate` emits `QFAI-TRACE-124` while the globs are unset or match zero files; the run is not done until it is gone.
147
151
  - `validation.traceability.testFileExcludeGlobs` is added only when needed.
148
152
  - If strict spec sections are explicitly requested, `validation.require.specSections` is updated with a minimal, evidence-based list.
149
153
  - A validation checklist with evidence (sample matched files) is produced.
@@ -304,7 +308,7 @@ Every 5 major actions, pause and restate:
304
308
 
305
309
  ## Constraints
306
310
 
307
- - Only update `qfai.config.yaml`, `.qfai/assistant/manifest/*` + `.qfai/assistant/catalog/*`, and `.qfai/evidence/configure-<run-id>.md` unless explicitly asked.
311
+ - Only update `qfai.config.yaml`, `.qfai/assistant/manifest/*` + `.qfai/assistant/catalog/*`, `.qfai/assistant/constitution/quality.md` (gate capabilities only — never the surrounding rules), and `.qfai/evidence/configure-<run-id>.md` unless explicitly asked.
308
312
  - Do **not** modify tests or source code.
309
313
  - Avoid overly broad globs (e.g., `**/*`).
310
314
  - Exclude generated/output directories (`node_modules`, `.git`, `.qfai`, `dist`, `build`, `coverage`, `.next`, `out`, etc.).
@@ -321,6 +325,10 @@ Every 5 major actions, pause and restate:
321
325
  2. Read **project constitution / instructions** (if present):
322
326
  - `.qfai/assistant/constitution/constitution.md`
323
327
  - `.qfai/assistant/constitution/workflow.md` (or equivalent)
328
+ - `.qfai/assistant/constitution/quality.md` — the gate capability list. This
329
+ skill is its owner: reconcile it against the toolchain detected in step 3,
330
+ and record the discovered commands in `catalog/tech.md`. It had no reader
331
+ and no owner, so a stale statement there survived every configure pass.
324
332
 
325
333
  3. Inspect repo conventions:
326
334
  - package manager (pnpm/npm/yarn), test runner, lint/typecheck scripts, CI definitions
@@ -73,6 +73,10 @@ For UI-bearing targets, follow `references/design-dna-intake.md` while authoring
73
73
 
74
74
  Follow `.qfai/assistant/constitution/shared-skill-operating-baseline.md#gate-failure-autorepair-protocol` for validate, doctor, and quality-gate failures.
75
75
 
76
+ The full completion logic, including the UI-bearing blocking conditions, is in
77
+ `references/discussion-completion-matrix.md`. It must stay consistent with the canonical
78
+ sidecar family declared above and with `templates/uiux/00_index.md#Forbidden Legacy Files`.
79
+
76
80
  Before declaring completion, you MUST:
77
81
 
78
82
  - verify all 15 mandatory output files exist and are populated;
@@ -80,7 +84,7 @@ Before declaring completion, you MUST:
80
84
  - ensure every deferred item has full metadata in `13_Deferred.md`;
81
85
  - ensure `02_Inception-Deck.md` and `03_Story-Workshop.md` include Mermaid diagrams;
82
86
  - ensure the UI-bearing sidecar family is complete and the root `DESIGN.md` draft exists at the consuming-project root and parses as valid front-matter;
83
- - run `qfai validate --profile discussion --fail-on error` and fix discussion-owned findings;
87
+ - run `npx qfai validate --profile discussion --fail-on error` and fix discussion-owned findings;
84
88
  - avoid selecting a single visual winner in discussion artifacts.
85
89
 
86
90
  ### Reviewer Gate (MUST)
@@ -92,7 +96,7 @@ Reviewer checks must confirm:
92
96
  - discussion stayed planner-first and did not choose a single visual winner;
93
97
  - Drift Protocol is enforced; review policy is checked against `.qfai/assistant/catalog/test-layers.md`;
94
98
  - planning and coverage heuristics are signals, not gates;
95
- - review findings end with `Status (PASS/REVISE)` and Reviewer result is explicit as `PASS` or `REVISE`.
99
+ - review findings end with `Status (PASS/REVISE/PENDING)` and Reviewer result is explicit as `PASS` or `REVISE` (`PENDING` marks a gate that could not be run and never counts as `PASS`).
96
100
 
97
101
  ## Sub-agent Delegation (MANDATORY)
98
102
 
@@ -109,11 +113,11 @@ Follow `.qfai/assistant/constitution/shared-skill-delegation-baseline.md`.
109
113
  ### Delegation Failure (Hard Stop)
110
114
 
111
115
  - No additional overrides.
112
- - Do not simulate roles. If the first required delegation fails, stop the stage and report remediation.
116
+ - Do not simulate roles. Classify the failure per the baseline taxonomy first: `unavailable` stops the stage with a remediation report; `saturated` uses the bounded retry branch and keeps the stage open.
113
117
 
114
118
  ## Work Orders Summary
115
119
 
116
- Use the shared schema (per-row `Status (PASS/REVISE)` column, reviewer response `Result: PASS | REVISE`).
120
+ Use the shared schema (per-row `Status (PASS/REVISE/PENDING)` column, reviewer response `Result: PASS | REVISE`).
117
121
 
118
122
  ## Completion Message & Next Actions (MUST)
119
123
 
@@ -83,8 +83,8 @@ Each archetype supplies defaults that the agent maps to the project's design sys
83
83
 
84
84
  Use this catalog during Step 11.3 Phase A:
85
85
 
86
- 1. Score each archetype against the taste-interview results from `uiux/11_design_taste_interview.md`.
86
+ 1. Score each archetype against the brand intent captured in root `DESIGN.md` front-matter (`brand.voice`, `audience.emotion`, `audience.do_not_look_like`).
87
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`.
88
+ 3. Record the selected archetype in root `DESIGN.md` front-matter as `brand.archetype`.
89
89
  4. The selected archetype's `aesthetic_properties` become the defaults for Color Palette, Typography, Spacing, and Animation sections.
90
90
  5. Step 11.3 Phase B then customizes those defaults to project-specific overrides.
@@ -6,17 +6,27 @@ Use this file for the full completion logic behind `/qfai-discussion`.
6
6
 
7
7
  Completion is blocked until all are true:
8
8
 
9
- 1. Strategy selected
10
- 2. Design taste interview completed
11
- 3. 3-layer scoring family completed
12
- 4. Dynamic overrides documented
13
- 5. Option comparison completed
14
- 6. Selected anchor documented
15
- 7. Screen contracts drafted
9
+ 1. Root `DESIGN.md` exists at the consuming-project root and parses as valid front-matter
10
+ (`brand`, `audience`, and the full `visual.*` token tree).
11
+ 2. `# Brand Philosophy` body documents do/don't, brand signals, and exploration references
12
+ framed as **deviate-from** inputs.
13
+ 3. The canonical `uiux/` family is complete: `00_index.md`, `40_screen_contracts.md`,
14
+ `50_review_input_bundle.md`.
15
+ 4. Every screen contract in `40_screen_contracts.md` carries the full template schema.
16
+ 5. Exploration directions are carried unranked — no single visual winner is selected and the
17
+ design system is not finalized here (discussion is planner-first).
18
+ 6. No forbidden legacy sidecar exists under `uiux/` (see
19
+ `templates/uiux/00_index.md#Forbidden Legacy Files`).
20
+ 7. `Disposition: open` count is zero in `11_OQ-Register.md`.
21
+
22
+ Evaluation axes are global constants (4-step ordinal: weak / acceptable / strong /
23
+ exceptional) and are NOT authored as discussion sidecars, so no scoring, override, strategy,
24
+ taste-interview, option-comparison or selected-anchor sidecar is required or permitted.
16
25
 
17
26
  ## Non-UI Packs
18
27
 
19
28
  - No uiux sidecars required
29
+ - No root `DESIGN.md` required
20
30
  - No additional UI-bearing completion conditions apply
21
31
  - `prototyping.yaml` is not required
22
32
 
@@ -21,15 +21,21 @@
21
21
  - 条件付き reviewer:
22
22
  - `architecture-reviewer` — architecture-affecting decision がある場合
23
23
  - `product-surface-reviewer` — UI-bearing の場合
24
- - 各レビューは `PASS` / `FAIL` を返す
25
- - `FAIL` が出たら、失敗 reviewer と修正影響を受ける reviewer のみ再実行する
24
+ - 各レビューは `PASS` / `REVISE` を返す(in-flight のレビュアー応答の語彙。SSOT は
25
+ `.qfai/assistant/constitution/shared-skill-delegation-baseline.md` の `## Reviewer response template`)
26
+ - `REVISE` は review pack の `summary.json` を書き出す際に `status: "FAIL"` へ対応付けられる(同ファイルの
27
+ `### Verdict vocabulary` を参照)。第3の判定値を作らないこと
28
+ - `REVISE` が出たら、失敗 reviewer と修正影響を受ける reviewer のみ再実行する
26
29
 
27
30
  ---
28
31
 
29
32
  ## Validate Hard Gate(必須)
30
33
 
31
- - 各 review cycle で `qfai validate --profile discussion --fail-on error --format github` を実行していること
32
- - `.qfai/report/validate.log` が存在し、最新の成果物に対応していること
34
+ - 各 review cycle で `npx qfai validate --profile discussion --fail-on error --format github` を実行していること
35
+ - `<paths.outDir>/validate.log`(既定 `.qfai/report/validate.log`)が存在し、最新の成果物に対応していること
36
+ - このファイルは `npx qfai validate` が実行のたびに自動で書き出す。`| tee` などのシェルリダイレクトは不要(PowerShell では動作しないため使用しない)
37
+ - `<paths.outDir>` は `qfai.config.yaml` の `paths.outDir`。既定以外に変更したプロジェクトでは `<paths.outDir>/validate.log` と `<paths.outDir>/run-*/` を見ること
38
+ - 最新性は `validate.log` の `run_log:` 行が最新の `run-*/` を指しているかで確認する
33
39
 
34
40
  ---
35
41
 
@@ -13,7 +13,7 @@ Use this file for detailed review-pack handling in `/qfai-discussion`.
13
13
  1. Create a new review pack for each cycle.
14
14
  2. Apply the footer SSOT from `rcp_footer.md`.
15
15
  3. Run only the routed reviewers for the current phase and conditions.
16
- 4. On `FAIL`, rerun only the failed reviewer and any reviewer whose scope changed.
16
+ 4. On `REVISE`, rerun only that reviewer and any reviewer whose scope changed. `REVISE` is the in-flight verdict (`.qfai/assistant/constitution/shared-skill-delegation-baseline.md#reviewer-response-template`); it becomes `status: "FAIL"` only when the pack's `summary.json` is written.
17
17
  5. Mark fixed only when all routed blocking reviewers are `PASS`.
18
18
 
19
19
  ## summary.json
@@ -39,7 +39,7 @@ the screen-level UX inputs:
39
39
 
40
40
  Trend Scan is **not** a sidecar file. Trend Scan lives at
41
41
  `04_Sources.md#Trend Scan` (part of the core 15-file discussion pack).
42
- The legacy `uiux/20_trend_scan.md` template was removed; `uiux/20_design_eval_invariant.md`
43
- is a different axis family (design evaluation invariant criteria) and does
44
- not own Trend Scan content. UI-bearing completion checks read Trend Scan
45
- from `04_Sources.md`.
42
+ The legacy `uiux/20_trend_scan.md` template and the whole `uiux/20-24`
43
+ design-evaluation family were removed; evaluation axes are now global
44
+ constants and are not authored as discussion sidecars. UI-bearing
45
+ completion checks read Trend Scan from `04_Sources.md`.
@@ -97,7 +97,7 @@ A good discussion artifact should make these reviewable without guesswork:
97
97
  ## Recommended Audit Order
98
98
 
99
99
  1. Validate user goal and flow.
100
- 2. Validate option comparison and anchor choice.
100
+ 2. Validate that root `DESIGN.md` is authored and that exploration directions stay unranked (no winner selected here).
101
101
  3. Validate state coverage and contracts.
102
102
  4. Validate accessibility and platform fit.
103
103
  5. Validate anti-pattern absence.
@@ -43,7 +43,7 @@ Always translate a reference into:
43
43
 
44
44
  - whether it fits the product's users and task frequency;
45
45
  - whether it improves or harms clarity;
46
- - whether it changes scoring in `uiux/20-24`;
46
+ - whether it changes the brand direction recorded in root `DESIGN.md`;
47
47
  - whether it affects the selected anchor or contracts;
48
48
  - whether it should be adopted, adapted, or rejected.
49
49
 
@@ -93,18 +93,28 @@ Move volatile or bulky detail into the `ui_ux/` sidecar references and research
93
93
 
94
94
  ## QFAI-Specific Authoring Guidance
95
95
 
96
- ### Use the sidecar family as the design SSOT for UI-bearing work
96
+ ### Use root `DESIGN.md` plus the canonical sidecar family as the design SSOT for UI-bearing work
97
97
 
98
- For UI-bearing packs, core design direction should resolve through:
98
+ Brand-level direction is no longer authored as sidecars. For UI-bearing
99
+ packs it resolves through:
99
100
 
100
- - strategy: `uiux/10_implementation_strategy.md`
101
- - taste constraints: `uiux/11_design_taste_interview.md`
102
- - scoring axes: `uiux/20-24`
103
- - option decision: `uiux/30_option_comparison.md`
104
- - selected anchor: `uiux/31_selected_anchor_screen.md`
101
+ - brand SSOT (product intent, brand signals, anti-goals, deviate-from reference pool):
102
+ `<consuming-project-root>/DESIGN.md` (front-matter tokens + `# Brand Philosophy` body)
103
+ - sidecar manifest: `uiux/00_index.md`
105
104
  - screen behavior contracts: `uiux/40_screen_contracts.md`
106
105
  - review handoff: `uiux/50_review_input_bundle.md`
107
106
 
107
+ Those three are the entire canonical sidecar family. Evaluation axes are global constants
108
+ (4-step ordinal: weak / acceptable / strong / exceptional, in
109
+ `core/prototyping/evaluatorReview.ts#ORDINAL_AXES`) and are not authored as discussion
110
+ sidecars. Discussion is planner-first: it carries exploration directions unranked and does
111
+ not select a single visual winner, so there is no strategy, taste-interview, scoring,
112
+ override, option-comparison or selected-anchor sidecar. Do NOT create
113
+ `10_implementation_strategy.md`, `11_design_taste_interview.md`, the `20-24`
114
+ design-evaluation family, `30_option_comparison.md`, or `31_selected_anchor_screen.md` —
115
+ those filenames are forbidden, see `templates/uiux/00_index.md#Forbidden Legacy Files`, and
116
+ creating them fails validation.
117
+
108
118
  ### What must be explicit in the discussion pack
109
119
 
110
120
  - why this design direction exists
@@ -1,6 +1,6 @@
1
1
  # 01 Context
2
2
 
3
- <!-- UX-INTENT: If UI-bearing, see uiux/10_implementation_strategy.md for implementation strategy context -->
3
+ <!-- UX-INTENT: If UI-bearing, see root DESIGN.md for brand intent and product context -->
4
4
 
5
5
  ## UI-bearing Classification
6
6
 
@@ -43,7 +43,7 @@ flowchart LR
43
43
  App --> Data["Data Store"]
44
44
  ```
45
45
 
46
- <!-- UX-INTENT: If UI-bearing, reference uiux/30_option_comparison.md and uiux/31_selected_anchor_screen.md for design option alignment -->
46
+ <!-- UX-INTENT: If UI-bearing, reference root DESIGN.md and uiux/40_screen_contracts.md for design direction alignment -->
47
47
 
48
48
  ## 7. What Keeps Us Up at Night (Risks)
49
49