forge
Forge
Single deep execution engine. One task, one in_progress, immediate status flips. Integration and checks are inline, not phases.
Loop (Four Beats, No Add-Ons)
Execute (-> one S-T ID) -> Check (3 items) -> Decide (L1/L2/L3) -> Align -> next
Check only: interfaces match, core flow runs, no acceptance red line. Extra checks waste tokens.
At each milestone boundary, execute scripts/trail.sh <BLUEPRINT.md> once so the emergent state is seen, not summarized from memory. Never per task.
Decide Matrix (Frozen)
| Level | Scope | Authority |
|---|---|---|
| L1 tweak | no req/stack/milestone change, <=2 files | auto-fix, optional one-line §8 note |
| L2 local fix | Blueprint §3/§5 change inside current M | pause task, bump v1.n, sync todos, continue, no ask, §8 row mandatory |
| L3 direction drift | req/stack/milestone change, or 2nd L2 miss in a row | freeze, emit Re-shape request, wait for human (gate C2) |
Order for L2 is fixed: stop task -> edit Blueprint -> append §8 row -> sync todos -> Check -> continue. Reversed order is a defect.
Example (L2, correct order):
# 1. Blueprint §5: split S2-T1 into S2-T1a / S2-T1b; §8: "v1.1 S2-T1: upload >10MB times out -> split sync/async"
# 2. todos: mark S2-T1 obsolete, create S2-T1a (current slice) + S2-T1b
# 3. Check: S2-T1a interface matches §3 before writing code
Rationalizations (Read Before Skipping a Step)
| Excuse | Reality |
|---|---|
| "Blueprint is obvious, start coding" | Obvious drafts cause all L3 drifts. No confirmed v1.0, no Forge. |
| "L2 is tiny, skip the §8 row" | Untracable edits make Audit unable to tell exec error from blueprint error. The row is the price of no-ask. |
| "Flip all todos at the end" | Stale states already burned this project once. One in_progress, flip now. |
Three Gates (Anti Infinite-Forging)
- Same
S-TCheck fails max 2 retries; 3rd miss escalates to L2/L3. - Max 3 L2 fixes per milestone; 4th forces L3 stop.
- Versions
v1.1-1.3only.v2.0requires returning to Shape. No silent drift.
Execution Protocol
- Startup gate: run
scripts/check-ids.sh <BLUEPRINT.md>and proceed only onPASS. Do not eyeball IDs. - Read Blueprint §4 milestone + next
S-Tbefore touching code. - Todo
contentstarts with the stable ID (S1-T1 ...); exactly onein_progressat a time; flip status immediately, never batch at the end. - Never invent tasks: new work first lands in Blueprint §5 + §8, then becomes a todo.
- Rework creates a new todo (
Rework from S1-T2), marks the old one obsolete; never rewrites history. - Config edits: read, preserve, validate (JSONC-aware); report restart needs.
- Shell text after an explicit run marker executes literally, first, without "improvement".
Re-Shape Request (L3 Only)
## Re-shape request
- Trigger task:
- One-line drift:
- Impact (req/tech/milestone):
- Return to (Define/Design/Validate):
- Disposition of done work (keep/rollback/refactor):
Additional Resources
- Deviation matrix + examples
- Task projection protocol
- Config editing guardrail
- Loop watch (only for in-session polling)
- Programmatic agents (only for agent-driven scripts/CI)
- Status line script (only for CLI footer work)
- ID gate script — execute it, do not read it for logic
- Visible trail script — execute it at milestone boundaries