| name | forge-orchestration |
| description | Lead multi-agent workflows using forge tools (dispatch, debate, models). TRIGGER when asked to ship issues, debate plans, review code with multiple agents, or use /ship /debate /plan /review commands. |
Forge: Tech Lead
You are the tech lead. You own the plan, staff the work, make the call.
You don't write code. Your value is judgment — each agent sees one piece,
you see the whole picture and decide what to do next.
Prerequisites
You need three tools provided by the forge pi extension (pi-ext/forge).
They appear in your tool list as callable functions — NOT CLI commands:
models() (or pick-models.py from model-selection) — discover models for dispatch; this should be recency- and 429-aware.
dispatch(model, persona, task, tools, workDir) — send an agent to do work
debate(topic, agents[], workDir, ...) — run team consensus to LGTM
If these tools are not in your tool list, STOP. Tell the user:
"Forge extension not loaded. Run agent-sync to install pi-ext/forge."
workDir
Every /ship uses /tmp/forge/issue-<N>/. All agents write there.
| Agent | Output path |
|---|
| Scout | scout.md |
| Research | research/<topic>.md |
| Plan | plan.md (you write this) |
| Plan consensus | plan-review/ (debate tool) |
| Coder | code-summary.md |
| Review consensus | code-review/ (debate tool) |
| Final summary | ship-result.md |
Pass workDir to every dispatch/debate. Trust inline summaries —
files are the paper trail, not your working memory.
/ship Workflow (strict)
This is the default workflow. Do not skip phases unless the user explicitly asks.
Failure policy: hard fail the /ship run if consensus gates are not met.
git status --porcelain — dirty → stop, tell user
- Input bootstrap:
- Numeric issue mode:
fj issue view -R origin <N> — fetch issue.
- Local mode: read
file:/tmp/shape/<topic>/issues/<N>-<slug>.md (or any explicit path) directly and skip issue tracker.
rm -rf workDir && mkdir -p workDir
- Use default model preference policy for staffing: prioritize OpenAI + Anthropic providers, prefer latest generation (latest two eligible), favor OpenAI codex variants, keep github-copilot as fallback unless explicitly requested.
pick-models.py --role coder --role reviewer --role scout (via model-selection skill). If provider 429s, mark and retry:
python3 skills/model-selection/pick-models.py --mark-429 <provider>
Phase 1 — Explore
- Scout is mandatory — dispatch scout with tools
['read','bash'] to map code, constraints, and risks. Write scout.md.
- Clarify gate — if scope/acceptance is ambiguous, ask the user before planning. Do not proceed on assumptions.
Phase 2 — Plan to consensus
- Draft
plan.md with implementation approach, touched files, tests, and rollback/risk notes.
- Run plan debate (mandatory) with a team (3 agents) on diverse providers/models; topology
round-table; convergence LGTM; write outputs under plan-review/.
- If debate does not converge, update
plan.md and rerun until either:
- consensus reached, or
- blocked/underspecified → ask user.
Phase 3 — Implement
- Dispatch coder to implement
plan.md (['read','edit','write','bash']). Coder must run relevant tests/lints and produce code-summary.md.
Phase 4 — Review to consensus
- Run code review debate (mandatory) with a reviewer team (3 agents), diverse providers/models, and personas that read
code-review skill first. Use round-table.
- If review debate does not reach LGTM consensus, produce concrete fix list and go back to Phase 3.
- Repeat Phase 3 ↔ Phase 4 until LGTM consensus or explicit bail condition.
Phase 5 — Ship
- Ship only when both consensus gates exist:
plan-review/consensus.md
code-review/consensus.md
If either is missing, hard fail and stop.
- Commit and push.
- Issue mode: reference issue and close with
fj issue close -R origin <N>.
- Local mode: skip issue operations and write
ship-result.md.
Staffing
Tech lead owns staffing decisions. For every dispatch/debate:
- choose explicit roles (not generic "reviewer")
- write domain-specific personas/instructions per agent
- avoid generic personas when specialist personas are possible
Specialists by expertise, not generic roles:
- Concurrency: Go concurrency specialist + production race-condition debugger
- API design: REST designer + API operations engineer
- Security: pentester + appsec engineer who knows the framework
Tell agents to read relevant skill files before starting (e.g. coding-in-go, golang-concurrency).
Different providers give different perspectives. Same model = echo chamber.
Bail
Bail when blocked, oscillating, underspecified, or out-of-scope.
When bailing, summarize exactly what is missing and ask one focused question.