@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.
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +169 -21
- package/README.md +491 -35
- package/SECURITY.md +5 -0
- package/bin/cckit +182 -17
- package/cckit.config.json +1 -1
- package/commands/kit-doctor.md +13 -5
- package/commands/kit-export-project.md +0 -2
- package/commands/kit-export-training.md +6 -9
- package/commands/kit-init.md +43 -13
- package/commands/kit-routines.md +1 -1
- package/commands/kit-update.md +11 -6
- package/databases/supabase/guide.html +106 -0
- package/databases/supabase/nextjs/lib/supabase/client.ts +9 -0
- package/databases/supabase/nextjs/lib/supabase/server.ts +29 -0
- package/databases/supabase.json +70 -0
- package/integrations/emil-design-eng.json +41 -0
- package/integrations/graft.json +81 -0
- package/integrations/impeccable.json +42 -0
- package/integrations/integration.schema.json +215 -0
- package/integrations/lavish.json +43 -0
- package/integrations/mempalace.json +28 -0
- package/integrations/mlx-lm.json +32 -0
- package/integrations/web-design-guidelines.json +42 -0
- package/kit.config.schema.json +183 -5
- package/package.json +4 -1
- package/profiles/automation.json +7 -1
- package/profiles/content.json +10 -2
- package/profiles/marketing.json +57 -0
- package/profiles/minimal.json +7 -1
- package/profiles/research.json +7 -1
- package/profiles/software.json +7 -1
- package/recipes/nextjs-shadcn.json +49 -0
- package/scripts/agent-skills-external.txt +45 -0
- package/scripts/agent-skills-lint-test.sh +131 -0
- package/scripts/agent-skills-lint.sh +115 -0
- package/scripts/agent-template-lint-test.sh +42 -0
- package/scripts/agent-template-lint.sh +58 -0
- package/scripts/annotate-setup.sh +1 -1
- package/scripts/autopilot-run-test.sh +338 -0
- package/scripts/autopilot-run.sh +448 -0
- package/scripts/autopilot-test.sh +8 -0
- package/scripts/autopilot.sh +10 -1
- package/scripts/benchmark/benchmark-test.sh +85 -0
- package/scripts/benchmark/checkpoint-test.sh +314 -0
- package/scripts/benchmark/checkpoint.sh +408 -0
- package/scripts/benchmark/lib/model.sh +31 -6
- package/scripts/benchmark/report.sh +17 -2
- package/scripts/benchmark/run-quality.sh +36 -10
- package/scripts/benchmark/verb-timings-test.sh +124 -0
- package/scripts/benchmark/verb-timings.sh +149 -0
- package/scripts/check.sh +29 -19
- package/scripts/content-skills-test.sh +144 -0
- package/scripts/copilot-loop-test.sh +25 -0
- package/scripts/database-supabase-test.sh +121 -0
- package/scripts/docs-marketing-words-test.sh +73 -0
- package/scripts/docs-record-tables-test.sh +72 -0
- package/scripts/hook-adapter-test.sh +193 -0
- package/scripts/init-content-test.sh +225 -0
- package/scripts/init-guided-test.sh +474 -0
- package/scripts/init-recipes-test.sh +104 -0
- package/scripts/init-upgrade-test.sh +341 -2
- package/scripts/init.sh +746 -95
- package/scripts/instruction-budget-baseline.txt +8 -0
- package/scripts/instruction-budget-lint-test.sh +166 -0
- package/scripts/instruction-budget-lint.sh +219 -0
- package/scripts/integrations-check-test.sh +200 -0
- package/scripts/integrations-check.sh +157 -0
- package/scripts/kit-add-test.sh +214 -0
- package/scripts/kit-add.sh +305 -5
- package/scripts/kit-adopt-test.sh +16 -0
- package/scripts/kit-adopt.sh +3 -2
- package/scripts/kit-digest.sh +2 -2
- package/scripts/kit-doctor-test.sh +293 -0
- package/scripts/kit-doctor.sh +272 -140
- package/scripts/kit-export-project-test.sh +3 -3
- package/scripts/kit-remove-test.sh +19 -0
- package/scripts/kit-routines.sh +2 -2
- package/scripts/kit-self-update.sh +1 -1
- package/scripts/kit-version-check-test.sh +4 -0
- package/scripts/kit-version-check.sh +4 -2
- package/scripts/knowledge-lint.sh +4 -4
- package/scripts/leak-fence-test.sh +89 -0
- package/scripts/lib/adapter-select-test.sh +136 -0
- package/scripts/lib/adapter-select.sh +158 -0
- package/scripts/lib/agent-def-test.sh +69 -0
- package/scripts/lib/agent-def.sh +106 -0
- package/scripts/lib/agent-launch-test.sh +212 -0
- package/scripts/lib/agent-launch.sh +335 -0
- package/scripts/lib/board-view-test.sh +11 -0
- package/scripts/lib/board-view.sh +42 -26
- package/scripts/lib/branch-owner-test.sh +26 -0
- package/scripts/lib/branch-owner.sh +16 -9
- package/scripts/lib/captain-test.sh +105 -0
- package/scripts/lib/captain.sh +87 -8
- package/scripts/lib/codex-hooks-test.sh +100 -0
- package/scripts/lib/codex-hooks.sh +69 -0
- package/scripts/lib/commitlint.sh +1 -1
- package/scripts/lib/content-kinds-gc-test.sh +88 -0
- package/scripts/lib/copilot-test.sh +70 -4
- package/scripts/lib/copilot.sh +66 -14
- package/scripts/lib/effort-dispatch-test.sh +3 -3
- package/scripts/lib/effort-metrics-test.sh +178 -1
- package/scripts/lib/effort-metrics.sh +175 -35
- package/scripts/lib/effort-ops-test.sh +205 -7
- package/scripts/lib/effort-ops.sh +198 -43
- package/scripts/lib/effort-parity-test.sh +49 -13
- package/scripts/lib/effort-plan-test.sh +337 -0
- package/scripts/lib/effort-plan.sh +200 -23
- package/scripts/lib/effort.sh +56 -11
- package/scripts/lib/errors-header-test.sh +1 -1
- package/scripts/lib/gh-project-test.sh +35 -1
- package/scripts/lib/gh-project.sh +23 -16
- package/scripts/lib/gh-rest-test.sh +32 -3
- package/scripts/lib/gh-rest.sh +17 -2
- package/scripts/lib/hook-refresh.sh +1 -1
- package/scripts/lib/init-github.sh +412 -0
- package/scripts/lib/init-guide.sh +630 -0
- package/scripts/lib/integration-install-test.sh +343 -0
- package/scripts/lib/integration-install.sh +257 -0
- package/scripts/lib/integrations-test.sh +366 -0
- package/scripts/lib/integrations.sh +244 -0
- package/scripts/lib/kinds-test.sh +125 -0
- package/scripts/lib/kinds.sh +66 -0
- package/scripts/lib/kit-brief-test.sh +22 -3
- package/scripts/lib/kit-brief.sh +45 -5
- package/scripts/lib/kit-config-resolve.sh +2 -2
- package/scripts/lib/kit-config-test.sh +64 -1
- package/scripts/lib/kit-config.sh +37 -1
- package/scripts/lib/kit-events.sh +7 -0
- package/scripts/lib/kit-gc-test.sh +173 -1
- package/scripts/lib/kit-gc.sh +226 -37
- package/scripts/lib/kit-hotfix.sh +216 -0
- package/scripts/lib/kit-interview-test.sh +93 -0
- package/scripts/lib/kit-interview.sh +117 -8
- package/scripts/lib/kit-lib-test.sh +1 -1
- package/scripts/lib/kit-lib.sh +3 -3
- package/scripts/lib/kit-local.sh +2 -2
- package/scripts/lib/kit-manifest.sh +33 -1
- package/scripts/lib/kit-profile-test.sh +3 -3
- package/scripts/lib/kit-status-test.sh +112 -4
- package/scripts/lib/kit-status.sh +246 -16
- package/scripts/lib/kit-task-ops-test.sh +37 -0
- package/scripts/lib/kit-task-ops.sh +175 -31
- package/scripts/lib/kto-hotfix-test.sh +232 -0
- package/scripts/lib/kto-task-close-test.sh +1 -1
- package/scripts/lib/kto-task-new-test.sh +95 -0
- package/scripts/lib/kto-task-pr-merge-test.sh +37 -3
- package/scripts/lib/kto-task-pr-test.sh +70 -0
- package/scripts/lib/leak-fence.sh +89 -0
- package/scripts/lib/light-task-run-test.sh +255 -0
- package/scripts/lib/light-task-test.sh +309 -0
- package/scripts/lib/light-task.sh +706 -0
- package/scripts/lib/next-test.sh +99 -0
- package/scripts/lib/next.sh +9 -3
- package/scripts/lib/orchestration-runtime-test.sh +72 -0
- package/scripts/lib/orchestration-runtime.sh +57 -5
- package/scripts/lib/plan-machine-test.sh +15 -2
- package/scripts/lib/plan-machine.sh +20 -7
- package/scripts/lib/plan-next-test.sh +1 -1
- package/scripts/lib/plan-next.sh +4 -4
- package/scripts/lib/pr-evidence-test.sh +3 -3
- package/scripts/lib/pr-evidence.sh +1 -1
- package/scripts/lib/qa-lane-test.sh +626 -0
- package/scripts/lib/qa-lane.sh +1357 -0
- package/scripts/lib/qa-lanes-test.sh +175 -0
- package/scripts/lib/react-detect.sh +1 -1
- package/scripts/lib/render-test.sh +1 -1
- package/scripts/lib/review-page-test.sh +318 -0
- package/scripts/lib/review-page.sh +369 -0
- package/scripts/lib/review-stage-test.sh +62 -11
- package/scripts/lib/review-stage.sh +42 -60
- package/scripts/lib/role-identity-test.sh +65 -0
- package/scripts/lib/role-identity.sh +25 -2
- package/scripts/lib/secret-guard.sh +3 -3
- package/scripts/lib/session-registry-test.sh +111 -0
- package/scripts/lib/session-registry.sh +233 -0
- package/scripts/lib/stage-receipt-test.sh +14 -1
- package/scripts/lib/stage-receipt.sh +13 -8
- package/scripts/lib/task-source-file.sh +309 -0
- package/scripts/lib/task-source.sh +130 -0
- package/scripts/lib/upgrade-report-test.sh +120 -0
- package/scripts/lib/upgrade-report.sh +138 -0
- package/scripts/lib/version-bump.sh +3 -3
- package/scripts/lib/wave-result-test.sh +80 -0
- package/scripts/lib/wave-result.sh +127 -0
- package/scripts/lib/worker-brief-test.sh +5 -0
- package/scripts/lib/worker-brief.sh +2 -2
- package/scripts/lib/worktree-issue-test.sh +30 -1
- package/scripts/lib/worktree-issue.sh +82 -12
- package/scripts/lib/worktree-ports-test.sh +57 -4
- package/scripts/lib/worktree-start-test.sh +197 -0
- package/scripts/lib/worktree-start.sh +153 -31
- package/scripts/lib/zsh-safety-test.sh +19 -3
- package/scripts/marketing-walkthrough-test.sh +152 -0
- package/scripts/night-grant-test.sh +37 -0
- package/scripts/night-grant.sh +448 -0
- package/scripts/night-run-test.sh +8 -0
- package/scripts/night-run.mjs +275 -0
- package/scripts/night-run.test.mjs +324 -0
- package/scripts/orchestrate-test.sh +190 -0
- package/scripts/orchestrate.sh +79 -8
- package/scripts/portable-test.sh +11 -2
- package/scripts/publish.sh +28 -3
- package/scripts/review-lint-test.sh +7 -7
- package/scripts/review-lint.sh +2 -2
- package/scripts/review-rules.conf +8 -0
- package/scripts/rule-recipes-test.sh +96 -0
- package/scripts/self-install-test.sh +39 -9
- package/scripts/setup-labels.sh +18 -1
- package/scripts/setup-milestones.sh +1 -1
- package/scripts/showcase.sh +1 -1
- package/scripts/skill-frontmatter-lint-test.sh +4 -4
- package/scripts/skill-frontmatter-lint.sh +1 -1
- package/scripts/status-test.sh +113 -2
- package/scripts/status.sh +16 -3
- package/scripts/task-sync-test.sh +154 -0
- package/scripts/task-sync.sh +243 -32
- package/scripts/test-runner-test.sh +158 -0
- package/scripts/test.sh +131 -23
- package/scripts/update-path-test.sh +279 -0
- package/scripts/ux-ds-audit.sh +1 -1
- package/scripts/ux-graph-scan.sh +6 -6
- package/scripts/wave-worker.sh +54 -0
- package/skills/kit-add/SKILL.md +77 -0
- package/skills/kit-autopilot/SKILL.md +123 -12
- package/skills/kit-cleanup/SKILL.md +5 -2
- package/skills/kit-contribute/SKILL.md +4 -4
- package/skills/kit-docs-writer/SKILL.md +16 -6
- package/skills/kit-effort-close/SKILL.md +17 -8
- package/skills/kit-effort-new/SKILL.md +15 -9
- package/skills/kit-effort-pr/SKILL.md +15 -7
- package/skills/kit-effort-start/SKILL.md +5 -2
- package/skills/kit-gc/SKILL.md +5 -2
- package/skills/kit-next/SKILL.md +5 -1
- package/skills/kit-onboard/SKILL.md +3 -3
- package/skills/kit-page/SKILL.md +93 -0
- package/skills/kit-plan-next/SKILL.md +8 -4
- package/skills/kit-security-sweep/SKILL.md +1 -3
- package/skills/kit-ship/SKILL.md +2 -3
- package/skills/kit-status/SKILL.md +35 -4
- package/skills/kit-task-new/SKILL.md +3 -3
- package/skills/kit-task-pr/SKILL.md +7 -2
- package/skills/kit-task-pr-merge/SKILL.md +7 -2
- package/skills/kit-task-start/SKILL.md +7 -7
- package/skills/kit-task-sync/SKILL.md +19 -3
- package/skills/kit-ux-audit/SKILL.md +3 -2
- package/templates/agents/auto-dev.md +5 -4
- package/templates/agents/backend.md +1 -1
- package/templates/agents/designer.md +2 -0
- package/templates/agents/devops.md +1 -1
- package/templates/agents/editor.md +9 -1
- package/templates/agents/frontend.md +1 -1
- package/templates/agents/local-delegate.md +1 -1
- package/templates/agents/pm.md +5 -5
- package/templates/agents/tech-lead.md +1 -1
- package/templates/benchmarks/SCHEMA.md +9 -3
- package/templates/codex/hooks.json.tmpl +89 -0
- package/templates/hooks/guard-base-branch-commit.sh.tmpl +13 -7
- package/templates/hooks/guard-raw-git-ops.sh.tmpl +12 -12
- package/templates/hooks/mempal_followup.sh.tmpl +2 -2
- package/templates/hooks/mempal_session_start.sh.tmpl +1 -1
- package/templates/hooks/prepush_gate.sh.tmpl +4 -2
- package/templates/hooks/repo-hygiene.sh.tmpl +3 -2
- package/templates/instructions.md.tmpl +174 -0
- package/templates/kit.config.json.tmpl +3 -3
- package/templates/knowledge-INDEX.md.tmpl +1 -1
- package/templates/lib/kit-sigil.sh.tmpl +1 -1
- package/templates/rules/authoring.md +106 -0
- package/templates/rules/branch-naming.md +40 -4
- package/templates/rules/code-retrieval.md +63 -0
- package/templates/rules/delegation-brief.md +0 -3
- package/templates/rules/design-routing.md +3 -3
- package/templates/rules/effort-model.md +14 -10
- package/templates/rules/gate-and-review.md +94 -0
- package/templates/rules/issue-lifecycle.md +88 -0
- package/templates/rules/knowledge-base.md +1 -1
- package/templates/rules/mempalace.md +1 -1
- package/templates/rules/merge-safety.md +108 -0
- package/templates/rules/naming-and-ids.md +23 -17
- package/templates/rules/plain-language.md +59 -0
- package/templates/rules/plan-next.md +9 -11
- package/templates/rules/react-annotate.md +6 -0
- package/templates/rules/review-pages.md +49 -0
- package/templates/rules/risk-tiered-review.md +13 -4
- package/templates/rules/shared-checkout.md +106 -0
- package/templates/rules/skill-gaps.md +2 -7
- package/templates/rules/task-management.md +13 -1
- package/templates/skills/brand-voice/SKILL.md +91 -0
- package/templates/skills/brand-voice/references/voice-template.md +61 -0
- package/templates/skills/campaign/SKILL.md +123 -0
- package/templates/skills/campaign/references/plan-template.md +55 -0
- package/templates/skills/concrete/SKILL.md +2 -2
- package/templates/skills/copywriting/SKILL.md +8 -1
- package/templates/skills/feature-build-refine/SKILL.md +2 -4
- package/templates/skills/morning-briefing/SKILL.md +2 -2
- package/templates/skills/page-design/SKILL.md +145 -0
- package/templates/skills/page-design/add.json +5 -0
- package/templates/skills/page-design/references/design-file-template.md +40 -0
- package/templates/skills/page-design/references/generic-page-patterns.md +43 -0
- package/templates/skills/page-design/references/minimum-rules.md +42 -0
- package/templates/skills/speckit/SKILL.md +4 -5
- package/templates/skills/supabase-patterns/SKILL.md +1 -1
- package/commands/kit-add.md +0 -42
- package/templates/CLAUDE.md.tmpl +0 -106
|
@@ -8,14 +8,26 @@ when_to_use: When delegating work to run unattended — a single capped objectiv
|
|
|
8
8
|
|
|
9
9
|
## Current implementation limit
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
`cckit autopilot [<issue> …]` launches issue flows through `orchestrate.sh`. It accepts issue
|
|
12
|
+
numbers, `--cap`, `--agent`, `--dry-run`, `--no-seed`, `--force`, and `--session`.
|
|
13
|
+
|
|
14
|
+
`cckit autopilot run [<issue>] --objective "<text>"` runs ONE objective headlessly on the current
|
|
15
|
+
branch (`claude -p` or `codex exec`) and enforces these in code: `--max-iters`, `--max-seconds`,
|
|
16
|
+
`--round-seconds`, `--until "<cmd>"`, `--check "<cmd>"`, and a stop on a round that changed
|
|
17
|
+
nothing. `--max-tokens` is checked between rounds only, from the usage the runtime prints, and a
|
|
18
|
+
round that prints none stops the run. `--notify` and `--plan` are refused: nothing implements them.
|
|
19
|
+
A run never merges. The stop reason and the resume command are in `.cckit/autopilot/<branch>.json`;
|
|
20
|
+
`cckit autopilot run --resume` continues with the counters carried over.
|
|
21
|
+
|
|
22
|
+
The `/kit-autopilot "<objective>"` examples below that pass `--plan` or `--notify` are workflow
|
|
23
|
+
requirements, not working commands. If a requested limit is not in the enforced list above, report
|
|
24
|
+
it as unsupported and do not start that bounded run. A prompt asking an agent to stay under a
|
|
25
|
+
token budget does not enforce that budget. The full table, including what no live run has
|
|
26
|
+
confirmed, is in the docs site's agent-compatibility page under "Unattended run limits".
|
|
27
|
+
|
|
28
|
+
**Exception — night mode.** The Workflow runtime does enforce a token budget, so an approved plan
|
|
29
|
+
can run unattended through `${CLAUDE_PLUGIN_ROOT}/scripts/night-run.mjs` (see _Mode: night_ below). The CLI still
|
|
30
|
+
refuses `--plan` and `--notify`.
|
|
19
31
|
|
|
20
32
|
One skill, two modes — both delegate work that runs **autonomously to a verifiable stop, under hard
|
|
21
33
|
caps**. It is a **thin wrapper**: it composes the built-in `/loop` and the kit's `orchestrate`
|
|
@@ -39,7 +51,6 @@ back to the human to confirm a planned step.** "Do these efforts with the new fl
|
|
|
39
51
|
build a wave → merge its PRs → close subs+parent → gc → launch the next wave — **without asking
|
|
40
52
|
"merge or review?"**. A planned merge is _execution_, not a new decision (the canonical "Error 1" incident: stalling an approved plan to ask for a routine merge).
|
|
41
53
|
|
|
42
|
-
- The human steers the **plan**, not each merge. Asking to confirm a routine planned merge is the error.
|
|
43
54
|
- A `risk:med` change the plan already approved (a product feature in the agreed scope) is **not** a
|
|
44
55
|
reason to stop — the plan blessed it. The risk-tiered review tiers
|
|
45
56
|
(`risk-tiered-review.md`) govern **ad-hoc** PRs, **not** execution of an approved plan.
|
|
@@ -60,7 +71,7 @@ Interrupt only when the plan genuinely can't proceed without a human:
|
|
|
60
71
|
- a **real ambiguity the plan doesn't cover** (a fork the approved scope is silent on);
|
|
61
72
|
- a **destructive/irreversible step outside the plan**.
|
|
62
73
|
|
|
63
|
-
Everything else: decide, land it, report on completion.
|
|
74
|
+
Everything else: decide, land it, report on completion.
|
|
64
75
|
|
|
65
76
|
## The contract (hard — both modes)
|
|
66
77
|
|
|
@@ -71,6 +82,9 @@ Everything else: decide, land it, report on completion. Quiet by default, loud o
|
|
|
71
82
|
(squash), closes subs+parent, and gc's — then advances any effort that was `blocked_by` it.
|
|
72
83
|
- **Objective mode never auto-merges its own run.** A single capped objective lands commits on its
|
|
73
84
|
branch; the merge is the captain's/human's call under the plan, not the loop's.
|
|
85
|
+
- **No review pages.** An unattended run has no reader. `cckit page mode` answers `terminal` there
|
|
86
|
+
(`cckit autopilot run` and the tmux wave worker export `CCKIT_HEADLESS=1`; a night executor is
|
|
87
|
+
told to set it), and `cckit page open` prints instead and exits 0. Never set `CCKIT_PAGES=page`.
|
|
74
88
|
- **Never free-spawn (plan mode).** The parallel set comes from `kit effort plan`, never improvised;
|
|
75
89
|
co-launch only **file-disjoint** efforts (sequence the rest).
|
|
76
90
|
|
|
@@ -98,15 +112,112 @@ kit autopilot --plan # read the plan and launch the planned set
|
|
|
98
112
|
```
|
|
99
113
|
|
|
100
114
|
1. **Read the plan** — `kit effort plan` groups open efforts by `flow:`, orders each flow by its
|
|
101
|
-
`blocked_by` edges, sizes each by `ctx
|
|
115
|
+
`blocked_by` edges, and sizes each by `ctx:*`. That
|
|
102
116
|
output IS the launch plan — the set, the order, and the budget are read from it, not chosen.
|
|
103
117
|
2. **Launch** — `orchestrate.sh <issueA> <issueB> ...` (one worktree per effort, file-disjoint;
|
|
104
|
-
respect `
|
|
118
|
+
respect `blocked_by` so blocked efforts wait). Use `--notify`.
|
|
105
119
|
3. **Babysit** — `orchestrate-watch.sh` (launched by `--notify`) signals PR open / conflict / failing
|
|
106
120
|
checks / merged, and GCs each worktree + branch on merge.
|
|
107
121
|
4. **Decide + advance** — as each wave's gates go green, **merge it** (established-plan autonomy
|
|
108
122
|
above) and advance any effort that was `blocked_by` it. Surface to the human only a genuine blocker.
|
|
109
123
|
|
|
124
|
+
## Mode: night (an approved plan, unattended, through a Workflow)
|
|
125
|
+
|
|
126
|
+
The one mode whose caps a runtime enforces. `${CLAUDE_PLUGIN_ROOT}/scripts/night-run.mjs` is a
|
|
127
|
+
Workflow script: the Workflow runtime throws once the `+N` budget is spent, and the script holds the
|
|
128
|
+
rest of the caps in code. Both night scripts ship in the plugin, so every path below starts at
|
|
129
|
+
`${CLAUDE_PLUGIN_ROOT}` — a consuming project has no copy of them in its own checkout.
|
|
130
|
+
|
|
131
|
+
**Before the owner leaves** — the owner posts the night grant: ONE comment on the plan parent
|
|
132
|
+
issue. **The grant is the approval**: an effort runs tonight because the owner named its number in
|
|
133
|
+
`waves`. Nothing else marks an effort approved — no label, no body section.
|
|
134
|
+
|
|
135
|
+
**Only the owner's grant counts.** A grant sets the budget, the waivers and a shell `stopCommand`,
|
|
136
|
+
so `night-grant.sh read` keeps a marker comment only when GitHub reports its `author_association`
|
|
137
|
+
as `OWNER`, or its author is `github.owner` or a login in `night.grantors` (kit config). The latest
|
|
138
|
+
of those wins. A marker comment from anyone else is ignored and its author is named on stderr; when
|
|
139
|
+
no owner grant exists the read exits 1 and nothing launches. On an organization repo no commenter
|
|
140
|
+
is `OWNER` and `github.owner` is the org, so list the people who may grant in `night.grantors`.
|
|
141
|
+
|
|
142
|
+
````markdown
|
|
143
|
+
<!-- night-grant -->
|
|
144
|
+
Tonight: run the two approved waves. I accept the lockfile floor.
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{ "budget": "+2000k", "waves": [[12], [15]], "waivers": ["lockfile"], "stopCommand": null }
|
|
148
|
+
```
|
|
149
|
+
````
|
|
150
|
+
|
|
151
|
+
**Launch** — from anywhere inside the project (the kit config is found by `kit_config_path`:
|
|
152
|
+
`$KIT_CONFIG`, else a walk up from the current directory):
|
|
153
|
+
|
|
154
|
+
1. `bash "${CLAUDE_PLUGIN_ROOT}/scripts/night-grant.sh" preflight` — exit 1 names the allowlist
|
|
155
|
+
entries an unattended run lacks in the tracked `.claude/settings.json` (merge, push, issue
|
|
156
|
+
comment/edit/close, `gh api`). Stop and tell the owner; it never edits the file.
|
|
157
|
+
2. `bash "${CLAUDE_PLUGIN_ROOT}/scripts/night-grant.sh" read <parent>` — prints the engine args
|
|
158
|
+
(line 1) and `budget=+N` (line 2), or refuses: no grant by the owner, a malformed grant, a
|
|
159
|
+
waiver that is not exactly one floor name, a never-waivable waiver, or a WIP limit of 0.
|
|
160
|
+
3. Launch the Workflow script `${CLAUDE_PLUGIN_ROOT}/scripts/night-run.mjs` with line 1 as `args`
|
|
161
|
+
and the budget as the `+N` directive. The runtime counts the **whole turn**, the captain's own
|
|
162
|
+
output included, so size `+N` with headroom.
|
|
163
|
+
|
|
164
|
+
| Cap | Value | Enforced by |
|
|
165
|
+
| --- | --- | --- |
|
|
166
|
+
| Token budget | the grant's `+N` | the Workflow runtime (`budget.total`); no budget = refused |
|
|
167
|
+
| Concurrency | `effort.wipLimit` efforts at once (default 2), never more than 4 | the script |
|
|
168
|
+
| Wave reserve | 150k tokens left, or the next wave does not start | the script |
|
|
169
|
+
| Wave order | a wave that did not fully merge ends the run `blocked`; no later wave starts | the script |
|
|
170
|
+
| Stop | `stopCommand` exits 0 after a wave, or every wave merged + the gate green on the base branch | the script |
|
|
171
|
+
|
|
172
|
+
**Concurrency and the WIP limit.** Each executor runs `cckit effort start`, which refuses a new
|
|
173
|
+
effort once `effort.wipLimit` effort branches exist (default 2, `EFFORT_WIP_LIMIT` overrides).
|
|
174
|
+
`night-grant.sh` puts that limit in the args as `wipLimit` and the engine runs no wider. Three
|
|
175
|
+
consequences:
|
|
176
|
+
|
|
177
|
+
- A wave of 4 under the default limit runs 2 + 2, not 4 at once. Raise `effort.wipLimit` to widen it.
|
|
178
|
+
- An effort that parked keeps its branch, so it takes a slot from the rest of its wave; when the
|
|
179
|
+
parked efforts of a wave fill the limit, the wave's remaining efforts are reported `skipped`.
|
|
180
|
+
- Efforts already in progress **before** the night count against the same limit, and the engine
|
|
181
|
+
cannot see them. An executor whose start is refused reports that refusal as its blocker and the
|
|
182
|
+
effort parks. Executors are told never to pass `--force` or set `KIT_FORCE` / `EFFORT_WIP_LIMIT`.
|
|
183
|
+
Close or finish in-progress efforts before granting, or the night has fewer slots than the limit.
|
|
184
|
+
|
|
185
|
+
**Wave order.** Waves are dependency-ordered: wave N+1 builds on wave N. `cckit effort start` does
|
|
186
|
+
not check `blocked_by`, so the engine does: when any effort of a wave ends parked, refused or
|
|
187
|
+
skipped, the run returns `blocked` naming them, and no later wave starts.
|
|
188
|
+
|
|
189
|
+
**The final check is the gate.** After the last wave merges, the engine runs the gate on the base
|
|
190
|
+
branch and reports `done` or `blocked` on that result. `stopCommand` is a separate check that runs
|
|
191
|
+
after each wave and ends the night early when it exits 0; it never stands in for the gate.
|
|
192
|
+
|
|
193
|
+
**Floors.** Base floors: `lockfile`, `auth`, `security-code`, `security-prose`, `workflows`, `cost`,
|
|
194
|
+
`secret`. `security-prose` (a `security/*` diff that is prose only) is waived by standing rule;
|
|
195
|
+
`workflows`, `cost` and `secret` are never waived. A project adds its own floors, its own
|
|
196
|
+
never-waivable list and its gate command under `night` in the kit config (schema:
|
|
197
|
+
`kit.config.schema.json` § `night`):
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
"night": { "floors": { "auth-dep": "the auth library version" },
|
|
201
|
+
"neverWaivable": ["auth-dep"], "gate": "pnpm typecheck && pnpm lint",
|
|
202
|
+
"grantors": ["a-maintainer"], "refuseLabels": ["hold"] }
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
A waiver must equal one floor name exactly. `"lockfile auth"` and `"*"` are refused when the grant
|
|
206
|
+
is read, not parked at night.
|
|
207
|
+
|
|
208
|
+
**Refused and parked.** A closed issue, an issue without the `effort` label, or an effort carrying
|
|
209
|
+
a label listed in `night.refuseLabels` (none by default) is refused. A red gate or a floor the grant
|
|
210
|
+
did not waive parks the effort for the owner. Either one ends the run after that wave.
|
|
211
|
+
|
|
212
|
+
**When it returns `usage-limit`** — an agent came back empty mid-wave. Do not relaunch. Sleep with
|
|
213
|
+
`ScheduleWakeup` until the window resets, then resume **one** workflow with `resumeFromRunId`.
|
|
214
|
+
Finished agents replay from cache; a sub whose commit already landed is never rebuilt.
|
|
215
|
+
|
|
216
|
+
**Every other stop** (`done`, `budget`, `blocked`, `refused`) — write the wake report from the
|
|
217
|
+
returned `efforts` (status, reason, bare PR URL each), update the one status comment on the plan
|
|
218
|
+
parent, and stop. A night never plans and executes the same work: only efforts the owner already
|
|
219
|
+
named in the grant run.
|
|
220
|
+
|
|
110
221
|
## On wake / on a pause (the report — always)
|
|
111
222
|
|
|
112
223
|
- **Branch(es)** + final short HEAD, or per-flow PRs (plan mode).
|
|
@@ -33,7 +33,8 @@ kit_gc_cleanup # plan only — deletes no branch, worktree, remote ref
|
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Or through the CLI: `cckit cleanup` (add `--llm` for JSON counts: `safe`, `landed`, `worktrees`,
|
|
36
|
-
`zombie`, `orphan`, `protected`, `stash`, `remote_failed`, `applied`).
|
|
36
|
+
`zombie`, `orphan`, `protected`, `stash`, `remote_failed`, `applied`). A LANDED detached worktree
|
|
37
|
+
counts under `worktrees`, an ORPHAN one under `orphan`.
|
|
37
38
|
|
|
38
39
|
### 2. Present it and ask
|
|
39
40
|
|
|
@@ -46,7 +47,9 @@ veto per-bucket — if they want the orphans looked at first, do that before del
|
|
|
46
47
|
| **LANDED** | **no PR of its own**, work already on base — by content (every file it changed since its merge base matches `origin/<base>`) or by lineage (`sub/<N>…`, `effort/<N>…`, or a `[#N]` commit subject names an issue closed with a merged PR). Effort subs after `effort close`, `effort/<N>` branches whose remote is gone, Claude Code Agent-tool `worktree-agent-<hash>` isolation worktrees | **deletes** exactly like SAFE — worktree, local branch, level remote ref — under the same guards: a dirty worktree or a branch ahead of its remote is skipped with a warning. The plan prints the block with each row's reason, before ORPHAN |
|
|
47
48
|
| **PROTECTED** | associated issue **still OPEN** | **keeps** — close the issue first |
|
|
48
49
|
| **ORPHAN** | fails both LANDED checks: commits whose content is not on the base branch's remote, no merged PR | **keeps** — offer to recover into a PR (step 4) |
|
|
49
|
-
| **
|
|
50
|
+
| **UNKNOWN** | a `gh` read failed (the PR list, or the branch's issue state), so the verdict could not be determined | **keeps** — rerun the plan when GitHub answers; do not treat the row as an orphan |
|
|
51
|
+
| **ZOMBIE** | worktree dir gone, admin metadata lingers | **recovers** any staged delta to a commit on its branch, **then prunes** the metadata. A **detached** zombie is compared to its own HEAD's tree: no staged delta → pruned; a staged delta has no branch to land on, so the entry is **locked and kept** and the output prints the `git commit-tree` line that recovers it |
|
|
52
|
+
| **detached worktree** | HEAD detached, directory present. LANDED: clean, HEAD an ancestor of the base branch or `main`. ORPHAN: anything else | LANDED: **removes** the worktree (listed under SAFE worktrees). ORPHAN: **keeps**, listed by path under ORPHAN |
|
|
50
53
|
| **stashes** | any stash entry | **keeps** — irreversible; drop only after showing each diff |
|
|
51
54
|
|
|
52
55
|
### 3. Execute
|
|
@@ -17,10 +17,10 @@ you *de-parameterize a project artifact back into a reusable kit template*.
|
|
|
17
17
|
|
|
18
18
|
## 1. Resolve upstream
|
|
19
19
|
|
|
20
|
-
- The kit ships **inside `jeiemgi/cckit`**
|
|
20
|
+
- The kit ships **inside `jeiemgi/cckit`** — there is no
|
|
21
21
|
standalone `claude-kit` repo. Read `${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json` → `repository`
|
|
22
|
-
for `OWNER/REPO` (default `jeiemgi/cckit`); contributing = a PR to that repo
|
|
23
|
-
|
|
22
|
+
for `OWNER/REPO` (default `jeiemgi/cckit`); contributing = a PR to that repo.
|
|
23
|
+
**Confirm `OWNER/REPO` with the user.**
|
|
24
24
|
- Require GitHub auth: run `gh auth status`. If not logged in, **stop** and tell the user to run
|
|
25
25
|
`gh auth login` first — every step below needs it.
|
|
26
26
|
|
|
@@ -105,7 +105,7 @@ Check permission: `gh repo view OWNER/REPO --json viewerPermission -q .viewerPer
|
|
|
105
105
|
## 5. Commit & push
|
|
106
106
|
|
|
107
107
|
- `git add` the file(s) at the correct kit path.
|
|
108
|
-
- Commit with a
|
|
108
|
+
- Commit with a scoped message: `feat(agent): add <name>`, `feat(skill): add <name>`,
|
|
109
109
|
`feat(profile): add <name>`.
|
|
110
110
|
- Push the branch to the fork/origin (`git push -u origin <branch>`).
|
|
111
111
|
|
|
@@ -21,8 +21,6 @@ Documentation here is read by people with low software knowledge. It must still
|
|
|
21
21
|
complete for experts. The whole skill is one promise: **a beginner can follow the flow, and an
|
|
22
22
|
expert can skip to the part they need — on the same page.**
|
|
23
23
|
|
|
24
|
-
You write the page so both happen at once.
|
|
25
|
-
|
|
26
24
|
## The reader
|
|
27
25
|
|
|
28
26
|
- The lowest-baseline reader has barely used a terminal. Write so they are never lost.
|
|
@@ -63,8 +61,6 @@ Every page follows this order, top to bottom:
|
|
|
63
61
|
5. **Next-section buttons** — at the bottom, one or two clear buttons to the next step(s) in the
|
|
64
62
|
journey. Never leave the reader at a dead end.
|
|
65
63
|
|
|
66
|
-
Hold the order. Title, then the one-liner, then the picture, then the words, then the way out.
|
|
67
|
-
|
|
68
64
|
### Skeleton
|
|
69
65
|
|
|
70
66
|
```mdx
|
|
@@ -97,9 +93,9 @@ Hold the order. Title, then the one-liner, then the picture, then the words, the
|
|
|
97
93
|
sequences, branches, parallel work, lifecycles. Do not draw a diagram that just restates a
|
|
98
94
|
sentence.
|
|
99
95
|
- **Never repetitive.** If two pages share a flow, draw it once on the most relevant page and link
|
|
100
|
-
to it from the other.
|
|
96
|
+
to it from the other.
|
|
101
97
|
- **Pair with steps, don't duplicate them.** The diagram shows the shape; a Steps list gives the
|
|
102
|
-
exact actions.
|
|
98
|
+
exact actions.
|
|
103
99
|
|
|
104
100
|
## Scannability mechanics
|
|
105
101
|
|
|
@@ -120,6 +116,20 @@ Hold the order. Title, then the one-liner, then the picture, then the words, the
|
|
|
120
116
|
the basics because they were assumed away.
|
|
121
117
|
- Mark the entry point. If a section is "start here for total beginners", say so in the heading.
|
|
122
118
|
|
|
119
|
+
## Marketing pages
|
|
120
|
+
|
|
121
|
+
Pages under `docs-site/src/content/docs/marketing/` are for a reader who never opens a terminal.
|
|
122
|
+
They follow every rule above, and four more:
|
|
123
|
+
|
|
124
|
+
- **Say draft, review and approved.** The words "worktree", "branch" and "PR" are not allowed
|
|
125
|
+
outside `words-you-will-hear.mdx`; `astro build` fails on them.
|
|
126
|
+
- **Show what to say to Claude, not what to type in a terminal.** A command appears only in the
|
|
127
|
+
section written for the technical person who does the setup.
|
|
128
|
+
- **Write the Spanish twin in the same change**, under `es/marketing/` with the same file name.
|
|
129
|
+
Write it in Spanish for that reader; do not translate line by line. Product, command and button
|
|
130
|
+
names stay in English.
|
|
131
|
+
- **A link into a Software page from a Spanish page says "(en inglés)".**
|
|
132
|
+
|
|
123
133
|
## Before you finish — checklist
|
|
124
134
|
|
|
125
135
|
- [ ] Title is plain; the one-line description says what the page delivers.
|
|
@@ -16,11 +16,23 @@ close logic is re-authored inline (kit-engine-boundary #1/#2). Respects `KIT_BAS
|
|
|
16
16
|
The effort lifecycle's terminal op. Board state, issue state, and the work record are correct
|
|
17
17
|
**by construction** — the core op owns them, in this order:
|
|
18
18
|
|
|
19
|
+
0. **Pre-close hook** (optional, config-gated via `effort.preCloseHook`) — a project gate called as
|
|
20
|
+
`<hook> <effort#> <sub#…>` from the effort worktree before anything is written. A non-zero exit
|
|
21
|
+
refuses the close and its output is printed; `KIT_FORCE=1` skips it and says so.
|
|
19
22
|
1. **Snapshot sub-diffs BEFORE squash** (squash destroys the per-sub-issue commit pairs that ARE
|
|
20
23
|
the work record — effort-model.md "Trace hard rules"), with a **refuse-squash-without-trace**
|
|
21
24
|
backstop (`KIT_FORCE=1` overrides).
|
|
22
|
-
2. **Capture effort metrics** pre-squash (telemetry: live-branch diff + commit signals).
|
|
23
|
-
|
|
25
|
+
2. **Capture effort metrics** pre-squash (telemetry: live-branch diff + commit signals). The record
|
|
26
|
+
also carries `build_seconds` — from the stamp `cckit effort start` wrote, else from the oldest
|
|
27
|
+
commit on the branch — and `tokens_real` where a usage log or a `cckit autopilot run` state file
|
|
28
|
+
has a figure. With no source the field is `null` and `tokens_null_reason` names why; nothing is
|
|
29
|
+
estimated.
|
|
30
|
+
3. **Re-target dependent PRs, then squash-merge** the effort PR. The merge deletes the remote
|
|
31
|
+
effort branch, and GitHub closes — unmerged — any open PR still based on it. So the core first
|
|
32
|
+
lists them (`gh pr list --base effort/<N>-… --state open`) and moves each to the base branch
|
|
33
|
+
(`gh pr edit <n> --base <base>`, one `↻ PR <n> re-targeted to <base>` line). If an edit fails,
|
|
34
|
+
or the list cannot be read, the close **refuses**, names the PR, and merges nothing; this runs
|
|
35
|
+
before step 2, so a refusal writes no metrics row. Skipped over REST, where the branch is kept.
|
|
24
36
|
4. **Judge + sync** the metrics (reads the durable trace dir; no-ops when the engine is off).
|
|
25
37
|
5. **Close the parent + ALL native sub-issues** and set the **board Status=Done** for each
|
|
26
38
|
(guarded — a no-op when Projects v2 is off).
|
|
@@ -33,7 +45,8 @@ The effort lifecycle's terminal op. Board state, issue state, and the work recor
|
|
|
33
45
|
that fails both LANDED checks is left for `cckit gc` to show as ORPHAN.
|
|
34
46
|
7. **Knowledge-ingest hook** (optional, config-gated via `effort.knowledgeIngestHook`).
|
|
35
47
|
8. **Kit-sync drift check** — advisory warning when the effort touched kit-managed files that
|
|
36
|
-
belong upstream (/kit-contribute).
|
|
48
|
+
belong upstream (/kit-contribute). Under `.claude/rules/` only the rule files the kit ships
|
|
49
|
+
(`templates/rules/*.md`) count; a rule the project wrote itself is never flagged.
|
|
37
50
|
|
|
38
51
|
## Preconditions
|
|
39
52
|
|
|
@@ -50,11 +63,6 @@ If not, abort and route to `/kit-effort-pr` first.
|
|
|
50
63
|
|
|
51
64
|
## Execution
|
|
52
65
|
|
|
53
|
-
This skill is a **thin caller** of `effort_close` (`scripts/lib/effort-ops.sh`) — the SAME
|
|
54
|
-
function `cckit effort close` runs. The core owns the pre-squash snapshot + trace backstop,
|
|
55
|
-
telemetry capture/judge/sync, the squash-merge, issue closes, board Done, GC, the
|
|
56
|
-
knowledge-ingest hook, and the kit-sync drift check. There is no second implementation here.
|
|
57
|
-
|
|
58
66
|
The core handles both effort styles (#164): run from the `effort/<N>-…` branch it squash-merges
|
|
59
67
|
the integration PR; run from anywhere else with an explicit `#N`, and if no `effort/<N>` branch
|
|
60
68
|
exists anywhere (a **wave-driven** effort — subs merged as individual task PRs), it verifies every
|
|
@@ -88,6 +96,7 @@ effort_close "$NUM"
|
|
|
88
96
|
|
|
89
97
|
- Pre-squash trace dir (`<git-common-dir>/traces/effort-<N>/` + `index.jsonl`) + captured metrics
|
|
90
98
|
- PR squash-merged; parent + all native sub-issues closed
|
|
99
|
+
- Every PR that was based on the effort branch is still OPEN, now based on the base branch
|
|
91
100
|
- Board Status=Done for parent + every sub (if Projects v2 is on)
|
|
92
101
|
- Main checkout on the base branch, up to date; effort worktree + local/remote branch removed and pruned, and every LANDED `sub/<N>…` worktree + branch with them (`✓ sub gc:` lines)
|
|
93
102
|
- Knowledge-ingest hook ran (if configured); a kit-sync warning if the effort touched kit-managed files
|
|
@@ -14,8 +14,16 @@ Repo + board config come from `load_kit_config` (`$KIT_REPO`, `KIT_PROJECTS_V2`)
|
|
|
14
14
|
`.claude/kit.config.json` from the working directory.
|
|
15
15
|
|
|
16
16
|
Creates the **parent issue** (the plan) + **N native sub-issues** for one effort. See
|
|
17
|
-
`rules/effort-model.md` for the model and the parent-issue template.
|
|
18
|
-
|
|
17
|
+
`rules/effort-model.md` for the model and the parent-issue template.
|
|
18
|
+
|
|
19
|
+
## Before creating — show the plan
|
|
20
|
+
|
|
21
|
+
The parent issue is the plan, and nothing is created until the owner has seen it. When
|
|
22
|
+
`cckit page mode` prints `page`, present the Goal, the sub-issue list and the open choices as a
|
|
23
|
+
review page (`/kit-page`, kind `plan`) and collect the approval there; when it prints `terminal`,
|
|
24
|
+
show the same in the terminal. After the effort exists, record the approval and any choice made on
|
|
25
|
+
the way with `cckit page answer --kind plan --issue <parent>`. The page is recommended, not a
|
|
26
|
+
gate: `cckit effort start` checks nothing.
|
|
19
27
|
|
|
20
28
|
## Inputs
|
|
21
29
|
|
|
@@ -31,14 +39,13 @@ truth — the parent issue IS the plan (no separate plan file).
|
|
|
31
39
|
| Sub-issues | ✓ | List of `name :: one-line desc` — one per concern (the skill numbers + prefixes them) |
|
|
32
40
|
| Depends on | optional | `#N` list → native GitHub `blocked_by` edge + a `## Relations` line (the visible chain) |
|
|
33
41
|
| Priority | optional | `p0`–`p3` → `priority:<p>` label (default `p1`) |
|
|
42
|
+
| Kind | optional | `--kind`: feat / fix / task / chore / security / scaffold / ci / adr / spike / plan, or a content kind (post / campaign / brand / research) → `kind:<k>` on the parent and every sub (default `task`) |
|
|
34
43
|
| Milestone | optional | Inherited onto the parent (sub-issues inherit it too) |
|
|
35
44
|
|
|
36
45
|
## Execution
|
|
37
46
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
body composition, the `ctx/kind/priority/role/flow` label set, per-sub title lint, native sub-issue
|
|
41
|
-
links, `blocked_by` edges, and the board add. There is no second implementation here.
|
|
47
|
+
The core `effort_new` owns body composition, the `ctx/kind/priority/role/flow` label set, per-sub
|
|
48
|
+
title lint, native sub-issue links, `blocked_by` edges, and the board add.
|
|
42
49
|
|
|
43
50
|
```bash
|
|
44
51
|
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
@@ -72,9 +79,8 @@ PARENT_NUM=$(effort_new \
|
|
|
72
79
|
echo "✓ effort #$PARENT_NUM created — next: /kit-effort-start $PARENT_NUM"
|
|
73
80
|
```
|
|
74
81
|
|
|
75
|
-
>
|
|
76
|
-
>
|
|
77
|
-
> the verb move together.
|
|
82
|
+
> To change what an effort looks like (body, labels, lint, board), change the core — both the skill
|
|
83
|
+
> and the verb move together.
|
|
78
84
|
|
|
79
85
|
## Output
|
|
80
86
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kit-effort-pr
|
|
3
|
-
description: Open the ONE pull request for an effort — `effort/<N>` → base branch — with a rich human-facing review body plus a `## For agents` section listing the file paths/entry points. Title `
|
|
3
|
+
description: Open the ONE pull request for an effort — `effort/<N>` → base branch — with a rich human-facing review body plus a `## For agents` section listing the file paths/entry points. Title `type: <name> [#N]`. Inherits labels + milestone from the parent issue and moves it to In Review on the board.
|
|
4
4
|
when_to_use: When an effort branch is ready for review (all its sub-issues built + merged into the effort branch). One effort = one PR (effort-model.md) — never open per-sub PRs to the base branch. Mirrors `kit-task-pr` for the effort lifecycle.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -14,7 +14,8 @@ body). Never re-implement it here, and never paste it into a shell.
|
|
|
14
14
|
Opens the **single** PR for an effort. The PR carries the human-facing review write-up + a
|
|
15
15
|
`## For agents` section (retrieval context / the work record). The parent issue holds the plan;
|
|
16
16
|
this PR is where humans review the result. The title carries `[#N]` (the effort id) — mandatory
|
|
17
|
-
(effort-model.md, effort-id taxonomy)
|
|
17
|
+
(effort-model.md, effort-id taxonomy) — inside a Conventional Commit subject, because the PR is
|
|
18
|
+
squash-merged and its title becomes the commit release-please and the commitlint gate read.
|
|
18
19
|
|
|
19
20
|
## Inputs
|
|
20
21
|
|
|
@@ -32,20 +33,24 @@ From the effort worktree (branch `effort/<N>-<slug>`):
|
|
|
32
33
|
```bash
|
|
33
34
|
cckit effort pr <N> --summary-file <summary.md> --for-agents-file <for-agents.md>
|
|
34
35
|
# short form: cckit effort pr <N> --summary "<what + why>" --for-agents "<paths>"
|
|
35
|
-
#
|
|
36
|
+
# the change is not a feat: add --type fix (any Conventional Commit type)
|
|
37
|
+
# replace the composed title: add --title "<conventional subject carrying [#N]>"
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
What the verb does, in order: commits pending **tracked** changes (role identity as a
|
|
39
41
|
`Co-authored-by` trailer; untracked files are listed, never swept in) → pushes → reads the parent's
|
|
40
|
-
title, labels and milestone → composes the title with `effort_pr_title`
|
|
41
|
-
`[#N]`
|
|
42
|
+
title, labels and milestone → composes the title with `effort_pr_title` as
|
|
43
|
+
`type(scope): <name> [#N]` (scope = the `flow:` label, else the title's `[Flow]` tag; type =
|
|
44
|
+
`--type`, else the `kind:` label, where `kind:task` → `feat` and a `bug` label → `fix`) → refuses,
|
|
45
|
+
before any `gh` call, a title without `[#N]` or one `commitlint_check` rejects → opens the PR with the body below → adds the PR to the board at In Review (+ Role) and moves
|
|
42
46
|
the parent to In Review. A failed board add prints a warning; it is never silent.
|
|
43
47
|
|
|
44
|
-
Body: `## For the orchestrator` (+ `Closes #N`) · `## Summary` · `## For agents` · `## Verification
|
|
48
|
+
Body: `## For the orchestrator` (+ `Closes #N`) · `## Summary` · `## For agents` · `## Verification`
|
|
49
|
+
(`## Review` when the config sets `pr.bodyStyle: content`).
|
|
45
50
|
|
|
46
51
|
## Output
|
|
47
52
|
|
|
48
|
-
- The single effort PR URL (title `
|
|
53
|
+
- The single effort PR URL (title `type(scope): <name> [#N]`, e.g. `feat(core): adoption hardening [#115]`)
|
|
49
54
|
- PR + parent issue both at In Review on the board (if Projects v2 is on)
|
|
50
55
|
- Suggested next: `/kit-effort-close <N>`
|
|
51
56
|
|
|
@@ -55,6 +60,9 @@ Body: `## For the orchestrator` (+ `Closes #N`) · `## Summary` · `## For agent
|
|
|
55
60
|
branch to the base; sub-issues merge into the effort branch first (effort-model.md).
|
|
56
61
|
- The title MUST carry `[#N]` (the effort id) — a PR title without it is a review blocker
|
|
57
62
|
(effort-model.md, effort-id taxonomy).
|
|
63
|
+
- The title MUST be a Conventional Commit subject under `pr.titleStyle: conventional` (the default):
|
|
64
|
+
the verb refuses a composed or `--title` value that fails `scripts/lib/commitlint.sh`. A project
|
|
65
|
+
with `pr.titleStyle: issue-title` gets `[Role] [#N] <name>` and no commitlint check.
|
|
58
66
|
- The body MUST include both a human `## Summary` and a `## For agents` (file paths) — the latter is
|
|
59
67
|
retrieval context + part of the work record.
|
|
60
68
|
- `Closes #$NUM` closes the **parent** on merge; the sub-issues are closed by `/kit-effort-close`
|
|
@@ -10,7 +10,8 @@ Thin caller over the ONE canonical effort-start mechanic: the `cckit effort star
|
|
|
10
10
|
`effort_start` (`${CLAUDE_PLUGIN_ROOT}/scripts/lib/effort-ops.sh`). The verb logic lives there,
|
|
11
11
|
never inline here (kit-engine-boundary #1/#2 — same single-implementation principle as the PR
|
|
12
12
|
title composer, #121). The dispatcher loads the project config first (#151), so `KIT_REPO` /
|
|
13
|
-
`KIT_BASE_BRANCH` come from `.claude/kit.config.json` of the project you're standing in
|
|
13
|
+
`KIT_BASE_BRANCH` come from `.claude/kit.config.json` of the project you're standing in — unless
|
|
14
|
+
`KIT_BASE_BRANCH` is already set in the environment, which overrides the config's base (#352). The verb
|
|
14
15
|
owns ALL of the mechanics:
|
|
15
16
|
|
|
16
17
|
- resolving `<N|slug>` to the parent effort issue (slug handles work too)
|
|
@@ -108,7 +109,9 @@ fi
|
|
|
108
109
|
- The integration branch is **always** `effort/<N>-<slug>` (branch-naming.md, effort-model.md) —
|
|
109
110
|
never `task/` or `feat/` for the parent.
|
|
110
111
|
- Branch from the base branch (`KIT_BASE_BRANCH`) only — never from a feature branch; the verb
|
|
111
|
-
enforces this.
|
|
112
|
+
enforces this. An effort starts from the config's base, so do not carry a `KIT_BASE_BRANCH`
|
|
113
|
+
override into `cckit effort start`; the override is for cutting a **sub-issue** from the effort
|
|
114
|
+
branch (`KIT_BASE_BRANCH=effort/<N>-<slug> cckit orchestrate <sub>`).
|
|
112
115
|
- **Worktree always** — one branch per worktree, never share a checkout.
|
|
113
116
|
- Sub-issue branches are `sub/<N><letter>-<slug>` off THIS branch and **never open their own PR to
|
|
114
117
|
the base branch** — they merge into `effort/<N>`.
|
package/skills/kit-gc/SKILL.md
CHANGED
|
@@ -51,7 +51,7 @@ branch's remote** (orphan work is surfaced, never auto-deleted).
|
|
|
51
51
|
# scripts/lib/kit-gc.sh :: kit_gc_analyze (also what `kit gc` + the kit-ui cockpit run)
|
|
52
52
|
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-config.sh" && load_kit_config
|
|
53
53
|
KIT_GC_REPO="$KIT_REPO" source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/kit-gc.sh"
|
|
54
|
-
kit_gc_analyze # worktrees / branches / stashes, each tagged PROTECTED/SAFE/ACTIVE/LANDED/ORPHAN
|
|
54
|
+
kit_gc_analyze # worktrees / branches / stashes, each tagged PROTECTED/SAFE/ACTIVE/LANDED/ORPHAN/UNKNOWN
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Classify every branch/worktree (issue-open protection wins over everything except an explicit force):
|
|
@@ -59,10 +59,13 @@ Classify every branch/worktree (issue-open protection wins over everything excep
|
|
|
59
59
|
| Bucket | Rule | Action |
|
|
60
60
|
| --- | --- | --- |
|
|
61
61
|
| **Protected (open issue)** | `wt_protected_reason` non-empty — associated issue **#N still OPEN** | **keep** — never prune, even with no PR / merged PR |
|
|
62
|
+
| **Protected (open light task)** | branch `light/<id>-<slug>` whose task is not `done`/`dropped` on the base branch — **light task <id> still OPEN** | **keep** — the task source answers, no issue is read |
|
|
62
63
|
| **Safe to delete** | PR `MERGED`, level with its remote (no unpushed commits), **and** issue closed/absent | prune |
|
|
63
64
|
| **Active** | open PR, or the base branch, or a worktree branch with an open PR | keep |
|
|
64
65
|
| **Landed** | **no PR of its own**, but its work is already on base — either check suffices: (a) *content*: every file it changed since its merge base has the same content on `origin/<base>`; (b) *lineage*: its name (`sub/<N>…`, `effort/<N>…`) or a `[#N]` / `(#N)` in a commit subject names an issue that is **closed with a merged PR** — found in the 200-PR index by head `<kind>/<N>-…`, or, when that PR has scrolled out of the window, through the issue's own `closedByPullRequestsReferences`; a sub-issue with no closing PR (subs close through `effort close`) is resolved once through its **parent**'s closing PR (sub-issues API). One lookup per issue per run, cached | prune, under the same dirty-worktree / unpushed guards as SAFE |
|
|
66
|
+
| **Detached worktree** | a worktree whose HEAD is detached has no branch, so no branch rule applies. It gets its own row in `# worktrees`, labelled `[detached@<sha12>]`: **LANDED** when the tree is clean **and** HEAD is an ancestor of the base branch or of `main`; **ORPHAN** otherwise (uncommitted changes, or a HEAD on neither ref — a commit made on a detached HEAD is on no branch) | LANDED: prune (`git worktree remove`, no `--force`). ORPHAN: **surface, never auto-delete** |
|
|
65
67
|
| **Orphan** | fails both LANDED checks: commits whose content is **not on the base branch's remote** and no merged PR | **surface, never auto-delete** — offer to open a recovery PR |
|
|
68
|
+
| **Unknown** | a `gh` read **failed** (rate limit, outage, no `gh`): the PR list, or the branch's issue state. `UNKNOWN (could not determine …)` names which. Not the same as "no PR" or "issue closed" | **keep** — rerun when GitHub answers; never prune, never report it as an orphan |
|
|
66
69
|
|
|
67
70
|
For squash-merged branches, `--is-ancestor` and `git cherry` are unreliable (a squash rewrites the patch ids) — trust the **PR state** for a branch with its own PR, and the two LANDED checks for one without: an effort's `sub/<N><letter>` (merged into `effort/<N>`, then squashed), an `effort/<N>` whose remote ref is gone, and a Claude Code Agent-tool isolation worktree (`worktree-agent-<hash>`, which no verb creates). Then verify the branch is level with its remote (`git rev-list --count origin/<b>..<b>` = 0) before deleting. The LANDED row carries its reason (`content on origin/develop`, `issue #50 closed, its PR merged`; agent worktrees are named as such).
|
|
68
71
|
|
|
@@ -77,7 +80,7 @@ section used to document is what the base-branch guard exists to prevent, and it
|
|
|
77
80
|
recover-before-prune checks. `/kit-cleanup` prints the same plan, then acts on it:
|
|
78
81
|
|
|
79
82
|
```bash
|
|
80
|
-
cckit cleanup --yes # deletes the SAFE + LANDED rows (worktree, local branch, level remote ref), prunes listed ZOMBIE metadata
|
|
83
|
+
cckit cleanup --yes # deletes the SAFE + LANDED rows (worktree, local branch, level remote ref, LANDED detached worktree), prunes listed ZOMBIE metadata
|
|
81
84
|
# Stale-open issues (PR already merged)
|
|
82
85
|
cckit close <n> "Delivered via PR #<pr>." # board Done + close; raw gh issue close is blocked (#364)
|
|
83
86
|
# Stashes — the one step that stays by hand, only after showing each diff and getting an explicit OK
|
package/skills/kit-next/SKILL.md
CHANGED
|
@@ -29,6 +29,10 @@ cckit next
|
|
|
29
29
|
Prints the unblocked set (wave 0 of the plan) and the single recommended next issue with its start
|
|
30
30
|
command. `--effort <N>` scopes it to one effort's sub-issues.
|
|
31
31
|
|
|
32
|
+
The human output ends with the weekly cadence this verb is the daily step of: Monday `cckit plan`
|
|
33
|
+
orders the week, `cckit next` daily picks up one issue, Friday `cckit gc` reports what can be
|
|
34
|
+
pruned. `cckit next --llm` does not carry that line — its TOON rows stay `{number,ctx,title}`.
|
|
35
|
+
|
|
32
36
|
The unblocked set is ordered by the `priority:pN` label — **p0 → p1 → p2 → p3**, unlabeled last —
|
|
33
37
|
so the recommended issue is the most urgent thing that is actually startable. Ties keep their
|
|
34
38
|
existing order. Priority never jumps a dependency: an issue only reaches wave 0 once every blocker
|
|
@@ -49,7 +53,7 @@ When the unblocked issues are file-disjoint and independent, drive them in paral
|
|
|
49
53
|
at a time:
|
|
50
54
|
|
|
51
55
|
```
|
|
52
|
-
cckit copilot # emits
|
|
56
|
+
cckit copilot # emits the wave-0 fan-out brief (dispatch wording per adapter)
|
|
53
57
|
cckit watch --merge # gate every open PR; squash-merge the CLEAN ones; advance the next wave
|
|
54
58
|
```
|
|
55
59
|
|
|
@@ -7,7 +7,7 @@ allowed-tools: Bash, Read, AskUserQuestion
|
|
|
7
7
|
|
|
8
8
|
# kit-onboard — the two-tier interview (D11)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
The ASKING is yours (AskUserQuestion). The DERIVING + WRITING is deterministic and
|
|
11
11
|
lives in the engine — never hand-edit config JSON; call the scripts.
|
|
12
12
|
|
|
13
13
|
Engine (under `${CLAUDE_PLUGIN_ROOT}`):
|
|
@@ -21,7 +21,7 @@ Engine (under `${CLAUDE_PLUGIN_ROOT}`):
|
|
|
21
21
|
## Tier 1 — global profile (ONCE in a lifetime)
|
|
22
22
|
|
|
23
23
|
1. Run `scripts/kit-onboard.sh status`. **If it reports a profile already exists, SKIP tier 1**
|
|
24
|
-
|
|
24
|
+
and go straight to tier 2.
|
|
25
25
|
2. Otherwise render the catalog: `scripts/lib/kit-interview.sh --render global`.
|
|
26
26
|
3. Ask the questions with **AskUserQuestion** — one batched round. For each question use its
|
|
27
27
|
`header`, `question`, and `options` (mark the `recommended` option first, label it
|
|
@@ -37,7 +37,7 @@ Engine (under `${CLAUDE_PLUGIN_ROOT}`):
|
|
|
37
37
|
3. Persist: `scripts/kit-onboard.sh project --answers /tmp/kit-project.json --dir <project-dir>`.
|
|
38
38
|
4. **The `software` question is a control answer, not a config field.** If the user answers
|
|
39
39
|
`yes`, immediately run the **kit-add** flow for the software module (the software wizard:
|
|
40
|
-
versioning / deploy / CI) — see the
|
|
40
|
+
versioning / deploy / CI) — see the `kit-add` skill. If `no`, stop: it stays a free
|
|
41
41
|
workspace, and they can run `/kit-add software` any time.
|
|
42
42
|
|
|
43
43
|
## Rules
|