Summary
The pipeline currently runs all six quality gates sequentially on every phase regardless of task type. This is likely overkill for simple tasks and creates a multiplicative cost problem — potentially hundreds of LLM invocations just on quality enforcement for a multi-phase project.
Proposal
Extend the intent router to output both a task type and a complexity score, then use that classification to select which quality gates to run via a gate policy matrix.
Gate Selection Policy
Intent Router classifies task
│
├─ bug-fix (simple) → verify + lint only
├─ bug-fix (complex) → verify + lint + QA + code review
├─ feature (small) → verify + QA + code review
├─ feature (large) → full gate sequence
├─ refactor → verify + architect + integration
└─ migration → full gate sequence + extra integration
Why This Works
This follows the same principle as adaptive RAG — route dynamically based on classified intent rather than running a fixed pipeline. The classifier itself is cheap (one fast LLM call) compared to the 6-18 gate invocations it can skip.
Key Design Considerations
- Conservative by default — When the classifier is uncertain about complexity, run more gates, not fewer. Unlike adaptive RAG where a wrong routing decision means a worse answer, here it could mean shipping a bug.
- Configurable via
forge.config.json — A gate policy matrix mapping (intent, complexity) → gates[] lets users override defaults for their risk tolerance.
- Telemetry enforcement —
@open-forge/telemetry should verify that the selected gates actually ran for a given phase, closing the loop between classification and execution.
Implementation Sketch
- Extend the intent router to output a complexity score alongside the task type
- Define a default gate policy matrix (conservative)
- Add
gatePolicy configuration to forge.config.json for user overrides
- Update the pipeline orchestrator to select gates based on policy
- Add telemetry constraints that validate gate execution against the policy
Context
Summary
The pipeline currently runs all six quality gates sequentially on every phase regardless of task type. This is likely overkill for simple tasks and creates a multiplicative cost problem — potentially hundreds of LLM invocations just on quality enforcement for a multi-phase project.
Proposal
Extend the intent router to output both a task type and a complexity score, then use that classification to select which quality gates to run via a gate policy matrix.
Gate Selection Policy
Why This Works
This follows the same principle as adaptive RAG — route dynamically based on classified intent rather than running a fixed pipeline. The classifier itself is cheap (one fast LLM call) compared to the 6-18 gate invocations it can skip.
Key Design Considerations
forge.config.json— A gate policy matrix mapping(intent, complexity) → gates[]lets users override defaults for their risk tolerance.@open-forge/telemetryshould verify that the selected gates actually ran for a given phase, closing the loop between classification and execution.Implementation Sketch
gatePolicyconfiguration toforge.config.jsonfor user overridesContext