Skip to main content

FORGE Stage-Gated Execution

FORGE (Factory-Optimized Release Gate Execution) is SO1’s stage-gated execution model that ensures quality, traceability, and consistency across all agent outputs.

Overview

Every agent operates within a specific FORGE stage, with explicit entry gates (prerequisites) and exit gates (deliverables).
Figure 1 — FORGE Stage-Gated Pipeline. Each stage has explicit entry and exit gates enforced by the FORGE Gatekeeper. The primary agent assigned to each stage is shown below the pipeline. No stage transition occurs until all exit-gate criteria are satisfied.
Trace IDRequirementRationaleTest Case
SO1-FORGE-001Every stage transition shall be validated by the FORGE Gatekeeper before proceedingPrevents incomplete deliverables from propagating to downstream stagesTC-SO1-FORGE-001
SO1-FORGE-002Entry and exit gates shall be declared in each agent’s YAML frontmatterEnables automated compliance checking and VTM populationTC-SO1-FORGE-002
SO1-FORGE-003Each gate crossing shall produce a decision record in ADR formatMaintains a traceable audit trail of all stage transitionsTC-SO1-FORGE-003

Stage Details

Purpose

Requirement analysis, task decomposition, and agent selection.

Primary Agent

Factory Orchestrator

Entry Gate

  • User request received
  • Context sufficient for parsing

Exit Gate

  • Requirements parsed and documented
  • Tasks broken down into atomic units
  • Agents assigned to each task
  • Execution order determined

Decision Record Example

date:2024-01-15T10:00:00Z|context:[user requested GitHub-Slack integration]|decision:[assign Workflow Architect for n8n, Webhook Engineer for receiver]|rationale:[standard webhook pattern]|consequences:[2 agents, sequential execution]|status:accepted

Cross-Cutting Agents

Some agents operate across all stages:
AgentRoleTriggers
FORGE GatekeeperValidates stage transitionsEvery gate crossing
Incident CommanderOrchestrates incident responseP1/P2 incidents
Triage ResponderInitial assessmentAlert triggered

Gate Configuration

Each agent defines gates in its YAML frontmatter:
forge:
  stage: 2                          # Implementation stage
  entry_gate:
    - "Requirements documented"
    - "Schemas defined"
    - "Integration list provided"
  exit_gate:
    - "Workflow JSON generated"
    - "Error handling included"
    - "Schema validation passing"
    - "Decision record logged"

Gate Validation

The FORGE Gatekeeper validates all gate crossings:
  1. Pre-validation: Check entry gates are satisfied
  2. Execution: Agent performs work
  3. Post-validation: Verify exit gates are met
  4. VTM Update: Record in Verification & Traceability Matrix

Validation Command

./scripts/validate-agents.sh

# Output:
# ✓ FORGE gate validation: 20/20 agents compliant
# ✓ Entry gates defined: 20/20
# ✓ Exit gates defined: 20/20
# ✓ Stage assignments valid: 20/20

Decision Records

All significant decisions are logged in ADR format:
date:ISO8601|context:[situation]|decision:[choice]|rationale:[why]|consequences:[impact]|status:accepted|rejected|superseded

Example Decision Trail

# Stage 0 - Planning
date:2024-01-15T10:00:00Z|context:[user wants slack notifications]|decision:[use n8n webhook trigger]|rationale:[native Slack integration, retry support]|consequences:[requires n8n maintenance]|status:accepted

# Stage 2 - Implementation
date:2024-01-15T10:30:00Z|context:[implementing retry logic]|decision:[exponential backoff with 3 retries]|rationale:[prevents thundering herd, reasonable recovery time]|consequences:[max 15 min delay on failure]|status:accepted

# Stage 5 - Deployment
date:2024-01-15T14:00:00Z|context:[production deployment]|decision:[deploy to Railway production]|rationale:[existing infrastructure, monitoring in place]|consequences:[uses production quota]|status:accepted

VTM: Verification & Traceability Matrix

The VTM is the source of truth for agent validation:
AgentStageEntry GatesExit GatesStatus
Factory Orchestrator024✅ Pass
Workflow Architect245✅ Pass
Mintlify Author544✅ Pass
Full VTM: View VTM.md

Stage Coverage

StageNameAgent CountCoverage
0Planning1✅ Complete
1Design1✅ Complete
2Implementation4✅ Complete
3Documentation6✅ Complete
4Validation2✅ Complete
5Deployment4✅ Complete
Cross-cuttingAll3✅ Complete

Veritas Integration

How agents consume and produce prompts

Agent Catalog

Browse all 20 agents