@llipe.com/dev-tasks 0.6.7 → 0.7.4

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 (352) hide show
  1. package/.claude/agents/developer.md +2 -0
  2. package/.claude/commands/developer.md +2 -0
  3. package/.claude/commands/planner.md +2 -0
  4. package/.claude/commands/product-engineer.md +13 -7
  5. package/.claude/skills/activity-init/SKILL.md +81 -8
  6. package/.github/agents/developer.agent.md +2 -0
  7. package/.github/agents/planner.agent.md +2 -0
  8. package/.github/agents/product-engineer.agent.md +13 -7
  9. package/.github/prompts/product-engineer-init.prompt.md +7 -1
  10. package/.github/skills/activity-init/SKILL.md +81 -8
  11. package/.kiro/agents/developer.md +2 -0
  12. package/.kiro/agents/planner.md +2 -0
  13. package/.kiro/agents/product-engineer.md +13 -7
  14. package/.kiro/skills/activity-init/SKILL.md +81 -8
  15. package/AGENTS.md +96 -1
  16. package/CHANGELOG.md +98 -0
  17. package/README.md +39 -7
  18. package/dist/adapters/cli/catalog-build.d.ts +30 -0
  19. package/dist/adapters/cli/catalog-build.d.ts.map +1 -0
  20. package/dist/adapters/cli/catalog-build.js +73 -0
  21. package/dist/adapters/cli/catalog-build.js.map +1 -0
  22. package/dist/adapters/cli/catalog-query.d.ts +13 -0
  23. package/dist/adapters/cli/catalog-query.d.ts.map +1 -0
  24. package/dist/adapters/cli/catalog-query.js +329 -0
  25. package/dist/adapters/cli/catalog-query.js.map +1 -0
  26. package/dist/adapters/cli/catalog-scaffold.d.ts +24 -0
  27. package/dist/adapters/cli/catalog-scaffold.d.ts.map +1 -0
  28. package/dist/adapters/cli/catalog-scaffold.js +46 -0
  29. package/dist/adapters/cli/catalog-scaffold.js.map +1 -0
  30. package/dist/adapters/cli/catalog-validate.d.ts +35 -0
  31. package/dist/adapters/cli/catalog-validate.d.ts.map +1 -0
  32. package/dist/adapters/cli/catalog-validate.js +122 -0
  33. package/dist/adapters/cli/catalog-validate.js.map +1 -0
  34. package/dist/adapters/cli/ctx-assemble.d.ts +19 -0
  35. package/dist/adapters/cli/ctx-assemble.d.ts.map +1 -0
  36. package/dist/adapters/cli/ctx-assemble.js +293 -0
  37. package/dist/adapters/cli/ctx-assemble.js.map +1 -0
  38. package/dist/adapters/cli/ctx-fetch.d.ts +49 -0
  39. package/dist/adapters/cli/ctx-fetch.d.ts.map +1 -0
  40. package/dist/adapters/cli/ctx-fetch.js +267 -0
  41. package/dist/adapters/cli/ctx-fetch.js.map +1 -0
  42. package/dist/adapters/cli/extract-all.d.ts +2 -2
  43. package/dist/adapters/cli/extract-all.d.ts.map +1 -1
  44. package/dist/adapters/cli/extract-all.js.map +1 -1
  45. package/dist/adapters/cli/extract-component.d.ts +2 -2
  46. package/dist/adapters/cli/extract-component.d.ts.map +1 -1
  47. package/dist/adapters/cli/extract-component.js.map +1 -1
  48. package/dist/adapters/cli/init.d.ts +37 -0
  49. package/dist/adapters/cli/init.d.ts.map +1 -0
  50. package/dist/adapters/cli/init.js +336 -0
  51. package/dist/adapters/cli/init.js.map +1 -0
  52. package/dist/adapters/cli/scope-gate.d.ts +25 -0
  53. package/dist/adapters/cli/scope-gate.d.ts.map +1 -0
  54. package/dist/adapters/cli/scope-gate.js +157 -0
  55. package/dist/adapters/cli/scope-gate.js.map +1 -0
  56. package/dist/adapters/cli/scope.d.ts +26 -0
  57. package/dist/adapters/cli/scope.d.ts.map +1 -0
  58. package/dist/adapters/cli/scope.js +172 -0
  59. package/dist/adapters/cli/scope.js.map +1 -0
  60. package/dist/adapters/cli/validate-component.d.ts +24 -0
  61. package/dist/adapters/cli/validate-component.d.ts.map +1 -0
  62. package/dist/adapters/cli/validate-component.js +62 -0
  63. package/dist/adapters/cli/validate-component.js.map +1 -0
  64. package/dist/adapters/cli/verify-contract-diff.d.ts +21 -0
  65. package/dist/adapters/cli/verify-contract-diff.d.ts.map +1 -0
  66. package/dist/adapters/cli/verify-contract-diff.js +69 -0
  67. package/dist/adapters/cli/verify-contract-diff.js.map +1 -0
  68. package/dist/adapters/cli/verify-drift.d.ts +24 -0
  69. package/dist/adapters/cli/verify-drift.d.ts.map +1 -0
  70. package/dist/adapters/cli/verify-drift.js +103 -0
  71. package/dist/adapters/cli/verify-drift.js.map +1 -0
  72. package/dist/adapters/cli/verify-impact.d.ts +23 -0
  73. package/dist/adapters/cli/verify-impact.d.ts.map +1 -0
  74. package/dist/adapters/cli/verify-impact.js +119 -0
  75. package/dist/adapters/cli/verify-impact.js.map +1 -0
  76. package/dist/bin/dev-tasks.d.ts +1 -1
  77. package/dist/bin/dev-tasks.js +28 -6
  78. package/dist/bin/dev-tasks.js.map +1 -1
  79. package/dist/bin/dt.js +488 -0
  80. package/dist/bin/dt.js.map +1 -1
  81. package/dist/core/catalog/build.d.ts +143 -0
  82. package/dist/core/catalog/build.d.ts.map +1 -0
  83. package/dist/core/catalog/build.js +475 -0
  84. package/dist/core/catalog/build.js.map +1 -0
  85. package/dist/core/catalog/checks/index.d.ts +18 -0
  86. package/dist/core/catalog/checks/index.d.ts.map +1 -0
  87. package/dist/core/catalog/checks/index.js +18 -0
  88. package/dist/core/catalog/checks/index.js.map +1 -0
  89. package/dist/core/catalog/checks/v01-schema.d.ts +17 -0
  90. package/dist/core/catalog/checks/v01-schema.d.ts.map +1 -0
  91. package/dist/core/catalog/checks/v01-schema.js +57 -0
  92. package/dist/core/catalog/checks/v01-schema.js.map +1 -0
  93. package/dist/core/catalog/checks/v02-v03-identity.d.ts +14 -0
  94. package/dist/core/catalog/checks/v02-v03-identity.d.ts.map +1 -0
  95. package/dist/core/catalog/checks/v02-v03-identity.js +60 -0
  96. package/dist/core/catalog/checks/v02-v03-identity.js.map +1 -0
  97. package/dist/core/catalog/checks/v04-referential-integrity.d.ts +7 -0
  98. package/dist/core/catalog/checks/v04-referential-integrity.d.ts.map +1 -0
  99. package/dist/core/catalog/checks/v04-referential-integrity.js +32 -0
  100. package/dist/core/catalog/checks/v04-referential-integrity.js.map +1 -0
  101. package/dist/core/catalog/checks/v05-domain-existence.d.ts +6 -0
  102. package/dist/core/catalog/checks/v05-domain-existence.d.ts.map +1 -0
  103. package/dist/core/catalog/checks/v05-domain-existence.js +23 -0
  104. package/dist/core/catalog/checks/v05-domain-existence.js.map +1 -0
  105. package/dist/core/catalog/checks/v06-v07-paths.d.ts +29 -0
  106. package/dist/core/catalog/checks/v06-v07-paths.d.ts.map +1 -0
  107. package/dist/core/catalog/checks/v06-v07-paths.js +107 -0
  108. package/dist/core/catalog/checks/v06-v07-paths.js.map +1 -0
  109. package/dist/core/catalog/checks/v08-v10-contracts.d.ts +13 -0
  110. package/dist/core/catalog/checks/v08-v10-contracts.d.ts.map +1 -0
  111. package/dist/core/catalog/checks/v08-v10-contracts.js +70 -0
  112. package/dist/core/catalog/checks/v08-v10-contracts.js.map +1 -0
  113. package/dist/core/catalog/checks/v11-manual-fields.d.ts +16 -0
  114. package/dist/core/catalog/checks/v11-manual-fields.d.ts.map +1 -0
  115. package/dist/core/catalog/checks/v11-manual-fields.js +60 -0
  116. package/dist/core/catalog/checks/v11-manual-fields.js.map +1 -0
  117. package/dist/core/catalog/checks/v12-cycles.d.ts +8 -0
  118. package/dist/core/catalog/checks/v12-cycles.d.ts.map +1 -0
  119. package/dist/core/catalog/checks/v12-cycles.js +28 -0
  120. package/dist/core/catalog/checks/v12-cycles.js.map +1 -0
  121. package/dist/core/catalog/checks/v13-orphan-contracts.d.ts +7 -0
  122. package/dist/core/catalog/checks/v13-orphan-contracts.d.ts.map +1 -0
  123. package/dist/core/catalog/checks/v13-orphan-contracts.js +33 -0
  124. package/dist/core/catalog/checks/v13-orphan-contracts.js.map +1 -0
  125. package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts +8 -0
  126. package/dist/core/catalog/checks/v14-v15-lifecycle.d.ts.map +1 -0
  127. package/dist/core/catalog/checks/v14-v15-lifecycle.js +42 -0
  128. package/dist/core/catalog/checks/v14-v15-lifecycle.js.map +1 -0
  129. package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts +7 -0
  130. package/dist/core/catalog/checks/v16-deprecated-consumers.d.ts.map +1 -0
  131. package/dist/core/catalog/checks/v16-deprecated-consumers.js +47 -0
  132. package/dist/core/catalog/checks/v16-deprecated-consumers.js.map +1 -0
  133. package/dist/core/catalog/checks/v17-low-confidence.d.ts +7 -0
  134. package/dist/core/catalog/checks/v17-low-confidence.d.ts.map +1 -0
  135. package/dist/core/catalog/checks/v17-low-confidence.js +32 -0
  136. package/dist/core/catalog/checks/v17-low-confidence.js.map +1 -0
  137. package/dist/core/catalog/checks/v18-low-payload.d.ts +7 -0
  138. package/dist/core/catalog/checks/v18-low-payload.d.ts.map +1 -0
  139. package/dist/core/catalog/checks/v18-low-payload.js +33 -0
  140. package/dist/core/catalog/checks/v18-low-payload.js.map +1 -0
  141. package/dist/core/catalog/checks/v19-domain-membership.d.ts +8 -0
  142. package/dist/core/catalog/checks/v19-domain-membership.d.ts.map +1 -0
  143. package/dist/core/catalog/checks/v19-domain-membership.js +55 -0
  144. package/dist/core/catalog/checks/v19-domain-membership.js.map +1 -0
  145. package/dist/core/catalog/coverage.d.ts +39 -0
  146. package/dist/core/catalog/coverage.d.ts.map +1 -0
  147. package/dist/core/catalog/coverage.js +62 -0
  148. package/dist/core/catalog/coverage.js.map +1 -0
  149. package/dist/core/catalog/graph.d.ts +49 -0
  150. package/dist/core/catalog/graph.d.ts.map +1 -0
  151. package/dist/core/catalog/graph.js +114 -0
  152. package/dist/core/catalog/graph.js.map +1 -0
  153. package/dist/core/catalog/index-model.d.ts +96 -0
  154. package/dist/core/catalog/index-model.d.ts.map +1 -0
  155. package/dist/core/catalog/index-model.js +8 -0
  156. package/dist/core/catalog/index-model.js.map +1 -0
  157. package/dist/core/catalog/queries.d.ts +69 -0
  158. package/dist/core/catalog/queries.d.ts.map +1 -0
  159. package/dist/core/catalog/queries.js +165 -0
  160. package/dist/core/catalog/queries.js.map +1 -0
  161. package/dist/core/catalog/resolve.d.ts +47 -0
  162. package/dist/core/catalog/resolve.d.ts.map +1 -0
  163. package/dist/core/catalog/resolve.js +318 -0
  164. package/dist/core/catalog/resolve.js.map +1 -0
  165. package/dist/core/catalog/scaffold.d.ts +31 -0
  166. package/dist/core/catalog/scaffold.d.ts.map +1 -0
  167. package/dist/core/catalog/scaffold.js +141 -0
  168. package/dist/core/catalog/scaffold.js.map +1 -0
  169. package/dist/core/catalog/validate-component.d.ts +50 -0
  170. package/dist/core/catalog/validate-component.d.ts.map +1 -0
  171. package/dist/core/catalog/validate-component.js +105 -0
  172. package/dist/core/catalog/validate-component.js.map +1 -0
  173. package/dist/core/catalog/validate.d.ts +71 -0
  174. package/dist/core/catalog/validate.d.ts.map +1 -0
  175. package/dist/core/catalog/validate.js +103 -0
  176. package/dist/core/catalog/validate.js.map +1 -0
  177. package/dist/core/context/assemble.d.ts +126 -0
  178. package/dist/core/context/assemble.d.ts.map +1 -0
  179. package/dist/core/context/assemble.js +197 -0
  180. package/dist/core/context/assemble.js.map +1 -0
  181. package/dist/core/context/cache.d.ts +60 -0
  182. package/dist/core/context/cache.d.ts.map +1 -0
  183. package/dist/core/context/cache.js +236 -0
  184. package/dist/core/context/cache.js.map +1 -0
  185. package/dist/core/context/exit-codes.d.ts +28 -0
  186. package/dist/core/context/exit-codes.d.ts.map +1 -0
  187. package/dist/core/context/exit-codes.js +28 -0
  188. package/dist/core/context/exit-codes.js.map +1 -0
  189. package/dist/core/context/fetch.d.ts +55 -0
  190. package/dist/core/context/fetch.d.ts.map +1 -0
  191. package/dist/core/context/fetch.js +112 -0
  192. package/dist/core/context/fetch.js.map +1 -0
  193. package/dist/core/context/index.d.ts +7 -1
  194. package/dist/core/context/index.d.ts.map +1 -1
  195. package/dist/core/context/index.js +7 -1
  196. package/dist/core/context/index.js.map +1 -1
  197. package/dist/core/context/init.d.ts +179 -0
  198. package/dist/core/context/init.d.ts.map +1 -0
  199. package/dist/core/context/init.js +532 -0
  200. package/dist/core/context/init.js.map +1 -0
  201. package/dist/core/context/layers/architecture-layer.d.ts +13 -0
  202. package/dist/core/context/layers/architecture-layer.d.ts.map +1 -0
  203. package/dist/core/context/layers/architecture-layer.js +24 -0
  204. package/dist/core/context/layers/architecture-layer.js.map +1 -0
  205. package/dist/core/context/layers/contracts-layer.d.ts +13 -0
  206. package/dist/core/context/layers/contracts-layer.d.ts.map +1 -0
  207. package/dist/core/context/layers/contracts-layer.js +83 -0
  208. package/dist/core/context/layers/contracts-layer.js.map +1 -0
  209. package/dist/core/context/layers/conventions-delta-layer.d.ts +13 -0
  210. package/dist/core/context/layers/conventions-delta-layer.d.ts.map +1 -0
  211. package/dist/core/context/layers/conventions-delta-layer.js +37 -0
  212. package/dist/core/context/layers/conventions-delta-layer.js.map +1 -0
  213. package/dist/core/context/layers/flow-layer.d.ts +14 -0
  214. package/dist/core/context/layers/flow-layer.d.ts.map +1 -0
  215. package/dist/core/context/layers/flow-layer.js +61 -0
  216. package/dist/core/context/layers/flow-layer.js.map +1 -0
  217. package/dist/core/context/layers/index-layer.d.ts +13 -0
  218. package/dist/core/context/layers/index-layer.d.ts.map +1 -0
  219. package/dist/core/context/layers/index-layer.js +77 -0
  220. package/dist/core/context/layers/index-layer.js.map +1 -0
  221. package/dist/core/context/layers/primary-layer.d.ts +16 -0
  222. package/dist/core/context/layers/primary-layer.d.ts.map +1 -0
  223. package/dist/core/context/layers/primary-layer.js +61 -0
  224. package/dist/core/context/layers/primary-layer.js.map +1 -0
  225. package/dist/core/context/layers/secondary-layer.d.ts +19 -0
  226. package/dist/core/context/layers/secondary-layer.d.ts.map +1 -0
  227. package/dist/core/context/layers/secondary-layer.js +52 -0
  228. package/dist/core/context/layers/secondary-layer.js.map +1 -0
  229. package/dist/core/context/session-lock.d.ts +114 -0
  230. package/dist/core/context/session-lock.d.ts.map +1 -0
  231. package/dist/core/context/session-lock.js +90 -0
  232. package/dist/core/context/session-lock.js.map +1 -0
  233. package/dist/core/context/tokens.d.ts +35 -0
  234. package/dist/core/context/tokens.d.ts.map +1 -0
  235. package/dist/core/context/tokens.js +88 -0
  236. package/dist/core/context/tokens.js.map +1 -0
  237. package/dist/core/distribution/fetch-package.d.ts +18 -0
  238. package/dist/core/distribution/fetch-package.d.ts.map +1 -0
  239. package/dist/core/distribution/fetch-package.js +42 -0
  240. package/dist/core/distribution/fetch-package.js.map +1 -0
  241. package/dist/core/distribution/index.d.ts +3 -1
  242. package/dist/core/distribution/index.d.ts.map +1 -1
  243. package/dist/core/distribution/index.js +2 -1
  244. package/dist/core/distribution/index.js.map +1 -1
  245. package/dist/core/distribution/install.d.ts +1 -1
  246. package/dist/core/distribution/install.d.ts.map +1 -1
  247. package/dist/core/distribution/install.js +10 -2
  248. package/dist/core/distribution/install.js.map +1 -1
  249. package/dist/core/distribution/pin.d.ts +5 -0
  250. package/dist/core/distribution/pin.d.ts.map +1 -1
  251. package/dist/core/distribution/pin.js +17 -1
  252. package/dist/core/distribution/pin.js.map +1 -1
  253. package/dist/core/distribution/update.d.ts +11 -1
  254. package/dist/core/distribution/update.d.ts.map +1 -1
  255. package/dist/core/distribution/update.js +45 -1
  256. package/dist/core/distribution/update.js.map +1 -1
  257. package/dist/core/exit-codes.d.ts +30 -1
  258. package/dist/core/exit-codes.d.ts.map +1 -1
  259. package/dist/core/exit-codes.js +31 -1
  260. package/dist/core/exit-codes.js.map +1 -1
  261. package/dist/core/extract/component.d.ts +11 -8
  262. package/dist/core/extract/component.d.ts.map +1 -1
  263. package/dist/core/extract/component.js.map +1 -1
  264. package/dist/core/extract/index.d.ts +1 -1
  265. package/dist/core/extract/index.d.ts.map +1 -1
  266. package/dist/core/extract/openapi/route1.d.ts.map +1 -1
  267. package/dist/core/extract/openapi/route1.js +6 -0
  268. package/dist/core/extract/openapi/route1.js.map +1 -1
  269. package/dist/core/extract/providers/node-ts.d.ts.map +1 -1
  270. package/dist/core/extract/providers/node-ts.js +9 -0
  271. package/dist/core/extract/providers/node-ts.js.map +1 -1
  272. package/dist/core/index.d.ts +1 -0
  273. package/dist/core/index.d.ts.map +1 -1
  274. package/dist/core/index.js +1 -0
  275. package/dist/core/index.js.map +1 -1
  276. package/dist/core/providers/index.d.ts +3 -2
  277. package/dist/core/providers/index.d.ts.map +1 -1
  278. package/dist/core/providers/index.js +1 -1
  279. package/dist/core/providers/index.js.map +1 -1
  280. package/dist/core/providers/tracker.d.ts +74 -0
  281. package/dist/core/providers/tracker.d.ts.map +1 -0
  282. package/dist/core/providers/tracker.js +38 -0
  283. package/dist/core/providers/tracker.js.map +1 -0
  284. package/dist/core/scope/calibration.d.ts +25 -0
  285. package/dist/core/scope/calibration.d.ts.map +1 -0
  286. package/dist/core/scope/calibration.js +52 -0
  287. package/dist/core/scope/calibration.js.map +1 -0
  288. package/dist/core/scope/closure.d.ts +31 -0
  289. package/dist/core/scope/closure.d.ts.map +1 -0
  290. package/dist/core/scope/closure.js +68 -0
  291. package/dist/core/scope/closure.js.map +1 -0
  292. package/dist/core/scope/gate.d.ts +41 -0
  293. package/dist/core/scope/gate.d.ts.map +1 -0
  294. package/dist/core/scope/gate.js +165 -0
  295. package/dist/core/scope/gate.js.map +1 -0
  296. package/dist/core/scope/index.d.ts +15 -2
  297. package/dist/core/scope/index.d.ts.map +1 -1
  298. package/dist/core/scope/index.js +11 -1
  299. package/dist/core/scope/index.js.map +1 -1
  300. package/dist/core/scope/partition.d.ts +36 -0
  301. package/dist/core/scope/partition.d.ts.map +1 -0
  302. package/dist/core/scope/partition.js +78 -0
  303. package/dist/core/scope/partition.js.map +1 -0
  304. package/dist/core/scope/prompt.d.ts +39 -0
  305. package/dist/core/scope/prompt.d.ts.map +1 -0
  306. package/dist/core/scope/prompt.js +123 -0
  307. package/dist/core/scope/prompt.js.map +1 -0
  308. package/dist/core/scope/scoping.d.ts +52 -0
  309. package/dist/core/scope/scoping.d.ts.map +1 -0
  310. package/dist/core/scope/scoping.js +99 -0
  311. package/dist/core/scope/scoping.js.map +1 -0
  312. package/dist/core/scope/types.d.ts +77 -0
  313. package/dist/core/scope/types.d.ts.map +1 -0
  314. package/dist/core/scope/types.js +5 -0
  315. package/dist/core/scope/types.js.map +1 -0
  316. package/dist/core/scope/validate.d.ts +47 -0
  317. package/dist/core/scope/validate.d.ts.map +1 -0
  318. package/dist/core/scope/validate.js +90 -0
  319. package/dist/core/scope/validate.js.map +1 -0
  320. package/dist/core/verify/asyncapi-diff.d.ts +34 -0
  321. package/dist/core/verify/asyncapi-diff.d.ts.map +1 -0
  322. package/dist/core/verify/asyncapi-diff.js +209 -0
  323. package/dist/core/verify/asyncapi-diff.js.map +1 -0
  324. package/dist/core/verify/contract-diff.d.ts +39 -0
  325. package/dist/core/verify/contract-diff.d.ts.map +1 -0
  326. package/dist/core/verify/contract-diff.js +63 -0
  327. package/dist/core/verify/contract-diff.js.map +1 -0
  328. package/dist/core/verify/drift.d.ts +47 -0
  329. package/dist/core/verify/drift.d.ts.map +1 -0
  330. package/dist/core/verify/drift.js +122 -0
  331. package/dist/core/verify/drift.js.map +1 -0
  332. package/dist/core/verify/impact.d.ts +22 -0
  333. package/dist/core/verify/impact.d.ts.map +1 -0
  334. package/dist/core/verify/impact.js +93 -0
  335. package/dist/core/verify/impact.js.map +1 -0
  336. package/dist/core/verify/index.d.ts +10 -0
  337. package/dist/core/verify/index.d.ts.map +1 -0
  338. package/dist/core/verify/index.js +9 -0
  339. package/dist/core/verify/index.js.map +1 -0
  340. package/dist/core/verify/openapi-diff.d.ts +29 -0
  341. package/dist/core/verify/openapi-diff.d.ts.map +1 -0
  342. package/dist/core/verify/openapi-diff.js +291 -0
  343. package/dist/core/verify/openapi-diff.js.map +1 -0
  344. package/dist/core/verify/types.d.ts +138 -0
  345. package/dist/core/verify/types.d.ts.map +1 -0
  346. package/dist/core/verify/types.js +5 -0
  347. package/dist/core/verify/types.js.map +1 -0
  348. package/package.json +11 -2
  349. package/schemas/component.schema.json +203 -0
  350. package/schemas/flow.schema.json +75 -0
  351. package/schemas/scope-output.schema.json +62 -0
  352. package/schemas/.gitkeep +0 -0
