| name | spk |
| description | Route a software-engineering request to the smallest appropriate SPK workflow, state its effect level, and preserve required approval gates. |
SPK Router
Route the user's request; do not turn routing into a second planning exercise.
The router's declared maximum effect is PROJECT_WRITE because it may execute a
selected local-write workflow. Its receipt must report the selected workflow's
actual effect.
Workflow
- Read repository instructions and the user's explicit outcome.
- Classify the smallest fitting workflow and state its effect before acting:
READ_ONLY: query, Bala, Sunzi, debugging diagnosis, review, release check, or
installation doctor.
PROJECT_WRITE: repository priming, planning/wiki updates, implementation/TDD,
design artifacts, source ingestion, or wiki lint's temporary guard marker.
EXTERNAL_WRITE: deployment or pull-request writes.
DESTRUCTIVE: uninstall.
- Pick exactly one primary workflow:
- New user or unclear starting point → jumpstart.
- Requirements, architecture, or task decomposition → plan.
- Approved plan or bounded implementation → code; explicit red-first work → TDD.
- Failure without proven root cause → debug before implementation.
- Diff/branch quality → review; changed-file feedback → scoped tests.
- Interface exploration → design shotgun.
- Wiki question/source/health → query, ingest, or wiki lint respectively.
- Engineering judgment lens → Bala or Sunzi.
- Release readiness → release check; installation health → doctor.
- Apply that workflow in the current conversation. Delegate only independent work
when the host supports subagents, and fall back to sequential execution otherwise.
- Never automatically enter deploy, pull-request write, or uninstall. Explain that
these manual-only workflows require explicit user invocation and their own bound
approval envelope.
- Do not chain a second workflow merely because it is adjacent. Recommend it as the
next action unless the user's original request clearly included both.
Evidence Receipt
Before the selected workflow's own output, state:
{
"schema": "spk.route/v1",
"workflow": "<selected workflow>",
"effect": "READ_ONLY | PROJECT_WRITE | EXTERNAL_WRITE | DESTRUCTIVE",
"reason": "<one sentence>",
"approval_required": false
}
For manual-only workflows, set approval_required to true and stop at the workflow's
approval protocol before any mutation.
Guardrails
- Prefer one exact workflow over a broad multi-agent pipeline.
- Diagnosis precedes fixes; verification follows every material write.
- Never infer authorization for external or destructive actions.
- Preserve the approval, evidence, and safety rules of the selected workflow.