mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-06 08:04:50 +08:00
The background Agent tool already persisted lane-adjacent state via a JSON manifest and a markdown transcript, making it the smallest viable vertical slice for the ROADMAP lane-event work. This change adds canonical typed lane events to the manifest and normalizes terminal blockers into the shared failure taxonomy so downstream clawhip-style consumers can branch on structured state instead of scraping prose alone. The slice is intentionally narrow: it covers agent start, finish, blocked, and failed transitions plus blocker classification, while leaving broader lane orchestration and external consumers for later phases. Tests lock the manifest schema and taxonomy mapping so future extensions can add events without regressing the typed baseline. Constraint: Land a fresh-main vertical slice without inventing a larger lane framework first Rejected: Add a brand-new lane subsystem across crates | too broad for one verified slice Rejected: Only add markdown log annotations | still log-shaped and not machine-first Confidence: high Scope-risk: narrow Reversibility: clean Directive: Extend the same event names and failure classes before adding any alternate manifest schema for lane reporting Tested: cargo test -p tools agent_persists_handoff_metadata -- --nocapture Tested: cargo test -p tools agent_fake_runner_can_persist_completion_and_failure -- --nocapture Tested: cargo test -p tools lane_failure_taxonomy_normalizes_common_blockers -- --nocapture Not-tested: Full clawhip consumer integration or multi-crate event plumbing