qfai 2.4.0 → 2.5.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 (163) hide show
  1. package/README.md +24 -16
  2. package/assets/defaults/workflows/apply-settled.yml +2 -0
  3. package/assets/defaults/workflows/decide-design.yml +1 -6
  4. package/assets/defaults/workflows/decompose-epic.yml +1 -1
  5. package/assets/init/.claude/settings.json +1 -1
  6. package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +1 -0
  7. package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +6 -9
  8. package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +9 -1
  9. package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +70 -4
  10. package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +1 -0
  11. package/assets/init/.qfai/assistant/rule/constitution.md +3 -2
  12. package/assets/init/.qfai/assistant/rule/drift-protocol.md +5 -5
  13. package/assets/init/.qfai/assistant/rule/references/deliberation-record-template.md +23 -0
  14. package/assets/init/.qfai/assistant/rule/references/deliberation-record.md +36 -0
  15. package/assets/init/.qfai/assistant/rule/references/griller-recommendations.md +3 -3
  16. package/assets/init/.qfai/assistant/rule/references/launcher-preflight.md +27 -0
  17. package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +9 -0
  18. package/assets/init/.qfai/assistant/rule/references/reviewer-remit.md +23 -15
  19. package/assets/init/.qfai/assistant/rule/references/visual-reference-survey.md +146 -0
  20. package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +2 -0
  21. package/assets/init/.qfai/assistant/rule/research-first-protocol.md +49 -11
  22. package/assets/init/.qfai/assistant/rule/review-convergence.md +15 -16
  23. package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +3 -0
  24. package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +13 -25
  25. package/assets/init/.qfai/assistant/rule/test-layers.md +8 -0
  26. package/assets/init/.qfai/assistant/rule/thinking.md +10 -5
  27. package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +4 -4
  28. package/assets/init/.qfai/assistant/rule/ui-procurement.md +50 -10
  29. package/assets/init/.qfai/assistant/rule/workflow.md +4 -3
  30. package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +3 -1
  31. package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +22 -56
  32. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/design-dna-intake.md +11 -14
  33. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-coverage-checklist.md +1 -1
  34. package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +6 -4
  35. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/discussion-delegation.md +46 -0
  36. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/glossary-check.md +23 -0
  37. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-check.md +25 -0
  38. package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +12 -1
  39. package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +2 -3
  40. package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +47 -8
  41. package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +2 -0
  42. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +1 -1
  43. package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +6 -2
  44. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +6 -9
  45. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +24 -15
  46. package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +2 -2
  47. package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +2 -1
  48. package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +7 -3
  49. package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +4 -1
  50. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/business-ui-patterns.md +180 -0
  51. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +14 -3
  52. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +14 -3
  53. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +39 -24
  54. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-brand-catalog.md +2 -2
  55. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/marketing-ui-patterns.md +194 -0
  56. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +27 -3
  57. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +29 -22
  58. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +3 -3
  59. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +4 -4
  60. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +1 -1
  61. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +4 -2
  62. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +6 -6
  63. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +87 -4
  64. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +6 -7
  65. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/api-contract.sample.yaml +3 -0
  66. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/db-contract.sample.sql +3 -0
  67. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +40 -1
  68. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/report/preflight_summary.md +10 -16
  69. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/01_policy/constraint.md +10 -0
  70. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/01_policy/initiative.md +5 -0
  71. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/tech.md +1 -0
  72. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +8 -2
  73. package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +4 -0
  74. package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +4 -2
  75. package/assets/init/.qfai/assistant/skill/qfai-verify/references/context-load.md +2 -1
  76. package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +4 -1
  77. package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +11 -8
  78. package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +1 -1
  79. package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +25 -60
  80. package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +18 -6
  81. package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +45 -95
  82. package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +11 -13
  83. package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +2 -2
  84. package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +52 -8
  85. package/assets/init/.qfai/assistant/step/implement-settled-edit/STEP.md +78 -0
  86. package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +3 -3
  87. package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +20 -2
  88. package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +4 -0
  89. package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +3 -2
  90. package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +6 -1
  91. package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +58 -11
  92. package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +41 -27
  93. package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +2 -1
  94. package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +43 -26
  95. package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +8 -3
  96. package/assets/init/.qfai/assistant/step/triage-close/STEP.md +12 -6
  97. package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +2 -1
  98. package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +36 -6
  99. package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +2 -0
  100. package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +3 -1
  101. package/assets/init/.qfai/assistant/step/verify-context/STEP.md +3 -3
  102. package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +11 -3
  103. package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +22 -0
  104. package/assets/init/root/.agents/rules/delegation-steering.md +4 -2
  105. package/assets/init/root/.agents/rules/distributed-surface.md +1 -1
  106. package/assets/init/root/.agents/rules/grilling.md +28 -76
  107. package/assets/init/root/.agents/rules/interface-clarity.md +98 -6
  108. package/assets/init/root/.gitattributes +7 -5
  109. package/assets/init/root/.github/workflows/qfai-docs.yml +1 -1
  110. package/assets/init/root/qfai.config.yaml +1 -1
  111. package/assets/mdschema/story/01_policy/constraint.mdschema.yml +46 -2
  112. package/assets/mdschema/story/01_policy/initiative.mdschema.yml +18 -0
  113. package/assets/mdschema/story/03_contract/tech.mdschema.yml +5 -2
  114. package/assets/uix-rev/strategy-review.md +1 -1
  115. package/dist/cli/index.cjs +3787 -7097
  116. package/dist/cli/index.cjs.map +1 -1
  117. package/dist/cli/index.mjs +3647 -6970
  118. package/dist/cli/index.mjs.map +1 -1
  119. package/dist/graph/cli.cjs +966 -222
  120. package/dist/graph/cli.cjs.map +1 -1
  121. package/dist/graph/cli.mjs +942 -198
  122. package/dist/graph/cli.mjs.map +1 -1
  123. package/dist/graph/hook.cjs +999 -88
  124. package/dist/graph/hook.cjs.map +1 -1
  125. package/dist/graph/hook.mjs +996 -85
  126. package/dist/graph/hook.mjs.map +1 -1
  127. package/dist/hook/turn-end.cjs +15 -45
  128. package/dist/hook/turn-end.cjs.map +1 -1
  129. package/dist/hook/turn-end.mjs +15 -45
  130. package/dist/hook/turn-end.mjs.map +1 -1
  131. package/dist/index.cjs +15398 -18327
  132. package/dist/index.cjs.map +1 -1
  133. package/dist/index.d.cts +32 -41
  134. package/dist/index.d.ts +32 -41
  135. package/dist/index.mjs +19276 -22214
  136. package/dist/index.mjs.map +1 -1
  137. package/package.json +2 -2
  138. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-artifact-rules.md +0 -53
  139. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +0 -133
  140. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/example-mapping-guide.md +0 -18
  141. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/oq-and-deferred-rules.md +0 -84
  142. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +0 -95
  143. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/platform_baselines.md +0 -118
  144. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/review_audit_playbook.md +0 -115
  145. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/trend_scan_playbook.md +0 -81
  146. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux_best_practices.md +0 -184
  147. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/01_Context.md +0 -143
  148. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/03_Story-Workshop.md +0 -104
  149. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/04_Sources.md +0 -276
  150. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/05_Scope.md +0 -36
  151. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/06_REQ.md +0 -26
  152. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/07_NFR.md +0 -24
  153. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/08_Glossary.md +0 -23
  154. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/09_Constraints.md +0 -60
  155. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/11_OQ-Register.md +0 -38
  156. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/prototyping.yaml +0 -8
  157. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +0 -35
  158. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/40_screen_contracts.md +0 -62
  159. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/50_review_input_bundle.md +0 -38
  160. package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +0 -70
  161. package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +0 -199
  162. package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +0 -82
  163. package/assets/uix-rev/contracts-review.md +0 -27
