Skip to content
architecture-discipline logo

Architecture Discipline

architecture-discipline

Use when designing/modifying system architecture or evaluating technology choices. Enforces 7-section TodoWrite with 22+ items. Triggers: "design architecture", "system design", "architectural decision", "should we use [tech]", "compare [A] vs [B]", "add new service", "microservices", "database c...

SKILL.md

Full skill instructions

Architecture Discipline

When to Use

Use when decisions affect:

  • Data models or schema changes
  • Service boundaries or new services
  • Deployment topology or infrastructure
  • Scale characteristics (10x growth implications)
  • Technology stack choices
  • API contracts or external integrations

Skip for:

  • Parameter tweaks or configuration changes
  • UI/​styling changes
  • Localization or copy changes
  • Bug fixes within existing architecture
  • Adding fields to existing models (unless schema migration)

Threshold: If the decision could cause a 3+ month re-architecture project if wrong, use this skill.

CRITICAL: This Is Reasoning Discipline, Not a Checklist

The 7 sections are a reasoning sequence, not boxes to check:

  • Alternatives BEFORE choosing
  • Scale requirements BEFORE design
  • Failure modes built in, not bolted on

🚨 If you wrote architecture without starting with all 7 sections: DELETE and restart. Retrofitting analysis is rationalization, not evaluation.


MANDATORY FIRST STEP

CREATE TodoWrite with these 7 sections (22+ items total):

SectionMinimum Items
Scale Analysis4+
Architectural Options3+
Ripple Effect Analysis5+
Failure Modes3+
Observability3+
Documentation2+
Migration/​Compatibility2+

Do not design, propose solutions, or implement until TodoWrite is verified.


Verification Checkpoint

After creating TodoWrite, verify 3 random items pass this test:

Each item must have ALL THREE:

  • ✓ Concrete numbers/​thresholds ("100K users", "$500/​mo", "P95 < 500ms")
  • ✓ Specific tools/​technologies ("PostgreSQL", "Redis", "CloudWatch")
  • ✓ Measurable outcome ("handles 1M req/​sec", "costs $X at 10x")
❌ FAILS✅ PASSES
"Add monitoring""CloudWatch: websocket.connections.active, alert if >5% error rate via PagerDuty"
"Evaluate caching""Compare: Redis (1ms, $300/​mo) vs In-memory LRU (0.1ms, $0) vs No cache (100ms)"
"Analyze scale""Current: 100K DAU, 50 req/​sec. 10x: 1M users, 500 req/​sec. Bottleneck: PostgreSQL connection pool"

DO NOT PROCEED until 22+ items AND quality check passes.


Section Requirements

1. Scale Analysis (4+ items)

NEVER design for current scale only. Before proposing any solution:

  • Current scale: Users (DAU/​MAU), requests/​sec, data volume, read/​write ratio
  • 10x scale: What numbers at 10x? When expected?
  • Bottlenecks: What breaks at 10x? (DB connections, API limits, memory)
  • Mitigation: Specific solution for each bottleneck

2. Architectural Options (3+ items)

NEVER present single solution. Minimum 3 distinct options, each with:

  • Performance: Latency (P50/​P95/​P99), throughput, scale limit
  • Complexity: LOC estimate, services involved, operational burden
  • Cost: Infrastructure ($X/​mo current, $Y/​mo at 10x), development (engineer-weeks)
  • Trade-offs: Specific advantages (✅) and disadvantages (❌)

If stakeholder suggests solution: Add as Option A, evaluate with SAME rigor as alternatives.

3. Ripple Effect Analysis (5+ items)

Changes propagate across layers. Analyze ALL:

  • Data layer: Schema changes, migrations, indexes, query performance
  • Services: Which need updates? API contracts changed?
  • API: Breaking changes? Version bump? Backward compatibility?
  • Clients: Mobile updates? Web UI changes?
  • Operations: Deployment changes? New monitoring? Cost changes?

4. Failure Modes (3+ items)

For each mode:

  • Scenario: [Component] fails because [reason]
  • Detection: How we know (metrics drop, error rate spike)
  • Impact: What breaks (user features, data integrity)
  • Mitigation: Circuit breaker, fallback, redundancy

5. Observability (3+ items)

  • Metrics: Specific (latency P95, error rate %, throughput)
  • Alerts: Conditions (error rate > 5%, latency P95 > 500ms)
  • Dashboards: Key visualizations

6. Documentation (2+ items)

  • ADR: Chosen option, rejected alternatives, trade-offs, constraints
  • Diagram: New components, data flows, failure paths

7. Migration/​Compatibility (2+ items)

  • Backward compatibility: Old clients work? API versioning?
  • Migration path: Phased rollout, feature flags, rollback procedure

Red Flags - STOP When You Think:

ThoughtReality
"Analysis paralysis"This IS the analysis that prevents expensive mistakes
"We'll add scale/​alternatives/​failure modes later"Retrofitting costs 5-10x more
"CTO already decided"Still needs independent evaluation
"Being pragmatic not dogmatic"These requirements ARE pragmatic
"Just a simple feature"Simple becomes complex at scale
"We already know the solution"Compare 3 alternatives first
"Keep it simple"Simple for current scale = complex re-architecture at 10x
"I can add missing sections to existing work"DELETE and restart

Override Requirements

To skip ANY requirement, you MUST provide ALL 4:

  1. Specific retrofit date (not "later")
  2. Budget allocated (engineer-weeks)
  3. Risk acceptance signed by decision maker
  4. Interim mitigation plan
SkippedRiskCost
Scale AnalysisRe-architecture in 6-12 months3-6 month project, 5-10x cost
AlternativesOptimize wrong dimension2-4 month migration
Failure ModesProduction incidents$5-50K per incident
Ripple EffectsBroken clients, data issuesDeployment failures

Verification Before Complete

CategoryRequirements
Scale✓ Current + 10x projected ✓ Bottlenecks ✓ Mitigations
Trade-offs✓ 3+ options ✓ Performance/​complexity/​cost ✓ Rationale
Impact✓ All layers analyzed ✓ Breaking changes identified
Failure✓ Specific modes ✓ Detection ✓ Mitigation ✓ Rollback
Documentation✓ ADR ✓ Diagram updated

If any item missing, do not proceed to implementation.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View