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
Srules, C901 complexity (changed-file scope — measured, seesrc/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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aufsicht-0.2.0.tar.gz.
File metadata
- Download URL: aufsicht-0.2.0.tar.gz
- Upload date:
- Size: 174.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c8e837ab0ebae6f45e43e9c402368ef45f0b76d99d86607fc06cad9525d2b73
|
|
| MD5 |
9e4f2887af35c94f8c3e9296e2af58e4
|
|
| BLAKE2b-256 |
744ac7326c10cc497d226a7c26d933df9cbecc0a4eb9be59dab79770dbadff37
|
Provenance
The following attestation bundles were made for aufsicht-0.2.0.tar.gz:
Publisher:
aufsicht.yml on code-factorio/aufsicht
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aufsicht-0.2.0.tar.gz -
Subject digest:
0c8e837ab0ebae6f45e43e9c402368ef45f0b76d99d86607fc06cad9525d2b73 - Sigstore transparency entry: 2582799485
- Sigstore integration time:
-
Permalink:
code-factorio/aufsicht@27e35ee56067d6e425d3b25a4f85e52d9c2d094c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/code-factorio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
aufsicht.yml@27e35ee56067d6e425d3b25a4f85e52d9c2d094c -
Trigger Event:
push
-
Statement type:
File details
Details for the file aufsicht-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aufsicht-0.2.0-py3-none-any.whl
- Upload date:
- Size: 110.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbe97c2d50e8225879a84b21b210c82b209d95294f0798509b8579ecf2b7ac94
|
|
| MD5 |
476d0352bf73c1c94f5400dfbf4c3f57
|
|
| BLAKE2b-256 |
04433dfb7eff3c5695d21de4fc4f243f9b46ea13cfcefd76c5bb5c94f473e133
|
Provenance
The following attestation bundles were made for aufsicht-0.2.0-py3-none-any.whl:
Publisher:
aufsicht.yml on code-factorio/aufsicht
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aufsicht-0.2.0-py3-none-any.whl -
Subject digest:
cbe97c2d50e8225879a84b21b210c82b209d95294f0798509b8579ecf2b7ac94 - Sigstore transparency entry: 2582799489
- Sigstore integration time:
-
Permalink:
code-factorio/aufsicht@27e35ee56067d6e425d3b25a4f85e52d9c2d094c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/code-factorio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
aufsicht.yml@27e35ee56067d6e425d3b25a4f85e52d9c2d094c -
Trigger Event:
push
-
Statement type: