Skip to main content

necronomicon: lint errors that explain themselves to coding agents. A spiral-eyed pixel robot, wrapped by a green tentacle, takes a dashed feed from a glowing, floating book.

necronomicon

A simple way to organize a repo's pre-commit hooks for progressive disclosure, steering coding agents toward the repo's conventions and intended architecture. Each rule pairs a command that finds violations with what to say about them: what's wrong, why the rule exists, and what to do instead. An agent sees a rule only when its commit breaks it, at the line it broke, with the long form one necro --explain away.

You write a rule; an agent's commit breaks it; pre-commit blocks it and pushes the why; the agent pulls the rest and commits the fix

Why not AGENTS.md

An instruction file is read every session, whether or not today's work touches it, and followed when the agent remembers to. A rule costs nothing until it's broken, and then it blocks the commit. Keep AGENTS.md for orientation and move its "never do X" lines into rules.

Agent mind control

When an agent trips a rule, necro tells it just enough, and the rest is one command away. From examples/layers:

core-isolated:
  command: necro grep '^\s*(from|import)\s+app\b' -- 'src/core/*.py'
  message: core imports the app layer
  why: Core runs in tests without a database; importing app/ drags one in.
  fix: Take a port from core/ports.py as an argument; app/ passes the real one in.
  details: …   # the long form, and bad and good examples, for necro --explain
An agent that never read the rule commits from app.db import session in core. The commit fails, and 11 lines land in its context.
error[core-isolated]: core imports the app layer
 --> src/core/pricing.py:2:1
  |
2 | from app.db import session
  | ^^^^^^^^
  |
  = why: Core runs in tests without a database; importing app/ drags one in.
  = fix: Take a port from core/ports.py as an argument; app/ passes the real one in.
  = more: necro --explain core-isolated

necro: 1 error (core-isolated ×1)
It wants the bigger picture, so it runs the command it was handed and pulls 22 more.
$ necro --explain core-isolated
core-isolated: core imports the app layer

Why: Core runs in tests without a database; importing app/ drags one in.

Fix: Take a port from core/ports.py as an argument; app/ passes the real one in.

Core is the inner layer: app/ may import core, never the reverse.
Exceptions: none. Shared types move into core.

Bad:
    from app.db import session

    def price(order):
        return session.rates(order.region) * order.total

Good:
    from core.ports import Rates

    def price(order, rates: Rates):
        return rates.for_region(order.region) * order.total

Command: necro grep '^\s*(from|import)\s+app\b' -- 'src/core/*.py'

Re-steered, it takes rates: Rates as an argument, and the commit passes.

What necro is, and isn't

  • An organizer, not a parser. A rule's command is anything that prints one path[:line[:col]] per violation: necro grep for a pattern, a short script for more, or a tool you already run. necro owns the wording, allows and output, so rules work in any language.
  • A replacement for the lint script you'd write anyway. Repos that work with agents tend to grow a lint_style.py that greps for house rules and prints one-line errors. necro keeps those rules as config and adds the why, the fix and --explain.
  • Exceptions with reasons. necro-allow <rule>: <reason> in a comment on the line or the one above. An allow without a reason, or one that suppresses nothing, fails the run.
  • Packs for common languages. include: [necro:rust] adds Rust rules that default clippy leaves off, like no unwrap or expect outside tests, versioned with necro; disable: turns one off.
  • A ratchet for rollout. Grandfather existing hits in a committed snapshot so new ones fail alone; refresh it deliberately as debt gets fixed. See Baseline.

Install

uv tool install necronomicon   # PyPI wheel around the necro binary, no Rust needed
pip install necronomicon       # the same wheel, into the current environment
cargo install necronomicon     # from crates.io, built from source

As a pre-commit hook, which installs the wheel into pre-commit's own environment:

- repo: local
  hooks:
    - id: necro
      name: necro
      entry: necro
      language: python
      additional_dependencies: ['necronomicon']
      always_run: true
      require_serial: true

