Repository navigation
archkit v1.9.0 — CGR test gate + deferred-goal proposals
Hardens the Clear Goal Run loop on both ends: a test gate so "done" provably means tests pass, and deferred-goal proposals so follow-up work spotted mid-goal is captured and reviewed instead of lost. Adds 3 MCP tools (bringing the count to 28) and 1 MCP prompt. Purely additive — projects without a test script skip the gate gracefully, and the propose/review flow is opt-in.
Added — CGR test gate
- Auto-detected
verify-command(src/lib/test-runner.mjs):archkit_goal_intakenow detects the project's test command — readspackage.json→scripts.testand picks the runner from the lockfile (pnpm/yarn/bun, defaultnpm test) — and stamps it onto every goal asverify-command. Best-effort and Node-first: returnsnullwhen there's no real test script, so projects without tests aren't blocked. Per-goal override via the goal'sverifyCommand/verify-commandfield. - Hard gate on
archkit_goal_complete: completion re-runs theverify-commandand refuses to complete a goal whose tests are red (or whose command can't be launched). Red returns the failing output tail plus a remediationnextStep; a passing gate stampstests-passed/tests-command/tests-atonto the archived goal. The escape hatch for a genuinely-obsolete goal isarchkit_goal_abandon, not completion. - Cheap preview on
archkit_goal_verify: runs the same command as a non-authoritative dry run and folds its result into the goal'scleansignal, so the agent sees green/red before calling complete.
Added — deferred-goal proposals (3 new MCP tools, 1 new prompt)
archkit_goal_defer(tool #26): stash a follow-up the agent notices mid-session as a proposed goal in.arch/goals/proposed/— without derailing the active goal or touching the queue. Dedupes by title hash.archkit_goal_promote(tool #27) /archkit_goal_dismiss(tool #28): the confirm/reject halves of the propose-and-confirm flow.promoteturns selected proposals into planned goals the CGR queue picks up;dismissdiscards them./mcp__archkit__goal_reviewprompt (src/mcp/prompts.mjs): lists pending proposals and drives anAskUserQuestionmulti-select so the user picks which to promote vs. dismiss.- Stop-hook auto-drafting (
src/lib/goal-detector.mjs): the Stop hook scans each turn for explicit deferral language and auto-drafts a proposal to.arch/goals/proposed/<hash>.json. High-precision-over-recall: questions and exploratory "should we…?" phrasing are filtered out.
Tests
- New suites
tests/test-gate/andtests/goal-proposals/.tests/mcp-server/tool-count assertion updated 25 → 28;tests/silent-success-audit/andtests/stop-hook/updated for the new tools and auto-drafting.
Docs
- README "Available tools" updated to 28, documenting
archkit_goal_defer/archkit_goal_promote/archkit_goal_dismissand the/mcp__archkit__goal_reviewprompt; the CGR section gains "The test gate" and "Deferred-goal proposals" subsections.
📦 npm: @kenandrewmiranda/archkit@1.9.0