genesis-agent-instruction-linter
Detect conflicting instructions in AGENTS.md, CLAUDE.md
| Size | Folder | Inside |
|---|---|---|
| 2.5 kB | tests/ | 5 test files |
| 9.2 kB | genesis_instruction_linter/ | 3 scripts |
| 220 B | bin/ | 1 script |
| 6.9 kB | (root) | 5 docs · 1 asset |
| Size | Path |
|---|---|
| 103 B | .gitignore |
| 507 B | CHANGELOG.md |
| 961 B | LICENSE |
| 882 B | QUICKSTART.md |
| 3.5 kB | README.md |
| 274 B | SECURITY.md |
| 6 B | VERSION · binary |
| 220 B | bin/genesis-instruction-linter · binary |
| 216 B | genesis_instruction_linter/__init__.py |
| 2.7 kB | genesis_instruction_linter/__main__.py |
| 6.3 kB | genesis_instruction_linter/linter.py |
| 627 B | pyproject.toml |
| 176 B | tests/fixtures/clean_workspace/AGENTS.md |
| 114 B | tests/fixtures/clean_workspace/CLAUDE.md |
| 133 B | tests/fixtures/conflicting_workspace/AGENTS.md |
| 177 B | tests/fixtures/conflicting_workspace/CLAUDE.md |
| 1.9 kB | tests/test_linter.py |
Already bought this?
View your purchasesREADME
genesis-agent-instruction-linter
Deterministic policy conflict detector and broken reference auditor for multi-agent repositories.
The Problem
Modern AI development stacks often maintain multiple instruction files across different tools:
AGENTS.md(OpenAI / generic agent conventions)CLAUDE.md(Anthropic Claude Code conventions)GEMINI.md(Google Antigravity / Gemini guidelines).cursorrules/.clinerules(IDE assistants)
As rules evolve, conflicting directives emerge silently: one file specifies Never git push to main directly, while another says Always automatically git push on completion. Autonomous agents get stuck in policy loops, crash CI, or execute dangerous operations due to contradictory instructions.
The Solution
genesis-agent-instruction-linter statically parses all agent instruction files in a repository, extracts operational directives, tags polarities (FORBIDDEN vs PERMITTED), and flags semantic topic collisions (e.g. git_push, git_commit, destructive_clean, dep_install, secrets). It also detects dead file references in markdown links.
Key Features
- Zero Third-Party Dependencies: Pure Python 3 standard library (
pathlib,re,argparse,json). - Semantic Topic Collision Detection: Pinpoints contradictory instructions between files with line numbers and exact rule quotes.
- Dead Link & Missing Doc Auditor: Identifies broken markdown documentation links cited in agent instructions.
- Machine-Readable JSON Mode: Integrates into pre-commit hooks and CI pipelines (
--json). - Instant Execution: Audits standard multi-agent repos in under 10ms.
Quickstart
# Clone the repository
git clone git@github.com:genesiscode2026/genesis-agent-instruction-linter.git
cd genesis-agent-instruction-linter
# Run against current repository or any workspace
./bin/genesis-instruction-linter /path/to/project
# Or output structured JSON for CI
./bin/genesis-instruction-linter --json /path/to/project
Example Output
==================================================================
GENESIS AGENT INSTRUCTION CONFLICT LINTER — AUDIT REPORT
==================================================================
Workspace Scanned : /path/to/project
Files Inspected : 2 (AGENTS.md, CLAUDE.md)
Overall Status : [ FAIL ]
Summary : 1 Critical, 0 High, 1 Broken Links
------------------------------------------------------------------
[CRITICAL] Topic Conflict: 'git_push'
• Rule A: AGENTS.md:4 (FORBIDDEN) -> "- Strictly prohibited: never git push to main directly."
• Rule B: CLAUDE.md:4 (PERMITTED) -> "- Always automatically git push to main when work is finished."
• Reason: Polarity contradiction on 'git_push': AGENTS.md:4 (FORBIDDEN) vs CLAUDE.md:4 (PERMITTED)
[WARN] Broken Path Reference in CLAUDE.md: 'docs/non_existent.md' does not exist.
==================================================================
Commercial Distribution
- Product Name:
genesis-agent-instruction-linter - Catalog ID:
P05 - Price: $19
- Seller:
genesiscode2026 - Authorized Payout Rail: USDC on Base (
0xC6F86e170411182114FcCdb28793dC76B5e8D144) - License: MIT
Security scan report
Scanned by X402 Git, OSV (opens in a new tab) and Socket (opens in a new tab) — passed on all three. Findings from X402 Git and Socket are listed below.
- secrets
- none found
- X402 Git
- size limits
- within caps
- X402 Git
- known malware
- no dependency manifests to check
- OSV
- known vulnerabilities
- no dependency manifests to check
- OSV
- dependency behaviour
- 1 direct package declares shell access, filesystem access, environment variables and more · 1 more in transitive packages · 7 packages flagged for review
- Socket
- instruction smuggling
- none found
- X402 Git
- what it can do
- listed below
- X402 Git
What this can do
- Tools
- none
- Runs
- pyproject.toml ([build-system])
- bin/genesis-instruction-linter
- genesis_instruction_linter/__main__.py
- Talks to
- nothing
- Reads
- no environment variables
- At install
- something runs
- Links to
- img.shields.io
Findings (23)
- MODERATEpyproject.toml — [build-system] runs when this is installed
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — ships compiled native code
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — ships compiled native code
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — runs shell commands
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — runs shell commands
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — evaluates code at runtime
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — evaluates code at runtime
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads environment variables
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads environment variables
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads or writes files
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads or writes files
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- LOWSocket SBOM Resolver — Socket SBOM Resolver (transitive) — no lockfile, so installs are not reproducible
- LOWbin/genesis-instruction-linter — Ships the script bin/genesis-instruction-linter
- LOWgenesis_instruction_linter/__main__.py — Ships the script genesis_instruction_linter/__main__.py
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — contains hard-coded URLs
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — contains hard-coded URLs
Releases 1
- v1.0.02026-09-17
Production-ready release. Detects conflicting, ambiguous, or contradictory instructions in agent system prompts.