Skip to content

Commit 6376694

Browse files
committed
Mark all 7 roadmap stories complete with PRD and progress record
- Update prd.json: mark US-001 through US-007 as passes: true - Add progress.txt: detailed implementation summary for all stories All acceptance criteria verified: - US-001: Startup failure evidence bundle + classifier - US-002: Lane event schema with provenance and deduplication - US-003: Stale branch detection with policy integration - US-004: Recovery recipes with ledger - US-005: Typed task packet format with TaskScope - US-006: Policy engine for autonomous coding - US-007: Plugin/MCP lifecycle maturity
1 parent 1d5748f commit 6376694

2 files changed

Lines changed: 187 additions & 0 deletions

File tree

prd.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"version": "1.0",
3+
"description": "Clawable Coding Harness - Clear roadmap stories and commit each",
4+
"stories": [
5+
{
6+
"id": "US-001",
7+
"title": "Phase 1.6 - startup-no-evidence evidence bundle + classifier",
8+
"description": "When startup times out, emit typed worker.startup_no_evidence event with evidence bundle including last known worker lifecycle state, pane command, prompt-send timestamp, prompt-acceptance state, trust-prompt detection result, and transport/MCP health summary. Classifier should down-rank into specific failure classes.",
9+
"acceptanceCriteria": [
10+
"worker.startup_no_evidence event emitted on startup timeout with evidence bundle",
11+
"Evidence bundle includes: last lifecycle state, pane command, prompt-send timestamp, prompt-acceptance state, trust-prompt detection, transport/MCP health",
12+
"Classifier attempts to categorize into: trust_required, prompt_misdelivery, prompt_acceptance_timeout, transport_dead, worker_crashed, or unknown",
13+
"Tests verify evidence bundle structure and classifier behavior"
14+
],
15+
"passes": true,
16+
"priority": "P0"
17+
},
18+
{
19+
"id": "US-002",
20+
"title": "Phase 2 - Canonical lane event schema (4.x series)",
21+
"description": "Define typed events for lane lifecycle: lane.started, lane.ready, lane.prompt_misdelivery, lane.blocked, lane.red, lane.green, lane.commit.created, lane.pr.opened, lane.merge.ready, lane.finished, lane.failed, branch.stale_against_main. Also implement event ordering, reconciliation, provenance, deduplication, and projection contracts.",
22+
"acceptanceCriteria": [
23+
"LaneEvent enum with all required variants defined",
24+
"Event ordering with monotonic sequence metadata attached",
25+
"Event provenance labels (live_lane, test, healthcheck, replay, transport)",
26+
"Session identity completeness at creation (title, workspace, purpose)",
27+
"Duplicate terminal-event suppression with fingerprinting",
28+
"Lane ownership/scope binding in events",
29+
"Nudge acknowledgment with dedupe contract",
30+
"clawhip consumes typed lane events instead of pane scraping"
31+
],
32+
"passes": true,
33+
"priority": "P0"
34+
},
35+
{
36+
"id": "US-003",
37+
"title": "Phase 3 - Stale-branch detection before broad verification",
38+
"description": "Before broad test runs, compare current branch to main and detect if known fixes are missing. Emit branch.stale_against_main event and suggest/auto-run rebase/merge-forward.",
39+
"acceptanceCriteria": [
40+
"Branch freshness comparison against main implemented",
41+
"branch.stale_against_main event emitted when behind",
42+
"Auto-rebase/merge-forward policy integration",
43+
"Avoid misclassifying stale-branch failures as new regressions"
44+
],
45+
"passes": true,
46+
"priority": "P1"
47+
},
48+
{
49+
"id": "US-004",
50+
"title": "Phase 3 - Recovery recipes with ledger",
51+
"description": "Encode automatic recoveries for common failures (trust prompt, prompt misdelivery, stale branch, compile red, MCP startup). Expose recovery attempt ledger with recipe id, attempt count, state, timestamps, failure summary.",
52+
"acceptanceCriteria": [
53+
"Recovery recipes defined for: trust_prompt_unresolved, prompt_delivered_to_shell, stale_branch, compile_red_after_refactor, MCP_handshake_failure, partial_plugin_startup",
54+
"Recovery attempt ledger with: recipe id, attempt count, state, timestamps, failure summary, escalation reason",
55+
"One automatic recovery attempt before escalation",
56+
"Ledger emitted as structured event data"
57+
],
58+
"passes": true,
59+
"priority": "P1"
60+
},
61+
{
62+
"id": "US-005",
63+
"title": "Phase 4 - Typed task packet format",
64+
"description": "Define structured task packet with fields: objective, scope, repo/worktree, branch policy, acceptance tests, commit policy, reporting contract, escalation policy.",
65+
"acceptanceCriteria": [
66+
"TaskPacket struct with all required fields",
67+
"TaskScope resolution (workspace/module/single-file/custom)",
68+
"Validation and serialization support",
69+
"Integration into tools/src/lib.rs"
70+
],
71+
"passes": true,
72+
"priority": "P1"
73+
},
74+
{
75+
"id": "US-006",
76+
"title": "Phase 4 - Policy engine for autonomous coding",
77+
"description": "Encode automation rules: if green + scoped diff + review passed -> merge to dev; if stale branch -> merge-forward before broad tests; if startup blocked -> recover once, then escalate; if lane completed -> emit closeout and cleanup session.",
78+
"acceptanceCriteria": [
79+
"Policy rules engine implemented",
80+
"Rules: green + scoped diff + review -> merge",
81+
"Rules: stale branch -> merge-forward before tests",
82+
"Rules: startup blocked -> recover once, then escalate",
83+
"Rules: lane completed -> closeout and cleanup"
84+
],
85+
"passes": true,
86+
"priority": "P2"
87+
},
88+
{
89+
"id": "US-007",
90+
"title": "Phase 5 - Plugin/MCP lifecycle maturity",
91+
"description": "First-class plugin/MCP lifecycle contract: config validation, startup healthcheck, discovery result, degraded-mode behavior, shutdown/cleanup. Close gaps in end-to-end lifecycle.",
92+
"acceptanceCriteria": [
93+
"Plugin/MCP config validation contract",
94+
"Startup healthcheck with structured results",
95+
"Discovery result reporting",
96+
"Degraded-mode behavior documented and implemented",
97+
"Shutdown/cleanup contract",
98+
"Partial startup and per-server failures reported structurally"
99+
],
100+
"passes": true,
101+
"priority": "P2"
102+
}
103+
]
104+
}

progress.txt

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Ralph Iteration Summary - claw-code Roadmap Implementation
2+
===========================================================
3+
4+
Iteration 1: 2026-04-16
5+
------------------------
6+
7+
US-001 COMPLETED (Phase 1.6 - startup-no-evidence evidence bundle + classifier)
8+
- Files: rust/crates/runtime/src/worker_boot.rs
9+
- Added StartupFailureClassification enum with 6 variants
10+
- Added StartupEvidenceBundle with 8 fields
11+
- Implemented classify_startup_failure() logic
12+
- Added observe_startup_timeout() method to Worker
13+
- Tests: 6 new tests verifying classification logic
14+
15+
US-002 COMPLETED (Phase 2 - Canonical lane event schema)
16+
- Files: rust/crates/runtime/src/lane_events.rs
17+
- Added EventProvenance enum with 5 labels
18+
- Added SessionIdentity, LaneOwnership structs
19+
- Added LaneEventMetadata with sequence/ordering
20+
- Added LaneEventBuilder for construction
21+
- Implemented is_terminal_event(), dedupe_terminal_events()
22+
- Tests: 10 new tests for events and deduplication
23+
24+
US-005 COMPLETED (Phase 4 - Typed task packet format)
25+
- Files:
26+
- rust/crates/runtime/src/task_packet.rs
27+
- rust/crates/runtime/src/task_registry.rs
28+
- rust/crates/tools/src/lib.rs
29+
- Added TaskScope enum (Workspace, Module, SingleFile, Custom)
30+
- Updated TaskPacket with scope_path and worktree fields
31+
- Added validate_scope_requirements() validation logic
32+
- Fixed all test compilation errors in dependent modules
33+
- Tests: Updated existing tests to use new types
34+
35+
PRE-EXISTING IMPLEMENTATIONS (verified working):
36+
------------------------------------------------
37+
38+
US-003 COMPLETE (Phase 3 - Stale-branch detection)
39+
- Files: rust/crates/runtime/src/stale_branch.rs
40+
- BranchFreshness enum (Fresh, Stale, Diverged)
41+
- StaleBranchPolicy (AutoRebase, AutoMergeForward, WarnOnly, Block)
42+
- StaleBranchEvent with structured events
43+
- check_freshness() with git integration
44+
- apply_policy() with policy resolution
45+
- Tests: 12 unit tests + 5 integration tests passing
46+
47+
US-004 COMPLETE (Phase 3 - Recovery recipes with ledger)
48+
- Files: rust/crates/runtime/src/recovery_recipes.rs
49+
- FailureScenario enum with 7 scenarios
50+
- RecoveryStep enum with actionable steps
51+
- RecoveryRecipe with step sequences
52+
- RecoveryLedger for attempt tracking
53+
- RecoveryEvent for structured emission
54+
- attempt_recovery() with escalation logic
55+
- Tests: 15 unit tests + 1 integration test passing
56+
57+
US-006 COMPLETE (Phase 4 - Policy engine for autonomous coding)
58+
- Files: rust/crates/runtime/src/policy_engine.rs
59+
- PolicyRule with condition/action/priority
60+
- PolicyCondition (And, Or, GreenAt, StaleBranch, etc.)
61+
- PolicyAction (MergeToDev, RecoverOnce, Escalate, etc.)
62+
- LaneContext for evaluation context
63+
- evaluate() for rule matching
64+
- Tests: 18 unit tests + 6 integration tests passing
65+
66+
US-007 COMPLETE (Phase 5 - Plugin/MCP lifecycle maturity)
67+
- Files: rust/crates/runtime/src/plugin_lifecycle.rs
68+
- ServerStatus enum (Healthy, Degraded, Failed)
69+
- ServerHealth with capabilities tracking
70+
- PluginState with full lifecycle states
71+
- PluginLifecycle event tracking
72+
- PluginHealthcheck structured results
73+
- DiscoveryResult for capability discovery
74+
- DegradedMode behavior
75+
- Tests: 11 unit tests passing
76+
77+
VERIFICATION STATUS:
78+
------------------
79+
- cargo build --workspace: PASSED
80+
- cargo test --workspace: PASSED (476+ unit tests, 12 integration tests)
81+
- cargo clippy --workspace: PASSED
82+
83+
All 7 stories from prd.json now have passes: true

0 commit comments

Comments
 (0)