Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

file_policy

Diff-scoped file policy runner for verification rule packs. One combined git changed-path pass, per-path read cache, TOML rule registry, JSON-lines violations, and exit codes for CI.

Rule pack corpora are authored in agent-standards (file_policy/rule_packs/<slug>/). Assemble copies only <slug>.py into app repos as flat file-policy/packs/<slug>.py; policy and fixtures ship in file-policy/assembled_policy.py. This repo is the engine only.

Install

Engine development:

pip install -e ".[dev]"

App repos: assemble.py verification writes file-policy/requirements.txt from agent-standards file_policy/engine_version.txt. This repo: pushes to main run .github/workflows/release.yml: if pyproject.toml’s version is not yet on PyPI it publishes; if it already is, CI bumps the patch and re-runs (see AGENTS.md). Optional tag v* still publishes. scripts/verify/file_policy.ps1 bootstraps .venv-file-policy.

pip install file-policy==0.1.12

One-time publish setup (then forget it): On PyPI → file-policy → Publishing, add a trusted publisher — Owner sidboilie, Repository file-policy, Workflow release.yml, Environment (leave blank). GitHub repo can stay private; the PyPI wheel is public and needs no install auth. No PYPI_API_TOKEN secret.

CLI

python -m file_policy run --repo ROOT [--manifest file-policy/manifest.toml] [--packs PACKS_DIR] [--git-base BASE] [--scope changed|full] [--verbose]
python -m file_policy rule test SLUG --repo ROOT [--manifest file-policy/manifest.toml] [--packs PACKS_DIR]
python -m file_policy rule new SLUG --packs PACKS_DIR [--kind per-file|multi-file]

Exit codes: 0 clean, 1 violations, 2 usage/config errors.

Rule pack layout

Authoring (agent-standards): file_policy/rule_packs/<slug>/ with meta.toml, fixtures.toml, and <slug>.py.

Pack language: meta.toml must declare exactly one language: language = "…" (dart, rust, sql, …). Do not use languages (invalid). fixtures.toml does not define language per row; any stray language key there is ignored — meta.toml is the only language source.

App repo after assemble: file-policy/packs/<slug>.py (scripts only) plus file-policy/assembled_policy.py and file-policy/manifest.toml.

Legacy: PACKS_DIR/<slug>/ with meta.toml is still supported when not using assembled_policy.

MDL (minimal data loading)

from file_policy import run_minimal_data_loading

violations = run_minimal_data_loading(repo_root, config_dict, git_base)

Tests

python -m pytest tests/ -q

Metadata

Release files for file-policy 0.1.12

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

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for file-policy 0.1.12
File Size Uploaded Provenance Actions
file_policy-0.1.12.tar.gz 25.8 kB With provenance Details for file_policy-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for file-policy 0.1.12
File Interpreter ABI Platform Actions
file_policy-0.1.12-py3-none-any.whl Python 3 none any Details for file_policy-0.1.12-py3-none-any.whl

Total release size: 56.8 kB

Release files / file_policy-0.1.12.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL file_policy-0.1.12.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
49f137314205769807ecfa4e75f0ade37515c081fcc80f9802eb8a232e20e7d5
BLAKE2b-256 checksum
How to use checksums
67d024ad4eecc45e20547b359d64deb02d177f62bec16ff640e05e3d571665cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Release files / file_policy-0.1.12-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL file_policy-0.1.12-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20b86400da628a822e476abbe33a349728bec969e6e135308d54642328642de2
BLAKE2b-256 checksum
How to use checksums
ceb0f3a990183f60b5556c24a9f3096a5922342615da7c96794ff70ba3ec7f1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 6, 2026.

Transparency log

Security for file-policy 0.1.12

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.

Change of provenance

The configuration that created this release differs from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for file_policy-0.1.12.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 Nov 6, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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