Architecture bets for AI-maintained production systems: TypeScript everywhere, monorepos, opinionated structure¶
Insight: Anton Öberg (Pit/Cockpit) describes eight architecture bets for systems that are deployed, monitored, maintained, and evolved over time with AI agents: (1) TypeScript everywhere — frontend, backend, tooling, infra-as-code — because one language is easier to manage and LLMs are remarkably good at it; (2) monorepos and modular monoliths per customer rather than microservices; (3) Postgres as the single data center per customer — no syncing, no eventual consistency; (4) heavily enforced opinionated structure across the entire stack; (5) ambitious end-to-end tests for real confidence; (6) bottom-up developer experience as foundation; (7) leveraging existing tools (Claude, Codex) rather than building custom AI; (8) dogfooding the same stack internally.
Detail: The architectural philosophy prioritizes maintainability over raw performance: horizontal scaling handles throughput, so the tradeoff of TypeScript-everywhere is acceptable for the consistency gains it provides to both humans and AI agents. The monorepo-per-customer approach with modular monoliths and single Postgres instances eliminates the complexity of service coordination, eventual consistency, and cross-service debugging — all areas where AI agents struggle. The emphasis on "enforced, opinionated structure" directly supports AI agent effectiveness: agents perform better in predictable, consistent codebases than in freeform ones. This complements Shrivu Shankar's "AI Can't Read Your Docs" patterns (design for workflows, leverage familiar conventions) from a production operations perspective rather than a development workflow perspective.
Sources
Related: typescript-better-for-ai-coding in external/claude-code.md — CORROBORATES; ai-friendly-software-design-patterns in external/claude-code.md — COMPLEMENTS; zero-human-code-milestone in external/claude-code.md — COMPLEMENTS