スキル一覧に戻る
jagreehal

system-architecture

by jagreehal

0🍴 0📅 2026年1月15日
GitHubで見るManusで実行

SKILL.md


name: system-architecture description: "Design systems for change. Trade-off analysis, ADR documentation, pattern selection. Architecture decisions must have documented rationale." version: 1.0.0

System Architecture

Design systems for change. Every architecture decision answers: "How will this scale and evolve?"

Core Principle

There are no best practices—only trade-offs in context. The best architecture is the simplest one that meets current needs while enabling future growth.

Critical Rules

RuleEnforcement
Trade-offs over absolutesNo "best" - only "best for this context"
Simplicity that scalesEarn complexity, don't assume it
Decisions with rationaleADRs for significant choices
Boundaries and contractsEnable teams to move independently

Architecture Evaluation

When evaluating architecture, always:

  1. Understand context first

    • Business requirements
    • Team capabilities
    • Constraints (time, budget, skills)
  2. Identify 2-3 valid approaches

    • Never present only one option
  3. Analyze trade-offs explicitly

    • What do you gain?
    • What do you give up?
  4. Think long-term

    • What will be hard to change later?
  5. Document the decision

    • Use ADR format

Architecture Patterns

When to Use What

PatternWhenTrade-offs
MonolithSmall team, unclear domain boundaries, speed mattersSimple deployment, harder to scale teams
Modular MonolithGrowing team, clearer boundaries, want deployment simplicityStructure without operational complexity
MicroservicesLarge org, independent team deployment, clear bounded contextsTeam autonomy, operational complexity
ServerlessEvent-driven, variable load, minimal ops desireScaling built-in, cold start latency

WRONG - Follow the Trend

"We should use microservices because that's what Netflix does."

Problem: Following trends without understanding context.

CORRECT - Context-Driven Decision

Given:
- Team of 5 developers
- Single deployment target
- Unclear domain boundaries still evolving

Recommendation: Modular monolith

Rationale: Microservices would add operational complexity
(service mesh, distributed tracing, deployment coordination)
without the benefit of independent team scaling.

When to revisit: If team grows >15 or we identify clear
bounded contexts with different scaling requirements.

Trade-Off Analysis Framework

For every significant decision, document:

DimensionOption AOption B
Development speed
Operational complexity
Team independence
Consistency guarantees
Scaling characteristics
Cost (infra + people)

ADR Template

# ADR-XXX: [Decision Title]

**Status:** Proposed | Accepted | Deprecated | Superseded
**Date:** YYYY-MM-DD

## Context

[What issue are we facing? What constraints exist?]

## Decision

[What did we decide?]

## Consequences

### Positive
- [Benefit]

### Negative
- [Drawback]

## Alternatives Considered

### [Option Name]
**Why rejected:** [Reason]

Example ADR

# ADR-001: Use PostgreSQL for primary data store

**Status:** Accepted
**Date:** 2024-01-15

## Context

We need a primary data store for user data, orders, and inventory.
Requirements: ACID transactions, complex queries, team familiarity.

## Decision

Use PostgreSQL 15 as the primary data store.

## Consequences

### Positive
- ACID guarantees for financial data
- Team has 5+ years PostgreSQL experience
- Rich ecosystem (PostGIS, pg_trgm, etc.)
- Proven at our expected scale (100k users)

### Negative
- Vertical scaling limits (can address with read replicas)
- Schema migrations require coordination

## Alternatives Considered

### MongoDB
**Why rejected:** Team lacks experience, eventual consistency
problematic for order processing.

### DynamoDB
**Why rejected:** Complex queries (reporting) would require
additional infrastructure. Cost unpredictable with access patterns.

Database Selection

TypeUse WhenTrade-offs
Relational (Postgres)ACID needed, complex queriesScaling complexity
Document (MongoDB)Flexible schemas, embedded dataWeaker consistency
Key-Value (Redis)Caching, sessions, fast lookupsLimited queries
Graph (Neo4j)Relationship-heavy queriesSpecialized
Time-Series (InfluxDB)Metrics, events, IoTAppend-optimized

Scalability Patterns

Order of Consideration

  1. Vertical scaling - Bigger machine (simplest)
  2. Caching - CDN → Application → Database
  3. Read replicas - Separate read/write traffic
  4. Horizontal scaling - Multiple instances
  5. Sharding - Partition data (most complex)

Resilience Patterns

PatternPurpose
Retry with backoffHandle transient failures
Circuit breakerPrevent cascade failures
BulkheadIsolate failure domains
TimeoutBound waiting time
Graceful degradationPartial service over no service

API Design Principles

REST

PrincipleRequirement
Resource modelingNouns, not verbs
HTTP semanticsGET reads, POST creates, PUT replaces
VersioningURI (/v1/) or header
PaginationCursor-based for large sets
Error responsesProblem Details (RFC 7807)

Event-Driven

ConsiderationGuidance
Event schemaVersion events, use schema registry
OrderingPartition key for ordering guarantees
IdempotencyHandle duplicate delivery
Dead letterHandle poison messages

Distributed Systems Fundamentals

CAP Theorem

Choose two: Consistency, Availability, Partition Tolerance.

In practice: During network partition, choose consistency OR availability.

Consistency Models

ModelMeaningUse When
StrongAll reads see latest writeFinancial data
EventualAll reads eventually see latestSocial feeds, caches
CausalCause-effect ordering preservedCollaborative editing

Integration

SkillRelationship
design-principlesApply to architecture decisions
pattern-enforcementEnforce boundaries with tooling
documentation-standardsDocument architectural decisions

Anti-Patterns

Anti-PatternWhy It's Wrong
Architecture astronautingDesigning for problems you don't have
Premature optimizationOptimize without data
Trend following"Netflix does it" isn't a reason
Undocumented decisionsBecome mysterious legacy constraints
Over-engineeringComplexity without justification
Ignoring team capabilitiesArchitecture must match team

Decision Checklist

When making architecture decisions:

  • Did I understand the context first?
  • Did I identify multiple valid approaches?
  • Did I analyze trade-offs explicitly?
  • Did I consider what's hard to change later?
  • Did I document the rationale (ADR)?
  • Does this match team capabilities?
  • Is this the simplest solution that works?

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です