qfai 2.1.1 → 2.2.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 (185) hide show
  1. package/README.md +56 -36
  2. package/assets/defaults/agent-routing/qfai-implement.yml +9 -0
  3. package/assets/defaults/agent-routing/qfai-triage.yml +18 -0
  4. package/assets/defaults/workflows/answer-in-session.yml +8 -0
  5. package/assets/defaults/workflows/quarantine-flaky.yml +3 -0
  6. package/assets/defaults/workflows/repair-consistency.yml +1 -0
  7. package/assets/defaults/workflows/run-operation.yml +11 -0
  8. package/assets/defaults/workflows/run-owned-cleanup.yml +12 -0
  9. package/assets/defaults/workflows/write-procedure.yml +18 -0
  10. package/assets/graph/codegraph-native.mjs +174 -0
  11. package/assets/graph/graphify-native.py +72 -0
  12. package/assets/init/.claude/settings.json +9 -9
  13. package/assets/init/.codex/hooks.json +8 -8
  14. package/assets/init/.qfai/assistant/agent/frontend-engineer.md +5 -0
  15. package/assets/init/.qfai/assistant/agent/product-experience-architect.md +4 -0
  16. package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +7 -0
  17. package/assets/init/.qfai/assistant/agent/requirements-analyst.md +8 -0
  18. package/assets/init/.qfai/assistant/rule/communication.md +18 -8
  19. package/assets/init/.qfai/assistant/rule/constitution.md +31 -15
  20. package/assets/init/.qfai/assistant/rule/drift-protocol.md +119 -2
  21. package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +6 -4
  22. package/assets/init/.qfai/assistant/rule/references/codex-delegation.md +27 -0
  23. package/assets/init/.qfai/assistant/rule/references/griller-recommendations.md +21 -9
  24. package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +48 -0
  25. package/assets/init/.qfai/assistant/rule/review-convergence.md +25 -12
  26. package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +16 -25
  27. package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +16 -11
  28. package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +6 -1
  29. package/assets/init/.qfai/assistant/rule/workflow.md +2 -1
  30. package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +3 -3
  31. package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +6 -0
  32. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +20 -15
  33. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +2 -4
  34. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux_best_practices.md +1 -6
  35. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +0 -16
  36. package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +30 -20
  37. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +4 -3
  38. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-record.md +8 -2
  39. package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +16 -3
  40. package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +9 -1
  41. package/assets/init/.qfai/assistant/skill/qfai-implement/references/red-admissibility.md +46 -0
  42. package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +5 -2
  43. package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +3 -3
  44. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +12 -6
  45. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +1 -265
  46. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-placement.md +273 -0
  47. package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +4 -3
  48. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +2 -3
  49. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +17 -1
  50. package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +52 -37
  51. package/assets/init/.qfai/assistant/skill/qfai-run/references/codex-cloud-install.md +80 -0
  52. package/assets/init/.qfai/assistant/skill/qfai-run/references/evidence-delivery.md +322 -0
  53. package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +83 -49
  54. package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +226 -11
  55. package/assets/init/.qfai/assistant/skill/qfai-run/references/plan.md +6 -3
  56. package/assets/init/.qfai/assistant/skill/qfai-run/references/reached-step-observations.md +132 -0
  57. package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +14 -0
  58. package/assets/init/.qfai/assistant/skill/qfai-run/scripts/codex-cloud-install.mjs +117 -0
  59. package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +4 -3
  60. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +1 -0
  61. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-anti-patterns.md +23 -5
  62. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/design-md-authoring.md +20 -7
  63. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/requirements-decomposition.md +8 -0
  64. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +29 -4
  65. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +1 -1
  66. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +4 -1
  67. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +1 -1
  68. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +159 -4
  69. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +14 -2
  70. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +146 -0
  71. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-design-contract-normalization.md +4 -29
  72. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +38 -1
  73. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/contracts/ui-contract.sample.yaml +52 -5
  74. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +12 -0
  75. package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +34 -21
  76. package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +5 -4
  77. package/assets/init/.qfai/assistant/skill/qfai-verify/references/context-load.md +9 -6
  78. package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +80 -15
  79. package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +35 -21
  80. package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/brave-search/config.toml +2 -4
  81. package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/brave-search/mcp-config.json +9 -5
  82. package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/.mcp.json +1 -2
  83. package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/config.toml +3 -3
  84. package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/firecrawl/mcp-config.json +11 -8
  85. package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/playwright/config.toml +1 -1
  86. package/assets/init/.qfai/assistant/skill/web-research/mcp-templates/playwright/mcp-config.json +7 -3
  87. package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +33 -20
  88. package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +124 -8
  89. package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +10 -2
  90. package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +1 -0
  91. package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +26 -9
  92. package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +15 -8
  93. package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +5 -1
  94. package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +6 -1
  95. package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +2 -0
  96. package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +6 -4
  97. package/assets/init/.qfai/assistant/step/implement-backport/STEP.md +1 -1
  98. package/assets/init/.qfai/assistant/step/implement-benchmark/STEP.md +7 -4
  99. package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +11 -2
  100. package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +2 -0
  101. package/assets/init/.qfai/assistant/step/implement-oracle-parity/STEP.md +2 -2
  102. package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +69 -0
  103. package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +24 -7
  104. package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +2 -2
  105. package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +7 -6
  106. package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +6 -3
  107. package/assets/init/.qfai/assistant/step/implement-revert/STEP.md +4 -3
  108. package/assets/init/.qfai/assistant/step/implement-seam/STEP.md +6 -5
  109. package/assets/init/.qfai/assistant/step/implement-stress-harness/STEP.md +34 -3
  110. package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +4 -3
  111. package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +39 -5
  112. package/assets/init/.qfai/assistant/step/implement-tooling/STEP.md +22 -2
  113. package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +18 -14
  114. package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +4 -3
  115. package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +4 -0
  116. package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +9 -3
  117. package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +11 -0
  118. package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +2 -0
  119. package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +10 -0
  120. package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +34 -10
  121. package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +7 -6
  122. package/assets/init/.qfai/assistant/step/triage-close/STEP.md +33 -23
  123. package/assets/init/.qfai/assistant/step/triage-cluster/STEP.md +5 -3
  124. package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +2 -0
  125. package/assets/init/.qfai/assistant/step/triage-dedupe/STEP.md +4 -0
  126. package/assets/init/.qfai/assistant/step/triage-handoff/STEP.md +13 -4
  127. package/assets/init/.qfai/assistant/step/triage-investigate/STEP.md +8 -5
  128. package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +50 -0
  129. package/assets/init/.qfai/assistant/step/triage-owned-cleanup/STEP.md +86 -0
  130. package/assets/init/.qfai/assistant/step/triage-request-info/STEP.md +2 -0
  131. package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +6 -3
  132. package/assets/init/.qfai/assistant/step/verify-change-note/STEP.md +1 -0
  133. package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +37 -9
  134. package/assets/init/.qfai/assistant/step/verify-external/STEP.md +5 -2
  135. package/assets/init/.qfai/assistant/step/verify-qfai-gate/STEP.md +14 -16
  136. package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +1 -0
  137. package/assets/init/.qfai/assistant/step/verify-repeat-run/STEP.md +46 -4
  138. package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +133 -30
  139. package/assets/init/root/.agents/rules/ai-readable-markdown.md +2 -2
  140. package/assets/init/root/.agents/rules/api-budget.md +187 -8
  141. package/assets/init/root/.agents/rules/document-schema.md +17 -0
  142. package/assets/init/root/.agents/rules/documentation-clarity.md +163 -34
  143. package/assets/init/root/.agents/rules/graph-exploration.md +150 -0
  144. package/assets/init/root/.agents/rules/grilling.md +100 -43
  145. package/assets/init/root/.agents/rules/minimal-implementation.md +3 -3
  146. package/assets/init/root/.agents/rules/reminders.json +27 -18
  147. package/assets/init/root/.agents/rules/session-feedback.md +131 -0
  148. package/assets/init/root/.agents/rules/temporary-files.md +33 -0
  149. package/assets/init/root/.agents/rules/untrusted-content.md +2 -2
  150. package/assets/init/root/.agents/rules/user-questions.md +51 -40
  151. package/assets/init/root/.github/workflows/qfai-docs.yml +3 -3
  152. package/assets/init/root/.github/workflows/qfai-tests.yml +88 -35
  153. package/assets/init/root/.github/workflows/qfai-validate.yml +2 -2
  154. package/assets/init/root/AGENTS.md +24 -22
  155. package/assets/sandbox-templates/default-deny.yaml +9 -3
  156. package/assets/schemas/workflow/extraction.schema.json +89 -5
  157. package/assets/scripts/check-mdschema.mjs +77 -8
  158. package/assets/uix-rev/comparison-review.md +1 -1
  159. package/assets/uix-rev/contracts-review.md +1 -2
  160. package/dist/cli/index.cjs +9444 -10071
  161. package/dist/cli/index.cjs.map +1 -1
  162. package/dist/cli/index.mjs +9421 -10041
  163. package/dist/cli/index.mjs.map +1 -1
  164. package/dist/graph/cli.cjs +1568 -0
  165. package/dist/graph/cli.cjs.map +1 -0
  166. package/dist/graph/cli.d.cts +9 -0
  167. package/dist/graph/cli.d.ts +9 -0
  168. package/dist/graph/cli.mjs +1541 -0
  169. package/dist/graph/cli.mjs.map +1 -0
  170. package/dist/graph/hook.cjs +817 -0
  171. package/dist/graph/hook.cjs.map +1 -0
  172. package/dist/graph/hook.d.cts +9 -0
  173. package/dist/graph/hook.d.ts +9 -0
  174. package/dist/graph/hook.mjs +792 -0
  175. package/dist/graph/hook.mjs.map +1 -0
  176. package/dist/index.cjs +7634 -8517
  177. package/dist/index.cjs.map +1 -1
  178. package/dist/index.d.cts +146 -658
  179. package/dist/index.d.ts +146 -658
  180. package/dist/index.mjs +7462 -8318
  181. package/dist/index.mjs.map +1 -1
  182. package/dist/process-C21nTvkT.d.cts +12 -0
  183. package/dist/process-C21nTvkT.d.ts +12 -0
  184. package/package.json +4 -6
  185. package/assets/init/root/CLAUDE.md +0 -46
@@ -13,7 +13,10 @@ which owns the delegation rules these sit beside.
13
13
  answered, the work proceeds.
14
14
  - A finding the author cannot fix is reported in the stage's final report, with
15
15
  the finding and why it stays open.
16
- - A critical decision still goes to the user: one that contradicts a spec, a
16
+ - A critical decision requires actual user authority under
17
+ `.agents/rules/grilling.md#explicit-delegation-for-a-discussion`.
18
+ Without an actual answer or recorded applicable authorization, it goes to
19
+ the user when questions are permitted: one that contradicts a spec, a
17
20
  contract or a recorded decision, one whose effect cannot be taken back, or one
18
21
  that rests on product intent nothing written states. So does a finding that
19
22
  names a concrete security defect, data loss or corruption, or a correctness
@@ -37,7 +40,8 @@ Close a repeat by citing its recorded answer. This bounds what a reviewer may
37
40
  require, not what a reviewer may report.
38
41
 
39
42
  A report of a new defect or evidence that an answer no longer applies must
40
- state what changed. A critical decision in it still goes to the user.
43
+ state what changed. A critical decision in it still requires actual applicable
44
+ user authority; uncovered authority is never supplied by the review.
41
45
 
42
46
  ## Discussion review precision
43
47
 
@@ -94,7 +98,10 @@ status is not permission to pass those.
94
98
 
95
99
  A grilling session between agents is a **delegated session**
96
100
  (`.agents/rules/grilling.md`): a griller interviews the authors, and the user is
97
- asked only a critical decision. These rules bound its rounds and say what
101
+ asked only an uncovered critical decision when questions are permitted.
102
+ Actual scoped user delegation may authorize reversible requested judgment
103
+ without an individual option answer; record the agents' adoption and authority
104
+ separately. These rules bound its rounds and say what
98
105
  settles each decision when they run out.
99
106
 
100
107
  **Two rounds.** After the second round **every
@@ -108,8 +115,9 @@ position is recorded beside it with whose it is. The stage reports every adopted
108
115
  decision at its end without waiting for an answer. A user who disagrees
109
116
  overturns one through a change request or a rerun.
110
117
 
111
- **A critical decision goes to the user at once**, without spending a round.
112
- Rounds between agents produce agreement, and agreement is not what these lack.
118
+ **A critical decision without an actual answer or recorded applicable user
119
+ authority goes to the user at once when asking is permitted**, without spending
120
+ a round. Agent agreement and round exhaustion supply no authority.
113
121
 
114
122
  | Critical decision | Why it goes to the user |
115
123
  | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
@@ -121,15 +129,20 @@ A discussion pack answers product intent for this test. It is non-normative for
121
129
  the Drift Protocol, but it is where the user already answered these questions in
122
130
  a user session, and asking them again spends that session twice.
123
131
 
124
- Each critical decision goes to the user with every position and a
125
- recommendation. Escalating is not failure: the work stays where it is and the
132
+ Each uncovered critical decision goes to the user with every position and a
133
+ recommendation when asking is permitted. The work stays where it is while the
126
134
  user accepts, decides, or drops the item.
127
135
 
128
136
  **The budget does not end the session while a critical decision is open.** The
129
- session ends `adopted` once the user has answered every critical decision.
137
+ session ends `adopted` only with no open node or running lookup, all required
138
+ consumed inputs present, and every critical decision supported by an actual
139
+ user answer or recorded applicable authorization under the master's conditions.
130
140
 
131
- Under a no-question mode the escalation has nobody to reach. A critical decision
132
- is opened as a question in the register the stage reads, so the stage cannot
133
- complete over it (`.qfai/assistant/rule/constitution.md` Article X,
141
+ Under a no-question mode no escalation is sent to the user. A critical decision
142
+ without that authority is opened in the register the stage reads, so the stage
143
+ cannot complete over it (`.qfai/assistant/rule/constitution.md` Article X,
134
144
  rule 6), and that write ends the session `no-question`. Non-critical decisions
135
- are adopted as they are in any delegated session.
145
+ are adopted as they are in any delegated session. A qualifying explicitly
146
+ delegated session with every node settled ends `adopted`; no-question mode
147
+ alone does not qualify it. Unknown facts and missing undefaultable consumed
148
+ inputs retain the ordinary open/stop behavior.
@@ -1,12 +1,12 @@
1
1
  # Shared Skill Delegation Baseline
2
2
 
3
- Use this document to keep SKILL bodies compact. Skill files should reference this baseline and only add role-, stage-, or gate-specific rules.
3
+ Skills cite this baseline and add only role, stage or gate overrides.
4
4
 
5
5
  ## Sub-agent Delegation (MANDATORY)
6
6
 
7
- This section binds every skill and every step as written. A skill or step
8
- restates none of it and writes no placeholder stanza for a subsection it does
9
- not change; it states only an override, under the subsection it overrides.
7
+ This section binds every skill and step. A skill or step repeats none of it
8
+ and adds no placeholder for a subsection it does not change. State only an
9
+ override, under the subsection it overrides.
10
10
 
11
11
  Delegation is optional. The session agent, called the orchestrator below, may
12
12
  author any artifact itself. It uses a sub-agent only for work that runs in
@@ -34,14 +34,22 @@ classified by the taxonomy below before any response.
34
34
  `.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md`.
35
35
  Where the stage's ledger or a seam makes an ordering mandatory, carrying on
36
36
  does not override it.
37
+ - On Codex, read `.qfai/assistant/rule/references/codex-delegation.md` before delegating.
37
38
  - A review is done by an agent that did not author what it reviews. The
38
39
  orchestrator never reviews its own work and never approves it for
39
40
  convenience.
40
41
  - A read-only agent never runs `git checkout` or `git switch` in a worktree it
41
42
  shares; it reads other revisions with `git show <rev>:<path>`. Each agent
42
43
  writes scratch files only under a path of its own.
43
- - Commit the change, or give each reviewer a fixed commit, before a review
44
- starts, and leave the working tree alone until every review returns.
44
+ - Give each reviewer a fixed commit. Leave the checkout alone until reviews
45
+ return. Only read-only fixed-SHA `git show` reviews permit clean switches.
46
+ Writers, local gates and reviews using live files or checkout-dependent
47
+ execution must finish first.
48
+
49
+ ### Worker edit boundary
50
+
51
+ Before assigning write paths or handling a refused edit, read
52
+ `.qfai/assistant/rule/references/worker-edit-boundary.md`.
45
53
 
46
54
  ### Capability Probe (MUST)
47
55
 
@@ -212,25 +220,8 @@ A blocking review that cannot be delegated because the agent budget is spent is
212
220
 
213
221
  ## Work order template
214
222
 
215
- ```text
216
- Task title: <short>
217
- Role: <sub-agent role>
218
- Review series: <reviewed artifact> + <reviewer role> + <replacement ordinal> # review work orders only
219
- Goal: <what to decide/produce>
220
- Inputs (refs):
221
- - <file/section>
222
- - .qfai/assistant/rule/drift-protocol.md#core-rule <!-- the protected set, in front of the agent -->
223
- Constraints:
224
- - must: enforce Drift Protocol
225
- - must: follow applicable test-layer or validation policy
226
- - must_not: patch upstream artifacts directly; every upstream change requires
227
- STOP + Change Request + owner rerun per .qfai/assistant/rule/drift-protocol.md
228
- Output format:
229
- - <headings / bullet schema>
230
- Time budget: none | <seconds> # advisory: nothing stops at it. See .qfai/assistant/rule/stage-cost.md
231
- Elapsed line: end every message with `elapsed <seconds>s / <budget>s`, or `elapsed <seconds>s` when the budget is none
232
- Acceptance bar: <accept when ...> | <rework when ...> # never `PASS`/`REVISE`: that is the reviewer's vocabulary and the completion gate matches on it, so a doer told to report in it emits a verdict on its own work
233
- ```
223
+ When preparing a delegation, use the template in
224
+ `.qfai/assistant/rule/references/worker-edit-boundary.md#work-order-template`.
234
225
 
235
226
  ## Reviewer response template
236
227
 
@@ -43,7 +43,7 @@ asks nothing and records explicit assumptions in its stage report.
43
43
  asked for nor a blocker. Neither exhaustion nor a user's `proceed` / `done` answer is `--auto`, so these questions survive both. Under an explicit `--auto` the question is not asked at all — that run stops and names the missing input instead of inventing one. See `.qfai/assistant/rule/constitution.md` Article VI.
44
44
  - **Grilling questions are exempt too, and unbounded.** A question asked inside the interview `.agents/rules/grilling.md` defines spends no budget, and a session runs to its own end condition — for a user session an empty frontier and the user's confirmation, which is itself in the exempt class, and for a delegated one no open node and an answer to every critical decision — rather than to a count.
45
45
  An exhausted budget does not close one, because its questions never opened it. A
46
- session is entered deliberately: an invocation declares one and nothing else starts one, so a question asked outside a declared session is an ordinary clarification and spends a unit, whatever its subject.
46
+ session is entered deliberately, only as that rule's § Scope says, so a question asked outside a declared session is an ordinary clarification and spends a unit, whatever its subject.
47
47
  Under an explicit `--auto` the session asks nothing, a delegated one still adopts every decision that is not critical, and each node it could not settle is opened as a question in the register the stage reads. Each node, not each decision: a fact only
48
48
  the user holds cannot be settled from evidence either, and a fact declared undefaultable stops the run rather than taking a value nobody has. Where a document requires the field to hold something, write the defaulted value and label it an assumption beside that open question; what is forbidden is the assumption with no open question against it (Article X, rule 6).
49
49
 
@@ -168,8 +168,8 @@ The `common-gate-run` step runs a gate from this section and records it.
168
168
 
169
169
  ## Policy check (mandatory)
170
170
 
171
- A run starts with the policy check, once, and does not continue affected work
172
- on stale policy. The contract is
171
+ A run, an exempt route aside, starts with the policy check once and does not
172
+ continue affected work on stale policy. The contract is
173
173
  `.qfai/assistant/rule/workflow.md#policy-check-mandatory`.
174
174
  The procedure — which files, what counts as incomplete, how a fact is filled
175
175
  and where an unverifiable one goes — is the `common-policy-check` step. A
@@ -196,9 +196,9 @@ the policy check. The mode is `workflow.mode` in `qfai.config.yaml`. An absent k
196
196
  needs the operator's answer.
197
197
  - A QFAI work order binds the stage to its target: one business flow, or one
198
198
  new-story slot. The stage works on that target and no other.
199
- - The stage result names the agent instance that did the work in
200
- `actor: { agentInstance }`. The run records that instance as the work's
201
- author and never counts it as the work's independent reviewer.
199
+ - The session report names the agent instance that authored the work and
200
+ each independent reviewer. The author never counts as the work's
201
+ independent reviewer.
202
202
  - These statements add to the constitution. They except no article.
203
203
 
204
204
  ## Running Steps (Mandatory)
@@ -255,6 +255,11 @@ stage, and no other.
255
255
  4. A finding another owner must repair is reported with that owner, not an
256
256
  edit made here.
257
257
 
258
+ At each existing stage boundary, read
259
+ `.qfai/assistant/skill/qfai-run/references/reached-step-observations.md`
260
+ for the reached-step comparison in the existing stage report. Preserve the
261
+ plan's scope, termination, pass-through and planned review.
262
+
258
263
  ### A pass-through step
259
264
 
260
265
  A step the plan marks `passThrough` always runs. It first reads what its
@@ -268,12 +273,12 @@ writes nothing and states why; the stage's review reads that statement.
268
273
 
269
274
  ## Default Autopilot Policy inside a run
270
275
 
271
- Inside a run, each bucket of a skill's Default Autopilot Policy is
272
- satisfied by one kind of authorization the run records:
276
+ Inside a run, record the authorization for each bucket in the session report:
273
277
 
274
- - An `ask-user` item is satisfied only by a `human_decision` that answers it.
275
- - A `hard-required` input is satisfied by `request_scope` or by the run's
276
- binding.
278
+ - An `ask-user` item is satisfied only by the operator's answer to it.
279
+ Name that answer and its source; an agent's choice is not an operator answer.
280
+ - A `hard-required` input is satisfied by the operator's request or by the
281
+ run's binding. Name the request or work order that supplies it.
277
282
  - An `auto-decide` item needs no authorization.
278
283
  - `--auto` satisfies nothing. It answers no `ask-user` item and supplies no
279
284
  `hard-required` input.
@@ -27,6 +27,8 @@ A downstream skill reads the UI definition in this order.
27
27
  - primary tasks
28
28
  - states
29
29
  - actions
30
+ - supplements (the text shown beyond title, group headings and labels, each with
31
+ its reason) and, when written, structure (the groups and headings, in order)
30
32
 
31
33
  3. **Brand SSOT**
32
34
  - root `DESIGN.md` (front-matter + `# Brand Philosophy` body), the only
@@ -36,6 +38,10 @@ A downstream skill reads the UI definition in this order.
36
38
  prototyping loop ran): the final prototype, procurement and implementation
37
39
  notes
38
40
 
41
+ The supplements and structure are required input: implementation adds no text the
42
+ contract does not declare, and surface review compares the rendered text with them.
43
+ A screen that lacks them is returned to `/qfai-sdd`.
44
+
39
45
  The paths that render a user-visible surface are declared by `uiux.surfacePaths`
40
46
  in `qfai.config.yaml`, and nowhere else.
41
47
 
@@ -51,6 +57,5 @@ in `qfai.config.yaml`, and nowhere else.
51
57
  ## Forbidden Fallbacks
52
58
 
53
59
  - Do not infer downstream UI behavior from discussion-pack sidecars.
54
- - Do not use retired design contract files.
55
60
  - Do not use HTML mock sections as downstream source of truth.
56
61
  - Do not treat a competitor reference as a selected design direction.
@@ -132,7 +132,8 @@ from the skills and baselines that cite it.
132
132
  ### Policy check (mandatory)
133
133
 
134
134
  Once per run, at the start, before the first stage. A stage invoked by name on
135
- its own is a run of its own.
135
+ its own is a run of its own. The ultra-light routes `answer-in-session` and
136
+ `run-operation`, each one step that changes no tracked file, run without it.
136
137
 
137
138
  1. Check the current story-tree policy files under `<paths.specsDir>`:
138
139
  - `01_policy/objective.md` and `01_policy/initiative.md`
@@ -293,7 +293,7 @@ Fill policy templates with repo evidence.
293
293
  - Keep existing content when already accurate.
294
294
  - When evidence is missing, write `TBD` and record what is missing.
295
295
  - Do not invent facts.
296
- - Fill `03_contract/tech.md` in its template's shape: a Stack row for the runtime, the platform and each tool detected, each runtime dependency with its reason, and the quality-gate commands under Standard commands, one labelled item each. It holds no rule and no constraint; a constraint goes to `01_policy/constraint.md`.
296
+ - Fill `03_contract/tech.md` in its template's shape: a Stack row for the runtime, the platform and each tool detected, with one row per test layer whose Choice names the tool, the files it was observed in, and why it fits; each runtime dependency with its reason, and the quality-gate commands under Standard commands, one labelled item each. It holds no rule and no constraint; a constraint goes to `01_policy/constraint.md`.
297
297
  - Fill `## Architecture` of `03_contract/tech.md` from the codebase: one row per layer the module layout shows, what it is responsible for, and the layers its imports reach, or `-`. Name layers, never paths. Implementation places new code by this table and reviewers judge a change against it, so write the import directions the code has.
298
298
  - A layer is a group of modules whose imports point one way: an upper layer uses the layers below it, and a lower layer never imports an upper one.
299
299
  - Draw the layers first, as one `mermaid` `flowchart TD` with a node per layer and an `Upper --> Lower` edge per import direction. Then write the table rows from the uppermost layer down, so each Depends on names only rows below it. `npx qfai validate` reports a diagram and a table that disagree.
@@ -304,10 +304,10 @@ Edit:
304
304
 
305
305
  - `validation.traceability.testFileGlobs`
306
306
  - `validation.traceability.testFileExcludeGlobs` (only if needed)
307
- - `routing` or `reviewProfiles` only when the project needs an override; each matching entry replaces the shipped default as a whole
307
+ - `routing` or `reviewProfiles` only when the user asks to change one; each matching entry replaces the shipped default as a whole
308
308
  - `uiux.surfacePaths`: the repository-relative globs of the paths observed to render a user-visible surface, or `[]` when the repository renders none. Keep an existing value unless the user asks to change it. An absent key leaves the UI impact decision unevaluable.
309
309
 
310
- Keep all other config keys unchanged.
310
+ Keep all other config keys unchanged. Add no key the package already defaults, `paths.specsDir` included; a value the project set stays.
311
311
 
312
312
  ## Step 5 - Evidence sampling
313
313
 
@@ -120,6 +120,12 @@ End the turn with a question listing the next actions, `/qfai-sdd` recommended,
120
120
 
121
121
  ## Default Autopilot Policy
122
122
 
123
+ The entries below govern the default user interview. Only an actual user
124
+ delegation recorded under
125
+ `.agents/rules/grilling.md#explicit-delegation-for-a-discussion` enables the
126
+ delegated `adopted` path. No-question mode alone does not enable it; missing
127
+ inputs and uncovered human decisions retain their ordinary blocking behavior.
128
+
123
129
  - ask-user:
124
130
  - every decision the interview puts on the frontier, over every topic in `references/discussion-coverage-checklist.md`. Running the interview is what this skill performs, so these are its own operations
125
131
  - the confirmation that closes the session
@@ -22,13 +22,14 @@ Blocking for every pack, UI-bearing or not:
22
22
  resolves to a `sources[].id`, and at least one `reflection[]` entry records an apply decision.
23
23
  `npx qfai validate --profile discussion --fail-on error` reports `QFAI-RESEARCH-*` until it is.
24
24
  2. The stage report's `## Grilling Session` row shows the session ended before authoring began,
25
- with `Ended` reading one of the three endings that authorize it:
25
+ with `Ended` reading an authoring ending and its conditions met:
26
26
 
27
- | Ended | Also required |
28
- | ------------- | -------------------------------------------------------------------------------------------------------------- |
29
- | `confirmed` | No node open — the frontier empty **and** no fact lookup still running |
30
- | `user-closed` | Lookups finished, and every decision still open recorded as a labelled assumption |
31
- | `no-question` | Every node still open registered — a decision, and a fact only the user holds — so item 3 below is what blocks |
27
+ | Ended | Also required |
28
+ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `confirmed` | No node open — the frontier empty **and** no fact lookup still running |
30
+ | `user-closed` | Lookups finished, and every decision still open recorded as a labelled assumption |
31
+ | `adopted` | Recorded explicit delegation, actual author rounds, no open node or lookup, all required inputs and applicable human authority; see `.agents/rules/grilling.md#explicit-delegation-for-a-discussion` |
32
+ | `no-question` | Every node still open registered — a decision, and a fact only the user holds — so item 3 below is what blocks |
32
33
 
33
34
  `stopped` never completes: the user ended the run, and a pack authored after that is the run
34
35
  doing what they told it not to.
@@ -44,6 +45,10 @@ Blocking for every pack, UI-bearing or not:
44
45
  covered, every open question registered. What is missing is that someone agreed to what is in
45
46
  them, and nothing downstream can tell.
46
47
 
48
+ Delegation is not a human confirmation or a completion receipt. The
49
+ ordinary research, pack, OQ, UI, schema, validation and independent-review
50
+ gates remain blocking. No reserved decision or missing fact is forced closed.
51
+
47
52
  The no-question row is the one to read carefully: `--auto` can reach nobody, so waiting for a
48
53
  confirmation would stop the run before it could write the open questions that are what block it.
49
54
  Item 3 below does that work instead — an open count above zero closes nothing.
@@ -53,7 +58,7 @@ Blocking for every pack, UI-bearing or not:
53
58
  Here rather than under one pack shape. It is what a no-question run is blocked by, and a run is
54
59
  `--auto` or not independently of whether it has a surface — listed only under `## UI-bearing
55
60
  Packs`, it let a non-UI `--auto` pack complete with its decisions still open.
56
- Item 7 below does that work instead — an open count above zero closes nothing.
61
+ All Packs item 3 does that work — an open count above zero closes nothing.
57
62
 
58
63
  ## UI-bearing Packs
59
64
 
@@ -73,13 +78,14 @@ Completion is blocked until all are true:
73
78
  5. `01_Context.md#Design Direction` names an adopted theme, what departs from it, and what stays
74
79
  ordinary. This is the one visual decision made here, because no later stage asks the user for
75
80
  it: `/qfai-sdd`'s `common-design-md` step authors tokens from whatever is recorded. A direction taken without the
76
- user carries `chosen_by: assumption` and an open entry in `11_OQ-Register.md`.
77
- 6. No forbidden legacy sidecar exists under `uiux/` (see
78
- `templates/uiux/00_index.md#Forbidden Legacy Files`).
81
+ user carries `chosen_by: assumption`, never `user`. Its OQ stays open unless
82
+ an actual specifically applicable user instruction overrides the human-choice
83
+ requirement under the master's conditions; record that authority and the agents'
84
+ choice without falsifying the schema. General delegation alone does not waive
85
+ a genuinely reserved human input.
79
86
 
80
87
  Evaluation axes are global constants (4-step ordinal: weak / acceptable / strong /
81
- exceptional) and are NOT authored as discussion sidecars, so no scoring, override, strategy,
82
- taste-interview, option-comparison or selected-anchor sidecar is required or permitted.
88
+ exceptional) and are NOT authored as discussion sidecars.
83
89
 
84
90
  ## CLI Packs
85
91
 
@@ -93,9 +99,8 @@ so conditions 1 and 5 above do not apply to it:
93
99
  `validators/designContractReadiness.ts` skips `QFAI-DCON-030`/`-033`/`-034` for it.
94
100
  - No design direction either: nothing downstream reads a theme for a surface that renders
95
101
  no tokens.
96
- - Conditions 2, 3, 4, 6 and 7 apply unchanged: all three canonical `uiux/` sidecars, the
97
- full screen-contract schema, unranked exploration directions, no forbidden legacy
98
- sidecar, and zero open OQs.
102
+ - UI-bearing items 2, 3 and 4 and All Packs item 3 apply unchanged: all three canonical `uiux/` sidecars, the
103
+ full screen-contract schema, unranked exploration directions, and zero open OQs.
99
104
  - `route:` on a `cli` screen contract names the command invocation, not a web path, as the `cli` section of the UI-bearing playbook sets out.
100
105
  - No `prototyping.yaml`: `cli` is not a valid prototyping execution surface.
101
106
  - `primary_surface: cli` with a visual `secondary_surfaces` entry is NOT a cli-only pack —
@@ -74,7 +74,5 @@ shadows:
74
74
 
75
75
  Trend Scan is **not** a sidecar file. Trend Scan lives at
76
76
  `04_Sources.md#Trend Scan` (part of the core nine-file discussion pack).
77
- The legacy `uiux/20_trend_scan.md` template and the whole `uiux/20-24`
78
- design-evaluation family were removed; evaluation axes are now global
79
- constants and are not authored as discussion sidecars. UI-bearing
80
- completion checks read Trend Scan from `04_Sources.md`.
77
+ Evaluation axes are global constants and are not authored as discussion
78
+ sidecars. UI-bearing completion checks read Trend Scan from `04_Sources.md`.
@@ -116,12 +116,7 @@ Those three are the entire canonical sidecar family. Evaluation axes are global
116
116
  QFAI CLI applies — not by any file in this tree. The reviewer prompt that
117
117
  `/qfai-prototyping` ships restates that axis set; editing it does not change the set the CLI accepts. Axes are not
118
118
  authored as discussion sidecars. Discussion is planner-first: it carries exploration directions
119
- unranked and does not select a single visual winner, so there is no strategy, taste-interview, scoring,
120
- override, option-comparison or selected-anchor sidecar. Do NOT create
121
- `10_implementation_strategy.md`, `11_design_taste_interview.md`, the `20-24`
122
- design-evaluation family, `30_option_comparison.md`, or `31_selected_anchor_screen.md` —
123
- those filenames are forbidden, see `templates/uiux/00_index.md#Forbidden Legacy Files`, and
124
- creating them fails validation.
119
+ unranked and does not select a single visual winner.
125
120
 
126
121
  ### What must be explicit in the discussion pack
127
122
 
@@ -30,19 +30,3 @@ cli-only pack — `primary_surface: cli` with no visual surface in
30
30
  `secondary_surfaces` — never gets one: the `common-design-md` step writes none, and
31
31
  `/qfai-prototyping` does not run on `cli`. Do not report any pack as
32
32
  incomplete for a missing `DESIGN.md`.
33
-
34
- ## Forbidden Legacy Files
35
-
36
- The following files are NOT part of the canonical family and must NOT be created in new packs:
37
-
38
- - `10_implementation_strategy.md` — discussion carries directions unranked, so it selects no strategy
39
- - `11_design_taste_interview.md` — brand signals are recorded in `04_Sources.md`
40
- - `12_design_system.md` — replaced by root `DESIGN.md`
41
- - the `20`–`24` design-evaluation family — the evaluator axes are fixed by the CLI, not authored here
42
- - `30_option_comparison.md` — replaced by root `DESIGN.md`
43
- - `31_selected_anchor_screen.md` — replaced by root `DESIGN.md`
44
- - `33_exploration_rubric.md` — replaced by the fixed evaluator axes (`.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md`)
45
- - `34_evaluator_calibration.md` — replaced by the fixed evaluator axes (`.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md`)
46
- - `40_contracts.md` — replaced by `40_screen_contracts.md`
47
- - `50_review_bundle.md` — replaced by `50_review_input_bundle.md`
48
- - `60_critique_loop.md` — removed (critique integrated into review bundle)
@@ -24,11 +24,15 @@ shared, closes the asking, or stops the session, a delegated session adopts the
24
24
  griller's recommendations, or a run that may not ask writes every node left
25
25
  where its stage's gate reads it.
26
26
 
27
- **Which kind of session runs is the invoking stage's to say.** A stage whose
28
- work is the interview holds a user session; every other stage holds a delegated
29
- one, where a griller interviews the authors and the user is asked only a
30
- critical decision (`.agents/rules/grilling.md` § Two kinds of session). A stage
31
- that says nothing holds a delegated session.
27
+ **The invoking stage picks the session.** A stage whose work is the
28
+ interview holds a user session; any other holds a delegated one, where a griller
29
+ interviews the authors and only a critical decision reaches the user, and only
30
+ for a decision the repository cannot settle (`.agents/rules/grilling.md` § When
31
+ a session is held). Without one, no griller starts. A stage that says nothing
32
+ holds a delegated session where one is held. Read
33
+ `.agents/rules/grilling.md#explicit-delegation-for-a-discussion` before
34
+ delegating a user discussion; record actual authority. No-question alone is not
35
+ delegation.
32
36
 
33
37
  **The request bounds the tree** (`.agents/rules/grilling.md`). A decision whose
34
38
  only outcome is whether to add something the request did not ask for is left
@@ -53,7 +57,8 @@ least beyond the request.
53
57
  | A no-question mode is active | Run without asking; open every node left over as a question |
54
58
  | An ambiguity met while implementing | Not a session — stop under Article IX of the constitution |
55
59
 
56
- **A no-question mode silences the questions, not the session.** An invocation
60
+ **A no-question mode silences user questions, not the session.** The master's
61
+ explicit-delegation conditions permit author rounds. Otherwise, an invocation
57
62
  told not to ask — `--auto`, or whatever the host spells it as — settles what the
58
63
  evidence settles, dispatches the lookups, and opens every node left over as
59
64
  a question in the register the stage reads, so the stage cannot complete over
@@ -115,19 +120,17 @@ re-opens it.
115
120
  1. Recompute the frontier from what is now settled.
116
121
  2. Dispatch the fact lookups the remaining decisions wait on. Do not block the
117
122
  round on them.
118
- 3. Put the whole frontier at once, so the user sees what is being decided
119
- together.
123
+ 3. Put the whole frontier at once to the session's answerer: the user by
124
+ default, or authors in a qualifying delegated session.
120
125
  4. Read the answers, then return to step 1.
121
126
 
122
127
  Two questions never share a round when one depends on the other; the dependent
123
128
  one belongs to a later round. The next round is never written ahead of the
124
129
  answers it is computed from.
125
130
 
126
- **A no-question mode is read before any of this.** Where the invocation is told
127
- not to ask — `--auto`, or whatever the host spells it as — no round is put at
128
- all, so nothing below applies and the no-question section above governs. A mode
129
- that withholds the tool while still permitting questions is a different thing,
130
- and is the fallback's case.
131
+ **A no-question mode is read before any of this.** Agent rounds require
132
+ explicit delegation; otherwise the section above governs. A withheld tool with questions still
133
+ permitted uses the fallback.
131
134
 
132
135
  **Three things send a round to plain text**: the host has no structured question
133
136
  tool, the current mode withholds it while still permitting questions, or the
@@ -214,18 +217,22 @@ simple.
214
217
  **A delegated session has no condition 2**, because no user is there to
215
218
  confirm. A budget bounds its rounds: two, then every decision that is not
216
219
  critical takes the griller's recommendation — the ones the agents agreed on and
217
- the ones still open alike — and every critical decision goes to the user at
218
- once, without spending a round
220
+ the ones still open alike. An uncovered critical decision goes to the user
221
+ when asking is permitted, without spending a round
219
222
  (`.qfai/assistant/rule/review-convergence.md`). It ends `adopted` once
220
- no node is open and the user has answered every critical decision.
223
+ the master's conditions hold: no open node or lookup, required inputs present,
224
+ and actual authority for critical decisions. Record agent choices as agents'.
221
225
 
222
- **The budget ends the rounds, not the session.** While a critical decision is
223
- unanswered the session is still open: the user answers it, or ends the session
226
+ **The budget ends the rounds, not the session.** While a critical decision
227
+ lacks an actual answer or applicable recorded authorization, it stays open: the user answers it, or ends the session
224
228
  another way — or, under a no-question mode, the register write ends it
225
229
  `no-question`. How many went is a count a record carries, never an ending.
226
230
 
227
- **A session under a no-question mode cannot reach condition 2 either**, because
228
- there is a user and the mode forbids asking them. It ends when nothing on the
231
+ **Only a no-question session meeting the master's explicit-delegation
232
+ conditions ends `adopted`.**
233
+
234
+ **Any other session under a no-question mode cannot reach condition 2
235
+ either**, because the mode forbids asking the user. It ends when nothing on the
229
236
  frontier is still waiting: every decision the evidence settled is settled, and
230
237
  every one it did not is opened as a question where the stage's own gate reads it
231
238
  (`.qfai/assistant/rule/constitution.md` Article X, rule 6). The register
@@ -350,6 +357,9 @@ Every decision this skill meets falls in one of three named buckets.
350
357
  - grilling subject (the design to interrogate; a session has no default for
351
358
  what it is about)
352
359
 
360
+ Explicit delegation is not `auto-decide` or a fact or human answer.
361
+ These user-session entries remain the default.
362
+
353
363
  The asking is what this skill performs, so its `ask-user` entries are its own operations
354
364
  rather than an entry added to the prototype.
355
365
 
@@ -53,6 +53,7 @@ decisions belonging to different drafting roles.
53
53
  report lists it; nothing waits for the user to read it.
54
54
 
55
55
  A critical decision is the exception: agreement closes its node for the
56
- round, and only the user's answer settles it. Recording an agreed critical
57
- decision as settled is how a choice nobody with the standing made reaches a
58
- draft.
56
+ round, but only an actual user answer or an explicit applicable authorization
57
+ under `.agents/rules/grilling.md#explicit-delegation-for-a-discussion` settles
58
+ it. Record that authority separately from the agents' positions. Agreement
59
+ alone does not settle it, and an unknown user-held fact still stays open.
@@ -18,7 +18,9 @@ Use the shared schema from
18
18
  The invoking stage's reviewer confirms this about the session:
19
19
 
20
20
  - no decision was recorded as the user's that the user did not answer, no
21
- critical decision was adopted without them, and none was assumed that the
21
+ critical decision was adopted without an actual user answer or an explicit
22
+ applicable human authorization under the master's delegation conditions,
23
+ and none was assumed that the
22
24
  assumption path excludes;
23
25
  - every adopted decision has its `agents` row, and none of them adds what the
24
26
  request did not need;
@@ -27,7 +29,11 @@ The invoking stage's reviewer confirms this about the session:
27
29
  five endings `.agents/rules/grilling.md` names. Between agents a round budget
28
30
  bounds the rounds (`.qfai/assistant/rule/review-convergence.md`), and
29
31
  a session recorded as ended while a critical decision it escalated is still
30
- unanswered is the finding.
32
+ unanswered and lacks that recorded authority is the finding;
33
+ - for an explicitly delegated discussion, the actual user instruction, its
34
+ scope and authority, actual author rounds and dissent, no open node or
35
+ running lookup, all required consumed inputs, and actual end/authoring times
36
+ are evidenced. `adopted` without these is not a passing session.
31
37
 
32
38
  The reviewer works under these rules:
33
39
 
@@ -40,6 +40,7 @@ steps:
40
40
  - implement-tooling
41
41
  - implement-backport
42
42
  - implement-acceptance
43
+ - implement-procedure
43
44
  requires: [common-review-cycle]
44
45
  mode: approval-gated
45
46
  ---
@@ -86,6 +87,11 @@ design. They are written by the `write-acceptance-tests` route, or by
86
87
  `implement-acceptance` run alone, and the report says which BF and AC tests
87
88
  still have an empty body.
88
89
 
90
+ For that report or a handoff of unfinished BF/AC bodies, read
91
+ `.qfai/assistant/step/verify-repo-gate/STEP.md#acceptance-evidence-and-follow-up`.
92
+ It separates annotation proof, body states, actual behavior and execution,
93
+ and the remaining work's owner and completion criteria.
94
+
89
95
  Each of these runs alone, instead of that order, when the request is not new
90
96
  behaviour but a failure, a repair or upkeep:
91
97
 
@@ -131,6 +137,12 @@ and reporting requirement, and states any assumption it built on
131
137
  (`.qfai/assistant/rule/test-layers.md#test-suite-sizing`,
132
138
  `.agents/rules/minimal-implementation.md` § 4).
133
139
 
140
+ ## Route-only procedure authoring
141
+
142
+ When the plan names `implement-procedure`, follow
143
+ `.qfai/assistant/step/implement-procedure/STEP.md`.
144
+ Business-flow invocations skip it; existing flow steps apply.
145
+
134
146
  ## Completion
135
147
 
136
148
  The invocation completes on the gate of its last step once
@@ -139,9 +151,10 @@ every finding of its one review is fixed or answered. Invoked by name, it runs
139
151
  completion; when that fresh validate result has no test-obligation EX finding
140
152
  for this BF, the invocation reports "nothing to do", and reads or writes no
141
153
  ledger status. Inside a route it runs no validate: the verify stage does.
142
- The report ends with a question listing the next actions, `/qfai-verify`
143
- recommended, as `.agents/rules/user-questions.md` § 6 sets out.
144
- Under a no-question mode, list them in the report instead.
154
+ When the next step needs the user's answer, ask a question listing the next
155
+ actions, `/qfai-verify` recommended, per `.agents/rules/user-questions.md` § 6.
156
+ Completion-only reports ask nothing. Under a no-question mode, list remaining
157
+ actions instead.
145
158
 
146
159
  ## Default Autopilot Policy
147
160
 
@@ -10,7 +10,15 @@ For each candidate item, name its production files, test files, contracts, fixtu
10
10
 
11
11
  Deny parallel dispatch when two items write the same shared fixture or mock file, or mutate the same fixture instance. A shared fixture module that both items only read as-is does not by itself deny parallel dispatch.
12
12
 
13
- Give each worker a separate worktree and an exact file ownership list. Workers do not change another worker's files or the story tree. The orchestrator integrates their results and resolves every overlap before judging either item complete.
13
+ Give each worker an exact file ownership list and a checkout assigned by the host.
14
+ Use separate worktrees when the host supports editing them; otherwise use the
15
+ existing shared-index mode in
16
+ `.qfai/assistant/rule/workflow.md#concurrency-stage-independent-mandatory`.
17
+ Creating a worktree does not grant edit permission. For a refused edit, follow
18
+ `.qfai/assistant/rule/shared-skill-delegation-baseline.md#worker-edit-boundary`.
19
+ Workers do not change another worker's files or the story tree. The orchestrator
20
+ integrates their results and resolves every overlap before judging either item
21
+ complete.
14
22
 
15
23
  ## Integration gate
16
24