AI Architect Academy

Build-in-public · the build is the curriculum

Architecture notes

Real decisions from building this platform on Anthropic + AWS + Cloudflare. Each note is grounded in the repository's own commits, design docs, and code — the moat is that these are first-hand, not borrowed. Sourced and dated, like the guides.

The notes

The coach

Why the coach runs a bounded agentic loop

A real send → check stop_reason → run tool → repeat loop, capped by a turn and tool-call budget with escalation — the OWASP LLM06 lesson the course teaches, enforced in its own coach.

From src/lib/coach.ts, CoachSession.ts, DESIGN.md §4.

The data layer

Choosing D1 over Postgres for an all-Cloudflare build

An explicit, reversible call recorded in the design doc: D1 for the slice, swap to Postgres if multi-user scale arrives — with the lib boundary that keeps the swap cheap.

From DESIGN.md §1/§2/§8, PLAN.md §6, wrangler.jsonc.

The test

What the content↔bundle invariant test caught

34 modules seeded but unbundled rendered empty and passed manual QA. A filesystem-driven test turned the silent gap into a failing build.

From test/content.test.ts and commits b525922 / e817ce3 / 626d199.

Why this section exists
Anyone can write a guide about agents. Almost no one can show you the actual decisions, dead ends, and invariants from building a real AI platform end-to-end. That first-hand build log is the one asset a competitor can't copy — so it's where the authority comes from.

The notes are the evidence. The course is the path.

These decisions are the same judgement the Academy teaches: bounded agency, least-privilege tools, reversible architecture calls, and invariants that can't drift — across Anthropic, AWS, and Cloudflare.