@jeiemgi/cckit 0.11.0 → 0.13.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 (549) hide show
  1. package/.claude-plugin/plugin.json +4 -2
  2. package/AGENTS.md +22 -238
  3. package/README.md +66 -56
  4. package/SECURITY.md +4 -4
  5. package/bin/PROMPTS.md +12 -0
  6. package/bin/cckit +181 -140
  7. package/cckit.config.json +1 -1
  8. package/kit/PROMPTS.md +14 -0
  9. package/{commands → kit/commands}/kit-doctor.md +3 -4
  10. package/{commands → kit/commands}/kit-export-project.md +1 -1
  11. package/{commands → kit/commands}/kit-init.md +8 -20
  12. package/{commands → kit/commands}/kit-routines.md +1 -1
  13. package/{commands → kit/commands}/kit-update.md +3 -3
  14. package/kit/completions/cckit.bash +9 -0
  15. package/{databases → kit/databases}/supabase.json +1 -1
  16. package/{integrations → kit/integrations}/integration.schema.json +3 -3
  17. package/kit/interview/global.json +54 -0
  18. package/kit/interview/project.json +133 -0
  19. package/kit/modules/qa.json +63 -0
  20. package/kit/modules/software.json +48 -0
  21. package/{profiles → kit/profiles}/automation.json +1 -3
  22. package/{profiles → kit/profiles}/content.json +0 -2
  23. package/{profiles → kit/profiles}/marketing.json +0 -2
  24. package/{profiles → kit/profiles}/minimal.json +1 -3
  25. package/{profiles → kit/profiles}/research.json +1 -3
  26. package/{profiles → kit/profiles}/software.json +0 -2
  27. package/kit/routines/catalogue.json +84 -0
  28. package/{skills → kit/skills}/kit-add/SKILL.md +4 -4
  29. package/kit/skills/kit-advisor/SKILL.md +75 -0
  30. package/kit/skills/kit-advisor/references/close.md +53 -0
  31. package/kit/skills/kit-advisor/references/grill.md +69 -0
  32. package/kit/skills/kit-advisor/references/orchestrate.md +56 -0
  33. package/kit/skills/kit-advisor/references/plan.md +64 -0
  34. package/kit/skills/kit-advisor/references/review.md +47 -0
  35. package/kit/skills/kit-advisor/references/step-report.md +61 -0
  36. package/{skills → kit/skills}/kit-annotate/SKILL.md +2 -4
  37. package/{skills → kit/skills}/kit-autopilot/SKILL.md +7 -7
  38. package/{skills → kit/skills}/kit-cleanup/SKILL.md +4 -4
  39. package/{skills → kit/skills}/kit-contribute/SKILL.md +8 -12
  40. package/{skills → kit/skills}/kit-customize/SKILL.md +5 -8
  41. package/{skills → kit/skills}/kit-dev/SKILL.md +1 -1
  42. package/{skills → kit/skills}/kit-digest/SKILL.md +3 -3
  43. package/{skills → kit/skills}/kit-effort-close/SKILL.md +20 -12
  44. package/{skills → kit/skills}/kit-effort-new/SKILL.md +17 -14
  45. package/{skills → kit/skills}/kit-effort-pr/SKILL.md +7 -7
  46. package/{skills → kit/skills}/kit-effort-start/SKILL.md +3 -3
  47. package/{skills → kit/skills}/kit-gc/SKILL.md +3 -3
  48. package/{skills → kit/skills}/kit-next/SKILL.md +7 -7
  49. package/{skills → kit/skills}/kit-page/SKILL.md +1 -1
  50. package/{skills → kit/skills}/kit-plan-next/SKILL.md +10 -11
  51. package/{skills → kit/skills}/kit-status/SKILL.md +6 -6
  52. package/{skills → kit/skills}/kit-task-close/SKILL.md +5 -5
  53. package/{skills → kit/skills}/kit-task-new/SKILL.md +5 -5
  54. package/{skills → kit/skills}/kit-task-pr/SKILL.md +5 -5
  55. package/{skills → kit/skills}/kit-task-pr-auto/SKILL.md +1 -1
  56. package/{skills → kit/skills}/kit-task-pr-merge/SKILL.md +10 -10
  57. package/{skills → kit/skills}/kit-task-start/SKILL.md +1 -1
  58. package/{skills → kit/skills}/kit-task-sync/SKILL.md +5 -3
  59. package/{skills → kit/skills}/kit-ux-audit/SKILL.md +16 -35
  60. package/{skills → kit/skills}/kit-ux-audit/references/graph-model.md +7 -26
  61. package/{skills → kit/skills}/kit-ux-audit/references/report.md +2 -3
  62. package/{skills → kit/skills}/routing.yaml +6 -1
  63. package/kit/statusline/kit-statusline.sh +82 -0
  64. package/{templates → kit/templates}/agents/analyst.md +0 -11
  65. package/{templates → kit/templates}/agents/auto-dev.md +0 -13
  66. package/{templates → kit/templates}/agents/backend.md +0 -11
  67. package/{templates → kit/templates}/agents/designer.md +0 -11
  68. package/{templates → kit/templates}/agents/devops.md +0 -11
  69. package/{templates → kit/templates}/agents/editor.md +0 -11
  70. package/{templates → kit/templates}/agents/frontend.md +0 -11
  71. package/{templates → kit/templates}/agents/generalist.md +0 -11
  72. package/{templates → kit/templates}/agents/local-delegate.md +0 -13
  73. package/{templates → kit/templates}/agents/n8n.md +0 -11
  74. package/{templates → kit/templates}/agents/pm.md +0 -11
  75. package/{templates → kit/templates}/agents/qa.md +0 -11
  76. package/{templates → kit/templates}/agents/researcher.md +0 -11
  77. package/{templates → kit/templates}/agents/security.md +0 -11
  78. package/{templates → kit/templates}/agents/tech-lead.md +0 -11
  79. package/{templates → kit/templates}/agents/ux.md +3 -14
  80. package/{templates → kit/templates}/hooks/kit-mail-check.sh.tmpl +1 -1
  81. package/{templates → kit/templates}/instructions.md.tmpl +4 -21
  82. package/{templates → kit/templates}/kit.config.json.tmpl +0 -6
  83. package/{templates → kit/templates}/rules/authoring.md +7 -3
  84. package/{templates → kit/templates}/rules/branch-naming.md +3 -2
  85. package/{templates → kit/templates}/rules/delegation-brief.md +4 -0
  86. package/{templates → kit/templates}/rules/effort-model.md +34 -31
  87. package/{templates → kit/templates}/rules/gate-and-review.md +1 -1
  88. package/{templates → kit/templates}/rules/merge-safety.md +12 -9
  89. package/{templates → kit/templates}/rules/naming-and-ids.md +20 -24
  90. package/{templates → kit/templates}/rules/plan-next.md +5 -5
  91. package/{templates → kit/templates}/rules/react-annotate.md +0 -8
  92. package/{templates → kit/templates}/skills/campaign/SKILL.md +2 -2
  93. package/kit.config.schema.json +11 -11
  94. package/lib/PROMPTS.md +14 -0
  95. package/{scripts/lib → lib/core}/adapter-select-test.sh +7 -7
  96. package/lib/core/advisor-test.sh +55 -0
  97. package/{scripts/lib → lib/core}/agent-def-test.sh +1 -1
  98. package/{scripts/lib → lib/core}/agent-def.sh +2 -2
  99. package/{scripts/lib → lib/core}/agent-launch-test.sh +3 -3
  100. package/{scripts/lib → lib/core}/agent-profile-test.sh +2 -2
  101. package/{scripts/lib → lib/core}/agent-resolve-test.sh +4 -2
  102. package/{scripts/lib → lib/core}/agent-resolve.sh +5 -4
  103. package/{scripts → lib/core}/agent-skills-external.txt +3 -3
  104. package/{scripts → lib/core}/agent-skills-lint-test.sh +17 -17
  105. package/lib/core/agent-skills-lint.sh +115 -0
  106. package/{scripts → lib/core}/agent-template-lint-test.sh +7 -7
  107. package/lib/core/agent-template-lint.sh +58 -0
  108. package/{scripts/lib → lib/core}/board-view-test.sh +3 -3
  109. package/lib/core/board-view.sh +97 -0
  110. package/{scripts/lib → lib/core}/branch-owner-test.sh +3 -3
  111. package/lib/core/branch-owner.sh +201 -0
  112. package/lib/core/check.sh +125 -0
  113. package/{scripts/lib → lib/core}/codex-hooks-test.sh +3 -3
  114. package/{scripts → lib/core}/commitlint-test.sh +6 -6
  115. package/lib/core/commitlint.sh +54 -0
  116. package/{scripts/config-path-test.sh → lib/core/config-path-scan-test.sh} +2 -2
  117. package/{scripts/lib → lib/core}/config-path-test.sh +3 -3
  118. package/lib/core/config-path.sh +30 -0
  119. package/{scripts → lib/core}/content-skills-test.sh +17 -17
  120. package/{scripts → lib/core}/docs-marketing-words-test.sh +2 -2
  121. package/{scripts → lib/core}/docs-record-tables-test.sh +2 -2
  122. package/{scripts/lib → lib/core}/effort-metrics-test.sh +6 -6
  123. package/lib/core/effort-metrics.sh +591 -0
  124. package/{scripts/lib → lib/core}/effort-slug-test.sh +8 -4
  125. package/{scripts/lib → lib/core}/effort-slug.sh +8 -7
  126. package/lib/core/effort.sh +339 -0
  127. package/{scripts/lib → lib/core}/errors-header-test.sh +19 -9
  128. package/lib/core/errors-header.exempt +49 -0
  129. package/{scripts → lib/core}/exec-targets-test.sh +3 -3
  130. package/lib/core/feature-map.sh +76 -0
  131. package/lib/core/force-push-fence-test.sh +44 -0
  132. package/lib/core/force-push-fence.baseline +1 -0
  133. package/lib/core/force-push-fence.sh +51 -0
  134. package/{scripts → lib/core}/forge-fence-test.sh +13 -13
  135. package/{scripts → lib/core}/forge-fence.sh +14 -14
  136. package/{scripts → lib/core}/forge-report-test.sh +5 -5
  137. package/{scripts → lib/core}/forge-report.sh +18 -14
  138. package/{scripts/lib → lib/core}/git-core-test.sh +7 -7
  139. package/{scripts/lib → lib/core}/git-remote-test.sh +3 -3
  140. package/{scripts → lib/core}/guard-raw-git-ops-test.sh +4 -4
  141. package/{scripts → lib/core}/hook-adapter-test.sh +5 -5
  142. package/{scripts/lib → lib/core}/hook-refresh-test.sh +5 -5
  143. package/{scripts → lib/core}/instruction-budget-baseline.txt +2 -2
  144. package/lib/core/instruction-budget-lint.sh +238 -0
  145. package/{scripts/lib → lib/core}/integration-install-test.sh +12 -12
  146. package/lib/core/integration-install.sh +257 -0
  147. package/{scripts/lib → lib/core}/integrations-test.sh +38 -45
  148. package/lib/core/integrations.sh +244 -0
  149. package/{scripts/lib → lib/core}/kinds-test.sh +5 -5
  150. package/lib/core/kinds.sh +66 -0
  151. package/{scripts/lib → lib/core}/kit-cli-test.sh +1 -1
  152. package/{scripts/lib → lib/core}/kit-cli.sh +1 -1
  153. package/{scripts/lib → lib/core}/kit-config-resolve.sh +2 -2
  154. package/{scripts/lib → lib/core}/kit-config-test.sh +11 -11
  155. package/lib/core/kit-config.sh +164 -0
  156. package/{scripts/lib → lib/core}/kit-engine-test.sh +1 -1
  157. package/lib/core/kit-events.sh +72 -0
  158. package/lib/core/kit-local.sh +87 -0
  159. package/{scripts/lib → lib/core}/kit-manifest.sh +1 -1
  160. package/{scripts/lib → lib/core}/kit-mode-test.sh +1 -1
  161. package/{scripts/lib → lib/core}/kit-mode.sh +3 -3
  162. package/{scripts/lib → lib/core}/kit-operate.sh +1 -1
  163. package/{scripts/lib → lib/core}/kit-profile-test.sh +1 -1
  164. package/{scripts/lib → lib/core}/kit-profile.sh +2 -2
  165. package/{scripts/lib → lib/core}/kit-state-test.sh +1 -1
  166. package/lib/core/knowledge-lint.sh +106 -0
  167. package/lib/core/layout-fence-test.sh +35 -0
  168. package/lib/core/layout-fence.allow +15 -0
  169. package/lib/core/layout-fence.baseline +4 -0
  170. package/lib/core/layout-fence.sh +50 -0
  171. package/{scripts → lib/core}/leak-fence-test.sh +10 -10
  172. package/{scripts/lib → lib/core}/leak-fence.sh +1 -1
  173. package/lib/core/loose-issues-test.sh +102 -0
  174. package/lib/core/loose-issues.baseline +5 -0
  175. package/lib/core/loose-issues.sh +65 -0
  176. package/{scripts → lib/core}/marketing-walkthrough-test.sh +7 -7
  177. package/lib/core/naming-test.sh +112 -0
  178. package/lib/core/naming-verbs-test.sh +126 -0
  179. package/lib/core/naming.sh +172 -0
  180. package/{scripts/lib → lib/core}/orchestration-runtime-test.sh +4 -4
  181. package/{scripts → lib/core}/portable-test.sh +11 -7
  182. package/{scripts/lib → lib/core}/pr-evidence-test.sh +5 -5
  183. package/lib/core/pr-evidence.sh +361 -0
  184. package/{scripts/lib → lib/core}/qa-lane-test.sh +7 -7
  185. package/{scripts/lib → lib/core}/qa-lane.sh +4 -4
  186. package/{scripts/lib → lib/core}/qa-lanes-test.sh +5 -5
  187. package/lib/core/react-detect.sh +79 -0
  188. package/{scripts/lib → lib/core}/render-test.sh +1 -1
  189. package/lib/core/resident-context-test.sh +42 -0
  190. package/lib/core/resident-context.baseline +1 -0
  191. package/lib/core/resident-context.sh +56 -0
  192. package/lib/core/review-lint-baseline.txt +28 -0
  193. package/lib/core/review-lint.sh +266 -0
  194. package/{scripts → lib/core}/review-rules.conf +1 -1
  195. package/{scripts/lib → lib/core}/review-stage-test.sh +2 -2
  196. package/{scripts/lib → lib/core}/role-identity-test.sh +3 -3
  197. package/lib/core/role-identity.sh +71 -0
  198. package/{scripts → lib/core}/rule-recipes-test.sh +5 -5
  199. package/lib/core/secret-guard.sh +116 -0
  200. package/{scripts → lib/core}/self-install-test.sh +15 -16
  201. package/{scripts/lib → lib/core}/session-registry-test.sh +1 -1
  202. package/lib/core/session-registry.sh +233 -0
  203. package/{scripts → lib/core}/skill-frontmatter-baseline.txt +1 -1
  204. package/lib/core/skill-frontmatter-lint.sh +189 -0
  205. package/lib/core/spec-lint-test.sh +63 -0
  206. package/lib/core/spec-lint.sh +95 -0
  207. package/{scripts/lib → lib/core}/stage-receipt-test.sh +136 -4
  208. package/{scripts/lib → lib/core}/stage-receipt.sh +186 -7
  209. package/{scripts → lib/core}/terms-check-test.sh +6 -6
  210. package/lib/core/terms-check.sh +244 -0
  211. package/{scripts/lib → lib/core}/test-env-test.sh +2 -2
  212. package/{scripts/lib → lib/core}/test-env.sh +1 -1
  213. package/{scripts → lib/core}/test-runner-test.sh +11 -11
  214. package/{scripts → lib/core}/test.sh +12 -12
  215. package/{scripts → lib/core}/update-path-test.sh +3 -3
  216. package/{scripts → lib/core}/verbs-gen.sh +9 -9
  217. package/{scripts → lib/core}/verbs-help-test.sh +4 -4
  218. package/{scripts → lib/core}/verbs-ratchet-test.sh +24 -19
  219. package/{scripts → lib/core}/verbs-ratchet.sh +8 -8
  220. package/{scripts → lib/core}/verbs-test.sh +23 -23
  221. package/lib/core/verbs.baseline +5 -0
  222. package/{scripts/lib → lib/core}/verbs.sh +3 -3
  223. package/{scripts/lib → lib/core}/verbs.tsv +22 -20
  224. package/{scripts/lib → lib/core}/version-bump-test.sh +29 -8
  225. package/{scripts/lib → lib/core}/version-bump.sh +15 -2
  226. package/{scripts/lib → lib/core}/wave-result-test.sh +2 -2
  227. package/{scripts/lib → lib/core}/wave-result.sh +1 -1
  228. package/{scripts/lib → lib/core}/worker-brief-test.sh +4 -4
  229. package/{scripts/lib → lib/core}/worker-brief.sh +1 -1
  230. package/{scripts/lib → lib/core}/worktree-bootstrap-test.sh +1 -1
  231. package/{scripts/lib → lib/core}/worktree-issue-test.sh +2 -2
  232. package/lib/core/worktree-issue.sh +172 -0
  233. package/{scripts/lib → lib/core}/worktree-ports-test.sh +1 -1
  234. package/{scripts/lib → lib/core}/worktree-start-test.sh +2 -2
  235. package/lib/core/worktree-start.sh +790 -0
  236. package/{scripts/lib → lib/core}/zsh-safety-test.sh +11 -11
  237. package/{scripts/lib → lib/forge}/forge-github.sh +18 -7
  238. package/{scripts/lib → lib/forge}/forge-test.sh +4 -4
  239. package/{scripts/lib → lib/forge}/forge.sh +1 -1
  240. package/lib/forge/gh-board-add-test.sh +118 -0
  241. package/lib/forge/gh-log.sh +59 -0
  242. package/lib/forge/gh-project-test.sh +251 -0
  243. package/lib/forge/gh-project.sh +379 -0
  244. package/{scripts/lib → lib/forge}/gh-rest-test.sh +17 -13
  245. package/{scripts/lib → lib/forge}/gh-rest.sh +190 -16
  246. package/{scripts/lib → lib/forge}/init-github.sh +18 -8
  247. package/{scripts/lib → lib/forge}/test-forge-shim.sh +2 -1
  248. package/lib/verbs/PROMPTS.md +146 -0
  249. package/lib/verbs/annotate-setup.sh +149 -0
  250. package/{scripts → lib/verbs}/autopilot-run-test.sh +9 -9
  251. package/{scripts → lib/verbs}/autopilot-run.sh +9 -9
  252. package/{scripts → lib/verbs}/autopilot-test.sh +7 -6
  253. package/{scripts → lib/verbs}/autopilot.sh +7 -7
  254. package/{scripts/lib → lib/verbs}/captain-test.sh +1 -1
  255. package/{scripts/lib → lib/verbs}/captain.sh +8 -8
  256. package/lib/verbs/capture-project-ids.sh +99 -0
  257. package/{scripts/lib → lib/verbs}/content-kinds-gc-test.sh +7 -7
  258. package/{scripts/lib → lib/verbs}/contribute-root-test.sh +4 -4
  259. package/{scripts/lib → lib/verbs}/contribute-root.sh +1 -1
  260. package/{scripts → lib/verbs}/contribute.sh +8 -8
  261. package/{scripts → lib/verbs}/copilot-loop-test.sh +12 -12
  262. package/{scripts/lib → lib/verbs}/copilot-test.sh +15 -14
  263. package/{scripts/lib → lib/verbs}/copilot.sh +19 -19
  264. package/{scripts → lib/verbs}/database-supabase-test.sh +6 -6
  265. package/lib/verbs/effort-close-subs-test.sh +96 -0
  266. package/{scripts/lib → lib/verbs}/effort-dispatch-test.sh +5 -5
  267. package/{scripts/lib → lib/verbs}/effort-flows-test.sh +5 -5
  268. package/{scripts/lib → lib/verbs}/effort-ops-test.sh +111 -22
  269. package/lib/verbs/effort-ops.sh +1571 -0
  270. package/{scripts/lib → lib/verbs}/effort-parity-test.sh +47 -41
  271. package/{scripts/lib → lib/verbs}/effort-plan-test.sh +7 -7
  272. package/lib/verbs/effort-plan.sh +289 -0
  273. package/lib/verbs/effort-review-test.sh +107 -0
  274. package/lib/verbs/effort-review.sh +93 -0
  275. package/lib/verbs/grill-record-test.sh +49 -0
  276. package/lib/verbs/grill-record.sh +88 -0
  277. package/{scripts/lib → lib/verbs}/handoff.sh +3 -3
  278. package/{scripts → lib/verbs}/init-content-test.sh +14 -14
  279. package/{scripts/lib → lib/verbs}/init-guide.sh +6 -6
  280. package/{scripts → lib/verbs}/init-guided-test.sh +9 -9
  281. package/{scripts → lib/verbs}/init-recipes-test.sh +7 -7
  282. package/{scripts → lib/verbs}/init-upgrade-test.sh +9 -10
  283. package/lib/verbs/init.sh +1598 -0
  284. package/{scripts → lib/verbs}/install-test.sh +5 -5
  285. package/lib/verbs/install.sh +31 -0
  286. package/{scripts → lib/verbs}/integrations-check-test.sh +9 -9
  287. package/lib/verbs/integrations-check.sh +157 -0
  288. package/{scripts → lib/verbs}/kit-add-test.sh +8 -8
  289. package/lib/verbs/kit-add.sh +415 -0
  290. package/{scripts → lib/verbs}/kit-adopt-test.sh +4 -4
  291. package/{scripts → lib/verbs}/kit-adopt.sh +6 -6
  292. package/{scripts/lib → lib/verbs}/kit-brief-test.sh +44 -15
  293. package/{scripts/lib → lib/verbs}/kit-brief.sh +101 -16
  294. package/lib/verbs/kit-bump-version.sh +79 -0
  295. package/lib/verbs/kit-digest.sh +126 -0
  296. package/{scripts → lib/verbs}/kit-doctor-test.sh +57 -32
  297. package/lib/verbs/kit-doctor.sh +991 -0
  298. package/{scripts → lib/verbs}/kit-export-project-test.sh +4 -4
  299. package/lib/verbs/kit-export-project.sh +245 -0
  300. package/{scripts → lib/verbs}/kit-export-training-test.sh +3 -3
  301. package/lib/verbs/kit-export-training.sh +175 -0
  302. package/{scripts/lib → lib/verbs}/kit-gc-test.sh +5 -5
  303. package/lib/verbs/kit-gc.sh +804 -0
  304. package/{scripts/lib → lib/verbs}/kit-hotfix.sh +3 -3
  305. package/{scripts/lib → lib/verbs}/kit-interview-test.sh +2 -2
  306. package/lib/verbs/kit-interview.sh +319 -0
  307. package/{scripts/lib → lib/verbs}/kit-lib-test.sh +2 -2
  308. package/{scripts/lib → lib/verbs}/kit-lib.sh +10 -10
  309. package/{scripts → lib/verbs}/kit-migrate-test.sh +4 -4
  310. package/{scripts → lib/verbs}/kit-migrate.sh +5 -5
  311. package/{scripts/lib → lib/verbs}/kit-msg-test.sh +2 -2
  312. package/{scripts/lib → lib/verbs}/kit-msg.sh +5 -5
  313. package/{scripts → lib/verbs}/kit-onboard-test.sh +2 -3
  314. package/lib/verbs/kit-onboard.sh +69 -0
  315. package/{scripts → lib/verbs}/kit-promote-test.sh +4 -4
  316. package/{scripts → lib/verbs}/kit-promote.sh +4 -4
  317. package/{scripts → lib/verbs}/kit-remove-test.sh +4 -4
  318. package/{scripts → lib/verbs}/kit-remove.sh +5 -5
  319. package/lib/verbs/kit-routines.sh +322 -0
  320. package/lib/verbs/kit-self-update.sh +55 -0
  321. package/{scripts/lib → lib/verbs}/kit-status-test.sh +2 -2
  322. package/lib/verbs/kit-status.sh +650 -0
  323. package/{scripts/lib → lib/verbs}/kit-task-ops-test.sh +25 -2
  324. package/lib/verbs/kit-task-ops.sh +793 -0
  325. package/{scripts → lib/verbs}/kit-version-check-test.sh +3 -3
  326. package/lib/verbs/kit-version-check.sh +121 -0
  327. package/{scripts → lib/verbs}/kit-wire-test.sh +6 -6
  328. package/{scripts → lib/verbs}/kit-wire.sh +8 -8
  329. package/{scripts/lib → lib/verbs}/kto-hotfix-test.sh +3 -3
  330. package/{scripts/lib → lib/verbs}/kto-task-close-test.sh +2 -2
  331. package/{scripts/lib → lib/verbs}/kto-task-new-test.sh +20 -2
  332. package/{scripts/lib → lib/verbs}/kto-task-pr-merge-test.sh +46 -2
  333. package/{scripts/lib → lib/verbs}/kto-task-pr-test.sh +6 -6
  334. package/{scripts/lib → lib/verbs}/light-task-run-test.sh +4 -4
  335. package/{scripts/lib → lib/verbs}/light-task-test.sh +9 -9
  336. package/{scripts/lib → lib/verbs}/light-task.sh +26 -11
  337. package/{scripts/lib → lib/verbs}/next-test.sh +3 -3
  338. package/{scripts/lib → lib/verbs}/next.sh +10 -10
  339. package/{scripts → lib/verbs}/night-grant-test.sh +4 -4
  340. package/lib/verbs/night-grant.sh +454 -0
  341. package/{scripts → lib/verbs}/night-run-test.sh +3 -3
  342. package/{scripts → lib/verbs}/night-run.mjs +2 -2
  343. package/{scripts → lib/verbs}/orchestrate-test.sh +5 -5
  344. package/{scripts → lib/verbs}/orchestrate.sh +15 -15
  345. package/{scripts/lib → lib/verbs}/plan-machine-test.sh +1 -1
  346. package/{scripts/lib → lib/verbs}/plan-machine.sh +13 -13
  347. package/{scripts/lib → lib/verbs}/plan-next-test.sh +1 -1
  348. package/lib/verbs/plan-next.sh +213 -0
  349. package/{scripts → lib/verbs}/publish.sh +10 -10
  350. package/{scripts/lib → lib/verbs}/review-page-test.sh +4 -4
  351. package/lib/verbs/review-page.sh +375 -0
  352. package/lib/verbs/setup-labels.sh +96 -0
  353. package/lib/verbs/setup-milestones.sh +34 -0
  354. package/{scripts → lib/verbs}/showcase.sh +2 -2
  355. package/lib/verbs/sprint-test.sh +96 -0
  356. package/lib/verbs/sprint.sh +216 -0
  357. package/{scripts → lib/verbs}/status-test.sh +8 -8
  358. package/{scripts → lib/verbs}/status.sh +16 -16
  359. package/{scripts → lib/verbs}/task-sync-test.sh +40 -6
  360. package/lib/verbs/task-sync.sh +462 -0
  361. package/{scripts/lib → lib/verbs}/upgrade-report-test.sh +4 -4
  362. package/lib/verbs/ux-a11y-scan.sh +96 -0
  363. package/lib/verbs/ux-ds-audit.sh +146 -0
  364. package/lib/verbs/ux-graph-scan.sh +188 -0
  365. package/{scripts → lib/verbs}/wave-worker.sh +2 -2
  366. package/lib/verbs/web-install.sh +22 -0
  367. package/package.json +3 -10
  368. package/scripts/PROMPTS.md +13 -0
  369. package/scripts/agent-skills-lint.sh +12 -113
  370. package/scripts/agent-template-lint.sh +12 -56
  371. package/scripts/annotate-setup.sh +11 -151
  372. package/scripts/benchmark/checkpoint-test.sh +1 -1
  373. package/scripts/benchmark/checkpoint.sh +1 -1
  374. package/scripts/benchmark/gate.sh +2 -2
  375. package/scripts/benchmark/lib/bench-common.sh +1 -1
  376. package/scripts/capture-project-ids.sh +12 -70
  377. package/scripts/check.sh +12 -106
  378. package/scripts/force-push-fence.sh +14 -0
  379. package/scripts/init.sh +13 -1637
  380. package/scripts/install.sh +12 -29
  381. package/scripts/instruction-budget-lint.sh +13 -218
  382. package/scripts/integrations-check.sh +12 -155
  383. package/scripts/kit-add.sh +12 -413
  384. package/scripts/kit-bump-version.sh +13 -78
  385. package/scripts/kit-digest.sh +13 -125
  386. package/scripts/kit-doctor.sh +13 -971
  387. package/scripts/kit-export-project.sh +12 -243
  388. package/scripts/kit-export-training.sh +12 -173
  389. package/scripts/kit-onboard.sh +12 -67
  390. package/scripts/kit-routines.sh +12 -320
  391. package/scripts/kit-self-update.sh +12 -53
  392. package/scripts/kit-version-check.sh +12 -106
  393. package/scripts/knowledge-lint.sh +13 -98
  394. package/scripts/lib/board-view.sh +13 -96
  395. package/scripts/lib/branch-owner.sh +12 -199
  396. package/scripts/lib/commitlint.sh +12 -52
  397. package/scripts/lib/config-path.sh +13 -29
  398. package/scripts/lib/effort-metrics.sh +12 -589
  399. package/scripts/lib/effort-ops.sh +13 -1243
  400. package/scripts/lib/effort-plan.sh +12 -287
  401. package/scripts/lib/effort.sh +13 -365
  402. package/scripts/lib/gh-log.sh +14 -59
  403. package/scripts/lib/gh-project.sh +13 -254
  404. package/scripts/lib/grill-record.sh +14 -0
  405. package/scripts/lib/integration-install.sh +12 -255
  406. package/scripts/lib/integrations.sh +12 -242
  407. package/scripts/lib/kinds.sh +13 -65
  408. package/scripts/lib/kit-config.sh +12 -165
  409. package/scripts/lib/kit-events.sh +13 -71
  410. package/scripts/lib/kit-gc.sh +12 -802
  411. package/scripts/lib/kit-interview.sh +11 -316
  412. package/scripts/lib/kit-local.sh +12 -85
  413. package/scripts/lib/kit-status.sh +12 -648
  414. package/scripts/lib/kit-task-ops.sh +13 -738
  415. package/scripts/lib/naming.sh +14 -0
  416. package/scripts/lib/plan-next.sh +13 -212
  417. package/scripts/lib/pr-evidence.sh +12 -359
  418. package/scripts/lib/react-detect.sh +12 -77
  419. package/scripts/lib/review-page.sh +11 -372
  420. package/scripts/lib/role-identity.sh +13 -70
  421. package/scripts/lib/secret-guard.sh +12 -114
  422. package/scripts/lib/session-registry.sh +13 -232
  423. package/scripts/lib/spec-lint.sh +14 -0
  424. package/scripts/lib/worktree-issue.sh +12 -170
  425. package/scripts/lib/worktree-start.sh +13 -748
  426. package/scripts/night-grant.sh +12 -452
  427. package/scripts/review-lint.sh +13 -258
  428. package/scripts/setup-labels.sh +11 -82
  429. package/scripts/setup-milestones.sh +12 -21
  430. package/scripts/skill-frontmatter-lint.sh +13 -181
  431. package/scripts/task-sync.sh +13 -370
  432. package/scripts/terms-check.sh +13 -241
  433. package/scripts/ux-a11y-scan.sh +13 -95
  434. package/scripts/ux-ds-audit.sh +12 -144
  435. package/scripts/ux-graph-scan.sh +12 -186
  436. package/scripts/web-install.sh +16 -20
  437. package/docs/kit-annotate/01-explainer.html +0 -225
  438. package/docs/kit-annotate/02-implementation-plan.html +0 -196
  439. package/docs/media/.onboarding-capture.cast +0 -5
  440. package/docs/media/README.md +0 -43
  441. package/docs/media/build-demo.sh +0 -63
  442. package/docs/media/build-kit-init.sh +0 -51
  443. package/docs/media/build-onboarding.sh +0 -51
  444. package/docs/media/kit-dry-run.cast +0 -107
  445. package/docs/media/kit-dry-run.gif +0 -0
  446. package/docs/media/kit-init.cast +0 -56
  447. package/docs/media/kit-init.gif +0 -0
  448. package/docs/media/kit-onboarding.cast +0 -148
  449. package/docs/media/kit-onboarding.gif +0 -0
  450. package/integrations/mempalace.json +0 -28
  451. package/scripts/lib/gh-project-test.sh +0 -135
  452. package/scripts/review-lint-baseline.txt +0 -28
  453. package/scripts/verbs.baseline +0 -5
  454. package/templates/hooks/mempal_followup.sh.tmpl +0 -97
  455. package/templates/hooks/mempal_precompact.sh.tmpl +0 -4
  456. package/templates/hooks/mempal_save.sh.tmpl +0 -4
  457. package/templates/hooks/mempal_session_start.sh.tmpl +0 -42
  458. package/templates/rules/mempalace.md +0 -111
  459. /package/{commands → kit/commands}/kit-docs.md +0 -0
  460. /package/{commands → kit/commands}/kit-export-training.md +0 -0
  461. /package/{databases → kit/databases}/supabase/guide.html +0 -0
  462. /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/client.ts +0 -0
  463. /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/server.ts +0 -0
  464. /package/{githooks → kit/githooks}/pre-commit +0 -0
  465. /package/{integrations → kit/integrations}/emil-design-eng.json +0 -0
  466. /package/{integrations → kit/integrations}/graft.json +0 -0
  467. /package/{integrations → kit/integrations}/impeccable.json +0 -0
  468. /package/{integrations → kit/integrations}/lavish.json +0 -0
  469. /package/{integrations → kit/integrations}/mlx-lm.json +0 -0
  470. /package/{integrations → kit/integrations}/web-design-guidelines.json +0 -0
  471. /package/{recipes → kit/recipes}/nextjs-shadcn.json +0 -0
  472. /package/{skills → kit/skills}/kit-docs-writer/SKILL.md +0 -0
  473. /package/{skills → kit/skills}/kit-onboard/SKILL.md +0 -0
  474. /package/{skills → kit/skills}/kit-security-sweep/SKILL.md +0 -0
  475. /package/{skills → kit/skills}/kit-ship/SKILL.md +0 -0
  476. /package/{skills → kit/skills}/kit-ux-audit/references/a11y.md +0 -0
  477. /package/{skills → kit/skills}/kit-ux-audit/references/consistency.md +0 -0
  478. /package/{skills → kit/skills}/kit-ux-audit/references/heuristics.md +0 -0
  479. /package/{templates → kit/templates}/benchmarks/SCHEMA.md +0 -0
  480. /package/{templates → kit/templates}/benchmarks/abstain.jsonl +0 -0
  481. /package/{templates → kit/templates}/benchmarks/adversarial.jsonl +0 -0
  482. /package/{templates → kit/templates}/benchmarks/benchmark.config.json +0 -0
  483. /package/{templates → kit/templates}/benchmarks/quality.jsonl +0 -0
  484. /package/{templates → kit/templates}/benchmarks/retrieval.jsonl +0 -0
  485. /package/{templates → kit/templates}/codex/hooks.json.tmpl +0 -0
  486. /package/{templates → kit/templates}/hooks/guard-base-branch-commit.sh.tmpl +0 -0
  487. /package/{templates → kit/templates}/hooks/guard-raw-git-ops.sh.tmpl +0 -0
  488. /package/{templates → kit/templates}/hooks/kit-local-status.sh.tmpl +0 -0
  489. /package/{templates → kit/templates}/hooks/kit_version_check.sh.tmpl +0 -0
  490. /package/{templates → kit/templates}/hooks/prepush_gate.sh.tmpl +0 -0
  491. /package/{templates → kit/templates}/hooks/repo-hygiene.sh.tmpl +0 -0
  492. /package/{templates → kit/templates}/knowledge-INDEX.md.tmpl +0 -0
  493. /package/{templates → kit/templates}/lib/kit-sigil.sh.tmpl +0 -0
  494. /package/{templates → kit/templates}/rules/code-retrieval.md +0 -0
  495. /package/{templates → kit/templates}/rules/communication-style.md +0 -0
  496. /package/{templates → kit/templates}/rules/design-routing.md +0 -0
  497. /package/{templates → kit/templates}/rules/issue-lifecycle.md +0 -0
  498. /package/{templates → kit/templates}/rules/knowledge-base.md +0 -0
  499. /package/{templates → kit/templates}/rules/plain-language.md +0 -0
  500. /package/{templates → kit/templates}/rules/plan-output-format.md +0 -0
  501. /package/{templates → kit/templates}/rules/review-pages.md +0 -0
  502. /package/{templates → kit/templates}/rules/risk-tiered-review.md +0 -0
  503. /package/{templates → kit/templates}/rules/shared-checkout.md +0 -0
  504. /package/{templates → kit/templates}/rules/skill-gaps.md +0 -0
  505. /package/{templates → kit/templates}/rules/task-management.md +0 -0
  506. /package/{templates → kit/templates}/settings/settings.json.tmpl +0 -0
  507. /package/{templates → kit/templates}/settings/settings.local.json.tmpl +0 -0
  508. /package/{templates → kit/templates}/skills/NAMESPACED +0 -0
  509. /package/{templates → kit/templates}/skills/brand-voice/SKILL.md +0 -0
  510. /package/{templates → kit/templates}/skills/brand-voice/references/voice-template.md +0 -0
  511. /package/{templates → kit/templates}/skills/campaign/references/plan-template.md +0 -0
  512. /package/{templates → kit/templates}/skills/concrete/SKILL.md +0 -0
  513. /package/{templates → kit/templates}/skills/copywriting/SKILL.md +0 -0
  514. /package/{templates → kit/templates}/skills/copywriting/references/copy-frameworks.md +0 -0
  515. /package/{templates → kit/templates}/skills/copywriting/references/natural-transitions.md +0 -0
  516. /package/{templates → kit/templates}/skills/feature-build-refine/SKILL.md +0 -0
  517. /package/{templates → kit/templates}/skills/karpathy-guidelines/SKILL.md +0 -0
  518. /package/{templates → kit/templates}/skills/morning-briefing/SKILL.md +0 -0
  519. /package/{templates → kit/templates}/skills/page-design/SKILL.md +0 -0
  520. /package/{templates → kit/templates}/skills/page-design/add.json +0 -0
  521. /package/{templates → kit/templates}/skills/page-design/references/design-file-template.md +0 -0
  522. /package/{templates → kit/templates}/skills/page-design/references/generic-page-patterns.md +0 -0
  523. /package/{templates → kit/templates}/skills/page-design/references/minimum-rules.md +0 -0
  524. /package/{templates → kit/templates}/skills/speckit/SKILL.md +0 -0
  525. /package/{templates → kit/templates}/skills/supabase-patterns/SKILL.md +0 -0
  526. /package/{scripts/lib → lib/core}/adapter-select.sh +0 -0
  527. /package/{scripts/lib → lib/core}/agent-launch.sh +0 -0
  528. /package/{scripts/lib → lib/core}/agent-profile.sh +0 -0
  529. /package/{scripts/lib → lib/core}/cckit-output.sh +0 -0
  530. /package/{scripts/lib → lib/core}/codex-hooks.sh +0 -0
  531. /package/{scripts → lib/core}/forge-fence.baseline +0 -0
  532. /package/{scripts/lib → lib/core}/git-remote.sh +0 -0
  533. /package/{scripts/lib → lib/core}/hook-refresh.sh +0 -0
  534. /package/{scripts → lib/core}/instruction-budget-lint-test.sh +0 -0
  535. /package/{scripts/lib → lib/core}/kit-state.sh +0 -0
  536. /package/{scripts/lib → lib/core}/orchestration-runtime.sh +0 -0
  537. /package/{scripts/lib → lib/core}/project-scan.sh +0 -0
  538. /package/{scripts/lib → lib/core}/render.sh +0 -0
  539. /package/{scripts → lib/core}/review-lint-test.sh +0 -0
  540. /package/{scripts/lib → lib/core}/review-stage.sh +0 -0
  541. /package/{scripts → lib/core}/skill-frontmatter-lint-test.sh +0 -0
  542. /package/{scripts/lib → lib/core}/task-source-file.sh +0 -0
  543. /package/{scripts/lib → lib/core}/task-source.sh +0 -0
  544. /package/{scripts/lib → lib/core}/toon.sh +0 -0
  545. /package/{scripts/lib → lib/core}/ui.sh +0 -0
  546. /package/{scripts/lib → lib/forge}/forge-none.sh +0 -0
  547. /package/{scripts → lib/verbs}/debug.sh +0 -0
  548. /package/{scripts → lib/verbs}/night-run.test.mjs +0 -0
  549. /package/{scripts/lib → lib/verbs}/upgrade-report.sh +0 -0
package/bin/cckit CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env bash
2
2
  # cckit — the CLI dispatcher. A thin bash front-end over the git-mechanics bundle (scripts/lib).
3
- # Agent-agnostic: every verb runs from a shell; append --llm for machine-readable output.
3
+ # Agent-agnostic: every verb runs from a shell; append --json for machine-readable output.
4
4
  # Driven entirely from cckit.config.json — no org/repo is hardcoded. See AGENTS.md.
5
5
  #
6
- # Every verb, its question, a prompt to paste and its usage live in ONE table: scripts/lib/verbs.tsv
7
- # (read through scripts/lib/verbs.sh). `cckit help` prints it grouped by question; `cckit commands
8
- # --json` prints it as data; scripts/verbs-test.sh fails when this dispatcher's case labels, the CLI
9
- # reference page, skills/routing.yaml or scripts/forge-report.sh drift from it.
6
+ # Every verb, its question, a prompt to paste and its usage live in ONE table: lib/core/verbs.tsv
7
+ # (read through lib/core/verbs.sh). `cckit help` prints it grouped by question; `cckit commands
8
+ # --json` prints it as data; lib/core/verbs-test.sh fails when this dispatcher's case labels, the CLI
9
+ # reference page, kit/skills/routing.yaml or lib/core/forge-report.sh drift from it.
10
10
  set -eu
11
11
 
12
- # Resolve this script through symlinks — Homebrew and scripts/install.sh link bin/cckit onto
12
+ # Resolve this script through symlinks — Homebrew and lib/verbs/install.sh link bin/cckit onto
13
13
  # PATH, so $0 may be a symlink; follow it to find the real repo root (where scripts/lib lives).
14
14
  SOURCE="${BASH_SOURCE[0]:-$0}"
15
15
  while [ -h "$SOURCE" ]; do
@@ -19,7 +19,7 @@ while [ -h "$SOURCE" ]; do
19
19
  done
20
20
  BIN="$(cd -P "$(dirname "$SOURCE")" && pwd)"
21
21
  ROOT="$(cd "$BIN/.." && pwd)"
22
- LIB="$ROOT/scripts/lib"
22
+ LIB="$ROOT/lib"
23
23
 
24
24
  # Resolve the PROJECT config from the directory cckit was invoked in (walk upward for
25
25
  # cckit.config.json, or .claude/kit.config.json), so board/lifecycle verbs act on the project you
@@ -28,7 +28,7 @@ LIB="$ROOT/scripts/lib"
28
28
  # An explicit KIT_CONFIG in the environment always wins. The walk lives in the ONE shared resolver
29
29
  # (config-path.sh, #69) that every kit entrypoint uses.
