Skip to main content

aufsicht

Deterministic, reusable quality guardrails for existing Python repositories, built so AI coding agents cannot silently degrade them.

aufsicht (German for oversight / supervision — the only non-English identifier in the system) implements the Python AI Code Quality Guardrails specification v5.1 (Tier 1) and the distribution layer from the aufsicht distribution spec v1. Both documents, plus the Tier 3 mutation-testing addendum, live verbatim in spec/.

The three layers

Layer 1   runner        this package. All gate logic. Versioned, pinned, never
                        regenerated per repository.
Layer 2   init          `aufsicht init` — deterministic bootstrap: probes,
                        writes .quality/, verifies, refuses.
Layer 3   skill         delivery via an agent harness. Zero gate logic, zero
                        policy. Runs install/bootstrap.sh and reads init's
                        output. That is all.

The invariant: no policy above Layer 1. Thresholds, rule lists and mechanisms live in the runner and in .quality/ inside each guarded repository — never in the skill, never in prose an agent paraphrases.

Install

uv tool install aufsicht==0.2.0        # or: pipx install aufsicht==0.2.0
cd /path/to/existing/repo
aufsicht init                          # detect → probe → propose → write → verify

init branches (never commits to the default branch), writes .quality/, a CI workflow, an AGENTS.md section — configuration and nothing else. The repository's pyproject.toml dependencies and lockfile are provably untouched: the runner is a standalone tool, not a project dependency (distribution spec §3).

Command surface

aufsicht fast      quality-fast   read-only, diff-scoped, < 15 s (v5.1 §5)
aufsicht full      quality-full   read-only, whole repo, per-rule ratchets
aufsicht fix       quality-fix    MAY mutate — never in validation or CI
aufsicht init      Layer 2 installer
aufsicht upgrade   prints the .quality/ diff a runner upgrade would apply,
                   writes nothing

Exit codes (v5.1 §15): 0 pass, 1 hard gate, 2 regression only, 3 tooling error. Init exit codes (distribution spec §5.2): 0 installed, 1 refused, 2 installed with warnings, 3 tooling error.

What the gate does

Tier 1 — no baseline artifact, three mechanisms (v5.1 §4):

  • absolute — test failures, circular imports (pyscn structured analysis minus allowlist), pip-audit findings, guardrail integrity
  • diff-scoped — Ruff errors/format, enumerated Ruff S rules, C901 complexity (changed-file scope — measured, see src/aufsicht/probe_facts.py), Pyright on changed files, Semgrep anti-evasion rules, suppression-comment added-line scan
  • per-rule count ratchet — Ruff, Pyright, pyscn dead code, deptry, Xenon aggregate, grouped by rule id with a <no-rule> bucket for null rule ids

Analyzer versions come from .quality/toolchain.lock (protected path, v5.1 §11.2) and run from runner-managed environments keyed on lockfile hash. A ratchet never compares diagnostics produced by different versions of the same analyzer (v5.1 §4.4).

Self-hosting

This repository runs its own guardrails (.quality/, .github/workflows/aufsicht.yml). src/aufsicht/** is documented in AGENTS.md as the product rather than a protected path — its control is code review plus the self-test suite (distribution spec §7).

Development

uv sync
uv run pytest

The self-test suite (v5.1 §18, distribution spec §8) executes every case against generated scratch repositories — real git history, real merge base, real violation, real CLI invocation.

License

Apache-2.0

Metadata

Release files for aufsicht 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aufsicht 0.2.5
File Size Uploaded Provenance
aufsicht-0.2.5.tar.gz 180.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aufsicht 0.2.5
File Interpreter ABI Platform
aufsicht-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 291.6 kB

Release files / aufsicht-0.2.5.tar.gz

Download URL aufsicht-0.2.5.tar.gz
Size 180.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2d0835686af6be6826b42f78d3b9cc2aed3a33255506c6487191a941ff6dc98a
BLAKE2b-256 checksum
How to use checksums
0e24db3beb38d04632e9e7b23463e3f430e169b5cbb387202d7b8f8bf11e9c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / aufsicht-0.2.5-py3-none-any.whl

Download URL aufsicht-0.2.5-py3-none-any.whl
Size 111.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b20d9e9c686ed6489501a5909fdac6dfe3f4e4f53f014e31368dacfe043864a
BLAKE2b-256 checksum
How to use checksums
ed45f69fed9eeeb02801931d52c4f633f3ed7569bdccbbccaffcd2074482214e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Security for aufsicht 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aufsicht-0.2.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page