Catalog PyPI
PACKAGE EXPLORERView in registry

aedile

PyPI

Maintains architectural integrity as AI writes code.

Versions collected1
Direct dependencies0From release 1.0.0
Last observed20 Oct, 20:10 UTC

README

Version 1.0.0 documentation

Aedile Logo

Aedile

Before an AI writes code, it should prove that the code deserves to exist.

Aedile is an engineering intelligence layer for AI coding assistants. Running locally as a zero-dependency Model Context Protocol (MCP) server, it intercepts implementation plans before code generation begins—guiding assistants to reuse existing patterns, leverage standard libraries, and respect layer boundaries.

CI Python Version License: MIT


1. Quick Start

Install the package directly from GitHub:

pip install git+https://github.com/aaryanrwt/aedile.git

Generate the local prompt rulesets (.cursorrules and .claudeprompt templates):

python -m aedile compile-rules

Add the MCP server command python -m aedile to your coding assistant (e.g. Cursor or Claude Code). See SUPPORTED_AGENTS.md for step-by-step setup guides.


2. Quick Example: Adding JWT Token Generation

Standard AI Assistant

The assistant plans to write a custom JWT helper, unaware that src/shared/auth.py already contains a token generator. It installs a new library, adds 40 lines of wrapper code, and increases reasoning costs.

With Aedile

The assistant consults Aedile during its planning step:

AI:     "I'm going to create jwt.py."
Aedile: "Existing helper found: src/shared/auth.py. Reuse create_token()."
AI:     "Understood. Importing src.shared.auth and writing 1 line instead of 40."

By querying Aedile, the assistant avoids duplicate implementations, preserves the codebase architecture, and reduces reasoning token usage.


3. How it Works

Aedile hooks into the assistant's planning loop via the Model Context Protocol (MCP). Before code is written, Aedile evaluates the proposed changes:

graph TD
    A[User Prompt] --> B[AI Assistant Plans Change]
    B --> C{Aedile Consult Tool}
    C -->|Scan Symbols| D[Similarity & Reuse Check]
    C -->|Analyze Imports| E[Cycle & Boundary Check]
    D --> F[Consolidated Advice]
    E --> F
    F --> G[Assistant Generates Optimal Code]

We designed Aedile to enforce a structured Decision Ladder—directing the assistant to check codebase reuse, standard libraries, and pre-installed dependencies before drafting new logic.


4. Benchmarks

We measured the execution of backend engineering tasks (such as token authentication and endpoint refactoring) across multiple runs. Full parameters are documented in results.json and compiled in BENCHMARKS.md.

MetricWithout AedilePrompt-Only RulesWith Aedile
Reasoning Cost (Avg Tokens)1,8501,100350
Context Window Size (Tokens)4,2005,1001,200
Duplicate Code WrittenYesYesNo
Tool Calls Executed321

5. Paradigm Comparison

Aedile represents a shift in how codebase constraints are enforced:

  • Static Prompting vs. Dynamic Context: Static prompts (like .cursorrules text) decay and suffer from "prompt drift" in long sessions. Aedile queries real-time codebase symbols and active dependencies dynamically via a single MCP tool (aedile_consult).
  • Post-Facto Linters vs. In-Plan Verification: Traditional linters check imports after files are saved, failing in CI/CD. Aedile verifies planned imports in-memory before files are written, letting the model self-correct.

Trade-offs & Limitations

Aedile intentionally trades process startup latency (~100ms) for dynamic codebase verification. We optimized traversal by using SHA-256 increment caching, keeping scan times under 40ms. Symbol parsing is currently optimized for Python workspaces, with TypeScript/JavaScript support planned next.


6. Frequently Asked Questions

Why not just use static prompting (e.g., Ponytail)?

Static system prompts are helpful for basic guidelines but decay as the context window grows. AI models suffer from "prompt drift" and will ignore static text. Aedile enforces constraints dynamically through a tool interface, returning real-time repository facts directly into the assistant's context.

Does it require internet access?

No. Aedile is fully offline-first. Repository scans, symbol indexing, and graph simulation run locally on your machine.


7. Contributing & License

We welcome contributions to Aedile. Please review our CONTRIBUTING.md and CODE_OF_CONDUCT.md.

Aedile is open-source software licensed under the MIT License.


Star History

Star History Chart

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.010 Jul 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e72c26f209693b490011e3f57f1ada5fce295be601555ec85f7127236274c6c2