30
30
  # shellcheck source=/dev/null
31
- source "$LIB/config-path.sh"
31
+ source "$LIB/core/config-path.sh"
32
32
  _KIT_CONFIG_GIVEN="${KIT_CONFIG:+1}" # 1 = the caller named a config; init keeps only that one (#487)
33
33
  if [ -z "${KIT_CONFIG:-}" ]; then
34
34
  KIT_CONFIG="$(kit_config_find "$PWD" || true)"
@@ -41,46 +41,65 @@ export KIT_CONFIG
41
41
 
42
42
  # Structured-output helpers (cckit_is_json / cckit_json) — wired into every verb below.
43
43
  # shellcheck source=/dev/null
44
- source "$LIB/cckit-output.sh"
44
+ source "$LIB/core/cckit-output.sh"
45
45
  # Terminal ergonomics (color/tty gating, optional glow/fzf) — detect-or-fallback, never required.
46
46
  # shellcheck source=/dev/null
47
- source "$LIB/ui.sh"
47
+ source "$LIB/core/ui.sh"
48
48
 
49
49
  # The verb table (#555): help, the command catalog and completions read it.
50
50
  # shellcheck source=/dev/null
51
- source "$LIB/verbs.sh"
51
+ source "$LIB/core/verbs.sh"
52
52
  usage() { verbs_help; }
