# alanvaa06/forge-master architecture

> Architecture diagram of the GitHub repository alanvaa06/forge-master, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alanvaa06/forge-master
- Repository: https://github.com/alanvaa06/forge-master

## Overview

Forge Master is a Claude Code plugin for contract-driven autonomous software work. Its principal workflow turns an idea or existing requirements into an approved PRD, optionally a spec, then an approved execution plan; the run command executes phases, verifies them, and produces a final report or cleanly blocks. Separate capabilities include token budgeting, parallel phase execution, agent review, and a pre-tool guard. README-described links are cited to the README; the sampled state and Git helpers show their direct dependency. Other skill internals were not sampled.

Main entry points: [`skills/forge/SKILL.md`](https://github.com/alanvaa06/forge-master/blob/main/skills/forge/SKILL.md) (Forge workflow), [`skills/forge-run/SKILL.md`](https://github.com/alanvaa06/forge-master/blob/main/skills/forge-run/SKILL.md) (Run orchestrator), [`skills/prd-design/SKILL.md`](https://github.com/alanvaa06/forge-master/blob/main/skills/prd-design/SKILL.md) (PRD design), [`skills/prd-import/SKILL.md`](https://github.com/alanvaa06/forge-master/blob/main/skills/prd-import/SKILL.md) (PRD import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_design["Requirements design"]
  node_forge["Forge workflow<br/>[SKILL.md]"]
  node_prd_design["PRD design<br/>[SKILL.md]"]
  node_prd_import["PRD import<br/>[SKILL.md]"]
  node_prd_artifact["PRD artifact"]
  node_spec_design["Spec design<br/>[SKILL.md]"]
  node_spec_artifact["Spec artifact"]
end

subgraph group_planning["Plan preparation"]
  node_plan_design["Plan design<br/>[SKILL.md]"]
  node_budget["Token budget<br/>[SKILL.md]"]
  node_plan_artifact["Execution plan"]
end

subgraph group_execution["Run execution"]
  node_run["Run orchestrator<br/>[SKILL.md]"]
  node_implementers["Phase implementers"]
  node_reviewer["Code reviewer<br/>[forge-reviewer.md]"]
  node_run_artifacts["Run reports"]
end

subgraph group_runtime["State and evidence"]
  node_state["Run state machine<br/>[forge-state.mjs]"]
  node_git_helpers["Git evidence helpers<br/>[forge-git.mjs]"]
end

subgraph group_governance["Plugin safeguards"]
  node_guard["Tool guard<br/>[forge-guard.mjs]"]
end

node_user(("Engineer"))
node_git[("Git repository")]
node_claude(("Claude Code"))

node_user -->|"starts workflow"| node_forge
node_user -->|"provides idea"| node_prd_design
node_user -->|"provides requirements"| node_prd_import
node_forge -->|"routes to"| node_prd_design
node_forge -->|"routes to"| node_prd_import
node_prd_design -->|"creates PRD"| node_prd_artifact
node_prd_import -->|"normalizes PRD"| node_prd_artifact
node_forge -->|"routes optionally"| node_spec_design
node_spec_design -->|"creates spec"| node_spec_artifact
node_forge -->|"routes to"| node_plan_design
node_plan_design -->|"creates plan"| node_plan_artifact
node_budget -->|"estimates budgets"| node_plan_artifact
node_forge -->|"routes to"| node_run
node_run -->|"dispatches phases"| node_implementers
node_run -->|"requests review"| node_reviewer
node_run -->|"writes report"| node_run_artifacts
node_run -->|"uses state commands"| node_state
node_state -->|"snapshots worktree"| node_git_helpers
node_git_helpers -->|"runs Git commands"| node_git
node_claude -.->|"invokes tool hook"| node_guard

click node_forge "https://github.com/alanvaa06/forge-master/blob/main/skills/forge/SKILL.md"
click node_prd_design "https://github.com/alanvaa06/forge-master/blob/main/skills/prd-design/SKILL.md"
click node_prd_import "https://github.com/alanvaa06/forge-master/blob/main/skills/prd-import/SKILL.md"
click node_prd_artifact "https://github.com/alanvaa06/forge-master/tree/main/docs/forge/prd"
click node_spec_design "https://github.com/alanvaa06/forge-master/blob/main/skills/spec-design/SKILL.md"
click node_spec_artifact "https://github.com/alanvaa06/forge-master/tree/main/docs/forge/specs"
click node_plan_design "https://github.com/alanvaa06/forge-master/blob/main/skills/plan-design/SKILL.md"
click node_budget "https://github.com/alanvaa06/forge-master/blob/main/skills/budget/SKILL.md"
click node_plan_artifact "https://github.com/alanvaa06/forge-master/tree/main/docs/forge/plans"
click node_run "https://github.com/alanvaa06/forge-master/blob/main/skills/forge-run/SKILL.md"
click node_implementers "https://github.com/alanvaa06/forge-master/tree/main/agents"
click node_reviewer "https://github.com/alanvaa06/forge-master/blob/main/agents/forge-reviewer.md"
click node_run_artifacts "https://github.com/alanvaa06/forge-master/tree/main/docs/forge/runs"
click node_state "https://github.com/alanvaa06/forge-master/blob/main/skills/forge-run/scripts/forge-state.mjs"
click node_git_helpers "https://github.com/alanvaa06/forge-master/blob/main/skills/forge-run/scripts/forge-git.mjs"
click node_guard "https://github.com/alanvaa06/forge-master/blob/main/hooks/forge-guard.mjs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_forge,node_prd_design,node_prd_import,node_prd_artifact,node_spec_design,node_spec_artifact toneBlue
class node_plan_design,node_budget,node_plan_artifact,node_git toneAmber
class node_run,node_implementers,node_reviewer,node_run_artifacts toneMint
class node_state,node_git_helpers toneRose
class node_guard,node_user,node_claude toneIndigo
```

## Components

### Requirements design

- [Forge workflow](https://github.com/alanvaa06/forge-master/blob/main/skills/forge/SKILL.md): `skills/forge/SKILL.md`
- [PRD design](https://github.com/alanvaa06/forge-master/blob/main/skills/prd-design/SKILL.md): `skills/prd-design/SKILL.md`
- [PRD import](https://github.com/alanvaa06/forge-master/blob/main/skills/prd-import/SKILL.md): `skills/prd-import/SKILL.md`
- [PRD artifact](https://github.com/alanvaa06/forge-master/tree/main/docs/forge/prd): `docs/forge/prd`
- [Spec design](https://github.com/alanvaa06/forge-master/blob/main/skills/spec-design/SKILL.md): `skills/spec-design/SKILL.md`
- [Spec artifact](https://github.com/alanvaa06/forge-master/tree/main/docs/forge/specs): `docs/forge/specs`

### Plan preparation

- [Plan design](https://github.com/alanvaa06/forge-master/blob/main/skills/plan-design/SKILL.md): `skills/plan-design/SKILL.md`
- [Token budget](https://github.com/alanvaa06/forge-master/blob/main/skills/budget/SKILL.md): `skills/budget/SKILL.md`
- [Execution plan](https://github.com/alanvaa06/forge-master/tree/main/docs/forge/plans): `docs/forge/plans`

### Run execution

- [Run orchestrator](https://github.com/alanvaa06/forge-master/blob/main/skills/forge-run/SKILL.md): `skills/forge-run/SKILL.md`
- [Phase implementers](https://github.com/alanvaa06/forge-master/tree/main/agents): `agents`
- [Code reviewer](https://github.com/alanvaa06/forge-master/blob/main/agents/forge-reviewer.md): `agents/forge-reviewer.md`
- [Run reports](https://github.com/alanvaa06/forge-master/tree/main/docs/forge/runs): `docs/forge/runs`

### State and evidence

- [Run state machine](https://github.com/alanvaa06/forge-master/blob/main/skills/forge-run/scripts/forge-state.mjs): `skills/forge-run/scripts/forge-state.mjs`
- [Git evidence helpers](https://github.com/alanvaa06/forge-master/blob/main/skills/forge-run/scripts/forge-git.mjs): `skills/forge-run/scripts/forge-git.mjs`

### Plugin safeguards

- [Tool guard](https://github.com/alanvaa06/forge-master/blob/main/hooks/forge-guard.mjs): `hooks/forge-guard.mjs`

### Other components

- **Engineer**
- **Git repository**
- **Claude Code**

## Connections

- Engineer → Forge workflow: starts workflow (evidence: `README.md`)
- Engineer → PRD design: provides idea (evidence: `README.md`)
- Engineer → PRD import: provides requirements (evidence: `README.md`)
- Forge workflow → PRD design: routes to (evidence: `README.md`)
- Forge workflow → PRD import: routes to (evidence: `README.md`)
- PRD design → PRD artifact: creates PRD (evidence: `README.md`)
- PRD import → PRD artifact: normalizes PRD (evidence: `README.md`)
- Forge workflow → Spec design: routes optionally (evidence: `README.md`)
- Spec design → Spec artifact: creates spec (evidence: `README.md`)
- Forge workflow → Plan design: routes to (evidence: `README.md`)
- Plan design → Execution plan: creates plan (evidence: `README.md`)
- Token budget → Execution plan: estimates budgets (evidence: `README.md`)
- Forge workflow → Run orchestrator: routes to (evidence: `README.md`)
- Run orchestrator → Phase implementers: dispatches phases (evidence: `README.md`)
- Run orchestrator → Code reviewer: requests review (evidence: `README.md`)
- Run orchestrator → Run reports: writes report (evidence: `README.md`)
- Run orchestrator → Run state machine: uses state commands (evidence: `README.md`)
- Run state machine → Git evidence helpers: snapshots worktree (evidence: `skills/forge-run/scripts/forge-state.mjs`)
- Git evidence helpers → Git repository: runs Git commands (evidence: `skills/forge-run/scripts/forge-git.mjs`)
- Claude Code → Tool guard: invokes tool hook
