Harness router

From Intense-Visions/harness-engineering · View interactive version

Harness router is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Natural language entry point to all harness skills. Classifies intent by scope/domain, confirms routing with reasoning, dispatches to the appropriate skill.

How to use this skill

Skill file

Harness Router

Natural language entry point to all harness skills. Classifies intent by scope/domain, confirms routing with reasoning, dispatches to the appropriate skill.

When to Use

Process

Iron Law

The router confirms before dispatching. Never silently route. Always present the chosen skill, scope classification, and reasoning — then wait for confirmation.


Phase 1: CLASSIFY — Parse Intent and Search

  1. Check for empty input. Show usage help and stop:

```

Usage: /harness <describe what you want to do>

Examples:

/harness fix the button spacing on the settings page

/harness we need a notification system

/harness this page is slow

/harness redesign how the sidebar filters work

/harness clean up my code

I'll figure out the right skill and process level for you.

```

  1. Search the skill catalog. Call search_skills({ query: "<user's intent>" }) to get ranked matches.
  1. Classify scope into one of four tiers:

| Scope | Signal Words | Description |

| -------------------- | -------------------------------------------------- | ------------------------------------------ |

| quick-fix | fix, tweak, adjust, update, change X to Y, correct | Small targeted change, no design decisions |

| guided-change | redesign, refactor, improve, rework | Moderate scope, clear architecture |

| full-exploration | build, create, add system for, we need, design | Ambiguous scope, design decisions needed |

| diagnostic | broken, slow, failing, debug, review, analyze | Something broken or needs analysis |

Additional signals: single file → lower ceremony; multiple systems → higher ceremony; error messages → diagnostic.

  1. Map scope to entry skill:

| Scope | Primary Skill | Alternates |

| ---------------- | ----------------------- | ----------------------------------------------------------------- |

| quick-fix | harness-tdd | harness-refactoring if structural |

| guided-change | harness-planning | harness-architecture-advisor if tradeoffs involved |

| full-exploration | harness-brainstorming | — |

| diagnostic | harness-debugging | harness-code-review for reviews, harness-perf for performance |

If search_skills results strongly favor a different skill, prefer search results. Scope classification is the fallback when search is ambiguous.

  1. Assess confidence:

Phase 2: CONFIRM — Present Decision with Reasoning

High confidence:

This looks like a [scope-level] — [reasoning].
I'll route to `harness:[skill]` because [why this skill fits].
Proceed? (y / n / suggest another)

Wait for confirmation.

Low confidence (multiple candidates):

This could be a few things:
1. `harness:[skill-1]` — [description]
2. `harness:[skill-2]` — [description]
3. `harness:[skill-3]` — [description]
Which fits best? (1 / 2 / 3)

Wait for the user to choose.

User rejects: If they name a skill, confirm and dispatch. If they re-phrase, re-run CLASSIFY. Do not loop more than twice — after two misses, list all available skills and let the user pick.


Phase 3: DISPATCH — Invoke Selected Skill

  1. Pass original intent as context so the user does not repeat themselves.
  2. Invoke via run_skill: run_skill({ skill: "<selected-skill>", path: "<project-root>" }) with original intent as argument context.
  3. Hand off cleanly. Once invoked, the router's job is done. The dispatched skill owns all subsequent interaction.

Examples

Quick Fix: "fix the button spacing on the settings page"

quick-fix — single component, clear target → harness-tdd

Guided Change: "redesign how the sidebar filters work"

guided-change — moderate scope, some decisions → harness-planning or harness-architecture-advisor

Full Exploration: "we need a notification system"

full-exploration — ambiguous scope, multiple approaches → harness-brainstorming

Diagnostic: "this page is slow"

diagnostic — performance symptom → harness-perf

Ambiguous: "clean up my code"

Could be refactoring, dead code, or architecture cleanup → Present candidates: harness-refactoring, harness-codebase-cleanup, harness-cleanup-dead-code

Harness Integration

Success Criteria

Rationalizations to Reject

| Rationalization | Reality |

| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |

| "The intent is obvious, I can skip confirmation" | The Iron Law requires confirmation before every dispatch. Even obvious intents benefit from the user seeing scope classification. |

| "I should suggest downstream skills the dispatched skill will chain into" | Each skill owns its own transitions. Surfacing the full chain adds noise and duplicates logic in the dispatched skill. |

| "Search results don't match well, so I'll guess based on keywords" | If search_skills returns poor results, present top candidates and let the user choose. Guessing silently is worse than admitting ambiguity. |

| "The user rejected twice, I should keep trying" | After two misses, list available skills and let the user pick directly. Do not loop indefinitely. |

Gates

Escalation

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.