AgentSkillsCN

commands-router

根据命令数据库中的推理框架与命令模式,智能路由各类任务。该系统可触发结构化的开发流程、技能命令(sc:*)、头脑风暴、架构设计,或任何符合命令框架模式的任务。借助推理索引实现语义化路由。

SKILL.md
--- frontmatter
name: commands-router
description: Routes tasks to reasoning frameworks and command patterns in commands-db. Triggers on structured development workflows, skill commands (sc:*), brainstorming, architecture, or any task matching command framework patterns. Uses reasoning-index for semantic routing.

Commands Router

Routes tasks to appropriate reasoning frameworks and command patterns.

Trigger Conditions

Activate when task involves:

  • Structured development workflow (implement, build, test)
  • Skill command invocation (sc:*)
  • Brainstorming or ideation
  • Architecture or design decisions
  • Workflow templates
  • Schema-based operations

Command Categories

SC Commands (Skill Commands)

Primary action verbs for development tasks.

CommandTrigger KeywordsPurpose
sc:analyzeanalyze, evaluate, assess, auditDeep analysis
sc:buildbuild, compile, packageBuild operations
sc:cleanupclean, organize, declutterCode cleanup
sc:designdesign, architect, planArchitecture
sc:documentdocument, readme, guideDocumentation
sc:estimateestimate, cost, timeEstimation
sc:explainexplain, clarify, describeExplanations
sc:gitcommit, push, mergeGit operations
sc:implementimplement, code, featureImplementation
sc:improveimprove, enhance, optimizeImprovement
sc:loadload, context, importContext loading
sc:spawnspawn, delegate, parallelDelegation
sc:tasktask, complex, persistentComplex tasks
sc:testtest, verify, validateTesting
sc:troubleshootdebug, fix, diagnoseDebugging
sc:workflowworkflow, prd, processWorkflows

BMAD Framework

ModulePurpose
bmad:brainstormStructured brainstorming
bmad:party-modeMulti-agent ideation
bmad:prdProduct requirements
bmad:architectureSystem architecture

Routing Logic

bash
# Use reasoning-index for semantic routing
reasoning-index search "{user_intent}"
reasoning-index suggest "{task_description}"

# Example output:
# {
#   "commands": ["sc:implement", "sc:design"],
#   "skills": ["test-driven-development"],
#   "reasoning_chain": ["sc:design", "sc:implement", "sc:test"]
# }

Decision Tree

code
Command Task Detected
    │
    ├── Implementation?
    │   ├── New feature? → sc:implement
    │   ├── Build? → sc:build
    │   └── Improvement? → sc:improve
    │
    ├── Analysis?
    │   ├── Code review? → sc:analyze
    │   ├── Debugging? → sc:troubleshoot
    │   └── Testing? → sc:test
    │
    ├── Design?
    │   ├── Architecture? → sc:design
    │   ├── Brainstorm? → bmad:brainstorm
    │   └── PRD? → bmad:prd
    │
    ├── Documentation?
    │   ├── README? → sc:document
    │   ├── Explain? → sc:explain
    │   └── Guide? → sc:document
    │
    └── Operations?
        ├── Git? → sc:git
        ├── Cleanup? → sc:cleanup
        └── Complex? → sc:task

Usage

bash
# Search commands
reasoning-index search "debug authentication"

# Get reasoning chain suggestion
reasoning-index suggest "implement user login"

# List all SC commands
reasoning-index list sc

# Build knowledge graph
reasoning-index graph "optimize performance" --depth 2

Integration

  • reasoning-index: Primary routing CLI
  • commands-db: Command framework database
  • skill-db: Skill integration
  • meta-router: Parent router

Command Chaining

code
Design → Implement → Test → Document

sc:design → sc:implement → sc:test → sc:document