Skip to content

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

Open
terry-li-hm wants to merge 2 commits intoEveryInc:mainfrom
terry-li-hm:feat/lfg-ext
Open

feat: add /lfg-ext — external delegate LFG (Codex/Gemini/OpenCode in parallel worktrees)#223
terry-li-hm wants to merge 2 commits intoEveryInc:mainfrom
terry-li-hm:feat/lfg-ext

Conversation

@terry-li-hm
Copy link
Contributor

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 and others added 2 commits March 2, 2026 12:33
Adds a new /lfg-ext command that runs the full CE planning and review
pipeline but replaces /ce:work swarm with external tools (Codex, Gemini
CLI, OpenCode) running in parallel git worktrees.

Key differences from /slfg:
- Uses external tools instead of Claude Task agents → preserves Max20 budget
- Delegates run in isolated worktrees via worktree-manager.sh
- Includes tool availability check with graceful /slfg fallback
- Plan must be committed before worktree creation (worktrees see git
  history only, not the working tree)
- OpenCode sandbox restriction documented (writes outside worktree blocked)

Validated on a real Rust feature implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…rgon

- Move tool availability check (Phase 2) before worktree creation (Phase 3)
  so we fail fast if no delegates are available
- Remove "Max20" jargon — replaced with "Claude token budget" in description
- Drop OpenCode from delegate table (too setup-specific; Codex+Gemini cover all cases)
- Add note explaining why /feature-video is omitted

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kieranklaassen
Copy link
Collaborator

that is cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants