qfai 1.10.0 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +95 -25
  2. package/assets/init/.qfai/assistant/README.md +27 -0
  3. package/assets/init/.qfai/assistant/agents/completion-reviewer.md +17 -1
  4. package/assets/init/.qfai/assistant/agents/delivery-planner.md +8 -0
  5. package/assets/init/.qfai/assistant/agents/implementation-reviewer.md +12 -1
  6. package/assets/init/.qfai/assistant/agents/orchestrator.md +2 -2
  7. package/assets/init/.qfai/assistant/agents/product-experience-architect.md +2 -1
  8. package/assets/init/.qfai/assistant/agents/product-surface-reviewer.md +1 -1
  9. package/assets/init/.qfai/assistant/agents/qa-gatekeeper.md +99 -14
  10. package/assets/init/.qfai/assistant/agents/test-design-analyst.md +4 -1
  11. package/assets/init/.qfai/assistant/catalog/cli-ux-guidelines.md +3 -0
  12. package/assets/init/.qfai/assistant/catalog/test-layers-ci-lanes.md +60 -0
  13. package/assets/init/.qfai/assistant/catalog/test-layers.md +169 -87
  14. package/assets/init/.qfai/assistant/catalog/worklog-entry.schema.md +4 -3
  15. package/assets/init/.qfai/assistant/constitution/agent-selection.md +7 -1
  16. package/assets/init/.qfai/assistant/constitution/communication.md +1 -1
  17. package/assets/init/.qfai/assistant/constitution/constitution.md +8 -2
  18. package/assets/init/.qfai/assistant/constitution/drift-protocol.md +177 -14
  19. package/assets/init/.qfai/assistant/constitution/review-convergence.md +121 -0
  20. package/assets/init/.qfai/assistant/constitution/shared-skill-delegation-baseline.md +205 -89
  21. package/assets/init/.qfai/assistant/constitution/shared-skill-operating-baseline.md +59 -5
  22. package/assets/init/.qfai/assistant/manifest/agent-catalog.yml +145 -21
  23. package/assets/init/.qfai/assistant/manifest/agent-routing.yml +69 -3
  24. package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +131 -74
  25. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/credential-reuse.md +146 -0
  26. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/red-provenance.md +498 -0
  27. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/review-fix-rounds.md +128 -0
  28. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/scaffolding.md +71 -0
  29. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/shared-test-artifacts.md +124 -0
  30. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/stale-manifest.md +34 -0
  31. package/assets/init/.qfai/assistant/skills/qfai-atdd/references/test-case-depth-checklist.md +38 -1
  32. package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +4 -3
  33. package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +10 -8
  34. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-completion-matrix.md +23 -2
  35. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md +16 -1
  36. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md +47 -11
  37. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/trend_scan_playbook.md +1 -1
  38. package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux_best_practices.md +6 -4
  39. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/01_Context.md +2 -2
  40. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +1 -1
  41. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/04_Sources.md +40 -6
  42. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +7 -7
  43. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +3 -3
  44. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/review_request.md +4 -3
  45. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/summary.json +3 -0
  46. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/00_index.md +14 -5
  47. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_screen_contracts.md +17 -1
  48. package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +13 -8
  49. package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +83 -84
  50. package/assets/init/.qfai/assistant/skills/qfai-implement/references/checkpoint-verification.md +339 -39
  51. package/assets/init/.qfai/assistant/skills/qfai-implement/references/cross-spec-ownership.md +1 -1
  52. package/assets/init/.qfai/assistant/skills/qfai-implement/references/evidence-revision.md +348 -15
  53. package/assets/init/.qfai/assistant/skills/qfai-implement/references/execution-ledger.md +203 -32
  54. package/assets/init/.qfai/assistant/skills/qfai-implement/references/final-checklist.md +159 -12
  55. package/assets/init/.qfai/assistant/skills/qfai-implement/references/finding-classification.md +70 -5
  56. package/assets/init/.qfai/assistant/skills/qfai-implement/references/ledger-preconditions.md +55 -14
  57. package/assets/init/.qfai/assistant/skills/qfai-implement/references/parallelization-policy.md +92 -3
  58. package/assets/init/.qfai/assistant/skills/qfai-implement/references/red-not-observable.md +48 -6
  59. package/assets/init/.qfai/assistant/skills/qfai-implement/references/relevant-test-suite.md +13 -1
  60. package/assets/init/.qfai/assistant/skills/qfai-implement/references/review-artifact-layout.md +71 -9
  61. package/assets/init/.qfai/assistant/skills/qfai-implement/references/round-evidence.md +31 -7
  62. package/assets/init/.qfai/assistant/skills/qfai-implement/references/upstream-artifact-ordering.md +33 -0
  63. package/assets/init/.qfai/assistant/skills/qfai-implement/references/volume-policy.md +19 -12
  64. package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +76 -8
  65. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/design-md-spec.md +20 -0
  66. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +7 -4
  67. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/generator-prompt.md +83 -22
  68. package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/reviewer-prompt.md +29 -4
  69. package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +134 -20
  70. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md +31 -3
  71. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/review-cycle-playbook.md +22 -1
  72. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-execution-playbook.md +41 -5
  73. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-phase-checklists.md +16 -4
  74. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-triage.md +77 -7
  75. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md +60 -11
  76. package/assets/init/.qfai/assistant/skills/qfai-sdd/references/ui-design-contract-normalization.md +9 -3
  77. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/change-request.md +14 -1
  78. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/ui-contract.sample.yaml +13 -3
  79. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/evidence/sdd-spec.md +5 -1
  80. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/report/preflight_summary.md +3 -2
  81. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/04_Business-Flow.md +4 -1
  82. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/05_Contracts.md +12 -5
  83. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/11_Slice-Policy.md +8 -9
  84. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/02_User-stories.md +9 -0
  85. package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/tdd/test-list.md +68 -23
  86. package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +4 -4
  87. package/assets/init/.qfai/assistant/skills/qfai-verify/references/articles.md +1 -1
  88. package/assets/init/.qfai/assistant/skills/qfai-verify/references/validate-json-schema.md +79 -0
  89. package/assets/init/.qfai/assistant/skills/web-research/SKILL.md +3 -2
  90. package/assets/init/root/.github/workflows/qfai-tests.yml +318 -0
  91. package/assets/init/root/.github/workflows/qfai-validate.yml +327 -24
  92. package/assets/init/root/qfai.config.yaml +11 -2
  93. package/dist/cli/index.cjs +25083 -11488
  94. package/dist/cli/index.cjs.map +1 -1
  95. package/dist/cli/index.mjs +25216 -11589
  96. package/dist/cli/index.mjs.map +1 -1
  97. package/dist/index.cjs +16731 -8386
  98. package/dist/index.cjs.map +1 -1
  99. package/dist/index.d.cts +407 -17
  100. package/dist/index.d.ts +407 -17
  101. package/dist/index.mjs +16701 -8370
  102. package/dist/index.mjs.map +1 -1
  103. package/package.json +6 -1
package/README.md CHANGED
@@ -18,19 +18,34 @@ The agent reads the repository, produces the required artifacts, and iterates un
18
18
  ## Release status
19
19
 
20
20
  - Release posture: runtime truthfulness is enforced.
21
- - Prototyping is UI-only and runs a multi-spec evolution loop driven by
22
- `qfai prototyping iterate --cycle <n>`. The skill resolves every
23
- UI-bearing spec in one invocation, freezes that set at cycle 0, and
24
- iterates `cycle 0..9` (max 10 cycles) with deterministic stop conditions
25
- (exit codes 0 continue / 64 convergence / 65 max-iterations /
26
- 66 license-verify failure / 2 input or lock drift).
21
+ - Prototyping is UI-only and runs a primary-spec evolution loop driven by
22
+ `qfai prototyping iterate --cycle <n>`. Each run resolves exactly one
23
+ primary UI-bearing spec (`prototyping.primarySpecId` in `qfai.config.yaml`,
24
+ a `surface_type: ui-bearing` marker, or `--primary-spec-id`), freezes it at
25
+ cycle 0, and iterates `cycle 0..9` (max 10 cycles) with deterministic stop
26
+ conditions (exit codes 0 continue / 64 convergence / 65 max-iterations /
27
+ 66 license-verify failure / 2 input or lock drift). The full set of
28
+ UI-bearing specs is frozen at cycle 0 as `frozenSurfaceUnion` and is read
29
+ only to detect surface drift on later cycles: secondary specs are **not**
30
+ evaluated by that run. Only one primary spec can therefore be evolved per
31
+ project: re-running cycle 0 for a second spec is refused without `--force`,
32
+ and with `--force` it re-seeds `prototyping.json` (`runId`, `specsCovered`,
33
+ `frozenSpecsCovered`) around the new single spec, so the earlier spec's
34
+ iterations do not survive as a valid loop. Iterating a second UI-bearing
35
+ spec has to wait for the per-spec iteration layout.
27
36
  - Runtime observation is observed-only (no synthetic 200 / API / DB prototyping coverage).
28
37
  - Per-iter evidence is a single `<screen>.review.json` per declared spec ×
29
38
  screen pair (4-axis ordinal verdicts, 6 `*Feel` short-prose impressions
30
39
  bounded to 200 words each, `layoutAntiPatternsDetected[]`,
31
- `designMdViolations[]`, and `pivotDirective`). Reviewer-emitted
32
- `<screen>.review.json` is the only per-cycle artifact — no `screenshot.png`,
33
- `index.html`, or `interaction.json`.
40
+ `designMdViolations[]`, and `pivotDirective`). It is the only
41
+ reviewer-authored file, not the only per-cycle artifact: the CLI itself
42
+ always writes `iterate-plan.json` into the same `iter-NN/` directory, and
43
+ from cycle 1 onward — once the previous cycle is recorded in
44
+ `prototyping.json#iterations[]` — an advisory `iterate-context.json` holding
45
+ the prior scores and open blockers. The opt-in `--capture` and
46
+ `--cycle 0 --emit-skeletons` flags additionally write `<screen>.png` /
47
+ `<screen>.html` there. Archive the whole `iter-NN/` directory; no
48
+ `interaction.json` is written on any path.
34
49
  - Calibration SSOT is the calibration pack referenced by `calibrationRef.packPath`.
35
50
 
36
51
  ## Installation
@@ -77,6 +92,17 @@ npx qfai report
77
92
  - `npx qfai init`
78
93
  - Creates the QFAI workspace under `.qfai/` (requirements/specs/contracts/report) and installs the AI assistant kit
79
94
  (`assistant/` with the 4-layer tree — `constitution/`, `manifest/`, `catalog/`, `process/` — plus `agents/` and `skills/`), plus `qfai.config.yaml`.
95
+ - Options:
96
+
97
+ | Flag | Effect |
98
+ | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99
+ | `--dir <path>` | Output directory (default: the current directory). |
100
+ | `--force` | Re-generate `.qfai/assistant/{skills,agents}/**` and the published skill/agent wrappers under `.agents/`, `.claude/`, `.codex/` and `.github/`, and prune the legacy wrappers they replace. It also rewrites two kinds of plain (non-wrapper) generated files without asking: the integration READMEs `.agents/README.md`, `.codex/README.md`, `.claude/agents/README.md`, `.github/agents/README.md`, and `.github/copilot-instructions.md` — local edits to those five files are overwritten, so back them up first. `.github/instructions/*.instructions.md` is create-only even under `--force`. The template trees `--force` does not own — `assistant/manifest/**`, `specs/`, `contracts/`, `steering/` and the rest of `.qfai/` — stay create-only. The flag does not narrow what plain `init` always does: the managed `.gitignore` block, the legacy `.qfai/evidence/.gitignore` negations and `git config core.symlinks` are re-applied (and repaired when stale) on every non-dry-run, with or without `--force`. |
101
+ | `--dry-run` | Report what would change and write nothing. Use it to rehearse `--upgrade-assistant-tree`. |
102
+ | `--upgrade-assistant-tree` | Migrate a pre-recut project to the 4-layer tree. Only the two pre-recut surfaces `.qfai/assistant/instructions/` and `.qfai/assistant/steering/` are scanned; `assistant/manifest/` is already the canonical layer, so it is kept in place and never re-copied. This is what the `D-DEPRECATED-PATH` finding is asking for. Files are copied, never deleted: the legacy paths stay until you remove them, and an existing file at a scanned surface's migration target is kept (reported as `W-USER-EDIT-PRESERVED`) — that warning only ever covers those scanned targets. A project left with nothing but `manifest/` has nothing to migrate and is reported as "no pre-recut surfaces ... found". |
103
+ | `--yes` | Reserved for a future interactive mode; no behavioural difference today. |
104
+ | `--help`, `-h` | Print the CLI usage banner and exit without writing anything. Accepted by every command, `init` included, and handled before the command runs. |
105
+
80
106
  - `npx qfai validate`
81
107
  - Validates specs/contracts/scenarios/traceability and review artifacts
82
108
  (`.qfai/review/review-*/summary.json` + minimum schema), writes `.qfai/report/validate.json`,
@@ -96,7 +122,7 @@ npx qfai report
96
122
  Use `npx qfai prototyping preflight --target-url <url>` for a focused
97
123
  prototyping preflight before the skill starts; it surfaces blocking
98
124
  `QFAI-DCON-*` design-contract issues alongside runtime assumptions and resolves a runnable Playwright CLI launcher.
99
- Use `npx qfai prototyping iterate --cycle <n> --target-url <url>` to drive each cycle of the multi-spec
125
+ Use `npx qfai prototyping iterate --cycle <n> --target-url <url>` to drive each cycle of the primary-spec
100
126
  evolution loop. Exit codes: 0 (continue), 64 (convergence), 65 (max-iterations), 66 (license-verify failure), 2 (input or lock drift).
101
127
  Traceability refs inside prototyping evidence must use repo-root-relative concrete artifact refs
102
128
  (for example `.qfai/specs/spec-0001/01_Spec.md#L3` or `.qfai/evidence/prototyping/iter-03/home.png`).
@@ -121,13 +147,28 @@ npx qfai report
121
147
 
122
148
  ## ATDD annotation hard gate
123
149
 
124
- `qfai validate` enforces spec-to-test traceability with directory-based rules.
150
+ `qfai validate` enforces spec-to-test traceability. `US` and `CON-API` obligations are routed by ID type;
151
+ a `TC` obligation is routed by the `Level` its spec declares for it.
125
152
 
126
153
  - `tests/e2e/**`: annotate all covered user stories with concrete IDs such as `QFAI:SPEC-0001:US-0001`.
127
- - `tests/integration/**`: annotate all covered test cases with concrete IDs such as `QFAI:SPEC-0001:TC-0001`.
128
154
  - `tests/api/**`: annotate all covered API contracts with concrete IDs such as `QFAI:CON-API-0001`.
129
- - `tests/api/**` and `tests/e2e/**` must not use `TC` annotations.
155
+ - Annotate a covered test case with a concrete ID such as `QFAI:SPEC-0001:TC-0001`, in the directory its declared `Level` names:
156
+
157
+ | `Level` | Annotated in |
158
+ | ----------------------------- | ---------------------- |
159
+ | `L1`/`Unit`, `L2`/`Component` | no ATDD annotation |
160
+ | `L3`/`Integration` | `tests/integration/**` |
161
+ | `L4`/`API` | `tests/api/**` |
162
+ | `L5`/`E2E` | `tests/e2e/**` |
163
+ | none declared, or unreadable | `tests/integration/**` |
164
+
165
+ - Unit and Component test cases carry **no** ATDD annotation obligation. They are gated by the
166
+ per-spec `test-list.md` ledger instead, so do not copy them into `tests/integration/**` to satisfy this gate.
167
+ - A `TC` annotation outside the directory its declared `Level` names is rejected. The rule is `Level`-relative,
168
+ not a blanket ban: a `TC` in `tests/api/**` is accepted only for a test case that declares `L4`/`API`, and in
169
+ `tests/e2e/**` only for `L5`/`E2E`.
130
170
  - `AC` annotations are not required in code; AC coverage is treated as indirect through full `TC` coverage.
171
+ - These directories follow `paths.testsDir` from `qfai.config.yaml`; `tests/` above is the default.
131
172
 
132
173
  ## Operating model (skills-driven workflow)
133
174
 
@@ -145,7 +186,7 @@ The agent reads QFAI assets under `.qfai/assistant/` and produces or updates SDD
145
186
  QFAI includes a small set of custom skills (stored under `.qfai/assistant/skills/`) designed to keep the workflow opinionated and repeatable.
146
187
 
147
188
  - **qfai-configure**: Analyze the repository (language, frameworks, test layout, directory structure)
148
- and tailor `qfai.config.yaml` accordingly (especially `testFileGlobs`).
189
+ and adjust `qfai.config.yaml` accordingly (especially `testFileGlobs`).
149
190
  Run this once right after `npx qfai init`, and re-run it when the repository structure changes.
150
191
  - **qfai-discussion**: Run a unified structured discussion that produces and maintains the latest discussion pack
151
192
  as 15 required markdown files under `.qfai/discussion/discussion-<ts>/`.
@@ -162,9 +203,10 @@ QFAI includes a small set of custom skills (stored under `.qfai/assistant/skills
162
203
  in `.qfai/specs/_policies/03_Capabilities.md` before the row is accepted
163
204
  (`QFAI-TRIAGE-006`). Every `01_Spec.md` declares a lifecycle
164
205
  `Status: active | superseded | deprecated | removed` (`QFAI-STATUS-001..006`).
165
- - **qfai-prototyping**: Multi-spec parallel design evolution loop. Resolves
166
- every UI-bearing spec in one invocation, freezes that set at cycle 0,
167
- and iterates each `spec × screen` pair through up to 10 cycles
206
+ - **qfai-prototyping**: Primary-spec design evolution loop. Resolves exactly
207
+ one primary UI-bearing spec per invocation and freezes it at cycle 0 (the
208
+ full UI-bearing set is recorded as `frozenSurfaceUnion` for drift detection
209
+ only), then iterates each `spec × screen` pair through up to 10 cycles
168
210
  (`cycle 0..9`) of generate → capture → review with a 4-axis ordinal
169
211
  rubric, 6 `*Feel` short-prose impressions (200-word bounded), explicit
170
212
  layout anti-pattern detection (`lap-001..lap-008`), DESIGN.md token
@@ -277,7 +319,14 @@ validation:
277
319
 
278
320
  Notes.
279
321
 
280
- - `validate.json`, `report.json`, `doctor.json`, and `run-*` JSON logs are internal exports and are not a stable external contract; prefer `report.md` for integrations that must survive tool upgrades.
322
+ - `validate.json` is a **public** surface: its keys are documented in
323
+ `.qfai/assistant/skills/qfai-verify/references/validate-json-schema.md` and a change to
324
+ them takes the `@api` path (`.qfai/assistant/constitution/change-classification.md`). The
325
+ skills instruct agents to read it, so it is a contract whether or not this file says so —
326
+ it used to say the opposite, which left a consumer following the skills depending on
327
+ something the README disclaimed. `message` text and the order of `issues` are still not
328
+ stable; match on `issues[].code`
329
+ - `report.json`, `doctor.json`, and `run-*` JSON logs are internal exports and are not a stable external contract; prefer `report.md` for integrations that must survive tool upgrades.
281
330
  - Scenario files are expected to use the Gherkin extension `*.feature` (not `*.md`).
282
331
  - `prototyping.calibration.packPath` points to the calibration pack SSOT; runtime and validator both resolve thresholds and iteration parameters from that pack.
283
332
  - `prototyping.calibration.thresholds`, `maxIterations`, `plateauDelta`, and `plateauLookback` are unsupported public config fields.
@@ -349,8 +398,10 @@ Release gate behavior:
349
398
 
350
399
  QFAI generates integration wrappers under `.agents/**`, `.claude/**`,
351
400
  `.github/**`, and `.codex/**`.
352
- It does not generate GitHub Actions workflows.
353
- Configure CI in your own platform and run:
401
+ Into `.github/workflows/` it writes exactly two files — `qfai-validate.yml`
402
+ and `qfai-tests.yml` — and touches nothing else there; both open with a
403
+ `# Generated by \`qfai init\`` line. Configure the rest of CI in your own
404
+ platform and run:
354
405
 
355
406
  ```bash
356
407
  pnpm ci:gate
@@ -463,6 +514,7 @@ Typical customizations.
463
514
  │ │ ├── spec_required_files.json
464
515
  │ │ ├── structure.md
465
516
  │ │ ├── tech.md
517
+ │ │ ├── test-layers-ci-lanes.md
466
518
  │ │ ├── test-layers.md
467
519
  │ │ ├── ui-definition-protocol.md
468
520
  │ │ └── worklog-entry.schema.md
@@ -477,7 +529,7 @@ README files. Those files are created later by QFAI skills when real work exists
477
529
  ### AI work-log surface (`.qfai/steering/`)
478
530
 
479
531
  `qfai init` also creates `.qfai/steering/`, the per-project work-log surface for
480
- AI coding agents, with a `README.md` and `_templates/entry.md`. Each entry is a
532
+ AI coding agents, with a `README.md` and an `entry.md` template under `_templates/`. Each entry is a
481
533
  markdown file with YAML frontmatter, and `npx qfai validate` polices the surface in
482
534
  the `sdd` and full profiles via `W-WORKLOG-SCHEMA`, `W-WORKLOG-BROKEN-LINK`,
483
535
  `W-WORKLOG-STALE`, `W-PENDING-PROMOTION` and `R-HANDOFF-INCOMPLETE`.
@@ -494,7 +546,7 @@ Integration wrappers are also generated for immediate use:
494
546
  - Agents/Codex VS Code: `.agents/skills/**`
495
547
  - Claude Code: `.claude/skills/**`, `.claude/agents/**`
496
548
  - GitHub Copilot: `.github/skills/**`, `.github/agents/**`
497
- - Codex: `.codex/skills/**`
549
+ - Codex: `.codex/skills/**`, `.codex/agents/**`
498
550
 
499
551
  ## Agent integrations
500
552
 
@@ -502,12 +554,30 @@ Integration wrappers are also generated for immediate use:
502
554
  and generates thin wrapper assets for Agents/Codex VS Code / Copilot / Claude Code / Codex.
503
555
  Canonical agent markdown under `.qfai/assistant/agents/**` uses a shared YAML frontmatter
504
556
  subset (`name`, `description`, `tools`) compatible with Claude Code and GitHub Copilot,
505
- while Codex consumes mirrored `.codex/agents/*.toml` profiles.
506
- If wrapper assets drift from canonical skills, rerun `npx qfai init --force` to resync.
557
+ while Codex consumes `.codex/agents/*.toml` profiles generated from that same markdown.
558
+ The `.claude` / `.github` agent wrappers are symlinks and follow the canonical document
559
+ automatically; the Codex profiles are generated files, so rerun `npx qfai init --force`
560
+ to refresh them (and any other wrapper asset that has drifted).
561
+ `--force` deletes as well as overwrites: it removes the command and prompt wrappers earlier releases
562
+ installed under `.claude/commands/` and `.github/prompts/`, and the skill wrappers it installed under
563
+ `.claude/skills/`, `.agents/skills/`, `.codex/skills/` and `.github/skills/` for skills QFAI no longer
564
+ ships — the directory wrappers releases before the symlink recut copied there as well as the symlinks
565
+ that replaced them. Files it did not write — a project's own slash command, prompt file or skill,
566
+ including one published from a project-authored `.qfai/assistant/skills/` entry — are left in place,
567
+ whatever they are named. Ownership is read from the file, not the name: a wrapper is removed only when
568
+ it carries the delegation line to the canonical document of the same name, or is a symlink into
569
+ `.qfai/assistant/skills/`. One consequence of that: a symlink has no content to prove who wrote it, so
570
+ if you publish a canonical skill of your own under a name QFAI itself once shipped, `--force` removes
571
+ that link. Your `.qfai/assistant/skills/` entry is untouched; re-create the link to publish it again.
507
572
 
508
573
  ## Contributing (for QFAI maintainers)
509
574
 
510
- This repository is a monorepo, and the distributable package is under `packages/qfai`; if you change documentation, keep the repository root README and the package README aligned (the CI enforces this).
575
+ This repository is a monorepo, and the distributable package is under `packages/qfai`.
576
+ The repository root `README.md` and `packages/qfai/README.md` are kept aligned by
577
+ `scripts/check-readme-alignment.mjs`, which CI runs as part of `pnpm ci:lint`: every line
578
+ outside a `readme-align:ignore-start` / `readme-align:ignore-end` HTML-comment block must be
579
+ identical in both files. When you change documentation, apply the edit to both READMEs, or
580
+ wrap the intentionally file-specific part in those markers.
511
581
 
512
582
  ## License
513
583
 
@@ -0,0 +1,27 @@
1
+ # QFAI assistant tree
2
+
3
+ This directory is the canonical source for QFAI's skills, agents, constitution,
4
+ manifest and catalog. `npx qfai init` writes it once and never removes it, and the
5
+ tool-specific integration directories are built from it.
6
+
7
+ ## Canonical entrypoint
8
+
9
+ Every tool integration resolves through symlinks that point back here:
10
+
11
+ - .qfai/assistant/skills/ — skill documents
12
+ - .qfai/assistant/agents/ — agent definitions
13
+
14
+ These documents are the SSOT. Edit them here, not through the symlinks under
15
+ `.claude/`, `.agents/`, `.codex/` or `.github/`.
16
+
17
+ ## Integration surface
18
+
19
+ `npx qfai init` creates the wrappers under those four directories. They are
20
+ generated, so re-running `npx qfai init` restores any that a checkout flattened or
21
+ a cleanup removed; nothing there needs to be edited by hand.
22
+
23
+ `npx qfai validate` checks that the wrappers still resolve to the documents above.
24
+ It reads this file to tell "init has run here and the surface was deleted" from
25
+ "init has never run here" — the two look identical from the integration
26
+ directories alone once every wrapper is gone, and only one of them is a
27
+ problem. Leave it in place.
@@ -24,6 +24,22 @@ tools: [Read, Glob, Grep, Bash]
24
24
  - .qfai/assistant/catalog/test-layers.md
25
25
  - .qfai/specs/spec-\*/09_delta.md
26
26
  - Validation evidence and gate results
27
+ - `.qfai/specs/<spec-id>/tdd/test-list.md` — the ledger, for the row under review
28
+ - The per-item evidence file that row's `Layer` owns: `.qfai/evidence/implement-<spec-id>.md`,
29
+ or `.qfai/evidence/atdd-<spec-id>.md` for an `E2E` / `API` / `Integration` row
30
+
31
+ **Validate evidence is a completion-gate input, not an item-cycle one.** When
32
+ this role is routed inside an item cycle — `/qfai-atdd` stage gate P1c hands a
33
+ single row to `/qfai-implement` and that run's reviewers gate its checkpoint —
34
+ `.qfai/report/validate.log`, the coverage reports and runtime evidence are P5/P6
35
+ artifacts of the calling stage and do not exist yet. Requiring them there
36
+ stopped the first branch-1 row at `refactor`, which Phase Red does not
37
+ re-select, so the calling stage never reached P2. Judge the row's own
38
+ phase-authored evidence; the completion gate is where the rest is owed. **The
39
+ two inputs above are what makes that possible** — without the ledger and the
40
+ evidence home its `Layer` selects, this role cannot identify the artifact it is
41
+ being asked to judge, and falls into its own Stop condition ("Required evidence
42
+ ... missing") on a correct branch-1 or branch-2 row.
27
43
 
28
44
  ## Deliverables
29
45
 
@@ -51,7 +67,7 @@ tools: [Read, Glob, Grep, Bash]
51
67
 
52
68
  - [ ] Review verdict is explicit
53
69
  - [ ] Findings cite concrete artifacts or evidence
54
- - [ ] Every finding declares `Severity:` and `Traces to:`; no blocking finding has `Traces to: none`
70
+ - [ ] Every finding declares `Severity:` and `Traces to:`; no blocking finding traces to `none` or `record:*`
55
71
  - [ ] Required gates and residual risks are recorded
56
72
 
57
73
  ## When to use
@@ -33,6 +33,14 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
33
33
  - .qfai/specs/spec-\*/01_Spec.md
34
34
  - `.qfai/specs/spec-*/tdd/test-list.md` — the execution ledger this role selects
35
35
  the next item from and whose Red-Green-Refactor ordering it enforces
36
+ - **The document the row's obligation column points at.** Item scope is "is this
37
+ selector a sufficient slice of the obligation", and the obligation is not
38
+ always a `TC-*`: an `E2E` row owes `US-Refs` and an `API` row owes
39
+ `CON-API-Refs`. Without these the role has nothing to compare such a row
40
+ against and can only guess a PASS or stall the gate.
41
+ - `.qfai/specs/spec-*/06_Test-Cases.md` for a `TC-Refs` row
42
+ - `.qfai/specs/spec-*/02_User-stories.md` for a `US-Refs` row
43
+ - `.qfai/contracts/api/**` for a `CON-API-Refs` row
36
44
  - .qfai/discussion/discussion-\*/04_Sources.md
37
45
  - .qfai/discussion/discussion-\*/06_REQ.md
38
46
  - .qfai/discussion/discussion-\*/11_OQ-Register.md
@@ -31,6 +31,17 @@ tools: [Read, Glob, Grep, Bash]
31
31
  - .github/instructions/principles.instructions.md
32
32
  - Diff of changed files
33
33
  - `.qfai/contracts/api/**` and `.qfai/contracts/db/**`
34
+ - `.qfai/specs/<spec-id>/tdd/test-list.md` — the ledger, for the row under review
35
+ - The per-item evidence file that row's `Layer` owns: `.qfai/evidence/implement-<spec-id>.md`,
36
+ or `.qfai/evidence/atdd-<spec-id>.md` for an `E2E` / `API` / `Integration` row
37
+
38
+ **The last two are what the `Audited evidence hash` is computed over.** This
39
+ role records that hash itself, over the row's phase-authored fields — and those
40
+ live in a committed per-item evidence file so a fresh clone can reproduce the
41
+ audit. Without the ledger and the evidence home the row's
42
+ `Layer` selects, this role cannot identify its own audit subject: the hash goes
43
+ missing and gate items 10-11 stop, or the orchestrator computes it instead,
44
+ which is the one thing the contract says must not happen.
34
45
 
35
46
  ## Deliverables
36
47
 
@@ -55,7 +66,7 @@ tools: [Read, Glob, Grep, Bash]
55
66
 
56
67
  - [ ] Review verdict is explicit
57
68
  - [ ] Findings cite concrete artifacts or evidence
58
- - [ ] Every finding declares `Severity:` and `Traces to:`; no blocking finding has `Traces to: none`
69
+ - [ ] Every finding declares `Severity:` and `Traces to:`; no blocking finding traces to `none` or `record:*`
59
70
  - [ ] Required gates and residual risks are recorded
60
71
 
61
72
  ## When to use
@@ -32,7 +32,7 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
32
32
  - Work Orders for each subagent (scope, inputs, outputs, gates)
33
33
  - Stage Gates plan + current status
34
34
  - Completion report (DoD checklist + evidence links)
35
- - Evidence summary for `.qfai/evidence/` (gitignored; do not commit)
35
+ - Evidence summary for `.qfai/evidence/` (commit only paths re-included by the managed block)
36
36
 
37
37
  ## Stop conditions
38
38
 
@@ -45,7 +45,7 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
45
45
  ## Sign-off
46
46
 
47
47
  - [ ] Deliverables are complete
48
- - [ ] Evidence is present (gitignored)
48
+ - [ ] Evidence is present under the managed tracking policy
49
49
  - [ ] Stage gates are PASS
50
50
  - [ ] Reviewer sign-off recorded
51
51
 
@@ -30,7 +30,8 @@ tools: [Read, Write, Edit, Glob, Grep, Bash]
30
30
  - .github/instructions/principles.instructions.md
31
31
  - Root `DESIGN.md` (brand SSOT: front-matter tokens plus `# Brand Philosophy` body)
32
32
  - Reference pool framed as deviate-from inputs, screen contracts (`uiux/40_screen_contracts.md`), optional tokens, optional fallback HTML/CSS mock, and Mermaid flows
33
- - Evaluator axes are fixed in `core/prototyping/evaluatorReview.ts#ORDINAL_AXES` (information architecture / navigation flow / usability / functionality) and no longer authored as sidecar files
33
+ - Evaluator axes (information architecture / navigation flow / usability / functionality) are fixed by
34
+ the review validation the QFAI CLI applies (restated in `.qfai/assistant/skills/qfai-prototyping/references/reviewer-prompt.md`), not sidecar files
34
35
  - Runtime screenshots or rendered evidence when available
35
36
 
36
37
  ## Deliverables
@@ -15,7 +15,7 @@ tools: [Read, Glob, Grep, Bash]
15
15
  - Audit frontend changes for correctness and user-facing risk.
16
16
  - Audit layout sanity, interaction usability, and accessibility guardrails.
17
17
  - Audit visual design, token alignment, and service-level UX coherence.
18
- - Reconcile sidecar artifacts (selected anchor, strategy, screen contracts), design tokens, mermaid flows, and rendered output consistency.
18
+ - Reconcile sidecar artifacts (screen contracts), design tokens, mermaid flows, and rendered output consistency.
19
19
  HTML mock is optional fallback evidence only. Design tokens are supporting input.
20
20
  - For UI implementation, compare rendered output against `.qfai/contracts/design/prototype-handoff.yaml`, canonical prototype screenshots, HTML snapshots, and `.qfai/prototypes/winner/index.html`.
21
21
  - Reject prototype parity when implementation loses CTA hierarchy, spacing rhythm, information density,
@@ -21,7 +21,9 @@ tools: [Read, Glob, Grep, Bash]
21
21
 
22
22
  ## Ownership boundaries
23
23
 
24
- - `delivery-planner` owns **item selection and item scope** — whether a ledger row's selector is a sufficient slice of its `TC-*` obligation. Do not adjudicate item scope here; a PASS on observation
24
+ - `delivery-planner` owns **item selection and item scope** — whether a ledger
25
+ row's selector is a sufficient slice of the obligation its `Layer` names
26
+ (`TC-Refs`, `US-Refs` or `CON-API-Refs`). Do not adjudicate item scope here; a PASS on observation
25
27
  evidence is explicitly scoped to that observation and never widens or ratifies item scope. See `.qfai/assistant/skills/qfai-implement/SKILL.md#precedence-between-delivery-planner-and-qa-gatekeeper`.
26
28
  - Refuse to evaluate RED/GREEN evidence while an unresolved `delivery-planner` scope REVISE is open on the same item.
27
29
 
@@ -32,7 +34,8 @@ the item owns, and nothing downstream re-asks: coverage is annotation presence
32
34
  and the Depth Matrix counts case categories. A test that cannot fail otherwise
33
35
  clears every gate.
34
36
 
35
- Require an `Oracle proof` on each item and **reject** it when:
37
+ Require an `Oracle proof` on each item **at a GREEN or completion gate**, and
38
+ **reject** it when:
36
39
 
37
40
  - the mutation is outside the code the item owns — breaking a shared helper
38
41
  proves the helper is used, not that this test discriminates;
@@ -41,6 +44,14 @@ Require an `Oracle proof` on each item and **reject** it when:
41
44
  - the failing output names a selector other than the row's;
42
45
  - the recorded command differs from the `GREEN command`.
43
46
 
47
+ **At a RED observation the proof is a plan, and a plan is enough.** Branch 1's
48
+ RED is taken before any production behaviour exists, so there is nothing to
49
+ mutate: the item names the predicate it will break and the command it will run.
50
+ Requiring a demonstrated mutation there made a correct observed RED unable to
51
+ pass P1b and so unable to reach Phase Green — the phase that builds the code the
52
+ mutation needs. Judge the plan for whether it names this row's predicate and
53
+ selector; judge the demonstration once the behaviour exists.
54
+
44
55
  `equivalent-mutant` is acceptable **only** when the named contract clause is
45
56
  genuinely weaker than the obligation. It is an upstream gap: route it as an
46
57
  advisory / Change Request, do not send the implementer to strengthen an
@@ -78,12 +89,46 @@ test:
78
89
  - "the suite is green" in place of the row's own GREEN.
79
90
 
80
91
  The one legitimate absence is the _RED not observable_ path: the obligation is
81
- already satisfied by a sibling row, so the correct test passes first run. Then
82
- require `Satisfied-by`, `Falsifiability command` and `Falsifiability result`
83
- instead — never both forms, never neither. See
92
+ already satisfied by something already in the tree, so the correct test passes
93
+ first run. Then require `Satisfied-by`, `Falsifiability command` and
94
+ `Falsifiability result` instead — never both forms, never neither.
95
+
96
+ **On an `E2E` / `API` / `Integration` row, `Satisfied-by` need not be a sibling `TDD-NNNN`.** A
97
+ production **path and symbol** is equally valid there and is the normal answer
98
+ for a row whose surface no ledger row owns; rejecting it sends every such row to
99
+ `exception`, the terminal state the path exists to avoid. Judge it on whether it
100
+ answers "what would I mutate to falsify this row".
101
+
102
+ **A commit id alone does not answer it — REVISE.** A commit that touched
103
+ several routes and a helper names no single predicate, so the ownership check
104
+ below has no boundary to apply and would accept a mutation anywhere inside it.
105
+ The producer contract requires the symbol for this reason
106
+ (`../skills/qfai-atdd/references/red-provenance.md#the-three-branches-must`); a
107
+ commit recorded **alongside** the path and symbol is provenance and is fine.
108
+
109
+ **And the mutation may touch it.** The Oracle Strength Check rejects a mutation
110
+ outside the code the item owns, which on an `E2E` / `API` / `Integration` row is every
111
+ production predicate there is — the same sentence above says no ledger row owns
112
+ that surface. Applied literally, no branch-2 row could ever produce
113
+ falsifiability evidence that passes. On a handed-over row, **the predicate
114
+ `Satisfied-by` names is the owned code** for this check; anything else is still
115
+ out of bounds.
116
+
117
+ **On any other row the sibling row is still required** — production code
118
+ no ledger row owns is the anomaly case there, not a substitute. See
84
119
  `.qfai/assistant/skills/qfai-implement/references/red-not-observable.md` and
85
120
  `.qfai/assistant/skills/qfai-implement/references/red-admissibility.md`.
86
121
 
122
+ **A `Layer = E2E` / `Layer = API` row from `/qfai-atdd` is judged the same
123
+ way.** Its journey is often written after the surface the same cycle built, so
124
+ the falsifiability form is the expected evidence rather than a concession —
125
+ accept it, with the mutated predicate being one the journey actually asserts
126
+ on. What is **not** acceptable is the third outcome appearing by default: a row
127
+ routed to `exception` whose `DR-*` says only that the surface came first has
128
+ not shown that either branch was unavailable, and that is a REVISE. See
129
+ `.qfai/assistant/skills/qfai-atdd/SKILL.md#red-provenance-for-an-atdd-owned-row-must`
130
+ and `.qfai/assistant/skills/qfai-implement/references/execution-ledger.md#atdd-owned-rows`.
131
+
87
132
  Verdict scope: a PASS covers the observation for that round and nothing else. It
88
133
  does not ratify item scope and does not clear the completion gate.
89
134
 
@@ -91,7 +136,10 @@ does not ratify item scope and does not clear the completion gate.
91
136
 
92
137
  In addition to traceability-based coverage (US/TC/CON-API existence), verify the **depth** of test cases:
93
138
 
94
- - Confirm a Coverage Depth Matrix exists (produced by `test-design-analyst`). Missing matrix: REVISE from the ATDD review cycle onward; on an SDD review cycle record it as a finding. See the scope note.
139
+ - Confirm a Coverage Depth Matrix exists at `.qfai/evidence/coverage-depth-<spec-id>.md` (produced by `test-design-analyst`).
140
+ Missing matrix: REVISE from the ATDD review cycle onward; on an SDD review cycle record it as a finding. See the scope note.
141
+ A matrix that exists only inside `.qfai/evidence/atdd-<spec-id>.md` is a **missing** matrix: that committed file is the
142
+ ledger's per-item evidence payload, not the dedicated matrix artifact whose justifications this gate reads.
95
143
  - Check that each US/TC has test cases for at minimum: normal path AND error/failure path.
96
144
  - Flag any US/TC that has only normal-path test cases as a coverage gap.
97
145
  - Reference: `.qfai/assistant/skills/qfai-atdd/references/test-case-depth-checklist.md`
@@ -105,8 +153,9 @@ In addition to traceability-based coverage (US/TC/CON-API existence), verify the
105
153
  The Coverage Depth Matrix is an **ATDD-stage artifact**: it is defined in
106
154
  `.qfai/assistant/skills/qfai-atdd/references/test-case-depth-checklist.md`, listed as an ATDD
107
155
  Mandatory Output,
108
- and written into `.qfai/evidence/atdd-<spec-id>.md`. `qfai-sdd` neither defines its layout nor
109
- ships a section for it, so:
156
+ and written to `.qfai/evidence/coverage-depth-<spec-id>.md` — a committed governance path alongside
157
+ `implement-<spec-id>.md` and `atdd-<spec-id>.md`. Only run-scoped evidence remains ignored.
158
+ `qfai-sdd` neither defines the matrix layout nor ships a section for it, so:
110
159
 
111
160
  - Apply this check from the **ATDD review cycle onward**, where
112
161
  `.qfai/assistant/skills/qfai-atdd/SKILL.md` lists
@@ -124,14 +173,47 @@ ships a section for it, so:
124
173
  - .qfai/assistant/catalog/test-layers.md
125
174
  - .qfai/specs/spec-\*/09_delta.md
126
175
  - `.qfai/specs/spec-*/tdd/test-list.md` — the ledger row under review
127
- - `.qfai/evidence/implement-<spec-id>.md` — the per-item RED/GREEN evidence this
128
- role adjudicates. Both are listed because the Stop condition below ("target
129
- artifacts are missing") is not checkable against an artifact this role was
130
- never told to open.
131
- - `.qfai/report/validate.log`
176
+ - **The per-item RED/GREEN evidence for the row under review — in the file its
177
+ `Layer` owns, and only that one.** `.qfai/evidence/atdd-<spec-id>.md`, under
178
+ `## Ledger rows advanced`, for a `Layer = E2E` / `Layer = API` / `Layer = Integration` row;
179
+ `.qfai/evidence/implement-<spec-id>.md` for every other row. Both are listed
180
+ because the Stop condition below ("target artifacts are missing") is not
181
+ checkable against an artifact this role was never told to open — but
182
+ requiring **both** makes that condition fire on a spec that legitimately has
183
+ one: a Unit-only spec never ran `/qfai-atdd`, and a spec whose rows are all
184
+ `E2E` / `API` / `Integration` has no implement file. Either way the gate would stop before
185
+ reading the evidence that does exist.
186
+ **The three below are required at a completion gate, not at a RED/GREEN
187
+ observation.** `/qfai-atdd` routes this role as blocking at stage gate P1b, and
188
+ validate output, coverage reports and runtime evidence are first produced at its
189
+ P5 and P6 — so requiring them there stopped a fresh run that had a perfectly
190
+ good RED pair, on artifacts its own ordering says cannot exist yet. At an
191
+ observation gate the row's own evidence above is the whole input.
192
+
193
+ - The scoped validate JSON for the spec under review — `validate.spec-<id>.json`
194
+ **beside the configured `output.validateJsonPath`**, not under a fixed
195
+ `.qfai/report/` — or the `run-*/` directory of the run that produced it, under
196
+ the configured `paths.outDir`. Read both from `qfai.config.yaml` the way the
197
+ SDD and discussion contracts do. A project that moved either output writes its
198
+ evidence where it said to, and looking for it at the default path reported a
199
+ missing artifact and stopped completion on a validate run that had succeeded
200
+ and left everything it owed. **Not `validate.log`**: it and the run-log pointer are shared by every
201
+ run, scoped or not, and nothing serializes them, so a sibling stage validating
202
+ at the same time overwrites what this one wrote — a failing run followed by a
203
+ sibling's success reads as this spec's PASS
132
204
  - `.qfai/report/specs-coverage/spec-*.md`
133
205
  - Runtime evidence and prototyping evidence artifacts
134
206
 
207
+ **Branch 3 gets its own verdict.** The observation gate admits an observed RED
208
+ or a falsifiability trio and calls anything else "never neither" — but a genuine
209
+ branch-3 row _has_ neither, by the finding that put it there. Judged by the two
210
+ forms it can only be REVISE, and skipping the gate leaves the stage's completion
211
+ condition unmet, so the row could not close either way. Judge these on their own
212
+ terms: a `DR-*` that records **what could not be observed and why each branch was
213
+ unavailable**, PASS or REVISE on that. A missing `DR-*`, or one that names no
214
+ unavailability, is still REVISE — this is a third form of evidence, not an
215
+ exemption from having any.
216
+
135
217
  ## Deliverables
136
218
 
137
219
  - Gate decision (PASS / REVISE) with rationale
@@ -140,7 +222,10 @@ ships a section for it, so:
140
222
 
141
223
  ## Stop conditions
142
224
 
143
- - Required evidence, governing specs, or target artifacts are missing.
225
+ - Required evidence, governing specs, or target artifacts are missing — judged
226
+ against what the invoking phase requires, per the note above the last three
227
+ inputs. At a RED/GREEN observation that is the row's own evidence; at a
228
+ completion gate it is all of them.
144
229
  - The request requires implementation or file editing instead of independent review.
145
230
  - The issue falls outside this review domain and must be rerouted to another specialist first.
146
231
 
@@ -58,7 +58,10 @@ At both stages: when business rules (BR-\*) exist, verify each BR has at least o
58
58
  - Coverage plan and layer ownership
59
59
  - Test-case quality and traceability findings
60
60
  - **Coverage Depth Matrix** (per spec, using the template in the depth checklist reference).
61
- Destination: `.qfai/evidence/atdd-<spec-id>.md` from the ATDD stage onward. During SDD there is
61
+ Destination: `.qfai/evidence/coverage-depth-<spec-id>.md` from the ATDD stage onward — its own
62
+ file, because it has its own committed governance lifecycle separate from the committed
63
+ per-item TDD evidence, and the justification behind each `❌` is the input `qa-gatekeeper`
64
+ reads. During SDD there is
62
65
  no evidence artifact that holds it, so report depth gaps as findings instead of producing the
63
66
  matrix format.
64
67
  - Volume estimate and risk notes
@@ -42,6 +42,9 @@ QFAI が定義する、`npx qfai validate` の UI/UX 関連出力ガイドライ
42
42
  - 許容値: `web`, `windows`, `mobile-ios`, `mobile-android`, `cross-platform`
43
43
  - 未指定時: 自動検出(config → project files → fallback to `web`)
44
44
  - 未知の値: warning 発行。platform 値は保持しつつ、実質的に common ルールのみ適用
45
+ - 参照する profile: `prototyping` / `verify` / `full` / `saas-package` のみ。
46
+ `discussion` / `sdd` / `atdd` / `tdd` は platform を読まないため、これらに
47
+ `--platform` を渡すと未使用である旨の warning のみを発行する(未知値チェックは走らない)
45
48
 
46
49
  ## Known Limitations
47
50