Smart routing

From gonzalezpazmonica/pm-workspace · View interactive version

Smart routing is an AI agent skill from the GitHub repository gonzalezpazmonica/pm-workspace. Usar cuando se necesita descubrir o enrutar a un comando específico entre los 400+ disponibles.

How to use this skill

Skill file

Smart Routing for 400+ Commands

Intelligent command discovery and routing for large tool catalogs. Maps user intent to relevant command categories, loads only necessary tools, maintains usage frequency for Top-20 prioritization.

Core Components

Intent Classification

Parse user request to identify primary and secondary intents:

User: "¿Cómo está el sprint?"
  → Primary: sprint status tracking
  → Category: PM Operations
  → Tools: [sprint-status, board-flow, daily-routine]

Implemented in Step 1 (input analysis):

Frequency Tracking

Maintain data/tool-usage.jsonl with:

{ "command": "sprint-status", "count": 47, "last_used": "2026-03-06T15:30:00Z", "category": "pm" }

Update after each command execution.

Top-20 Algorithm

Always available commands (never unloaded):

  1. Most-used 10 commands (cross-category)
  2. 10 most-used from active category

Loaded only when explicitly searched or category active:

Routing Logic (5 Steps)

Step 1: Intent Analysis (input)

Step 2: Category Selection

Step 3: Usage Frequency Weighting

Step 4: Suggestion Generation

Step 5: User Confirmation

Data Structure

categories:
  pm: [pbi-*, sprint-*, capacity-*, project-*]
  dev: [spec-*, dev-*, arch-*, code-*]
  infra: [infra-*, pipeline-*, deploy-*, env-*]
  reporting: [report-*, audit-*, track-*, metric-*]
  communication: [scheduled-*, notify-*, chat-*]
  compliance: [security-*, compliance-*, aepd-*, equality-*]
  discovery: [discovery-*, jtbd-*, prd-*, rules-*]
  admin: [plugin-*, agent-*, profile-*, config-*]

usage_tracking: data/tool-usage.jsonl
command_metadata: .opencode/commands/*.md
skill_metadata: .opencode/skills/*/SKILL.md
agent_metadata: .opencode/agents/*.md

Integration Points

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.