@jeiemgi/cckit 0.9.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 (305) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/AGENTS.md +169 -21
  3. package/README.md +491 -35
  4. package/SECURITY.md +5 -0
  5. package/bin/cckit +182 -17
  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/hook-adapter-test.sh +193 -0
  59. package/scripts/init-content-test.sh +225 -0
  60. package/scripts/init-guided-test.sh +474 -0
  61. package/scripts/init-recipes-test.sh +104 -0
  62. package/scripts/init-upgrade-test.sh +341 -2
  63. package/scripts/init.sh +746 -95
  64. package/scripts/instruction-budget-baseline.txt +8 -0
  65. package/scripts/instruction-budget-lint-test.sh +166 -0
  66. package/scripts/instruction-budget-lint.sh +219 -0
  67. package/scripts/integrations-check-test.sh +200 -0
  68. package/scripts/integrations-check.sh +157 -0
  69. package/scripts/kit-add-test.sh +214 -0
  70. package/scripts/kit-add.sh +305 -5
  71. package/scripts/kit-adopt-test.sh +16 -0
  72. package/scripts/kit-adopt.sh +3 -2
  73. package/scripts/kit-digest.sh +2 -2
  74. package/scripts/kit-doctor-test.sh +293 -0
  75. package/scripts/kit-doctor.sh +272 -140
  76. package/scripts/kit-export-project-test.sh +3 -3
  77. package/scripts/kit-remove-test.sh +19 -0
  78. package/scripts/kit-routines.sh +2 -2
  79. package/scripts/kit-self-update.sh +1 -1
  80. package/scripts/kit-version-check-test.sh +4 -0
  81. package/scripts/kit-version-check.sh +4 -2
  82. package/scripts/knowledge-lint.sh +4 -4
  83. package/scripts/leak-fence-test.sh +89 -0
  84. package/scripts/lib/adapter-select-test.sh +136 -0
  85. package/scripts/lib/adapter-select.sh +158 -0
  86. package/scripts/lib/agent-def-test.sh +69 -0
  87. package/scripts/lib/agent-def.sh +106 -0
  88. package/scripts/lib/agent-launch-test.sh +212 -0
  89. package/scripts/lib/agent-launch.sh +335 -0
  90. package/scripts/lib/board-view-test.sh +11 -0
  91. package/scripts/lib/board-view.sh +42 -26
  92. package/scripts/lib/branch-owner-test.sh +26 -0
  93. package/scripts/lib/branch-owner.sh +16 -9
  94. package/scripts/lib/captain-test.sh +105 -0
  95. package/scripts/lib/captain.sh +87 -8
  96. package/scripts/lib/codex-hooks-test.sh +100 -0
  97. package/scripts/lib/codex-hooks.sh +69 -0
  98. package/scripts/lib/commitlint.sh +1 -1
  99. package/scripts/lib/content-kinds-gc-test.sh +88 -0
  100. package/scripts/lib/copilot-test.sh +70 -4
  101. package/scripts/lib/copilot.sh +66 -14
  102. package/scripts/lib/effort-dispatch-test.sh +3 -3
  103. package/scripts/lib/effort-metrics-test.sh +178 -1
  104. package/scripts/lib/effort-metrics.sh +175 -35
  105. package/scripts/lib/effort-ops-test.sh +205 -7
  106. package/scripts/lib/effort-ops.sh +198 -43
  107. package/scripts/lib/effort-parity-test.sh +49 -13
  108. package/scripts/lib/effort-plan-test.sh +337 -0
  109. package/scripts/lib/effort-plan.sh +200 -23
  110. package/scripts/lib/effort.sh +56 -11
  111. package/scripts/lib/errors-header-test.sh +1 -1
  112. package/scripts/lib/gh-project-test.sh +35 -1
  113. package/scripts/lib/gh-project.sh +23 -16
  114. package/scripts/lib/gh-rest-test.sh +32 -3
  115. package/scripts/lib/gh-rest.sh +17 -2
  116. package/scripts/lib/hook-refresh.sh +1 -1
  117. package/scripts/lib/init-github.sh +412 -0
  118. package/scripts/lib/init-guide.sh +630 -0
  119. package/scripts/lib/integration-install-test.sh +343 -0
  120. package/scripts/lib/integration-install.sh +257 -0
  121. package/scripts/lib/integrations-test.sh +366 -0
  122. package/scripts/lib/integrations.sh +244 -0
  123. package/scripts/lib/kinds-test.sh +125 -0
  124. package/scripts/lib/kinds.sh +66 -0
  125. package/scripts/lib/kit-brief-test.sh +22 -3
  126. package/scripts/lib/kit-brief.sh +45 -5
  127. package/scripts/lib/kit-config-resolve.sh +2 -2
  128. package/scripts/lib/kit-config-test.sh +64 -1
  129. package/scripts/lib/kit-config.sh +37 -1
  130. package/scripts/lib/kit-events.sh +7 -0
  131. package/scripts/lib/kit-gc-test.sh +173 -1
  132. package/scripts/lib/kit-gc.sh +226 -37
  133. package/scripts/lib/kit-hotfix.sh +216 -0
  134. package/scripts/lib/kit-interview-test.sh +93 -0
  135. package/scripts/lib/kit-interview.sh +117 -8
  136. package/scripts/lib/kit-lib-test.sh +1 -1
  137. package/scripts/lib/kit-lib.sh +3 -3
  138. package/scripts/lib/kit-local.sh +2 -2
  139. package/scripts/lib/kit-manifest.sh +33 -1
  140. package/scripts/lib/kit-profile-test.sh +3 -3
  141. package/scripts/lib/kit-status-test.sh +112 -4
  142. package/scripts/lib/kit-status.sh +246 -16
  143. package/scripts/lib/kit-task-ops-test.sh +37 -0
  144. package/scripts/lib/kit-task-ops.sh +175 -31
  145. package/scripts/lib/kto-hotfix-test.sh +232 -0
  146. package/scripts/lib/kto-task-close-test.sh +1 -1
  147. package/scripts/lib/kto-task-new-test.sh +95 -0
  148. package/scripts/lib/kto-task-pr-merge-test.sh +37 -3
  149. package/scripts/lib/kto-task-pr-test.sh +70 -0
  150. package/scripts/lib/leak-fence.sh +89 -0
  151. package/scripts/lib/light-task-run-test.sh +255 -0
  152. package/scripts/lib/light-task-test.sh +309 -0
  153. package/scripts/lib/light-task.sh +706 -0
  154. package/scripts/lib/next-test.sh +99 -0
  155. package/scripts/lib/next.sh +9 -3
  156. package/scripts/lib/orchestration-runtime-test.sh +72 -0
  157. package/scripts/lib/orchestration-runtime.sh +57 -5
  158. package/scripts/lib/plan-machine-test.sh +15 -2
  159. package/scripts/lib/plan-machine.sh +20 -7
  160. package/scripts/lib/plan-next-test.sh +1 -1
  161. package/scripts/lib/plan-next.sh +4 -4
  162. package/scripts/lib/pr-evidence-test.sh +3 -3
  163. package/scripts/lib/pr-evidence.sh +1 -1
  164. package/scripts/lib/qa-lane-test.sh +626 -0
  165. package/scripts/lib/qa-lane.sh +1357 -0
  166. package/scripts/lib/qa-lanes-test.sh +175 -0
  167. package/scripts/lib/react-detect.sh +1 -1
  168. package/scripts/lib/render-test.sh +1 -1
  169. package/scripts/lib/review-page-test.sh +318 -0
  170. package/scripts/lib/review-page.sh +369 -0
  171. package/scripts/lib/review-stage-test.sh +62 -11
  172. package/scripts/lib/review-stage.sh +42 -60
  173. package/scripts/lib/role-identity-test.sh +65 -0
  174. package/scripts/lib/role-identity.sh +25 -2
  175. package/scripts/lib/secret-guard.sh +3 -3
  176. package/scripts/lib/session-registry-test.sh +111 -0
  177. package/scripts/lib/session-registry.sh +233 -0
  178. package/scripts/lib/stage-receipt-test.sh +14 -1
  179. package/scripts/lib/stage-receipt.sh +13 -8
  180. package/scripts/lib/task-source-file.sh +309 -0
  181. package/scripts/lib/task-source.sh +130 -0
  182. package/scripts/lib/upgrade-report-test.sh +120 -0
  183. package/scripts/lib/upgrade-report.sh +138 -0
  184. package/scripts/lib/version-bump.sh +3 -3
  185. package/scripts/lib/wave-result-test.sh +80 -0
  186. package/scripts/lib/wave-result.sh +127 -0
  187. package/scripts/lib/worker-brief-test.sh +5 -0
  188. package/scripts/lib/worker-brief.sh +2 -2
  189. package/scripts/lib/worktree-issue-test.sh +30 -1
  190. package/scripts/lib/worktree-issue.sh +82 -12
  191. package/scripts/lib/worktree-ports-test.sh +57 -4
  192. package/scripts/lib/worktree-start-test.sh +197 -0
  193. package/scripts/lib/worktree-start.sh +153 -31
  194. package/scripts/lib/zsh-safety-test.sh +19 -3
  195. package/scripts/marketing-walkthrough-test.sh +152 -0
  196. package/scripts/night-grant-test.sh +37 -0
  197. package/scripts/night-grant.sh +448 -0
  198. package/scripts/night-run-test.sh +8 -0
  199. package/scripts/night-run.mjs +275 -0
  200. package/scripts/night-run.test.mjs +324 -0
  201. package/scripts/orchestrate-test.sh +190 -0
  202. package/scripts/orchestrate.sh +79 -8
  203. package/scripts/portable-test.sh +11 -2
  204. package/scripts/publish.sh +28 -3
  205. package/scripts/review-lint-test.sh +7 -7
  206. package/scripts/review-lint.sh +2 -2
  207. package/scripts/review-rules.conf +8 -0
  208. package/scripts/rule-recipes-test.sh +96 -0
  209. package/scripts/self-install-test.sh +39 -9
  210. package/scripts/setup-labels.sh +18 -1
  211. package/scripts/setup-milestones.sh +1 -1
  212. package/scripts/showcase.sh +1 -1
  213. package/scripts/skill-frontmatter-lint-test.sh +4 -4
  214. package/scripts/skill-frontmatter-lint.sh +1 -1
  215. package/scripts/status-test.sh +113 -2
  216. package/scripts/status.sh +16 -3
  217. package/scripts/task-sync-test.sh +154 -0
  218. package/scripts/task-sync.sh +243 -32
  219. package/scripts/test-runner-test.sh +158 -0
  220. package/scripts/test.sh +131 -23
  221. package/scripts/update-path-test.sh +279 -0
  222. package/scripts/ux-ds-audit.sh +1 -1
  223. package/scripts/ux-graph-scan.sh +6 -6
  224. package/scripts/wave-worker.sh +54 -0
  225. package/skills/kit-add/SKILL.md +77 -0
  226. package/skills/kit-autopilot/SKILL.md +123 -12
  227. package/skills/kit-cleanup/SKILL.md +5 -2
  228. package/skills/kit-contribute/SKILL.md +4 -4
  229. package/skills/kit-docs-writer/SKILL.md +16 -6
  230. package/skills/kit-effort-close/SKILL.md +17 -8
  231. package/skills/kit-effort-new/SKILL.md +15 -9
  232. package/skills/kit-effort-pr/SKILL.md +15 -7
  233. package/skills/kit-effort-start/SKILL.md +5 -2
  234. package/skills/kit-gc/SKILL.md +5 -2
  235. package/skills/kit-next/SKILL.md +5 -1
  236. package/skills/kit-onboard/SKILL.md +3 -3
  237. package/skills/kit-page/SKILL.md +93 -0
  238. package/skills/kit-plan-next/SKILL.md +8 -4
  239. package/skills/kit-security-sweep/SKILL.md +1 -3
  240. package/skills/kit-ship/SKILL.md +2 -3
  241. package/skills/kit-status/SKILL.md +35 -4
  242. package/skills/kit-task-new/SKILL.md +3 -3
  243. package/skills/kit-task-pr/SKILL.md +7 -2
  244. package/skills/kit-task-pr-merge/SKILL.md +7 -2
  245. package/skills/kit-task-start/SKILL.md +7 -7
  246. package/skills/kit-task-sync/SKILL.md +19 -3
  247. package/skills/kit-ux-audit/SKILL.md +3 -2
  248. package/templates/agents/auto-dev.md +5 -4
  249. package/templates/agents/backend.md +1 -1
  250. package/templates/agents/designer.md +2 -0
  251. package/templates/agents/devops.md +1 -1
  252. package/templates/agents/editor.md +9 -1
  253. package/templates/agents/frontend.md +1 -1
  254. package/templates/agents/local-delegate.md +1 -1
  255. package/templates/agents/pm.md +5 -5
  256. package/templates/agents/tech-lead.md +1 -1
  257. package/templates/benchmarks/SCHEMA.md +9 -3
  258. package/templates/codex/hooks.json.tmpl +89 -0
  259. package/templates/hooks/guard-base-branch-commit.sh.tmpl +13 -7
  260. package/templates/hooks/guard-raw-git-ops.sh.tmpl +12 -12
  261. package/templates/hooks/mempal_followup.sh.tmpl +2 -2
  262. package/templates/hooks/mempal_session_start.sh.tmpl +1 -1
  263. package/templates/hooks/prepush_gate.sh.tmpl +4 -2
  264. package/templates/hooks/repo-hygiene.sh.tmpl +3 -2
  265. package/templates/instructions.md.tmpl +174 -0
  266. package/templates/kit.config.json.tmpl +3 -3
  267. package/templates/knowledge-INDEX.md.tmpl +1 -1
  268. package/templates/lib/kit-sigil.sh.tmpl +1 -1
  269. package/templates/rules/authoring.md +106 -0
  270. package/templates/rules/branch-naming.md +40 -4
  271. package/templates/rules/code-retrieval.md +63 -0
  272. package/templates/rules/delegation-brief.md +0 -3
  273. package/templates/rules/design-routing.md +3 -3
  274. package/templates/rules/effort-model.md +14 -10
  275. package/templates/rules/gate-and-review.md +94 -0
  276. package/templates/rules/issue-lifecycle.md +88 -0
  277. package/templates/rules/knowledge-base.md +1 -1
  278. package/templates/rules/mempalace.md +1 -1
  279. package/templates/rules/merge-safety.md +108 -0
  280. package/templates/rules/naming-and-ids.md +23 -17
  281. package/templates/rules/plain-language.md +59 -0
  282. package/templates/rules/plan-next.md +9 -11
  283. package/templates/rules/react-annotate.md +6 -0
  284. package/templates/rules/review-pages.md +49 -0
  285. package/templates/rules/risk-tiered-review.md +13 -4
  286. package/templates/rules/shared-checkout.md +106 -0
  287. package/templates/rules/skill-gaps.md +2 -7
  288. package/templates/rules/task-management.md +13 -1
  289. package/templates/skills/brand-voice/SKILL.md +91 -0
  290. package/templates/skills/brand-voice/references/voice-template.md +61 -0
  291. package/templates/skills/campaign/SKILL.md +123 -0
  292. package/templates/skills/campaign/references/plan-template.md +55 -0
  293. package/templates/skills/concrete/SKILL.md +2 -2
  294. package/templates/skills/copywriting/SKILL.md +8 -1
  295. package/templates/skills/feature-build-refine/SKILL.md +2 -4
  296. package/templates/skills/morning-briefing/SKILL.md +2 -2
  297. package/templates/skills/page-design/SKILL.md +145 -0
  298. package/templates/skills/page-design/add.json +5 -0
  299. package/templates/skills/page-design/references/design-file-template.md +40 -0
  300. package/templates/skills/page-design/references/generic-page-patterns.md +43 -0
  301. package/templates/skills/page-design/references/minimum-rules.md +42 -0
  302. package/templates/skills/speckit/SKILL.md +4 -5
  303. package/templates/skills/supabase-patterns/SKILL.md +1 -1
  304. package/commands/kit-add.md +0 -42
  305. package/templates/CLAUDE.md.tmpl +0 -106
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cckit",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "installationPreference": "beta",
5
5
  "description": "cckit — a project operating system for coding agents. The full GitHub work lifecycle (start/pr/close/sync, efforts, worktrees, orchestrate, gc) as agents + skills + rules, drivable by Claude Code and any other agent. Driven from cckit.config.json; no org or repo hardcoded.",
6
6
  "author": {
package/AGENTS.md CHANGED
@@ -15,7 +15,9 @@ adapter one) — is described in [the Adapters page](docs-site/src/content/docs/
15
15
  `effort/<N>` branch = 1 PR* covering **N sub-issues**. Sequential sub-issues commit straight onto
16
16
  `effort/<N>` (one commit per sub-issue — that commit's diff is the sub's patch); parallel ones get
17
17
  their own file-disjoint `sub/<N><letter>` worktree and merge back into `effort/<N>`. Either way
18
- exactly one PR opens, from `effort/<N>` — never one per sub-issue. Full spec:
18
+ exactly one PR opens, from `effort/<N>` — never one per sub-issue. That PR merges with
19
+ `cckit effort close <N>`: `cckit merge` refuses an `effort/*` head, because its squash skips the
20
+ per-sub trace snapshot (`KIT_FORCE=1` merges anyway, with a warning). Full spec:
19
21
  `.claude/rules/effort-model.md`.
20
22
  - **Structured output, TOON-first.** Append `--llm` to any verb for machine-readable output. List
21
23
  reads (sync, next, plan, wave) come back as **TOON** (token-cheap); single-result action verbs
@@ -36,8 +38,14 @@ adapter one) — is described in [the Adapters page](docs-site/src/content/docs/
36
38
 
37
39
  `templates/` is what `cckit init` writes into a consuming project. `.claude/skills/` and
38
40
  `.claude/rules/` in this repo are the subset cckit applies to its **own** work — `concrete`,
39
- `karpathy-guidelines`, and the rules for branches, efforts, PR titles, delegation and communication
40
- style. No agents are installed: this file plus `cckit brief` is the delegation contract here.
41
+ `karpathy-guidelines`, and the rules for branches, efforts, PR titles, delegation, communication
42
+ style and issue lifecycle (`issue-lifecycle.md`: sub-issues not checkboxes, approved-plan autonomy,
43
+ explicit closes) and merge safety (`merge-safety.md`: current base before merging, a coupled chain as
44
+ one PR, the gate re-run on the integration branch) and authoring (`authoring.md`: docs in the same change,
45
+ no issue numbers in pasted prompts, summaries without machine flags) and the shared checkout
46
+ (`shared-checkout.md`: never move the primary checkout by hand, work in a worktree, call a freshly merged verb from a
47
+ current worktree's `bin/cckit`) and review pages (`review-pages.md`: a plan, a decision or a grilling round opens as a
48
+ page, terminal output where there is no browser, the answer written back). No agents are installed: this file plus `cckit brief` is the delegation contract here.
41
49
 
42
50
  The manifest and the reason for every skipped template are in `scripts/self-install-test.sh`, which
43
51
  also fails if an installed copy drifts from its template. Edit a template and its installed copy in
@@ -47,26 +55,39 @@ the same commit.
47
55
 
48
56
  | Verb | Purpose | LLM mode |
49
57
  | --- | --- | --- |
50
- | `cckit init` | scaffold config + `.claude/` | — |
58
+ | `cckit init [<folder>] [--adapter <claude\|codex\|both>]` | guided project setup, then the scaffold. Before anything is written init classifies the folder: a repository with a remote, a repository without one, a project without git, files with no project marker, an empty or missing folder, or a home/system folder (`$HOME`, `~/Desktop`, `~/Documents`, `~/Downloads`, `/`), which is never scaffolded into. Questions (is this a new project, where it lives, recipe, database, profile) are answered from `--answers FILE` (a JSON object `{"<key>":"<value>"}`: `new_project`, `folder_use`, `project_name`, `location`, `recipe`, `database_needed`, `database`, `profile`), else on a terminal; a key the file omits takes the recommended option. With neither a terminal nor an answers file init runs from flags alone, and a home folder exits 2. `--recipe <id>` starts a NEW project from `recipes/<id>.json` (shipped: `nextjs-shadcn`), and the recipe's `config` object is merged into the project config (`nextjs-shadcn` sets `tasks.check` to `pnpm build && pnpm lint` and `tasks.design` to `true`, which makes every task of the project a page task and installs the `page-design` skill); `--database <id>` applies `databases/<id>.json` (shipped: `supabase`: packages, `lib/supabase/{client,server}.ts`, variable names with placeholders in the gitignored `.env.local`, and a guide page; values are typed by the user and never printed). Then the git + GitHub steps, listed first and run after one confirmation (a terminal prompt, or `--yes`; with no terminal and no `--yes` they do not run and the last lines say so, naming what is left undone and the command for it: `Not done: the cckit files are not committed.` and, when the config's base branch is in neither the repository nor origin, `Not done: the branch '<base>' … does not exist`; the base branch written without the setup is the repository's GitHub default, else `main` when it exists or there is no commit, else the checked-out branch): `git init` + first commit, on a repository that already had commits ONE commit `chore: add the cckit project files` on the base branch holding the files init wrote (no env file, nothing git ignores, no script of the project's own, nothing the project had staged; skipped once the project config is tracked; `failed` when the folder is on another branch than an existing base), `gh repo create` (private; `--public` for public) or the existing remote, base branch `develop` created and pushed (when GitHub already has the base branch, the kit files commit is pushed to it), labels + milestones (missing ones only), delete-head-branches, base-branch protection (a plan that refuses it is `skipped` with the reason), Projects v2 ids when the board is on, the doctor report. Each step prints `done` / `skipped` / `failed`; a failed step does not stop the later ones and the run exits 1; a re-run skips finished steps. `--no-github` is the scaffold alone. Every scaffold adds `.cckit/` and `.claude/worktrees/` to `.gitignore`. The rendered instruction file names the project's base branch in its PR section and, with `tasks.default: "light"`, names the task files as the source of truth; the closing next steps of such a project name `cckit task new` / `cckit task start`, not the label and milestone scripts. `--dry-run` prints the recipe commands and every step and writes nothing, the folder included. Exit 0 done · 1 a step failed · 2 refused before any write (home folder, unknown recipe or answer, a recipe on a non-empty folder). `--upgrade` never enters this flow. The scaffold: config + the selected adapter(s), default `claude`. `claude` writes `CLAUDE.md` + `.claude/`; `codex` writes `AGENTS.md` + `.agents/{skills,rules}` and, when it is the only adapter, keeps the config at the root `cckit.config.json` and the ownership manifest at `.cckit/kit.manifest.json` — no `.claude/` tree. `--plain-language <on\|off>` installs the `plain-language` rule and sets `plainLanguage.enabled` (default: the profile's). `--profile <name>` picks one of `profiles/*.json` (`software`, `content`, `marketing`, `research`, `automation`, `minimal`); `marketing` is `content` plus `tasks.default: "light"`, plain language on, and the `brand-voice`, `campaign` and `page-design` skills. `page-design` is also installed by any recipe or project config that sets `tasks.design: true` (on `--upgrade` too, when the project is behind the installed version; a project already at it is refused before anything is added, and gets the skill from `cckit add page-design`). It coordinates three third-party design skills that init never installs: the closing next steps offer them as `cckit add impeccable`, `cckit add emil-design-eng`, `cckit add web-design-guidelines`, then `cckit doctor --fix`. The selection is stored as `adapters` in the config; `--upgrade` keeps it, and `--upgrade --adapter <name>` adds an adapter without rewriting the other's files. Both adapters get the same hook scripts — base-branch commit guard, raw-git guard, session mail, session-start checks: Claude in `.claude/hooks/` (mail wired in the tracked `.claude/settings.json`), Codex in `.codex/hooks/`, registered in `.codex/hooks.json` by a merge that keeps the entries already there and uses no absolute path. Codex runs a project hook only after it is trusted (`/hooks`). Specialist agents come from one role source (`templates/agents/<role>.md`): Claude gets `.claude/agents/<role>/AGENT.md`, Codex gets `.codex/agents/<role>.toml` (`name`, `description`, `developer_instructions`); a Claude tool allowlist and model alias do not translate and are written into the TOML as comments. Not installed for Codex: memory hooks (they read Claude Code transcripts) | — |
51
59
  | `cckit sync` | board state / what's unblocked | `--llm` → TOON |
52
- | `cckit next` | the next unblocked issue + how to start it | `--llm` → TOON |
60
+ | `cckit sync --json` | the board as ONE JSON object for a dashboard: per-role issues, `unassigned`, `blocked`, `stale`, `mergeQueue` (merge order). `--write` saves it atomically to `<git-common-dir>/kit-sync-cache.json` and never overwrites it with a failed or partial fetch; `--cached [TTL]` prints that cache with no `gh` call while it is younger than TTL seconds (default 60), else refreshes it; `--watch [SECS]` refreshes every SECS (default 30) and keeps the last good cache when a fetch fails; `--plan` inlines `effort plan`. Each fetch emits `op.start` / `op.done` (op `sync`) to `kit-events.jsonl`. `--write` / `--cached` / `--watch` refuse `--role` / `--milestone` (exit 2) | `--json` → JSON (`--llm` / `--output=json` stay TOON) |
61
+ | `cckit next` | the next unblocked issue + how to start it. With `tasks.default: "light"` in the config, a bare `cckit next` prints what `cckit task next` prints and makes no `gh` call (with `--llm`, that verb's one JSON object or `null`, not TOON rows); any argument takes the issue path. Human output ends with the weekly cadence line (Monday `cckit plan` · daily `cckit next` · Friday `cckit gc`); the TOON rows stay `{number,ctx,title}` | `--llm` → TOON |
53
62
  | `cckit plan` | wave plan: deps-ordered, priority-sorted within a wave, file-disjoint, session-fit | `--llm` → TOON |
54
63
  | `cckit plan-next` | forward plan: inventory current skills/verbs/rules/docs → propose what to build next | `--llm` → TOON |
55
- | `cckit status` | where are we: local undone work, open PRs waiting on a human, cleanup available (local + remote) | `--llm` → JSON |
64
+ | `cckit status` | where are we: the next effort that can start in each flow (no open blocker; p0 → p3, then lowest number), the light tasks when the project has any (counts by state, then the tasks somebody has to act on: `review`, `doing`, `draft`, `shared`; read from local git, no `gh` call and no fetch), local undone work, open PRs waiting on a human, cleanup available (local + remote), then one line with the resident instruction-file bytes (`CLAUDE.md` + rules without `paths:`) against the 150k limit and the three largest files | `--llm` → JSON (`next_efforts` is one row per flow; `null` when the efforts could not be read) (`instruction_budget`, `null` when nothing was measured) (`light_tasks`: `{counts, attention}`, `null` when the project has no light task) |
56
65
  | `cckit brief <issue>` | the delegation brief for an issue, from real state: worktree, seed freshness, owned files, the helpers they sit on, standing gotchas | — |
57
- | `cckit wave` | read open efforts, propose incoming waves: fan-out brief + captain drive | `--llm` → TOON |
66
+ | `cckit wave [--adapter <claude\|codex\|both>]` | read open efforts, propose incoming waves: fan-out brief + captain drive. The wave data (issues, ctx, one runtime-neutral prompt per issue) is the same for every runtime; the dispatch wording is per adapter — Claude Code spawns Task subagents with worktree isolation, Codex is told to launch `cckit orchestrate --agent codex`, because cckit creates the worktrees there. Default: the project's stored `adapters` (`CCKIT_ADAPTER` overrides) | `--llm` → TOON (wave data only, identical for both adapters) |
58
67
  | `cckit watch [--merge] [--loop]` | captain: gate open PRs, squash-merge CLEAN, advance the wave | — |
59
- | `cckit start <issue> [slug]` | isolated worktree + branch, bootstrapped: env files copied, per-worktree dev PORT, deps installed at the selected targets. Precedence: **`worktree.installPaths` if set** (those dirs only, installed whether or not each declares dependencies — `[]` installs nothing, and the root/workspace checks are skipped entirely), **else** the root *only when* its manifest declares dependencies or it is a workspace root **with at least one member** (a non-empty `packages:` list, or a non-empty `workspaces` / `workspaces.packages` array), **else nothing** — so a dependency-free root never gets a stray empty `pnpm-lock.yaml`. `installPaths` entries that escape the worktree are refused. `KIT_WT_INSTALL=0` skips the install | `--llm` |
60
- | `cckit pr <issue> <summary>` | commit + push + open PR | `--llm` |
68
+ | `cckit qa <up\|ready\|open\|stop\|verdict\|lanes> [--lane N]` | the QA lane, one review stack per lane (a lane is an issue number: the current branch's, or `--lane`). `up` launches the command declared under `qa` with the project's port env vars set to this lane's block and exits 0 only once every `qa.readiness` probe answers 2xx/3xx (`ready` waits on a launched lane; rc 1 names the failing probes and the launch log, rc 2 refuses a config problem, or a lane port another process already listens on, before launching). `open` prints and opens the changed screen — the PR body's `QA route: /path` line, else `qa.route` — and refuses a lane that is not usable. `stop` exits 0 only when nothing listens on the lane's ports; a listener the lane did not launch is left running (rc 1) unless `--force`. `verdict <pass\|fail>` writes a `qa` receipt bound to the reviewed commit, upserts one PR comment and mails a fail's notes to the builder; with no `pass\|fail` it reads back `pass` · `fail` · `stale` · `none`, exit 0 only for a pass on the current head. `captain.mergePolicy.requireQa` makes `cckit watch` hold a PR without that pass (`QA_MISSING`); a fail on the current head always blocks (`QA_FAILING`). `lanes` takes no argument and prints one row per lane that has a port slot, a launch record or a verdict: branch, ports, `up` · `partial` · `down` · `unknown` by who listens on those ports, the verdict (`pass` · `fail` · `stale` · `none`, or `unknown` when a verdict exists and no local branch does) and the worktree. It is read-only — no launch, no stop, no write, no `gh` or `curl` call — and exits 0 with or without lanes | `--llm` → JSON (`lanes` → a JSON array of `{lane, branch, worktree, ports, up, verdict}`, `[]` with no lane) |
69
+ | `cckit start <issue> [slug]` | isolated worktree + branch, bootstrapped: env files copied, per-worktree dev PORT, deps installed at the selected targets. Precedence: **`worktree.installPaths` if set** (those dirs only, installed whether or not each declares dependencies — `[]` installs nothing, and the root/workspace checks are skipped entirely), **else** the root *only when* its manifest declares dependencies or it is a workspace root **with at least one member** (a non-empty `packages:` list, or a non-empty `workspaces` / `workspaces.packages` array), **else nothing** — so a dependency-free root never gets a stray empty `pnpm-lock.yaml`. `installPaths` entries that escape the worktree are refused. `KIT_WT_INSTALL=0` skips the install. **Claim-checked:** `cckit start [--force] <issue>` refuses (rc 1) when another live session already holds the issue's claim in `<git-common-dir>/kit-sessions/` — before the issue read, the fetch and `git worktree add`, so a refusal makes no branch and no worktree. `--force` / `KIT_FORCE=1` starts anyway and takes the claim; a claim whose session pid is dead is reaped; re-running from the same session or from inside the claimed worktree is the usual no-op. A board Status of In Progress or In Review only warns | `--llm` |
70
+ | `cckit pr <issue> <summary> [--base <branch>]` | commit + push + open PR. `--base` targets a branch other than the configured base (`.github.baseBranch`) — a release PR `develop` → `main`, or a hotfix to the release branch; labels, milestone, board and `Closes #N` are unchanged. The body's checklist follows `pr.bodyStyle`: `code` (default) is `## Verification`, naming the diff; `content` is `## Review`, for a draft. The push exports the target as `KIT_PR_BASE` (set with or without `--base`), so a git pre-push hook can compare against the branch the PR targets. `--base` with no value exits 2 before the commit and the push | `--llm` |
71
+ | `cckit hotfix <pr\|sha> [--base <branch>]` | carry ONE merged change to the release branch (`main` unless `--base` or `KIT_HOTFIX_BASE`): worktree `fix/<N>-hotfix-<base>` from `origin/<base>`, `git cherry-pick -x` (`-m 1` for a merge commit; every commit of a rebase-merged PR, oldest first), push with `KIT_PR_BASE=<base>`, PR titled after the source with `Cherry-pick of #N` in the body and no `Closes`. A digits-only source is a PR number and must be MERGED; anything else is a commit, whose PR number is read from a `(#N)` suffix or `Merge pull request #N`. Re-runnable: a picked commit is not picked twice and an open PR is reported, not re-created. A conflict stops before the push — resolve, `git cherry-pick --continue`, re-run | `--llm` → JSON (`ok`, `url`, `worktree`, `detail`; a refusal is `ok:false` with the reason in `detail`) |
61
72
  | `cckit close <issue> <summary>` | close issue + mark done | `--llm` |
62
- | `cckit effort new "<name>" ["sub :: desc" …]` | parent (4-section body + ctx/kind/priority/role/flow labels) + linted native sub-issues — identical to `/kit-effort-new` (one shared core); `start`/`pr`/`close` take `<slug\|N>` | flags: `--flow/--role/--priority/--goal/--scope/--for-agents/--verification/--depends-on/--milestone`, `--slug` |
73
+ | `cckit task new "<title>"` · `task list [--all]` · `task next` | light tasks: work tracked in the project, with no GitHub issue. `new` writes `tasks/<id>.md` in the current checkout (flags `--priority p0..p3`, `--kind`, `--body`/`--body-file`) and commits nothing. `list` prints each open task's state, derived from git: `draft` (only this checkout) · `todo` (on the base branch) · `shared` (in a `task share` PR that has not merged) · `doing` (a `light/<id>-…` branch exists) · `review` (that branch's copy says done) · `done` / `dropped` (the base branch's copy says so; shown with `--all`). With `plainLanguage.enabled`, `list` adds one line under the table saying what `draft` means there. `next` is the first `todo`/`draft` by priority, then creation date. Records are read through the task source (`tasks.source`, default `file`; `tasks.dir`, default `tasks`). `cckit task default` prints `light` or `issues`: the project's default list (`tasks.default`, `issues` when unset) | `--llm` → `new` one JSON object, `list` a JSON array, `next` one object or `null` |
74
+ | `cckit task start [--force] [--no-push] <id>` (alias `take`) | worktree `.claude/worktrees/light+<id>-<slug>` on branch `light/<id>-<slug>` from `origin/<base>`, bootstrapped like `cckit start`. A draft is committed on the branch and removed from the checkout it was created in; the branch is pushed unless `--no-push`. Re-running reuses the worktree. Refuses a done task, a `shared` task, and a task whose branch is on origin but not local unless `--force`. With no base branch here or on origin it stops and names the fix (`cckit init --yes`, or a `github.baseBranch` that exists). No session claim. `cckit gc` reports the branch `PROTECTED: light task <id> still OPEN` until the task is done on the base branch | `--llm` → JSON (`ok`, `id`, `worktree`, `branch`) |
75
+ | `cckit task finish [<id>] "<summary>" [--all]` (alias `done`) | set `status: done` in the task's file on its branch, commit tracked changes (`--all` adds new files), push, open the PR against the base branch: title a Conventional Commit subject ending in `[<id>]`, no `Closes` line. With `pr.bodyStyle: content` the body carries the content review checklist. An open PR is reported, not re-created. The task is done when the PR merges; the verb never merges. Do not run `cckit pr` in a light worktree | `--llm` → JSON (`ok`, `url`, `detail`) |
76
+ | `cckit task run <id> [--check "<cmd>"] [--max-iters N] [--max-seconds N] [--agent <cmd>] [--no-finish]` | delegate ONE task end to end: `task start` (the worktree is reused when it exists), one `cckit autopilot run` objective built from the task's title and notes, then `task finish --all` with a generated summary, and the review link on stdout. The gate is `--check`, else `tasks.check` in the project config, else none; it runs after the round, and a failing gate opens no PR. The run has no `--until`, so it is one round; `--max-seconds` also bounds that round; `--agent-arg <arg>` (repeatable) is passed to the agent CLI, and cckit adds no permission flag. A stopped earlier run on the task's branch is discarded, never resumed: the task record is the objective. A task already in `review` starts no agent: its open PR is reported, or opening it is retried. `--no-finish` stops after the run and prints `<worktree>\|<branch>\|<id>`. A **page task** is a task whose kind is `page` (`cckit task new --kind page "<title>"`) or any task in a project whose config sets `tasks.design: true`; nothing is inferred from the title or the notes. For one, the objective tells the agent to load the `page-design` skill and to write the design brief and self-review to `docs/design/<id>.md`, the agent is started so its CLI prints events (`claude -p --output-format stream-json --verbose`; Codex prints them already), and the PR body gains a `## Design` section plus the checklist item `Open the page in a browser and compare it with the design brief`. The section lists the skills the run loaded, read from those events and never from the agent's own text: `Design skills loaded in this run: …`, the design skills not loaded, other skills loaded, or `No design skill was loaded in this run.`; a Claude skill call counts only when its result is not an error, so a skill that is not installed is not listed. With no event in a round's output, or no run on record (`task finish` by hand), it says the list is not known. Exit 0 done · 1 the task could not be started · 2 usage, or the run was refused · 3 agent failed · 4 limit · 5 the round changed nothing · 6 gate failed · 7 the PR could not be opened · 130 interrupted; every non-zero exit opens no PR and its last stderr line names the reason. Never merges | `--llm` → JSON (`ok`, `id`, `url`, `detail`) |
77
+ | `cckit task share ["<summary>"]` | one PR from `light/share-<timestamp>` that adds every draft in the current checkout to the base branch; the tasks list as `shared` until it merges. With no new drafts it retries an earlier share of this repository whose push or PR failed (exit 1 on a failed step), and reports an open PR instead of creating one | `--llm` → JSON (`ok`, `url`, `detail`) |
78
+ | `cckit claims` | list the live session claims `cckit start` wrote: issue, session pid, start time, branch, worktree. Read-only — a dead session's claim is hidden here and reaped by the next `cckit start` on that issue | `--llm` → JSON array |
79
+ | `cckit effort new "<name>" ["sub :: desc" …]` | parent (4-section body + ctx/kind/priority/role/flow labels) + linted native sub-issues — identical to `/kit-effort-new` (one shared core); `start`/`pr`/`close` take `<slug\|N>` | flags: `--flow/--role/--kind/--priority/--goal/--scope/--for-agents/--verification/--depends-on/--milestone`, `--slug`. `--kind` is one of `feat fix task chore security scaffold ci adr spike plan` (default `task`) or a content kind `post campaign brand research`; any other value is refused before anything is created. A content kind is a label only: `cckit start` cuts its branch on `task/` (post, brand), `plan/` (campaign) or `spike/` (research), and `cckit pr` titles it `docs:` |
63
80
  | `cckit effort chain <a> <b> [<c> …]` | wire 2+ issues into a linear order: `b` `blocked_by` `a`, `c` `blocked_by` `b`, plus a `- Depends on #<predecessor>` line in each successor's `## Relations` section. These are the edges `cckit plan` layers into waves. Idempotent (an edge or line already there is skipped); pre-existing blockers are kept, never replaced. Validates everything first — fewer than two numbers, a non-numeric arg, an issue that does not exist, a repeated number, or an edge that would close a cycle refuses the whole chain and writes nothing | — |
64
- | `cckit effort start [--force] <slug\|N> [slug]` | effort branch + bootstrapped worktree, **WIP-limited**: refuses a NEW effort once `effort.wipLimit` (default 2) are already in progress. In progress = an `effort/<N>-<slug>` branch exists as a local head **or** on origin, read with `git ls-remote` rather than the cached `refs/remotes` (which is wrong both ways: it misses a branch pushed since the last fetch and keeps one deleted on origin until a prune). At the limit refuses; only strictly under it starts. Re-starting an effort that is already in progress is never gated. The check runs before the fetch/branch/worktree/bootstrap, so a refusal makes no branch, no worktree and no board change — it is not read-free (it queries origin, and a `<slug>` arg was resolved first, which can run `gh issue list`). `0` refuses every ordinary start; `--force` still starts. A non-integer value is ignored with a warning and the default 2 is used; `EFFORT_WIP_LIMIT` overrides the config per invocation. `EFFORT_WIP_REMOTE=0` — or an unreachable origin, which warns and proceeds — counts the cached refs instead. Does **not** gate `cckit start <issue>` | `--force`, or `KIT_FORCE=1` |
65
- | `cckit effort plan` | session-fit effort plan | `--llm` → JSON |
66
- | `cckit orchestrate <a> <b> …` | run N flows in parallel worktrees, in tmux or Herdr | — (use `--dry-run`) |
81
+ | `cckit effort start [--force] <slug\|N> [slug]` | effort branch + bootstrapped worktree, **WIP-limited**: refuses a NEW effort once `effort.wipLimit` (default 2) are already in progress. In progress = an `effort/<N>-<slug>` branch exists as a local head **or** on origin, read with `git ls-remote` rather than the cached `refs/remotes` (which is wrong both ways: it misses a branch pushed since the last fetch and keeps one deleted on origin until a prune). At the limit refuses; only strictly under it starts. Re-starting an effort that is already in progress is never gated. The check runs before the fetch/branch/worktree/bootstrap, so a refusal makes no branch, no worktree and no board change — it is not read-free (it queries origin, and a `<slug>` arg was resolved first, which can run `gh issue list`). `0` refuses every ordinary start; `--force` still starts. A non-integer value is ignored with a warning and the default 2 is used; `EFFORT_WIP_LIMIT` overrides the config per invocation. `EFFORT_WIP_REMOTE=0` — or an unreachable origin, which warns and proceeds — counts the cached refs instead. With no `[slug]`, a failed read of the issue title warns on stderr and the start continues with the effort's existing branch slug, or `effort`. Does **not** gate `cckit start <issue>`. Creating the branch writes the start time to `<git-common-dir>/effort-metrics/<N>.start`, which `cckit effort close` reads for `build_seconds`; a re-start keeps the stamp already there | `--force`, or `KIT_FORCE=1` |
82
+ | `cckit effort pr [<slug\|N>]` | the ONE effort PR, titled as a Conventional Commit subject carrying the effort id: `type(scope): name [#N]` (scope = the `flow:` label, else the title's `[Flow]` tag; type = `--type`, else the `kind:` label, default `feat`). Refuses before any `gh` call when the title lacks `[#N]` or fails `commitlint_check`. `pr.titleStyle: issue-title` gives `[Role] [#N] name` with no commitlint check | flags: `--summary[-file]`, `--for-agents[-file]`, `--title`, `--type` |
83
+ | `cckit effort plan` | session-fit effort plan. Rows come from GitHub (one listing + one `blocked_by` call per effort), or from the executable named by `effort.planSource` (`EFFORT_PLAN_SOURCE` overrides), called as `<source> <owner/repo>` from the project root and printing `number<TAB>flow<TAB>ctx<TAB>title[<TAB>blockers]` rows plus an optional `# age: <text>` line. A source that is not executable, exits non-zero or prints no rows falls back to GitHub. The `source:` line under the header names the source used, its age when reported, and any fallback | `--llm` → JSON |
84
+ | `cckit orchestrate <a> <b> …` | run N flows in parallel worktrees, in tmux or Herdr. cckit owns the worktree per issue, the `blocked_by` gate, the `--cap` and the result: on tmux each pane runs the agent under `scripts/wave-worker.sh`, which records how the process ended | — (use `--dry-run`) |
85
+ | `cckit orchestrate --results [--session=<s>] [--wait <secs>]` | read the wave's collected results: `success` (exit 0), `failure` (exit 1–128), `interrupted` (signal exit, or a `running` record whose pid is gone on the host that wrote it); not finished: `launched`, `running`; `untracked` on Herdr, which owns the agent process. rc 0 all success · 1 any failure/interrupted or no records · 3 none failed, some unfinished. Same for every `--agent` kind | `--llm` → JSON |
67
86
  | `cckit autopilot [<a> …]` | select work, then call `orchestrate --detach` under a cap | — (use `--dry-run`) |
68
- | `cckit gc` | report prunable branches + worktrees — SAFE (own PR merged) and LANDED (no PR of its own, work already on base: effort subs, `worktree-agent-*` isolation worktrees) — never one whose issue is still open; aborts if the protection helper is missing | `--llm` → JSON counts (`safe`, `landed`, `protected`, `orphan`) |
69
- | `cckit cleanup [--yes]` | the guided destructive sweep over that report: plan first, delete only the SAFE + LANDED rows and prune the listed ZOMBIE metadata (staged work recovered to its branch first); ORPHAN / PROTECTED / stashes are never deletable | `--llm` → JSON counts + `applied` |
87
+ | `cckit autopilot run [<issue>] --objective "<text>"` | ONE headless objective on the current branch: `claude -p` or `codex exec`, one round at a time. Code stops it on `--max-iters` (default 5), `--max-seconds` (3600), `--round-seconds` (900), a passing `--until "<cmd>"`, a failing `--check "<cmd>"` gate, or a round that changed neither HEAD nor the tree. An `--until` that already passes before round 1 ends the run with exit 0 and no round, and stderr says that nothing was changed and that `--check` is the flag for a gate. `--max-tokens` is checked between rounds from the runtime's own usage output; a round that prints none stops the run. `--publish --summary "<s>"` opens the PR through `cckit pr` unless the branch already has one. `--record-skills` starts Claude with `--output-format stream-json --verbose` and writes the skills each round loaded to `.skills` in the state file (`loaded`, `complete`, `source`), read from the CLI's events; `complete` is false when a round printed none. `--resume` continues with counters carried over; a round cut short by a signal or a killed runner counts as usage `unknown`, not zero, and a start is refused (exit 2) while the agent an earlier run recorded in `.cckit/autopilot/<branch>.agent.pid` is still alive. Exit 0 done · 2 refused · 3 agent failed · 4 limit · 5 no progress · 6 gate failed · 7 publish failed · 130 interrupted. Refuses the base branch, `--notify`, and an agent other than claude/codex. Never merges | state file `.cckit/autopilot/<branch>.json` (use `--dry-run`) |
88
+ | `cckit gc` | report prunable branches + worktrees — SAFE (own PR merged) and LANDED (no PR of its own, work already on base: effort subs, `worktree-agent-*` isolation worktrees) — never one whose issue is still open; aborts if the protection helper is missing. A branch whose PR or issue state could not be read (a failed `gh` call) is reported UNKNOWN ("could not determine") and kept, never "no PR". A worktree with a detached HEAD gets its own row: LANDED when it is clean and its HEAD is on the base branch or `main`, ORPHAN otherwise | `--llm` → JSON counts (`safe`, `landed`, `protected`, `orphan`, `unknown`) |
89
+ | `cckit cleanup [--yes]` | the guided destructive sweep over that report: plan first, delete only the SAFE + LANDED rows and prune the listed ZOMBIE metadata (staged work recovered to its branch first); ORPHAN / PROTECTED / UNKNOWN / stashes are never deletable. A LANDED detached worktree is removed; an ORPHAN one, and a detached zombie still holding staged work, are kept | `--llm` → JSON counts + `applied` |
90
+ | `cckit page <mode\|open\|poll\|reply\|end\|answer>` | review pages, on by default (`reviewPages.enabled`; off with `cckit add lavish --set enable=no`, or `CCKIT_PAGES=terminal` for one command). `mode` prints `page`, or `terminal: <reason>` when the session has no browser: `CI`, `CCKIT_HEADLESS` (exported by `cckit autopilot run` and the tmux wave worker), a headless Claude Code session (`CLAUDE_CODE_SESSION_ATTENDED=0` or an `sdk*` entrypoint), SSH, no `DISPLAY`/`WAYLAND_DISPLAY` off macOS, no agent session and no TTY, or no `lavish-axi`/`npx` on PATH. `CCKIT_PAGES=page` skips the session checks, never the config switch. `open <html-file> [--fallback <md-file>]` runs `lavish-axi <file>` (`npx -y lavish-axi` without the binary); in terminal mode, or when the tool exits non-zero, it prints the fallback file and exits 0; flags after `--` go to the tool. `poll` / `reply` / `end <html-file> [args…]` pass through to the tool and are no-ops in terminal mode. `answer --kind <plan\|decision\|grill> --title "<t>" [--issue <n>] [--body-file <file\|->]` writes ONE comment on the issue when `github.repo` is set and `--issue` is given, else the file `docs/answers/<date>-<kind>-<slug>.md` (`reviewPages.answersDir`), which the caller commits; `reviewPages.answers: issue\|file` fixes the destination. The same kind, title and body twice writes nothing. Exit 0 · 1 the answer could not be written · 2 usage error. An agent calls `mode` before writing any HTML, and calls `answer` on both paths. A page before `cckit effort start` is recommended; `effort start` checks nothing | `--llm` → JSON (`mode`: `{mode, reason}`; `open`: `{mode, file}`; `answer`: `{ok, where, issue\|file, written}`) |
70
91
  | `cckit render` | stdin markdown → rich (glow on a TTY; verbatim when piped) | — |
71
92
  | `cckit version` | the installed cckit version | `--llm` |
72
93
 
@@ -89,11 +110,15 @@ Every operation an unattended run needs is reachable through the one CLI:
89
110
  | Verb | Purpose |
90
111
  | --- | --- |
91
112
  | `cckit scan` | detect the repo's stack + kit state (emits JSON) |
92
- | `cckit doctor [--fix]` | onboarding preflight (deps, gh auth); asks before installing on a TTY, `--fix` skips the prompt |
93
- | `cckit update` | report whether the project is behind the installed cckit |
94
- | `cckit migrate` | reshuffle an old kit layout to the current one |
95
- | `cckit digest` | summarize recent activity |
96
- | `cckit release <ver>` | cut a release — **dry-run by default**, `--publish` to act |
113
+ | `cckit doctor [--fix]` | onboarding preflight (deps, gh auth); asks before installing on a TTY, `--fix` skips the prompt. With no TTY and no `--fix` it is report-only: no package install, no `pnpm install`, no seeded or refreshed file, no server start. With `tasks.design: true` it prints one `page-design skill` row per selected adapter: a failing row naming `cckit add page-design` when the skill folder is absent. The row of an integration it has just installed names the files the installer wrote besides the one detected (the descriptor's `alsoWrites`; for `impeccable`, `.claude/agents/impeccable-*.md`). Reports the CLI of each selected adapter (`claude`, `codex`) present or absent; `cckit doctor --agents` prints only those rows, makes no network call, and exits 1 when one is absent. With `codex` selected it also reports whether the hooks are registered in `.codex/hooks.json` (a warning when not; whether Codex trusts them is not readable). One row per `integrations/` descriptor that is on — its config key, or a descriptor with `config.default: true` whose key is absent (`lavish`) — installed by the shared runner; a missing default-on tool the project never set a key for is a skip row: not installed, not a failure; an integration installs only after `--fix` or a yes at the prompt (recorded as `install:<id>` in `.cckit/consent`) — a run with no TTY and no `--fix` reports it missing, installs nothing and exits 1. Also prints the resident instruction-file line `cckit status` prints, and warns when it is over the 150k limit |
114
+ | `cckit add [<name>] [--set k=v] [--answers FILE] [--dir DIR]` | no name: list every integration descriptor in `integrations/`, the modules and the kit skills that can be added, exit 0 (`--llm` → one JSON object with `enabled` and `applies` per integration, and `enabled` and `installed` per skill). With an integration: set the one config key its descriptor names, in the config `kit_config_path` resolves — no other key changes, and nothing is installed. For a descriptor that is on by default (`lavish`), `--set enable=no` writes the off value (`reviewPages.enabled: false`) and no rule. The three design skills the `page-design` skill coordinates are integrations too: `impeccable` (`designDirection.provider`), `emil-design-eng` (`designMotion.provider`) and `web-design-guidelines` (`designAudit.provider`); each is detected by its skill file in `.claude/skills/<id>/` or `~/.claude/skills/<id>/`, and installed for Claude Code, into the project, by one `npx` command. A descriptor that lists `rules` (`graft` → `code-retrieval`, `lavish` → `review-pages`) also gets each one copied into `.claude/rules/`; an existing rule file is kept. Declines (exit 0, nothing written) on a repo with no file the integration can work on; exits 1 with no project config or an invalid descriptor. With a module (`software`): write this directory's `.claude/kit.config.json`. With a kit skill (`page-design`, the one that ships an `add.json`): set its config key (`tasks.design: true`) and copy `SKILL.md` and `references/` into the skills folder of each adapter in the config (`.claude/skills/page-design/`, `.agents/skills/page-design/`); it asks nothing, needs no version bump, keeps a copy already there, and a second run changes nothing; exit 1 with no project config. `KIT_DRY_RUN=1` writes nothing, and for an integration prints the install candidates in order plus the wire command. The tools, the consent line and the install order: [Integrations](https://cckit.dev/integrations/) |
115
+ | `cckit update` | report whether the project is behind the installed cckit: `up to date` (exit 0), or `update available · <have> -> <latest>` naming `cckit init --upgrade` (exit 10). Changes nothing |
116
+ | `cckit migrate [--dry-run]` | reshuffle an old kit layout to the current one; `--dry-run` writes nothing |
117
+ | `cckit init --upgrade [--dry-run]` | bring a scaffolded project to the installed version: add missing files, keep existing ones and every path under `upgrade.removed` / `upgrade.renamed`, set `kitVersion` (a bump alone edits that one line of the config). Refuses a dirty tree (exit 1). Prints the files it added or modified as `Changed on disk`, measured by checksum before and after; `--dry-run` runs the same upgrade on a temporary copy and prints the same list as `Would change`, writing nothing. A second run answers `already at <version> -- nothing to upgrade`, exit 0. The path end to end: [Update a project](https://cckit.dev/getting-started/update/) |
118
+ | `cckit digest <path\|url>` | summarize one file or URL with the local model (exit 2 when the local model server is down) |
119
+ | `cckit release <ver>` | cut a release — **dry-run by default**, `--publish` to act. Refuses (exit 1, in a dry run too) when `benchmarks/runs/<ver>.json` has no checkpoint, or its last checkpoint scores lower than the checkpoint recorded before it over the questions both asked; `--skip-bench-check` releases anyway and prints `benchmark check OVERRIDDEN`. The check reads cckit's own `benchmarks/runs/`; `BENCH_DIR` does not move it |
120
+ | `cckit bench checkpoint <X.Y.Z> [--passes N] [--from <run.json>] [--verbs <timings.json>]` | run the documentation benchmark and append the result as a checkpoint of release `<X.Y.Z>` in `benchmarks/runs/<X.Y.Z>.json`; `--passes N` asks every question N times and sums the answers; `--from` records a run already made (`cckit bench run --json` output, one flag per pass). Rewrites the page named by `resultsPage` in `benchmarks/benchmark.config.json`. `cckit bench checkpoints [--json]` lists them; `cckit bench check <X.Y.Z>` is the verdict `cckit release` uses (exit 0 pass · 1 missing or lower · 2 usage or an unreadable run file): the last checkpoint is compared with the one before it over the questions both asked (same set file and id), the line names how many were compared, how many are new and how many were removed, and two checkpoints with no question in common are not compared — the newer one passes as a new baseline. `--verbs` attaches the output of `cckit bench verbs --json` as the checkpoint's `verbs`. A run with an empty answer (the model backend failed) or a `--dry` run is refused, exit 2; `cckit bench page [--out <file>] [--check]` prints or verifies the results page |
121
+ | `cckit bench verbs [--runs N] [--checkout <dir>] [--verb "<verb>"] [--json]` | time the read-only verbs `status`, `sync`, `next`, `plan`, `gc`, `effort plan`, `claims`, `task list`, `qa lanes` from a checkout (default: the current directory, using its `bin/cckit`): each runs N times (default 3) and gets `min_ms`, `median_ms` and `gh_calls`, the median number of times it ran `gh`. The count comes from a `gh` shim in a temp dir, first on PATH of the measured verb only; it logs one line and execs the real `gh` with the same arguments, and is removed on exit. A verb that exits non-zero keeps its exit code in `exit`. No issue, PR, branch, worktree or tracked file changes; `status`, `gc` and `task list` refresh remote-tracking refs and `sync` appends to `kit-events.jsonl`, as they do outside the measurement. Timings taken while other work runs on the machine are not comparable |
97
122
 
98
123
  ### Orchestration flags (`orchestrate` / `autopilot`)
99
124
 
@@ -107,6 +132,35 @@ Every operation an unattended run needs is reachable through the one CLI:
107
132
  | `--force` | launch even if an issue is `blocked_by` an OPEN issue (the gate is on by default) |
108
133
  | `--no-seed` | start the agent without an auto-prompt |
109
134
 
135
+ **Base branch override.** `KIT_BASE_BRANCH` in the environment wins over `github.baseBranch` in the
136
+ config for that invocation: `KIT_BASE_BRANCH=effort/<N>-<slug> cckit orchestrate <sub>` cuts the
137
+ sub's worktree from the effort branch instead of the base. `orchestrate` then prints
138
+ `base '<branch>' comes from KIT_BASE_BRANCH in the environment (the config says '<base>')`. The
139
+ branch must exist on origin (`wt_start` fetches it). Every verb that loads the config reads the same
140
+ variable — `cckit start` cuts from it and `cckit pr` targets it — so set it per command, not with a
141
+ shell-wide `export`. `orchestrate` passes an override on to each agent pane (tmux: `env KIT_BASE_BRANCH=…`
142
+ on the agent's command line; Herdr: `--env`), so `cckit pr` in the pane targets the branch the
143
+ worktree was cut from. The base cckit resolved from a config is not an override in a child process:
144
+ a `cckit` run in another project reads its own config.
145
+
146
+ ### Night mode (no verb: `/kit-autopilot` + two scripts)
147
+
148
+ Night mode has no `cckit` verb. The `kit-autopilot` skill reads the owner's night grant with
149
+ `scripts/night-grant.sh read <parent>` and launches the Workflow script `scripts/night-run.mjs`
150
+ with the args that prints. In a consuming project both live under `${CLAUDE_PLUGIN_ROOT}/scripts/`.
151
+
152
+ | Rule | What the scripts enforce |
153
+ | --- | --- |
154
+ | Who may grant | a `<!-- night-grant -->` comment counts only from an author GitHub reports as `OWNER`, from `github.owner`, or from a login in `night.grantors`; any other author's is ignored |
155
+ | Approval | the grant's `waves` list; no label or body section on the effort is required |
156
+ | Width | `effort.wipLimit` efforts at once (default 2), never more than 4; executors never pass `--force` |
157
+ | Wave order | a wave that did not fully merge ends the run `blocked`; no later wave starts |
158
+ | Final check | the gate on the base branch, even when the grant sets a `stopCommand` |
159
+ | Waivers | each must equal one floor name; `workflows`, `cost`, `secret` and `night.neverWaivable` are never waivable |
160
+
161
+ Config: `night.floors`, `night.neverWaivable`, `night.gate`, `night.grantors`, `night.refuseLabels`
162
+ — see [Night mode](https://cckit.dev/config-and-permissions/#night-mode).
163
+
110
164
  ## The agent loop (reference)
111
165
 
112
166
  1. `cckit sync --llm` → pick an unblocked issue.
@@ -118,9 +172,26 @@ Every operation an unattended run needs is reachable through the one CLI:
118
172
  ## Model endpoint
119
173
 
120
174
  cckit shells out to whatever agent invokes it; it does not embed a model. For verbs that synthesize
121
- text (digests, ingest), the model endpoint is configurable via environment — see the docs site (
175
+ text (digests, ingest), the model endpoint is configurable via environment — see the docs site,
122
176
  [cckit.dev](https://cckit.dev).
123
177
 
178
+ `cckit effort close` appends one record per effort to `<git-common-dir>/effort-metrics/records.jsonl`.
179
+ `build_seconds` is close time minus the stamp `cckit effort start` wrote when it created the branch
180
+ (`build_source: "effort-start"`), or, with no stamp, minus the author time of the oldest commit on
181
+ the effort branch (`"first-commit"`). `tokens_real` comes from Claude transcripts of the sessions in
182
+ `<git-common-dir>/kit-usage.jsonl` when a project keeps that log (`tokens_source: "transcripts"`;
183
+ cckit ships no writer for it), else from the `cckit autopilot run` state files of the effort branch
184
+ and its `sub/<N><letter>` branches (`"autopilot-run"`, headless rounds only). With neither it is
185
+ `null` and `tokens_null_reason` is `no-usage-source`, `no-session-matched` or
186
+ `autopilot-usage-unknown`. No figure is estimated. The field table is in the README under *The
187
+ effort metrics record*.
188
+
189
+ The effort-close judge reads an OpenAI-compatible endpoint from `CCKIT_MODEL_URL` (base URL; it
190
+ POSTs to `<value>/chat/completions`), `CCKIT_MODEL` (model name) and `CCKIT_MODEL_TOKEN` (bearer
191
+ token). A project with its own variables names them in the config instead — `model.urlEnv`,
192
+ `model.modelEnv`, `model.tokenEnv` hold env var **names**, never values. See
193
+ [Model endpoint for the effort judge](https://cckit.dev/config-and-permissions/#model-endpoint-for-the-effort-judge).
194
+
124
195
  **Agent profiles** (`agents.profiles` in the config) carry a spend `tier`, a permission policy and
125
196
  extra CLI argv. **cckit never names a model** — you spell your own flags in `args`, and the
126
197
  cheapest-tier profile runs when `agents.default` is unset, so the inexpensive path is the default
@@ -130,6 +201,83 @@ Validation refuses an undeclared profile, a missing `kind`, an unknown stage, or
130
201
  `agents.default` **before** a worktree or pane exists. See
131
202
  [Agent profiles](https://cckit.dev/config-and-permissions/#agent-profiles).
132
203
 
204
+ ## Editing the docs site
205
+
206
+ `docs-site/` (Astro + Starlight) has two tracks. A page under `src/content/docs/marketing/` is
207
+ Marketing; every other page is Software. The track sets the sidebar, the marker colour and the
208
+ current entry of the top-bar switch (`docs-site/src/lib/tracks.ts`, `docs-site/src/routeData.ts`).
209
+
210
+ - **Software pages live under their area.** The areas, in sidebar order: `getting-started/`,
211
+ `project-management/`, `design/`, `development/`, `review/`, `ship/`, then the optional
212
+ `memory/`. `software.mdx`
213
+ is the track's entry page and `philosophy/` holds the team page beside `philosophy.mdx`.
214
+ Reference pages (`cli-reference`, `config-and-permissions`, `integrations`, `skills`, `rules`,
215
+ `hooks`, …) stay at the root so links to their anchors keep working. Inside an area the order is:
216
+ why it exists, who does it, which tools plug in, the verbs, the guides. There is no separate
217
+ tutorials section: a step-by-step page is a guide in its area.
218
+ - **The look lives in one file.** `docs-site/src/styles/theme.css` holds the palette (the Apple System
219
+ Colors terminal scheme, dark and light), the type scale and the measured contrast ratios. Both
220
+ tracks share one action colour; a track differs by its marker colour, `--cckit-track`. The
221
+ typeface is Geist and Geist Mono, self-hosted through `@fontsource-variable/geist` and
222
+ `@fontsource-variable/geist-mono`. A page opens dark when the reader has stored no choice
223
+ (`docs-site/src/components/ThemeProvider.astro`).
224
+ - **The header never moves.** `docs-site/src/components/Header.astro` is a three-column grid: the
225
+ wordmark, the search centred on the page, then the right group. Items that exist on one track
226
+ only (version, GitHub icon, language picker) come before the theme picker, and the Software /
227
+ Marketing switch is last, at the right edge. Search controls take their surface and edge from
228
+ `--cckit-field-bg` and `--cckit-field-border`, which hold 3:1 against the page in both themes.
229
+ - **The guide header is two stacked blocks** (`docs-site/src/components/TutorialMeta.astro`): the
230
+ "Copy the prompt" banner, then "Before you start". Keep each to one line of text per item.
231
+ - **The sidebar is curated.** `sidebar` in `docs-site/astro.config.mjs` lists 43 Software pages:
232
+ one "Start here" link, eight area groups and a Reference group, every group collapsed except the
233
+ one holding the current page. The Marketing list is 15 pages in six groups (How it works, Get set up,
234
+ Make a piece, Review and approve, Plan, Look things up) after a "Start here" link, nested in the
235
+ `Marketing` entry; `src/routeData.ts` unwraps it and opens every group. Each Marketing page ends
236
+ with a `Next:` link to the following sidebar entry; move a page and its neighbours' links move
237
+ with it, in both languages. The sidebar group icons in
238
+ `theme.css` apply to Software only. The site has 87 English pages (72 Software, 15 Marketing). A new
239
+ Software page is not added to the sidebar by default: link a guide from its area's
240
+ `more-guides.mdx` (`development/`, `review/`) and a reference page from `reference.mdx`.
241
+ - **A guide step leads with a conversation window.** `<Chat>` (`docs-site/src/components/Chat.astro`)
242
+ shows what a person says in the agent's chat, the command it runs (`ran`, Software only), the
243
+ real output and the agent's reply, on one running example, the "Bakery site". `<Outcomes>`
244
+ (`Outcomes.astro`) is the collapsed block under it for outcome tables and exit codes. The prose
245
+ says "your agent" on Software pages and "your assistant" (Spanish "tu asistente") on Marketing
246
+ pages, and "in the chat" for the place; it names Claude Code or Codex only where a step is true
247
+ for that product alone. Truth rule: `ran` is a real command with real flags, with no literal
248
+ issue or task number; `output` is real (a Bakery run, a read-only verb run there, or a string a
249
+ test in `scripts/` asserts), trimmed only with a line `…` and `<project>` for a path, and is
250
+ omitted when none of those exists; the reply claims nothing the command did not do. A Marketing
251
+ window carries no `ran` and no `output` (the build fails if it does). Reference pages stay
252
+ command-first. Authoring notes: `docs-site/src/components/README-chat.md`.
253
+ - **A Marketing page has a Spanish twin** with the same file name under
254
+ `src/content/docs/es/marketing/`. Change both in one commit. Links from a Spanish page into a
255
+ Software page say the target is in English.
256
+ - **Marketing pages use plain words.** `astro build` fails when a page under `marketing/` or
257
+ `es/marketing/` says "worktree", "branch" or "PR"; `words-you-will-hear.mdx` is the one
258
+ exemption (`docs-site/src/integrations/marketing-words.mjs`, tested by
259
+ `scripts/docs-marketing-words-test.sh`).
260
+ - **A wide table renders as record cards.** Write a Markdown table as usual. One with three or
261
+ more columns and a cell over 60 characters becomes a list of cards: the first cell is the
262
+ heading, every other cell a labelled line (a leading `#` index column is folded into the
263
+ heading). Smaller tables stay tables. To keep a grid, wrap the table in
264
+ `<div data-table="grid">` (`docs-site/src/lib/rehype-record-tables.mjs`, tested by
265
+ `scripts/docs-record-tables-test.sh`).
266
+ - **The header is one component.** `docs-site/src/components/Header.astro` lays out the top bar:
267
+ wordmark, centred search, then the Software / Marketing switch (`TrackSwitch.astro`), version text
268
+ and GitHub icon (Software only, `SocialIcons.astro`), theme picker, language picker (Marketing
269
+ only). The switch lives there, not in `SiteTitle` (no override of that remains). On a phone the
270
+ switch, the search icon and the menu button share one row.
271
+ - **`SearchStart.astro` is the search entry** on the home page and on `software.mdx`,
272
+ `marketing/index.mdx` and `es/marketing/index.mdx`. Its chips are defined in that file, one list
273
+ per track and language; every chip is a real link, and a script upgrades the click to open search
274
+ with the chip's text. Check each chip's target exists when you edit the lists.
275
+ - **`tutorial.prerequisites` are full sentences.** An item is a string or `{ text, link, href }`
276
+ (`link` is the words inside `text` that become the link; backticks make inline code), rendered as
277
+ the checklist in `TutorialMeta.astro`.
278
+ - **No page URL changes without a redirect** in `redirects` in `docs-site/astro.config.mjs`, and
279
+ the `expect` paths in `benchmarks/*.jsonl` follow a moved file in the same commit.
280
+
133
281
  ## Paste-ready agent prompt
134
282
 
135
283
  Drop this verbatim into your agent's system prompt (or the first message of a session) to make it