Architecture Guidelines¶
Best practices for designing software architectures, plus AI skills that apply them.
-
Principles · Architecture styles · Domain-driven design · Decisions · Documentation · Quality attributes · API design · Data · Operations and reliability · Security · Authentication and sessions · Privacy and personal data · Testing and delivery · Versioning and releases · Repositories and monorepos · Internationalization and localization · Accessibility · AI systems · Reading list
-
Game development · Unity · Godot · Unreal Engine · GameMaker · Graphics and GPU rendering · Steam and PC games · Game servers and online services · Web games · Mobile games
-
Web front end · React · Next.js · Vue · Svelte and SvelteKit · Angular · Astro · TypeScript · Node.js · Python · Go · .NET / ASP.NET Core · Java and Spring Boot · PHP and Laravel · GraphQL
-
PostgreSQL · MongoDB · SQLite · Redis and caching · Firebase · Supabase · Apache Kafka · RabbitMQ
-
Android · Flutter · iOS (Swift and SwiftUI) · React Native and Expo
-
-
Docker · Kubernetes · OpenTelemetry · AWS · Microsoft Azure · Google Cloud · Serverless and edge hosting · Terraform · GitHub Actions · GitLab CI/CD
-
Every rule of an area in one list, grouped by level and sorted by score, with the tools that can check each rule automatically.
-
ask-guidelines·architecture-review·architecture-decision-record·c4-diagram·enforce-guidelines·game-architecture
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¶
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:
- Reference first. Link to an existing guideline before writing a new one.
- Every rule has a source. Each list item in
general/andspecific/must contain a link. CI enforces this withscripts/check_citations.py. - Every entry has a score. Score sources in
sources.csvand rules inline, following RANKING.md. Then runpython3 scripts/rank.py fix, which also gives new rules their ID, sorts the lists and updates SOURCES.md and RULES.md. - Links must work and stay current. CI runs lychee and
scripts/verify_sources.pyon 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¶
- Guideline content and documentation (
general/,specific/and the Markdown files at the root) is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). - Code and AI skills (
scripts/,skills/,.claude/,.claude-plugin/,.github/and config files) are licensed under the MIT License. - The MADR template in
skills/architecture-decision-record/template.mdkeeps its original license, MIT OR CC0-1.0. - Linked third-party sources keep their own licenses. This repository links to them and summarises them. It doesn't copy them.