Scaffold agent context files into a project.
Project description
agentinit
Scaffold hardened, router-first context files so your AI coding agents stop guessing and start delivering.
Pure Python standard library. No runtime dependencies. Generates 2026-ready manifests for Claude Code, Cursor, Copilot, Gemini CLI, and Windsurf.
🚀 Start in 60 seconds
# 1. Install via pipx (recommended)
pipx install agentinit
# 2. Initialize hardened context in your project
cd your-project
agentinit init --minimal
What it does
Instead of giant, token-heavy instruction files, agentinit implements a hierarchical context strategy. It creates a machine-readable map of your project and enforces autonomy via Hardened Mandates.
your-project/
├── llms.txt # The "robots.txt" for AI (Discovery Index)
├── AGENTS.md # The central hub with Hardened Mandates
├── CLAUDE.md # Claude Code router
├── GEMINI.md # Gemini CLI router
└── docs/
├── PROJECT.md # What this project is
├── CONVENTIONS.md # How to work in it
└── STATE.md # Persistent working memory (AI-readable)
Next steps: Open docs/PROJECT.md and docs/CONVENTIONS.md and fill them in.
Next session: Your agent will find llms.txt, read your rules in AGENTS.md, and follow the mandates to autonomously maintain docs/STATE.md and docs/TODO.md.
Troubleshooting: files not visible to your agent
Some agents only scan tracked files. If your agent says it can't find your context:
-
Track everything: Add the manifests so your agent can see them.
git add llms.txt AGENTS.md CLAUDE.md GEMINI.md docs/ git add .agents/ # if you added extras
-
Verify ignores: Run
git status --ignoredto see if your.gitignoreis hiding them.
Minimal .gitignore exceptions
!llms.txt
!AGENTS.md
!CLAUDE.md
!GEMINI.md
!docs/PROJECT.md
!docs/CONVENTIONS.md
!docs/TODO.md
!docs/DECISIONS.md
!docs/STATE.md
!.agents/
!.agents/**
🛠️ Add extras (Skills, MCP, Personality)
Agents can do more than just read conventions. Inject modular, hardened resources directly into your project.
# View available resources
agentinit add --list
# Add specific capabilities
agentinit add skill code-reviewer
agentinit add security
agentinit add soul "YourAgentName"
Resources in .agents/ are automatically linked in AGENTS.md and use Imperative Mandates (MUST ALWAYS, MUST NEVER) to ensure compliance and zero-sycophancy.
🚦 Keep your context clean (Status & CI)
Token limits matter. agentinit includes a validator to prevent context bloat, broken links, and missing information.
# View line budgets, broken references, and missing details
agentinit status
# Perfect for CI (exits non-zero on violations)
agentinit status --check
🤖 AI Prompt: Fill the docs fast
After running agentinit init, paste this to your favorite AI agent:
Read the entire repository. Fill in
docs/PROJECT.mdanddocs/CONVENTIONS.mdusing only facts found in the repo (package files, configs, source code, CI). Do not invent commands. If information is missing, writeTODO: <what's needed>. Updatedocs/STATE.mdanddocs/TODO.mdto reflect our current progress. Do not modify any other files.
📚 Advanced Usage & Commands
Core Commands
agentinit init— Add missing files to an existing directory.agentinit minimal— Shortcut forinit --minimal.agentinit status— Check health, line budgets, and broken links.agentinit add <type> <name>— Add modular resources (skills, mcp, security, soul).agentinit new <project>— Create a new directory and scaffold files.agentinit remove— Safely remove or archive agent files.
Common Flags
--detect— Auto-detect stack and commands from package files (e.g.,package.json,pyproject.toml).--yes/-y— Runs non-interactively and skips the wizard.--purpose "<text>"— Prefill the project purpose non-interactively.
💡 Why Hardened Context?
- Agent Autonomy: Explicit mandates (
YOU MUST ALWAYS read state.md) transform the agent from a chatbot into a disciplined project maintainer. - AI-Discovery Index:
llms.txtensures any tool (Cursor, Windsurf, Claude) immediately understands your project map. - Progressive Disclosure: Keeps the context window high-signal by loading deep details only when relevant.
- Zero Sycophancy: Mandates force the agent to skip "I'd be happy to help!" and jump straight to the technical solution.
⚙️ Installation & Development
Requires Python 3.10+.
# Install (pipx is recommended)
pipx install agentinit
# Update
pipx upgrade agentinit
Development
pip install -e . --group dev
python3 -m pytest tests/ -v
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentinit-0.3.2.tar.gz.
File metadata
- Download URL: agentinit-0.3.2.tar.gz
- Upload date:
- Size: 44.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0725e458bc1fc92054254ec81e4f4c1453747182681bc69ee63bd404f7d3ce0
|
|
| MD5 |
388948cbf07e55fb97a7eaf64782f9a9
|
|
| BLAKE2b-256 |
496f7e7d914a992f409e7cdfc9cf0bd096ca042e677da733b612fb2c75709891
|
Provenance
The following attestation bundles were made for agentinit-0.3.2.tar.gz:
Publisher:
publish.yml on Lucenx9/agentinit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentinit-0.3.2.tar.gz -
Subject digest:
a0725e458bc1fc92054254ec81e4f4c1453747182681bc69ee63bd404f7d3ce0 - Sigstore transparency entry: 1006949553
- Sigstore integration time:
-
Permalink:
Lucenx9/agentinit@ba756a1d0fbee2e52c867202f3dc174227a9e5da -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Lucenx9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ba756a1d0fbee2e52c867202f3dc174227a9e5da -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentinit-0.3.2-py3-none-any.whl.
File metadata
- Download URL: agentinit-0.3.2-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98278f673a584f717bd41af6b0845dd61580f248781f1525469fcf01c2fa0aa6
|
|
| MD5 |
bc3e6630b35a9ac10376b8c45ef8d817
|
|
| BLAKE2b-256 |
fea856c776ed030afe8411641e9319212c639292d12815887f2139f3a50291e6
|
Provenance
The following attestation bundles were made for agentinit-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on Lucenx9/agentinit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentinit-0.3.2-py3-none-any.whl -
Subject digest:
98278f673a584f717bd41af6b0845dd61580f248781f1525469fcf01c2fa0aa6 - Sigstore transparency entry: 1006949554
- Sigstore integration time:
-
Permalink:
Lucenx9/agentinit@ba756a1d0fbee2e52c867202f3dc174227a9e5da -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Lucenx9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ba756a1d0fbee2e52c867202f3dc174227a9e5da -
Trigger Event:
release
-
Statement type: