@llipe.com/dev-tasks 0.11.0 → 0.16.1

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 (617) hide show
  1. package/.claude/agents/developer.md +105 -43
  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 +61 -6
  7. package/.claude/agents/ux-engineer.md +1 -0
  8. package/.claude/agents/verifier.md +48 -6
  9. package/.claude/commands/developer.md +2 -266
  10. package/.claude/commands/infra-engineer.md +92 -0
  11. package/.claude/commands/planner.md +44 -23
  12. package/.claude/commands/product-engineer.md +21 -9
  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 +483 -22
  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 +49 -4
  28. package/.claude/skills/memo-cli-usage/REFERENCE.md +230 -17
  29. package/.claude/skills/memo-cli-usage/SKILL.md +66 -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 +70 -19
  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 +25 -4
  37. package/.github/agents/product-engineer.agent.md +21 -9
  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 +60 -6
  41. package/.github/agents/verifier.agent.md +46 -5
  42. package/.github/instructions/implement.instructions.md +49 -4
  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 +66 -13
  60. package/.github/skills/supabase-ops/SKILL.md +104 -0
  61. package/.kiro/agents/developer.md +71 -20
  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 +33 -15
  66. package/.kiro/agents/product-engineer.md +24 -12
  67. package/.kiro/agents/qa-engineer.md +24 -12
  68. package/.kiro/agents/researcher.md +26 -7
  69. package/.kiro/agents/technical-writer.md +63 -9
  70. package/.kiro/agents/verifier.md +47 -6
  71. package/.kiro/skills/activity-codebase-research/SKILL.md +4 -11
  72. package/.kiro/skills/activity-generate-spec/SKILL.md +34 -10
  73. package/.kiro/skills/activity-grill/SKILL.md +150 -0
  74. package/.kiro/skills/activity-init/SKILL.md +121 -71
  75. package/.kiro/skills/activity-refine/SKILL.md +75 -15
  76. package/.kiro/skills/activity-test-standards/SKILL.md +25 -0
  77. package/.kiro/skills/aws-ops/SKILL.md +155 -0
  78. package/.kiro/skills/deploy-ops/SKILL.md +121 -0
  79. package/.kiro/skills/fly-ops/SKILL.md +138 -0
  80. package/.kiro/skills/git-ops/SKILL.md +27 -7
  81. package/.kiro/skills/memo-cli-usage/REFERENCE.md +230 -17
  82. package/.kiro/skills/memo-cli-usage/SKILL.md +66 -13
  83. package/.kiro/skills/supabase-ops/SKILL.md +109 -0
  84. package/.kiro/steering/implement.md +49 -4
  85. package/.kiro/steering/plan.md +43 -1
  86. package/AGENTS.md +60 -109
  87. package/AGENTS.md.template +124 -0
  88. package/CHANGELOG.md +163 -0
  89. package/CLAUDE.md +23 -18
  90. package/CLAUDE.md.template +103 -0
  91. package/README.md +168 -146
  92. package/TESTING.md +84 -148
  93. package/bundle-manifest.json +43 -2
  94. package/dist/bin/dev-tasks.js +65 -3
  95. package/dist/bin/dev-tasks.js.map +1 -1
  96. package/dist/{adapters/cli → bin}/parse-args.d.ts +2 -6
  97. package/dist/bin/parse-args.d.ts.map +1 -0
  98. package/dist/{adapters/cli → bin}/parse-args.js +2 -18
  99. package/dist/bin/parse-args.js.map +1 -0
  100. package/dist/core/checks/decision-log-format.d.ts +44 -0
  101. package/dist/core/checks/decision-log-format.d.ts.map +1 -0
  102. package/dist/core/checks/decision-log-format.js +171 -0
  103. package/dist/core/checks/decision-log-format.js.map +1 -0
  104. package/dist/core/checks/docs-structure.d.ts +82 -0
  105. package/dist/core/checks/docs-structure.d.ts.map +1 -0
  106. package/dist/core/checks/docs-structure.js +285 -0
  107. package/dist/core/checks/docs-structure.js.map +1 -0
  108. package/dist/core/checks/glossary.d.ts +178 -0
  109. package/dist/core/checks/glossary.d.ts.map +1 -0
  110. package/dist/core/checks/glossary.js +651 -0
  111. package/dist/core/checks/glossary.js.map +1 -0
  112. package/dist/core/checks/index.d.ts +19 -0
  113. package/dist/core/checks/index.d.ts.map +1 -0
  114. package/dist/core/checks/index.js +16 -0
  115. package/dist/core/checks/index.js.map +1 -0
  116. package/dist/core/checks/run.d.ts +22 -0
  117. package/dist/core/checks/run.d.ts.map +1 -0
  118. package/dist/core/checks/run.js +51 -0
  119. package/dist/core/checks/run.js.map +1 -0
  120. package/dist/core/distribution/doctor.d.ts +46 -1
  121. package/dist/core/distribution/doctor.d.ts.map +1 -1
  122. package/dist/core/distribution/doctor.js +161 -2
  123. package/dist/core/distribution/doctor.js.map +1 -1
  124. package/dist/core/distribution/index.d.ts +9 -3
  125. package/dist/core/distribution/index.d.ts.map +1 -1
  126. package/dist/core/distribution/index.js +5 -2
  127. package/dist/core/distribution/index.js.map +1 -1
  128. package/dist/core/distribution/install-if-absent.d.ts +46 -0
  129. package/dist/core/distribution/install-if-absent.d.ts.map +1 -0
  130. package/dist/core/distribution/install-if-absent.js +81 -0
  131. package/dist/core/distribution/install-if-absent.js.map +1 -0
  132. package/dist/core/distribution/install.d.ts.map +1 -1
  133. package/dist/core/distribution/install.js +5 -0
  134. package/dist/core/distribution/install.js.map +1 -1
  135. package/dist/core/distribution/migrate-docs.d.ts +64 -0
  136. package/dist/core/distribution/migrate-docs.d.ts.map +1 -0
  137. package/dist/core/distribution/migrate-docs.js +139 -0
  138. package/dist/core/distribution/migrate-docs.js.map +1 -0
  139. package/dist/core/distribution/profiles.d.ts +49 -0
  140. package/dist/core/distribution/profiles.d.ts.map +1 -1
  141. package/dist/core/distribution/profiles.js +45 -0
  142. package/dist/core/distribution/profiles.js.map +1 -1
  143. package/dist/core/distribution/update.d.ts +14 -0
  144. package/dist/core/distribution/update.d.ts.map +1 -1
  145. package/dist/core/distribution/update.js +77 -3
  146. package/dist/core/distribution/update.js.map +1 -1
  147. package/dist/core/distribution/workspace.d.ts +84 -0
  148. package/dist/core/distribution/workspace.d.ts.map +1 -0
  149. package/dist/core/distribution/workspace.js +276 -0
  150. package/dist/core/distribution/workspace.js.map +1 -0
  151. package/dist/core/exit-codes.d.ts +15 -35
  152. package/dist/core/exit-codes.d.ts.map +1 -1
  153. package/dist/core/exit-codes.js +15 -36
  154. package/dist/core/exit-codes.js.map +1 -1
  155. package/dist/core/index.d.ts +1 -6
  156. package/dist/core/index.d.ts.map +1 -1
  157. package/dist/core/index.js +1 -7
  158. package/dist/core/index.js.map +1 -1
  159. package/package.json +17 -32
  160. package/templates/claude/settings.json +48 -0
  161. package/templates/domain/ubiquitous-language.md +28 -0
  162. package/templates/infra/environments.yaml +16 -0
  163. package/templates/infra/redaction-patterns.txt +47 -0
  164. package/templates/runbooks/README.md +14 -0
  165. package/templates/runbooks/runbook-template.md +40 -0
  166. package/templates/scripts/deploy-status.sh +89 -0
  167. package/templates/scripts/deploy-verify.sh +85 -0
  168. package/templates/scripts/deploy.sh +284 -0
  169. package/templates/scripts/release.sh +170 -0
  170. package/templates/scripts/rollback.sh +109 -0
  171. package/templates/workflows/deploy-dev.yml +66 -0
  172. package/templates/workflows/deploy-prod.yml +66 -0
  173. package/templates/workflows/rollback.yml +77 -0
  174. package/.claude/skills/activity-contract-validation/SKILL.md +0 -167
  175. package/.github/skills/activity-contract-validation/SKILL.md +0 -167
  176. package/.kiro/skills/activity-contract-validation/SKILL.md +0 -167
  177. package/dist/adapters/cli/catalog-build.d.ts +0 -30
  178. package/dist/adapters/cli/catalog-build.d.ts.map +0 -1
  179. package/dist/adapters/cli/catalog-build.js +0 -73
  180. package/dist/adapters/cli/catalog-build.js.map +0 -1
  181. package/dist/adapters/cli/catalog-query.d.ts +0 -13
  182. package/dist/adapters/cli/catalog-query.d.ts.map +0 -1
  183. package/dist/adapters/cli/catalog-query.js +0 -329
  184. package/dist/adapters/cli/catalog-query.js.map +0 -1
  185. package/dist/adapters/cli/catalog-scaffold.d.ts +0 -24
  186. package/dist/adapters/cli/catalog-scaffold.d.ts.map +0 -1
  187. package/dist/adapters/cli/catalog-scaffold.js +0 -46
  188. package/dist/adapters/cli/catalog-scaffold.js.map +0 -1
  189. package/dist/adapters/cli/catalog-validate.d.ts +0 -35
  190. package/dist/adapters/cli/catalog-validate.d.ts.map +0 -1
  191. package/dist/adapters/cli/catalog-validate.js +0 -122
  192. package/dist/adapters/cli/catalog-validate.js.map +0 -1
  193. package/dist/adapters/cli/ctx-assemble.d.ts +0 -19
  194. package/dist/adapters/cli/ctx-assemble.d.ts.map +0 -1
  195. package/dist/adapters/cli/ctx-assemble.js +0 -293
  196. package/dist/adapters/cli/ctx-assemble.js.map +0 -1
  197. package/dist/adapters/cli/ctx-fetch.d.ts +0 -49
  198. package/dist/adapters/cli/ctx-fetch.d.ts.map +0 -1
  199. package/dist/adapters/cli/ctx-fetch.js +0 -267
  200. package/dist/adapters/cli/ctx-fetch.js.map +0 -1
  201. package/dist/adapters/cli/extract-all.d.ts +0 -31
  202. package/dist/adapters/cli/extract-all.d.ts.map +0 -1
  203. package/dist/adapters/cli/extract-all.js +0 -374
  204. package/dist/adapters/cli/extract-all.js.map +0 -1
  205. package/dist/adapters/cli/extract-asyncapi.d.ts +0 -26
  206. package/dist/adapters/cli/extract-asyncapi.d.ts.map +0 -1
  207. package/dist/adapters/cli/extract-asyncapi.js +0 -142
  208. package/dist/adapters/cli/extract-asyncapi.js.map +0 -1
  209. package/dist/adapters/cli/extract-component.d.ts +0 -24
  210. package/dist/adapters/cli/extract-component.d.ts.map +0 -1
  211. package/dist/adapters/cli/extract-component.js +0 -198
  212. package/dist/adapters/cli/extract-component.js.map +0 -1
  213. package/dist/adapters/cli/extract-detect.d.ts +0 -19
  214. package/dist/adapters/cli/extract-detect.d.ts.map +0 -1
  215. package/dist/adapters/cli/extract-detect.js +0 -98
  216. package/dist/adapters/cli/extract-detect.js.map +0 -1
  217. package/dist/adapters/cli/extract-openapi.d.ts +0 -29
  218. package/dist/adapters/cli/extract-openapi.d.ts.map +0 -1
  219. package/dist/adapters/cli/extract-openapi.js +0 -111
  220. package/dist/adapters/cli/extract-openapi.js.map +0 -1
  221. package/dist/adapters/cli/extract-schema.d.ts +0 -15
  222. package/dist/adapters/cli/extract-schema.d.ts.map +0 -1
  223. package/dist/adapters/cli/extract-schema.js +0 -39
  224. package/dist/adapters/cli/extract-schema.js.map +0 -1
  225. package/dist/adapters/cli/index.d.ts +0 -6
  226. package/dist/adapters/cli/index.d.ts.map +0 -1
  227. package/dist/adapters/cli/index.js +0 -5
  228. package/dist/adapters/cli/index.js.map +0 -1
  229. package/dist/adapters/cli/init.d.ts +0 -37
  230. package/dist/adapters/cli/init.d.ts.map +0 -1
  231. package/dist/adapters/cli/init.js +0 -336
  232. package/dist/adapters/cli/init.js.map +0 -1
  233. package/dist/adapters/cli/parse-args.d.ts.map +0 -1
  234. package/dist/adapters/cli/parse-args.js.map +0 -1
  235. package/dist/adapters/cli/scope-gate.d.ts +0 -25
  236. package/dist/adapters/cli/scope-gate.d.ts.map +0 -1
  237. package/dist/adapters/cli/scope-gate.js +0 -157
  238. package/dist/adapters/cli/scope-gate.js.map +0 -1
  239. package/dist/adapters/cli/scope.d.ts +0 -26
  240. package/dist/adapters/cli/scope.d.ts.map +0 -1
  241. package/dist/adapters/cli/scope.js +0 -172
  242. package/dist/adapters/cli/scope.js.map +0 -1
  243. package/dist/adapters/cli/validate-component.d.ts +0 -24
  244. package/dist/adapters/cli/validate-component.d.ts.map +0 -1
  245. package/dist/adapters/cli/validate-component.js +0 -62
  246. package/dist/adapters/cli/validate-component.js.map +0 -1
  247. package/dist/adapters/cli/verify-contract-diff.d.ts +0 -21
  248. package/dist/adapters/cli/verify-contract-diff.d.ts.map +0 -1
  249. package/dist/adapters/cli/verify-contract-diff.js +0 -69
  250. package/dist/adapters/cli/verify-contract-diff.js.map +0 -1
  251. package/dist/adapters/cli/verify-drift.d.ts +0 -24
  252. package/dist/adapters/cli/verify-drift.d.ts.map +0 -1
  253. package/dist/adapters/cli/verify-drift.js +0 -103
  254. package/dist/adapters/cli/verify-drift.js.map +0 -1
  255. package/dist/adapters/cli/verify-impact.d.ts +0 -23
  256. package/dist/adapters/cli/verify-impact.d.ts.map +0 -1
  257. package/dist/adapters/cli/verify-impact.js +0 -119
  258. package/dist/adapters/cli/verify-impact.js.map +0 -1
  259. package/dist/adapters/mcp/index.d.ts +0 -5
  260. package/dist/adapters/mcp/index.d.ts.map +0 -1
  261. package/dist/adapters/mcp/index.js +0 -2
  262. package/dist/adapters/mcp/index.js.map +0 -1
  263. package/dist/bin/dt.d.ts +0 -7
  264. package/dist/bin/dt.d.ts.map +0 -1
  265. package/dist/bin/dt.js +0 -647
  266. package/dist/bin/dt.js.map +0 -1
  267. package/dist/core/catalog/build.d.ts +0 -143
  268. package/dist/core/catalog/build.d.ts.map +0 -1
  269. package/dist/core/catalog/build.js +0 -475
  270. package/dist/core/catalog/build.js.map +0 -1
  271. package/dist/core/catalog/checks/index.d.ts +0 -18
  272. package/dist/core/catalog/checks/index.d.ts.map +0 -1
  273. package/dist/core/catalog/checks/index.js +0 -18
  274. package/dist/core/catalog/checks/index.js.map +0 -1
  275. package/dist/core/catalog/checks/v01-schema.d.ts +0 -17
  276. package/dist/core/catalog/checks/v01-schema.d.ts.map +0 -1
  277. package/dist/core/catalog/checks/v01-schema.js +0 -57
  278. package/dist/core/catalog/checks/v01-schema.js.map +0 -1
  279. package/dist/core/catalog/checks/v02-v03-identity.d.ts +0 -14
  280. package/dist/core/catalog/checks/v02-v03-identity.d.ts.map +0 -1
  281. package/dist/core/catalog/checks/v02-v03-identity.js +0 -60
  282. package/dist/core/catalog/checks/v02-v03-identity.js.map +0 -1
  283. package/dist/core/catalog/checks/v04-referential-integrity.d.ts +0 -7
  284. package/dist/core/catalog/checks/v04-referential-integrity.d.ts.map +0 -1
  285. package/dist/core/catalog/checks/v04-referential-integrity.js +0 -32
  286. package/dist/core/catalog/checks/v04-referential-integrity.js.map +0 -1
  287. package/dist/core/catalog/checks/v05-domain-existence.d.ts +0 -6
  288. package/dist/core/catalog/checks/v05-domain-existence.d.ts.map +0 -1
  289. package/dist/core/catalog/checks/v05-domain-existence.js +0 -23
  290. package/dist/core/catalog/checks/v05-domain-existence.js.map +0 -1
  291. package/dist/core/catalog/checks/v06-v07-paths.d.ts +0 -29
  292. package/dist/core/catalog/checks/v06-v07-paths.d.ts.map +0 -1
  293. package/dist/core/catalog/checks/v06-v07-paths.js +0 -107
  294. package/dist/core/catalog/checks/v06-v07-paths.js.map +0 -1
  295. package/dist/core/catalog/checks/v08-v10-contracts.d.ts +0 -13
  296. package/dist/core/catalog/checks/v08-v10-contracts.d.ts.map +0 -1
  297. package/dist/core/catalog/checks/v08-v10-contracts.js +0 -70
  298. package/dist/core/catalog/checks/v08-v10-contracts.js.map +0 -1
  299. package/dist/core/catalog/checks/v11-manual-fields.d.ts +0 -16
  300. package/dist/core/catalog/checks/v11-manual-fields.d.ts.map +0 -1
  301. package/dist/core/catalog/checks/v11-manual-fields.js +0 -60
  302. package/dist/core/catalog/checks/v11-manual-fields.js.map +0 -1
  303. package/dist/core/catalog/checks/v12-cycles.d.ts +0 -8
  304. package/dist/core/catalog/checks/v12-cycles.d.ts.map +0 -1
  305. package/dist/core/catalog/checks/v12-cycles.js +0 -28
  306. package/dist/core/catalog/checks/v12-cycles.js.map +0 -1
  307. package/dist/core/catalog/checks/v13-orphan-contracts.d.ts +0 -7
  308. package/dist/core/catalog/checks/v13-orphan-contracts.d.ts.map +0 -1
  309. package/dist/core/catalog/checks/v13-orphan-contracts.js +0 -33
  310. package/dist/core/catalog/checks/v13-orphan-contracts.js.map +0 -1
  311. package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts +0 -8
  312. package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts.map +0 -1
  313. package/dist/core/catalog/checks/v14-v15-lifecycle.js +0 -42
  314. package/dist/core/catalog/checks/v14-v15-lifecycle.js.map +0 -1
  315. package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts +0 -7
  316. package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts.map +0 -1
  317. package/dist/core/catalog/checks/v16-deprecated-consumers.js +0 -47
  318. package/dist/core/catalog/checks/v16-deprecated-consumers.js.map +0 -1
  319. package/dist/core/catalog/checks/v17-low-confidence.d.ts +0 -7
  320. package/dist/core/catalog/checks/v17-low-confidence.d.ts.map +0 -1
  321. package/dist/core/catalog/checks/v17-low-confidence.js +0 -32
  322. package/dist/core/catalog/checks/v17-low-confidence.js.map +0 -1
  323. package/dist/core/catalog/checks/v18-low-payload.d.ts +0 -7
  324. package/dist/core/catalog/checks/v18-low-payload.d.ts.map +0 -1
  325. package/dist/core/catalog/checks/v18-low-payload.js +0 -33
  326. package/dist/core/catalog/checks/v18-low-payload.js.map +0 -1
  327. package/dist/core/catalog/checks/v19-domain-membership.d.ts +0 -8
  328. package/dist/core/catalog/checks/v19-domain-membership.d.ts.map +0 -1
  329. package/dist/core/catalog/checks/v19-domain-membership.js +0 -55
  330. package/dist/core/catalog/checks/v19-domain-membership.js.map +0 -1
  331. package/dist/core/catalog/coverage.d.ts +0 -39
  332. package/dist/core/catalog/coverage.d.ts.map +0 -1
  333. package/dist/core/catalog/coverage.js +0 -62
  334. package/dist/core/catalog/coverage.js.map +0 -1
  335. package/dist/core/catalog/graph.d.ts +0 -49
  336. package/dist/core/catalog/graph.d.ts.map +0 -1
  337. package/dist/core/catalog/graph.js +0 -114
  338. package/dist/core/catalog/graph.js.map +0 -1
  339. package/dist/core/catalog/index-model.d.ts +0 -96
  340. package/dist/core/catalog/index-model.d.ts.map +0 -1
  341. package/dist/core/catalog/index-model.js +0 -8
  342. package/dist/core/catalog/index-model.js.map +0 -1
  343. package/dist/core/catalog/index.d.ts +0 -5
  344. package/dist/core/catalog/index.d.ts.map +0 -1
  345. package/dist/core/catalog/index.js +0 -2
  346. package/dist/core/catalog/index.js.map +0 -1
  347. package/dist/core/catalog/queries.d.ts +0 -69
  348. package/dist/core/catalog/queries.d.ts.map +0 -1
  349. package/dist/core/catalog/queries.js +0 -165
  350. package/dist/core/catalog/queries.js.map +0 -1
  351. package/dist/core/catalog/resolve.d.ts +0 -47
  352. package/dist/core/catalog/resolve.d.ts.map +0 -1
  353. package/dist/core/catalog/resolve.js +0 -318
  354. package/dist/core/catalog/resolve.js.map +0 -1
  355. package/dist/core/catalog/scaffold.d.ts +0 -31
  356. package/dist/core/catalog/scaffold.d.ts.map +0 -1
  357. package/dist/core/catalog/scaffold.js +0 -141
  358. package/dist/core/catalog/scaffold.js.map +0 -1
  359. package/dist/core/catalog/validate-component.d.ts +0 -50
  360. package/dist/core/catalog/validate-component.d.ts.map +0 -1
  361. package/dist/core/catalog/validate-component.js +0 -105
  362. package/dist/core/catalog/validate-component.js.map +0 -1
  363. package/dist/core/catalog/validate.d.ts +0 -71
  364. package/dist/core/catalog/validate.d.ts.map +0 -1
  365. package/dist/core/catalog/validate.js +0 -103
  366. package/dist/core/catalog/validate.js.map +0 -1
  367. package/dist/core/context/assemble.d.ts +0 -126
  368. package/dist/core/context/assemble.d.ts.map +0 -1
  369. package/dist/core/context/assemble.js +0 -197
  370. package/dist/core/context/assemble.js.map +0 -1
  371. package/dist/core/context/cache.d.ts +0 -60
  372. package/dist/core/context/cache.d.ts.map +0 -1
  373. package/dist/core/context/cache.js +0 -236
  374. package/dist/core/context/cache.js.map +0 -1
  375. package/dist/core/context/exit-codes.d.ts +0 -28
  376. package/dist/core/context/exit-codes.d.ts.map +0 -1
  377. package/dist/core/context/exit-codes.js +0 -28
  378. package/dist/core/context/exit-codes.js.map +0 -1
  379. package/dist/core/context/fetch.d.ts +0 -55
  380. package/dist/core/context/fetch.d.ts.map +0 -1
  381. package/dist/core/context/fetch.js +0 -112
  382. package/dist/core/context/fetch.js.map +0 -1
  383. package/dist/core/context/index.d.ts +0 -11
  384. package/dist/core/context/index.d.ts.map +0 -1
  385. package/dist/core/context/index.js +0 -8
  386. package/dist/core/context/index.js.map +0 -1
  387. package/dist/core/context/init.d.ts +0 -179
  388. package/dist/core/context/init.d.ts.map +0 -1
  389. package/dist/core/context/init.js +0 -532
  390. package/dist/core/context/init.js.map +0 -1
  391. package/dist/core/context/layers/architecture-layer.d.ts +0 -13
  392. package/dist/core/context/layers/architecture-layer.d.ts.map +0 -1
  393. package/dist/core/context/layers/architecture-layer.js +0 -24
  394. package/dist/core/context/layers/architecture-layer.js.map +0 -1
  395. package/dist/core/context/layers/contracts-layer.d.ts +0 -13
  396. package/dist/core/context/layers/contracts-layer.d.ts.map +0 -1
  397. package/dist/core/context/layers/contracts-layer.js +0 -83
  398. package/dist/core/context/layers/contracts-layer.js.map +0 -1
  399. package/dist/core/context/layers/conventions-delta-layer.d.ts +0 -13
  400. package/dist/core/context/layers/conventions-delta-layer.d.ts.map +0 -1
  401. package/dist/core/context/layers/conventions-delta-layer.js +0 -37
  402. package/dist/core/context/layers/conventions-delta-layer.js.map +0 -1
  403. package/dist/core/context/layers/flow-layer.d.ts +0 -14
  404. package/dist/core/context/layers/flow-layer.d.ts.map +0 -1
  405. package/dist/core/context/layers/flow-layer.js +0 -61
  406. package/dist/core/context/layers/flow-layer.js.map +0 -1
  407. package/dist/core/context/layers/index-layer.d.ts +0 -13
  408. package/dist/core/context/layers/index-layer.d.ts.map +0 -1
  409. package/dist/core/context/layers/index-layer.js +0 -77
  410. package/dist/core/context/layers/index-layer.js.map +0 -1
  411. package/dist/core/context/layers/primary-layer.d.ts +0 -16
  412. package/dist/core/context/layers/primary-layer.d.ts.map +0 -1
  413. package/dist/core/context/layers/primary-layer.js +0 -61
  414. package/dist/core/context/layers/primary-layer.js.map +0 -1
  415. package/dist/core/context/layers/secondary-layer.d.ts +0 -19
  416. package/dist/core/context/layers/secondary-layer.d.ts.map +0 -1
  417. package/dist/core/context/layers/secondary-layer.js +0 -52
  418. package/dist/core/context/layers/secondary-layer.js.map +0 -1
  419. package/dist/core/context/session-lock.d.ts +0 -114
  420. package/dist/core/context/session-lock.d.ts.map +0 -1
  421. package/dist/core/context/session-lock.js +0 -90
  422. package/dist/core/context/session-lock.js.map +0 -1
  423. package/dist/core/context/tokens.d.ts +0 -35
  424. package/dist/core/context/tokens.d.ts.map +0 -1
  425. package/dist/core/context/tokens.js +0 -88
  426. package/dist/core/context/tokens.js.map +0 -1
  427. package/dist/core/extract/asyncapi/declared.d.ts +0 -19
  428. package/dist/core/extract/asyncapi/declared.d.ts.map +0 -1
  429. package/dist/core/extract/asyncapi/declared.js +0 -168
  430. package/dist/core/extract/asyncapi/declared.js.map +0 -1
  431. package/dist/core/extract/asyncapi/index.d.ts +0 -12
  432. package/dist/core/extract/asyncapi/index.d.ts.map +0 -1
  433. package/dist/core/extract/asyncapi/index.js +0 -8
  434. package/dist/core/extract/asyncapi/index.js.map +0 -1
  435. package/dist/core/extract/asyncapi/payloads.d.ts +0 -20
  436. package/dist/core/extract/asyncapi/payloads.d.ts.map +0 -1
  437. package/dist/core/extract/asyncapi/payloads.js +0 -421
  438. package/dist/core/extract/asyncapi/payloads.js.map +0 -1
  439. package/dist/core/extract/asyncapi/topics.d.ts +0 -27
  440. package/dist/core/extract/asyncapi/topics.d.ts.map +0 -1
  441. package/dist/core/extract/asyncapi/topics.js +0 -368
  442. package/dist/core/extract/asyncapi/topics.js.map +0 -1
  443. package/dist/core/extract/asyncapi/types.d.ts +0 -129
  444. package/dist/core/extract/asyncapi/types.d.ts.map +0 -1
  445. package/dist/core/extract/asyncapi/types.js +0 -5
  446. package/dist/core/extract/asyncapi/types.js.map +0 -1
  447. package/dist/core/extract/asyncapi/validate.d.ts +0 -29
  448. package/dist/core/extract/asyncapi/validate.d.ts.map +0 -1
  449. package/dist/core/extract/asyncapi/validate.js +0 -156
  450. package/dist/core/extract/asyncapi/validate.js.map +0 -1
  451. package/dist/core/extract/component.d.ts +0 -204
  452. package/dist/core/extract/component.d.ts.map +0 -1
  453. package/dist/core/extract/component.js +0 -258
  454. package/dist/core/extract/component.js.map +0 -1
  455. package/dist/core/extract/detect.d.ts +0 -35
  456. package/dist/core/extract/detect.d.ts.map +0 -1
  457. package/dist/core/extract/detect.js +0 -89
  458. package/dist/core/extract/detect.js.map +0 -1
  459. package/dist/core/extract/index.d.ts +0 -12
  460. package/dist/core/extract/index.d.ts.map +0 -1
  461. package/dist/core/extract/index.js +0 -6
  462. package/dist/core/extract/index.js.map +0 -1
  463. package/dist/core/extract/ladder.d.ts +0 -79
  464. package/dist/core/extract/ladder.d.ts.map +0 -1
  465. package/dist/core/extract/ladder.js +0 -70
  466. package/dist/core/extract/ladder.js.map +0 -1
  467. package/dist/core/extract/openapi/index.d.ts +0 -43
  468. package/dist/core/extract/openapi/index.d.ts.map +0 -1
  469. package/dist/core/extract/openapi/index.js +0 -142
  470. package/dist/core/extract/openapi/index.js.map +0 -1
  471. package/dist/core/extract/openapi/route1.d.ts +0 -36
  472. package/dist/core/extract/openapi/route1.d.ts.map +0 -1
  473. package/dist/core/extract/openapi/route1.js +0 -333
  474. package/dist/core/extract/openapi/route1.js.map +0 -1
  475. package/dist/core/extract/openapi/route2-introspect.d.ts +0 -18
  476. package/dist/core/extract/openapi/route2-introspect.d.ts.map +0 -1
  477. package/dist/core/extract/openapi/route2-introspect.js +0 -249
  478. package/dist/core/extract/openapi/route2-introspect.js.map +0 -1
  479. package/dist/core/extract/openapi/route2.d.ts +0 -69
  480. package/dist/core/extract/openapi/route2.d.ts.map +0 -1
  481. package/dist/core/extract/openapi/route2.js +0 -211
  482. package/dist/core/extract/openapi/route2.js.map +0 -1
  483. package/dist/core/extract/openapi/route3.d.ts +0 -26
  484. package/dist/core/extract/openapi/route3.d.ts.map +0 -1
  485. package/dist/core/extract/openapi/route3.js +0 -737
  486. package/dist/core/extract/openapi/route3.js.map +0 -1
  487. package/dist/core/extract/openapi/types.d.ts +0 -125
  488. package/dist/core/extract/openapi/types.d.ts.map +0 -1
  489. package/dist/core/extract/openapi/types.js +0 -5
  490. package/dist/core/extract/openapi/types.js.map +0 -1
  491. package/dist/core/extract/openapi/validate.d.ts +0 -29
  492. package/dist/core/extract/openapi/validate.d.ts.map +0 -1
  493. package/dist/core/extract/openapi/validate.js +0 -200
  494. package/dist/core/extract/openapi/validate.js.map +0 -1
  495. package/dist/core/extract/orm/drizzle.d.ts +0 -20
  496. package/dist/core/extract/orm/drizzle.d.ts.map +0 -1
  497. package/dist/core/extract/orm/drizzle.js +0 -283
  498. package/dist/core/extract/orm/drizzle.js.map +0 -1
  499. package/dist/core/extract/orm/information-schema.d.ts +0 -26
  500. package/dist/core/extract/orm/information-schema.d.ts.map +0 -1
  501. package/dist/core/extract/orm/information-schema.js +0 -142
  502. package/dist/core/extract/orm/information-schema.js.map +0 -1
  503. package/dist/core/extract/orm/prisma.d.ts +0 -23
  504. package/dist/core/extract/orm/prisma.d.ts.map +0 -1
  505. package/dist/core/extract/orm/prisma.js +0 -234
  506. package/dist/core/extract/orm/prisma.js.map +0 -1
  507. package/dist/core/extract/orm/typeorm.d.ts +0 -22
  508. package/dist/core/extract/orm/typeorm.d.ts.map +0 -1
  509. package/dist/core/extract/orm/typeorm.js +0 -269
  510. package/dist/core/extract/orm/typeorm.js.map +0 -1
  511. package/dist/core/extract/orm/types.d.ts +0 -97
  512. package/dist/core/extract/orm/types.d.ts.map +0 -1
  513. package/dist/core/extract/orm/types.js +0 -6
  514. package/dist/core/extract/orm/types.js.map +0 -1
  515. package/dist/core/extract/prompt.d.ts +0 -21
  516. package/dist/core/extract/prompt.d.ts.map +0 -1
  517. package/dist/core/extract/prompt.js +0 -79
  518. package/dist/core/extract/prompt.js.map +0 -1
  519. package/dist/core/extract/provider.d.ts +0 -121
  520. package/dist/core/extract/provider.d.ts.map +0 -1
  521. package/dist/core/extract/provider.js +0 -6
  522. package/dist/core/extract/provider.js.map +0 -1
  523. package/dist/core/extract/providers/node-ts.d.ts +0 -69
  524. package/dist/core/extract/providers/node-ts.d.ts.map +0 -1
  525. package/dist/core/extract/providers/node-ts.js +0 -320
  526. package/dist/core/extract/providers/node-ts.js.map +0 -1
  527. package/dist/core/extract/render/schema-md.d.ts +0 -16
  528. package/dist/core/extract/render/schema-md.d.ts.map +0 -1
  529. package/dist/core/extract/render/schema-md.js +0 -140
  530. package/dist/core/extract/render/schema-md.js.map +0 -1
  531. package/dist/core/extract/report.d.ts +0 -125
  532. package/dist/core/extract/report.d.ts.map +0 -1
  533. package/dist/core/extract/report.js +0 -52
  534. package/dist/core/extract/report.js.map +0 -1
  535. package/dist/core/extract/schema.d.ts +0 -34
  536. package/dist/core/extract/schema.d.ts.map +0 -1
  537. package/dist/core/extract/schema.js +0 -146
  538. package/dist/core/extract/schema.js.map +0 -1
  539. package/dist/core/extract/workspaces.d.ts +0 -33
  540. package/dist/core/extract/workspaces.d.ts.map +0 -1
  541. package/dist/core/extract/workspaces.js +0 -193
  542. package/dist/core/extract/workspaces.js.map +0 -1
  543. package/dist/core/providers/index.d.ts +0 -6
  544. package/dist/core/providers/index.d.ts.map +0 -1
  545. package/dist/core/providers/index.js +0 -2
  546. package/dist/core/providers/index.js.map +0 -1
  547. package/dist/core/providers/tracker.d.ts +0 -74
  548. package/dist/core/providers/tracker.d.ts.map +0 -1
  549. package/dist/core/providers/tracker.js +0 -38
  550. package/dist/core/providers/tracker.js.map +0 -1
  551. package/dist/core/scope/calibration.d.ts +0 -25
  552. package/dist/core/scope/calibration.d.ts.map +0 -1
  553. package/dist/core/scope/calibration.js +0 -52
  554. package/dist/core/scope/calibration.js.map +0 -1
  555. package/dist/core/scope/closure.d.ts +0 -31
  556. package/dist/core/scope/closure.d.ts.map +0 -1
  557. package/dist/core/scope/closure.js +0 -68
  558. package/dist/core/scope/closure.js.map +0 -1
  559. package/dist/core/scope/gate.d.ts +0 -41
  560. package/dist/core/scope/gate.d.ts.map +0 -1
  561. package/dist/core/scope/gate.js +0 -165
  562. package/dist/core/scope/gate.js.map +0 -1
  563. package/dist/core/scope/index.d.ts +0 -18
  564. package/dist/core/scope/index.d.ts.map +0 -1
  565. package/dist/core/scope/index.js +0 -12
  566. package/dist/core/scope/index.js.map +0 -1
  567. package/dist/core/scope/partition.d.ts +0 -36
  568. package/dist/core/scope/partition.d.ts.map +0 -1
  569. package/dist/core/scope/partition.js +0 -78
  570. package/dist/core/scope/partition.js.map +0 -1
  571. package/dist/core/scope/prompt.d.ts +0 -39
  572. package/dist/core/scope/prompt.d.ts.map +0 -1
  573. package/dist/core/scope/prompt.js +0 -123
  574. package/dist/core/scope/prompt.js.map +0 -1
  575. package/dist/core/scope/scoping.d.ts +0 -52
  576. package/dist/core/scope/scoping.d.ts.map +0 -1
  577. package/dist/core/scope/scoping.js +0 -99
  578. package/dist/core/scope/scoping.js.map +0 -1
  579. package/dist/core/scope/types.d.ts +0 -77
  580. package/dist/core/scope/types.d.ts.map +0 -1
  581. package/dist/core/scope/types.js +0 -5
  582. package/dist/core/scope/types.js.map +0 -1
  583. package/dist/core/scope/validate.d.ts +0 -47
  584. package/dist/core/scope/validate.d.ts.map +0 -1
  585. package/dist/core/scope/validate.js +0 -90
  586. package/dist/core/scope/validate.js.map +0 -1
  587. package/dist/core/verify/asyncapi-diff.d.ts +0 -34
  588. package/dist/core/verify/asyncapi-diff.d.ts.map +0 -1
  589. package/dist/core/verify/asyncapi-diff.js +0 -209
  590. package/dist/core/verify/asyncapi-diff.js.map +0 -1
  591. package/dist/core/verify/contract-diff.d.ts +0 -39
  592. package/dist/core/verify/contract-diff.d.ts.map +0 -1
  593. package/dist/core/verify/contract-diff.js +0 -63
  594. package/dist/core/verify/contract-diff.js.map +0 -1
  595. package/dist/core/verify/drift.d.ts +0 -47
  596. package/dist/core/verify/drift.d.ts.map +0 -1
  597. package/dist/core/verify/drift.js +0 -122
  598. package/dist/core/verify/drift.js.map +0 -1
  599. package/dist/core/verify/impact.d.ts +0 -22
  600. package/dist/core/verify/impact.d.ts.map +0 -1
  601. package/dist/core/verify/impact.js +0 -93
  602. package/dist/core/verify/impact.js.map +0 -1
  603. package/dist/core/verify/index.d.ts +0 -10
  604. package/dist/core/verify/index.d.ts.map +0 -1
  605. package/dist/core/verify/index.js +0 -9
  606. package/dist/core/verify/index.js.map +0 -1
  607. package/dist/core/verify/openapi-diff.d.ts +0 -29
  608. package/dist/core/verify/openapi-diff.d.ts.map +0 -1
  609. package/dist/core/verify/openapi-diff.js +0 -291
  610. package/dist/core/verify/openapi-diff.js.map +0 -1
  611. package/dist/core/verify/types.d.ts +0 -138
  612. package/dist/core/verify/types.d.ts.map +0 -1
  613. package/dist/core/verify/types.js +0 -5
  614. package/dist/core/verify/types.js.map +0 -1
  615. package/schemas/component.schema.json +0 -203
  616. package/schemas/flow.schema.json +0 -75
  617. package/schemas/scope-output.schema.json +0 -62
@@ -12,6 +12,27 @@ Guide an AI assistant in establishing the foundational documents for a project:
12
12
 
13
13
  Run this activity **once per project** (or when a major strategic or technical pivot occurs).
14
14
 
15
+ ## Foundation Document Names
16
+
17
+ The canonical names are **`docs/product.md`** and **`docs/tech.md`**. Create and reference those names only.
18
+
19
+ **Fallback, one release cycle (FR-45, `shared-understanding#D-42`).** These documents were renamed from `docs/product-context.md` and `docs/technical-guidelines.md`. A consumer repository installed before the rename still carries the old names, and `dev-tasks update` never renames a consumer-owned file on its own. So when reading a foundation document: resolve `docs/product.md` first and fall back to `docs/product-context.md` only if the new name is absent; likewise `docs/tech.md`, then `docs/technical-guidelines.md`. When writing, always write the new name.
20
+
21
+ On encountering the old names, propose `dev-tasks migrate docs`, which performs the rename with content unchanged. Do not rename a consumer's files without being asked. The fallback is removed one release cycle after the rename ships (tracked in issue #201); after that the proposal is the only path.
22
+
23
+ ## Repository Setup — Branch Protection (Required)
24
+
25
+ Before or alongside establishing the foundation documents, verify the repository's default branch has GitHub branch protection configured. This is not optional hardening — it is the actual gate for "no agent merges into the default branch." Every hook shipped with dev-tasks (`git-guard.sh`, `branch-guard.sh`, and their Kiro equivalents) is a best-effort, advisory, local check that can be evaded by a sufficiently creative command or tool-input shape, and Copilot has no hook system at all; only a server-side branch protection rule is unbypassable by any tool surface.
26
+
27
+ Check with `gh api repos/<owner>/<repo>/branches/<default-branch>/protection` (a 404 means it is not configured). If missing, tell the user and offer to configure it:
28
+
29
+ - Require a pull request before merging
30
+ - Require at least 1 approving review
31
+ - Require status checks to pass before merging
32
+ - Disable force-pushes and branch deletion on the default branch
33
+
34
+ See the README "Configure branch protection" step for the exact `gh api` invocation. You **MUST NOT** proceed to treat the project as fully initialized while branch protection remains unconfigured without the user's explicit acknowledgment.
35
+
15
36
  ## Document Changelog Convention
