Skip to content
PazsitZPublic

About

Structured, multi-agent development pipeline

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

Forge

Structured, multi-agent development pipeline

License: MIT


Forge turns a task description or a design document into reviewed, tested, documented code. A planner, coder, qa-reviewer, test-writer and docs-writer work the task in sequence; you approve the plan and the review findings before either moves on. A dispatcher agent reads each agent's handoff log and decides what runs next — the routing rules are written down in one place instead of invented per run, so the fifth change of your day follows the same protocol as the first.

It is markdown: seven agents, one orchestrator (commands/forge.md), four skills. Nothing to compile, no runtime dependency, no service. Language- and framework-agnostic — four placeholders adapt it to a project. Written for Claude Code and GitHub Copilot; any harness that can dispatch a named subagent and run a command file can host it.

Forge pipeline: an optional design-doc feeds /forge, then planner, an approval gate, coder, qa-reviewer, a second approval gate, test-writer and docs-writer, ending at done. Each stage lights up in turn and darkens once it has passed.

Text version
[design-doc]  ← optional, interview-driven

idea or doc → [planner] → ✋ you approve → [coder] → [qa-reviewer]
              → ✋ you approve → [test-writer] → [docs-writer] → done

back-edges: coder → planner · qa-reviewer → coder · test-writer → coder

Escalation runs both ways: the coder sends ambiguous requirements back to the planner, the qa-reviewer sends bugs back to the coder, the test-writer surfaces source bugs before they reach you, and the docs-writer asks rather than guessing at a document it is unsure about.


Why this exists

  • Prompting an agent once gets you code, not a change. No plan you approved, no independent review, no tests added, documentation that quietly drifts. Forge makes each of those a stage with an artifact.
  • A protocol instead of a reroll. Every stage has a written contract — what it reads, what it writes, what it may never touch (the coder writes no test files, the reviewer edits nothing). The orchestrator may not implement anything itself; caught doing that, it recovers via the dispatcher.
  • Uncertainty is surfaced, not averaged out. Each handoff log carries a certainty grade. The dispatcher routes sure work silently and stops at everything else.
  • A run leaves a record — plan, one handoff log per stage, review findings, documentation audit log, in one directory. Which is also what lets you resume an interrupted run.

How the pipeline evolved: Building an Agentic Dev Pipeline — From Ad-Hoc Prompting to a Repeatable Protocol


Use cases

  1. Gated feature work — /forge "add email notifications when a job finishes": interview, plan, you approve, build, review, you approve again, tests, docs.
  2. Design-first work with contested scope — /design-doc "…" settles what and why and stops; /forge {docs-dir}/todo/<doc>.md executes it, and the design document closes itself out.
  3. A change you want traceable — six weeks later the run directory still says what was planned, what the reviewer found, what tests were added and which documents were edited.

For you if you already work in Claude Code or Copilot with a CLAUDE.md; you want the same protocol every time instead of re-prompting from scratch; your project has documentation worth keeping in sync and tests worth growing.

Not for one-line edits and throwaway spikes, where the gates cost more than they return; repos with no runnable tests and no written conventions, where the review and test stages have nothing to check against.


Requirements

  • Claude Code CLI or GitHub Copilot, any recent version. What a host must provide: named subagent dispatch, a command or prompt file, and a way to ask you a question with options.
  • A project with a CLAUDE.md at its root (Copilot: copilot-instructions.md) — the agents read it as the source of project conventions.
  • Nothing else. No runtime, no packages, no daemon.

Installation

Copy this tree into .claude/ (Claude Code) or .github/ (Copilot). On Copilot, put commands/forge.md under agents/ instead — with no command mechanism, forge runs as an agent that you invoke with the task as its argument.

<target>/
  agents/
    planner.md  coder.md  qa-reviewer.md  test-writer.md
    docs-writer.md  dispatcher.md  researcher.md
  commands/forge.md          ← Claude Code; Copilot: under agents/
  skills/
    interview-me/  design-doc/  explore-space/
    curate-learnings/        ← Claude-only: reads Claude session transcripts for usage evidence;
                               on Copilot it reports "no evidence available" and proposes nothing
  bootstrap.md               ← fill this in first

Then:

  1. Open bootstrap.md with your LLM and fill in the four placeholders; it says what to delete when a concept does not apply. Leave the runtime tokens ({ts}, {feature}, …) alone — the pipeline fills those at run time.
  2. Match each agent's model: frontmatter to what your provider offers: planner on a deep-thinking model; coder, qa-reviewer, test-writer and docs-writer on a smart one; dispatcher and researcher on a fast, cheap one.
  3. Run /forge.

Usage

/forge "add email notifications when a job finishes"    ← idea-first: interviews you, then plans
/forge {docs-dir}/todo/my-feature.md                    ← doc-first: reads the plan or design doc
/forge {workflow-dir}/run-20260516-125849               ← resume: re-enters at the most advanced stage
/design-doc "rework how jobs report progress"           ← optional Stage 0, writes a design doc and stops

Each run gets {workflow-dir}/run-{ts}/: plan.md, one handoff log per stage, review-findings.md for the test-writer, and docs-updates.md logging every documentation edit. The final summary names the files written, the test result, the changelog entry, and which living docs were updated or left pending your decision.


How a run goes

Stage Who What happens
1 planner Interviews you (or reads the doc), explores the codebase, writes plan.md
✋ approval gate You review the plan before any code is written
2 coder Implements the plan; never writes test files
3 qa-reviewer Reviews the touched files; writes review-findings.md for the test-writer
✋ approval gate You review the findings before tests are written
4 test-writer Writes and runs tests; escalates source bugs to the coder
5 docs-writer Changelog entry in {docs-dir}/changes, syncs living docs in {living-docs-dir}, closes out the source design doc
— dispatcher Runs after every stage: reads the handoff log, returns the routing decision

The approval gates always run — they are not certainty-gated. You can approve, ask for a fix (the stage re-runs with your instruction), or abort.

Researcher is a read-only sub-agent the planner, coder and docs-writer dispatch on demand, to answer codebase questions without polluting their own context.


Routing and certainty grades

Every handoff log opens with a JSON block carrying a certainty field. The dispatcher reads it and returns a decision; the orchestrator executes that decision and nothing else:

Grade Action
sure Auto-routes silently — no interruption
unsure Pauses and surfaces a question to you
dont-know Pauses and tells you what information is missing

The dispatcher is read-only: it never writes a file and never implements work. Escalation is capped at three loops on any single stage — after that the pipeline surfaces to you regardless of certainty, with the reason and the offending findings.


Documentation that keeps up

The docs-writer does not stop at the changelog. It builds a keyword set from the plan and the coder's handoff log, dispatches researchers over {living-docs-dir} to find documents the change affects — *-documentation* files, todo/ backlogs, architecture and usage guides — and grades each candidate before touching it: sure (related and demonstrably stale) gets a surgical edit; unsure (right document, wording or scope a judgment call) and dont-know are both left alone and asked about.

Append-only history is never touched ({docs-dir}/changes, run directories, dated archives, {docs-dir}/lessons/); todo entries are marked done, never deleted. Every modification — and every item left pending — lands in docs-updates.md with paths and pre-edit line ranges.

A run that started from a design doc also closes it out: delivered in full → status: final (and moved to {docs-dir}/archive, if that directory already exists); partly → nothing touched, the rest listed; ambiguous → asked at the docs gate. The body is never rewritten — a design doc records what was decided, not what was built.


Pre-design: /design-doc and explore-space

/design-doc "…" is an optional Stage 0 — also triggered by asking for a design, planning, analysis or architecture-decision document. It interviews you the way the planner does, writes the document, and stops. Never implements.

  • Produces {docs-dir}/todo/<slug>-design.md (or <slug>-analysis.md for a diagnosis) with Context, Decisions, Affected files and Open questions always present, plus optional Risks / Failure modes / Evaluation plan; frontmatter status: design | needs-decision | accepted. Full contract: skills/design-doc/SKILL.md.
  • Deliberately does not produce a Reachability table, ordered implementation steps, or line-level scope. The design doc owns what and why, the planner owns where and how — so the planner breaks settled decisions down without re-deciding any of them.
  • Chains directly into the pipeline. The planner settles any [BLOCKING] item with you first, re-verifies every path the doc names, treats recorded decisions as binding, and records the path as source_doc.
/design-doc "rework how jobs report progress"
/forge {docs-dir}/todo/job-progress-design.md

explore-space fires when the idea is too vague to interview on: it writes an evaluation rubric first, runs three persona passes (pragmatist, architect, contrarian), and returns a scored top-3 to pick or mix from. It decides nothing.

Take the two-step flow when scope is broad or contested, several approaches carry real trade-offs, or the decision should outlive the run that implements it. Otherwise /forge "…" interviews you directly and skips the extra artifact.


Skills

Skill When Output
interview-me planner and design-doc intake questions that settle scope before anything is written
design-doc optional Stage 0 a decision document; never implements
explore-space vague idea, before or instead of design-doc a rubric and a scored top-3
curate-learnings maintenance, on request prunes, merges and promotes lessons/memories from measured usage — Claude-only

Placeholders

Four tokens appear in the agent and command files. bootstrap.md gives descriptions, guidance and per-stack examples for each, plus the document directory layout.

Placeholder What it represents
{config-module} The file that centralises all env vars and constants
{workflow-dir} Root directory for pipeline run artefacts
{docs-dir} Root directory for project documentation — changelog, todo and lessons live in fixed subdirectories under it
{living-docs-dir} Documentation root the docs-writer keeps in sync

Repository layout

agents/
  planner.md        produces plan.md from a task or an existing doc
  coder.md          writes code, never test files
  qa-reviewer.md    reviews code, writes review-findings.md
  test-writer.md    writes and runs tests, escalates source bugs
  docs-writer.md    changelog entry + living-doc sync, never touches source files
  dispatcher.md     routing brain — read-only, never writes files
  researcher.md     read-only codebase explorer, context discarded on return
commands/
  forge.md          /forge — the orchestrator: sequence, gates, escalation
skills/             see the Skills table above
assets/
  pipeline-light.svg  pipeline-dark.svg   the diagram above
bootstrap.md        placeholder guide for setting up a new project

In development

Routing is being moved out of the dispatcher agent into a small script, so stage transitions, loop caps and recovery stop depending on how a model reads prose. It also brings an unattended mode and an install health check. Not released — there is no install path for it yet, and nothing in this README describes it.


Docs

License

MIT — see LICENSE.

About

Structured, multi-agent development pipeline

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages