qfai 2.2.0 → 2.3.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 (206) hide show
  1. package/README.md +60 -23
  2. package/assets/defaults/workflows/bump-dependency.yml +4 -1
  3. package/assets/defaults/workflows/decide-design.yml +5 -1
  4. package/assets/defaults/workflows/rename-concept.yml +30 -0
  5. package/assets/defaults/workflows/resolve-conflicts.yml +14 -0
  6. package/assets/defaults/workflows/retire-feature.yml +26 -0
  7. package/assets/defaults/workflows/run-release.yml +12 -0
  8. package/assets/init/.claude/settings.json +11 -11
  9. package/assets/init/.codex/hooks.json +9 -9
  10. package/assets/init/.qfai/assistant/agent/architecture-reviewer.md +2 -2
  11. package/assets/init/.qfai/assistant/agent/fullstack-engineer.md +101 -0
  12. package/assets/init/.qfai/assistant/agent/implementation-reviewer.md +78 -1
  13. package/assets/init/.qfai/assistant/agent/product-surface-reviewer.md +10 -5
  14. package/assets/init/.qfai/assistant/agent/requirements-reviewer.md +12 -2
  15. package/assets/init/.qfai/assistant/rule/agent-selection.md +22 -42
  16. package/assets/init/.qfai/assistant/rule/constitution.md +5 -3
  17. package/assets/init/.qfai/assistant/rule/drift-protocol.md +19 -1
  18. package/assets/init/.qfai/assistant/rule/references/asset-authoring.md +1 -1
  19. package/assets/init/.qfai/assistant/rule/references/codex-delegation.md +4 -4
  20. package/assets/init/.qfai/assistant/rule/references/gate-failure-autorepair.md +1 -1
  21. package/assets/init/.qfai/assistant/rule/references/reviewer-findings.md +1 -1
  22. package/assets/init/.qfai/assistant/rule/references/worker-edit-boundary.md +3 -3
  23. package/assets/init/.qfai/assistant/rule/research-first-protocol.md +7 -6
  24. package/assets/init/.qfai/assistant/rule/review-convergence.md +10 -4
  25. package/assets/init/.qfai/assistant/rule/shared-skill-delegation-baseline.md +81 -56
  26. package/assets/init/.qfai/assistant/rule/shared-skill-operating-baseline.md +8 -8
  27. package/assets/init/.qfai/assistant/rule/ui-definition-protocol.md +2 -1
  28. package/assets/init/.qfai/assistant/rule/workflow.md +4 -4
  29. package/assets/init/.qfai/assistant/skill/qfai-configure/SKILL.md +15 -46
  30. package/assets/init/.qfai/assistant/skill/qfai-discussion/SKILL.md +6 -15
  31. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/discussion-completion-matrix.md +15 -2
  32. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md +17 -0
  33. package/assets/init/.qfai/assistant/skill/qfai-discussion/references/ui_ux/trend_scan_playbook.md +3 -1
  34. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/01_Context.md +4 -1
  35. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/04_Sources.md +5 -1
  36. package/assets/init/.qfai/assistant/skill/qfai-discussion/templates/uiux/00_index.md +4 -1
  37. package/assets/init/.qfai/assistant/skill/qfai-grill/SKILL.md +8 -7
  38. package/assets/init/.qfai/assistant/skill/qfai-grilling/SKILL.md +15 -15
  39. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/delegated-session.md +18 -18
  40. package/assets/init/.qfai/assistant/skill/qfai-grilling/references/session-record.md +3 -3
  41. package/assets/init/.qfai/assistant/skill/qfai-implement/SKILL.md +2 -16
  42. package/assets/init/.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md +54 -12
  43. package/assets/init/.qfai/assistant/skill/qfai-implement/references/red-admissibility.md +35 -0
  44. package/assets/init/.qfai/assistant/skill/qfai-implement/references/test-runner-recipes.md +445 -0
  45. package/assets/init/.qfai/assistant/skill/qfai-implement/references/ui-affecting.md +2 -2
  46. package/assets/init/.qfai/assistant/skill/qfai-maintain/SKILL.md +0 -1
  47. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/SKILL.md +2 -13
  48. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-guide.md +8 -11
  49. package/assets/init/.qfai/assistant/skill/qfai-migration-v1-to-v2/references/migration-placement.md +0 -7
  50. package/assets/init/.qfai/assistant/skill/qfai-prototyping/SKILL.md +11 -18
  51. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/generator-prompt.md +34 -3
  52. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/handoff.md +77 -2
  53. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/iteration-loop.md +14 -5
  54. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/review-payload-schema.md +7 -5
  55. package/assets/init/.qfai/assistant/skill/qfai-prototyping/references/reviewer-prompt.md +32 -6
  56. package/assets/init/.qfai/assistant/skill/qfai-run/SKILL.md +17 -18
  57. package/assets/init/.qfai/assistant/skill/qfai-run/references/extraction.md +194 -129
  58. package/assets/init/.qfai/assistant/skill/qfai-run/references/operator-screens.md +33 -18
  59. package/assets/init/.qfai/assistant/skill/qfai-run/references/plan.md +46 -22
  60. package/assets/init/.qfai/assistant/skill/qfai-run/references/reached-step-observations.md +2 -0
  61. package/assets/init/.qfai/assistant/skill/qfai-run/references/stage-points.md +7 -4
  62. package/assets/init/.qfai/assistant/skill/qfai-sdd/SKILL.md +0 -13
  63. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/concrete-abstract-cycle.md +3 -2
  64. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/contract-artifact-rules.md +13 -1
  65. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-execution-playbook.md +2 -2
  66. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-phase-checklists.md +1 -1
  67. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-pre-draft-grilling.md +2 -1
  68. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-quality-gate.md +1 -1
  69. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/sdd-triage.md +83 -6
  70. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/spec-traceability-rules.md +1 -1
  71. package/assets/init/.qfai/assistant/skill/qfai-sdd/references/ui-contract-guide.md +23 -5
  72. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/change-request.md +1 -1
  73. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions/page-NNNN.md +6 -0
  74. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/decisions.md +9 -0
  75. package/assets/init/.qfai/assistant/skill/qfai-sdd/templates/spec/open-questions.md +13 -0
  76. package/assets/init/.qfai/assistant/skill/qfai-triage/SKILL.md +0 -11
  77. package/assets/init/.qfai/assistant/skill/qfai-verify/SKILL.md +0 -9
  78. package/assets/init/.qfai/assistant/skill/qfai-verify/references/verify-output-contract.md +15 -9
  79. package/assets/init/.qfai/assistant/skill/web-research/SKILL.md +19 -19
  80. package/assets/init/.qfai/assistant/step/common-design-md/STEP.md +0 -2
  81. package/assets/init/.qfai/assistant/step/common-gate-run/STEP.md +11 -9
  82. package/assets/init/.qfai/assistant/step/common-grilling-record/STEP.md +15 -3
  83. package/assets/init/.qfai/assistant/step/common-policy-check/STEP.md +0 -1
  84. package/assets/init/.qfai/assistant/step/common-review-cycle/STEP.md +48 -12
  85. package/assets/init/.qfai/assistant/step/discussion-interview/STEP.md +11 -5
  86. package/assets/init/.qfai/assistant/step/discussion-oq/STEP.md +12 -2
  87. package/assets/init/.qfai/assistant/step/discussion-pack/STEP.md +18 -4
  88. package/assets/init/.qfai/assistant/step/discussion-research/STEP.md +0 -2
  89. package/assets/init/.qfai/assistant/step/discussion-uiux/STEP.md +4 -2
  90. package/assets/init/.qfai/assistant/step/implement-acceptance/STEP.md +3 -4
  91. package/assets/init/.qfai/assistant/step/implement-backport/STEP.md +0 -5
  92. package/assets/init/.qfai/assistant/step/implement-benchmark/STEP.md +0 -4
  93. package/assets/init/.qfai/assistant/step/implement-bisect/STEP.md +0 -5
  94. package/assets/init/.qfai/assistant/step/implement-credentials/STEP.md +4 -4
  95. package/assets/init/.qfai/assistant/step/implement-dep-bump/STEP.md +31 -12
  96. package/assets/init/.qfai/assistant/step/implement-diagnose/STEP.md +12 -9
  97. package/assets/init/.qfai/assistant/step/implement-minimize/STEP.md +0 -5
  98. package/assets/init/.qfai/assistant/step/implement-oracle-parity/STEP.md +0 -6
  99. package/assets/init/.qfai/assistant/step/implement-procedure/STEP.md +35 -8
  100. package/assets/init/.qfai/assistant/step/implement-quarantine/STEP.md +0 -4
  101. package/assets/init/.qfai/assistant/step/implement-refactor/STEP.md +25 -9
  102. package/assets/init/.qfai/assistant/step/implement-regression-fix/STEP.md +0 -4
  103. package/assets/init/.qfai/assistant/step/implement-retire/STEP.md +26 -6
  104. package/assets/init/.qfai/assistant/step/implement-revert/STEP.md +0 -4
  105. package/assets/init/.qfai/assistant/step/implement-scaffold/STEP.md +28 -7
  106. package/assets/init/.qfai/assistant/step/implement-seam/STEP.md +0 -4
  107. package/assets/init/.qfai/assistant/step/implement-stress-harness/STEP.md +0 -5
  108. package/assets/init/.qfai/assistant/step/implement-sweep/STEP.md +0 -5
  109. package/assets/init/.qfai/assistant/step/implement-tdd/STEP.md +23 -15
  110. package/assets/init/.qfai/assistant/step/implement-test-fix/STEP.md +0 -5
  111. package/assets/init/.qfai/assistant/step/implement-tooling/STEP.md +0 -3
  112. package/assets/init/.qfai/assistant/step/maintain-edit/STEP.md +71 -10
  113. package/assets/init/.qfai/assistant/step/prototyping-grill/STEP.md +39 -8
  114. package/assets/init/.qfai/assistant/step/prototyping-handoff/STEP.md +12 -5
  115. package/assets/init/.qfai/assistant/step/prototyping-loop/STEP.md +71 -23
  116. package/assets/init/.qfai/assistant/step/prototyping-preflight/STEP.md +5 -2
  117. package/assets/init/.qfai/assistant/step/sdd-contract/STEP.md +10 -4
  118. package/assets/init/.qfai/assistant/step/sdd-cycle/STEP.md +9 -6
  119. package/assets/init/.qfai/assistant/step/sdd-flow/STEP.md +0 -2
  120. package/assets/init/.qfai/assistant/step/sdd-gate/STEP.md +0 -1
  121. package/assets/init/.qfai/assistant/step/sdd-story/STEP.md +22 -3
  122. package/assets/init/.qfai/assistant/step/sdd-triage/STEP.md +54 -20
  123. package/assets/init/.qfai/assistant/step/triage-answer/STEP.md +0 -2
  124. package/assets/init/.qfai/assistant/step/triage-close/STEP.md +7 -4
  125. package/assets/init/.qfai/assistant/step/triage-cluster/STEP.md +0 -2
  126. package/assets/init/.qfai/assistant/step/triage-decompose/STEP.md +0 -2
  127. package/assets/init/.qfai/assistant/step/triage-dedupe/STEP.md +0 -2
  128. package/assets/init/.qfai/assistant/step/triage-handoff/STEP.md +6 -2
  129. package/assets/init/.qfai/assistant/step/triage-investigate/STEP.md +0 -2
  130. package/assets/init/.qfai/assistant/step/triage-operate/STEP.md +76 -5
  131. package/assets/init/.qfai/assistant/step/triage-owned-cleanup/STEP.md +0 -2
  132. package/assets/init/.qfai/assistant/step/triage-request-info/STEP.md +0 -2
  133. package/assets/init/.qfai/assistant/step/triage-security-intake/STEP.md +0 -2
  134. package/assets/init/.qfai/assistant/step/verify-advisory/STEP.md +0 -2
  135. package/assets/init/.qfai/assistant/step/verify-change-note/STEP.md +0 -2
  136. package/assets/init/.qfai/assistant/step/verify-commit/STEP.md +35 -12
  137. package/assets/init/.qfai/assistant/step/verify-context/STEP.md +7 -26
  138. package/assets/init/.qfai/assistant/step/verify-external/STEP.md +0 -2
  139. package/assets/init/.qfai/assistant/step/verify-manual/STEP.md +0 -2
  140. package/assets/init/.qfai/assistant/step/verify-qfai-gate/STEP.md +0 -2
  141. package/assets/init/.qfai/assistant/step/verify-release-notes/STEP.md +0 -2
  142. package/assets/init/.qfai/assistant/step/verify-repeat-run/STEP.md +0 -2
  143. package/assets/init/.qfai/assistant/step/verify-repo-gate/STEP.md +65 -9
  144. package/assets/init/root/.agents/rules/api-budget.md +8 -3
  145. package/assets/init/root/.agents/rules/graph-exploration.md +18 -4
  146. package/assets/init/root/.agents/rules/grilling.md +9 -9
  147. package/assets/init/root/.agents/rules/reminders.json +20 -28
  148. package/assets/init/root/.agents/rules/user-questions.md +21 -11
  149. package/assets/init/root/.gitattributes +2 -0
  150. package/assets/init/root/AGENTS.md +1 -1
  151. package/assets/mdschema/manifest.yml +3 -0
  152. package/assets/mdschema/story/03_contract/tech.mdschema.yml +1 -1
  153. package/assets/mdschema/story/decisions/page-NNNN.mdschema.yml +32 -0
  154. package/assets/mdschema/story/decisions.mdschema.yml +12 -0
  155. package/assets/schemas/workflow/extraction.schema.json +94 -2
  156. package/assets/schemas/workflow/plan.schema.json +34 -1
  157. package/assets/scripts/check-mdschema.mjs +434 -45
  158. package/dist/cli/index.cjs +4991 -3148
  159. package/dist/cli/index.cjs.map +1 -1
  160. package/dist/cli/index.mjs +4780 -2929
  161. package/dist/cli/index.mjs.map +1 -1
  162. package/dist/graph/cli.cjs +14 -2
  163. package/dist/graph/cli.cjs.map +1 -1
  164. package/dist/graph/cli.d.cts +1 -1
  165. package/dist/graph/cli.d.ts +1 -1
  166. package/dist/graph/cli.mjs +14 -2
  167. package/dist/graph/cli.mjs.map +1 -1
  168. package/dist/graph/hook.cjs.map +1 -1
  169. package/dist/graph/hook.mjs.map +1 -1
  170. package/dist/index.cjs +4359 -3843
  171. package/dist/index.cjs.map +1 -1
  172. package/dist/index.d.cts +60 -21
  173. package/dist/index.d.ts +60 -21
  174. package/dist/index.mjs +3594 -3080
  175. package/dist/index.mjs.map +1 -1
  176. package/dist/process-qqX2Owgq.d.cts +18 -0
  177. package/dist/process-qqX2Owgq.d.ts +18 -0
  178. package/package.json +1 -1
  179. package/assets/defaults/agent-routing/_contract.yml +0 -77
  180. package/assets/defaults/agent-routing/common.yml +0 -14
  181. package/assets/defaults/agent-routing/qfai-discussion.yml +0 -57
  182. package/assets/defaults/agent-routing/qfai-implement.yml +0 -236
  183. package/assets/defaults/agent-routing/qfai-maintain.yml +0 -12
  184. package/assets/defaults/agent-routing/qfai-prototyping.yml +0 -48
  185. package/assets/defaults/agent-routing/qfai-sdd.yml +0 -56
  186. package/assets/defaults/agent-routing/qfai-triage.yml +0 -108
  187. package/assets/defaults/agent-routing/qfai-verify.yml +0 -92
  188. package/assets/defaults/agent-routing/skills.yml +0 -59
  189. package/assets/defaults/review-profiles.yml +0 -25
  190. package/assets/init/.qfai/assistant/agent/acceptance-test-engineer.md +0 -81
  191. package/assets/init/.qfai/assistant/agent/backend-engineer.md +0 -90
  192. package/assets/init/.qfai/assistant/agent/completion-reviewer.md +0 -88
  193. package/assets/init/.qfai/assistant/agent/delivery-planner.md +0 -85
  194. package/assets/init/.qfai/assistant/agent/devops-ci-engineer.md +0 -78
  195. package/assets/init/.qfai/assistant/agent/discovery-analyst.md +0 -81
  196. package/assets/init/.qfai/assistant/agent/doc-steward.md +0 -78
  197. package/assets/init/.qfai/assistant/agent/frontend-engineer.md +0 -94
  198. package/assets/init/.qfai/assistant/agent/orchestrator.md +0 -92
  199. package/assets/init/.qfai/assistant/agent/product-experience-architect.md +0 -101
  200. package/assets/init/.qfai/assistant/agent/qa-gatekeeper.md +0 -153
  201. package/assets/init/.qfai/assistant/agent/qa-strategist.md +0 -82
  202. package/assets/init/.qfai/assistant/agent/requirements-analyst.md +0 -96
  203. package/assets/init/.qfai/assistant/agent/solution-architect.md +0 -89
  204. package/assets/init/.qfai/assistant/agent/test-design-analyst.md +0 -132
  205. package/dist/process-C21nTvkT.d.cts +0 -12
  206. package/dist/process-C21nTvkT.d.ts +0 -12
@@ -4,7 +4,7 @@
4
4
 
5
5
  - Verdict file
6
6
  - Per-gate results
7
- - CI-only checks
7
+ - Delegated checks
8
8
  - Scope
9
9
  - Example and rules
10
10
 
@@ -44,22 +44,28 @@ Each entry of `gates` is `{ name, status, command }`, plus these optional fields
44
44
  | `check` | string | On a `"DELEGATED"` gate: the CI check that runs it. |
45
45
  | `ci` | string | On a `"DELEGATED"` gate: `"green"`, `"red"` or `"pending"`, the state of that check when the file is written. |
46
46
 
47
- ## CI-only checks
47
+ ## Delegated checks
48
48
 
49
- A gate the project's Standard commands declare `CI only: <check name>` is
50
- recorded `"DELEGATED"` with its `check` and `ci` for the candidate being evaluated.
49
+ A gate the project's Standard commands declare `CI only: <check name>`, or a
50
+ gate where the user's instruction for this run delegates that gate to a named CI check,
51
+ is recorded `"DELEGATED"` with its `check` and `ci` for the candidate being evaluated.
51
52
  `check` names the actual CI check and `ci` its observed state.
52
53
  A `"red"` check makes the top-level `status` `"FAIL"` for that candidate.
53
54
  A `"pending"` one does not, and `summary` names it. A runnable local gate is
54
- never delegated to avoid running it. Retain an observed FAIL or
55
- UNRUN; neither becomes PASS or DELEGATED because a verification commit is wanted.
55
+ never delegated to avoid running it on the agent's own judgment. Retain an
56
+ observed FAIL or UNRUN; neither becomes PASS or DELEGATED because a verification commit is wanted.
57
+
58
+ A delegation by instruction needs the instruction quoted word for word in the
59
+ stage report, with where it came from. `verify.json` carries only `check` and
60
+ `ci` for it, and `summary` says "delegated by user instruction". Without an
61
+ instruction that can be quoted, the gate is not delegated.
56
62
 
57
63
  A `"PASS"` verdict with pending delegated checks supports only the existing
58
64
  verification-commit allowance under a user instruction or project policy
59
65
  covering that commit and its paths. It does not establish formal completion or
60
66
  permission to push, create a pull request or merge. Every nondelegated gate
61
67
  must pass. A delegated red check stops transport of the same unchanged candidate.
62
- Explicit CI-only delegation covering a transport commit may instead carry actual
68
+ Explicit delegation (CI-only or by instruction) covering a transport commit may instead carry actual
63
69
  changes addressing that failure through the existing planned fix into a new
64
70
  candidate, while HEAD still names the failed commit. Preserve the prior head,
65
71
  check, run and observed result as FAIL; never relabel that evidence pending.
@@ -85,7 +91,7 @@ states to this contract.
85
91
  ## Scope
86
92
 
87
93
  `scope` is a closed enum. Write the gate set this invocation covers through
88
- execution or an explicitly declared matching CI-only check. Delegation never
94
+ execution or a matching delegated (CI-only or by instruction) check. Delegation never
89
95
  claims that the profile already ran; its check must perform the required scan
90
96
  and profile. A whole-repository scope still requires full validation. Write the
91
97
  one that matches the stage you were invoked for:
@@ -120,7 +126,7 @@ Rules:
120
126
  commit described above. A `FAIL` verdict is a legitimate output; downstream
121
127
  work stops as its gate requires.
122
128
  - Never write a `scope` this invocation does not cover by execution or its
123
- declared matching CI-only check. Writing `"prototyping"` for a `full` gate set
129
+ matching delegated (CI-only or by instruction) check. Writing `"prototyping"` for a `full` gate set
124
130
  is a false verdict, not a workaround. A `--profile verify` gate is
125
131
  `scope: "full"`, not `scope: "atdd"`; `atdd` covers the ATDD gate set only.
126
132
  - Do not add a `version` / `schemaVersion` field. No reader validates one, and a second version series in a distributed artifact is exactly what the distributed-surface rule forbids: the npm package version is the only version this surface has.
@@ -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
 
@@ -33,9 +32,12 @@ Follow `.qfai/assistant/rule/shared-skill-delegation-baseline.md`.
33
32
  The sections below add only pipeline-specific detail; where they and the
34
33
  baseline overlap, the baseline governs.
35
34
 
36
- ### Orchestrator Protocol
35
+ ### Session Agent Protocol
37
36
 
38
- - The orchestrator may write the research artifact itself, or give independent searches to sub-agents that run in parallel.
37
+ - The session agent frames the research and writes the research artifact itself.
38
+ - Two or more self-contained searches or fetches may run in parallel on
39
+ `fullstack-engineer` with no owned paths, under the parallel-unit gate; the
40
+ session agent reads their answers.
39
41
  - It never approves its own work.
40
42
 
41
43
  ## Work Orders Summary
@@ -46,17 +48,16 @@ Use the shared schema from `.qfai/assistant/rule/shared-skill-delegation-baselin
46
48
  collision cannot be detected from the evidence afterwards. Typical pipeline
47
49
  steps:
48
50
 
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 |
51
+ | Step | Agent (sub-agent) | Agent instance | Task title | Input (refs) | Output (refs) | Status (PASS/REVISE/PENDING) |
52
+ | ---- | ----------------------- | --------------- | -------------------------- | --------------- | ----------------- | ---------------------------- |
53
+ | 1 | `fullstack-engineer` | `<instance id>` | Answer one lookup question | The question | Cited answer | PASS/REVISE |
54
+ | 2 | `requirements-reviewer` | `<instance id>` | Review evidence and claims | Notes + sources | Approval decision | PASS/REVISE |
54
55
 
55
56
  ### Reviewer Gate
56
57
 
57
58
  - The final completion gate must be performed by an independent reviewer, as defined
58
59
  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
60
+ Being briefed as the reviewer does not by itself make an agent independent: an agent
60
61
  that drafted or edited any artifact under review is disqualified for the whole run,
61
62
  and must hand the same evidence set to a non-participating reviewer instead of
62
63
  returning `PASS`.
@@ -215,16 +216,15 @@ Default TTL: **24 hours** (24h).
215
216
 
216
217
  Cache is stored under `.qfai/cache/web-research/` using content-addressable storage.
217
218
 
218
- ## 8. Sub-Agent Architecture
219
+ ## 8. Parallel Lookups
219
220
 
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).
225
-
226
- Sub-agents communicate via structured message passing and share
227
- the session log as the coordination artifact.
221
+ The session agent runs every stage itself. Within the search (Stage 1), fetch
222
+ (Stage 3) and verify (Stage 7) stages, two or more self-contained questions may
223
+ run in parallel, each on a `fullstack-engineer` with no owned paths, under the
224
+ parallel-unit gate of
225
+ `.qfai/assistant/skill/qfai-implement/references/parallelization-policy.md`.
226
+ Each worker writes nothing and returns its answer with its sources; the session
227
+ agent records them in the session log.
228
228
 
229
229
  ## 9. Error Handling
230
230
 
@@ -350,4 +350,4 @@ Create lightweight evidence that records:
350
350
  - Need more evidence:
351
351
  Action: rerun the pipeline with refined query, allowlist, or `--max-depth` settings.
352
352
  - Reviewer returned REVISE:
353
- Action: fix or answer each cited gap and record it before reuse; no second review runs.
353
+ Action: fix or answer each cited gap and record it before reuse; a fix that changes behaviour gets the one re-review `common-review-cycle` sets.
@@ -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
@@ -3,7 +3,6 @@ name: common-gate-run
3
3
  owner: common
4
4
  purpose: "Run one gate — a qfai validate profile or a project command from the Standard commands — and record its command, result and revision, so a gate that did not run is never read as a pass."
5
5
  requires: []
6
- roles: []
7
6
  ---
8
7
 
9
8
  # common-gate-run
@@ -35,7 +34,9 @@ Neither is restated here.
35
34
 
36
35
  1. **Determine applicable gates before resolving commands.** Use the calling
37
36
  stage's scope and the project's declared scope. Do not narrow the gate set
38
- from the diff alone. Decide whether the conditional `Build` (if relevant)
37
+ from the diff alone: a gate that looks unrelated to the change, such as a
38
+ test gate for a change to documents only, is still run and its result
39
+ recorded. Decide whether the conditional `Build` (if relevant)
39
40
  and `Pack / distribution` (if distributed) gates apply from those scopes.
40
41
  When a condition is false, omit its gate from `gates` and record the reason
41
42
  in the stage report. A required gate with a missing command, launcher or
@@ -52,7 +53,8 @@ Neither is restated here.
52
53
  An entry written `CI only: <check name>` instead of a command is not run
53
54
  here: record the gate DELEGATED with that check name. Record its `ci` state
54
55
  as `green`, `red` or `pending` from the pull request when one exists; with no
55
- result yet, record `pending`.
56
+ result yet, record `pending`. Where the user's instruction for this run
57
+ delegates that gate to a named CI check, record it the same way, as `verify-repo-gate` says.
56
58
  4. **Run it** on the tree the stage will hand to its reviewer, in the
57
59
  environment the `Runtime` and `Platform` rows declare.
58
60
  5. **Report** in the stage report: the exact
@@ -159,12 +161,12 @@ This human receipt changes no gate status or JSON field and adds no runner.
159
161
 
160
162
  ## Outcomes
161
163
 
162
- | Outcome | Means |
163
- | ----------- | ------------------------------------------------------------------ |
164
- | `PASS` | The command ran on the reviewed tree and exited 0 with zero errors |
165
- | `FAIL` | The command ran and reported an error or a non-zero exit |
166
- | `UNRUN` | No command, no launcher, or no environment to run it in |
167
- | `DELEGATED` | The project runs the gate in CI only, by the check its entry names |
164
+ | Outcome | Means |
165
+ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
166
+ | `PASS` | The command ran on the reviewed tree and exited 0 with zero errors |
167
+ | `FAIL` | The command ran and reported an error or a non-zero exit |
168
+ | `UNRUN` | No command, no launcher, or no environment to run it in |
169
+ | `DELEGATED` | The project runs the gate in CI only, by the check its entry names, or the user's instruction for this run delegates that gate to a named CI check |
168
170
 
169
171
  Only `PASS` satisfies a gate here. A `DELEGATED` gate is satisfied by its CI
170
172
  check, which runs on the pull request: it is not a pass, and it is not a
@@ -3,7 +3,6 @@ name: common-grilling-record
3
3
  owner: common
4
4
  purpose: "Write the record of the discussion stage's grilling session in the stage report, so a session that ran and one that was skipped can be told apart."
5
5
  requires: []
6
- roles: []
7
6
  ---
8
7
 
9
8
  # common-grilling-record
@@ -44,8 +43,9 @@ Each decision record carries the four labelled Approach items stated at the top
44
43
 
45
44
  ## One session
46
45
 
47
- The stage holds one session per run. The row goes in the stage report, under
48
- `## Grilling Session`, and is written before the first authored file:
46
+ The stage holds one session per run, except a reopened node, below. The row
47
+ goes in the stage report, under `## Grilling Session`, and is written before
48
+ the first authored file:
49
49
 
50
50
  ```text
51
51
  | Ended | Ended at | Authoring began | Frontier | Lookups | Decisions | Escalated |
@@ -63,3 +63,15 @@ Record these in the stage evidence, not as a fictional human option answer.
63
63
  `Ended at` and `Authoring began` are actual timestamps, with authoring later.
64
64
  A missing hard-required consumed input authorizes no authoring ending.
65
65
  Allowing authoring is not a completion or validation receipt.
66
+
67
+ ## A reopened node
68
+
69
+ A critical decision found while authoring reopens the session for that node
70
+ only, for one round to the user. Append one row for that round under the same
71
+ header, with its own `Ended`, `Ended at` and `Authoring began`, before authoring
72
+ resumes. The earlier rows stay as written. A stopped round is reported, not written.
73
+
74
+ The round runs until no node it opened is left open, or until what is still
75
+ open is recorded as labelled assumptions or `11_OQ-Register.md` entries. Under
76
+ a no-question mode the row's `Ended` is `no-question`, and the decision is
77
+ registered in `11_OQ-Register.md`.
@@ -3,7 +3,6 @@ name: common-policy-check
3
3
  owner: common
4
4
  purpose: "Once, at the start of a run, find the project facts in policy and technology that are missing or stale, fill the verified ones the run owns, and record what cannot be verified."
5
5
  requires: []
6
- roles: []
7
6
  ---
8
7
 
9
8
  # common-policy-check
@@ -3,7 +3,6 @@ name: common-review-cycle
3
3
  owner: common
4
4
  purpose: "Run a review the route or the parent skill calls for: dispatch the independent reviewers once, fix or answer every finding, and report the result."
5
5
  requires: []
6
- roles: []
7
6
  ---
8
7
 
9
8
  # common-review-cycle
@@ -40,8 +39,25 @@ them; it is the procedure that applies them.
40
39
  reviewer. A side is reviewed when it is on the default branch or a review of
41
40
  this route or its pull request covered its commits. A resolution that adds
42
41
  content neither side had is not conflict-only. The stage report names the
43
- merge and why no reviewer ran. A parent skill invoked by name uses the
44
- reviewers its own `## Review` section names, such as `qfai-discussion`'s.
42
+ merge and why no reviewer ran. In the `resolve-conflicts` route, a
43
+ resolution that touches a story-tree file, a contract, or `decisions.md` or
44
+ `open-questions.md` is not exempt: it gets the code review, and
45
+ `architecture-reviewer` too for a contract. A parent skill invoked by name
46
+ uses the reviewers its own `## Review` section names, such as `qfai-discussion`'s.
47
+
48
+ In a route, a code review whose target replaces at most five lines, a
49
+ replaced line counting once, and no line added or removed, each changing
50
+ only a literal value such as a version, a number, a name or a flag in a
51
+ configuration or build file, gets no reviewer. A change to code, tests, a
52
+ story-tree or contract file, a screen or a file's structure is not
53
+ literal-only, and neither is a change that touches permissions, secrets,
54
+ credentials or tokens; a URL, host, registry, image or action reference; a
55
+ dependency or tool version resolved from the network; a workflow trigger; a
56
+ setting that turns a check, lint rule, type check, gate or test on or off;
57
+ any text inside a shell command, script or recipe; or a package's own
58
+ version, or any value a release, tag or publish job reads. The stage report
59
+ and the final report both name the skip, the changed lines and why no
60
+ reviewer ran.
45
61
 
46
62
  - **The review target.** The specification review: every path and ID the
47
63
  stage it follows wrote or changed, and the source it was written from. The
@@ -58,17 +74,30 @@ them; it is the procedure that applies them.
58
74
  focus. Put the answers an earlier stage recorded on the same artifact into
59
75
  this review's request before dispatching reviewers, under
60
76
  `.qfai/assistant/rule/review-convergence.md#answered-demands-must`.
61
- 2. **Dispatch.** Send each reviewer a work order in the shared template. An
62
- agent that authored, edited or recommended a decision in the reviewed
63
- artifact is not its independent reviewer. The session report names its
64
- authors, editors and decision recommenders, and the independent reviewers.
77
+ For the code review, name each test the run recorded `red: ci-deferred`:
78
+ the reviewer reads it against the code before the fix and confirms that
79
+ its assertion fails there
80
+ (`.qfai/assistant/skill/qfai-implement/references/red-admissibility.md#ci-only-test-gate`).
81
+ 2. **Dispatch.** The session agent sends each reviewer a work order in the
82
+ shared template, never a stage worker. An agent that authored, edited or
83
+ recommended a decision in the reviewed artifact is not its independent
84
+ reviewer. The session report names its authors, editors and decision
85
+ recommenders, and the independent reviewers.
65
86
  Each reviewer returns a verdict, `PASS` or `REVISE`, and its
66
87
  findings, in the shared reviewer response template.
67
88
  3. **Address every finding** once: fix it in its owning source with the
68
89
  smallest edit that resolves it, or record a reasoned answer beside it, and
69
90
  rerun the tests a fix touches. An upstream finding is not repaired here:
70
- stop under `.qfai/assistant/rule/drift-protocol.md`. No reviewer is rerun.
71
- 4. **Complete** once every reviewer has responded and every finding is fixed or
91
+ stop under `.qfai/assistant/rule/drift-protocol.md`.
92
+ 4. **Re-review a behaviour fix** once. A fix that changes behaviour (code, a
93
+ test's assertions or a contract statement, not wording alone) goes back to
94
+ the reviewer whose finding it fixed: each reviewer whose findings had a
95
+ behaviour fix re-reviews the combined diff of those fixes, once, and reads
96
+ nothing else. Fix or answer each finding of that re-review as step 3 says, with no further
97
+ re-review. A fix that changes wording only gets no re-review. No other
98
+ reviewer is rerun.
99
+ 5. **Complete** once every reviewer has responded, each behaviour fix has had
100
+ its one re-review, and every finding is fixed or
72
101
  answered. A finding the author cannot fix goes in the stage's final report;
73
102
  a critical decision goes to the user
74
103
  (`.qfai/assistant/rule/review-convergence.md#one-review`).
@@ -76,12 +105,19 @@ them; it is the procedure that applies them.
76
105
  ## Writes
77
106
 
78
107
  - In the stage report: each reviewer's verdict, the findings, and how each was
79
- fixed or answered.
108
+ fixed or answered, and for each behaviour fix its re-review's verdict and
109
+ findings.
110
+ - For a code review skipped as a small literal-only change: the skip, the
111
+ changed lines and why no reviewer ran, in the stage report and in the final
112
+ report.
80
113
 
81
114
  ## Gate
82
115
 
83
- Every routed reviewer responded once, every finding is fixed or answered, and
116
+ Every required reviewer responded once, each behaviour fix had its one focused
117
+ re-review, every finding is fixed or answered, and
84
118
  the stage report names each verdict and each answer, or says why the review
85
- dispatched no reviewer. A finding the author
119
+ dispatched no reviewer. For a code review skipped as a small literal-only
120
+ change, the stage report names the skip, the changed lines and why, and records
121
+ the skip for the final report. A finding the author
86
122
  cannot fix is in the stage's final report, and a critical decision has gone to
87
123
  the user.
@@ -3,8 +3,6 @@ name: discussion-interview
3
3
  owner: qfai-discussion
4
4
  purpose: "Interview the user as a grilling session and record how and when it ended."
5
5
  requires: [common-grilling-record]
6
- roles: [discovery-analyst, requirements-analyst, solution-architect, product-experience-architect]
7
- routing-profile: default
8
6
  ---
9
7
 
10
8
  # discussion-interview
@@ -50,7 +48,9 @@ is in place.
50
48
  a `visual.*` token tree for one. The design direction belongs in this session
51
49
  because `discussion-pack` records it after the pack is authored, and a
52
50
  user-owned visual choice asked there is asked after the thing it governs is
53
- written.
51
+ written. Skip the design-DNA questions when the classification declares
52
+ `design_direction: inherit`, under the conditions of
53
+ `.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md#inheriting-the-current-designmd`.
54
54
  4. The research findings are inputs to the session's tree, not a later fill-in:
55
55
  a decision settled before the research that bears on it is settled against
56
56
  evidence nobody had, and the method reads a fact rather than asking about it.
@@ -134,6 +134,11 @@ off that row. Without it a skipped session and a completed one present the same
134
134
  pack — nine files, every topic covered, every open question registered — so
135
135
  the reviewer would have to block every run or accept a claim it cannot check.
136
136
 
137
+ The agent that holds the session writes the row, `Ended at` included. Where
138
+ another agent authors the pack, write the row before delegating, and pass the
139
+ row to the pack author, who copies it unchanged into the stage report it
140
+ writes and does not reconstruct it.
141
+
137
142
  A `stopped` session writes no row: the ending is reported, and no later step
138
143
  runs.
139
144
 
@@ -141,8 +146,9 @@ runs.
141
146
 
142
147
  The reviewer confirms:
143
148
 
144
- - the stage report's `## Grilling Session` row shows the session ended before
145
- authoring began, with `Ended` one of `confirmed`, `user-closed`,
149
+ - every row of the stage report's `## Grilling Session` table has its
150
+ `Ended at` before its own `Authoring began` (for a reopened row, when
151
+ authoring resumed), with `Ended` one of `confirmed`, `user-closed`,
146
152
  `no-question`, or `adopted` with the recorded explicit-delegation conditions
147
153
  verified;
148
154
  - every decision the session settled is recorded where
@@ -3,8 +3,6 @@ name: discussion-oq
3
3
  owner: qfai-discussion
4
4
  purpose: "Register every open question the discussion leaves, and drive the open count to zero."
5
5
  requires: []
6
- roles: [requirements-analyst]
7
- routing-profile: default
8
6
  ---
9
7
 
10
8
  # discussion-oq
@@ -23,6 +21,18 @@ human authority in the stage evidence; the ending label alone is insufficient.
23
21
  Without that row, or with
24
22
  `Ended: stopped`, write nothing and stop.
25
23
 
24
+ ## A critical decision found while authoring
25
+
26
+ A decision found while registering that is critical under
27
+ `.agents/rules/grilling.md#critical-decisions` reopens the session for that
28
+ node only. Stop writing, ask the user one round on that node, record the round
29
+ as `.qfai/assistant/step/common-grilling-record/STEP.md#a-reopened-node` says,
30
+ then resume. The rest of the session's record stays as it is.
31
+ Recording the decision as an assumption is allowed only under a no-question
32
+ mode, labelled beside its open question.
33
+ A stop in that round ends the run as `stopped` does: no row is written,
34
+ writing stops, and the report names the pack files already written and the open node.
35
+
26
36
  ## Reads
27
37
 
28
38
  - `.qfai/assistant/skill/qfai-discussion/references/oq-and-deferred-rules.md`
@@ -3,8 +3,6 @@ name: discussion-pack
3
3
  owner: qfai-discussion
4
4
  purpose: "Author the discussion pack from what the interview settled."
5
5
  requires: []
6
- roles: [requirements-analyst, solution-architect, product-experience-architect]
7
- routing-profile: default
8
6
  ---
9
7
 
10
8
  # discussion-pack
@@ -25,6 +23,18 @@ or with `Ended: stopped`, write no pack file and stop. A pack drafted
25
23
  mid-session records a design that was still being decided, and the draft is
26
24
  what the rest of the run then defends.
27
25
 
26
+ ## A critical decision found while authoring
27
+
28
+ A decision found while authoring that is critical under
29
+ `.agents/rules/grilling.md#critical-decisions` reopens the session for that
30
+ node only. Stop writing the pack, ask the user one round on that node, record
31
+ the round as `.qfai/assistant/step/common-grilling-record/STEP.md#a-reopened-node`
32
+ says, then resume. The rest of the session's record stays as it is.
33
+ Recording the decision as an assumption is allowed only under a no-question
34
+ mode, labelled beside its open question.
35
+ A stop in that round ends the run as `stopped` does: no row is written,
36
+ writing stops, and the report names the pack files already written and the open node.
37
+
28
38
  ## Passes when
29
39
 
30
40
  Read first: the pack under work and the interview's answers. The step passes
@@ -79,7 +89,10 @@ and the `uiux/` sidecars. Root DESIGN.md is not a discussion output.
79
89
  choice is made in the session, not here; this step writes it down. Required
80
90
  when any classified surface — primary or secondary — is `web`, `mobile`,
81
91
  `desktop` or `mixed`; skip for cli-only and non-ui targets. The answers, not
82
- a rendered brand file, are the handoff.
92
+ a rendered brand file, are the handoff. A pack whose classification declares
93
+ `design_direction: inherit` records no direction and skips the registries
94
+ and the 40/50 sidecars, under the conditions of
95
+ `.qfai/assistant/skill/qfai-discussion/references/ui-bearing-playbook.md#inheriting-the-current-designmd`.
83
96
  8. Generate `prototyping.yaml` only for a visual prototyping surface; a cli-only pack emits none.
84
97
  Write it where the pack targets `web`, `mobile`, `desktop` or `mixed` and an
85
98
  explicit prototyping recommendation is useful. `/qfai-prototyping` rejects
@@ -108,7 +121,8 @@ Decide whether the target is UI-bearing with
108
121
  `/qfai-sdd`'s `common-design-md` step turns into root `DESIGN.md` front matter and
109
122
  its `# Brand Philosophy` body, so an entry left blank leaves a brand field
110
123
  with nothing behind it. A registry `reference` resolves to a URL, repository
111
- path, or `SRC-ID`.
124
+ path, or `SRC-ID`. A pack declaring `design_direction: inherit` owes neither
125
+ registry nor the Trend Scan (see step 7).
112
126
 
113
127
  Discussion is planner-first: carry the screen explorations unranked and do not
114
128
  finalize the design system here. The brand direction is the exception — which
@@ -3,8 +3,6 @@ name: discussion-research
3
3
  owner: qfai-discussion
4
4
  purpose: "Record the research the interview reads."
5
5
  requires: []
6
- roles: [delivery-planner, discovery-analyst]
7
- routing-profile: default
8
6
  ---
9
7
 
10
8
  # discussion-research
@@ -3,8 +3,6 @@ name: discussion-uiux
3
3
  owner: qfai-discussion
4
4
  purpose: "Write the screen-level sidecars of a UI-bearing discussion pack."
5
5
  requires: []
6
- roles: [product-experience-architect]
7
- routing-profile: default
8
6
  ---
9
7
 
10
8
  # discussion-uiux
@@ -52,6 +50,10 @@ including `cli`:
52
50
  - `uiux/40_screen_contracts.md`
53
51
  - `uiux/50_review_input_bundle.md`
54
52
 
53
+ A pack whose classification declares `design_direction: inherit` may leave out
54
+ the last two, and writes no Trend Scan or competitor references; the playbook
55
+ above says when the declaration is allowed.
56
+
55
57
  ## Procedure
56
58
 
57
59
  1. Write `40_screen_contracts.md` with every screen contract in the template's
@@ -3,10 +3,6 @@ name: implement-acceptance
3
3
  owner: qfai-implement
4
4
  purpose: "Write the bodies of a business flow's empty acceptance tests, keeping each test's annotation and file."
5
5
  requires: [common-gate-run]
6
- roles:
7
- - acceptance-test-engineer
8
- - devops-ci-engineer
9
- routing-profile: default
10
6
  ---
11
7
 
12
8
  # implement-acceptance
@@ -24,6 +20,9 @@ step writes the assertions those bodies owe.
24
20
  contracts, under `paths.contractsDir`.
25
21
  - The worker session setup `implement-credentials` wrote, when a test needs an
26
22
  authenticated actor.
23
+ - When a test depends on business time, shares a database or server with
24
+ other workers, or feeds a required CI check:
25
+ `.qfai/assistant/skill/qfai-implement/references/test-runner-recipes.md`.
27
26
 
28
27
  ## Writes
29
28
 
@@ -3,11 +3,6 @@ name: implement-backport
3
3
  owner: qfai-implement
4
4
  purpose: "Check that a merged change meets the project's backport criteria and carry it onto the release branch it names, passing that branch's gates."
5
5
  requires: [common-gate-run]
6
- roles:
7
- - devops-ci-engineer
8
- - frontend-engineer
9
- - backend-engineer
10
- routing-profile: default
11
6
  ---
12
7
 
13
8
  # implement-backport
@@ -3,10 +3,6 @@ name: implement-benchmark
3
3
  owner: qfai-implement
4
4
  purpose: "Measure a slow path under fixed conditions, before a change as its baseline and after it for comparison, and record the numbers without changing any tracked file."
5
5
  requires: [common-gate-run]
6
- roles:
7
- - devops-ci-engineer
8
- - qa-strategist
9
- routing-profile: default
10
6
  ---
11
7
 
12
8
  # implement-benchmark
@@ -3,11 +3,6 @@ name: implement-bisect
3
3
  owner: qfai-implement
4
4
  purpose: "Find the change that broke a behaviour between a revision where it worked and one where it fails, without changing any tracked file."
5
5
  requires: [common-gate-run]
6
- roles:
7
- - devops-ci-engineer
8
- - frontend-engineer
9
- - backend-engineer
10
- routing-profile: default
11
6
  ---
12
7
 
13
8
  # implement-bisect
@@ -3,10 +3,6 @@ name: implement-credentials
3
3
  owner: qfai-implement
4
4
  purpose: "Set up per-worker sign-in reuse for acceptance tests that need an authenticated actor."
5
5
  requires: []
6
- roles:
7
- - acceptance-test-engineer
8
- - devops-ci-engineer
9
- routing-profile: default
10
6
  ---
11
7
 
12
8
  # implement-credentials
@@ -31,6 +27,10 @@ in scope needs an authenticated actor.
31
27
  Follow `.qfai/assistant/skill/qfai-implement/references/credential-reuse.md`.
32
28
  It holds the seven session-reuse rules, the rule for a caller-injected
33
29
  environment and a worked example. Keep actors and sessions isolated by worker.
30
+ For a Playwright or Vitest suite, the optional recipes in
31
+ `.qfai/assistant/skill/qfai-implement/references/test-runner-recipes.md` put
32
+ the rules into code, with the business data, shared-state, credential
33
+ directory and CI aggregate patterns around them.
34
34
 
35
35
  ## Passes when
36
36
 
@@ -3,11 +3,6 @@ name: implement-dep-bump
3
3
  owner: qfai-implement
4
4
  purpose: "Raise a dependency to a new version and check that the runtime, the version floors the project declares, and every call into it still hold."
5
5
  requires: [common-gate-run]
6
- roles:
7
- - devops-ci-engineer
8
- - frontend-engineer
9
- - backend-engineer
10
- routing-profile: default
11
6
  ---
12
7
 
13
8
  # implement-dep-bump
@@ -46,20 +41,44 @@ the section "Keeping QFAI itself up to date" of `node_modules/qfai/README.md`:
46
41
  `init --force`, the retired files the release notes list, then `doctor` and
47
42
  `validate`. `init --force` replaces the skills and steps in use, so read the
48
43
  next step from disk after it runs. What `doctor` and `validate` report is part
49
- of the update: a new required key in `qfai.config.yaml`, and an edit to a spec
50
- contract, which needs its change request in `decisions.md` under
51
- `paths.specsDir`, as `.qfai/assistant/rule/drift-protocol.md` describes, before
52
- the contract file changes.
44
+ of the update: this step writes a new required key in `qfai.config.yaml`, and a
45
+ finding that names a spec contract moves the work as the next section says.
46
+
47
+ ## When a finding names a contract
48
+
49
+ When `validate`, or another check the update runs, reports a finding that
50
+ names a spec contract to change, leave the contract unchanged. Finish every
51
+ other part of the update first, so the contract finding is the only open item.
52
+ Then get the change approved as `.qfai/assistant/rule/drift-protocol.md`
53
+ describes:
54
+
55
+ 1. Put the finding, the contract it names and the fix it states to the
56
+ operator as a critical decision: return `awaiting_input` and change nothing
57
+ more. The attempt holding the answer carries on.
58
+ 2. On approval, append one `Change request:` row to `decisions.md` under
59
+ `paths.specsDir`. Its Content names the contract's path, and its Approach
60
+ records the finding, the fix, who approved it and when. The row starts at
61
+ WIP.
62
+ 3. Report `branch: { outcome: contract-finding }` citing that row's DEC ID.
63
+ The work moves to `apply-settled`, whose `spec` stage edits the contract
64
+ under its change request. Its settled triage applies the cited row.
65
+
66
+ On a decline, append the row at REJECTED, leave the contract as it is and
67
+ report the finding as unresolved, with no branch. When the operator cannot be
68
+ asked, write no row and report the change as the decision still needed.
53
69
 
54
70
  ## What it writes
55
71
 
56
72
  - The actual changed paths for the manifest, lockfile and any adapted call,
57
73
  listed in the stage report. When the dependency is `qfai` itself, they also
58
- include a new key in `qfai.config.yaml` and a spec-contract edit with its
59
- change request.
74
+ include a new key in `qfai.config.yaml`.
75
+ - On a contract finding the operator answered, the change request row in
76
+ `decisions.md`, and its DEC ID in the stage report.
60
77
  - A record of the versions, the breaking changes read and how each was met, in the stage report.
61
78
 
62
79
  ## Gate
63
80
 
64
81
  The step is done when the target version is installed, the runtime check and
65
- every breaking change are recorded as met, and the relevant suite passes.
82
+ every breaking change are recorded as met, and the relevant suite passes, or
83
+ when every other part of the update is met and recorded and the only finding
84
+ left is the contract one, which it reports as `contract-finding`.