From 9b1e1bfff3343444eaa43ebb3646cc4370129067 Mon Sep 17 00:00:00 2001 From: James Casey Date: Thu, 19 Mar 2026 15:35:09 +0000 Subject: [PATCH 1/2] pick-epic: clean up agent worktrees after PR merge Add worktree removal step after each squash-merge to prevent disk exhaustion during large epic runs (~4-8GB per worktree from build artifacts). Co-Authored-By: Claude Opus 4.6 (1M context) --- skills/pick-epic/SKILL.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/skills/pick-epic/SKILL.md b/skills/pick-epic/SKILL.md index 609e31d..47ff86c 100644 --- a/skills/pick-epic/SKILL.md +++ b/skills/pick-epic/SKILL.md @@ -88,6 +88,11 @@ Use `Agent` tool with `isolation: "worktree"` and `run_in_background: true` for ```bash gh pr merge --squash --admin ``` +- After merge, clean up the agent's worktree to reclaim disk space: + ```bash + git worktree remove --force + git branch -D + ``` **4d. Once all PRs in the wave are merged**, start Wave N+1. From 836416855be5a6e5b43eeb987de30ce54d033fae Mon Sep 17 00:00:00 2001 From: James Casey Date: Sun, 22 Mar 2026 12:07:56 +0000 Subject: [PATCH 2/2] chore: add e2e validation as required final phase in plan-adr Lesson from ADR 0069 tracing epic: 7 PRs shipped, all CI green, but the feature was non-functional from the REPL. Missing e2e btscript test would have caught telemetry code path and serialization bugs. Changes: - Phase example now shows "E2E btscript test" as explicit Phase 4 - New phasing principle #5: e2e validation is REQUIRED for user-facing features - Explains why EUnit/BUnit alone are insufficient Co-Authored-By: Claude Opus 4.6 (1M context) --- skills/plan-adr/SKILL.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/skills/plan-adr/SKILL.md b/skills/plan-adr/SKILL.md index 791c497..d322f63 100644 --- a/skills/plan-adr/SKILL.md +++ b/skills/plan-adr/SKILL.md @@ -62,11 +62,12 @@ Take an **accepted ADR** and break it into a set of **sequenced, agent-ready Lin BT-D: Codegen for Y (blocked by BT-A, BT-B) Phase 3 (integration, depends on Phase 2): - BT-E: E2E tests (blocked by BT-C, BT-D) - BT-F: REPL integration (blocked by BT-D) - - Phase 4 (polish): - BT-G: Documentation and examples (blocked by BT-E) + BT-E: REPL integration (blocked by BT-D) + BT-F: MCP tools if applicable (blocked by BT-D) + + Phase 4 (validation + polish): + BT-G: E2E btscript test (blocked by BT-E) — REQUIRED for user-facing features + BT-H: Documentation and examples (blocked by BT-E) ``` **Issue sizing rules:** @@ -200,6 +201,8 @@ Every issue must be `agent-ready` — an agent should be able to pick it up with 4. **REPL integration is not optional**: If the ADR affects user-facing behavior, include a REPL integration issue. Features aren't done until users can interact with them. +5. **E2E validation as the final phase**: The last issue in every epic MUST include an e2e btscript test (`tests/e2e/cases/.btscript`) that exercises the feature end-to-end from the Beamtalk REPL. This catches integration failures invisible to unit tests — missing code path dependencies, serialization bugs, broken describe/list-tools responses. The ADR 0069 tracing epic shipped 7 PRs that all passed CI but were non-functional from the REPL because no e2e test existed. **EUnit and BUnit alone are insufficient for user-facing features.** + ### Splitting Large Issues If an issue feels like **L or XL**, split along these seams: