Design guidance + execution system for Claude Code plugin development.
Forge helps you structure decisions about how to design or improve plugins, skills, agents, commands, hooks, and MCP components in a semantically correct way.
Forge is a design guidance + execution system that:
- Structures evidence, variables, and trade-offs
- Executes only after user confirmation
- Follows a 9-phase operational workflow
Forge is NOT:
- A workflow enforcement tool (enforcement is optional)
- A skills provider (it reads existing skills)
- A decision maker (it presents options, user decides)
# Start the full workflow
/forge I want to add a validation hook
# Direct phase access
/forge analyze scripts/ # Codebase analysis
/forge design # Design options
/forge validate # Validation check
# Show interactive menu
/forge| Phase | Name | Strict | Description |
|---|---|---|---|
| 0 | Input Normalization | YES | Normalize intent, identify scope |
| 1 | Semantic Routing | no | 0-stage triage based on hints |
| 2 | Codebase Reality | no | Factual description of code |
| 3 | Mismatch Evaluation | no | Compare intent vs reality |
| 4 | Structured Questioning | YES | Collect decision variables |
| 5 | Option Synthesis | no | Propose options with trade-offs |
| 6 | Workflow Creation | no | Create workflow if needed |
| 7 | Execution | YES | Execute after confirmation |
| 8 | Validation | no | Final validation gate |
Phases 0, 4, and 7 are strict - they enforce tool restrictions:
- Phase 0: Must capture intent before proceeding
- Phase 4: Must follow Structured Dialogue Contract
- Phase 7: Requires user confirmation before execution
| Command | Description |
|---|---|
/forge |
Main entry with routing |
/diagnose |
Direct Phase 2 (codebase analysis) |
/design |
Direct Phase 5 (options) |
/workflow |
Workflow management |
| Agent | Phase | Purpose |
|---|---|---|
| input-normalizer | 0 | Normalize intent |
| semantic-router | 1 | Triage routing |
| codebase-analyzer | 2 | Reality description |
| mismatch-evaluator | 3 | Intent vs reality |
| questioner | 4 | Structured questioning |
| option-synthesizer | 5 | Design options |
| workflow-manager | 6 | Workflow creation |
| execution-orchestrator | 7 | Confirmed execution |
| validator | 8 | Final validation |
Phase 4 questions must follow this format:
Problem:
<mismatch or ambiguity>
Codebase:
<current design intent>
Evidence:
<specific observations>
Question:
<decision variable, NOT choice>
Question Intent:
<why this matters>
See references/structured-dialogue-contract.md for details.
Workflows support dynamic versioning:
- Create: Version = 1, Confirmed = false
- Modify: Version++, Confirmed = false
- Confirm: Confirmed = true, execution enabled
- Execute: Follows workflow steps
If workflow is modified after confirmation, reconfirmation is required.
Forge uses a daemon for state management:
# Check state
python3 scripts/forge-state.py state
# Check phase
python3 scripts/forge-state.py phase
# Check workflow
python3 scripts/forge-state.py workflowForge uses hooks for enforcement:
| Hook | Purpose |
|---|---|
| SessionStart | Initialize state |
| UserPromptSubmit | Detect confirmation |
| PreToolUse | Phase-appropriate tools |
| PostToolUse | Phase completion |
| Stop | Validation check |
- Essential phases strict from start: 0, 4, 7
- Other phases latent + promotable: Can become strict when needed
- Dynamic versioned daemon: Modification requires reconfirmation
- Validation is fixed Phase 8: Always runs at termination
- Methodology in agents: Phase logic encoded in agents
- Questions collect variables: Never choices
- 0-stage routing is triage: Identifies axes, not decisions
- Workflow scope selective: Comprehensive when needed
This implementation follows the Forge specification in plan.txt. The user will dogfood by running Forge on itself after completion.
forge/
├── plugin.json # Plugin manifest
├── commands/ # 4 commands
├── skills/ # 2 reference skills
├── agents/ # 9 phase agents
├── hooks/forge.json # Hook configuration
├── scripts/ # Daemon and hook scripts
├── config/ # Phase definitions
└── references/ # Documentation
MIT