# Where to Find the 3-Axis Routing Matrix in reverse-skill

> Discover the 3-axis routing matrix in reverse-skill. Locate the full matrix in routing.json and view it as a human-readable table in routing.md.

- Repository: [ZhaoXu/reverse-skill](https://github.com/zhaoxuya520/reverse-skill)
- Tags: how-to-guide
- Published: 2026-08-29

---

**The complete 3-axis routing matrix in reverse-skill is defined in [`skills/config/routing.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/config/routing.json) and rendered as a human-readable table in the generated [`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md) file.**

The **3-axis routing matrix** is the core decision engine for the `zhaoxuya520/reverse-skill` repository, mapping combinations of **target type**, **user intent**, and **tool chain** to specific skill invocations. Understanding where this matrix is stored and how to access it is essential for modifying routing logic or debugging skill selection. This guide identifies the authoritative source files and the scripts that manage them.

## Primary Source: The JSON Configuration File

### Location and Structure

The authoritative source for the routing matrix resides in **[`skills/config/routing.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/config/routing.json)**. This file serves as the **single source of truth** for all routing decisions across the project.

The JSON structure encodes the three-dimensional matrix that evaluates target types, user intent classifications, and available tool chains. Core scripts including `master-route.ps1`, `test-routing.ps1`, and `verify-routing-coherence.ps1` read their routing definitions directly from this file.

### Viewing the Matrix

To inspect the raw routing definitions directly from the repository root:

```powershell

# Pretty-print the JSON routing matrix in PowerShell

Get-Content -Raw ./skills/config/routing.json | ConvertFrom-Json | Format-List

```

```bash

# View formatted JSON using jq on Linux/macOS

cat ./skills/config/routing.json | jq .

```

## Human-Readable Format: The Generated Markdown

While the JSON file is machine-authoritative, **[`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md)** provides a browsable, human-readable representation of the complete matrix.

### Generation Process

The markdown file is automatically produced by **`skills/scripts/extract-summaries.ps1`**, which is invoked by **`skills/scripts/refresh-tool-index.ps1`**. This pipeline parses the canonical JSON definition and generates formatted tables suitable for documentation review.

### Refreshing the Documentation

To regenerate the markdown view after modifying the JSON source:

```powershell

# Execute the refresh script to update routing.md

powershell -NoProfile -File ./skills/scripts/refresh-tool-index.ps1

```

## Validating Routing Consistency

Because the system maintains two representations of the matrix, the repository includes a coherence verification script to prevent drift between the JSON source and the generated markdown.

Run **`skills/scripts/verify-routing-coherence.ps1`** to ensure the files remain synchronized:

```powershell

# Verify markdown matches the JSON source

powershell -NoProfile -File ./skills/scripts/verify-routing-coherence.ps1

```

This script validates that [`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md) accurately reflects the current state of [`skills/config/routing.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/config/routing.json), ensuring that documentation bugs do not mask routing logic errors.

## Testing the Routing Matrix

The **`skills/scripts/test-routing.ps1`** script executes functional tests against the matrix defined in the JSON configuration. According to the reverse-skill source code, this test suite reads directly from [`skills/config/routing.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/config/routing.json) to validate that three-axis combinations resolve to the expected skill handlers without mocking the routing table.

## Summary

- **[`skills/config/routing.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/config/routing.json)** contains the authoritative 3-axis routing matrix defining target types, user intents, and tool chains.
- **[`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md)** is a generated, human-readable view of the same matrix created by `extract-summaries.ps1`.
- **`refresh-tool-index.ps1`** regenerates the markdown documentation when the JSON source changes.
- **`verify-routing-coherence.ps1`** ensures the JSON and markdown representations remain identical.
- **`test-routing.ps1`** validates the functional correctness of the routing decisions stored in the JSON file.
- **`master-route.ps1`** reads from the JSON file to execute actual routing decisions at runtime.

## Frequently Asked Questions

### What is the 3-axis routing matrix in reverse-skill?

The **3-axis routing matrix** is a three-dimensional decision structure that maps **target type**, **user intent**, and **tool chain** combinations to specific skill handlers. It serves as the central routing engine for determining which skill should execute based on contextual input parameters decoded by the system.

### How do I update the routing matrix?

Modify the **[`skills/config/routing.json`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/config/routing.json)** file directly to change routing rules. After editing, execute `skills/scripts/refresh-tool-index.ps1` to regenerate [`skills/routing.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md), then run `skills/scripts/verify-routing-coherence.ps1` to ensure the documentation reflects your changes.

### Why does the repository maintain both JSON and Markdown versions?

The **JSON file** provides a machine-parseable, schema-validated source of truth required by routing scripts such as `master-route.ps1` and `test-routing.ps1`. The **Markdown file** offers a human-readable reference for developers auditing the routing logic without parsing raw JSON, generated automatically to prevent manual documentation drift.

### How can I verify the routing configuration is correct?

Execute `skills/scripts/verify-routing-coherence.ps1` to check that the generated markdown matches the JSON source, then run `skills/scripts/test-routing.ps1` to execute functional tests against the matrix. Both scripts must pass to confirm the routing system is coherent and operational according to the reverse-skill source code.