Deterministically resolve which Codex and Claude Code instruction sources apply to a repository path, including scope, shadowing, exclusions, and diagnostics.
npx mdskills install /ruleroute-trace-agent-rules1---2name: trace-agent-rules3description: Deterministically resolve and audit repository instruction sources for Codex (AGENTS.md and AGENTS.override.md) and Claude Code (CLAUDE.md, CLAUDE.local.md, imports, and .claude/rules). Use when a user asks which coding-agent instructions apply to a path, why a source is active, lazy, shadowed, excluded, or missing, whether guidance has scope drift, or how to validate instruction routing in CI.4---56# Trace agent rules with RuleRoute78Use RuleRoute's deterministic local CLI instead of inferring scope from a partial file listing. The command below downloads the pinned, dependency-free CLI from the public Codeberg npm registry; the analyzer itself makes no network requests and omits instruction contents from every report.910## Workflow11121. Identify the target path and harness. When none is given, use the current working directory and current harness. For changed files, run once per relevant path from `git diff --name-only`.132. Require Node.js 18 or newer. In Codex use `--harness codex`; in Claude Code use `--harness claude`. Use `auto` only when the harness is genuinely unknown. Run:1415 ```bash16 npx --yes --registry=https://codeberg.org/api/packages/automa-tan/npm/ ruleroute@0.2.3 <target-path> --harness <codex|claude|auto> --json17 ```18193. For Codex, report active files root-to-nearest and state when `AGENTS.override.md` replaces `AGENTS.md` at the same directory.204. For Claude Code, report additive sources in load sequence. Distinguish `launch` from `on-demand`, explain which path-rule glob matched, and do not describe `CLAUDE.local.md` as a hard override.215. Report deterministic diagnostics separately: oversized files, broken references or imports, exclusions, shadowed files, import cycles or depth, invalid path rules, and exact duplicate list rules. Rule text is always omitted.226. Do not claim semantic contradictions were detected. RuleRoute does not guess at natural-language equivalence, conflict winners, or model compliance.237. For a shareable artifact, replace `--json` with `--markdown`. For CI, add `--check`; it exits 1 when warning-level diagnostics are present.2425The analyzer reads repository instruction sources and Claude exclusion settings only, makes no edits, and does not read external `@` imports. Source and documentation: https://codeberg.org/automa-tan/ruleroute26
Full transparency — inspect the skill content before installing.