16
37
 
17
38
  Every document produced by this activity **MUST** include a **Changelog** table as the **first section** after the document title. The changelog tracks the version history of the document.
@@ -31,90 +52,119 @@ Every document produced by this activity **MUST** include a **Changelog** table
31
52
 
32
53
  ---
33
54
 
34
- ## Mode Detection (RF-60)
55
+ ## Mode Detection
35
56
 
36
57
  Before starting the interview, the skill **MUST** detect the repository mode and route accordingly. The detection logic is:
37
58
 
38
- 1. **Multi-repo mode:** `component.json` exists at the repository root → the repository is a component in a multi-repo product. Context resolution passes exclusively through `dt`.
39
- 2. **Mono-repo mode:** no `component.json` at root, but `/docs` directory exists → current single-repo flow (interview + direct docs generation).
40
- 3. **Undocumented / greenfield mode:** neither `component.json` nor `/docs` → extraction-first flow to bootstrap documentation from code, then interview.
41
-
42
- > **Precedence:** If both `component.json` AND `/docs` exist, multi-repo mode wins — `component.json` is the authoritative signal.
59
+ 1. **Documented-repository mode:** `/docs` directory exists → interview + direct docs generation.
60
+ This mode is about whether documentation exists, not about how many packages the repository has. Repository _shape_ (single-package or monorepo) is detected separately — see Repository Shape Detection below. The mode was called "Mono-Repo" until `shared-understanding#D-44` renamed it to free the term.
61
+ 2. **Undocumented / greenfield mode:** no `/docs` → investigation-first flow to bootstrap documentation from the codebase, then interview.
43
62
 
44
63
  ---
45
64
 
46
- ## Mode A — Multi-Repo (RF-61)
65
+ ## Mode A — Documented Repository (Current Flow)
47
66
 
48
- When `component.json` is present at the repo root, the skill **MUST** delegate all context resolution to `dt` and **MUST NOT** read `/docs` or walk the repository directly.
67
+ When `/docs` exists, the skill follows the **existing single-repo flow** unchanged.
49
68
 
50
69
  ### Process
51
70
 
52
- 1. **Invoke `dt init --task "<user's task/product description>" --json`**.
53
- 2. **Handle exit codes:**
71
+ 1. **Receive Initial Brief:** The user describes the product, project, or technology stack.
72
+ 2. **Ask Clarifying Questions:** Gather information for both product context and technical guidelines in a single interview. Group questions by domain.
73
+ 3. **Generate Product Document:** Create `docs/product.md` using the structure below.
74
+ 4. **Generate Technical Document:** Create `docs/tech.md` using the structure below.
75
+ 5. **Save Output:** Save both documents in `/docs/` and present them for user review.
76
+
77
+ ---
78
+
79
+ ## Mode B — Undocumented / Greenfield
54
80
 
55
- | Exit Code | Meaning | Action |
56
- | --------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
57
- | `0` | Success — bundle emitted | Load bundle files in numeric order. Present `review_flags` (if any) to the user before proceeding to planning. Continue to the interview for product context and technical guidelines using the bundle as input. |
58
- | `7` | Gate abort — partition proposal | Present the partition proposal to the user. Explain that the scope is too broad and needs to be split. **Stop** — do not proceed to planning. |
59
- | `9` | Stale catalog index | Inform the user that the catalog index is stale and needs to be rebuilt (e.g., `dt catalog build`). **Stop** — do not proceed. |
60
- | `10` | Invalid scope after LLM retry | Inform the user that automatic scoping failed. Suggest running with `--components` for manual scope. **Stop.** |
61
- | `11` | No candidates found | Inform the user that no components matched the task description. Suggest refining the task text or using `--components`. **Stop.** |
62
- | `6` | Budget overflow | Inform the user that the scoped context exceeds the token budget. Suggest narrowing scope with `--max-components` or `--budget`. **Stop.** |
81
+ When `/docs` does not exist, the repository has no established documentation. The skill investigates the codebase directly before conducting the interview.
63
82
 
64
- 3. **On success (exit 0):**
65
- - Load the assembled bundle files in numeric order (they form the context).
66
- - If `review_flags` are present in the JSON output, present them as warnings to the user (e.g., "scope spans >2 domains", "low-payload boundary contract") and ask whether to proceed.
67
- - Use the bundle content as the basis for the product-context and technical-guidelines interview — the bundle replaces direct `/docs` reading.
83
+ ### Process
84
+
85
+ 1. **Investigate the codebase:** Read manifest files (`package.json`, `pyproject.toml`, `go.mod`, or equivalent), the directory structure, the README, and any existing configuration to identify the technology stack, frameworks, and conventions in use.
86
+ 2. **Present a findings summary:** Show the user what was found — stack, frameworks, notable directories, confidence per finding — before the interview.
87
+ 3. **Conduct the interview:** Proceed with the standard clarifying questions for product and technical context (same as documented-repository mode).
88
+ 4. **Generate documents:** Create `docs/product.md` and `docs/tech.md` using the investigation findings as pre-filled context combined with interview answers.
89
+ 5. **Save Output:** Save both documents in `/docs/` and present them for user review.
68
90
 
69
91
  ### Constraints
70
92
 
71
- - The skill **MUST NOT** read `/docs`, walk the repository tree, or inspect source files directly in multi-repo mode.
72
- - All context comes from the `dt init` bundle output.
73
- - The skill **MAY** ask follow-up questions to fill gaps not covered by the bundle (e.g., strategic goals, success metrics).
93
+ - The investigation findings inform but do not replace the interview — the user confirms and supplements.
94
+ - If the repository has no identifiable stack (an empty project), skip investigation and proceed directly to the interview (pure greenfield).
74
95
 
75
96
  ---
76
97
 
77
- ## Mode B — Mono-Repo (Current Flow)
98
+ ---
78
99
 
79
- When no `component.json` is present but `/docs` exists, the skill follows the **existing single-repo flow** unchanged.
100
+ ## Repository Shape Detection
80
101
 
81
- ### Process
102
+ Before the interview, detect the repository's **shape**. This is independent of the mode above: a documented repository can be either shape, and so can a greenfield one.
82
103
 
83
- 1. **Receive Initial Brief:** The user describes the product, project, or technology stack.
84
- 2. **Ask Clarifying Questions:** Gather information for both product context and technical guidelines in a single interview. Group questions by domain.
85
- 3. **Generate Product Context Document:** Create `product-context.md` using the structure below.
86
- 4. **Generate Technical Guidelines Document:** Create `technical-guidelines.md` using the structure below.
87
- 5. **Save Output:** Save both documents in `/docs/` and present them for user review.
104
+ Detect from these signals (FR-59):
88
105
 
89
- ---
106
+ | Signal | Read for |
107
+ | ----------------------------------------- | ------------------------------ |
108
+ | `pnpm-workspace.yaml` | Shape **and** the package list |
109
+ | `workspaces` in `package.json` | Shape **and** the package list |
110
+ | `turbo.json` | Shape only |
111
+ | `nx.json` | Shape only |
112
+ | `lerna.json` | Shape only |
113
+ | `[tool.uv.workspace]` in `pyproject.toml` | Shape only |
90
114
 
91
- ## Mode C — Undocumented / Greenfield
115
+ Any signal present → **monorepo**. No signal → **single-package**.
92
116
 
93
- When neither `component.json` nor `/docs` exists, the repository has no established documentation. The skill bootstraps documentation from code extraction before conducting the interview.
117
+ Only the first two are parsed for a package list. When a repository signals monorepo through one of the other four, ask the user which packages exist rather than guessing.
94
118
 
95
- ### Process
119
+ `core/distribution/workspace.ts` exports `detectWorkspace(repoRoot)`, which returns the shape, the signals found, and the packages. Use it rather than re-deriving the answer.
96
120
 
97
- 1. **Run detection:** Invoke `dt extract detect` to identify the repository's technology stack, frameworks, and extractable artifacts.
98
- 2. **Run extraction:** Invoke `dt extract all --interactive` to extract schema, OpenAPI, AsyncAPI, and component manifest from the codebase.
99
- - The `--interactive` flag allows the user to confirm or skip ambiguous extractions.
100
- - If interrupted, the skill **SHOULD** inform the user how to resume (`dt extract all --interactive` picks up where it left off).
101
- 3. **Present extraction report:** Show the user the results of extraction — what was found, confidence levels, any `unresolved` items.
102
- 4. **Conduct the interview:** Proceed with the standard clarifying questions for product context and technical guidelines (same as Mono-Repo mode).
103
- 5. **Generate documents:** Create `product-context.md` and `technical-guidelines.md` using the extraction results as pre-filled context combined with interview answers.
104
- 6. **Save Output:** Save both documents in `/docs/` and present them for user review.
121
+ ### Package Map
105
122
 
106
- ### Constraints
123
+ Record the result in `docs/tech.md` as a **Package Map** section, one row per package:
124
+
125
+ ```markdown
126
+ ## Package Map
127
+
128
+ | Package | Path | Purpose | Owner | Canonical scripts | Bounded context |
129
+ | ---------- | ------------- | ------------------- | -------- | --------------------- | --------------- |
130
+ | @acme/core | packages/core | Shared domain logic | platform | lint, typecheck, test | Ordering |
131
+ ```
107
132
 
108
- - The extraction results inform but do not replace the interview — the user confirms and supplements.
109
- - If `dt extract detect` reports that no extractable content was found (empty project), skip extraction and proceed directly to the interview (pure greenfield).
133
+ Rules:
134
+
135
+ - A **single-package repository records exactly one row**, for the root, with path `.`. The table has the same shape in both cases, so a reader never has to work out which kind of repository they are looking at.
136
+ - **Purpose** and **Owner** come from the interview. Do not invent an owner; ask.
137
+ - **Canonical scripts** lists the scripts the package actually defines, in the order `lint`, `format:check`, `typecheck`, `test`, `test:unit`, `test:integration`, `test:e2e`, `audit`, `validate`. Absent scripts are omitted, not marked missing.
138
+ - **Bounded context** is filled **freeform at interview time** (`shared-understanding#D-45`). Ask: _"In one phrase, what part of the business or domain does this package own?"_ A freeform guess beats an empty column. Once `docs/domain/ubiquitous-language.md` defines a bounded context, that file is canonical: copy the name from its `## Bounded Context:` heading character for character, because `lint`'s glossary check matches the two exactly (`shared-understanding#D-69`, closing `#D-45`).
139
+ - A package whose `package.json` has no `name` is listed by its path. Do not invent a name — nothing would match it.
140
+
141
+ `dev-tasks doctor` warns when the map and the workspace disagree in either direction: a package on disk with no row, or a row for a package that no longer exists. It warns and never fails; structural failures belong to `lint`.
110
142
 
111
143
  ---
112
144
 
145
+ ### Runbooks
146
+
147
+ Initialization also establishes `docs/runbooks/` (PRD AC-26, S-005 AC-7). Create:
148
+
149
+ - `docs/runbooks/README.md` — the index, with Runbook / Trigger / Owner / Last verified columns.
150
+ - `docs/runbooks/runbook-template.md` — the form to copy for a new procedure.
151
+
152
+ `dev-tasks install` delivers both install-if-absent, so in an installed repository they are already present and **MUST NOT** be overwritten. Create them only when absent, and confirm with the user which procedures are worth a runbook now rather than writing placeholder files.
153
+
154
+ ## SIMPLICITY.md Confirmation
155
+
156
+ `SIMPLICITY.md` ships at the repository root and states the code-simplicity contract, including section D's tool-enforced thresholds. During initialization you **MUST** confirm two things with the user rather than assuming them:
157
+
158
+ 1. **Owner** — who is accountable for the contract. The shipped default is `housekeeping`.
159
+ 2. **Thresholds** — section D's defaults (function length ≤ 40 lines, cyclomatic complexity ≤ 10, cognitive complexity ≤ 15, nesting depth ≤ 3, parameters ≤ 4, file length ≤ 400 lines). A repository **MAY** tighten a default; it **MUST NOT** loosen one.
160
+
161
+ Ask: _"SIMPLICITY.md's owner is `housekeeping` and its thresholds are the shipped defaults. Keep both, or tighten anything?"_ Record the answer in the file's frontmatter and in the section D table. Wiring the thresholds into a linter is a separate procedure — see `docs/runbooks/runbook-setup-simplicity-tooling.md`.
162
+
113
163
  ## Part 1 — Product Context
114
164
 
115
165
  ### Clarifying Questions
116
166
 
117
- Adapt questions based on context provided (and based on mode — in multi-repo mode, the bundle already provides some answers):
167
+ Adapt questions based on context already gathered (e.g., from codebase investigation in greenfield mode):
118
168
 
119
169
  - **Product Definition:** "What is this product/project, and what does it do?"
120
170
  - **Problem Statement:** "What core problem does this product solve?"
@@ -127,7 +177,7 @@ Adapt questions based on context provided (and based on mode — in multi-repo m
127
177
  - **Key Constraints:** "Budget, timeline, technology, or regulatory constraints?"
128
178
  - **Stakeholders:** "Who are the key decision-makers?"
129
179
 
130
- ### Output Structure: `product-context.md`
180
+ ### Output Structure: `docs/product.md`
131
181
 
132
182
  0. **Changelog** — Version history table (see Document Changelog Convention above)
133
183
  1. **Executive Summary** — 2-3 sentence overview
@@ -166,27 +216,28 @@ Adapt questions based on context provided (and based on mode — in multi-repo m
166
216
  - **Package Manager Standard:** "Can we standardize on `pnpm` for JS/TS projects?"
167
217
  - **Script Naming Standard:** "Should canonical `package.json` scripts (`lint`, `format:check`, `typecheck`, `test`, `audit`, `validate`) be enforced?"
168
218
 
169
- ### Output Structure: `technical-guidelines.md`
219
+ ### Output Structure: `docs/tech.md`
170
220
 
171
221
  0. **Changelog** — Version history table (see Document Changelog Convention above)
172
222
  1. **Overview** — Technical vision and guiding principles
173
- 2. **Technology Stack** — Backend/frontend languages, frameworks, databases, key dependencies
174
- 3. **Architecture Patterns** — System architecture, key decisions and rationale, component organization
175
- 4. **API Design Standards** — Style, naming, request/response formats, error handling
176
- 5. **Authentication & Authorization** — Mechanism, model, permission levels, session management
177
- 6. **Security Requirements** — Encryption, OWASP compliance, API key management, PII handling
178
- 7. **Data & Database Guidelines** — Schema patterns, naming conventions, query optimization, backup
179
- 8. **Integration Methods** — External integrations, patterns, retry/failure handling
180
- 9. **Code Organization & Structure** — Folder/file conventions, module boundaries, naming
181
- 10. **Design Patterns & Principles** — Preferred patterns, SOLID, DRY/KISS/YAGNI
182
- 11. **Testing Strategy** — Frameworks, testing pyramid, coverage, mock strategies
183
- 12. **Code Quality & Standards** — Linting, static analysis, reviews, documentation
184
- 13. **Deployment & DevOps** — Environments, CI/CD, infrastructure-as-code, containers
185
- 14. **Monitoring, Logging & Observability** — Levels, frameworks, alerting, error tracking
186
- 15. **Performance & Scalability** — Response targets, throughput, caching, optimization
187
- 16. **Dependency Management** — Management approach, version pinning, vulnerability scanning
188
- 17. **Development Workflow** — Branching strategy, commit conventions, PR process
189
- 18. **Known Constraints & Trade-offs** — Limitations and rationale
223
+ 2. **Package Map** — Repository shape and one row per package (see Repository Shape Detection above)
224
+ 3. **Technology Stack** — Backend/frontend languages, frameworks, databases, key dependencies
225
+ 4. **Architecture Patterns** — System architecture, key decisions and rationale, component organization
226
+ 5. **API Design Standards** — Style, naming, request/response formats, error handling
227
+ 6. **Authentication & Authorization** — Mechanism, model, permission levels, session management
228
+ 7. **Security Requirements** — Encryption, OWASP compliance, API key management, PII handling
229
+ 8. **Data & Database Guidelines** — Schema patterns, naming conventions, query optimization, backup
230
+ 9. **Integration Methods** — External integrations, patterns, retry/failure handling
231
+ 10. **Code Organization & Structure** — Folder/file conventions, module boundaries, naming
232
+ 11. **Design Patterns & Principles** — Preferred patterns, SOLID, DRY/KISS/YAGNI
233
+ 12. **Testing Strategy** — Frameworks, testing pyramid, coverage, mock strategies
234
+ 13. **Code Quality & Standards** — Linting, static analysis, reviews, documentation
235
+ 14. **Deployment & DevOps** — Environments, CI/CD, infrastructure-as-code, containers
236
+ 15. **Monitoring, Logging & Observability** — Levels, frameworks, alerting, error tracking
237
+ 16. **Performance & Scalability** — Response targets, throughput, caching, optimization
238
+ 17. **Dependency Management** — Management approach, version pinning, vulnerability scanning
239
+ 18. **Development Workflow** — Branching strategy, commit conventions, PR process
240
+ 19. **Known Constraints & Trade-offs** — Limitations and rationale
190
241
 
191
242
  ### JS/TS Package Manager and Script Defaults
192
243
 
@@ -208,7 +259,7 @@ When the project includes JavaScript/TypeScript:
208
259
 
209
260
  - **Format:** Markdown (`.md`)
210
261
  - **Location:** `/docs/`
211
- - **Filenames:** `product-context.md`, `technical-guidelines.md`
262
+ - **Filenames:** `product.md`, `tech.md`
212
263
 
213
264
  ## AGENTS.md Sizing
214
265
 
@@ -227,4 +278,3 @@ When generating or updating `AGENTS.md` during project initialization, you **MUS
227
278
  5. You **MUST** save both files and present them for user review.
228
279
  6. You **SHOULD** iterate based on user feedback before finalizing.
229
280
  7. When updating an existing document, you **MUST** add a new row to the Changelog table with an incremented version, the current date, a summary of changes, and the responsible author/agent.
230
- 8. In multi-repo mode, you **MUST NOT** read `/docs` or walk the repository directly — all context passes through `dt init`.
@@ -19,12 +19,14 @@ Clarify the scope, acceptance criteria, and constraints of a feature or issue be
19
19
 
20
20
  This step assumes foundation documents exist:
21
21
 
22
- - `product-context.md` — Understanding the overall product
23
- - `technical-guidelines.md` — Understanding technical constraints and patterns
22
+ - `product.md` — Understanding the overall product
23
+ - `tech.md` — Understanding technical constraints and patterns
24
24
 
25
25
  If the user provides a **GitHub Issue number**, you **MUST** produce a lightweight refinement.
26
26
  If the user provides a **feature description**, you **MUST** produce a full PRD.
27
27
 
28
+ Before drafting either output, this activity invokes the `activity-grill` sub-skill (WHAT phase for PRD Creation mode, Issue Mode for Issue Refinement mode) to walk the design tree to shared understanding, and writes every resolved question to `workstream/decisions-<feature>.md` — see Mode A and Mode B Process below.
29
+
28
30
  ---
29
31
 
30
32
  ## Document Changelog Convention
@@ -61,14 +63,14 @@ Every document produced by this activity **MUST** include a **Changelog** table
61
63
 
62
64
  1. **Receive Issue Reference:** User provides GitHub Issue number and repo.
63
65
  2. **Read Issue:** Delegate to `github-ops` to fetch issue body, comments, labels, and status whenever possible.
64
- 3. **Ask Clarifying Questions:** Focus on missing scope, acceptance criteria, and constraints.
65
- 4. **Refine Scope:** Summarize scope, non-goals, risks, and dependencies.
66
+ 3. **Invoke `activity-grill`:** Before asking any clarifying question, invoke `activity-grill(mode="issue", cap=cap.issue)` (`cap.issue` defaults to 8; read from `docs/tech.md` § Grilling if that subsection exists, else the hardcoded default) (FR-15, AC-09). The candidate questions below seed the interview's question pool — `activity-grill` owns the one-question-at-a-time, resolve-before-ask mechanics, including mandatory reuse of a matching answer from any prior `decisions-<other-feature>.md` (cited in qualified `<other-feature>#D-NN` form, not re-asked) and read-only glossary treatment (no new term proposals) for the duration of this invocation. You **MUST NOT** proceed to scope refinement until `activity-grill` returns the exit gate satisfied.
67
+ 4. **Refine Scope:** Summarize scope, non-goals, risks, and dependencies, citing inline (`… (D-NN)`) every statement a decision shaped.
66
68
  5. **Update GitHub Issue:** Delegate to `github-ops` to add or update a "Refined Scope" section in the issue body.
67
69
  6. **Save Output.**
68
70
 
69
71
  If `github-ops` delegation is unavailable in the current runtime, you **MUST** apply `github-ops` conventions directly and explicitly note that fallback in your status output.
70
72
 
71
- ### Clarifying Questions (ask only what is missing)
73
+ ### Candidate Clarifying Questions (seed the `activity-grill` interview; ask only what is missing)
72
74
 
73
75
  - "What is the exact user-visible behavior change?"
74
76
  - "What is explicitly out of scope?"
@@ -132,11 +134,19 @@ For each criterion, you **SHOULD** use a concise "Given / When / Then" style whe
132
134
  - Edge-case checks:
133
135
  - Acceptance-criteria-to-test mapping:
134
136
 
137
+ ## Decisions
138
+
139
+ | ID | Decision (short form) |
140
+ | ---- | --------------------- |
141
+ | D-NN | … |
142
+
135
143
  ## Open Questions
136
144
 
137
145
  - [Remaining unknowns]
138
146
  ```
139
147
 
148
+ The `## Decisions` table lists every decision ID `activity-grill` produced or reused that shaped this document (FR-14, AC-05) — the same shape this repository's own PRDs and specs already use. A refinement with zero decisions needed still runs the `activity-grill` interview and still requires the explicit exit-gate confirmation; the table may legitimately be empty in that case.
149
+
140
150
  ### Output
141
151
 
142
152
  - **Location:** `/workstream/`
@@ -149,12 +159,12 @@ For each criterion, you **SHOULD** use a concise "Given / When / Then" style whe
149
159
  ### Process
150
160
 
151
161
  1. **Receive Feature Scope:** User describes the features or feature set.
152
- 2. **Ask Clarifying Questions:** Gather detail about requirements, prioritization, and acceptance criteria.
162
+ 2. **Invoke `activity-grill`:** Before asking any clarifying question, invoke `activity-grill(phase="WHAT", cap=cap.what)` (`cap.what` defaults to 25; read from `docs/tech.md` § Grilling if that subsection exists, else the hardcoded default) (FR-12, AC-01). The candidate questions below seed the interview's question pool — `activity-grill` owns the one-question-at-a-time, resolve-before-ask mechanics and the decision-tree summary/cap cadence. You **MUST NOT** produce any PRD section, draft, or outline until `activity-grill` returns the exit gate satisfied.
153
163
  3. **Reference Existing Documents:** Consider product context and technical guidelines.
154
- 4. **Generate PRD.**
164
+ 4. **Generate PRD:** Cite inline (`… (D-NN)`) every requirement, goal, or scope statement a decision shaped.
155
165
  5. **Save Output.**
156
166
 
157
- ### Clarifying Questions
167
+ ### Candidate Clarifying Questions (seed the `activity-grill` interview)
158
168
 
159
169
  - **Feature Title & Scope:** "What is the main feature? What is included?"
160
170
  - **Affected Repositories:** "Which repositories will be affected by this feature? (e.g., `owner/repo-frontend`, `owner/repo-backend`)"
@@ -190,6 +200,53 @@ For each criterion, you **SHOULD** use a concise "Given / When / Then" style whe
190
200
  16. **Constraints & Dependencies** — Timeline, resource, external dependencies
191
201
  17. **Security & Compliance** — Security, privacy, auth requirements
192
202
  18. **Open Questions** — Ambiguities needing clarification
203
+ 19. **Decisions** — Table (`ID | Decision (short form)`) listing every `activity-grill` decision ID consumed by this PRD (FR-14, AC-05); may legitimately be empty for a trivial feature that needed no decisions, but the `activity-grill` interview and exit-gate confirmation still ran
204
+ 20. **Vocabulary** — `## Vocabulary` table listing every domain term the PRD uses and where each one stands against the glossary: `existing`, `proposed`, or settled by a decision (FR-20, AC-07). See "Vocabulary Section" below
205
+
206
+ ### Vocabulary Section (FR-20, AC-07)
207
+
208
+ Every PRD carries a `## Vocabulary` section immediately after `## Decisions`. It lists the domain terms the PRD uses and where each one stands against `docs/domain/ubiquitous-language.md`, the repository's canonical vocabulary:
209
+
210
+ ```markdown
211
+ ## Vocabulary
212
+
213
+ | Term | Status in glossary | Bounded context | Definition (proposals only) | Forbidden synonyms (proposals only) |
214
+ | ---- | --------------------------------------- | --------------- | --------------------------- | ----------------------------------- |
215
+ | … | existing \| proposed \| conflict → D-NN | … | … | … |
216
+ ```
217
+
218
+ A row is complete when one of these holds:
219
+
220
+ - `existing` — the glossary already defines the term (matched case-insensitively). The proposal columns stay empty.
221
+ - `proposed` — the row carries a bounded context, a definition, and forbidden synonyms. `none` is an answer for forbidden synonyms; an empty cell is not. A `proposed` row for a term the glossary already defines is **incomplete** — use `existing`.
222
+ - `conflict → D-NN` — a recorded decision settled a clash between this term and one already in the glossary. `->` and `→` are both accepted, and the ID may be qualified (`<feature>#D-NN`).
223
+
224
+ A PRD that genuinely introduces no domain concept carries the section with exactly one line, which is complete on its own:
225
+
226
+ ```markdown
227
+ ## Vocabulary
228
+
229
+ None — this PRD introduces no domain concepts.
230
+ ```
231
+
232
+ Terms are identified during grilling, from what the user actually said. You **MUST NOT** derive them by scanning the PRD's prose for likely-looking nouns (D-65) — a list assembled that way is a list nobody can act on.
233
+
234
+ ### Approval Append (FR-20, specification §8.4)
235
+
236
+ The glossary grows when the user approves the PRD — **never when the PRD is drafted**. A term recorded at draft time is a term nobody agreed to.
237
+
238
+ When the user approves a PRD, for each `proposed` row you **MUST**:
239
+
240
+ 1. Resolve the row's bounded context against the `docs/tech.md` package map (FR-63). If it matches no package name and no `Bounded context` value, you **MUST NOT** create the heading — refuse the append for that row and report the unresolved context to the user. An unresolvable heading fails `lint` for everyone who comes after.
241
+ 2. Append a `### <Term>` entry under the matching `## Bounded Context:` heading in `docs/domain/ubiquitous-language.md`, creating that heading only when the context resolved. The entry carries all five fields: `Definition` and `Forbidden synonyms` from the row, `Invariants` (`none` when there are none), `Origin` to the PRD's path, and `Status: active`.
242
+ 3. Add one changelog row naming every term this approval added, in `+term` form (`+decision log, +exit gate`), and bump the frontmatter `version`.
243
+ 4. On the first append, flip the frontmatter `status` from `unfilled` to `active`. `unfilled` means "no vocabulary established yet", never permission to invent one.
244
+
245
+ A `conflict → D-NN` row whose decision superseded a term already in the glossary rewrites that term's `Status` to `superseded by <New Term> (<feature#D-NN>)`. The old entry **MUST** stay — terms are superseded, never deleted (FR-19).
246
+
247
+ Running the append again over an already-approved PRD **MUST** be a no-op: its rows now read `existing`, and neither the entry nor the changelog row is duplicated.
248
+
249
+ This append is `activity-refine`'s write and nobody else's. `activity-grill` surfaces vocabulary conflicts as questions and writes only the decision log (D-61).
193
250
 
194
251
  ### Diagram Guidelines
195
252
 
@@ -228,10 +285,13 @@ Rules:
228
285
 
229
286
  1. You **MUST NOT** start implementing anything.
230
287
  2. You **MUST** detect the mode based on user input (issue number vs. feature description).
231
- 3. You **MUST** ask clarifying questions to fill gaps.
232
- 4. You **MUST** present the document for user review.
233
- 5. You **SHOULD** iterate based on feedback.
234
- 6. You **MUST** save the finalized document.
235
- 7. In Issue Refinement mode, you **MUST** update the GitHub Issue with a "Refined Scope" section by delegating to `github-ops` whenever possible.
236
- 8. When updating an existing document, you **MUST** add a new row to the Changelog table with an incremented version, the current date, a summary of changes, and the responsible author/agent.
237
- 9. After producing the document, if the feature includes UI/UX scope (detected by keywords: UI, screen, page, form, modal, dialog, navigation, layout, component, responsive, accessibility), you **SHOULD** add the following recommendation to the user: "This feature has UI scope. **Recommended:** use `ux-engineer` (lite mode) to generate screen sketches before proceeding to spec/stories."
288
+ 3. You **MUST** ask clarifying questions to fill gaps, conducted through `activity-grill` (WHAT phase for PRD Creation mode, Issue Mode for Issue Refinement mode) — you **MUST NOT** draft any part of the document until `activity-grill`'s exit gate returns satisfied (FR-12, FR-15).
289
+ 4. Before presenting the PRD for review, you **MUST** run `checkVocabularySection()` from `core/checks/glossary.ts` over the drafted document and the repository's glossary, and **MUST** report every finding to the user by its rule name: `vocabulary-missing` when the `## Vocabulary` section is absent, `vocabulary-incomplete` naming the row that accounts for no term (AC-07, D-65). The same check runs under `lint` over `docs/requirements/`, so a finding left unfixed here becomes a failing gate later.
290
+ 5. You **MUST** present the document for user review.
291
+ 6. You **SHOULD** iterate based on feedback.
292
+ 7. You **MUST** save the finalized document.
293
+ 8. In Issue Refinement mode, you **MUST** update the GitHub Issue with a "Refined Scope" section by delegating to `github-ops` whenever possible.
294
+ 9. When updating an existing document, you **MUST** add a new row to the Changelog table with an incremented version, the current date, a summary of changes, and the responsible author/agent.
295
+ 10. After producing the document, if the feature includes UI/UX scope (detected by keywords: UI, screen, page, form, modal, dialog, navigation, layout, component, responsive, accessibility), you **SHOULD** add the following recommendation to the user: "This feature has UI scope. **Recommended:** use `ux-engineer` (lite mode) to generate screen sketches before proceeding to spec/stories."
296
+ 11. You **MUST** cite every decision that shaped a requirement or scope statement inline (`… (D-NN)`), and **MUST** populate the document's `## Decisions` section with every ID consumed from the `activity-grill` session, in qualified `<feature>#D-NN` form when reusing a decision from another feature's log (FR-14, AC-05).
297
+ 12. On user approval of a PRD, you **MUST** perform the Approval Append into `docs/domain/ubiquitous-language.md` for every `proposed` Vocabulary row, exactly as "Approval Append" above describes — and **MUST NOT** perform it when the PRD is merely drafted or revised (FR-20, D-61).
@@ -86,6 +86,31 @@ Non-JS packages are **not** held to these names. Record their equivalent command
86
86
 
87
87
  Report per package: reached, or missed with the gate that fails to reach it.
88
88
 
89
+ ### Per-package procedure (monorepo)
90
+
91
+ The checklist above is per package, not per repository. Run it once for
92
+ each package, from the same list the package map in `docs/tech.md`
93
+ records:
94
+
95
+ 1. Enumerate packages from the package map. Where it is absent or stale,
96
+ fall back to the workspace signals themselves.
97
+ 2. For each package, record the test command it actually defines and
98
+ whether the aggregate root command reaches it.
99
+ 3. **A package with no test script is a finding, not a pass.** Record it
100
+ as `no test script` — distinct from `unreachable`, because the fix
101
+ differs: one needs a script, the other needs wiring.
102
+ 4. Report one row per package:
103
+
104
+ | Package | Test command | Reached by root `test` | Finding |
105
+ | ----------- | ------------ | ---------------------- | ------------------------------ |
106
+ | `@acme/api` | `vitest run` | yes | — |
107
+ | `@acme/web` | `vitest run` | **no** | unreachable from the aggregate |
108
+ | `@acme/cli` | — | n/a | no test script |
109
+
110
+ This is an extension of the single-package procedure, not a parallel
111
+ monorepo path. A single-package repository produces the same table with
112
+ one row.
113
+
89
114
  ### Worked example
90
115
 
91
116
  A monorepo defines `test:node` as `app && scraper && db` while the `api` package holds the largest suite. Every script name is canonical. The CI job and the deploy quality gate both run the aggregate.
@@ -0,0 +1,150 @@
1
+ # AWS Operations (aws-ops)
2
+
3
+ Per-surface mechanism skill for `infra-engineer`. It supplies the AWS CLI command sets, resource tiers, cost inputs, backup and revert sources, and the AWS log table. It does not restate the agent's working loop, approval, revert, or backup rules — those live in the agent body. AWS has no native plan, so this skill provides the synthesized plan inputs: discovery commands, the delta, and the exact forward and revert commands per change kind.
4
+
5
+ ---
6
+
7
+ > **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).
8
+
9
+ ## Tool declaration
10
+
11
+ | Field | Value |
12
+ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | `name` | `aws` |
14
+ | `probe` | `aws --version` (expects `aws-cli/2.x`) |
15
+ | `floor` | AWS CLI `2.15` minimum; major `2.x` REQUIRED. A `1.x` install is `below-floor`. |
16
+ | `auth_probe` | `aws sts get-caller-identity --output json` |
17
+ | `remediation` | "Install AWS CLI v2 (`2.15`+) from the AWS docs and run `aws configure` or set a named profile; this skill never auto-installs and offers no v1 fallback." |
18
+
19
+ Any non-`ok` tool-check result blocks the phase with the remediation string. All parseable output uses `--output json`. Identity is asserted by comparing `Account` from `sts get-caller-identity` with the target environment's `aws.account_id`; a mismatch is `wrong-identity` and blocks.
20
+
21
+ ## Resource tiers
22
+
23
+ | Tier | AWS resources |
24
+ | --------------- | --------------------------------------------------------------------------------------------------------------- |
25
+ | **foundation** | VPC, subnets, route tables, internet/NAT gateways, ECS cluster, ECR registry, IAM roles/trust, KMS keys |
26
+ | **application** | ECS service, task definition, target group, security group, Secrets Manager secret, ACM certificate, DNS record |
27
+
28
+ Foundation resources are **discovery-only**: this skill provides no apply commands for them. A foundation change is routed to the environment's `tier0_tool` (cdk, terraform, cloudformation) with `status: routed-to-<tool>`; the agent never writes foundation resources directly.
29
+
30
+ ## Command sets per change kind
31
+
32
+ Every command references secrets by ARN or name, never by value. Forward and revert are paired so `rollback.sh` can be generated.
33
+
34
+ ### Discover (read-only)
35
+
36
+ ```sh
37
+ aws sts get-caller-identity --output json
38
+ aws ecs list-clusters --output json
39
+ aws ecs list-services --cluster "$CLUSTER" --output json
40
+ aws ecs describe-services --cluster "$CLUSTER" --services "$SVC" --output json
41
+ aws ecr describe-repositories --output json
42
+ aws elbv2 describe-target-groups --output json
43
+ aws elbv2 describe-target-health --target-group-arn "$TG_ARN" --output json
44
+ aws iam list-attached-role-policies --role-name "$ROLE" --output json
45
+ aws secretsmanager list-secrets --output json
46
+ aws acm list-certificates --output json
47
+ ```
48
+
49
+ ### Build and push image (ECR)
50
+
51
+ - Forward:
52
+ ```sh
53
+ aws ecr get-login-password --region "$REGION" | docker login --username AWS --password-stdin "$ACCOUNT.dkr.ecr.$REGION.amazonaws.com"
54
+ docker build -t "$REPO:$TAG" .
55
+ docker push "$ACCOUNT.dkr.ecr.$REGION.amazonaws.com/$REPO:$TAG"
56
+ ```
57
+ - Revert: redeploy the previous image tag (see ECS below); images are immutable, so no delete is required for revert.
58
+
59
+ ### Create and update ECS service and task definition
60
+
61
+ - Forward:
62
+ ```sh
63
+ aws ecs register-task-definition --cli-input-json file://taskdef.json --output json
64
+ aws ecs update-service --cluster "$CLUSTER" --service "$SVC" --task-definition "$FAMILY:$REV" --output json
65
+ ```
66
+ - Verify: `aws ecs describe-services --cluster "$CLUSTER" --services "$SVC" --query 'services[0].deployments' --output json` shows the new revision `PRIMARY` and `runningCount == desiredCount`.
67
+ - Revert: `aws ecs update-service --cluster "$CLUSTER" --service "$SVC" --task-definition "$FAMILY:$PREV_REV"` using the **previous task definition revision** recorded before the change.
68
+
69
+ ### IAM policy create and attach
70
+
71
+ - Forward:
72
+ ```sh
73
+ aws iam create-policy --policy-name "$NAME" --policy-document file://policy.json --output json
74
+ aws iam attach-role-policy --role-name "$ROLE" --policy-arn "$POLICY_ARN"
75
+ ```
76
+ - Verify: `aws iam list-attached-role-policies --role-name "$ROLE"` includes the ARN.
77
+ - Revert (reverse order): `aws iam detach-role-policy --role-name "$ROLE" --policy-arn "$POLICY_ARN"` then `aws iam delete-policy --policy-arn "$POLICY_ARN"`.
78
+
79
+ ### Secrets Manager (reference by ARN)
80
+
81
+ - Forward: `aws secretsmanager create-secret --name "$NAME" --secret-string file://value.json` or `put-secret-value`. Consumers reference the secret by its ARN in task definitions; the value is never read into a shell variable that is later echoed.
82
+ - Revert: `aws secretsmanager delete-secret --secret-id "$ARN" --recovery-window-in-days 7` (recoverable) or restore the prior version by `put-secret-value` from the source of truth, never from a transcript.
83
+
84
+ ### ACM certificate request and DNS validation
85
+
86
+ - Forward:
87
+ ```sh
88
+ aws acm request-certificate --domain-name "$FQDN" --validation-method DNS --output json
89
+ aws acm describe-certificate --certificate-arn "$CERT_ARN" --query 'Certificate.DomainValidationOptions' --output json
90
+ ```
91
+ DNS validation records are added through the Cloudflare DNS step in the agent body.
92
+ - Revert: `aws acm delete-certificate --certificate-arn "$CERT_ARN"` once no listener references it.
93
+
94
+ ### ALB target health and CloudWatch retention
95
+
96
+ ```sh
97
+ aws elbv2 describe-target-health --target-group-arn "$TG_ARN" --output json
98
+ aws logs put-retention-policy --log-group-name "$LG" --retention-in-days 30
99
+ ```
100
+
101
+ ## Cost estimation
102
+
103
+ `plan.md` lists each resource with a monthly estimate and its source (the AWS pricing page URL or a `aws pricing get-products` call). The always-relevant cost list is stated on every AWS plan even when zero:
104
+
105
+ - **NAT gateway** — hourly + per-GB processing.
106
+ - **Application Load Balancer** — hourly + LCU.
107
+ - **RDS instance** — instance-hours + storage + backups.
108
+ - **EC2 / Fargate capacity** — vCPU and memory hours.
109
+ - **Interface VPC endpoints** — hourly per AZ + per-GB.
110
+
111
+ Any resource at or above the environment cost threshold is marked `APPROVAL REQUIRED` and approved by name.
112
+
113
+ ## Backup commands and revert sources
114
+
115
+ | Change kind | Backup command (production, touches state) | Revert source |
116
+ | ---------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------- |
117
+ | RDS schema/data | `aws rds create-db-snapshot --db-instance-identifier "$DB" --db-snapshot-identifier "$SNAP"` | Restore snapshot to a new instance |
118
+ | S3 object change | Confirm versioning: `aws s3api get-bucket-versioning --bucket "$B"`; require `Enabled` before overwrite | Previous object version id |
119
+ | ECS deploy | Record current task definition revision | **Previous task definition revision** |
120
+ | Image deploy | Record current image tag | **Previous image tag** |
121
+
122
+ A production step with `touches state: yes` records the backup id and restore command in `result.md` before it applies.
123
+
124
+ ## AWS log table
125
+
126
+ Every query is time-bounded and its output passes through the redaction pattern set before it reaches a transcript or file.
127
+
128
+ | Source | Command |
129
+ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
130
+ | CloudWatch Logs | `aws logs tail "$LG" --since "$START" --format short` |
131
+ | ECS task failure | `aws ecs describe-tasks --cluster "$CLUSTER" --tasks "$TASK" --query 'tasks[0].stoppedReason'` |
132
+ | ALB access logs | Query the S3 access-log prefix for the bounded window |
133
+ | Logs Insights | `aws logs start-query --log-group-name "$LG" --start-time "$S" --end-time "$E" --query-string ...` with a **bounded window** and stated scan scope before the billed query |
134
+ | VPC Flow Logs | Filtered by ENI and the bounded window |
135
+ | CloudTrail | `aws cloudtrail lookup-events --start-time "$S" --end-time "$E" --lookup-attributes ...` |
136
+ | GitHub Actions | `gh run view "$RUN" --log-failed` |
137
+
138
+ ## Cost sweep categories (read-only)
139
+
140
+ - Unassociated Elastic IPs (`eip` addresses with no association).
141
+ - Available (unattached) EBS volumes.
142
+ - Stale EBS snapshots past a retention age.
143
+ - Idle NAT gateways with negligible processed bytes.
144
+ - Load balancers with no healthy targets.
145
+ - Zero-scaled ECS services still holding a load balancer.
146
+ - Resources whose `ExpiresAt` tag is in the past.
147
+ - Untagged resources missing environment/owner/ChangeId tags.
148
+ - CloudWatch log groups without a retention policy.
149
+
150
+ Sweep findings are reported, never remediated automatically.