system-design-primer-skill 1.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +106 -60
  2. package/SKILL.md +417 -93
  3. package/VERSION +1 -1
  4. package/package.json +44 -3
  5. package/references/10-workflows-and-checklists.md +1 -1
  6. package/references/13-architecture-intelligence.md +91 -0
  7. package/references/14-api-and-data-contracts.md +80 -0
  8. package/references/15-failure-analysis.md +84 -0
  9. package/references/16-multi-agent-architecture.md +76 -0
  10. package/references/17-agent-harness-and-runtime.md +87 -0
  11. package/references/18-mcp-architecture.md +67 -0
  12. package/references/19-agent-security-and-permissions.md +74 -0
  13. package/references/20-agent-state-and-memory.md +72 -0
  14. package/references/21-agent-evaluation-and-observability.md +90 -0
  15. package/references/22-kubernetes-and-container-platforms.md +29 -0
  16. package/references/23-service-mesh-and-traffic-management.md +21 -0
  17. package/references/24-multi-region-and-disaster-recovery.md +24 -0
  18. package/references/25-platform-engineering-and-developer-experience.md +26 -0
  19. package/references/26-finops-and-cloud-cost.md +29 -0
  20. package/references/27-production-observability-and-slo.md +29 -0
  21. package/references/28-event-streaming-and-kafka-pulsar.md +27 -0
  22. package/references/29-event-sourcing-and-cqrs.md +23 -0
  23. package/references/30-change-data-capture-and-debezium.md +27 -0
  24. package/references/31-data-lakehouse-and-stream-batch.md +24 -0
  25. package/references/32-workflow-orchestration-and-temporal.md +24 -0
  26. package/references/33-schema-registry-and-event-governance.md +22 -0
  27. package/references/34-postgresql-internals-and-performance.md +43 -0
  28. package/references/35-mysql-innodb-and-performance.md +27 -0
  29. package/references/36-sharding-and-distributed-sql.md +22 -0
  30. package/references/37-consensus-and-distributed-transactions.md +25 -0
  31. package/references/38-search-architecture-elasticsearch-opensearch.md +24 -0
  32. package/references/39-vector-databases-and-hybrid-retrieval.md +31 -0
  33. package/references/40-zero-downtime-database-migrations.md +27 -0
  34. package/references/41-api-gateway-and-edge-architecture.md +23 -0
  35. package/references/42-rest-api-design-and-lifecycle.md +23 -0
  36. package/references/43-graphql-architecture-and-governance.md +16 -0
  37. package/references/44-grpc-and-service-contracts.md +16 -0
  38. package/references/45-websocket-sse-and-realtime-systems.md +16 -0
  39. package/references/46-realtime-collaboration-ot-crdt.md +16 -0
  40. package/references/47-api-security-rate-limiting-and-abuse.md +16 -0
  41. package/references/48-oauth-oidc-and-passkeys.md +20 -0
  42. package/references/49-iam-rbac-abac-rebac.md +16 -0
  43. package/references/50-zero-trust-and-workload-identity.md +16 -0
  44. package/references/51-secrets-kms-pki-and-key-management.md +16 -0
  45. package/references/52-supply-chain-security-sbom-slsa.md +16 -0
  46. package/references/53-threat-modeling-stride-and-attack-trees.md +16 -0
  47. package/references/54-privacy-engineering-and-data-governance.md +16 -0
  48. package/references/55-opentelemetry-and-instrumentation.md +50 -0
  49. package/references/56-distributed-tracing-and-context-propagation.md +43 -0
  50. package/references/57-continuous-profiling-and-performance-diagnostics.md +45 -0
  51. package/references/58-load-stress-soak-testing-and-workload-modeling.md +44 -0
  52. package/references/59-capacity-planning-and-performance-modeling.md +34 -0
  53. package/references/60-chaos-engineering-and-resilience-experiments.md +41 -0
  54. package/references/61-incident-management-and-postmortems.md +34 -0
  55. package/references/62-dns-and-service-discovery.md +35 -0
  56. package/references/63-load-balancing-and-global-traffic-management.md +31 -0
  57. package/references/64-cdn-and-edge-caching.md +34 -0
  58. package/references/65-cloud-networking-and-connectivity.md +34 -0
  59. package/references/66-edge-computing-architecture.md +33 -0
  60. package/references/67-storage-infrastructure-and-storage-systems.md +30 -0
  61. package/references/68-tcp-quic-and-network-performance.md +27 -0
  62. package/references/69-task-routing-and-evidence.md +58 -0
  63. package/scripts/install.ps1 +10 -1
  64. package/scripts/install.sh +13 -6
  65. package/scripts/validate.py +133 -0
  66. package/templates/agent-evaluation-plan-template.md +57 -0
  67. package/templates/agent-security-review-template.md +46 -0
  68. package/templates/agent-system-design-template.md +74 -0
  69. package/templates/api-architecture-design-template.md +33 -0
  70. package/templates/api-security-and-rate-limit-review-template.md +29 -0
  71. package/templates/architecture-decision-matrix-template.md +48 -0
  72. package/templates/architecture-review-scorecard-template.md +36 -0
  73. package/templates/cdc-data-pipeline-template.md +41 -0
  74. package/templates/cdn-and-edge-strategy-template.md +36 -0
  75. package/templates/chaos-experiment-template.md +39 -0
  76. package/templates/cloud-cost-model-template.md +37 -0
  77. package/templates/database-architecture-review-template.md +33 -0
  78. package/templates/edge-computing-readiness-template.md +36 -0
  79. package/templates/event-sourcing-cqrs-template.md +41 -0
  80. package/templates/event-streaming-design-template.md +47 -0
  81. package/templates/failure-analysis-template.md +36 -0
  82. package/templates/identity-and-access-architecture-template.md +29 -0
  83. package/templates/incident-postmortem-template.md +39 -0
  84. package/templates/multi-region-disaster-recovery-template.md +43 -0
  85. package/templates/network-architecture-design-template.md +38 -0
  86. package/templates/observability-architecture-template.md +52 -0
  87. package/templates/performance-test-plan-template.md +52 -0
  88. package/templates/privacy-data-governance-template.md +24 -0
  89. package/templates/production-readiness-checklist-template.md +52 -0
  90. package/templates/realtime-system-design-template.md +28 -0
  91. package/templates/security-threat-model-template.md +26 -0
  92. package/templates/sharding-distributed-sql-design-template.md +34 -0
  93. package/templates/storage-architecture-design-template.md +35 -0
  94. package/templates/supply-chain-security-review-template.md +20 -0
  95. package/templates/zero-downtime-database-migration-template.md +32 -0
@@ -0,0 +1,36 @@
1
+ # Edge Computing Readiness Review
2
+
3
+ ## 1. Business justification
4
+ - Latency, locality, bandwidth, or offline requirement:
5
+ - Why regional cloud or client-side execution is insufficient:
6
+ - Measurable success criteria:
7
+
8
+ ## 2. Placement and authority
9
+ | Capability/data | Device/site/metro/region/cloud | Authoritative owner | Offline behavior |
10
+ |---|---|---|---|
11
+ | | | | |
12
+
13
+ ## 3. Fleet lifecycle
14
+ - Enrollment and device identity:
15
+ - Secure boot/attestation:
16
+ - Artifact signing and staged rollout:
17
+ - Configuration, rollback, decommissioning:
18
+ - Hardware replacement and field support:
19
+
20
+ ## 4. Data synchronization
21
+ - Local durability and queue bounds:
22
+ - Replication direction and conflict policy:
23
+ - Retry, deduplication, replay, and reconciliation:
24
+ - Deletion and retention propagation:
25
+
26
+ ## 5. Security and resilience
27
+ - Secrets and credential rotation during disconnection:
28
+ - Local privilege and physical compromise:
29
+ - Encrypted storage and tamper-aware audit:
30
+ - Degraded mode and recovery:
31
+
32
+ ## 6. Operations and economics
33
+ - Fleet health, version skew, sync lag, last-seen:
34
+ - Telemetry buffering and replay controls:
35
+ - Hardware, connectivity, energy, support, and lifecycle cost:
36
+ - Pilot scope, rollback, and exit criteria:
@@ -0,0 +1,41 @@
1
+ # Event Sourcing and CQRS Design
2
+
3
+ ## Domain boundaries
4
+ - Aggregate and invariant boundaries:
5
+ - Commands and authorization:
6
+ - Domain events and ownership:
7
+ - Source of truth:
8
+ - Why event sourcing is justified over conventional transactional storage:
9
+
10
+ ## Event model
11
+ | Event type | Aggregate | Version | Required fields | PII / retention |
12
+ |---|---|---|---|---|
13
+ | | | | | |
14
+
15
+ - Event identity and sequence:
16
+ - Expected-version concurrency strategy:
17
+ - Command idempotency and deduplication:
18
+ - Correction / compensation semantics:
19
+
20
+ ## Projections and read models
21
+ | Projection | Consumers | Ordering | Checkpoint | Freshness SLO | Rebuild procedure |
22
+ |---|---|---|---|---|---|
23
+ | | | | | | |
24
+
25
+ - Read-your-writes behavior:
26
+ - Projection generation and atomic cutover:
27
+ - Replay and backfill limits:
28
+
29
+ ## Evolution and operations
30
+ - Schema compatibility and upcasters:
31
+ - Snapshot policy and replay verification:
32
+ - PII minimization, deletion, legal hold:
33
+ - Event-store backup and restore:
34
+ - Projection lag, replay storms, alerting:
35
+ - Recovery and reconciliation tests:
36
+
37
+ ## Decision and risks
38
+ - Alternatives and TCO:
39
+ - Accepted consistency trade-offs:
40
+ - Migration / exit strategy:
41
+ - Risks, owners, and review date:
@@ -0,0 +1,47 @@
1
+ # Event Streaming Design
2
+
3
+ ## Use case and requirements
4
+ - Business capability and event consumers:
5
+ - Throughput (average / peak) and payload size:
6
+ - Latency and freshness objectives:
7
+ - Retention and replay requirements:
8
+ - Ordering and consistency requirements:
9
+ - Availability and recovery objectives:
10
+
11
+ ## Platform decision
12
+ - Candidates considered:
13
+ - Selected broker / managed service:
14
+ - Why a queue, database outbox, or simpler alternative is insufficient:
15
+ - Operational owner and exit strategy:
16
+
17
+ ## Topic and event contract
18
+ | Topic | Owner | Key / partition strategy | Schema | Retention | Consumers |
19
+ |---|---|---|---|---|---|
20
+ | | | | | | |
21
+
22
+ - Event ID, type, version, timestamps, correlation/causation:
23
+ - PII classification and access policy:
24
+ - Schema compatibility mode:
25
+
26
+ ## Delivery semantics
27
+ - Producer acknowledgement and idempotency:
28
+ - Replication / durability settings:
29
+ - Ordering scope:
30
+ - Consumer offset / checkpoint strategy:
31
+ - Duplicate and idempotency handling:
32
+ - Retry, DLQ, replay and poison-event workflow:
33
+
34
+ ## Capacity and operations
35
+ - Partitions, replication, retention storage:
36
+ - Network and consumer fan-out:
37
+ - Lag-age and broker SLOs:
38
+ - Quotas, hot-key and skew mitigation:
39
+ - Upgrade, backup, restore and disaster recovery:
40
+
41
+ ## Failure tests and acceptance
42
+ - Broker / zone loss:
43
+ - Consumer crash and rebalance:
44
+ - Source or destination outage:
45
+ - Schema incompatibility:
46
+ - Replay and catch-up:
47
+ - Acceptance criteria and owners:
@@ -0,0 +1,36 @@
1
+ # Failure Analysis: <system / critical journey>
2
+
3
+ ## Scope and objectives
4
+ - Critical journey / invariant:
5
+ - Availability target:
6
+ - RTO:
7
+ - RPO:
8
+ - Owners / escalation:
9
+
10
+ ## Dependency and failure-mode register
11
+ | Component | Failure mode / trigger | Detection | Blast radius | User impact | Containment / degradation | Recovery / reconciliation | Validation |
12
+ |---|---|---|---|---|---|---|---|
13
+ | | | | | | | | |
14
+
15
+ ## Propagation analysis
16
+ - Shared dependencies / common-mode risks:
17
+ - Retry and fan-out amplification:
18
+ - Pool, queue, and resource exhaustion:
19
+ - Tenant / region isolation:
20
+
21
+ ## Degraded behavior
22
+ - Operations that may continue:
23
+ - Operations that must fail closed:
24
+ - Staleness / data-loss tolerance:
25
+ - User-visible status and communication:
26
+
27
+ ## Recovery plan
28
+ - Failover authority / split-brain prevention:
29
+ - Restore / rollback / forward fix:
30
+ - Backlog drain and reconciliation:
31
+ - Recovery verification and owner:
32
+
33
+ ## Failure-test plan
34
+ | Scenario | Expected behavior | Safety boundary / stop condition | Evidence of success |
35
+ |---|---|---|---|
36
+ | | | | |
@@ -0,0 +1,29 @@
1
+ # Identity and Access Architecture
2
+
3
+ ## Context and trust boundaries
4
+ - User, workforce, service, and machine principals:
5
+ - Tenants, resources, actions, and data classes:
6
+ - Identity providers and trust domains:
7
+ - Authentication and session requirements:
8
+
9
+ ## Authentication
10
+ - OAuth/OIDC flows and client types:
11
+ - Token issuer, audience, lifetime, rotation, revocation:
12
+ - Passkey/WebAuthn and account recovery:
13
+ - MFA and step-up policy:
14
+
15
+ ## Authorization
16
+ - RBAC / ABAC / ReBAC model and rationale:
17
+ - Default-deny, precedence, delegation:
18
+ - Object/function authorization enforcement:
19
+ - Policy distribution, caching, invalidation, failure mode:
20
+
21
+ ## Workload identity
22
+ - Identity issuance and federation:
23
+ - mTLS, trust bundles, rotation, revocation:
24
+ - Service permissions and egress controls:
25
+
26
+ ## Operations and verification
27
+ - Joiner/mover/leaver and privileged access:
28
+ - Audit, access reviews, break-glass:
29
+ - Abuse cases, negative tests, owners, SLOs:
@@ -0,0 +1,39 @@
1
+ # Incident Postmortem
2
+
3
+ ## 1. Summary
4
+ - Incident ID/severity:
5
+ - Start, detection, mitigation, and recovery times:
6
+ - Services/journeys/regions affected:
7
+ - Customer and business impact:
8
+
9
+ ## 2. Timeline
10
+ | Time (timezone) | Event/decision | Evidence/source |
11
+ |---|---|---|
12
+ | | | |
13
+
14
+ ## 3. Detection and response
15
+ - Detection source and alert quality:
16
+ - Roles, escalation, and communications:
17
+ - Mitigation actions and rollback:
18
+ - Recovery verification and data reconciliation:
19
+
20
+ ## 4. Technical analysis
21
+ - Trigger:
22
+ - Contributing conditions:
23
+ - Dependency/failure propagation:
24
+ - Why safeguards did or did not work:
25
+ - Data integrity and security implications:
26
+
27
+ ## 5. What went well / what was difficult
28
+ - Went well:
29
+ - Difficulties and unknowns:
30
+
31
+ ## 6. Corrective actions
32
+ | Action | Prevention/detection/containment/recovery | Priority | Owner | Due date | Verification |
33
+ |---|---|---|---|---|---|
34
+ | | | | | | |
35
+
36
+ ## 7. Learning and follow-up
37
+ - Cross-team/systemic lessons:
38
+ - Runbooks/alerts/tests/architecture to update:
39
+ - Review date and effectiveness criteria:
@@ -0,0 +1,43 @@
1
+ # Multi-Region and Disaster Recovery Plan
2
+
3
+ ## Business objectives
4
+ - Critical journeys:
5
+ - Business impact and maximum tolerable outage:
6
+ - RTO by journey:
7
+ - RPO by data domain:
8
+ - Residency / sovereignty constraints:
9
+
10
+ ## Failure domains and topology
11
+ - Primary and recovery regions:
12
+ - Topology: backup/restore / pilot light / warm standby / active-passive / active-active
13
+ - Shared dependencies and correlated failure risks:
14
+ - Traffic steering and DNS dependencies:
15
+
16
+ ## Data recovery
17
+ | Data domain | Source of truth | Replication mode | Lag objective | Conflict policy | Restore validation |
18
+ |---|---|---|---|---|---|
19
+ | | | | | | |
20
+
21
+ - Backup isolation, retention, and immutability:
22
+ - Encryption keys and KMS recovery:
23
+ - Fencing / split-brain prevention:
24
+
25
+ ## Failover runbook
26
+ 1. Detection and impact confirmation:
27
+ 2. Decision authority and communications:
28
+ 3. Fence or isolate the failed primary:
29
+ 4. Promote data and validate consistency:
30
+ 5. Enable writers, consumers, and scheduled jobs:
31
+ 6. Shift traffic and validate critical journeys:
32
+ 7. Monitor error budget, lag, and reconciliation:
33
+
34
+ ## Failback
35
+ - Reconciliation strategy:
36
+ - Replication re-establishment:
37
+ - Safety gates and traffic switch:
38
+ - Rollback conditions:
39
+
40
+ ## Exercise evidence
41
+ - Last game day / restore test:
42
+ - Measured RTO and RPO:
43
+ - Gaps, owners, remediation dates:
@@ -0,0 +1,38 @@
1
+ # Network Architecture Design
2
+
3
+ ## 1. Scope and requirements
4
+ - Workloads, users, regions, environments:
5
+ - Critical journeys and latency objectives:
6
+ - Availability, throughput, bandwidth, and recovery targets:
7
+ - Compliance, data residency, and trust constraints:
8
+
9
+ ## 2. Topology and addressing
10
+ - Accounts/projects, VPCs/VNets, zones, subnets:
11
+ - CIDR allocation and IPv6 strategy:
12
+ - Trust zones and segmentation:
13
+ - Routing, transit, peering, NAT, and gateways:
14
+ - DNS zones, resolvers, and private endpoints:
15
+
16
+ ## 3. Traffic flows
17
+ | Source | Destination | Protocol/port | Path | Identity/policy | Expected volume |
18
+ |---|---|---|---|---|---|
19
+ | | | | | | |
20
+
21
+ ## 4. Connectivity and resilience
22
+ - VPN/private connectivity options:
23
+ - Redundant paths and failure domains:
24
+ - Route convergence and failover:
25
+ - MTU, NAT ports, connection tracking, throughput limits:
26
+ - Egress controls and inspection:
27
+
28
+ ## 5. Security and operations
29
+ - Firewall/network policy ownership:
30
+ - Workload identity and encryption:
31
+ - Flow logs, telemetry, and alerting:
32
+ - Change control, drift detection, and rollback:
33
+ - Cost allocation and data transfer:
34
+
35
+ ## 6. Decisions and validation
36
+ - Alternatives and trade-offs:
37
+ - Failure-injection and reachability tests:
38
+ - Acceptance criteria and owners:
@@ -0,0 +1,52 @@
1
+ # Observability Architecture Design
2
+
3
+ ## 1. Scope and critical journeys
4
+ - System/services:
5
+ - Critical user journeys:
6
+ - Environments/regions/tenants:
7
+ - Owners and operational consumers:
8
+
9
+ ## 2. Objectives and SLOs
10
+ | Journey | SLIs | SLO target | Window | Error budget policy |
11
+ |---|---|---|---|---|
12
+ | | | | | |
13
+
14
+ ## 3. Telemetry coverage
15
+ | Signal | Instrumentation/source | Critical coverage | Owner | Known gaps |
16
+ |---|---|---|---|---|
17
+ | Metrics | | | | |
18
+ | Logs | | | | |
19
+ | Traces | | | | |
20
+ | Profiles | | | | |
21
+
22
+ ## 4. Collection and processing
23
+ - SDK/agent/auto-instrumentation:
24
+ - Collector topology and deployment model:
25
+ - OTLP endpoints, authN/authZ, TLS:
26
+ - Batching, queues, retries, memory limits:
27
+ - Routing, filtering, enrichment, redaction:
28
+ - Backend destinations and failure behavior:
29
+
30
+ ## 5. Context and correlation
31
+ - Trace propagation across HTTP/RPC/messaging/workflows:
32
+ - Resource attributes and semantic conventions:
33
+ - Log correlation:
34
+ - Baggage allowlist and trust boundaries:
35
+
36
+ ## 6. Sampling, privacy, retention, and cost
37
+ - Head/tail sampling policies:
38
+ - PII/secrets minimization and redaction:
39
+ - Access controls and tenant isolation:
40
+ - Retention tiers and residency:
41
+ - Volume/cost budget and alert thresholds:
42
+
43
+ ## 7. Reliability and validation
44
+ - Telemetry pipeline SLO:
45
+ - Drop/export failure monitoring:
46
+ - Synthetic validation and instrumentation tests:
47
+ - Collector/backend outage behavior:
48
+
49
+ ## 8. Decisions and rollout
50
+ - Alternatives and trade-offs:
51
+ - Migration and rollback:
52
+ - Owners, milestones, acceptance criteria:
@@ -0,0 +1,52 @@
1
+ # Performance Test Plan
2
+
3
+ ## 1. Objective and acceptance criteria
4
+ - Hypothesis:
5
+ - User journey/service:
6
+ - Target SLOs and pass/fail thresholds:
7
+ - Test environment and owner:
8
+
9
+ ## 2. Workload model
10
+ | Dimension | Production evidence or assumption | Test value |
11
+ |---|---|---|
12
+ | Arrival rate and burst profile | | |
13
+ | Open/closed workload | | |
14
+ | Request mix/read-write ratio | | |
15
+ | Concurrency and think time | | |
16
+ | Payload and data volume | | |
17
+ | Tenant/key skew | | |
18
+ | Cache state/background jobs | | |
19
+
20
+ ## 3. Test matrix
21
+ | Test | Load/duration | Faults/dependencies | Purpose |
22
+ |---|---|---|---|
23
+ | Baseline | | | |
24
+ | Load | | | |
25
+ | Stress | | | |
26
+ | Spike | | | |
27
+ | Soak | | | |
28
+ | Recovery | | | |
29
+
30
+ ## 4. Safety controls
31
+ - Authorization/change window:
32
+ - RPS/concurrency/duration/spend caps:
33
+ - Abort thresholds and kill switch:
34
+ - On-call contacts and downstream coordination:
35
+ - Data isolation and cleanup:
36
+
37
+ ## 5. Instrumentation and execution
38
+ - Generator placement and capacity validation:
39
+ - Warm-up and steady-state windows:
40
+ - Coordinated omission handling:
41
+ - Run IDs, build/configuration, dataset:
42
+ - Metrics: throughput, P50/P95/P99, errors, saturation, queue depth/age:
43
+
44
+ ## 6. Results and analysis
45
+ | Run | Throughput | P95/P99 | Error rate | Saturation | SLO result |
46
+ |---|---:|---:|---:|---:|---|
47
+ | | | | | | |
48
+
49
+ - Bottleneck and supporting evidence:
50
+ - Variance/confidence and limitations:
51
+ - Before/after comparison:
52
+ - Follow-up and retest criteria:
@@ -0,0 +1,24 @@
1
+ # Privacy and Data Governance Review
2
+
3
+ ## Data inventory
4
+ - Data subjects, categories, and sensitivity:
5
+ - Collection purpose and necessity:
6
+ - Systems, processors, regions, and recipients:
7
+ - Derived data, telemetry, embeddings, backups:
8
+
9
+ ## Lifecycle policy
10
+ - Retention and legal hold:
11
+ - Access, correction, export, deletion:
12
+ - Replica, cache, index, and backup propagation:
13
+ - Residency and cross-border controls:
14
+
15
+ ## Safeguards and accountability
16
+ - Minimization, encryption, pseudonymization:
17
+ - Access policy, audit, lineage:
18
+ - Data owner/steward and processor obligations:
19
+ - Legal/privacy review and policy exceptions:
20
+
21
+ ## Verification
22
+ - Data discovery and access tests:
23
+ - Retention/deletion propagation tests:
24
+ - Evidence, unresolved risks, owners:
@@ -0,0 +1,52 @@
1
+ # Production Readiness Review
2
+
3
+ ## Service and ownership
4
+ - Service / version:
5
+ - Business owner:
6
+ - Engineering owner / on-call:
7
+ - Critical user journeys:
8
+ - Dependencies and upstream/downstream owners:
9
+
10
+ ## Workload and capacity
11
+ - Expected and peak traffic:
12
+ - Capacity model and assumptions:
13
+ - Resource requests, limits, and scaling signals:
14
+ - Quotas, burst limits, and saturation thresholds:
15
+ - Load, stress, and soak test evidence:
16
+
17
+ ## Reliability and recovery
18
+ - Availability SLO / SLIs:
19
+ - Latency and correctness SLOs:
20
+ - Error-budget policy:
21
+ - Timeout, retry, idempotency, and backpressure behavior:
22
+ - Failure isolation and graceful degradation:
23
+ - Backup and restore evidence:
24
+ - RTO / RPO and last recovery exercise:
25
+ - Rollback and compatibility plan:
26
+
27
+ ## Security and compliance
28
+ - Authentication, authorization, and workload identity:
29
+ - Secrets, encryption, and key rotation:
30
+ - Network and egress boundaries:
31
+ - Vulnerability, image, dependency, and SBOM checks:
32
+ - Data classification, retention, residency, and audit:
33
+ - Threat model and unresolved risks:
34
+
35
+ ## Operations and observability
36
+ - Dashboards, alerts, runbooks, and escalation:
37
+ - Metrics/logs/traces coverage and redaction:
38
+ - Deployment strategy and abort criteria:
39
+ - Incident roles and communication:
40
+ - Telemetry pipeline failure behavior:
41
+
42
+ ## Cost and platform
43
+ - Cost forecast and unit economics:
44
+ - Budget owner and anomaly alerts:
45
+ - Platform dependencies and support model:
46
+ - Quotas, capacity reservations, and regional costs:
47
+
48
+ ## Decision
49
+ - Status: Ready / Ready with actions / Not ready
50
+ - Blocking issues, owners, and due dates:
51
+ - Accepted risks and approvers:
52
+ - Evidence links and review date:
@@ -0,0 +1,28 @@
1
+ # Real-Time System Design
2
+
3
+ ## Product semantics
4
+ - Interaction model and freshness target:
5
+ - One-way or bidirectional communication:
6
+ - Ordering scope and delivery guarantee:
7
+ - Offline/reconnect and replay requirements:
8
+
9
+ ## Architecture
10
+ - Transport (SSE / WebSocket / gRPC streaming):
11
+ - Connection and subscription ownership:
12
+ - Durable event log or pub/sub:
13
+ - Presence versus durable state:
14
+ - OT / CRDT / centralized sequencing rationale:
15
+
16
+ ## Capacity and controls
17
+ - Concurrent connections and churn:
18
+ - Messages/sec, fan-out, payload size:
19
+ - Per-connection queue and slow-consumer policy:
20
+ - Heartbeats, idle timeout, reconnect backoff:
21
+ - AuthZ, Origin, tenant isolation, quotas:
22
+
23
+ ## Recovery and testing
24
+ - Event IDs, cursors, deduplication, snapshots:
25
+ - Node/broker/region failure behavior:
26
+ - Convergence and randomized concurrency tests:
27
+ - Load, soak, reconnect-storm, and security tests:
28
+ - SLOs, dashboards, owners, rollback:
@@ -0,0 +1,26 @@
1
+ # Security Threat Model
2
+
3
+ ## System scope
4
+ - Business purpose and security objectives:
5
+ - Assets and data classifications:
6
+ - Actors, entry points, data flows:
7
+ - Trust boundaries and external dependencies:
8
+
9
+ ## Threat scenarios
10
+ For each scenario record:
11
+ - STRIDE category / attacker goal:
12
+ - Preconditions and attack path:
13
+ - Affected asset and business impact:
14
+ - Likelihood rationale and existing controls:
15
+ - Residual risk and confidence:
16
+
17
+ ## Mitigations
18
+ - Preventive controls:
19
+ - Detection and response:
20
+ - Recovery and containment:
21
+ - Owner, due date, verification test:
22
+
23
+ ## Review and acceptance
24
+ - Assumptions and out-of-scope items:
25
+ - Accepted risks, approver, expiry:
26
+ - Trigger for re-review:
@@ -0,0 +1,34 @@
1
+ # Sharding and Distributed SQL Design
2
+
3
+ ## Requirements and thresholds
4
+ - Workload and measured single-node bottleneck:
5
+ - Data size / growth / retention:
6
+ - Read/write and range-query patterns:
7
+ - Consistency and transaction requirements:
8
+ - Availability, latency, RPO/RTO:
9
+ - Trigger thresholds for sharding:
10
+
11
+ ## Partitioning strategy
12
+ - Shard key and rationale:
13
+ - Cardinality / skew / hot-key analysis:
14
+ - Routing and shard-map versioning:
15
+ - Cross-shard query and transaction policy:
16
+ - Unique IDs and constraints:
17
+
18
+ ## Lifecycle and operations
19
+ - Split / merge / rebalance procedure:
20
+ - Online migration and verification:
21
+ - Failover and fencing:
22
+ - Backup / restore per shard:
23
+ - Monitoring and capacity headroom:
24
+
25
+ ## Correctness and failure cases
26
+ - Concurrent writes and retries:
27
+ - Coordinator / node / network failures:
28
+ - Reconciliation and rollback:
29
+ - Consistency guarantees:
30
+
31
+ ## Decision record
32
+ - Baseline alternatives considered:
33
+ - Operational and TCO impact:
34
+ - Exit strategy and reevaluation triggers:
@@ -0,0 +1,35 @@
1
+ # Storage Architecture Design
2
+
3
+ ## 1. Workload characterization
4
+ | Dataset | Access pattern | Size/growth | IOPS/throughput | Latency target | Retention |
5
+ |---|---|---|---|---|---|
6
+ | | | | | | |
7
+
8
+ ## 2. Storage selection
9
+ - Block/file/object/local/distributed storage:
10
+ - Alternatives and why rejected:
11
+ - Consistency, atomicity, and multi-writer semantics:
12
+ - Performance and noisy-neighbor constraints:
13
+
14
+ ## 3. Data protection and recovery
15
+ - Replication and failure domains:
16
+ - Backup/versioning/immutability:
17
+ - Encryption and key ownership:
18
+ - RPO/RTO and restore validation:
19
+ - Deletion, retention, and legal hold:
20
+
21
+ ## 4. Capacity and performance model
22
+ - Capacity, growth, and headroom:
23
+ - IOPS, throughput, queue depth, and tail latency:
24
+ - Snapshot, replication, repair, and rebuild overhead:
25
+ - Benchmark method and representative data:
26
+
27
+ ## 5. Security and governance
28
+ - Identity, access policies, and tenant isolation:
29
+ - Public access and presigned URL controls:
30
+ - Audit, lifecycle, tiering, and secure deletion:
31
+
32
+ ## 6. Operations and economics
33
+ - SLOs, alerts, and ownership:
34
+ - Provisioned performance, requests, egress, retrieval, and backup cost:
35
+ - Migration, rollback, and acceptance criteria:
@@ -0,0 +1,20 @@
1
+ # Software Supply Chain Security Review
2
+
3
+ ## Build and dependency inventory
4
+ - Source repositories and protected branches:
5
+ - Dependencies, registries, lockfiles:
6
+ - Build runners, workflow permissions, secrets:
7
+ - Artifact stores and deployment destinations:
8
+
9
+ ## Integrity controls
10
+ - Dependency verification and update policy:
11
+ - SBOM format, generation, and retention:
12
+ - Build provenance and attestation verification:
13
+ - Artifact signing, immutable promotion:
14
+ - Builder isolation and signing-key custody:
15
+
16
+ ## Risk and response
17
+ - Vulnerability and license triage:
18
+ - Compromise detection and quarantine:
19
+ - Rebuild, revoke, rollback, disclosure:
20
+ - Exceptions, owners, remediation SLAs:
@@ -0,0 +1,32 @@
1
+ # Zero-Downtime Database Migration Plan
2
+
3
+ ## Change and compatibility
4
+ - Current schema / application versions:
5
+ - Target schema:
6
+ - Consumers and writers:
7
+ - Business invariants:
8
+ - Compatibility window:
9
+
10
+ ## Rollout stages
11
+ | Stage | Change | Owner | Validation gate | Rollback |
12
+ |---|---|---|---|---|
13
+ | Expand | | | | |
14
+ | Compatibility deploy | | | | |
15
+ | Backfill | | | | |
16
+ | Validate | | | | |
17
+ | Read/write cutover | | | | |
18
+ | Contract | | | | |
19
+
20
+ ## Backfill controls
21
+ - Key/range strategy:
22
+ - Batch size and concurrency:
23
+ - Checkpoint and idempotency:
24
+ - Rate limits and replication impact:
25
+ - Reconciliation query/checksum:
26
+
27
+ ## Operational safeguards
28
+ - Lock and DDL behavior:
29
+ - Disk/WAL/binlog headroom:
30
+ - Backup/PITR and restore test:
31
+ - Alerts and stop conditions:
32
+ - Irreversible steps and approval: