A coding standard optimized for AI agent readability and token efficiency.
25-40% overall token savings · 40-60% context reduction
🌐 Live site: aocs.myavs.us 📦 Repository: github.com/spuddermax/aocs
AOCS separates specification from implementation:
- Specification layer: formal
@contractannotations declaring inputs, outputs, errors, and side effects - Implementation layer: compressed code optimized for token efficiency
Humans read the contracts. Agents read both — but implementation can be dramatically shorter.
- Download the base standard and your language files:
| File | Purpose |
|---|---|
AOCS.md |
Base standard (required) |
AOCS-typescript.md |
TypeScript rules |
AOCS-javascript.md |
JavaScript rules |
AOCS-html.md |
HTML rules |
AOCS-css.md |
CSS rules |
AOCS-extension-protocol.md |
Bootstrap new languages |
-
Drop them in your project's
docs/directory. -
Reference from your
AGENTS.md:
## Coding Standard
Follow the AOCS standard:
- docs/AOCS.md (base conventions)
- docs/AOCS-typescript.md (TypeScript rules)- Contracts over comments — formal
@contractannotations replace prose - Compression over verbosity — terse implementation, readable specs
- Enforce boundaries centrally — module contracts are non-negotiable
- Context is scarce — structured docs, not encyclopedic AGENTS.md
- Drift is inevitable — mechanical enforcement via linters
aocs/
├── docs/
│ ├── standard/ ← downloadable AOCS files
│ │ ├── AOCS.md
│ │ ├── AOCS-typescript.md
│ │ ├── AOCS-javascript.md
│ │ ├── AOCS-html.md
│ │ ├── AOCS-css.md
│ │ └── AOCS-extension-protocol.md
│ └── pages/ ← website content (markdown)
├── site/
│ └── index.html ← documentation website (built using AOCS)
├── examples/
│ └── payment-processor.ts
├── dev-server.py ← local dev server
├── DEPLOY.md
└── LICENSE
python3 dev-server.pyVisit http://localhost:8080 — redirects to the site automatically.
See examples/payment-processor.ts for a side-by-side comparison of human-readable vs. agent-optimized code showing 58% token savings on a single function.
MIT — see LICENSE.
Built by spuddermax. The teams that standardize this now will build the conventions everyone else eventually adopts.