1---
2name: software-architect
3description: Design scalable systems with sound trade-offs, clear boundaries, and maintainable patterns.
4metadata:
5 source: https://skillmd.com/skills/modbender/software-architect
6 clawdbot:
7 emoji: 🏗️
8 os:
9 - linux
10 - darwin
11 - win32
12---
13
14# Software Architecture Rules
15
16## Design Principles
17- Simple until proven insufficient — complexity is a cost, not a feature
18- Separate what changes from what stays stable — boundaries at change boundaries
19- Design for the next 10x, not 100x — over-engineering wastes resources
20- Make decisions reversible when possible — defer irreversible ones until necessary
21- Constraints clarify design — embrace limitations, don't fight them early
22
23## System Boundaries
24- Define clear interfaces between components — contracts enable independent evolution
25- Boundaries where teams split — Conway's Law is real, design with it
26- Data ownership at boundaries — one source of truth per entity
27- Async communication for loose coupling — sync calls create distributed monoliths
28- Fail independently — one component's failure shouldn't cascade
29
30## Trade-off Analysis
31- Every decision has costs — articulate what you're giving up
32- Consistency vs availability vs partition tolerance — pick two (CAP theorem)
33- Performance vs maintainability — optimize hot paths, keep the rest readable
34- Build vs buy — build differentiators, buy commodities
35- Document the "why not" for rejected alternatives — future you needs context
36
37## Scalability
38- Stateless services scale horizontally — state makes scaling hard
39- Cache aggressively, invalidate carefully — caching solves and creates problems
40- Database is usually the bottleneck — read replicas, sharding, or denormalization
41- Queue work that can be async — users don't need to wait for everything
42- Scale for expected load, prepare for 3x spikes — headroom prevents outages
43
44## Data Architecture
45- Schema design constrains everything — get it right early, migrations are expensive
46- Normalize for writes, denormalize for reads — optimize for access patterns
47- Event sourcing when audit trail matters — reconstruct state from events
48- CQRS when read/write patterns differ significantly — separate models for each
49- Data gravity is real — processing moves to data, not vice versa
50
51## Reliability
52- Design for failure — everything fails eventually, handle it gracefully
53- Timeouts on all external calls — hung connections cascade into outages
54- Circuit breakers prevent cascade failures — fail fast, recover gradually
55- Idempotency for retries — duplicate messages shouldn't corrupt state
56- Graceful degradation over total failure — partial functionality beats error pages
57
58## Security
59- Defense in depth — multiple layers, no single point of failure
60- Least privilege — minimal permissions for each component
61- Encrypt in transit and at rest — assume networks and disks are hostile
62- Validate at boundaries — don't trust input from outside your system
63- Secrets management from day one — retrofitting is painful
64
65## Evolution
66- Design for replacement, not immortality — components will be rewritten
67- Incremental migration over big bang — strangler fig pattern works
68- Backwards compatibility for APIs — breaking changes break trust
69- Feature flags decouple deploy from release — ship dark, enable gradually
70- Monitor before, during, and after changes — data beats intuition
71
72## Documentation
73- Document decisions, not just structures — ADRs capture reasoning
74- Diagrams at multiple zoom levels — C4 model: context, containers, components
75- Keep docs near code — separate wikis go stale
76- Update docs when architecture changes — wrong docs are worse than none
77- Document operational aspects — runbooks, SLOs, failure modes
78
79## Communication
80- Translate technical decisions to business impact — stakeholders need context
81- Present options with trade-offs — don't just recommend, explain
82- Listen to operators — they know what breaks
83- Involve security early — bolt-on security is weak security
84- Decisions need buy-in — imposed architecture breeds resentment