@jeiemgi/cckit 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +4 -2
- package/AGENTS.md +17 -237
- package/README.md +27 -27
- package/SECURITY.md +4 -4
- package/bin/PROMPTS.md +12 -0
- package/bin/cckit +86 -86
- package/cckit.config.json +1 -1
- package/kit/PROMPTS.md +14 -0
- package/{commands → kit/commands}/kit-doctor.md +3 -4
- package/{commands → kit/commands}/kit-export-project.md +1 -1
- package/{commands → kit/commands}/kit-init.md +8 -20
- package/{commands → kit/commands}/kit-routines.md +1 -1
- package/{commands → kit/commands}/kit-update.md +3 -3
- package/kit/completions/cckit.bash +9 -0
- package/{databases → kit/databases}/supabase.json +1 -1
- package/{integrations → kit/integrations}/integration.schema.json +3 -3
- package/kit/interview/global.json +54 -0
- package/kit/interview/project.json +133 -0
- package/kit/modules/qa.json +63 -0
- package/kit/modules/software.json +48 -0
- package/{profiles → kit/profiles}/automation.json +1 -3
- package/{profiles → kit/profiles}/content.json +0 -2
- package/{profiles → kit/profiles}/marketing.json +0 -2
- package/{profiles → kit/profiles}/minimal.json +1 -3
- package/{profiles → kit/profiles}/research.json +1 -3
- package/{profiles → kit/profiles}/software.json +0 -2
- package/kit/routines/catalogue.json +84 -0
- package/{skills → kit/skills}/kit-add/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-annotate/SKILL.md +2 -4
- package/{skills → kit/skills}/kit-autopilot/SKILL.md +6 -6
- package/{skills → kit/skills}/kit-cleanup/SKILL.md +2 -2
- package/{skills → kit/skills}/kit-contribute/SKILL.md +8 -12
- package/{skills → kit/skills}/kit-customize/SKILL.md +5 -8
- package/{skills → kit/skills}/kit-dev/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-digest/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-effort-close/SKILL.md +4 -4
- package/{skills → kit/skills}/kit-effort-new/SKILL.md +6 -6
- package/{skills → kit/skills}/kit-effort-start/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-gc/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-page/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-status/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-task-close/SKILL.md +5 -5
- package/{skills → kit/skills}/kit-task-new/SKILL.md +5 -5
- package/{skills → kit/skills}/kit-task-pr/SKILL.md +5 -5
- package/{skills → kit/skills}/kit-task-pr-merge/SKILL.md +7 -7
- package/{skills → kit/skills}/kit-task-start/SKILL.md +1 -1
- package/{skills → kit/skills}/kit-task-sync/SKILL.md +3 -3
- package/{skills → kit/skills}/kit-ux-audit/SKILL.md +16 -35
- package/{skills → kit/skills}/kit-ux-audit/references/graph-model.md +7 -26
- package/{skills → kit/skills}/kit-ux-audit/references/report.md +2 -3
- package/{skills → kit/skills}/routing.yaml +1 -1
- package/kit/statusline/kit-statusline.sh +82 -0
- package/{templates → kit/templates}/agents/analyst.md +0 -11
- package/{templates → kit/templates}/agents/auto-dev.md +0 -13
- package/{templates → kit/templates}/agents/backend.md +0 -11
- package/{templates → kit/templates}/agents/designer.md +0 -11
- package/{templates → kit/templates}/agents/devops.md +0 -11
- package/{templates → kit/templates}/agents/editor.md +0 -11
- package/{templates → kit/templates}/agents/frontend.md +0 -11
- package/{templates → kit/templates}/agents/generalist.md +0 -11
- package/{templates → kit/templates}/agents/local-delegate.md +0 -13
- package/{templates → kit/templates}/agents/n8n.md +0 -11
- package/{templates → kit/templates}/agents/pm.md +0 -11
- package/{templates → kit/templates}/agents/qa.md +0 -11
- package/{templates → kit/templates}/agents/researcher.md +0 -11
- package/{templates → kit/templates}/agents/security.md +0 -11
- package/{templates → kit/templates}/agents/tech-lead.md +0 -11
- package/{templates → kit/templates}/agents/ux.md +3 -14
- package/{templates → kit/templates}/instructions.md.tmpl +1 -18
- package/{templates → kit/templates}/kit.config.json.tmpl +0 -6
- package/{templates → kit/templates}/rules/branch-naming.md +3 -2
- package/{templates → kit/templates}/rules/merge-safety.md +3 -2
- package/{templates → kit/templates}/rules/react-annotate.md +0 -8
- package/kit.config.schema.json +11 -11
- package/lib/PROMPTS.md +14 -0
- package/{scripts/lib → lib/core}/adapter-select-test.sh +7 -7
- package/{scripts → lib/core}/advisor-test.sh +3 -3
- package/{scripts/lib → lib/core}/agent-def-test.sh +1 -1
- package/{scripts/lib → lib/core}/agent-def.sh +2 -2
- package/{scripts/lib → lib/core}/agent-launch-test.sh +3 -3
- package/{scripts/lib → lib/core}/agent-profile-test.sh +2 -2
- package/{scripts/lib → lib/core}/agent-resolve-test.sh +2 -2
- package/{scripts/lib → lib/core}/agent-resolve.sh +2 -2
- package/{scripts → lib/core}/agent-skills-external.txt +3 -3
- package/{scripts → lib/core}/agent-skills-lint-test.sh +17 -17
- package/lib/core/agent-skills-lint.sh +115 -0
- package/{scripts → lib/core}/agent-template-lint-test.sh +7 -7
- package/lib/core/agent-template-lint.sh +58 -0
- package/{scripts/lib → lib/core}/board-view-test.sh +3 -3
- package/lib/core/board-view.sh +97 -0
- package/{scripts/lib → lib/core}/branch-owner-test.sh +3 -3
- package/lib/core/branch-owner.sh +201 -0
- package/lib/core/check.sh +125 -0
- package/{scripts/lib → lib/core}/codex-hooks-test.sh +3 -3
- package/{scripts → lib/core}/commitlint-test.sh +6 -6
- package/lib/core/commitlint.sh +54 -0
- package/{scripts/config-path-test.sh → lib/core/config-path-scan-test.sh} +2 -2
- package/{scripts/lib → lib/core}/config-path-test.sh +3 -3
- package/lib/core/config-path.sh +30 -0
- package/{scripts → lib/core}/content-skills-test.sh +16 -16
- package/{scripts → lib/core}/docs-marketing-words-test.sh +2 -2
- package/{scripts → lib/core}/docs-record-tables-test.sh +2 -2
- package/{scripts/lib → lib/core}/effort-metrics-test.sh +6 -6
- package/lib/core/effort-metrics.sh +591 -0
- package/{scripts/lib → lib/core}/effort-slug-test.sh +4 -4
- package/{scripts/lib → lib/core}/effort-slug.sh +3 -3
- package/lib/core/effort.sh +339 -0
- package/{scripts/lib → lib/core}/errors-header-test.sh +19 -9
- package/lib/core/errors-header.exempt +49 -0
- package/{scripts → lib/core}/exec-targets-test.sh +3 -3
- package/lib/core/feature-map.sh +76 -0
- package/{scripts → lib/core}/force-push-fence-test.sh +8 -8
- package/lib/core/force-push-fence.sh +51 -0
- package/{scripts → lib/core}/forge-fence-test.sh +13 -13
- package/{scripts → lib/core}/forge-fence.sh +14 -14
- package/{scripts → lib/core}/forge-report-test.sh +5 -5
- package/{scripts → lib/core}/forge-report.sh +18 -14
- package/{scripts/lib → lib/core}/git-core-test.sh +5 -5
- package/{scripts/lib → lib/core}/git-remote-test.sh +3 -3
- package/{scripts → lib/core}/guard-raw-git-ops-test.sh +4 -4
- package/{scripts → lib/core}/hook-adapter-test.sh +5 -5
- package/{scripts/lib → lib/core}/hook-refresh-test.sh +5 -5
- package/{scripts → lib/core}/instruction-budget-baseline.txt +1 -1
- package/lib/core/instruction-budget-lint.sh +238 -0
- package/{scripts/lib → lib/core}/integration-install-test.sh +12 -12
- package/lib/core/integration-install.sh +257 -0
- package/{scripts/lib → lib/core}/integrations-test.sh +38 -45
- package/lib/core/integrations.sh +244 -0
- package/{scripts/lib → lib/core}/kinds-test.sh +5 -5
- package/lib/core/kinds.sh +66 -0
- package/{scripts/lib → lib/core}/kit-cli-test.sh +1 -1
- package/{scripts/lib → lib/core}/kit-cli.sh +1 -1
- package/{scripts/lib → lib/core}/kit-config-resolve.sh +2 -2
- package/{scripts/lib → lib/core}/kit-config-test.sh +11 -11
- package/lib/core/kit-config.sh +164 -0
- package/{scripts/lib → lib/core}/kit-engine-test.sh +1 -1
- package/lib/core/kit-events.sh +72 -0
- package/lib/core/kit-local.sh +87 -0
- package/{scripts/lib → lib/core}/kit-manifest.sh +1 -1
- package/{scripts/lib → lib/core}/kit-mode-test.sh +1 -1
- package/{scripts/lib → lib/core}/kit-mode.sh +3 -3
- package/{scripts/lib → lib/core}/kit-operate.sh +1 -1
- package/{scripts/lib → lib/core}/kit-profile-test.sh +1 -1
- package/{scripts/lib → lib/core}/kit-profile.sh +2 -2
- package/{scripts/lib → lib/core}/kit-state-test.sh +1 -1
- package/lib/core/knowledge-lint.sh +106 -0
- package/lib/core/layout-fence-test.sh +35 -0
- package/lib/core/layout-fence.allow +15 -0
- package/lib/core/layout-fence.baseline +4 -0
- package/lib/core/layout-fence.sh +50 -0
- package/{scripts → lib/core}/leak-fence-test.sh +10 -10
- package/{scripts/lib → lib/core}/leak-fence.sh +1 -1
- package/{scripts → lib/core}/loose-issues-test.sh +8 -8
- package/{scripts → lib/core}/loose-issues.baseline +1 -1
- package/{scripts/lib → lib/core}/loose-issues.sh +2 -2
- package/{scripts → lib/core}/marketing-walkthrough-test.sh +7 -7
- package/{scripts/lib → lib/core}/naming-test.sh +2 -2
- package/{scripts/lib → lib/core}/naming-verbs-test.sh +8 -8
- package/lib/core/naming.sh +172 -0
- package/{scripts/lib → lib/core}/orchestration-runtime-test.sh +4 -4
- package/{scripts → lib/core}/portable-test.sh +10 -6
- package/{scripts/lib → lib/core}/pr-evidence-test.sh +5 -5
- package/lib/core/pr-evidence.sh +361 -0
- package/{scripts/lib → lib/core}/qa-lane-test.sh +7 -7
- package/{scripts/lib → lib/core}/qa-lane.sh +3 -3
- package/{scripts/lib → lib/core}/qa-lanes-test.sh +5 -5
- package/lib/core/react-detect.sh +79 -0
- package/{scripts/lib → lib/core}/render-test.sh +1 -1
- package/lib/core/resident-context-test.sh +42 -0
- package/lib/core/resident-context.baseline +1 -0
- package/lib/core/resident-context.sh +56 -0
- package/lib/core/review-lint-baseline.txt +28 -0
- package/lib/core/review-lint.sh +266 -0
- package/{scripts → lib/core}/review-rules.conf +1 -1
- package/{scripts/lib → lib/core}/review-stage-test.sh +2 -2
- package/{scripts/lib → lib/core}/role-identity-test.sh +3 -3
- package/lib/core/role-identity.sh +71 -0
- package/{scripts → lib/core}/rule-recipes-test.sh +5 -5
- package/lib/core/secret-guard.sh +116 -0
- package/{scripts → lib/core}/self-install-test.sh +15 -16
- package/{scripts/lib → lib/core}/session-registry-test.sh +1 -1
- package/lib/core/session-registry.sh +233 -0
- package/{scripts → lib/core}/skill-frontmatter-baseline.txt +1 -1
- package/lib/core/skill-frontmatter-lint.sh +189 -0
- package/{scripts/lib → lib/core}/spec-lint-test.sh +1 -1
- package/lib/core/spec-lint.sh +95 -0
- package/{scripts/lib → lib/core}/stage-receipt-test.sh +4 -4
- package/{scripts/lib → lib/core}/stage-receipt.sh +3 -3
- package/{scripts → lib/core}/terms-check-test.sh +6 -6
- package/lib/core/terms-check.sh +244 -0
- package/{scripts/lib → lib/core}/test-env-test.sh +2 -2
- package/{scripts/lib → lib/core}/test-env.sh +1 -1
- package/{scripts → lib/core}/test-runner-test.sh +11 -11
- package/{scripts → lib/core}/test.sh +12 -12
- package/{scripts → lib/core}/update-path-test.sh +3 -3
- package/{scripts → lib/core}/verbs-gen.sh +9 -9
- package/{scripts → lib/core}/verbs-help-test.sh +4 -4
- package/{scripts → lib/core}/verbs-ratchet-test.sh +18 -18
- package/{scripts → lib/core}/verbs-ratchet.sh +8 -8
- package/{scripts → lib/core}/verbs-test.sh +19 -19
- package/lib/core/verbs.baseline +5 -0
- package/{scripts/lib → lib/core}/verbs.sh +2 -2
- package/{scripts/lib → lib/core}/verbs.tsv +5 -5
- package/{scripts/lib → lib/core}/version-bump-test.sh +29 -8
- package/{scripts/lib → lib/core}/version-bump.sh +15 -2
- package/{scripts/lib → lib/core}/wave-result-test.sh +2 -2
- package/{scripts/lib → lib/core}/wave-result.sh +1 -1
- package/{scripts/lib → lib/core}/worker-brief-test.sh +3 -3
- package/{scripts/lib → lib/core}/worktree-bootstrap-test.sh +1 -1
- package/{scripts/lib → lib/core}/worktree-issue-test.sh +2 -2
- package/lib/core/worktree-issue.sh +172 -0
- package/{scripts/lib → lib/core}/worktree-ports-test.sh +1 -1
- package/{scripts/lib → lib/core}/worktree-start-test.sh +2 -2
- package/lib/core/worktree-start.sh +790 -0
- package/{scripts/lib → lib/core}/zsh-safety-test.sh +11 -11
- package/{scripts/lib → lib/forge}/forge-test.sh +4 -4
- package/{scripts/lib → lib/forge}/forge.sh +1 -1
- package/{scripts/lib → lib/forge}/gh-board-add-test.sh +3 -3
- package/lib/forge/gh-log.sh +59 -0
- package/{scripts/lib → lib/forge}/gh-project-test.sh +18 -17
- package/lib/forge/gh-project.sh +379 -0
- package/{scripts/lib → lib/forge}/gh-rest-test.sh +5 -5
- package/{scripts/lib → lib/forge}/gh-rest.sh +1 -1
- package/{scripts/lib → lib/forge}/init-github.sh +18 -8
- package/lib/verbs/PROMPTS.md +146 -0
- package/lib/verbs/annotate-setup.sh +149 -0
- package/{scripts → lib/verbs}/autopilot-run-test.sh +9 -9
- package/{scripts → lib/verbs}/autopilot-run.sh +9 -9
- package/{scripts → lib/verbs}/autopilot-test.sh +7 -6
- package/{scripts → lib/verbs}/autopilot.sh +3 -3
- package/{scripts/lib → lib/verbs}/captain-test.sh +1 -1
- package/{scripts/lib → lib/verbs}/captain.sh +7 -7
- package/lib/verbs/capture-project-ids.sh +99 -0
- package/{scripts/lib → lib/verbs}/content-kinds-gc-test.sh +7 -7
- package/{scripts/lib → lib/verbs}/contribute-root-test.sh +4 -4
- package/{scripts/lib → lib/verbs}/contribute-root.sh +1 -1
- package/{scripts → lib/verbs}/contribute.sh +8 -8
- package/{scripts → lib/verbs}/copilot-loop-test.sh +4 -4
- package/{scripts/lib → lib/verbs}/copilot-test.sh +11 -10
- package/{scripts/lib → lib/verbs}/copilot.sh +7 -7
- package/{scripts → lib/verbs}/database-supabase-test.sh +6 -6
- package/{scripts/lib → lib/verbs}/effort-close-subs-test.sh +6 -6
- package/{scripts/lib → lib/verbs}/effort-dispatch-test.sh +3 -3
- package/{scripts/lib → lib/verbs}/effort-flows-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/effort-ops-test.sh +13 -13
- package/lib/verbs/effort-ops.sh +1571 -0
- package/{scripts/lib → lib/verbs}/effort-parity-test.sh +10 -10
- package/{scripts/lib → lib/verbs}/effort-plan-test.sh +7 -7
- package/lib/verbs/effort-plan.sh +289 -0
- package/{scripts/lib → lib/verbs}/effort-review-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/effort-review.sh +2 -2
- package/{scripts/lib → lib/verbs}/grill-record-test.sh +1 -1
- package/lib/verbs/grill-record.sh +88 -0
- package/{scripts/lib → lib/verbs}/handoff.sh +2 -2
- package/{scripts → lib/verbs}/init-content-test.sh +14 -14
- package/{scripts/lib → lib/verbs}/init-guide.sh +6 -6
- package/{scripts → lib/verbs}/init-guided-test.sh +9 -9
- package/{scripts → lib/verbs}/init-recipes-test.sh +7 -7
- package/{scripts → lib/verbs}/init-upgrade-test.sh +9 -10
- package/lib/verbs/init.sh +1598 -0
- package/{scripts → lib/verbs}/install-test.sh +5 -5
- package/lib/verbs/install.sh +31 -0
- package/{scripts → lib/verbs}/integrations-check-test.sh +9 -9
- package/lib/verbs/integrations-check.sh +157 -0
- package/{scripts → lib/verbs}/kit-add-test.sh +8 -8
- package/lib/verbs/kit-add.sh +415 -0
- package/{scripts → lib/verbs}/kit-adopt-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-adopt.sh +6 -6
- package/{scripts/lib → lib/verbs}/kit-brief-test.sh +15 -15
- package/{scripts/lib → lib/verbs}/kit-brief.sh +12 -12
- package/lib/verbs/kit-bump-version.sh +79 -0
- package/lib/verbs/kit-digest.sh +126 -0
- package/{scripts → lib/verbs}/kit-doctor-test.sh +52 -32
- package/lib/verbs/kit-doctor.sh +991 -0
- package/{scripts → lib/verbs}/kit-export-project-test.sh +4 -4
- package/lib/verbs/kit-export-project.sh +245 -0
- package/{scripts → lib/verbs}/kit-export-training-test.sh +3 -3
- package/lib/verbs/kit-export-training.sh +175 -0
- package/{scripts/lib → lib/verbs}/kit-gc-test.sh +5 -5
- package/lib/verbs/kit-gc.sh +804 -0
- package/{scripts/lib → lib/verbs}/kit-hotfix.sh +3 -3
- package/{scripts/lib → lib/verbs}/kit-interview-test.sh +2 -2
- package/lib/verbs/kit-interview.sh +319 -0
- package/{scripts/lib → lib/verbs}/kit-lib-test.sh +1 -1
- package/{scripts/lib → lib/verbs}/kit-lib.sh +3 -3
- package/{scripts → lib/verbs}/kit-migrate-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-migrate.sh +5 -5
- package/{scripts/lib → lib/verbs}/kit-msg-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kit-msg.sh +2 -2
- package/{scripts → lib/verbs}/kit-onboard-test.sh +2 -3
- package/lib/verbs/kit-onboard.sh +69 -0
- package/{scripts → lib/verbs}/kit-promote-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-promote.sh +4 -4
- package/{scripts → lib/verbs}/kit-remove-test.sh +4 -4
- package/{scripts → lib/verbs}/kit-remove.sh +5 -5
- package/lib/verbs/kit-routines.sh +322 -0
- package/lib/verbs/kit-self-update.sh +55 -0
- package/{scripts/lib → lib/verbs}/kit-status-test.sh +2 -2
- package/lib/verbs/kit-status.sh +650 -0
- package/{scripts/lib → lib/verbs}/kit-task-ops-test.sh +8 -2
- package/lib/verbs/kit-task-ops.sh +793 -0
- package/{scripts → lib/verbs}/kit-version-check-test.sh +3 -3
- package/lib/verbs/kit-version-check.sh +121 -0
- package/{scripts → lib/verbs}/kit-wire-test.sh +6 -6
- package/{scripts → lib/verbs}/kit-wire.sh +8 -8
- package/{scripts/lib → lib/verbs}/kto-hotfix-test.sh +3 -3
- package/{scripts/lib → lib/verbs}/kto-task-close-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kto-task-new-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kto-task-pr-merge-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/kto-task-pr-test.sh +3 -3
- package/{scripts/lib → lib/verbs}/light-task-run-test.sh +4 -4
- package/{scripts/lib → lib/verbs}/light-task-test.sh +9 -9
- package/{scripts/lib → lib/verbs}/light-task.sh +11 -11
- package/{scripts/lib → lib/verbs}/next-test.sh +2 -2
- package/{scripts/lib → lib/verbs}/next.sh +4 -4
- package/{scripts → lib/verbs}/night-grant-test.sh +4 -4
- package/lib/verbs/night-grant.sh +454 -0
- package/{scripts → lib/verbs}/night-run-test.sh +3 -3
- package/{scripts → lib/verbs}/night-run.mjs +2 -2
- package/{scripts → lib/verbs}/orchestrate-test.sh +5 -5
- package/{scripts → lib/verbs}/orchestrate.sh +15 -15
- package/{scripts/lib → lib/verbs}/plan-machine-test.sh +1 -1
- package/{scripts/lib → lib/verbs}/plan-machine.sh +4 -4
- package/{scripts/lib → lib/verbs}/plan-next-test.sh +1 -1
- package/lib/verbs/plan-next.sh +213 -0
- package/{scripts → lib/verbs}/publish.sh +10 -10
- package/{scripts/lib → lib/verbs}/review-page-test.sh +4 -4
- package/lib/verbs/review-page.sh +375 -0
- package/lib/verbs/setup-labels.sh +96 -0
- package/lib/verbs/setup-milestones.sh +34 -0
- package/{scripts → lib/verbs}/showcase.sh +2 -2
- package/{scripts/lib → lib/verbs}/sprint-test.sh +5 -5
- package/{scripts/lib → lib/verbs}/sprint.sh +2 -2
- package/{scripts → lib/verbs}/status-test.sh +7 -7
- package/{scripts → lib/verbs}/status.sh +12 -12
- package/{scripts → lib/verbs}/task-sync-test.sh +6 -6
- package/lib/verbs/task-sync.sh +462 -0
- package/{scripts/lib → lib/verbs}/upgrade-report-test.sh +4 -4
- package/lib/verbs/ux-a11y-scan.sh +96 -0
- package/lib/verbs/ux-ds-audit.sh +146 -0
- package/lib/verbs/ux-graph-scan.sh +188 -0
- package/{scripts → lib/verbs}/wave-worker.sh +2 -2
- package/lib/verbs/web-install.sh +22 -0
- package/package.json +3 -10
- package/scripts/PROMPTS.md +13 -0
- package/scripts/agent-skills-lint.sh +12 -113
- package/scripts/agent-template-lint.sh +12 -56
- package/scripts/annotate-setup.sh +11 -151
- package/scripts/benchmark/checkpoint-test.sh +1 -1
- package/scripts/benchmark/checkpoint.sh +1 -1
- package/scripts/benchmark/gate.sh +2 -2
- package/scripts/benchmark/lib/bench-common.sh +1 -1
- package/scripts/capture-project-ids.sh +12 -86
- package/scripts/check.sh +12 -112
- package/scripts/force-push-fence.sh +12 -49
- package/scripts/init.sh +13 -1637
- package/scripts/install.sh +12 -29
- package/scripts/instruction-budget-lint.sh +13 -218
- package/scripts/integrations-check.sh +12 -155
- package/scripts/kit-add.sh +12 -413
- package/scripts/kit-bump-version.sh +13 -78
- package/scripts/kit-digest.sh +13 -125
- package/scripts/kit-doctor.sh +13 -1065
- package/scripts/kit-export-project.sh +12 -243
- package/scripts/kit-export-training.sh +12 -173
- package/scripts/kit-onboard.sh +12 -67
- package/scripts/kit-routines.sh +12 -320
- package/scripts/kit-self-update.sh +12 -53
- package/scripts/kit-version-check.sh +12 -106
- package/scripts/knowledge-lint.sh +13 -98
- package/scripts/lib/board-view.sh +13 -96
- package/scripts/lib/branch-owner.sh +12 -199
- package/scripts/lib/commitlint.sh +12 -52
- package/scripts/lib/config-path.sh +13 -29
- package/scripts/lib/effort-metrics.sh +12 -589
- package/scripts/lib/effort-ops.sh +13 -1570
- package/scripts/lib/effort-plan.sh +12 -287
- package/scripts/lib/effort.sh +13 -338
- package/scripts/lib/gh-log.sh +14 -59
- package/scripts/lib/gh-project.sh +13 -376
- package/scripts/lib/grill-record.sh +13 -87
- package/scripts/lib/integration-install.sh +12 -255
- package/scripts/lib/integrations.sh +12 -242
- package/scripts/lib/kinds.sh +13 -65
- package/scripts/lib/kit-config.sh +12 -165
- package/scripts/lib/kit-events.sh +13 -71
- package/scripts/lib/kit-gc.sh +12 -802
- package/scripts/lib/kit-interview.sh +11 -316
- package/scripts/lib/kit-local.sh +12 -85
- package/scripts/lib/kit-status.sh +12 -648
- package/scripts/lib/kit-task-ops.sh +13 -789
- package/scripts/lib/naming.sh +12 -170
- package/scripts/lib/plan-next.sh +13 -212
- package/scripts/lib/pr-evidence.sh +12 -359
- package/scripts/lib/react-detect.sh +12 -77
- package/scripts/lib/review-page.sh +11 -372
- package/scripts/lib/role-identity.sh +13 -70
- package/scripts/lib/secret-guard.sh +12 -114
- package/scripts/lib/session-registry.sh +13 -232
- package/scripts/lib/spec-lint.sh +13 -94
- package/scripts/lib/worktree-issue.sh +12 -170
- package/scripts/lib/worktree-start.sh +13 -789
- package/scripts/night-grant.sh +12 -452
- package/scripts/review-lint.sh +13 -258
- package/scripts/setup-labels.sh +11 -82
- package/scripts/setup-milestones.sh +12 -21
- package/scripts/skill-frontmatter-lint.sh +13 -181
- package/scripts/task-sync.sh +13 -450
- package/scripts/terms-check.sh +13 -241
- package/scripts/ux-a11y-scan.sh +13 -95
- package/scripts/ux-ds-audit.sh +12 -144
- package/scripts/ux-graph-scan.sh +12 -186
- package/scripts/web-install.sh +16 -20
- package/docs/kit-annotate/01-explainer.html +0 -225
- package/docs/kit-annotate/02-implementation-plan.html +0 -196
- package/docs/media/.onboarding-capture.cast +0 -5
- package/docs/media/README.md +0 -43
- package/docs/media/build-demo.sh +0 -63
- package/docs/media/build-kit-init.sh +0 -51
- package/docs/media/build-onboarding.sh +0 -51
- package/docs/media/kit-dry-run.cast +0 -107
- package/docs/media/kit-dry-run.gif +0 -0
- package/docs/media/kit-init.cast +0 -56
- package/docs/media/kit-init.gif +0 -0
- package/docs/media/kit-onboarding.cast +0 -148
- package/docs/media/kit-onboarding.gif +0 -0
- package/integrations/mempalace.json +0 -28
- package/scripts/review-lint-baseline.txt +0 -28
- package/scripts/verbs.baseline +0 -5
- package/templates/hooks/mempal_followup.sh.tmpl +0 -97
- package/templates/hooks/mempal_precompact.sh.tmpl +0 -4
- package/templates/hooks/mempal_save.sh.tmpl +0 -4
- package/templates/hooks/mempal_session_start.sh.tmpl +0 -42
- package/templates/rules/mempalace.md +0 -111
- /package/{commands → kit/commands}/kit-docs.md +0 -0
- /package/{commands → kit/commands}/kit-export-training.md +0 -0
- /package/{databases → kit/databases}/supabase/guide.html +0 -0
- /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/client.ts +0 -0
- /package/{databases → kit/databases}/supabase/nextjs/lib/supabase/server.ts +0 -0
- /package/{githooks → kit/githooks}/pre-commit +0 -0
- /package/{integrations → kit/integrations}/emil-design-eng.json +0 -0
- /package/{integrations → kit/integrations}/graft.json +0 -0
- /package/{integrations → kit/integrations}/impeccable.json +0 -0
- /package/{integrations → kit/integrations}/lavish.json +0 -0
- /package/{integrations → kit/integrations}/mlx-lm.json +0 -0
- /package/{integrations → kit/integrations}/web-design-guidelines.json +0 -0
- /package/{recipes → kit/recipes}/nextjs-shadcn.json +0 -0
- /package/{skills → kit/skills}/kit-advisor/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/close.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/grill.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/orchestrate.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/plan.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/review.md +0 -0
- /package/{skills → kit/skills}/kit-advisor/references/step-report.md +0 -0
- /package/{skills → kit/skills}/kit-docs-writer/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-effort-pr/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-next/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-onboard/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-plan-next/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-security-sweep/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-ship/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-task-pr-auto/SKILL.md +0 -0
- /package/{skills → kit/skills}/kit-ux-audit/references/a11y.md +0 -0
- /package/{skills → kit/skills}/kit-ux-audit/references/consistency.md +0 -0
- /package/{skills → kit/skills}/kit-ux-audit/references/heuristics.md +0 -0
- /package/{templates → kit/templates}/benchmarks/SCHEMA.md +0 -0
- /package/{templates → kit/templates}/benchmarks/abstain.jsonl +0 -0
- /package/{templates → kit/templates}/benchmarks/adversarial.jsonl +0 -0
- /package/{templates → kit/templates}/benchmarks/benchmark.config.json +0 -0
- /package/{templates → kit/templates}/benchmarks/quality.jsonl +0 -0
- /package/{templates → kit/templates}/benchmarks/retrieval.jsonl +0 -0
- /package/{templates → kit/templates}/codex/hooks.json.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/guard-base-branch-commit.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/guard-raw-git-ops.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/kit-local-status.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/kit-mail-check.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/kit_version_check.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/prepush_gate.sh.tmpl +0 -0
- /package/{templates → kit/templates}/hooks/repo-hygiene.sh.tmpl +0 -0
- /package/{templates → kit/templates}/knowledge-INDEX.md.tmpl +0 -0
- /package/{templates → kit/templates}/lib/kit-sigil.sh.tmpl +0 -0
- /package/{templates → kit/templates}/rules/authoring.md +0 -0
- /package/{templates → kit/templates}/rules/code-retrieval.md +0 -0
- /package/{templates → kit/templates}/rules/communication-style.md +0 -0
- /package/{templates → kit/templates}/rules/delegation-brief.md +0 -0
- /package/{templates → kit/templates}/rules/design-routing.md +0 -0
- /package/{templates → kit/templates}/rules/effort-model.md +0 -0
- /package/{templates → kit/templates}/rules/gate-and-review.md +0 -0
- /package/{templates → kit/templates}/rules/issue-lifecycle.md +0 -0
- /package/{templates → kit/templates}/rules/knowledge-base.md +0 -0
- /package/{templates → kit/templates}/rules/naming-and-ids.md +0 -0
- /package/{templates → kit/templates}/rules/plain-language.md +0 -0
- /package/{templates → kit/templates}/rules/plan-next.md +0 -0
- /package/{templates → kit/templates}/rules/plan-output-format.md +0 -0
- /package/{templates → kit/templates}/rules/review-pages.md +0 -0
- /package/{templates → kit/templates}/rules/risk-tiered-review.md +0 -0
- /package/{templates → kit/templates}/rules/shared-checkout.md +0 -0
- /package/{templates → kit/templates}/rules/skill-gaps.md +0 -0
- /package/{templates → kit/templates}/rules/task-management.md +0 -0
- /package/{templates → kit/templates}/settings/settings.json.tmpl +0 -0
- /package/{templates → kit/templates}/settings/settings.local.json.tmpl +0 -0
- /package/{templates → kit/templates}/skills/NAMESPACED +0 -0
- /package/{templates → kit/templates}/skills/brand-voice/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/brand-voice/references/voice-template.md +0 -0
- /package/{templates → kit/templates}/skills/campaign/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/campaign/references/plan-template.md +0 -0
- /package/{templates → kit/templates}/skills/concrete/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/copywriting/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/copywriting/references/copy-frameworks.md +0 -0
- /package/{templates → kit/templates}/skills/copywriting/references/natural-transitions.md +0 -0
- /package/{templates → kit/templates}/skills/feature-build-refine/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/karpathy-guidelines/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/morning-briefing/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/add.json +0 -0
- /package/{templates → kit/templates}/skills/page-design/references/design-file-template.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/references/generic-page-patterns.md +0 -0
- /package/{templates → kit/templates}/skills/page-design/references/minimum-rules.md +0 -0
- /package/{templates → kit/templates}/skills/speckit/SKILL.md +0 -0
- /package/{templates → kit/templates}/skills/supabase-patterns/SKILL.md +0 -0
- /package/{scripts/lib → lib/core}/adapter-select.sh +0 -0
- /package/{scripts/lib → lib/core}/agent-launch.sh +0 -0
- /package/{scripts/lib → lib/core}/agent-profile.sh +0 -0
- /package/{scripts/lib → lib/core}/cckit-output.sh +0 -0
- /package/{scripts/lib → lib/core}/codex-hooks.sh +0 -0
- /package/{scripts → lib/core}/force-push-fence.baseline +0 -0
- /package/{scripts → lib/core}/forge-fence.baseline +0 -0
- /package/{scripts/lib → lib/core}/git-remote.sh +0 -0
- /package/{scripts/lib → lib/core}/hook-refresh.sh +0 -0
- /package/{scripts → lib/core}/instruction-budget-lint-test.sh +0 -0
- /package/{scripts/lib → lib/core}/kit-state.sh +0 -0
- /package/{scripts/lib → lib/core}/orchestration-runtime.sh +0 -0
- /package/{scripts/lib → lib/core}/project-scan.sh +0 -0
- /package/{scripts/lib → lib/core}/render.sh +0 -0
- /package/{scripts → lib/core}/review-lint-test.sh +0 -0
- /package/{scripts/lib → lib/core}/review-stage.sh +0 -0
- /package/{scripts → lib/core}/skill-frontmatter-lint-test.sh +0 -0
- /package/{scripts/lib → lib/core}/task-source-file.sh +0 -0
- /package/{scripts/lib → lib/core}/task-source.sh +0 -0
- /package/{scripts/lib → lib/core}/toon.sh +0 -0
- /package/{scripts/lib → lib/core}/ui.sh +0 -0
- /package/{scripts/lib → lib/core}/worker-brief.sh +0 -0
- /package/{scripts/lib → lib/forge}/forge-github.sh +0 -0
- /package/{scripts/lib → lib/forge}/forge-none.sh +0 -0
- /package/{scripts/lib → lib/forge}/test-forge-shim.sh +0 -0
- /package/{scripts → lib/verbs}/debug.sh +0 -0
- /package/{scripts → lib/verbs}/night-run.test.mjs +0 -0
- /package/{scripts/lib → lib/verbs}/upgrade-report.sh +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# lib/verbs/ — the verbs, for an agent that runs or changes one
|
|
2
|
+
|
|
3
|
+
Read when a verb is the task; AGENTS.md points here instead of loading it in every session. The
|
|
4
|
+
machine-readable list is `lib/core/verbs.tsv`; the reference for people is
|
|
5
|
+
`docs-site/src/content/docs/cli-reference.mdx`.
|
|
6
|
+
|
|
7
|
+
## Core verbs
|
|
8
|
+
|
|
9
|
+
Every verb, the question it answers, one prompt to paste, its usage and whether it uses the forge
|
|
10
|
+
live in one table, `lib/core/verbs.tsv`. `cckit help` prints it grouped by question, git
|
|
11
|
+
mechanics first; `cckit commands --json` returns it as data, one object per verb. The table below
|
|
12
|
+
carries the flags and behaviour of each verb.
|
|
13
|
+
|
|
14
|
+
| Verb | Purpose | LLM mode |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `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 `kit/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 `kit/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 `kit/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 (`kit/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 | — |
|
|
17
|
+
| `cckit status --board` | board state / what's unblocked. Every read (not `--raw-json`, not a `--cached` hit) also writes `.cckit/board.md` atomically: one tab-separated line per open issue (`#N`, status, kind, effort token `E546` / `E546.3` / `-`, labels, title), grouped Efforts / Sub-issues / Standalone, for `rg '#572' <path>` (`.cckit/` is gitignored, so give the path; sync prints it). `--no-snapshot` skips it, `CCKIT_BOARD_SNAPSHOT=<path>` moves it; no forge, no file | `--llm` → TOON |
|
|
18
|
+
| `cckit status --board --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) |
|
|
19
|
+
| `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 `--json`, 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 effort plan --issues` · daily `cckit next` · Friday `cckit gc`); the TOON rows stay `{number,ctx,title}` | `--json` → TOON |
|
|
20
|
+
| `cckit effort plan --issues` | wave plan: deps-ordered, priority-sorted within a wave, file-disjoint, session-fit | `--json` → TOON |
|
|
21
|
+
| `cckit effort plan --next` | forward plan: inventory current skills/verbs/rules/docs → propose what to build next | `--json` → TOON |
|
|
22
|
+
| `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 | `--json` → 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) |
|
|
23
|
+
| `cckit brief <issue>` | the delegation brief for an issue, from real state: worktree, seed freshness, owned files, the helpers they sit on, standing gotchas | — |
|
|
24
|
+
| `cckit effort plan --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) | `--json` → TOON (wave data only, identical for both adapters) |
|
|
25
|
+
| `cckit watch [--merge] [--loop]` | captain: gate open PRs, squash-merge CLEAN, advance the wave | — |
|
|
26
|
+
| `cckit agent receipt <issue> --stage <s> [--no-remote]` · `cckit agent receipt <issue> --report <file> [--dry-run]` | `--stage` records one stage receipt from stdin, locally and as a comment on the issue. `--report` posts a step report's short trail comment on the issue: the `## Status` head, the report's URLs, the `## Waiting for a yes` items and the report's file name (never an absolute path), capped at 1500 characters. It refuses, posting nothing, when the comment would carry a leak-list word or a home path; `--dry-run` prints it; with no forge it says the comment was not posted and prints it | — |
|
|
27
|
+
| `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 | `--json` → JSON (`lanes` → a JSON array of `{lane, branch, worktree, ports, up, verdict}`, `[]` with no lane) |
|
|
28
|
+
| `cckit start <issue\|E<n>\|E<n>.<step>> [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 | `--json` |
|
|
29
|
+
| `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 | `--json` |
|
|
30
|
+
| `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 | `--json` → JSON (`ok`, `url`, `worktree`, `detail`; a refusal is `ok:false` with the reason in `detail`) |
|
|
31
|
+
| `cckit close <issue> <summary>` | close issue + mark done | `--json` |
|
|
32
|
+
| `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) | `--json` → `new` one JSON object, `list` a JSON array, `next` one object or `null` |
|
|
33
|
+
| `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 | `--json` → JSON (`ok`, `id`, `worktree`, `branch`) |
|
|
34
|
+
| `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 | `--json` → JSON (`ok`, `url`, `detail`) |
|
|
35
|
+
| `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 | `--json` → JSON (`ok`, `id`, `url`, `detail`) |
|
|
36
|
+
| `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 | `--json` → JSON (`ok`, `url`, `detail`) |
|
|
37
|
+
| `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 | `--json` → JSON array |
|
|
38
|
+
| `cckit effort new --spec T "<name>" ["sub :: desc" …]` | parent (5-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>`. The body's `## Spec` (what done means, a list) is required: `--spec` or `--spec-file`, plain lines made `- ` bullets; a missing, empty or TODO/TBD-only Spec is refused before any write. `cckit effort close` re-reads it and refuses the same way; `--no-spec-check` skips that check and says so in one line | flags: `--spec/--spec-file` (required), `--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:` |
|
|
39
|
+
| `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 effort plan --issues` 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 | — |
|
|
40
|
+
| `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` |
|
|
41
|
+
| `cckit effort pr [<slug\|N>]` | the ONE effort PR, titled as a Conventional Commit subject carrying the effort token: `type(scope): name [E<n>]` (scope = the `flow:` label, else a legacy title's `[Flow]` tag; type = `--type`, else the `kind:` label, default `feat`). Refuses before the commit, the push or any forge call when the title fails `naming_title_lint pr` (`lib/core/naming.sh`: `commitlint_check` + a trailing `[E<n>]`, `[E<n>.<step>]` or `[#<n>]`). `pr.titleStyle: issue-title` gives `[Role] [#N] name` with no lint | flags: `--summary[-file]`, `--for-agents[-file]`, `--title`, `--type` |
|
|
42
|
+
| `cckit effort sub <N> "<name>"` | add one sub-issue to effort N, titled `[E<N>.<step>] <name>` (step = the effort's sub-issue count + 1), labelled from the parent (kind, priority, role), linked as a native sub-issue and added to the board. Refuses, before any write, a name that breaks the naming rule or a parent without the `effort` label. `--spec` adds an optional `## Spec` to the sub body, linted when given | `--kind K`, `--body B`, `--spec T` |
|
|
43
|
+
| `cckit effort retitle [<N>]` | list each legacy `[Effort] N · ` effort title and open `[Effort N] M · ` sub title beside its `[E<n>]` / `[E<n>.<step>]` form. A dry run; writes nothing. Without `<N>`, every open effort | `--apply` renames them |
|
|
44
|
+
| `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 | `--json` → JSON |
|
|
45
|
+
| `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 `lib/verbs/wave-worker.sh`, which records how the process ended | — (use `--dry-run`) |
|
|
46
|
+
| `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 | `--json` → JSON |
|
|
47
|
+
| `cckit autopilot [<a> …]` | select work, then call `orchestrate --detach` under a cap | — (use `--dry-run`) |
|
|
48
|
+
| `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`) |
|
|
49
|
+
| `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 | `--json` → JSON counts (`safe`, `landed`, `protected`, `orphan`, `unknown`) |
|
|
50
|
+
| `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 | `--json` → JSON counts + `applied` |
|
|
51
|
+
| `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 | `--json` → JSON (`mode`: `{mode, reason}`; `open`: `{mode, file}`; `answer`: `{ok, where, issue\|file, written}`) |
|
|
52
|
+
| `cckit agent render` | stdin markdown → rich (glow on a TTY; verbatim when piped) | — |
|
|
53
|
+
| `cckit version` | the installed cckit version | `--json` |
|
|
54
|
+
|
|
55
|
+
Every verb accepts a global `--json` (older spellings `--llm` and `--output=json` still work); verbs that produce a result emit a
|
|
56
|
+
single JSON object/array on stdout, with human text on stderr. Interactive/launch verbs
|
|
57
|
+
(`init`, `orchestrate`, `autopilot`) have no JSON result — use `--dry-run` to inspect their plan.
|
|
58
|
+
`cckit brief` has no JSON form either, and deliberately: its output IS the prompt you hand a
|
|
59
|
+
delegated agent, so markdown is the machine-readable form. Read the facts behind it as data with
|
|
60
|
+
`cckit agent lib --json` and `cckit status --json`.
|
|
61
|
+
|
|
62
|
+
> **`cckit effort plan --next` is the one exception to "feed verb output back to the model."** Its forward
|
|
63
|
+
> plan is for the human/orchestrator's decision only — never inject it into a monitored model's
|
|
64
|
+
> prompt or context (context-anxiety rule). Run it, decide, and hand only the chosen, scoped effort
|
|
65
|
+
> to an agent. `cckit effort plan --issues` / `cckit next` (ordering existing work) remain safe to reason over.
|
|
66
|
+
|
|
67
|
+
### Lifecycle ops (so autopilot runs unattended)
|
|
68
|
+
|
|
69
|
+
Every operation an unattended run needs is reachable through the one CLI:
|
|
70
|
+
|
|
71
|
+
| Verb | Purpose |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `cckit scan` | detect the repo's stack + kit state (emits JSON) |
|
|
74
|
+
| `cckit doctor [--fix]` | onboarding preflight (deps, the forge: a GitHub token, `gh` optional); 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 `kit/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. Prints one `loose issues` row: the count of open issues that are no effort, no sub-issue and not in Backlog on the board (board off: every standalone issue counts); skipped, and said so, with no forge. `cckit doctor --loose` lists them (`#N title`); `--loose --ratchet [--baseline=FILE]` exits 1 when the count rose above `lib/core/loose-issues.baseline`, 2 when it could not be judged. Not part of `lib/core/check.sh`, which stays offline |
|
|
75
|
+
| `cckit add [<name>] [--set k=v] [--answers FILE] [--dir DIR]` | no name: list every integration descriptor in `kit/integrations/`, the modules and the kit skills that can be added, exit 0 (`--json` → 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/) |
|
|
76
|
+
| `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 |
|
|
77
|
+
| `cckit migrate [--dry-run]` | reshuffle an old kit layout to the current one; `--dry-run` writes nothing |
|
|
78
|
+
| `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/) |
|
|
79
|
+
| `cckit digest <path\|url>` | summarize one file or URL with the local model (exit 2 when the local model server is down) |
|
|
80
|
+
| `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 |
|
|
81
|
+
| `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 |
|
|
82
|
+
| `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 |
|
|
83
|
+
|
|
84
|
+
### Orchestration flags (`orchestrate` / `autopilot`)
|
|
85
|
+
|
|
86
|
+
| Flag | Effect |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `--dry-run` | resolve + print the launch plan; create no worktrees, start nothing |
|
|
89
|
+
| `--cap <N>` | concurrency cap (default 4); flows past the cap are queued + reported |
|
|
90
|
+
| `--agent <cmd>` | per-pane agent command (default `claude`, or `CCKIT_AGENT=`) — drive any CLI agent |
|
|
91
|
+
| `--profile <name>` | run a declared agent profile (or `CCKIT_PROFILE=`): its `kind` becomes the agent and its `args` are passed to the CLI. Unset picks the cheapest-tier profile; `--agent` overrides and skips profiles entirely. A project that declares none is unaffected |
|
|
92
|
+
| `--runtime <tmux\|herdr>` | terminal owner (default `tmux`, or `CCKIT_RUNTIME=`); Herdr requires a supported agent kind such as `codex` or `claude` |
|
|
93
|
+
| `--force` | launch even if an issue is `blocked_by` an OPEN issue (the gate is on by default) |
|
|
94
|
+
| `--no-seed` | start the agent without an auto-prompt |
|
|
95
|
+
|
|
96
|
+
**Base branch override.** `KIT_BASE_BRANCH` in the environment wins over `github.baseBranch` in the
|
|
97
|
+
config for that invocation: `KIT_BASE_BRANCH=effort/<N>-<slug> cckit orchestrate <sub>` cuts the
|
|
98
|
+
sub's worktree from the effort branch instead of the base. `orchestrate` then prints
|
|
99
|
+
`base '<branch>' comes from KIT_BASE_BRANCH in the environment (the config says '<base>')`. The
|
|
100
|
+
branch must exist on origin (`wt_start` fetches it). Every verb that loads the config reads the same
|
|
101
|
+
variable — `cckit start` cuts from it and `cckit pr` targets it — so set it per command, not with a
|
|
102
|
+
shell-wide `export`. `orchestrate` passes an override on to each agent pane (tmux: `env KIT_BASE_BRANCH=…`
|
|
103
|
+
on the agent's command line; Herdr: `--env`), so `cckit pr` in the pane targets the branch the
|
|
104
|
+
worktree was cut from. The base cckit resolved from a config is not an override in a child process:
|
|
105
|
+
a `cckit` run in another project reads its own config.
|
|
106
|
+
|
|
107
|
+
### Night mode (no verb: `/kit-autopilot` + two scripts)
|
|
108
|
+
|
|
109
|
+
The `kit-autopilot` skill reads the owner's night grant with `lib/verbs/night-grant.sh read <parent>`
|
|
110
|
+
and launches the Workflow script `lib/verbs/night-run.mjs` with the args that prints. In a consuming
|
|
111
|
+
project both live under `${CLAUDE_PLUGIN_ROOT}/scripts/`.
|
|
112
|
+
|
|
113
|
+
| Rule | What the scripts enforce |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| 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 |
|
|
116
|
+
| Approval | the grant's `waves` list; no label or body section on the effort is required |
|
|
117
|
+
| Width | `effort.wipLimit` efforts at once (default 2), never more than 4; executors never pass `--force` |
|
|
118
|
+
| Wave order | a wave that did not fully merge ends the run `blocked`; no later wave starts |
|
|
119
|
+
| Final check | the gate on the base branch, even when the grant sets a `stopCommand` |
|
|
120
|
+
| Waivers | each must equal one floor name; `workflows`, `cost`, `secret` and `night.neverWaivable` are never waivable |
|
|
121
|
+
|
|
122
|
+
Config: `night.floors`, `night.neverWaivable`, `night.gate`, `night.grantors`, `night.refuseLabels`
|
|
123
|
+
— see [Night mode](https://cckit.dev/config-and-permissions/#night-mode).
|
|
124
|
+
|
|
125
|
+
## Model endpoint
|
|
126
|
+
|
|
127
|
+
cckit shells out to whatever agent invokes it; it does not embed a model. The endpoint the verbs
|
|
128
|
+
that synthesize text read is configured by environment variable names, never values:
|
|
129
|
+
|
|
130
|
+
`cckit effort close` appends one record per effort to `<git-common-dir>/effort-metrics/records.jsonl`;
|
|
131
|
+
its fields, their sources and when each is `null` are in the README under *The effort metrics record*.
|
|
132
|
+
|
|
133
|
+
The effort-close judge reads an OpenAI-compatible endpoint from `CCKIT_MODEL_URL` (base URL; it
|
|
134
|
+
POSTs to `<value>/chat/completions`), `CCKIT_MODEL` (model name) and `CCKIT_MODEL_TOKEN` (bearer
|
|
135
|
+
token). A project with its own variables names them in the config instead — `model.urlEnv`,
|
|
136
|
+
`model.modelEnv`, `model.tokenEnv` hold env var **names**, never values. See
|
|
137
|
+
[Model endpoint for the effort judge](https://cckit.dev/config-and-permissions/#model-endpoint-for-the-effort-judge).
|
|
138
|
+
|
|
139
|
+
**Agent profiles** (`agents.profiles` in the config) carry a spend `tier`, a permission policy and
|
|
140
|
+
extra CLI argv. **cckit never names a model** — you spell your own flags in `args`, and the
|
|
141
|
+
cheapest-tier profile runs when `agents.default` is unset, so the inexpensive path is the default
|
|
142
|
+
by construction. A profile also declares the `stages` it may run at and whether it may
|
|
143
|
+
`write` to a branch; a profile with no `stages` is allowed nowhere, and `write` defaults to false.
|
|
144
|
+
Validation refuses an undeclared profile, a missing `kind`, an unknown stage, or a dangling
|
|
145
|
+
`agents.default` **before** a worktree or pane exists. See
|
|
146
|
+
[Agent profiles](https://cckit.dev/config-and-permissions/#agent-profiles).
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# claude-kit — wire Agentation (in-app visual UI annotation) into a React project, for Claude Code.
|
|
3
|
+
# Installs the third-party `agentation` dev dependency, registers the `agentation-mcp` MCP server
|
|
4
|
+
# for Claude, writes the react-annotate rule, and records the choice in .claude/kit.config.json.
|
|
5
|
+
# It PRINTS the dev-only provider snippet to add to the app entry — the /kit-annotate skill applies
|
|
6
|
+
# that source edit with your confirmation (layouts vary too much for a safe blind sed).
|
|
7
|
+
#
|
|
8
|
+
# Agentation is PolyForm Shield 1.0.0, source-available. This installs it as YOUR project's own dev
|
|
9
|
+
# dependency (npm fetches it at your direction); the kit vendors none of its code.
|
|
10
|
+
#
|
|
11
|
+
# Usage: lib/verbs/annotate-setup.sh [--target DIR] [--framework next|vite|react-router] [--dry-run]
|
|
12
|
+
set -euo pipefail
|
|
13
|
+
|
|
14
|
+
KIT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
15
|
+
command -v jq >/dev/null 2>&1 || { echo "✗ jq is required." >&2; exit 1; }
|
|
16
|
+
command -v perl >/dev/null 2>&1 || { echo "✗ perl is required." >&2; exit 1; }
|
|
17
|
+
|
|
18
|
+
TARGET="$PWD"; FRAMEWORK_OVERRIDE=""; DRY_RUN=0
|
|
19
|
+
while [[ $# -gt 0 ]]; do
|
|
20
|
+
case "$1" in
|
|
21
|
+
--target) TARGET="$2"; shift 2 ;;
|
|
22
|
+
--framework) FRAMEWORK_OVERRIDE="$2"; shift 2 ;;
|
|
23
|
+
--dry-run) DRY_RUN=1; shift ;;
|
|
24
|
+
-h|--help) sed -n '2,12p' "$0"; exit 0 ;;
|
|
25
|
+
*) echo "✗ unknown flag: $1" >&2; exit 1 ;;
|
|
26
|
+
esac
|
|
27
|
+
done
|
|
28
|
+
TARGET="$(cd "$TARGET" && pwd)"
|
|
29
|
+
|
|
30
|
+
# shellcheck source=/dev/null
|
|
31
|
+
source "$KIT_ROOT/lib/core/react-detect.sh"
|
|
32
|
+
react_detect "$TARGET"
|
|
33
|
+
[[ -n "$FRAMEWORK_OVERRIDE" ]] && REACT_FRAMEWORK="$FRAMEWORK_OVERRIDE"
|
|
34
|
+
|
|
35
|
+
if [[ "$REACT_DETECTED" != "true" ]]; then
|
|
36
|
+
echo "✗ No React app detected in $TARGET (no 'react' in package.json)." >&2
|
|
37
|
+
echo " /kit-annotate targets React apps (Next.js, Vite, React Router). Skipping." >&2
|
|
38
|
+
exit 2
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
CFG="$TARGET/.claude/kit.config.json"
|
|
42
|
+
# Repo name from the git remote is the identity fallback; the directory basename is the last resort (#73).
|
|
43
|
+
# shellcheck source=/dev/null
|
|
44
|
+
. "$KIT_ROOT/lib/core/git-remote.sh"
|
|
45
|
+
REMOTE_NAME="$(git_remote_repo_name "$TARGET" 2>/dev/null || true)"; REMOTE_NAME="${REMOTE_NAME:-$(basename "$TARGET")}"
|
|
46
|
+
PROJECT_NAME="$REMOTE_NAME"; HTTP_PORT=4747
|
|
47
|
+
if [[ -f "$CFG" ]]; then
|
|
48
|
+
PROJECT_NAME="$(jq -r '.project.name // ""' "$CFG" 2>/dev/null || echo "$PROJECT_NAME")"
|
|
49
|
+
[[ -z "$PROJECT_NAME" || "$PROJECT_NAME" == "null" ]] && PROJECT_NAME="$REMOTE_NAME"
|
|
50
|
+
HTTP_PORT="$(jq -r '.annotate.mcp.httpPort // 4747' "$CFG" 2>/dev/null || echo 4747)"
|
|
51
|
+
fi
|
|
52
|
+
[[ -z "$HTTP_PORT" || "$HTTP_PORT" == "null" ]] && HTTP_PORT=4747
|
|
53
|
+
|
|
54
|
+
case "$REACT_PKG_MANAGER" in
|
|
55
|
+
pnpm) INSTALL_CMD="pnpm add -D agentation" ;;
|
|
56
|
+
yarn) INSTALL_CMD="yarn add -D agentation" ;;
|
|
57
|
+
bun) INSTALL_CMD="bun add -d agentation" ;;
|
|
58
|
+
*) INSTALL_CMD="npm install -D agentation" ;;
|
|
59
|
+
esac
|
|
60
|
+
MCP_ADD_CMD='claude mcp add agentation -- npx -y agentation-mcp server'
|
|
61
|
+
ENDPOINT="http://localhost:${HTTP_PORT}"
|
|
62
|
+
|
|
63
|
+
# Dev gate differs by framework: Next reads NODE_ENV; Vite/RR (Vite-based) use import.meta.env.DEV.
|
|
64
|
+
case "$REACT_FRAMEWORK" in
|
|
65
|
+
next) GATE='process.env.NODE_ENV === "development"' ;;
|
|
66
|
+
*) GATE='import.meta.env.DEV' ;;
|
|
67
|
+
esac
|
|
68
|
+
# The `endpoint` prop is REQUIRED. Without it the toolbar boots `disconnected`, writes only to the
|
|
69
|
+
# browser's localStorage, and annotations never reach the MCP receiver on :$HTTP_PORT — so Claude
|
|
70
|
+
# sees 0 sessions even while the user is annotating (the bug behind issue #157). Wire it everywhere.
|
|
71
|
+
SNIPPET="import { Agentation } from \"agentation\";
|
|
72
|
+
// …then, inside your root component's returned JSX, alongside the app:
|
|
73
|
+
{ ${GATE} && <Agentation endpoint=\"${ENDPOINT}\" /> }"
|
|
74
|
+
|
|
75
|
+
emit_rule() { # resolve <!-- IF:FLAG --> blocks + {{VARS}} exactly like lib/verbs/init.sh
|
|
76
|
+
local src="$1" dest="$2"
|
|
77
|
+
mkdir -p "$(dirname "$dest")"
|
|
78
|
+
KIT_FLAGS_ON="" PROJECT_NAME="$PROJECT_NAME" \
|
|
79
|
+
perl -0777 -pe '
|
|
80
|
+
my %on = map { $_=>1 } grep { length } split /,/, ($ENV{KIT_FLAGS_ON}//"");
|
|
81
|
+
1 while s{<!-- IF:(\w+) -->(.*?)<!-- /IF:\1 -->}{ $on{$1} ? $2 : "" }gse;
|
|
82
|
+
s/\{\{(\w+)\}\}/ exists $ENV{$1} ? $ENV{$1} : "{{$1}}" /ge;
|
|
83
|
+
' "$src" > "$dest"
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if [[ $DRY_RUN -eq 1 ]]; then
|
|
87
|
+
echo "→ DRY RUN — /kit-annotate setup plan for $TARGET"
|
|
88
|
+
echo ""
|
|
89
|
+
echo " React : yes (v${REACT_VERSION:-?})"
|
|
90
|
+
echo " Framework : $REACT_FRAMEWORK"
|
|
91
|
+
echo " Entry file : ${REACT_ENTRY_FILE:-"(not auto-found — the skill will ask)"}"
|
|
92
|
+
echo " Pkg manager : $REACT_PKG_MANAGER"
|
|
93
|
+
echo ""
|
|
94
|
+
echo " Would:"
|
|
95
|
+
echo " 1. $INSTALL_CMD"
|
|
96
|
+
echo " 2. $MCP_ADD_CMD"
|
|
97
|
+
echo " # Agentation's MCP: HTTP :4747 (browser toolbar → store) + MCP stdio (→ Claude)"
|
|
98
|
+
echo " 3. write .claude/rules/react-annotate.md"
|
|
99
|
+
echo " 4. merge .annotate into .claude/kit.config.json"
|
|
100
|
+
echo " 5. (skill applies, with your OK) wire the dev-only toolbar into ${REACT_ENTRY_FILE:-<entry>}:"
|
|
101
|
+
printf '%s\n' "$SNIPPET" | sed 's/^/ /'
|
|
102
|
+
echo ""
|
|
103
|
+
echo "Re-run without --dry-run to apply steps 1–4."
|
|
104
|
+
exit 0
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
echo "→ Installing agentation (dev dependency, $REACT_PKG_MANAGER)…"
|
|
108
|
+
( cd "$TARGET" && eval "$INSTALL_CMD" )
|
|
109
|
+
|
|
110
|
+
if grep -qi 'agentation' <<<"$(claude mcp list 2>/dev/null)"; then
|
|
111
|
+
echo " ✓ agentation MCP already registered for Claude"
|
|
112
|
+
else
|
|
113
|
+
echo "→ Registering the agentation MCP for Claude…"
|
|
114
|
+
( cd "$TARGET" && eval "$MCP_ADD_CMD" ) \
|
|
115
|
+
|| echo " ⚠ could not auto-register — run it yourself: $MCP_ADD_CMD"
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
emit_rule "$KIT_ROOT/kit/templates/rules/react-annotate.md" "$TARGET/.claude/rules/react-annotate.md"
|
|
119
|
+
echo " ✓ .claude/rules/react-annotate.md"
|
|
120
|
+
|
|
121
|
+
if [[ -f "$CFG" ]]; then
|
|
122
|
+
tmp="$(mktemp)"
|
|
123
|
+
jq --arg fw "$REACT_FRAMEWORK" --arg ver "$REACT_VERSION" --arg entry "$REACT_ENTRY_FILE" \
|
|
124
|
+
--argjson port "$HTTP_PORT" \
|
|
125
|
+
'.annotate = {
|
|
126
|
+
enabled: true,
|
|
127
|
+
backend: "agentation",
|
|
128
|
+
framework: $fw,
|
|
129
|
+
reactVersion: $ver,
|
|
130
|
+
entryFile: $entry,
|
|
131
|
+
package: "agentation",
|
|
132
|
+
mcp: { name: "agentation", server: "agentation-mcp", httpPort: $port }
|
|
133
|
+
}' "$CFG" > "$tmp" && mv "$tmp" "$CFG"
|
|
134
|
+
echo " ✓ .claude/kit.config.json (.annotate)"
|
|
135
|
+
else
|
|
136
|
+
echo " ⚠ no .claude/kit.config.json — run /kit-init first to persist annotate config (rule still written if .claude/ exists)"
|
|
137
|
+
fi
|
|
138
|
+
|
|
139
|
+
echo ""
|
|
140
|
+
echo "✓ Agentation wired for Claude — framework: $REACT_FRAMEWORK"
|
|
141
|
+
echo ""
|
|
142
|
+
echo "Next:"
|
|
143
|
+
echo " • Add the dev-only toolbar to ${REACT_ENTRY_FILE:-your app entry} — keep the endpoint prop:"
|
|
144
|
+
printf '%s\n' "$SNIPPET" | sed 's/^/ /'
|
|
145
|
+
echo " • Restart Claude Code so it loads the agentation MCP."
|
|
146
|
+
echo " • Start your dev server, then verify: npx agentation-mcp doctor"
|
|
147
|
+
echo " • Preflight: with the toolbar open + a note left, the receiver on :$HTTP_PORT should list a"
|
|
148
|
+
echo " session. Connected but 0 sessions ⇒ the endpoint prop is missing or the tab is stale."
|
|
149
|
+
exit 0
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
11
11
|
# shellcheck shell=bash
|
|
12
12
|
set -u
|
|
13
|
-
ROOT="$(cd "$(dirname "$0")
|
|
13
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
14
14
|
command -v jq >/dev/null 2>&1 || { echo "autopilot-run-test: jq absent — skipping"; exit 0; }
|
|
15
15
|
# shellcheck source=/dev/null
|
|
16
|
-
. "$ROOT/
|
|
16
|
+
. "$ROOT/lib/core/agent-launch.sh"
|
|
17
17
|
|
|
18
18
|
TMP="$(mktemp -d)"; trap 'rm -rf "$TMP"' EXIT
|
|
19
19
|
fail=0
|
|
@@ -81,7 +81,7 @@ cp "$TMP/bin/agent-stub" "$TMP/bin/claude"; cp "$TMP/bin/agent-stub" "$TMP/bin/c
|
|
|
81
81
|
# (`GET pulls?head=…`, answered from $FX/pr.url once a PR was opened) come from this fixture; the
|
|
82
82
|
# issue read (`GET issues/7`) is the shim's own, shaped by GH_TITLE and GH_LABELS.
|
|
83
83
|
# shellcheck source=/dev/null
|
|
84
|
-
. "$ROOT/
|
|
84
|
+
. "$ROOT/lib/forge/test-forge-shim.sh"; forge_shim_install "$TMP/bin"
|
|
85
85
|
export GH_LOG="$TMP/gh.log" GH_FIXTURE="$TMP/fixture.sh" GH_TOKEN=test-token CCKIT_FORGE=github
|
|
86
86
|
export GH_TITLE="thing" GH_LABELS='[{"name":"kind:task"}]'
|
|
87
87
|
# The lookup names the repo: autopilot-run.sh reads it from the origin URL and, when that is not a
|
|
@@ -96,7 +96,7 @@ STUB
|
|
|
96
96
|
export PATH="$TMP/bin:$PATH"
|
|
97
97
|
|
|
98
98
|
cd "$P" || exit 1
|
|
99
|
-
run() { bash "$ROOT/
|
|
99
|
+
run() { bash "$ROOT/lib/verbs/autopilot.sh" run "$@" > "$TMP/out" 2>&1; }
|
|
100
100
|
reason() { jq -r .reason "$STATE" 2>/dev/null; }
|
|
101
101
|
field() { jq -r "$1" "$STATE" 2>/dev/null; }
|
|
102
102
|
creates() { if [ -f "$TMP/gh.log" ]; then grep -c '^POST repos/fixture/project/pulls ' "$TMP/gh.log"; else echo 0; fi; }
|
|
@@ -126,7 +126,7 @@ t "--dry-run wrote no state" "$([ -d "$TMP/state" ] && echo wrote || echo no)" "
|
|
|
126
126
|
|
|
127
127
|
# ── --until that already passes: exit 0, no round, and stderr says nothing was done (#496) ───────
|
|
128
128
|
reset
|
|
129
|
-
bash "$ROOT/
|
|
129
|
+
bash "$ROOT/lib/verbs/autopilot.sh" run --objective x --until "true" > "$TMP/out" 2> "$TMP/err"
|
|
130
130
|
t "an --until that already passes exits 0" "$?" "0"
|
|
131
131
|
t "reason is done" "$(reason)" "done"
|
|
132
132
|
t "no round ran" "$(field .rounds)" "0"
|
|
@@ -222,7 +222,7 @@ for agent in claude codex; do
|
|
|
222
222
|
|
|
223
223
|
# kill mid-run, then resume: one PR, and none on a second resume.
|
|
224
224
|
reset
|
|
225
|
-
STUB_MODE=hang bash "$ROOT/
|
|
225
|
+
STUB_MODE=hang bash "$ROOT/lib/verbs/autopilot.sh" run --agent "$agent" --objective x --until "$UNTIL" \
|
|
226
226
|
--publish --summary "the thing works" > "$TMP/bg.out" 2>&1 &
|
|
227
227
|
dpid=$!
|
|
228
228
|
i=0; while [ ! -f "$TMP/agent.pid" ] && [ "$i" -lt 100 ]; do sleep 0.2; i=$((i + 1)); done
|
|
@@ -257,7 +257,7 @@ for agent in claude codex; do
|
|
|
257
257
|
# A token ceiling cannot be checked across an interrupted round: resuming under one stops with
|
|
258
258
|
# usage-unknown before another round starts, instead of counting the cut-short round as zero.
|
|
259
259
|
reset
|
|
260
|
-
STUB_MODE=hang bash "$ROOT/
|
|
260
|
+
STUB_MODE=hang bash "$ROOT/lib/verbs/autopilot.sh" run --agent "$agent" --objective x --until "$UNTIL" > "$TMP/bg.out" 2>&1 &
|
|
261
261
|
dpid=$!
|
|
262
262
|
i=0; while [ ! -f "$TMP/agent.pid" ] && [ "$i" -lt 100 ]; do sleep 0.2; i=$((i + 1)); done
|
|
263
263
|
kill -TERM "$dpid"; wait "$dpid"
|
|
@@ -270,7 +270,7 @@ for agent in claude codex; do
|
|
|
270
270
|
# round it left open is counted on resume, and a second resume does not count it twice.
|
|
271
271
|
if command -v perl >/dev/null 2>&1; then
|
|
272
272
|
reset
|
|
273
|
-
STUB_MODE=hang bash "$ROOT/
|
|
273
|
+
STUB_MODE=hang bash "$ROOT/lib/verbs/autopilot.sh" run --agent "$agent" --objective x --until "$UNTIL" > "$TMP/bg.out" 2>&1 &
|
|
274
274
|
dpid=$!
|
|
275
275
|
i=0; while [ ! -f "$TMP/agent.pid" ] && [ "$i" -lt 100 ]; do sleep 0.2; i=$((i + 1)); done
|
|
276
276
|
apid="$(cat "$TMP/agent.pid" 2>/dev/null)"
|
|
@@ -293,7 +293,7 @@ for agent in claude codex; do
|
|
|
293
293
|
# Without the watchdog (no perl) a SIGKILLed runner can leave its agent alive. The recorded pid
|
|
294
294
|
# is what stops the next start: a live one refuses --resume, --fresh and a new run alike.
|
|
295
295
|
reset
|
|
296
|
-
STUB_MODE=hang bash "$ROOT/
|
|
296
|
+
STUB_MODE=hang bash "$ROOT/lib/verbs/autopilot.sh" run --agent "$agent" --objective x --until "$UNTIL" > "$TMP/bg.out" 2>&1 &
|
|
297
297
|
dpid=$!
|
|
298
298
|
i=0; while [ ! -f "$TMP/agent.pid" ] && [ "$i" -lt 100 ]; do sleep 0.2; i=$((i + 1)); done
|
|
299
299
|
kill -TERM "$dpid"; wait "$dpid"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# autopilot-run.sh - ONE bounded, unattended objective on the current branch (E257.7, #264).
|
|
3
3
|
#
|
|
4
4
|
# `cckit autopilot` launches interactive panes. This is the other half: it starts the agent with no
|
|
5
|
-
# terminal (`claude -p` or `codex exec`, through
|
|
5
|
+
# terminal (`claude -p` or `codex exec`, through lib/core/agent-launch.sh), one round at a time,
|
|
6
6
|
# and decides in CODE after every round whether the run goes on. Nothing the agent says ends or
|
|
7
7
|
# extends a run; a limit in the prompt is not a limit.
|
|
8
8
|
#
|
|
@@ -53,22 +53,22 @@
|
|
|
53
53
|
#
|
|
54
54
|
# Not here, on purpose: merging. A run never merges and never closes an issue.
|
|
55
55
|
# errors: strict — every stop is a state-file write plus the exit code above
|
|
56
|
-
# The forge port (E537): every GitHub call goes through forge_* / gh_rest_* (
|
|
56
|
+
# The forge port (E537): every GitHub call goes through forge_* / gh_rest_* (lib/forge/gh-rest.sh).
|
|
57
57
|
if ! command -v gh_rest_issue_json >/dev/null 2>&1; then
|
|
58
58
|
# shellcheck source=/dev/null
|
|
59
|
-
. "$(cd "$(dirname "$0")" && pwd)/
|
|
59
|
+
. "$(cd "$(dirname "$0")/.." && pwd)/forge/gh-rest.sh"
|
|
60
60
|
fi
|
|
61
61
|
|
|
62
62
|
set -uo pipefail
|
|
63
63
|
|
|
64
64
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
65
|
-
ROOT="$(cd "$SCRIPT_DIR
|
|
65
|
+
ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
66
66
|
# shellcheck source=/dev/null
|
|
67
|
-
. "$SCRIPT_DIR/
|
|
67
|
+
. "$SCRIPT_DIR/../core/agent-launch.sh"
|
|
68
68
|
# shellcheck source=/dev/null
|
|
69
|
-
. "$SCRIPT_DIR/
|
|
69
|
+
. "$SCRIPT_DIR/../core/kit-state.sh"
|
|
70
70
|
# shellcheck source=/dev/null
|
|
71
|
-
. "$SCRIPT_DIR/
|
|
71
|
+
. "$SCRIPT_DIR/../core/worktree-issue.sh"
|
|
72
72
|
|
|
73
73
|
die() { echo "autopilot run: $*" >&2; exit 2; }
|
|
74
74
|
is_uint() { case "${1:-}" in ''|*[!0-9]*) return 1 ;; esac; return 0; }
|
|
@@ -114,7 +114,7 @@ WORKTREE="$(git rev-parse --show-toplevel)"
|
|
|
114
114
|
# Never on the base branch: every round commits. The config names it; main/develop are refused
|
|
115
115
|
# with or without a config, since a run that could not read the config must not conclude it is safe.
|
|
116
116
|
BASE=""
|
|
117
|
-
CFG="$(. "$SCRIPT_DIR/
|
|
117
|
+
CFG="$(. "$SCRIPT_DIR/../core/config-path.sh" 2>/dev/null && kit_config_path 2>/dev/null || true)"
|
|
118
118
|
[ -n "$CFG" ] && [ -f "$CFG" ] && BASE="$(jq -r '.github.baseBranch // .github.integrationBranch // .github.flow // ""' "$CFG" 2>/dev/null)"
|
|
119
119
|
BASE="${KIT_BASE_BRANCH:-$BASE}"
|
|
120
120
|
case "$BRANCH" in main|master|develop|"$BASE") die "refusing to run on '$BRANCH' - start a worktree first (cckit start <issue>)" ;; esac
|
|
@@ -196,7 +196,7 @@ fi
|
|
|
196
196
|
[ -n "$PROFILE" ] && [ "$AGENT_SET" = "1" ] && die "--agent and --profile are two ways to pick the CLI - pass one"
|
|
197
197
|
if [ -n "$PROFILE" ]; then
|
|
198
198
|
# shellcheck source=/dev/null
|
|
199
|
-
. "$SCRIPT_DIR/
|
|
199
|
+
. "$SCRIPT_DIR/../core/agent-profile.sh"
|
|
200
200
|
[ -n "$CFG" ] && [ -f "$CFG" ] || die "--profile '$PROFILE' given but no kit config was found"
|
|
201
201
|
ap_profile_validate "$CFG" "$PROFILE" build || exit 2
|
|
202
202
|
ap_profile_writes "$CFG" "$PROFILE" || die "profile '$PROFILE' does not declare write:true - an unattended run commits to the branch"
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
# Verify board selection and failure propagation through a non-git installed copy.
|
|
3
3
|
# errors: strict — fixture failures exit nonzero
|
|
4
4
|
set -euo pipefail
|
|
5
|
-
ROOT="$(cd "$(dirname "$0")
|
|
5
|
+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
6
6
|
TMP="$(mktemp -d)"; trap 'rm -rf "$TMP"' EXIT
|
|
7
7
|
mkdir -p "$TMP/install" "$TMP/project" "$TMP/bin"
|
|
8
8
|
cp -R "$ROOT/scripts" "$TMP/install/scripts"
|
|
9
|
+
cp -R "$ROOT/lib" "$TMP/install/lib"
|
|
9
10
|
git -C "$TMP/project" init -q
|
|
10
11
|
printf '%s\n' '{"github":{"repo":"fixture/project","baseBranch":"develop","projectsV2":false}}' > "$TMP/project/cckit.config.json"
|
|
11
12
|
export KIT_CONFIG="$TMP/project/cckit.config.json"
|
|
@@ -22,7 +23,7 @@ JSON
|
|
|
22
23
|
# this fixture — the board from $FIXTURE_BOARD, a blocker #99 on every issue when BLOCKER_STATE is
|
|
23
24
|
# set, a 500 when FAIL_BOARD / FAIL_DEPS is — and its `gh` fails on any subcommand.
|
|
24
25
|
# shellcheck source=/dev/null
|
|
25
|
-
. "$ROOT/
|
|
26
|
+
. "$ROOT/lib/forge/test-forge-shim.sh"
|
|
26
27
|
forge_shim_install "$TMP/bin"
|
|
27
28
|
export GH_LOG="$TMP/forge.log" GH_TOKEN=test-token CCKIT_FORGE=github GH_FIXTURE="$TMP/fixture.sh"
|
|
28
29
|
cat > "$GH_FIXTURE" <<'FIX'
|
|
@@ -40,7 +41,7 @@ esac
|
|
|
40
41
|
FIX
|
|
41
42
|
export PATH="$TMP/bin:$PATH"
|
|
42
43
|
cd "$TMP/project"
|
|
43
|
-
run() { bash "$TMP/install/
|
|
44
|
+
run() { bash "$TMP/install/lib/verbs/autopilot.sh" --dry-run "$@"; }
|
|
44
45
|
has() { case "$1" in *"$2"*) : ;; *) echo "FAIL missing: $2"; exit 1 ;; esac; }
|
|
45
46
|
fails() { if "$@" > "$TMP/failure" 2>&1; then echo 'FAIL expected nonzero exit'; exit 1; fi; }
|
|
46
47
|
for agent in claude codex; do
|
|
@@ -53,7 +54,7 @@ done
|
|
|
53
54
|
out="$(KIT_BASE_BRANCH=effort/9-x run 3)"
|
|
54
55
|
has "$out" '(base effort/9-x)'
|
|
55
56
|
has "$out" "base 'effort/9-x' comes from KIT_BASE_BRANCH in the environment (the config says 'develop')"
|
|
56
|
-
out="$(env -u KIT_BASE_BRANCH bash "$TMP/install/
|
|
57
|
+
out="$(env -u KIT_BASE_BRANCH bash "$TMP/install/lib/verbs/autopilot.sh" --dry-run 3)"
|
|
57
58
|
has "$out" '(base develop)'
|
|
58
59
|
case "$out" in *'comes from KIT_BASE_BRANCH'*) echo 'FAIL override line printed with no override'; exit 1 ;; esac
|
|
59
60
|
out="$(run --cap 1)"; has "$out" 'would launch 1 flow(s): 3'; has "$out" 'queued past cap (run a later wave): 4'
|
|
@@ -86,7 +87,7 @@ has "$(run 2>&1)" 'nothing open to drive'
|
|
|
86
87
|
fails run --cap 0 3
|
|
87
88
|
# The agent-facing format remains TOON for multiple rows; raw mode preserves label objects.
|
|
88
89
|
printf '%s\n' '[{"number":3,"title":"a","labels":[{"name":"effort"}],"assignees":[]},{"number":4,"title":"b","labels":[],"assignees":[]}]' > "$FIXTURE_BOARD"
|
|
89
|
-
raw="$(bash "$TMP/install/
|
|
90
|
+
raw="$(bash "$TMP/install/lib/verbs/task-sync.sh" --raw-json)"
|
|
90
91
|
[ "$(printf '%s' "$raw" | jq -r '.[0].labels[0].name')" = effort ]
|
|
91
|
-
has "$(bash "$TMP/install/
|
|
92
|
+
has "$(bash "$TMP/install/lib/verbs/task-sync.sh" --llm)" '[2]{number,title,priority,labels,milestone,assignees,blocked}:'
|
|
92
93
|
echo 'PASS autopilot selection and failures for Claude and Codex launchers'
|
|
@@ -38,7 +38,7 @@ while [ "$#" -gt 0 ]; do
|
|
|
38
38
|
done
|
|
39
39
|
|
|
40
40
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
41
|
-
ROOT="$(cd "$SCRIPT_DIR
|
|
41
|
+
ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
42
42
|
|
|
43
43
|
# No explicit issues -> auto-select from the board: open issues, minus effort PARENTS (the
|
|
44
44
|
# "[E<n>] ..." umbrella issues, legacy "[Effort] N ...", that decompose into subs, identified by
|
|
@@ -46,7 +46,7 @@ ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
46
46
|
# re-checks the blocked_by gate at launch; this is the coarse pre-filter so the board drives the wave.
|
|
47
47
|
if [ "${#ISSUES[@]}" -eq 0 ]; then
|
|
48
48
|
echo "autopilot: no issues passed - auto-selecting unblocked open issues from the board"
|
|
49
|
-
board="$(bash "$ROOT/
|
|
49
|
+
board="$(bash "$ROOT/lib/verbs/task-sync.sh" --raw-json)" || {
|
|
50
50
|
echo "autopilot: could not read the board" >&2; exit 1;
|
|
51
51
|
}
|
|
52
52
|
# Capture the parser status before reading rows. Process substitution hides its failures.
|
|
@@ -62,4 +62,4 @@ if [ "${#ISSUES[@]}" -eq 0 ]; then
|
|
|
62
62
|
fi
|
|
63
63
|
|
|
64
64
|
echo "autopilot: driving ${#ISSUES[@]} issue(s) -> orchestrate (detached): ${ISSUES[*]}"
|
|
65
|
-
exec bash "$ROOT/
|
|
65
|
+
exec bash "$ROOT/lib/verbs/orchestrate.sh" --detach "${PASS[@]+"${PASS[@]}"}" "${ISSUES[@]}"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# captain-test.sh — self-test for captain.sh pure gate policy under bash AND zsh.
|
|
3
3
|
# Network-free: covers cap_checks_summary / cap_classify / cap_action and the branch parser only
|
|
4
4
|
# (the gh-driven captain_gate/pass/loop are not exercised).
|
|
5
|
-
# Run: bash
|
|
5
|
+
# Run: bash lib/verbs/captain-test.sh
|
|
6
6
|
# errors: strict — a test runner: rc 1 on any failed assertion
|
|
7
7
|
|
|
8
8
|
dir=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
|