Database architecture skills, docs, and rules for high-demand multi-tenant commerce platforms (PostgreSQL source of truth, Neo4j as derived GraphRAG projection, transactional outbox, RLS-based tenant isolation). Includes live schema introspection workflow via Postgres MCP.
97
97%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
You are drafting an Architecture Decision Record because the user (or you) has proposed a deviation from constitutional defaults.
Trigger this skill on any of:
@modelcontextprotocol/server-postgres.specify/memory/constitution.md and identify which sections (§ N)
the deviation touches..specify/memory/architecture-decisions.md. Find the next ADR
number (max + 1, zero-padded to 4 digits).Supersedes: ADR-NNNN## Amendment YYYY-MM-DD section)Create the file at .specify/architecture-decisions/ADR-NNNN-<kebab-title>.md
using the following structure. If .specify/architecture-decisions/ADR-TEMPLATE.md
exists on disk, read and use it instead of the inline template below.
# ADR-NNNN: <Short imperative title>
**Status:** Proposed
**Date:** YYYY-MM-DD
**Supersedes:** *(ADR-NNNN if applicable, else omit)*
**Constitutional sections affected:** § N, § M
## Context
Describe the situation that makes this decision necessary. Include:
- What the system currently does
- What problem or pressure is driving the proposed change
- Any measured evidence (query times, error rates, load figures) if relevant
## Decision
State the decision clearly in one or two sentences.
> We will / We will not …
## Consequences
### Positive
- …
### Negative / Trade-offs
- …
### Risks
- …
## Alternatives Rejected
| Alternative | Reason rejected |
|-------------|----------------|
| … | … |
## Migration Path
Step-by-step plan to move from the current state to the decided state,
including rollback procedure if the migration can be reversed.
1. …
2. …
## Validation Criteria
Measurable conditions that confirm the decision was implemented correctly
and is producing the expected outcome.
- [ ] …
- [ ] …
## Constitutional Sections Affected
For each affected section, quote the relevant principle and explain how
this ADR complies with or consciously overrides it.
**§ N — <Section name>:**
> *Quoted principle text*
This ADR [complies because … / overrides because …]Do not perform any implementation work related to the proposed deviation
until the ADR file exists on disk with Status: Proposed (or higher).
After drafting, tell the user:
ADR-NNNN has been written to
.specify/architecture-decisions/ADR-NNNN-<title>.mdwith status Proposed. Review it, update the status to Accepted or Rejected, then ask me to continue. I will not proceed with the underlying change until the ADR is at least Proposed and saved.
The section most likely to need care is Constitutional Sections Affected. Here is a worked illustration from a denormalization ADR:
## Constitutional Sections Affected
**§ 4 — Normalization:**
> *Transactional truth lives in normalized Postgres tables.*
This ADR overrides § 4 for point-in-time pricing preservation. The canonical
product record remains normalized; the snapshot is a historical audit artifact.
**§ 7 — Audit:**
> *All mutations must be attributable and reversible.*
This ADR complies: the snapshot is written once at order creation and never
mutated, preserving a clear audit trail.For a fuller worked example of a complete ADR, see
.specify/architecture-decisions/ADR-EXAMPLE.md if it exists on disk.
.specify/architecture-decisions/ADR-NNNN-<title>.md..specify/memory/architecture-decisions.md:
| ADR-NNNN | <Short title> | Proposed | YYYY-MM-DD | § N, § M |docs
skills
adr-drafting
commerce-database-architecture
graph-rag-boundary-review
mermaid-diagram-review
outbox-and-eventing-design
postgres-schema-introspection
schema-evolution-workflow