# Architecture Completeness — AWS Well-Architected Pass

A coverage checklist for `/tas-sad`. After drafting the SAD, walk every pillar below and confirm the named SAD section actually reflects it. A pillar that does not apply must be written as **"N/A — {reason}"**, never left blank. Any uncovered concern becomes a row in **§14 Risks** (or a Known Gaps note) so it is decided, not silently dropped.

This is a **completeness gate**, not a redesign — it checks the architecture already drafted answers each question, surfacing holes before the SAD is approved.

## Pillars → SAD sections → coverage questions

### 1. Operational Excellence → §11 (Observability), §12 (CI/CD)
- Structured logging defined (format, levels, what gets logged)?
- **Logs and error payloads carry the originating module identity (`MOD-id`) + correlation/trace id**, so a runtime error traces straight back to its SAD §7 module / `architecture-map.yaml` entry?
- Distributed tracing / correlation-id propagation across containers?
- Metrics + alerting thresholds + SLO/SLI targets?
- Deploy & rollback strategy (blue-green / canary / rolling)? Runbook for top failures?
- Config management — env separation, feature flags, secrets injection?

### 2. Security → §10
- Threat model (attack surfaces, trust boundaries, top threats — STRIDE if useful)?
- AuthN/AuthZ mechanism, token lifecycle, privilege-escalation path?
- Encryption at-rest (algo + key mgmt) and in-transit (TLS version, cert strategy)?
- Secrets management + rotation (Vault / AWS SSM / KMS)?
- Data classification (PII / Sensitive / Internal / Public) + handling rules per class?
- Audit logging scope + retention? Compliance (GDPR / PCI-DSS / SOC2) if applicable?
- Input validation / output encoding stance; dependency & vulnerability scanning?

### 3. Reliability → §11 (Resilience + DR)
- Timeout, retry-with-backoff, circuit breaker, bulkhead, idempotency for mutating ops?
- Graceful degradation when a dependency is down?
- Backup & restore procedure; RTO / RPO targets?
- Failover / redundancy model (Active-Active / Active-Passive), health checks?
- Dead-letter / reconciliation for async + integration flows?

### 4. Performance Efficiency → §11 (Performance), §9.1 (API)
- Caching strategy (L1/L2/CDN, TTL)?
- Async / queue offload for heavy or slow work?
- Connection pooling, DB indexing, query optimization approach?
- Pagination convention; payload size limits?
- Scale model — stateless services, horizontal scaling, scale triggers?

### 5. Cost Optimization → §8 (Retention), §12 (Topology)
- Data retention / TTL / archival to cheaper tiers?
- Right-sizing + autoscaling policy (scale-to-zero where viable)?
- Usage quotas / throttling to cap runaway cost?

### 6. Sustainability → §12 (optional)
- Right-sizing, scheduled scale-down of non-prod, efficient resource use? (Mark N/A for small systems.)

## Output of the pass

Append a short coverage note (or update §14 Risks) — for each pillar: `Covered` | `N/A — reason` | `Gap → {action}`. A `Gap` either gets fixed in the SAD now or is logged as a Risk with an owner. Do not approve a SAD with an undecided gap.
