From 3d523824c253ec74f8f7fa7cbb7f93d2b831f5a1 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Thu, 26 Mar 2026 21:45:37 -0600 Subject: [PATCH] feat: worktree parallelization strategy in /plan-eng-review (v0.12.5.1) (#547) * feat: worktree parallelization strategy in /plan-eng-review Adds automatic module-level dependency analysis to eng review output. When a plan has independent workstreams, produces a dependency table, parallel lanes, and execution order for git worktree splitting. Skips for single-module or single-track plans. * chore: bump version and changelog (v0.12.5.1) Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Claude Opus 4.6 --- CHANGELOG.md | 8 ++++++++ VERSION | 2 +- plan-eng-review/SKILL.md | 28 ++++++++++++++++++++++++++++ plan-eng-review/SKILL.md.tmpl | 28 ++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bce3443..c0292184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.12.5.1] - 2026-03-27 — Eng Review Now Tells You What to Parallelize + +`/plan-eng-review` automatically analyzes your plan for parallel execution opportunities. When your plan has independent workstreams, the review outputs a dependency table, parallel lanes, and execution order so you know exactly which tasks to split into separate git worktrees. + +### Added + +- **Worktree parallelization strategy** in `/plan-eng-review` required outputs. Extracts a structured table of plan steps with module-level dependencies, computes parallel lanes, and flags merge conflict risks. Skips automatically for single-module or single-track plans. + ## [0.12.5.0] - 2026-03-26 — Fix Codex Hangs: 30-Minute Waits Are Gone Three bugs in `/codex` caused 30+ minute hangs with zero output during plan reviews and adversarial checks. All three are fixed. diff --git a/VERSION b/VERSION index cce9c8ee..0c2b830b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.12.5.0 +0.12.5.1 diff --git a/plan-eng-review/SKILL.md b/plan-eng-review/SKILL.md index 93a3a8f1..bcf6734e 100644 --- a/plan-eng-review/SKILL.md +++ b/plan-eng-review/SKILL.md @@ -860,6 +860,33 @@ For each new codepath identified in the test review diagram, list one realistic If any failure mode has no test AND no error handling AND would be silent, flag it as a **critical gap**. +### Worktree parallelization strategy + +Analyze the plan's implementation steps for parallel execution opportunities. This helps the user split work across git worktrees (via Claude Code's Agent tool with `isolation: "worktree"` or parallel workspaces). + +**Skip if:** all steps touch the same primary module, or the plan has fewer than 2 independent workstreams. In that case, write: "Sequential implementation, no parallelization opportunity." + +**Otherwise, produce:** + +1. **Dependency table** — for each implementation step/workstream: + +| Step | Modules touched | Depends on | +|------|----------------|------------| +| (step name) | (directories/modules, NOT specific files) | (other steps, or —) | + +Work at the module/directory level, not file level. Plans describe intent ("add API endpoints"), not specific files. Module-level ("controllers/, models/") is reliable; file-level is guesswork. + +2. **Parallel lanes** — group steps into lanes: + - Steps with no shared modules and no dependency go in separate lanes (parallel) + - Steps sharing a module directory go in the same lane (sequential) + - Steps depending on other steps go in later lanes + +Format: `Lane A: step1 → step2 (sequential, shared models/)` / `Lane B: step3 (independent)` + +3. **Execution order** — which lanes launch in parallel, which wait. Example: "Launch A + B in parallel worktrees. Merge both. Then C." + +4. **Conflict flags** — if two parallel lanes touch the same module directory, flag it: "Lanes X and Y both touch module/ — potential merge conflict. Consider sequential execution or careful coordination." + ### Completion summary At the end of the review, fill in and display this summary so the user can see all findings at a glance: - Step 0: Scope Challenge — ___ (scope accepted as-is / scope reduced per recommendation) @@ -872,6 +899,7 @@ At the end of the review, fill in and display this summary so the user can see a - TODOS.md updates: ___ items proposed to user - Failure modes: ___ critical gaps flagged - Outside voice: ran (codex/claude) / skipped +- Parallelization: ___ lanes, ___ parallel / ___ sequential - Lake Score: X/Y recommendations chose complete option ## Retrospective learning diff --git a/plan-eng-review/SKILL.md.tmpl b/plan-eng-review/SKILL.md.tmpl index 13431184..b4c47e4c 100644 --- a/plan-eng-review/SKILL.md.tmpl +++ b/plan-eng-review/SKILL.md.tmpl @@ -196,6 +196,33 @@ For each new codepath identified in the test review diagram, list one realistic If any failure mode has no test AND no error handling AND would be silent, flag it as a **critical gap**. +### Worktree parallelization strategy + +Analyze the plan's implementation steps for parallel execution opportunities. This helps the user split work across git worktrees (via Claude Code's Agent tool with `isolation: "worktree"` or parallel workspaces). + +**Skip if:** all steps touch the same primary module, or the plan has fewer than 2 independent workstreams. In that case, write: "Sequential implementation, no parallelization opportunity." + +**Otherwise, produce:** + +1. **Dependency table** — for each implementation step/workstream: + +| Step | Modules touched | Depends on | +|------|----------------|------------| +| (step name) | (directories/modules, NOT specific files) | (other steps, or —) | + +Work at the module/directory level, not file level. Plans describe intent ("add API endpoints"), not specific files. Module-level ("controllers/, models/") is reliable; file-level is guesswork. + +2. **Parallel lanes** — group steps into lanes: + - Steps with no shared modules and no dependency go in separate lanes (parallel) + - Steps sharing a module directory go in the same lane (sequential) + - Steps depending on other steps go in later lanes + +Format: `Lane A: step1 → step2 (sequential, shared models/)` / `Lane B: step3 (independent)` + +3. **Execution order** — which lanes launch in parallel, which wait. Example: "Launch A + B in parallel worktrees. Merge both. Then C." + +4. **Conflict flags** — if two parallel lanes touch the same module directory, flag it: "Lanes X and Y both touch module/ — potential merge conflict. Consider sequential execution or careful coordination." + ### Completion summary At the end of the review, fill in and display this summary so the user can see all findings at a glance: - Step 0: Scope Challenge — ___ (scope accepted as-is / scope reduced per recommendation) @@ -208,6 +235,7 @@ At the end of the review, fill in and display this summary so the user can see a - TODOS.md updates: ___ items proposed to user - Failure modes: ___ critical gaps flagged - Outside voice: ran (codex/claude) / skipped +- Parallelization: ___ lanes, ___ parallel / ___ sequential - Lake Score: X/Y recommendations chose complete option ## Retrospective learning