@bonesofspring/ai-rules 0.2.29 → 0.2.31

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 (536) hide show
  1. package/package.json +5 -1
  2. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +6 -4
  3. package/presets/_shared/core/agent-team/agent-task-metrics.md +14 -1
  4. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +3 -1
  5. package/presets/claude/android-kotlin/agents/accessibility-reviewer.md +2 -2
  6. package/presets/claude/android-kotlin/agents/api-contract-reviewer.md +2 -2
  7. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  8. package/presets/claude/android-kotlin/agents/ci-investigator.md +2 -2
  9. package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -2
  10. package/presets/claude/android-kotlin/agents/debugger.md +2 -2
  11. package/presets/claude/android-kotlin/agents/feature-developer.md +2 -2
  12. package/presets/claude/android-kotlin/agents/migration-specialist.md +2 -2
  13. package/presets/claude/android-kotlin/agents/mockup-reviewer.md +2 -2
  14. package/presets/claude/android-kotlin/agents/openspec-author.md +2 -2
  15. package/presets/claude/android-kotlin/agents/performance-auditor.md +2 -2
  16. package/presets/claude/android-kotlin/agents/qa-tester.md +2 -2
  17. package/presets/claude/android-kotlin/agents/security-reviewer.md +2 -2
  18. package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
  19. package/presets/claude/android-kotlin/agents/task-router.md +1 -1
  20. package/presets/claude/android-kotlin/agents/tech-writer.md +2 -2
  21. package/presets/claude/android-kotlin/agents/unit-test-generator.md +2 -2
  22. package/presets/claude/android-kotlin/agents/unit-test-healer.md +2 -2
  23. package/presets/claude/android-kotlin/agents/unit-test-planner.md +2 -2
  24. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  25. package/presets/claude/go/agents/build-verifier.md +2 -2
  26. package/presets/claude/go/agents/code-reviewer.md +2 -2
  27. package/presets/claude/go/agents/feature-developer.md +2 -2
  28. package/presets/claude/go/agents/openspec-author.md +2 -2
  29. package/presets/claude/go/agents/task-analyst.md +1 -1
  30. package/presets/claude/go/agents/task-router.md +1 -1
  31. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  32. package/presets/claude/ios-swift/agents/build-verifier.md +2 -2
  33. package/presets/claude/ios-swift/agents/code-reviewer.md +2 -2
  34. package/presets/claude/ios-swift/agents/feature-developer.md +2 -2
  35. package/presets/claude/ios-swift/agents/mockup-reviewer.md +2 -2
  36. package/presets/claude/ios-swift/agents/openspec-author.md +2 -2
  37. package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
  38. package/presets/claude/ios-swift/agents/task-router.md +1 -1
  39. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +2 -1
  40. package/presets/claude/java/agents/build-verifier.md +2 -2
  41. package/presets/claude/java/agents/code-reviewer.md +2 -2
  42. package/presets/claude/java/agents/feature-developer.md +2 -2
  43. package/presets/claude/java/agents/openspec-author.md +2 -2
  44. package/presets/claude/java/agents/task-analyst.md +1 -1
  45. package/presets/claude/java/agents/task-router.md +1 -1
  46. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  47. package/presets/claude/mcp-ts/agents/build-verifier.md +2 -2
  48. package/presets/claude/mcp-ts/agents/feature-developer.md +2 -2
  49. package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
  50. package/presets/claude/mcp-ts/agents/task-router.md +1 -1
  51. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  52. package/presets/claude/next/agents/accessibility-reviewer.md +2 -2
  53. package/presets/claude/next/agents/api-contract-reviewer.md +2 -2
  54. package/presets/claude/next/agents/build-verifier.md +2 -2
  55. package/presets/claude/next/agents/ci-investigator.md +2 -2
  56. package/presets/claude/next/agents/code-reviewer.md +37 -2
  57. package/presets/claude/next/agents/debugger.md +2 -2
  58. package/presets/claude/next/agents/feature-developer.md +14 -2
  59. package/presets/claude/next/agents/migration-specialist.md +2 -2
  60. package/presets/claude/next/agents/mockup-reviewer.md +29 -3
  61. package/presets/claude/next/agents/openspec-author.md +2 -2
  62. package/presets/claude/next/agents/performance-auditor.md +2 -2
  63. package/presets/claude/next/agents/qa-tester.md +2 -2
  64. package/presets/claude/next/agents/security-reviewer.md +2 -2
  65. package/presets/claude/next/agents/solution-architect.md +2 -2
  66. package/presets/claude/next/agents/task-analyst.md +1 -1
  67. package/presets/claude/next/agents/task-router.md +1 -1
  68. package/presets/claude/next/agents/tech-writer.md +2 -2
  69. package/presets/claude/next/agents/unit-test-generator.md +2 -2
  70. package/presets/claude/next/agents/unit-test-healer.md +2 -2
  71. package/presets/claude/next/agents/unit-test-planner.md +2 -2
  72. package/presets/claude/next/hooks/chain-team-phases.sh +46 -1
  73. package/presets/claude/next/rules/README.md +2 -1
  74. package/presets/claude/next/rules/architecture/feature-delivery-workflow.md +17 -0
  75. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  76. package/presets/claude/next/rules/tooling-and-review/code-review-mr.md +10 -0
  77. package/presets/claude/next/rules/tooling-and-review/mockup-review.md +9 -0
  78. package/presets/claude/next/rules/ui-and-accessibility/design-tokens-binding.md +42 -0
  79. package/presets/claude/next/rules/ui-and-accessibility/react-ui.md +1 -0
  80. package/presets/claude/next/skills/code-review/SKILL.md +1 -0
  81. package/presets/claude/nuxt/agents/accessibility-reviewer.md +2 -2
  82. package/presets/claude/nuxt/agents/api-contract-reviewer.md +2 -2
  83. package/presets/claude/nuxt/agents/build-verifier.md +2 -2
  84. package/presets/claude/nuxt/agents/ci-investigator.md +2 -2
  85. package/presets/claude/nuxt/agents/code-reviewer.md +2 -2
  86. package/presets/claude/nuxt/agents/debugger.md +2 -2
  87. package/presets/claude/nuxt/agents/feature-developer.md +2 -2
  88. package/presets/claude/nuxt/agents/migration-specialist.md +2 -2
  89. package/presets/claude/nuxt/agents/mockup-reviewer.md +2 -2
  90. package/presets/claude/nuxt/agents/openspec-author.md +2 -2
  91. package/presets/claude/nuxt/agents/performance-auditor.md +2 -2
  92. package/presets/claude/nuxt/agents/qa-tester.md +2 -2
  93. package/presets/claude/nuxt/agents/security-reviewer.md +2 -2
  94. package/presets/claude/nuxt/agents/solution-architect.md +2 -2
  95. package/presets/claude/nuxt/agents/task-analyst.md +1 -1
  96. package/presets/claude/nuxt/agents/task-router.md +1 -1
  97. package/presets/claude/nuxt/agents/tech-writer.md +2 -2
  98. package/presets/claude/nuxt/agents/unit-test-generator.md +2 -2
  99. package/presets/claude/nuxt/agents/unit-test-healer.md +2 -2
  100. package/presets/claude/nuxt/agents/unit-test-planner.md +2 -2
  101. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  102. package/presets/claude/php-hexagonal/agents/build-verifier.md +2 -2
  103. package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -2
  104. package/presets/claude/php-hexagonal/agents/feature-developer.md +2 -2
  105. package/presets/claude/php-hexagonal/agents/openspec-author.md +2 -2
  106. package/presets/claude/php-hexagonal/agents/task-analyst.md +1 -1
  107. package/presets/claude/php-hexagonal/agents/task-router.md +1 -1
  108. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  109. package/presets/claude/php-laravel/agents/build-verifier.md +2 -2
  110. package/presets/claude/php-laravel/agents/code-reviewer.md +2 -2
  111. package/presets/claude/php-laravel/agents/feature-developer.md +2 -2
  112. package/presets/claude/php-laravel/agents/openspec-author.md +2 -2
  113. package/presets/claude/php-laravel/agents/task-analyst.md +1 -1
  114. package/presets/claude/php-laravel/agents/task-router.md +1 -1
  115. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  116. package/presets/claude/svelte/agents/accessibility-reviewer.md +2 -2
  117. package/presets/claude/svelte/agents/api-contract-reviewer.md +2 -2
  118. package/presets/claude/svelte/agents/build-verifier.md +2 -2
  119. package/presets/claude/svelte/agents/ci-investigator.md +2 -2
  120. package/presets/claude/svelte/agents/code-reviewer.md +2 -2
  121. package/presets/claude/svelte/agents/debugger.md +2 -2
  122. package/presets/claude/svelte/agents/feature-developer.md +2 -2
  123. package/presets/claude/svelte/agents/migration-specialist.md +2 -2
  124. package/presets/claude/svelte/agents/mockup-reviewer.md +2 -2
  125. package/presets/claude/svelte/agents/openspec-author.md +2 -2
  126. package/presets/claude/svelte/agents/performance-auditor.md +2 -2
  127. package/presets/claude/svelte/agents/qa-tester.md +2 -2
  128. package/presets/claude/svelte/agents/security-reviewer.md +2 -2
  129. package/presets/claude/svelte/agents/solution-architect.md +2 -2
  130. package/presets/claude/svelte/agents/task-analyst.md +1 -1
  131. package/presets/claude/svelte/agents/task-router.md +1 -1
  132. package/presets/claude/svelte/agents/tech-writer.md +2 -2
  133. package/presets/claude/svelte/agents/unit-test-generator.md +2 -2
  134. package/presets/claude/svelte/agents/unit-test-healer.md +2 -2
  135. package/presets/claude/svelte/agents/unit-test-planner.md +2 -2
  136. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +4 -1
  137. package/presets/cursor/android-kotlin/agents/accessibility-reviewer.md +2 -2
  138. package/presets/cursor/android-kotlin/agents/api-contract-reviewer.md +2 -2
  139. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  140. package/presets/cursor/android-kotlin/agents/ci-investigator.md +2 -2
  141. package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -2
  142. package/presets/cursor/android-kotlin/agents/debugger.md +2 -2
  143. package/presets/cursor/android-kotlin/agents/feature-developer.md +2 -2
  144. package/presets/cursor/android-kotlin/agents/migration-specialist.md +2 -2
  145. package/presets/cursor/android-kotlin/agents/mockup-reviewer.md +2 -2
  146. package/presets/cursor/android-kotlin/agents/openspec-author.md +2 -2
  147. package/presets/cursor/android-kotlin/agents/performance-auditor.md +2 -2
  148. package/presets/cursor/android-kotlin/agents/qa-tester.md +2 -2
  149. package/presets/cursor/android-kotlin/agents/security-reviewer.md +2 -2
  150. package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
  151. package/presets/cursor/android-kotlin/agents/task-router.md +1 -1
  152. package/presets/cursor/android-kotlin/agents/tech-writer.md +2 -2
  153. package/presets/cursor/android-kotlin/agents/unit-test-generator.md +2 -2
  154. package/presets/cursor/android-kotlin/agents/unit-test-healer.md +2 -2
  155. package/presets/cursor/android-kotlin/agents/unit-test-planner.md +2 -2
  156. package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +1 -1
  157. package/presets/cursor/go/agents/build-verifier.md +2 -2
  158. package/presets/cursor/go/agents/code-reviewer.md +2 -2
  159. package/presets/cursor/go/agents/feature-developer.md +2 -2
  160. package/presets/cursor/go/agents/openspec-author.md +2 -2
  161. package/presets/cursor/go/agents/task-analyst.md +1 -1
  162. package/presets/cursor/go/agents/task-router.md +1 -1
  163. package/presets/cursor/go/rules/agent-team-orchestrator.mdc +3 -1
  164. package/presets/cursor/ios-swift/agents/build-verifier.md +2 -2
  165. package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -2
  166. package/presets/cursor/ios-swift/agents/feature-developer.md +2 -2
  167. package/presets/cursor/ios-swift/agents/mockup-reviewer.md +2 -2
  168. package/presets/cursor/ios-swift/agents/openspec-author.md +2 -2
  169. package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
  170. package/presets/cursor/ios-swift/agents/task-router.md +1 -1
  171. package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +1 -1
  172. package/presets/cursor/java/agents/build-verifier.md +2 -2
  173. package/presets/cursor/java/agents/code-reviewer.md +2 -2
  174. package/presets/cursor/java/agents/feature-developer.md +2 -2
  175. package/presets/cursor/java/agents/openspec-author.md +2 -2
  176. package/presets/cursor/java/agents/task-analyst.md +1 -1
  177. package/presets/cursor/java/agents/task-router.md +1 -1
  178. package/presets/cursor/java/rules/agent-team-orchestrator.mdc +3 -1
  179. package/presets/cursor/mcp-ts/agents/build-verifier.md +2 -2
  180. package/presets/cursor/mcp-ts/agents/feature-developer.md +2 -2
  181. package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
  182. package/presets/cursor/mcp-ts/agents/task-router.md +1 -1
  183. package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +3 -1
  184. package/presets/cursor/next/agents/accessibility-reviewer.md +2 -2
  185. package/presets/cursor/next/agents/api-contract-reviewer.md +2 -2
  186. package/presets/cursor/next/agents/build-verifier.md +2 -2
  187. package/presets/cursor/next/agents/ci-investigator.md +2 -2
  188. package/presets/cursor/next/agents/code-reviewer.md +37 -2
  189. package/presets/cursor/next/agents/debugger.md +2 -2
  190. package/presets/cursor/next/agents/feature-developer.md +24 -2
  191. package/presets/cursor/next/agents/migration-specialist.md +2 -2
  192. package/presets/cursor/next/agents/mockup-reviewer.md +29 -3
  193. package/presets/cursor/next/agents/openspec-author.md +2 -2
  194. package/presets/cursor/next/agents/performance-auditor.md +2 -2
  195. package/presets/cursor/next/agents/qa-tester.md +2 -2
  196. package/presets/cursor/next/agents/security-reviewer.md +2 -2
  197. package/presets/cursor/next/agents/solution-architect.md +2 -2
  198. package/presets/cursor/next/agents/task-analyst.md +1 -1
  199. package/presets/cursor/next/agents/task-router.md +1 -1
  200. package/presets/cursor/next/agents/tech-writer.md +2 -2
  201. package/presets/cursor/next/agents/unit-test-generator.md +2 -2
  202. package/presets/cursor/next/agents/unit-test-healer.md +2 -2
  203. package/presets/cursor/next/agents/unit-test-planner.md +2 -2
  204. package/presets/cursor/next/hooks/chain-team-phases.sh +46 -1
  205. package/presets/cursor/next/rules/README.md +3 -1
  206. package/presets/cursor/next/rules/agent-team-orchestrator.mdc +3 -1
  207. package/presets/cursor/next/rules/code-review-mr.mdc +10 -0
  208. package/presets/cursor/next/rules/design-tokens-binding.mdc +41 -0
  209. package/presets/cursor/next/rules/feature-delivery-workflow.mdc +17 -0
  210. package/presets/cursor/next/rules/mockup-review.mdc +9 -0
  211. package/presets/cursor/next/rules/react-ui.mdc +1 -0
  212. package/presets/cursor/next/skills/code-review/SKILL.md +1 -0
  213. package/presets/cursor/nuxt/agents/accessibility-reviewer.md +2 -2
  214. package/presets/cursor/nuxt/agents/api-contract-reviewer.md +2 -2
  215. package/presets/cursor/nuxt/agents/build-verifier.md +2 -2
  216. package/presets/cursor/nuxt/agents/ci-investigator.md +2 -2
  217. package/presets/cursor/nuxt/agents/code-reviewer.md +2 -2
  218. package/presets/cursor/nuxt/agents/debugger.md +2 -2
  219. package/presets/cursor/nuxt/agents/feature-developer.md +2 -2
  220. package/presets/cursor/nuxt/agents/migration-specialist.md +2 -2
  221. package/presets/cursor/nuxt/agents/mockup-reviewer.md +2 -2
  222. package/presets/cursor/nuxt/agents/openspec-author.md +2 -2
  223. package/presets/cursor/nuxt/agents/performance-auditor.md +2 -2
  224. package/presets/cursor/nuxt/agents/qa-tester.md +2 -2
  225. package/presets/cursor/nuxt/agents/security-reviewer.md +2 -2
  226. package/presets/cursor/nuxt/agents/solution-architect.md +2 -2
  227. package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
  228. package/presets/cursor/nuxt/agents/task-router.md +1 -1
  229. package/presets/cursor/nuxt/agents/tech-writer.md +2 -2
  230. package/presets/cursor/nuxt/agents/unit-test-generator.md +2 -2
  231. package/presets/cursor/nuxt/agents/unit-test-healer.md +2 -2
  232. package/presets/cursor/nuxt/agents/unit-test-planner.md +2 -2
  233. package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +3 -1
  234. package/presets/cursor/php-hexagonal/agents/build-verifier.md +2 -2
  235. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -2
  236. package/presets/cursor/php-hexagonal/agents/feature-developer.md +2 -2
  237. package/presets/cursor/php-hexagonal/agents/openspec-author.md +2 -2
  238. package/presets/cursor/php-hexagonal/agents/task-analyst.md +1 -1
  239. package/presets/cursor/php-hexagonal/agents/task-router.md +1 -1
  240. package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +3 -1
  241. package/presets/cursor/php-laravel/agents/build-verifier.md +2 -2
  242. package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -2
  243. package/presets/cursor/php-laravel/agents/feature-developer.md +2 -2
  244. package/presets/cursor/php-laravel/agents/openspec-author.md +2 -2
  245. package/presets/cursor/php-laravel/agents/task-analyst.md +1 -1
  246. package/presets/cursor/php-laravel/agents/task-router.md +1 -1
  247. package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +3 -1
  248. package/presets/cursor/svelte/agents/accessibility-reviewer.md +2 -2
  249. package/presets/cursor/svelte/agents/api-contract-reviewer.md +2 -2
  250. package/presets/cursor/svelte/agents/build-verifier.md +2 -2
  251. package/presets/cursor/svelte/agents/ci-investigator.md +2 -2
  252. package/presets/cursor/svelte/agents/code-reviewer.md +2 -2
  253. package/presets/cursor/svelte/agents/debugger.md +2 -2
  254. package/presets/cursor/svelte/agents/feature-developer.md +2 -2
  255. package/presets/cursor/svelte/agents/migration-specialist.md +2 -2
  256. package/presets/cursor/svelte/agents/mockup-reviewer.md +2 -2
  257. package/presets/cursor/svelte/agents/openspec-author.md +2 -2
  258. package/presets/cursor/svelte/agents/performance-auditor.md +2 -2
  259. package/presets/cursor/svelte/agents/qa-tester.md +2 -2
  260. package/presets/cursor/svelte/agents/security-reviewer.md +2 -2
  261. package/presets/cursor/svelte/agents/solution-architect.md +2 -2
  262. package/presets/cursor/svelte/agents/task-analyst.md +1 -1
  263. package/presets/cursor/svelte/agents/task-router.md +1 -1
  264. package/presets/cursor/svelte/agents/tech-writer.md +2 -2
  265. package/presets/cursor/svelte/agents/unit-test-generator.md +2 -2
  266. package/presets/cursor/svelte/agents/unit-test-healer.md +2 -2
  267. package/presets/cursor/svelte/agents/unit-test-planner.md +2 -2
  268. package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +3 -1
  269. package/presets/mavis/android-kotlin/agents/accessibility-reviewer.md +2 -2
  270. package/presets/mavis/android-kotlin/agents/api-contract-reviewer.md +2 -2
  271. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  272. package/presets/mavis/android-kotlin/agents/ci-investigator.md +2 -2
  273. package/presets/mavis/android-kotlin/agents/code-reviewer.md +2 -2
  274. package/presets/mavis/android-kotlin/agents/debugger.md +2 -2
  275. package/presets/mavis/android-kotlin/agents/feature-developer.md +2 -2
  276. package/presets/mavis/android-kotlin/agents/migration-specialist.md +2 -2
  277. package/presets/mavis/android-kotlin/agents/mockup-reviewer.md +2 -2
  278. package/presets/mavis/android-kotlin/agents/openspec-author.md +2 -2
  279. package/presets/mavis/android-kotlin/agents/performance-auditor.md +2 -2
  280. package/presets/mavis/android-kotlin/agents/qa-tester.md +2 -2
  281. package/presets/mavis/android-kotlin/agents/security-reviewer.md +2 -2
  282. package/presets/mavis/android-kotlin/agents/task-analyst.md +1 -1
  283. package/presets/mavis/android-kotlin/agents/task-router.md +1 -1
  284. package/presets/mavis/android-kotlin/agents/tech-writer.md +2 -2
  285. package/presets/mavis/android-kotlin/agents/unit-test-generator.md +2 -2
  286. package/presets/mavis/android-kotlin/agents/unit-test-healer.md +2 -2
  287. package/presets/mavis/android-kotlin/agents/unit-test-planner.md +2 -2
  288. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +4 -1
  289. package/presets/mavis/go/agents/build-verifier.md +2 -2
  290. package/presets/mavis/go/agents/code-reviewer.md +2 -2
  291. package/presets/mavis/go/agents/feature-developer.md +2 -2
  292. package/presets/mavis/go/agents/openspec-author.md +2 -2
  293. package/presets/mavis/go/agents/task-analyst.md +1 -1
  294. package/presets/mavis/go/agents/task-router.md +1 -1
  295. package/presets/mavis/go/rules/agent-team-orchestrator.md +4 -1
  296. package/presets/mavis/ios-swift/agents/build-verifier.md +2 -2
  297. package/presets/mavis/ios-swift/agents/code-reviewer.md +2 -2
  298. package/presets/mavis/ios-swift/agents/feature-developer.md +2 -2
  299. package/presets/mavis/ios-swift/agents/mockup-reviewer.md +2 -2
  300. package/presets/mavis/ios-swift/agents/openspec-author.md +2 -2
  301. package/presets/mavis/ios-swift/agents/task-analyst.md +1 -1
  302. package/presets/mavis/ios-swift/agents/task-router.md +1 -1
  303. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +4 -1
  304. package/presets/mavis/java/agents/build-verifier.md +2 -2
  305. package/presets/mavis/java/agents/code-reviewer.md +2 -2
  306. package/presets/mavis/java/agents/feature-developer.md +2 -2
  307. package/presets/mavis/java/agents/openspec-author.md +2 -2
  308. package/presets/mavis/java/agents/task-analyst.md +1 -1
  309. package/presets/mavis/java/agents/task-router.md +1 -1
  310. package/presets/mavis/java/rules/agent-team-orchestrator.md +4 -1
  311. package/presets/mavis/mcp-ts/agents/build-verifier.md +2 -2
  312. package/presets/mavis/mcp-ts/agents/feature-developer.md +2 -2
  313. package/presets/mavis/mcp-ts/agents/task-analyst.md +1 -1
  314. package/presets/mavis/mcp-ts/agents/task-router.md +1 -1
  315. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +4 -1
  316. package/presets/mavis/next/adapter-map.json +9 -1
  317. package/presets/mavis/next/agents/accessibility-reviewer.md +2 -2
  318. package/presets/mavis/next/agents/api-contract-reviewer.md +2 -2
  319. package/presets/mavis/next/agents/build-verifier.md +2 -2
  320. package/presets/mavis/next/agents/ci-investigator.md +2 -2
  321. package/presets/mavis/next/agents/code-reviewer.md +37 -2
  322. package/presets/mavis/next/agents/debugger.md +2 -2
  323. package/presets/mavis/next/agents/feature-developer.md +24 -2
  324. package/presets/mavis/next/agents/migration-specialist.md +2 -2
  325. package/presets/mavis/next/agents/mockup-reviewer.md +29 -3
  326. package/presets/mavis/next/agents/openspec-author.md +2 -2
  327. package/presets/mavis/next/agents/performance-auditor.md +2 -2
  328. package/presets/mavis/next/agents/qa-tester.md +2 -2
  329. package/presets/mavis/next/agents/security-reviewer.md +2 -2
  330. package/presets/mavis/next/agents/solution-architect.md +2 -2
  331. package/presets/mavis/next/agents/task-analyst.md +1 -1
  332. package/presets/mavis/next/agents/task-router.md +1 -1
  333. package/presets/mavis/next/agents/tech-writer.md +2 -2
  334. package/presets/mavis/next/agents/unit-test-generator.md +2 -2
  335. package/presets/mavis/next/agents/unit-test-healer.md +2 -2
  336. package/presets/mavis/next/agents/unit-test-planner.md +2 -2
  337. package/presets/mavis/next/hooks/chain-team-phases.sh +46 -1
  338. package/presets/mavis/next/rules/agent-team-orchestrator.md +4 -1
  339. package/presets/mavis/next/rules/code-review-mr.md +10 -0
  340. package/presets/mavis/next/rules/design-tokens-binding.md +35 -0
  341. package/presets/mavis/next/rules/feature-delivery-workflow.md +17 -0
  342. package/presets/mavis/next/rules/mockup-review.md +9 -0
  343. package/presets/mavis/next/rules/react-ui.md +1 -0
  344. package/presets/mavis/next/skills/code-review/SKILL.md +1 -0
  345. package/presets/mavis/nuxt/agents/accessibility-reviewer.md +2 -2
  346. package/presets/mavis/nuxt/agents/api-contract-reviewer.md +2 -2
  347. package/presets/mavis/nuxt/agents/build-verifier.md +2 -2
  348. package/presets/mavis/nuxt/agents/ci-investigator.md +2 -2
  349. package/presets/mavis/nuxt/agents/code-reviewer.md +2 -2
  350. package/presets/mavis/nuxt/agents/debugger.md +2 -2
  351. package/presets/mavis/nuxt/agents/feature-developer.md +2 -2
  352. package/presets/mavis/nuxt/agents/migration-specialist.md +2 -2
  353. package/presets/mavis/nuxt/agents/mockup-reviewer.md +2 -2
  354. package/presets/mavis/nuxt/agents/openspec-author.md +2 -2
  355. package/presets/mavis/nuxt/agents/performance-auditor.md +2 -2
  356. package/presets/mavis/nuxt/agents/qa-tester.md +2 -2
  357. package/presets/mavis/nuxt/agents/security-reviewer.md +2 -2
  358. package/presets/mavis/nuxt/agents/solution-architect.md +2 -2
  359. package/presets/mavis/nuxt/agents/task-analyst.md +1 -1
  360. package/presets/mavis/nuxt/agents/task-router.md +1 -1
  361. package/presets/mavis/nuxt/agents/tech-writer.md +2 -2
  362. package/presets/mavis/nuxt/agents/unit-test-generator.md +2 -2
  363. package/presets/mavis/nuxt/agents/unit-test-healer.md +2 -2
  364. package/presets/mavis/nuxt/agents/unit-test-planner.md +2 -2
  365. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +4 -1
  366. package/presets/mavis/php-hexagonal/agents/build-verifier.md +2 -2
  367. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +2 -2
  368. package/presets/mavis/php-hexagonal/agents/feature-developer.md +2 -2
  369. package/presets/mavis/php-hexagonal/agents/openspec-author.md +2 -2
  370. package/presets/mavis/php-hexagonal/agents/task-analyst.md +1 -1
  371. package/presets/mavis/php-hexagonal/agents/task-router.md +1 -1
  372. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +4 -1
  373. package/presets/mavis/php-laravel/agents/build-verifier.md +2 -2
  374. package/presets/mavis/php-laravel/agents/code-reviewer.md +2 -2
  375. package/presets/mavis/php-laravel/agents/feature-developer.md +2 -2
  376. package/presets/mavis/php-laravel/agents/openspec-author.md +2 -2
  377. package/presets/mavis/php-laravel/agents/task-analyst.md +1 -1
  378. package/presets/mavis/php-laravel/agents/task-router.md +1 -1
  379. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +4 -1
  380. package/presets/mavis/svelte/agents/accessibility-reviewer.md +2 -2
  381. package/presets/mavis/svelte/agents/api-contract-reviewer.md +2 -2
  382. package/presets/mavis/svelte/agents/build-verifier.md +2 -2
  383. package/presets/mavis/svelte/agents/ci-investigator.md +2 -2
  384. package/presets/mavis/svelte/agents/code-reviewer.md +2 -2
  385. package/presets/mavis/svelte/agents/debugger.md +2 -2
  386. package/presets/mavis/svelte/agents/feature-developer.md +2 -2
  387. package/presets/mavis/svelte/agents/migration-specialist.md +2 -2
  388. package/presets/mavis/svelte/agents/mockup-reviewer.md +2 -2
  389. package/presets/mavis/svelte/agents/openspec-author.md +2 -2
  390. package/presets/mavis/svelte/agents/performance-auditor.md +2 -2
  391. package/presets/mavis/svelte/agents/qa-tester.md +2 -2
  392. package/presets/mavis/svelte/agents/security-reviewer.md +2 -2
  393. package/presets/mavis/svelte/agents/solution-architect.md +2 -2
  394. package/presets/mavis/svelte/agents/task-analyst.md +1 -1
  395. package/presets/mavis/svelte/agents/task-router.md +1 -1
  396. package/presets/mavis/svelte/agents/tech-writer.md +2 -2
  397. package/presets/mavis/svelte/agents/unit-test-generator.md +2 -2
  398. package/presets/mavis/svelte/agents/unit-test-healer.md +2 -2
  399. package/presets/mavis/svelte/agents/unit-test-planner.md +2 -2
  400. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +4 -1
  401. package/presets/opencode/android-kotlin/agents/accessibility-reviewer.md +2 -2
  402. package/presets/opencode/android-kotlin/agents/api-contract-reviewer.md +2 -2
  403. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  404. package/presets/opencode/android-kotlin/agents/ci-investigator.md +2 -2
  405. package/presets/opencode/android-kotlin/agents/code-reviewer.md +2 -2
  406. package/presets/opencode/android-kotlin/agents/debugger.md +2 -2
  407. package/presets/opencode/android-kotlin/agents/feature-developer.md +2 -2
  408. package/presets/opencode/android-kotlin/agents/migration-specialist.md +2 -2
  409. package/presets/opencode/android-kotlin/agents/mockup-reviewer.md +2 -2
  410. package/presets/opencode/android-kotlin/agents/openspec-author.md +2 -2
  411. package/presets/opencode/android-kotlin/agents/performance-auditor.md +2 -2
  412. package/presets/opencode/android-kotlin/agents/qa-tester.md +2 -2
  413. package/presets/opencode/android-kotlin/agents/security-reviewer.md +2 -2
  414. package/presets/opencode/android-kotlin/agents/task-analyst.md +1 -1
  415. package/presets/opencode/android-kotlin/agents/task-router.md +1 -1
  416. package/presets/opencode/android-kotlin/agents/tech-writer.md +2 -2
  417. package/presets/opencode/android-kotlin/agents/unit-test-generator.md +2 -2
  418. package/presets/opencode/android-kotlin/agents/unit-test-healer.md +2 -2
  419. package/presets/opencode/android-kotlin/agents/unit-test-planner.md +2 -2
  420. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +4 -1
  421. package/presets/opencode/go/agents/build-verifier.md +2 -2
  422. package/presets/opencode/go/agents/code-reviewer.md +2 -2
  423. package/presets/opencode/go/agents/feature-developer.md +2 -2
  424. package/presets/opencode/go/agents/openspec-author.md +2 -2
  425. package/presets/opencode/go/agents/task-analyst.md +1 -1
  426. package/presets/opencode/go/agents/task-router.md +1 -1
  427. package/presets/opencode/go/rules/agent-team-orchestrator.md +4 -1
  428. package/presets/opencode/ios-swift/agents/build-verifier.md +2 -2
  429. package/presets/opencode/ios-swift/agents/code-reviewer.md +2 -2
  430. package/presets/opencode/ios-swift/agents/feature-developer.md +2 -2
  431. package/presets/opencode/ios-swift/agents/mockup-reviewer.md +2 -2
  432. package/presets/opencode/ios-swift/agents/openspec-author.md +2 -2
  433. package/presets/opencode/ios-swift/agents/task-analyst.md +1 -1
  434. package/presets/opencode/ios-swift/agents/task-router.md +1 -1
  435. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +4 -1
  436. package/presets/opencode/java/agents/build-verifier.md +2 -2
  437. package/presets/opencode/java/agents/code-reviewer.md +2 -2
  438. package/presets/opencode/java/agents/feature-developer.md +2 -2
  439. package/presets/opencode/java/agents/openspec-author.md +2 -2
  440. package/presets/opencode/java/agents/task-analyst.md +1 -1
  441. package/presets/opencode/java/agents/task-router.md +1 -1
  442. package/presets/opencode/java/rules/agent-team-orchestrator.md +4 -1
  443. package/presets/opencode/mcp-ts/agents/build-verifier.md +2 -2
  444. package/presets/opencode/mcp-ts/agents/feature-developer.md +2 -2
  445. package/presets/opencode/mcp-ts/agents/task-analyst.md +1 -1
  446. package/presets/opencode/mcp-ts/agents/task-router.md +1 -1
  447. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +4 -1
  448. package/presets/opencode/next/adapter-map.json +9 -1
  449. package/presets/opencode/next/agents/accessibility-reviewer.md +2 -2
  450. package/presets/opencode/next/agents/api-contract-reviewer.md +2 -2
  451. package/presets/opencode/next/agents/build-verifier.md +2 -2
  452. package/presets/opencode/next/agents/ci-investigator.md +2 -2
  453. package/presets/opencode/next/agents/code-reviewer.md +37 -2
  454. package/presets/opencode/next/agents/debugger.md +2 -2
  455. package/presets/opencode/next/agents/feature-developer.md +24 -2
  456. package/presets/opencode/next/agents/migration-specialist.md +2 -2
  457. package/presets/opencode/next/agents/mockup-reviewer.md +29 -3
  458. package/presets/opencode/next/agents/openspec-author.md +2 -2
  459. package/presets/opencode/next/agents/performance-auditor.md +2 -2
  460. package/presets/opencode/next/agents/qa-tester.md +2 -2
  461. package/presets/opencode/next/agents/security-reviewer.md +2 -2
  462. package/presets/opencode/next/agents/solution-architect.md +2 -2
  463. package/presets/opencode/next/agents/task-analyst.md +1 -1
  464. package/presets/opencode/next/agents/task-router.md +1 -1
  465. package/presets/opencode/next/agents/tech-writer.md +2 -2
  466. package/presets/opencode/next/agents/unit-test-generator.md +2 -2
  467. package/presets/opencode/next/agents/unit-test-healer.md +2 -2
  468. package/presets/opencode/next/agents/unit-test-planner.md +2 -2
  469. package/presets/opencode/next/hooks/chain-team-phases.sh +46 -1
  470. package/presets/opencode/next/rules/agent-team-orchestrator.md +4 -1
  471. package/presets/opencode/next/rules/code-review-mr.md +10 -0
  472. package/presets/opencode/next/rules/design-tokens-binding.md +35 -0
  473. package/presets/opencode/next/rules/feature-delivery-workflow.md +17 -0
  474. package/presets/opencode/next/rules/mockup-review.md +9 -0
  475. package/presets/opencode/next/rules/react-ui.md +1 -0
  476. package/presets/opencode/next/skills/code-review/SKILL.md +1 -0
  477. package/presets/opencode/nuxt/agents/accessibility-reviewer.md +2 -2
  478. package/presets/opencode/nuxt/agents/api-contract-reviewer.md +2 -2
  479. package/presets/opencode/nuxt/agents/build-verifier.md +2 -2
  480. package/presets/opencode/nuxt/agents/ci-investigator.md +2 -2
  481. package/presets/opencode/nuxt/agents/code-reviewer.md +2 -2
  482. package/presets/opencode/nuxt/agents/debugger.md +2 -2
  483. package/presets/opencode/nuxt/agents/feature-developer.md +2 -2
  484. package/presets/opencode/nuxt/agents/migration-specialist.md +2 -2
  485. package/presets/opencode/nuxt/agents/mockup-reviewer.md +2 -2
  486. package/presets/opencode/nuxt/agents/openspec-author.md +2 -2
  487. package/presets/opencode/nuxt/agents/performance-auditor.md +2 -2
  488. package/presets/opencode/nuxt/agents/qa-tester.md +2 -2
  489. package/presets/opencode/nuxt/agents/security-reviewer.md +2 -2
  490. package/presets/opencode/nuxt/agents/solution-architect.md +2 -2
  491. package/presets/opencode/nuxt/agents/task-analyst.md +1 -1
  492. package/presets/opencode/nuxt/agents/task-router.md +1 -1
  493. package/presets/opencode/nuxt/agents/tech-writer.md +2 -2
  494. package/presets/opencode/nuxt/agents/unit-test-generator.md +2 -2
  495. package/presets/opencode/nuxt/agents/unit-test-healer.md +2 -2
  496. package/presets/opencode/nuxt/agents/unit-test-planner.md +2 -2
  497. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +4 -1
  498. package/presets/opencode/php-hexagonal/agents/build-verifier.md +2 -2
  499. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +2 -2
  500. package/presets/opencode/php-hexagonal/agents/feature-developer.md +2 -2
  501. package/presets/opencode/php-hexagonal/agents/openspec-author.md +2 -2
  502. package/presets/opencode/php-hexagonal/agents/task-analyst.md +1 -1
  503. package/presets/opencode/php-hexagonal/agents/task-router.md +1 -1
  504. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +4 -1
  505. package/presets/opencode/php-laravel/agents/build-verifier.md +2 -2
  506. package/presets/opencode/php-laravel/agents/code-reviewer.md +2 -2
  507. package/presets/opencode/php-laravel/agents/feature-developer.md +2 -2
  508. package/presets/opencode/php-laravel/agents/openspec-author.md +2 -2
  509. package/presets/opencode/php-laravel/agents/task-analyst.md +1 -1
  510. package/presets/opencode/php-laravel/agents/task-router.md +1 -1
  511. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +4 -1
  512. package/presets/opencode/svelte/agents/accessibility-reviewer.md +2 -2
  513. package/presets/opencode/svelte/agents/api-contract-reviewer.md +2 -2
  514. package/presets/opencode/svelte/agents/build-verifier.md +2 -2
  515. package/presets/opencode/svelte/agents/ci-investigator.md +2 -2
  516. package/presets/opencode/svelte/agents/code-reviewer.md +2 -2
  517. package/presets/opencode/svelte/agents/debugger.md +2 -2
  518. package/presets/opencode/svelte/agents/feature-developer.md +2 -2
  519. package/presets/opencode/svelte/agents/migration-specialist.md +2 -2
  520. package/presets/opencode/svelte/agents/mockup-reviewer.md +2 -2
  521. package/presets/opencode/svelte/agents/openspec-author.md +2 -2
  522. package/presets/opencode/svelte/agents/performance-auditor.md +2 -2
  523. package/presets/opencode/svelte/agents/qa-tester.md +2 -2
  524. package/presets/opencode/svelte/agents/security-reviewer.md +2 -2
  525. package/presets/opencode/svelte/agents/solution-architect.md +2 -2
  526. package/presets/opencode/svelte/agents/task-analyst.md +1 -1
  527. package/presets/opencode/svelte/agents/task-router.md +1 -1
  528. package/presets/opencode/svelte/agents/tech-writer.md +2 -2
  529. package/presets/opencode/svelte/agents/unit-test-generator.md +2 -2
  530. package/presets/opencode/svelte/agents/unit-test-healer.md +2 -2
  531. package/presets/opencode/svelte/agents/unit-test-planner.md +2 -2
  532. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +4 -1
  533. package/scripts/fixtures/cli-golden/claude/next.json +11 -10
  534. package/scripts/fixtures/cli-golden/cursor/next.json +10 -9
  535. package/scripts/fixtures/cli-golden/mavis/next.json +9 -8
  536. package/scripts/fixtures/cli-golden/opencode/next.json +9 -8
@@ -137,7 +137,21 @@ function mutateMetrics(mutator) {
137
137
  try { metrics = JSON.parse(fs.readFileSync(METRICS_PATH, 'utf8')); } catch {
138
138
  const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
139
139
  status.metricsRunId = runId;
140
- metrics = { schemaVersion: 1, task: { runId, slug, preset: 'ai-rules', stack: STACK, platform: PLATFORM, intent: status.intent || 'unknown', profile: 'unknown' }, events: [] };
140
+ // Resolve profile from pipeline.json (preferred) or status.json, falling back to 'unknown'.
141
+ // The router/agent must never write profile into status.json — pipeline.json is the SoT.
142
+ let profile = 'unknown';
143
+ try {
144
+ if (fs.existsSync(pipelinePath)) {
145
+ const pipe = JSON.parse(fs.readFileSync(pipelinePath, 'utf8'));
146
+ if (pipe && (pipe.profile === 'light' || pipe.profile === 'standard' || pipe.profile === 'full')) {
147
+ profile = pipe.profile;
148
+ }
149
+ }
150
+ } catch {}
151
+ if (profile === 'unknown' && (status.profile === 'light' || status.profile === 'standard' || status.profile === 'full')) {
152
+ profile = status.profile;
153
+ }
154
+ metrics = { schemaVersion: 1, task: { runId, slug, preset: 'ai-rules', stack: STACK, platform: PLATFORM, intent: status.intent || 'unknown', profile }, events: [] };
141
155
  metrics.events.push({ eventId: `${runId}:task_started`, type: 'task_started', at: now, source: 'hook', attributionConfidence: 'high' });
142
156
  }
143
157
  mutator(metrics);
@@ -221,9 +235,33 @@ function readBoundReceiptOutcome(agent, step, resolved) {
221
235
  if (!fs.existsSync(manifestPath)) return { outcome: null, receiptRequired: false };
222
236
  try {
223
237
  const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
238
+ // Guard: the schema key is `artifacts` (see agent-artifact-contracts.md). A top-level
239
+ // `entries` key is a silent bug — producer wrote to a wrong field, hook would not
240
+ // see the receipt, and the step hangs in `awaiting_artifact_receipt`. Warn loudly.
241
+ if (manifest && typeof manifest === 'object' && !Array.isArray(manifest.artifacts) && Array.isArray(manifest.entries)) {
242
+ process.stderr.write(`WARNING: ${manifestPath} has top-level "entries" but no "artifacts" array; reading only "artifacts" per schema. The producer likely upserted into the wrong key. See agent-artifact-contracts.md (Schema field name).` + '\n');
243
+ } else if (manifest && typeof manifest === 'object' && Array.isArray(manifest.entries) && Array.isArray(manifest.artifacts)) {
244
+ process.stderr.write(`WARNING: ${manifestPath} has both "artifacts" and "entries" keys; reading only "artifacts" per schema. Foreign "entries" content is ignored.` + '\n');
245
+ }
224
246
  const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
225
247
  const expectedOutputId = artifactOutputIdFor(step, agent);
226
248
  const attemptStartedAt = Date.parse(resolved.entry.startedAt);
249
+ // Pre-scan: warn on the silent-bug classes the filter below would otherwise drop.
250
+ // A receipt with a non-matching attemptId is dropped silently; without this warning,
251
+ // the step hangs in `awaiting_artifact_receipt` with no signal of why. Same for
252
+ // receipts whose terminal timestamp is older than the active attempt (stale retry).
253
+ const activeIds = new Set(Object.keys(status.activeAttempts || {}));
254
+ for (const entry of artifacts) {
255
+ if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') continue;
256
+ const rid = entry.receipt.attemptId;
257
+ if (typeof rid === 'string' && rid !== resolved.attemptId && !activeIds.has(rid)) {
258
+ process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${entry.id}" carries attemptId "${rid}" that does not match the active attempt "${resolved.attemptId}". The receipt is being dropped; step will hang in \`awaiting_artifact_receipt\` unless the producer retries. Common cause: agent reused an attemptId from a prior failed attempt. See agent-artifact-contracts.md (Receipt binding).` + '\n');
259
+ }
260
+ const terminalAt = Date.parse(entry.timestamps?.completedAt || entry.timestamps?.updatedAt || '');
261
+ if (Number.isFinite(attemptStartedAt) && Number.isFinite(terminalAt) && terminalAt < attemptStartedAt) {
262
+ process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${entry.id}" has timestamps.completedAt older than the active attempt's startedAt. Likely a stale receipt from a previous attempt; it is being dropped. See agent-artifact-contracts.md (Receipt binding).` + '\n');
263
+ }
264
+ }
227
265
  const owned = artifacts
228
266
  .filter((entry) => {
229
267
  if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') return false;
@@ -238,6 +276,13 @@ function readBoundReceiptOutcome(agent, step, resolved) {
238
276
  const tb = Date.parse(b.timestamps?.completedAt || b.timestamps?.updatedAt || 0) || 0;
239
277
  return tb - ta;
240
278
  });
279
+ // Bonus: warn if the active attempt's receipts all lack attemptId in a non-parallel step.
280
+ // The orchestrator always provides attemptId, so a missing one means the agent dropped it
281
+ // (model output, JSON.stringify omission, etc.). boundByOutput still binds the receipt by
282
+ // expectedOutputId, so this is not fatal — but it is a contract violation worth flagging.
283
+ if (owned.length > 0 && owned[0].receipt.attemptId == null && !(step && step.parallel && Array.isArray(getStepAgents(step)) && getStepAgents(step).length > 1)) {
284
+ process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${owned[0].id}" lacks entry.receipt.attemptId on a non-parallel step. The receipt is bound by output-id fallback; the agent should always include the attemptId the orchestrator provides. See agent-artifact-contracts.md (Receipt binding).` + '\n');
285
+ }
241
286
  return { outcome: owned[0]?.receipt?.outcome || null, receiptRequired: true };
242
287
  } catch {
243
288
  return { outcome: null, receiptRequired: false };
@@ -15,7 +15,7 @@ In Claude Code all `.md` files under `rules/` are **discovered recursively**. Bo
15
15
  ## Loading strategy
16
16
 
17
17
  - **Session start (no `paths:`):** 3–5 — `next-app-core`, `package-manager`, `code-quality`, `ai-local-overlay`
18
- - **On-demand (`paths:` or via commands):** `post-change-lint` (**must after code edits**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, `security-next`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, `mcp-usage`, `anti-sycophancy-discipline`, `react-next-anti-hallucination`, reference-features, next-app-router, react-a11y-coding, `technical-retro`, `mockup-review`, `ux-design`, **preset-*** meta (paths on `packages/ai-rules/presets/**`)
18
+ - **On-demand (`paths:` or via commands):** `post-change-lint` (**must after code edits**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, `security-next`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, `mcp-usage`, `anti-sycophancy-discipline`, `react-next-anti-hallucination`, reference-features, next-app-router, react-a11y-coding, `technical-retro`, `mockup-review`, `ux-design`, `design-tokens-binding`, **preset-*** meta (paths on `packages/ai-rules/presets/**`)
19
19
  - **Skills:** long workflows (`feature-delivery`, `spec-authoring`, `spec-discovery`, `code-review`, …)
20
20
 
21
21
  ### UI edit bundle (consolidated paths)
@@ -61,6 +61,7 @@ When editing `app/src/ui/**/*.tsx`, a **reduced** set loads:
61
61
  | `http-client.mdc` | `api-and-data/http-client.md` |
62
62
  | `store-rtk.mdc` | `api-and-data/store-rtk.md` |
63
63
  | `react-ui.mdc` | `ui-and-accessibility/react-ui.md` |
64
+ | `design-tokens-binding.mdc` | `ui-and-accessibility/design-tokens-binding.md` | Figma → repo token binding (typography/color/spacing/imagery); per-element parity + self-check |
64
65
  | `react-a11y-coding.mdc` | `ui-and-accessibility/react-a11y-coding.md` |
65
66
  | `no-props-spread.mdc` | `ui-and-accessibility/no-props-spread.md` |
66
67
  | `css-property-order-stylelint.mdc` | `ui-and-accessibility/css-property-order.md` |
@@ -12,6 +12,23 @@ When the prompt or `brief.md` contains a `figma.com` URL, **mockup review** (`mo
12
12
 
13
13
  Before writing a new file in a layer, open **1–2 analog files** in the same layer and mirror: export shape, name prefixes (`T` / `I` where the repo uses them), file suffixes (`.apiMethods.ts`, `.endpoints.ts`, `.data.ts`, `.hooks.ts`, `styles.ts`), mapper / selector / thunk naming, and barrel shape. Record the analogs in the handoff. Where this preset's examples differ from the repo, **the repo wins**.
14
14
 
15
+ ## Figma node-link — child→component decomposition (mandatory pre-implementation)
16
+
17
+ When the prompt or `brief.md` contains a Figma URL with a node id (`?node-id=…`), `mockup-reviewer` must walk the node subtree via Figma MCP and emit **two sections** in `mockup-review.md`:
18
+
19
+ - `## Design contract` — Figma variables, text styles, components/assets used by the subtree, with the repo mapping (`@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens-typography` / `@sds/tokens` / DS components / `next/image` with Figma-derived `src/width/height`). This is the binding table the developer uses for typography, color, spacing, and imagery.
20
+ - `## Node decomposition (AC-2)` — the child→component map (with a `Bindings` column for the Figma design bindings).
21
+
22
+ `feature-developer` must **not** start UI implementation until both sections are present, and must load requestable `ui-and-accessibility/design-tokens-binding.md` to bind every value to a Figma variable / text style / repo token (raw `#…` / `px` are a finding). The full procedure and verdict rule live in the `mockup-reviewer` agent prompt and the `mockup-review` Stack notes.
23
+
24
+ ## UI MR — Figma parity gate (mandatory in code review)
25
+
26
+ When the MR touches UI / layout / styling (`app/src/ui/**`, global layout/CSS/tokens) and a Figma reference exists in `brief.md` / `decomposition.md` or `mockup-review.md` is present, `code-reviewer` must perform a **detailed, pixel-accurate** comparison of the implementation against the mockup across **every project viewport** (mockup-review AC-8 / Stack notes set and the repo’s Storybook viewport toolbar). The comparison is a per-element parity check (typography / color / spacing / imagery / states / structure / auto-layout intent) bound to the `## Design contract` and the `ui-and-accessibility/design-tokens-binding.md` discipline. Findings go in `## Figma parity (UI)` in `review.md`. **Storybook visual baselines are not a substitute.** Missing or `unable_to_compare` parity on a UI MR with a Figma reference → `REQUEST_CHANGES`. The full gate lives in the `code-reviewer` agent prompt and the `code-review-mr` Stack notes.
27
+
28
+ ## UI self-check vs Figma (mandatory in implementation)
29
+
30
+ For UI WPs with a Figma reference, `feature-developer` performs a **self-check vs Figma** at each project viewport (Playwright MCP / Chrome DevTools MCP) before the implementation receipt, fixes obvious typography / color / spacing / imagery / state deviations, and records a `## UI self-check vs Figma` block in `implementation.md`. This is the developer-side counterpart to the parity gate and closes the fidelity loop (extract contract → bind → self-check → review-block).
31
+
15
32
  <!-- shared-core: architecture/feature-delivery-workflow.md -->
16
33
 
17
34
 
@@ -91,7 +91,8 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Sc
91
91
 
92
92
  - Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
93
93
  - Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
94
- - Agents upsert only entries they own and preserve foreign entries. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
94
+ -
95
+ Agents upsert only the items in `manifest.artifacts[]` they own and preserve foreign items. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
95
96
  - The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite state, gate, retry, attempt, timestamp, or metrics fields.
96
97
  - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
97
98
 
@@ -129,6 +130,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
129
130
  | `awaiting_approval` | Human gate; wait for `/task-continue` |
130
131
  | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
131
132
  | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
133
+ | `blocked` | Pipeline / step cannot proceed (e.g. `pipeline_parse_error`, completion of a parallel step whose producer's receipt was missing — see `agent-artifact-contracts.md` § Completion receipts) |
134
+ | `awaiting_artifact_receipt` | Producer stopped but the bound or assigned-output receipt was missing or stale; hook keeps the attempt active and does not advance. See `agent-artifact-contracts.md` (Schema field name + Receipt binding) for the silent-bug class that lands here. |
132
135
 
133
136
  ## Pipeline step options
134
137
 
@@ -59,3 +59,13 @@ On-demand rule for review flows. **Procedure and output format:** skill `code-re
59
59
  - Security: `tooling-and-review/security-next.md`
60
60
  - Tests: `testing/tests-unit.md`, `testing/playwright-agents.md`, `testing/tests-e2e-structure.md`
61
61
  - Lint gate before final report: `tooling-and-review/post-change-lint.md`
62
+
63
+ ### UI / Figma parity (web)
64
+
65
+ When the diff touches UI / layout / styling (paths under `app/src/ui/**`, global layout/CSS/tokens) AND a Figma mockup is referenced in `brief.md` / `decomposition.md` (URL, fileKey, or node id) **or** `mockup-review.md` is present:
66
+
67
+ - The `code-reviewer` agent must perform a **detailed, pixel-accurate** comparison of the implementation against the mockup, **across every viewport the project uses** (the `mockup-review` AC-8 / Stack notes set — web buckets ~375 / ~768 / ~1280 small/medium/large — and the Storybook viewport toolbar in this repo). Figma frames via Figma MCP `get_screenshot`; the running app via Playwright MCP / Chrome DevTools MCP at the matching width.
68
+ - The comparison is a **per-element parity check** (typography / color / spacing / imagery / states / structure / auto-layout intent) per the `code-reviewer` UI / Figma parity gate. Bind to the `mockup-review.md` `## Design contract` and the **`ui-and-accessibility/design-tokens-binding.md`** discipline (`@sds/tokens-*` / DS components, no raw `#…` / `px` where a token exists).
69
+ - Findings: `path:line` + Figma node id + viewport + severity. Emit a `## Figma parity (UI)` section in `review.md`.
70
+ - **Storybook visual baselines are not a substitute.** Approving a UI MR on Storybook baselines alone is not acceptable when a Figma reference exists.
71
+ - Missing or `unable_to_compare` parity section on a UI-touching MR with a Figma reference → `REQUEST_CHANGES`. Unbound raw values where a token exists (typography / color / spacing / imagery) → `blocker` / `important`. The full gate lives in the `code-reviewer` agent prompt; this rule cross-references it.
@@ -116,3 +116,12 @@ PASS | PASS_WITH_NOTES | FAIL | BLOCKED_MCP
116
116
  ## Stack notes
117
117
 
118
118
  Illustrative web buckets (not enforced pixels): ~375 / ~768 / ~1280 mapped to small / medium / large.
119
+
120
+ ### Node-link input (AC-2) — child→component decomposition + Design contract (mandatory)
121
+
122
+ When the Figma URL contains a node id (`?node-id=…`), `mockup-reviewer` must:
123
+
124
+ 1. Walk the node subtree via Figma MCP `get_metadata` and emit a **Node→component map** (each child node id/name/type → target `app/src/ui/**` component, attached library component (e.g. `@sds/*`), or `new: <ProposedName>`). The map goes in `mockup-review.md` under `## Node decomposition (AC-2)` as a table plus a short prose summary, with a `Bindings` column / per-row note for the Figma design bindings.
125
+ 2. Extract the **Design contract** (above the Node decomposition table): Figma variables used by the subtree (color, spacing, radius, effect — one `get_variable_defs` call per file), text styles used, and components / assets (library instances, image fills via `get_design_context`, icons). Each item mapped to the repo equivalent: `@sds/tokens-colors` / `@sds/brand-colors` / `@sds/tokens-typography` / `@sds/tokens` / DS component (`@sds/icon` symbol name, `Text variant="…"`) / `next/image` with Figma-derived `src/width/height`.
126
+
127
+ Both sections are the **pre-implementation contract** the developer reads before coding; the DS/tokens/quality/coverage/viewport dimensions still apply on top. Verdict: missing map **or** missing Design contract on a node-link input → `FAIL` (unless `BLOCKED_MCP`). The developer (`feature-developer`) must not start UI work until both sections are present, and must bind implementation to the Design contract (see `ui-and-accessibility/design-tokens-binding.md`).
@@ -0,0 +1,42 @@
1
+ ---
2
+ paths:
3
+ - app/src/ui/**/*.{ts,tsx,css}
4
+ - app/src/styles/**/*.{css,ts,tsx}
5
+ impact: HIGH
6
+ ---
7
+
8
+ # Design-token binding (Figma → repo)
9
+
10
+ The implementation must mirror the Figma mockup token-for-token. Raw design values where a token exists are a finding. This rule is the web-stack discipline; the reporter (`mockup-reviewer`) emits the bindings, the implementer (`feature-developer`) binds, the reviewer (`code-reviewer`) blocks on unbound raw values.
11
+
12
+ ## Typography
13
+
14
+ - Bind to the Figma **text style** used by the node — extract via Figma MCP `get_design_context` / `get_variable_defs` and the node metadata. Do not invent `font-size: 14px; line-height: 20px;` when a Figma text style exists.
15
+ - Repo mapping: font family, size, line-height, weight, letter-spacing → `@sds/tokens-typography` (or the project token module). In Linaria / styled: `font: var(--font-body-m, …)` / equivalent token.
16
+ - Prefer a typography variant / DS text component that already binds the token (e.g. `Text variant="body-m"`) over a styled wrapper with raw values.
17
+
18
+ ## Color
19
+
20
+ - Bind to the Figma **fill / stroke variable** (`get_variable_defs`). Do not write raw `#…` or `rgb(…)`.
21
+ - Repo mapping: `@sds/tokens-colors`, `@sds/brand-colors`, or the project token module (`color: var(--text-primary, …)`).
22
+ - A raw value is allowed only with an inline `// token-pending: <Figma-variable-name>` comment and a follow-up to bind it. The reviewer treats unbound raw values as a finding.
23
+
24
+ ## Spacing / radius / shadow
25
+
26
+ - Bind to Figma **spacing / radius / effect variables** or the repo spacing scale. Do not write raw `padding: 16px; gap: 12px;` if a token exists.
27
+ - Repo mapping: spacing tokens from `@sds/tokens` / the project scale; Linaria `css\`…\`` uses `var(--space-…, …)`.
28
+ - **Auto-layout intent:** respect Figma auto-layout (direction, gap, padding, alignment). Switching to absolute positioning for a region that is the only responsive evidence is a finding. `display: flex` with the same gap/padding is the safe mirror; do not reflow to a different layout without a reason in the brief.
29
+
30
+ ## Imagery & icons
31
+
32
+ - **Images:** use the Figma asset source from `get_design_context` / the node’s image fill. Repo: `next/image` (or repo convention) with `src`, `width`, `height` derived from Figma. Do not use a placeholder, do not invent a URL, do not change aspect ratio.
33
+ - **Icons:** use the `@sds/icon` (or project DS) symbol name from the Figma component instance / metadata. Do not invent icon names. The Figma node’s component name (e.g. `Icon / chevron-right`) maps to the DS symbol.
34
+ - `alt` text from the Figma node name when meaningful; otherwise from the design context copy.
35
+
36
+ ## Self-check before handoff
37
+
38
+ For UI WPs with a Figma reference: render the page at each project viewport (Playwright MCP / Chrome DevTools MCP) and compare to the Figma `get_screenshot`. Fix obvious typography / color / spacing / imagery deviations before the implementation receipt. Record a short **UI self-check vs Figma** block in `implementation.md` (viewports checked, deviations fixed, remaining gaps, MCP / app status). If the app is not runnable or MCP is down, note the limitation — the reviewer will gate.
39
+
40
+ ## Reviewer contract
41
+
42
+ The `code-reviewer` UI / Figma parity gate enforces this. A UI-touching MR with a Figma reference and unbound raw values where tokens exist → `blocker` (user-visible) or `important` (latent). Missing self-check on a UI WP with a Figma reference → `important`.
@@ -99,6 +99,7 @@ For a reusable component:
99
99
  - **Forbidden** to import another component's `styles` (`../Other/styles`, `../../styles`). Allowed: `./styles`, shared primitives from `@/ui/components/...` or design-system packages.
100
100
  - CSS / `styled` order — Stylelint idiomatic-order: `ui-and-accessibility/css-property-order.md` (loads on `styles.ts` / `.css`).
101
101
  - For visuals use **the style stack and tokens already in the project** (variables, theme, shared classes, design package).
102
+ - **Token binding (Figma → repo):** typography, color, spacing, radius, shadow, and imagery must bind to the project token module and the design system (`@sds/tokens-*` / `@sds/brand-colors` / DS components like `Text variant="…"`, `@sds/icon`, `next/image`). Raw `#…` / `rgb(…)` / `px` where a token exists is a finding. The full discipline — including the per-element parity checklist and the developer self-check vs Figma — is in **`ui-and-accessibility/design-tokens-binding.md`**. When a Figma reference exists, the `mockup-review.md` `## Design contract` section is the binding table; use it.
102
103
  - Avoid:
103
104
  - inline styles except simple cases;
104
105
  - duplicating styling already covered by shared primitives;
@@ -20,6 +20,7 @@ Use the local repository as the source of truth: `git status`, `git diff`, task
20
20
  7. **Reuse lens:** flag new helpers that duplicate existing utilities; prefer adjacent shared modules over copy-paste.
21
21
  8. **Efficiency lens:** unnecessary work, sequential ops that should be parallel, hot-path bloat, no-op store updates, overly broad reads.
22
22
  9. Report validation gaps: lint, stylelint, type-check, or relevant tests not run.
23
+ 10. **UI / Figma parity (when the diff touches UI/layout AND a Figma reference exists):** perform a detailed, pixel-accurate comparison of the implementation against the mockup across **every project viewport** (mockup-review AC-8 / Stack notes set and the repo’s Storybook viewport toolbar). Figma frames via Figma MCP `get_screenshot`; the running app via Playwright MCP / Chrome DevTools MCP at the matching width. Compare **per element** — typography, color, spacing, imagery, states, structure/responsive, auto-layout intent — bound to the `mockup-review.md` `## Design contract` and the `ui-and-accessibility/design-tokens-binding.md` discipline (`@sds/tokens-*` / DS components; raw `#…` / `px` where a token exists is a finding). Emit a `## Figma parity (UI)` section in `review.md`. **Storybook visual baselines are not a substitute.** Missing or `unable_to_compare` parity on a UI MR with a Figma reference → `REQUEST_CHANGES`. Unbound raw values → `blocker` / `important`.
23
24
 
24
25
  ## Output
25
26
 
@@ -74,8 +74,8 @@ Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools M
74
74
 
75
75
  ## Artifact contract
76
76
 
77
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation or UI diff scope, and prior review artifacts when present.
78
- - **Owned outputs:** `a11y-review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `a11y-review`) and preserve all foreign entries.
77
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation or UI diff scope, and prior review artifacts when present.
78
+ - **Owned outputs:** `a11y-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `a11y-review`) and preserve all foreign items in `manifest.artifacts[]`.
79
79
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
80
80
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
81
81
 
@@ -72,8 +72,8 @@ For feature-developer before or during implementation.
72
72
 
73
73
  ## Artifact contract
74
74
 
75
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, architecture when present, and changed types/API/mocks against the contract docs.
76
- - **Owned outputs:** `api-contract-review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `api-contract-review`) and preserve all foreign entries.
75
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, architecture when present, and changed types/API/mocks against the contract docs.
76
+ - **Owned outputs:** `api-contract-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `api-contract-review`) and preserve all foreign items in `manifest.artifacts[]`.
77
77
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
78
78
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
79
79
 
@@ -117,7 +117,7 @@ Do not fix code — report only. Do not advance to code-reviewer until PASS.
117
117
 
118
118
  ## Artifact contract
119
119
 
120
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation evidence, pipeline scope, and changed files.
121
- - **Owned outputs:** `validation-report.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign entries.
120
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation evidence, pipeline scope, and changed files.
121
+ - **Owned outputs:** `validation-report.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign items in `manifest.artifacts[]`.
122
122
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `validation_failed`. Bind it to the supplied `attemptId` when present.
123
123
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -90,8 +90,8 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
90
90
 
91
91
  ## Artifact contract
92
92
 
93
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition when present, failing check context, and prior validation/debug artifacts.
94
- - **Owned outputs:** `ci-report.md` plus any minimal fix paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `ci`) and preserve all foreign entries.
93
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition when present, failing check context, and prior validation/debug artifacts.
94
+ - **Owned outputs:** `ci-report.md` plus any minimal fix paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `ci`) and preserve all foreign items in `manifest.artifacts[]`.
95
95
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
96
96
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
97
97
 
@@ -80,7 +80,7 @@ Do not mix this output with retrospective facilitation — keep review and retro
80
80
 
81
81
  ## Artifact contract
82
82
 
83
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation, validation evidence, and the scoped git diff.
84
- - **Owned outputs:** `review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign entries.
83
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation, validation evidence, and the scoped git diff.
84
+ - **Owned outputs:** `review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign items in `manifest.artifacts[]`.
85
85
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
86
86
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -97,8 +97,8 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
97
97
 
98
98
  ## Artifact contract
99
99
 
100
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition when present, failing evidence, and related prior artifacts.
101
- - **Owned outputs:** `debug-report.md` plus any minimal fix paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `debug`) and preserve all foreign entries.
100
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition when present, failing evidence, and related prior artifacts.
101
+ - **Owned outputs:** `debug-report.md` plus any minimal fix paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `debug`) and preserve all foreign items in `manifest.artifacts[]`.
102
102
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
103
103
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
104
104
 
@@ -135,7 +135,7 @@ Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools M
135
135
 
136
136
  ## Artifact contract
137
137
 
138
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
139
- - **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign entries.
138
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
139
+ - **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign items in `manifest.artifacts[]`.
140
140
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
141
141
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -78,8 +78,8 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
78
78
 
79
79
  ## Artifact contract
80
80
 
81
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and stack/version context from the repo.
82
- - **Owned outputs:** `migration-plan.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `migration-plan`) and preserve all foreign entries.
81
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition and stack/version context from the repo.
82
+ - **Owned outputs:** `migration-plan.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `migration-plan`) and preserve all foreign items in `manifest.artifacts[]`.
83
83
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
84
84
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
85
85
 
@@ -68,8 +68,8 @@ Standalone FAIL must **not** set `changes_requested`. Embedded FAIL is a FAIL-on
68
68
 
69
69
  ## Artifact contract
70
70
 
71
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for routing + analysis when present (standalone may have only the prompt + URL).
72
- - **Owned outputs:** `mockup-review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `mockup-review`) and preserve all foreign entries.
71
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for routing + analysis when present (standalone may have only the prompt + URL).
72
+ - **Owned outputs:** `mockup-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `mockup-review`) and preserve all foreign items in `manifest.artifacts[]`.
73
73
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed`, `changes_requested`, or `blocked` per the table above. Bind it to the supplied `attemptId` when present.
74
74
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
75
75
 
@@ -138,8 +138,8 @@ If `scope` carries multiple phases (e.g. `openspec:<change-id>:propose+apply`),
138
138
 
139
139
  ## Artifact contract
140
140
 
141
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and available architecture/migration/review artifacts.
142
- - **Owned outputs:** `openspec/changes/<change-id>/**` (proposal.md, design.md, tasks.md, .openspec.yaml, specs/<capability>/spec.md delta) plus the team slot `openspec-change.md` in `.ai.local/team/tasks/<slug>/` when the orchestrator asks for a summary handoff. Preserve all foreign entries; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `openspec-change`).
141
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition and available architecture/migration/review artifacts.
142
+ - **Owned outputs:** `openspec/changes/<change-id>/**` (proposal.md, design.md, tasks.md, .openspec.yaml, specs/<capability>/spec.md delta) plus the team slot `openspec-change.md` in `.ai.local/team/tasks/<slug>/` when the orchestrator asks for a summary handoff. Preserve all foreign items in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `openspec-change`).
143
143
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths under `openspec/changes/<change-id>/**`, attach `openspec validate <change-id> --type change --strict` exit code + deltas-only summary, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
144
144
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
145
145
 
@@ -77,8 +77,8 @@ If Chrome DevTools MCP is ready and the app is running, use it for console/netwo
77
77
 
78
78
  ## Artifact contract
79
79
 
80
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief when present and the scoped git diff / routes under audit.
81
- - **Owned outputs:** `perf-report.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `perf-report`) and preserve all foreign entries.
80
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief when present and the scoped git diff / routes under audit.
81
+ - **Owned outputs:** `perf-report.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `perf-report`) and preserve all foreign items in `manifest.artifacts[]`.
82
82
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
83
83
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
84
84
 
@@ -57,8 +57,8 @@ When the task is mostly e2e, prefer invoking the dedicated `playwright-test-plan
57
57
 
58
58
  ## Artifact contract
59
59
 
60
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, reviewer notes when present, and prior implementation/validation artifacts.
61
- - **Owned outputs:** changed/added test paths (and any QA notes written under the slug dir); upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `qa-tester`) and preserve all foreign entries.
60
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, reviewer notes when present, and prior implementation/validation artifacts.
61
+ - **Owned outputs:** changed/added test paths (and any QA notes written under the slug dir); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `qa-tester`) and preserve all foreign items in `manifest.artifacts[]`.
62
62
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
63
63
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
64
64
 
@@ -67,8 +67,8 @@ PASS | PASS_WITH_NOTES | FAIL
67
67
 
68
68
  ## Artifact contract
69
69
 
70
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, prior `review.md` when present, and the scoped git diff.
71
- - **Owned outputs:** `security-review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `security-review`) and preserve all foreign entries.
70
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, prior `review.md` when present, and the scoped git diff.
71
+ - **Owned outputs:** `security-review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `security-review`) and preserve all foreign items in `manifest.artifacts[]`.
72
72
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
73
73
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
74
74
 
@@ -77,8 +77,8 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
77
77
 
78
78
  ## Artifact contract
79
79
 
80
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and applicable prior analysis artifacts.
81
- - **Owned outputs:** `architecture.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `architecture`) and preserve all foreign entries.
80
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition and applicable prior analysis artifacts.
81
+ - **Owned outputs:** `architecture.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `architecture`) and preserve all foreign items in `manifest.artifacts[]`.
82
82
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
83
83
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
84
84
 
@@ -184,6 +184,6 @@ If the prompt/brief has a tracker URL (Linear/Jira/Notion/…) and that MCP is r
184
184
  ## Artifact contract
185
185
 
186
186
  - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
187
- - **Owned outputs:** `brief.md` and `decomposition.md` (plus `ux-design.md` when produced); upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign entries.
187
+ - **Owned outputs:** `brief.md` and `decomposition.md` (plus `ux-design.md` when produced); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign items in `manifest.artifacts[]`.
188
188
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
189
189
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -196,6 +196,6 @@ Return the routing receipt to the orchestrator. The orchestration runtime/hook e
196
196
  ## Artifact contract
197
197
 
198
198
  - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
199
- - **Owned outputs:** `pipeline.json` and the routing manifest entry; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign entries.
199
+ - **Owned outputs:** `pipeline.json` and the routing entry in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign items in `manifest.artifacts[]`.
200
200
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
201
201
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
@@ -70,8 +70,8 @@ Post-delivery: when behavior or public docs changed and `docs/specs/` is in play
70
70
 
71
71
  ## Artifact contract
72
72
 
73
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and available architecture/migration/review artifacts.
74
- - **Owned outputs:** `documentation.md` (and any explicitly requested docs paths); upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `documentation`) and preserve all foreign entries.
73
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition and available architecture/migration/review artifacts.
74
+ - **Owned outputs:** `documentation.md` (and any explicitly requested docs paths); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `documentation`) and preserve all foreign items in `manifest.artifacts[]`.
75
75
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
76
76
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
77
77
 
@@ -45,8 +45,8 @@ Run affected unit tests from repository root when feasible. Report files changed
45
45
 
46
46
  ## Artifact contract
47
47
 
48
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `unit-test-plan.md`, brief/decomposition when present, and target modules.
49
- - **Owned outputs:** generated/updated `*.spec.ts` / `*.spec.ts` paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `unit-test-generator`) and preserve all foreign entries.
48
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for `unit-test-plan.md`, brief/decomposition when present, and target modules.
49
+ - **Owned outputs:** generated/updated `*.spec.ts` / `*.spec.ts` paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `unit-test-generator`) and preserve all foreign items in `manifest.artifacts[]`.
50
50
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
51
51
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
52
52
 
@@ -46,8 +46,8 @@ Report root cause, files changed, validation result, and remaining risk.
46
46
 
47
47
  ## Artifact contract
48
48
 
49
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for failing test evidence, `unit-test-plan.md` when present, and recent diff.
50
- - **Owned outputs:** healed `*.spec.ts` / `*.spec.ts` paths (and minimal production fixes only when evidenced); upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `unit-test-healer`) and preserve all foreign entries.
49
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for failing test evidence, `unit-test-plan.md` when present, and recent diff.
50
+ - **Owned outputs:** healed `*.spec.ts` / `*.spec.ts` paths (and minimal production fixes only when evidenced); upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `unit-test-healer`) and preserve all foreign items in `manifest.artifacts[]`.
51
51
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
52
52
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
53
53
 
@@ -66,8 +66,8 @@ Test titles in the plan must follow Russian capitalization rules from `rules/tes
66
66
 
67
67
  ## Artifact contract
68
68
 
69
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and target modules under `**`.
70
- - **Owned outputs:** `unit-test-plan.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `unit-test-planner`) and preserve all foreign entries.
69
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition and target modules under `**`.
70
+ - **Owned outputs:** `unit-test-plan.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `unit-test-planner`) and preserve all foreign items in `manifest.artifacts[]`.
71
71
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
72
72
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
73
73
 
@@ -96,7 +96,8 @@ Each slug has one `artifact-manifest.json` at `.ai.local/team/tasks/<slug>/`. Sc
96
96
 
97
97
  - Read the manifest before broad prior-artifact discovery. Each step receives authoritative input entry IDs, owns named output entry IDs, and finishes with one terminal receipt linked to AC/task IDs.
98
98
  - Markdown remains detailed evidence; the manifest records producer, status, authoritative paths, timestamps, outcome, and evidence paths.
99
- - Agents upsert only entries they own and preserve foreign entries. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
99
+ -
100
+ Agents upsert only the items in `manifest.artifacts[]` they own and preserve foreign items. Parallel agents use distinct IDs; the parent/orchestrator serializes manifest merges.
100
101
  - The orchestration runtime/hook is the single writer for `status.json` lifecycle fields and `metrics.json`. Agents read status for eligibility but never rewrite state, gate, retry, attempt, timestamp, or metrics fields.
101
102
  - Missing/stale manifests are reported as a handoff gap; fall back to `brief.md`, `decomposition.md`, and `pipeline.json` rather than inventing authority.
102
103
 
@@ -134,6 +135,8 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
134
135
  | `awaiting_approval` | Human gate; wait for `/task-continue` |
135
136
  | `changes_requested` | Reviewer blocked; re-run developer (`retryAfterFix`) |
136
137
  | `validation_failed` | build-verifier failed; re-run developer then build-verifier |
138
+ | `blocked` | Pipeline / step cannot proceed (e.g. `pipeline_parse_error`, completion of a parallel step whose producer's receipt was missing — see `agent-artifact-contracts.md` § Completion receipts) |
139
+ | `awaiting_artifact_receipt` | Producer stopped but the bound or assigned-output receipt was missing or stale; hook keeps the attempt active and does not advance. See `agent-artifact-contracts.md` (Schema field name + Receipt binding) for the silent-bug class that lands here. |
137
140
 
138
141
  ## Pipeline step options
139
142
 
@@ -75,8 +75,8 @@ Document PASS/FAIL in `validation-report.md`.
75
75
 
76
76
  ## Artifact contract
77
77
 
78
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation evidence, pipeline scope, and changed files.
79
- - **Owned outputs:** `validation-report.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign entries.
78
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation evidence, pipeline scope, and changed files.
79
+ - **Owned outputs:** `validation-report.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `validation`) and preserve all foreign items in `manifest.artifacts[]`.
80
80
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `validation_failed`. Bind it to the supplied `attemptId` when present.
81
81
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
82
82
 
@@ -61,8 +61,8 @@ Write `.ai.local/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHA
61
61
 
62
62
  ## Artifact contract
63
63
 
64
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, implementation, validation evidence, and the scoped git diff.
65
- - **Owned outputs:** `review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign entries.
64
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition, implementation, validation evidence, and the scoped git diff.
65
+ - **Owned outputs:** `review.md`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `review`) and preserve all foreign items in `manifest.artifacts[]`.
66
66
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
67
67
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
68
68
 
@@ -115,8 +115,8 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
115
115
 
116
116
  ## Artifact contract
117
117
 
118
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
119
- - **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign entries.
118
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for `brief.md`, `decomposition.md`, current scope, and applicable prior findings.
119
+ - **Owned outputs:** `implementation.md` plus changed implementation/test paths; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `implementation`) and preserve all foreign items in `manifest.artifacts[]`.
120
120
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
121
121
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
122
122
 
@@ -136,8 +136,8 @@ If `scope` carries multiple phases (e.g. `openspec:<change-id>:propose+apply`),
136
136
 
137
137
  ## Artifact contract
138
138
 
139
- - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and available architecture/migration/review artifacts.
140
- - **Owned outputs:** `openspec/changes/<change-id>/**` (proposal.md, design.md, tasks.md, .openspec.yaml, specs/<capability>/spec.md delta) plus the team slot `openspec-change.md` in `.ai.local/team/tasks/<slug>/` when the orchestrator asks for a summary handoff. Preserve all foreign entries; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `openspec-change`).
139
+ - **Authoritative inputs:** read `.ai.local/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the items in `manifest.artifacts[]` for brief/decomposition and available architecture/migration/review artifacts.
140
+ - **Owned outputs:** `openspec/changes/<change-id>/**` (proposal.md, design.md, tasks.md, .openspec.yaml, specs/<capability>/spec.md delta) plus the team slot `openspec-change.md` in `.ai.local/team/tasks/<slug>/` when the orchestrator asks for a summary handoff. Preserve all foreign items in `manifest.artifacts[]`; upsert only the entry in `manifest.artifacts[]` assigned by handoff (`artifactOutputId`; fallback `openspec-change`).
141
141
  - **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths under `openspec/changes/<change-id>/**`, attach `openspec validate <change-id> --type change --strict` exit code + deltas-only summary, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
142
142
  - **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
143
143