Skip to content

Architecture Guidelines

Best practices for designing software architectures, plus AI skills that apply them.

The repo is reference-first. If a good guideline already exists (an official platform guide, a standard, a well-known book or tutorial), we link to it and adopt it. We only write our own short rules where nothing suitable exists, where sources disagree, or where a choice has to be made. Every rule we write links to a source.

Every source and every rule has a score from 1 to 10, and lists are sorted by it, so the most important entries come first. The score bands are:

Score Sources Rules
9–10 Start here Strongly recommended
6–8 Recommended Recommended
1–5 Further reading Conditional

RANKING.md explains the criteria, and SOURCES.md lists every source in one place, ranked, with the date each was last verified.

Every rule also has a stable ID, such as SEC-3 or UNITY-STRUCT-2, so reviews, ADRs and pull requests can cite it. RULES.md lists all rules by ID. On the website, https://depuschm.github.io/architecture-guidelines/RULES/#SEC-3 is a permanent link to a rule, and older links to a rule on a page it has moved from still lead to it. Where a tool can check a rule automatically, the guideline file names it under How to enforce.

Structure

general/            Technology-independent guidelines (principles, styles, DDD, APIs, data, security, …)
specific/<platform> One folder per platform or service (games, web, data, messaging, mobile, infrastructure, automation)
specific/_template  Starting point for a new platform folder
skills/             AI skills (Agent Skills format) that apply these guidelines
checklists/         One checklist per area, for pull requests and design reviews (generated)
docs/decisions/     Architecture decision records for this repository
RANKING.md          How sources and rules are scored from 1 to 10
SOURCES.md          Every linked source, ranked (generated from sources.csv)
RULES.md            Every rule by ID (generated)
GLOSSARY.md         Abbreviations and their meanings
sources.csv         Score and last-verified date of every source
rules.csv           Registry of rule IDs, including retired ones (never reused)
.claude-plugin/     Makes this repo installable as a Claude Code plugin and marketplace
scripts/            Repository checks (citations, scores, IDs, source freshness) and tooling
zensical.toml       Website configuration, built by scripts/build_site.py

General guidelines

Topic What it covers
Principles Modularity, SOLID, simple design, technical debt, Conway's law
Architecture styles Monolith vs. microservices, hexagonal/clean, event-driven, CQRS, migration
Domain-driven design Ubiquitous language, bounded contexts, aggregates, context maps
Decisions (ADRs) Recording and governing architecture decisions
Documentation C4 model, arc42, docs-as-code, diagrams as code
Quality attributes Quality models, trade-offs, fitness functions, evaluation
API design Style guides, contracts, errors, idempotency, compatibility
Data Data ownership, consistency, sagas, outbox, schema evolution
Operations & reliability Twelve-factor, Well-Architected, SLOs, resilience, observability
Security Threat modelling, least privilege, secrets, supply chain
Authentication & sessions Identity providers, OAuth 2.0 and OpenID Connect, sessions, passwords, MFA, passkeys, recovery
Privacy & personal data Data inventory, minimisation, defaults and consent, retention, erasure, DPIAs, breaches (GDPR)
Testing & delivery Test strategy, architecture tests, contract tests, CD, DORA
Versioning & releases SemVer, immutable releases, release automation, changelogs, deprecation
Repositories & monorepos Monorepo or polyrepo, module boundaries, code ownership, branch protection
Localization Strings outside code, plurals, UTF-8, locale formats, time zones, layout for translation
Accessibility WCAG 2.2 AA everywhere, the European Accessibility Act and US law, design systems, testing with assistive technologies, no overlays
AI systems LLM and agent architectures, evals, LLM security
Reading list Books and complete tutorials

Specific guidelines

Area Platform Main adopted guide
Games Game development Game Programming Patterns and Fast-Paced Multiplayer
Games Unity Unity best practice guides and e-books
Games Godot Godot best practices
Games Unreal Engine Gameplay Framework and Epic C++ Coding Standard
Games GameMaker GameMaker Manual and Best Practices When Programming
Games Steam and PC games Steamworks Documentation and Steam Deck and Steam Machine Compatibility Review
Games Game servers and online services Agones documentation and Amazon GameLift Servers Hosting Guide
Games Web games Unity Manual: Web and Godot: Exporting for the Web
Games Graphics and GPU rendering Arm GPU Best Practices, Adreno best practices and WebGL best practices
Games Mobile games Apple App Review Guidelines and Google Play Developer Policy Center
Web and back end Web front end WCAG 2.2, OWASP XSS Prevention and Core Web Vitals
Web and back end React react.dev Learn
Web and back end Next.js Next.js Docs: App Router
Web and back end Vue Vue.js guide and Nuxt docs
Web and back end Svelte and SvelteKit Svelte docs and SvelteKit docs
Web and back end Angular Angular documentation, style guide and Security
Web and back end Astro Astro Docs
Web and back end TypeScript TypeScript Handbook and TSConfig Reference
Web and back end Node.js Don't Block the Event Loop and Security Best Practices
Web and back end Python Python Packaging User Guide and Django deployment checklist
Web and back end Go Go Style (Google) and Security Best Practices for Go Developers
Web and back end .NET / ASP.NET Core .NET Architecture Guides
Web and back end Java and Spring Boot Spring Boot reference and Spring Security reference
Web and back end PHP and Laravel Laravel documentation and Deployment
Web and back end GraphQL Learn GraphQL and OWASP GraphQL Cheat Sheet
Data PostgreSQL PostgreSQL documentation and Don't Do This
Data MongoDB MongoDB Database Manual, Data Modeling and Atlas Architecture Center
Data SQLite SQLite Documentation, Appropriate Uses For SQLite and How To Corrupt An SQLite Database File
Data Redis and caching Manage Redis and Azure caching guidance
Data Firebase Firebase security checklist and launch checklist
Data Supabase Supabase Production Checklist and Row Level Security
Messaging Apache Kafka Apache Kafka documentation
Messaging RabbitMQ RabbitMQ documentation and production checklist
Mobile Android Guide to app architecture
Mobile Flutter Flutter app architecture guide
Mobile iOS (Swift and SwiftUI) SwiftUI documentation and Swift concurrency
Mobile React Native and Expo React Native documentation and Expo documentation
Desktop Desktop apps (Electron and Tauri) Electron Security and Tauri Security
Infrastructure Docker Docker building best practices and OWASP Docker Security Cheat Sheet
Infrastructure Kubernetes Kubernetes configuration good practices
Infrastructure OpenTelemetry OpenTelemetry documentation
Infrastructure AWS AWS Well-Architected Framework
Infrastructure Microsoft Azure Azure Well-Architected Framework
Infrastructure Google Cloud Google Cloud Well-Architected Framework
Infrastructure Serverless and edge hosting Vercel production checklist and Cloudflare Workers best practices
Infrastructure Terraform Terraform style guide
Automation GitHub Actions Secure use reference
Automation GitLab CI/CD GitLab pipeline security

