A battle-tested operating manual for running a coding agent autonomously on real production systems — distilled into one file you can drop in your repo.
We run Claude Code autonomously against a live crypto-trading platform: it
edits code, runs tests, commits, and deploys with minimal hand-holding. The
single thing that made that safe instead of terrifying was a tight, opinionated
CLAUDE.md. This repo is the generalized, secret-free version of it.
👉 The whole thing is one file: AGENTS.md. Copy it into your
repo as CLAUDE.md, AGENTS.md, or .cursorrules and trim to taste.
Coding agents fail in predictable ways: they edit code they don't understand, smuggle mock data into production, blow time/token budgets, break shared contracts they didn't trace, and confidently claim things are "fixed" without checking. This manual is a fence built around exactly those failure modes.
It's organized as Four Prime Directives (the 20% you must keep) plus practical guardrails:
- Map First — understand the system end-to-end before editing.
- No Fake Data in Production Paths — mocks live in tests, never in prod.
- Respect Budgets — time, tokens, money, latency all have limits.
- Trace Downstream — follow every shared-contract change to the user.
…followed by sections on autonomy vs. irreversible-action guardrails, git discipline, errors as learning, token/cost optimization, a file-based memory pattern, when to stop and ask a human, and a pre-commit checklist.
# in your project root
curl -O https://raw.githubusercontent.com/MrMaca11an/autonomous-agent-md/main/AGENTS.md
mv AGENTS.md CLAUDE.md # or keep as AGENTS.md / .cursorrulesThen delete what doesn't apply to you and keep the principles. The structure matters more than the exact wording.
- Written for real autonomy, not demos. It assumes the agent will act without asking — so the guardrails are about what it must never do.
- Incident-first. Stabilize the service before refactoring.
- Memory built in. A small file-based "LLM wiki" so the agent stops relearning your project every session.
- Cost-aware. Token/compute optimization is a first-class section, not an afterthought.
Found a failure mode the manual doesn't cover? Open a PR with the principle and a one-line rationale. Keep additions short — this document's value is in being read, which means staying short.
MIT. Maintained by the team behind Millennium AI.