How the Three-Axis Matrix Handles Ambiguous Routing Cases in reverse-skill
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 depends on three orthogonal axes that together define the scope of any reverse engineering operation.
Target Type Axis
Defined in 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, 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, 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 (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 (lines 251-260) mandates the Ambiguous Intent Recovery Protocol. This six-step process transforms vague inputs into actionable workflows:
- Restate the objective: Summarize the most likely technical goal in one concise sentence to confirm understanding.
- Prefer local CTF/lab context: Default to a competition or laboratory interpretation for phrasing like "unlock," "patch," or "bypass."
- 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.
- Present disambiguation options: Offer a menu of 2-4 concrete options when multiple interpretations exist.
- Provide adjacent branches: Suggest detection, analysis, validation, remediation, or reporting paths when a branch is underspecified.
- 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 (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
# 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
# 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. - Ambiguous cases are detected via the "Stay In Competition Sandbox" clause in
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.ps1and the PythonRouterclass, 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 (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: 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 (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 allows tailored safe-first actions for different competition contexts.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →