@llipe.com/dev-tasks 0.11.0 → 0.16.2

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 (618) hide show
  1. package/.claude/agents/developer.md +138 -62
  2. package/.claude/agents/github-ops.md +48 -4
  3. package/.claude/agents/housekeeping.md +44 -7
  4. package/.claude/agents/qa-engineer.md +24 -11
  5. package/.claude/agents/researcher.md +26 -6
  6. package/.claude/agents/technical-writer.md +64 -7
  7. package/.claude/agents/ux-engineer.md +1 -0
  8. package/.claude/agents/verifier.md +63 -6
  9. package/.claude/commands/developer.md +2 -266
  10. package/.claude/commands/infra-engineer.md +92 -0
  11. package/.claude/commands/planner.md +98 -29
  12. package/.claude/commands/product-engineer.md +69 -11
  13. package/.claude/commands/researcher.md +4 -5
  14. package/.claude/commands/technical-writer.md +1 -1
  15. package/.claude/hooks/branch-guard.sh +30 -0
  16. package/.claude/hooks/git-guard.sh +573 -24
  17. package/.claude/skills/activity-codebase-research/SKILL.md +4 -11
  18. package/.claude/skills/activity-generate-spec/SKILL.md +34 -10
  19. package/.claude/skills/activity-grill/SKILL.md +150 -0
  20. package/.claude/skills/activity-init/SKILL.md +121 -71
  21. package/.claude/skills/activity-refine/SKILL.md +75 -15
  22. package/.claude/skills/activity-test-standards/SKILL.md +25 -0
  23. package/.claude/skills/aws-ops/SKILL.md +155 -0
  24. package/.claude/skills/deploy-ops/SKILL.md +121 -0
  25. package/.claude/skills/fly-ops/SKILL.md +138 -0
  26. package/.claude/skills/git-ops/SKILL.md +27 -7
  27. package/.claude/skills/implement/SKILL.md +61 -12
  28. package/.claude/skills/memo-cli-usage/REFERENCE.md +230 -17
  29. package/.claude/skills/memo-cli-usage/SKILL.md +68 -13
  30. package/.claude/skills/plan/SKILL.md +43 -1
  31. package/.claude/skills/supabase-ops/SKILL.md +109 -0
  32. package/.github/agents/developer.agent.md +103 -38
  33. package/.github/agents/github-ops.agent.md +46 -4
  34. package/.github/agents/housekeeping.agent.md +43 -7
  35. package/.github/agents/infra-engineer.agent.md +139 -0
  36. package/.github/agents/planner.agent.md +79 -10
  37. package/.github/agents/product-engineer.agent.md +69 -11
  38. package/.github/agents/qa-engineer.agent.md +23 -11
  39. package/.github/agents/researcher.agent.md +25 -6
  40. package/.github/agents/technical-writer.agent.md +63 -7
  41. package/.github/agents/verifier.agent.md +61 -5
  42. package/.github/instructions/implement.instructions.md +61 -12
  43. package/.github/instructions/plan.instructions.md +43 -1
  44. package/.github/prompts/infra-engineer.prompt.md +12 -0
  45. package/.github/prompts/product-engineer-init.prompt.md +5 -6
  46. package/.github/prompts/researcher.prompt.md +4 -5
  47. package/.github/prompts/technical-writer.prompt.md +1 -1
  48. package/.github/skills/activity-codebase-research/SKILL.md +4 -16
  49. package/.github/skills/activity-generate-spec/SKILL.md +34 -10
  50. package/.github/skills/activity-grill/SKILL.md +145 -0
  51. package/.github/skills/activity-init/SKILL.md +120 -70
  52. package/.github/skills/activity-refine/SKILL.md +75 -15
  53. package/.github/skills/activity-test-standards/SKILL.md +25 -0
  54. package/.github/skills/aws-ops/SKILL.md +150 -0
  55. package/.github/skills/deploy-ops/SKILL.md +116 -0
  56. package/.github/skills/fly-ops/SKILL.md +133 -0
  57. package/.github/skills/git-ops/SKILL.md +27 -7
  58. package/.github/skills/memo-cli-usage/REFERENCE.md +230 -17
  59. package/.github/skills/memo-cli-usage/SKILL.md +68 -13
  60. package/.github/skills/supabase-ops/SKILL.md +104 -0
  61. package/.kiro/agents/developer.md +104 -39
  62. package/.kiro/agents/github-ops.md +46 -4
  63. package/.kiro/agents/housekeeping.md +44 -8
  64. package/.kiro/agents/infra-engineer.md +102 -0
  65. package/.kiro/agents/planner.md +87 -21
  66. package/.kiro/agents/product-engineer.md +72 -14
  67. package/.kiro/agents/qa-engineer.md +24 -12
  68. package/.kiro/agents/researcher.md +26 -7
  69. package/.kiro/agents/technical-writer.md +66 -10
  70. package/.kiro/agents/verifier.md +62 -6
  71. package/.kiro/hooks/scripts/git-guard.sh +96 -10
  72. package/.kiro/skills/activity-codebase-research/SKILL.md +4 -11
  73. package/.kiro/skills/activity-generate-spec/SKILL.md +34 -10
  74. package/.kiro/skills/activity-grill/SKILL.md +150 -0
  75. package/.kiro/skills/activity-init/SKILL.md +121 -71
  76. package/.kiro/skills/activity-refine/SKILL.md +75 -15
  77. package/.kiro/skills/activity-test-standards/SKILL.md +25 -0
  78. package/.kiro/skills/aws-ops/SKILL.md +155 -0
  79. package/.kiro/skills/deploy-ops/SKILL.md +121 -0
  80. package/.kiro/skills/fly-ops/SKILL.md +138 -0
  81. package/.kiro/skills/git-ops/SKILL.md +27 -7
  82. package/.kiro/skills/memo-cli-usage/REFERENCE.md +230 -17
  83. package/.kiro/skills/memo-cli-usage/SKILL.md +68 -13
  84. package/.kiro/skills/supabase-ops/SKILL.md +109 -0
  85. package/.kiro/steering/implement.md +61 -12
  86. package/.kiro/steering/plan.md +43 -1
  87. package/AGENTS.md +67 -114
  88. package/AGENTS.md.template +126 -0
  89. package/CHANGELOG.md +182 -0
  90. package/CLAUDE.md +25 -19
  91. package/CLAUDE.md.template +104 -0
  92. package/README.md +168 -146
  93. package/TESTING.md +84 -148
  94. package/bundle-manifest.json +43 -2
  95. package/dist/bin/dev-tasks.js +65 -3
  96. package/dist/bin/dev-tasks.js.map +1 -1
  97. package/dist/{adapters/cli → bin}/parse-args.d.ts +2 -6
  98. package/dist/bin/parse-args.d.ts.map +1 -0
  99. package/dist/{adapters/cli → bin}/parse-args.js +2 -18
  100. package/dist/bin/parse-args.js.map +1 -0
  101. package/dist/core/checks/decision-log-format.d.ts +44 -0
  102. package/dist/core/checks/decision-log-format.d.ts.map +1 -0
  103. package/dist/core/checks/decision-log-format.js +171 -0
  104. package/dist/core/checks/decision-log-format.js.map +1 -0
  105. package/dist/core/checks/docs-structure.d.ts +82 -0
  106. package/dist/core/checks/docs-structure.d.ts.map +1 -0
  107. package/dist/core/checks/docs-structure.js +285 -0
  108. package/dist/core/checks/docs-structure.js.map +1 -0
  109. package/dist/core/checks/glossary.d.ts +178 -0
  110. package/dist/core/checks/glossary.d.ts.map +1 -0
  111. package/dist/core/checks/glossary.js +651 -0
  112. package/dist/core/checks/glossary.js.map +1 -0
  113. package/dist/core/checks/index.d.ts +19 -0
  114. package/dist/core/checks/index.d.ts.map +1 -0
  115. package/dist/core/checks/index.js +16 -0
  116. package/dist/core/checks/index.js.map +1 -0
  117. package/dist/core/checks/run.d.ts +22 -0
  118. package/dist/core/checks/run.d.ts.map +1 -0
  119. package/dist/core/checks/run.js +51 -0
  120. package/dist/core/checks/run.js.map +1 -0
  121. package/dist/core/distribution/doctor.d.ts +46 -1
  122. package/dist/core/distribution/doctor.d.ts.map +1 -1
  123. package/dist/core/distribution/doctor.js +161 -2
  124. package/dist/core/distribution/doctor.js.map +1 -1
  125. package/dist/core/distribution/index.d.ts +9 -3
  126. package/dist/core/distribution/index.d.ts.map +1 -1
  127. package/dist/core/distribution/index.js +5 -2
  128. package/dist/core/distribution/index.js.map +1 -1
  129. package/dist/core/distribution/install-if-absent.d.ts +46 -0
  130. package/dist/core/distribution/install-if-absent.d.ts.map +1 -0
  131. package/dist/core/distribution/install-if-absent.js +81 -0
  132. package/dist/core/distribution/install-if-absent.js.map +1 -0
  133. package/dist/core/distribution/install.d.ts.map +1 -1
  134. package/dist/core/distribution/install.js +5 -0
  135. package/dist/core/distribution/install.js.map +1 -1
  136. package/dist/core/distribution/migrate-docs.d.ts +64 -0
  137. package/dist/core/distribution/migrate-docs.d.ts.map +1 -0
  138. package/dist/core/distribution/migrate-docs.js +139 -0
  139. package/dist/core/distribution/migrate-docs.js.map +1 -0
  140. package/dist/core/distribution/profiles.d.ts +49 -0
  141. package/dist/core/distribution/profiles.d.ts.map +1 -1
  142. package/dist/core/distribution/profiles.js +45 -0
  143. package/dist/core/distribution/profiles.js.map +1 -1
  144. package/dist/core/distribution/update.d.ts +14 -0
  145. package/dist/core/distribution/update.d.ts.map +1 -1
  146. package/dist/core/distribution/update.js +77 -3
  147. package/dist/core/distribution/update.js.map +1 -1
  148. package/dist/core/distribution/workspace.d.ts +84 -0
  149. package/dist/core/distribution/workspace.d.ts.map +1 -0
  150. package/dist/core/distribution/workspace.js +276 -0
  151. package/dist/core/distribution/workspace.js.map +1 -0
  152. package/dist/core/exit-codes.d.ts +15 -35
  153. package/dist/core/exit-codes.d.ts.map +1 -1
  154. package/dist/core/exit-codes.js +15 -36
  155. package/dist/core/exit-codes.js.map +1 -1
  156. package/dist/core/index.d.ts +1 -6
  157. package/dist/core/index.d.ts.map +1 -1
  158. package/dist/core/index.js +1 -7
  159. package/dist/core/index.js.map +1 -1
  160. package/package.json +17 -32
  161. package/templates/claude/settings.json +48 -0
  162. package/templates/domain/ubiquitous-language.md +28 -0
  163. package/templates/infra/environments.yaml +16 -0
  164. package/templates/infra/redaction-patterns.txt +47 -0
  165. package/templates/runbooks/README.md +14 -0
  166. package/templates/runbooks/runbook-template.md +40 -0
  167. package/templates/scripts/deploy-status.sh +89 -0
  168. package/templates/scripts/deploy-verify.sh +85 -0
  169. package/templates/scripts/deploy.sh +284 -0
  170. package/templates/scripts/release.sh +170 -0
  171. package/templates/scripts/rollback.sh +109 -0
  172. package/templates/workflows/deploy-dev.yml +66 -0
  173. package/templates/workflows/deploy-prod.yml +66 -0
  174. package/templates/workflows/rollback.yml +77 -0
  175. package/.claude/skills/activity-contract-validation/SKILL.md +0 -167
  176. package/.github/skills/activity-contract-validation/SKILL.md +0 -167
  177. package/.kiro/skills/activity-contract-validation/SKILL.md +0 -167
  178. package/dist/adapters/cli/catalog-build.d.ts +0 -30
  179. package/dist/adapters/cli/catalog-build.d.ts.map +0 -1
  180. package/dist/adapters/cli/catalog-build.js +0 -73
  181. package/dist/adapters/cli/catalog-build.js.map +0 -1
  182. package/dist/adapters/cli/catalog-query.d.ts +0 -13
  183. package/dist/adapters/cli/catalog-query.d.ts.map +0 -1
  184. package/dist/adapters/cli/catalog-query.js +0 -329
  185. package/dist/adapters/cli/catalog-query.js.map +0 -1
  186. package/dist/adapters/cli/catalog-scaffold.d.ts +0 -24
  187. package/dist/adapters/cli/catalog-scaffold.d.ts.map +0 -1
  188. package/dist/adapters/cli/catalog-scaffold.js +0 -46
  189. package/dist/adapters/cli/catalog-scaffold.js.map +0 -1
  190. package/dist/adapters/cli/catalog-validate.d.ts +0 -35
  191. package/dist/adapters/cli/catalog-validate.d.ts.map +0 -1
  192. package/dist/adapters/cli/catalog-validate.js +0 -122
  193. package/dist/adapters/cli/catalog-validate.js.map +0 -1
  194. package/dist/adapters/cli/ctx-assemble.d.ts +0 -19
  195. package/dist/adapters/cli/ctx-assemble.d.ts.map +0 -1
  196. package/dist/adapters/cli/ctx-assemble.js +0 -293
  197. package/dist/adapters/cli/ctx-assemble.js.map +0 -1
  198. package/dist/adapters/cli/ctx-fetch.d.ts +0 -49
  199. package/dist/adapters/cli/ctx-fetch.d.ts.map +0 -1
  200. package/dist/adapters/cli/ctx-fetch.js +0 -267
  201. package/dist/adapters/cli/ctx-fetch.js.map +0 -1
  202. package/dist/adapters/cli/extract-all.d.ts +0 -31
  203. package/dist/adapters/cli/extract-all.d.ts.map +0 -1
  204. package/dist/adapters/cli/extract-all.js +0 -374
  205. package/dist/adapters/cli/extract-all.js.map +0 -1
  206. package/dist/adapters/cli/extract-asyncapi.d.ts +0 -26
  207. package/dist/adapters/cli/extract-asyncapi.d.ts.map +0 -1
  208. package/dist/adapters/cli/extract-asyncapi.js +0 -142
  209. package/dist/adapters/cli/extract-asyncapi.js.map +0 -1
  210. package/dist/adapters/cli/extract-component.d.ts +0 -24
  211. package/dist/adapters/cli/extract-component.d.ts.map +0 -1
  212. package/dist/adapters/cli/extract-component.js +0 -198
  213. package/dist/adapters/cli/extract-component.js.map +0 -1
  214. package/dist/adapters/cli/extract-detect.d.ts +0 -19
  215. package/dist/adapters/cli/extract-detect.d.ts.map +0 -1
  216. package/dist/adapters/cli/extract-detect.js +0 -98
  217. package/dist/adapters/cli/extract-detect.js.map +0 -1
  218. package/dist/adapters/cli/extract-openapi.d.ts +0 -29
  219. package/dist/adapters/cli/extract-openapi.d.ts.map +0 -1
  220. package/dist/adapters/cli/extract-openapi.js +0 -111
  221. package/dist/adapters/cli/extract-openapi.js.map +0 -1
  222. package/dist/adapters/cli/extract-schema.d.ts +0 -15
  223. package/dist/adapters/cli/extract-schema.d.ts.map +0 -1
  224. package/dist/adapters/cli/extract-schema.js +0 -39
  225. package/dist/adapters/cli/extract-schema.js.map +0 -1
  226. package/dist/adapters/cli/index.d.ts +0 -6
  227. package/dist/adapters/cli/index.d.ts.map +0 -1
  228. package/dist/adapters/cli/index.js +0 -5
  229. package/dist/adapters/cli/index.js.map +0 -1
  230. package/dist/adapters/cli/init.d.ts +0 -37
  231. package/dist/adapters/cli/init.d.ts.map +0 -1
  232. package/dist/adapters/cli/init.js +0 -336
  233. package/dist/adapters/cli/init.js.map +0 -1
  234. package/dist/adapters/cli/parse-args.d.ts.map +0 -1
  235. package/dist/adapters/cli/parse-args.js.map +0 -1
  236. package/dist/adapters/cli/scope-gate.d.ts +0 -25
  237. package/dist/adapters/cli/scope-gate.d.ts.map +0 -1
  238. package/dist/adapters/cli/scope-gate.js +0 -157
  239. package/dist/adapters/cli/scope-gate.js.map +0 -1
  240. package/dist/adapters/cli/scope.d.ts +0 -26
  241. package/dist/adapters/cli/scope.d.ts.map +0 -1
  242. package/dist/adapters/cli/scope.js +0 -172
  243. package/dist/adapters/cli/scope.js.map +0 -1
  244. package/dist/adapters/cli/validate-component.d.ts +0 -24
  245. package/dist/adapters/cli/validate-component.d.ts.map +0 -1
  246. package/dist/adapters/cli/validate-component.js +0 -62
  247. package/dist/adapters/cli/validate-component.js.map +0 -1
  248. package/dist/adapters/cli/verify-contract-diff.d.ts +0 -21
  249. package/dist/adapters/cli/verify-contract-diff.d.ts.map +0 -1
  250. package/dist/adapters/cli/verify-contract-diff.js +0 -69
  251. package/dist/adapters/cli/verify-contract-diff.js.map +0 -1
  252. package/dist/adapters/cli/verify-drift.d.ts +0 -24
  253. package/dist/adapters/cli/verify-drift.d.ts.map +0 -1
  254. package/dist/adapters/cli/verify-drift.js +0 -103
  255. package/dist/adapters/cli/verify-drift.js.map +0 -1
  256. package/dist/adapters/cli/verify-impact.d.ts +0 -23
  257. package/dist/adapters/cli/verify-impact.d.ts.map +0 -1
  258. package/dist/adapters/cli/verify-impact.js +0 -119
  259. package/dist/adapters/cli/verify-impact.js.map +0 -1
  260. package/dist/adapters/mcp/index.d.ts +0 -5
  261. package/dist/adapters/mcp/index.d.ts.map +0 -1
  262. package/dist/adapters/mcp/index.js +0 -2
  263. package/dist/adapters/mcp/index.js.map +0 -1
  264. package/dist/bin/dt.d.ts +0 -7
  265. package/dist/bin/dt.d.ts.map +0 -1
  266. package/dist/bin/dt.js +0 -647
  267. package/dist/bin/dt.js.map +0 -1
  268. package/dist/core/catalog/build.d.ts +0 -143
  269. package/dist/core/catalog/build.d.ts.map +0 -1
  270. package/dist/core/catalog/build.js +0 -475
  271. package/dist/core/catalog/build.js.map +0 -1
  272. package/dist/core/catalog/checks/index.d.ts +0 -18
  273. package/dist/core/catalog/checks/index.d.ts.map +0 -1
  274. package/dist/core/catalog/checks/index.js +0 -18
  275. package/dist/core/catalog/checks/index.js.map +0 -1
  276. package/dist/core/catalog/checks/v01-schema.d.ts +0 -17
  277. package/dist/core/catalog/checks/v01-schema.d.ts.map +0 -1
  278. package/dist/core/catalog/checks/v01-schema.js +0 -57
  279. package/dist/core/catalog/checks/v01-schema.js.map +0 -1
  280. package/dist/core/catalog/checks/v02-v03-identity.d.ts +0 -14
  281. package/dist/core/catalog/checks/v02-v03-identity.d.ts.map +0 -1
  282. package/dist/core/catalog/checks/v02-v03-identity.js +0 -60
  283. package/dist/core/catalog/checks/v02-v03-identity.js.map +0 -1
  284. package/dist/core/catalog/checks/v04-referential-integrity.d.ts +0 -7
  285. package/dist/core/catalog/checks/v04-referential-integrity.d.ts.map +0 -1
  286. package/dist/core/catalog/checks/v04-referential-integrity.js +0 -32
  287. package/dist/core/catalog/checks/v04-referential-integrity.js.map +0 -1
  288. package/dist/core/catalog/checks/v05-domain-existence.d.ts +0 -6
  289. package/dist/core/catalog/checks/v05-domain-existence.d.ts.map +0 -1
  290. package/dist/core/catalog/checks/v05-domain-existence.js +0 -23
  291. package/dist/core/catalog/checks/v05-domain-existence.js.map +0 -1
  292. package/dist/core/catalog/checks/v06-v07-paths.d.ts +0 -29
  293. package/dist/core/catalog/checks/v06-v07-paths.d.ts.map +0 -1
  294. package/dist/core/catalog/checks/v06-v07-paths.js +0 -107
  295. package/dist/core/catalog/checks/v06-v07-paths.js.map +0 -1
  296. package/dist/core/catalog/checks/v08-v10-contracts.d.ts +0 -13
  297. package/dist/core/catalog/checks/v08-v10-contracts.d.ts.map +0 -1
  298. package/dist/core/catalog/checks/v08-v10-contracts.js +0 -70
  299. package/dist/core/catalog/checks/v08-v10-contracts.js.map +0 -1
  300. package/dist/core/catalog/checks/v11-manual-fields.d.ts +0 -16
  301. package/dist/core/catalog/checks/v11-manual-fields.d.ts.map +0 -1
  302. package/dist/core/catalog/checks/v11-manual-fields.js +0 -60
  303. package/dist/core/catalog/checks/v11-manual-fields.js.map +0 -1
  304. package/dist/core/catalog/checks/v12-cycles.d.ts +0 -8
  305. package/dist/core/catalog/checks/v12-cycles.d.ts.map +0 -1
  306. package/dist/core/catalog/checks/v12-cycles.js +0 -28
  307. package/dist/core/catalog/checks/v12-cycles.js.map +0 -1
  308. package/dist/core/catalog/checks/v13-orphan-contracts.d.ts +0 -7
  309. package/dist/core/catalog/checks/v13-orphan-contracts.d.ts.map +0 -1
  310. package/dist/core/catalog/checks/v13-orphan-contracts.js +0 -33
  311. package/dist/core/catalog/checks/v13-orphan-contracts.js.map +0 -1
  312. package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts +0 -8
  313. package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts.map +0 -1
  314. package/dist/core/catalog/checks/v14-v15-lifecycle.js +0 -42
  315. package/dist/core/catalog/checks/v14-v15-lifecycle.js.map +0 -1
  316. package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts +0 -7
  317. package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts.map +0 -1
  318. package/dist/core/catalog/checks/v16-deprecated-consumers.js +0 -47
  319. package/dist/core/catalog/checks/v16-deprecated-consumers.js.map +0 -1
  320. package/dist/core/catalog/checks/v17-low-confidence.d.ts +0 -7
  321. package/dist/core/catalog/checks/v17-low-confidence.d.ts.map +0 -1
  322. package/dist/core/catalog/checks/v17-low-confidence.js +0 -32
  323. package/dist/core/catalog/checks/v17-low-confidence.js.map +0 -1
  324. package/dist/core/catalog/checks/v18-low-payload.d.ts +0 -7
  325. package/dist/core/catalog/checks/v18-low-payload.d.ts.map +0 -1
  326. package/dist/core/catalog/checks/v18-low-payload.js +0 -33
  327. package/dist/core/catalog/checks/v18-low-payload.js.map +0 -1
  328. package/dist/core/catalog/checks/v19-domain-membership.d.ts +0 -8
  329. package/dist/core/catalog/checks/v19-domain-membership.d.ts.map +0 -1
  330. package/dist/core/catalog/checks/v19-domain-membership.js +0 -55
  331. package/dist/core/catalog/checks/v19-domain-membership.js.map +0 -1
  332. package/dist/core/catalog/coverage.d.ts +0 -39
  333. package/dist/core/catalog/coverage.d.ts.map +0 -1
  334. package/dist/core/catalog/coverage.js +0 -62
  335. package/dist/core/catalog/coverage.js.map +0 -1
  336. package/dist/core/catalog/graph.d.ts +0 -49
  337. package/dist/core/catalog/graph.d.ts.map +0 -1
  338. package/dist/core/catalog/graph.js +0 -114
  339. package/dist/core/catalog/graph.js.map +0 -1
  340. package/dist/core/catalog/index-model.d.ts +0 -96
  341. package/dist/core/catalog/index-model.d.ts.map +0 -1
  342. package/dist/core/catalog/index-model.js +0 -8
  343. package/dist/core/catalog/index-model.js.map +0 -1
  344. package/dist/core/catalog/index.d.ts +0 -5
  345. package/dist/core/catalog/index.d.ts.map +0 -1
  346. package/dist/core/catalog/index.js +0 -2
  347. package/dist/core/catalog/index.js.map +0 -1
  348. package/dist/core/catalog/queries.d.ts +0 -69
  349. package/dist/core/catalog/queries.d.ts.map +0 -1
  350. package/dist/core/catalog/queries.js +0 -165
  351. package/dist/core/catalog/queries.js.map +0 -1
  352. package/dist/core/catalog/resolve.d.ts +0 -47
  353. package/dist/core/catalog/resolve.d.ts.map +0 -1
  354. package/dist/core/catalog/resolve.js +0 -318
  355. package/dist/core/catalog/resolve.js.map +0 -1
  356. package/dist/core/catalog/scaffold.d.ts +0 -31
  357. package/dist/core/catalog/scaffold.d.ts.map +0 -1
  358. package/dist/core/catalog/scaffold.js +0 -141
  359. package/dist/core/catalog/scaffold.js.map +0 -1
  360. package/dist/core/catalog/validate-component.d.ts +0 -50
  361. package/dist/core/catalog/validate-component.d.ts.map +0 -1
  362. package/dist/core/catalog/validate-component.js +0 -105
  363. package/dist/core/catalog/validate-component.js.map +0 -1
  364. package/dist/core/catalog/validate.d.ts +0 -71
  365. package/dist/core/catalog/validate.d.ts.map +0 -1
  366. package/dist/core/catalog/validate.js +0 -103
  367. package/dist/core/catalog/validate.js.map +0 -1
  368. package/dist/core/context/assemble.d.ts +0 -126
  369. package/dist/core/context/assemble.d.ts.map +0 -1
  370. package/dist/core/context/assemble.js +0 -197
  371. package/dist/core/context/assemble.js.map +0 -1
  372. package/dist/core/context/cache.d.ts +0 -60
  373. package/dist/core/context/cache.d.ts.map +0 -1
  374. package/dist/core/context/cache.js +0 -236
  375. package/dist/core/context/cache.js.map +0 -1
  376. package/dist/core/context/exit-codes.d.ts +0 -28
  377. package/dist/core/context/exit-codes.d.ts.map +0 -1
  378. package/dist/core/context/exit-codes.js +0 -28
  379. package/dist/core/context/exit-codes.js.map +0 -1
  380. package/dist/core/context/fetch.d.ts +0 -55
  381. package/dist/core/context/fetch.d.ts.map +0 -1
  382. package/dist/core/context/fetch.js +0 -112
  383. package/dist/core/context/fetch.js.map +0 -1
  384. package/dist/core/context/index.d.ts +0 -11
  385. package/dist/core/context/index.d.ts.map +0 -1
  386. package/dist/core/context/index.js +0 -8
  387. package/dist/core/context/index.js.map +0 -1
  388. package/dist/core/context/init.d.ts +0 -179
  389. package/dist/core/context/init.d.ts.map +0 -1
  390. package/dist/core/context/init.js +0 -532
  391. package/dist/core/context/init.js.map +0 -1
  392. package/dist/core/context/layers/architecture-layer.d.ts +0 -13
  393. package/dist/core/context/layers/architecture-layer.d.ts.map +0 -1
  394. package/dist/core/context/layers/architecture-layer.js +0 -24
  395. package/dist/core/context/layers/architecture-layer.js.map +0 -1
  396. package/dist/core/context/layers/contracts-layer.d.ts +0 -13
  397. package/dist/core/context/layers/contracts-layer.d.ts.map +0 -1
  398. package/dist/core/context/layers/contracts-layer.js +0 -83
  399. package/dist/core/context/layers/contracts-layer.js.map +0 -1
  400. package/dist/core/context/layers/conventions-delta-layer.d.ts +0 -13
  401. package/dist/core/context/layers/conventions-delta-layer.d.ts.map +0 -1
  402. package/dist/core/context/layers/conventions-delta-layer.js +0 -37
  403. package/dist/core/context/layers/conventions-delta-layer.js.map +0 -1
  404. package/dist/core/context/layers/flow-layer.d.ts +0 -14
  405. package/dist/core/context/layers/flow-layer.d.ts.map +0 -1
  406. package/dist/core/context/layers/flow-layer.js +0 -61
  407. package/dist/core/context/layers/flow-layer.js.map +0 -1
  408. package/dist/core/context/layers/index-layer.d.ts +0 -13
  409. package/dist/core/context/layers/index-layer.d.ts.map +0 -1
  410. package/dist/core/context/layers/index-layer.js +0 -77
  411. package/dist/core/context/layers/index-layer.js.map +0 -1
  412. package/dist/core/context/layers/primary-layer.d.ts +0 -16
  413. package/dist/core/context/layers/primary-layer.d.ts.map +0 -1
  414. package/dist/core/context/layers/primary-layer.js +0 -61
  415. package/dist/core/context/layers/primary-layer.js.map +0 -1
  416. package/dist/core/context/layers/secondary-layer.d.ts +0 -19
  417. package/dist/core/context/layers/secondary-layer.d.ts.map +0 -1
  418. package/dist/core/context/layers/secondary-layer.js +0 -52
  419. package/dist/core/context/layers/secondary-layer.js.map +0 -1
  420. package/dist/core/context/session-lock.d.ts +0 -114
  421. package/dist/core/context/session-lock.d.ts.map +0 -1
  422. package/dist/core/context/session-lock.js +0 -90
  423. package/dist/core/context/session-lock.js.map +0 -1
  424. package/dist/core/context/tokens.d.ts +0 -35
  425. package/dist/core/context/tokens.d.ts.map +0 -1
  426. package/dist/core/context/tokens.js +0 -88
  427. package/dist/core/context/tokens.js.map +0 -1
  428. package/dist/core/extract/asyncapi/declared.d.ts +0 -19
  429. package/dist/core/extract/asyncapi/declared.d.ts.map +0 -1
  430. package/dist/core/extract/asyncapi/declared.js +0 -168
  431. package/dist/core/extract/asyncapi/declared.js.map +0 -1
  432. package/dist/core/extract/asyncapi/index.d.ts +0 -12
  433. package/dist/core/extract/asyncapi/index.d.ts.map +0 -1
  434. package/dist/core/extract/asyncapi/index.js +0 -8
  435. package/dist/core/extract/asyncapi/index.js.map +0 -1
  436. package/dist/core/extract/asyncapi/payloads.d.ts +0 -20
  437. package/dist/core/extract/asyncapi/payloads.d.ts.map +0 -1
  438. package/dist/core/extract/asyncapi/payloads.js +0 -421
  439. package/dist/core/extract/asyncapi/payloads.js.map +0 -1
  440. package/dist/core/extract/asyncapi/topics.d.ts +0 -27
  441. package/dist/core/extract/asyncapi/topics.d.ts.map +0 -1
  442. package/dist/core/extract/asyncapi/topics.js +0 -368
  443. package/dist/core/extract/asyncapi/topics.js.map +0 -1
  444. package/dist/core/extract/asyncapi/types.d.ts +0 -129
  445. package/dist/core/extract/asyncapi/types.d.ts.map +0 -1
  446. package/dist/core/extract/asyncapi/types.js +0 -5
  447. package/dist/core/extract/asyncapi/types.js.map +0 -1
  448. package/dist/core/extract/asyncapi/validate.d.ts +0 -29
  449. package/dist/core/extract/asyncapi/validate.d.ts.map +0 -1
  450. package/dist/core/extract/asyncapi/validate.js +0 -156
  451. package/dist/core/extract/asyncapi/validate.js.map +0 -1
  452. package/dist/core/extract/component.d.ts +0 -204
  453. package/dist/core/extract/component.d.ts.map +0 -1
  454. package/dist/core/extract/component.js +0 -258
  455. package/dist/core/extract/component.js.map +0 -1
  456. package/dist/core/extract/detect.d.ts +0 -35
  457. package/dist/core/extract/detect.d.ts.map +0 -1
  458. package/dist/core/extract/detect.js +0 -89
  459. package/dist/core/extract/detect.js.map +0 -1
  460. package/dist/core/extract/index.d.ts +0 -12
  461. package/dist/core/extract/index.d.ts.map +0 -1
  462. package/dist/core/extract/index.js +0 -6
  463. package/dist/core/extract/index.js.map +0 -1
  464. package/dist/core/extract/ladder.d.ts +0 -79
  465. package/dist/core/extract/ladder.d.ts.map +0 -1
  466. package/dist/core/extract/ladder.js +0 -70
  467. package/dist/core/extract/ladder.js.map +0 -1
  468. package/dist/core/extract/openapi/index.d.ts +0 -43
  469. package/dist/core/extract/openapi/index.d.ts.map +0 -1
  470. package/dist/core/extract/openapi/index.js +0 -142
  471. package/dist/core/extract/openapi/index.js.map +0 -1
  472. package/dist/core/extract/openapi/route1.d.ts +0 -36
  473. package/dist/core/extract/openapi/route1.d.ts.map +0 -1
  474. package/dist/core/extract/openapi/route1.js +0 -333
  475. package/dist/core/extract/openapi/route1.js.map +0 -1
  476. package/dist/core/extract/openapi/route2-introspect.d.ts +0 -18
  477. package/dist/core/extract/openapi/route2-introspect.d.ts.map +0 -1
  478. package/dist/core/extract/openapi/route2-introspect.js +0 -249
  479. package/dist/core/extract/openapi/route2-introspect.js.map +0 -1
  480. package/dist/core/extract/openapi/route2.d.ts +0 -69
  481. package/dist/core/extract/openapi/route2.d.ts.map +0 -1
  482. package/dist/core/extract/openapi/route2.js +0 -211
  483. package/dist/core/extract/openapi/route2.js.map +0 -1
  484. package/dist/core/extract/openapi/route3.d.ts +0 -26
  485. package/dist/core/extract/openapi/route3.d.ts.map +0 -1
  486. package/dist/core/extract/openapi/route3.js +0 -737
  487. package/dist/core/extract/openapi/route3.js.map +0 -1
  488. package/dist/core/extract/openapi/types.d.ts +0 -125
  489. package/dist/core/extract/openapi/types.d.ts.map +0 -1
  490. package/dist/core/extract/openapi/types.js +0 -5
  491. package/dist/core/extract/openapi/types.js.map +0 -1
  492. package/dist/core/extract/openapi/validate.d.ts +0 -29
  493. package/dist/core/extract/openapi/validate.d.ts.map +0 -1
  494. package/dist/core/extract/openapi/validate.js +0 -200
  495. package/dist/core/extract/openapi/validate.js.map +0 -1
  496. package/dist/core/extract/orm/drizzle.d.ts +0 -20
  497. package/dist/core/extract/orm/drizzle.d.ts.map +0 -1
  498. package/dist/core/extract/orm/drizzle.js +0 -283
  499. package/dist/core/extract/orm/drizzle.js.map +0 -1
  500. package/dist/core/extract/orm/information-schema.d.ts +0 -26
  501. package/dist/core/extract/orm/information-schema.d.ts.map +0 -1
  502. package/dist/core/extract/orm/information-schema.js +0 -142
  503. package/dist/core/extract/orm/information-schema.js.map +0 -1
  504. package/dist/core/extract/orm/prisma.d.ts +0 -23
  505. package/dist/core/extract/orm/prisma.d.ts.map +0 -1
  506. package/dist/core/extract/orm/prisma.js +0 -234
  507. package/dist/core/extract/orm/prisma.js.map +0 -1
  508. package/dist/core/extract/orm/typeorm.d.ts +0 -22
  509. package/dist/core/extract/orm/typeorm.d.ts.map +0 -1
  510. package/dist/core/extract/orm/typeorm.js +0 -269
  511. package/dist/core/extract/orm/typeorm.js.map +0 -1
  512. package/dist/core/extract/orm/types.d.ts +0 -97
  513. package/dist/core/extract/orm/types.d.ts.map +0 -1
  514. package/dist/core/extract/orm/types.js +0 -6
  515. package/dist/core/extract/orm/types.js.map +0 -1
  516. package/dist/core/extract/prompt.d.ts +0 -21
  517. package/dist/core/extract/prompt.d.ts.map +0 -1
  518. package/dist/core/extract/prompt.js +0 -79
  519. package/dist/core/extract/prompt.js.map +0 -1
  520. package/dist/core/extract/provider.d.ts +0 -121
  521. package/dist/core/extract/provider.d.ts.map +0 -1
  522. package/dist/core/extract/provider.js +0 -6
  523. package/dist/core/extract/provider.js.map +0 -1
  524. package/dist/core/extract/providers/node-ts.d.ts +0 -69
  525. package/dist/core/extract/providers/node-ts.d.ts.map +0 -1
  526. package/dist/core/extract/providers/node-ts.js +0 -320
  527. package/dist/core/extract/providers/node-ts.js.map +0 -1
  528. package/dist/core/extract/render/schema-md.d.ts +0 -16
  529. package/dist/core/extract/render/schema-md.d.ts.map +0 -1
  530. package/dist/core/extract/render/schema-md.js +0 -140
  531. package/dist/core/extract/render/schema-md.js.map +0 -1
  532. package/dist/core/extract/report.d.ts +0 -125
  533. package/dist/core/extract/report.d.ts.map +0 -1
  534. package/dist/core/extract/report.js +0 -52
  535. package/dist/core/extract/report.js.map +0 -1
  536. package/dist/core/extract/schema.d.ts +0 -34
  537. package/dist/core/extract/schema.d.ts.map +0 -1
  538. package/dist/core/extract/schema.js +0 -146
  539. package/dist/core/extract/schema.js.map +0 -1
  540. package/dist/core/extract/workspaces.d.ts +0 -33
  541. package/dist/core/extract/workspaces.d.ts.map +0 -1
  542. package/dist/core/extract/workspaces.js +0 -193
  543. package/dist/core/extract/workspaces.js.map +0 -1
  544. package/dist/core/providers/index.d.ts +0 -6
  545. package/dist/core/providers/index.d.ts.map +0 -1
  546. package/dist/core/providers/index.js +0 -2
  547. package/dist/core/providers/index.js.map +0 -1
  548. package/dist/core/providers/tracker.d.ts +0 -74
  549. package/dist/core/providers/tracker.d.ts.map +0 -1
  550. package/dist/core/providers/tracker.js +0 -38
  551. package/dist/core/providers/tracker.js.map +0 -1
  552. package/dist/core/scope/calibration.d.ts +0 -25
  553. package/dist/core/scope/calibration.d.ts.map +0 -1
  554. package/dist/core/scope/calibration.js +0 -52
  555. package/dist/core/scope/calibration.js.map +0 -1
  556. package/dist/core/scope/closure.d.ts +0 -31
  557. package/dist/core/scope/closure.d.ts.map +0 -1
  558. package/dist/core/scope/closure.js +0 -68
  559. package/dist/core/scope/closure.js.map +0 -1
  560. package/dist/core/scope/gate.d.ts +0 -41
  561. package/dist/core/scope/gate.d.ts.map +0 -1
  562. package/dist/core/scope/gate.js +0 -165
  563. package/dist/core/scope/gate.js.map +0 -1
  564. package/dist/core/scope/index.d.ts +0 -18
  565. package/dist/core/scope/index.d.ts.map +0 -1
  566. package/dist/core/scope/index.js +0 -12
  567. package/dist/core/scope/index.js.map +0 -1
  568. package/dist/core/scope/partition.d.ts +0 -36
  569. package/dist/core/scope/partition.d.ts.map +0 -1
  570. package/dist/core/scope/partition.js +0 -78
  571. package/dist/core/scope/partition.js.map +0 -1
  572. package/dist/core/scope/prompt.d.ts +0 -39
  573. package/dist/core/scope/prompt.d.ts.map +0 -1
  574. package/dist/core/scope/prompt.js +0 -123
  575. package/dist/core/scope/prompt.js.map +0 -1
  576. package/dist/core/scope/scoping.d.ts +0 -52
  577. package/dist/core/scope/scoping.d.ts.map +0 -1
  578. package/dist/core/scope/scoping.js +0 -99
  579. package/dist/core/scope/scoping.js.map +0 -1
  580. package/dist/core/scope/types.d.ts +0 -77
  581. package/dist/core/scope/types.d.ts.map +0 -1
  582. package/dist/core/scope/types.js +0 -5
  583. package/dist/core/scope/types.js.map +0 -1
  584. package/dist/core/scope/validate.d.ts +0 -47
  585. package/dist/core/scope/validate.d.ts.map +0 -1
  586. package/dist/core/scope/validate.js +0 -90
  587. package/dist/core/scope/validate.js.map +0 -1
  588. package/dist/core/verify/asyncapi-diff.d.ts +0 -34
  589. package/dist/core/verify/asyncapi-diff.d.ts.map +0 -1
  590. package/dist/core/verify/asyncapi-diff.js +0 -209
  591. package/dist/core/verify/asyncapi-diff.js.map +0 -1
  592. package/dist/core/verify/contract-diff.d.ts +0 -39
  593. package/dist/core/verify/contract-diff.d.ts.map +0 -1
  594. package/dist/core/verify/contract-diff.js +0 -63
  595. package/dist/core/verify/contract-diff.js.map +0 -1
  596. package/dist/core/verify/drift.d.ts +0 -47
  597. package/dist/core/verify/drift.d.ts.map +0 -1
  598. package/dist/core/verify/drift.js +0 -122
  599. package/dist/core/verify/drift.js.map +0 -1
  600. package/dist/core/verify/impact.d.ts +0 -22
  601. package/dist/core/verify/impact.d.ts.map +0 -1
  602. package/dist/core/verify/impact.js +0 -93
  603. package/dist/core/verify/impact.js.map +0 -1
  604. package/dist/core/verify/index.d.ts +0 -10
  605. package/dist/core/verify/index.d.ts.map +0 -1
  606. package/dist/core/verify/index.js +0 -9
  607. package/dist/core/verify/index.js.map +0 -1
  608. package/dist/core/verify/openapi-diff.d.ts +0 -29
  609. package/dist/core/verify/openapi-diff.d.ts.map +0 -1
  610. package/dist/core/verify/openapi-diff.js +0 -291
  611. package/dist/core/verify/openapi-diff.js.map +0 -1
  612. package/dist/core/verify/types.d.ts +0 -138
  613. package/dist/core/verify/types.d.ts.map +0 -1
  614. package/dist/core/verify/types.js +0 -5
  615. package/dist/core/verify/types.js.map +0 -1
  616. package/schemas/component.schema.json +0 -203
  617. package/schemas/flow.schema.json +0 -75
  618. package/schemas/scope-output.schema.json +0 -62
@@ -65,7 +65,7 @@ The task list **MUST** follow this structure:
65
65
 
66
66
  - [ ] 1.0 Implement Story [ID]: [Story Title] (or: Implement Issue [#] - [Github_Issue_URL]: [Title])
67
67
 
68
- - [ ] 1.1 [First implementation step]
68
+ - [ ] 1.1 [First implementation step] (D-NN, when traceable — omit otherwise)
69
69
  - [ ] 1.2 [Second implementation step]
70
70
  - [ ] 1.x Verify Acceptance Criterion: [Criterion 1]
71
71
  - [ ] 1.y Verify Acceptance Criterion: [Criterion 2]
@@ -74,8 +74,48 @@ The task list **MUST** follow this structure:
74
74
  - [ ] 2.0 Implement Story [ID]: [Story Title] (or: Implement Issue [#] - [Github_Issue_URL]: [Title])
75
75
  - [ ] 2.1 [First implementation step]
76
76
  - ...
77
+
78
+ ## Decisions Consumed
79
+
80
+ | ID | Decision (short form) |
81
+ | ---- | --------------------- |
82
+ | D-NN | … |
77
83
  ```
78
84
 
85
+ ## Decision Citations
86
+
87
+ A task line that derives from a specific decision cites it inline, at the
88
+ end of the line: `- [ ] 3.2 Add cap-reached prompt (D-55)` (FR-16).
89
+
90
+ - Citations reference the feature's own `decisions-<feature>.md` by
91
+ unqualified `D-NN` — a task list belongs to exactly one feature, so the
92
+ qualified `<feature>#D-NN` form `activity-refine`/`activity-generate-spec`
93
+ use for cross-feature reuse is never needed here.
94
+ - This is **additive only**: a task with no traceable decision cites none.
95
+ You **MUST NOT** fabricate a citation to give a task one.
96
+ - The task list closes with a `## Decisions Consumed` section aggregating
97
+ every decision ID cited anywhere in the list, in the same `ID | Decision
98
+ (short form)` table shape the decision log itself uses. A task list that
99
+ cites no decisions still includes the section, empty (header plus
100
+ table skeleton, no rows) — consistent with how `activity-refine`'s and
101
+ `activity-generate-spec`'s own `## Decisions` sections may legitimately
102
+ be empty.
103
+
104
+ ## Package Attribution
105
+
106
+ Every task **MUST** name the package it changes (FR-63), so a reader can
107
+ tell the blast radius from the task list without opening the diff.
108
+
109
+ - Read the package map in `docs/tech.md` for the package list.
110
+ - Write the package in the sub-task text, in brackets, first:
111
+ `- [ ] 1.1 [@acme/api] Add the token-refresh endpoint`.
112
+ - A sub-task touching several packages lists them all. A sub-task that
113
+ touches _most_ packages is usually the wrong size — split it.
114
+ - In a **single-package repository the bracket is omitted**, not left
115
+ empty. It is optional there, never blank.
116
+ - Non-code tasks (docs, workflow files) that belong to no package use
117
+ `[repo root]`.
118
+
79
119
  ## Conversion Guidelines
80
120
 
81
121
  When converting a **User Story** or **Refined Issue** to a **Parent Task**:
@@ -94,6 +134,7 @@ When converting a **User Story** or **Refined Issue** to a **Parent Task**:
94
134
  - If schema or data-model changes are involved, migration tasks are **required by default**; omission is allowed only with an explicit documented opt-out rationale.
95
135
  - Migration flows **MUST** include: create migration artifact, document rollback/impact, request user confirmation before apply, apply migration after confirmation, and verify applied state.
96
136
  - If the story involves data models, you **SHOULD** include a sub-task to generate seed data.
137
+ - When `workstream/decisions-<feature>.md` exists, you **MUST** cite the decision ID inline (`… (D-NN)`) on any sub-task whose approach or scope traces to a specific decision row, and **MUST** populate the closing `## Decisions Consumed` section with every ID cited anywhere in the list. This is additive only — a sub-task with no traceable decision cites none; do not fabricate a citation.
97
138
 
98
139
  3. **Context:** You **MAY** add a `> Note:` block under the parent task for quick reference (User Story text or Business Rules), but the checkbox structure **MUST** remain clean.
99
140
  4. **Relevant Files:** You **MUST** aggregate all "Files to Create/Modify" from selected stories into the top-level `Relevant Files` section.
@@ -139,6 +180,7 @@ If this is a **greenfield project** or a **new component**, you **MUST** include
139
180
  5. You **MUST** ensure all Implementation Steps, Acceptance Criteria, and Testing requirements are preserved as sub-tasks.
140
181
  6. For JS/TS repositories, you **MUST** prefer `pnpm` commands and canonical script names in generated tasks.
141
182
  7. You **MUST** ensure each task includes both implementation and test/validation steps, including edge-case validation.
183
+ 7a. When a decision log exists for the feature, you **MUST** cite the decision ID inline on any traceable sub-task and populate the closing `## Decisions Consumed` section (FR-16) — additively, never fabricated.
142
184
  8. For schema/data-model changes, you **MUST** include migration lifecycle tasks and an explicit user-confirmation gate before applying migrations unless an opt-out rationale is documented.
143
185
  9. You **MUST** update the corresponding GitHub Issue(s) with the task checklist by delegating to `github-ops` whenever possible. If no issue exists, you **MUST** ask the user whether to create one first.
144
186
  10. You **MUST** save the task list file.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: supabase-ops
3
+ description: "Supabase CLI command sets, db diff migration flow, drift rule, backup/revert sources, inventory findings, and Cloud log table for infra-engineer. Use when planning or applying Supabase infrastructure changes."
4
+ ---
5
+
6
+ # Supabase Operations (supabase-ops)
7
+
8
+ Per-surface mechanism skill for `infra-engineer`. It supplies the Supabase CLI command sets, resource tiers, the `db diff` migration flow, the drift rule, backup and revert sources, inventory findings, and the Supabase Cloud log table. It does not restate the agent's working loop, approval, revert, or backup rules — those live in the agent body. Supabase is the one platform with a genuine plan mechanism (`db diff`), and its keys are the highest-value secrets in the stack.
9
+
10
+ ---
11
+
12
+ > **RFC 2119 Notice:** The key words **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**, **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL** in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119).
13
+
14
+ ## Tool declaration
15
+
16
+ | Field | Value |
17
+ | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
+ | `name` | `supabase` |
19
+ | `probe` | `supabase --version` (expects `2.x`) |
20
+ | `floor` | Supabase CLI `2.x`; minimum `2.11`. A `1.x` install is `below-floor`. |
21
+ | `auth_probe` | `supabase projects list` |
22
+ | `remediation` | "Install Supabase CLI v2 and run `supabase login` (or export `SUPABASE_ACCESS_TOKEN`); link the project with `supabase link --project-ref <ref>`. This skill never auto-installs and offers no fallback." |
23
+
24
+ Identity is asserted by comparing the linked project ref (from `supabase projects list` / the linked `project_ref`) with the target environment's `supabase.project_ref`; a mismatch is `wrong-identity` and blocks.
25
+
26
+ ## Resource tiers
27
+
28
+ | Tier | Supabase resources |
29
+ | --------------- | ------------------------------------------------------------------------------------- |
30
+ | **foundation** | project, plan, compute add-on, read replicas, PITR |
31
+ | **application** | schema, migrations, RLS policies, roles, storage buckets, auth config, Edge Functions |
32
+ | **ephemeral** | preview branches, which carry an `ExpiresAt` tag and a cleanup step |
33
+
34
+ Foundation changes are routed to `tier0_tool`, never written by this agent. Project deletion is refused for a production-mapped project.
35
+
36
+ ## Migration flow (db diff as plan)
37
+
38
+ 1. `supabase db diff -f "$NAME"` produces the migration SQL — this **is** the plan. Do not push before it is reviewed.
39
+ 2. **Destructive statements** (`DROP`, `TRUNCATE`, `ALTER ... DROP COLUMN`, type narrowing) are itemized separately in `plan.md`, each as its own line requiring named approval.
40
+ 3. Confirmation is required before `supabase db push` to any shared or production project. The push runs only after the human approves that step.
41
+ 4. Verification: `supabase migration list` shows the new migration applied on the remote.
42
+ 5. **Drift rule:** a non-empty `supabase db diff` against the remote with **no pending local migration** is reported as drift and **never pushed**. Drift is reported, never reconciled by pushing. The agent records the drift in `result.md` and stops.
43
+
44
+ ```sh
45
+ supabase db diff -f add_orders_table # plan
46
+ # review the generated migration; itemize destructive statements
47
+ supabase db push # apply, only after confirmation
48
+ supabase migration list # verify
49
+ ```
50
+
51
+ ## Backup
52
+
53
+ Before any production step touching schema or data, record a backup: `supabase db dump -f backup.sql --data-only` (and a schema dump) **or** a recorded PITR restore point when PITR is enabled on the project. The backup artifact reference and the restore command are recorded in `result.md` before the step applies. Revert of a schema change is a forward migration that reverses it, applied through the same confirmed flow; there is no silent `db reset` against a shared project.
54
+
55
+ ## Discovery order
56
+
57
+ Discovery prefers **Supabase MCP read-only** when present, then the **CLI**, then the **Management API**, and records which path was used in the inventory `_generated` block. Writes never go through MCP — MCP is read-only for discovery only. No MCP write, ever.
58
+
59
+ ## Inventory and findings
60
+
61
+ Inventory files under `infra/inventory/supabase/<ref>.json` carry the standard `_generated` header and these fields:
62
+
63
+ - `has_legacy_keys: bool` — reported as a finding when legacy (pre-publishable/secret) keys are still in use.
64
+ - `rls_disabled_tables: []` — tables with row-level security disabled, reported as findings.
65
+
66
+ Inventory contains **no key material**, masked or otherwise. Reporting `has_legacy_keys` or `rls_disabled_tables` never includes the key or a sample row.
67
+
68
+ ## Secrets
69
+
70
+ - Edge Function secrets are set with `supabase secrets set KEY=value` / `supabase secrets unset KEY`, from the source of truth, never a transcript.
71
+ - **Publishable versus secret keys** are distinguished at every reference: a `sb_publishable_*` key is client-safe; a `sb_secret_*` key and the `service_role` JWT are server-only and never leave a secret store.
72
+ - No AWS Secrets Manager entry for a Supabase-only workload; Supabase secrets stay on Supabase.
73
+
74
+ ## Supabase Cloud log table
75
+
76
+ Retrieval, retention, and query bounds are grounded in `workstream/research-supabase-logs.md` (researcher pass, 2025-09-12). Key facts cited from that artifact:
77
+
78
+ - **The Supabase CLI has no log command on Cloud.** The scriptable path is the Management API logs endpoint `GET /v1/projects/{ref}/analytics/endpoints/logs`, which runs a ClickHouse-dialect SQL/LQL query over a unified logs stream filtered by a `source` column; the Dashboard Logs Explorer is the interactive equivalent. `supabase inspect db ...` is Postgres diagnostics, not service logs.
79
+ - **Time bounds are mandatory in practice:** the endpoint uses `iso_timestamp_start` / `iso_timestamp_end`, the window MUST be ≤ 24 hours, and an omitted range queries only the last minute — so every triage query states an explicit UTC window before it runs.
80
+
81
+ | Service surface | Source selector / collection | Retrieval path |
82
+ | --------------- | ------------------------------------------------------------- | --------------------------------------- |
83
+ | Postgres | `source = postgres_logs` | Management API logs endpoint; Dashboard |
84
+ | API (PostgREST) | API Gateway collection | Management API logs endpoint; Dashboard |
85
+ | Auth (GoTrue) | Auth collection | Management API logs endpoint; Dashboard |
86
+ | Storage | Storage collection | Management API logs endpoint; Dashboard |
87
+ | Realtime | Realtime collection | Management API logs endpoint; Dashboard |
88
+ | Edge Functions | `source = edge_logs` / `function_edge_logs` / `function_logs` | Management API logs endpoint; Dashboard |
89
+
90
+ **Retention caveat (cite the research artifact, re-confirm at citation time):** built-in log retention is short and plan-gated — Free ≈ 1 day, Pro ≈ 7 days, Team ≈ 28 days, Enterprise ≈ 90 days. Because low-tier retention is short, logs MUST be captured at incident time; Log Drains (Team/Enterprise) is the long-retention path. Exact `source` strings for API/Auth/Storage/Realtime are UNCONFIRMED in the research and must be verified from the Logs Explorer source list before hardcoding. All log output passes through the redaction pattern set before it reaches a transcript or file.
91
+
92
+ ## Cost entries and sweep
93
+
94
+ Cost entries listed on every Supabase plan:
95
+
96
+ - **Plan** tier (Free/Pro/Team/Enterprise) base.
97
+ - **Compute** add-on size.
98
+ - **Read replicas**.
99
+ - **PITR** add-on.
100
+ - **Preview branches**.
101
+ - **Egress**.
102
+
103
+ Sweep categories (read-only, reported never remediated):
104
+
105
+ - Preview branches past their `ExpiresAt` tag.
106
+ - Preview branches without any `ExpiresAt` tag.
107
+ - Paid but idle projects.
108
+ - Read replicas with no traffic.
109
+ - PITR enabled on a non-production project.
@@ -74,7 +74,7 @@ If the user provides a feature description or asks to create a PRD/spec/stories
74
74
  8. **Update Relevant Files:** You **MUST** keep the task file's Relevant Files section accurate.
75
75
  9. **English-only outputs:** You **MUST** produce English-only output for docs, comments, and generated content.
76
76
  10. **Documentation gate before completion:** Before marking a story/issue complete or converting the PR to Ready for Review, you **MUST** invoke `technical-writer` to update current-state docs and keep `/docs` aligned with implemented behavior.
77
- 11. **ADR enforcement:** If `/docs/technical-guidelines.md` changes during the documentation pass, you **MUST** ensure a new ADR is created in `/docs/adr/`.
77
+ 11. **ADR enforcement:** If `/docs/tech.md` changes during the documentation pass, you **MUST** ensure a new ADR is created in `/docs/adr/`.
78
78
  12. **GitHub hygiene:** All issues, PRs, labels, milestones, and comments **MUST** conform to `github-ops` conventions.
79
79
  13. **Git operations:** For complex git operations (rebase, merge conflicts, branch updates), you **SHOULD** invoke the `git-ops` skill for standardized procedures.
80
80
  14. **DESIGN.md compliance:** If a sub-task changes UI behavior, visual styling, or component variants, you **MUST** verify compliance with `/DESIGN.md` and update `/DESIGN.md` when the visual contract changes.
@@ -83,9 +83,8 @@ If the user provides a feature description or asks to create a PRD/spec/stories
83
83
  17. **Migration safety gate:** For schema/data-model changes, you **MUST** obtain explicit user confirmation before running any migration apply command.
84
84
  18. **Mandatory verifier audit trigger:** You **MUST** invoke `verifier` in `audit` mode post-implementation and pre-PR-ready, for every issue you implement, with no path that skips the call. This is not optional and is not gated behind user request. You **MUST** post the resulting human-readable summary to the issue/PR via `github-ops` comment conventions as part of this same step. Drift findings from the audit **MUST NOT** block completion — remediation of Unintended drift and PRD/spec changelog updates for Intended drift are routed through `product-engineer`'s `activity-drift-reconciliation` skill, not handled inline by `developer`.
85
85
  19. **Test-first design (default approach):** The default development approach is **test-first design**. For each sub-task that introduces or modifies behavior, you **MUST** write or update tests _before_ writing the implementation code, unless the sub-task is purely infrastructure/config with no testable behavior. When a `verifier` Design Mode test plan exists (`/workstream/test-plan-*.md`), you **MUST** use it as the primary guide for which tests to write first. If no test plan exists, derive test cases from the acceptance criteria in the task list before coding.
86
- 20. **Meta-repo write restriction (RF-64):** You **MUST NOT** write to the meta-repo outside the `architecture-change` task type. If implementation requires modifying meta-repo files (`architecture.md`, `domains.md`, `glossary.md`, `conventions.md`, `catalog/flows/`), you **MUST** stop and inform the user that an `architecture-change` task is required. `catalog/components/*.json` and `catalog/index.yaml` are generated by CI and **MUST** never be modified directly. See `AGENTS.md` § Task Types for full rules.
87
- 21. **Cross-repo sub-task scope (RF-63):** When executing a per-repo sub-task from a cross-repo partition, you **MUST** scope implementation exclusively to the assigned repository. Acceptance criteria reference the boundary contract (with target version), not the foreign repo's implementation. You **MUST NOT** implement or verify behavior in the foreign repo. If a boundary contract has `payload_confidence: low`, you **MUST** block and inform the user that the contract must be raised to `medium` before proceeding. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
88
- 22. **Mandatory QA coverage gate:** You **MUST** invoke `qa-engineer` at the completion gate, immediately before the `verifier` audit, for every issue you implement. Record its result as `coverage_gate: PASS | FAIL | SKIPPED(<reason>)`. The gate **MAY** be skipped only with a recorded non-empty reason; omitting the field is treated as incomplete. Its procedure lives in the `qa-engineer` prompt and its skills and **MUST NOT** be restated here.
86
+ 20. **Mandatory QA coverage gate:** You **MUST** invoke `qa-engineer` at the completion gate, immediately before the `verifier` audit, for every issue you implement. Record its result as `coverage_gate: PASS | FAIL | SKIPPED(<reason>)`. The gate **MAY** be skipped only with a recorded non-empty reason; omitting the field is treated as incomplete. Its procedure lives in the `qa-engineer` prompt and its skills and **MUST NOT** be restated here.
87
+ 21. **Platform-write prohibition — route to `infra-engineer`:** You **MUST NOT** emit or execute a platform write command — this includes `aws`, `flyctl`, `supabase`, and Cloudflare API writes. When a sub-task's work is a platform write, you **MUST** hand it to `infra-engineer` instead of running it yourself, so the approval, revert, and backup gates bind. The sub-task kinds that route are: **secrets**, **deploy**, **DNS**, **certificates**, **IAM policy**, and **migrations against a shared or cloud project**. This rule narrows rule 19's "purely infrastructure/config" exemption: that exemption covers only local, version-controlled edits (config files, scaffolding, `.env.example`) and is **not** a licence to run platform writes — a sub-task that would touch a live platform is never treated as exempt and always routes here. This routing is conditional: a sub-task with no platform-write scope never invokes `infra-engineer`, and an infra-shaped but local-only sub-task (for example, editing `.env.example` or a config template checked into the repo) stays with `developer`. When you do route, name `infra-engineer` explicitly rather than attempting the command.
89
88
 
90
89
  ---
91
90
 
@@ -100,9 +99,10 @@ Follow `.github/instructions/implement.instructions.md`:
100
99
  - Run `git rev-parse --abbrev-ref HEAD` to determine the current branch.
101
100
  - If HEAD is the default branch (`main`) or does not match `issue/*` or `story/*` pattern, you **MUST** create a new branch before proceeding, then open the Draft PR immediately after the first commit on that branch. You **MUST NOT** write implementation code, create files, or make commits while on the default branch.
102
101
  - If HEAD is already a valid feature branch (matching `issue/*` or `story/*`), confirm the Draft PR exists and proceed. If the branch has no commits yet, no PR can exist — open it immediately after the first commit.
103
- 5. Execute one sub-task at a time in checklist order. For each behavioral sub-task, follow **test-first**: write/update tests first, verify they fail for the right reason, then implement to make them pass.
104
- 6. After each completed sub-task: mark `[x]` locally and in GitHub, pause for approval if step-gated.
105
- 7. When all sub-tasks are complete:
102
+ 5. **memo intent (when memo is available):** Before writing any implementation code, run the memo-cli Availability Check and write the intent entry (see **memo-cli Integration → Intent Entry**). Record `memo_intent` as `written(<id>)`, `failed(<reason>)`, or `skipped(<reason>)`.
103
+ 6. Execute one sub-task at a time in checklist order. For each behavioral sub-task, follow **test-first**: write/update tests first, verify they fail for the right reason, then implement to make them pass.
104
+ 7. After each completed sub-task: mark `[x]` locally and in GitHub, pause for approval if step-gated.
105
+ 8. When all sub-tasks are complete:
106
106
  - Verify all acceptance criteria.
107
107
 
108
108
  - Run mandatory quality gates and record results (`test`, `lint`, `format:check`, `typecheck`, `audit`; `validate` if available).
@@ -110,22 +110,45 @@ Follow `.github/instructions/implement.instructions.md`:
110
110
  - Invoke `qa-engineer` to run the testing-standard check and the coverage and gap report, and record `coverage_gate`. This runs before the `verifier` audit so the audit can consume the gap report as test evidence.
111
111
  - Invoke `verifier` in `audit` mode against the delivered implementation, and post its human-readable summary to the issue/PR via `github-ops` comment conventions. This step is mandatory and non-skippable; drift findings reported by `verifier` do not block this step or PR/issue completion.
112
112
  - Invoke `technical-writer` for documentation update and drift/stale-doc validation.
113
+ - Write the memo outcome entry (see **memo-cli Integration → Outcome Entry**) and record `memo_outcome` as `written(<id>)`, `failed(<reason>)`, or `skipped(<reason>)`.
113
114
  - Convert PR from Draft to Ready for Review.
114
115
 
115
116
  ---
116
117
 
118
+ ## Runbook Delivery in the Same PR (FR-49a)
119
+
120
+ A script or workflow that ships without a runbook is a procedure that
121
+ lives in one person's head until they leave. These **MUST** arrive with a
122
+ runbook in the **same draft PR**, not a follow-up issue:
123
+
124
+ - every script added or materially changed under `templates/scripts/`
125
+ - every workflow under `templates/workflows/` and `.github/workflows/`
126
+ - every `infra-engineer` change kind — secrets, deploy, DNS,
127
+ certificates, IAM policy, migrations
128
+
129
+ Updating an existing runbook satisfies this; a new file is required only
130
+ when no runbook covers the procedure. Add the new file to
131
+ `docs/runbooks/README.md` and to `EXPECTED_RUNBOOKS` in
132
+ `test/unit/runbook-set.test.ts`, or the suite fails on the undeclared
133
+ file — which is the reminder working, not a problem with it.
134
+
135
+ A PR that skips this is flagged by the `verifier`'s runbook-coverage
136
+ finding. That finding is advisory and does not block the PR; this rule
137
+ is what it is measuring against.
138
+
117
139
  ## Integration with Other Agents
118
140
 
119
- | Agent | Relationship |
120
- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
121
- | `product-engineer` | Produces the task lists and refined issues that `developer` executes |
122
- | `planner` | Orchestrates multi-story runs — delegates each story to `developer` in Execute Mode with an integration branch override |
123
- | `researcher` | May be invoked by `developer` for troubleshooting/diagnosis when a bug or regression is unclear; conditional, never mandatory |
124
- | `verifier` | Invoked by `developer` in `audit` mode, post-implementation and pre-PR-ready, mandatory and non-skippable — reports fidelity/drift; findings route to `product-engineer`'s `activity-drift-reconciliation` for remediation |
125
- | `qa-engineer` | Invoked by `developer` at the completion gate, before the `verifier` audit — owns the testing standard, missing test harnesses, and coverage/gap reporting; `developer` still authors feature tests under rule 19 |
126
- | `technical-writer` | Invoked by `developer` before PR is marked ready — updates `/docs` |
127
- | `housekeeping` | Can be invoked during implementation for lint/type/test-wiring fixes |
128
- | `github-ops` | Defines conventions for all GitHub artifacts — `developer` follows these rules |
141
+ | Agent | Relationship |
142
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
143
+ | `product-engineer` | Produces the task lists and refined issues that `developer` executes |
144
+ | `planner` | Orchestrates multi-story runs — delegates each story to `developer` in Execute Mode with an integration branch override |
145
+ | `researcher` | May be invoked by `developer` for troubleshooting/diagnosis when a bug or regression is unclear; conditional, never mandatory |
146
+ | `verifier` | Invoked by `developer` in `audit` mode, post-implementation and pre-PR-ready, mandatory and non-skippable — reports fidelity/drift; findings route to `product-engineer`'s `activity-drift-reconciliation` for remediation |
147
+ | `qa-engineer` | Invoked by `developer` at the completion gate, before the `verifier` audit — owns the testing standard, missing test harnesses, and coverage/gap reporting; `developer` still authors feature tests under rule 19 |
148
+ | `technical-writer` | Invoked by `developer` before PR is marked ready — updates `/docs` |
149
+ | `housekeeping` | Can be invoked during implementation for lint/type/test-wiring fixes |
150
+ | `infra-engineer` | Invoked conditionally when a sub-task requires a platform write (secrets, deploy, DNS, certificates, IAM policy, or cloud/shared migrations); `developer` **MUST NOT** run these commands itself and hands the sub-task off so the approval/revert/backup gates bind — never mandatory when a story has no infra scope |
151
+ | `github-ops` | Defines conventions for all GitHub artifacts — `developer` follows these rules |
129
152
 
130
153
  ### Codebase Research for Troubleshooting (Conditional)
131
154
 
@@ -150,6 +173,12 @@ When diagnosing a bug, regression, or unclear failure during implementation, you
150
173
 
151
174
  ## memo-cli Integration (When Available)
152
175
 
176
+ ### Bank Declaration
177
+
178
+ This agent's bank id is `developer-memory`, stable for the agent's life (PRD §15). Every memo command below names it **literally** with `--bank developer-memory`.
179
+
180
+ You **MUST NOT** rely on `export MEMO_BANK=…` from an earlier command, and **MUST NOT** write `--bank $MEMO_BANK`. Agent runtimes run each shell command in a fresh shell, so an exported variable is gone by the next call; an empty `$MEMO_BANK` is dropped by the shell and the flag parser takes the next token as the bank id (`--bank --rationale …` → bank `--rationale`), which memo-cli rejects with `VALIDATION_FAILED`. This is the defect that left consumer banks empty (issue #253).
181
+
153
182
  ### Availability Check
154
183
 
155
184
  At the start of every execution session, check if memo-cli is configured:
@@ -158,12 +187,21 @@ At the start of every execution session, check if memo-cli is configured:
158
187
  which memo && memo setup validate
159
188
  ```
160
189
 
161
- - If `memo` is not found, skip all memo operations silently.
162
- - If `memo` is found but validation fails, ask: "memo-cli is installed but not configured for this repository. Run `memo setup init --repo <repo> --org <org> --domain <domain>` to configure it."
190
+ - If `memo` is not found **and** `memo.config.json` does not exist, skip all memo operations and record `memo_intent: skipped(memo-not-installed)` / `memo_outcome: skipped(memo-not-installed)`.
191
+ - If `memo` is not found **but** `memo.config.json` exists, the repository expects memo: warn the user ("memo-cli is configured for this repository (`memo.config.json`) but the `memo` binary is not on PATH in this session — no memo entries will be written.") and record `skipped(memo-unavailable)` for both fields. Never skip silently in this case.
192
+ - If `memo` is found but validation fails, ask: "memo-cli is installed but not configured for this repository. Run `memo setup init --repo <repo> --org <org> --domain <domain>` to configure it." If the run continues without it, record `skipped(memo-not-configured)`.
163
193
 
164
194
  ### Session Start — Restore Context
165
195
 
166
- When memo is available, run before writing any code:
196
+ When memo is available and `memo --version` is `1.3.0` or later, restore context with a single call:
197
+
198
+ ```bash
199
+ memo recall "<story or issue description>" --bank developer-memory --json
200
+ ```
201
+
202
+ `recall` returns one bundle — SELF, POLICIES, SHARED, MINE, LAST SESSION, CONFLICTS — in a single `<4s` call. If `memo recall` exits `2` (embeddings failure), surface the warning on stderr and continue the session without recalled context rather than blocking.
203
+
204
+ **Fallback — `memo --version` is below `1.3.0`:** run the four-command sequence instead:
167
205
 
168
206
  ```bash
169
207
  memo list --limit 20 --json
@@ -173,7 +211,7 @@ memo search "<story or issue description>" --limit 10 --json
173
211
  memo search "<key contract or dependency>" --scope related --limit 5 --json
174
212
  ```
175
213
 
176
- Review results and produce a short synthesis before implementation:
214
+ Review results (either path) and produce a short synthesis before implementation:
177
215
 
178
216
  - Constraints to preserve
179
217
  - Rejected alternatives to avoid
@@ -192,36 +230,60 @@ Choose the most specific entry type:
192
230
 
193
231
  ### Intent Entry — Before Starting a Story
194
232
 
195
- Write an intent entry **before beginning implementation** of any story or issue:
233
+ Write an intent entry **before beginning implementation** of any story or issue (Execution Flow step 5), as an episodic entry scoped to this session in this agent's bank:
196
234
 
197
235
  ```bash
198
236
  memo write \
237
+ --kind episodic \
238
+ --session ISSUE-<n> \
239
+ --bank developer-memory \
199
240
  --rationale "Context: Starting ISSUE-<##> because <trigger/need>. Decision: implement via <approach>, preserving <constraints/non-goals>, with expected files <key files>. Impact: affects <user/module/contract impact> and introduces risks <if any>." \
200
241
  --tags "<domain>,issue-<number>,intent,<impact-tag>[,<boundary-tag>]" \
201
- --entry-type decision \
202
- --source agent \
203
- --story "ISSUE-<number>" \
204
- --on-duplicate consolidate \
205
- --json
242
+ --entry-type decision \
243
+ --source agent \
244
+ --story "ISSUE-<number>" \
245
+ --on-duplicate consolidate \
246
+ --json
206
247
  ```
207
248
 
208
249
  ### Outcome Entry — After Completing a Story
209
250
 
210
- Write an outcome entry as part of the **Completion Gate**, after all tests pass and before converting the PR to Ready for Review:
251
+ Write an outcome entry as part of the **Completion Gate** (Execution Flow step 8), after all tests pass and before converting the PR to Ready for Review, as an episodic entry scoped to this session in this agent's bank. Record what was learned, not only what shipped — a rejected approach, a surprise in the codebase, or a constraint discovered mid-story is the most valuable content of this entry:
211
252
 
212
253
  ```bash
213
254
  memo write \
214
- --rationale "Context: Completed ISSUE-<##> after implementing <scope>. Delivery: shipped <behavior>, deviations <none|details>, AC <x/y> verified. Impact: quality gates test=<pass|fail>; lint=<pass|fail>; format:check=<pass|fail>; typecheck=<pass|fail>; audit=<pass|fail>; docs=<clean|drift-fixed>; migration=<none|details>." \
215
- --tags "<domain>,issue-<number>,outcome,gates-pass[,<impact-tag>][,<boundary-tag>]" \
216
- --entry-type decision \
217
- --source agent \
218
- --commit "$(git rev-parse HEAD)" \
219
- --story "ISSUE-<number>" \
220
- --files "<comma-separated key files modified>" \
221
- --on-duplicate consolidate \
222
- --json
255
+ --kind episodic \
256
+ --session ISSUE-<n> \
257
+ --bank developer-memory \
258
+ --rationale "Context: Completed ISSUE-<##> after implementing <scope>. Delivery: shipped <behavior>, deviations <none|details>, AC <x/y> verified. Learned: <rejected approaches, surprises, constraints discovered|none>. Impact: quality gates test=<pass|fail>; lint=<pass|fail>; format:check=<pass|fail>; typecheck=<pass|fail>; audit=<pass|fail>; docs=<clean|drift-fixed>; migration=<none|details>." \
259
+ --tags "<domain>,issue-<number>,outcome,gates-pass[,<impact-or-boundary-tag>]" \
260
+ --entry-type decision \
261
+ --source agent \
262
+ --commit "$(git rev-parse HEAD)" \
263
+ --story "ISSUE-<number>" \
264
+ --files "<comma-separated key files modified>" \
265
+ --on-duplicate consolidate \
266
+ --json
223
267
  ```
224
268
 
269
+ memo-cli accepts 2–5 tags per entry and rejects more with `VALIDATION_FAILED`; keep both templates within that limit.
270
+
271
+ Session sequence numbers (`--seq`) auto-increment per `--session`; do not pass `--seq` explicitly unless replaying a specific position.
272
+
273
+ ### Write Results Are Recorded, Never Swallowed
274
+
275
+ Every `memo write` above returns JSON with the new entry's `id` on success, and a non-zero exit with an error on failure.
276
+
277
+ - On success, record the id: `memo_intent: written(<id>)` / `memo_outcome: written(<id>)`.
278
+ - On failure, read the error, fix the command if the error names a flag or value you supplied, and retry **once**. If it still fails, record `failed(<error code or first line of the error>)` and state it in the closeout summary. A failed memo write does not block the story, but it **MUST NOT** be dropped silently.
279
+ - Both fields are **mandatory** in the closeout payload. Omitting either one marks the story incomplete.
280
+
281
+ ADR and durable-decision entries are **not** written by `developer` — they stay `--kind semantic` in `kb`, authored by `technical-writer` and `product-engineer`, per PRD K3.
282
+
283
+ ### Session Close
284
+
285
+ No memo action in Phase 2. `memo used` and `memo decay` arrive with memo-cli 1.4.0.
286
+
225
287
  ---
226
288
 
227
289
  ## Completion Gate (Mandatory for Every Story/Issue)
@@ -237,7 +299,7 @@ Before marking a Story/Issue done:
237
299
  7. `technical-writer` agent **MUST** have run and produced both a delta report and a drift/stale-doc validation result.
238
300
  8. `/docs` **MUST** be updated to current state.
239
301
  9. `/workstream` **SHOULD** be cleaned (active artifacts retained, obsolete artifacts archived/removed).
240
- 10. If memo-cli is available, outcome entry **MUST** be written to memo before PR conversion.
302
+ 10. The memo intent and outcome writes **MUST** have been attempted when memo-cli is available (`memo write --kind episodic --session ISSUE-<n> --bank developer-memory …`, before PR conversion), and `memo_intent` / `memo_outcome` **MUST** be recorded as `written(<id>)`, `failed(<reason>)`, or `skipped(<reason>)`. A `failed` or `skipped` value does not block completion; an omitted field does.
241
303
  11. PR **MUST** be ready, approved, and merged.
242
304
  12. You **MUST NOT** close the GitHub Issue until all conditions above are met.
243
305
  13. For multi-story implementations, you **MUST** run a checklist cross-check between GitHub Issue tasks and `/workstream/tasks-*.md` and report any mismatch resolution.
@@ -298,6 +360,8 @@ workstream_files:
298
360
  - typecheck: PASS | FAIL | NOT RUN
299
361
  - audit: PASS | FAIL | NOT RUN
300
362
  coverage_gate: PASS | FAIL | SKIPPED(<reason>)
363
+ memo_intent: written(<id>) | failed(<reason>) | skipped(<reason>)
364
+ memo_outcome: written(<id>) | failed(<reason>) | skipped(<reason>)
301
365
  checklist_sync: synced | mismatch-fixed | blocked
302
366
  verifier_audit: run | blocked
303
367
  fidelity_verdict: High | Medium | Low | none
@@ -311,6 +375,7 @@ Rules for this payload:
311
375
 
312
376
  - The markers `BEGIN CLOSEOUT PAYLOAD` and `END CLOSEOUT PAYLOAD` **MUST** appear exactly as written.
313
377
  - Every field is required. Use `none`, `NOT RUN`, or `blocked` when a value does not exist.
378
+ - `memo_intent` and `memo_outcome` are always present. `skipped(<reason>)` (memo not installed, not configured, or unavailable in this session) and `failed(<reason>)` (the write was attempted and errored after one retry) are valid values that do not block the merge; `planner` treats an absent field as an incomplete story.
314
379
  - `planner` may treat the story as incomplete if either marker or any required field is missing.
315
380
 
316
381
  Do not dump full files unless explicitly requested.
@@ -200,6 +200,19 @@ Rules:
200
200
  - The attribution value **MUST** identify the assisting system and version when available (for example, `GitHub Copilot v1`, `Claude Code v3`).
201
201
  - The `## Why` section **MUST** reference the appropriate issue (`Closes #<number>` or `Refs #<number>`). If no issue exists, it **MUST** reference the motivating commit (`Refs <sha>`).
202
202
 
203
+ ### Change-Record PR Shape (infra-engineer)
204
+
205
+ When `infra-engineer` delegates its change-record draft PR (S-001 AC-11), the PR **MUST** follow this shape:
206
+
207
+ - **Title prefix:** `infra:` — for example, `infra: apply <ChangeId> to <environment>`.
208
+ - **Label:** `infra-change`.
209
+ - **Body sections**, each citing the `ChangeId`:
210
+ - `## Change` — the `ChangeId`, target environment, and resolved identity.
211
+ - `## Plan` — a link or reference to the recorded `plan.md` for this `ChangeId`.
212
+ - `## Apply` — the applied steps (from `commands.sh`) and the `result.md` outcome.
213
+ - `## Revert` — the reverse-order `rollback.sh` reference and any backup id / restore command.
214
+ - The draft PR is opened against the default branch and stays draft until a human reviews it; `infra-engineer` never self-merges it.
215
+
203
216
  ### Multi-Line Body Formatting
204
217
 
205
218
  Collapsed/mangled PR and issue bodies (headings, checklists, and paragraphs all flattened into one line) are a recurring failure mode. To prevent this, the following is **mandatory**, not a preference order:
@@ -239,18 +252,20 @@ Branch names **MUST** follow this pattern:
239
252
  | ------------- | -------------------------------- | ------------------------------------- |
240
253
  | `issue` | Single GitHub Issue | `issue/42-rate-limiting` |
241
254
  | `story` | PRD-driven user story | `story/S-003-password-reset` |
242
- | `fix` | Bug fix | `fix/87-session-expiry` |
243
- | `chore` | Maintenance task | `chore/91-upgrade-node` |
244
- | `docs` | Documentation only | `docs/45-api-reference` |
245
255
  | `integration` | Multi-story consolidation branch | `integration/prd-auth-password-reset` |
246
256
 
247
257
  Rules:
248
258
 
249
259
  - **MUST** use lowercase and hyphens only (no underscores, no camelCase).
250
260
  - Short description **MUST** be 2–5 words, hyphen-separated.
251
- - Branches of type `issue`, `story`, `fix`, `chore`, and `docs` **MUST** include the issue or story number.
261
+ - Branches of type `issue` and `story` **MUST** include the issue or story number.
252
262
  - Branches of type `integration` **MUST** identify the plan, PRD, or milestone being consolidated.
253
263
 
264
+ ## Branch-Type Merge Rules
265
+
266
+ - Issue and story PRs **MUST** merge by squash with source-branch deletion. The planner merges them into an integration branch; the user merges them into `main`.
267
+ - Integration PRs **MUST** merge into `main` by merge commit, and only the user may merge them.
268
+
254
269
  ---
255
270
 
256
271
  ## Labels
@@ -318,6 +333,33 @@ Rules:
318
333
 
319
334
  ---
320
335
 
336
+ ## Tags
337
+
338
+ Tags are the production deploy trigger. They **MUST** be trustworthy, so their creation is tightly constrained.
339
+
340
+ ### Format
341
+
342
+ ```
343
+ v<major>.<minor>.<patch>
344
+ ```
345
+
346
+ Example: `v1.4.0`
347
+
348
+ Rules:
349
+
350
+ - Tags **MUST** be annotated (`git tag -a`), never lightweight.
351
+ - Tags **MUST** be created by a human. Agents **MUST NOT** create, move, delete, or push tags — this is enforced by `git-guard` rule 4.
352
+ - A tag **MUST** point at a commit on `main`.
353
+ - Tags **MUST** be immutable: once pushed, a tag is never moved, re-pointed, force-updated, or deleted.
354
+ - Prerelease tags (e.g., `v1.0.0-rc.1`, `v1.0.0-beta`) **MUST NOT** be used in v1; only exact `v<major>.<minor>.<patch>` tags are valid.
355
+ - A milestone `v<major>.<minor>` **MUST** be closed when its `v<major>.<minor>.0` tag exists.
356
+
357
+ ### Relationship to Milestones
358
+
359
+ A milestone tracks the scope of a minor version (`vX.Y`); the tag `vX.Y.0` marks its release. Patch tags (`vX.Y.1`, `vX.Y.2`, …) do not open new milestones.
360
+
361
+ ---
362
+
321
363
  ## Audit Mode
322
364
 
323
365
  When invoked with `audit` as input, `github-ops` **MUST**:
@@ -29,13 +29,48 @@ Inform if any of these are missing or if you see other relevant tools (e.g. `pre
29
29
 
30
30
  ## What You Fix
31
31
 
32
- | Domain | Fix | Never touch |
33
- | --------------------- | ------------------------------------------------------------------ | ---------------------------------------- |
34
- | **Lint** | Auto-fixable errors, unused imports, formatting | Linter config files, disabling rules |
35
- | **Types** | Missing annotations, wrong return types, safe `any` fixes | Signatures that change runtime behavior |
36
- | **Unit tests** | Broken imports, wrong mock paths, outdated snapshots (re-gen only) | Assertions, test logic, coverage config |
37
- | **Integration tests** | Broken imports, fixture paths, env variable references | What is being tested, assertion outcomes |
38
- | **E2E tests** | Broken imports, selector updates after non-logic renames | Test flows, what interactions are tested |
32
+ | Domain | Fix | Never touch |
33
+ | --------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
+ | **Lint** | Auto-fixable errors, unused imports, formatting | Linter config files, disabling rules |
35
+ | **Types** | Missing annotations, wrong return types, safe `any` fixes | Signatures that change runtime behavior |
36
+ | **Unit tests** | Broken imports, wrong mock paths, outdated snapshots (re-gen only) | Assertions, test logic, coverage config |
37
+ | **Integration tests** | Broken imports, fixture paths, env variable references | What is being tested, assertion outcomes |
38
+ | **E2E tests** | Broken imports, selector updates after non-logic renames | Test flows, what interactions are tested |
39
+ | **Infrastructure** | Nothing — never touch | `infra/`, `.github/workflows/deploy-*.yml`, `rollback.yml`, `templates/scripts/`, `templates/workflows/` — even to fix a lint or formatting error; leave them alone and route to `infra-engineer` |
40
+
41
+ ## Documentation Is Not Yours
42
+
43
+ You do **not** organize documentation (FR-51). `technical-writer` owns
44
+ `docs/` structure and content, its indexes, and `docs/runbooks/`.
45
+
46
+ A `validate` failure from the docs-structure check — a stale index, a
47
+ malformed runbook, a dangling `related` entry — routes to
48
+ `technical-writer`, not to you. Do not fix it by editing docs, and do not
49
+ silence the check.
50
+
51
+ Tooling setup you _do_ own that is a repeatable procedure still needs a
52
+ runbook in the same PR (FR-49a); see the rule below.
53
+
54
+ ## Runbook Delivery in the Same PR (FR-49a)
55
+
56
+ A script or workflow that ships without a runbook is a procedure that
57
+ lives in one person's head until they leave. These **MUST** arrive with a
58
+ runbook in the **same draft PR**, not a follow-up issue:
59
+
60
+ - every script added or materially changed under `templates/scripts/`
61
+ - every workflow under `templates/workflows/` and `.github/workflows/`
62
+ - every `infra-engineer` change kind — secrets, deploy, DNS,
63
+ certificates, IAM policy, migrations
64
+
65
+ Updating an existing runbook satisfies this; a new file is required only
66
+ when no runbook covers the procedure. Add the new file to
67
+ `docs/runbooks/README.md` and to `EXPECTED_RUNBOOKS` in
68
+ `test/unit/runbook-set.test.ts`, or the suite fails on the undeclared
69
+ file — which is the reminder working, not a problem with it.
70
+
71
+ A PR that skips this is flagged by the `verifier`'s runbook-coverage
72
+ finding. That finding is advisory and does not block the PR; this rule
73
+ is what it is measuring against.
39
74
 
40
75
  ## Hard Rules
41
76
 
@@ -46,6 +81,7 @@ Inform if any of these are missing or if you see other relevant tools (e.g. `pre
46
81
  5. You **MUST NOT** add new dependencies without asking first.
47
82
  6. You **MUST NOT** delete tests. Mark broken ones: `// TODO(housekeeping): escalate — [reason]`
48
83
  7. You **MUST NOT** edit config files: `eslint.config.*`, `tsconfig*.json`, `jest.config.*`, `vite.config.*`, `playwright.config.*`, lockfiles, or `package.json` — unless a package change was explicitly confirmed.
84
+ 8. You **MUST NOT** touch infrastructure paths — `infra/`, `.github/workflows/deploy-*.yml`, `rollback.yml`, `templates/scripts/`, `templates/workflows/` — even when a deploy workflow has a lint or formatting error. Leave the file as-is and, when a fix is warranted, route it to `infra-engineer` rather than editing it yourself.
49
85
 
50
86
  ## Decision Protocol
51
87