53
53
 
54
- # --llm flag → structured output (parsed by agents). Strip it from positional args, export a flag.
54
+ # --json → structured output (parsed by agents). Strip it from positional args, export a flag.
55
+ # `--llm` and `--output=json` are older spellings of the same flag and keep working (#588).
55
56
  CCKIT_OUTPUT="human"
57
+ _json_flag=0
56
58
  args=()
57
59
  for a in "$@"; do
58
60
  case "$a" in
59
61
  --llm|--output=json) CCKIT_OUTPUT="json" ;;
62
+ --json) _json_flag=1 ;;
60
63
  *) args+=("$a") ;;
61
64
  esac
62
65
  done
63
66
  set -- "${args[@]+"${args[@]}"}"
64
- export CCKIT_OUTPUT
65
67
 
66
68
  # Bare `cckit` (no verb) resumes the last session's handoff (locked behavior).
67
69
  cmd="${1:-resume}"; shift || true
68
- # The verb name, for a forge refusal that names it (scripts/lib/forge.sh forge_need).
70
+ # The verb name, for a forge refusal that names it (lib/forge/forge.sh forge_need).
69
71
  export CCKIT_VERB="$cmd"
72
+ # The first argument as typed, before an alias adds words in front of it: `cckit sync --help` is help.
73
+ _first_arg="${1:-}"
70
74
 
71
- # An old verb name (a `kind=alias` row of scripts/lib/verbs.tsv) still works (#557): it prints a
72
- # one-line notice on stderr and runs the verb it was renamed to. CCKIT_VERB keeps the typed name, so
73
- # a refusal names what the user ran. Aliases are never removed in the rename arc.
75
+ # An old verb name (a `kind=alias` row of lib/core/verbs.tsv) still works (#557): it prints a
76
+ # one-line notice on stderr and runs the verb it was renamed to. A target may carry words after the
77
+ # verb (`status --board`, `agent lib`, #588); they go in front of the typed arguments. CCKIT_VERB
78
+ # keeps the typed name, so a refusal names what the user ran. Aliases are never removed before 1.0.
74
79
  if _alias_target="$(verbs_alias_target "$cmd")"; then
75
80
  verbs_alias_notice "$cmd" "$_alias_target" >&2
76
- cmd="$_alias_target"
81
+ # shellcheck disable=SC2086 # the target's words split on purpose: "status --board" → status, --board
82
+ set -- $_alias_target "$@"
83
+ cmd="$1"; shift
77
84
  fi
78
85
 
86
+ # `--json` is the documented output flag. Three verbs own a `--json` of their own, with another
87
+ # shape, and receive it untouched: `commands --json` (the full catalog), `status --board --json`
88
+ # (the board as one document) and `bench … --json`. Everywhere else it means CCKIT_OUTPUT=json.
89
+ if [ "$_json_flag" = 1 ]; then
90
+ case "$cmd" in
91
+ commands|bench) set -- "$@" --json ;;
92
+ status) case " $* " in *" --board "*) set -- "$@" --json ;; *) CCKIT_OUTPUT="json" ;; esac ;;
93
+ *) CCKIT_OUTPUT="json" ;;
94
+ esac
95
+ fi
96
+ export CCKIT_OUTPUT
97
+
79
98
  # `cckit <verb> --help` (#556): the dispatcher answers from the verb table before the verb runs, so
80
99
  # every verb has help and none sees a --help it does not parse. A verb whose table row says
81
100
  # ownhelp=yes then runs with that --help too, in a child, and its own text follows under "Details:".
82
101
  # Help always exits 0: some verbs print their usage on --help with rc 2.
83
- case "${1:-}" in
102
+ case "$_first_arg" in
84
103
  -h|--help)
85
104
  if [ -z "${_CCKIT_HELP_SHOWN:-}" ] && verbs_entry "$cmd"; then
86
105
  [ "$(verbs_get "$cmd" 7)" = yes ] || exit 0
@@ -101,13 +120,13 @@ case "$cmd" in
101
120
  # KIT_PROJECTS_V2 drive repo resolution, the worktree base, and the board guard below —
102
121
  # without this, effort start silently branches from origin/main on a non-main-based repo (#151).
103
122
  # shellcheck source=/dev/null
104
- source "$LIB/kit-config.sh" && load_kit_config
123
+ source "$LIB/core/kit-config.sh" && load_kit_config
105
124
  # shellcheck source=/dev/null
106
- source "$LIB/effort.sh"
125
+ source "$LIB/core/effort.sh"
107
126
  # shellcheck source=/dev/null
108
- source "$LIB/effort-ops.sh" # the new|start|pr|close lifecycle ops (compose effort.sh helpers)
127
+ source "$LIB/verbs/effort-ops.sh" # the new|start|pr|close lifecycle ops (compose effort.sh helpers)
109
128
  # shellcheck source=/dev/null
110
- source "$LIB/effort-metrics.sh" # effort_ctx_bucket — sizes the ctx:* label on `effort new`
129
+ source "$LIB/core/effort-metrics.sh" # effort_ctx_bucket — sizes the ctx:* label on `effort new`
111
130
  sub="${1:-}"; shift || true
112
131
  case "$sub" in
113
132
  new)
@@ -116,31 +135,65 @@ case "$cmd" in
116
135
  # effort_new, so this is a safe no-op when Projects v2 is off or the IDs aren't captured.
117
136
  if [ "${KIT_PROJECTS_V2:-}" = "true" ]; then
118
137
  # shellcheck source=/dev/null
119
- source "$LIB/gh-project.sh"; load_project_ids >/dev/null 2>&1 || true
138
+ source "$LIB/forge/gh-project.sh"; load_project_ids >/dev/null 2>&1 || true
120
139
  # shellcheck source=/dev/null
121
- source "$LIB/role-identity.sh" 2>/dev/null || true
140
+ source "$LIB/core/role-identity.sh" 2>/dev/null || true
122
141
  fi
123
142
  effort_new "$@" ;;
143
+ sub)
144
+ if [ "${KIT_PROJECTS_V2:-}" = "true" ]; then
145
+ # shellcheck source=/dev/null
146
+ source "$LIB/forge/gh-project.sh"; load_project_ids >/dev/null 2>&1 || true
147
+ fi
148
+ effort_sub "$@" ;;
149
+ retitle) effort_retitle "$@" ;;
124
150
  chain) effort_chain "$@" ;;
125
151
  start) effort_start "$@" ;;
126
152
  pr)
127
153
  # role-identity gives the PR its role title, commit trailer and signature; the board
128
154
  # helpers load lazily inside effort_pr (_eo_source_board).
129
155
  # shellcheck source=/dev/null
130
- source "$LIB/role-identity.sh" 2>/dev/null || true
156
+ source "$LIB/core/role-identity.sh" 2>/dev/null || true
131
157
  effort_pr "$@" ;;
132
158
  close) effort_close "$@" ;;
133
- plan) source "$LIB/effort-plan.sh"; effort_plan "$@" ;;
134
- *) echo "cckit effort <new|chain|start|pr|close|plan>" >&2; exit 2 ;;
159
+ plan)
160
+ # One planning verb (#585). Bare: the session-fit view of the open efforts. `--issues`: the
161
+ # open issues in dependency waves (was `cckit plan`). `--wave`: the next wave as a fan-out
162
+ # brief plus the captain drive (was `cckit wave` / `copilot`). `--next`: what to build next,
163
+ # from what the kit already does (was `cckit plan-next`). The old names are alias rows.
164
+ case "${1:-}" in
165
+ --issues) shift
166
+ # shellcheck source=/dev/null
167
+ source "$LIB/verbs/plan-machine.sh"; plan_machine "$@" ;;
168
+ --wave) shift
169
+ # shellcheck source=/dev/null
170
+ source "$LIB/verbs/copilot.sh"; copilot_brief "$@" ;;
171
+ --next) shift
172
+ # shellcheck source=/dev/null
173
+ source "$LIB/verbs/plan-next.sh"; plan_next "$@" ;;
174
+ *)
175
+ # shellcheck source=/dev/null
176
+ source "$LIB/verbs/effort-plan.sh"; effort_plan "$@" ;;
177
+ esac ;;
178
+ sprint)
179
+ # One week, Monday to Monday, as a forge milestone (#570). A sub-verb, so the top-level verb
180
+ # count does not grow; `name` and `bounds` run on git alone.
181
+ # shellcheck source=/dev/null
182
+ source "$LIB/verbs/sprint.sh"; sprint_cli "$@" ;;
183
+ review)
184
+ # Each sub against its own `## Spec`, one verdict line per sub (#583). A read.
185
+ # shellcheck source=/dev/null
186
+ source "$LIB/verbs/effort-review.sh"; effort_review "$@" ;;
187
+ *) echo "cckit effort <new|sub|retitle|chain|start|pr|close|plan|sprint|review>" >&2; exit 2 ;;
135
188
  esac
136
189
  ;;
137
190
  start)
138
191
  # Isolated worktree + branch for an issue (wt_start drives off cckit.config.json: repo + base
139
192
  # branch). Config must be loaded so KIT_REPO / KIT_BASE_BRANCH are set before wt_start runs.
140
193
  # shellcheck source=/dev/null
141
- source "$LIB/kit-config.sh" && load_kit_config
194
+ source "$LIB/core/kit-config.sh" && load_kit_config
142
195
  # shellcheck source=/dev/null
143
- source "$LIB/role-identity.sh"; source "$LIB/worktree-start.sh"
196
+ source "$LIB/core/role-identity.sh"; source "$LIB/core/worktree-start.sh"
144
197
  if cckit_is_json; then
145
198
  # `&& … ||` keeps `set -e` from exiting on a refused start before the JSON result is printed.
146
199
  out="$(wt_start "$@" 2>&1)" && rc=0 || rc=$?
@@ -156,9 +209,9 @@ case "$cmd" in
156
209
  if [ "$cmd" = pr ]; then case "${1:-}" in -h|--help)
157
210
  echo 'cckit pr <issue> "<summary>" ["<commit-msg>"] [--base <branch>]'; exit 0 ;; esac; fi
158
211
  # shellcheck source=/dev/null
159
- source "$LIB/kit-config.sh" && load_kit_config
212
+ source "$LIB/core/kit-config.sh" && load_kit_config
160
213
  # shellcheck source=/dev/null
161
- source "$LIB/role-identity.sh"; source "$LIB/gh-project.sh"; source "$LIB/kit-task-ops.sh"
214
+ source "$LIB/core/role-identity.sh"; source "$LIB/forge/gh-project.sh"; source "$LIB/verbs/kit-task-ops.sh"
162
215
  if [ "$cmd" = close ]; then case "${1:-}" in -h|--help)
163
216
  echo 'cckit close <issue> ["<summary>"] [--reason completed|not-planned|duplicate] [--duplicate-of N] [--superseded-by N]'; exit 0 ;; esac; fi
164
217
  if cckit_is_json; then
@@ -186,9 +239,9 @@ case "$cmd" in
186
239
  # Carry ONE merged change to the release branch (#360): its own PR path, because a cherry-pick
187
240
  # has no issue for `cckit pr` to read or close.
188
241
  # shellcheck source=/dev/null
189
- source "$LIB/kit-config.sh" && load_kit_config
242
+ source "$LIB/core/kit-config.sh" && load_kit_config
190
243
  # shellcheck source=/dev/null
191
- source "$LIB/worktree-start.sh"; source "$LIB/kit-hotfix.sh"
244
+ source "$LIB/core/worktree-start.sh"; source "$LIB/verbs/kit-hotfix.sh"
192
245
  if cckit_is_json; then
193
246
  out="$(kto_hotfix "$@" 2>&1)" && rc=0 || rc=$?
194
247
  url="$(printf '%s' "$out" | grep -oE 'https://[^ ]+/pull/[0-9]+' | tail -1)"
@@ -204,9 +257,9 @@ case "$cmd" in
204
257
  # an agent never needs raw `gh issue create`, which skips the board (#361). Multi-part work is
205
258
  # `cckit effort new`. Defaults: kind task, priority p2; role from --role or KIT_DEFAULT_ROLE.
206
259
  # shellcheck source=/dev/null
207
- source "$LIB/kit-config.sh" && load_kit_config
260
+ source "$LIB/core/kit-config.sh" && load_kit_config
208
261
  # shellcheck source=/dev/null
209
- source "$LIB/role-identity.sh"; source "$LIB/gh-project.sh"; source "$LIB/kit-task-ops.sh"
262
+ source "$LIB/core/role-identity.sh"; source "$LIB/forge/gh-project.sh"; source "$LIB/verbs/kit-task-ops.sh"
210
263
  n_role="${KIT_DEFAULT_ROLE:-}"; n_kind="task"; n_prio="p2"; n_ms=""; n_plan=""; n_blocked=""; n_body=""; n_title=""
211
264
  while [ $# -gt 0 ]; do
212
265
  case "$1" in
@@ -241,13 +294,13 @@ case "$cmd" in
241
294
  # kit-task-ops.sh is loaded for kto_pr_title only, so the PR title is built by the same code
242
295
  # `cckit pr` uses.
243
296
  # shellcheck source=/dev/null
244
- source "$LIB/kit-config.sh" && load_kit_config
297
+ source "$LIB/core/kit-config.sh" && load_kit_config
245
298
  # shellcheck source=/dev/null
246
- source "$LIB/worktree-issue.sh"; source "$LIB/worktree-start.sh"
299
+ source "$LIB/core/worktree-issue.sh"; source "$LIB/core/worktree-start.sh"
247
300
  # shellcheck source=/dev/null
248
- source "$LIB/commitlint.sh"; source "$LIB/kit-task-ops.sh"
301
+ source "$LIB/core/commitlint.sh"; source "$LIB/verbs/kit-task-ops.sh"
249
302
  # shellcheck source=/dev/null
250
- source "$LIB/light-task.sh"
303
+ source "$LIB/verbs/light-task.sh"
251
304
  lt_cli "$@"
252
305
  ;;
253
306
  merge)
@@ -256,38 +309,19 @@ case "$cmd" in
256
309
  # every raw `gh pr merge` (#361). An effort's PR merges with `cckit effort close <N>`: an
257
310
  # effort/* head is refused here (#379; KIT_FORCE=1 overrides).
258
311
  # shellcheck source=/dev/null
259
- source "$LIB/kit-config.sh" && load_kit_config
312
+ source "$LIB/core/kit-config.sh" && load_kit_config
260
313
  # shellcheck source=/dev/null
261
- source "$LIB/role-identity.sh"; source "$LIB/gh-project.sh"; source "$LIB/kit-task-ops.sh"
314
+ source "$LIB/core/role-identity.sh"; source "$LIB/forge/gh-project.sh"; source "$LIB/verbs/kit-task-ops.sh"
262
315
  case "${1:-}" in -h|--help) echo 'cckit merge [<pr>] [--squash|--merge|--rebase] merge (squash by default; rebases on conflict), close linked issues, GC branch + worktree, update the PR base'; exit 0 ;; esac
263
316
  kto_task_pr_merge "$@"
264
317
  ;;
265
- sync) exec "$ROOT/scripts/task-sync.sh" "$@" ;;
266
- plan)
267
- # Wave plan over the board (deps-ordered, file-disjoint, session-fit). Runs in the invoking
268
- # project; needs config so KIT_REPO is set before plan-machine reads it.
269
- # shellcheck source=/dev/null
270
- source "$LIB/kit-config.sh" && load_kit_config
271
- # shellcheck source=/dev/null
272
- source "$LIB/plan-machine.sh"; plan_machine "$@"
273
- ;;
274
- plan-next)
275
- # Forward planner: introspect the CURRENT capability surface (skills/verbs/rules/docs) and
276
- # propose what to build next, grounded in what the kit can already do. Filesystem-only — config
277
- # is loaded for the project-root inference (KIT_CONFIG), then plan-next scans that root. Output
278
- # is HUMAN / orchestrator-facing only — never wired into a monitored model's context (#86).
279
- # shellcheck source=/dev/null
280
- source "$LIB/kit-config.sh" && load_kit_config 2>/dev/null || true
281
- # shellcheck source=/dev/null
282
- source "$LIB/plan-next.sh"; plan_next "$@"
283
- ;;
284
318
  cleanup)
285
319
  # ONE guided destructive sweep over the gc analysis: plan first, delete only the SAFE rows, and
286
320
  # only with --yes. Orphans, protected branches and stashes are surfaced and left alone.
287
321
  # shellcheck source=/dev/null
288
- source "$LIB/kit-config.sh" && load_kit_config
322
+ source "$LIB/core/kit-config.sh" && load_kit_config
289
323
  # shellcheck source=/dev/null
290
- source "$LIB/kit-gc.sh"
324
+ source "$LIB/verbs/kit-gc.sh"
291
325
  if cckit_is_json; then
292
326
  # Keep BOTH the exit status and the diagnostic. `|| true` + `2>/dev/null` would turn a refusal
293
327
  # (protection helper missing, analysis failed) or a partial run (a remote delete that failed)
@@ -317,9 +351,9 @@ case "$cmd" in
317
351
  ;;
318
352
  gc)
319
353
  # shellcheck source=/dev/null
320
- source "$LIB/kit-config.sh" && load_kit_config
354
+ source "$LIB/core/kit-config.sh" && load_kit_config
321
355
  # shellcheck source=/dev/null
322
- source "$LIB/kit-gc.sh"
356
+ source "$LIB/verbs/kit-gc.sh"
323
357
  case " $* " in
324
358
  *" --prune "*|*" prune "*)
325
359
  # Remove worktrees + local branches whose PR merged (SAFE) or whose work is already on base
@@ -341,44 +375,35 @@ case "$cmd" in
341
375
  ;;
342
376
  esac
343
377
  ;;
344
- orchestrate) exec "$ROOT/scripts/orchestrate.sh" "$@" ;;
345
- autopilot) exec "$ROOT/scripts/autopilot.sh" "$@" ;;
378
+ orchestrate) exec "$ROOT/lib/verbs/orchestrate.sh" "$@" ;;
379
+ autopilot) exec "$ROOT/lib/verbs/autopilot.sh" "$@" ;;
346
380
  next)
347
381
  # Everyday-dev helper: surface the unblocked set + the one command to start the top issue.
348
382
  # shellcheck source=/dev/null
349
- source "$LIB/kit-config.sh" && load_kit_config
383
+ source "$LIB/core/kit-config.sh" && load_kit_config
350
384
  # tasks.default = light (the marketing profile): a bare `cckit next` answers from the light
351
385
  # task list — the same output as `cckit task next`. Any argument (`--effort <N>`, a filter)
352
386
  # asks about issues and takes the issue path, as does every project whose default is issues.
353
387
  if [ "$#" -eq 0 ]; then
354
388
  # shellcheck source=/dev/null
355
- source "$LIB/task-source.sh"
389
+ source "$LIB/core/task-source.sh"
356
390
  if [ "$(task_default_name)" = "light" ]; then
357
391
  # shellcheck source=/dev/null
358
- source "$LIB/worktree-issue.sh"; source "$LIB/light-task.sh"
392
+ source "$LIB/core/worktree-issue.sh"; source "$LIB/verbs/light-task.sh"
359
393
  lt_cli next
360
394
  exit $?
361
395
  fi
362
396
  fi
363
397
  # shellcheck source=/dev/null
364
- source "$LIB/next.sh"; next_issue "$@"
365
- ;;
366
- wave)
367
- # Read the open efforts and propose the incoming waves of work: emit the wave-0 Task-subagent
368
- # fan-out + the between-waves captain drive. (`copilot`, its old name, reaches here through the alias path above.)
369
- # Runs in the invoking project; needs config so KIT_REPO is set before it reads it.
370
- # shellcheck source=/dev/null
371
- source "$LIB/kit-config.sh" && load_kit_config
372
- # shellcheck source=/dev/null
373
- source "$LIB/copilot.sh"; copilot_brief "$@"
398
+ source "$LIB/verbs/next.sh"; next_issue "$@"
374
399
  ;;
375
400
  watch)
376
401
  # Captain: gate open PRs, squash-merge the CLEAN ones, advance to the next wave. Runs in the
377
402
  # invoking project; needs config so KIT_REPO is set before captain reads it.
378
403
  # shellcheck source=/dev/null
379
- source "$LIB/kit-config.sh" && load_kit_config
404
+ source "$LIB/core/kit-config.sh" && load_kit_config
380
405
  # shellcheck source=/dev/null
381
- source "$LIB/captain.sh"
406
+ source "$LIB/verbs/captain.sh"
382
407
  watch_loop=0; watch_args=()
383
408
  for a in "$@"; do case "$a" in --loop) watch_loop=1 ;; *) watch_args+=("$a") ;; esac; done
384
409
  if [ "$watch_loop" = "1" ]; then
@@ -393,16 +418,16 @@ case "$cmd" in
393
418
  cd "$ROOT"
394
419
  # `--next` reports the version the conventional commits imply; otherwise cut a release.
395
420
  case "${1:-}" in
396
- --next) exec "$ROOT/scripts/lib/version-bump.sh" --next ;;
397
- *) exec "$ROOT/scripts/publish.sh" "$@" ;;
421
+ --next) exec "$ROOT/lib/core/version-bump.sh" --next ;;
422
+ *) exec "$ROOT/lib/verbs/publish.sh" "$@" ;;
398
423
  esac
399
424
  ;;
400
- update) exec "$ROOT/scripts/kit-version-check.sh" "$@" ;;
401
- migrate) exec "$ROOT/scripts/kit-migrate.sh" "$@" ;;
402
- adopt) exec "$ROOT/scripts/kit-adopt.sh" "$@" ;;
403
- doctor) exec "$ROOT/scripts/kit-doctor.sh" "$@" ;;
404
- add) exec "$ROOT/scripts/kit-add.sh" "$@" ;;
405
- digest) exec "$ROOT/scripts/kit-digest.sh" "$@" ;;
425
+ update) exec "$ROOT/lib/verbs/kit-version-check.sh" "$@" ;;
426
+ migrate) exec "$ROOT/lib/verbs/kit-migrate.sh" "$@" ;;
427
+ adopt) exec "$ROOT/lib/verbs/kit-adopt.sh" "$@" ;;
428
+ doctor) exec "$ROOT/lib/verbs/kit-doctor.sh" "$@" ;;
429
+ add) exec "$ROOT/lib/verbs/kit-add.sh" "$@" ;;
430
+ digest) exec "$ROOT/lib/verbs/kit-digest.sh" "$@" ;;
406
431
  bench)
407
432
  # Documentation benchmark (#200) — score how well this project finds + uses its OWN canonical
408
433
  # docs. Runs the PROJECT's scaffolded harness if present, else cckit's own copy. BENCH_KIT_ROOT
@@ -437,24 +462,30 @@ cckit bench verbs [--runs N] [--checkout <dir>] [--verb "<verb>"] [--json] (at
437
462
  *) echo "$BENCH_USAGE" >&2; exit 2 ;;
438
463
  esac
439
464
  ;;
440
- scan) source "$LIB/project-scan.sh"; project_scan "$@" ;;
441
- encode-context) source "$LIB/toon.sh"; toon_encode ;;
442
- render) source "$LIB/render.sh"; cckit_render ;;
443
- debug) exec "$ROOT/scripts/debug.sh" "$@" ;;
465
+ scan) source "$LIB/core/project-scan.sh"; project_scan "$@" ;;
466
+ debug) exec "$ROOT/lib/verbs/debug.sh" "$@" ;;
444
467
  contribute)
445
468
  # The cckit checkout containing cwd (a worktree, per the rules) wins over the installed one, so
446
469
  # the gate runs on — and the PR opens from — the branch being worked on (#368).
447
470
  # shellcheck source=/dev/null
448
- source "$LIB/contribute-root.sh"
471
+ source "$LIB/verbs/contribute-root.sh"
449
472
  croot="$(contribute_root "$PWD" "$ROOT")"
450
473
  [ "$croot" = "$ROOT" ] || echo "contribute: using the checkout at $croot" >&2
451
474
  cd "$croot"; exec "$croot/scripts/contribute.sh" "$@" ;;
452
- status) exec "$ROOT/scripts/status.sh" "$@" ;;
475
+ status)
476
+ # `--board` is the board view by role, what `cckit sync` printed before it folded in here (#588);
477
+ # every other form is the "where are we?" dashboard.
478
+ case " $* " in
479
+ *" --board "*)
480
+ board_args=(); for a in "$@"; do [ "$a" = --board ] || board_args+=("$a"); done
481
+ exec "$ROOT/lib/verbs/task-sync.sh" "${board_args[@]+"${board_args[@]}"}" ;;
482
+ esac
483
+ exec "$ROOT/lib/verbs/status.sh" "$@" ;;
453
484
  claims)
454
485
  # Live session claims (#384) — which session is working which issue. Read-only: a dead claim is
455
486
  # skipped here and reaped by the next `cckit start` on that issue, never by this verb.
456
487
  # shellcheck source=/dev/null
457
- source "$LIB/session-registry.sh"
488
+ source "$LIB/core/session-registry.sh"
458
489
  if cckit_is_json; then sreg_list "$PWD" --json; exit 0; fi
459
490
  rows="$(sreg_list "$PWD")"
460
491
  if [ -z "$rows" ]; then echo "(no live claims)"; exit 0; fi
@@ -464,90 +495,100 @@ cckit bench verbs [--runs N] [--checkout <dir>] [--verb "<verb>"] [--json] (at
464
495
  printf '%-7s %-8s %-17s %-42s %s\n' "#$c_issue" "$c_pid" "$c_since" "$c_branch" "$c_wt"
465
496
  done
466
497
  ;;
467
- resume) source "$LIB/handoff.sh"; handoff_read ;;
468
- handoff) source "$LIB/handoff.sh"; handoff_write "$@" ;;
469
- msg)
470
- # Session mail (#175) — pure git-local state (.cckit/mail at the root worktree), no config.
471
- source "$LIB/kit-msg.sh"
472
- sub="${1:-}"; shift || true
473
- case "$sub" in
474
- send) msg_send "$@" ;;
475
- read) msg_read "$@" ;;
476
- list) msg_list ;;
477
- hook-check) msg_hook_check "$@" ;;
478
- *) echo 'cckit msg <send|read|list|hook-check>' >&2; exit 2 ;;
479
- esac
480
- ;;
481
- install) exec "$ROOT/scripts/install.sh" "$@" ;;
498
+ resume) source "$LIB/verbs/handoff.sh"; handoff_read ;;
499
+ handoff) source "$LIB/verbs/handoff.sh"; handoff_write "$@" ;;
500
+ install) exec "$ROOT/lib/verbs/install.sh" "$@" ;;
482
501
  init)
483
502
  # init resolves the config from the folder it sets up. The KIT_CONFIG this dispatcher worked out
484
503
  # is the invoking directory's project or, outside any project, cckit's OWN config: read as the
485
504
  # new project's, that one gave every fresh project cckit's base branch and label set (#487).
486
505
  # A KIT_CONFIG the caller exported is kept.
487
506
  [ -n "$_KIT_CONFIG_GIVEN" ] || unset KIT_CONFIG
488
- exec "$ROOT/scripts/init.sh" "$@" ;;
507
+ exec "$ROOT/lib/verbs/init.sh" "$@" ;;
489
508
  commands)
490
- # The command catalog, read from scripts/lib/verbs.tsv. `--json`: every verb, default and alias
509
+ # The command catalog, read from lib/core/verbs.tsv. `--json`: every verb, default and alias
491
510
  # as an object (name, kind, target, group, needs, skill, question, prompt, usage). `--llm` keeps
492
511
  # its old shape, a JSON array of names. Human: the names, space-separated (completions read it).
493
512
  case " $* " in *" --json "*) verbs_json; exit 0 ;; esac
494
513
  verbs="$(verbs_names | sort -u)"
495
514
  if cckit_is_json; then printf '%s\n' "$verbs" | jq -R . | jq -cs .; else printf '%s\n' "$verbs" | tr '\n' ' '; echo; fi
496
515
  ;;
497
- lib)
498
- # The HELPER catalog — the companion to `commands` (#222). `commands` lists the verbs; this
499
- # lists the library they are built from, so a helper like pr-evidence.sh is discoverable
500
- # without an `ls`. Filesystem-only; config is loaded purely for the project-root inference
501
- # (KIT_CONFIG), then it catalogs that project's scripts/lib, else cckit's own.
502
- # shellcheck source=/dev/null
503
- source "$LIB/kit-config.sh" && load_kit_config 2>/dev/null || true
504
- # shellcheck source=/dev/null
505
- source "$LIB/kit-lib.sh"; kit_lib "$@"
506
- ;;
507
516
  brief)
508
517
  # The delegation BRIEF for an issue, generated from real state (#221). The companion to `lib`:
509
518
  # `lib` says what helpers exist, this says which of them THIS issue's files sit on, where the
510
519
  # work happens, and whether the branch's seed is stale. Reads the issue via gh; every other
511
520
  # section degrades to an explicit line rather than going quietly missing.
512
521
  # shellcheck source=/dev/null
513
- source "$LIB/kit-config.sh" && load_kit_config 2>/dev/null || true
522
+ source "$LIB/core/kit-config.sh" && load_kit_config 2>/dev/null || true
514
523
  # shellcheck source=/dev/null
515
- source "$LIB/worktree-issue.sh" 2>/dev/null || true
524
+ source "$LIB/core/worktree-issue.sh" 2>/dev/null || true
516
525
  # shellcheck source=/dev/null
517
- source "$LIB/kit-lib.sh"
526
+ source "$LIB/verbs/kit-lib.sh"
518
527
  # shellcheck source=/dev/null
519
- source "$LIB/kit-brief.sh"
528
+ source "$LIB/verbs/kit-brief.sh"
520
529
  CCKIT_ROOT="$ROOT" kit_brief "$@"
521
530
  ;;
522
531
 
523
- receipt)
524
- # One durable record per stage attempt (#322). The WORKER calls this itself: cckit never reads
525
- # pane output, because #326 requires that pane history — off by default, and able to hold
526
- # secrets — is never a dependency. The report arrives on stdin in the shape `cckit brief`'s
527
- # receipt contract asked for, so the prompt and this parser cannot drift apart.
528
- # shellcheck source=/dev/null
529
- source "$LIB/stage-receipt.sh"
530
- sr_cli "$@"
532
+ agent)
533
+ # The plumbing agents call and people rarely type (#588): each was a top-level verb and keeps
534
+ # its old name as an alias row of lib/core/verbs.tsv.
535
+ sub="${1:-}"; shift || true
536
+ case "$sub" in
537
+ lib)
538
+ # The HELPER catalog — the companion to `commands` (#222). `commands` lists the verbs; this
539
+ # lists the library they are built from, so a helper like pr-evidence.sh is discoverable
540
+ # without an `ls`. Filesystem-only; config is loaded purely for the project-root inference
541
+ # (KIT_CONFIG), then it catalogs that project's scripts/lib, else cckit's own.
542
+ # shellcheck source=/dev/null
543
+ source "$LIB/core/kit-config.sh" && load_kit_config 2>/dev/null || true
544
+ # shellcheck source=/dev/null
545
+ source "$LIB/verbs/kit-lib.sh"; kit_lib "$@"
546
+ ;;
547
+ receipt)
548
+ # One durable record per stage attempt (#322). The WORKER calls this itself: cckit never
549
+ # reads pane output, because #326 requires that pane history — off by default, and able to
550
+ # hold secrets — is never a dependency. The report arrives on stdin in the shape `cckit
551
+ # brief`'s receipt contract asked for, so the prompt and this parser cannot drift apart.
552
+ # shellcheck source=/dev/null
553
+ source "$LIB/core/stage-receipt.sh"
554
+ sr_cli "$@"
555
+ ;;
556
+ msg)
557
+ # Session mail (#175) — pure git-local state (.cckit/mail at the root worktree), no config.
558
+ source "$LIB/verbs/kit-msg.sh"
559
+ msub="${1:-}"; shift || true
560
+ case "$msub" in
561
+ send) msg_send "$@" ;;
562
+ read) msg_read "$@" ;;
563
+ list) msg_list ;;
564
+ hook-check) msg_hook_check "$@" ;;
565
+ *) echo 'cckit agent msg <send|read|list|hook-check>' >&2; exit 2 ;;
566
+ esac
567
+ ;;
568
+ encode-context) source "$LIB/core/toon.sh"; toon_encode ;;
569
+ render) source "$LIB/core/render.sh"; cckit_render ;;
570
+ *) echo 'cckit agent <lib|receipt|msg|encode-context|render>' >&2; exit 2 ;;
571
+ esac
531
572
  ;;
532
573
  qa)
533
574
  # The QA lane (#295): launch the stack command the project declared under `qa`, on this lane's
534
575
  # port block, and report USABLE only when every readiness probe answers. One dispatcher in the
535
576
  # lib, as `receipt` does with sr_cli, so later subcommands land there and not here.
536
577
  # shellcheck source=/dev/null
537
- source "$LIB/qa-lane.sh"
578
+ source "$LIB/core/qa-lane.sh"
538
579
  qa_cli "$@"
539
580
  ;;
540
581
  page)
541
582
  # Review pages (#451): a plan, a decision or a grilling round opens as a page when this session
542
583
  # has a browser, and prints to the terminal when it does not. One dispatcher in the lib.
543
584
  # shellcheck source=/dev/null
544
- source "$LIB/review-page.sh"
585
+ source "$LIB/verbs/review-page.sh"
545
586
  rp_cli "$@"
546
587
  ;;
547
588
  completions)
548
589
  case "${1:-bash}" in
549
- bash) cat "$ROOT/completions/cckit.bash" ;;
550
- zsh) echo "autoload -Uz bashcompinit && bashcompinit"; cat "$ROOT/completions/cckit.bash" ;;
590
+ bash) cat "$ROOT/kit/completions/cckit.bash" ;;
591
+ zsh) echo "autoload -Uz bashcompinit && bashcompinit"; cat "$ROOT/kit/completions/cckit.bash" ;;
551
592
  *) echo "cckit completions [bash|zsh]" >&2; exit 2 ;;
552
593
  esac
553
594
  ;;
package/cckit.config.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./kit.config.schema.json",
3
- "kitVersion": "0.11.0",
3
+ "kitVersion": "0.13.0",
4
4
  "project": {
5
5
  "name": "cckit",
6
6
  "slug": "cckit",
package/kit/PROMPTS.md ADDED
@@ -0,0 +1,14 @@
1
+ # kit/ — what `cckit init` installs
2
+
3
+ Templates, skills, profiles, integrations, commands, modules, recipes, routines, interview
4
+ questions, database descriptors, the status line, completions and git hooks. A file here is
5
+ copied into, or read on behalf of, someone else's project.
6
+
7
+ | Rule | Check |
8
+ | --- | --- |
9
+ | The plugin manifest names `./kit/skills/` and `./kit/commands/` and both resolve | `lib/core/self-install-test.sh`; the plugin fence in the PR |
10
+ | Skill frontmatter stays inside the listing budget | `lib/core/skill-frontmatter-lint.sh` |
11
+ | Agent templates carry `name` and `description`, and their skills resolve | `lib/core/agent-template-lint.sh`, `lib/core/agent-skills-lint.sh` |
12
+ | Nothing private ships | the leak fence and the secret guard in `lib/core/check.sh` |
13
+ | The npm tarball ships `kit/` | `lib/core/integrations-test.sh`, `lib/core/adapter-select-test.sh` |
14
+ | No new payload root at the top level | `lib/core/layout-fence.sh` (retired roots must stay empty) |
@@ -16,9 +16,8 @@ Run the kit-doctor script to check all dependencies and authentication required
16
16
  | Tier 1 | `git`, `gh` (≥2.29 for Projects v2), `jq`, `perl` — auto-installs via brew |
17
17
  | Tier 2 | `node`, `pnpm`, `vercel` (if .vercel/ exists), `turbo`/`playwright` (dev deps only) |
18
18
  | Agents | The CLI of each adapter the project selected (`adapters` in the config; absent means `claude`): `claude` and/or `codex`, present with its version or absent. Absent is a warning and a manual action — the doctor never installs an agent CLI |
19
- | Integrations | One row per descriptor in `integrations/` whose config key is on: `mempalace CLI` (`.memory.enabled`) and `mlx-lm` (`.local.enabled`, Apple silicon only). `Lavish` (review pages) is on by default: with `.reviewPages.enabled` unset and neither `lavish-axi` nor `npx` on PATH its row is a skip — not installed, not a failure; with the key set to `true` it is a row like the others. A missing tool is installed by the shared runner (`scripts/lib/integration-install.sh`) from the descriptor's ordered candidates — never plain `pip`. Installs need consent recorded in `.cckit/consent`: `--fix` or a yes at the prompt records it; a run with neither (no terminal, no `--fix`) reports the tool missing and installs nothing; `--dry-run`/`--no-install` only report |
19
+ | Integrations | One row per descriptor in `kit/integrations/` whose config key is on: `mlx-lm` (`.local.enabled`, Apple silicon only). `Lavish` (review pages) is on by default: with `.reviewPages.enabled` unset and neither `lavish-axi` nor `npx` on PATH its row is a skip — not installed, not a failure; with the key set to `true` it is a row like the others. A missing tool is installed by the shared runner (`scripts/lib/integration-install.sh`) from the descriptor's ordered candidates — never plain `pip`. Installs need consent recorded in `.cckit/consent`: `--fix` or a yes at the prompt records it; a run with neither (no terminal, no `--fix`) reports the tool missing and installs nothing; `--dry-run`/`--no-install` only report |
20
20
  | Local | Only when `.local.enabled` — starts `mlx_lm.server` in background with a port health check (first run downloads ~4.5 GB) |
21
- | Memory | Only when `.memory.enabled` — seeds the per-wing wake-up header (`.claude/mempal-identity.<wing>.txt`) and refreshes a stale session-start hook. Seed + refresh obey the consent guard: `--fix` applies them, `--dry-run`/`--no-install` only report |
22
21
  | Auth | `gh auth status`, scope `project`, `git config user.name/email` |
23
22
  | Repo | `github.baseBranch` vs the repo's GitHub default branch — a mismatch means `Closes #N` won't auto-close issues on GitHub-UI merges (report-only; `cckit merge` already closes them explicitly) |
24
23
  | Instruction files | The bytes `CLAUDE.md` + every `.claude/rules/*.md` without a `paths:` frontmatter load into every session, against Claude Code's 150k limit, and the three largest files. Warns over the limit (report-only; `scripts/instruction-budget-lint.sh --report` lists every file) |
@@ -37,12 +36,12 @@ Run the kit-doctor script to check all dependencies and authentication required
37
36
 
38
37
  ## Steps
39
38
 
40
- 1. Resolve the doctor script path: `${CLAUDE_PLUGIN_ROOT}/scripts/kit-doctor.sh`
39
+ 1. Resolve the doctor script path: `${CLAUDE_PLUGIN_ROOT}/lib/verbs/kit-doctor.sh`
41
40
 
42
41
  2. Pass through any `$ARGUMENTS` (e.g. `--dry-run` or `--no-install`):
43
42
 
44
43
  ```bash
45
- bash "${CLAUDE_PLUGIN_ROOT}/scripts/kit-doctor.sh" $ARGUMENTS
44
+ bash "${CLAUDE_PLUGIN_ROOT}/lib/verbs/kit-doctor.sh" $ARGUMENTS
46
45
  ```
47
46
 
48
47
  3. If the script exits non-zero (Tier 1 failures remain):
@@ -38,7 +38,7 @@ two artifacts, and checks the project is portable.
38
38
  1. Run the export (pass through `$ARGUMENTS`):
39
39
 
40
40
  ```bash
41
- bash "${CLAUDE_PLUGIN_ROOT}/scripts/kit-export-project.sh" $ARGUMENTS
41
+ bash "${CLAUDE_PLUGIN_ROOT}/lib/verbs/kit-export-project.sh" $ARGUMENTS
42
42
  ```
43
43
 
44
44
  2. For a full export, tell the user the two manual steps claude.ai needs: