mirror of
https://github.com/JuliusBrussee/cavekit.git
synced 2026-09-14 16:32:40 +08:00
0934103ca2
The runtime from 2.1.0 shipped as a standalone engine; this change wires it through every existing command so /ck:make drives itself under the stop-hook once /ck:init has been run. No breaking changes — every command detects .cavekit/ and falls back to the pre-2.2 path when absent. Correctness: - Fix sentinel mismatch: stop-hook, cavekit-tools, docs now match setup-build.sh's <promise>CAVEKIT COMPLETE</promise> (space, not underscore). Without this, the loop could never terminate. - .gitignore: add the transient runtime files (.loop.json, .loop.lock, .progress.json, tool-cache/, state.md, ledgers, etc.) while leaving .cavekit/config.json and .cavekit/history/ under version control. Command wiring: - /ck:init — calls cavekit-tools init + discover; seeds .cavekit/; appends runtime entries to .gitignore if missing; prints detected capabilities. - /ck:config — surfaces new runtime keys (session_budget, task_budget_*, auto_backprop, tool_cache, parallelism_*, model_routing, graphify) and accepts get/set directly for any bp-config.sh key. - /ck:progress — prints `cavekit-tools status` block first when .cavekit/ is present; legacy impl-based rollup follows. - /ck:sketch — dispatches ck:complexity per approved kit to auto-fill the complexity: frontmatter; tags novelty-heavy kits for research. - /ck:map — emits .cavekit/tasks.json and calls init-registry; inserts ck:researcher dependency tasks for kits tagged needs_research. - /ck:make — documents runtime mode: setup-loop activates the stop-hook, the hook routes waves automatically, task-builders mark completions via cavekit-tools, and the final message emits <promise>CAVEKIT COMPLETE</promise>. Legacy Ralph-loop path preserved. - /ck:check — dispatches ck:verifier for goal-backward verification and falsely_complete detection; routes gaps through /ck:backprop. - /ck:review-branch — adds a fix-cycle section: blocking findings become fix tasks on the next loop iteration; max 2 cycles, then ADVANCE_WITH_FINDINGS. - /ck:backprop — consumes .cavekit/.auto-backprop-pending.json when invoked with no args, in addition to --from-flag / --from-finding. - /ck:revise — preferred path: route each manual fix through /ck:backprop when .cavekit/ is present (regression test + audit log). - /ck:research — prefers a single ck:researcher dispatch for narrow briefs; multi-agent fan-out for broad topics. Scripts: - setup-build.sh — calls cavekit-tools init + setup-loop when node is available, activating the stop-hook mid-/ck:make. Keeps the legacy .claude/ralph-loop.local.md file for back-compat. - cavekit-tools.cjs — adds `intensity` subcommand that resolves lite|full|ultra based on session budget pressure, task depth, and phase. Consumed by /ck:make and /ck:check. Go CLI (cmd/cavekit/main.go): - runStatus prints `cavekit-tools status` block when .cavekit/state.md exists (alongside the existing worktree rollup). - runReset additionally clears transient runtime files from .cavekit/ (.loop.json, .loop.lock, .progress.json, .auto-backprop-pending.json, .debug.log), leaving config.json and history/ untouched. Tests: - tests/intensity.test.cjs — six new assertions covering the caveman- internal decision table (session pressure, task pressure, depth clamps, phase clamps, explicit override). - Total: 40/40 passing. Plugin manifest: - plugin.json, .claude-plugin/plugin.json, install.sh → 2.2.0. https://claude.ai/code/session_018edLvsv8JE9947oFiBXyHS