@bonesofspring/ai-rules 0.2.48 → 0.2.50

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 (508) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +12 -1
  3. package/docs/PRESET-CONTRIBUTION.md +17 -4
  4. package/package.json +5 -1
  5. package/presets/_shared/ai-local/scripts/derive-gate-signals.mjs +1 -0
  6. package/presets/_shared/ai-local/scripts/manifest.mjs +30 -9
  7. package/presets/_shared/ai-local/scripts/rule-improver.mjs +42 -7
  8. package/presets/_shared/ai-local/scripts/signals.mjs +7 -1
  9. package/presets/_shared/core/agent-team/agent-artifact-contracts.md +5 -2
  10. package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -1
  11. package/presets/_shared/core/quality/code-quality-and-refactoring.md +1 -8
  12. package/presets/_shared/core/quality/interactive-questions.md +27 -0
  13. package/presets/_shared/core/review/technical-retro.md +2 -0
  14. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +9 -0
  15. package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
  16. package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
  17. package/presets/claude/android-kotlin/agents/debugger.md +1 -1
  18. package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
  19. package/presets/claude/android-kotlin/agents/qa-tester.md +1 -1
  20. package/presets/claude/android-kotlin/commands/technical-retro.md +1 -1
  21. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +9 -0
  22. package/presets/claude/android-kotlin/rules/README.md +1 -0
  23. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  24. package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +1 -8
  25. package/presets/claude/android-kotlin/rules/tooling-and-review/interactive-questions.md +34 -0
  26. package/presets/claude/android-kotlin/rules/tooling-and-review/technical-retro.md +2 -0
  27. package/presets/claude/android-kotlin/skills/technical-retro/SKILL.md +1 -1
  28. package/presets/claude/go/agents/build-verifier.md +1 -1
  29. package/presets/claude/go/agents/code-reviewer.md +1 -1
  30. package/presets/claude/go/agents/debugger.md +1 -1
  31. package/presets/claude/go/agents/feature-developer.md +1 -1
  32. package/presets/claude/go/agents/qa-tester.md +1 -1
  33. package/presets/claude/go/commands/technical-retro.md +1 -1
  34. package/presets/claude/go/hooks/chain-team-phases.sh +9 -0
  35. package/presets/claude/go/rules/README.md +1 -0
  36. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  37. package/presets/claude/go/rules/tooling-and-review/code-quality.md +1 -8
  38. package/presets/claude/go/rules/tooling-and-review/interactive-questions.md +34 -0
  39. package/presets/claude/go/rules/tooling-and-review/technical-retro.md +2 -0
  40. package/presets/claude/go/skills/technical-retro/SKILL.md +1 -1
  41. package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
  42. package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
  43. package/presets/claude/ios-swift/agents/debugger.md +1 -1
  44. package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
  45. package/presets/claude/ios-swift/agents/qa-tester.md +1 -1
  46. package/presets/claude/ios-swift/commands/technical-retro.md +1 -1
  47. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +9 -0
  48. package/presets/claude/ios-swift/rules/README.md +2 -0
  49. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  50. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +1 -8
  51. package/presets/claude/ios-swift/rules/tooling-and-review/interactive-questions.md +34 -0
  52. package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +2 -0
  53. package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +1 -1
  54. package/presets/claude/java/agents/build-verifier.md +1 -1
  55. package/presets/claude/java/agents/code-reviewer.md +1 -1
  56. package/presets/claude/java/agents/debugger.md +1 -1
  57. package/presets/claude/java/agents/feature-developer.md +1 -1
  58. package/presets/claude/java/agents/qa-tester.md +1 -1
  59. package/presets/claude/java/commands/technical-retro.md +1 -1
  60. package/presets/claude/java/hooks/chain-team-phases.sh +9 -0
  61. package/presets/claude/java/rules/README.md +1 -0
  62. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  63. package/presets/claude/java/rules/tooling-and-review/code-quality.md +1 -8
  64. package/presets/claude/java/rules/tooling-and-review/interactive-questions.md +34 -0
  65. package/presets/claude/java/rules/tooling-and-review/technical-retro.md +2 -0
  66. package/presets/claude/java/skills/technical-retro/SKILL.md +1 -1
  67. package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
  68. package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
  69. package/presets/claude/mcp-ts/commands/technical-retro.md +1 -1
  70. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +9 -0
  71. package/presets/claude/mcp-ts/rules/README.md +1 -0
  72. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  73. package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +1 -8
  74. package/presets/claude/mcp-ts/rules/tooling-and-review/interactive-questions.md +34 -0
  75. package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +2 -0
  76. package/presets/claude/next/agents/build-verifier.md +1 -1
  77. package/presets/claude/next/agents/code-reviewer.md +1 -1
  78. package/presets/claude/next/agents/debugger.md +1 -1
  79. package/presets/claude/next/agents/feature-developer.md +1 -1
  80. package/presets/claude/next/agents/qa-tester.md +1 -1
  81. package/presets/claude/next/commands/technical-retro.md +1 -1
  82. package/presets/claude/next/hooks/chain-team-phases.sh +9 -0
  83. package/presets/claude/next/rules/README.md +3 -1
  84. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  85. package/presets/claude/next/rules/tooling-and-review/code-quality.md +1 -8
  86. package/presets/claude/next/rules/tooling-and-review/interactive-questions.md +34 -0
  87. package/presets/claude/next/rules/tooling-and-review/technical-retro.md +2 -0
  88. package/presets/claude/next/skills/technical-retro/SKILL.md +1 -1
  89. package/presets/claude/nuxt/agents/build-verifier.md +1 -1
  90. package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
  91. package/presets/claude/nuxt/agents/debugger.md +1 -1
  92. package/presets/claude/nuxt/agents/feature-developer.md +1 -1
  93. package/presets/claude/nuxt/agents/qa-tester.md +1 -1
  94. package/presets/claude/nuxt/commands/technical-retro.md +1 -1
  95. package/presets/claude/nuxt/hooks/chain-team-phases.sh +9 -0
  96. package/presets/claude/nuxt/rules/README.md +2 -0
  97. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  98. package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +1 -8
  99. package/presets/claude/nuxt/rules/tooling-and-review/interactive-questions.md +34 -0
  100. package/presets/claude/nuxt/rules/tooling-and-review/technical-retro.md +2 -0
  101. package/presets/claude/nuxt/skills/technical-retro/SKILL.md +1 -1
  102. package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
  103. package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
  104. package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
  105. package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
  106. package/presets/claude/php-hexagonal/agents/qa-tester.md +1 -1
  107. package/presets/claude/php-hexagonal/commands/technical-retro.md +1 -1
  108. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +9 -0
  109. package/presets/claude/php-hexagonal/rules/README.md +1 -0
  110. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  111. package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +1 -8
  112. package/presets/claude/php-hexagonal/rules/tooling-and-review/interactive-questions.md +34 -0
  113. package/presets/claude/php-hexagonal/rules/tooling-and-review/technical-retro.md +2 -0
  114. package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
  115. package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
  116. package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
  117. package/presets/claude/php-laravel/agents/debugger.md +1 -1
  118. package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
  119. package/presets/claude/php-laravel/agents/qa-tester.md +1 -1
  120. package/presets/claude/php-laravel/commands/technical-retro.md +1 -1
  121. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +9 -0
  122. package/presets/claude/php-laravel/rules/README.md +1 -0
  123. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  124. package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +1 -8
  125. package/presets/claude/php-laravel/rules/tooling-and-review/interactive-questions.md +34 -0
  126. package/presets/claude/php-laravel/rules/tooling-and-review/technical-retro.md +2 -0
  127. package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +1 -1
  128. package/presets/claude/svelte/agents/build-verifier.md +1 -1
  129. package/presets/claude/svelte/agents/code-reviewer.md +1 -1
  130. package/presets/claude/svelte/agents/debugger.md +1 -1
  131. package/presets/claude/svelte/agents/feature-developer.md +1 -1
  132. package/presets/claude/svelte/agents/qa-tester.md +1 -1
  133. package/presets/claude/svelte/commands/technical-retro.md +1 -1
  134. package/presets/claude/svelte/hooks/chain-team-phases.sh +9 -0
  135. package/presets/claude/svelte/rules/README.md +2 -0
  136. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
  137. package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +1 -8
  138. package/presets/claude/svelte/rules/tooling-and-review/interactive-questions.md +34 -0
  139. package/presets/claude/svelte/rules/tooling-and-review/technical-retro.md +2 -0
  140. package/presets/claude/svelte/skills/technical-retro/SKILL.md +1 -1
  141. package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
  142. package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
  143. package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
  144. package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
  145. package/presets/cursor/android-kotlin/agents/qa-tester.md +1 -1
  146. package/presets/cursor/android-kotlin/commands/technical-retro.md +1 -1
  147. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +9 -0
  148. package/presets/cursor/android-kotlin/rules/README.md +1 -0
  149. package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +1 -8
  150. package/presets/cursor/android-kotlin/rules/interactive-questions.mdc +34 -0
  151. package/presets/cursor/android-kotlin/rules/technical-retro.mdc +2 -0
  152. package/presets/cursor/android-kotlin/skills/technical-retro/SKILL.md +1 -1
  153. package/presets/cursor/go/agents/build-verifier.md +1 -1
  154. package/presets/cursor/go/agents/code-reviewer.md +1 -1
  155. package/presets/cursor/go/agents/debugger.md +1 -1
  156. package/presets/cursor/go/agents/feature-developer.md +1 -1
  157. package/presets/cursor/go/agents/qa-tester.md +1 -1
  158. package/presets/cursor/go/commands/technical-retro.md +1 -1
  159. package/presets/cursor/go/hooks/chain-team-phases.sh +9 -0
  160. package/presets/cursor/go/rules/README.md +2 -1
  161. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +1 -8
  162. package/presets/cursor/go/rules/interactive-questions.mdc +34 -0
  163. package/presets/cursor/go/rules/technical-retro.mdc +2 -0
  164. package/presets/cursor/go/skills/technical-retro/SKILL.md +1 -1
  165. package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
  166. package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
  167. package/presets/cursor/ios-swift/agents/debugger.md +1 -1
  168. package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
  169. package/presets/cursor/ios-swift/agents/qa-tester.md +1 -1
  170. package/presets/cursor/ios-swift/commands/technical-retro.md +1 -1
  171. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +9 -0
  172. package/presets/cursor/ios-swift/rules/README.md +1 -0
  173. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +1 -8
  174. package/presets/cursor/ios-swift/rules/interactive-questions.mdc +34 -0
  175. package/presets/cursor/ios-swift/rules/technical-retro.mdc +2 -0
  176. package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +1 -1
  177. package/presets/cursor/java/agents/build-verifier.md +1 -1
  178. package/presets/cursor/java/agents/code-reviewer.md +1 -1
  179. package/presets/cursor/java/agents/debugger.md +1 -1
  180. package/presets/cursor/java/agents/feature-developer.md +1 -1
  181. package/presets/cursor/java/agents/qa-tester.md +1 -1
  182. package/presets/cursor/java/commands/technical-retro.md +1 -1
  183. package/presets/cursor/java/hooks/chain-team-phases.sh +9 -0
  184. package/presets/cursor/java/rules/README.md +2 -1
  185. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +1 -8
  186. package/presets/cursor/java/rules/interactive-questions.mdc +34 -0
  187. package/presets/cursor/java/rules/technical-retro.mdc +2 -0
  188. package/presets/cursor/java/skills/technical-retro/SKILL.md +1 -1
  189. package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
  190. package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
  191. package/presets/cursor/mcp-ts/commands/technical-retro.md +1 -1
  192. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +9 -0
  193. package/presets/cursor/mcp-ts/rules/README.md +2 -1
  194. package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +1 -8
  195. package/presets/cursor/mcp-ts/rules/interactive-questions.mdc +34 -0
  196. package/presets/cursor/mcp-ts/rules/technical-retro.mdc +2 -0
  197. package/presets/cursor/next/agents/build-verifier.md +1 -1
  198. package/presets/cursor/next/agents/code-reviewer.md +1 -1
  199. package/presets/cursor/next/agents/debugger.md +1 -1
  200. package/presets/cursor/next/agents/feature-developer.md +1 -1
  201. package/presets/cursor/next/agents/qa-tester.md +1 -1
  202. package/presets/cursor/next/commands/technical-retro.md +1 -1
  203. package/presets/cursor/next/hooks/chain-team-phases.sh +9 -0
  204. package/presets/cursor/next/rules/README.md +2 -1
  205. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +1 -8
  206. package/presets/cursor/next/rules/interactive-questions.mdc +34 -0
  207. package/presets/cursor/next/rules/technical-retro.mdc +2 -0
  208. package/presets/cursor/next/skills/technical-retro/SKILL.md +1 -1
  209. package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
  210. package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
  211. package/presets/cursor/nuxt/agents/debugger.md +1 -1
  212. package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
  213. package/presets/cursor/nuxt/agents/qa-tester.md +1 -1
  214. package/presets/cursor/nuxt/commands/technical-retro.md +1 -1
  215. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +9 -0
  216. package/presets/cursor/nuxt/rules/README.md +2 -1
  217. package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +1 -8
  218. package/presets/cursor/nuxt/rules/interactive-questions.mdc +34 -0
  219. package/presets/cursor/nuxt/rules/technical-retro.mdc +2 -0
  220. package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +1 -1
  221. package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
  222. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
  223. package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
  224. package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
  225. package/presets/cursor/php-hexagonal/agents/qa-tester.md +1 -1
  226. package/presets/cursor/php-hexagonal/commands/technical-retro.md +1 -1
  227. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +9 -0
  228. package/presets/cursor/php-hexagonal/rules/README.md +2 -1
  229. package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +1 -8
  230. package/presets/cursor/php-hexagonal/rules/interactive-questions.mdc +34 -0
  231. package/presets/cursor/php-hexagonal/rules/technical-retro.mdc +2 -0
  232. package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
  233. package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
  234. package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
  235. package/presets/cursor/php-laravel/agents/debugger.md +1 -1
  236. package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
  237. package/presets/cursor/php-laravel/agents/qa-tester.md +1 -1
  238. package/presets/cursor/php-laravel/commands/technical-retro.md +1 -1
  239. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +9 -0
  240. package/presets/cursor/php-laravel/rules/README.md +2 -1
  241. package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +1 -8
  242. package/presets/cursor/php-laravel/rules/interactive-questions.mdc +34 -0
  243. package/presets/cursor/php-laravel/rules/technical-retro.mdc +2 -0
  244. package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +1 -1
  245. package/presets/cursor/svelte/agents/build-verifier.md +1 -1
  246. package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
  247. package/presets/cursor/svelte/agents/debugger.md +1 -1
  248. package/presets/cursor/svelte/agents/feature-developer.md +1 -1
  249. package/presets/cursor/svelte/agents/qa-tester.md +1 -1
  250. package/presets/cursor/svelte/commands/technical-retro.md +1 -1
  251. package/presets/cursor/svelte/hooks/chain-team-phases.sh +9 -0
  252. package/presets/cursor/svelte/rules/README.md +2 -1
  253. package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +1 -8
  254. package/presets/cursor/svelte/rules/interactive-questions.mdc +34 -0
  255. package/presets/cursor/svelte/rules/technical-retro.mdc +2 -0
  256. package/presets/cursor/svelte/skills/technical-retro/SKILL.md +1 -1
  257. package/presets/mavis/android-kotlin/adapter-map.json +10 -1
  258. package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
  259. package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
  260. package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
  261. package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
  262. package/presets/mavis/android-kotlin/agents/qa-tester.md +1 -1
  263. package/presets/mavis/android-kotlin/commands/technical-retro.md +1 -1
  264. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +9 -0
  265. package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +1 -1
  266. package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +1 -8
  267. package/presets/mavis/android-kotlin/rules/interactive-questions.md +29 -0
  268. package/presets/mavis/android-kotlin/rules/technical-retro.md +2 -0
  269. package/presets/mavis/android-kotlin/skills/technical-retro/SKILL.md +1 -1
  270. package/presets/mavis/go/adapter-map.json +10 -1
  271. package/presets/mavis/go/agents/build-verifier.md +1 -1
  272. package/presets/mavis/go/agents/code-reviewer.md +1 -1
  273. package/presets/mavis/go/agents/debugger.md +1 -1
  274. package/presets/mavis/go/agents/feature-developer.md +1 -1
  275. package/presets/mavis/go/agents/qa-tester.md +1 -1
  276. package/presets/mavis/go/commands/technical-retro.md +1 -1
  277. package/presets/mavis/go/hooks/chain-team-phases.sh +9 -0
  278. package/presets/mavis/go/rules/agent-team-orchestrator.md +1 -1
  279. package/presets/mavis/go/rules/code-quality-and-refactoring.md +1 -8
  280. package/presets/mavis/go/rules/interactive-questions.md +29 -0
  281. package/presets/mavis/go/rules/technical-retro.md +2 -0
  282. package/presets/mavis/go/skills/technical-retro/SKILL.md +1 -1
  283. package/presets/mavis/ios-swift/adapter-map.json +10 -1
  284. package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
  285. package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
  286. package/presets/mavis/ios-swift/agents/debugger.md +1 -1
  287. package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
  288. package/presets/mavis/ios-swift/agents/qa-tester.md +1 -1
  289. package/presets/mavis/ios-swift/commands/technical-retro.md +1 -1
  290. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +9 -0
  291. package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +1 -1
  292. package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +1 -8
  293. package/presets/mavis/ios-swift/rules/interactive-questions.md +29 -0
  294. package/presets/mavis/ios-swift/rules/technical-retro.md +2 -0
  295. package/presets/mavis/ios-swift/skills/technical-retro/SKILL.md +1 -1
  296. package/presets/mavis/java/adapter-map.json +10 -1
  297. package/presets/mavis/java/agents/build-verifier.md +1 -1
  298. package/presets/mavis/java/agents/code-reviewer.md +1 -1
  299. package/presets/mavis/java/agents/debugger.md +1 -1
  300. package/presets/mavis/java/agents/feature-developer.md +1 -1
  301. package/presets/mavis/java/agents/qa-tester.md +1 -1
  302. package/presets/mavis/java/commands/technical-retro.md +1 -1
  303. package/presets/mavis/java/hooks/chain-team-phases.sh +9 -0
  304. package/presets/mavis/java/rules/agent-team-orchestrator.md +1 -1
  305. package/presets/mavis/java/rules/code-quality-and-refactoring.md +1 -8
  306. package/presets/mavis/java/rules/interactive-questions.md +29 -0
  307. package/presets/mavis/java/rules/technical-retro.md +2 -0
  308. package/presets/mavis/java/skills/technical-retro/SKILL.md +1 -1
  309. package/presets/mavis/mcp-ts/adapter-map.json +10 -1
  310. package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
  311. package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
  312. package/presets/mavis/mcp-ts/commands/technical-retro.md +1 -1
  313. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +9 -0
  314. package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +1 -1
  315. package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +1 -8
  316. package/presets/mavis/mcp-ts/rules/interactive-questions.md +29 -0
  317. package/presets/mavis/mcp-ts/rules/technical-retro.md +2 -0
  318. package/presets/mavis/next/adapter-map.json +10 -1
  319. package/presets/mavis/next/agents/build-verifier.md +1 -1
  320. package/presets/mavis/next/agents/code-reviewer.md +1 -1
  321. package/presets/mavis/next/agents/debugger.md +1 -1
  322. package/presets/mavis/next/agents/feature-developer.md +1 -1
  323. package/presets/mavis/next/agents/qa-tester.md +1 -1
  324. package/presets/mavis/next/commands/technical-retro.md +1 -1
  325. package/presets/mavis/next/hooks/chain-team-phases.sh +9 -0
  326. package/presets/mavis/next/rules/agent-team-orchestrator.md +1 -1
  327. package/presets/mavis/next/rules/code-quality-and-refactoring.md +1 -8
  328. package/presets/mavis/next/rules/interactive-questions.md +29 -0
  329. package/presets/mavis/next/rules/technical-retro.md +2 -0
  330. package/presets/mavis/next/skills/technical-retro/SKILL.md +1 -1
  331. package/presets/mavis/nuxt/adapter-map.json +10 -1
  332. package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
  333. package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
  334. package/presets/mavis/nuxt/agents/debugger.md +1 -1
  335. package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
  336. package/presets/mavis/nuxt/agents/qa-tester.md +1 -1
  337. package/presets/mavis/nuxt/commands/technical-retro.md +1 -1
  338. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +9 -0
  339. package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +1 -1
  340. package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +1 -8
  341. package/presets/mavis/nuxt/rules/interactive-questions.md +29 -0
  342. package/presets/mavis/nuxt/rules/technical-retro.md +2 -0
  343. package/presets/mavis/nuxt/skills/technical-retro/SKILL.md +1 -1
  344. package/presets/mavis/php-hexagonal/adapter-map.json +10 -1
  345. package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
  346. package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
  347. package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
  348. package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
  349. package/presets/mavis/php-hexagonal/agents/qa-tester.md +1 -1
  350. package/presets/mavis/php-hexagonal/commands/technical-retro.md +1 -1
  351. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +9 -0
  352. package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
  353. package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +1 -8
  354. package/presets/mavis/php-hexagonal/rules/interactive-questions.md +29 -0
  355. package/presets/mavis/php-hexagonal/rules/technical-retro.md +2 -0
  356. package/presets/mavis/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
  357. package/presets/mavis/php-laravel/adapter-map.json +10 -1
  358. package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
  359. package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
  360. package/presets/mavis/php-laravel/agents/debugger.md +1 -1
  361. package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
  362. package/presets/mavis/php-laravel/agents/qa-tester.md +1 -1
  363. package/presets/mavis/php-laravel/commands/technical-retro.md +1 -1
  364. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +9 -0
  365. package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +1 -1
  366. package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +1 -8
  367. package/presets/mavis/php-laravel/rules/interactive-questions.md +29 -0
  368. package/presets/mavis/php-laravel/rules/technical-retro.md +2 -0
  369. package/presets/mavis/php-laravel/skills/technical-retro/SKILL.md +1 -1
  370. package/presets/mavis/svelte/adapter-map.json +10 -1
  371. package/presets/mavis/svelte/agents/build-verifier.md +1 -1
  372. package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
  373. package/presets/mavis/svelte/agents/debugger.md +1 -1
  374. package/presets/mavis/svelte/agents/feature-developer.md +1 -1
  375. package/presets/mavis/svelte/agents/qa-tester.md +1 -1
  376. package/presets/mavis/svelte/commands/technical-retro.md +1 -1
  377. package/presets/mavis/svelte/hooks/chain-team-phases.sh +9 -0
  378. package/presets/mavis/svelte/rules/agent-team-orchestrator.md +1 -1
  379. package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +1 -8
  380. package/presets/mavis/svelte/rules/interactive-questions.md +29 -0
  381. package/presets/mavis/svelte/rules/technical-retro.md +2 -0
  382. package/presets/mavis/svelte/skills/technical-retro/SKILL.md +1 -1
  383. package/presets/opencode/android-kotlin/adapter-map.json +10 -1
  384. package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
  385. package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
  386. package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
  387. package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
  388. package/presets/opencode/android-kotlin/agents/qa-tester.md +1 -1
  389. package/presets/opencode/android-kotlin/commands/technical-retro.md +1 -1
  390. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +9 -0
  391. package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +1 -1
  392. package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +1 -8
  393. package/presets/opencode/android-kotlin/rules/interactive-questions.md +29 -0
  394. package/presets/opencode/android-kotlin/rules/technical-retro.md +2 -0
  395. package/presets/opencode/android-kotlin/skills/technical-retro/SKILL.md +1 -1
  396. package/presets/opencode/go/adapter-map.json +10 -1
  397. package/presets/opencode/go/agents/build-verifier.md +1 -1
  398. package/presets/opencode/go/agents/code-reviewer.md +1 -1
  399. package/presets/opencode/go/agents/debugger.md +1 -1
  400. package/presets/opencode/go/agents/feature-developer.md +1 -1
  401. package/presets/opencode/go/agents/qa-tester.md +1 -1
  402. package/presets/opencode/go/commands/technical-retro.md +1 -1
  403. package/presets/opencode/go/hooks/chain-team-phases.sh +9 -0
  404. package/presets/opencode/go/rules/agent-team-orchestrator.md +1 -1
  405. package/presets/opencode/go/rules/code-quality-and-refactoring.md +1 -8
  406. package/presets/opencode/go/rules/interactive-questions.md +29 -0
  407. package/presets/opencode/go/rules/technical-retro.md +2 -0
  408. package/presets/opencode/go/skills/technical-retro/SKILL.md +1 -1
  409. package/presets/opencode/ios-swift/adapter-map.json +10 -1
  410. package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
  411. package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
  412. package/presets/opencode/ios-swift/agents/debugger.md +1 -1
  413. package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
  414. package/presets/opencode/ios-swift/agents/qa-tester.md +1 -1
  415. package/presets/opencode/ios-swift/commands/technical-retro.md +1 -1
  416. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +9 -0
  417. package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +1 -1
  418. package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +1 -8
  419. package/presets/opencode/ios-swift/rules/interactive-questions.md +29 -0
  420. package/presets/opencode/ios-swift/rules/technical-retro.md +2 -0
  421. package/presets/opencode/ios-swift/skills/technical-retro/SKILL.md +1 -1
  422. package/presets/opencode/java/adapter-map.json +10 -1
  423. package/presets/opencode/java/agents/build-verifier.md +1 -1
  424. package/presets/opencode/java/agents/code-reviewer.md +1 -1
  425. package/presets/opencode/java/agents/debugger.md +1 -1
  426. package/presets/opencode/java/agents/feature-developer.md +1 -1
  427. package/presets/opencode/java/agents/qa-tester.md +1 -1
  428. package/presets/opencode/java/commands/technical-retro.md +1 -1
  429. package/presets/opencode/java/hooks/chain-team-phases.sh +9 -0
  430. package/presets/opencode/java/rules/agent-team-orchestrator.md +1 -1
  431. package/presets/opencode/java/rules/code-quality-and-refactoring.md +1 -8
  432. package/presets/opencode/java/rules/interactive-questions.md +29 -0
  433. package/presets/opencode/java/rules/technical-retro.md +2 -0
  434. package/presets/opencode/java/skills/technical-retro/SKILL.md +1 -1
  435. package/presets/opencode/mcp-ts/adapter-map.json +10 -1
  436. package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
  437. package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
  438. package/presets/opencode/mcp-ts/commands/technical-retro.md +1 -1
  439. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +9 -0
  440. package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +1 -1
  441. package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +1 -8
  442. package/presets/opencode/mcp-ts/rules/interactive-questions.md +29 -0
  443. package/presets/opencode/mcp-ts/rules/technical-retro.md +2 -0
  444. package/presets/opencode/next/adapter-map.json +10 -1
  445. package/presets/opencode/next/agents/build-verifier.md +1 -1
  446. package/presets/opencode/next/agents/code-reviewer.md +1 -1
  447. package/presets/opencode/next/agents/debugger.md +1 -1
  448. package/presets/opencode/next/agents/feature-developer.md +1 -1
  449. package/presets/opencode/next/agents/qa-tester.md +1 -1
  450. package/presets/opencode/next/commands/technical-retro.md +1 -1
  451. package/presets/opencode/next/hooks/chain-team-phases.sh +9 -0
  452. package/presets/opencode/next/rules/agent-team-orchestrator.md +1 -1
  453. package/presets/opencode/next/rules/code-quality-and-refactoring.md +1 -8
  454. package/presets/opencode/next/rules/interactive-questions.md +29 -0
  455. package/presets/opencode/next/rules/technical-retro.md +2 -0
  456. package/presets/opencode/next/skills/technical-retro/SKILL.md +1 -1
  457. package/presets/opencode/nuxt/adapter-map.json +10 -1
  458. package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
  459. package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
  460. package/presets/opencode/nuxt/agents/debugger.md +1 -1
  461. package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
  462. package/presets/opencode/nuxt/agents/qa-tester.md +1 -1
  463. package/presets/opencode/nuxt/commands/technical-retro.md +1 -1
  464. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +9 -0
  465. package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +1 -1
  466. package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +1 -8
  467. package/presets/opencode/nuxt/rules/interactive-questions.md +29 -0
  468. package/presets/opencode/nuxt/rules/technical-retro.md +2 -0
  469. package/presets/opencode/nuxt/skills/technical-retro/SKILL.md +1 -1
  470. package/presets/opencode/php-hexagonal/adapter-map.json +10 -1
  471. package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
  472. package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
  473. package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
  474. package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
  475. package/presets/opencode/php-hexagonal/agents/qa-tester.md +1 -1
  476. package/presets/opencode/php-hexagonal/commands/technical-retro.md +1 -1
  477. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +9 -0
  478. package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
  479. package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +1 -8
  480. package/presets/opencode/php-hexagonal/rules/interactive-questions.md +29 -0
  481. package/presets/opencode/php-hexagonal/rules/technical-retro.md +2 -0
  482. package/presets/opencode/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
  483. package/presets/opencode/php-laravel/adapter-map.json +10 -1
  484. package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
  485. package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
  486. package/presets/opencode/php-laravel/agents/debugger.md +1 -1
  487. package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
  488. package/presets/opencode/php-laravel/agents/qa-tester.md +1 -1
  489. package/presets/opencode/php-laravel/commands/technical-retro.md +1 -1
  490. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +9 -0
  491. package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +1 -1
  492. package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +1 -8
  493. package/presets/opencode/php-laravel/rules/interactive-questions.md +29 -0
  494. package/presets/opencode/php-laravel/rules/technical-retro.md +2 -0
  495. package/presets/opencode/php-laravel/skills/technical-retro/SKILL.md +1 -1
  496. package/presets/opencode/svelte/adapter-map.json +10 -1
  497. package/presets/opencode/svelte/agents/build-verifier.md +1 -1
  498. package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
  499. package/presets/opencode/svelte/agents/debugger.md +1 -1
  500. package/presets/opencode/svelte/agents/feature-developer.md +1 -1
  501. package/presets/opencode/svelte/agents/qa-tester.md +1 -1
  502. package/presets/opencode/svelte/commands/technical-retro.md +1 -1
  503. package/presets/opencode/svelte/hooks/chain-team-phases.sh +9 -0
  504. package/presets/opencode/svelte/rules/agent-team-orchestrator.md +1 -1
  505. package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +1 -8
  506. package/presets/opencode/svelte/rules/interactive-questions.md +29 -0
  507. package/presets/opencode/svelte/rules/technical-retro.md +2 -0
  508. package/presets/opencode/svelte/skills/technical-retro/SKILL.md +1 -1
@@ -66,7 +66,7 @@ When the task is mostly UI e2e, prefer `instrumentation-test-planner`, `instrume
66
66
 
67
67
  Write the owned terminal receipt described under **Artifact contract**.
68
68
 
69
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
69
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
70
70
 
71
71
  ## Artifact contract
72
72
 
@@ -86,7 +86,7 @@ When `metrics.json` exists, run the local aggregation script and report the coho
86
86
 
87
87
  ### Self-learning loop
88
88
 
89
- In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
89
+ In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`).
90
90
 
91
91
  Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
92
92
  appends nothing (dedup).
@@ -237,6 +237,10 @@ const DEFAULT_ARTIFACT_OUTPUT_IDS = {
237
237
  'instrumentation-test-generator': 'instr-test-spec',
238
238
  'instrumentation-test-healer': 'instr-test-heal',
239
239
  };
240
+ // Artifact status enum — mirrors the writer (`manifest.mjs`) and the schema
241
+ // table in agent-artifact-contracts.md. A receipt outcome is not a status.
242
+ const ARTIFACT_STATUSES = ['planned', 'in_progress', 'completed', 'blocked', 'superseded'];
243
+ const RECEIPT_OUTCOME_STATUS = { completed: 'completed', blocked: 'blocked', changes_requested: 'blocked', validation_failed: 'blocked' };
240
244
  function artifactOutputIdFor(step, agent) {
241
245
  if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
242
246
  if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
@@ -815,6 +819,11 @@ function readBoundReceiptOutcome(agent, step, resolved) {
815
819
  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');
816
820
  }
817
821
  const outcome = owned[0]?.receipt?.outcome || null;
822
+ const bound = owned[0];
823
+ if (bound && typeof bound.status === 'string' && !ARTIFACT_STATUSES.includes(bound.status)) {
824
+ const expected = RECEIPT_OUTCOME_STATUS[bound.receipt.outcome] || 'blocked';
825
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: receipt "${bound.id}" has artifact status "${bound.status}", which is not one of ${ARTIFACT_STATUSES.join(' | ')}. A receipt outcome is not a status — rewrite the entry with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${bound.id} --producer ${agent} --status ${expected} --outcome ${bound.receipt.outcome} --paths <artifact>.md", then resume with: /task-continue ${slug}` };
826
+ }
818
827
  if (outcome === 'completed') {
819
828
  const stallMessage = validateCompletedArtifact(owned[0]);
820
829
  if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
@@ -40,6 +40,7 @@ In Claude Code all `.md` files under `rules/` are **discovered recursively**. Bo
40
40
  | `tests-unit.mdc` | `testing/unit.md` |
41
41
  | `tests-ui.mdc` | `testing/ui.md` |
42
42
  | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
43
+ | `interactive-questions.mdc` | `tooling-and-review/interactive-questions.md` |
43
44
  | `ai-local-overlay.mdc` | `tooling-and-review/ai-local-overlay.md` |
44
45
  | `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
45
46
  | `anti-hallucination-contract.mdc` | `tooling-and-review/anti-hallucination-contract.md` |
@@ -153,7 +153,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
153
153
 
154
154
  ## Context budget & checkpoint/resume
155
155
 
156
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
156
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
157
157
 
158
158
  ## Self-review & context hygiene
159
159
 
@@ -66,14 +66,7 @@ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-di
66
66
 
67
67
  ## Questions to the user
68
68
 
69
- **Interactive first.** When the answer is a decision only the user can make, ask through the host’s interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog) and structure the question for that tool. Plain prose is the **fallback** for a host without one, a headless run, or an answer that cannot be enumerated.
70
-
71
- - One decision per question; put independent decisions in separate entries so the host walks them as steps.
72
- - Header → a short label (≤30 characters); option label → 1–5 words in the user’s terms; option description → the consequence or trade-off, not a restatement of the label.
73
- - Two to five options; enable multi-select only when the choices are not mutually exclusive.
74
- - Never add an “other”/free-form option — the host adds it, and the user can always type an answer.
75
- - Put the option you would recommend first and justify it in its description; do not pad the list with options you cannot defend.
76
- - Ask once, before the work that depends on the answer — not a screening question per option, and not a question the repository already answers.
69
+ **Interactive first.** A decision only the user can make goes through the host's interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog); prose is the fallback for a host without one. Load **`interactive-questions`** for the widget format and the free-form-answer rule.
77
70
 
78
71
  Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
79
72
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Interactive questions — put a user-only decision through the host's question tool. Load when the answer blocks the work.
3
+ paths: []
4
+ ---
5
+
6
+ <!-- shared-core: quality/interactive-questions.md -->
7
+
8
+ # Interactive questions (requestable)
9
+
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
11
+
12
+ ## When to ask
13
+
14
+ 1. **Interactive first.** Ask through the host's interactive question tool and structure the question for that tool. Plain prose is the fallback for a host without one, a headless run, or an answer that cannot be enumerated.
15
+ 2. **One decision per question.** Independent decisions go into separate entries so the host walks them as steps.
16
+ 3. **Ask before the dependent work.** Never a screening question per option, and never a question the repository already answers.
17
+
18
+ ## Widget format
19
+
20
+ 4. **Header** → a short label (≤30 characters).
21
+ 5. **Option label** → 1–5 words, in the user's terms.
22
+ 6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
+ 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
25
+
26
+ ## The free-form answer is mandatory, the option is not
27
+
28
+ 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
+ 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
+
31
+ ## Fallback
32
+
33
+ 11. **Prose.** With no question tool, ask in plain language with the same shape: the decision, the options, and the trade-off each option carries. One decision per message.
34
+ 12. **Do not block.** When the answer is not needed for the next step, state the assumption, continue, and name what a different answer would change.
@@ -13,4 +13,6 @@ Full scenario (including the **“Agent work”** block for a slug from team tas
13
13
 
14
14
  When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
15
15
 
16
+ **Findings carry a category.** When a retro appends a signal it sets `finding_category` to one of `correctness` (wrong result, missed transition, bad math), `contract` (shape, route, param, enum drift), `perf` (budget, cost, unmeasured claim), `hygiene` (paths, dead code, artifacts), or `process` (sizing, ordering, gate choreography). Without the category, repeated `gate-changes-requested` rows cannot be turned into a rule: the signature only says that a gate rejected something. Gate-derived signals default to `process`; a retro that classifies a finding appends its own categorized row instead of rewriting the gate row.
17
+
16
18
  Use this rule only if the command is unavailable. Do not duplicate the command contents in the response — follow the command file and skill `technical-retro`.
@@ -48,7 +48,7 @@ Severity: **high** (explicit correction / large waste) · **med** · **low**. Co
48
48
  Read structured evidence before proposing changes: `.ai.local/signals.jsonl` (wrong-turn signals grouped by
49
49
  `signature` — the machine-enforced Rule of Three: ≥2 distinct tasks → edit a local rule / `conventions.md` gotcha,
50
50
  ≥3 → new rule) and `.ai.local/rule-changes.jsonl` (applied and **staged** mutations with `before` snapshots).
51
- Reconstruct issues from these ledgers, not free text.
51
+ Reconstruct issues from these ledgers, not free text. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`) so the signature ledger can turn a repeated `gate-changes-requested` into a rule instead of only counting it.
52
52
 
53
53
  If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section
54
54
  **Preset updates**:
@@ -64,4 +64,4 @@ A self-review defect that changes the output appends one `review-ledger.md` row
64
64
 
65
65
  ## Receipt binding
66
66
 
67
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
67
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -84,4 +84,4 @@ Write `.ai.local/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHA
84
84
 
85
85
  ## Receipt binding
86
86
 
87
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
87
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -90,4 +90,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
90
90
 
91
91
  ## Receipt binding
92
92
 
93
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
93
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -136,4 +136,4 @@ Load requestable rule `mcp-usage` when verifying third-party library APIs (Conte
136
136
 
137
137
  ## Receipt binding
138
138
 
139
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
139
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -45,4 +45,4 @@ Coordinate with existing plans under `.ai.local/team/tasks/<slug>/`.
45
45
 
46
46
  ## Receipt binding
47
47
 
48
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
48
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -63,7 +63,7 @@ When `metrics.json` exists, run the local aggregation script and report the coho
63
63
 
64
64
  ### Self-learning loop
65
65
 
66
- In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
66
+ In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`).
67
67
 
68
68
  Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
69
69
  appends nothing (dedup).
@@ -236,6 +236,10 @@ const DEFAULT_ARTIFACT_OUTPUT_IDS = {
236
236
  'integration-test-generator': 'integration-test-spec',
237
237
  'integration-test-healer': 'integration-test-heal',
238
238
  };
239
+ // Artifact status enum — mirrors the writer (`manifest.mjs`) and the schema
240
+ // table in agent-artifact-contracts.md. A receipt outcome is not a status.
241
+ const ARTIFACT_STATUSES = ['planned', 'in_progress', 'completed', 'blocked', 'superseded'];
242
+ const RECEIPT_OUTCOME_STATUS = { completed: 'completed', blocked: 'blocked', changes_requested: 'blocked', validation_failed: 'blocked' };
239
243
  function artifactOutputIdFor(step, agent) {
240
244
  if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
241
245
  if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
@@ -814,6 +818,11 @@ function readBoundReceiptOutcome(agent, step, resolved) {
814
818
  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');
815
819
  }
816
820
  const outcome = owned[0]?.receipt?.outcome || null;
821
+ const bound = owned[0];
822
+ if (bound && typeof bound.status === 'string' && !ARTIFACT_STATUSES.includes(bound.status)) {
823
+ const expected = RECEIPT_OUTCOME_STATUS[bound.receipt.outcome] || 'blocked';
824
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: receipt "${bound.id}" has artifact status "${bound.status}", which is not one of ${ARTIFACT_STATUSES.join(' | ')}. A receipt outcome is not a status — rewrite the entry with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${bound.id} --producer ${agent} --status ${expected} --outcome ${bound.receipt.outcome} --paths <artifact>.md", then resume with: /task-continue ${slug}` };
825
+ }
817
826
  if (outcome === 'completed') {
818
827
  const stallMessage = validateCompletedArtifact(owned[0]);
819
828
  if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
@@ -35,6 +35,7 @@ Claude topic `.md` files are **derived** from Cursor SoT `presets/cursor/go/rule
35
35
  | `anti-hallucination-contract.mdc` | `tooling-and-review/anti-hallucination-contract.md` |
36
36
  | `go-anti-hallucination.mdc` | `stack/go-anti-hallucination.md` |
37
37
  | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
38
+ | `interactive-questions.mdc` | `tooling-and-review/interactive-questions.md` |
38
39
  | `ai-local-overlay.mdc` | `tooling-and-review/ai-local-overlay.md` |
39
40
  | `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
40
41
  | `mcp-usage.mdc` | `tooling-and-review/mcp-usage.md` |
@@ -153,7 +153,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
153
153
 
154
154
  ## Context budget & checkpoint/resume
155
155
 
156
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
156
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
157
157
 
158
158
  ## Self-review & context hygiene
159
159
 
@@ -66,14 +66,7 @@ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-di
66
66
 
67
67
  ## Questions to the user
68
68
 
69
- **Interactive first.** When the answer is a decision only the user can make, ask through the host’s interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog) and structure the question for that tool. Plain prose is the **fallback** for a host without one, a headless run, or an answer that cannot be enumerated.
70
-
71
- - One decision per question; put independent decisions in separate entries so the host walks them as steps.
72
- - Header → a short label (≤30 characters); option label → 1–5 words in the user’s terms; option description → the consequence or trade-off, not a restatement of the label.
73
- - Two to five options; enable multi-select only when the choices are not mutually exclusive.
74
- - Never add an “other”/free-form option — the host adds it, and the user can always type an answer.
75
- - Put the option you would recommend first and justify it in its description; do not pad the list with options you cannot defend.
76
- - Ask once, before the work that depends on the answer — not a screening question per option, and not a question the repository already answers.
69
+ **Interactive first.** A decision only the user can make goes through the host's interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog); prose is the fallback for a host without one. Load **`interactive-questions`** for the widget format and the free-form-answer rule.
77
70
 
78
71
  Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
79
72
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Interactive questions — put a user-only decision through the host's question tool. Load when the answer blocks the work.
3
+ paths: []
4
+ ---
5
+
6
+ <!-- shared-core: quality/interactive-questions.md -->
7
+
8
+ # Interactive questions (requestable)
9
+
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
11
+
12
+ ## When to ask
13
+
14
+ 1. **Interactive first.** Ask through the host's interactive question tool and structure the question for that tool. Plain prose is the fallback for a host without one, a headless run, or an answer that cannot be enumerated.
15
+ 2. **One decision per question.** Independent decisions go into separate entries so the host walks them as steps.
16
+ 3. **Ask before the dependent work.** Never a screening question per option, and never a question the repository already answers.
17
+
18
+ ## Widget format
19
+
20
+ 4. **Header** → a short label (≤30 characters).
21
+ 5. **Option label** → 1–5 words, in the user's terms.
22
+ 6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
+ 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
25
+
26
+ ## The free-form answer is mandatory, the option is not
27
+
28
+ 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
+ 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
+
31
+ ## Fallback
32
+
33
+ 11. **Prose.** With no question tool, ask in plain language with the same shape: the decision, the options, and the trade-off each option carries. One decision per message.
34
+ 12. **Do not block.** When the answer is not needed for the next step, state the assumption, continue, and name what a different answer would change.
@@ -13,4 +13,6 @@ Full scenario (including the **“Agent work”** block for a slug from team tas
13
13
 
14
14
  When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
15
15
 
16
+ **Findings carry a category.** When a retro appends a signal it sets `finding_category` to one of `correctness` (wrong result, missed transition, bad math), `contract` (shape, route, param, enum drift), `perf` (budget, cost, unmeasured claim), `hygiene` (paths, dead code, artifacts), or `process` (sizing, ordering, gate choreography). Without the category, repeated `gate-changes-requested` rows cannot be turned into a rule: the signature only says that a gate rejected something. Gate-derived signals default to `process`; a retro that classifies a finding appends its own categorized row instead of rewriting the gate row.
17
+
16
18
  Use this rule only if the command is unavailable. Do not duplicate the command contents in the response — follow the command file and skill `technical-retro`.
@@ -48,7 +48,7 @@ Severity: **high** (explicit correction / large waste) · **med** · **low**. Co
48
48
  Read structured evidence before proposing changes: `.ai.local/signals.jsonl` (wrong-turn signals grouped by
49
49
  `signature` — the machine-enforced Rule of Three: ≥2 distinct tasks → edit a local rule / `conventions.md` gotcha,
50
50
  ≥3 → new rule) and `.ai.local/rule-changes.jsonl` (applied and **staged** mutations with `before` snapshots).
51
- Reconstruct issues from these ledgers, not free text.
51
+ Reconstruct issues from these ledgers, not free text. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`) so the signature ledger can turn a repeated `gate-changes-requested` into a rule instead of only counting it.
52
52
 
53
53
  If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section
54
54
  **Preset updates**:
@@ -87,7 +87,7 @@ PASS | FAIL
87
87
 
88
88
  Write the owned validation receipt (`completed` or `validation_failed`). Do not fix code — report only; the runtime owns `status.json`.
89
89
 
90
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
90
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
91
91
 
92
92
  ## Artifact contract
93
93
 
@@ -98,7 +98,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **REQ
98
98
 
99
99
  Do not mix this output with retrospective facilitation — keep review and retro separate.
100
100
 
101
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
101
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
102
102
 
103
103
  ## Design guidance
104
104
 
@@ -88,7 +88,7 @@ Handoff summary: root cause, recommended fix, files touched (if any), `fixApplie
88
88
 
89
89
  Do not perform formal code review or write XCUITest plans — those are separate agents.
90
90
 
91
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
91
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
92
92
 
93
93
  ## 3-fix architecture gate
94
94
 
@@ -74,7 +74,7 @@ When copying from `next` into `ios-swift` (or another stack):
74
74
 
75
75
  Emit the owned implementation receipt with outcome `completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
76
76
 
77
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
77
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
78
78
 
79
79
  ## Design guidance
80
80
 
@@ -74,7 +74,7 @@ Provide summary:
74
74
  - Gaps vs acceptance criteria
75
75
  - Suggest `/technical-retro` with the slug when done
76
76
 
77
- **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
77
+ **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
78
78
 
79
79
  ## Design guidance
80
80
 
@@ -86,7 +86,7 @@ When `metrics.json` exists, run the local aggregation script and report the coho
86
86
 
87
87
  ### Self-learning loop
88
88
 
89
- In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
89
+ In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`).
90
90
 
91
91
  Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
92
92
  appends nothing (dedup).
@@ -237,6 +237,10 @@ const DEFAULT_ARTIFACT_OUTPUT_IDS = {
237
237
  'xcuitest-test-generator': 'xcuitest-spec',
238
238
  'xcuitest-test-healer': 'xcuitest-heal',
239
239
  };
240
+ // Artifact status enum — mirrors the writer (`manifest.mjs`) and the schema
241
+ // table in agent-artifact-contracts.md. A receipt outcome is not a status.
242
+ const ARTIFACT_STATUSES = ['planned', 'in_progress', 'completed', 'blocked', 'superseded'];
243
+ const RECEIPT_OUTCOME_STATUS = { completed: 'completed', blocked: 'blocked', changes_requested: 'blocked', validation_failed: 'blocked' };
240
244
  function artifactOutputIdFor(step, agent) {
241
245
  if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
242
246
  if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
@@ -815,6 +819,11 @@ function readBoundReceiptOutcome(agent, step, resolved) {
815
819
  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');
816
820
  }
817
821
  const outcome = owned[0]?.receipt?.outcome || null;
822
+ const bound = owned[0];
823
+ if (bound && typeof bound.status === 'string' && !ARTIFACT_STATUSES.includes(bound.status)) {
824
+ const expected = RECEIPT_OUTCOME_STATUS[bound.receipt.outcome] || 'blocked';
825
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: receipt "${bound.id}" has artifact status "${bound.status}", which is not one of ${ARTIFACT_STATUSES.join(' | ')}. A receipt outcome is not a status — rewrite the entry with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${bound.id} --producer ${agent} --status ${expected} --outcome ${bound.receipt.outcome} --paths <artifact>.md", then resume with: /task-continue ${slug}` };
826
+ }
818
827
  if (outcome === 'completed') {
819
828
  const stallMessage = validateCompletedArtifact(owned[0]);
820
829
  if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
@@ -37,6 +37,7 @@ In Claude Code all `.md` files under `rules/` are **discovered recursively**. Bo
37
37
  | `tests-unit.mdc` | `testing/unit.md` |
38
38
  | `tests-ui.mdc` | `testing/ui.md` |
39
39
  | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
40
+ | `interactive-questions.mdc` | `tooling-and-review/interactive-questions.md` |
40
41
  | `ai-local-overlay.mdc` | `tooling-and-review/ai-local-overlay.md` |
41
42
  | `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
42
43
  | `anti-hallucination-contract.mdc` | `tooling-and-review/anti-hallucination-contract.md` |
@@ -66,6 +67,7 @@ In Claude Code all `.md` files under `rules/` are **discovered recursively**. Bo
66
67
  | Shared core | Cursor adapter | Notes |
67
68
  |-------------|----------------|-------|
68
69
  | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` / `code-quality.md` | + Stack notes (Swift/DesignSystem) |
70
+ | `quality/interactive-questions.md` | `interactive-questions.mdc` / `interactive-questions.md` | requestable interactive question format |
69
71
  | `quality/anti-sycophancy-discipline.md` | `anti-sycophancy-discipline.mdc` / `anti-sycophancy-discipline.md` | requestable full VERIFY/discipline set |
70
72
  | `quality/design-guidance.md` | `design-guidance.mdc` / `design-guidance.md` | requestable smells/GoF |
71
73
  | `quality/mcp-usage.md` | `mcp-usage.mdc` / `mcp-usage.md` | requestable Context7 + overlay MCP |
@@ -153,7 +153,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
153
153
 
154
154
  ## Context budget & checkpoint/resume
155
155
 
156
- Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
156
+ Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
157
157
 
158
158
  ## Self-review & context hygiene
159
159
 
@@ -66,14 +66,7 @@ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-di
66
66
 
67
67
  ## Questions to the user
68
68
 
69
- **Interactive first.** When the answer is a decision only the user can make, ask through the host’s interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog) and structure the question for that tool. Plain prose is the **fallback** for a host without one, a headless run, or an answer that cannot be enumerated.
70
-
71
- - One decision per question; put independent decisions in separate entries so the host walks them as steps.
72
- - Header → a short label (≤30 characters); option label → 1–5 words in the user’s terms; option description → the consequence or trade-off, not a restatement of the label.
73
- - Two to five options; enable multi-select only when the choices are not mutually exclusive.
74
- - Never add an “other”/free-form option — the host adds it, and the user can always type an answer.
75
- - Put the option you would recommend first and justify it in its description; do not pad the list with options you cannot defend.
76
- - Ask once, before the work that depends on the answer — not a screening question per option, and not a question the repository already answers.
69
+ **Interactive first.** A decision only the user can make goes through the host's interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog); prose is the fallback for a host without one. Load **`interactive-questions`** for the widget format and the free-form-answer rule.
77
70
 
78
71
  Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
79
72
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Interactive questions — put a user-only decision through the host's question tool. Load when the answer blocks the work.
3
+ paths: []
4
+ ---
5
+
6
+ <!-- shared-core: quality/interactive-questions.md -->
7
+
8
+ # Interactive questions (requestable)
9
+
10
+ How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
11
+
12
+ ## When to ask
13
+
14
+ 1. **Interactive first.** Ask through the host's interactive question tool and structure the question for that tool. Plain prose is the fallback for a host without one, a headless run, or an answer that cannot be enumerated.
15
+ 2. **One decision per question.** Independent decisions go into separate entries so the host walks them as steps.
16
+ 3. **Ask before the dependent work.** Never a screening question per option, and never a question the repository already answers.
17
+
18
+ ## Widget format
19
+
20
+ 4. **Header** → a short label (≤30 characters).
21
+ 5. **Option label** → 1–5 words, in the user's terms.
22
+ 6. **Option description** → the consequence or the trade-off, not a restatement of the label.
23
+ 7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
24
+ 8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
25
+
26
+ ## The free-form answer is mandatory, the option is not
27
+
28
+ 9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
29
+ 10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
30
+
31
+ ## Fallback
32
+
33
+ 11. **Prose.** With no question tool, ask in plain language with the same shape: the decision, the options, and the trade-off each option carries. One decision per message.
34
+ 12. **Do not block.** When the answer is not needed for the next step, state the assumption, continue, and name what a different answer would change.
@@ -13,4 +13,6 @@ Full scenario (including the **“Agent work”** block for a slug from team tas
13
13
 
14
14
  When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
15
15
 
16
+ **Findings carry a category.** When a retro appends a signal it sets `finding_category` to one of `correctness` (wrong result, missed transition, bad math), `contract` (shape, route, param, enum drift), `perf` (budget, cost, unmeasured claim), `hygiene` (paths, dead code, artifacts), or `process` (sizing, ordering, gate choreography). Without the category, repeated `gate-changes-requested` rows cannot be turned into a rule: the signature only says that a gate rejected something. Gate-derived signals default to `process`; a retro that classifies a finding appends its own categorized row instead of rewriting the gate row.
17
+
16
18
  Use this rule only if the command is unavailable. Do not duplicate the command contents in the response — follow the command file and skill `technical-retro`.
@@ -48,7 +48,7 @@ Severity: **high** (explicit correction / large waste) · **med** · **low**. Co
48
48
  Read structured evidence before proposing changes: `.ai.local/signals.jsonl` (wrong-turn signals grouped by
49
49
  `signature` — the machine-enforced Rule of Three: ≥2 distinct tasks → edit a local rule / `conventions.md` gotcha,
50
50
  ≥3 → new rule) and `.ai.local/rule-changes.jsonl` (applied and **staged** mutations with `before` snapshots).
51
- Reconstruct issues from these ledgers, not free text.
51
+ Reconstruct issues from these ledgers, not free text. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`) so the signature ledger can turn a repeated `gate-changes-requested` into a rule instead of only counting it.
52
52
 
53
53
  If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section
54
54
  **Preset updates**:
@@ -64,4 +64,4 @@ A self-review defect that changes the output appends one `review-ledger.md` row
64
64
 
65
65
  ## Receipt binding
66
66
 
67
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
67
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -84,4 +84,4 @@ Write `.ai.local/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHA
84
84
 
85
85
  ## Receipt binding
86
86
 
87
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
87
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
@@ -90,4 +90,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
90
90
 
91
91
  ## Receipt binding
92
92
 
93
- > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
93
+ > **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->