# How the Three-Axis Matrix Handles Ambiguous Routing Cases in reverse-skill

> Learn how the three-axis matrix resolves ambiguous routing cases in reverse-skill using the Ambiguous Intent Recovery Protocol for safe and accurate interactions.

- Repository: [ZhaoXu/reverse-skill](https://github.com/zhaoxuya520/reverse-skill)
- Tags: deep-dive
- Published: 2026-08-01

---

**The three-axis matrix detects ambiguous inputs through the "Stay In Competition Sandbox" clause and resolves them via the Ambiguous Intent Recovery Protocol, which restates objectives, performs safe first actions, and presents user menus rather than forcing incorrect matches.**

The **reverse-skill** routing system relies on a sophisticated three-axis matrix to determine which child skill should handle a reverse engineering task. When user inputs are vague, span multiple domains, or lack clear dominant evidence, the system does not abort or force-fit; instead, it follows a structured **Ambiguous Intent Recovery Protocol** to transform uncertainty into concrete workflow steps. This article examines how the three-axis matrix handles ambiguous routing cases through specific detection mechanisms and fallback rules defined in the repository's core files.

## The Three-Axis Routing Structure

The routing decision in [`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md) depends on three orthogonal axes that together define the scope of any reverse engineering operation.

### Target Type Axis

Defined in [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md) at lines 18-45, this axis identifies the artifact or environment being analyzed. Valid target types include APK files, raw binaries, firmware images, cloud resources, and other specialized formats.

### User Intent Axis

Located at lines 66-102 of [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md), this axis captures the high-level goal expressed by the user. Common intents include **decompile**, **hook**, **bypass**, **analyze**, and **write-up** operations, each mapping to different skill specializations.

### Toolchain Axis

Found at lines 105-125 in [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md), this axis specifies the concrete analysis or exploitation tool to be employed. Supported toolchains include IDA, radare2, Frida, Ghidra, and MCP (Model Context Protocol) integrations.

## Detecting Ambiguous Routing Cases

Ambiguity is explicitly detected through the *"Stay In Competition Sandbox When"* clause in [`CTF-Sandbox-Orchestrator/ctf-sandbox-orchestrator/references/router-matrix.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/CTF-Sandbox-Orchestrator/ctf-sandbox-orchestrator/references/router-matrix.md) (lines 10-15). This clause activates when a task spans multiple domains or when the primary blocker is determining which evidence matters first. Rather than routing prematurely to a specific skill, the system keeps the session in the competition sandbox until clarity is achieved.

## The Ambiguous Intent Recovery Protocol

When the three-axis matrix cannot resolve a single clear match, [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md) (lines 251-260) mandates the **Ambiguous Intent Recovery Protocol**. This six-step process transforms vague inputs into actionable workflows:

1. **Restate the objective**: Summarize the most likely technical goal in one concise sentence to confirm understanding.
2. **Prefer local CTF/lab context**: Default to a competition or laboratory interpretation for phrasing like "unlock," "patch," or "bypass."
3. **Execute a safe first action**: Create a case workspace, hash the artifact, identify file types, extract strings, audit available tools, or draft a report skeleton.
4. **Present disambiguation options**: Offer a menu of 2-4 concrete options when multiple interpretations exist.
5. **Provide adjacent branches**: Suggest detection, analysis, validation, remediation, or reporting paths when a branch is underspecified.
6. **End with a next-step menu**: Ensure the user always has a clear path forward without dead ends.

## Fallback Handling for Unmatched Routes

If the recovery protocol cannot establish a match against any matrix cell, the router consults the *"Route Not Matched – Handling"* section in [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md) (lines 266-275). Rather than forcing a poor fit or returning an error, the system proposes creating a **new skill** to handle the novel requirement. This approach preserves routing integrity while allowing the capability suite to expand organically.

## Practical Implementation Examples

The routing logic is implemented in `skills/scripts/master-route.ps1`, which serves as the entry point for applying the matrix and invoking recovery protocols.

### PowerShell Routing Example

```powershell

# Example: a vague user request "unlock the feature" is fed to the router

# 1️⃣ The router matches the request to the "Ambiguous Intent Recovery Protocol"

powershell -File skills\scripts\master-route.ps1 -Hint "unlock the feature"

# 2️⃣ Router restates the objective and creates a safe first step (workspace + hash)

#    → work\master-route-20230801-1730\route-scope.md is generated

#    → Evidence: file hash, type detection, string dump

# 3️⃣ Router presents a menu of concrete options (e.g. "patch binary", "bypass check", "analyse control flow")

#    → User picks option 2

#    → Router now routes to the appropriate child skill, e.g. `apk-reverse/` or `ida-reverse/`

```

### Python MCP API Integration

```python

# Using the Python MCP API to ask the router for disambiguation

from reverse_skill import Router

router = Router()
response = router.disambiguate(
    user_input="我想把这个检查删掉，让它直接通过"
)
print(response.menu)      # shows 2-4 concrete next-step choices

print(response.first_step) # safe first action (hash, identify, etc.)

```

## Summary

- The **three-axis matrix** evaluates **target type**, **user intent**, and **toolchain** to determine routing decisions in [`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md).
- Ambiguous cases are detected via the **"Stay In Competition Sandbox"** clause in [`router-matrix.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/router-matrix.md) (lines 10-15) when tasks span multiple domains or lack clear evidence priority.
- The **Ambiguous Intent Recovery Protocol** (lines 251-260) provides a six-step workflow including objective restatement, safe first actions, and user menus.
- If no match is possible, the **Route Not Matched** handler (lines 266-275) proposes creating a new skill rather than forcing an incorrect route.
- Implementation occurs through `master-route.ps1` and the Python `Router` class, supporting both PowerShell automation and MCP API interactions.

## Frequently Asked Questions

### What triggers the Ambiguous Intent Recovery Protocol in reverse-skill?

The protocol triggers when the three-axis matrix cannot map an input to a single cell, typically when user requests are vague, mix multiple domains, or lack clear dominant evidence. The **"Stay In Competition Sandbox When"** clause in [`router-matrix.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/router-matrix.md) (lines 10-15) explicitly defines these conditions, keeping the session in the sandbox until the ambiguity is resolved through the six-step recovery process.

### How does the three-axis matrix determine which skill to route to?

The matrix evaluates three dimensions defined in [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md): the **target type** (artifact being analyzed at lines 18-45), **user intent** (high-level goal at lines 66-102), and **toolchain** (specific tool at lines 105-125). A request must align with specific combinations of these axes to trigger a child skill; otherwise, the recovery protocol engages to clarify the routing decision.

### What happens if the recovery protocol cannot resolve the ambiguity?

If the six-step recovery protocol fails to establish a clear matrix match, the router follows the **"Route Not Matched – Handling"** section in [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md) (lines 266-275). Instead of forcing a match or aborting with an error, the system proposes creating a **new skill** to handle the unique requirement, ensuring the routing integrity remains intact while accommodating novel workflows.

### Can the routing behavior be customized for specific CTF competitions?

Yes. The protocol specifically prioritizes **local CTF/lab interpretations** for ambiguous phrasing like "unlock" or "bypass" as defined in step 2 of the recovery protocol. The `master-route.ps1` script and `Router` class support competition-specific configurations, and the sandbox environment defined in [`router-matrix.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/router-matrix.md) allows tailored safe-first actions for different competition contexts.