Scripts for Testing Routing Coherence on Windows in the reverse-skill Repository

The reverse-skill repository provides three PowerShell scripts—test-routing.ps1, verify-routing-coherence.ps1, and smoke.ps1—located in skills/scripts/ to validate routing configuration integrity and detect broken links or logical inconsistencies on Windows platforms.

Maintaining accurate routing logic is critical in intent-based skill systems. The reverse-skill project includes dedicated Windows PowerShell tools to ensure the routing configuration that maps user intents to skill modules remains consistent and error-free according to the source code. These scripts verify that the routing JSON definitions parse correctly and reference valid skill modules without introducing duplicate keys or invalid hints.

Available PowerShell Scripts for Routing Validation

The reverse-skill project organizes its Windows testing utilities in the skills/scripts directory. Each script serves a distinct purpose in the validation pipeline, from comprehensive testing to lightweight coherence checks.

test-routing.ps1: Full Validation Suite

The skills/scripts/test-routing.ps1 script serves as the primary entry point for developers validating routing changes. This script executes the complete routing test suite, performing sanity checks to ensure the skills/config/routing.json file parses correctly and that all referenced skill modules actually exist on disk. Run this script after modifying routing rules to confirm no broken links or missing skill dependencies have been introduced.

verify-routing-coherence.ps1: Lightweight Consistency Check

For rapid validation, the skills/scripts/verify-routing-coherence.ps1 script performs a focused "coherence" verification. This utility checks the logical consistency of the routing configuration specifically for duplicate keys, invalid hints, and structural conflicts that might not trigger parsing errors but would cause runtime routing failures. It is typically executed after test-routing.ps1 as a final sanity check before committing changes to version control.

smoke.ps1: CI Pipeline Integration

The skills/scripts/smoke.ps1 script includes a dedicated routing-coherence section within its general health check suite. Designed for continuous integration pipelines, this script runs a quick "smoke" test that reuses the same coherence verification logic found in verify-routing-coherence.ps1 while adding broader system health validations. Use this script to catch routing regressions early in automated build processes.

Executing the Scripts on Windows

All scripts are written for PowerShell and require no additional dependencies beyond the standard Windows PowerShell environment. Execute them using the following commands from the repository root:


# Run the full routing test suite

powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/test-routing.ps1

# Run only the coherence verification (faster)

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

# Run the smoke test including routing coherence checks

powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/smoke.ps1

The -ExecutionPolicy Bypass flag allows the scripts to run without modifying system-wide execution policies, making them safe for development environments.

Routing Configuration Architecture

The validation scripts operate against the central routing configuration file located at skills/config/routing.json. This JSON file defines the core decision-making matrix that maps user intents to specific skill modules. The coherence testing specifically validates that:

  • All JSON keys are unique and well-formed
  • Referenced skill modules exist in the expected directory structure
  • Hint values are valid and consistent with the routing schema
  • No circular dependencies or unreachable routes exist

Summary

  • Three PowerShell scripts in skills/scripts/ provide comprehensive Windows testing for routing coherence in reverse-skill.
  • test-routing.ps1 offers full validation including JSON parsing and module existence checks.
  • verify-routing-coherence.ps1 provides fast, lightweight verification of logical consistency and duplicate keys.
  • smoke.ps1 integrates routing checks into CI pipelines alongside other health validations.
  • All scripts target the skills/config/routing.json configuration file and require no external dependencies.

Frequently Asked Questions

What is the difference between test-routing.ps1 and verify-routing-coherence.ps1?

The test-routing.ps1 script performs comprehensive validation including parsing the skills/config/routing.json file and verifying that all referenced skill modules exist on disk. The verify-routing-coherence.ps1 script focuses specifically on logical consistency checks such as detecting duplicate keys and invalid hints, making it faster but narrower in scope. Developers typically run the full script first, followed by the coherence check before committing changes.

Do these scripts require administrator privileges on Windows?

No, the PowerShell scripts do not require administrator privileges. They use the -ExecutionPolicy Bypass parameter to run within the current user context, allowing developers to execute routing coherence tests without modifying system-level security policies or elevating permissions, provided they have read access to the skills/scripts and skills/config directories.

Can I run these scripts in a continuous integration environment?

Yes, the smoke.ps1 script is specifically designed for CI pipelines. It includes the same routing-coherence verification logic as verify-routing-coherence.ps1 while adding broader system health checks, making it ideal for automated regression testing. The script returns appropriate exit codes to fail builds when routing inconsistencies are detected.

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 →