contextdevkit 1.8.0

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 (345) hide show
  1. package/CHANGELOG.md +592 -0
  2. package/LICENSE +21 -0
  3. package/README.md +401 -0
  4. package/docs/AGENT-PACKAGE-FORMAT.md +140 -0
  5. package/docs/ARCHITECTURE.md +258 -0
  6. package/docs/CHANGELOG.md +559 -0
  7. package/docs/CUSTOMIZING.md +211 -0
  8. package/docs/LEVELS.md +151 -0
  9. package/docs/ROADMAP.md +385 -0
  10. package/docs/SQUAD-PIPELINE-FORMAT.md +258 -0
  11. package/docs/SQUADS/agent-forge.md +65 -0
  12. package/docs/SQUADS/design-team.md +161 -0
  13. package/docs/token-economy-plan.md +135 -0
  14. package/install.mjs +273 -0
  15. package/instrucoes.md +274 -0
  16. package/package.json +46 -0
  17. package/templates/CLAUDE.md.tpl +133 -0
  18. package/templates/claude/agents/_TEMPLATE.md +52 -0
  19. package/templates/claude/agents/accessibility.md +36 -0
  20. package/templates/claude/agents/agent-architect.md +37 -0
  21. package/templates/claude/agents/architect.md +39 -0
  22. package/templates/claude/agents/code-reviewer.md +43 -0
  23. package/templates/claude/agents/code-security.md +59 -0
  24. package/templates/claude/agents/context-keeper.md +40 -0
  25. package/templates/claude/agents/devops.md +40 -0
  26. package/templates/claude/agents/eval-designer.md +40 -0
  27. package/templates/claude/agents/forge-orchestrator.md +42 -0
  28. package/templates/claude/agents/governance-officer.md +45 -0
  29. package/templates/claude/agents/growth.md +92 -0
  30. package/templates/claude/agents/infra-security.md +53 -0
  31. package/templates/claude/agents/landing-architect.md +154 -0
  32. package/templates/claude/agents/model-router.md +34 -0
  33. package/templates/claude/agents/packager.md +38 -0
  34. package/templates/claude/agents/privacy-lgpd.md +64 -0
  35. package/templates/claude/agents/product-owner.md +51 -0
  36. package/templates/claude/agents/prompt-engineer.md +33 -0
  37. package/templates/claude/agents/qa-e2e.md +52 -0
  38. package/templates/claude/agents/qa-fuzzer.md +24 -0
  39. package/templates/claude/agents/qa-integration.md +21 -0
  40. package/templates/claude/agents/qa-orchestrator.md +40 -0
  41. package/templates/claude/agents/qa-perf.md +40 -0
  42. package/templates/claude/agents/qa-unit.md +39 -0
  43. package/templates/claude/agents/rag-designer.md +54 -0
  44. package/templates/claude/agents/retention.md +85 -0
  45. package/templates/claude/agents/security.md +48 -0
  46. package/templates/claude/agents/seo-specialist.md +106 -0
  47. package/templates/claude/agents/test-engineer.md +48 -0
  48. package/templates/claude/agents/tool-designer.md +32 -0
  49. package/templates/claude/agents/ui-designer.md +37 -0
  50. package/templates/claude/agents/ux-designer.md +38 -0
  51. package/templates/claude/commands/README.md +95 -0
  52. package/templates/claude/commands/advise.md +80 -0
  53. package/templates/claude/commands/audit/analyze-code-ia-practices.md +75 -0
  54. package/templates/claude/commands/audit/audit.md +35 -0
  55. package/templates/claude/commands/audit/contract-check.md +21 -0
  56. package/templates/claude/commands/audit/deep-analysis.md +48 -0
  57. package/templates/claude/commands/audit/deps-audit.md +49 -0
  58. package/templates/claude/commands/audit/security-setup.md +35 -0
  59. package/templates/claude/commands/audit/seo-audit.md +63 -0
  60. package/templates/claude/commands/audit/tech-debt-sweep.md +35 -0
  61. package/templates/claude/commands/bug-hunt.md +42 -0
  62. package/templates/claude/commands/claude-md.md +36 -0
  63. package/templates/claude/commands/close-version.md +25 -0
  64. package/templates/claude/commands/context-refresh.md +19 -0
  65. package/templates/claude/commands/context-stats.md +15 -0
  66. package/templates/claude/commands/dashboard.md +66 -0
  67. package/templates/claude/commands/distill-apply.md +19 -0
  68. package/templates/claude/commands/distill-sessions.md +26 -0
  69. package/templates/claude/commands/fleet.md +47 -0
  70. package/templates/claude/commands/forge/forge-audit.md +16 -0
  71. package/templates/claude/commands/forge/forge-budget.md +16 -0
  72. package/templates/claude/commands/forge/forge-deprecate.md +16 -0
  73. package/templates/claude/commands/forge/forge-doctor.md +17 -0
  74. package/templates/claude/commands/forge/forge-eval.md +16 -0
  75. package/templates/claude/commands/forge/forge-fallback-test.md +17 -0
  76. package/templates/claude/commands/forge/forge-killswitch.md +17 -0
  77. package/templates/claude/commands/forge/forge-list.md +17 -0
  78. package/templates/claude/commands/forge/forge-new.md +41 -0
  79. package/templates/claude/commands/forge/forge-policy.md +16 -0
  80. package/templates/claude/commands/forge/forge-redteam.md +17 -0
  81. package/templates/claude/commands/forge/forge-refresh-matrix.md +20 -0
  82. package/templates/claude/commands/forge/forge-route.md +17 -0
  83. package/templates/claude/commands/forge/forge-show.md +16 -0
  84. package/templates/claude/commands/landing-page.md +71 -0
  85. package/templates/claude/commands/log-session.md +59 -0
  86. package/templates/claude/commands/media-gen.md +93 -0
  87. package/templates/claude/commands/new-adr.md +30 -0
  88. package/templates/claude/commands/pipeline/dev-start.md +64 -0
  89. package/templates/claude/commands/pipeline/pipeline.md +36 -0
  90. package/templates/claude/commands/pipeline/resume.md +70 -0
  91. package/templates/claude/commands/pipeline/retro.md +34 -0
  92. package/templates/claude/commands/pipeline/runs.md +63 -0
  93. package/templates/claude/commands/pipeline/ship.md +54 -0
  94. package/templates/claude/commands/pipeline/workflow.md +85 -0
  95. package/templates/claude/commands/playbook.md +27 -0
  96. package/templates/claude/commands/predictions-review.md +28 -0
  97. package/templates/claude/commands/qa/qa-signoff.md +24 -0
  98. package/templates/claude/commands/qa/scaffold-tests.md +27 -0
  99. package/templates/claude/commands/qa/test-plan.md +26 -0
  100. package/templates/claude/commands/qa/visual-test.md +42 -0
  101. package/templates/claude/commands/roadmap.md +48 -0
  102. package/templates/claude/commands/setup/aidevtool-from0.md +104 -0
  103. package/templates/claude/commands/setup/context-config.md +25 -0
  104. package/templates/claude/commands/setup/context-doctor.md +21 -0
  105. package/templates/claude/commands/setup/context-level.md +17 -0
  106. package/templates/claude/commands/setup/setupcontextdevkit.md +121 -0
  107. package/templates/claude/commands/simulate-impact.md +32 -0
  108. package/templates/claude/commands/squad.md +44 -0
  109. package/templates/claude/commands/state.md +21 -0
  110. package/templates/claude/commands/token-report.md +29 -0
  111. package/templates/claude/commands/tune-agents.md +35 -0
  112. package/templates/claude/commands/vcs/claim.md +18 -0
  113. package/templates/claude/commands/vcs/git.md +83 -0
  114. package/templates/claude/commands/vcs/release.md +15 -0
  115. package/templates/claude/commands/vcs/worktree-new.md +18 -0
  116. package/templates/claude/commands/watch.md +47 -0
  117. package/templates/contextkit/.env.example +36 -0
  118. package/templates/contextkit/CLAUDE.child.md.tpl +38 -0
  119. package/templates/contextkit/README.md +74 -0
  120. package/templates/contextkit/behaviors-examples.md +183 -0
  121. package/templates/contextkit/behaviors.md +116 -0
  122. package/templates/contextkit/best-practices.md +323 -0
  123. package/templates/contextkit/config.json +66 -0
  124. package/templates/contextkit/detectors/README.md +45 -0
  125. package/templates/contextkit/detectors/example-detector.mjs.example +25 -0
  126. package/templates/contextkit/instrucoes.md +114 -0
  127. package/templates/contextkit/memory/GLOSSARY.md +13 -0
  128. package/templates/contextkit/memory/SESSIONS.md +9 -0
  129. package/templates/contextkit/memory/WORKSPACE.md +7 -0
  130. package/templates/contextkit/memory/business-rules/_TEMPLATE.md +33 -0
  131. package/templates/contextkit/memory/decisions/0000-record-architecture-decisions.md +34 -0
  132. package/templates/contextkit/memory/decisions/_TEMPLATE.md +25 -0
  133. package/templates/contextkit/memory/predictions/.gitkeep +0 -0
  134. package/templates/contextkit/memory/roadmap.md +28 -0
  135. package/templates/contextkit/memory/sessions/.gitkeep +0 -0
  136. package/templates/contextkit/memory/workflows/.gitkeep +0 -0
  137. package/templates/contextkit/pipeline/backlog/.gitkeep +0 -0
  138. package/templates/contextkit/pipeline/conclusion/.gitkeep +0 -0
  139. package/templates/contextkit/pipeline/devpipeline.md +9 -0
  140. package/templates/contextkit/pipeline/testing/.gitkeep +0 -0
  141. package/templates/contextkit/pipeline/working/.gitkeep +0 -0
  142. package/templates/contextkit/review-protocol.md +214 -0
  143. package/templates/contextkit/runtime/config/defaults.mjs +215 -0
  144. package/templates/contextkit/runtime/config/levels.mjs +42 -0
  145. package/templates/contextkit/runtime/config/load.mjs +105 -0
  146. package/templates/contextkit/runtime/config/paths.mjs +92 -0
  147. package/templates/contextkit/runtime/config/presets.mjs +47 -0
  148. package/templates/contextkit/runtime/config/schema.mjs +88 -0
  149. package/templates/contextkit/runtime/config/settings-compose.mjs +55 -0
  150. package/templates/contextkit/runtime/git-hooks/commit-msg.mjs +55 -0
  151. package/templates/contextkit/runtime/git-hooks/pre-commit.mjs +47 -0
  152. package/templates/contextkit/runtime/git-hooks/pre-push.mjs +102 -0
  153. package/templates/contextkit/runtime/hooks/boot-context-readers.mjs +111 -0
  154. package/templates/contextkit/runtime/hooks/boot-signals.mjs +135 -0
  155. package/templates/contextkit/runtime/hooks/check-registration.mjs +228 -0
  156. package/templates/contextkit/runtime/hooks/concurrency-guard.mjs +110 -0
  157. package/templates/contextkit/runtime/hooks/ledger.mjs +231 -0
  158. package/templates/contextkit/runtime/hooks/md-extract.mjs +65 -0
  159. package/templates/contextkit/runtime/hooks/path-classification.mjs +62 -0
  160. package/templates/contextkit/runtime/hooks/safe-io.mjs +84 -0
  161. package/templates/contextkit/runtime/hooks/session-digest-core.mjs +85 -0
  162. package/templates/contextkit/runtime/hooks/session-start.mjs +248 -0
  163. package/templates/contextkit/runtime/hooks/simulate-gate.mjs +108 -0
  164. package/templates/contextkit/runtime/hooks/track-edits.mjs +154 -0
  165. package/templates/contextkit/runtime/providers/media/_adapter.mjs +120 -0
  166. package/templates/contextkit/runtime/providers/media/nano-banana.mjs +110 -0
  167. package/templates/contextkit/runtime/providers/media/veo.mjs +162 -0
  168. package/templates/contextkit/runtime/providers/review/_adapter.mjs +71 -0
  169. package/templates/contextkit/runtime/providers/review/detect.mjs +115 -0
  170. package/templates/contextkit/runtime/providers/review/gh.mjs +103 -0
  171. package/templates/contextkit/runtime/state/state-io.mjs +172 -0
  172. package/templates/contextkit/runtime/statusline.mjs +51 -0
  173. package/templates/contextkit/squads/README.md +115 -0
  174. package/templates/contextkit/squads/_BRIEFING.md.tpl +27 -0
  175. package/templates/contextkit/squads/agent-forge/README.md +69 -0
  176. package/templates/contextkit/squads/agent-forge/ROADMAP.md +108 -0
  177. package/templates/contextkit/squads/agent-forge/best-practices.md +89 -0
  178. package/templates/contextkit/squads/agent-forge/cli/forge-admin.mjs +132 -0
  179. package/templates/contextkit/squads/agent-forge/cli/forge-eval-cli.mjs +163 -0
  180. package/templates/contextkit/squads/agent-forge/cli/forge-new.mjs +97 -0
  181. package/templates/contextkit/squads/agent-forge/cli/forge-ops.mjs +177 -0
  182. package/templates/contextkit/squads/agent-forge/lib/architect.mjs +112 -0
  183. package/templates/contextkit/squads/agent-forge/lib/eval-designer.mjs +133 -0
  184. package/templates/contextkit/squads/agent-forge/lib/eval-runner.mjs +167 -0
  185. package/templates/contextkit/squads/agent-forge/lib/governance-officer.mjs +178 -0
  186. package/templates/contextkit/squads/agent-forge/lib/package-ops.mjs +101 -0
  187. package/templates/contextkit/squads/agent-forge/lib/packager.mjs +219 -0
  188. package/templates/contextkit/squads/agent-forge/lib/prompt-gen.mjs +122 -0
  189. package/templates/contextkit/squads/agent-forge/lib/rag-designer.mjs +102 -0
  190. package/templates/contextkit/squads/agent-forge/lib/router.mjs +165 -0
  191. package/templates/contextkit/squads/agent-forge/lib/tool-gen.mjs +113 -0
  192. package/templates/contextkit/squads/agent-forge/lib/yaml.mjs +47 -0
  193. package/templates/contextkit/squads/agent-forge/pipeline.yaml +65 -0
  194. package/templates/contextkit/squads/agent-forge/router/capability-matrix.json +112 -0
  195. package/templates/contextkit/squads/agent-forge/router/decision-rules.json +120 -0
  196. package/templates/contextkit/squads/agent-forge/templates/agent-package/.agentforgerc +12 -0
  197. package/templates/contextkit/squads/agent-forge/templates/agent-package/CHANGELOG.md +13 -0
  198. package/templates/contextkit/squads/agent-forge/templates/agent-package/LICENSE +5 -0
  199. package/templates/contextkit/squads/agent-forge/templates/agent-package/README.md +39 -0
  200. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/go/README.md +10 -0
  201. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/go/agent.go +14 -0
  202. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/go/go.mod +3 -0
  203. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/node/README.md +11 -0
  204. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/node/index.js +53 -0
  205. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/node/package.json +9 -0
  206. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/python/README.md +10 -0
  207. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/python/agent.py +16 -0
  208. package/templates/contextkit/squads/agent-forge/templates/agent-package/adapters/python/pyproject.toml +10 -0
  209. package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/golden.jsonl +1 -0
  210. package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/red-team.jsonl +3 -0
  211. package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/rubric.yaml +14 -0
  212. package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/run-eval.md +17 -0
  213. package/templates/contextkit/squads/agent-forge/templates/agent-package/evals/thresholds.yaml +18 -0
  214. package/templates/contextkit/squads/agent-forge/templates/agent-package/examples/basic.node.md +17 -0
  215. package/templates/contextkit/squads/agent-forge/templates/agent-package/examples/with-fallback.node.md +24 -0
  216. package/templates/contextkit/squads/agent-forge/templates/agent-package/examples/with-rag.python.md +20 -0
  217. package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/audit.schema.json +23 -0
  218. package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/compliance.policy.yaml +43 -0
  219. package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/cost.policy.yaml +36 -0
  220. package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/fallback-chain.yaml +16 -0
  221. package/templates/contextkit/squads/agent-forge/templates/agent-package/governance/quality.policy.yaml +43 -0
  222. package/templates/contextkit/squads/agent-forge/templates/agent-package/manifest.yaml +91 -0
  223. package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.anthropic.md +19 -0
  224. package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.canonical.md +25 -0
  225. package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.deepseek.md +21 -0
  226. package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.google.md +19 -0
  227. package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.ollama.md +21 -0
  228. package/templates/contextkit/squads/agent-forge/templates/agent-package/prompts/system.openai.md +20 -0
  229. package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/config.yaml +17 -0
  230. package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/index/.gitkeep +3 -0
  231. package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/ingestion/chunker.config.yaml +6 -0
  232. package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/ingestion/sources.yaml +8 -0
  233. package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/retrieval/query-template.md +16 -0
  234. package/templates/contextkit/squads/agent-forge/templates/agent-package/rag/retrieval/rerank.config.yaml +6 -0
  235. package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/anthropic.tools.json +11 -0
  236. package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/deepseek.tools.json +14 -0
  237. package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/google.tools.json +11 -0
  238. package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/ollama.tools.json +14 -0
  239. package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/adapters/openai.tools.json +14 -0
  240. package/templates/contextkit/squads/agent-forge/templates/agent-package/tools/schemas.canonical.json +25 -0
  241. package/templates/contextkit/starters/tanstack/README.md +86 -0
  242. package/templates/contextkit/starters/tanstack/index.html +12 -0
  243. package/templates/contextkit/starters/tanstack/package.json +25 -0
  244. package/templates/contextkit/starters/tanstack/src/main.tsx +40 -0
  245. package/templates/contextkit/starters/tanstack/src/router.tsx +12 -0
  246. package/templates/contextkit/starters/tanstack/src/routes/__root.tsx +10 -0
  247. package/templates/contextkit/starters/tanstack/src/routes/index.tsx +17 -0
  248. package/templates/contextkit/starters/tanstack/tsconfig.json +19 -0
  249. package/templates/contextkit/starters/tanstack/vite.config.ts +10 -0
  250. package/templates/contextkit/tools/scripts/adr-digest-core.mjs +42 -0
  251. package/templates/contextkit/tools/scripts/adr-digest.mjs +78 -0
  252. package/templates/contextkit/tools/scripts/agent-tuning.mjs +74 -0
  253. package/templates/contextkit/tools/scripts/aiso-audit.mjs +174 -0
  254. package/templates/contextkit/tools/scripts/audit-shared.mjs +129 -0
  255. package/templates/contextkit/tools/scripts/claim.mjs +133 -0
  256. package/templates/contextkit/tools/scripts/claude-md.mjs +123 -0
  257. package/templates/contextkit/tools/scripts/clean-drive.mjs +78 -0
  258. package/templates/contextkit/tools/scripts/context-config.mjs +111 -0
  259. package/templates/contextkit/tools/scripts/context-level.mjs +98 -0
  260. package/templates/contextkit/tools/scripts/context-pack.mjs +120 -0
  261. package/templates/contextkit/tools/scripts/contract-scan.mjs +186 -0
  262. package/templates/contextkit/tools/scripts/dashboard-data.mjs +198 -0
  263. package/templates/contextkit/tools/scripts/dashboard-html.mjs +215 -0
  264. package/templates/contextkit/tools/scripts/dashboard-server.mjs +129 -0
  265. package/templates/contextkit/tools/scripts/dashboard.mjs +107 -0
  266. package/templates/contextkit/tools/scripts/deep-analysis.mjs +62 -0
  267. package/templates/contextkit/tools/scripts/deps-audit.mjs +201 -0
  268. package/templates/contextkit/tools/scripts/detect-stack.mjs +164 -0
  269. package/templates/contextkit/tools/scripts/distill-detect.mjs +90 -0
  270. package/templates/contextkit/tools/scripts/doctor.mjs +165 -0
  271. package/templates/contextkit/tools/scripts/fleet.mjs +170 -0
  272. package/templates/contextkit/tools/scripts/generate-context.mjs +142 -0
  273. package/templates/contextkit/tools/scripts/gh-alerts.mjs +117 -0
  274. package/templates/contextkit/tools/scripts/git.mjs +97 -0
  275. package/templates/contextkit/tools/scripts/home.mjs +106 -0
  276. package/templates/contextkit/tools/scripts/mark-simulation.mjs +78 -0
  277. package/templates/contextkit/tools/scripts/media-gen.mjs +154 -0
  278. package/templates/contextkit/tools/scripts/pipeline-board.mjs +74 -0
  279. package/templates/contextkit/tools/scripts/pipeline-prioritize.mjs +68 -0
  280. package/templates/contextkit/tools/scripts/pipeline-session.mjs +99 -0
  281. package/templates/contextkit/tools/scripts/pipeline-validate.mjs +136 -0
  282. package/templates/contextkit/tools/scripts/pipeline.mjs +302 -0
  283. package/templates/contextkit/tools/scripts/playbook.mjs +123 -0
  284. package/templates/contextkit/tools/scripts/predictions-review.mjs +113 -0
  285. package/templates/contextkit/tools/scripts/release.mjs +60 -0
  286. package/templates/contextkit/tools/scripts/resume.mjs +114 -0
  287. package/templates/contextkit/tools/scripts/roadmap.mjs +86 -0
  288. package/templates/contextkit/tools/scripts/runs.mjs +116 -0
  289. package/templates/contextkit/tools/scripts/seo-audit.mjs +150 -0
  290. package/templates/contextkit/tools/scripts/session-digest.mjs +89 -0
  291. package/templates/contextkit/tools/scripts/session-reindex.mjs +91 -0
  292. package/templates/contextkit/tools/scripts/setup-complete.mjs +69 -0
  293. package/templates/contextkit/tools/scripts/squad-meta.mjs +23 -0
  294. package/templates/contextkit/tools/scripts/squad-pipeline-condition.mjs +192 -0
  295. package/templates/contextkit/tools/scripts/squad-pipeline.mjs +301 -0
  296. package/templates/contextkit/tools/scripts/squad.mjs +80 -0
  297. package/templates/contextkit/tools/scripts/stats.mjs +138 -0
  298. package/templates/contextkit/tools/scripts/sync-check.mjs +235 -0
  299. package/templates/contextkit/tools/scripts/tech-debt-detectors.mjs +76 -0
  300. package/templates/contextkit/tools/scripts/tech-debt-scan.mjs +164 -0
  301. package/templates/contextkit/tools/scripts/token-report.mjs +153 -0
  302. package/templates/contextkit/tools/scripts/visual-test.mjs +132 -0
  303. package/templates/contextkit/tools/scripts/watch.mjs +106 -0
  304. package/templates/contextkit/tools/scripts/workflow.mjs +136 -0
  305. package/templates/contextkit/tools/scripts/workspace-sync.mjs +220 -0
  306. package/templates/contextkit/tools/scripts/worktree-new.mjs +50 -0
  307. package/templates/contextkit/workflows/L1-static-loading.md +59 -0
  308. package/templates/contextkit/workflows/L2-session-ledger.md +86 -0
  309. package/templates/contextkit/workflows/L3-multi-session.md +80 -0
  310. package/templates/contextkit/workflows/L4-squads.md +68 -0
  311. package/templates/contextkit/workflows/L5-proactive.md +88 -0
  312. package/templates/contextkit/workflows/README.md +47 -0
  313. package/templates/contextkit/workflows/playbooks/distillation-cycle.md +74 -0
  314. package/templates/contextkit/workflows/playbooks/landing-page.md +197 -0
  315. package/templates/contextkit/workflows/playbooks/security-batch.md +68 -0
  316. package/templates/contextkit/workflows/playbooks/seo-aiso.md +288 -0
  317. package/templates/contextkit/workflows/playbooks/simulate-impact.md +83 -0
  318. package/templates/contextkit/workflows/playbooks/tanstack.md +164 -0
  319. package/templates/contextkit/workflows/playbooks/tech-debt-sweep.md +77 -0
  320. package/templates/docs/CHANGELOG.md.tpl +11 -0
  321. package/templates/gitattributes +3 -0
  322. package/templates/github/ISSUE_TEMPLATE/bug_report.md +30 -0
  323. package/templates/github/ISSUE_TEMPLATE/feature_request.md +22 -0
  324. package/templates/github/PULL_REQUEST_TEMPLATE.md +27 -0
  325. package/templates/github/dependabot.yml +27 -0
  326. package/templates/github/workflows/quality.yml +36 -0
  327. package/templates/github/workflows/security.yml +54 -0
  328. package/tools/install/cli.mjs +62 -0
  329. package/tools/install/fs.mjs +56 -0
  330. package/tools/install/git.mjs +114 -0
  331. package/tools/install/project.mjs +51 -0
  332. package/tools/install/uninstall.mjs +54 -0
  333. package/tools/integration-test-compozy.mjs +88 -0
  334. package/tools/integration-test-guards.mjs +269 -0
  335. package/tools/integration-test-tooling-agent-forge.mjs +189 -0
  336. package/tools/integration-test-tooling-pipeline.mjs +164 -0
  337. package/tools/integration-test-tooling.mjs +172 -0
  338. package/tools/integration-test.mjs +228 -0
  339. package/tools/it-helpers.mjs +60 -0
  340. package/tools/selfcheck-agent-forge-ops.mjs +107 -0
  341. package/tools/selfcheck-agent-forge.mjs +304 -0
  342. package/tools/selfcheck-config.mjs +80 -0
  343. package/tools/selfcheck-runtime.mjs +135 -0
  344. package/tools/selfcheck-source.mjs +326 -0
  345. package/tools/selfcheck.mjs +268 -0
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: L6 — autonomous feature pipeline. Drives the full squad: design → implement → review → test → log. Checkpoints can be manual or automatic.
3
+ argument-hint: <feature / objective> [--auto]
4
+ ---
5
+
6
+ # 🚢 Ship (autonomous squad pipeline)
7
+
8
+ Objective: **$ARGUMENTS**
9
+
10
+ Run the end-to-end delivery pipeline, orchestrating the squad. Use TodoWrite to
11
+ track the stages.
12
+
13
+ ## Checkpoint mode
14
+
15
+ The stages marked ◆ are checkpoints. Pick the mode from the arguments:
16
+
17
+ - **Manual (default)** — pause and ask for the user's OK at each ◆. Safest.
18
+ - **Automatic (`--auto` in the arguments)** — do NOT pause at ◆; instead each
19
+ checkpoint becomes an **automatic gate**: proceed only if its objective
20
+ criteria pass (design has no unresolved high-risk item; review has zero
21
+ blockers; tests green; coverage ≥ `qa.coverageTarget` on `qa.criticalPaths`).
22
+ If a gate **fails**, STOP and report — never push past a red gate. Always pause
23
+ for the user before an irreversible action (commit/push/PR) regardless of mode.
24
+
25
+ State which mode you're running at the start.
26
+
27
+ ## Pipeline
28
+
29
+ 1. **Scope & state.** Run `node contextkit/tools/scripts/context-pack.mjs` (latest-session
30
+ digest + immutable rules + recent ADRs in one call) and
31
+ `node contextkit/tools/scripts/adr-digest.mjs --search "<objective keywords>"` for the
32
+ ADRs relevant to the objective [ADR-0027] — open a full ADR only when needed.
33
+ Restate the objective; define IN/OUT-OF-SCOPE (as `/dev-start`).
34
+ 2. **Design** — delegate to `architect`: options, trade-offs, recommended path,
35
+ blast radius. If it crosses high-risk paths (L5), run `/simulate-impact` first.
36
+ ◆ Checkpoint: confirm the design with the user.
37
+ 3. **Plan tests** — delegate to `qa-orchestrator` (`/test-plan`): happy / edge /
38
+ failure for the scope.
39
+ 4. **Implement** — route to the right domain agent(s) (backend/frontend/db/…).
40
+ Keep changes within scope and the constitution (file size, SRP, naming, docs).
41
+ 5. **Self-review** — delegate to `code-reviewer`: constitution + immutable rules.
42
+ Fix blockers before continuing.
43
+ 6. **Test** — `/scaffold-tests` then run the suite; `/qa-signoff` against
44
+ `qa.criticalPaths` + `coverageTarget`. If the UI's *look* is part of the change,
45
+ run the **visual** suite too (`/visual-test`). ◆ Checkpoint if anything is red.
46
+ 7. **Quality gates** — run `tech-debt-scan` and (if `l5.contractGlobs` set)
47
+ `contract-scan`; surface regressions.
48
+ 8. **Record** — `/new-adr` if a real decision was made; `/log-session`; update
49
+ `CHANGELOG.md` `[Unreleased]`.
50
+ 9. **Report** — summary: what shipped, tests, debt/contract status, follow-ups.
51
+ Offer the commit/PR (do not push without the user's OK).
52
+
53
+ If any agent isn't available in this environment, do that stage yourself but keep
54
+ the gates. Never skip the review and test stages to "save time".
@@ -0,0 +1,85 @@
1
+ ---
2
+ description: Workflow macro — chain /roadmap → /new-adr → /pipeline → /ship into one explicit narrative. (ticket 041)
3
+ argument-hint: "new <slug> | advance <slug> [ref] | status [<slug>] | resume <slug>"
4
+ allowed-tools: Bash(node:*)
5
+ ---
6
+
7
+ `/workflow` is a **thin macro** over the primitives the kit already ships.
8
+ It doesn't merge `/roadmap`, `/new-adr`, `/pipeline`, or `/ship` — it just
9
+ keeps a breadcrumb so a multi-day, multi-session feature lifecycle reads as
10
+ one story instead of four disconnected commands.
11
+
12
+ ## When to use
13
+
14
+ - A feature is big enough to deserve a roadmap entry **and** an ADR **and**
15
+ pipeline tickets **and** a ship pass.
16
+ - You want to be able to come back tomorrow (or on another machine) and
17
+ read "where did I stop?" in one place.
18
+ - You want `/dev-start` to find the right scope for the next sub-session.
19
+
20
+ ## The four phases
21
+
22
+ 1. **roadmap** — product slice / what & why
23
+ 2. **adr** — technical decision (architecture, dependency, pattern)
24
+ 3. **tickets** — break the ADR's follow-ups into DevPipeline tasks
25
+ 4. **ship** — implement, test, log
26
+
27
+ ## How
28
+
29
+ ### Start a workflow
30
+
31
+ ```
32
+ node contextkit/tools/scripts/workflow.mjs new <slug>
33
+ ```
34
+
35
+ Then run `/roadmap add …` yourself. Once the roadmap entry is recorded:
36
+
37
+ ```
38
+ node contextkit/tools/scripts/workflow.mjs advance <slug> <roadmap-section-ref>
39
+ ```
40
+
41
+ …which marks `roadmap` done and points you at `adr`. Repeat for each phase.
42
+
43
+ ### Check status
44
+
45
+ List all in-flight workflows:
46
+
47
+ ```
48
+ node contextkit/tools/scripts/workflow.mjs status
49
+ ```
50
+
51
+ Show one:
52
+
53
+ ```
54
+ node contextkit/tools/scripts/workflow.mjs status <slug>
55
+ ```
56
+
57
+ `--json` for machine-readable output.
58
+
59
+ ### Resume from another session / machine
60
+
61
+ ```
62
+ node contextkit/tools/scripts/workflow.mjs status <slug>
63
+ ```
64
+
65
+ The breadcrumb file (`contextkit/memory/workflows/<slug>.md`) carries the full
66
+ history. The current phase is the resume point — invoke the matching native
67
+ command (`/new-adr`, `/pipeline add`, `/ship`) and then `advance` when done.
68
+
69
+ ## What `/workflow` does NOT do
70
+
71
+ - It does **not** auto-invoke `/roadmap`, `/new-adr`, `/pipeline`, or `/ship`.
72
+ Each phase is an explicit user action (rule 9 — build what is asked).
73
+ - It does **not** chain phases silently. Every `advance` is a confirmation.
74
+ - It does **not** know which ADR or which tickets belong to which workflow —
75
+ you pass the ref (e.g. `ADR-0023`, `[052,053]`) when advancing.
76
+
77
+ ## Breadcrumb file
78
+
79
+ Path: `contextkit/memory/workflows/<slug>.md`. Schema is YAML-ish frontmatter
80
+ parsed by hand (no `yaml` dep). One file per slug. The body keeps a bullet
81
+ history of phase transitions for human inspection — you can hand-edit it
82
+ without breaking the parser.
83
+
84
+ The directory ships seeded (`.gitkeep`); files are written lazily by the
85
+ script when you call `new`.
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: Playbook registry + runner — list/show/run/track the reusable procedures in contextkit/workflows/playbooks/.
3
+ argument-hint: [list | show <name> | run <name> [note] | runs]
4
+ ---
5
+
6
+ # 📓 Playbook
7
+
8
+ Manage and run the project's **reusable procedures** (`contextkit/workflows/playbooks/`) —
9
+ the *why / how / anti-patterns* behind a slash command. This is the managed layer over
10
+ that folder: a registry you can list, show, run, and track.
11
+
12
+ Act on **$ARGUMENTS**:
13
+
14
+ - **list** (default) — `node contextkit/tools/scripts/playbook.mjs list`. Show the
15
+ registry (every playbook + its title). Recommend the right one for the task at hand.
16
+ - **show `<name>`** — `node contextkit/tools/scripts/playbook.mjs show <name>`. Print the
17
+ full procedure so you can read it before acting.
18
+ - **run `<name>` [note]** — `node contextkit/tools/scripts/playbook.mjs run <name> "<note>"`.
19
+ Records the run in `contextkit/memory/playbook-runs.md` (audit trail) and prints the
20
+ procedure; then **actually execute its steps**, applying its judgment, and report the
21
+ outcome.
22
+ - **runs** — `node contextkit/tools/scripts/playbook.mjs runs`. Show the run history.
23
+
24
+ Composition: other flows reuse this instead of ad-hoc step lists — e.g. `/ship` and the
25
+ squads can `run` a playbook (tech-debt-sweep, simulate-impact, distillation-cycle,
26
+ security-batch) rather than restating it. Keep playbooks stack-agnostic; project-specific
27
+ detail belongs in a scoped `CLAUDE.md` or an ADR.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Close the predicted-vs-actual loop — fill each prediction's Actual section from the ledger.
3
+ ---
4
+
5
+ # 🔁 Predictions Review
6
+
7
+ Close the loop on `/simulate-impact` predictions for the current session.
8
+
9
+ Run:
10
+
11
+ ```
12
+ node contextkit/tools/scripts/predictions-review.mjs
13
+ ```
14
+
15
+ This reads the session ledger and, for every `/simulate-impact` recorded this session, fills the
16
+ **Actual** section of its prediction file in `contextkit/memory/predictions/`: the paths actually
17
+ changed vs what was predicted, with the delta in both directions (predicted-but-not-changed,
18
+ changed-but-not-predicted).
19
+
20
+ Then:
21
+
22
+ 1. Open the updated prediction file(s) and add the **Risk accuracy** note — was the predicted risk
23
+ level right? That judgment is yours, not the script's.
24
+ 2. If a pattern repeats across predictions (an area consistently under- or over-estimated), capture
25
+ it: refine `.claude/commands/simulate-impact.md`, or open `/new-adr` if it's architectural.
26
+
27
+ Also invoked automatically by `/log-session` at the end of a session, so the loop closes without a
28
+ separate step in the normal flow.
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: QA — final verdict. Run the suite, check critical-path coverage vs target, write a PASS/NEEDS-WORK report.
3
+ ---
4
+
5
+ # 🧪 QA sign-off
6
+
7
+ Act as **qa-orchestrator** and produce the final QA verdict.
8
+
9
+ 1. Run the project's test suite (and coverage if the runner supports it).
10
+ 2. Read `contextkit/config.json` → `qa.criticalPaths` and `qa.coverageTarget`.
11
+ 3. Assess:
12
+ - Do all tests pass?
13
+ - Are the `criticalPaths` covered (happy + failure modes), not just the easy
14
+ lines?
15
+ - Is coverage at or above `coverageTarget` (where measurable)?
16
+ - If a **visual harness** exists (`visual-test.mjs status`), did the visual suite
17
+ pass? An unintended screenshot diff is a NEEDS-WORK (have design-team confirm
18
+ intentional changes before refreshing baselines).
19
+ 4. Write a concise report: ✅ covered, ⚠️ gaps (with the specific files/cases
20
+ missing), and a clear **PASS** or **NEEDS-WORK** verdict.
21
+ 5. Record the verdict in the session log (or remind the user to `/log-session`).
22
+
23
+ This is advisory by default — it informs `/close-version`, it doesn't hard-block.
24
+ Treat a NEEDS-WORK on a critical path as a real blocker worth fixing first.
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: QA — materialize tests for the given files, routing each slice to the right specialist.
3
+ argument-hint: <files or scope>
4
+ ---
5
+
6
+ # 🧪 Scaffold tests
7
+
8
+ Materialize tests for: **$ARGUMENTS**
9
+
10
+ Act as **qa-orchestrator** and route work to the specialists (fan out in parallel
11
+ for independent slices via the Agent tool when available):
12
+ - **qa-unit** → pure functions/modules in scope (fast, mocked deps).
13
+ - **qa-integration** → anything crossing a boundary (HTTP/DB/queue/fs).
14
+ - **qa-fuzzer** → parsers, validators, schemas, auth, and `qa.criticalPaths`.
15
+ - **qa-e2e** → critical user journeys, plus **visual / screenshot** checks where the
16
+ UI's *look* is the contract (scaffold with `/visual-test`).
17
+
18
+ Rules:
19
+ 1. Match the project's existing test runner and file conventions. Never add a
20
+ second framework.
21
+ 2. Place test files where the project keeps them; mirror existing naming.
22
+ 3. Cover happy / edge / failure for each slice (use a prior `/test-plan` if one
23
+ exists).
24
+ 4. After writing, run the suite and report pass/fail.
25
+
26
+ If sub-agents aren't available in this environment, write the tests yourself but
27
+ keep the unit / integration / fuzz separation explicit.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: QA — generate a 3-layer test plan (happy / edge / failure) for a scope, before writing test code.
3
+ argument-hint: <what to test>
4
+ ---
5
+
6
+ # 🧪 Test plan
7
+
8
+ Produce a shift-left test plan for: **$ARGUMENTS** (if empty, infer from the
9
+ current change / recent edits).
10
+
11
+ Act as **qa-orchestrator**:
12
+ 1. Read `contextkit/config.json` → `qa` (`criticalPaths`, `coverageTarget`) and the
13
+ project's existing test setup so the plan fits the stack.
14
+ 2. Identify the units, boundaries, and invariants in scope. Note which fall on
15
+ `qa.criticalPaths` (these get priority).
16
+ 3. Output the plan in **three layers**, each with concrete, specific cases (not
17
+ generic boilerplate):
18
+ - **Happy path** — the expected successful flows.
19
+ - **Edge cases** — boundaries: empty/max/negative, unicode, timezones,
20
+ concurrency, off-by-one.
21
+ - **Failure modes** — invalid input, dependency errors, partial failure,
22
+ timeouts, idempotency/retries.
23
+ 4. For each case, note the right layer (unit / integration / fuzz) so
24
+ `/scaffold-tests` can route it.
25
+
26
+ Do not write test code here — this is the plan. Offer `/scaffold-tests` next.
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Visual / browser-driven testing harness — scaffold + run screenshot/visual-regression checks (qa-e2e + design-team).
3
+ argument-hint: [status | scaffold [--js|--python] | run]
4
+ ---
5
+
6
+ # 🖼️ Visual test (qa-e2e + design-team)
7
+
8
+ Add a **browser-driven, visual** layer on top of behavioural e2e: open the running
9
+ app, exercise a flow, and verify by **screenshot / visual regression**. The kit
10
+ **scaffolds**; the browser runner is a **project** dependency (never the kit's zero-dep
11
+ hot path).
12
+
13
+ Act on **$ARGUMENTS** — route to **qa-e2e**, pair with **design-team** for baselines:
14
+
15
+ ## status
16
+ ```
17
+ node contextkit/tools/scripts/visual-test.mjs status
18
+ ```
19
+ Reports whether a visual harness exists (Playwright/Cypress for JS, pytest-playwright
20
+ for Python) and what's missing.
21
+
22
+ ## scaffold
23
+ ```
24
+ node contextkit/tools/scripts/visual-test.mjs scaffold # auto-detect stack
25
+ node contextkit/tools/scripts/visual-test.mjs scaffold --python
26
+ ```
27
+ Writes a starter (write-if-missing): a Playwright config + a `tests/visual/` screenshot
28
+ baseline. Then install the runner (the command prints it):
29
+ `npm i -D @playwright/test && npx playwright install` (JS) or
30
+ `pip install pytest-playwright && playwright install` (Python).
31
+
32
+ ## run / baseline
33
+ Run the project's visual suite (e.g. `npx playwright test tests/visual`). The first run
34
+ records baselines; later runs diff against them. Treat an **unintended** visual diff as
35
+ a failure; update baselines deliberately (`--update-snapshots`) and have **design-team**
36
+ review intentional changes.
37
+
38
+ ## judgment (qa-e2e)
39
+ - Cover the few screens where the *look* is the contract; don't snapshot everything.
40
+ - Stabilize: fixed viewport, seeded data, masked dynamic regions, wait on network-idle.
41
+ - A change isn't "done" until the visual check is green — wired into `/qa-signoff` and
42
+ the `/ship` gate.
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Create/manage the product roadmap (the what/why). New project: build it with the user. Existing: find or analyze→propose.
3
+ argument-hint: [show | new | from-existing | add | sync-pipeline]
4
+ ---
5
+
6
+ # 🗺️ Roadmap
7
+
8
+ The product/business plan in `contextkit/memory/roadmap.md` — capabilities + milestones
9
+ (P-IDs), ordered by value. **Not** bugs/tasks/SLA (those are the DevPipeline). The
10
+ roadmap is **important** — keep it real and current.
11
+
12
+ First, get the facts: `node contextkit/tools/scripts/roadmap.mjs find --json`
13
+ (tells you if the canonical roadmap is defined, and lists any existing
14
+ roadmap/PRD/spec/vision files in the repo).
15
+
16
+ Act on **$ARGUMENTS**:
17
+
18
+ ## show (default)
19
+ Read `contextkit/memory/roadmap.md`; summarize the phases, what's done/in-progress,
20
+ and the next highest-value milestone. If it's still the placeholder, say so and
21
+ offer to create it (→ `new` or `from-existing`).
22
+
23
+ ## new — build it WITH the user (greenfield or undefined)
24
+ Co-create it, don't dump a template. Ask, in a short adaptive round:
25
+ - the product vision + primary user journey (reuse `contextkit/memory/product.md` if present);
26
+ - the few **outcomes** that matter first, and roughly in what order;
27
+ - any hard deadlines/constraints.
28
+ Then draft phases `P1, P2, …` with items `P1.1, P1.2, …` — each a user-facing
29
+ capability + a one-line acceptance note. Show it, refine with the user, save.
30
+
31
+ ## from-existing — existing project
32
+ 1. If `roadmap.mjs find` listed a roadmap/PRD/spec file → read it and **import /
33
+ normalize** it into `contextkit/memory/roadmap.md` (P-ID format), keeping intent.
34
+ 2. If nothing was found → **analyze** the codebase (structure, README,
35
+ `product.md`, routes/features, open TODOs/issues) and **propose** a roadmap:
36
+ what exists, gaps, and likely next milestones. Present it as suggestions.
37
+ 3. Either way, **ask the user to add their own objectives** — turn each into a
38
+ P-ID item. The roadmap must reflect their intent, not just your inference.
39
+
40
+ ## add
41
+ Append a new milestone/item with the next P-ID and an acceptance note.
42
+
43
+ ## sync-pipeline
44
+ Hand the next milestone to execution: `/pipeline from-roadmap` breaks it into
45
+ backlog tasks (cross-referenced by P-ID). Keep the non-duplication rule —
46
+ roadmap = capabilities; pipeline = the tasks to deliver them.
47
+
48
+ After any change, save `contextkit/memory/roadmap.md` and offer `/log-session`.
@@ -0,0 +1,104 @@
1
+ ---
2
+ description: Bootstrap a brand-new (empty) project from zero — product idea, interactive questionnaire, stack suggestion, roadmap, best practices.
3
+ argument-hint: [one-line idea]
4
+ ---
5
+
6
+ # 🌱 AI Dev Tool — Start from Zero
7
+
8
+ Use this when the project is **empty** (no code yet). If there's already a
9
+ codebase, use `/setupcontextdevkit` instead. Goal: go from a blank folder to a
10
+ project with a clear product vision, a stack, a roadmap, the best-practices
11
+ constitution, and an initialized DevPipeline — by **actively** interviewing the
12
+ user and suggesting, not just scaffolding.
13
+
14
+ First confirm it's greenfield: run `node contextkit/tools/scripts/detect-stack.mjs`
15
+ and check `greenfield: true` / no `sourceDirs`. If it's not empty, stop and point
16
+ to `/setupcontextdevkit`.
17
+
18
+ ## Phase 1 — Intelligent product questionnaire (interactive)
19
+
20
+ Ask a focused, **smart** set of questions — adapt follow-ups to the answers, do
21
+ not dump a static form. Cover:
22
+ 1. **What is the app?** Problem it solves, who it's for, the core value.
23
+ 2. **The core user journey** (the one flow that must be great).
24
+ 3. **Platform**: web / mobile / desktop / CLI / API / library?
25
+ 4. **Scale & constraints**: expected users, budget, deadlines, team size, any
26
+ hard constraints (offline, on-prem, regulation like LGPD/GDPR)?
27
+ 5. **Tech preferences**: do they already have stack ideas, or want a suggestion?
28
+ 6. **Audience language** for UI text.
29
+
30
+ Summarize your understanding back and get a thumbs-up before proceeding.
31
+
32
+ ## Phase 2 — Product vision
33
+
34
+ Write `contextkit/memory/product.md`: one-paragraph vision, target user, core value,
35
+ the primary journey, non-goals. Short and sharp.
36
+
37
+ ## Phase 3 — Stack: suggest or refine
38
+
39
+ If they gave a stack, sanity-check it against the requirements and note risks. If
40
+ they want a suggestion, propose **one** recommended stack with a short rationale
41
+ and 1–2 alternatives + trade-offs (act like `architect`). Record the choice as
42
+ `/new-adr "Stack: <summary>"` (ADR-0001). Don't over-engineer for imagined scale.
43
+
44
+ **Curated stacks with playbooks.** When a curated option fits the requirements,
45
+ prefer it over an ad-hoc proposal — the playbook anchors conventions the kit
46
+ will enforce later (`/setupcontextdevkit`, scoped CLAUDE.md, `/contract-check`):
47
+
48
+ - **TanStack** (type-safe React/Solid/Vue with Query + Router; optionally
49
+ Start as the full-stack frame) → `contextkit/workflows/playbooks/tanstack.md`.
50
+ Pick it for type-safe apps where headless control matters; **don't** stack
51
+ TanStack Router on top of Next/Nuxt/Remix.
52
+
53
+ If you pick a curated stack, cite its playbook in the ADR and inherit its
54
+ conventions verbatim into the project's `CLAUDE.md` "Stack" block.
55
+
56
+ ## Phase 4 — Roadmap (product/business)
57
+
58
+ Build `contextkit/memory/roadmap.md` **with the user** via `/roadmap new`: phases/
59
+ milestones with **P-IDs** (P1.x, P2.x…), each a user-facing capability + a
60
+ one-line acceptance note, ordered by value. Co-create it — ask which outcomes
61
+ matter first; don't dump a template. This is the *what/why* of the product — NOT
62
+ bugs or CI tasks (those live in the DevPipeline).
63
+
64
+ ## Phase 5 — Best practices (the constitution)
65
+
66
+ Offer to adopt the context-coding best practices in `contextkit/best-practices.md`
67
+ (280-line rule + **intelligent** refactoring — split by responsibility, never
68
+ random; SoC; naming; errors; docs). On yes, fill the constitution section of
69
+ `CLAUDE.md` accordingly and set `practices.active = true` via `/context-config`.
70
+
71
+ ## Phase 6 — Initialize execution
72
+
73
+ Seed the DevPipeline from the roadmap: break the first milestone into a few
74
+ concrete backlog tasks —
75
+ `node contextkit/tools/scripts/pipeline.mjs add --type feature --priority P1 --title "..." --roadmap P1.1`.
76
+
77
+ As soon as the project's structure exists (apps/backend/frontend/modules), give
78
+ each its **own scoped CLAUDE.md** with `/claude-md` — the root one is the
79
+ constitution; each module documents its local rules. Do this as modules are born,
80
+ not after the codebase is already sprawling.
81
+
82
+ **Curated-stack starter (opt-in).** If Phase 3 picked a curated stack with a
83
+ starter under `templates/contextkit/starters/<stack>/`, offer to copy it into the
84
+ project root as a wiring scaffold. Default is **no**; the user explicitly
85
+ opts in. Currently available: `tanstack/` (Start + Router + Query, empty —
86
+ no invented domain, no CSS framework, no backend choice — see ADR-0017).
87
+ After copy, the starter becomes the user's code; no upgrade path.
88
+
89
+ ## Phase 6b — Version control (verify, then decide with the user)
90
+ Run `node contextkit/tools/scripts/git.mjs status`. `git init` if it's not a repo.
91
+ Then check the remote:
92
+ - **already connected** (`remoteUrl` present) → confirm it's the right one, done.
93
+ - **none** → **ask**: "Do you already have a repository to connect, or should we
94
+ create a new one?" Then run `/git setup-remote` (B1 connect existing / B2 create
95
+ new — private by default; install `gh`/`glab` if needed). A new project should be
96
+ under version control from day one. Confirm before pushing/creating.
97
+
98
+ ## Phase 7 — Set level & finish
99
+
100
+ Recommend a starting level (usually L2; L4+ if it'll be a team). Run
101
+ `node contextkit/tools/scripts/setup-complete.mjs` to clear the first-run trigger,
102
+ then `/log-session`. Report: product, stack (+ADR), roadmap, pipeline seeded,
103
+ level. The platform stays **active** — as the roadmap grows, suggest the next
104
+ practice/level. Empty project today, opinionated project tomorrow.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Inspect or edit contextkit/config.json (ledger path lists, L5 high-risk paths, distill params).
3
+ argument-hint: show [path] | set <path> <value>
4
+ ---
5
+
6
+ Inspect or edit `contextkit/config.json` — the single source of truth for ContextDevKit behaviour.
7
+
8
+ **$ARGUMENTS**
9
+
10
+ Sections you can tune:
11
+ - `ledger.important` / `ledger.irrelevant` / `ledger.registration` — which paths trigger the drift
12
+ nudge, which are ignored, which count as registering a session. **Tune these to your stack** (e.g.
13
+ Python → add `app/`, `tests/`; Go → `cmd/`, `internal/`).
14
+ - `l5.highRiskPaths` — paths the Level 5 gate protects (require `/simulate-impact` first).
15
+ - `l5.distill.*` — auto-distillation cadence.
16
+ - `level` — prefer changing via `/context-level`.
17
+
18
+ How to act — use the helper script (it coerces types and validates with zod when available):
19
+ - Show: `node contextkit/tools/scripts/context-config.mjs show [dotted.path]`
20
+ - Set: `node contextkit/tools/scripts/context-config.mjs set <dotted.path> <value>`
21
+ (arrays/objects accept JSON, e.g. `set ledger.important '["app/","tests/"]'`).
22
+
23
+ Run the appropriate command based on `$ARGUMENTS` and show the output. The script never writes a
24
+ malformed config — if `zod` is installed it validates against `contextkit/runtime/config/schema.mjs`
25
+ first. For changing the level, prefer `/context-level`.
@@ -0,0 +1,21 @@
1
+ ---
2
+ description: Diagnose this project's ContextDevKit install (node, config, hook wiring, git hooks, onboarding).
3
+ ---
4
+
5
+ > ⚠️ **Deprecated (1.0):** **/audit** runs the doctor *plus* stats, tech-debt and
6
+ > QA — prefer it. This still runs just the doctor.
7
+
8
+ Run the ContextDevKit health check:
9
+
10
+ ```
11
+ node contextkit/tools/scripts/doctor.mjs
12
+ ```
13
+
14
+ It verifies Node version, `contextkit/config.json` validity + level, that
15
+ `.claude/settings.json` hook wiring matches the configured level, git-hook
16
+ presence (Level ≥ 3), memory scaffolding, and onboarding state — printing a
17
+ suggested fix for each problem.
18
+
19
+ Show the output to the user. If it reports critical issues (✗), offer to fix them
20
+ (usually `/context-level <n>` to rewire, or re-running the installer). If it only
21
+ shows advisory notes (⚠), mention them but don't force action.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Show or change the ContextDevKit activation level (1–7).
3
+ argument-hint: [1-7]
4
+ ---
5
+
6
+ Inspect or change the ContextDevKit level for this project.
7
+
8
+ - **Show current level + what each enables**: `node contextkit/tools/scripts/context-level.mjs`
9
+ - **Change level** (e.g. to 3): `node contextkit/tools/scripts/context-level.mjs $ARGUMENTS`
10
+
11
+ Changing the level updates `contextkit/config.json` and recomposes `.claude/settings.json` hook wiring
12
+ (and installs git hooks at Level ≥ 3). Run the appropriate command based on `$ARGUMENTS`, show the
13
+ output, and remind the user to **restart Claude Code** so it reloads the hooks.
14
+
15
+ Levels: 1 Memory · 2 Ledger (drift) · 3 Multi-session · 4 Squads (agents) · 5 Proactive (gates)
16
+ · 6 Autonomy & Insight · 7 Ecosystem & Scale. (6–7 are capability tiers — no new hook.)
17
+ Going up adds capability; going down cleanly removes the now-disabled hooks.