To add a platform, copy specific/_template and follow CONTRIBUTING.md.

Checklists

Every rule of an area in one list, grouped by level and sorted by score, with the tools that can check each rule automatically. Paste one into a pull request, design review or project kickoff:

General · Game development · Unity · Godot · Unreal · GameMaker · Mobile games · Steam and PC · Game servers · Web games · Graphics · Web · React · Next.js · Vue · Svelte · Angular · Astro · TypeScript · Node.js · Python · Go · .NET · Spring Boot · Laravel · GraphQL · PostgreSQL · MongoDB · SQLite · Redis · Firebase · Supabase · Kafka · RabbitMQ · Android · Flutter · iOS · React Native · Desktop · Docker · Kubernetes · OpenTelemetry · AWS · Azure · Google Cloud · Hosting · Terraform · GitHub Actions · GitLab CI/CD

AI skills

The skills/ folder uses the Agent Skills format (a folder with a SKILL.md), which Claude Code and other agent tools can load.

Skill Use it to
ask-guidelines Answer "what do our guidelines say about X?" with the relevant rules by ID, score and source
architecture-review Review a codebase, design or PR against these guidelines. Each finding cites the rule and its source
architecture-decision-record Write an ADR in MADR format, or follow the project's existing ADR format
c4-diagram Produce C4 context/container/component diagrams as code
enforce-guidelines Set up the checks named under How to enforce in a project's CI, commit hooks or editor, each labelled with the rule IDs it enforces
game-architecture Design or review the architecture of a game in Unity, Godot, Unreal Engine, GameMaker or a custom engine

The skills are tested with evals that compare runs with and without the plugin. In the latest full run, every case passed 3 of 3 runs with the plugin. The plugin raised the score by +1.00 on ADRs, +0.75 on guideline questions and +0.50 on Unity reviews, mainly through rule IDs and source links that plain Claude doesn't produce. The newest cases (Next.js and Godot reviews, and setting up checks in CI) have each passed a single run so far.

Maintainers also get two project skills: add-guideline adds guidelines the reference-first way, and reverify-sources re-checks stale or retired sources.

Install in Claude Code

The repo is a Claude Code plugin and its own marketplace:

claude plugin marketplace add depuschm/architecture-guidelines
claude plugin install architecture-guidelines@architecture-guidelines

The skills then run as /architecture-guidelines:architecture-review and so on. Claude also loads them on its own when a request matches.

The plugin has no fixed version, so every commit to main is a new release. To receive updates automatically, open /plugin, go to Marketplaces, select architecture-guidelines and choose Enable auto-update. Otherwise, update by hand with claude plugin update architecture-guidelines@architecture-guidelines. To try the plugin from a local clone without installing it, run claude --plugin-dir ./architecture-guidelines.

Use with other agents

Tools that read AGENTS.md or support Agent Skills can use the skills/ folders directly. The skills find the guideline files relative to their own location (../../general, ../../specific), so keep the repo layout intact.

Contributing

Read CONTRIBUTING.md. The short version:

  1. Reference first. Link to an existing guideline before writing a new one.
  2. Every rule has a source. Each list item in general/ and specific/ must contain a link. CI enforces this with scripts/check_citations.py.
  3. Every entry has a score. Score sources in sources.csv and rules inline, following RANKING.md. Then run python3 scripts/rank.py fix, which also gives new rules their ID, sorts the lists and updates SOURCES.md and RULES.md.
  4. Links must work and stay current. CI runs lychee and scripts/verify_sources.py on every push and once a week. The script also catches retired pages, and the job summary lists sources not verified in the last year.

Automation

What runs When Where
Citation, score and rule ID checks, and plugin validation Every push and pull request checks.yml
Workflow security audit with zizmor, so this repository follows its own GitHub Actions rules Every push and pull request checks.yml
Link check and retired-page detection Every push and pull request, and weekly checks.yml
Sources not verified for a year fail the weekly run, and a failed weekly run opens (or updates) an issue Weekly checks.yml
Website build in strict mode (broken links fail it), deployed to GitHub Pages Pull requests build it, pushes to main deploy it site.yml
Update pull requests for GitHub Actions and the site generator Weekly dependabot.yml
Skill evals against real models When started by hand (needs an ANTHROPIC_API_KEY secret) evals.yml

Issue templates cover suggesting a source, disputing a score, reporting an outdated source and requesting a platform. The decisions behind how this repository works are recorded in docs/decisions.

License