@@ -84,6 +84,8 @@ If the user provides a feature description or asks to create a PRD/spec/stories
84
84
  17. **Migration safety gate:** For schema/data-model changes, you **MUST** obtain explicit user confirmation before running any migration apply command.
85
85
  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`.
86
86
  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.
87
+ 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.
88
+ 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.
87
89
 
88
90
  ---
89
91
 
@@ -87,6 +87,8 @@ If the user provides a feature description or asks to create a PRD/spec/stories
87
87
  17. **Migration safety gate:** For schema/data-model changes, you **MUST** obtain explicit user confirmation before running any migration apply command.
88
88
  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`.
89
89
  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.
90
+ 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.
91
+ 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.
90
92
 
91
93
  ---
92
94
 
@@ -32,6 +32,8 @@ GitHub Issues and PRs are the source of truth for execution status.
32
32
 
33
33
  You **MUST NOT** write application code for stories. You orchestrate and consolidate.
34
34
  When a delegated story has UI impact and `/DESIGN.md` exists, you **MUST** require DESIGN.md compliance checks in the `developer` handoff payload.
35
+ You **MUST NOT** write to the meta-repo outside the `architecture-change` task type. If an orchestrated story requires meta-repo modifications, 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.
36
+ When orchestrating cross-repo partitioned work (>1 `primary` component), you **MUST** delegate each per-repo sub-task to `developer` scoped exclusively to its assigned repository. Sub-tasks **MUST** be ordered producer-before-consumers. If a boundary contract has `payload_confidence: low`, you **MUST** block the dependent sub-task until the contract is raised to `medium`. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
35
37
 
36
38
  ### Skills
37
39
 
@@ -145,6 +145,8 @@ This agent invokes the following **skills** for each activity. You **MUST** load
145
145
  7. **Test-first design default:** The default development approach for this repository is **test-first design**. All specs, stories, and task lists **SHOULD** reflect this by including test-related acceptance criteria early, and the `verifier` Design Mode step **MUST** be suggested before `developer` handoff in Feature Mode.
146
146
  8. **Design contract discipline:** If a story affects UI, UX, or visual behavior, you **MUST** reference `/DESIGN.md` in the spec/stories and include explicit DESIGN.md impact notes (tokens, components, or prose guidance to add/update).
147
147
  9. **Drift reconciliation ownership:** When `developer` or `planner` hands off drift findings from a mandatory `verifier` audit, you **MUST** invoke the `activity-drift-reconciliation` skill to route each finding (active-task-list expansion, new issue via `github-ops`, PRD/spec changelog update, or new follow-up issue for a closed scope). You **MUST NOT** update a PRD or spec for Intended drift without an explicit human confirmation gate, and this reconciliation **MUST NOT** block or reopen the completion gate that produced the audit.
148
+ 10. **Meta-repo write restriction (RF-64):** You **MUST NOT** write to the meta-repo outside the `architecture-change` task type. If a feature or issue requires modifying meta-repo files (`architecture.md`, `domains.md`, `glossary.md`, `conventions.md`, `catalog/flows/`), you **MUST** create or reference an `architecture-change` task. `catalog/components/*.json` and `catalog/index.yaml` are generated by CI and **MUST** never be modified by any agent or human. See `AGENTS.md` § Task Types for full rules.
149
+ 11. **Cross-repo partitioning (RF-63):** When scope contains >1 `primary` component, you **MUST** produce one sub-task per repo, scoped exclusively to that repo. Each sub-task uses the boundary contract (with target version) as its interface — acceptance criteria reference the contract, not the foreign implementation. Sub-tasks **MUST** be ordered producer-before-consumers. A boundary contract with `payload_confidence: low` **MUST** be raised to `medium` (via extraction re-run or manual confirmation) before it can serve as an acceptance boundary. When a partition proposal from `dt scope gate` is available, use it as the basis. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
148
150
 
149
151
  ---
150
152
 
@@ -154,13 +156,17 @@ This agent invokes the following **skills** for each activity. You **MUST** load
154
156
 
155
157
  Follow the `activity-init` skill:
156
158
 
157
- 1. Receive initial brief from user.
158
- 2. Ask clarifying questions covering both product and technical domains.
159
- 3. Generate `product-context.md` and `technical-guidelines.md` in `/docs/`.
160
- 4. If `/DESIGN.md` is missing and the project has UI scope, create a baseline `/DESIGN.md` aligned with current product direction.
161
- 5. Present generated documents for user review.
162
- 6. Iterate based on feedback.
163
- 7. Save finalized versions.
159
+ 1. **Detect repository mode** (RF-60): check for `component.json` (multi-repo), `/docs` (mono-repo), or neither (undocumented/greenfield). If both exist, multi-repo wins.
160
+ 2. **Route by mode:**
161
+ - **Multi-repo:** Invoke `dt init --task "<description>" --json`. Handle exit codes (0=success, 7=partition proposal stop, 9=stale catalog stop). On success, load bundle in numeric order and present `review_flags` before continuing.
162
+ - **Mono-repo:** Proceed with the standard interview (current flow unchanged).
163
+ - **Undocumented/greenfield:** Run `dt extract detect` → `dt extract all --interactive` → present extraction report → then conduct the interview.
164
+ 3. Ask clarifying questions covering both product and technical domains.
165
+ 4. Generate `product-context.md` and `technical-guidelines.md` in `/docs/`.
166
+ 5. If `/DESIGN.md` is missing and the project has UI scope, create a baseline `/DESIGN.md` aligned with current product direction.
167
+ 6. Present generated documents for user review.
168
+ 7. Iterate based on feedback.
169
+ 8. Save finalized versions.
164
170
 
165
171
  ### Feature Mode
166
172
 
@@ -34,7 +34,56 @@ Every document produced by this activity **MUST** include a **Changelog** table
34
34
  | 1.0 | YYYY-MM-DD | Initial version | @user / agent-name |
35
35
  ```
36
36
 
37
- ## Process
37
+ ---
38
+
39
+ ## Mode Detection (RF-60)
40
+
41
+ Before starting the interview, the skill **MUST** detect the repository mode and route accordingly. The detection logic is:
42
+
43
+ 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`.
44
+ 2. **Mono-repo mode:** no `component.json` at root, but `/docs` directory exists → current single-repo flow (interview + direct docs generation).
45
+ 3. **Undocumented / greenfield mode:** neither `component.json` nor `/docs` → extraction-first flow to bootstrap documentation from code, then interview.
46
+
47
+ > **Precedence:** If both `component.json` AND `/docs` exist, multi-repo mode wins — `component.json` is the authoritative signal.
48
+
49
+ ---
50
+
51
+ ## Mode A — Multi-Repo (RF-61)
52
+
53
+ 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.
54
+
55
+ ### Process
56
+
57
+ 1. **Invoke `dt init --task "<user's task/product description>" --json`**.
58
+ 2. **Handle exit codes:**
59
+
60
+ | Exit Code | Meaning | Action |
61
+ | --------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
+ | `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. |
63
+ | `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. |
64
+ | `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. |
65
+ | `10` | Invalid scope after LLM retry | Inform the user that automatic scoping failed. Suggest running with `--components` for manual scope. **Stop.** |
66
+ | `11` | No candidates found | Inform the user that no components matched the task description. Suggest refining the task text or using `--components`. **Stop.** |
67
+ | `6` | Budget overflow | Inform the user that the scoped context exceeds the token budget. Suggest narrowing scope with `--max-components` or `--budget`. **Stop.** |
68
+
69
+ 3. **On success (exit 0):**
70
+ - Load the assembled bundle files in numeric order (they form the context).
71
+ - 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.
72
+ - Use the bundle content as the basis for the product-context and technical-guidelines interview — the bundle replaces direct `/docs` reading.
73
+
74
+ ### Constraints
75
+
76
+ - The skill **MUST NOT** read `/docs`, walk the repository tree, or inspect source files directly in multi-repo mode.
77
+ - All context comes from the `dt init` bundle output.
78
+ - The skill **MAY** ask follow-up questions to fill gaps not covered by the bundle (e.g., strategic goals, success metrics).
79
+
80
+ ---
81
+
82
+ ## Mode B — Mono-Repo (Current Flow)
83
+
84
+ When no `component.json` is present but `/docs` exists, the skill follows the **existing single-repo flow** unchanged.
85
+
86
+ ### Process
38
87
 
39
88
  1. **Receive Initial Brief:** The user describes the product, project, or technology stack.
40
89
  2. **Ask Clarifying Questions:** Gather information for both product context and technical guidelines in a single interview. Group questions by domain.
@@ -44,11 +93,33 @@ Every document produced by this activity **MUST** include a **Changelog** table
44
93
 
45
94
  ---
46
95
 
96
+ ## Mode C — Undocumented / Greenfield
97
+
98
+ When neither `component.json` nor `/docs` exists, the repository has no established documentation. The skill bootstraps documentation from code extraction before conducting the interview.
99
+
100
+ ### Process
101
+
102
+ 1. **Run detection:** Invoke `dt extract detect` to identify the repository's technology stack, frameworks, and extractable artifacts.
103
+ 2. **Run extraction:** Invoke `dt extract all --interactive` to extract schema, OpenAPI, AsyncAPI, and component manifest from the codebase.
104
+ - The `--interactive` flag allows the user to confirm or skip ambiguous extractions.
105
+ - If interrupted, the skill **SHOULD** inform the user how to resume (`dt extract all --interactive` picks up where it left off).
106
+ 3. **Present extraction report:** Show the user the results of extraction — what was found, confidence levels, any `unresolved` items.
107
+ 4. **Conduct the interview:** Proceed with the standard clarifying questions for product context and technical guidelines (same as Mono-Repo mode).
108
+ 5. **Generate documents:** Create `product-context.md` and `technical-guidelines.md` using the extraction results as pre-filled context combined with interview answers.
109
+ 6. **Save Output:** Save both documents in `/docs/` and present them for user review.
110
+
111
+ ### Constraints
112
+
113
+ - The extraction results inform but do not replace the interview — the user confirms and supplements.
114
+ - If `dt extract detect` reports that no extractable content was found (empty project), skip extraction and proceed directly to the interview (pure greenfield).
115
+
116
+ ---
117
+
47
118
  ## Part 1 — Product Context
48
119
 
49
120
  ### Clarifying Questions
50
121
 
51
- Adapt questions based on context provided:
122
+ Adapt questions based on context provided (and based on mode — in multi-repo mode, the bundle already provides some answers):
52
123
 
53
124
  - **Product Definition:** "What is this product/project, and what does it do?"
54
125
  - **Problem Statement:** "What core problem does this product solve?"
@@ -154,9 +225,11 @@ When generating or updating `AGENTS.md` during project initialization, you **MUS
154
225
 
155
226
  ## Final Instructions
156
227
 
157
- 1. You **MUST NOT** start implementing anything.
158
- 2. You **MUST** ask clarifying questions to fill gaps — cover both product and technical domains.
159
- 3. You **SHOULD** use answers to create both documents in a single pass.
160
- 4. You **MUST** save both files and present them for user review.
161
- 5. You **SHOULD** iterate based on user feedback before finalizing.
162
- 6. 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.
228
+ 1. You **MUST** detect the repository mode before starting (see Mode Detection above).
229
+ 2. You **MUST NOT** start implementing anything.
230
+ 3. You **MUST** ask clarifying questions to fill gaps — cover both product and technical domains.
231
+ 4. You **SHOULD** use answers to create both documents in a single pass.
232
+ 5. You **MUST** save both files and present them for user review.
233
+ 6. You **SHOULD** iterate based on user feedback before finalizing.
234
+ 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.
235
+ 8. In multi-repo mode, you **MUST NOT** read `/docs` or walk the repository directly — all context passes through `dt init`.
@@ -83,6 +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.
86
88
 
87
89
  ---
88
90
 
@@ -22,6 +22,8 @@ GitHub Issues and PRs are the source of truth for execution status.
22
22
 
23
23
  You **MUST NOT** write application code for stories. You orchestrate and consolidate.
24
24
  When a delegated story has UI impact and `/DESIGN.md` exists, you **MUST** require DESIGN.md compliance checks in the `developer` handoff payload.
25
+ You **MUST NOT** write to the meta-repo outside the `architecture-change` task type. If an orchestrated story requires meta-repo modifications, 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.
26
+ When orchestrating cross-repo partitioned work (>1 `primary` component), you **MUST** delegate each per-repo sub-task to `developer` scoped exclusively to its assigned repository. Sub-tasks **MUST** be ordered producer-before-consumers. If a boundary contract has `payload_confidence: low`, you **MUST** block the dependent sub-task until the contract is raised to `medium`. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
25
27
 
26
28
  ### Skills
27
29
 
@@ -144,6 +144,8 @@ This agent invokes the following **skills** for each activity. You **MUST** load
144
144
  7. **Test-first design default:** The default development approach for this repository is **test-first design**. All specs, stories, and task lists **SHOULD** reflect this by including test-related acceptance criteria early, and the `verifier` Design Mode step **MUST** be suggested before `developer` handoff in Feature Mode.
145
145
  8. **Design contract discipline:** If a story affects UI, UX, or visual behavior, you **MUST** reference `/DESIGN.md` in the spec/stories and include explicit DESIGN.md impact notes (tokens, components, or prose guidance to add/update).
146
146
  9. **Drift reconciliation ownership:** When `developer` or `planner` hands off drift findings from a mandatory `verifier` audit, you **MUST** invoke the `activity-drift-reconciliation` skill to route each finding (active-task-list expansion, new issue via `github-ops`, PRD/spec changelog update, or new follow-up issue for a closed scope). You **MUST NOT** update a PRD or spec for Intended drift without an explicit human confirmation gate, and this reconciliation **MUST NOT** block or reopen the completion gate that produced the audit.
147
+ 10. **Meta-repo write restriction (RF-64):** You **MUST NOT** write to the meta-repo outside the `architecture-change` task type. If a feature or issue requires modifying meta-repo files (`architecture.md`, `domains.md`, `glossary.md`, `conventions.md`, `catalog/flows/`), you **MUST** create or reference an `architecture-change` task. `catalog/components/*.json` and `catalog/index.yaml` are generated by CI and **MUST** never be modified by any agent or human. See `AGENTS.md` § Task Types for full rules.
148
+ 11. **Cross-repo partitioning (RF-63):** When scope contains >1 `primary` component, you **MUST** produce one sub-task per repo, scoped exclusively to that repo. Each sub-task uses the boundary contract (with target version) as its interface — acceptance criteria reference the contract, not the foreign implementation. Sub-tasks **MUST** be ordered producer-before-consumers. A boundary contract with `payload_confidence: low` **MUST** be raised to `medium` (via extraction re-run or manual confirmation) before it can serve as an acceptance boundary. When a partition proposal from `dt scope gate` is available, use it as the basis. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
147
149
 
148
150
  ---
149
151
 
@@ -153,13 +155,17 @@ This agent invokes the following **skills** for each activity. You **MUST** load
153
155
 
154
156
  Follow the `activity-init` skill:
155
157
 
156
- 1. Receive initial brief from user.
157
- 2. Ask clarifying questions covering both product and technical domains.
158
- 3. Generate `product-context.md` and `technical-guidelines.md` in `/docs/`.
159
- 4. If `/DESIGN.md` is missing and the project has UI scope, create a baseline `/DESIGN.md` aligned with current product direction.
160
- 5. Present generated documents for user review.
161
- 6. Iterate based on feedback.
162
- 7. Save finalized versions.
158
+ 1. **Detect repository mode** (RF-60): check for `component.json` (multi-repo), `/docs` (mono-repo), or neither (undocumented/greenfield). If both exist, multi-repo wins.
159
+ 2. **Route by mode:**
160
+ - **Multi-repo:** Invoke `dt init --task "<description>" --json`. Handle exit codes (0=success, 7=partition proposal stop, 9=stale catalog stop). On success, load bundle in numeric order and present `review_flags` before continuing.
161
+ - **Mono-repo:** Proceed with the standard interview (current flow unchanged).
162
+ - **Undocumented/greenfield:** Run `dt extract detect` → `dt extract all --interactive` → present extraction report → then conduct the interview.
163
+ 3. Ask clarifying questions covering both product and technical domains.
164
+ 4. Generate `product-context.md` and `technical-guidelines.md` in `/docs/`.
165
+ 5. If `/DESIGN.md` is missing and the project has UI scope, create a baseline `/DESIGN.md` aligned with current product direction.
166
+ 6. Present generated documents for user review.
167
+ 7. Iterate based on feedback.
168
+ 8. Save finalized versions.
163
169
 
164
170
  ### Feature Mode
165
171
 
@@ -8,7 +8,13 @@ Run the `product-engineer` agent to establish foundation documents for this proj
8
8
  - **Project/product description:**
9
9
  > <Describe the product, project, or technology stack>
10
10
 
11
- The agent will invoke the `activity-init` skill to create:
11
+ The agent will invoke the `activity-init` skill which first **detects the repository mode**:
12
+
13
+ - **Multi-repo** (`component.json` present): delegates context resolution to `dt init --task --json`
14
+ - **Mono-repo** (`/docs` present, no `component.json`): standard interview flow
15
+ - **Undocumented/greenfield** (neither): runs `dt extract detect` → `dt extract all --interactive` → interview
16
+
17
+ Then creates:
12
18
 
13
19
  - `docs/product-context.md` — Product context and strategic goals
14
20
  - `docs/technical-guidelines.md` — Technical standards and patterns
@@ -29,7 +29,56 @@ Every document produced by this activity **MUST** include a **Changelog** table
29
29
  | 1.0 | YYYY-MM-DD | Initial version | @user / agent-name |
30
30
  ```
31
31
 
32
- ## Process
32
+ ---
33
+
34
+ ## Mode Detection (RF-60)
35
+
36
+ Before starting the interview, the skill **MUST** detect the repository mode and route accordingly. The detection logic is:
37
+
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.
43
+
44
+ ---
45
+
46
+ ## Mode A — Multi-Repo (RF-61)
47
+
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.
49
+
50
+ ### Process
51
+
52
+ 1. **Invoke `dt init --task "<user's task/product description>" --json`**.
53
+ 2. **Handle exit codes:**
54
+
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.** |
63
+
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.
68
+
69
+ ### Constraints
70
+
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).
74
+
75
+ ---
76
+
77
+ ## Mode B — Mono-Repo (Current Flow)
78
+
79
+ When no `component.json` is present but `/docs` exists, the skill follows the **existing single-repo flow** unchanged.
80
+
81
+ ### Process
33
82
 
34
83
  1. **Receive Initial Brief:** The user describes the product, project, or technology stack.
35
84
  2. **Ask Clarifying Questions:** Gather information for both product context and technical guidelines in a single interview. Group questions by domain.
@@ -39,11 +88,33 @@ Every document produced by this activity **MUST** include a **Changelog** table
39
88
 
40
89
  ---
41
90
 
91
+ ## Mode C — Undocumented / Greenfield
92
+
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.
94
+
95
+ ### Process
96
+
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.
105
+
106
+ ### Constraints
107
+
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).
110
+
111
+ ---
112
+
42
113
  ## Part 1 — Product Context
43
114
 
44
115
  ### Clarifying Questions
45
116
 
46
- Adapt questions based on context provided:
117
+ Adapt questions based on context provided (and based on mode — in multi-repo mode, the bundle already provides some answers):
47
118
 
48
119
  - **Product Definition:** "What is this product/project, and what does it do?"
49
120
  - **Problem Statement:** "What core problem does this product solve?"
@@ -149,9 +220,11 @@ When generating or updating `AGENTS.md` during project initialization, you **MUS
149
220
 
150
221
  ## Final Instructions
151
222
 
152
- 1. You **MUST NOT** start implementing anything.
153
- 2. You **MUST** ask clarifying questions to fill gaps — cover both product and technical domains.
154
- 3. You **SHOULD** use answers to create both documents in a single pass.
155
- 4. You **MUST** save both files and present them for user review.
156
- 5. You **SHOULD** iterate based on user feedback before finalizing.
157
- 6. 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.
223
+ 1. You **MUST** detect the repository mode before starting (see Mode Detection above).
224
+ 2. You **MUST NOT** start implementing anything.
225
+ 3. You **MUST** ask clarifying questions to fill gaps — cover both product and technical domains.
226
+ 4. You **SHOULD** use answers to create both documents in a single pass.
227
+ 5. You **MUST** save both files and present them for user review.
228
+ 6. You **SHOULD** iterate based on user feedback before finalizing.
229
+ 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`.
@@ -96,6 +96,8 @@ If the user provides a feature description or asks to create a PRD/spec/stories
96
96
  17. **Migration safety gate:** For schema/data-model changes, you **MUST** obtain explicit user confirmation before running any migration apply command.
97
97
  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`.
98
98
  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.
99
+ 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.
100
+ 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.
99
101
 
100
102
  ---
101
103
 
@@ -22,6 +22,8 @@ GitHub Issues and PRs are the source of truth for execution status.
22
22
 
23
23
  You **MUST NOT** write application code for stories. You orchestrate and consolidate.
24
24
  When a delegated story has UI impact and `/DESIGN.md` exists, you **MUST** require DESIGN.md compliance checks in the `developer` handoff payload.
25
+ You **MUST NOT** write to the meta-repo outside the `architecture-change` task type. If an orchestrated story requires meta-repo modifications, 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.
26
+ When orchestrating cross-repo partitioned work (>1 `primary` component), you **MUST** delegate each per-repo sub-task to `developer` scoped exclusively to its assigned repository. Sub-tasks **MUST** be ordered producer-before-consumers. If a boundary contract has `payload_confidence: low`, you **MUST** block the dependent sub-task until the contract is raised to `medium`. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
25
27
 
26
28
  ### Skills
27
29
 
@@ -176,6 +176,8 @@ This agent invokes the following **skills** for each activity. You **MUST** load
176
176
  7. **Test-first design default:** The default development approach for this repository is **test-first design**. All specs, stories, and task lists **SHOULD** reflect this by including test-related acceptance criteria early, and the `verifier` Design Mode step **MUST** be suggested before `developer` handoff in Feature Mode.
177
177
  8. **Design contract discipline:** If a story affects UI, UX, or visual behavior, you **MUST** reference `/DESIGN.md` in the spec/stories and include explicit DESIGN.md impact notes (tokens, components, or prose guidance to add/update).
178
178
  9. **Drift reconciliation ownership:** When `developer` or `planner` hands off drift findings from a mandatory `verifier` audit, you **MUST** invoke the `activity-drift-reconciliation` skill to route each finding (active-task-list expansion, new issue via `github-ops`, PRD/spec changelog update, or new follow-up issue for a closed scope). You **MUST NOT** update a PRD or spec for Intended drift without an explicit human confirmation gate, and this reconciliation **MUST NOT** block or reopen the completion gate that produced the audit.
179
+ 10. **Meta-repo write restriction (RF-64):** You **MUST NOT** write to the meta-repo outside the `architecture-change` task type. If a feature or issue requires modifying meta-repo files (`architecture.md`, `domains.md`, `glossary.md`, `conventions.md`, `catalog/flows/`), you **MUST** create or reference an `architecture-change` task. `catalog/components/*.json` and `catalog/index.yaml` are generated by CI and **MUST** never be modified by any agent or human. See `AGENTS.md` § Task Types for full rules.
180
+ 11. **Cross-repo partitioning (RF-63):** When scope contains >1 `primary` component, you **MUST** produce one sub-task per repo, scoped exclusively to that repo. Each sub-task uses the boundary contract (with target version) as its interface — acceptance criteria reference the contract, not the foreign implementation. Sub-tasks **MUST** be ordered producer-before-consumers. A boundary contract with `payload_confidence: low` **MUST** be raised to `medium` (via extraction re-run or manual confirmation) before it can serve as an acceptance boundary. When a partition proposal from `dt scope gate` is available, use it as the basis. See `AGENTS.md` § Cross-Repo Partitioning for full rules.
179
181
 
180
182
  ---
181
183
 
@@ -185,13 +187,17 @@ This agent invokes the following **skills** for each activity. You **MUST** load
185
187
 
186
188
  Follow the `activity-init` skill:
187
189
 
188
- 1. Receive initial brief from user.
189
- 2. Ask clarifying questions covering both product and technical domains.
190
- 3. Generate `product-context.md` and `technical-guidelines.md` in `/docs/`.
191
- 4. If `/DESIGN.md` is missing and the project has UI scope, create a baseline `/DESIGN.md` aligned with current product direction.
192
- 5. Present generated documents for user review.
193
- 6. Iterate based on feedback.
194
- 7. Save finalized versions.
190
+ 1. **Detect repository mode** (RF-60): check for `component.json` (multi-repo), `/docs` (mono-repo), or neither (undocumented/greenfield). If both exist, multi-repo wins.
191
+ 2. **Route by mode:**
192
+ - **Multi-repo:** Invoke `dt init --task "<description>" --json`. Handle exit codes (0=success, 7=partition proposal stop, 9=stale catalog stop). On success, load bundle in numeric order and present `review_flags` before continuing.
193
+ - **Mono-repo:** Proceed with the standard interview (current flow unchanged).
194
+ - **Undocumented/greenfield:** Run `dt extract detect` → `dt extract all --interactive` → present extraction report → then conduct the interview.
195
+ 3. Ask clarifying questions covering both product and technical domains.
196
+ 4. Generate `product-context.md` and `technical-guidelines.md` in `/docs/`.
197
+ 5. If `/DESIGN.md` is missing and the project has UI scope, create a baseline `/DESIGN.md` aligned with current product direction.
198
+ 6. Present generated documents for user review.
199
+ 7. Iterate based on feedback.
200
+ 8. Save finalized versions.
195
201
 
196
202
  ### Feature Mode
197
203
 
@@ -34,7 +34,56 @@ Every document produced by this activity **MUST** include a **Changelog** table
34
34
  | 1.0 | YYYY-MM-DD | Initial version | @user / agent-name |
35
35
  ```
36
36
 
37
- ## Process
37
+ ---
38
+
39
+ ## Mode Detection (RF-60)
40
+
41
+ Before starting the interview, the skill **MUST** detect the repository mode and route accordingly. The detection logic is:
42
+
43
+ 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`.
44
+ 2. **Mono-repo mode:** no `component.json` at root, but `/docs` directory exists → current single-repo flow (interview + direct docs generation).
45
+ 3. **Undocumented / greenfield mode:** neither `component.json` nor `/docs` → extraction-first flow to bootstrap documentation from code, then interview.
46
+
47
+ > **Precedence:** If both `component.json` AND `/docs` exist, multi-repo mode wins — `component.json` is the authoritative signal.
48
+
49
+ ---
50
+
51
+ ## Mode A — Multi-Repo (RF-61)
52
+
53
+ 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.
54
+
55
+ ### Process
56
+
57
+ 1. **Invoke `dt init --task "<user's task/product description>" --json`**.
58
+ 2. **Handle exit codes:**
59
+
60
+ | Exit Code | Meaning | Action |
61
+ | --------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
+ | `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. |
63
+ | `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. |
64
+ | `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. |
65
+ | `10` | Invalid scope after LLM retry | Inform the user that automatic scoping failed. Suggest running with `--components` for manual scope. **Stop.** |
66
+ | `11` | No candidates found | Inform the user that no components matched the task description. Suggest refining the task text or using `--components`. **Stop.** |
67
+ | `6` | Budget overflow | Inform the user that the scoped context exceeds the token budget. Suggest narrowing scope with `--max-components` or `--budget`. **Stop.** |
68
+
69
+ 3. **On success (exit 0):**
70
+ - Load the assembled bundle files in numeric order (they form the context).
71
+ - 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.
72
+ - Use the bundle content as the basis for the product-context and technical-guidelines interview — the bundle replaces direct `/docs` reading.
73
+
74
+ ### Constraints
75
+
76
+ - The skill **MUST NOT** read `/docs`, walk the repository tree, or inspect source files directly in multi-repo mode.
77
+ - All context comes from the `dt init` bundle output.
78
+ - The skill **MAY** ask follow-up questions to fill gaps not covered by the bundle (e.g., strategic goals, success metrics).
79
+
80
+ ---
81
+
82
+ ## Mode B — Mono-Repo (Current Flow)
83
+
84
+ When no `component.json` is present but `/docs` exists, the skill follows the **existing single-repo flow** unchanged.
85
+
86
+ ### Process
38
87
 
39
88
  1. **Receive Initial Brief:** The user describes the product, project, or technology stack.
40
89
  2. **Ask Clarifying Questions:** Gather information for both product context and technical guidelines in a single interview. Group questions by domain.
@@ -44,11 +93,33 @@ Every document produced by this activity **MUST** include a **Changelog** table
44
93
 
45
94
  ---
46
95
 
96
+ ## Mode C — Undocumented / Greenfield
97
+
98
+ When neither `component.json` nor `/docs` exists, the repository has no established documentation. The skill bootstraps documentation from code extraction before conducting the interview.
99
+
100
+ ### Process
101
+
102
+ 1. **Run detection:** Invoke `dt extract detect` to identify the repository's technology stack, frameworks, and extractable artifacts.
103
+ 2. **Run extraction:** Invoke `dt extract all --interactive` to extract schema, OpenAPI, AsyncAPI, and component manifest from the codebase.
104
+ - The `--interactive` flag allows the user to confirm or skip ambiguous extractions.
105
+ - If interrupted, the skill **SHOULD** inform the user how to resume (`dt extract all --interactive` picks up where it left off).
106
+ 3. **Present extraction report:** Show the user the results of extraction — what was found, confidence levels, any `unresolved` items.
107
+ 4. **Conduct the interview:** Proceed with the standard clarifying questions for product context and technical guidelines (same as Mono-Repo mode).
108
+ 5. **Generate documents:** Create `product-context.md` and `technical-guidelines.md` using the extraction results as pre-filled context combined with interview answers.
109
+ 6. **Save Output:** Save both documents in `/docs/` and present them for user review.
110
+
111
+ ### Constraints
112
+
113
+ - The extraction results inform but do not replace the interview — the user confirms and supplements.
114
+ - If `dt extract detect` reports that no extractable content was found (empty project), skip extraction and proceed directly to the interview (pure greenfield).
115
+
116
+ ---
117
+
47
118
  ## Part 1 — Product Context
48
119
 
49
120
  ### Clarifying Questions
50
121
 
51
- Adapt questions based on context provided:
122
+ Adapt questions based on context provided (and based on mode — in multi-repo mode, the bundle already provides some answers):
52
123
 
53
124
  - **Product Definition:** "What is this product/project, and what does it do?"
54
125
  - **Problem Statement:** "What core problem does this product solve?"
@@ -154,9 +225,11 @@ When generating or updating `AGENTS.md` during project initialization, you **MUS
154
225
 
155
226
  ## Final Instructions
156
227
 
157
- 1. You **MUST NOT** start implementing anything.
158
- 2. You **MUST** ask clarifying questions to fill gaps — cover both product and technical domains.
159
- 3. You **SHOULD** use answers to create both documents in a single pass.
160
- 4. You **MUST** save both files and present them for user review.
161
- 5. You **SHOULD** iterate based on user feedback before finalizing.
162
- 6. 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.
228
+ 1. You **MUST** detect the repository mode before starting (see Mode Detection above).
229
+ 2. You **MUST NOT** start implementing anything.
230
+ 3. You **MUST** ask clarifying questions to fill gaps — cover both product and technical domains.
231
+ 4. You **SHOULD** use answers to create both documents in a single pass.
232
+ 5. You **MUST** save both files and present them for user review.
233
+ 6. You **SHOULD** iterate based on user feedback before finalizing.
234
+ 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.
235
+ 8. In multi-repo mode, you **MUST NOT** read `/docs` or walk the repository directly — all context passes through `dt init`.