@@ -21,7 +21,8 @@
21
21
  - `<paths.contractsDir>/`
22
22
  - `<paths.specsDir>/decisions.md`
23
23
 
24
- Do not use discussion-pack artifacts as verification inputs. Verify reads normalized specs, contracts, tests and code only.
24
+ Verify reads normalized specs, contracts, tests and code only.
25
+ Open no file under `paths.deliberationDir`: a deliberation record is not an input.
25
26
 
26
27
  4. Inspect repo conventions:
27
28
  - package manager (pnpm/npm/yarn), test runner, lint/typecheck scripts, CI definitions
@@ -121,7 +121,10 @@ Minimal conforming example for the prototyping gate:
121
121
 
122
122
  Rules:
123
123
 
124
- - A PASS gate needs actual command output or matching CI evidence. The existing
124
+ - A PASS gate needs actual command output or matching CI evidence. The
125
+ `visual check` gate of a UI change has no command: its `command` lists the
126
+ captures it read, and a capture of every changed screen at the verified
127
+ revision is its evidence. The existing
125
128
  top-level pending-DELEGATED allowance supports only the covered verification
126
129
  commit described above. A `FAIL` verdict is a legitimate output; downstream
127
130
  work stops as its gate requires.
@@ -20,11 +20,12 @@ any existing file unchanged; skip this step for it.
20
20
 
21
21
  ## Reads
22
22
 
23
- - The design direction the discussion recorded, as
23
+ - The design direction the deliberation record SDD consumes settles, as
24
24
  `.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md#where-the-answers-come-from`
25
- lists it: `01_Context.md#Design Direction`, the reference registries in
26
- `04_Sources.md`, and the `uiux/` sidecars. For an imported tree, the surface
27
- the import source names, or the user's answer.
25
+ lists it: the Interview row in which the user chose the brand direction, the
26
+ references the record settles with their adopted and rejected points, the
27
+ directions the user rejected, and the trend conclusions. For an imported
28
+ tree, the surface the import source names, or the user's answer.
28
29
  - The questions behind those answers:
29
30
  `.qfai/assistant/skill/qfai-discussion/references/design-dna-intake.md`.
30
31
  - The schema and validation rules:
@@ -40,8 +41,8 @@ any existing file unchanged; skip this step for it.
40
41
  ## Author and validate
41
42
 
42
43
  1. **Stop on an unchosen brand.** For initial authoring
43
- of a missing file, a pack that records no design direction leaves the brand
44
- unchosen. Brand intent is `hard-required`: ask for it, and under `--auto`
44
+ of a missing file, a record that has no Interview row on the brand direction
45
+ leaves the brand unchosen. Brand intent is `hard-required`: ask for it, and under `--auto`
45
46
  stop and name it. Never adopt the sample design. For an existing valid file,
46
47
  validation and triaged repairs that preserve its brand and tokens
47
48
  require no new brand selection. A brand or token change needs the
@@ -60,7 +61,9 @@ any existing file unchanged; skip this step for it.
60
61
  the intent fields first, then the archetype, then `brand.theme`, then the
61
62
  `visual.*` tokens taken from the named theme's published values
62
63
  (`.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md#taking-the-values-from-the-theme`).
63
- Do not compose token values by taste. For a repair, record the source of each
64
+ Do not compose token values by taste. Write the `# Brand Philosophy` body,
65
+ its **Do** and **Don't** and `audience.do_not_look_like` from what the record
66
+ settles, as exploration constraints, and select no visual winner. For a repair, record the source of each
64
67
  changed value and leave unrelated content unchanged. Validation without an
65
68
  authorized change writes nothing and does not repeat brand selection.
66
69
  4. **Parse and validate.** `parseDesignMd(text)` must succeed; pass its `data`
@@ -70,7 +73,7 @@ any existing file unchanged; skip this step for it.
70
73
  `DESIGN.md` against every aspect of
71
74
  `.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md` and its
72
75
  Displacement section. A token that prescribes a listed pattern fails unless
73
- `01_Context.md#Design Direction` asks for it. Name the pattern in the
76
+ the brand direction the record settles asks for it. Name the pattern in the
74
77
  finding. For an existing-file repair, stop unless the authorized change
75
78
  includes its replacement. Replace the value and check the file again.
76
79
 
@@ -24,7 +24,7 @@ Neither is restated here.
24
24
  - `qfai.config.yaml` for `paths.contractsDir`, `paths.outDir` and the test
25
25
  globs.
26
26
  - The launcher the preflight established, for a qfai command
27
- (`.qfai/assistant/rule/shared-skill-operating-baseline.md#canonical-qfai-launcher`).
27
+ (`.qfai/assistant/rule/references/launcher-preflight.md`).
28
28
  - `.agents/rules/temporary-files.md`, when this step writes captured output or a script to a
29
29
  file.
30
30
  - `.agents/rules/api-budget.md`, when this step reads CI state or the project's items through
@@ -1,77 +1,42 @@
1
1
  ---
2
2
  name: common-grilling-record
3
3
  owner: common
4
- purpose: "Write the record of the discussion stage's grilling session in the stage report, so a session that ran and one that was skipped can be told apart."
4
+ purpose: "Write what a grilling session asked and decided as rows of the run's deliberation record."
5
5
  requires: []
6
6
  ---
7
7
 
8
8
  # common-grilling-record
9
9
 
10
10
  The method is `.agents/rules/grilling.md`, and this step does not restate it.
11
- This step is the record: the method writes no artifact of its own, so without
12
- it a stage that grilled and one that skipped the session leave the same tree.
11
+ This step is where a session's results go: rows of the run's deliberation
12
+ record, written as `.qfai/assistant/rule/references/deliberation-record.md`
13
+ says. Apart from those rows, no stage writes a grilling record, a session
14
+ table or a marker saying that no session was held.
13
15
 
14
- Only the discussion stage writes this record. Every other stage stops on a
15
- contradiction under Article IX of `.qfai/assistant/rule/constitution.md`, and
16
- reports what it settled in its final report.
16
+ ## Rows the session writes
17
17
 
18
- ## Rules the record keeps
18
+ | What the session did | Row |
19
+ | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
20
+ | Put a question to the user | One Interview row, under the stage's subheading, written when the answer arrives |
21
+ | Took a decision in a delegated session | One Agent decisions row with at least three options, the griller's recommendation chosen |
22
+ | Took an assumption on a closure or under a no-question mode | One Agent decisions row whose Background says it is an assumption |
23
+ | Overturned an earlier row of the same record | A new row whose Background says which row it overturns; the earlier row stays |
24
+ | Left a question open | No record row of its own: one `<paths.specsDir>/open-questions.md` row, in the register's own form |
19
25
 
20
- - **The end time is written before work resumes.** A row holding only the final
21
- state reads the same whether the session ran first, ran after or never ran.
22
- Writing the end before the next write makes the order a record. It still
23
- cannot prove a session happened; the agent writes its own record.
24
- - **`Ended` is one of the five endings** `.agents/rules/grilling.md` names:
25
- `confirmed`, `user-closed`, `adopted`, `no-question`, `stopped`. Only the first
26
- four let the work go on.
27
- - **A stopped session is reported, not written.** The user ended it, and a row
28
- is a file change. The stage names the stopped session and its open nodes in
29
- its output and resumes no work.
30
- - **A free-form cell is one line, with `|` written `\|`.** A pipe or a line
31
- break adds cells and moves counts under the wrong headings.
26
+ **A free-form cell is one line, with `|` written `\|`.** A pipe or a line
27
+ break adds cells and moves values under the wrong headings, which
28
+ `npx qfai validate` reports as `QFAI-DELIB-001`.
32
29
 
33
- ## Decisions
30
+ ## What a session does not write
34
31
 
35
- A settled decision is written where the story tree keeps it. Adopt a supported
36
- recommendation in the appropriate `decisions.md` row or in the authored
37
- artifact. Record an unresolved choice in `open-questions.md` with its next
38
- action. Record a rejected option as a decision row whose Content opens `Declined:`, so
39
- it stays excluded on reruns.
40
-
41
- Each decision record is a short decision record in the form stated at the top of
42
- `.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md`.
43
-
44
- ## One session
45
-
46
- The stage holds one session per run, except a reopened node, below. The row
47
- goes in the stage report, under `## Grilling Session`, and is written before
48
- the first authored file:
49
-
50
- ```text
51
- | Ended | Ended at | Authoring began | Frontier | Lookups | Decisions | Escalated |
52
- | ----- | -------- | --------------- | -------- | ------- | --------- | --------- |
53
- | confirmed | <ISO8601> | <ISO8601> | empty | none in flight | <n> | <n> |
54
- ```
55
-
56
- The authoring endings are `confirmed`, `user-closed`, `no-question`, and
57
- conditionally `adopted`. For `adopted`, verify
58
- `.agents/rules/grilling.md#explicit-delegation-for-a-discussion`: actual user
59
- delegation with source, scope and authority; actual griller-to-author rounds
60
- with reasons and dissent; no open node or running lookup; all consumed required
61
- inputs present; and actual human authority for every reserved decision.
62
- Record these in the stage evidence, not as a fictional human option answer.
63
- `Ended at` and `Authoring began` are actual timestamps, with authoring later.
64
- A missing hard-required consumed input authorizes no authoring ending.
65
- Allowing authoring is not a completion or validation receipt.
32
+ - No row for a step that held no session: nothing is written to say none was held.
33
+ - No timestamp, ending or count of its own. The ending is reported in the
34
+ stage report, and a `stopped` session writes nothing more.
35
+ - No row of `decisions.md` and no other story-tree file, except where the
36
+ invoking stage itself writes the policy layer.
66
37
 
67
38
  ## A reopened node
68
39
 
69
- A critical decision found while authoring reopens the session for that node
70
- only, for one round to the user. Append one row for that round under the same
71
- header, with its own `Ended`, `Ended at` and `Authoring began`, before authoring
72
- resumes. The earlier rows stay as written. A stopped round is reported, not written.
73
-
74
- The round runs until no node it opened is left open, or until what is still
75
- open is recorded as labelled assumptions or `11_OQ-Register.md` entries. Under
76
- a no-question mode the row's `Ended` is `no-question`, and the decision is
77
- registered in `11_OQ-Register.md`.
40
+ A critical decision found later in the same run reopens the session for that
41
+ node only, for one round to the user. Its question is a new Interview row under
42
+ the stage that met it. The rows already written stay as written.
@@ -73,7 +73,13 @@ them; it is the procedure that applies them.
73
73
  ## Cycle
74
74
 
75
75
  1. **Build the request.** Name the scope, the target files and the review
76
- focus. Put the answers an earlier stage recorded on the same artifact into
76
+ focus. The reviewer's card is its checklist: its Domain Responsibilities
77
+ apply in full to every review it is dispatched to. A focus adds to them and
78
+ never removes one. The request does not tell a reviewer to check only some
79
+ of them, to look only for conformance to a contract, or not to flag a gap a
80
+ responsibility covers, such as the navigation or a state the screen needs.
81
+ Whether a finding blocks is decided by what a reviewer may demand, never by
82
+ the request. Put the answers an earlier stage recorded on the same artifact into
77
83
  this review's request before dispatching reviewers, under
78
84
  `.qfai/assistant/rule/review-convergence.md#answered-demands`.
79
85
  For the code review, name each test the run recorded `red: ci-deferred`:
@@ -85,8 +91,12 @@ them; it is the procedure that applies them.
85
91
  recommended a decision in the reviewed artifact is not its independent
86
92
  reviewer. The session report names its authors, editors and decision
87
93
  recommenders, and the independent reviewers.
88
- Each reviewer returns a verdict, `PASS` or `REVISE`, and its
89
- findings, in the shared reviewer response template.
94
+ Each reviewer returns a verdict, `PASS` or `REVISE`, its findings, and
95
+ the Domain Responsibilities of its card it checked, naming each one it
96
+ found not applicable to the target and why, in the shared reviewer
97
+ response template. A response that leaves a responsibility unaccounted for
98
+ is incomplete: it goes back to the reviewer to complete, and the completed
99
+ response is that reviewer's one response.
90
100
  3. **Address every finding** once: fix it in its owning source with the
91
101
  smallest edit that resolves it, or record a reasoned answer beside it, and
92
102
  rerun the tests a fix touches. An upstream finding is not repaired here:
@@ -106,8 +116,9 @@ them; it is the procedure that applies them.
106
116
 
107
117
  ## Writes
108
118
 
