Skip to main content

Ownerloom

Coverage

Keep CODEOWNERS readable as your repository grows. Ownerloom groups literal paths by directory, removes redundant rules, and preserves the order that decides who owns each path. One Python package replaces copied formatting scripts across projects.

Table of contents

Quick start

From this checkout, with Python 3.12+ and Git available:

python -m pip install .
ownerloom --check
ownerloom --write
git diff -- .github/CODEOWNERS

Review and stage the result yourself. Ownerloom never commits, pushes or changes repository permissions. Python 3.14.1 is excluded by the NetworkX dependency.

Why Ownerloom

  • Readable policy: keep related directories together without moving an override ahead of the rule it overrides.
  • Conservative changes: preserve comments, GitLab sections, wildcard rules and unfamiliar syntax as boundaries. Retained syntax still needs provider validation.
  • Reviewable automation: check the exact committed file and tree before push, rather than allowing an unstaged fix to mask stale committed policy.
  • Reusable integration: the same typed library powers the CLI, pre-commit and CI. Normal compilation is offline and does not execute repository hooks or source.

Architecture

flowchart LR
    A[CODEOWNERS text] --> C[Literal runs and opaque boundaries]
    B[Tracked Git inventory] --> C
    C --> D[Remove shadowed and inherited rules]
    D --> E[Precedence DAG]
    E --> F[Deterministic tree order]
    F --> G[Compilation result]
    G --> H[Check or atomic write]
    classDef input fill:#829B85,stroke:#647D8B,color:#243746
    classDef pass fill:#C4AC70,stroke:#647D8B,color:#243746
    class A,B input
    class C,D,E,F,G,H pass

The pure compiler accepts explicit text and paths. The CLI owns Git reads and atomic writes. NetworkX orders the precedence graph; it does not interpret provider policy. See the compiler contract for supported syntax, consolidation and failure behavior.

Inputs and results

Input Default Purpose
--repo PATH Current directory Existing repository root
--file PATH .github/CODEOWNERS Relative ownership file; select GitLab's path explicitly
--check Required choice Report whether selected text is normalized
--write Required choice Atomically replace working text; never stage it
--revision REV Index inventory and working text Check committed text and its tree together; check mode only
--consolidate Off Explicitly combine complete uniform subtrees, including future files

Exit status is 0 for normalized or written content, 1 for formatting drift, and 2 for invalid inputs or operational errors. Runtime use requires no credentials. Release jobs use the repository secrets PYPI_API_TOKEN, COSIGN_PRIVATE_KEY and COSIGN_PASSWORD, plus the trusted COSIGN_PUBLIC_KEY_SHA256 variable. GitHub supplies the repository, source SHA, tag and job token. See release setup for these administrator-managed inputs.

from ownerloom import compile_owners

result = compile_owners("/z @team\n/a @team\n", frozenset({"a", "z"}))
assert result.text == "/a @team\n/z @team\n"

Integrations and development

Use the pre-commit and migration guide to replace local copies. Keep a provider-aware syntax/path linter alongside Ownerloom; formatting does not establish account eligibility or enforce required reviews.

See development, release verification, CI permissions, and the portable SKILL.md (browse online). The implementation follows RFC #94.

License and provenance

The runtime compiler is Apache-2.0, copyright Astrivant LLC. The extraction manifest binds its source to Polyad's merged compiler and records the owner's licensing choice. Development helpers retain their separate notices; they are excluded from the wheel.

Metadata

Release files for ownerloom 0.0.1

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

Source distribution (sdist)

Source distribution for ownerloom 0.0.1
File Size Uploaded
ownerloom-0.0.1.tar.gz 13.0 kB Details

Built distribution (wheel)

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

Total release size: 27.9 kB

Release files / ownerloom-0.0.1.tar.gz

Download URL ownerloom-0.0.1.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5fbe68bf11f07cb76c79cba1c62499ed84f4830b5a2312150c223452e7f7ad09
BLAKE2b-256 checksum
How to use checksums
6236fe292298ae4983a25c4c88a43d866cee6d87218aa21b6e83093602b08486
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ownerloom-0.0.1-py3-none-any.whl

Download URL ownerloom-0.0.1-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b41a0d077983980ebed23cf757e310b8bf12857811611925577491f1a03efd07
BLAKE2b-256 checksum
How to use checksums
ffc3486bd0a4811a1e50565bb4b9d48565122c1602d067b3c057f1dbd92d485e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release history Release notifications | RSS feed

0.0.3

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

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