Metadata-Version: 2.4
Name: riskratchet
Version: 0.1.0
Summary: A maintainability ratchet for AI-assisted Python.
Project-URL: Homepage, https://github.com/KayhanB21/riskratchet
Project-URL: Source, https://github.com/KayhanB21/riskratchet
Author-email: Kayhan Babaee <me@kayhan.dev>
License: MIT License
        
        Copyright (c) 2026 Kayhan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: code-quality,complexity,coverage,crap,maintainability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: coverage>=7.4
Requires-Dist: radon>=6.0.1
Requires-Dist: rich>=13.7
Requires-Dist: tomli>=2.0; python_version < '3.11'
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

# riskratchet

A maintainability ratchet for AI-assisted Python.

riskratchet computes a function-level risk score from coverage gaps,
cyclomatic complexity, churn, public surface, and sprawl signals, then fails
when a change pushes risk upward without adding tests. Use it as a CLI, in
pre-commit, or in CI so AI-assisted commits can land working code without
ratcheting up untested complexity.

## Quickstart

```bash
uvx riskratchet scan src --coverage coverage.json
uvx riskratchet baseline src --coverage coverage.json --output .riskratchet.json
uvx riskratchet check src --coverage coverage.json --baseline .riskratchet.json
```

## Local development

```bash
uv sync
uv run pytest
uv run riskratchet scan src --coverage coverage.json
```

This package is in early development. See PLAN.md for the v1 roadmap.
