@jeiemgi/cckit 0.8.0 → 0.10.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 (309) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/AGENTS.md +169 -21
  3. package/README.md +505 -35
  4. package/SECURITY.md +5 -0
  5. package/bin/cckit +189 -20
  6. package/cckit.config.json +1 -1
  7. package/commands/kit-doctor.md +13 -5
  8. package/commands/kit-export-project.md +0 -2
  9. package/commands/kit-export-training.md +6 -9
  10. package/commands/kit-init.md +43 -13
  11. package/commands/kit-routines.md +1 -1
  12. package/commands/kit-update.md +11 -6
  13. package/databases/supabase/guide.html +106 -0
  14. package/databases/supabase/nextjs/lib/supabase/client.ts +9 -0
  15. package/databases/supabase/nextjs/lib/supabase/server.ts +29 -0
  16. package/databases/supabase.json +70 -0
  17. package/integrations/emil-design-eng.json +41 -0
  18. package/integrations/graft.json +81 -0
  19. package/integrations/impeccable.json +42 -0
  20. package/integrations/integration.schema.json +215 -0
  21. package/integrations/lavish.json +43 -0
  22. package/integrations/mempalace.json +28 -0
  23. package/integrations/mlx-lm.json +32 -0
  24. package/integrations/web-design-guidelines.json +42 -0
  25. package/kit.config.schema.json +183 -5
  26. package/package.json +4 -1
  27. package/profiles/automation.json +7 -1
  28. package/profiles/content.json +10 -2
  29. package/profiles/marketing.json +57 -0
  30. package/profiles/minimal.json +7 -1
  31. package/profiles/research.json +7 -1
  32. package/profiles/software.json +7 -1
  33. package/recipes/nextjs-shadcn.json +49 -0
  34. package/scripts/agent-skills-external.txt +45 -0
  35. package/scripts/agent-skills-lint-test.sh +131 -0
  36. package/scripts/agent-skills-lint.sh +115 -0
  37. package/scripts/agent-template-lint-test.sh +42 -0
  38. package/scripts/agent-template-lint.sh +58 -0
  39. package/scripts/annotate-setup.sh +1 -1
  40. package/scripts/autopilot-run-test.sh +338 -0
  41. package/scripts/autopilot-run.sh +448 -0
  42. package/scripts/autopilot-test.sh +8 -0
  43. package/scripts/autopilot.sh +10 -1
  44. package/scripts/benchmark/benchmark-test.sh +85 -0
  45. package/scripts/benchmark/checkpoint-test.sh +314 -0
  46. package/scripts/benchmark/checkpoint.sh +408 -0
  47. package/scripts/benchmark/lib/model.sh +31 -6
  48. package/scripts/benchmark/report.sh +17 -2
  49. package/scripts/benchmark/run-quality.sh +36 -10
  50. package/scripts/benchmark/verb-timings-test.sh +124 -0
  51. package/scripts/benchmark/verb-timings.sh +149 -0
  52. package/scripts/check.sh +29 -19
  53. package/scripts/content-skills-test.sh +144 -0
  54. package/scripts/copilot-loop-test.sh +25 -0
  55. package/scripts/database-supabase-test.sh +121 -0
  56. package/scripts/docs-marketing-words-test.sh +73 -0
  57. package/scripts/docs-record-tables-test.sh +72 -0
  58. package/scripts/guard-raw-git-ops-test.sh +8 -0
  59. package/scripts/hook-adapter-test.sh +193 -0
  60. package/scripts/init-content-test.sh +225 -0
  61. package/scripts/init-guided-test.sh +474 -0
  62. package/scripts/init-recipes-test.sh +104 -0
  63. package/scripts/init-upgrade-test.sh +341 -2
  64. package/scripts/init.sh +746 -95
  65. package/scripts/instruction-budget-baseline.txt +8 -0
  66. package/scripts/instruction-budget-lint-test.sh +166 -0
  67. package/scripts/instruction-budget-lint.sh +219 -0
  68. package/scripts/integrations-check-test.sh +200 -0
  69. package/scripts/integrations-check.sh +157 -0
  70. package/scripts/kit-add-test.sh +214 -0
  71. package/scripts/kit-add.sh +305 -5
  72. package/scripts/kit-adopt-test.sh +16 -0
  73. package/scripts/kit-adopt.sh +3 -2
  74. package/scripts/kit-digest.sh +2 -2
  75. package/scripts/kit-doctor-test.sh +293 -0
  76. package/scripts/kit-doctor.sh +272 -140
  77. package/scripts/kit-export-project-test.sh +3 -3
  78. package/scripts/kit-remove-test.sh +19 -0
  79. package/scripts/kit-routines.sh +2 -2
  80. package/scripts/kit-self-update.sh +1 -1
  81. package/scripts/kit-version-check-test.sh +4 -0
  82. package/scripts/kit-version-check.sh +4 -2
  83. package/scripts/knowledge-lint.sh +4 -4
  84. package/scripts/leak-fence-test.sh +89 -0
  85. package/scripts/lib/adapter-select-test.sh +136 -0
  86. package/scripts/lib/adapter-select.sh +158 -0
  87. package/scripts/lib/agent-def-test.sh +69 -0
  88. package/scripts/lib/agent-def.sh +106 -0
  89. package/scripts/lib/agent-launch-test.sh +212 -0
  90. package/scripts/lib/agent-launch.sh +335 -0
  91. package/scripts/lib/board-view-test.sh +11 -0
  92. package/scripts/lib/board-view.sh +42 -26
  93. package/scripts/lib/branch-owner-test.sh +26 -0
  94. package/scripts/lib/branch-owner.sh +16 -9
  95. package/scripts/lib/captain-test.sh +105 -0
  96. package/scripts/lib/captain.sh +87 -8
  97. package/scripts/lib/codex-hooks-test.sh +100 -0
  98. package/scripts/lib/codex-hooks.sh +69 -0
  99. package/scripts/lib/commitlint.sh +1 -1
  100. package/scripts/lib/content-kinds-gc-test.sh +88 -0
  101. package/scripts/lib/copilot-test.sh +70 -4
  102. package/scripts/lib/copilot.sh +66 -14
  103. package/scripts/lib/effort-dispatch-test.sh +3 -3
  104. package/scripts/lib/effort-metrics-test.sh +178 -1
  105. package/scripts/lib/effort-metrics.sh +188 -35
  106. package/scripts/lib/effort-ops-test.sh +217 -7
  107. package/scripts/lib/effort-ops.sh +281 -49
  108. package/scripts/lib/effort-parity-test.sh +49 -13
  109. package/scripts/lib/effort-plan-test.sh +337 -0
  110. package/scripts/lib/effort-plan.sh +200 -23
  111. package/scripts/lib/effort-slug.sh +16 -2
  112. package/scripts/lib/effort.sh +67 -12
  113. package/scripts/lib/errors-header-test.sh +1 -1
  114. package/scripts/lib/gh-project-test.sh +35 -1
  115. package/scripts/lib/gh-project.sh +37 -16
  116. package/scripts/lib/gh-rest-test.sh +330 -0
  117. package/scripts/lib/gh-rest.sh +304 -0
  118. package/scripts/lib/hook-refresh.sh +1 -1
  119. package/scripts/lib/init-github.sh +412 -0
  120. package/scripts/lib/init-guide.sh +630 -0
  121. package/scripts/lib/integration-install-test.sh +343 -0
  122. package/scripts/lib/integration-install.sh +257 -0
  123. package/scripts/lib/integrations-test.sh +366 -0
  124. package/scripts/lib/integrations.sh +244 -0
  125. package/scripts/lib/kinds-test.sh +125 -0
  126. package/scripts/lib/kinds.sh +66 -0
  127. package/scripts/lib/kit-brief-test.sh +22 -3
  128. package/scripts/lib/kit-brief.sh +45 -5
  129. package/scripts/lib/kit-config-resolve.sh +2 -2
  130. package/scripts/lib/kit-config-test.sh +64 -1
  131. package/scripts/lib/kit-config.sh +37 -1
  132. package/scripts/lib/kit-events.sh +7 -0
  133. package/scripts/lib/kit-gc-test.sh +173 -1
  134. package/scripts/lib/kit-gc.sh +244 -37
  135. package/scripts/lib/kit-hotfix.sh +216 -0
  136. package/scripts/lib/kit-interview-test.sh +93 -0
  137. package/scripts/lib/kit-interview.sh +117 -8
  138. package/scripts/lib/kit-lib-test.sh +1 -1
  139. package/scripts/lib/kit-lib.sh +3 -3
  140. package/scripts/lib/kit-local.sh +2 -2
  141. package/scripts/lib/kit-manifest.sh +33 -1
  142. package/scripts/lib/kit-profile-test.sh +3 -3
  143. package/scripts/lib/kit-status-test.sh +112 -4
  144. package/scripts/lib/kit-status.sh +246 -16
  145. package/scripts/lib/kit-task-ops-test.sh +37 -0
  146. package/scripts/lib/kit-task-ops.sh +362 -89
  147. package/scripts/lib/kto-hotfix-test.sh +232 -0
  148. package/scripts/lib/kto-task-close-test.sh +83 -0
  149. package/scripts/lib/kto-task-new-test.sh +95 -0
  150. package/scripts/lib/kto-task-pr-merge-test.sh +97 -6
  151. package/scripts/lib/kto-task-pr-test.sh +70 -0
  152. package/scripts/lib/leak-fence.sh +89 -0
  153. package/scripts/lib/light-task-run-test.sh +255 -0
  154. package/scripts/lib/light-task-test.sh +309 -0
  155. package/scripts/lib/light-task.sh +706 -0
  156. package/scripts/lib/next-test.sh +99 -0
  157. package/scripts/lib/next.sh +9 -3
  158. package/scripts/lib/orchestration-runtime-test.sh +72 -0
  159. package/scripts/lib/orchestration-runtime.sh +57 -5
  160. package/scripts/lib/plan-machine-test.sh +15 -2
  161. package/scripts/lib/plan-machine.sh +20 -7
  162. package/scripts/lib/plan-next-test.sh +1 -1
  163. package/scripts/lib/plan-next.sh +4 -4
  164. package/scripts/lib/pr-evidence-test.sh +3 -3
  165. package/scripts/lib/pr-evidence.sh +1 -1
  166. package/scripts/lib/qa-lane-test.sh +626 -0
  167. package/scripts/lib/qa-lane.sh +1357 -0
  168. package/scripts/lib/qa-lanes-test.sh +175 -0
  169. package/scripts/lib/react-detect.sh +1 -1
  170. package/scripts/lib/render-test.sh +1 -1
  171. package/scripts/lib/review-page-test.sh +318 -0
  172. package/scripts/lib/review-page.sh +369 -0
  173. package/scripts/lib/review-stage-test.sh +62 -11
  174. package/scripts/lib/review-stage.sh +42 -60
  175. package/scripts/lib/role-identity-test.sh +65 -0
  176. package/scripts/lib/role-identity.sh +25 -2
  177. package/scripts/lib/secret-guard.sh +3 -3
  178. package/scripts/lib/session-registry-test.sh +111 -0
  179. package/scripts/lib/session-registry.sh +233 -0
  180. package/scripts/lib/stage-receipt-test.sh +14 -1
  181. package/scripts/lib/stage-receipt.sh +13 -8
  182. package/scripts/lib/task-source-file.sh +309 -0
  183. package/scripts/lib/task-source.sh +130 -0
  184. package/scripts/lib/test-env-test.sh +3 -3
  185. package/scripts/lib/test-env.sh +7 -4
  186. package/scripts/lib/upgrade-report-test.sh +120 -0
  187. package/scripts/lib/upgrade-report.sh +138 -0
  188. package/scripts/lib/version-bump.sh +3 -3
  189. package/scripts/lib/wave-result-test.sh +80 -0
  190. package/scripts/lib/wave-result.sh +127 -0
  191. package/scripts/lib/worker-brief-test.sh +5 -0
  192. package/scripts/lib/worker-brief.sh +2 -2
  193. package/scripts/lib/worktree-issue-test.sh +30 -1
  194. package/scripts/lib/worktree-issue.sh +93 -9
  195. package/scripts/lib/worktree-ports-test.sh +57 -4
  196. package/scripts/lib/worktree-start-test.sh +197 -0
  197. package/scripts/lib/worktree-start.sh +169 -32
  198. package/scripts/lib/zsh-safety-test.sh +19 -3
  199. package/scripts/marketing-walkthrough-test.sh +152 -0
  200. package/scripts/night-grant-test.sh +37 -0
  201. package/scripts/night-grant.sh +448 -0
  202. package/scripts/night-run-test.sh +8 -0
  203. package/scripts/night-run.mjs +275 -0
  204. package/scripts/night-run.test.mjs +324 -0
  205. package/scripts/orchestrate-test.sh +190 -0
  206. package/scripts/orchestrate.sh +79 -8
  207. package/scripts/portable-test.sh +11 -2
  208. package/scripts/publish.sh +28 -3
  209. package/scripts/review-lint-test.sh +7 -7
  210. package/scripts/review-lint.sh +2 -2
  211. package/scripts/review-rules.conf +8 -0
  212. package/scripts/rule-recipes-test.sh +96 -0
  213. package/scripts/self-install-test.sh +39 -9
  214. package/scripts/setup-labels.sh +18 -1
  215. package/scripts/setup-milestones.sh +1 -1
  216. package/scripts/showcase.sh +1 -1
  217. package/scripts/skill-frontmatter-lint-test.sh +4 -4
  218. package/scripts/skill-frontmatter-lint.sh +1 -1
  219. package/scripts/status-test.sh +113 -2
  220. package/scripts/status.sh +16 -3
  221. package/scripts/task-sync-test.sh +154 -0
  222. package/scripts/task-sync.sh +243 -32
  223. package/scripts/test-runner-test.sh +158 -0
  224. package/scripts/test.sh +131 -23
  225. package/scripts/update-path-test.sh +279 -0
  226. package/scripts/ux-ds-audit.sh +1 -1
  227. package/scripts/ux-graph-scan.sh +6 -6
  228. package/scripts/wave-worker.sh +54 -0
  229. package/skills/kit-add/SKILL.md +77 -0
  230. package/skills/kit-autopilot/SKILL.md +123 -12
  231. package/skills/kit-cleanup/SKILL.md +5 -2
  232. package/skills/kit-contribute/SKILL.md +4 -4
  233. package/skills/kit-docs-writer/SKILL.md +16 -6
  234. package/skills/kit-effort-close/SKILL.md +17 -8
  235. package/skills/kit-effort-new/SKILL.md +15 -9
  236. package/skills/kit-effort-pr/SKILL.md +15 -7
  237. package/skills/kit-effort-start/SKILL.md +5 -2
  238. package/skills/kit-gc/SKILL.md +5 -2
  239. package/skills/kit-next/SKILL.md +5 -1
  240. package/skills/kit-onboard/SKILL.md +3 -3
  241. package/skills/kit-page/SKILL.md +93 -0
  242. package/skills/kit-plan-next/SKILL.md +8 -4
  243. package/skills/kit-security-sweep/SKILL.md +1 -3
  244. package/skills/kit-ship/SKILL.md +2 -3
  245. package/skills/kit-status/SKILL.md +35 -4
  246. package/skills/kit-task-new/SKILL.md +3 -3
  247. package/skills/kit-task-pr/SKILL.md +7 -2
  248. package/skills/kit-task-pr-merge/SKILL.md +7 -2
  249. package/skills/kit-task-start/SKILL.md +7 -7
  250. package/skills/kit-task-sync/SKILL.md +19 -3
  251. package/skills/kit-ux-audit/SKILL.md +3 -2
  252. package/templates/agents/auto-dev.md +5 -4
  253. package/templates/agents/backend.md +1 -1
  254. package/templates/agents/designer.md +2 -0
  255. package/templates/agents/devops.md +1 -1
  256. package/templates/agents/editor.md +9 -1
  257. package/templates/agents/frontend.md +1 -1
  258. package/templates/agents/local-delegate.md +1 -1
  259. package/templates/agents/pm.md +5 -5
  260. package/templates/agents/tech-lead.md +1 -1
  261. package/templates/benchmarks/SCHEMA.md +9 -3
  262. package/templates/codex/hooks.json.tmpl +89 -0
  263. package/templates/hooks/guard-base-branch-commit.sh.tmpl +13 -7
  264. package/templates/hooks/guard-raw-git-ops.sh.tmpl +27 -14
  265. package/templates/hooks/mempal_followup.sh.tmpl +2 -2
  266. package/templates/hooks/mempal_session_start.sh.tmpl +1 -1
  267. package/templates/hooks/prepush_gate.sh.tmpl +4 -2
  268. package/templates/hooks/repo-hygiene.sh.tmpl +3 -2
  269. package/templates/instructions.md.tmpl +174 -0
  270. package/templates/kit.config.json.tmpl +3 -3
  271. package/templates/knowledge-INDEX.md.tmpl +1 -1
  272. package/templates/lib/kit-sigil.sh.tmpl +1 -1
  273. package/templates/rules/authoring.md +106 -0
  274. package/templates/rules/branch-naming.md +40 -4
  275. package/templates/rules/code-retrieval.md +63 -0
  276. package/templates/rules/delegation-brief.md +0 -3
  277. package/templates/rules/design-routing.md +3 -3
  278. package/templates/rules/effort-model.md +14 -10
  279. package/templates/rules/gate-and-review.md +94 -0
  280. package/templates/rules/issue-lifecycle.md +88 -0
  281. package/templates/rules/knowledge-base.md +1 -1
  282. package/templates/rules/mempalace.md +1 -1
  283. package/templates/rules/merge-safety.md +108 -0
  284. package/templates/rules/naming-and-ids.md +23 -17
  285. package/templates/rules/plain-language.md +59 -0
  286. package/templates/rules/plan-next.md +9 -11
  287. package/templates/rules/react-annotate.md +6 -0
  288. package/templates/rules/review-pages.md +49 -0
  289. package/templates/rules/risk-tiered-review.md +13 -4
  290. package/templates/rules/shared-checkout.md +106 -0
  291. package/templates/rules/skill-gaps.md +2 -7
  292. package/templates/rules/task-management.md +13 -1
  293. package/templates/skills/brand-voice/SKILL.md +91 -0
  294. package/templates/skills/brand-voice/references/voice-template.md +61 -0
  295. package/templates/skills/campaign/SKILL.md +123 -0
  296. package/templates/skills/campaign/references/plan-template.md +55 -0
  297. package/templates/skills/concrete/SKILL.md +2 -2
  298. package/templates/skills/copywriting/SKILL.md +8 -1
  299. package/templates/skills/feature-build-refine/SKILL.md +2 -4
  300. package/templates/skills/morning-briefing/SKILL.md +2 -2
  301. package/templates/skills/page-design/SKILL.md +145 -0
  302. package/templates/skills/page-design/add.json +5 -0
  303. package/templates/skills/page-design/references/design-file-template.md +40 -0
  304. package/templates/skills/page-design/references/generic-page-patterns.md +43 -0
  305. package/templates/skills/page-design/references/minimum-rules.md +42 -0
  306. package/templates/skills/speckit/SKILL.md +4 -5
  307. package/templates/skills/supabase-patterns/SKILL.md +1 -1
  308. package/commands/kit-add.md +0 -42
  309. package/templates/CLAUDE.md.tmpl +0 -106
package/SECURITY.md CHANGED
@@ -12,6 +12,11 @@ examples, templates):
12
12
  - **Your private denylist** — copy `privacy-denylist.example` to `.cckit/privacy-denylist`
13
13
  (gitignored) and list terms private to you (org, hosts, emails). Nothing project-specific is
14
14
  hardcoded in cckit; you declare what is yours.
15
+ - **The leak fence** (`scripts/lib/leak-fence.sh`, gate step 3) — fails on any tracked line that
16
+ contains a private word: a product name, a client, a person, a private path. The built-in pattern
17
+ is always on; yours go in `.cckit/leak-words` (local, gitignored, one extended regex per line) or
18
+ the `CCKIT_LEAK_WORDS` repository secret for CI. The list is never committed, and a hit prints
19
+ `file:line` without the matched text, so a public CI log cannot leak it either.
15
20
  - **Enforcement** — runs in the local gate (`scripts/check.sh`) and as a pre-commit hook
16
21
  (`githooks/pre-commit`; enable with `git config core.hooksPath githooks`). A finding blocks the
17
22
  commit.
package/bin/cckit CHANGED
@@ -7,20 +7,46 @@
7
7
  # cckit resume: print the last session's resume-here handoff
8
8
  # cckit handoff "<note>" save a resume-here note for the next session
9
9
  # cckit install [bin-dir] symlink cckit onto your PATH (global install)
10
- # cckit init --profile <p> scaffold cckit.config.json + .claude/ (--profile required)
10
+ # cckit init [<folder>] guided setup: detect the folder, ask, scaffold, then git + GitHub after
11
+ # one confirmation (--yes with no terminal; --no-github = scaffold only;
12
+ # --answers FILE, --recipe <id>, --database <id>, --public, --dry-run)
13
+ # --adapter <claude|codex|both> selects the agent (default claude)
11
14
  # cckit start <issue> [slug] isolated worktree + branch for an issue
12
- # cckit pr <issue> <summary> commit + push + open the PR
13
- # cckit close <issue> <summary> close issue + mark done
15
+ # cckit pr <issue> <summary> [--base <branch>] commit + push + open the PR (--base: target <branch>, not the
16
+ # integration branch; the push exports it as KIT_PR_BASE)
17
+ # cckit hotfix <pr|sha> [--base B] cherry-pick a merged PR or commit onto B (default main):
18
+ # worktree from origin/B, cherry-pick -x, push, PR `Cherry-pick of #N`
19
+ # cckit close <issue> <summary> [--reason completed|not-planned|duplicate] [--duplicate-of N]
20
+ # [--superseded-by N] close the issue with a reason + summary comment; board Done
14
21
  # cckit new [--role R --kind K --priority P --milestone M --blocked-by "#1" --body B|--body-file F] "<title>"
15
22
  # file ONE issue: labels + board (Todo) in one step (never raw gh issue create)
16
- # cckit merge [<pr>] squash-merge the PR (rebases on conflict), close its issues, GC the branch
23
+ # cckit task <new|list|next|start|finish|run|share|default> light tasks: work tracked in the project, no GitHub issue
24
+ # task new [--priority pN --kind K --body B|--body-file F] "<title>" record a task (one file
25
+ # under tasks/; a draft in this checkout until it is started or shared)
26
+ # task list [--all] · task next every open task and its state · the one to take next
27
+ # task start [--force] [--no-push] <id> worktree + branch light/<id>-<slug> from the base (alias: take)
28
+ # task finish [<id>] "<summary>" [--all] mark it done on its branch, push, open the pull request;
29
+ # the task is done when that PR merges (alias: done). --all also commits new files
30
+ # task run <id> [--check "<cmd>"] [--max-iters N] [--max-seconds N] [--agent <cmd>] [--no-finish]
31
+ # start the task, run ONE headless objective built from its title and notes, finish it and
32
+ # print the review link. Gate: --check, else tasks.check in the config. Never merges
33
+ # task share ["<summary>"] one pull request that adds this checkout's drafts to the base;
34
+ # they list as shared until it merges. Re-run to retry a share whose push or PR failed
35
+ # task default print light | issues: the project's default list (tasks.default).
36
+ # With light, a bare `cckit next` prints what `cckit task next` prints
37
+ # cckit merge [<pr>] [--merge|--rebase] merge the PR (squash by default; rebases on conflict), close
38
+ # its issues, GC the branch, update the PR's base (develop or effort/<N>);
39
+ # refuses an effort/* head: that PR merges with cckit effort close <N>
17
40
  # cckit contribute "<summary>" open a contribution PR to cckit, gated on scripts/check.sh
18
41
  # (from the cckit checkout or worktree you are in; else the installed one)
19
42
  # cckit sync [--llm] board state / what's unblocked
43
+ # sync --json | --write | --cached [TTL] | --watch [SECS] | --plan
44
+ # the dashboard layer: one JSON summary, cached atomically in
45
+ # <git-common-dir>/kit-sync-cache.json (--llm stays TOON)
20
46
  # cckit plan [--llm] [--effort N] wave plan: deps-ordered, p0-first in a wave, file-disjoint (TOON --llm)
21
47
  # cckit plan-next [--llm] forward plan: current skills/verbs/rules/docs -> what to build next
22
48
  # cckit effort <new|chain|start|pr|close|plan> the effort lifecycle
23
- # effort new [--flow F --role R --priority p1 --goal G --scope S --for-agents A
49
+ # effort new [--flow F --role R --kind K --priority p1 --goal G --scope S --for-agents A
24
50
  # --verification V --depends-on "#1,#2" --milestone M] "<name>" ["sub :: desc" …]
25
51
  # parent (4-section body + ctx/kind/priority/role/flow labels) + linted native sub-issues
26
52
  # effort chain <a> <b> [<c> …] linear order: b blocked_by a, c blocked_by b, + a
@@ -31,33 +57,61 @@
31
57
  # EFFORT_WIP_REMOTE=0 or an unreachable origin uses the cache and still starts). Refuses
32
58
  # before writing anything; --force (or KIT_FORCE=1) starts anyway, at limit 0 too.
33
59
  # `cckit start <issue>` is not affected.
34
- # effort pr [<N>] [--summary S|--summary-file F] [--for-agents A|--for-agents-file F] [--title T]
35
- # the ONE effort PR: inherits labels + milestone, rich body, board In Review
60
+ # effort pr [<N>] [--summary S|--summary-file F] [--for-agents A|--for-agents-file F] [--title T] [--type T]
61
+ # the ONE effort PR: inherits labels + milestone, rich body, board In Review. Title is a
62
+ # Conventional Commit subject carrying the id — `type(scope): name [#N]` (scope = flow:
63
+ # label, type = --type or the kind: label, default feat); refused before gh when it fails
64
+ # commitlint. pr.titleStyle = issue-title keeps `[Role] [#N] name`, unchecked.
36
65
  # cckit orchestrate <a> <b> … run N flows in parallel worktrees (--runtime tmux|herdr)
66
+ # cckit orchestrate --results how each worker ended: success | failure | interrupted
37
67
  # cckit autopilot [<a> …] unattended multi-flow: drive (or auto-pick) issues under a cap
68
+ # cckit autopilot run [<issue>] --objective "<text>" ONE bounded headless objective on this branch
38
69
  # cckit watch [--merge] [--loop] captain: gate open PRs, squash-merge CLEAN, advance the wave
39
70
  # cckit next [--effort N] everyday helper: the unblocked set + how to start the top issue
71
+ # + the weekly cadence (plan Monday, next daily, gc Friday)
40
72
  # cckit wave [--effort N] read open efforts, propose incoming waves: fan-out + captain drive
41
73
  # cckit msg <send|read|list> session mail across projects: steer a live session (--steer)
74
+ # cckit claims live session claims: which session is working which issue (read-only)
42
75
  # cckit gc [--prune [--yes]] report (default) or prune merged + landed branches and worktrees
43
76
  # cckit cleanup [--yes] guided destructive sweep over the gc report (plan first)
44
- # cckit status thin dashboard: board + worktrees + resume handoff
77
+ # cckit status where are we: board, next effort per flow, local undone work,
78
+ # PRs waiting on a human, cleanup available, resume handoff
45
79
  # cckit scan [--llm] detect this repo's stack + kit state (JSON)
46
80
  # cckit debug [--check] <args> optional browser-debug via chrome-devtools-axi (auto-detected)
47
81
  # cckit encode-context stdin JSON -> compact TOON (uniform arrays; JSON fallback)
48
82
  # cckit render stdin markdown -> rich (glow on a TTY; verbatim when piped)
49
- # cckit doctor onboarding preflight (deps, gh auth)
83
+ # cckit doctor onboarding preflight (deps, gh auth, selected agent CLIs)
84
+ # cckit add [<name>] [--set k=v] list integrations + modules; with a name, switch one on in the config
85
+ # cckit page <mode|open|poll|reply|end|answer>
86
+ # review pages: open a plan/decision/grill as a page (terminal
87
+ # output where there is no browser), and record the answer
50
88
  # cckit update check whether this project is behind the installed cckit
51
89
  # cckit migrate reshuffle an old kit layout to the current one
52
90
  # cckit adopt record kit-shaped files a repo already has into the manifest
53
91
  # cckit digest <path|url> summarize a file or URL (local model)
54
92
  # cckit bench [run|report|…] doc-retrieval benchmark: score how well docs are found + used
55
- # cckit release <ver> [--publish] cut a release (dry-run by default)
93
+ # cckit bench checkpoint <ver> record a benchmark run as a checkpoint of release <ver>
94
+ # (checkpoints: list them · check <ver>: the release gate · page)
95
+ # cckit bench verbs [--json] wall time + gh call count of the read-only verbs
96
+ # (attach to a checkpoint: bench checkpoint <ver> --verbs <file>)
97
+ # cckit release <ver> [--publish] cut a release (dry-run by default); refuses when <ver> has no
98
+ # benchmark checkpoint or scores lower (--skip-bench-check overrides)
56
99
  # cckit version [--llm] the installed cckit version
57
100
  # cckit commands [--llm] list every verb (the command catalog)
58
101
  # cckit lib [--llm] [--all] list every scripts/lib helper: functions, purpose, error contract
59
102
  # cckit brief <issue> the delegation brief for an issue, from real state
60
103
  # cckit receipt <issue> … record/read one stage receipt (a worker's durable report)
104
+ # cckit qa <up|ready> [--lane N] [--timeout S] launch the declared review stack on this lane's
105
+ # ports; exit 0 only once every readiness probe answers
106
+ # cckit qa open [--lane N] [--pr N] [--route /p] [--print] open the screen the change touched
107
+ # (the PR body's `QA route:` line, else qa.route) on a usable lane
108
+ # cckit qa stop [--lane N] [--force] stop the lane's stack — supervisors before listeners — and
109
+ # exit 0 only when nothing listens on the lane's ports
110
+ # cckit qa verdict [pass|fail] [--lane N] [--note T] [--shot F] record the verdict against the
111
+ # reviewed commit (PR comment upserted, a fail mailed to the builder);
112
+ # with no pass|fail, read it back: pass · fail · stale · none
113
+ # cckit qa lanes [--llm] read-only table of every lane: branch, ports, up (listeners on
114
+ # its ports), verdict (pass · fail · stale · none), worktree
61
115
  # cckit completions [bash|zsh] print a shell-completion script to source
62
116
  # cckit help
63
117
  set -eu
@@ -82,6 +136,7 @@ LIB="$ROOT/scripts/lib"
82
136
  # (config-path.sh, #69) that every kit entrypoint uses.
83
137
  # shellcheck source=/dev/null
84
138
  source "$LIB/config-path.sh"
139
+ _KIT_CONFIG_GIVEN="${KIT_CONFIG:+1}" # 1 = the caller named a config; init keeps only that one (#487)
85
140
  if [ -z "${KIT_CONFIG:-}" ]; then
86
141
  KIT_CONFIG="$(kit_config_find "$PWD" || true)"
87
142
  [ -n "$KIT_CONFIG" ] || KIT_CONFIG="$ROOT/cckit.config.json"
@@ -167,24 +222,37 @@ case "$cmd" in
167
222
  # shellcheck source=/dev/null
168
223
  source "$LIB/role-identity.sh"; source "$LIB/worktree-start.sh"
169
224
  if cckit_is_json; then
170
- out="$(wt_start "$@" 2>&1)"; rc=$?
171
- cckit_json verb start issue "${1:-}" ok "$([ "$rc" -eq 0 ] && echo true || echo false)" \
225
+ # `&& … ||` keeps `set -e` from exiting on a refused start before the JSON result is printed.
226
+ out="$(wt_start "$@" 2>&1)" && rc=0 || rc=$?
227
+ # The issue is the first non-flag argument: `start --force 42` reports 42, not `--force`.
228
+ start_issue=""; for a in "$@"; do case "$a" in -*) ;; *) start_issue="$a"; break ;; esac; done
229
+ cckit_json verb start issue "$start_issue" ok "$([ "$rc" -eq 0 ] && echo true || echo false)" \
172
230
  detail "$(printf '%s' "$out" | tail -1)"
173
231
  exit "$rc"
174
232
  fi
175
233
  wt_start "$@"
176
234
  ;;
177
235
  pr|close)
236
+ if [ "$cmd" = pr ]; then case "${1:-}" in -h|--help)
237
+ echo 'cckit pr <issue> "<summary>" ["<commit-msg>"] [--base <branch>]'; exit 0 ;; esac; fi
178
238
  # shellcheck source=/dev/null
179
239
  source "$LIB/kit-config.sh" && load_kit_config
180
240
  # shellcheck source=/dev/null
181
241
  source "$LIB/role-identity.sh"; source "$LIB/gh-project.sh"; source "$LIB/kit-task-ops.sh"
242
+ if [ "$cmd" = close ]; then case "${1:-}" in -h|--help)
243
+ echo 'cckit close <issue> ["<summary>"] [--reason completed|not-planned|duplicate] [--duplicate-of N] [--superseded-by N]'; exit 0 ;; esac; fi
182
244
  if cckit_is_json; then
183
245
  case "$cmd" in
184
246
  pr) out="$(kto_task_pr "$@" 2>&1)"; rc=$? ;;
185
247
  close) out="$(kto_task_close "$@" 2>&1)"; rc=$? ;;
186
248
  esac
187
249
  url="$(printf '%s' "$out" | grep -oE 'https://[^ ]+/pull/[0-9]+' | tail -1)"
250
+ # pr: --base may come before the issue number, so skip it when reporting the issue (#391).
251
+ if [ "$cmd" = pr ]; then
252
+ while [ "$#" -gt 0 ]; do
253
+ case "$1" in --base) shift; [ "$#" -gt 0 ] && shift ;; --base=*) shift ;; *) break ;; esac
254
+ done
255
+ fi
188
256
  cckit_json verb "$cmd" issue "${1:-}" ok "$([ "$rc" -eq 0 ] && echo true || echo false)" \
189
257
  url "$url" detail "$(printf '%s' "$out" | tail -1)"
190
258
  exit "$rc"
@@ -194,6 +262,23 @@ case "$cmd" in
194
262
  close) kto_task_close "$@" ;;
195
263
  esac
196
264
  ;;
265
+ hotfix)
266
+ # Carry ONE merged change to the release branch (#360): its own PR path, because a cherry-pick
267
+ # has no issue for `cckit pr` to read or close.
268
+ # shellcheck source=/dev/null
269
+ source "$LIB/kit-config.sh" && load_kit_config
270
+ # shellcheck source=/dev/null
271
+ source "$LIB/worktree-start.sh"; source "$LIB/kit-hotfix.sh"
272
+ if cckit_is_json; then
273
+ out="$(kto_hotfix "$@" 2>&1)" && rc=0 || rc=$?
274
+ url="$(printf '%s' "$out" | grep -oE 'https://[^ ]+/pull/[0-9]+' | tail -1)"
275
+ cckit_json verb hotfix source "${1:-}" ok "$([ "$rc" -eq 0 ] && echo true || echo false)" \
276
+ url "$url" worktree "$(printf '%s\n' "$out" | sed -n 's/^worktree: //p' | tail -1)" \
277
+ detail "$(printf '%s' "$out" | tail -1)"
278
+ exit "$rc"
279
+ fi
280
+ kto_hotfix "$@"
281
+ ;;
197
282
  new)
198
283
  # File ONE issue through kto_task_new (labels + board add + Role/Status fields). This verb is why
199
284
  # an agent never needs raw `gh issue create`, which skips the board (#361). Multi-part work is
@@ -230,15 +315,31 @@ case "$cmd" in
230
315
  fi
231
316
  kto_task_new "$n_title" "$n_role" "$n_kind" "$n_prio" "$n_ms" "$n_plan" "$n_blocked" "$n_body"; echo
232
317
  ;;
318
+ task)
319
+ # Light tasks (#450): work tracked through a task source (the `file` source: one tracked file
320
+ # per task) and not through GitHub issues. One dispatcher in the lib, as `qa` and `receipt` do.
321
+ # kit-task-ops.sh is loaded for kto_pr_title only, so the PR title is built by the same code
322
+ # `cckit pr` uses.
323
+ # shellcheck source=/dev/null
324
+ source "$LIB/kit-config.sh" && load_kit_config
325
+ # shellcheck source=/dev/null
326
+ source "$LIB/worktree-issue.sh"; source "$LIB/worktree-start.sh"
327
+ # shellcheck source=/dev/null
328
+ source "$LIB/commitlint.sh"; source "$LIB/kit-task-ops.sh"
329
+ # shellcheck source=/dev/null
330
+ source "$LIB/light-task.sh"
331
+ lt_cli "$@"
332
+ ;;
233
333
  merge)
234
- # Squash-merge through kto_task_pr_merge: rebase on conflict, close the PR's linked issues (native
334
+ # Merge (squash by default, --merge / --rebase, #376) through kto_task_pr_merge: rebase on conflict, close the PR's linked issues (native
235
335
  # auto-close only fires on the default branch), then clean the branch + worktree. The verb behind
236
- # every raw `gh pr merge` (#361). An effort's PR merges with `cckit effort close <N>`.
336
+ # every raw `gh pr merge` (#361). An effort's PR merges with `cckit effort close <N>`: an
337
+ # effort/* head is refused here (#379; KIT_FORCE=1 overrides).
237
338
  # shellcheck source=/dev/null
238
339
  source "$LIB/kit-config.sh" && load_kit_config
239
340
  # shellcheck source=/dev/null
240
341
  source "$LIB/role-identity.sh"; source "$LIB/gh-project.sh"; source "$LIB/kit-task-ops.sh"
241
- case "${1:-}" in -h|--help) echo 'cckit merge [<pr>] squash-merge (rebases on conflict), close linked issues, GC branch + worktree'; exit 0 ;; esac
342
+ 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
242
343
  kto_task_pr_merge "$@"
243
344
  ;;
244
345
  sync) exec "$ROOT/scripts/task-sync.sh" "$@" ;;
@@ -279,6 +380,7 @@ case "$cmd" in
279
380
  landed="$(printf '%s\n' "$out" | awk '/^ LANDED branches/{print $3}')"
280
381
  orphan="$(printf '%s\n' "$out" | awk '/^ ORPHAN kept/{print $3}')"
281
382
  protected="$(printf '%s\n' "$out" | awk '/^ PROTECTED kept/{print $3}')"
383
+ unknown="$(printf '%s\n' "$out" | awk '/^ UNKNOWN kept/{print $3}')"
282
384
  stash="$(printf '%s\n' "$out" | awk '/^ stashes kept/{print $3}')"
283
385
  zombie="$(printf '%s\n' "$out" | awk '/^ ZOMBIE worktrees/{print $3}')"
284
386
  rfail="$(printf '%s\n' "$out" | awk '/^ remote deletes failed/{print $4}')"
@@ -286,7 +388,7 @@ case "$cmd" in
286
388
  if [ "$cleanup_rc" -eq 0 ]; then case " $* " in *" --yes "*|*" -y "*) applied=yes ;; esac; fi
287
389
  err="$(tr '\n' ' ' < "$cleanup_err" | sed 's/[[:space:]]*$//')"; rm -f "$cleanup_err"
288
390
  cckit_json verb cleanup safe "${safe:-0}" landed "${landed:-0}" worktrees "${wt:-0}" orphan "${orphan:-0}" \
289
- protected "${protected:-0}" stash "${stash:-0}" zombie "${zombie:-0}" applied "$applied" \
391
+ protected "${protected:-0}" unknown "${unknown:-0}" stash "${stash:-0}" zombie "${zombie:-0}" applied "$applied" \
290
392
  remote_failed "${rfail:-0}" rc "$cleanup_rc" error "$err"
291
393
  [ "$cleanup_rc" -eq 0 ] || exit "$cleanup_rc"
292
394
  else
@@ -311,7 +413,8 @@ case "$cmd" in
311
413
  landed="$(printf '%s\n' "$out" | grep -c '> LANDED ' || true)"
312
414
  protected="$(printf '%s\n' "$out" | grep -c 'PROTECTED:' || true)"
313
415
  orphan="$(printf '%s\n' "$out" | grep -c 'ORPHAN' || true)"
314
- cckit_json verb gc safe "$safe" landed "$landed" protected "$protected" orphan "$orphan"
416
+ unknown="$(printf '%s\n' "$out" | grep -c '> UNKNOWN ' || true)"
417
+ cckit_json verb gc safe "$safe" landed "$landed" protected "$protected" orphan "$orphan" unknown "$unknown"
315
418
  else
316
419
  kit_gc_analyze "$@"
317
420
  fi
@@ -324,6 +427,19 @@ case "$cmd" in
324
427
  # Everyday-dev helper: surface the unblocked set + the one command to start the top issue.
325
428
  # shellcheck source=/dev/null
326
429
  source "$LIB/kit-config.sh" && load_kit_config
430
+ # tasks.default = light (the marketing profile): a bare `cckit next` answers from the light
431
+ # task list — the same output as `cckit task next`. Any argument (`--effort <N>`, a filter)
432
+ # asks about issues and takes the issue path, as does every project whose default is issues.
433
+ if [ "$#" -eq 0 ]; then
434
+ # shellcheck source=/dev/null
435
+ source "$LIB/task-source.sh"
436
+ if [ "$(task_default_name)" = "light" ]; then
437
+ # shellcheck source=/dev/null
438
+ source "$LIB/worktree-issue.sh"; source "$LIB/light-task.sh"
439
+ lt_cli next
440
+ exit $?
441
+ fi
442
+ fi
327
443
  # shellcheck source=/dev/null
328
444
  source "$LIB/next.sh"; next_issue "$@"
329
445
  ;;
@@ -365,6 +481,7 @@ case "$cmd" in
365
481
  migrate) exec "$ROOT/scripts/kit-migrate.sh" "$@" ;;
366
482
  adopt) exec "$ROOT/scripts/kit-adopt.sh" "$@" ;;
367
483
  doctor) exec "$ROOT/scripts/kit-doctor.sh" "$@" ;;
484
+ add) exec "$ROOT/scripts/kit-add.sh" "$@" ;;
368
485
  digest) exec "$ROOT/scripts/kit-digest.sh" "$@" ;;
369
486
  bench)
370
487
  # Documentation benchmark (#200) — score how well this project finds + uses its OWN canonical
@@ -373,14 +490,31 @@ case "$cmd" in
373
490
  BENCH_ROOT="$PWD/scripts/benchmark"; [ -d "$BENCH_ROOT" ] || BENCH_ROOT="$ROOT/scripts/benchmark"
374
491
  export BENCH_KIT_ROOT="$ROOT"
375
492
  sub="${1:-report}"; shift || true
493
+ BENCH_USAGE='cckit bench <run|quality|report|gate|stop-check> [--dry] [--json]
494
+ cckit bench checkpoint <X.Y.Z> [--passes N] [--from <run.json>] [--model <name>] [--note <text>] [--verbs <timings.json>]
495
+ cckit bench checkpoints [--json] | check <X.Y.Z> | page [--out <file>] [--check]
496
+ cckit bench verbs [--runs N] [--checkout <dir>] [--verb "<verb>"] [--json] (attach: checkpoint <X.Y.Z> --verbs <file>)'
376
497
  case "$sub" in
377
498
  run) exec bash "$BENCH_ROOT/run.sh" "$@" ;;
378
499
  quality) exec bash "$BENCH_ROOT/run-quality.sh" "$@" ;;
379
500
  report) exec bash "$BENCH_ROOT/report.sh" "$@" ;;
380
501
  gate) exec bash "$BENCH_ROOT/gate.sh" "$@" ;;
381
502
  stop-check) exec bash "$BENCH_ROOT/stop-check.sh" "$@" ;;
382
- -h|--help) echo 'cckit bench <run|quality|report|gate|stop-check> [--dry] [--json]'; exit 0 ;;
383
- *) echo 'cckit bench <run|quality|report|gate|stop-check> [--dry] [--json]' >&2; exit 2 ;;
503
+ # Recorded checkpoints per release version (#452). A project scaffolded before checkpoint.sh
504
+ # existed has no copy of it, so these fall back to cckit's own.
505
+ checkpoint|checkpoints|check|page)
506
+ CP="$BENCH_ROOT/checkpoint.sh"; [ -f "$CP" ] || CP="$ROOT/scripts/benchmark/checkpoint.sh"
507
+ case "$sub" in
508
+ checkpoint) exec bash "$CP" record "$@" ;;
509
+ checkpoints) exec bash "$CP" list "$@" ;;
510
+ *) exec bash "$CP" "$sub" "$@" ;;
511
+ esac ;;
512
+ # Wall time + gh call count of the read-only verbs (#452). Same fallback as the checkpoint verbs.
513
+ verbs)
514
+ VT="$BENCH_ROOT/verb-timings.sh"; [ -f "$VT" ] || VT="$ROOT/scripts/benchmark/verb-timings.sh"
515
+ exec bash "$VT" "$@" ;;
516
+ -h|--help) echo "$BENCH_USAGE"; exit 0 ;;
517
+ *) echo "$BENCH_USAGE" >&2; exit 2 ;;
384
518
  esac
385
519
  ;;
386
520
  scan) source "$LIB/project-scan.sh"; project_scan "$@" ;;
@@ -396,6 +530,20 @@ case "$cmd" in
396
530
  [ "$croot" = "$ROOT" ] || echo "contribute: using the checkout at $croot" >&2
397
531
  cd "$croot"; exec "$croot/scripts/contribute.sh" "$@" ;;
398
532
  status|ui) exec "$ROOT/scripts/status.sh" "$@" ;;
533
+ claims)
534
+ # Live session claims (#384) — which session is working which issue. Read-only: a dead claim is
535
+ # skipped here and reaped by the next `cckit start` on that issue, never by this verb.
536
+ # shellcheck source=/dev/null
537
+ source "$LIB/session-registry.sh"
538
+ if cckit_is_json; then sreg_list "$PWD" --json; exit 0; fi
539
+ rows="$(sreg_list "$PWD")"
540
+ if [ -z "$rows" ]; then echo "(no live claims)"; exit 0; fi
541
+ printf '%-7s %-8s %-17s %-42s %s\n' "ISSUE" "PID" "SINCE" "BRANCH" "WORKTREE"
542
+ printf '%s\n' "$rows" | while IFS=$'\t' read -r c_issue c_branch c_wt c_pid c_host c_started; do
543
+ c_since="$(date -r "$c_started" '+%Y-%m-%d %H:%M' 2>/dev/null || date -d "@$c_started" '+%Y-%m-%d %H:%M' 2>/dev/null || echo "$c_started")"
544
+ printf '%-7s %-8s %-17s %-42s %s\n' "#$c_issue" "$c_pid" "$c_since" "$c_branch" "$c_wt"
545
+ done
546
+ ;;
399
547
  resume) source "$LIB/handoff.sh"; handoff_read ;;
400
548
  handoff) source "$LIB/handoff.sh"; handoff_write "$@" ;;
401
549
  msg)
@@ -411,7 +559,13 @@ case "$cmd" in
411
559
  esac
412
560
  ;;
413
561
  install) exec "$ROOT/scripts/install.sh" "$@" ;;
414
- init) exec "$ROOT/scripts/init.sh" "$@" ;;
562
+ init)
563
+ # init resolves the config from the folder it sets up. The KIT_CONFIG this dispatcher worked out
564
+ # is the invoking directory's project or, outside any project, cckit's OWN config: read as the
565
+ # new project's, that one gave every fresh project cckit's base branch and label set (#487).
566
+ # A KIT_CONFIG the caller exported is kept.
567
+ [ -n "$_KIT_CONFIG_GIVEN" ] || unset KIT_CONFIG
568
+ exec "$ROOT/scripts/init.sh" "$@" ;;
415
569
  commands)
416
570
  # The command catalog - verbs parsed from this dispatcher's own case labels (single source).
417
571
  verbs="$(grep -oE '^ [a-z][a-z|-]*\)' "$BIN/cckit" | sed 's/[) ]//g' | tr '|' '\n' | grep -vE '^(-|$)' | sort -u)"
@@ -452,6 +606,21 @@ case "$cmd" in
452
606
  source "$LIB/stage-receipt.sh"
453
607
  sr_cli "$@"
454
608
  ;;
609
+ qa)
610
+ # The QA lane (#295): launch the stack command the project declared under `qa`, on this lane's
611
+ # port block, and report USABLE only when every readiness probe answers. One dispatcher in the
612
+ # lib, as `receipt` does with sr_cli, so later subcommands land there and not here.
613
+ # shellcheck source=/dev/null
614
+ source "$LIB/qa-lane.sh"
615
+ qa_cli "$@"
616
+ ;;
617
+ page)
618
+ # Review pages (#451): a plan, a decision or a grilling round opens as a page when this session
619
+ # has a browser, and prints to the terminal when it does not. One dispatcher in the lib.
620
+ # shellcheck source=/dev/null
621
+ source "$LIB/review-page.sh"
622
+ rp_cli "$@"
623
+ ;;
455
624
  completions)
456
625
  case "${1:-bash}" in
457
626
  bash) cat "$ROOT/completions/cckit.bash" ;;
package/cckit.config.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./kit.config.schema.json",
3
- "kitVersion": "0.8.0",
3
+ "kitVersion": "0.10.0",
4
4
  "project": {
5
5
  "name": "cckit",
6
6
  "slug": "cckit",
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Onboarding preflight — check deps (Homebrew, git, gh, jq, perl, node, pnpm), authenticate gh + add scope:project, optionally set up SSH. Auto-installs everything it can; pauses only for sudo password (Homebrew) and browser OAuth (gh auth login).
3
- argument-hint: "[--dry-run] [--no-install] [--dismiss-local]"
2
+ description: Onboarding preflight — check deps (Homebrew, git, gh, jq, perl, node, pnpm), authenticate gh + add scope:project, optionally set up SSH. Report-only unless run with --fix (or answered yes in a terminal); with --fix it installs what it can and pauses only for sudo password (Homebrew) and browser OAuth (gh auth login).
3
+ argument-hint: "[--fix] [--dry-run] [--no-install] [--dismiss-local]"
4
4
  allowed-tools: Bash
5
5
  ---
6
6
 
@@ -15,16 +15,24 @@ Run the kit-doctor script to check all dependencies and authentication required
15
15
  | Tier 0 | Homebrew (macOS bootstrap — installs if missing, requires sudo password) |
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
- | Local | Only when `.local.enabled` — installs `mlx-lm` via `uv tool install` (fallback `pipx`, never plain `pip`) + starts `mlx_lm.server` in background with a port health check (first run downloads ~4.5 GB) |
19
- | Memory | Only when `.memory.enabled` — installs the [MemPalace](https://github.com/MemPalace/mempalace) CLI if missing (pipx, fallback uv), seeds the per-wing wake-up header (`.claude/mempal-identity.<wing>.txt`), and refreshes a stale session-start hook. Install + seed + refresh obey the consent guard: `--fix` applies them, `--dry-run`/`--no-install` only report |
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 |
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 |
20
22
  | Auth | `gh auth status`, scope `project`, `git config user.name/email` |
21
- | 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 pr-merge` already closes them explicitly) |
23
+ | 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
+ | 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) |
22
25
  | SSH | Optional: detect existing key; `KIT_DOCTOR_SSH=1` triggers guided ed25519 setup |
23
26
 
24
27
  ## Flags
25
28
 
29
+ - *(no flag)* — in a terminal it asks before installing. Run from Claude Code there is no terminal, so
30
+ it is report-only: no package install, no `pnpm install`, no seeded or refreshed file, no server start
31
+ - `--fix` (alias `--yes`) — install what is missing and seed/refresh files without asking. Pass it only
32
+ when the user asked for installs
26
33
  - `--dry-run` — report only, touch nothing (no installs, no server start)
27
34
  - `--no-install` — check + auth only, skip package installs
35
+ - `--agents` — only the agent-runtime rows; no installs, no network; exits 1 when a selected runtime is absent
28
36
  - `--dismiss-local` — silence the "local layer down" SessionStart notice until the next x.y kit update (writes `.local.dismissed` to `kit.config.json`); session-only alternative: `KIT_LOCAL_DISMISS=1`
29
37
 
30
38
  ## Steps
@@ -41,8 +41,6 @@ two artifacts, and checks the project is portable.
41
41
  bash "${CLAUDE_PLUGIN_ROOT}/scripts/kit-export-project.sh" $ARGUMENTS
42
42
  ```
43
43
 
44
- (or `kit export $ARGUMENTS` — the CLI dispatches to the same canonical script.)
45
-
46
44
  2. For a full export, tell the user the two manual steps claude.ai needs:
47
45
  - paste `.kit-export/claude-instructions.md` into the Project's custom-instructions box
48
46
  - upload `.kit-export/project-knowledge/` as the Project's knowledge
@@ -6,14 +6,11 @@ allowed-tools: Bash, Read, AskUserQuestion
6
6
 
7
7
  # /kit-export-training — export sessions as redacted training data
8
8
 
9
- Fine-tuning a local model on your own work only helps if the data leaves the machine clean. This is
10
- the **consent gate** in front of a dataset builder (`chat-datasets/build_dataset.py`): it lets a
11
- builder choose which sessions to export, **always** runs the builder with redaction ON (secret /
12
- key / token / email masking is the builder's default; this command never passes `--no-redact`), and
13
- prints where it wrote plus a reminder that redaction must be verified before sharing.
14
-
15
- Nothing here is automatic — it runs **only when explicitly invoked**, and it never uploads anything.
16
- The output is plain JSONL on disk; what you do with it is your call.
9
+ This command is the **consent gate** in front of a dataset builder
10
+ (`chat-datasets/build_dataset.py`): it lets a builder choose which sessions to export, **always**
11
+ runs the builder with redaction ON (secret / key / token / email masking is the builder's default;
12
+ this command never passes `--no-redact`), and prints where it wrote plus a reminder that redaction
13
+ must be verified before sharing.
17
14
 
18
15
  Handler (under `${CLAUDE_PLUGIN_ROOT}`):
19
16
  - `scripts/kit-export-training.sh [--builder PATH] [--match KEY ...] [--dirs DIR ...] [--sessions FILE ...] [--out PATH] [--split FRAC] [--final-only] [--drop-narration]`
@@ -26,7 +23,7 @@ Handler (under `${CLAUDE_PLUGIN_ROOT}`):
26
23
  `--builder` / `KIT_DATASET_BUILDER`.
27
24
  2. **Select what to export** — default is the **current git project** (matched by its slug under
28
25
  `~/.claude/projects`). Let the builder choose instead:
29
- - `--match KEY ...` — project-dir name substrings (e.g. `cckit tuempresa`)
26
+ - `--match KEY ...` — project-dir name substrings (e.g. `cckit acme`)
30
27
  - `--sessions FILE ...` — individual `*.jsonl` transcripts (staged into a temp dir)
31
28
  - `--dirs DIR ...` — explicit `~/.claude/projects/<dir>` directories
32
29
  3. **Confirm (opt-in)** — on a TTY the handler asks before writing anything; aborting writes
@@ -24,11 +24,11 @@ You are initializing the current project with the **claude-kit** setup. The kit
24
24
  - If it's a single project (a `.git` here, or one app), continue here.
25
25
  - Suggest a layout that favors the kit — `CLAUDE.md` + `.claude/` at the project root, plans under
26
26
  `docs/plans/`, the kit's `scripts/` alongside; **one repo = one kit setup**. See
27
- [docs/usage.md → Project structure](${CLAUDE_PLUGIN_ROOT}/docs/usage.md).
27
+ [cckit init reference → What the kit writes](https://cckit.dev/init-reference/#what-the-kit-writes).
28
28
 
29
29
  **Then gather inputs.** If `$ARGUMENTS` already names a profile and the key values, use them.
30
30
  Otherwise ask the user with `AskUserQuestion`:
31
- - **Profile** — `software`, `content`, `research`, or `minimal`
31
+ - **Profile** — `software`, `content`, `marketing`, `research`, `automation`, or `minimal`
32
32
  (read `${CLAUDE_PLUGIN_ROOT}/profiles/*.json` to describe each)
33
33
  - **GitHub repo** — `owner/repo` (offer `gh api user --jq .login` as the default owner)
34
34
  - **Projects v2 board** — board number if they use one, else "off"
@@ -43,7 +43,7 @@ You are initializing the current project with the **claude-kit** setup. The kit
43
43
  `software` profile and **self-activate** only when their technology is in the project's
44
44
  `package.json` — nothing to choose at init.
45
45
 
46
- Skip questions already answered in `$ARGUMENTS`. Derive sensible defaults (project name =
46
+ Skip questions already answered in `$ARGUMENTS`. Derive defaults (project name =
47
47
  repo name, slug = lowercased name) and only confirm the non-obvious ones.
48
48
 
49
49
  2. **Run the engine** from the project root:
@@ -56,20 +56,25 @@ You are initializing the current project with the **claude-kit** setup. The kit
56
56
  --repo "<owner/repo>" \
57
57
  [--project-number <N>] \
58
58
  [--memory on] \
59
- [--lang "<language>"]
59
+ [--lang "<language>"] \
60
+ [--adapter <claude|codex|both>]
60
61
  ```
61
62
 
63
+ `--adapter` selects the agent adapter(s), default `claude`. `codex` writes `AGENTS.md` and
64
+ `.agents/{skills,rules}` from the same templates; `both` writes both trees. The selection is stored
65
+ as `adapters` in the config.
66
+
62
67
  It substitutes `{{VARS}}`, resolves `<!-- IF:FLAG -->` blocks, and writes `CLAUDE.md`,
63
68
  `.claude/{kit.config.json,agents,skills,rules,settings.local.json}`, and `scripts/`.
64
69
 
65
70
  Tip: add `--dry-run` to print the exact scaffold plan (files, hooks, onboarding tools) **without
66
71
  writing anything** — useful to confirm the profile first. Offer the user a dry-run preview if the
67
- profile/target is at all uncertain.
72
+ profile/target is uncertain.
68
73
 
69
- 3. **Set up external tools — opt-in.** Configure the CLIs the scaffold relies on. This is
70
- **opt-in and consent-based**: for each tool, **explain what it is and why it's needed, then
71
- install/authenticate only with the user's go-ahead**. Nothing is forced; a declined tool just
72
- leaves the matching features dormant (they don't error) and can be re-run anytime.
74
+ 3. **Set up external tools — opt-in.** Configure the CLIs the scaffold relies on. For each tool,
75
+ **explain what it is and why it's needed, then install/authenticate only with the user's
76
+ go-ahead**. A declined tool leaves the matching features dormant (they don't error) and can be
77
+ re-run anytime.
73
78
 
74
79
  **GitHub CLI (`gh`)** — backs the whole task/PR workflow (issues, PRs, labels, milestones).
75
80
  - Detect: `gh auth status`. If not authenticated, explain every `task-*` skill needs it and,
@@ -94,11 +99,36 @@ You are initializing the current project with the **claude-kit** setup. The kit
94
99
  - `gws` missing → explain it and ask the user for their install method; **do not guess a package
95
100
  name or installer**. Re-check `command -v gws`.
96
101
 
97
- 4. **Report** what was written (echo the engine's summary) and surface the printed "Next steps"
98
- (seed labels/milestones, capture Projects v2 IDs).
102
+ 4. **Report** what was written (echo the engine's summary) and its closing lines.
103
+
104
+ 5. **Git and GitHub setup.** The engine does this itself: `git init` + first commit, one commit
105
+ holding the kit files on the base branch when the repository already had commits, the GitHub
106
+ repository (private unless `--public`), the base branch `develop` (pushed with that commit),
107
+ labels, milestones, delete-head-branches, base-branch protection, Projects v2 ids, the doctor
108
+ report. You have no terminal, so it runs only with `--yes`, and the scaffold in step 2 ends
109
+ with "Git and GitHub setup: not run" followed by one "Not done:" block per thing left undone
110
+ (the kit files are not committed; the base branch does not exist). Relay those blocks: until
111
+ the kit files are committed, a task started in the project gets a folder without them. Show
112
+ the user the plan first, then run it on their go-ahead:
113
+
114
+ ```bash
115
+ "${CLAUDE_PLUGIN_ROOT}/scripts/init.sh" --target "$PWD" --dry-run # the steps, nothing written
116
+ "${CLAUDE_PLUGIN_ROOT}/scripts/init.sh" --target "$PWD" --yes # run them; finished steps are skipped
117
+ ```
99
118
 
100
- 5. **Offer** to run `./scripts/setup-labels.sh` and `./scripts/setup-milestones.sh` now if a
101
- GitHub repo was configured. Ask before running — they mutate the repo.
119
+ Each step prints `done`, `skipped` or `failed`; relay the failed ones with their reason. Pass
120
+ `--no-github` in step 2 when the user wants the files only. Creating a repository and changing
121
+ branch protection are outward-facing: never pass `--yes` without the user's go-ahead.
122
+
123
+ **A new project.** When the target is an empty folder, a folder with no project in it, or the
124
+ user's home directory, ask the engine's questions with `AskUserQuestion` (is this a new project,
125
+ its name and folder, the recipe from `${CLAUDE_PLUGIN_ROOT}/recipes/*.json`, whether it needs a
126
+ database and which one from `${CLAUDE_PLUGIN_ROOT}/databases/*.json`; each descriptor marks the
127
+ recommended one), write the answers to a JSON file and pass `--answers <file>`. Keys:
128
+ `new_project`, `folder_use`, `project_name`, `location`, `recipe`, `database_needed`, `database`,
129
+ `profile`. Never scaffold into a home directory. For a database, the engine prints the steps to get
130
+ the credentials; the user types the values into the env file — do not ask for them in chat and do
131
+ not write them yourself.
102
132
 
103
133
  6. **Audit stack conformance** (when the `software` profile activated a stack-gated build skill).
104
134
  The build skills (`feature-build-refine`, `supabase-patterns`, …) self-activate from
@@ -10,7 +10,7 @@ Plugin-direct command. Engine at `${CLAUDE_PLUGIN_ROOT}/scripts/kit-routines.sh`
10
10
 
11
11
  The kit ships a set of **suggested routines** (briefing, board sweep, GC, knowledge-lint,
12
12
  kit-wire-check, security-sweep). Each is an OS cron job scoped to this project. Nothing is
13
- created without your explicit opt-in — the kit suggests, you accept.
13
+ created without your explicit opt-in.
14
14
 
15
15
  ## Steps
16
16