$git clone https://github.com/TT-Wang/forgeTurn Claude Code into a plan-execute-validate loop with parallel work, intelligent retry, and memory
| 1 | # Forge |
| 2 | |
| 3 | [](https://github.com/TT-Wang/forge/actions/workflows/ci.yml) |
| 4 | [](./LICENSE) |
| 5 | [](https://nodejs.org/) |
| 6 | [](https://glama.ai/mcp/servers/TT-Wang/forge) |
| 7 | |
| 8 | Turn Claude Code into a structured delivery loop: plan the work, run modules in parallel, validate deeply, retry intelligently, and carry forward what worked. |
| 9 | |
| 10 | |
| 11 | ## Why Forge |
| 12 | |
| 13 | Single-agent Claude Code drifts past ~5 steps. The failure mode isn't code quality — it's **silent state corruption**: parallel workers branching from stale HEAD, modules quietly clobbering each other's changes, "DONE" status that hides broken integration. Forge externalizes the **plan → execute → validate** loop so the same task that would silently break at 7 steps cleanly delivers at 30. |
| 14 | |
| 15 | **Core mechanic:** |
| 16 | |
| 17 | - **DAG plans, not linear chains** — workers run in parallel where dependencies allow |
| 18 | - **Worktree isolation + auto-WIP commits between tiers** — every tier writes to disk before the next branches off (this exists because we shipped memem v0.10.0 once with this exact failure: 20 min of recovery work) |
| 19 | - **Per-module verify commands & acceptance criteria** — defined at plan time so workers can't quietly lower the bar |
| 20 | - **Multi-lens review** — a separate reviewer agent + 3× self-consistency catches cross-module bugs single-module reviewers miss |
| 21 | - **Structured failure ledger** — failure modes captured as JSONL, recalled by pattern ID in the next plan |
| 22 | |
| 23 | **Track record:** shipped memem v1.7 → v1.8.3 (7 releases) in a single day, including a 9-file anti-recursion safety fix and a persistent slice daemon — with human in the loop only at yes/modify/abort gates. |
| 24 | |
| 25 | ## Install |
| 26 | |
| 27 | Copy-paste: |
| 28 | |
| 29 | ```bash |
| 30 | claude plugin marketplace add TT-Wang/forge |
| 31 | claude plugin install forge@tt-wang-plugins |
| 32 | ``` |
| 33 | |
| 34 | First start may take a few seconds because Forge bootstraps its MCP server dependencies automatically. |
| 35 | |
| 36 | After install: |
| 37 | |
| 38 | 1. restart Claude Code if it was already open |
| 39 | 2. open any repo you want to work in |
| 40 | 3. run `/forge <objective>` |
| 41 | |
| 42 | Example: |
| 43 | |
| 44 | ```text |
| 45 | /forge add audit logging for admin actions |
| 46 | ``` |
| 47 | |
| 48 | ## The Pitch |
| 49 | |
| 50 | Forge is for the point where plain prompting stops being enough. |
| 51 | |
| 52 | If the task touches several files, needs coordination between modules, or needs proof that it actually works, Forge gives Claude Code a workflow instead of just another prompt: |
| 53 | |
| 54 | - break the work into modules |
| 55 | - run what can be parallelized |
| 56 | - validate each module hard |
| 57 | - retry failures with debugger context |
| 58 | - remember what worked for the next task |
| 59 | |
| 60 | You still use Claude Code. Forge just adds structure around the hard parts. |
| 61 | |
| 62 | ## What You Get |
| 63 | |
| 64 | - **Structured planning**: breaks a feature into modules with dependencies and verification commands |
| 65 | - **Parallel execution**: runs independent modules at the same time in isolated worktrees |
| 66 | - **Deep validation**: checks files, commands, syntax, and cross-module API contracts |
| 67 | - **Intelligent retry**: tracks attempts, detects stagnation, and escalates to a debugger agent |
| 68 | - **Session resumability**: picks up incomplete work instead of starting from scratch |
| 69 | - **Cross-session memory**: remembers conventions, failure patterns, and test commands |
| 70 | - **Status visibility**: exposes progress in Claude output and a terminal status line |
| 71 | |
| 72 | ## Why Not Just Use Claude Code Directly? |
| 73 | |
| 74 | For many tasks, you should. |
| 75 | |
| 76 | | Task shape | Plain Claude Code | Forge | |
| 77 | |---|---|---| |
| 78 | | One small edit | Better | Overkill | |
| 79 | | Quick investigation | Better | Overkill | |
| 80 | | Multi-file feature | Manual coordination required | Strong fit | |
| 81 | | Parallelizable work | You manage it yourself | Built in | |
| 82 | | Deep validation | You remember to run it | Part of the workflow | |
| 83 | | Retry after failure | Manual retry and debugging | Tracked, guided, resumable | |
| 84 | | Reusing patterns across sessions | Ad hoc | Built in memory | |
| 85 | |
| 86 | Forge is not trying to replace normal usage. It is for the tasks where orchestration matters. |
| 87 | |
| 88 | ## Quick Start |
| 89 | |
| 90 | ### 60-second setup |
| 91 | |
| 92 | 1. Install Forge with the two commands above |
| 93 | 2. Restart Claude Code |
| 94 | 3. Open your project |
| 95 | 4. Paste one objective: |
| 96 | |
| 97 | ```text |
| 98 | /forge add JWT auth with refresh tokens |
| 99 | ``` |
| 100 | |
| 101 | 5. Approve the generated plan |
| 102 | |
| 103 | ### Run |
| 104 | |
| 105 | ```text |
| 106 | /forge build an audit log for admin actions |
| 107 | ``` |
| 108 | |
| 109 | ### Check Progress |
| 110 | |
| 111 | ```text |
| 112 | /forge-status |
| 113 | ``` |
| 114 | |
| 115 | ### Re-check One Module |
| 116 | |
| 117 | ```text |
| 118 | /forge-validate m2 |
| 119 | ``` |
| 120 | |
| 121 | ## A Typical Session |
| 122 | |
| 123 | ```text |
| 124 | /forge add JWT auth with refresh tokens |
| 125 | |
| 126 | [forge] Phase 1: Planning... |
| 127 | [forge] Proposed Plan: 4 modules, 2 parallel groups |
| 128 | [forge] Proceed with this plan? (yes / modify / abort) |
| 129 | |
| 130 | [forge] Phase 2: Executing m1... |
| 131 | [forge] Phase 2: Executing m2, m3 in parallel... |
| 132 | [forge] ✓ m2: DONE — validated, score 1.0 |
| 133 | [forge] ✗ m3: FAILED — retrying with debugger |
| 134 | [forge] ✓ m3: DONE — validated after retry |
| 135 | |
| 136 | [forge] ## Forge Complete |
| 137 | [forge] 4/4 modules |