FORGE development framework for Intent-Driven Development (IDD). Use for: forge, FORGE, new cycle, start cycle, advance phase, next phase, checkpoint, validate phase, focus, orchestrate, refine, generate, evaluate, cycle status, complete cycle, add learning, retrospective, TDD workflow, product plan, mvp, roadmap, architecture, PRD, hil, hil mode, human in the loop, iterate, tweak, refine cycle.
FORGE (Focus-Orchestrate-Refine-Generate-Evaluate) is an Intent-Driven Development (IDD) methodology for AI-assisted software development.
During Focus, Orchestrate, and Refine phases, you must gain clarity before proceeding:
prompts/prd-conversation.md as a guide)| Phase | Summarize & Confirm |
|---|---|
| Focus | "Problem: X. Users: Y. Success: Z. Boundaries: [in/out of scope]. Correct?" |
| "Architecture: N containers/components. Dependencies: [map]. Task breakdown: [list]. Correct?" |
| Refine | "Acceptance criteria: [Given-When-Then]. Edge cases: [categories]. Interfaces: [specs]. Correct?" |
Only advance after user confirms. Generate and Evaluate phases may proceed without additional confirmation once Refine is validated.
When running in Claude Code, leverage native tools for enhanced workflow:
| Phase | Native Tool | Purpose |
|---|---|---|
| Focus | AskUserQuestion | Gather requirements, clarify scope, confirm problem statement |
| Orchestrate | AskUserQuestion | Validate architecture decisions, confirm task breakdown |
| Refine | AskUserQuestion | Confirm acceptance criteria, validate edge cases |
| Generate | TodoWrite | Track implementation tasks (RED-GREEN-REFACTOR steps) |
| Evaluate | AskUserQuestion | Confirm verification results, get disposition decision |
Adaptive behavior:
AskUserQuestion is available, use it for structured clarification with optionsTodoWrite is available, use it to track Generate phase tasksExample - Using AskUserQuestion in Focus:
When clarifying requirements, present structured options:
- "What is your target user base?" with options like "Internal team", "External customers", "API consumers"
- This provides better UX than open-ended questions
Example - Using TodoWrite in Generate:
Track TDD workflow:
1. [in_progress] Write failing test for feature X
2. [pending] Implement minimal code to pass
3. [pending] Refactor while tests stay green
If clarity issues arise at any phase, you may:
HIL mode is a streamlined 3-phase cycle for active development — when you're already in the code, know what you're building, and are iterating on existing capabilities.
| Signal | Mode | Reasoning |
|---|---|---|
| Entirely new feature or capability | Full | Needs Focus (what/why) and Orchestrate (architecture) |
| Refining/tweaking existing design | HIL | Context already established, jump to Refine |
| Bug fix with clear reproduction | HIL | Acceptance criteria are the fix; skip planning |
| Design iteration after feedback | HIL | Re-enter at Refine with updated criteria |
| New system or major component | Full | Needs architectural decisions upfront |
| Updating processes to fit a design | HIL | The "what" is known; define "done" and implement |
Refine → Generate → Evaluate (→ loop back to Refine if needed)
uv run "$FORGE_TOOLS/forge_cycle.py" new "description of change" --mode hil
For ongoing active development, each update/tweak can be its own HIL cycle:
This keeps FORGE discipline (specifications before code, TDD, verification) without the overhead of full planning phases when the context is already established.
The tool scripts are in the tools/ subdirectory of this skill. Before running the first command, resolve the skill's install location:
# Local project install takes priority over global
if [ -d ".claude/skills/forge/tools" ]; then
FORGE_TOOLS=".claude/skills/forge/tools"
else
FORGE_TOOLS="$HOME/.claude/skills/forge/tools"
fi
Use the resolved path for all commands below. Since shell state does not persist between commands, prefix each invocation: FORGE_TOOLS=<resolved-path> && uv run "$FORGE_TOOLS/forge_init.py", or simply substitute the resolved path directly.
| User Request | Command |
|---|---|
| Initialize FORGE | uv run "$FORGE_TOOLS/forge_init.py" |
| Start new cycle | uv run "$FORGE_TOOLS/forge_cycle.py" new "name" |
| Start HIL cycle | uv run "$FORGE_TOOLS/forge_cycle.py" new "name" --mode hil |
| Check status | uv run "$FORGE_TOOLS/forge_status.py" |
| Validate phase | uv run "$FORGE_TOOLS/forge_status.py" --validate |
| Advance phase | uv run "$FORGE_TOOLS/forge_phase.py" advance |
| Complete task | uv run "$FORGE_TOOLS/forge_phase.py" complete-task "desc" |
| Add task | uv run "$FORGE_TOOLS/forge_phase.py" add-task "desc" |
| Complete cycle | uv run "$FORGE_TOOLS/forge_cycle.py" complete <id> |
| Add learning | uv run "$FORGE_TOOLS/forge_learn.py" add <cat> "title" "desc" |
| Retrospective | uv run "$FORGE_TOOLS/forge_learn.py" retro |
Learning categories: pattern, anti-pattern, decision, tool
| Phase | Purpose | Key Question |
|---|---|---|
| FOCUS | Clarity | What are you actually building? |
| ORCHESTRATE | Planning | How do you break this into pieces? |
| REFINE | Precision | What specifically does "done" look like? |
| GENERATE | Creation | AI produces deliverables matching scope |
| EVALUATE | Verification | Does output match intent? |
FORGE cycles work at any scope - feature, epic, or entire product/MVP. The phases are identical; the Generated output changes based on scope.
| Phase | Feature-Level | Product-Level |
|---|---|---|
| Focus | What feature & why | What product/MVP & why |
| Orchestrate | Component architecture, task breakdown | System architecture, feature breakdown |
| Refine | Feature acceptance criteria, interfaces | Product success criteria, per-feature scope |
| Generate | Code (TDD) | Documentation: PRD, architecture docs, roadmap, feature cycle plan |
| Evaluate | Verify code matches intent | Verify plans match intent |
At the product level, Generate produces documentation and plans - not code. Each planned feature then becomes its own FORGE cycle.
Product-level workflow:
forge_cycle.py new "mvp-product-name" - Create a product-level cycleRequired Outputs:
Required Outputs:
CRITICAL: No code in this phase - specifications only.
Required Outputs:
Process: RED → GREEN → REFACTOR
Rules:
Process:
Dispositions: Accept | Accept with issues | Revise | Reject
During each phase, create and maintain documents in docs/. Documents are organized per cycle/feature:
docs/
├── prd/
│ └── <cycle-name>.md # Focus: Problem statement, users, success criteria, scope
├── tasks/
│ └── <cycle-name>.md # Orchestrate: Session-sized task breakdown
└── <cycle-name>/
├── system-context.md # Focus: C4 Level 1 - system boundaries
├── containers.md # Orchestrate: C4 Level 2 - deployable units
├── components.md # Orchestrate: C4 Level 3 - internal structure
├── acceptance-criteria.md # Refine: Given-When-Then scenarios
├── interfaces.md # Refine: inputs, outputs, error contracts
└── edge-cases.md # Refine: categorized edge cases
Phase → Document mapping:
| Phase | Create/Update |
|---|---|
| Focus | prd/<cycle>.md, <cycle>/system-context.md |
| Orchestrate | tasks/<cycle>.md, <cycle>/containers.md, <cycle>/components.md |
| Refine | <cycle>/acceptance-criteria.md, <cycle>/interfaces.md, <cycle>/edge-cases.md |
Create documents as you complete phase work. These are the source of truth for Generate and Evaluate phases.
All cycle state lives in .forge/:
.forge/
├── config.yaml
├── context.md
├── learnings.md
└── cycles/
├── active/
└── completed/
Commit after every meaningful checkpoint — not just at the end of a phase:
.forge/ state whenever a phase advances so cycle progress is never lost.focus: add PRD and system context diagram or generate: implement user auth with tests.For automated phase constraint enforcement, configure hooks in .claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"command": [".claude/hooks/forge-phase-guard.sh"]
}
]
}
}
The hook script:
.forge/cycles/active/docs/ (specs, PRDs, architecture docs)Install the hook:
mkdir -p .claude/hooks
cp path/to/forge-skill/.claude/hooks/forge-phase-guard.sh .claude/hooks/
chmod +x .claude/hooks/forge-phase-guard.sh
When using Claude Code Agent Teams, assign model tiers based on cognitive demand:
| Agent | Model | Reasoning |
|---|---|---|
| Architect | opus | Architecture decisions, trade-off analysis |
| Security | opus | Threat modeling, adversarial thinking |
| Developer | sonnet | Well-specified implementation tasks |
| Tester | sonnet | Test writing from specifications |
| DevOps | sonnet | Infrastructure, config patterns |
| Documentation | haiku | Structured writing from existing content |
| Integration Coordinator | sonnet | Cross-component coordination |
| Reviewer | sonnet | Code quality checks against criteria |
Complexity overrides:
Map FORGE phases to Claude Code Agent Teams compositions:
| Phase | Team Lead | Teammates | Pattern |
|---|---|---|---|
| Focus | Architect (opus) | Security (opus), Documentation (haiku) | Lead defines scope; teammates assess risks and draft PRD |
| Orchestrate | Architect (opus) | — | Solo decomposition and dependency analysis |
| Refine | Architect (opus) | Tester (sonnet) | Lead defines interfaces; teammate writes acceptance criteria |
| Generate | Developer (sonnet) | Reviewer (sonnet) | Lead implements via TDD; reviewer checks each task against criteria |
| Evaluate | Tester (sonnet) | Reviewer (sonnet), Security (opus) | Tester verifies criteria; reviewer does final code review; security does adversarial review |
Generate phase detail:
Evaluate phase detail:
Clarity before code - Time in Focus, Orchestrate, and Refine prevents waste in Generate and Evaluate.