code-ai-installer 4.0.0 → 4.0.1-b

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 (471) hide show
  1. package/README.md +83 -67
  2. package/dist/index.js +2 -0
  3. package/dist/mcp/audit_ledger.d.ts +12 -0
  4. package/dist/mcp/audit_ledger.js +82 -0
  5. package/dist/mcp/cli.js +7 -1
  6. package/dist/mcp/config.d.ts +23 -0
  7. package/dist/mcp/config.js +44 -6
  8. package/dist/mcp/index.d.ts +1 -2
  9. package/dist/mcp/index.js +1 -2
  10. package/dist/mcp/paths.d.ts +20 -2
  11. package/dist/mcp/paths.js +29 -5
  12. package/dist/mcp/proposal_dedup.d.ts +32 -0
  13. package/dist/mcp/proposal_dedup.js +102 -0
  14. package/dist/mcp/proposal_store.d.ts +18 -0
  15. package/dist/mcp/proposal_store.js +74 -0
  16. package/dist/mcp/scorecard.d.ts +140 -0
  17. package/dist/mcp/scorecard.js +103 -0
  18. package/dist/mcp/skill_invocations.d.ts +15 -0
  19. package/dist/mcp/skill_invocations.js +28 -0
  20. package/dist/mcp/task_state.d.ts +77 -2
  21. package/dist/mcp/tools/_subprocess.d.ts +16 -0
  22. package/dist/mcp/tools/_subprocess.js +56 -0
  23. package/dist/mcp/tools/advance_gate.js +2 -2
  24. package/dist/mcp/tools/aggregate_run_metrics.d.ts +19 -0
  25. package/dist/mcp/tools/aggregate_run_metrics.js +139 -0
  26. package/dist/mcp/tools/apply_diff.d.ts +2 -0
  27. package/dist/mcp/tools/apply_diff.js +29 -0
  28. package/dist/mcp/tools/audit_bilocale_parity.d.ts +2 -0
  29. package/dist/mcp/tools/audit_bilocale_parity.js +146 -0
  30. package/dist/mcp/tools/audit_budget_compliance.d.ts +35 -0
  31. package/dist/mcp/tools/audit_budget_compliance.js +172 -0
  32. package/dist/mcp/tools/build.d.ts +2 -0
  33. package/dist/mcp/tools/build.js +47 -0
  34. package/dist/mcp/tools/check_lint.d.ts +2 -0
  35. package/dist/mcp/tools/check_lint.js +23 -0
  36. package/dist/mcp/tools/classify_gate.js +2 -2
  37. package/dist/mcp/tools/current_gate.js +2 -2
  38. package/dist/mcp/tools/dependency_supply_chain.d.ts +2 -0
  39. package/dist/mcp/tools/dependency_supply_chain.js +59 -0
  40. package/dist/mcp/tools/docker_compose.d.ts +2 -0
  41. package/dist/mcp/tools/docker_compose.js +24 -0
  42. package/dist/mcp/tools/e2e_playwright.d.ts +2 -0
  43. package/dist/mcp/tools/e2e_playwright.js +88 -0
  44. package/dist/mcp/tools/get_skill.js +17 -0
  45. package/dist/mcp/tools/git_commit.d.ts +2 -0
  46. package/dist/mcp/tools/git_commit.js +30 -0
  47. package/dist/mcp/tools/list_proposals.d.ts +6 -0
  48. package/dist/mcp/tools/list_proposals.js +16 -0
  49. package/dist/mcp/tools/list_skills.js +9 -1
  50. package/dist/mcp/tools/load_role.d.ts +3 -4
  51. package/dist/mcp/tools/load_role.js +11 -13
  52. package/dist/mcp/tools/propose_change.d.ts +8 -0
  53. package/dist/mcp/tools/propose_change.js +36 -0
  54. package/dist/mcp/tools/record_decision.js +25 -25
  55. package/dist/mcp/tools/review_proposal.d.ts +17 -0
  56. package/dist/mcp/tools/review_proposal.js +99 -0
  57. package/dist/mcp/tools/run_drift_audit.d.ts +11 -0
  58. package/dist/mcp/tools/run_drift_audit.js +79 -0
  59. package/dist/mcp/tools/run_tests.d.ts +2 -0
  60. package/dist/mcp/tools/run_tests.js +92 -0
  61. package/dist/mcp/tools/sign_off.js +14 -2
  62. package/dist/mcp/tools/stubs.js +30 -9
  63. package/dist/mcp/tools/verify_claim.js +33 -6
  64. package/dist/mcp_setup.d.ts +14 -3
  65. package/dist/mcp_setup.js +15 -6
  66. package/dist/shared/frontmatter.d.ts +44 -2
  67. package/dist/shared/frontmatter.js +54 -6
  68. package/dist/shared/index.d.ts +0 -5
  69. package/dist/shared/index.js +0 -5
  70. package/dist/shared/persona.d.ts +2 -2
  71. package/dist/shared/persona.js +1 -1
  72. package/dist/shared/pipeline.d.ts +46 -1
  73. package/dist/shared/tools.d.ts +1382 -16
  74. package/dist/shared/tools.js +229 -0
  75. package/dist/shared/vocabulary.d.ts +99 -4
  76. package/dist/shared/vocabulary.js +94 -5
  77. package/domains/analytics/.agents/skills/ansoff-matrix/SKILL.md +316 -300
  78. package/domains/analytics/.agents/skills/bcg-matrix/SKILL.md +345 -329
  79. package/domains/analytics/.agents/skills/blue-ocean-strategy/SKILL.md +432 -416
  80. package/domains/analytics/.agents/skills/board/SKILL.md +22 -0
  81. package/domains/analytics/.agents/skills/cohort-analysis/SKILL.md +338 -322
  82. package/domains/analytics/.agents/skills/competitive-analysis/SKILL.md +413 -395
  83. package/domains/analytics/.agents/skills/customer-journey-mapping/SKILL.md +347 -331
  84. package/domains/analytics/.agents/skills/gates/SKILL.md +388 -366
  85. package/domains/analytics/.agents/skills/handoff/SKILL.md +402 -380
  86. package/domains/analytics/.agents/skills/html-pdf-report/SKILL.md +21 -289
  87. package/domains/analytics/.agents/skills/html-pdf-report-reference/SKILL.md +325 -0
  88. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  89. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  90. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  91. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  92. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  93. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  94. package/domains/analytics/.agents/skills/html-pdf-report-reference/agents/skill.yaml +23 -0
  95. package/domains/analytics/.agents/skills/icp-buyer-persona/SKILL.md +407 -390
  96. package/domains/analytics/.agents/skills/jtbd-analysis/SKILL.md +357 -341
  97. package/domains/analytics/.agents/skills/karpathy-guidelines/SKILL.md +32 -0
  98. package/domains/analytics/.agents/skills/pest-analysis/SKILL.md +324 -305
  99. package/domains/analytics/.agents/skills/porters-five-forces/SKILL.md +377 -361
  100. package/domains/analytics/.agents/skills/report-design/SKILL.md +416 -398
  101. package/domains/analytics/.agents/skills/rfm-analysis/SKILL.md +330 -314
  102. package/domains/analytics/.agents/skills/session-prompt-generator/SKILL.md +400 -378
  103. package/domains/analytics/.agents/skills/swot-analysis/SKILL.md +340 -324
  104. package/domains/analytics/.agents/skills/tam-sam-som/SKILL.md +329 -312
  105. package/domains/analytics/.agents/skills/trend-analysis/SKILL.md +347 -331
  106. package/domains/analytics/.agents/skills/unit-economics/SKILL.md +430 -413
  107. package/domains/analytics/.agents/skills/value-chain-analysis/SKILL.md +346 -330
  108. package/domains/analytics/.agents/skills/web-research/SKILL.md +323 -308
  109. package/domains/analytics/AGENTS.md +1 -0
  110. package/domains/analytics/agents/auditor.md +76 -0
  111. package/domains/analytics/agents/conductor.md +11 -0
  112. package/domains/analytics/agents/data_analyst.md +11 -0
  113. package/domains/analytics/agents/designer.md +11 -0
  114. package/domains/analytics/agents/interviewer.md +11 -0
  115. package/domains/analytics/agents/layouter.md +11 -0
  116. package/domains/analytics/agents/mediator.md +11 -0
  117. package/domains/analytics/agents/researcher.md +11 -0
  118. package/domains/analytics/agents/strategist.md +11 -0
  119. package/domains/analytics/locales/en/.agents/skills/ansoff-matrix/SKILL.md +316 -300
  120. package/domains/analytics/locales/en/.agents/skills/bcg-matrix/SKILL.md +345 -329
  121. package/domains/analytics/locales/en/.agents/skills/blue-ocean-strategy/SKILL.md +432 -416
  122. package/domains/analytics/locales/en/.agents/skills/board/SKILL.md +22 -0
  123. package/domains/analytics/locales/en/.agents/skills/cohort-analysis/SKILL.md +338 -322
  124. package/domains/analytics/locales/en/.agents/skills/competitive-analysis/SKILL.md +413 -395
  125. package/domains/analytics/locales/en/.agents/skills/customer-journey-mapping/SKILL.md +347 -331
  126. package/domains/analytics/locales/en/.agents/skills/gates/SKILL.md +388 -366
  127. package/domains/analytics/locales/en/.agents/skills/handoff/SKILL.md +402 -380
  128. package/domains/analytics/locales/en/.agents/skills/html-pdf-report/SKILL.md +21 -289
  129. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/SKILL.md +325 -0
  130. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  131. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  132. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  133. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  134. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  135. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  136. package/domains/analytics/locales/en/.agents/skills/html-pdf-report-reference/agents/skill.yaml +29 -0
  137. package/domains/analytics/locales/en/.agents/skills/icp-buyer-persona/SKILL.md +407 -390
  138. package/domains/analytics/locales/en/.agents/skills/jtbd-analysis/SKILL.md +357 -341
  139. package/domains/analytics/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +32 -0
  140. package/domains/analytics/locales/en/.agents/skills/pest-analysis/SKILL.md +324 -305
  141. package/domains/analytics/locales/en/.agents/skills/porters-five-forces/SKILL.md +377 -361
  142. package/domains/analytics/locales/en/.agents/skills/report-design/SKILL.md +416 -398
  143. package/domains/analytics/locales/en/.agents/skills/rfm-analysis/SKILL.md +330 -314
  144. package/domains/analytics/locales/en/.agents/skills/session-prompt-generator/SKILL.md +400 -378
  145. package/domains/analytics/locales/en/.agents/skills/swot-analysis/SKILL.md +340 -324
  146. package/domains/analytics/locales/en/.agents/skills/tam-sam-som/SKILL.md +329 -312
  147. package/domains/analytics/locales/en/.agents/skills/trend-analysis/SKILL.md +347 -331
  148. package/domains/analytics/locales/en/.agents/skills/unit-economics/SKILL.md +430 -413
  149. package/domains/analytics/locales/en/.agents/skills/value-chain-analysis/SKILL.md +366 -350
  150. package/domains/analytics/locales/en/.agents/skills/web-research/SKILL.md +324 -309
  151. package/domains/analytics/locales/en/AGENTS.md +1 -0
  152. package/domains/analytics/locales/en/agents/auditor.md +76 -0
  153. package/domains/analytics/locales/en/agents/conductor.md +27 -0
  154. package/domains/analytics/locales/en/agents/data_analyst.md +29 -0
  155. package/domains/analytics/locales/en/agents/designer.md +27 -0
  156. package/domains/analytics/locales/en/agents/interviewer.md +11 -0
  157. package/domains/analytics/locales/en/agents/layouter.md +11 -0
  158. package/domains/analytics/locales/en/agents/mediator.md +11 -0
  159. package/domains/analytics/locales/en/agents/researcher.md +11 -0
  160. package/domains/analytics/locales/en/agents/strategist.md +11 -0
  161. package/domains/analytics/persona/persona-base.md +94 -0
  162. package/domains/analytics/pipeline.yaml +102 -0
  163. package/domains/content/.agents/skills/audience-analysis/SKILL.md +15 -0
  164. package/domains/content/.agents/skills/board/SKILL.md +20 -0
  165. package/domains/content/.agents/skills/brand-compliance/SKILL.md +15 -0
  166. package/domains/content/.agents/skills/brand-guidelines/SKILL.md +17 -0
  167. package/domains/content/.agents/skills/competitor-content-analysis/SKILL.md +15 -0
  168. package/domains/content/.agents/skills/content-brief/SKILL.md +15 -0
  169. package/domains/content/.agents/skills/content-calendar/SKILL.md +15 -0
  170. package/domains/content/.agents/skills/content-release-gate/SKILL.md +15 -0
  171. package/domains/content/.agents/skills/content-review-checklist/SKILL.md +15 -0
  172. package/domains/content/.agents/skills/cta-optimization/SKILL.md +15 -0
  173. package/domains/content/.agents/skills/data-storytelling/SKILL.md +15 -0
  174. package/domains/content/.agents/skills/email-copywriting/SKILL.md +15 -0
  175. package/domains/content/.agents/skills/email-engagement-tiers/SKILL.md +15 -0
  176. package/domains/content/.agents/skills/fact-checking/SKILL.md +15 -0
  177. package/domains/content/.agents/skills/gates/SKILL.md +20 -0
  178. package/domains/content/.agents/skills/google-stitch-content/SKILL.md +15 -0
  179. package/domains/content/.agents/skills/handoff/SKILL.md +24 -0
  180. package/domains/content/.agents/skills/headline-formulas/SKILL.md +15 -0
  181. package/domains/content/.agents/skills/image-prompt-engineering/SKILL.md +15 -0
  182. package/domains/content/.agents/skills/karpathy-guidelines/SKILL.md +28 -0
  183. package/domains/content/.agents/skills/mailerlite-email-ops/SKILL.md +15 -0
  184. package/domains/content/.agents/skills/marketing-psychology/SKILL.md +15 -0
  185. package/domains/content/.agents/skills/moodboard/SKILL.md +15 -0
  186. package/domains/content/.agents/skills/platform-compliance/SKILL.md +15 -0
  187. package/domains/content/.agents/skills/platform-strategy/SKILL.md +15 -0
  188. package/domains/content/.agents/skills/platform-visual-specs/SKILL.md +15 -0
  189. package/domains/content/.agents/skills/readability-scoring/SKILL.md +15 -0
  190. package/domains/content/.agents/skills/seo-copywriting/SKILL.md +15 -0
  191. package/domains/content/.agents/skills/social-media-formats/SKILL.md +15 -0
  192. package/domains/content/.agents/skills/source-verification/SKILL.md +15 -0
  193. package/domains/content/.agents/skills/storytelling-framework/SKILL.md +15 -0
  194. package/domains/content/.agents/skills/tone-of-voice/SKILL.md +15 -0
  195. package/domains/content/.agents/skills/topic-research/SKILL.md +15 -0
  196. package/domains/content/.agents/skills/trend-research/SKILL.md +15 -0
  197. package/domains/content/.agents/skills/visual-brief/SKILL.md +15 -0
  198. package/domains/content/AGENTS.md +4 -0
  199. package/domains/content/agents/auditor.md +76 -0
  200. package/domains/content/agents/conductor.md +11 -0
  201. package/domains/content/agents/copywriter.md +11 -0
  202. package/domains/content/agents/researcher.md +11 -0
  203. package/domains/content/agents/reviewer.md +11 -0
  204. package/domains/content/agents/strategist.md +11 -0
  205. package/domains/content/agents/visual_concept.md +11 -0
  206. package/domains/content/locales/en/.agents/skills/audience-analysis/SKILL.md +15 -0
  207. package/domains/content/locales/en/.agents/skills/board/SKILL.md +20 -0
  208. package/domains/content/locales/en/.agents/skills/brand-compliance/SKILL.md +15 -0
  209. package/domains/content/locales/en/.agents/skills/brand-guidelines/SKILL.md +17 -0
  210. package/domains/content/locales/en/.agents/skills/competitor-content-analysis/SKILL.md +15 -0
  211. package/domains/content/locales/en/.agents/skills/content-brief/SKILL.md +15 -0
  212. package/domains/content/locales/en/.agents/skills/content-calendar/SKILL.md +15 -0
  213. package/domains/content/locales/en/.agents/skills/content-release-gate/SKILL.md +15 -0
  214. package/domains/content/locales/en/.agents/skills/content-review-checklist/SKILL.md +15 -0
  215. package/domains/content/locales/en/.agents/skills/cta-optimization/SKILL.md +15 -0
  216. package/domains/content/locales/en/.agents/skills/data-storytelling/SKILL.md +15 -0
  217. package/domains/content/locales/en/.agents/skills/email-copywriting/SKILL.md +15 -0
  218. package/domains/content/locales/en/.agents/skills/email-engagement-tiers/SKILL.md +15 -0
  219. package/domains/content/locales/en/.agents/skills/fact-checking/SKILL.md +15 -0
  220. package/domains/content/locales/en/.agents/skills/gates/SKILL.md +20 -0
  221. package/domains/content/locales/en/.agents/skills/google-stitch-content/SKILL.md +15 -0
  222. package/domains/content/locales/en/.agents/skills/handoff/SKILL.md +24 -0
  223. package/domains/content/locales/en/.agents/skills/headline-formulas/SKILL.md +15 -0
  224. package/domains/content/locales/en/.agents/skills/image-prompt-engineering/SKILL.md +15 -0
  225. package/domains/content/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +30 -1
  226. package/domains/content/locales/en/.agents/skills/mailerlite-email-ops/SKILL.md +15 -0
  227. package/domains/content/locales/en/.agents/skills/marketing-psychology/SKILL.md +15 -0
  228. package/domains/content/locales/en/.agents/skills/moodboard/SKILL.md +15 -0
  229. package/domains/content/locales/en/.agents/skills/platform-compliance/SKILL.md +15 -0
  230. package/domains/content/locales/en/.agents/skills/platform-strategy/SKILL.md +15 -0
  231. package/domains/content/locales/en/.agents/skills/platform-visual-specs/SKILL.md +15 -0
  232. package/domains/content/locales/en/.agents/skills/readability-scoring/SKILL.md +15 -0
  233. package/domains/content/locales/en/.agents/skills/seo-copywriting/SKILL.md +15 -0
  234. package/domains/content/locales/en/.agents/skills/social-media-formats/SKILL.md +15 -0
  235. package/domains/content/locales/en/.agents/skills/source-verification/SKILL.md +15 -0
  236. package/domains/content/locales/en/.agents/skills/storytelling-framework/SKILL.md +15 -0
  237. package/domains/content/locales/en/.agents/skills/tone-of-voice/SKILL.md +15 -0
  238. package/domains/content/locales/en/.agents/skills/topic-research/SKILL.md +15 -0
  239. package/domains/content/locales/en/.agents/skills/trend-research/SKILL.md +15 -0
  240. package/domains/content/locales/en/.agents/skills/visual-brief/SKILL.md +15 -0
  241. package/domains/content/locales/en/AGENTS.md +4 -0
  242. package/domains/content/locales/en/agents/auditor.md +76 -0
  243. package/domains/content/locales/en/agents/conductor.md +12 -0
  244. package/domains/content/locales/en/agents/copywriter.md +12 -0
  245. package/domains/content/locales/en/agents/researcher.md +12 -0
  246. package/domains/content/locales/en/agents/reviewer.md +12 -0
  247. package/domains/content/locales/en/agents/strategist.md +12 -0
  248. package/domains/content/locales/en/agents/visual_concept.md +12 -0
  249. package/domains/content/persona/persona-base.md +94 -0
  250. package/domains/content/pipeline.yaml +96 -0
  251. package/domains/development/.agents/skills/adr-log/SKILL.md +1 -0
  252. package/domains/development/.agents/skills/design-intake/SKILL.md +0 -4
  253. package/domains/development/.agents/skills/karpathy-guidelines/SKILL.md +2 -1
  254. package/domains/development/.agents/skills/lava-flow-legacy-detection/SKILL.md +15 -1
  255. package/domains/development/.agents/skills/mcp-integration/SKILL.md +211 -0
  256. package/domains/development/.agents/skills/mcp-integration/agents/claude.json +22 -0
  257. package/domains/development/.agents/skills/mcp-integration/agents/copilot.json +22 -0
  258. package/domains/development/.agents/skills/mcp-integration/agents/gemini.json +22 -0
  259. package/domains/development/.agents/skills/mcp-integration/agents/kimi.yaml +18 -0
  260. package/domains/development/.agents/skills/mcp-integration/agents/openai.yaml +8 -0
  261. package/domains/development/.agents/skills/mcp-integration/agents/qwen.json +22 -0
  262. package/domains/development/.agents/skills/mcp-integration/agents/skill.yaml +26 -0
  263. package/domains/development/.agents/skills/qa-ui-a11y-smoke/SKILL.md +1 -1
  264. package/domains/development/.agents/skills/ui-a11y-smoke-review/SKILL.md +1 -1
  265. package/domains/development/AGENTS.md +1 -0
  266. package/domains/development/AGENTS.yaml +1 -0
  267. package/domains/development/agents/architect.md +13 -1
  268. package/domains/development/agents/auditor.md +74 -0
  269. package/domains/development/agents/conductor.md +14 -3
  270. package/domains/development/agents/devops.md +8 -9
  271. package/domains/development/agents/reviewer.md +12 -0
  272. package/domains/development/agents/senior_full_stack.md +12 -0
  273. package/domains/development/agents/tester.md +10 -16
  274. package/domains/development/locales/en/.agents/skills/adr-log/SKILL.md +1 -0
  275. package/domains/development/locales/en/.agents/skills/current-state-analysis/SKILL.md +256 -172
  276. package/domains/development/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +2 -1
  277. package/domains/development/locales/en/.agents/skills/lava-flow-legacy-detection/SKILL.md +15 -1
  278. package/domains/development/locales/en/.agents/skills/mcp-integration/SKILL.md +211 -0
  279. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/claude.json +22 -0
  280. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/copilot.json +22 -0
  281. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/gemini.json +22 -0
  282. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/kimi.yaml +18 -0
  283. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/openai.yaml +8 -0
  284. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/qwen.json +22 -0
  285. package/domains/development/locales/en/.agents/skills/mcp-integration/agents/skill.yaml +26 -0
  286. package/domains/development/locales/en/.agents/skills/qa-ui-a11y-smoke/SKILL.md +1 -1
  287. package/domains/development/locales/en/.agents/skills/ui-a11y-smoke-review/SKILL.md +1 -1
  288. package/domains/development/locales/en/AGENTS.md +5 -0
  289. package/domains/development/locales/en/AGENTS.yaml +1 -0
  290. package/domains/development/locales/en/agents/architect.md +13 -1
  291. package/domains/development/locales/en/agents/auditor.md +74 -0
  292. package/domains/development/locales/en/agents/conductor.md +14 -3
  293. package/domains/development/locales/en/agents/devops.md +8 -9
  294. package/domains/development/locales/en/agents/reviewer.md +12 -0
  295. package/domains/development/locales/en/agents/senior_full_stack.md +12 -0
  296. package/domains/development/locales/en/agents/tester.md +10 -16
  297. package/domains/development/persona/persona-base.md +94 -0
  298. package/domains/product/.agents/skills/aarrr-metrics/SKILL.md +451 -433
  299. package/domains/product/.agents/skills/ab-test-design/SKILL.md +428 -412
  300. package/domains/product/.agents/skills/acceptance-criteria/SKILL.md +422 -406
  301. package/domains/product/.agents/skills/assumption-mapping/SKILL.md +323 -307
  302. package/domains/product/.agents/skills/board/SKILL.md +24 -0
  303. package/domains/product/.agents/skills/design-brief/SKILL.md +433 -418
  304. package/domains/product/.agents/skills/epic-breakdown/SKILL.md +435 -420
  305. package/domains/product/.agents/skills/gates/SKILL.md +470 -446
  306. package/domains/product/.agents/skills/gtm-brief/SKILL.md +18 -321
  307. package/domains/product/.agents/skills/gtm-brief-reference/SKILL.md +348 -0
  308. package/domains/product/.agents/skills/gtm-brief-reference/agents/claude.json +17 -0
  309. package/domains/product/.agents/skills/gtm-brief-reference/agents/copilot.json +17 -0
  310. package/domains/product/.agents/skills/gtm-brief-reference/agents/gemini.json +17 -0
  311. package/domains/product/.agents/skills/gtm-brief-reference/agents/kimi.yaml +15 -0
  312. package/domains/product/.agents/skills/gtm-brief-reference/agents/openai.yaml +10 -0
  313. package/domains/product/.agents/skills/gtm-brief-reference/agents/qwen.json +17 -0
  314. package/domains/product/.agents/skills/gtm-brief-reference/agents/skill.yaml +22 -0
  315. package/domains/product/.agents/skills/handoff/SKILL.md +463 -439
  316. package/domains/product/.agents/skills/html-pdf-report/SKILL.md +21 -663
  317. package/domains/product/.agents/skills/html-pdf-report-reference/SKILL.md +699 -0
  318. package/domains/product/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  319. package/domains/product/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  320. package/domains/product/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  321. package/domains/product/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  322. package/domains/product/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  323. package/domains/product/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  324. package/domains/product/.agents/skills/html-pdf-report-reference/agents/skill.yaml +22 -0
  325. package/domains/product/.agents/skills/hypothesis-template/SKILL.md +484 -469
  326. package/domains/product/.agents/skills/jtbd-canvas/SKILL.md +274 -258
  327. package/domains/product/.agents/skills/kano-model/SKILL.md +370 -355
  328. package/domains/product/.agents/skills/karpathy-guidelines/SKILL.md +36 -0
  329. package/domains/product/.agents/skills/launch-checklist/SKILL.md +434 -419
  330. package/domains/product/.agents/skills/moscow-prioritization/SKILL.md +407 -392
  331. package/domains/product/.agents/skills/north-star-metric/SKILL.md +317 -301
  332. package/domains/product/.agents/skills/okr-framework/SKILL.md +299 -284
  333. package/domains/product/.agents/skills/opportunity-solution-tree/SKILL.md +472 -456
  334. package/domains/product/.agents/skills/prd-template/SKILL.md +18 -258
  335. package/domains/product/.agents/skills/prd-template-reference/SKILL.md +285 -0
  336. package/domains/product/.agents/skills/prd-template-reference/agents/claude.json +17 -0
  337. package/domains/product/.agents/skills/prd-template-reference/agents/copilot.json +17 -0
  338. package/domains/product/.agents/skills/prd-template-reference/agents/gemini.json +17 -0
  339. package/domains/product/.agents/skills/prd-template-reference/agents/kimi.yaml +16 -0
  340. package/domains/product/.agents/skills/prd-template-reference/agents/openai.yaml +10 -0
  341. package/domains/product/.agents/skills/prd-template-reference/agents/qwen.json +17 -0
  342. package/domains/product/.agents/skills/prd-template-reference/agents/skill.yaml +23 -0
  343. package/domains/product/.agents/skills/problem-statement/SKILL.md +327 -312
  344. package/domains/product/.agents/skills/product-roadmap/SKILL.md +320 -304
  345. package/domains/product/.agents/skills/product-vision/SKILL.md +409 -394
  346. package/domains/product/.agents/skills/release-notes/SKILL.md +18 -258
  347. package/domains/product/.agents/skills/release-notes-reference/SKILL.md +285 -0
  348. package/domains/product/.agents/skills/release-notes-reference/agents/claude.json +17 -0
  349. package/domains/product/.agents/skills/release-notes-reference/agents/copilot.json +17 -0
  350. package/domains/product/.agents/skills/release-notes-reference/agents/gemini.json +17 -0
  351. package/domains/product/.agents/skills/release-notes-reference/agents/kimi.yaml +15 -0
  352. package/domains/product/.agents/skills/release-notes-reference/agents/openai.yaml +10 -0
  353. package/domains/product/.agents/skills/release-notes-reference/agents/qwen.json +17 -0
  354. package/domains/product/.agents/skills/release-notes-reference/agents/skill.yaml +22 -0
  355. package/domains/product/.agents/skills/report-design/SKILL.md +17 -307
  356. package/domains/product/.agents/skills/report-design-reference/SKILL.md +331 -0
  357. package/domains/product/.agents/skills/report-design-reference/agents/claude.json +17 -0
  358. package/domains/product/.agents/skills/report-design-reference/agents/copilot.json +17 -0
  359. package/domains/product/.agents/skills/report-design-reference/agents/gemini.json +17 -0
  360. package/domains/product/.agents/skills/report-design-reference/agents/kimi.yaml +15 -0
  361. package/domains/product/.agents/skills/report-design-reference/agents/openai.yaml +10 -0
  362. package/domains/product/.agents/skills/report-design-reference/agents/qwen.json +17 -0
  363. package/domains/product/.agents/skills/report-design-reference/agents/skill.yaml +22 -0
  364. package/domains/product/.agents/skills/rice-scoring/SKILL.md +266 -251
  365. package/domains/product/.agents/skills/saas-metrics/SKILL.md +422 -404
  366. package/domains/product/.agents/skills/session-prompt-generator/SKILL.md +474 -450
  367. package/domains/product/.agents/skills/user-flow/SKILL.md +491 -476
  368. package/domains/product/.agents/skills/user-interview-script/SKILL.md +315 -298
  369. package/domains/product/.agents/skills/user-story/SKILL.md +401 -385
  370. package/domains/product/.agents/skills/wsjf-scoring/SKILL.md +333 -315
  371. package/domains/product/AGENTS.md +5 -0
  372. package/domains/product/AGENTS.yaml +1 -0
  373. package/domains/product/agents/auditor.md +76 -0
  374. package/domains/product/agents/conductor.md +11 -0
  375. package/domains/product/agents/data_analyst.md +11 -0
  376. package/domains/product/agents/designer.md +11 -0
  377. package/domains/product/agents/discovery.md +11 -0
  378. package/domains/product/agents/layouter.md +11 -0
  379. package/domains/product/agents/mediator.md +11 -0
  380. package/domains/product/agents/pm.md +11 -0
  381. package/domains/product/agents/product_strategist.md +11 -0
  382. package/domains/product/agents/tech_lead.md +11 -0
  383. package/domains/product/agents/ux_designer.md +11 -0
  384. package/domains/product/locales/en/.agents/skills/aarrr-metrics/SKILL.md +451 -433
  385. package/domains/product/locales/en/.agents/skills/ab-test-design/SKILL.md +428 -412
  386. package/domains/product/locales/en/.agents/skills/acceptance-criteria/SKILL.md +422 -406
  387. package/domains/product/locales/en/.agents/skills/assumption-mapping/SKILL.md +323 -307
  388. package/domains/product/locales/en/.agents/skills/board/SKILL.md +24 -0
  389. package/domains/product/locales/en/.agents/skills/design-brief/SKILL.md +433 -418
  390. package/domains/product/locales/en/.agents/skills/epic-breakdown/SKILL.md +435 -420
  391. package/domains/product/locales/en/.agents/skills/gates/SKILL.md +470 -446
  392. package/domains/product/locales/en/.agents/skills/gtm-brief/SKILL.md +18 -321
  393. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/SKILL.md +348 -0
  394. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/claude.json +17 -0
  395. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/copilot.json +17 -0
  396. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/gemini.json +17 -0
  397. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/kimi.yaml +15 -0
  398. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/openai.yaml +10 -0
  399. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/qwen.json +17 -0
  400. package/domains/product/locales/en/.agents/skills/gtm-brief-reference/agents/skill.yaml +22 -0
  401. package/domains/product/locales/en/.agents/skills/handoff/SKILL.md +463 -439
  402. package/domains/product/locales/en/.agents/skills/html-pdf-report/SKILL.md +21 -663
  403. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/SKILL.md +699 -0
  404. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/claude.json +17 -0
  405. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/copilot.json +17 -0
  406. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/gemini.json +17 -0
  407. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/kimi.yaml +15 -0
  408. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/openai.yaml +10 -0
  409. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/qwen.json +17 -0
  410. package/domains/product/locales/en/.agents/skills/html-pdf-report-reference/agents/skill.yaml +22 -0
  411. package/domains/product/locales/en/.agents/skills/hypothesis-template/SKILL.md +484 -469
  412. package/domains/product/locales/en/.agents/skills/jtbd-canvas/SKILL.md +273 -257
  413. package/domains/product/locales/en/.agents/skills/kano-model/SKILL.md +370 -355
  414. package/domains/product/locales/en/.agents/skills/karpathy-guidelines/SKILL.md +36 -0
  415. package/domains/product/locales/en/.agents/skills/launch-checklist/SKILL.md +434 -419
  416. package/domains/product/locales/en/.agents/skills/moscow-prioritization/SKILL.md +407 -392
  417. package/domains/product/locales/en/.agents/skills/north-star-metric/SKILL.md +317 -301
  418. package/domains/product/locales/en/.agents/skills/okr-framework/SKILL.md +299 -284
  419. package/domains/product/locales/en/.agents/skills/opportunity-solution-tree/SKILL.md +472 -456
  420. package/domains/product/locales/en/.agents/skills/prd-template/SKILL.md +18 -258
  421. package/domains/product/locales/en/.agents/skills/prd-template-reference/SKILL.md +285 -0
  422. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/claude.json +16 -0
  423. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/copilot.json +16 -0
  424. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/gemini.json +16 -0
  425. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/kimi.yaml +15 -0
  426. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/openai.yaml +10 -0
  427. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/qwen.json +16 -0
  428. package/domains/product/locales/en/.agents/skills/prd-template-reference/agents/skill.yaml +22 -0
  429. package/domains/product/locales/en/.agents/skills/problem-statement/SKILL.md +327 -312
  430. package/domains/product/locales/en/.agents/skills/product-roadmap/SKILL.md +321 -305
  431. package/domains/product/locales/en/.agents/skills/product-vision/SKILL.md +410 -395
  432. package/domains/product/locales/en/.agents/skills/release-notes/SKILL.md +18 -258
  433. package/domains/product/locales/en/.agents/skills/release-notes-reference/SKILL.md +285 -0
  434. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/claude.json +16 -0
  435. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/copilot.json +16 -0
  436. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/gemini.json +16 -0
  437. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/kimi.yaml +14 -0
  438. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/openai.yaml +10 -0
  439. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/qwen.json +16 -0
  440. package/domains/product/locales/en/.agents/skills/release-notes-reference/agents/skill.yaml +21 -0
  441. package/domains/product/locales/en/.agents/skills/report-design/SKILL.md +17 -307
  442. package/domains/product/locales/en/.agents/skills/report-design-reference/SKILL.md +331 -0
  443. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/claude.json +17 -0
  444. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/copilot.json +17 -0
  445. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/gemini.json +17 -0
  446. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/kimi.yaml +15 -0
  447. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/openai.yaml +10 -0
  448. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/qwen.json +17 -0
  449. package/domains/product/locales/en/.agents/skills/report-design-reference/agents/skill.yaml +22 -0
  450. package/domains/product/locales/en/.agents/skills/rice-scoring/SKILL.md +266 -251
  451. package/domains/product/locales/en/.agents/skills/saas-metrics/SKILL.md +422 -404
  452. package/domains/product/locales/en/.agents/skills/session-prompt-generator/SKILL.md +474 -450
  453. package/domains/product/locales/en/.agents/skills/user-flow/SKILL.md +491 -476
  454. package/domains/product/locales/en/.agents/skills/user-interview-script/SKILL.md +314 -297
  455. package/domains/product/locales/en/.agents/skills/user-story/SKILL.md +401 -385
  456. package/domains/product/locales/en/.agents/skills/wsjf-scoring/SKILL.md +333 -315
  457. package/domains/product/locales/en/AGENTS.md +5 -0
  458. package/domains/product/locales/en/agents/auditor.md +76 -0
  459. package/domains/product/locales/en/agents/conductor.md +11 -0
  460. package/domains/product/locales/en/agents/data_analyst.md +11 -0
  461. package/domains/product/locales/en/agents/designer.md +11 -0
  462. package/domains/product/locales/en/agents/discovery.md +11 -0
  463. package/domains/product/locales/en/agents/layouter.md +11 -0
  464. package/domains/product/locales/en/agents/mediator.md +11 -0
  465. package/domains/product/locales/en/agents/pm.md +11 -0
  466. package/domains/product/locales/en/agents/product_strategist.md +11 -0
  467. package/domains/product/locales/en/agents/tech_lead.md +11 -0
  468. package/domains/product/locales/en/agents/ux_designer.md +11 -0
  469. package/domains/product/persona/persona-base.md +94 -0
  470. package/domains/product/pipeline.yaml +115 -0
  471. package/package.json +72 -70
@@ -66,6 +66,14 @@ export const ListSkillsOutput = z.object({
66
66
  export const GetSkillInput = z.object({
67
67
  name: SkillName,
68
68
  domain: DomainId,
69
+ /**
70
+ * Optional run association. When provided, the fetch is logged as a skill
71
+ * invocation (Auditor telemetry, ADR-DEV-121). Existing callers that omit it
72
+ * are unaffected — nothing is logged. `gate` records where in the pipeline
73
+ * the skill was pulled.
74
+ */
75
+ task_id: TaskId.optional(),
76
+ gate: GateName.optional(),
69
77
  });
70
78
  export const GetSkillOutput = z.object({
71
79
  frontmatter: SkillFrontmatter,
@@ -300,6 +308,221 @@ export const RunDriftAuditOutput = z.object({
300
308
  to: SkillName,
301
309
  })),
302
310
  });
311
+ // ─── audit_budget_compliance ─────────────────────────────────────────────────
312
+ export const AuditBudgetComplianceInput = z.object({
313
+ domain: z.union([DomainId, z.literal("*")]),
314
+ });
315
+ const SchemaViolation = z.object({
316
+ domain: DomainId,
317
+ file: z.string(),
318
+ file_type: z.enum(["agent", "skill"]),
319
+ declared_budget: z.number().int(),
320
+ schema_max: z.number().int(),
321
+ message: z.string(),
322
+ });
323
+ const BudgetViolation = z.object({
324
+ domain: DomainId,
325
+ file: z.string(),
326
+ file_type: z.enum(["agent", "skill"]),
327
+ declared_budget: z.number().int(),
328
+ actual_lines: z.number().int(),
329
+ overage: z.number().int(),
330
+ message: z.string(),
331
+ });
332
+ export const AuditBudgetComplianceOutput = z.object({
333
+ schema_violations: z.array(SchemaViolation),
334
+ budget_violations: z.array(BudgetViolation),
335
+ scanned: z.object({
336
+ agents: z.number().int(),
337
+ skills: z.number().int(),
338
+ }),
339
+ });
340
+ // ─── audit_bilocale_parity ───────────────────────────────────────────────────
341
+ export const AuditBilocaleParityInput = z.object({
342
+ domain: z.union([DomainId, z.literal("*")]),
343
+ });
344
+ const DeclaredMismatch = z.object({
345
+ domain: DomainId,
346
+ id: z.string(),
347
+ file_type: z.enum(["agent", "skill"]),
348
+ ru_path: z.string(),
349
+ en_path: z.string(),
350
+ ru_declared: z.number().int(),
351
+ en_declared: z.number().int(),
352
+ message: z.string(),
353
+ });
354
+ const ActualMismatch = z.object({
355
+ domain: DomainId,
356
+ id: z.string(),
357
+ file_type: z.enum(["agent", "skill"]),
358
+ ru_path: z.string(),
359
+ en_path: z.string(),
360
+ ru_actual: z.number().int(),
361
+ en_actual: z.number().int(),
362
+ diff: z.number().int(),
363
+ message: z.string(),
364
+ });
365
+ const ParityOrphan = z.object({
366
+ domain: DomainId,
367
+ id: z.string(),
368
+ file_type: z.enum(["agent", "skill"]),
369
+ present_locale: z.enum(["ru", "en"]),
370
+ present_path: z.string(),
371
+ missing_locale: z.enum(["ru", "en"]),
372
+ message: z.string(),
373
+ });
374
+ export const AuditBilocaleParityOutput = z.object({
375
+ declared_mismatches: z.array(DeclaredMismatch),
376
+ actual_mismatches: z.array(ActualMismatch),
377
+ orphans: z.array(ParityOrphan),
378
+ scanned: z.object({
379
+ pairs: z.number().int(),
380
+ agents: z.number().int(),
381
+ skills: z.number().int(),
382
+ }),
383
+ });
384
+ // ─── aggregate_run_metrics ───────────────────────────────────────────────────
385
+ export const AggregateRunMetricsInput = z.object({
386
+ /** Small-sample guard (design >=3). Below this, met_threshold=false. */
387
+ min_runs: z.number().int().positive().default(3),
388
+ });
389
+ const WorkflowMetric = z.object({
390
+ mode: PipelineMode,
391
+ runs: z.number().int().nonnegative(),
392
+ completed: z.number().int().nonnegative(),
393
+ avg_dev_rollbacks: z.number(),
394
+ circuit_breaker_trips: z.number().int().nonnegative(),
395
+ total_exceptions: z.number().int().nonnegative(),
396
+ });
397
+ const AgentMetric = z.object({
398
+ role: z.string(),
399
+ gate: GateName,
400
+ runs_involved: z.number().int().nonnegative(),
401
+ reworked: z.number().int().nonnegative(),
402
+ first_try_rate: z.number(),
403
+ exceptions: z.number().int().nonnegative(),
404
+ classification_breakdown: z.object({
405
+ auto_resolve: z.number().int().nonnegative(),
406
+ fork: z.number().int().nonnegative(),
407
+ exception: z.number().int().nonnegative(),
408
+ }),
409
+ });
410
+ const SkillMetric = z.object({
411
+ skill: z.string(),
412
+ invocations: z.number().int().nonnegative(),
413
+ runs_invoked_in: z.number().int().nonnegative(),
414
+ gates: z.array(z.string()),
415
+ });
416
+ export const AggregateRunMetricsOutput = z.object({
417
+ runs_in_ledger: z.number().int().nonnegative(),
418
+ runs_completed: z.number().int().nonnegative(),
419
+ min_runs: z.number().int().positive(),
420
+ met_threshold: z.boolean(),
421
+ per_workflow: z.array(WorkflowMetric),
422
+ per_agent: z.array(AgentMetric),
423
+ per_skill: z.array(SkillMetric),
424
+ notes: z.array(z.string()),
425
+ });
426
+ // ─── propose_change / list_proposals (Auditor proposal store, ADR-DEV-123) ──
427
+ /**
428
+ * The kind of change a proposal requests. Maps 1:1 to the autonomy-matrix risk
429
+ * tiers (ADR-DEV-122 agent.md): edit_minor → low (auto when gate off),
430
+ * add_asset → additive (auto when gate off, dedup-guarded in item 4c),
431
+ * destructive → high (always human, even in autonomy).
432
+ */
433
+ export const ProposalChangeKind = z.enum(["edit_minor", "add_asset", "destructive"]);
434
+ /** Risk tier surfaced on the record so the approval layer (4b) routes without re-deriving. */
435
+ export const ProposalRisk = z.enum(["low", "additive", "high"]);
436
+ /**
437
+ * Proposal lifecycle status. 4a (this ADR) only ever writes "pending"; the rest
438
+ * are forward-declared so the approval/apply layer (4b) extends behaviour without
439
+ * reshaping the record. list_proposals tolerates all of them.
440
+ */
441
+ export const ProposalStatus = z.enum([
442
+ "pending",
443
+ "approved",
444
+ "applied",
445
+ "rejected",
446
+ "superseded",
447
+ ]);
448
+ /** What asset a proposal targets. For add_asset, `name` is the proposed new asset's name. */
449
+ export const ProposalTarget = z.object({
450
+ domain: DomainId,
451
+ asset: z.enum(["agent", "skill"]),
452
+ name: z.string().min(1),
453
+ });
454
+ export const ProposeChangeInput = z.object({
455
+ target: ProposalTarget,
456
+ change_kind: ProposalChangeKind,
457
+ /** Why — in words. */
458
+ rationale: z.string().min(1),
459
+ /** Which aggregate_run_metrics numbers / notes motivated this (free-form). */
460
+ evidence: z.string().min(1),
461
+ /** Whether aggregate_run_metrics.met_threshold was true when this was formed. */
462
+ threshold_met: z.boolean(),
463
+ /** The drafted change itself, inline — so the approver / 4b has everything to apply. */
464
+ draft: z.string().min(1),
465
+ });
466
+ export const ProposeChangeOutput = z.object({
467
+ id: z.string(),
468
+ status: ProposalStatus,
469
+ risk: ProposalRisk,
470
+ path: z.string(),
471
+ });
472
+ /** One stored proposal. Shared by the store reader and list_proposals output. */
473
+ export const ProposalRecord = z.object({
474
+ id: z.string(),
475
+ created_at: z.string(),
476
+ status: ProposalStatus,
477
+ risk: ProposalRisk,
478
+ target: ProposalTarget,
479
+ change_kind: ProposalChangeKind,
480
+ rationale: z.string(),
481
+ evidence: z.string(),
482
+ threshold_met: z.boolean(),
483
+ draft: z.string(),
484
+ });
485
+ export const ListProposalsInput = z.object({
486
+ /** Optional surfacing filters — not enforcement. */
487
+ status: ProposalStatus.optional(),
488
+ risk: ProposalRisk.optional(),
489
+ domain: DomainId.optional(),
490
+ });
491
+ export const ListProposalsOutput = z.object({
492
+ proposals: z.array(ProposalRecord),
493
+ });
494
+ // ─── review_proposal (Auditor approval + autonomy matrix, ADR-DEV-124) ──────
495
+ /**
496
+ * A status-transition event for a proposal. Appended to proposals.jsonl as a NEW line
497
+ * (event-sourcing — the original ProposalRecord is never rewritten). readProposals folds
498
+ * the latest event per id into the record's effective status. ADR-DEV-124.
499
+ */
500
+ export const ProposalReviewEvent = z.object({
501
+ kind: z.literal("review"),
502
+ id: z.string(),
503
+ status: ProposalStatus,
504
+ /** Who authorized the transition. "auditor_auto" is matrix/toggle-gated in review_proposal. */
505
+ decided_by: z.enum(["den", "auditor_auto"]),
506
+ note: z.string().optional(),
507
+ reviewed_at: z.string(),
508
+ });
509
+ export const ReviewProposalInput = z.object({
510
+ id: z.string().min(1),
511
+ /** approve/reject act on a pending proposal; applied marks an approved one as written. */
512
+ decision: z.enum(["approve", "reject", "applied"]),
513
+ /** Authorizer. "auditor_auto" only valid for low/additive when the approval gate is OFF. */
514
+ decided_by: z.enum(["den", "auditor_auto"]),
515
+ note: z.string().optional(),
516
+ });
517
+ export const ReviewProposalOutput = z.object({
518
+ id: z.string(),
519
+ status: ProposalStatus,
520
+ risk: ProposalRisk,
521
+ decided_by: z.string(),
522
+ target: ProposalTarget,
523
+ /** Mandatory report — what was decided and the next step (e.g. apply via submit_artifact). */
524
+ next_step: z.string(),
525
+ });
303
526
  // ════════════════════════════════════════════════════════════════════════════
304
527
  // PHASE 2 — DEV-DOMAIN SPECIFIC (stubbed initially)
305
528
  // ════════════════════════════════════════════════════════════════════════════
@@ -398,6 +621,12 @@ export const TOOL_REGISTRY = {
398
621
  recent_decisions: { input: RecentDecisionsInput, output: RecentDecisionsOutput },
399
622
  regenerate_manifest: { input: RegenerateManifestInput, output: RegenerateManifestOutput },
400
623
  run_drift_audit: { input: RunDriftAuditInput, output: RunDriftAuditOutput },
624
+ audit_budget_compliance: { input: AuditBudgetComplianceInput, output: AuditBudgetComplianceOutput },
625
+ audit_bilocale_parity: { input: AuditBilocaleParityInput, output: AuditBilocaleParityOutput },
626
+ aggregate_run_metrics: { input: AggregateRunMetricsInput, output: AggregateRunMetricsOutput },
627
+ propose_change: { input: ProposeChangeInput, output: ProposeChangeOutput },
628
+ list_proposals: { input: ListProposalsInput, output: ListProposalsOutput },
629
+ review_proposal: { input: ReviewProposalInput, output: ReviewProposalOutput },
401
630
  // Phase 2
402
631
  run_tests: { input: RunTestsInput, output: RunTestsOutput },
403
632
  apply_diff: { input: ApplyDiffInput, output: ApplyDiffOutput },
@@ -6,8 +6,8 @@ import { z } from "zod";
6
6
  * `request_decision` → ADR → version bump of the shared types module (src/shared), then
7
7
  * propagate atomically to both consumers (installer + mcp).
8
8
  *
9
- * Sourced from: docs/architecture-redesign/2026-05-23-context.md
10
- * (sections: STRUCTURED METADATA, ARTEFACTS AND LIMITS).
9
+ * Source of truth: the structured-metadata + artefact-limit design (STRUCTURED
10
+ * METADATA, ARTEFACTS AND LIMITS).
11
11
  */
12
12
  /** Three pipeline shapes per domain. Full = all gates; Bugfix = compressed; Hotfix = single RG gate. */
13
13
  export declare const PipelineMode: z.ZodEnum<{
@@ -16,7 +16,79 @@ export declare const PipelineMode: z.ZodEnum<{
16
16
  hotfix: "hotfix";
17
17
  }>;
18
18
  export type PipelineMode = z.infer<typeof PipelineMode>;
19
- /** Full development pipeline (8 gates). Other domains may use a subset; pipeline.yaml declares which. */
19
+ /**
20
+ * Gate vocabulary is domain-scoped. Each domain declares its own gate enum; the
21
+ * exported `GateName` is the UNION of all of them, so every existing consumer
22
+ * (frontmatter, pipeline, task_state, tools) keeps compiling — it now accepts a
23
+ * superset. Domain isolation (a content gate must not be assigned to a dev role)
24
+ * is enforced via `DOMAIN_GATES` + `gateBelongsToDomain`, used in RoleFrontmatter.
25
+ */
26
+ /** Full development pipeline (8 gates). */
27
+ export declare const DevGateName: z.ZodEnum<{
28
+ PM: "PM";
29
+ UX: "UX";
30
+ ARCH: "ARCH";
31
+ DEV: "DEV";
32
+ REV: "REV";
33
+ OPS: "OPS";
34
+ TEST: "TEST";
35
+ RG: "RG";
36
+ }>;
37
+ export type DevGateName = z.infer<typeof DevGateName>;
38
+ /**
39
+ * Content pipeline gates. Mirrors AGENTS.yaml `pipeline:` for content.
40
+ * CONDUCTOR is the orchestrator phase (routes the pipeline), not a signable gate
41
+ * — same convention as development, where CONDUCTOR isn't a GateName either.
42
+ */
43
+ export declare const ContentGateName: z.ZodEnum<{
44
+ STRATEGIST: "STRATEGIST";
45
+ RESEARCHER: "RESEARCHER";
46
+ COPYWRITER: "COPYWRITER";
47
+ VISUAL_CONCEPT: "VISUAL_CONCEPT";
48
+ REVIEWER: "REVIEWER";
49
+ RELEASE_GATE: "RELEASE_GATE";
50
+ }>;
51
+ export type ContentGateName = z.infer<typeof ContentGateName>;
52
+ /**
53
+ * Analytics pipeline gates (8). Mirrors AGENTS.yaml `pipeline:` for analytics.
54
+ * CONDUCTOR is the orchestrator phase (routes the pipeline), not a signable gate
55
+ * — same convention as development/content. MEDIATOR is a normal gate: the
56
+ * adversarial "two camps" dynamic lives in the agent prompts, not the state
57
+ * machine (the gate sequence is linear, as declared in AGENTS.yaml).
58
+ */
59
+ export declare const AnalyticsGateName: z.ZodEnum<{
60
+ STRATEGIST: "STRATEGIST";
61
+ RESEARCHER: "RESEARCHER";
62
+ RELEASE_GATE: "RELEASE_GATE";
63
+ INTERVIEWER: "INTERVIEWER";
64
+ DATA_ANALYST: "DATA_ANALYST";
65
+ MEDIATOR: "MEDIATOR";
66
+ DESIGNER: "DESIGNER";
67
+ LAYOUTER: "LAYOUTER";
68
+ }>;
69
+ export type AnalyticsGateName = z.infer<typeof AnalyticsGateName>;
70
+ /**
71
+ * Product pipeline gates (10). Mirrors AGENTS.yaml `pipeline:` for product.
72
+ * CONDUCTOR is the orchestrator phase, not a signable gate — same convention as
73
+ * the other domains. DATA_ANALYST / MEDIATOR / DESIGNER / LAYOUTER / RELEASE_GATE
74
+ * overlap with analytics; the union dedupes them (see uniqueGates). The dual
75
+ * adversarial axes (Customer-vs-Business, Build-vs-Cut) live in the agent
76
+ * prompts, not the state machine — the gate sequence is linear.
77
+ */
78
+ export declare const ProductGateName: z.ZodEnum<{
79
+ PM: "PM";
80
+ RELEASE_GATE: "RELEASE_GATE";
81
+ DATA_ANALYST: "DATA_ANALYST";
82
+ MEDIATOR: "MEDIATOR";
83
+ DESIGNER: "DESIGNER";
84
+ LAYOUTER: "LAYOUTER";
85
+ DISCOVERY: "DISCOVERY";
86
+ PRODUCT_STRATEGIST: "PRODUCT_STRATEGIST";
87
+ UX_DESIGNER: "UX_DESIGNER";
88
+ TECH_LEAD: "TECH_LEAD";
89
+ }>;
90
+ export type ProductGateName = z.infer<typeof ProductGateName>;
91
+ /** All gate names across all domains. Superset — keeps the `GateName` contract stable. */
20
92
  export declare const GateName: z.ZodEnum<{
21
93
  PM: "PM";
22
94
  UX: "UX";
@@ -26,6 +98,21 @@ export declare const GateName: z.ZodEnum<{
26
98
  OPS: "OPS";
27
99
  TEST: "TEST";
28
100
  RG: "RG";
101
+ STRATEGIST: "STRATEGIST";
102
+ RESEARCHER: "RESEARCHER";
103
+ COPYWRITER: "COPYWRITER";
104
+ VISUAL_CONCEPT: "VISUAL_CONCEPT";
105
+ REVIEWER: "REVIEWER";
106
+ RELEASE_GATE: "RELEASE_GATE";
107
+ INTERVIEWER: "INTERVIEWER";
108
+ DATA_ANALYST: "DATA_ANALYST";
109
+ MEDIATOR: "MEDIATOR";
110
+ DESIGNER: "DESIGNER";
111
+ LAYOUTER: "LAYOUTER";
112
+ DISCOVERY: "DISCOVERY";
113
+ PRODUCT_STRATEGIST: "PRODUCT_STRATEGIST";
114
+ UX_DESIGNER: "UX_DESIGNER";
115
+ TECH_LEAD: "TECH_LEAD";
29
116
  }>;
30
117
  export type GateName = z.infer<typeof GateName>;
31
118
  /**
@@ -62,6 +149,13 @@ export declare const DomainId: z.ZodEnum<{
62
149
  product: "product";
63
150
  }>;
64
151
  export type DomainId = z.infer<typeof DomainId>;
152
+ /**
153
+ * Which gates belong to which domain — the isolation map. analytics/product are
154
+ * empty until their own governance sub-step migrates them (content-first pilot).
155
+ */
156
+ export declare const DOMAIN_GATES: Record<DomainId, readonly GateName[]>;
157
+ /** True if `gate` is a valid gate for `domain`. */
158
+ export declare function gateBelongsToDomain(gate: GateName, domain: DomainId): boolean;
65
159
  /**
66
160
  * Per 2026-05-23-context.md § МЕТРИКИ SKILLS:
67
161
  * mandatory → compliance in outputs, not invocation count
@@ -78,8 +172,8 @@ export declare const SkillType: z.ZodEnum<{
78
172
  export type SkillType = z.infer<typeof SkillType>;
79
173
  /** "den" = the user. "mcp" = auto-pass via deterministic check. "system" = circuit-breaker / audit. */
80
174
  export declare const Signer: z.ZodEnum<{
81
- mcp: "mcp";
82
175
  den: "den";
176
+ mcp: "mcp";
83
177
  system: "system";
84
178
  }>;
85
179
  export type Signer = z.infer<typeof Signer>;
@@ -90,6 +184,7 @@ export type Signer = z.infer<typeof Signer>;
90
184
  * the seeds here are placeholders for compile-time safety on shipped skills.
91
185
  */
92
186
  export declare const TechSeed: z.ZodEnum<{
187
+ mcp: "mcp";
93
188
  typescript: "typescript";
94
189
  node: "node";
95
190
  react: "react";
@@ -6,15 +6,22 @@ import { z } from "zod";
6
6
  * `request_decision` → ADR → version bump of the shared types module (src/shared), then
7
7
  * propagate atomically to both consumers (installer + mcp).
8
8
  *
9
- * Sourced from: docs/architecture-redesign/2026-05-23-context.md
10
- * (sections: STRUCTURED METADATA, ARTEFACTS AND LIMITS).
9
+ * Source of truth: the structured-metadata + artefact-limit design (STRUCTURED
10
+ * METADATA, ARTEFACTS AND LIMITS).
11
11
  */
12
12
  // ─── Pipeline mode ────────────────────────────────────────────────────────────
13
13
  /** Three pipeline shapes per domain. Full = all gates; Bugfix = compressed; Hotfix = single RG gate. */
14
14
  export const PipelineMode = z.enum(["full", "bugfix", "hotfix"]);
15
- // ─── Gates ────────────────────────────────────────────────────────────────────
16
- /** Full development pipeline (8 gates). Other domains may use a subset; pipeline.yaml declares which. */
17
- export const GateName = z.enum([
15
+ // ─── Gates (domain-scoped) ──────────────────────────────────────────────────
16
+ /**
17
+ * Gate vocabulary is domain-scoped. Each domain declares its own gate enum; the
18
+ * exported `GateName` is the UNION of all of them, so every existing consumer
19
+ * (frontmatter, pipeline, task_state, tools) keeps compiling — it now accepts a
20
+ * superset. Domain isolation (a content gate must not be assigned to a dev role)
21
+ * is enforced via `DOMAIN_GATES` + `gateBelongsToDomain`, used in RoleFrontmatter.
22
+ */
23
+ /** Full development pipeline (8 gates). */
24
+ export const DevGateName = z.enum([
18
25
  "PM",
19
26
  "UX",
20
27
  "ARCH",
@@ -24,6 +31,72 @@ export const GateName = z.enum([
24
31
  "TEST",
25
32
  "RG",
26
33
  ]);
34
+ /**
35
+ * Content pipeline gates. Mirrors AGENTS.yaml `pipeline:` for content.
36
+ * CONDUCTOR is the orchestrator phase (routes the pipeline), not a signable gate
37
+ * — same convention as development, where CONDUCTOR isn't a GateName either.
38
+ */
39
+ export const ContentGateName = z.enum([
40
+ "STRATEGIST",
41
+ "RESEARCHER",
42
+ "COPYWRITER",
43
+ "VISUAL_CONCEPT",
44
+ "REVIEWER",
45
+ "RELEASE_GATE",
46
+ ]);
47
+ /**
48
+ * Analytics pipeline gates (8). Mirrors AGENTS.yaml `pipeline:` for analytics.
49
+ * CONDUCTOR is the orchestrator phase (routes the pipeline), not a signable gate
50
+ * — same convention as development/content. MEDIATOR is a normal gate: the
51
+ * adversarial "two camps" dynamic lives in the agent prompts, not the state
52
+ * machine (the gate sequence is linear, as declared in AGENTS.yaml).
53
+ */
54
+ export const AnalyticsGateName = z.enum([
55
+ "INTERVIEWER",
56
+ "RESEARCHER",
57
+ "DATA_ANALYST",
58
+ "STRATEGIST",
59
+ "MEDIATOR",
60
+ "DESIGNER",
61
+ "LAYOUTER",
62
+ "RELEASE_GATE",
63
+ ]);
64
+ /**
65
+ * Product pipeline gates (10). Mirrors AGENTS.yaml `pipeline:` for product.
66
+ * CONDUCTOR is the orchestrator phase, not a signable gate — same convention as
67
+ * the other domains. DATA_ANALYST / MEDIATOR / DESIGNER / LAYOUTER / RELEASE_GATE
68
+ * overlap with analytics; the union dedupes them (see uniqueGates). The dual
69
+ * adversarial axes (Customer-vs-Business, Build-vs-Cut) live in the agent
70
+ * prompts, not the state machine — the gate sequence is linear.
71
+ */
72
+ export const ProductGateName = z.enum([
73
+ "DISCOVERY",
74
+ "PRODUCT_STRATEGIST",
75
+ "PM",
76
+ "UX_DESIGNER",
77
+ "TECH_LEAD",
78
+ "DATA_ANALYST",
79
+ "MEDIATOR",
80
+ "DESIGNER",
81
+ "LAYOUTER",
82
+ "RELEASE_GATE",
83
+ ]);
84
+ /**
85
+ * Dedupe shared gate names while keeping the literal union type. RELEASE_GATE
86
+ * (and DATA_ANALYST / MEDIATOR / DESIGNER / LAYOUTER) are shared across
87
+ * analytics + product; without this they would appear twice in `GateName.options`.
88
+ */
89
+ function uniqueGates(gates) {
90
+ return [...new Set(gates)];
91
+ }
92
+ /** All gate names across all domains. Superset — keeps the `GateName` contract stable. */
93
+ export const GateName = z.enum(uniqueGates([
94
+ ...DevGateName.options,
95
+ ...ContentGateName.options,
96
+ ...AnalyticsGateName.options,
97
+ ...ProductGateName.options,
98
+ ]));
99
+ // DOMAIN_GATES + gateBelongsToDomain live below DomainId (they reference it).
27
100
  // ─── Classification (the only decision channel before each gate transition) ──
28
101
  /**
29
102
  * LLM MUST classify each gate before producing artifact. Per the silent-by-default contract:
@@ -67,6 +140,20 @@ export const DomainId = z.enum([
67
140
  "analytics",
68
141
  "product",
69
142
  ]);
143
+ /**
144
+ * Which gates belong to which domain — the isolation map. analytics/product are
145
+ * empty until their own governance sub-step migrates them (content-first pilot).
146
+ */
147
+ export const DOMAIN_GATES = {
148
+ development: DevGateName.options,
149
+ content: ContentGateName.options,
150
+ analytics: AnalyticsGateName.options,
151
+ product: ProductGateName.options,
152
+ };
153
+ /** True if `gate` is a valid gate for `domain`. */
154
+ export function gateBelongsToDomain(gate, domain) {
155
+ return DOMAIN_GATES[domain].includes(gate);
156
+ }
70
157
  // ─── Skill typing (metric-determining) ───────────────────────────────────────
71
158
  /**
72
159
  * Per 2026-05-23-context.md § МЕТРИКИ SKILLS:
@@ -136,6 +223,8 @@ export const TechSeed = z.enum([
136
223
  // Added 2026-05-29 for Test Integrity Initiative DEV-094 (test-integrity-hooks-setup):
137
224
  "husky",
138
225
  "pre-commit",
226
+ // Added 2026-05-28 for Step 3 DEV-104 (mcp-integration mandatory skill):
227
+ "mcp",
139
228
  ]);
140
229
  export const TopicSeed = z.enum([
141
230
  "architecture",