Guide for Platform Architects to author and maintain the Constitution — the governance policy document for the entire platform.
Helps Platform Architects author and maintain the Constitution — the foundational governance document that defines platform-wide policies, enforcement rules, and non-negotiables.
The Constitution defines:
It is NOT: Style guide, best practices list, team-specific rules Platform-wide policies, enforcement rules in gates, source of truth for all specs
1. UX Rules — Accessibility, design system, mobile-first. Gate 4 enforces.
2. Security & PII Policy — Encryption, masking, auth, session TTL, cross-service rules. Gate 4 enforces.
3. Observability Standards — Log format, metrics, tracing, alerts. Gate 4 enforces.
4. Performance Baselines — p95 latency, throughput, caching. Gate 4 enforces.
5. Domain Governance — Service ownership, invariants, cross-domain communication. Gate 2 enforces.
6. Contract Versioning — Semver, dual-publish window, deprecation SLA. Gate 3 enforces.
| Gate | Enforces |
|---|---|
| Gate 1 (Context) | Constitution version declared in every spec |
| Gate 2 (Domain) | Data ownership per Constitution; no direct cross-service DB access |
| Gate 3 (Integration) | Contract versioning and dual-publish per Constitution |
| Gate 4 (NFR) | Observability, security, PII, performance per Constitution |
| Gate 5 (Ready) | No ambiguity; Constitution referenced for all policy decisions |
File location: .specify/memory/constitution.md
See resources/constitution-template.md for full template with examples per section.
Key steps:
Every spec must pin the Constitution version:
## Metadata
- Constitution Version: v3.0
And reference it per section:
Source: Constitution/Observability Standards v3.0
Logging: JSON structured logs (request_id, timestamp, level, service)
Metrics: cart.duration_ms (histogram), cart.count (counter)
Tracing: Span "AddItem" with tags: item_id, qty
Alerts: IF p95_latency > 200ms THEN alert
Constitution changes require:
.specify/memory/constitution.md→ resources/constitution-template.md — Full template with all sections, worked examples per section, gate enforcement rules, policy writing guidelines