# Key Files for Reverse-Skill Routing: The Complete File Guide to zhaoxuya520/reverse-skill

> Understand reverse-skill routing with this guide to zhaoxuya520/reverse-skill key files. Learn about the six core documents and three scripts that control execution flow.

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

---

**Reverse-skill routing relies on six core documents and three operational scripts that enforce a deterministic read order from global rules to concrete skill execution.**

The `zhaoxuya520/reverse-skill` repository implements a deterministic routing layer that maps natural-language tasks to specific reverse-engineering capabilities. Understanding the key files for reverse-skill routing is essential for operators tracing how task hints translate into concrete skill invocations. These files follow a strict hierarchical read order—defined in [`skills/MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/MASTER-ROUTING.md) lines 1–7 and 98–104—that ensures consistent, auditable decision-making across the workflow.

## The Core Routing Documents

The routing layer centers on four markdown files that form the decision hierarchy.

### RULES.md: The Global Contract

Located at the repository root, **RULES.md** serves as the absolute source of truth for routing, authorization, and execution requirements. This file defines the fundamental contracts that all other routing components must obey, establishing the baseline syntax and constraints for the entire system.

### MASTER-ROUTING.md: Primary Keyword Mapping

The [`skills/MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/MASTER-ROUTING.md) file contains the primary matrix that maps high-level task keywords to a designated *PRIMARY* skill path. According to lines 1–7 and 98–104 of this file, it explicitly defines the mandatory read order: `RULES.md → MASTER-ROUTING.md → PRIMARY SKILL.md`. This document acts as the first lookup table when processing incoming task hints.

### routing.md: The Three-Axis Fallback Matrix

When the primary table cannot match a task or when granular decision-making is required, the system consults [`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md). As noted in [`skills/SKILL.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/SKILL.md) lines 13–16, this **three-axis "full matrix"** serves as the secondary decision layer, particularly when proposing new skills or handling edge cases that fall outside the primary routing table.

### SKILL.md: Skill Invocation Entry Point

The [`skills/SKILL.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/SKILL.md) file (lines 1–13) functions as the top-level entry point that instructs the engine how to invoke the selected sub-skill. This document is read after the routing decision is complete and contains the operational instructions for transitioning from routing selection to actual execution.

## Routing Automation Scripts

Two PowerShell scripts automate the routing logic and validation workflows.

### master-route.ps1: Command-Line Router Implementation

The `skills/scripts/master-route.ps1` script implements the concrete routing algorithm defined in [`MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/MASTER-ROUTING.md). Lines 19–24 of this file contain the core logic that serves as the command-line entry point for operators. The script accepts a `-Hint` parameter containing the natural-language task description and returns the appropriate skill path.

```powershell

# Run the primary router with a task hint

powershell -File skills\scripts\master-route.ps1 -Hint "analyze a Windows PE file"

```

### verify-routing-coherence.ps1: Routing Table Validation

To ensure system integrity, `skills/scripts/verify-routing-coherence.ps1` validates that all routing tables comply with the contracts defined in [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md). Lines 2–7 of this script implement the coherence checks that verify mapping integrity and detect orphaned entries or syntax violations.

```powershell

# Validate routing tables after any modification

powershell -File skills\scripts\verify-routing-coherence.ps1

```

## Operational Governance Files

The `skills/ops/` directory contains three documents that enforce operational boundaries and access controls.

### ops/IDENTITY.md: Repository Role Declaration

This file explicitly declares that the repository functions as a **routing package** rather than a full execution platform, establishing the architectural scope for the system.

### ops/scope-contract.md: Case Initialization Gates

The [`scope-contract.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope-contract.md) document defines the "gate-keeping" rules that govern how cases are initialized, determining which inputs are valid for entering the routing workflow.

### ops/role-map.md: Role-to-Skill Authorization

This authorization matrix maps operational roles—such as "lead" and "specialist"—to the specific skills they are permitted to invoke, enforcing principle-of-least-privilege across the routing layer.

## Execution Workflow

When an operator initiates a task, the system processes files in the following deterministic sequence:

1. **RULES.md** establishes the global contract
2. **MASTER-ROUTING.md** performs the primary keyword lookup
3. If no match exists, **routing.md** provides the fallback three-axis matrix
4. **SKILL.md** translates the routing decision into concrete invocation steps

This linear progression ensures that every routing decision is traceable, reproducible, and compliant with the governance framework defined in the `ops/` directory.

## Summary

- **RULES.md** at the repository root defines the global routing and execution contract that all components must follow.
- **MASTER-ROUTING.md** in `skills/` contains the primary keyword-to-skill mapping and mandates the file read order.
- **routing.md** serves as the three-axis fallback matrix when primary routing fails or requires granular decisions.
- **SKILL.md** acts as the top-level entry point for invoking selected sub-skills after routing completes.
- **master-route.ps1** implements the routing algorithm as a PowerShell command-line interface.
- **verify-routing-coherence.ps1** validates routing table integrity against RULES.md contracts.
- The `ops/` folder contains **IDENTITY.md**, **scope-contract.md**, and **role-map.md**, which govern repository scope, case initialization, and role-based access control.

## Frequently Asked Questions

### What is the exact file read order for reverse-skill routing?

According to [`skills/MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/MASTER-ROUTING.md) lines 1–7 and 98–104, the system processes files in this sequence: first [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md), then [`MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/MASTER-ROUTING.md), and finally the `PRIMARY SKILL.md` file associated with the matched skill. This deterministic order ensures that global contracts are evaluated before specific routing decisions.

### How do I validate routing table integrity after modifications?

Run `skills/scripts/verify-routing-coherence.ps1` to execute the validation logic defined in lines 2–7 of that script. This PowerShell utility checks that all entries in the routing tables comply with the syntax and semantic requirements specified in [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md), preventing runtime routing failures.

### What is the difference between MASTER-ROUTING.md and routing.md?

[`MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/MASTER-ROUTING.md) serves as the primary keyword lookup table that maps task hints to skills, while [`routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/routing.md) functions as a three-axis fallback matrix used when the primary table cannot match a task or when granular routing decisions are required. As documented in [`skills/SKILL.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/SKILL.md) lines 13–16, the fallback matrix is consulted after primary lookup failures or when proposing new skills.

### Which script actually executes the routing algorithm?

The `skills/scripts/master-route.ps1` script contains the concrete implementation of the routing algorithm defined in [`MASTER-ROUTING.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/MASTER-ROUTING.md). Lines 19–24 of this PowerShell file provide the command-line interface that accepts task hints and returns the appropriate skill path, serving as the primary entry point for routing operations.