Framework for Orchestrated Requirements, Governance & Engineering
A structured, enterprise-grade agentic development methodology that adapts ceremony to complexity through progressive context engineering and constitutional governance β for OpenCode, Claude Code, and Codex CLI.
FORGE is a complete AI-powered development methodology that brings structure, consistency, and quality to software projects. It combines:
- ποΈ Progressive Context Engineering - Document chains that feed AI agents with the right context at the right time
- π Multi-Track Workflows - From 30-minute hotfixes to multi-month epics, ceremony adapts to complexity
- βοΈ Constitutional Governance - Non-negotiable principles that ensure architectural consistency
- π Adversarial Quality - AI reviews that actively look for issues before human review
- π Persistent Knowledge - Decision logs, ADRs, and lessons learned that survive across sessions
FORGE is dogfooded - it was developed using itself, ensuring every feature solves real problems.
Adapt your process to task complexity:
| Track | Scope | Time | Use Case |
|---|---|---|---|
| Hotfix | 1 file, urgent | < 30 min | Production bugs |
| Quick | 1-5 tasks | < 1 day | Simple features |
| Feature | 5-20 tasks | 1-5 days | Standard features |
| Epic | 20-50 tasks | 1-4 weeks | Major features |
| Product | 50+ tasks | 4+ weeks | New products |
Nine purpose-built agents handle different phases:
- forge-pm - Product Manager: Requirements, PRDs, clarification
- forge-architect - Solution Architect: Technical design, ADRs
- forge-ux - UX Designer: User journeys, wireframes, accessibility, design specs
- forge-scrum - Scrum Master: Sprint planning, task breakdown
- forge-analyst - Business Analyst: Codebase exploration, product briefs
- forge-reviewer - Adversarial Reviewer (primary): Find real issues, not praise
- forge-reviewer-peer - Adversarial Reviewer (peer): Independent second opinion
- forge-qa - QA Engineer: Test strategy, coverage analysis
- forge (orchestrator) - Routes to the right agent based on complexity
/forge-reviewalways invokes both reviewer agents in parallel. Their findings are synthesised β consensus issues (flagged by both models) carry the highest confidence.
Progressive context engineering through structured documents:
Constitution β Brief β PRD β Spec β Design β Architecture β Plan β Tasks β Code β Tests
β β β β β β β β β β
Principles Vision What Why UX/UI How Steps Action Build Verify
Each document:
- β Self-contained (readable standalone)
- β References upstream documents explicitly
- β Includes metadata (version, date, status, spec ID)
- β Uses explicit relative paths for implementation
Your .forge/constitution.md defines non-negotiable rules:
- Technology stack and dependency policies
- Architecture patterns and data patterns
- Quality standards and test coverage thresholds
- Security requirements and error handling
- Naming conventions and operational requirements
All decisions must comply - AI agents verify compliance automatically.
FORGE runs natively on three AI-coding runtimes with a single shared codebase:
| Platform | Vendor | Install Location | Config File | Project Instructions |
|---|---|---|---|---|
| OpenCode | OpenCode | .opencode/{agents,commands,skills,tools,plugins}/ |
opencode.json |
AGENTS.md |
| Claude Code | Anthropic | .claude/{agents,commands,skills,hooks}/ |
.claude/settings.json |
CLAUDE.md (@AGENTS.md) |
| Codex CLI | OpenAI | .codex/{agents,commands}/ + .agents/skills/ |
.codex/config.toml |
AGENTS.md |
The installer auto-detects which platform(s) you're using by probing for .opencode/, .claude/, and .codex/ directories, then projects the correct layout for each detected platform.
Custom tools (validate-spec, trace-requirements, sprint-status) are exposed via a shared MCP server that works identically on all three platforms.
Knowledge that survives sessions:
- Decision Log - Session-level decisions auto-captured
- ADRs - Formal Architecture Decision Records
- Lessons Learned - Mistakes and insights from retrospectives
- Sprint History - Progress tracking and velocity metrics
FORGE auto-detects your platform. One command works for all:
# Clone FORGE
git clone https://github.com/lucaforni/forge.git
# Install in your project (auto-detects OpenCode / Claude Code / Codex CLI)
npx tsx forge/install-forge.ts /path/to/your/project
# Or force a specific platform:
npx tsx forge/install-forge.ts /path/to/your/project --platform=claude-code
# Preview what will be installed (writes nothing):
npx tsx forge/install-forge.ts /path/to/your/project --dry-run-
Customize your constitution:
# Edit your project principles code .forge/constitution.md -
Set project conventions:
# Define naming, git workflow, etc. code AGENTS.md -
Start building:
# In your AI coding runtime (OpenCode / Claude Code / Codex CLI) /forge-help # See all commands /forge-specify "Feature" # Create a spec /forge-implement # Build it /forge-review # Review it
| Document | Purpose |
|---|---|
| CHEATSHEET.md | Quick reference for all commands |
| FORGE-GUIDE.md | Complete methodology guide |
| FORGE-PHILOSOPHY.md | Principles and rationale |
| INSTALL.md | Installation guide & troubleshooting |
| CONTRIBUTING.md | How to contribute to FORGE |
/forge-quick "Add email validation to signup form"
# Automatically creates tech-spec, implements, and tests
/forge-review
# Adversarial review finds issues
# Fix issues, commit, done!/forge-specify "User authentication system with OAuth"
# Creates detailed spec.md with requirements
/forge-clarify
# Refines requirements through Q&A
/forge-ux
# Designs user journeys, wireframes, accessibility spec
/forge-plan
# Creates architecture.md and plan.md
/forge-analyze
# Validates spec-plan consistency
/forge-tasks
# Breaks down into actionable tasks
/forge-implement
# Builds the feature
/forge-review
# Dual-model adversarial review across 7 dimensions (forge-reviewer + forge-reviewer-peer in parallel)
/forge-test
# Generates comprehensive tests/forge-hotfix "Fix null pointer exception in payment handler"
# Diagnoses issue, applies fix, generates tests
# No ceremony, just results
/forge-review
# Quick review before deployment/forge-brief "E-commerce platform"
# Analyzes codebase, creates product brief
/forge-prd
# Creates Product Requirements Document
/forge-architecture
# Designs system architecture with ADRs
/forge-sprint plan
# Creates sprint-001 with stories
/forge-story "User registration flow"
# Creates user story
/forge-implement
# Builds the story
/forge-sprint close
# Closes sprint, archives to history
/forge-retro
# Retrospective captures lessons learnedyour-project/
βββ .opencode/ # FORGE system (OpenCode β installed)
β βββ agents/ # Specialized AI agents
β βββ commands/ # Slash commands
β βββ skills/ # Reusable logic
β βββ plugins/ # Event-driven automation
β βββ tools/ # Custom tools (OpenCode SDK)
β βββ templates/ # Document templates
β βββ docs/ # Methodology documentation
β
βββ .claude/ # FORGE for Claude Code (installed)
β βββ agents/ # Same agents, projected for Claude Code
β βββ commands/ # Same commands
β βββ skills/ # Same skills
β βββ hooks/ # Hook-based automation
β βββ settings.json # Claude Code config
β
βββ .codex/ # FORGE for Codex CLI (installed)
β βββ agents/ # Codex-native agent definitions
β βββ commands/ # Same commands
β
βββ .agents/skills/ # Skills for Codex CLI (installed)
β
βββ .forge/ # Your project data (all platforms)
β βββ mcp-server/ # Shared MCP server (forge-mcp-server)
β βββ constitution.md # π Your project principles
β βββ specs/ # Feature specifications
β β βββ 001-feature/
β β βββ spec.md # Requirements
β β βββ design-spec.md # UX/UI design (wireframes, components, a11y)
β β βββ user-journey.md # Personas & user journeys
β β βββ plan.md # Implementation plan
β β βββ tasks.md # Task breakdown
β βββ ux/
β β βββ design-system.md # Shared design tokens & components
β βββ knowledge/
β β βββ adr/ # Architecture decisions
β β βββ decision-log.md # Session decisions
β β βββ lessons-learned.md # Retrospective insights
β βββ epics/ # Epic documents
β βββ sprints/ # Sprint tracking
β β βββ sprint-001.json # Active sprint
β β βββ archive/ # Completed sprints
β βββ product/ # Product brief & roadmap
β
βββ AGENTS.md # π Your project conventions (OpenCode + Codex)
βββ CLAUDE.md # π Claude Code instructions (@AGENTS.md import)
βββ
βββ .forge/ # Your project data
β βββ constitution.md # π Your project principles
β βββ specs/ # Feature specifications
β β βββ 001-feature/
β β βββ spec.md # Requirements
β β βββ design-spec.md # UX/UI design (wireframes, components, a11y)
β β βββ user-journey.md # Personas & user journeys
β β βββ plan.md # Implementation plan
β β βββ tasks.md # Task breakdown
β βββ ux/
β β βββ design-system.md # Shared design tokens & components
β βββ knowledge/
β β βββ adr/ # Architecture decisions
β β βββ decision-log.md # Session decisions
β β βββ lessons-learned.md # Retrospective insights
β βββ epics/ # Epic documents
β βββ sprints/ # Sprint tracking
β β βββ sprint-001.yaml # Active sprint
β β βββ archive/ # Completed sprints
β βββ product/ # Product brief & roadmap
β
βββ AGENTS.md # π Your project conventions
FORGE automatically recommends the right track based on:
- Estimated task count
- Files affected
- New dependencies required
- Schema changes
- API surface changes
- Cross-module impact
- Need for new patterns
Each phase receives exactly the context it needs:
Specify Phase β Constitution, existing architecture
UX Phase β Spec, existing design system
Architecture β Constitution, PRD, design spec, existing ADRs
Implementation β Spec, design spec, plan, architecture, constitution
Review β Spec, design spec, architecture, diff, constitution
(loaded by both forge-reviewer and forge-reviewer-peer independently)
Budget-aware loading prevents context window overflow.
/forge-review runs a dual-model adversarial review β forge-reviewer
and forge-reviewer-peer execute in parallel
and independently, then the orchestrator synthesises their findings.
Each model reviews across 7 dimensions:
- Correctness - Logic errors, edge cases, assumptions
- Security - Vulnerabilities, injection risks, data leaks
- Performance - Bottlenecks, inefficient algorithms, resource usage
- Maintainability - Complexity, documentation, extensibility
- Constitution Compliance - Adherence to project principles
- Test-Spec Coherence - Every acceptance criterion has a matching test
- UX Quality - Accessibility (WCAG 2.1 AA), usability, consistency with design spec
The synthesis report highlights consensus findings (raised by both models) as highest-confidence issues. Anti-sycophancy rules prevent generic praise.
For Epic/Product tracks:
- Multi-sprint support with automatic archiving
- Story assignment and tracking
- Velocity metrics and burndown
- Retrospectives with lessons captured
- Sprint history preserved in
sprints/archive/
β AI agents forget context between sessions
β No consistency in architectural decisions
β Mixing urgent fixes with long-term features
β Knowledge lost when agents restart
β AI reviews are too positive, miss real issues
β
Progressive Context - Right information at the right time
β
Constitutional Consistency - All decisions follow principles
β
Adaptive Ceremony - Hotfix to Epic, ceremony matches complexity
β
Persistent Knowledge - Decision logs, ADRs, lessons learned
β
Adversarial Quality - AI actively finds issues before humans
We welcome contributions! See CONTRIBUTING.md for:
- How to set up development environment
- Code standards and conventions
- Testing requirements
- Pull request process
FORGE is dogfooded - all features must be developed using FORGE itself.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Task Complexity Assessment β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β < 3 tasks, 1-2 files, < 30 min β Hotfix β
β 3-5 tasks, 2-5 files, < 1 day β Quick β
β 5-20 tasks, 5-15 files, 1-5 days β Feature β
β 20-50 tasks, 15-50 files, 1-4 weeks β Epic β
β 50+ tasks, 50+ files, 4+ weeks, new system β Product β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Not sure which track? Run /forge-help and the orchestrator will assess complexity automatically.
FORGE includes cross-platform tools via a shared MCP server:
| Tool | Description | Platform |
|---|---|---|
| validate-spec | Check spec completeness and quality (0-100%) | All platforms via MCP |
| trace-requirements | Trace spec requirements to implementation | All platforms via MCP |
| sprint-status | Visual sprint dashboard with progress bars | All platforms via MCP |
The forge-mcp-server is automatically configured for each platform:
- OpenCode: referenced in
opencode.jsonundermcp - Claude Code: referenced in
.claude/settings.jsonundermcpServers - Codex CLI: referenced in
.codex/config.tomlundermcp_servers
Plugins provide automation (adapted per-platform hooks):
- session-knowledge - Auto-capture decisions when sessions end
- spec-watcher - Detect spec changes and suggest updates
- pre-commit-gate - Validate compliance before commits
FORGE enforces quality through:
- Test Coverage Thresholds - Defined in constitution (typically 70%+ line, 60%+ branch)
- Review Gates - AI adversarial review before human review
- Constitution Compliance - All decisions validated against principles
- Traceability - Every line of code traces to a spec or story
"FORGE transformed how we build features. The constitutional governance ensures our microservices stay consistent, and the adversarial review catches issues we would have missed."
β Development Team Lead
"Epic workflow with sprint management is perfect for our quarterly planning. Knowledge persistence means new team members can see why decisions were made."
β Engineering Manager
- Cross-platform support (OpenCode + Claude Code + Codex CLI) β v2.0
- MCP server for shared custom tools
- Platform-aware auto-detection installer
- GitHub Actions integration for CI/CD
- VS Code extension for quick command access
- Spec templates for common feature types
- Analytics dashboard for velocity and quality metrics
- Multi-repo support for monorepo workflows
- Export to Jira/Linear/Asana
See FORGE-PROJECT-PLAN.md for full roadmap.
FORGE is open source software licensed under the MIT License.
- Documentation: .opencode/docs/FORGE-GUIDE.md
- Cheatsheet: CHEATSHEET.md
- Installation: INSTALL.md
- Contributing: CONTRIBUTING.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
FORGE runs on three AI-coding runtimes β OpenCode, Claude Code (Anthropic), and Codex CLI (OpenAI) β and their shared investment in agentic tooling and MCP made this cross-platform approach possible.
Special thanks to the OpenCode team for creating the platform that started it all.
Built with FORGE, for FORGE
Every feature was developed using the methodology itself
Made with β€οΈ by Luca Forni
Ready to forge your next project?
git clone https://github.com/lucaforni/forge.git
npx tsx forge/install-forge.ts .
opencode
/forge-help