What Is the Fallback Rule in reverse-skill for Unmatched Tasks?

When the reverse-skill router encounters a task that does not match any existing entry in the routing table, it does not attempt to force-fit the task into an available skill; instead, it enforces a "propose-new-skill" policy that requires developers to create a new routing entry in skills/config/routing.json.

The reverse-skill framework governs task delegation through a strict canonical behavior chain documented in RULES.md. This architecture ensures that skill boundaries remain intact by refusing ambiguous classifications. When the master router fails to locate a matching hint in the configuration, it triggers a specific fallback protocol designed to maintain system integrity while guiding skill extension.

How the Fallback Rule Works

The fallback mechanism is explicitly defined in the Routing Decisions section of RULES.md (lines 171-176). According to the source code, the rule states:

"Route not matched → do NOT force‑fit into existing skill, propose new skill creation"

This directive prevents the framework from misrouting ambiguous or novel tasks into inappropriate skill pipelines. Instead of heuristic matching or fuzzy assignment, the system halts execution and prompts for explicit configuration updates.

The "Propose-New-Skill" Policy

When triggered, the fallback rule initiates the following chain of events:

  1. Recognition – The master-route.sh script queries skills/config/routing.json and finds zero matches for the provided task hint.
  2. Intervention – The router outputs a warning: "⚠️ No matching route – please create a new skill."
  3. Creation – The developer must define a new skill directory, populate it with a SKILL.md descriptor, and register the route.
  4. Validation – The routing table is updated, and the tool index is refreshed to incorporate any new dependencies.

This policy ensures that every task flows through an explicitly defined workflow rather than an inferred or approximated path.

Implementing the Fallback Workflow

When the fallback rule activates, developers must execute a specific sequence to integrate the new task type. Below is the canonical procedure for handling an unmatched task.

Running the Master Router

First, invoke the primary entry point to confirm the route miss:

bash skills/scripts/master-route.sh --hint "analyse unknown-file.xyz"

If the hint "analyse unknown-file.xyz" does not exist in skills/config/routing.json, the script will print the fallback warning and exit without executing any skill logic.

Creating a New Skill Stub

Next, create the skill directory and metadata. For example, to handle a "binary-obfuscation" task:

mkdir -p skills/binary-obfuscation

cat > skills/binary-obfuscation/SKILL.md <<'EOF'

# Binary Obfuscation

## Description

Detect and de‑obfuscate custom binary packers.

## Workflow

1. Identify packer → 2. Unpack → 3. Analyse → 4. Report
EOF

Updating the Routing Configuration

Finally, register the new skill in the routing table using jq:

jq '.routes += [{"hint":"binary-obfuscation","skill":"binary-obfuscation"}]' \
    skills/config/routing.json > tmp && mv tmp skills/config/routing.json

After updating the configuration, refresh the shared tool index if the new skill introduces additional dependencies:

bash skills/scripts/refresh-tool-index.sh

Key Files Involved in the Fallback Mechanism

The fallback rule is implemented across four critical components:

Summary

  • The fallback rule in reverse-skill triggers when a task hint cannot be matched in skills/config/routing.json.
  • The framework explicitly prohibits force-fitting unmatched tasks into existing skills.
  • Developers must follow the "propose-new-skill" policy by creating a skill directory and updating the routing table.
  • The canonical behavior is documented in RULES.md and enforced by master-route.sh.
  • New skills require both a SKILL.md descriptor and an entry in routing.json.

Frequently Asked Questions

What happens if I try to force an unmatched task into an existing skill?

The reverse-skill framework strictly prevents this behavior. According to RULES.md, the router will refuse to execute and will output a fallback warning instead of routing to the closest match. This design prevents contamination of skill-specific logic with incompatible tasks.

Where is the fallback rule documented in the source code?

The rule is documented in RULES.md within the Routing Decisions section, specifically at lines 171-176. The source text explicitly states: "Route not matched → do NOT force‑fit into existing skill, propose new skill creation."

How do I create a new skill when the fallback triggers?

Create a new directory under skills/, add a SKILL.md file describing the workflow, then append the route to skills/config/routing.json using a JSON manipulation tool like jq. Finally, run skills/scripts/refresh-tool-index.sh to update dependencies.

Does the fallback mechanism affect existing routing entries?

No. The fallback rule is non-destructive. It only triggers for unmatched hints and does not modify existing routes in routing.json. The framework preserves all current skill mappings while requiring explicit additions for new task types.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →