compound-engineering-plugin icon indicating copy to clipboard operation
compound-engineering-plugin copied to clipboard

feat: add /lfg-ext — external delegate LFG (Codex/Gemini/OpenCode in parallel worktrees)

Open terry-li-hm opened this issue 9 months ago • 2 comments

Summary

Adds /lfg-ext, a new workflow command that runs CE planning and review but replaces /ce:work swarm with external AI coding tools (Codex, Gemini CLI, OpenCode) running in isolated git worktrees.

Motivation

Users with Max20 plans burn tokens on CE swarm agents during execution. For teams that already have Codex, Gemini CLI, or OpenCode installed, delegating execution to those tools is free and often faster — while still getting CE's planning depth and review quality.

How it works

/ce:plan → /deepen-plan → [commit plan] → [worktrees + external delegates in parallel] → /ce:review
  1. Runs /ce:plan + /deepen-plan as normal
  2. Plan is committed (worktrees see git history only, not the working tree)
  3. Tasks decomposed by file independence — one worktree per task via worktree-manager.sh
  4. External tools launched in parallel (backgrounded)
  5. Merges worktrees, runs /ce:review

Key design decisions

  • Uses worktree-manager.sh from the existing git-worktree skill — no new dependencies
  • Tool availability check before starting — graceful fallback to /slfg if no external tools installed
  • Decision table for /lfg-ext vs /slfg — clear guidance on when to use each
  • OpenCode sandbox note — documents that OpenCode blocks writes outside its worktree (use Codex for those tasks)

Validated against

A real Rust feature implementation (.env file copying + .gitignore management in a worktree manager CLI). Codex implemented the feature from a CE plan. 4/4 tests passed, cargo clippy clean on first run.

Gotcha discovered during testing

Worktrees only see committed git history. If /ce:plan writes the plan file but it isn't committed before worktree-manager.sh create, delegates can't find the plan. Step 3 (commit plan) is explicit in the command for this reason.

Files changed

  • commands/lfg-ext.md — new command
  • .claude-plugin/plugin.json — version 2.38.1 → 2.39.0, commands 22 → 23
  • CHANGELOG.md — 2.39.0 entry
  • README.md — commands count + table entry
  • .claude-plugin/marketplace.json — version + description sync

terry-li-hm avatar Mar 02 '26 04:03 terry-li-hm

that is cool!

kieranklaassen avatar Mar 02 '26 16:03 kieranklaassen

Coming from you, that means a lot — thanks Kieran.

terry-li-hm avatar Mar 03 '26 09:03 terry-li-hm