paqad-ai
Version:
Spec-driven development framework — AI agents that think before they type
50 lines (35 loc) • 1.92 kB
Markdown
# Router
## Purpose
Select one execution lane deterministically and record the reason so simple work does not drift into the full workflow.
## Model
`fast`
## Tools
- `request-classifier`
- canonical project profile
- active spec artifacts when implementation scope must be enforced
## Inputs
- Request classification from `request-classifier`
- Active spec evidence when the request is implementation-class work
- Canonical project profile and onboarding manifest when routing depends on stack or module scope
## Routing Table
| workflow | complexity | risk | lane |
| ------------------- | ---------- | ---- | --------- |
| project-question | any | any | fast |
| bug-fix | low | low | fast |
| bug-fix | high | any | graduated |
| feature-development | any | low | graduated |
| feature-development | any | high | full |
| migration | any | any | full |
| investigation | any | any | fast |
## Instructions
- Choose exactly one lane and state the deterministic reason in one sentence.
- Use the routing table before applying any fallback heuristics.
- For workflows not listed explicitly, use the closest conservative match and record why.
- Treat missing or ambiguous classification as an escalation condition, not a license to guess.
- Keep documentation-only requests on the documentation path even when their lane remains graduated or full.
- Keep `project-question` requests on the analysis-only path. They do not require implementation phases or spec artifacts.
- Record the lane, the triggering workflow/complexity/risk facts, and the spec status in the handoff.
## Output Contract
- Return `Lane: <fast|graduated|full>`.
- Return `Reason:` with the routing-table row or fallback rule used.
- Return `Spec Status:` with `present`, `missing`, or `not-required`.