109
- - In the stage report: each reviewer's verdict, the findings, and how each was
110
- fixed or answered, and for each behaviour fix its re-review's verdict and
119
+ - In the stage report: each reviewer's verdict, the responsibilities it checked
120
+ and the ones it named not applicable, the findings, and how each was fixed or
121
+ answered, and for each behaviour fix its re-review's verdict and
111
122
  findings.
112
123
  - For a code review skipped as a small literal-only change: the skip, the
113
124
  changed lines and why no reviewer ran, in the stage report and in the final
@@ -118,7 +129,8 @@ them; it is the procedure that applies them.
118
129
  Every required reviewer responded once, each behaviour fix had its one focused
119
130
  re-review, every finding is fixed or answered, and
120
131
  the stage report names each verdict and each answer, or says why the review
121
- dispatched no reviewer. For a code review skipped as a small literal-only
132
+ dispatched no reviewer. Each response accounted for every Domain
133
+ Responsibility of the reviewer's card. For a code review skipped as a small literal-only
122
134
  change, the stage report names the skip, the changed lines and why, and records
123
135
  the skip for the final report. A finding the author
124
136
  cannot fix is in the stage's final report, and a critical decision has gone to
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: discussion-interview
3
3
  owner: qfai-discussion
4
- purpose: "Interview the user as a grilling session and record how and when it ended."
4
+ purpose: "Interview the user as a grilling session, and write each question to the run's deliberation record and each question left open to open-questions.md."
5
5
  requires: [common-grilling-record]
6
6
  ---
7
7
 
@@ -16,18 +16,20 @@ An interview with no method is the agent deciding and reporting.
16
16
  ## Reads
17
17
 
18
18
  - `.qfai/assistant/skill/qfai-grilling/SKILL.md` and `.agents/rules/grilling.md`.
19
+ - `.qfai/assistant/rule/references/deliberation-record.md`.
19
20
  - `.qfai/assistant/skill/qfai-discussion/references/discussion-coverage-checklist.md`.
20
21
  - `.qfai/assistant/skill/qfai-discussion/references/design-dna-intake.md`, where
21
- any classified surface is `web`, `mobile`, `desktop` or `mixed`.
22
+ any surface of the target is `web`, `mobile`, `desktop` or `mixed`.
22
23
  - The research summary `discussion-research` reported.
23
24
 
24
25
  ## Writes
25
26
 
26
- - The `## Grilling Session` row, in the stage report.
27
+ - The run's deliberation record, under this stage's subheading, as
28
+ `.qfai/assistant/step/common-grilling-record/STEP.md` says.
29
+ - One `<paths.specsDir>/open-questions.md` row for each question the stage
30
+ left open.
27
31
 
28
- The records the session's ending produces — register rows and labelled
29
- assumptions — are written by `discussion-oq` and `discussion-pack` once the row
30
- is in place.
32
+ No other story-tree file, no policy file, no contract and no root `DESIGN.md`.
31
33
 
32
34
  ## Procedure
33
35
 
@@ -40,118 +42,66 @@ is in place.
40
42
  method is `.agents/rules/grilling.md` and this step does not restate it.
41
43
  2. Cover every topic in
42
44
  `.qfai/assistant/skill/qfai-discussion/references/discussion-coverage-checklist.md`.
43
- 3. Where any classified surface is `web`, `mobile`, `desktop` or `mixed`, cover
44
- the design-direction decisions in
45
+ 3. Where any surface of the target is `web`, `mobile`, `desktop` or `mixed`,
46
+ cover the design-direction decisions in
45
47
  `.qfai/assistant/skill/qfai-discussion/references/design-dna-intake.md` in
46
- the same session. Not every UI-bearing target: a cli-only pack is UI-bearing
47
- and the brand questions do not apply to it, because nothing downstream reads
48
- a `visual.*` token tree for one. The design direction belongs in this session
49
- because `discussion-pack` records it after the pack is authored, and a
50
- user-owned visual choice asked there is asked after the thing it governs is
51
- written. Skip the design-DNA questions when the classification declares
52
- `design_direction: inherit`, under the conditions of
53
- `.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md#inheriting-the-current-designmd`.
48
+ the same session. A `cli` target skips the brand questions, and so does a
49
+ project whose root `DESIGN.md` already sets the direction the request keeps.
54
50
  4. The research findings are inputs to the session's tree, not a later fill-in:
55
51
  a decision settled before the research that bears on it is settled against
56
52
  evidence nobody had, and the method reads a fact rather than asking about it.
57
- 5. Write the `## Grilling Session` row as the session ends, before any pack
58
- file (see [The record](#the-record)).
53
+ 5. Write each question as an Interview row of the record when its answer
54
+ arrives, not at the end of the session.
55
+ 6. Write one `open-questions.md` row for each question the session left open,
56
+ in the form the register's header comment states. A term the session settled
57
+ is such a row too, naming the term and its definition, as
58
+ `.agents/rules/grilling.md#terms-against-the-glossary` says.
59
+ 7. Invoked by name, this step is the run's last step: commit locally only the
60
+ run's deliberation record and the `open-questions.md` rows the run wrote,
61
+ and push nothing. In a route, the route's last step commits them.
59
62
 
60
63
  Inside a workflow run, what the work order's `settled` field records is not
61
64
  asked again
62
65
  (`.qfai/assistant/rule/shared-skill-operating-baseline.md#a-plans-steps`),
63
66
  and the interview covers only the product scope it leaves unresolved.
64
67
 
65
- ## Writes that are not authoring
66
-
67
- **Authoring the pack** — the nine mandatory files and the UI sidecars, as the
68
- artifacts a reader takes the design from — does not start until the session has
69
- ended. Three writes are not that authoring, and happen when the process reaches
70
- them:
71
-
72
- | Write | When | Why it is not authoring |
73
- | --------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
74
- | The research summary in this run's stage report | Before the session | The session reads it. Held back, the decisions are settled against evidence nobody had. It is not in the pack: no pack directory exists yet, and one opened here is what a cancelled run would leave behind |
75
- | A register entry or a labelled assumption the session's own ending produces | As the session ends | It records what the session did. Withheld, a no-question run cannot write the open questions that block its completion |
76
- | A throwaway artifact built to make a question answerable | Mid-session | The method calls for it where talking cannot settle the question. It is not the pack, and it is not kept |
77
-
78
- Where each outcome is recorded is
79
- `.qfai/assistant/skill/qfai-discussion/references/oq-and-deferred-rules.md#where-a-grilling-sessions-outcome-goes`.
80
-
81
68
  ## How the session ends
82
69
 
83
70
  The default user session reaches four of the five endings. An explicitly
84
71
  delegated discussion may also end `adopted` under the master's conditions:
85
72
 
86
- | Ended | What the user did | Authoring |
87
- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
88
- | `confirmed` | Confirmed on the session's own condition: no node open — the frontier empty **and** no fact lookup still running — and a clean confirmation-sheet reply (`grilling.md` § The confirmation sheet) | Starts |
89
- | `user-closed` | Said `proceed`, `done`, or words to that effect | Starts. Lookups already running are finished and each decision still open becomes a labelled assumption, except one a document requires the user to make and record |
90
- | `adopted` | Explicitly delegated judgment for this scope | Starts only after the recorded delegation conditions are met; no open node, lookup or unsupported human decision remains |
91
- | `no-question` | Nothing — `--auto` reached nobody | Starts. Every node still open is registered — a decision, and a fact only the user holds, which nothing else can supply, and the open count is then what blocks completion |
92
- | `stopped` | Said `stop` | **Does not start.** Report every open decision as open and end the run |
73
+ | Ended | What the user did | What the stage writes |
74
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
75
+ | `confirmed` | Confirmed on the session's own condition: no node open — the frontier empty **and** no fact lookup still running — and a clean confirmation-sheet reply (`grilling.md` § The confirmation sheet) | The rows of every question asked |
76
+ | `user-closed` | Said `proceed`, `done`, or words to that effect | Each decision still open becomes an Agent decisions row labelled an assumption, except one a document requires the user to make |
77
+ | `adopted` | Explicitly delegated judgment for this scope | Each decision of the delegated rounds as an Agent decisions row, once the recorded delegation conditions are met |
78
+ | `no-question` | Nothing — `--auto` reached nobody | Each node still open as an `open-questions.md` row, with the most conventional candidate as an Agent decisions row labelled assumed |
79
+ | `stopped` | Said `stop` | **Nothing more.** The rows already written stay uncommitted, every open decision is reported as open, and the run ends |
93
80
 
94
- **No ending authorizes authoring while a `hard-required` input this invocation
95
- consumes is missing.** Those are excluded from both assumption paths: an
96
- interactive closure still asks for them, and a no-question run stops and names
97
- them. Registering an open question does not make an input defaultable — the
98
- value is what the run needs, and a question about it is not one.
81
+ **No ending lets the stage go on while a `hard-required` input this invocation
82
+ consumes is missing.** An interactive closure still asks for it, and a
83
+ no-question run stops and names it. Registering an open question does not make
84
+ an input defaultable.
99
85
 
100
86
  **An interactive closure does not assume a decision some document requires the
101
87
  user to make and record.** `proceed` and `done` end the asking while the user is
102
88
  still there, so a decision they own is put again rather than assumed. The
103
- `hard-required` bound above does not reach it: that one is about an input the
104
- run consumes, and this is a decision the run is not permitted to take. The
105
- visual direction is the case here —
89
+ visual direction is the case here:
106
90
  `.qfai/assistant/skill/qfai-discussion/references/design-dna-intake.md` says
107
- only the user may choose a theme by default. Only an actual specifically
108
- applicable user instruction can override that request under the master's
109
- authority conditions; the agents' choice is never labelled `chosen_by: user`.
110
- The rule states the same bound from its side:
111
- closing the questions waives the agent's own uncertainty, never an
112
- authorization the user has not given.
113
-
114
- **`--auto` without qualifying explicit delegation is the other case.** Nobody is
115
- there to put the question to, so the documented path holds: take the most
116
- conventional candidate, record it `chosen_by: assumption`, open it in
117
- `11_OQ-Register.md`, and author — the open count is what blocks completion.
118
- That is the rule's own shape for a no-question mode, the defaulted value written
119
- down **and** labelled beside the open question. What is forbidden is the
120
- assumption on its own, and a bar on authoring here would produce neither: no
121
- pack, and so nowhere to register the question that was supposed to block it.
91
+ only the user may choose a theme by default, and a theme nobody chose stays an
92
+ `open-questions.md` row.
122
93
 
123
94
  `stopped` is the one the vocabulary must keep separate. The rule says a stop
124
- ends the session immediately and no further work follows it, so a closure that
125
- authorizes proceeding and a cancellation cannot share a value — a pack drafted
126
- after `stop` is the run doing exactly what the user told it not to.
127
-
128
- ## The record
129
-
130
- Write the stage report's `## Grilling Session` row in the shape
131
- `.qfai/assistant/step/common-grilling-record/STEP.md#one-session` sets out, and
132
- write `Ended at` before the first pack file. The reviewer reads the session condition
133
- off that row. Without it a skipped session and a completed one present the same
134
- pack — nine files, every topic covered, every open question registered — so
135
- the reviewer would have to block every run or accept a claim it cannot check.
136
-
137
- The agent that holds the session writes the row, `Ended at` included. Where
138
- another agent authors the pack, write the row before delegating, and pass the
139
- row to the pack author, who copies it unchanged into the stage report it
140
- writes and does not reconstruct it.
141
-
142
- A `stopped` session writes no row: the ending is reported, and no later step
143
- runs.
95
+ ends the session immediately and no further work follows it.
144
96
 
145
97
  ## Gate
146
98
 
147
- The reviewer confirms:
148
-
149
- - every row of the stage report's `## Grilling Session` table has its
150
- `Ended at` before its own `Authoring began` (for a reopened row, when
151
- authoring resumed), with `Ended` one of `confirmed`, `user-closed`,
152
- `no-question`, or `adopted` with the recorded explicit-delegation conditions
153
- verified;
154
- - every decision the session settled is recorded where
155
- `.qfai/assistant/skill/qfai-discussion/references/oq-and-deferred-rules.md`
156
- says;
157
- - every required topic in the coverage checklist was put to the session.
99
+ The stage worker confirms:
100
+
101
+ - every question put to the user is an Interview row of the run's record, with
102
+ a free answer quoted word for word in `Option 4 (other)`;
103
+ - every question left open is an `open-questions.md` row;
104
+ - every required topic in the coverage checklist was put to the session, or is
105
+ an `open-questions.md` row;
106
+ - no tracked file changed except the run's deliberation record and its
107
+ `open-questions.md` rows.
@@ -20,22 +20,20 @@ runs before any decision is taken.
20
20
 
21
21
  ## Writes
22
22
 
23
- The research summary, in the stage report. Nothing under `.qfai/discussion/`,
24
- and no policy file.
23
+ The research summary, in the stage report. No story-tree file, no policy file
24
+ and no root `DESIGN.md`. A choice this step takes that is an Agent decisions
25
+ row goes to the run's deliberation record, as
26
+ `.qfai/assistant/rule/references/deliberation-record.md` says.
25
27
 
26
28
  ## Procedure
27
29
 
28
- 1. Run `.qfai/assistant/rule/research-first-protocol.md` before any other
29
- artifact is authored, and report its `research_summary` output. Its `best_practices` and `anti_patterns` are inputs to every
30
- later step, not a late fill-in.
30
+ 1. Run `.qfai/assistant/rule/research-first-protocol.md` before the interview
31
+ starts, and report its `research_summary` output. Its `best_practices` and
32
+ `anti_patterns` are inputs to the interview, not a late fill-in.
33
+ 2. A source a later option rests on is kept as a URL, so the interview can put
34
+ it in the Background of the row that offers the option.
31
35
 
32
36
  ## Gate
33
37
 
34
- **Nothing is written under `.qfai/discussion/` until an ending authorizes
35
- authoring.** The pack under work is resolved by the greatest timestamp with no
36
- completeness check, so a run cancelled during the session would leave a
37
- one-file directory that every later validator and the `/qfai-sdd` preflight
38
- read in place of the last complete pack. A cancellation would make the project
39
- look broken.
40
-
41
- **The pack opens under this run's stamp**, taken when this step starts.
38
+ The research summary is reported before the interview puts its first
39
+ question, and no tracked file other than the run's deliberation record changed.
@@ -96,8 +96,8 @@ make a slow path faster:
96
96
 
97
97
  - under `gate:user`, put the decision to the operator as a question, return
98
98
  `awaiting_input` and change nothing;
99
- - otherwise take the decision and list it in the result's `adopted` as
100
- `{ step, decision, reason }`.
99
+ - otherwise take the decision and write it, with its reason, as an Agent
100
+ decisions row of the run's deliberation record.
101
101
 
102
102
  ## What it writes
103
103
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: implement-scaffold
3
3
  owner: qfai-implement
4
- purpose: "Write, with `npx qfai atdd scaffold` or, in a project with purpose-named test files, by hand, the E2E test of each business flow and the integration test of each acceptance criterion the flow lacks, each with an empty body."
4
+ purpose: "Write, with `npx qfai atdd scaffold` or, in a project with purpose-named test files, by hand, the E2E test of each business flow and the integration test of each acceptance criterion the flow lacks, each with an empty body, and set up the component catalogue `tech.md` names."
5
5
  requires: [common-gate-run]
6
6
  ---
7
7
 
@@ -16,18 +16,26 @@ the system's shape has settled.
16
16
 
17
17
  - The active flow, one `BF-NNNN`, which the invocation's BF argument or the
18
18
  request names. A flow that cannot be resolved stops this step: report the
19
- missing source.
19
+ missing source. One case is not such a stop: a delegated release's
20
+ hand-made edit, which `implement-settled-edit` made. The step passes on it,
21
+ as § Passes when states.
20
22
  - The flow's stories and acceptance criteria under `paths.specsDir`. The
21
23
  default tree is `.qfai/spec/`.
22
24
  - `.qfai/assistant/rule/test-layers.md` for the layer each ID maps to.
23
25
  - `qfai.config.yaml`: `paths.testsDir`,
24
- `validation.traceability.testFileGlobs` and its exclusions.
26
+ `validation.traceability.testFileGlobs` and its exclusions, and
27
+ `uiux.registries`.
28
+ - The `Component catalogue` row of `<paths.contractsDir>/tech.md#stack`, for
29
+ § Component catalogue, and the catalogue's own config file or package
30
+ manifest entry, which tells whether it is installed.
25
31
 
26
32
  ## Writes
27
33
 
28
34
  - The empty acceptance tests `npx qfai atdd scaffold` writes.
29
35
  - In a project that names its test files by purpose, the empty tests and
30
36
  annotation lines this step adds to those files instead.
37
+ - The catalogue setup § Component catalogue writes: the files the catalogue's
38
+ own setup command writes, and its entry in `uiux.registries`.
31
39
 
32
40
  ## Procedure
33
41
 
@@ -44,6 +52,7 @@ the system's shape has settled.
44
52
  reports as created for a criterion the list dropped.
45
53
  4. Record which tests need an authenticated actor. Any such test makes
46
54
  `implement-credentials` run before `implement-acceptance`.
55
+ 5. Set up the component catalogue as § Component catalogue says.
47
56
 
48
57
  The command never overwrites an existing test. A destination the configured
49
58
  globs would not collect is a refusal: fix the globs or the layout, not the
@@ -70,18 +79,53 @@ new purpose-named file instead. Where they are not, run the scaffold as
70
79
  - Change no existing test in the file: add no assertion, and move or remove no
71
80
  annotation already there.
72
81
 
73
- The step then passes as Passes when states. Procedure items 1 and 4 still
74
- apply.
82
+ The step then passes as Passes when states. Procedure items 1, 4 and 5
83
+ still apply.
84
+
85
+ ## Component catalogue
86
+
87
+ A screen built before its catalogue is installed hand-writes every control,
88
+ which is the case `.qfai/assistant/rule/ui-procurement.md` exists to prevent.
89
+ So the catalogue is in place before any example is implemented.
90
+
91
+ Skip this section when the `Component catalogue` row is missing, reads
92
+ `none`, or still holds its template placeholder.
93
+
94
+ Otherwise:
95
+
96
+ 1. When the catalogue the row names is not installed in the project, install
97
+ it with the setup command its own documentation gives, for example the
98
+ init command that writes a shadcn/ui `components.json`.
99
+ 2. When `uiux.registries` has no entry for it, installed before or just now,
100
+ add its registry there: the catalogue's name pointing at the URL template,
101
+ with `{name}`, that its components resolve from. A catalogue config that
102
+ already carries a `registries` map is restated there as it stands.
103
+ 3. Where the catalogue cannot be installed, for example a paid licence the
104
+ project does not hold, install nothing and report the row and the reason,
105
+ so whoever owns tech.md can change the row. This step authors no control
106
+ in its place; later screens follow `ui-procurement.md`.
107
+
108
+ The catalogue needs no setup when it is installed and `uiux.registries` has
109
+ its entry, or when a run already reported it as one that cannot be installed
110
+ and the row has not changed since.
75
111
 
76
112
  ## Passes when
77
113
 
78
114
  Read first: the BF and AC items of the flow that no `Test exception:` row
79
115
  names, and the tests that annotate them. The step passes when every one
80
- already has an annotating test at its layer. The pass names the test for each item.
116
+ already has an annotating test at its layer and § Component catalogue needs no
117
+ setup. The pass names the test for each item.
118
+
119
+ The step also passes when the work order names no flow because it carries
120
+ only a delegated release's hand-made edit: the extraction names the `release`
121
+ artifact and the `release-delegated` qualifier, and `implement-settled-edit`
122
+ made the edit in files the release documents name. That edit has no business
123
+ flow and owes no test. The pass names the edit. Any other work order that
124
+ names no flow still stops this step.
81
125
 
82
126
  ## Gate
83
127
 
84
128
  PASS when every BF and AC of the flow that no `Test exception:` row names
85
- has an annotating test at its layer, and
86
- `npx qfai validate --profile atdd --flow BF-NNNN --fail-on error` reports no
129
+ has an annotating test at its layer, § Component catalogue needs no setup,
130
+ and `npx qfai validate --profile atdd --flow BF-NNNN --fail-on error` reports no
87
131
  error owned by this flow.