Metadata-Version: 2.4
Name: manolii-routing-lint
Version: 0.2.1
Summary: Model-routing data-classification linter for Manolii agent frontmatter, PR bodies, and routing config.
Project-URL: Homepage, https://github.com/Manolii-org/master/tree/main/packages/manolii-routing-lint
Project-URL: Source, https://github.com/Manolii-org/master/tree/main/packages/manolii-routing-lint
Project-URL: Issues, https://github.com/Manolii-org/master/issues
Author-email: Manolii <platform@manolii.com>
License: MIT
Keywords: claude,governance,linter,manolii,model-routing
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# manolii-routing-lint

Model-routing data-classification linter for the Manolii ecosystem. Wraps
`scripts/lint-agent-routing.py` (master) as an installable uv workspace member,
consumed downstream by **pinned git ref** (no registry).

## Install (consumer)

```toml
# consumer pyproject.toml
[project]
dependencies = ["manolii-routing-lint"]

[tool.uv.sources]
manolii-routing-lint = { git = "https://github.com/manolii-org/master", subdirectory = "packages/manolii-routing-lint", tag = "manolii-routing-lint-v0.2.0" }
```

## Use

```bash
manolii-routing-lint                 # lint all .claude/agents/*.md in the cwd repo
manolii-routing-lint --list-oss      # enumerate OSS-routed model identifiers
manolii-routing-lint --check-pr-body BODY.md
python -m manolii_routing_lint --skills
```

## Config resolution

The linter reads `.claude/model-routing.json` from the **repo being linted**.
Because an installed package cannot use `__file__`-relative paths, resolution is
deterministic (no ancestor walk, so a governance gate never binds to a nested
submodule/worktree config):

| Precedence | Source |
|---|---|
| 1 | `MODEL_ROUTING_CONFIG` env (explicit file path) |
| 2 | `MANOLII_REPO_ROOT` env → `<root>/.claude/model-routing.json` |
| 3 | `<cwd>/.claude/model-routing.json` |

If none resolves, the linter **fails closed** (`exit 2`) rather than guessing.

## Dual-run / parity

During the migration the original `scripts/lint-agent-routing.py` stays in place
(synced to consumer repos, used by pre-commit/CI). Byte-equivalence between the
script and this package is enforced by `scripts/tests/test_routing_lint_parity.py`.
