qfai 2.2.1 → 2.4.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 (211) hide show
  1. package/README.md +37 -20
  2. package/assets/init/.claude/settings.json +35 -1
  3. package/assets/init/.codex/hooks.json +24 -0
  4. package/assets/init/.github/instructions/code-review.instructions.md +1 -1
  5. package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +4 -4
  6. package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +129 -0
  7. package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +76 -4
  8. package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +9 -5
  9. package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +13 -3
  10. package/assets/init/.qfai/assistant/rule/agent-selection.md +22 -42
  11. package/assets/init/.qfai/assistant/rule/communication.md +1 -1
  12. package/assets/init/.qfai/assistant/rule/constitution.md +77 -242
  13. package/assets/init/.qfai/assistant/rule/drift-protocol.md +31 -165
  14. package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +4 -3
  15. package/assets/init/.qfai/assistant/rule/references/codex-delegation.md +4 -4
  16. package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +2 -2
  17. package/assets/init/.qfai/assistant/rule/references/placeholder-scan.md +2 -3
  18. package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +3 -3
  19. package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +15 -6
  20. package/assets/init/.qfai/assistant/rule/research-first-protocol.md +7 -6
  21. package/assets/init/.qfai/assistant/rule/review-convergence.md +7 -7
  22. package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +82 -66
  23. package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +19 -21
  24. package/assets/init/.qfai/assistant/rule/test-layers.md +1 -1
  25. package/assets/init/.qfai/assistant/rule/thinking.md +2 -2
  26. package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +5 -5
  27. package/assets/init/.qfai/assistant/rule/ui-procurement.md +1 -1
  28. package/assets/init/.qfai/assistant/rule/workflow.md +16 -16
  29. package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +27 -60
  30. package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +3 -17
  31. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/03_Story-Workshop.md +1 -2
  32. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/50_review_input_bundle.md +4 -3
  33. package/assets/init/.qfai/assistant/skill/qfai-grill/SKILL.md +9 -10
  34. package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +45 -58
  35. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/confirmation-sheet.md +71 -0
  36. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +35 -18
  37. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-record.md +3 -3
  38. package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +2 -18
  39. package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +53 -21
  40. package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +35 -2
  41. package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +2 -5
  42. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +2 -15
  43. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +10 -14
  44. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-placement.md +0 -7
  45. package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +6 -15
  46. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +76 -5
  47. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +2 -1
  48. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +60 -5
  49. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +15 -6
  50. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +42 -11
  51. package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +8 -10
  52. package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +12 -7
  53. package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +4 -4
  54. package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +1 -1
  55. package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +10 -25
  56. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +27 -29
  57. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +13 -3
  58. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +36 -3
  59. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +8 -9
  60. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +6 -6
  61. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +7 -7
  62. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +5 -5
  63. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +7 -7
  64. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +3 -3
  65. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +115 -199
  66. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +25 -25
  67. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +23 -113
  68. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +2 -2
  69. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +8 -7
  70. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/03_contract/tech.md +1 -0
  71. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions/page-NNNN.md +2 -2
  72. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +59 -31
  73. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/open-questions.md +15 -11
  74. package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +1 -14
  75. package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +2 -13
  76. package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +1 -1
  77. package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +19 -21
  78. package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +9 -11
  79. package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +2 -3
  80. package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +3 -4
  81. package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +1 -2
  82. package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +8 -7
  83. package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +7 -9
  84. package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +0 -2
  85. package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +43 -2
  86. package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +0 -2
  87. package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +0 -2
  88. package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +1 -5
  89. package/assets/init/.qfai/assistant/step/implement-backport/STEP.md +0 -5
  90. package/assets/init/.qfai/assistant/step/implement-benchmark/STEP.md +0 -4
  91. package/assets/init/.qfai/assistant/step/implement-bisect/STEP.md +0 -5
  92. package/assets/init/.qfai/assistant/step/implement-credentials/STEP.md +0 -4
  93. package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +11 -18
  94. package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +0 -6
  95. package/assets/init/.qfai/assistant/step/implement-minimize/STEP.md +0 -5
  96. package/assets/init/.qfai/assistant/step/implement-oracle-parity/STEP.md +0 -6
  97. package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +1 -3
  98. package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +0 -4
  99. package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +0 -4
  100. package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +2 -6
  101. package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +0 -6
  102. package/assets/init/.qfai/assistant/step/implement-revert/STEP.md +0 -4
  103. package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +5 -7
  104. package/assets/init/.qfai/assistant/step/implement-seam/STEP.md +0 -4
  105. package/assets/init/.qfai/assistant/step/implement-stress-harness/STEP.md +0 -5
  106. package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +0 -5
  107. package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +10 -18
  108. package/assets/init/.qfai/assistant/step/implement-test-fix/STEP.md +0 -5
  109. package/assets/init/.qfai/assistant/step/implement-tooling/STEP.md +0 -3
  110. package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +18 -21
  111. package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +4 -6
  112. package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +0 -2
  113. package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +106 -31
  114. package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +0 -2
  115. package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +18 -19
  116. package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +8 -11
  117. package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +25 -6
  118. package/assets/init/.qfai/assistant/step/sdd-gate/STEP.md +0 -1
  119. package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +6 -8
  120. package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +71 -82
  121. package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +0 -2
  122. package/assets/init/.qfai/assistant/step/triage-close/STEP.md +0 -2
  123. package/assets/init/.qfai/assistant/step/triage-cluster/STEP.md +0 -2
  124. package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +0 -2
  125. package/assets/init/.qfai/assistant/step/triage-dedupe/STEP.md +0 -2
  126. package/assets/init/.qfai/assistant/step/triage-handoff/STEP.md +0 -2
  127. package/assets/init/.qfai/assistant/step/triage-investigate/STEP.md +0 -2
  128. package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +29 -17
  129. package/assets/init/.qfai/assistant/step/triage-owned-cleanup/STEP.md +0 -2
  130. package/assets/init/.qfai/assistant/step/triage-request-info/STEP.md +0 -2
  131. package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +0 -2
  132. package/assets/init/.qfai/assistant/step/verify-advisory/STEP.md +0 -2
  133. package/assets/init/.qfai/assistant/step/verify-change-note/STEP.md +0 -2
  134. package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +2 -6
  135. package/assets/init/.qfai/assistant/step/verify-context/STEP.md +7 -26
  136. package/assets/init/.qfai/assistant/step/verify-external/STEP.md +0 -2
  137. package/assets/init/.qfai/assistant/step/verify-manual/STEP.md +0 -2
  138. package/assets/init/.qfai/assistant/step/verify-qfai-gate/STEP.md +0 -2
  139. package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +0 -2
  140. package/assets/init/.qfai/assistant/step/verify-repeat-run/STEP.md +0 -2
  141. package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +0 -2
  142. package/assets/init/root/.agents/rules/ai-readable-markdown.md +8 -1
  143. package/assets/init/root/.agents/rules/delegation-steering.md +69 -0
  144. package/assets/init/root/.agents/rules/grilling.md +81 -52
  145. package/assets/init/root/.agents/rules/minimal-implementation.md +5 -5
  146. package/assets/init/root/.agents/rules/reply-forms.md +191 -0
  147. package/assets/init/root/.agents/rules/session-feedback.md +104 -27
  148. package/assets/init/root/.agents/rules/user-questions.md +6 -1
  149. package/assets/init/root/.gitattributes +5 -6
  150. package/assets/init/root/AGENTS.md +4 -2
  151. package/assets/mdschema/story/03_contract/tech.mdschema.yml +1 -1
  152. package/assets/mdschema/story/decisions/page-NNNN.mdschema.yml +3 -3
  153. package/assets/mdschema/story/decisions.mdschema.yml +4 -4
  154. package/assets/mdschema/story/open-questions.mdschema.yml +3 -3
  155. package/assets/schemas/workflow/extraction.schema.json +0 -2
  156. package/dist/cli/index.cjs +3826 -3929
  157. package/dist/cli/index.cjs.map +1 -1
  158. package/dist/cli/index.mjs +3793 -3904
  159. package/dist/cli/index.mjs.map +1 -1
  160. package/dist/graph/cli.cjs +14 -2
  161. package/dist/graph/cli.cjs.map +1 -1
  162. package/dist/graph/cli.d.cts +1 -1
  163. package/dist/graph/cli.d.ts +1 -1
  164. package/dist/graph/cli.mjs +14 -2
  165. package/dist/graph/cli.mjs.map +1 -1
  166. package/dist/graph/hook.cjs.map +1 -1
  167. package/dist/graph/hook.mjs.map +1 -1
  168. package/dist/hook/turn-end.cjs +1022 -0
  169. package/dist/hook/turn-end.cjs.map +1 -0
  170. package/dist/hook/turn-end.d.cts +2 -0
  171. package/dist/hook/turn-end.d.ts +2 -0
  172. package/dist/hook/turn-end.mjs +998 -0
  173. package/dist/hook/turn-end.mjs.map +1 -0
  174. package/dist/index.cjs +3635 -4578
  175. package/dist/index.cjs.map +1 -1
  176. package/dist/index.d.cts +20 -21
  177. package/dist/index.d.ts +20 -21
  178. package/dist/index.mjs +3696 -4641
  179. package/dist/index.mjs.map +1 -1
  180. package/dist/process-qqX2Owgq.d.cts +18 -0
  181. package/dist/process-qqX2Owgq.d.ts +18 -0
  182. package/package.json +2 -2
  183. package/assets/defaults/agent-routing/_contract.yml +0 -77
  184. package/assets/defaults/agent-routing/common.yml +0 -14
  185. package/assets/defaults/agent-routing/qfai-discussion.yml +0 -57
  186. package/assets/defaults/agent-routing/qfai-implement.yml +0 -236
  187. package/assets/defaults/agent-routing/qfai-maintain.yml +0 -12
  188. package/assets/defaults/agent-routing/qfai-prototyping.yml +0 -48
  189. package/assets/defaults/agent-routing/qfai-sdd.yml +0 -56
  190. package/assets/defaults/agent-routing/qfai-triage.yml +0 -108
  191. package/assets/defaults/agent-routing/qfai-verify.yml +0 -92
  192. package/assets/defaults/agent-routing/skills.yml +0 -59
  193. package/assets/defaults/review-profiles.yml +0 -25
  194. package/assets/init/.qfai/assistant/agent/acceptance-test-engineer.md +0 -81
  195. package/assets/init/.qfai/assistant/agent/backend-engineer.md +0 -90
  196. package/assets/init/.qfai/assistant/agent/completion-reviewer.md +0 -88
  197. package/assets/init/.qfai/assistant/agent/delivery-planner.md +0 -85
  198. package/assets/init/.qfai/assistant/agent/devops-ci-engineer.md +0 -78
  199. package/assets/init/.qfai/assistant/agent/discovery-analyst.md +0 -81
  200. package/assets/init/.qfai/assistant/agent/doc-steward.md +0 -78
  201. package/assets/init/.qfai/assistant/agent/frontend-engineer.md +0 -94
  202. package/assets/init/.qfai/assistant/agent/orchestrator.md +0 -92
  203. package/assets/init/.qfai/assistant/agent/product-experience-architect.md +0 -101
  204. package/assets/init/.qfai/assistant/agent/qa-gatekeeper.md +0 -153
  205. package/assets/init/.qfai/assistant/agent/qa-strategist.md +0 -82
  206. package/assets/init/.qfai/assistant/agent/requirements-analyst.md +0 -96
  207. package/assets/init/.qfai/assistant/agent/solution-architect.md +0 -89
  208. package/assets/init/.qfai/assistant/agent/test-design-analyst.md +0 -132
  209. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +0 -52
  210. package/dist/process-C21nTvkT.d.cts +0 -12
  211. package/dist/process-C21nTvkT.d.ts +0 -12
@@ -146,18 +146,18 @@ author and whoever reviews the prototype. Follow the shape
146
146
 
147
147
  ## Purposeful copy: `supplements` and `structure`
148
148
 
149
- A screen states the words it shows, so that implementation adds none the contract
150
- did not ask for and review can compare the rendered screen with what was agreed.
151
- The words are the screen `title` (its one heading), the labels of `elements` and
152
- `actions`, the group headings, and the supplements below. Two keys carry them,
153
- beside `primary_tasks`, `elements` and `actions`, which stay as they are.
149
+ Two optional keys, beside `primary_tasks`, `elements` and `actions`, describe the
150
+ words a screen shows beyond its `title` and the labels of its `elements` and
151
+ `actions`. They are description for the author and the reviewer. `npx qfai
152
+ validate` does not check them: what it checks is the UI source, where every plain
153
+ text carries a `qfai-text` reason comment.
154
154
 
155
- ### `supplements` (required)
155
+ ### `supplements` (optional)
156
156
 
157
- Every text the screen shows beyond its `title`, group headings and labels: a
158
- sentence under a field, a notice, an empty-state message, a disclosure, the result
159
- of a save or a send, the instruction after a failure, the consequence of an action
160
- that cannot be undone. Each is an entry with exactly these keys, all non-empty:
157
+ Text the screen shows beyond its `title`, group headings and labels: a sentence
158
+ under a field, a notice, an empty-state message, a disclosure, the result of a
159
+ save or a send, the instruction after a failure, the consequence of an action
160
+ that cannot be undone. Each entry uses these keys:
161
161
 
162
162
  | Key | Holds |
163
163
  | ------ | ----------------------------------------------------------------------------------------- |
@@ -167,29 +167,19 @@ that cannot be undone. Each is an entry with exactly these keys, all non-empty:
167
167
  | `text` | the words as displayed |
168
168
  | `why` | what the user could not know or do without it, and why a label or structure is not enough |
169
169
 
170
- A text shown in several states is listed once per state it shows in, each entry
171
- with its own `id`.
172
-
173
- `supplements: []` says the screen shows none. Most screens need few, and a screen
174
- need not have any. Two kinds of text are not supplements: the message of a field
175
- rule is owned by the `validations` of its element, and data the product shows or
176
- the user types is not copy the contract authors. A field message that says more
177
- than its rule does is a supplement with `when: error`.
178
-
179
- The list is the whole inventory in both directions. Text the screen shows that is
180
- not listed is excess. A listed text the screen does not show is an unmet need, so
181
- a necessary condition, cost, destination, result, recovery step or consequence
182
- that is written here cannot be dropped by a later tidy-up; removing it is a
183
- change to the contract, which goes back to `/qfai-sdd`.
170
+ Most screens need few, and a screen need not have any. The message of a field
171
+ rule belongs to the `validations` of its element, and data the product shows or
172
+ the user types is not copy the contract authors.
184
173
 
185
174
  Write `why` for the point of decision. "Explains the Save button" is a reason to
186
175
  delete the text. "After the click the user cannot see where the draft went" is a
187
- reason to keep it.
176
+ reason to keep it. The same reason, in the same strength, goes into the
177
+ `qfai-text` comment in the source.
188
178
 
189
179
  ### `structure` (optional)
190
180
 
191
- The groups the screen is read in, in reading order. Each is an entry with exactly
192
- `id`, `tasks`, `members` and, when the group shows a heading, `heading`:
181
+ The groups the screen is read in, in reading order. Each entry uses `id`,
182
+ `tasks`, `members` and, when the group shows a heading, `heading`:
193
183
 
194
184
  | Key | Holds |
195
185
  | --------- | ------------------------------------------------------------------ |
@@ -198,50 +188,15 @@ The groups the screen is read in, in reading order. Each is an entry with exactl
198
188
  | `members` | the `elements[].id` and `actions[].id` values it holds, in order |
199
189
  | `heading` | the displayed heading; leave the key out when the group shows none |
200
190
 
201
- An id belongs to one group, and an element or action may be left out of every
202
- group. `structure` is optional only for a screen that shows no heading beyond its
203
- `title`. A screen that shows any other heading, at any level, has one group with a
204
- `heading` for each, so a screen with several `h2` headings writes `structure`.
205
- Leaving the key out says the screen shows no such heading; it never says the
206
- screen may show one without a group. A group needs a task and a member, so the
207
- heading must head something the user reads or acts on: declare the table or list
208
- that shows data as an element, and the group holds it. A heading over prose or
209
- supplements alone has neither a task nor a member, and does not belong on the
210
- screen. `npx qfai validate` does not check this, so the
211
- reviewer compares the rendered headings with the groups. A group heading is
212
- not the screen title: a second heading above or beside the real one repeats it.
213
- A group that serves no task does not belong on the screen; name the task it
214
- enables, or leave the heading and the group out.
215
-
216
- ### Which key holds which text
217
-
218
- Every text the screen shows has one home. The table applies the definitions above
219
- to the text authors and reviewers most often disagree about:
220
-
221
- | Rendered text | Home |
222
- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
223
- | The one page heading (`h1`) | `title` |
224
- | A heading over a group of elements or actions (`h2`, `h3`) | `structure[].heading` of that group |
225
- | A small line above or beside a heading (eyebrow, kicker) | a supplement with `near` set to the group; it is not a heading and not a label |
226
- | The text of a field, button or other control | `label` of that element or action |
227
- | Link text | `label` of a `navigate` action |
228
- | A table column header | recommended: `label` of an element declared for that column, as elements are the display fields |
229
- | A figure caption | a supplement with `near` set to the element it describes |
230
- | An item of a list the product writes (a fixed checklist) | a supplement |
231
- | An item of a list made of data the product shows | outside the contract: data is not copy the contract authors |
232
- | Product or site-identity text (a name, a tagline) | `label` when it is a link or control, otherwise a supplement |
233
- | The message of a field rule | `validations` of that element |
234
-
235
- Nothing is outside the contract merely because it repeats across screens. Text that
236
- repeats on every screen is listed on each, and when no `why` that names a decision
237
- can be written for it, the text is a candidate for removal from the screen rather
238
- than a reason to leave it unlisted.
191
+ A group heading must head something the user reads or acts on, and a group that
192
+ serves no task does not belong on the screen. A group heading is not the screen
193
+ title: a second heading above or beside the real one repeats it.
239
194
 
240
195
  ### A worked example
241
196
 
242
197
  The sample at `templates/contracts/ui-contract.sample.yaml` shows a complete
243
198
  screen. Its draft action reads "Save draft", and no paragraph says what Save draft
244
- does. What the label cannot say is declared instead: `Saved to Drafts` after the
199
+ does. What the label cannot say is described instead: `Saved to Drafts` after the
245
200
  click, and `Not saved. Your entries are still here. Try again.` after a failure.
246
201
  The user learns where the draft went and what a failure means, and nothing is
247
202
  written twice.
@@ -258,44 +213,8 @@ Subtraction removes text that adds no meaning. It never removes:
258
213
 
259
214
  Moving such text into a tooltip or a placeholder does not keep it. A word or
260
215
  character count never approves or rejects a screen; a count is an observation
261
- a finding may cite.
262
-
263
- ### What validate checks
264
-
265
- `QFAI-CONTRACT-043` reports `supplements` absent, a key that is not a list, an
266
- entry that is not a mapping, a missing, empty or extra key, a `when` outside the
267
- five states, and a repeated `id`; the same for `structure` when it is written.
268
- `QFAI-CONTRACT-044` reports a `members`, `tasks` or `near` that names an id
269
- the screen does not declare, and an element or action in two groups.
270
- `QFAI-CONTRACT-045` warns when a group heading is the screen title, or a
271
- supplement's text is the title, a group heading, the label of what it sits near, or
272
- another supplement's text near the same target in the same state; case, spacing and
273
- closing punctuation do not make a text different. Whether a sentence is needed is
274
- judged against the task by the reviewer; validate compares ids and exact wording
275
- only.
276
-
277
- `npx qfai validate --rendered <file>` compares what the screens rendered with
278
- these lists. Your own browser run writes the file, and QFAI renders nothing:
279
- `{ "screens": [{ "contract": "UI-0001", "screen": "order_create", "when": "default", "texts": ["..."] }] }`,
280
- one entry per screen and state, holding the texts the screen showed. Leave out
281
- data the product shows, text the user typed and the message of a field rule.
282
- `QFAI-CONTRACT-047` names a rendered text that is no title, group heading, label
283
- or supplement of that state, and `QFAI-CONTRACT-048` a supplement of that state
284
- the screen did not render; `QFAI-CONTRACT-046` names a file or an entry out of
285
- shape. A supplement counts only for its own `when`, so a text shown in several
286
- states needs its entry for each. Only the screens and states the file holds are
287
- compared, so a render of
288
- the default state alone checks the default state.
289
-
290
- A contract written before these keys was valid without them. Add
291
- `supplements` to each screen, listing each text it shows beyond its title, group
292
- headings and labels; `supplements: []` is only for a screen that shows no such
293
- text. Keep `structure` out while the screen
294
- shows no heading beyond its title; the first such heading needs its group.
295
-
296
- Two contracts that state the same screen `id` each hold their own `supplements`
297
- and `structure`; the project-wide screen list compares `title`, `route` and
298
- `primary_tasks` only.
216
+ a finding may cite. Whether a described text is needed is the reviewer's
217
+ judgement, not a validate finding.
299
218
 
300
219
  ## Screen contract rules
301
220
 
@@ -339,14 +258,6 @@ Render the element with that marker, or remove the marker from the contract.
339
258
  **A label does not match.** Update the contract label, then the rendered text or
340
259
  marker mapping. Updating one side leaves the two out of step.
341
260
 
342
- **`QFAI-CONTRACT-043` names a screen with no `supplements`.** List each text the
343
- screen shows beyond its title, group headings and labels, one entry with `id`,
344
- `near`, `when`, `text` and `why`; write `supplements: []` only if it shows no
345
- such text.
346
-
347
- **`QFAI-CONTRACT-045` warns that a supplement repeats a label.** Delete the supplement,
348
- or word it so it tells the user something the label does not.
349
-
350
261
  **The discussion pack already has screen contracts, so this looks redundant.**
351
262
  It is not. A discussion pack is discovery output and is non-normative; the
352
263
  downstream skills and every validate lane read `<paths.contractsDir>/ui/*.yaml`.
@@ -369,6 +280,5 @@ For a UI-bearing visual flow, the root `DESIGN.md` is authored and validated by
369
280
  - [ ] Every UI-bearing contract has one full declared ID, at least one screen, and a matching `contracts.md` row.
370
281
  - [ ] Screen IDs, routes, primary tasks, labels, markers, and actions are stable and testable.
371
282
  - [ ] Every declared action has an observable effect, including relevant failure states.
372
- - [ ] Every screen declares `supplements` (`[]` when none), each with the reason the text is needed, and its `structure` names every heading beyond the title.
373
283
  - [ ] No supplement restates a label, heading or action the screen already shows, and none is development commentary.
374
284
  - [ ] Prototyping coverage uses full contract IDs and the current cycle-0 fields.
@@ -28,8 +28,8 @@ QFAI CLI applies.
28
28
  ## Normalization Rules
29
29
 
30
30
  - Preserve source IDs where available.
31
- - Normalize the sidecar's notes on displayed text into the screen's `supplements`
32
- and `structure`, as the UI contract guide shapes them. Notes for the author or
31
+ - Normalize the sidecar's notes on displayed text into the screen's optional
32
+ `supplements` and `structure`, as the UI contract guide shapes them. Notes for the author or
33
33
  the reviewer are not displayed text and are not copied into either key.
34
34
  - Convert prose into machine-readable arrays or objects.
35
35
  - Reject placeholder text instead of copying it into contracts.
@@ -72,8 +72,8 @@ screens:
72
72
  # structure (optional): the groups the screen is read in, in reading order.
73
73
  # `tasks` are primary_tasks ids, `members` are elements/actions ids, and
74
74
  # `heading` is the displayed heading of the group; leave it out for a group
75
- # that shows none. Without `structure` the screen shows no heading beyond
76
- # its title. An id belongs to one group.
75
+ # that shows none. An id belongs to one group. This key describes the
76
+ # screen; validate does not check it.
77
77
  structure:
78
78
  - id: g_customer
79
79
  heading: Customer
@@ -86,17 +86,18 @@ screens:
86
86
  - id: g_commit
87
87
  tasks: [t1, t3, t4]
88
88
  members: [submit_order, save_draft, discard_draft]
89
- # supplements (required): every text the screen shows beyond its title,
90
- # group headings and labels. Field validation messages are the exception;
91
- # they belong to the element's `validations`. `[]` says the screen shows
92
- # none. `near` is an elements/actions/structure id, `when` is one of
89
+ # supplements (optional): text the screen shows beyond its title, group
90
+ # headings and labels. Field validation messages belong to the element's
91
+ # `validations`. This key describes the copy; validate does not check it.
92
+ # Validate checks the UI source instead: every plain text there carries a
93
+ # `qfai-text` reason comment. `near` is an elements/actions/structure id, `when` is one of
93
94
  # default, empty, loading, error, success, and `why` says what the user
94
95
  # could not know or do without the text, and why a label or the structure
95
96
  # cannot carry it.
96
97
  #
97
98
  # There is no supplement that restates what "Save draft" does: the label
98
99
  # says it. What the label cannot say is where the draft went and what a
99
- # failed save means, so those two are declared.
100
+ # failed save means, so those two are described.
100
101
  supplements:
101
102
  - id: sp_draft_saved
102
103
  near: save_draft
@@ -43,3 +43,4 @@ flowchart TD
43
43
  - Skeleton: `<smallest command that proves the application entrypoint starts>`
44
44
  - Validate: `<qfai validate command>`
45
45
  - Pack / distribution: `<package or artifact check command, or remove this line>`
46
+ - Turn-end check: `<labels of the commands above, comma-separated, fast enough to run whenever an agent ends its turn, or remove this line>`
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Decisions
4
4
 
5
- | ID | Content | Approach | Status |
6
- | --- | ------- | -------- | ------ |
5
+ | ID | Content | Approach |
6
+ | --- | ------- | -------- |
@@ -1,44 +1,72 @@
1
1
  <!--
2
- Each row records one decision. Its Approach cell holds these four items, in
3
- this order, each written as `- ` followed by its label:
2
+ Each row records one decision the user made. It is appended once the decision
3
+ is made, and afterwards keeps its ID and is never removed or renumbered;
4
+ only its wording may be restated. The register holds
5
+ decisions only; a question not yet decided goes to open-questions.md.
4
6
 
5
- - `Evidence:` one or more entries, separated by `; `. A `file:` entry is a
6
- repository-relative path, optionally followed by `#L<start>-L<end>`. A
7
- `command:` entry is the command, then `→` and a short summary of its result.
8
- - `Grounds:` which evidence supports the decision, and how.
9
- - `Residual risk:` the risk that remains, or `none — <reason>`.
10
- - `Rollback:` the steps that undo the decision, or `none — <reason>`.
7
+ A decision, an approval of a critical decision or a release included, becomes
8
+ a row only when it is hard to reverse, would surprise a reader without
9
+ context, and was the result of a real trade-off. The stage report states
10
+ every other decision.
11
11
 
12
- No item is empty, and only the last two may take `none — <reason>`. What a
13
- kind of row must state in its Approach, such as a change request's proposed
14
- correction, goes inside these items. Write a `|` inside a cell as `\|`.
12
+ A new row's ID is DEC-yyyymmddhhMMss: the UTC time the row is written, as 14
13
+ digits. When a row of this register already holds that second, take the next
14
+ second no row holds. A legacy DEC-NNNN row keeps its ID.
15
15
 
16
- Use this form for every new row. A passing validation result does not prove
17
- that every decision row follows it.
16
+ The opening of Content gives a row its kind:
18
17
 
19
- A release approval, with `<...>` standing for the project's values, has this
20
- Content cell:
18
+ - `Declined: <option>` is an option the user rejected. Its Approach records
19
+ who declined it and when.
20
+ - `Test exception: <BF, AC or EX>` exempts that item while the row exists.
21
+ - `Retired: <ID>, <ID>…` names the story-tree IDs a change retired, so none
22
+ is issued again. It approves nothing and is written whatever the recording
23
+ test above says.
24
+ - Any other Content is a decision the user made.
25
+
26
+ A declined row is a rejected option and authorizes nothing. A later decision
27
+ that refers to an earlier row opens its Approach with the earlier ID:
28
+
29
+ - `Supersedes DEC-…` replaces the earlier decision.
30
+ - `Narrows DEC-…` replaces part of it.
31
+ - `Reopens DEC-…` reopens a declined option.
32
+
33
+ The earlier row stays as written. The order of rows means nothing: a merge may
34
+ interleave the rows two branches appended.
35
+
36
+ Write each row as a short decision record. Content states what was
37
+ decided; Approach says why, in one to three short sentences: the context
38
+ that forced the choice and the reason it won, and, for an approval, who
39
+ approved it, when and the label of the option chosen. Point to where the
40
+ detail lives, such as a contract rule, a story or a pull request, instead of
41
+ restating it. Add an optional item only when it tells a later reader
42
+ something those sentences do not, each written as `- ` followed by its label,
43
+ after any opening citation above:
44
+
45
+ - `Considered:` the options that lost, and why.
46
+ - `Consequences:` what the decision makes easier or harder.
47
+ - `Rollback:` the steps that undo it, when they are not obvious.
48
+
49
+ Content and Approach together stay within 600 characters; validation warns
50
+ on a longer row. Write a `|` inside a cell as `\|`.
51
+
52
+ A release approval that passes the recording test, with `<...>` standing for
53
+ the project's values, has this Content cell:
21
54
 
22
55
  Release <X.Y.Z> approved by <name> on <date>, option "<label>"
23
56
 
24
57
  and this Approach cell, written on one line and without backticks around it:
25
58
 
26
- - Evidence: file:CHANGELOG.md; command:<the release checks> → <result> - Grounds: <why the checks support the release> - Residual risk: none — <reason> - Rollback: <the steps that retract the release>
27
-
28
- A row that records a spec change following from an earlier approval may name
29
- that earlier decision by its ID in `Grounds:`, in place of a new answer from
30
- the user. Its `Evidence:` still lists what supports the change.
59
+ <the release checks and their result, in one sentence>. - Rollback: <the steps that retract the release>
31
60
 
32
61
  A stage that does not own this file records its decisions in its own final
33
- report, with the same four items under the same rules.
34
- A legacy root has only the Decisions section. When reviewed historical pages
35
- are adopted, insert an optional '## Decision pages' section before '## Decisions',
36
- with only unique direct '- decisions/page-NNNN.md' entries in read order.
37
- Each page uses the same closed four-column table and has no page index.
38
- Read listed pages before this root table; append new rows only to this root.
39
- Every physical root and page, including comments and blank lines, stays within
40
- 500 lines. Rotation is never automatic; use the separately approved relocation
41
- procedure in the SDD triage reference.
62
+ report, in the same short form.
63
+
64
+ A root may list decision pages in an optional '## Decision pages' section
65
+ before '## Decisions', with only unique direct '- decisions/page-NNNN.md'
66
+ entries in read order. Each page uses the same closed three-column table and
67
+ has no page index. Read listed pages before this root table. Append new rows
68
+ only to this root, which has no line limit; never append to a page. No row
69
+ moves between files.
42
70
 
43
71
  -->
44
72
 
@@ -46,5 +74,5 @@ procedure in the SDD triage reference.
46
74
 
47
75
  ## Decisions
48
76
 
49
- | ID | Content | Approach | Status |
50
- | --- | ------- | -------- | ------ |
77
+ | ID | Content | Approach |
78
+ | --- | ------- | -------- |
@@ -1,19 +1,23 @@
1
1
  <!--
2
- Each row records one open question. After a row is added, only its Status
3
- changes. Status is TODO, WIP, DONE, DEFERRED, `DONE (by DEC-NNNN)` or
4
- `SUPERSEDED (by DEC-NNNN)`.
2
+ Each row records one open question, and exists exactly while the question is
3
+ open. A row is never edited.
5
4
 
6
- When a decision row answers the question, set `DONE (by DEC-NNNN)`, naming that
7
- row. When a decision makes what the row states wrong before the question is
8
- answered, set `SUPERSEDED (by DEC-NNNN)` and append a new row for the question
9
- that remains. A reader of the row then finds the decision that overrides its
10
- text. Validation reports a named decision that no decisions row declares,
11
- and warns on a plain DONE, because it names no decision.
5
+ A new row's ID is OQ-yyyymmddhhMMss: the UTC time the row is written, as 14
6
+ digits. When a row of this register already holds that second, take the next
7
+ second no row holds. A legacy OQ-NNNN row keeps its ID.
8
+
9
+ When a decision settles a question, the same change appends the decision row
10
+ to decisions.md, naming this row's ID, and deletes this row. To defer a
11
+ question already written, delete its row and append a new one whose Approach
12
+ names the next decision point and says `Replaces OQ-…` with the deleted ID.
13
+ Validation reports a deleted question that no decision row and no question
14
+ row names. A row whose Content opens `Unadjudicated:` is an unanswered
15
+ critical product decision, pending while the row exists.
12
16
  -->
13
17
 
14
18
  # Open Questions
15
19
 
16
20
  ## Open Questions
17
21
 
18
- | ID | Content | Approach | Status |
19
- | --- | ------- | -------- | ------ |
22
+ | ID | Content | Approach |
23
+ | --- | ------- | -------- |
@@ -4,17 +4,6 @@ title: QFAI Triage (Requests that end without a tracked change)
4
4
  description: "Use when invoked by name or handed a QFAI work order for a request that ends without a tracked change: a question, a duplicate, missing information, a split, automated reports, a security report, an operation only a person can run, an operation the user named on finished work, or authorized cleanup of current-task temporary directories."
5
5
  argument-hint: "<the request, as it was reported>"
6
6
  allowed-tools: [Read, Glob, Grep, Write, Bash, TodoWrite, Task, Agent]
7
- roles:
8
- [
9
- orchestrator,
10
- discovery-analyst,
11
- requirements-analyst,
12
- delivery-planner,
13
- solution-architect,
14
- frontend-engineer,
15
- backend-engineer,
16
- devops-ci-engineer,
17
- ]
18
7
  steps:
19
8
  - triage-dedupe
20
9
  - triage-request-info
@@ -33,10 +22,8 @@ mode: execution-focused
33
22
 
34
23
  ## /qfai-triage - Requests that end without a tracked change
35
24
 
36
- [DRIFT-PROTOCOL:REQUIRED]
37
-
38
25
  Run the entry check of
39
- `.qfai/assistant/rule/shared-skill-operating-baseline.md#workflow-run-entry-check-mandatory`
26
+ `.qfai/assistant/rule/shared-skill-operating-baseline.md#workflow-run-entry-check`
40
27
  first.
41
28
 
42
29
  This skill answers, closes, splits or hands over a request, or carries out an
@@ -4,15 +4,6 @@ title: QFAI Verify (Quality Gates + Evidence)
4
4
  description: "Use when invoked by name or handed a QFAI work order to verify a change before it is handed off."
5
5
  argument-hint: "[--auto]"
6
6
  allowed-tools: [Read, Glob, Bash, Write, Edit, TodoWrite, Task, Agent]
7
- roles:
8
- [
9
- orchestrator,
10
- delivery-planner,
11
- qa-strategist,
12
- devops-ci-engineer,
13
- doc-steward,
14
- implementation-reviewer,
15
- ]
16
7
  steps:
17
8
  [
18
9
  verify-repeat-run,
@@ -32,10 +23,8 @@ mode: evidence-focused
32
23
 
33
24
  ## /qfai-verify — Quality Gates and Evidence
34
25
 
35
- [DRIFT-PROTOCOL:REQUIRED]
36
-
37
26
  Run the entry check of
38
- `.qfai/assistant/rule/shared-skill-operating-baseline.md#workflow-run-entry-check-mandatory`
27
+ `.qfai/assistant/rule/shared-skill-operating-baseline.md#workflow-run-entry-check`
39
28
  first.
40
29
 
41
30
  ## Inputs
@@ -100,7 +89,7 @@ When declaring DONE, include:
100
89
  - any gap left open, stated rather than hidden.
101
90
 
102
91
  Open questions that place a **new obligation on the product** are routed to
103
- the owner phase (`/qfai-sdd`) as an advisory / Change Request proposal per
92
+ the owner phase (`/qfai-sdd`) as an advisory / proposed specification change per
104
93
  `.qfai/assistant/rule/drift-protocol.md#reviewer-originated-obligations`.
105
94
  Questions about this skill's own inputs or settings stay in its own output for
106
95
  the user to answer. This skill does not write `open-questions.md`.
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## Verdict file
12
12
 
13
- `/qfai-verify` MUST write `.qfai/report/verify.json` at the end of the run. This file is the machine-readable verdict; the stage report is the human-readable account. No `qfai` command reads it, so an absent `verify.json` does not fail `npx qfai validate`.
13
+ `/qfai-verify` writes `.qfai/report/verify.json` at the end of the run. This file is the machine-readable verdict; the stage report is the human-readable account. No `qfai` command reads it, so an absent `verify.json` does not fail `npx qfai validate`.
14
14
 
15
15
  Canonical path: `.qfai/report/verify.json`. Create the `.qfai/report/` directory if absent — it is the same directory `validate.json` is written to.
16
16
 
@@ -4,7 +4,6 @@ title: "Web Research Pipeline"
4
4
  description: "8-stage web research pipeline with MCP integration, caching, and citation generation. Use when asked to research a topic on the web and report the findings with cited sources."
5
5
  argument-hint: "[query] [--max-depth N] [--yolo]"
6
6
  allowed-tools: [Read, Glob, Bash, Write, Task, Agent, WebSearch, WebFetch]
7
- roles: [Researcher, Analyst, FactChecker]
8
7
  mode: research-pipeline
9
8
  ---
10
9
 
@@ -16,8 +15,6 @@ QFAI Skill Body (SSOT)
16
15
 
17
16
  ## /web-research — Web Research Pipeline
18
17
 
19
- [DRIFT-PROTOCOL:REQUIRED]
20
-
21
18
  ## User Questions (AskUserQuestion Protocol)
22
19
 
23
20
  Follow `.qfai/assistant/rule/shared-skill-operating-baseline.md#user-questions-askuserquestion-protocol`.
@@ -27,15 +24,18 @@ Skill-specific examples:
27
24
  - HITL gate confirmation
28
25
  - research scope and depth decisions
29
26
 
30
- ## Sub-agent Delegation (MANDATORY)
27
+ ## Sub-agent Delegation
31
28
 
32
29
  Follow `.qfai/assistant/rule/shared-skill-delegation-baseline.md`.
33
30
  The sections below add only pipeline-specific detail; where they and the
34
31
  baseline overlap, the baseline governs.
35
32
 
36
- ### Orchestrator Protocol
33
+ ### Session Agent Protocol
37
34
 
38
- - The orchestrator may write the research artifact itself, or give independent searches to sub-agents that run in parallel.
35
+ - The session agent frames the research and writes the research artifact itself.
36
+ - Two or more self-contained searches or fetches may run in parallel on
37
+ `fullstack-engineer` with no owned paths, under the parallel-unit gate; the
38
+ session agent reads their answers.
39
39
  - It never approves its own work.
40
40
 
41
41
  ## Work Orders Summary
@@ -46,17 +46,16 @@ Use the shared schema from `.qfai/assistant/rule/shared-skill-delegation-baselin
46
46
  collision cannot be detected from the evidence afterwards. Typical pipeline
47
47
  steps:
48
48
 
49
- | Step | Role (sub-agent) | Agent instance | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE/PENDING) |
50
- | ---- | ---------------- | --------------- | -------------------------- | --------------------- | ----------------- | ---------------------------- |
51
- | 1 | Researcher | `<instance id>` | Discover candidate sources | User request + config | Candidate list | PASS/REVISE |
52
- | 2 | Analyst | `<instance id>` | Prepare research notes | Candidate URLs | Research notes | PASS/REVISE |
53
- | 3 | Reviewer | `<instance id>` | Review evidence and claims | Notes + sources | Approval decision | PASS/REVISE |
49
+ | Step | Agent (sub-agent) | Agent instance | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE/PENDING) |
50
+ | ---- | ----------------------- | --------------- | -------------------------- | --------------- | ----------------- | ---------------------------- |
51
+ | 1 | `fullstack-engineer` | `<instance id>` | Answer one lookup question | The question | Cited answer | PASS/REVISE |
52
+ | 2 | `requirements-reviewer` | `<instance id>` | Review evidence and claims | Notes + sources | Approval decision | PASS/REVISE |
54
53
 
55
54
  ### Reviewer Gate
56
55
 
57
56
  - The final completion gate must be performed by an independent reviewer, as defined
58
57
  normatively in `.qfai/assistant/rule/shared-skill-delegation-baseline.md#definition-independent-reviewer-normative`.
59
- Being routed as `Reviewer` does not by itself make an agent independent: an agent
58
+ Being briefed as the reviewer does not by itself make an agent independent: an agent
60
59
  that drafted or edited any artifact under review is disqualified for the whole run,
61
60
  and must hand the same evidence set to a non-participating reviewer instead of
62
61
  returning `PASS`.
@@ -215,16 +214,15 @@ Default TTL: **24 hours** (24h).
215
214
 
216
215
  Cache is stored under `.qfai/cache/web-research/` using content-addressable storage.
217
216
 
218
- ## 8. Sub-Agent Architecture
219
-
220
- The pipeline may delegate stages to specialised sub-agents:
221
-
222
- - **SearchAgent**: Manages search provider interaction (Stage 1).
223
- - **FetchAgent**: Handles concurrent URL fetching with isolation (Stage 3).
224
- - **VerifyAgent**: Cross-references claims across sources (Stage 7).
217
+ ## 8. Parallel Lookups
225
218
 
226
- Sub-agents communicate via structured message passing and share
227
- the session log as the coordination artifact.
219
+ The session agent runs every stage itself. Within the search (Stage 1), fetch
220
+ (Stage 3) and verify (Stage 7) stages, two or more self-contained questions may
221
+ run in parallel, each on a `fullstack-engineer` with no owned paths, under the
222
+ parallel-unit gate of
223
+ `.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md`.
224
+ Each worker writes nothing and returns its answer with its sources; the session
225
+ agent records them in the session log.
228
226
 
229
227
  ## 9. Error Handling
230
228
 
@@ -3,8 +3,6 @@ name: common-design-md
3
3
  owner: common
4
4
  purpose: "Author a missing root DESIGN.md or repair its authorized part from the recorded design direction, validate it, and check it again before anything is built from it."
5
5
  requires: []
6
- roles: [product-experience-architect]
7
- routing-profile: default
8
6
  ---
9
7
 
10
8
  # common-design-md
@@ -45,18 +43,18 @@ any existing file unchanged; skip this step for it.
45
43
  of a missing file, a pack that records no design direction leaves the brand
46
44
  unchosen. Brand intent is `hard-required`: ask for it, and under `--auto`
47
45
  stop and name it. Never adopt the sample design. For an existing valid file,
48
- validation and authorized repairs that preserve its brand and tokens
46
+ validation and triaged repairs that preserve its brand and tokens
49
47
  require no new brand selection. A brand or token change needs the
50
- authorization and source values in step 2.
48
+ triaged change and source values in step 2.
51
49
  2. **Bound an existing-file repair.** Write a missing file from the recorded
52
50
  direction. For an existing file, SDD triage must name its exact path and the
53
- requested change, and a new WIP change request must authorize both. Apply
54
- only the authorized change; preserve existing brand and tokens unless their
55
- change is authorized and supported by recorded direction or named theme
56
- values. Stop without writing unsupported values. Without that authorization,
57
- validate the existing file without an overwrite; an inherited DONE row
58
- authorizes no new change. An unreplaced sample is refused.
59
- 3. **Author a missing file or the authorized fields of an existing file**,
51
+ requested change; that names the triaged change. Apply
52
+ only the triaged change; preserve existing brand and tokens unless the
53
+ user decided their change and it is supported by recorded direction or named
54
+ theme values. Stop without writing unsupported values. Without a triaged
55
+ change, validate the existing file without an overwrite. An
56
+ unreplaced sample is refused.
57
+ 3. **Author a missing file or the triaged fields of an existing file**,
60
58
  following
61
59
  `.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md#output-mapping`:
62
60
  the intent fields first, then the archetype, then `brand.theme`, then the