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
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
2
  <h1>🤖 Code-AI Installer</h1>
3
- <p><b>The ultimate CLI tool to orchestrate AI Agents, Skills, and Workflows across multiple AI Coding Assistants.</b></p>
4
-
3
+ <p><b>Write a gated, multi-agent pipeline once — deploy it to any AI coding assistant, and run it through a bundled MCP orchestration server.</b></p>
4
+
5
5
  [![npm version](https://img.shields.io/npm/v/code-ai-installer.svg)](https://www.npmjs.com/package/code-ai-installer)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
7
  [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-green.svg)](https://nodejs.org)
@@ -9,149 +9,165 @@
9
9
 
10
10
  <br/>
11
11
 
12
- **Code-AI Installer** (`code-ai`) is a powerful, production-ready CLI that injects your `.agents/`, `.agents/skills/`, and `.agents/workflows/` directly into the specific environment layouts required by different AI tools. Write your agentic pipelines once, and deploy them universally to Copilot, Codex, Claude, Qwen, or Google Antigravity.
12
+ **Code-AI Installer** ships two things in one npm package:
13
+
14
+ 1. **`code-ai`** — a production-ready CLI that injects your `.agents/`, `.agents/skills/`, and `.agents/workflows/` into the exact environment layout each AI tool expects. Author your agentic pipelines once, deploy them to Copilot, Codex, Claude, Qwen, Kimi, or Google Antigravity.
15
+ 2. **`code-ai-mcp`** — a bundled MCP (Model Context Protocol) server that turns those agents and skills into a **governed, gate-by-gate pipeline**: each stage produces an artifact, gets classified, and waits for a human sign-off before the next stage runs. Auto-registered for Claude via `.mcp.json`.
16
+
17
+ > The agents, the skills, and the MCP server are one product: the agents assume the MCP gate tools exist, and the MCP server assumes the installer registered it. `npm install -g code-ai-installer` brings the whole thing.
13
18
 
14
19
  ---
15
20
 
16
21
  ## ✨ Features
17
22
 
18
- - 🚀 **Interactive Wizard**: Out-of-the-box interactive CLI to easily pick targets, agents, and skills.
19
- - 🌍 **Multi-AI Support**: Automatically adapts instructions, reasoning hints, and files for Copilot, GPT Codex, Claude, Qwen 3.5, and Google Antigravity.
20
- - 📦 **Standalone & Global**: Bundled with base templates—run it from anywhere on your machine!
21
- - 🛡️ **Bulletproof Safety**: Default `dry-run` mode, automatic backups to `.code-ai-installer/backups/`, and built-in rollbacks.
22
- - 🧠 **Smart Transformation**: Normalizes markdown content. Automatically translates target-native AI hints (e.g., mapping `codex reasoning` to `claude thinking` or `gemini reasoning`).
23
- - 🌐 **Localization**: First-class support for English (`en`) and Russian (`ru`).
23
+ - 🚪 **Gate-based pipeline** — agents don't free-run. Work advances through ordered gates (classify → produce → human sign-off → advance), enforced by the MCP server's state machine, with a circuit breaker on repeated rollbacks.
24
+ - 🧰 **Bundled MCP server** — `code-ai-mcp` exposes 31 tools (gate machine, skill fetch with telemetry, artifact/decision log, audit + action tools). Auto-wired into Claude's `.mcp.json` at install time.
25
+ - 🔭 **Self-improving Auditor** a meta-agent reads aggregate run metrics after ≥3 completed runs and *proposes* (never forces) tweaks to skills/agents; the human approves.
26
+ - 🚀 **Interactive wizard** pick target, domain, agents, and skills from a guided CLI.
27
+ - 🌍 **Multi-AI support** adapts instructions, reasoning hints, and file layout for Copilot, GPT Codex, Claude, Qwen 3.5, Moonshot Kimi, and Google Antigravity.
28
+ - 🛡️ **Bulletproof safety** default `dry-run`, automatic backups, built-in rollbacks.
29
+ - 🧠 **Smart transformation** — normalizes markdown and translates native AI hints (e.g. maps `codex reasoning` to `claude thinking` / `gemini reasoning`).
30
+ - 🌐 **Localization** — first-class English (`en`) and Russian (`ru`).
24
31
 
25
32
  ---
26
33
 
27
34
  ## 🏛️ Domain Architecture
28
35
 
29
- Code-AI Installer comes pre-bundled with dedicated professional systems separated by **Domains** to cleanly isolate workflows based on your project needs. You can choose which domain to deploy during installation:
36
+ Code-AI ships dedicated, self-contained professional systems separated by **domain**, each with its own roles, skills, and gate pipeline. Pick one per project at install time.
37
+
38
+ | Domain | Gates | What it is |
39
+ |---|:---:|---|
40
+ | 💻 **`development`** | 8 | End-to-end web app delivery: PM → UX → Architecture → Dev → Review → Ops → Test → Release Gate. Roles: Product Manager, UX/UI Designer, Architect, Senior Full-Stack, Reviewer, DevOps, QA Tester. |
41
+ | 📝 **`content`** | 6 | Digital content production: Strategist → Researcher → Copywriter → Visual Concept → Reviewer → Release Gate. |
42
+ | 📊 **`analytics`** | 8 | Business analysis modeled adversarially (Analysts vs Critics with a Mediator): Interviewer → Researcher → Data Analyst → Strategist → Mediator → Designer → Layouter → Release Gate. Strategic frameworks (SWOT, PEST, Porter, BCG, Blue Ocean, Ansoff, Unit Economics, Cohort, …). |
43
+ | 📦 **`product`** | 10 | B2B SaaS product management: Discovery → Product Strategist → PM → UX Designer → Tech Lead → Data Analyst → Mediator → Designer → Layouter → Release Gate. |
44
+
45
+ Every domain also carries a meta **Auditor** beside the pipeline. Each skill declares structured metadata (`type`, `owners`, `gates`, `triggers`) so the MCP server can surface the right skill at the right gate. Large reference libraries are split into a lean workflow skill + a `*-reference` companion.
46
+
47
+ ---
48
+
49
+ ## 🚪 The MCP Gate Pipeline
30
50
 
31
- - 💻 **Software Development Domain** (`development`): An 8-gate robust agentic pipeline tailored for end-to-end web app development. Includes roles like Product Manager, UX/UI Designer, Architect, Senior Full Stack Developer, Reviewer, DevOps, and QA Tester.
32
- - 📝 **Content Production Domain** (`content`): A creative pipeline dedicated to producing digital content (social media, blogs, visuals). Orchestrates roles such as Content Strategist, Copywriter, Researcher, and Visual Concept Designer.
33
- - 📊 **Business Analytics Domain** (`analytics`): An adversarial analytical pipeline with two competing teams (Analysts vs Critics) and a Mediator — plus Designer and Layouter for PDF reports. Strategic frameworks (SWOT, PEST, Porter's Five Forces, BCG, Blue Ocean, Ansoff, Unit Economics, Cohort, etc.).
34
- - 📦 **Product Management Domain** (`product`): A B2B SaaS product management pipeline — discovery → strategy → prioritization → PRD → UX → release → measurement. Dual adversarial axes: Customer-Champion vs Business-Champion on strategy, Build-Camp vs Cut-Camp on prioritization. Includes Discovery, Product Strategist, PM, UX Designer, Tech Lead, Data Analyst, Mediator, Designer, Layouter.
51
+ When you install for **Claude**, the installer registers `code-ai-mcp` in your project's `.mcp.json`. From then on, the agents drive the work *through the server*, not by free-form prompting:
35
52
 
36
- *(You can select your target domain during the interactive installation process!)*
53
+ 1. **`current_gate` / `classify_gate`** the conductor reads where the run is and classifies the gate outcome (`auto_resolve` / `fork` / `exception`).
54
+ 2. **`get_skill`** — the active role fetches the skills it owns at this gate (the fetch is logged as telemetry for the Auditor).
55
+ 3. **`submit_artifact` / `verify_claim`** — the role produces its deliverable; structured frontmatter and budgets are validated.
56
+ 4. **`sign_off` → `advance_gate`** — a human (or, where wired, an auto-check) signs the gate; only then does the pipeline move on. A circuit breaker halts repeated dev rollbacks and escalates to an architecture audit.
57
+ 5. **`record_decision` / `audit_trail`** — ADR-style decisions and exceptions are logged per run.
58
+
59
+ After enough completed runs, the **Auditor** calls `aggregate_run_metrics` and files `propose_change` suggestions (reviewed via `review_proposal`) — a build → run → measure → improve loop for the toolkit itself.
60
+
61
+ > MCP is currently a **Claude-specific** capability. Other targets receive the agent/skill markdown and run them as plain instructions.
37
62
 
38
63
  ---
39
64
 
40
65
  ## 🎯 Supported AI Targets
41
66
 
42
- - `vscode-copilot` / `copilot`
43
- - `gpt-codex` / `codex`
44
- - `claude`
45
- - `qwen-3.5` / `qwen`
46
- - `google-antigravity` / `antigravity`
47
- - `moonshot-kimi` / `kimi` (Kimi CLI + Kimi Code for VS Code)
67
+ | CLI target (and aliases) | Tool |
68
+ |---|---|
69
+ | `vscode-copilot` / `copilot` | VS Code Copilot |
70
+ | `gpt-codex` / `codex` | GPT Codex |
71
+ | `claude` | Claude (Claude Code) — **MCP server auto-wired** |
72
+ | `qwen-3.5` / `qwen` | Qwen 3.5 |
73
+ | `google-antigravity` / `antigravity` | Google Antigravity |
74
+ | `moonshot-kimi` / `kimi` | Moonshot Kimi (Kimi CLI + Kimi Code for VS Code) |
48
75
 
49
76
  ---
50
77
 
51
78
  ## 🔧 Installation
52
79
 
53
- ### 1. Global Installation (Recommended)
54
-
55
- Install the CLI globally to run it in any of your projects:
80
+ ### Global (recommended)
56
81
 
57
82
  ```bash
58
- # via npm
59
83
  npm install -g code-ai-installer
60
-
61
- # via pnpm, yarn, or bun
62
- pnpm add -g code-ai-installer
63
- yarn global add code-ai-installer
64
- bun add -g code-ai-installer
84
+ # or: pnpm add -g code-ai-installer / yarn global add code-ai-installer / bun add -g code-ai-installer
65
85
  ```
66
86
 
67
- Verify the installation:
87
+ Verify:
68
88
  ```bash
69
89
  code-ai --help
70
90
  ```
71
91
 
72
- ### 2. Local Installation (For Development)
92
+ ### From source (for development / contributing)
93
+
94
+ This is an npm-workspaces monorepo; the published package lives in `packages/installer`.
73
95
 
74
- If you are cloning this repository to build or contribute:
75
96
  ```bash
76
- git clone https://github.com/denish12/codex-ai-agent-and-skills.git
77
- cd codex-ai-agent-and-skills
97
+ git clone https://github.com/denish12/code-ai-monorepo.git
98
+ cd code-ai-monorepo
78
99
  npm install
79
100
  npm run build
80
- npm install -g .
101
+ npm install -g ./packages/installer
81
102
  ```
82
103
 
83
104
  ---
84
105
 
85
106
  ## 🚀 Usage
86
107
 
87
- ### The Interactive Wizard
88
- Just run `code-ai` inside your project directory to trigger the fully interactive guide:
108
+ ### Interactive wizard
109
+
110
+ Run `code-ai` inside your project to launch the guided installer (it also offers to wire the MCP server for Claude):
111
+
89
112
  ```bash
90
113
  code-ai
91
114
  ```
92
115
 
93
- ### CLI Commands & Flags
116
+ ### CLI commands & flags
94
117
 
95
118
  ```bash
96
- # List all supported targets
119
+ # List supported targets
97
120
  code-ai targets
98
121
 
99
- # List available agents and skills (--domain required since v3.0.0)
122
+ # List agents and skills in a domain (--domain required since v3.0.0)
100
123
  code-ai list --domain development
101
124
  code-ai list --domain content --lang en
102
125
 
103
- # Check system health and compatibility for a specific target + domain
126
+ # Health-check a target + domain
104
127
  code-ai doctor --target claude --domain development
105
128
 
106
- # Run a safe Dry-Run installation preview (Default)
129
+ # Dry-run preview (default — writes nothing)
107
130
  code-ai install --target claude --domain development --agents conductor,reviewer --skills board
108
131
 
109
- # Apply Installation (actually write files)
132
+ # Apply for real
110
133
  code-ai install --target gpt-codex --domain analytics --agents all --skills all --apply
111
134
 
112
- # Overwrite existing files securely
135
+ # Overwrite existing files
113
136
  code-ai install --target claude --domain content --agents all --skills all --overwrite --apply
114
137
 
115
- # Strict Mode (Enforces explicit target hints in agent files)
116
- code-ai install --target claude --domain product --agents all --skills all --strict-hints --apply
138
+ # For Claude: skip the optional MemPalace memory server (code-ai-mcp is still wired)
139
+ code-ai install --target claude --domain product --agents all --skills all --no-mempalace --apply
117
140
 
118
- # Uninstall / Clean up AI assets securely
141
+ # Uninstall / clean up AI assets
119
142
  code-ai uninstall --target claude --apply
120
143
  ```
121
144
 
122
145
  ---
123
146
 
124
- ## ⚠️ Migrating from v2.x to v3.0.0
125
-
126
- **v3.0.0 is a breaking release.** The legacy root layout (`AGENTS.md` + `agents/` + `.agents/` at package root) was removed. The CLI now exclusively reads from the `domains/<id>/` layout.
147
+ ## 🏗️ What gets generated?
127
148
 
128
- | Change | Before (v2.x) | After (v3.0.0) |
129
- |---|---|---|
130
- | Required flag | `--domain` optional | `--domain <name>` required (or `cwd` must contain a `domains/` directory) |
131
- | EN locale path | `locales/en/` | `domains/<id>/locales/en/` |
132
- | `--project-dir` accepts | legacy root or `domains/` layout | `domains/` layout only |
133
- | Bundled files | 11 entries incl. root `AGENTS.md` | 4 entries: `dist`, `LICENSE`, `README.md`, `domains` |
149
+ Depending on `--target`, `code-ai` restructures your project:
134
150
 
135
- **To migrate**: add `--domain development` (or `content`, `analytics`, `product`) to every CLI call. If you used a custom source via `--project-dir`, restructure it to contain `domains/<id>/domain.json` instead of a flat `AGENTS.md` + `agents/` layout.
151
+ 1. **Orchestration entry** `AGENTS.md` (plus tool aliases like `CLAUDE.md`, `CODEX.md`, `GEMINI.md`, `QWEN.md`, `KIMI.md`).
152
+ 2. **Agents** — roles copied into the target's layout (e.g. `.claude/agents/<role>.md`, `.github/copilot-instructions.md`).
153
+ 3. **Skills & workflows** — the execution skillsets, with per-tool metadata sidecars.
154
+ 4. **MCP wiring (Claude only)** — `.mcp.json` registering `code-ai-mcp` (run as `npx -p code-ai-installer code-ai-mcp`), plus an optional [MemPalace](https://www.npmjs.com/package/mempalace) memory server when present, and a `.code-ai/config.json` that records the active domain and decision-store backend.
136
155
 
137
156
  ---
138
157
 
139
- ## 🏗️ What Gets Generated?
158
+ ## 🧬 Versions & migration
140
159
 
141
- Depending on the chosen `--target`, `code-ai` restructures your environment intelligently:
160
+ `code-ai-installer` is on **v4.0.0**.
142
161
 
143
- 1. **Root Orchestration Rules**: Generates `AGENTS.md` (and alias files like `CLAUDE.md`, `CODEX.md`, `GEMINI.md`, etc.).
144
- 2. **Agents**: Copies roles to target-specific directories (e.g., `.gemini/agents/<agent>/prompt.md`, `.github/copilot-instructions.md`).
145
- 3. **Skills & Workflows**: Deploys the necessary execution skillsets and custom workflows specific to the target AI.
146
- 4. **Configuration**: Generates workspace settings (e.g., `.qwen/settings.json`).
162
+ - **v4.0.0** consolidated the previously separate `code-ai-mcp` and types packages into this single package with **two bins** (`code-ai` + `code-ai-mcp`). Installing the CLI now also delivers the MCP server; for Claude it is auto-registered in `.mcp.json`. Existing 3.x CLI behavior is unchanged.
163
+ - **v3.0.0 (breaking)** removed the legacy flat root layout (`AGENTS.md` + `agents/` + `.agents/` at package root); the CLI now reads exclusively from `domains/<id>/`. **Migrating from v2.x:** add `--domain <development|content|analytics|product>` to every CLI call. If you used a custom `--project-dir`, restructure it to `domains/<id>/` instead of a flat layout.
147
164
 
148
165
  ---
149
166
 
150
167
  ## 🤝 Contributing
151
168
 
152
- Contributions, issues, and feature requests are welcome!
153
- Feel free to check out the [issues page](https://github.com/denish12/codex-ai-agent-and-skills/issues).
169
+ Contributions, issues, and feature requests are welcome — see the [issues page](https://github.com/denish12/code-ai-monorepo/issues).
154
170
 
155
171
  ## 📄 License
156
172
 
157
- This project is [MIT](https://opensource.org/licenses/MIT) licensed.
173
+ [MIT](https://opensource.org/licenses/MIT).
package/dist/index.js CHANGED
@@ -224,6 +224,7 @@ program
224
224
  destinationDir,
225
225
  wantMempalace: options.withMempalace,
226
226
  dryRun: false,
227
+ ...(domainId ? { domain: domainId } : {}),
227
228
  });
228
229
  for (const notice of report.notices)
229
230
  info(` ${notice}`);
@@ -484,6 +485,7 @@ async function runInteractiveWizard() {
484
485
  destinationDir,
485
486
  wantMempalace,
486
487
  dryRun: false,
488
+ ...(selectedDomainId ? { domain: selectedDomainId } : {}),
487
489
  });
488
490
  for (const notice of report.notices)
489
491
  info(` ${notice}`);
@@ -0,0 +1,12 @@
1
+ import { RunScorecard } from "./scorecard.js";
2
+ import type { TaskState } from "./task_state.js";
3
+ /** Append one scorecard as a JSON line to the run ledger (creates dir if needed). */
4
+ export declare function appendScorecard(card: RunScorecard): Promise<void>;
5
+ /** Read all scorecards from the ledger. Malformed / partial lines are skipped. */
6
+ export declare function readLedger(): Promise<RunScorecard[]>;
7
+ /**
8
+ * Build + append a scorecard for a completed run. Called from sign_off when RG
9
+ * is signed. Best-effort by contract: callers MUST NOT let a ledger failure
10
+ * break a sign-off (telemetry is never load-bearing for the gate).
11
+ */
12
+ export declare function recordRunScorecard(state: TaskState): Promise<void>;
@@ -0,0 +1,82 @@
1
+ import { mkdir, readFile, appendFile } from "node:fs/promises";
2
+ import { dirname, join } from "node:path";
3
+ import { resolveAuditLedgerPath } from "./paths.js";
4
+ import { RunScorecard, buildScorecard } from "./scorecard.js";
5
+ import { readSkillInvocations } from "./skill_invocations.js";
6
+ /** Append one scorecard as a JSON line to the run ledger (creates dir if needed). */
7
+ export async function appendScorecard(card) {
8
+ const path = resolveAuditLedgerPath();
9
+ await mkdir(dirname(path), { recursive: true });
10
+ await appendFile(path, JSON.stringify(card) + "\n", "utf8");
11
+ }
12
+ /** Read all scorecards from the ledger. Malformed / partial lines are skipped. */
13
+ export async function readLedger() {
14
+ const raw = await readFile(resolveAuditLedgerPath(), "utf8").catch(() => "");
15
+ if (!raw)
16
+ return [];
17
+ const cards = [];
18
+ for (const line of raw.split("\n")) {
19
+ if (!line.trim())
20
+ continue;
21
+ try {
22
+ cards.push(RunScorecard.parse(JSON.parse(line)));
23
+ }
24
+ catch {
25
+ continue; // tolerate hand-edits / schema drift; surfacing tool, not enforcer
26
+ }
27
+ }
28
+ return cards;
29
+ }
30
+ /**
31
+ * Count exceptions (grouped by gate) and decisions for a task from the jsonl
32
+ * side logs. Plain reads — no DecisionStore/MemPalace dependency in the hot path.
33
+ */
34
+ async function readSideCounts(taskId) {
35
+ const stateDir = join(process.cwd(), ".code-ai", "state");
36
+ const exceptions_by_gate = {};
37
+ const rawExc = await readFile(join(stateDir, "exceptions.jsonl"), "utf8").catch(() => "");
38
+ for (const line of rawExc.split("\n")) {
39
+ if (!line.trim())
40
+ continue;
41
+ try {
42
+ const o = JSON.parse(line);
43
+ if (o.task_id !== taskId)
44
+ continue;
45
+ const g = typeof o.gate === "string" ? o.gate : "unknown";
46
+ exceptions_by_gate[g] = (exceptions_by_gate[g] ?? 0) + 1;
47
+ }
48
+ catch {
49
+ continue;
50
+ }
51
+ }
52
+ let decisions_count = 0;
53
+ const rawDec = await readFile(join(stateDir, "decisions.jsonl"), "utf8").catch(() => "");
54
+ for (const line of rawDec.split("\n")) {
55
+ if (!line.trim())
56
+ continue;
57
+ try {
58
+ const o = JSON.parse(line);
59
+ if (o.task_id === taskId && !String(o.adr_id ?? "").startsWith("ADR-PENDING-")) {
60
+ decisions_count++;
61
+ }
62
+ }
63
+ catch {
64
+ continue;
65
+ }
66
+ }
67
+ const skillEvents = await readSkillInvocations(taskId);
68
+ return {
69
+ exceptions_by_gate,
70
+ decisions_count,
71
+ skill_invocations: skillEvents.map((e) => ({ skill: e.skill, gate: e.gate })),
72
+ };
73
+ }
74
+ /**
75
+ * Build + append a scorecard for a completed run. Called from sign_off when RG
76
+ * is signed. Best-effort by contract: callers MUST NOT let a ledger failure
77
+ * break a sign-off (telemetry is never load-bearing for the gate).
78
+ */
79
+ export async function recordRunScorecard(state) {
80
+ const extras = await readSideCounts(state.task_id);
81
+ await appendScorecard(buildScorecard(state, extras));
82
+ }
package/dist/mcp/cli.js CHANGED
@@ -26,7 +26,7 @@ const SERVER_INFO = {
26
26
  const TOOL_DESCRIPTIONS = {
27
27
  load_role: "Load an agent role: frontmatter, body, merged persona, and the role's skill list. Use at SessionStart for an agent.",
28
28
  list_skills: "List skills in a domain. Optional filters: type, gate, tech, topic, owner.",
29
- get_skill: "Fetch a skill's frontmatter + body by name.",
29
+ get_skill: "Fetch a skill's frontmatter + body by name. Pass task_id (+ optional gate) to log the fetch as a skill invocation for Auditor telemetry; omit for plain lookups.",
30
30
  request_decision: "Open a pending decision envelope. Returns a synthetic ADR-PENDING id; Claude relays the question to DEN in chat, then commits the answer via record_decision.",
31
31
  record_decision: "Commit a chosen decision: writes ADR file, decision log entry, and KG triple. Resets the circuit breaker on new ARCH ADR.",
32
32
  classify_gate: "Record the current gate's classification (auto_resolve / fork / exception) with a rationale.",
@@ -42,6 +42,12 @@ const TOOL_DESCRIPTIONS = {
42
42
  recent_decisions: "Read recent ADR decisions from the decision log with optional domain/signer/since filters.",
43
43
  regenerate_manifest: "Regenerate AGENTS.yaml skills list from disk SKILL.md frontmatter. Detects AGENTS.md drift (skills on disk but not referenced).",
44
44
  run_drift_audit: "[stub] Detect drift between SKILL.md frontmatter and AGENTS.md references.",
45
+ audit_budget_compliance: "Audit budget_lines compliance for agent.md and SKILL.md across a domain. Surfaces schema-cap violations (declared > schema max) and budget violations (actual lines > declared budget). Pass domain='*' to scan all domains. Read-only; scans both RU and EN locales.",
46
+ audit_bilocale_parity: "Audit RU/EN locale parity for agent.md and SKILL.md across a domain. Pairs each file with its sibling in the other locale and surfaces declared-budget mismatches (ru budget_lines != en), actual line-count mismatches (ru lines != en — the design-intake drift class), and orphans (file present in one locale only). Pass domain='*' to scan all domains. Read-only.",
47
+ aggregate_run_metrics: "Aggregate completed-run scorecards from the local audit ledger (.code-ai/state/audit/runs.jsonl) into deterministic per-agent (gate→role), per-workflow (mode), and per-skill (invocation frequency) statistics. min_runs (default 3) guards small samples. Read-only; the Auditor's data foundation — numbers only, no judgment.",
48
+ propose_change: "Record an Auditor proposal (a draft change to an agent/skill) as a pending entry in the local proposal store (.code-ai/state/audit/proposals.jsonl). Carries change_kind (edit_minor/add_asset/destructive → risk tier), rationale, evidence, threshold_met, and the inline draft. Pure surfacing — writes nothing to the asset; inert until approved/applied (item 4b).",
49
+ list_proposals: "List stored Auditor proposals, newest first, with optional filters (status / risk / domain). Read-only.",
50
+ review_proposal: "Authorize a proposal status transition (approve/reject a pending one; mark an approved one applied) and get a mandatory report. Enforces the autonomy matrix + .code-ai/config.json approval gate: decided_by='auditor_auto' may approve only low/additive AND only when the gate is OFF; destructive (high) and gate-ON always require den. Auto-adding a new skill also runs an additive-dedup guard — if it overlaps an existing skill it is routed to den, not auto-added. Authorization only — the byte write into the asset is a separate submit_artifact/edit step (see next_step).",
45
51
  run_tests: "[stub] Run the test suite for a target (vitest / pytest).",
46
52
  apply_diff: "[stub] Apply a unified diff to a file with safety checks.",
47
53
  git_commit: "[stub] Stage and commit changes through a typed contract instead of raw shell.",
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { DomainId } from "../shared/index.js";
2
3
  /**
3
4
  * Runtime configuration read from `.code-ai/config.json` (cwd-relative).
4
5
  *
@@ -15,8 +16,17 @@ declare const CodeAiConfigSchema: z.ZodObject<{
15
16
  mempalace: "mempalace";
16
17
  jsonl: "jsonl";
17
18
  }>>;
19
+ domain: z.ZodDefault<z.ZodEnum<{
20
+ development: "development";
21
+ content: "content";
22
+ analytics: "analytics";
23
+ product: "product";
24
+ }>>;
18
25
  mempalace_command: z.ZodDefault<z.ZodString>;
19
26
  mempalace_args: z.ZodDefault<z.ZodArray<z.ZodString>>;
27
+ auditor: z.ZodDefault<z.ZodObject<{
28
+ approval_gate: z.ZodDefault<z.ZodBoolean>;
29
+ }, z.core.$strip>>;
20
30
  }, z.core.$strip>;
21
31
  export type CodeAiConfig = z.infer<typeof CodeAiConfigSchema>;
22
32
  /**
@@ -25,4 +35,17 @@ export type CodeAiConfig = z.infer<typeof CodeAiConfigSchema>;
25
35
  * Failure is silent — the caller proceeds with `JsonlStore`.
26
36
  */
27
37
  export declare function loadCodeAiConfig(): Promise<CodeAiConfig>;
38
+ /**
39
+ * The active domain for this project — which `pipeline.yaml` the gate tools
40
+ * (classify_gate, advance_gate, current_gate, sign_off, record_decision,
41
+ * aggregate_run_metrics) read. Sourced from `.code-ai/config.json`; defaults to
42
+ * "development" when unset.
43
+ *
44
+ * This is an ADDRESS, not a safety control: gate enforcement (no skipping,
45
+ * sign-off-before-advance, classify-required, circuit breaker) lives in the
46
+ * tool logic + the domain's `pipeline.yaml`, not in this string. De-hardcoding
47
+ * the address only makes each project read its OWN pipeline instead of always
48
+ * development's.
49
+ */
50
+ export declare function resolveActiveDomain(): Promise<DomainId>;
28
51
  export {};
@@ -1,6 +1,7 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
3
  import { z } from "zod";
4
+ import { DomainId } from "../shared/index.js";
4
5
  /**
5
6
  * Runtime configuration read from `.code-ai/config.json` (cwd-relative).
6
7
  *
@@ -14,16 +15,38 @@ import { z } from "zod";
14
15
  */
15
16
  const CodeAiConfigSchema = z.object({
16
17
  decision_store: z.enum(["jsonl", "mempalace"]).default("jsonl"),
17
- /** Override the binary name for the MemPalace MCP server. */
18
- mempalace_command: z.string().min(1).default("mempalace"),
19
- /** Optional extra args appended after the `mcp` subcommand. */
20
- mempalace_args: z.array(z.string()).default(["mcp"]),
18
+ /**
19
+ * The active domain — which `domains/<domain>/pipeline.yaml` the gate tools
20
+ * read. Written by the installer at install time. Defaults to "development"
21
+ * for backward compatibility: a project with no `domain` field (or no config
22
+ * file at all) behaves exactly as before this field existed.
23
+ */
24
+ domain: DomainId.default("development"),
25
+ /** Override the binary for the MemPalace MCP server (dedicated stdio bin). */
26
+ mempalace_command: z.string().min(1).default("mempalace-mcp"),
27
+ /** Args for the MemPalace MCP server. The dedicated `mempalace-mcp` bin needs
28
+ * none; the old `mempalace mcp` subcommand pollutes stdout and breaks the
29
+ * stdio MCP handshake, so it is no longer the default. */
30
+ mempalace_args: z.array(z.string()).default([]),
31
+ /** Auditor self-improvement controls (ADR-DEV-124). */
32
+ auditor: z
33
+ .object({
34
+ /**
35
+ * Approval gate. true (default) = Auditor proposes, a human approves every change.
36
+ * false = autonomy on: the Auditor may self-approve low/additive changes; destructive
37
+ * always still needs a human (ADR-DEV-122 matrix). Enforced in review_proposal.
38
+ */
39
+ approval_gate: z.boolean().default(true),
40
+ })
41
+ .default({ approval_gate: true }),
21
42
  });
22
43
  /** Empty config defaults — returned when the file is missing or unreadable. */
23
44
  const DEFAULT_CONFIG = {
24
45
  decision_store: "jsonl",
25
- mempalace_command: "mempalace",
26
- mempalace_args: ["mcp"],
46
+ mempalace_command: "mempalace-mcp",
47
+ mempalace_args: [],
48
+ auditor: { approval_gate: true },
49
+ domain: "development",
27
50
  };
28
51
  /**
29
52
  * Load `.code-ai/config.json` relative to `process.cwd()`. Returns safe
@@ -46,3 +69,18 @@ export async function loadCodeAiConfig() {
46
69
  return DEFAULT_CONFIG;
47
70
  }
48
71
  }
72
+ /**
73
+ * The active domain for this project — which `pipeline.yaml` the gate tools
74
+ * (classify_gate, advance_gate, current_gate, sign_off, record_decision,
75
+ * aggregate_run_metrics) read. Sourced from `.code-ai/config.json`; defaults to
76
+ * "development" when unset.
77
+ *
78
+ * This is an ADDRESS, not a safety control: gate enforcement (no skipping,
79
+ * sign-off-before-advance, classify-required, circuit breaker) lives in the
80
+ * tool logic + the domain's `pipeline.yaml`, not in this string. De-hardcoding
81
+ * the address only makes each project read its OWN pipeline instead of always
82
+ * development's.
83
+ */
84
+ export async function resolveActiveDomain() {
85
+ return (await loadCodeAiConfig()).domain;
86
+ }
@@ -6,8 +6,7 @@
6
6
  * stubs until pre-req #3 (baseline prototype) wires the first four:
7
7
  * load_role, list_skills, request_decision, record_decision.
8
8
  *
9
- * See README.md for the full tool surface, and ../../docs/architecture-redesign/
10
- * for the architectural plan this package implements.
9
+ * See README.md for the full tool surface and architectural overview.
11
10
  */
12
11
  export declare const VERSION = "0.0.0";
13
12
  export { CodeAiMcpServer } from "./server.js";
package/dist/mcp/index.js CHANGED
@@ -6,8 +6,7 @@
6
6
  * stubs until pre-req #3 (baseline prototype) wires the first four:
7
7
  * load_role, list_skills, request_decision, record_decision.
8
8
  *
9
- * See README.md for the full tool surface, and ../../docs/architecture-redesign/
10
- * for the architectural plan this package implements.
9
+ * See README.md for the full tool surface and architectural overview.
11
10
  */
12
11
  export const VERSION = "0.0.0";
13
12
  export { CodeAiMcpServer } from "./server.js";
@@ -1,7 +1,5 @@
1
1
  import { type DomainId } from "../shared/index.js";
2
2
  export declare const INSTALLER_ROOT: string;
3
- export declare const DOCS_ROOT: string;
4
- export declare const PERSONA_ROOT: string;
5
3
  /**
6
4
  * ADR write root. Resolved at call time relative to process.cwd() so the MCP
7
5
  * doesn't pollute the monorepo when invoked from a user project. Tests rely
@@ -9,6 +7,12 @@ export declare const PERSONA_ROOT: string;
9
7
  */
10
8
  export declare function resolveAdrRoot(): string;
11
9
  export declare function resolveDomainRoot(domain: DomainId): string;
10
+ /**
11
+ * Universal base-persona markdown for a domain. Shipped inside the package at
12
+ * `domains/<domain>/persona/persona-base.md` (was `docs/architecture-redesign/`
13
+ * pre-migration, which never shipped to npm). Same content across domains.
14
+ */
15
+ export declare function resolvePersonaBase(domain: DomainId): string;
12
16
  export declare function resolveSkillsRoot(domain: DomainId): string;
13
17
  export declare function resolveAgentsDir(domain: DomainId): string;
14
18
  export declare function resolveAgentMd(domain: DomainId, role: string): string;
@@ -18,3 +22,17 @@ export declare function resolvePipelineYaml(domain: DomainId): string;
18
22
  * convention as resolveAdrRoot() so the MCP doesn't pollute the host repo.
19
23
  */
20
24
  export declare function resolveTaskStateRoot(): string;
25
+ /**
26
+ * Audit run-ledger path. Same cwd-relative convention as resolveTaskStateRoot()
27
+ * so the Auditor reads the user-install's local history; tests chdir into a tmp
28
+ * dir. Append-only JSONL, one run scorecard per line.
29
+ */
30
+ export declare function resolveAuditLedgerPath(): string;
31
+ /** Skill-invocation telemetry log. Same cwd-relative convention as the run ledger. */
32
+ export declare function resolveSkillInvocationsPath(): string;
33
+ /**
34
+ * Auditor proposal store. Same cwd-relative convention as the run ledger;
35
+ * append-only JSONL, one proposal per line. Written by propose_change, read by
36
+ * list_proposals (and later the approval/apply machinery, item 4b).
37
+ */
38
+ export declare function resolveProposalsPath(): string;
package/dist/mcp/paths.js CHANGED
@@ -5,7 +5,7 @@ import { dirname, join, resolve } from "node:path";
5
5
  *
6
6
  * Convention: the MCP runs from inside the `code-ai-installer` package, so we
7
7
  * walk up from this file's location to the installer root (where `domains/`
8
- * lives) and to the monorepo root (where `docs/` lives during development).
8
+ * lives everything the runtime reads ships under it).
9
9
  *
10
10
  * Layout reference:
11
11
  * src layout (vitest, tsx):
@@ -17,10 +17,6 @@ import { dirname, join, resolve } from "node:path";
17
17
  const HERE = dirname(fileURLToPath(import.meta.url));
18
18
  // .../packages/installer/{src|dist}/mcp/paths.{ts|js} → .../packages/installer
19
19
  export const INSTALLER_ROOT = resolve(HERE, "..", "..");
20
- // → .../packages → monorepo
21
- const MONOREPO_ROOT = resolve(INSTALLER_ROOT, "..", "..");
22
- export const DOCS_ROOT = join(MONOREPO_ROOT, "docs");
23
- export const PERSONA_ROOT = join(DOCS_ROOT, "architecture-redesign");
24
20
  /**
25
21
  * ADR write root. Resolved at call time relative to process.cwd() so the MCP
26
22
  * doesn't pollute the monorepo when invoked from a user project. Tests rely
@@ -32,6 +28,14 @@ export function resolveAdrRoot() {
32
28
  export function resolveDomainRoot(domain) {
33
29
  return join(INSTALLER_ROOT, "domains", domain);
34
30
  }
31
+ /**
32
+ * Universal base-persona markdown for a domain. Shipped inside the package at
33
+ * `domains/<domain>/persona/persona-base.md` (was `docs/architecture-redesign/`
34
+ * pre-migration, which never shipped to npm). Same content across domains.
35
+ */
36
+ export function resolvePersonaBase(domain) {
37
+ return join(resolveDomainRoot(domain), "persona", "persona-base.md");
38
+ }
35
39
  export function resolveSkillsRoot(domain) {
36
40
  return join(resolveDomainRoot(domain), ".agents", "skills");
37
41
  }
@@ -51,3 +55,23 @@ export function resolvePipelineYaml(domain) {
51
55
  export function resolveTaskStateRoot() {
52
56
  return join(process.cwd(), ".code-ai", "state", "tasks");
53
57
  }
58
+ /**
59
+ * Audit run-ledger path. Same cwd-relative convention as resolveTaskStateRoot()
60
+ * so the Auditor reads the user-install's local history; tests chdir into a tmp
61
+ * dir. Append-only JSONL, one run scorecard per line.
62
+ */
63
+ export function resolveAuditLedgerPath() {
64
+ return join(process.cwd(), ".code-ai", "state", "audit", "runs.jsonl");
65
+ }
66
+ /** Skill-invocation telemetry log. Same cwd-relative convention as the run ledger. */
67
+ export function resolveSkillInvocationsPath() {
68
+ return join(process.cwd(), ".code-ai", "state", "skill_invocations.jsonl");
69
+ }
70
+ /**
71
+ * Auditor proposal store. Same cwd-relative convention as the run ledger;
72
+ * append-only JSONL, one proposal per line. Written by propose_change, read by
73
+ * list_proposals (and later the approval/apply machinery, item 4b).
74
+ */
75
+ export function resolveProposalsPath() {
76
+ return join(process.cwd(), ".code-ai", "state", "audit", "proposals.jsonl");
77
+ }