ai-engineer-2030
CLAUDE.md0 starsChanged 34 days agoMITView on GitHub
This repository holds the code for the book AI Engineer 2030: The Architect's Field Guide. Each module backs one chapter, and its docstring names the chapter. The book prints listings straight from these files, so treat names as a public interface. - make install: create .venv, install with dev tools, enable the git hooks - make install-all: add the claude, mcp and api extras - make check: lint, types and tests, exactly what CI runs; run it before you say…
- Reads credentials
In this repository3 other files it gives its agents.
- add-moduleSkill
- explainSkill
- new-adrSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 62
Tests are offline and deterministic: Never call a network, sleep, read the real clock or use real keys in a test.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Engineer 2030: companion code
This repository holds the code for the book AI Engineer 2030: The Architect's Field Guide. Each module backs one chapter, and its docstring names the chapter. The book prints listings straight from these files, so treat names as a public interface.
Commands
make install: create.venv, install with dev tools, enable the git hooksmake install-all: add theclaude,mcpandapiextrasmake check: lint, types and tests, exactly what CI runs; run it before you say a change is donemake fmt: format and apply safe fixes.venv/bin/pytest tests/foundations -q -k idempotency: one area, one topic.venv/bin/aie doctor: check the local toolchain
Layout
src/ai_engineer/
foundations/ Vol I: values, clocks, retries, idempotency, SQL, logs
service/ Vol I: the FastAPI quote service
ml/ Vol II: NumPy from logistic regression to a transformer
llm/ Vol III: the Model protocol, prompts, structure, tools
rag/ Vol III: chunking, BM25, fusion and retrieval metrics
agents/ Vol III: loop, plans, workflows, memory, multi-agent
claude/ Vol III: the Claude adapter, catalog, routing and cost
evals/ Vol III: harness, metrics and model-graded checks
guardrails/ Vol III: redaction, provenance and the lethal trifecta
mcp_server/ Vol III: a read-only MCP server over SQLite
enterprise/ Vol IV: warehouse port, evidence and release gate,
reconciliation, the SQL guard and the AI Test Engineer
devops/ Vol IV: JUnit evidence, DORA keys, failure triage and
the Azure DevOps publisher
systems/ Vol V: capacity, clocks, quorums, the outbox, Kubernetes
checks, the AI gateway and architecture fitness tests
leadership/ Vol V: tools for staff work: decisions, strategy, teams,
flow, incidents and engineering economics
future/ Vol VI: AI-native delivery, coding-agent configuration,
autonomy limits, the software factory, multimodal,
simulation and human-AI teams
career/ Vol VI: tools for the engineer's own growth: a working
philosophy, the week, learning, portfolio and transitions
tests/ mirrors src: foundations/, ml/, agentic/, enterprise/,
devops/, systems/, leadership/, future/, career/, tooling/
configs/ models.toml: model ids and list prices, with a checked date
data/synthetic/ synthetic data only; examples write to data/local/
docs/adr/ architecture decision records
docs/book-listings.txt every name and line range the book printsRules that are easy to break
- The book quotes code by name. A listing refers to a module, a
top-level function or class, a
Class.method, or a block between# region nameand# endregion. Renaming, moving or deleting one breaks a printed page.docs/book-listings.txt, written by the book's build, lists them all with a hash of each printed line range, andtests/tooling/test_book_listings.pyfails when a change breaks one. If a change must, say which listing changes in the pull request. - Tests are offline and deterministic. Never call a network, sleep,
read the real clock or use real keys in a test. Inject instead: the
clockfixture (FakeClock), therngfixture (seeded with 2030),ScriptedModelfor models and SQLite intmp_pathfor storage. A real-time test must be tiny and say why it needs real time. tests/foundations/legacy_pricing.pyis frozen. It is the oracle for a characterization test. A hook refuses edits to it.- Optional dependencies stay optional. The core needs only NumPy.
fastapiis imported only byservice/, andanthropicandmcponly inside the functions that build a client or a server. Tests that need an extra callpytest.importorskip, and the main CI job runs without theclaudeandmcpextras to prove it. - No secrets, no client data.
.envis ignored and.env.examplelists the variables. Data in the repository is synthetic.
Style
- Python 3.11+, with
from __future__ import annotationsin every module that has code. - Values are
@dataclass(frozen=True, slots=True)and validate themselves in__post_init__. Boundaries areProtocols. - Money is
Decimal. Durations come from a monotonicClock; stored timestamps fromWallClock. - Ruff at 79 columns, and mypy
--strictoversrcand.claude/hooks. The code has no# type: ignore; fix the type instead. - Docstrings say what and why, in plain sentences. Comments explain decisions, not syntax.
- Errors are data: raise specific exceptions and return RFC 9457 problem documents from HTTP endpoints.
Commits and pull requests
Conventional Commits, with a header of at most 72 characters, such as
fix(retry): cap the jitter at the maximum delay. The commit-msg hook
checks this locally and CI checks every commit in a pull request. Keep
each pull request to one idea, with tests, and run make check first.
Where to look next
.claude/rules/holds rules forsrc/,tests/and security./add-modulewalks through adding code for a chapter./new-adr Titlerecords an architecture decision indocs/adr/./explain Namewalks a reader through a listing and its tests.- The
reviewerandtest-writersubagents in.claude/agents/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

