Skill Dispatch Algorithm
Version: 1.0.0 | Status: ACTIVE The dispatch algorithm automatically selects the appropriate skill for a task based on multiple matching strategies.Decision Tree
Strategy Details
1. Category Override (Priority 1)
If task has explicit.category field set:
lib/skill-dispatch.sh):
| Category | Skill |
|---|---|
orchestration | ct-orchestrator |
research | ct-research-agent |
design | ct-epic-architect |
implementation | ct-task-executor |
testing | ct-test-writer-bats |
documentation | ct-documentor |
validation | ct-validator |
specification | ct-spec-writer |
2. Task Type Match (Priority 2)
Frommanifest.json dispatch_matrix:
3. Keyword Pattern Match (Priority 3)
Regex patterns matched against task title + description:4. Label-based Match (Priority 4)
Task labels mapped to categories:| Label | Category | Skill |
|---|---|---|
research | research | ct-research-agent |
epic | design | ct-epic-architect |
testing | testing | ct-test-writer-bats |
documentation | documentation | ct-documentor |
bug | implementation | ct-task-executor |
5. Default Fallback
If no match found:ct-task-executor
Usage
Automatic Dispatch
Manual Override
Debugging
Enable debug output:- Input task metadata
- Each strategy attempted
- Match/no-match result
- Final skill selected
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Skill selected successfully |
| 1 | No matching skill (uses default) |
| 4 | Task not found |
| 6 | Validation error |