pre-commit passes the changed files, so a commit runs only the rules that concern them; in CI, pre-commit run --from-ref origin/main --to-ref HEAD does the same for a branch. necro with no files checks everything.

Pin below the next 0.x: any 0.x may break the format.

More

Pre-release (version 0): any 0.x may break the format. Licensed under Apache-2.0.

Metadata

Release files for necronomicon 0.4.0

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

Source distribution (sdist)

Source distribution for necronomicon 0.4.0
File Size Uploaded Provenance Actions
necronomicon-0.4.0.tar.gz 50.9 kB With provenance Details for necronomicon-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for necronomicon 0.4.0
File Actions
necronomicon-0.4.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for necronomicon-0.4.0-py3-none-win_amd64.whl
necronomicon-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for necronomicon-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
necronomicon-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for necronomicon-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
necronomicon-0.4.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for necronomicon-0.4.0-py3-none-macosx_11_0_arm64.whl
necronomicon-0.4.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for necronomicon-0.4.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 7.0 MB

Release files / necronomicon-0.4.0.tar.gz

Download URL necronomicon-0.4.0.tar.gz
Size 50.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c39c6bb5627ee4d8649f51eb46e8ce1ffe3c4841b358f099e4937db4631af875
BLAKE2b-256 checksum
How to use checksums
4a175854ab756091f0edf1cd68eb9e8b86b383c56c6b3dc46130e1c1f4adc0f5
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 Nov 6, 2026.

Transparency log

Release files / necronomicon-0.4.0-py3-none-win_amd64.whl

Download URL necronomicon-0.4.0-py3-none-win_amd64.whl
Size 1.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
203aa80996904f4dc1e295c1d1b0c66d5e88ea13ff4dc37f19cff99a28ab7507
BLAKE2b-256 checksum
How to use checksums
a183e089318f0d7067f3b84e9668ec9f5dd68d12f4f7427076723b5721bdaae8
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 Nov 6, 2026.

Transparency log

Release files / necronomicon-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL necronomicon-0.4.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7cf6758cb5933aeba1ee5fa1da2c1e986d601e41d7ccde70fc0ea8571f19ea10
BLAKE2b-256 checksum
How to use checksums
0a0f888d6e3583630d62e2dbf36f15ff3ecd97dbdcad6edceb9f8b907aa5651f
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 Nov 6, 2026.

Transparency log

Release files / necronomicon-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL necronomicon-0.4.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.4 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
431ff2726a2524ca7f86587aa9fe1f61f834cd6c7c9f85783f63cacc062cf269
BLAKE2b-256 checksum
How to use checksums
5215e3e4c78066f7ef467aa691fd3ac03c1e3418a40f299d18ed37b6046f4477
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 Nov 6, 2026.

Transparency log

Release files / necronomicon-0.4.0-py3-none-macosx_11_0_arm64.whl

Download URL necronomicon-0.4.0-py3-none-macosx_11_0_arm64.whl
Size 1.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e2f1b9b0acc051acb9ec5db1987ba753e7bfd4eb587790152e0678d086593388
BLAKE2b-256 checksum
How to use checksums
3b133c10eb6c802c20571b4623dcd6895815e899cdc52173f419c46f765383b9
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 Nov 6, 2026.

Transparency log

Release files / necronomicon-0.4.0-py3-none-macosx_10_12_x86_64.whl

Download URL necronomicon-0.4.0-py3-none-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0aa3a03df6b8b820a871348ec2a595ac3c38e7ee37eb2939d8ed0992cfd49dfe
BLAKE2b-256 checksum
How to use checksums
79f7ee23a9672b777ad3cc16f93cd9d865ec5e108c287dee1044200fcf0b0fc7
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 Nov 6, 2026.

Transparency log

Security for necronomicon 0.4.0

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for necronomicon-0.4.0.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