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
@@ -1,172 +1,256 @@
1
- ---
2
- name: current-state-analysis
3
- description: Analysis of the current repository architecture — conventions, patterns, tech debt, scaling bottlenecks, security risks, and consistency.
4
- type: discretionary
5
- domain: development
6
- owners:
7
- - architect
8
- gates:
9
- - ARCH
10
- tech: []
11
- topic:
12
- - architecture
13
- triggers:
14
- - codebase analysis
15
- - current architecture
16
- - tech debt
17
- - bottlenecks
18
- - repo review
19
- - current state
20
- related:
21
- - system-design-checklist
22
- - architecture-doc
23
- - architecture-doc-reference
24
- - architecture-compliance-review
25
- - lava-flow-legacy-detection
26
- - adr-log
27
- - adr-log-reference
28
- - threat-model-baseline
29
- - security-baseline-dev
30
- - observability-plan
31
- - observability-logging
32
- budget_lines: 265
33
- schema_version: 1
34
- ---
35
-
36
-
37
- # Skill: Current State Analysis
38
-
39
- How to audit a repository before making major architectural decisions or refactoring.
40
-
41
- **Sections:**
42
- 1. [When to use](#1-when-to-use)
43
- 2. [Workflow](#2-workflow)
44
- 3. [Analysis Areas](#3-analysis-areas)
45
- 4. [Output Template](#4-output)
46
-
47
- ---
48
-
49
- ## 1. When to use
50
-
51
- The Architect or Senior Full Stack agent uses this skill:
52
- - **During Discovery:** When taking over an existing repository.
53
- - **Before major refactoring:** To understand the baseline.
54
- - **Before system design:** To identify constraints and existing patterns that shouldn't be duplicated.
55
-
56
- ---
57
-
58
- ## 2. Workflow
59
-
60
- ```
61
- 1. Get the repository structure (find_by_name, ls)
62
- 2. Identify the technology stack (package.json, go.mod, dockerfile)
63
- 3. For each analysis area (Architecture, Data, UI, DX):
64
- a. Sample 3-5 representative files
65
- b. Look for consistency (e.g., are there 3 ways to fetch data?)
66
- c. Identify red flags (hardcoded secrets, missing auth, god objects)
67
- 4. Synthesize the findings into the Analysis Report
68
- 5. Propose immediate remediation steps (if requested)
69
- ```
70
-
71
- ---
72
-
73
- ## 3. Analysis Areas
74
-
75
- ### 3.1 Architecture & Structure
76
-
77
- Check how the code is organized.
78
-
79
- | What to look for | Tooling / Pattern | Good | Bad |
80
- |------------------|-------------------|------|-----|
81
- | **Module boundaries** | `find_by_name`, structure | By feature (`features/products`) or layer (`src/controllers`) | Flat `src/` with 50 files, or `misc/` folder |
82
- | **Data flow** | `grep "fetch("` or `grep "axios"` | Through explicit services/API clients | Directly from UI components |
83
- | **State management** | `package.json`, React Context | Zustand, RTK Query, or well-scoped Context | Prop drilling 5 levels deep, redundant global state |
84
- | **Routing** | React Router / Next.js app dir | Centralized, lazy loaded where needed | Scattered `<Route>` definitions, no 404 handling |
85
-
86
- ### 3.2 Code Quality & Consistency
87
-
88
- Check if the team is writing code the same way.
89
-
90
- | What to look for | Tooling / Pattern | Good | Bad |
91
- |------------------|-------------------|------|-----|
92
- | **Linting/Formatting**| `package.json` (ESLint, Biome, Prettier) | Strict CI checks, `biome.json` | Missing, or lots of `eslint-disable` |
93
- | **Naming Conventions**| Sampling files | `camelCase` for vars, `PascalCase` for React | Mixed `snake_case` and `camelCase` in JS |
94
- | **Component Size** | File sizes | < 200 lines, focused | 1000+ line God Components |
95
- | **Testing** | `__tests__` or `*.test.ts` | High coverage on business logic | No tests, or only empty generated tests |
96
-
97
- ### 3.3 Security & Resiliency
98
-
99
- Check for obvious vulnerabilities and fragility.
100
-
101
- | What to look for | Tooling / Pattern | Good | Bad |
102
- |------------------|-------------------|------|-----|
103
- | **Secrets** | `grep "API_KEY"` or `grep "password"` | Environment variables (`process.env`) | Hardcoded tokens in source code |
104
- | **Authentication** | Middleware/HOCs | Centralized auth check / protected routes | Ad-hoc checks, leaked sensitive data |
105
- | **Error Handling** | `try/catch`, Error Boundaries | Global error boundary, unified API error format | Unhandled promise rejections, blank screens |
106
- | **Dependencies** | `npm audit`, `package.json` | Up-to-date, minimal external deps | Known vulnerabilities, 5 different date libraries |
107
-
108
- ### 3.4 UI & Performance
109
-
110
- Check how the frontend is built and how it performs.
111
-
112
- | What to look for | Tooling / Pattern | Good | Bad |
113
- |------------------|-------------------|------|-----|
114
- | **Styling Strategy** | CSS Modules, Tailwind, WDS | Consistent use of one strategy | Mixed inline styles, global CSS, and Tailwind |
115
- | **Rendering** | Over-fetching, hydration | Memoization where needed, optimized images | 10MB bundle, `useEffect` infinite loops |
116
- | **Accessibility (a11y)**| `aria-`, semantic HTML | `<button>`, native focus, correct contrast | `onClick` on `<div>` without keyboard support |
117
-
118
- ---
119
-
120
- ## 4. Output Template
121
-
122
- ```markdown
123
- # Current State Analysis: <Project/Module Name>
124
-
125
- **Date:** YYYY-MM-DD
126
- **Analyst:** <Agent Role>
127
-
128
- ## 1. Executive Summary
129
- <2-3 sentences summarizing the overall health and major findings.>
130
-
131
- ## 2. Tech Stack & Architecture
132
- - **Frontend:** React 18, Vite, Zustand
133
- - **Backend:** Node.js, Express (if monolithic repo)
134
- - **Styling:** CSS Modules
135
- - **Pattern:** Layered architecture (Controllers -> Services)
136
-
137
- ## 3. Findings
138
-
139
- ### 3.1 Architecture & Consistency
140
- - **Good:** Routing is centralized in `src/routes.tsx`.
141
- - ⚠️ **Warning:** Two different data fetching patterns found (raw `fetch` vs custom `apiClient`). Need to unify.
142
- - 🔴 **Red Flag:** `Dashboard.jsx` is 850 lines long and handles rendering, data fetching, and complex logic (God Object).
143
-
144
- ### 3.2 Security & Error Handling
145
- - **Good:** Passwords are never sent to the client.
146
- - 🔴 **Red Flag:** Production API keys found hardcoded in `src/config/keys.js`. (Requires immediate rotation and .env extraction).
147
- - ⚠️ **Warning:** Missing global React Error Boundary. Unhandled exceptions crash the whole tree.
148
-
149
- ### 3.3 UI & Code Quality
150
- - **Good:** ESLint is configured and running strictly.
151
- - ⚠️ **Warning:** Minimal unit test coverage (only 3 tests exist).
152
-
153
- ## 4. Recommendations & Tech Debt
154
-
155
- **Immediate Remediation (P0):**
156
- 1. Extract secrets from `src/config/keys.js` to `.env`.
157
- 2. Refactor `Dashboard.jsx` into smaller pure components.
158
-
159
- **Short-term Tech Debt (P1):**
160
- 1. Unify data fetching to use `apiClient` exclusively.
161
- 2. Implement global Error Boundary.
162
-
163
- **Long-term Strategy (P2):**
164
- 1. Introduce Vitest for unit testing critical services.
165
- ```
166
-
167
- ---
168
-
169
- ## See also
170
- - `$architecture-doc` Use the analysis to propose the new architecture.
171
- - `$system-design-checklist` To ensure no areas are missed during redesign.
172
- - `$security-review-baseline` For deeper security audits.
1
+ ---
2
+ name: current-state-analysis
3
+ description: Analysis of the current repository architecture — conventions, patterns, tech debt, scaling bottlenecks, security risks, and consistency.
4
+ type: discretionary
5
+ domain: development
6
+ owners:
7
+ - architect
8
+ gates:
9
+ - ARCH
10
+ tech: []
11
+ topic:
12
+ - architecture
13
+ triggers:
14
+ - codebase analysis
15
+ - current architecture
16
+ - tech debt
17
+ - bottlenecks
18
+ - repo review
19
+ - current state
20
+ related:
21
+ - system-design-checklist
22
+ - architecture-doc
23
+ - architecture-doc-reference
24
+ - architecture-compliance-review
25
+ - lava-flow-legacy-detection
26
+ - adr-log
27
+ - adr-log-reference
28
+ - threat-model-baseline
29
+ - security-baseline-dev
30
+ - observability-plan
31
+ - observability-logging
32
+ budget_lines: 265
33
+ schema_version: 1
34
+ ---
35
+
36
+
37
+ # Skill: Current State Analysis
38
+
39
+ A systematic audit of existing code before starting a new task.
40
+
41
+ **Sections:**
42
+ 1. [When to use](#1-when-to-use)
43
+ 2. [Audit workflow](#2-workflow)
44
+ 3. [What to look for (checklist)](#3-what-to-look-for)
45
+ 4. [Severity levels](#4-severity)
46
+ 5. [Output Template](#5-output-template)
47
+ 6. [Example analysis](#6-example)
48
+
49
+ ---
50
+
51
+ ## 1. When to use
52
+
53
+ - The project already exists / there is a repository with code
54
+ - Before the ARCH gate (new feature, refactoring, migration)
55
+ - There is legacy or partially implemented functionality
56
+ - The team wants to understand the current state before planning
57
+
58
+ ---
59
+
60
+ ## 2. Workflow
61
+
62
+ ```
63
+ 1. Structure overview (5 min)
64
+ ├── list_dir root, src/, packages/
65
+ ├── package.json deps, scripts, engines
66
+ ├── Docker files services, ports, volumes
67
+ └── Config files .env.example, tsconfig, biome, vitest
68
+
69
+ 2. Pattern identification (10 min)
70
+ ├── FE: framework, state management, routing, styling
71
+ ├── BE: framework, layers (router/controller/service/repo), middleware
72
+ ├── Data: ORM/ODM, schema strategy, migrations
73
+ └── Infra: CI/CD, Docker, reverse proxy, certs
74
+
75
+ 3. Finding bottlenecks (10 min)
76
+ ├── grep_search → console.log, TODO, FIXME, HACK, XXX
77
+ ├── grep_search hardcoded secrets, passwords, API keys
78
+ ├── grep_search → any, eslint-disable, @ts-ignore
79
+ ├── find_by_name *.test.*, *.spec.* (coverage)
80
+ └── Manual check → N+1, god objects, tight coupling
81
+
82
+ 4. Recording findings (5 min)
83
+ └── Fill in the Output Template (section 5)
84
+
85
+ 5. Forming recommendations
86
+ └── Quick wins (< 1h) vs Strategic (> 1 sprint)
87
+ ```
88
+
89
+ ---
90
+
91
+ ## 3. What to look for
92
+
93
+ ### Structure and conventions
94
+
95
+ | What to check | How | Red flag |
96
+ |--------------|-----|----------|
97
+ | Layers (FE/BE) | `list_dir` src/ | No clear separation |
98
+ | Naming | Files, variables, exports | Mixed styles (camelCase + snake_case) |
99
+ | JSDoc | `grep_search` `@param` | No function documentation |
100
+ | Imports | Absolute vs relative | `../../../` — deep nesting |
101
+ | Config | `.env.example`, schema validation | No env var validation |
102
+
103
+ ### Technical debt
104
+
105
+ | What to look for | Grep pattern | Severity |
106
+ |-----------|-------------|----------|
107
+ | `console.log` in production | `console.log` (excluding tests) | P1 |
108
+ | TODO/FIXME | `TODO\|FIXME\|HACK\|XXX` | P1-P2 |
109
+ | Hardcoded secrets | `password.*=\|secret.*=\|apiKey.*=` | 🔴 P0 |
110
+ | Disabled linting | `eslint-disable\|@ts-ignore\|biome-ignore` | P1 |
111
+ | `any` types | `:\s*any\b` (in .ts files) | P1 |
112
+ | Missing error handling | `catch\s*\(\s*\)` (empty catch) | P1 |
113
+ | Outdated deps | `npm outdated` / `npm audit` | P1-P2 |
114
+ | Dead code | Unused exports, unreachable branches | P2 |
115
+
116
+ ### Performance
117
+
118
+ | What to look for | Where | Red flag |
119
+ |-----------|-----|----------|
120
+ | N+1 queries | Loops with DB calls inside | 🔴 P0 |
121
+ | Missing indexes | Schema definitions | P0-P1 |
122
+ | No `.lean()` | Mongoose queries in API responses | P1 |
123
+ | No `.select()` | Full document fetch for list endpoints | P1 |
124
+ | `skip()` pagination | Large collections | P1 |
125
+ | Sync heavy ops | Main thread blocking | P0 |
126
+
127
+ ### Security
128
+
129
+ | What to look for | How | Severity |
130
+ |-----------|-----|----------|
131
+ | NoSQL injection | `Model.find(req.query)` | 🔴 P0 |
132
+ | XSS | `dangerouslySetInnerHTML` without sanitize | 🔴 P0 |
133
+ | Secrets in code | `grep_search` API keys, tokens | 🔴 P0 |
134
+ | No Helmet | Express without `helmet()` | P1 |
135
+ | No CORS whitelist | `cors({ origin: '*' })` | P1 |
136
+ | No rate limiting | Public endpoints without throttle | P1 |
137
+
138
+ ---
139
+
140
+ ## 4. Severity
141
+
142
+ | Level | Description | Action |
143
+ |-------|---------|----------|
144
+ | 🔴 **P0** | Blocker: security vulnerability, data loss risk, broken core flow | Fix before release |
145
+ | 🟠 **P1** | Important: tech debt, missing validation, no tests, performance risk | Schedule in the current sprint |
146
+ | 🟡 **P2** | Improvement: code style, naming, dead code, minor optimizations | Backlog |
147
+
148
+ ---
149
+
150
+ ## 5. Output Template
151
+
152
+ ```markdown
153
+ # Current State Analysis: <project-name>
154
+
155
+ **Date:** YYYY-MM-DD
156
+ **Analyst:** Architect Agent
157
+ **Scope:** <what was analyzed>
158
+
159
+ ## Summary
160
+ <1-2 paragraphs: what this project is, key technologies, current status>
161
+
162
+ ## Stack
163
+ | Layer | Technology | Version |
164
+ |-------|-----------|---------|
165
+ | Frontend | React | 18.x |
166
+ | Backend | Express | 4.x |
167
+ | Database | MongoDB + Mongoose | 7.x |
168
+ | Infra | Docker + Caddy | ... |
169
+
170
+ ## Conventions (detected patterns)
171
+ - **Naming:** camelCase for files, PascalCase for components
172
+ - **Layers:** router controller service → repository
173
+ - **State:** Zustand / context
174
+ - **Styling:** CSS Modules / Tailwind
175
+ - **Testing:** Vitest + RTL
176
+
177
+ ## Technical Debt
178
+
179
+ | # | Finding | Severity | Location | Recommendation |
180
+ |---|---------|----------|----------|----------------|
181
+ | 1 | No input validation on API endpoints | 🔴 P0 | `api/routes/*.js` | Add Zod schemas |
182
+ | 2 | console.log in production code | 🟠 P1 | 12 files | Replace with pino logger |
183
+ | 3 | No JSDoc on service functions | 🟡 P2 | `api/services/` | Add JSDoc blocks |
184
+
185
+ ## Scalability Limits
186
+ - <specific bottlenecks: no indexes, sync ops, no cache, etc.>
187
+
188
+ ## Security Notes
189
+ - <hardcoded secrets, no CORS, injection risks, etc.>
190
+
191
+ ## Recommendations
192
+
193
+ ### Quick Wins (< 1 hour each)
194
+ 1. Add Helmet middleware
195
+ 2. Add .env validation (Zod)
196
+ 3. Replace console.log with pino
197
+
198
+ ### Strategic (requires planning)
199
+ 1. ARCH-xx: Implement input validation layer
200
+ 2. ARCH-xx: Add integration tests for critical paths
201
+ 3. ARCH-xx: Set up CI pipeline
202
+
203
+ ## Next Actions
204
+ - [ ] ARCH-01: <description>
205
+ - [ ] ARCH-02: <description>
206
+ ```
207
+
208
+ ---
209
+
210
+ ## 6. Example analysis (excerpt)
211
+
212
+ ```markdown
213
+ # Current State Analysis: SaaS Admin Panel
214
+
215
+ **Date:** 2025-12-01
216
+ **Scope:** Full repository audit
217
+
218
+ ## Summary
219
+ SaaS application with Admin Dashboard (React 18 + Vite) and API (Express 4).
220
+ Public content served via API to end-users.
221
+ Monorepo with Docker Compose + Caddy gateway.
222
+
223
+ ## Technical Debt
224
+
225
+ | # | Finding | Severity | Location | Recommendation |
226
+ |---|---------|----------|----------|----------------|
227
+ | 1 | Content payload hardcoded in template | 🔴 P0 | `public/content-renderer.js` | Fetch from API |
228
+ | 2 | No error boundaries in React | 🟠 P1 | Dashboard components | Add ErrorBoundary wrapper |
229
+ | 3 | Mixed import styles (CJS + ESM) | 🟡 P2 | API server files | Migrate to ESM |
230
+
231
+ ## Scalability Limits
232
+ - No DB indexes on `settings.ownerId` (collection scan on every request)
233
+ - Public endpoint fetches config on every page load (no caching)
234
+
235
+ ## Quick Wins
236
+ 1. Add compound index `{ ownerId: 1 }` on settings collection
237
+ 2. Add `Cache-Control` header to public content endpoint
238
+ 3. Add Helmet to Express app
239
+ ```
240
+
241
+ ---
242
+
243
+ ## Deliverables
244
+
245
+ | Artifact | Format | Where to store |
246
+ |---------|--------|---------------|
247
+ | Current State Analysis | Markdown (output template above) | `docs/architecture/current-state-analysis.md` |
248
+ | Tech Debt backlog | ARCH-xx items | `docs/architecture/tech-debt.md` or backlog tasks |
249
+
250
+ ---
251
+
252
+ ## See also
253
+ - `$system-design-checklist` — checklist for a new design
254
+ - `$architecture-doc` — full Architecture Document
255
+ - `$security-baseline-dev` — detailed security check
256
+ - `$observability-logging` — observability
@@ -31,7 +31,8 @@ triggers:
31
31
  - minimal change
32
32
  - LLM working rules
33
33
  - check assumptions
34
- related: []
34
+ related:
35
+ - mcp-integration
35
36
  budget_lines: 380
36
37
  schema_version: 1
37
38
  license: MIT
@@ -44,7 +44,7 @@ schema_version: 1
44
44
 
45
45
  The "lava flow" anti-pattern (Brown et al., *AntiPatterns*, 1998) — a hardened mass of code that flowed unchecked into production. Nobody remembers why it's there, deleting feels risky (no tests), rewriting is expensive. Every release thickens the layer.
46
46
 
47
- > **When to apply:** ARCH (current-state analysis), DEV (before touching an old module), REV (PR review in a mature codebase). Reference skill — MCP hints via PreToolUse on mentions of legacy/brownfield/"why is this code here".
47
+ > **When to apply:** ARCH (current-state analysis), DEV (before touching an old module), REV (PR review in a mature codebase). Reference skill — activation via frontmatter triggers; see § MCP integration below for cross-gate consumption.
48
48
 
49
49
  **Sections:**
50
50
  1. [Signs of lava flow](#1-signs)
@@ -181,3 +181,17 @@ Apply before refactoring a module or when first onboarding into a legacy repo.
181
181
  - `$design-patterns-reference` — what to use INSTEAD of the removed lava
182
182
  - `$code-review-checklist` — for reviewing the deletion PRs
183
183
  - `$system-design-checklist` — so the new code doesn't become next year's lava
184
+
185
+ ---
186
+
187
+ ## MCP integration (cross-gate activation)
188
+
189
+ Reference skill with cross-gate consumption:
190
+
191
+ - **ARCH (primary)** — `architect` uses it during current-state analysis before proposing refactoring
192
+ - **DEV (secondary)** — `senior_full_stack` consults before touching an old module
193
+ - **REV (secondary)** — `reviewer` applies during PR review in a mature codebase
194
+
195
+ Activation via frontmatter triggers (`legacy code`, `dead code`, `lava flow`, `unremoved feature flag`, `brownfield refactoring`, etc.). See `$mcp-integration` for general MCP flow, gate ritual and recording discipline.
196
+
197
+ Section IDs (`LF-01..LF-25`) are stable anchors: cite them inline in ARCH/REV artifacts instead of copying content. Keeps the audit trail compact and provides a backlink to the canonical source.