Skip to content

lucaforni/forge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FORGE

Framework for Orchestrated Requirements, Governance & Engineering

A structured, enterprise-grade agentic development methodology for OpenCode that adapts ceremony to complexity through progressive context engineering and constitutional governance.

License OpenCode Version


🎯 What is FORGE?

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.


✨ Key Features

🎚️ Five Workflow Tracks

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

πŸ€– Specialized AI Agents

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 (Claude Opus 4.6): Find real issues, not praise
  • forge-reviewer-codex - Adversarial Reviewer (GPT-Codex): Independent second opinion
  • forge-qa - QA Engineer: Test strategy, coverage analysis
  • forge (orchestrator) - Routes to the right agent based on complexity

/forge-review always invokes both reviewer agents in parallel. Their findings are synthesised β€” consensus issues (flagged by both models) carry the highest confidence.

πŸ“‹ Document Chain Pattern

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

πŸ” Constitutional Governance

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.

🧠 Persistent Knowledge Management

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

πŸš€ Quick Start

Installation

Install FORGE in your project with one command:

# Clone FORGE
git clone https://github.com/lucaforni/forge.git

# Install in your project
npx tsx forge/install-forge.ts /path/to/your/project

# Start using FORGE
cd /path/to/your/project
opencode

First Steps

  1. Customize your constitution:

    # Edit your project principles
    code .forge/constitution.md
  2. Set project conventions:

    # Define naming, git workflow, etc.
    code AGENTS.md
  3. Start building:

    # In OpenCode
    /forge-help               # See all commands
    /forge-specify "Feature"  # Create a spec
    /forge-implement          # Build it
    /forge-review             # Review it

πŸ“š Documentation

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

🎬 Usage Examples

Quick Feature (< 1 day)

/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!

Standard Feature (1-5 days)

/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 (Claude Opus + GPT-Codex in parallel)

/forge-test
# Generates comprehensive tests

Emergency Hotfix (< 30 min)

/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

Epic with Sprints (weeks)

/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 learned

πŸ—οΈ Project Structure

your-project/
β”œβ”€β”€ .opencode/                  # FORGE system (installed)
β”‚   β”œβ”€β”€ agents/                 # Specialized AI agents
β”‚   β”œβ”€β”€ commands/               # Slash commands
β”‚   β”œβ”€β”€ skills/                 # Reusable logic
β”‚   β”œβ”€β”€ plugins/                # Event-driven automation
β”‚   β”œβ”€β”€ tools/                  # Custom tools
β”‚   β”œβ”€β”€ templates/              # Document templates
β”‚   └── docs/                   # Methodology documentation
β”‚
β”œβ”€β”€ .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

πŸ”§ Advanced Features

Scope Detection

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

Context Chaining

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-codex independently)

Budget-aware loading prevents context window overflow.

Adversarial Review

/forge-review runs a dual-model adversarial review β€” forge-reviewer (Claude Opus 4.6) and forge-reviewer-codex (GPT-Codex) execute in parallel and independently, then the orchestrator synthesises their findings.

Each model reviews across 7 dimensions:

  1. Correctness - Logic errors, edge cases, assumptions
  2. Security - Vulnerabilities, injection risks, data leaks
  3. Performance - Bottlenecks, inefficient algorithms, resource usage
  4. Maintainability - Complexity, documentation, extensibility
  5. Constitution Compliance - Adherence to project principles
  6. Test-Spec Coherence - Every acceptance criterion has a matching test
  7. 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.

Sprint Management

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/

🎯 Why FORGE?

Before FORGE

❌ 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

After FORGE

βœ… 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


🀝 Contributing

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.


πŸ“Š Workflow Track Selection

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  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.


πŸ› οΈ Tools & Integrations

FORGE includes custom OpenCode tools:

  • trace-requirements - Trace spec requirements to implementation
  • validate-spec - Check spec completeness and quality
  • sprint-status - Visual sprint dashboard

Plugins provide automation:

  • session-knowledge - Auto-capture decisions when sessions end
  • spec-watcher - Detect spec changes and suggest updates
  • pre-commit-gate - Validate compliance before commits

πŸ“ˆ Metrics & Quality

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

🌟 Success Stories

"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


πŸ—ΊοΈ Roadmap

  • 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.


πŸ“œ License

FORGE is open source software licensed under the MIT License.


πŸ”— Links


πŸ™ Acknowledgments

FORGE is built on top of OpenCode, the AI-native development environment.

Special thanks to the OpenCode team for creating a platform that makes agent-driven development possible.


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

About

Framework for Orchestrated Requirements, Governance & Engineering

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors