@bonesofspring/ai-rules 0.2.42 → 0.2.43

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 (221) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/bin/lib/seed-ai-local-team.js +41 -4
  3. package/docs/LOCAL-OVERLAY.md +3 -1
  4. package/docs/specs/INDEX.md +3 -1
  5. package/docs/specs/_templates/feature.md +6 -0
  6. package/package.json +1 -1
  7. package/presets/_shared/assets/docs-specs/_templates/feature.md +6 -0
  8. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +21 -5
  9. package/presets/_shared/core/agent-team/plan-graph.md +9 -1
  10. package/presets/_shared/core/quality/anti-hallucination-contract.md +2 -0
  11. package/presets/_shared/core/quality/context-and-iteration.md +2 -1
  12. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +1080 -4
  13. package/presets/claude/android-kotlin/commands/task-continue.md +1 -1
  14. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  15. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  16. package/presets/claude/android-kotlin/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  17. package/presets/claude/go/commands/task-continue.md +1 -1
  18. package/presets/claude/go/hooks/chain-team-phases.sh +1080 -4
  19. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  20. package/presets/claude/go/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  21. package/presets/claude/ios-swift/commands/task-continue.md +1 -1
  22. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +1080 -4
  23. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  24. package/presets/claude/ios-swift/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  25. package/presets/claude/java/commands/task-continue.md +1 -1
  26. package/presets/claude/java/hooks/chain-team-phases.sh +1080 -4
  27. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  28. package/presets/claude/java/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  29. package/presets/claude/mcp-ts/commands/task-continue.md +1 -1
  30. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  31. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  32. package/presets/claude/mcp-ts/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  33. package/presets/claude/next/REPO_AGENTS.md +1 -1
  34. package/presets/claude/next/agents/openspec-author.md +26 -2
  35. package/presets/claude/next/agents/task-analyst.md +15 -6
  36. package/presets/claude/next/agents/task-router.md +20 -2
  37. package/presets/{cursor/next/ai-local/rules-library → claude/next/ai-local/rules}/task-levels.md +2 -0
  38. package/presets/claude/next/commands/task-continue.md +1 -1
  39. package/presets/claude/next/hooks/chain-team-phases.sh +1080 -4
  40. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  41. package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +1 -1
  42. package/presets/claude/next/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  43. package/presets/claude/nuxt/agents/README.md +1 -1
  44. package/presets/claude/nuxt/commands/task-continue.md +1 -1
  45. package/presets/claude/nuxt/hooks/chain-team-phases.sh +1080 -4
  46. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  47. package/presets/claude/nuxt/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  48. package/presets/claude/php-hexagonal/commands/task-continue.md +1 -1
  49. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  50. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  51. package/presets/claude/php-hexagonal/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  52. package/presets/claude/php-laravel/commands/task-continue.md +1 -1
  53. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +1080 -4
  54. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  55. package/presets/claude/php-laravel/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  56. package/presets/claude/svelte/agents/README.md +1 -1
  57. package/presets/claude/svelte/commands/task-continue.md +1 -1
  58. package/presets/claude/svelte/hooks/chain-team-phases.sh +1080 -4
  59. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +21 -5
  60. package/presets/claude/svelte/rules/tooling-and-review/anti-hallucination-contract.md +2 -0
  61. package/presets/cursor/android-kotlin/commands/task-continue.md +1 -1
  62. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  63. package/presets/cursor/android-kotlin/rules/anti-hallucination-contract.mdc +2 -0
  64. package/presets/cursor/go/commands/task-continue.md +1 -1
  65. package/presets/cursor/go/hooks/chain-team-phases.sh +1080 -4
  66. package/presets/cursor/go/rules/anti-hallucination-contract.mdc +2 -0
  67. package/presets/cursor/ios-swift/commands/task-continue.md +1 -1
  68. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +1080 -4
  69. package/presets/cursor/ios-swift/rules/anti-hallucination-contract.mdc +2 -0
  70. package/presets/cursor/java/commands/task-continue.md +1 -1
  71. package/presets/cursor/java/hooks/chain-team-phases.sh +1080 -4
  72. package/presets/cursor/java/rules/anti-hallucination-contract.mdc +2 -0
  73. package/presets/cursor/mcp-ts/commands/task-continue.md +1 -1
  74. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  75. package/presets/cursor/mcp-ts/rules/anti-hallucination-contract.mdc +2 -0
  76. package/presets/cursor/next/REPO_AGENTS.md +1 -1
  77. package/presets/cursor/next/agents/README.md +1 -1
  78. package/presets/cursor/next/agents/build-verifier.md +2 -0
  79. package/presets/cursor/next/agents/feature-developer.md +9 -0
  80. package/presets/cursor/next/agents/openspec-author.md +26 -2
  81. package/presets/cursor/next/agents/task-analyst.md +20 -6
  82. package/presets/cursor/next/agents/task-router.md +31 -2
  83. package/presets/cursor/next/ai-local/conventions.md +20 -0
  84. package/presets/{mavis/next/ai-local/rules-library → cursor/next/ai-local/rules}/task-levels.md +12 -0
  85. package/presets/cursor/next/commands/task-continue.md +1 -1
  86. package/presets/cursor/next/hooks/chain-team-phases.sh +1080 -4
  87. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +18 -2
  88. package/presets/cursor/next/rules/ai-local-overlay.mdc +1 -1
  89. package/presets/cursor/next/rules/anti-hallucination-contract.mdc +2 -0
  90. package/presets/cursor/nuxt/agents/README.md +1 -1
  91. package/presets/cursor/nuxt/commands/task-continue.md +1 -1
  92. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +1080 -4
  93. package/presets/cursor/nuxt/rules/anti-hallucination-contract.mdc +2 -0
  94. package/presets/cursor/php-hexagonal/commands/task-continue.md +1 -1
  95. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  96. package/presets/cursor/php-hexagonal/rules/anti-hallucination-contract.mdc +2 -0
  97. package/presets/cursor/php-laravel/commands/task-continue.md +1 -1
  98. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +1080 -4
  99. package/presets/cursor/php-laravel/rules/anti-hallucination-contract.mdc +2 -0
  100. package/presets/cursor/svelte/agents/README.md +1 -1
  101. package/presets/cursor/svelte/commands/task-continue.md +1 -1
  102. package/presets/cursor/svelte/hooks/chain-team-phases.sh +1080 -4
  103. package/presets/cursor/svelte/rules/anti-hallucination-contract.mdc +2 -0
  104. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  105. package/presets/mavis/android-kotlin/commands/task-continue.md +1 -1
  106. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  107. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +21 -5
  108. package/presets/mavis/android-kotlin/rules/anti-hallucination-contract.md +2 -0
  109. package/presets/mavis/go/adapter-map.json +1 -1
  110. package/presets/mavis/go/commands/task-continue.md +1 -1
  111. package/presets/mavis/go/hooks/chain-team-phases.sh +1080 -4
  112. package/presets/mavis/go/rules/agent-team-orchestrator.md +21 -5
  113. package/presets/mavis/go/rules/anti-hallucination-contract.md +2 -0
  114. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  115. package/presets/mavis/ios-swift/commands/task-continue.md +1 -1
  116. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +1080 -4
  117. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +21 -5
  118. package/presets/mavis/ios-swift/rules/anti-hallucination-contract.md +2 -0
  119. package/presets/mavis/java/adapter-map.json +1 -1
  120. package/presets/mavis/java/commands/task-continue.md +1 -1
  121. package/presets/mavis/java/hooks/chain-team-phases.sh +1080 -4
  122. package/presets/mavis/java/rules/agent-team-orchestrator.md +21 -5
  123. package/presets/mavis/java/rules/anti-hallucination-contract.md +2 -0
  124. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  125. package/presets/mavis/mcp-ts/commands/task-continue.md +1 -1
  126. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  127. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +21 -5
  128. package/presets/mavis/mcp-ts/rules/anti-hallucination-contract.md +2 -0
  129. package/presets/mavis/next/REPO_AGENTS.md +1 -1
  130. package/presets/mavis/next/adapter-map.json +5 -5
  131. package/presets/mavis/next/agents/build-verifier.md +2 -0
  132. package/presets/mavis/next/agents/feature-developer.md +9 -0
  133. package/presets/mavis/next/agents/openspec-author.md +26 -2
  134. package/presets/mavis/next/agents/task-analyst.md +20 -6
  135. package/presets/mavis/next/agents/task-router.md +31 -2
  136. package/presets/mavis/next/ai-local/conventions.md +20 -0
  137. package/presets/{opencode/next/ai-local/rules-library → mavis/next/ai-local/rules}/task-levels.md +12 -0
  138. package/presets/mavis/next/commands/task-continue.md +1 -1
  139. package/presets/mavis/next/hooks/chain-team-phases.sh +1080 -4
  140. package/presets/mavis/next/rules/agent-team-orchestrator.md +21 -5
  141. package/presets/mavis/next/rules/ai-local-overlay.md +1 -1
  142. package/presets/mavis/next/rules/anti-hallucination-contract.md +2 -0
  143. package/presets/mavis/nuxt/adapter-map.json +1 -1
  144. package/presets/mavis/nuxt/commands/task-continue.md +1 -1
  145. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +1080 -4
  146. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +21 -5
  147. package/presets/mavis/nuxt/rules/anti-hallucination-contract.md +2 -0
  148. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  149. package/presets/mavis/php-hexagonal/commands/task-continue.md +1 -1
  150. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  151. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +21 -5
  152. package/presets/mavis/php-hexagonal/rules/anti-hallucination-contract.md +2 -0
  153. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  154. package/presets/mavis/php-laravel/commands/task-continue.md +1 -1
  155. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +1080 -4
  156. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +21 -5
  157. package/presets/mavis/php-laravel/rules/anti-hallucination-contract.md +2 -0
  158. package/presets/mavis/svelte/adapter-map.json +1 -1
  159. package/presets/mavis/svelte/commands/task-continue.md +1 -1
  160. package/presets/mavis/svelte/hooks/chain-team-phases.sh +1080 -4
  161. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +21 -5
  162. package/presets/mavis/svelte/rules/anti-hallucination-contract.md +2 -0
  163. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  164. package/presets/opencode/android-kotlin/commands/task-continue.md +1 -1
  165. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +1080 -4
  166. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +21 -5
  167. package/presets/opencode/android-kotlin/rules/anti-hallucination-contract.md +2 -0
  168. package/presets/opencode/go/adapter-map.json +1 -1
  169. package/presets/opencode/go/commands/task-continue.md +1 -1
  170. package/presets/opencode/go/hooks/chain-team-phases.sh +1080 -4
  171. package/presets/opencode/go/rules/agent-team-orchestrator.md +21 -5
  172. package/presets/opencode/go/rules/anti-hallucination-contract.md +2 -0
  173. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  174. package/presets/opencode/ios-swift/commands/task-continue.md +1 -1
  175. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +1080 -4
  176. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +21 -5
  177. package/presets/opencode/ios-swift/rules/anti-hallucination-contract.md +2 -0
  178. package/presets/opencode/java/adapter-map.json +1 -1
  179. package/presets/opencode/java/commands/task-continue.md +1 -1
  180. package/presets/opencode/java/hooks/chain-team-phases.sh +1080 -4
  181. package/presets/opencode/java/rules/agent-team-orchestrator.md +21 -5
  182. package/presets/opencode/java/rules/anti-hallucination-contract.md +2 -0
  183. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  184. package/presets/opencode/mcp-ts/commands/task-continue.md +1 -1
  185. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +1080 -4
  186. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +21 -5
  187. package/presets/opencode/mcp-ts/rules/anti-hallucination-contract.md +2 -0
  188. package/presets/opencode/next/REPO_AGENTS.md +1 -1
  189. package/presets/opencode/next/adapter-map.json +5 -5
  190. package/presets/opencode/next/agents/build-verifier.md +2 -0
  191. package/presets/opencode/next/agents/feature-developer.md +9 -0
  192. package/presets/opencode/next/agents/openspec-author.md +26 -2
  193. package/presets/opencode/next/agents/task-analyst.md +20 -6
  194. package/presets/opencode/next/agents/task-router.md +31 -2
  195. package/presets/opencode/next/ai-local/conventions.md +20 -0
  196. package/presets/opencode/next/ai-local/rules/task-levels.md +40 -0
  197. package/presets/opencode/next/commands/task-continue.md +1 -1
  198. package/presets/opencode/next/hooks/chain-team-phases.sh +1080 -4
  199. package/presets/opencode/next/rules/agent-team-orchestrator.md +21 -5
  200. package/presets/opencode/next/rules/ai-local-overlay.md +1 -1
  201. package/presets/opencode/next/rules/anti-hallucination-contract.md +2 -0
  202. package/presets/opencode/nuxt/adapter-map.json +1 -1
  203. package/presets/opencode/nuxt/commands/task-continue.md +1 -1
  204. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +1080 -4
  205. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +21 -5
  206. package/presets/opencode/nuxt/rules/anti-hallucination-contract.md +2 -0
  207. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  208. package/presets/opencode/php-hexagonal/commands/task-continue.md +1 -1
  209. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +1080 -4
  210. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +21 -5
  211. package/presets/opencode/php-hexagonal/rules/anti-hallucination-contract.md +2 -0
  212. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  213. package/presets/opencode/php-laravel/commands/task-continue.md +1 -1
  214. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +1080 -4
  215. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +21 -5
  216. package/presets/opencode/php-laravel/rules/anti-hallucination-contract.md +2 -0
  217. package/presets/opencode/svelte/adapter-map.json +1 -1
  218. package/presets/opencode/svelte/commands/task-continue.md +1 -1
  219. package/presets/opencode/svelte/hooks/chain-team-phases.sh +1080 -4
  220. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +21 -5
  221. package/presets/opencode/svelte/rules/anti-hallucination-contract.md +2 -0
@@ -40,6 +40,22 @@ Roster of specialists is **stack-specific** (agent names and write scopes differ
40
40
 
41
41
  Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`; schema SoT: **agent-artifact-contracts**.
42
42
 
43
+ **Product specs:** When `/task` or `/spec-start` touches pages/features/`docs/specs`: if INDEX exists and no generate intent → instruct next agent to load requestable **`product-specs`** (consume; soft-fail; never invent). If generate/bootstrap/`spec-gen` → load **`product-specs-authoring`** + skill **`spec-authoring`** inside **task-analyst** (not a separate pipeline step); pass created spec paths + INDEX diff in handoff; human gate must approve before feature-developer. No-op if INDEX absent and no author intent.
44
+
45
+ Spec-store checklist. Pick one case:
46
+
47
+ 1. Behavior of a capability already described as a delta spec → OpenSpec delta only.
48
+ 2. Page or feature document in `docs/specs` → that tree only (skill `spec-authoring`). `openspec-author` still refuses `app/**` and `docs/specs/**`.
49
+ 3. Both, when behavior and the published page change, with one human gate naming both paths.
50
+
51
+ An engineering task-list edit is not the living spec. Do not change propose → validate → human merge → archive. A manifest receipt may name an existing OpenSpec change id as a cross-reference only.
52
+
53
+ ## Strict implementation rail (optional)
54
+
55
+ The strict implementation rail defaults to off. `.ai.local/rules/task-levels.md` holds the flag. task-router sets top-level `pipeline.json` `"implementationRail": "on"` only for a production app implementation task when the user or the task record asks. L0, docs-only, research, and preset-only tasks do not take the rail. The L0–L3 selection order is unchanged. `light` | `standard` | `full` keep their meanings.
56
+
57
+ When the rail is off, the feature-developer handoff keeps the pre-change test-before-handoff rule. When the rail is on and a `[NEEDS CLARIFICATION]` marker is open, the hook does not start the implementation handoff. When the rail is on and markers are clear, feature-developer writes a failing test before production edits, uses a branch or worktree before the first implementation task, and runs `code-reviewer` between decomposition tasks. Debug retries for that handoff stop at two. `build-verifier` and `code-reviewer` stay.
58
+
43
59
  ## Stack notes
44
60
 
45
61
  Roles, write scopes, and Claude `tools` / frontmatter packaging — **`agents/README.md`**.
@@ -128,7 +144,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
128
144
 
129
145
  ## Context budget & checkpoint/resume
130
146
 
131
- Work in bounded waves (one artifact class across the target surface); mechanical waves (generation, embed sync) are delegated to repo scripts rather than spent on tokens. **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). A resumed run (e.g. `/task-continue`) reads `artifact-manifest.json` + `.memlog.md` and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
147
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
132
148
 
133
149
  ## Self-review & context hygiene
134
150
 
@@ -169,7 +185,7 @@ Each producing agent runs a **pre-receipt self-review** of its own output — go
169
185
  | `waveSteps` | Step indexes of the in-flight wave; cleared on wave completion |
170
186
  | `waveId` | `<runId>:wave-<firstStepIndex>` for the in-flight wave |
171
187
  | `graphMode` | Cached `steps.some(s => Array.isArray(s.dependsOn))` |
172
- | `blockedSteps` | Steps that ended `blocked`, excluded from the ready set until a human-approved retry |
188
+ | `blockedSteps` | Steps that ended `blocked`, excluded from the ready queue until a human-approved retry |
173
189
 
174
190
  Additional states: `blocked` — a step (or a parallel producer) cannot proceed; in graph mode independent ready steps still dispatch, and a fully-gated run emits a deterministic notice (no stall).
175
191
 
@@ -200,7 +216,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
200
216
 
201
217
  ## Rules (strict)
202
218
 
203
- 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline).
219
+ 1. **`/task` always starts with task-router** (except user says "skip router" with documented pipeline). When `.ai.local/rules/task-levels.md` selects **L0** or a skip-analyst **L1**, task-router may emit a short `steps[]` list for that level. **L2** / **L3** still attach an OpenSpec change. `pipeline.json` → `steps[]` still schedules the run. This short list does not remove `build-verifier` or `code-reviewer` from implementation pipelines.
204
220
  2. Read `pipeline.json` before every subagent invocation.
205
221
  3. One role per Task call — **except** parallel steps: multiple Task calls in one message.
206
222
  4. **Never** skip `humanGates` without `/task-continue` or explicit user approval.
@@ -211,8 +227,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
211
227
  9. If `autoChain: false` in pipeline, do not rely on hook — manual step only.
212
228
  10. **Persist the verbatim original prompt.** Every `/task` and every routed work request writes the user's raw prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). It is not a manifest `artifacts[]` body — register the path on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact. Also append every **subsequent user-authored** prompt for the same slug — a new user message while the slug is active, `/task-continue` arguments, human-gate feedback, a clarification answer — to the append-only `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; never rewrite or duplicate an entry; never log machine-generated hook `followup_message` or empty/argument-less invocations). Register its path on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
213
229
  11. **Answer the user in the resolved dialogue language for the whole task.** Resolve once at task start (`.ai.local` `## Language` → prompt language → English) and pass it to every step; `/task-continue` keeps it. Never ask the user to pick a language. Development, reasoning, and artifacts stay English. See **language-policy**.
214
- 12. **Invoke the ready set, and never advance before reconciliation.** In graph mode the hook computes the ready queue; invoke exactly the handoff's agent list (a wave in one assistant turn, multiple Task calls) and do not start any next step from your own reasoning until the hook records the join and emits the next handoff. The wave is the join unit; `status.joinedSlots` is the satisfaction ledger.
215
- 13. **Only a proven conflict-free set is `parallel: true`.** Disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, no shared lifecycle file; `mockup-reviewer` is never parallel (its FAIL gate is serial). See **plan-graph** § Conflict model.
230
+ 12. **Invoke the ready set, and never advance before reconciliation.** In graph mode the hook computes the ready queue; invoke exactly the handoff's agent list (a wave in one assistant turn, multiple Task calls) and do not start any next step from your own reasoning until the hook records the join and emits the next handoff. The wave is the join unit; `status.joinedSlots` is the satisfaction ledger. The role pipeline and the engineering graph are two linked objects: `pipeline.json` `steps[].dependsOn` still decides which agent runs; the decomposition ready set only chooses rows inside the active step. Reviewer and QA steps stay on the pipeline.
231
+ 13. **Only a proven conflict-free set is `parallel: true`.** Disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, no shared lifecycle file; `mockup-reviewer` is never parallel (its FAIL gate is serial). See **plan-graph** § Conflict model. Each decomposition task lists the repo paths it may create or modify. That list is a subset of the implementing step's `writeScopes[]` when the step declares `writeScopes`. Tasks with no `dependsOn` path between them keep those lists disjoint; a shared path stays sequential. `docs/specs/**` or `openspec/**` paths and `app/**` paths stay in different lists. `steps[].writeScopes[]` stays the role-level authority. Reviewer steps stay team-artifact only.
216
232
 
217
233
  ## Team artifact I/O
218
234
 
@@ -19,6 +19,8 @@ Do not invent MCP or tool input schemas. Read the installed schema, or mark unce
19
19
 
20
20
  `// VERIFY` is an uncertainty marker. It is not confirmation and it is not a passing check.
21
21
 
22
+ For team specs and `brief.md`, the artifact marker is a literal `[NEEDS CLARIFICATION]` line for each unresolved product decision. This contract points at that marker. `// VERIFY` stays a code comment and is not a spec token.
23
+
22
24
  Context7 is optional. When it is down or absent, write `// VERIFY` and state the uncertainty. Do not block the pipeline and do not invent the signature.
23
25
 
24
26
  Status claims follow `verification-before-completion`. Procedural rules stay in `anti-sycophancy-discipline`. Stack floors stay in their own stems.
@@ -39,7 +39,7 @@ printf '%s\n' '{"status":"completed","action":"end_human_gate","activateNext":tr
39
39
 
40
40
  ## Checkpoint & resume
41
41
 
42
- Resume from the on-disk checkpoint, not from chat: read `.ai.local/team/tasks/<slug>/artifact-manifest.json` (authoritative paths per producer) and `.memlog.md` (`## <date>` + `event:` entries), skip completed waves, and continue at the first stage whose exit criteria are unmet. Record produced paths on the `implementation` manifest entry as you go. Do **not** overwrite or duplicate `.ai.local/team/tasks/<slug>/prompt.md` — it records the original ask (write-if-absent). Append the `/task-continue` arguments (when present) and any gate feedback verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; skip when the invocation carries no new user words).
42
+ Resume from the on-disk checkpoint, not from chat: read `.ai.local/team/tasks/<slug>/focus.md` first (a view, not the system of record), then `artifact-manifest.json` (authoritative paths per producer) and `.memlog.md` (`## <date>` + `event:` entries), skip completed waves, and continue at the first stage whose exit criteria are unmet. Record produced paths on the `implementation` manifest entry as you go. Do **not** overwrite or duplicate `.ai.local/team/tasks/<slug>/prompt.md` — it records the original ask (write-if-absent). Append the `/task-continue` arguments (when present) and any gate feedback verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` (`seq` = max + 1; skip when the invocation carries no new user words).
43
43
 
44
44
  Plan revision during execution is a named, auditable operation: an evaluation oracle failing twice, a scope/requirement change, or a newly discovered dependency triggers `decision: replan rev N → N+1` in `.memlog.md`, an edit to `decomposition.md` (+ optional `planRevision`), and a **re-run of the affected gate**.
45
45