skills / code

architecture-decision-records

what it does

Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

Verified Before and after: 2 models 1 try per case View source Download .zip

Compare the answers

Answers from Claude Sonnet 5.5 and GPT-6.1 Sol · try 1 of 1

Same request, same model, once with the skill and once without. Read both and judge for yourself.

“We're reversing the decision below. Can you write up the changes we need in our docs/adr folder?”

Source material given with the request

Existing file docs/adr/0007-mongodb-for-audit-log.md: # ADR-0007: Use MongoDB for the audit log Status: Accepted (2024-03-12) Context: Audit events have varied shapes per feature. Postgres schema changes were slow to get through review at the time. Decision: Store audit events in a dedicated MongoDB Atlas cluster. Consequences: Flexible schema; a second database to operate. What changed (agreed in architecture review, 2026-10-19): - Compliance now needs 7-year retention; Atlas storage at that volume is quoted at $4,100/month. - Finance needs to join audit events to invoices for disputes; today that is a manual export. - Event shapes have settled into 11 types with a common envelope. - New decision: write audit events to a monthly-partitioned PostgreSQL table; move partitions older than 13 months to S3 as Parquet. Backfill from Atlas, then decommission the cluster by 2027-03-31. Owner: Ines Duarte.
with the skill
Make three changes: add a superseding ADR, update ADR-0007’s status without rewriting its history, and update the ADR index. The examples below use **0008**; use the next available number if it is already taken. ## 1. Add `docs/adr/0008-postgresql-and-s3-for-audit-log.md` ```markdown # ADR-0008: Replace MongoDB audit storage with PostgreSQL and S3 ## Status Accepted (2026-10-19) Supersedes [ADR-0007: Use MongoDB for the audit log](0007-mongodb-for-audit-log.md). ## Owner Ines Duarte ## Context
Show the rest (119 more lines)
ADR-0007 selected a dedicated MongoDB Atlas cluster because audit events had varied shapes and PostgreSQL schema changes were slow to review. This provided schema flexibility but introduced a second database to operate. Since that decision: - Compliance now requires seven-year retention. Atlas storage at the required volume is quoted at $4,100 per month. - Finance needs to join audit events to invoices for disputes. Today, this requires a manual export. - Event shapes have stabilized into 11 types with a common envelope. These changes reduce the value of a separate document database and favor relational access for recent events, with lower-cost archival storage for older events. ## Decision Write audit events to a monthly-partitioned PostgreSQL table. Move partitions older than 13 months to S3 as Parquet, retaining audit events for the required seven years across PostgreSQL and S3. Backfill existing events from MongoDB Atlas, cut over to the new storage arrangement, and decommission the Atlas cluster by 2027-03-31. This decision was agreed in architecture review on 2026-10-19. ## Alternatives Considered ### Retain MongoDB Atlas Preserves the existing implementation and schema flexibility, but retains the quoted storage cost and manual export workflow for invoice joins. ### Retain all seven years in PostgreSQL Keeps all audit history directly accessible through SQL joins, but places the full retention volume in the operational database. The chosen approach limits that footprint by archiving older partitions to S3. ## Consequences ### Positive - Recent audit events can be joined to invoices directly in PostgreSQL. - Monthly partitions provide a practical unit for archival and retention. - Parquet in S3 provides a lower-cost archival tier. - Decommissioning Atlas removes a separately operated database cluster. ### Negative - Audit storage and retrieval span PostgreSQL and S3. - Events archived to S3 will not be available through ordinary PostgreSQL table joins; historical dispute investigations need a documented query or restore workflow. - Backfill, cutover, and archival introduce implementation and validation work. - PostgreSQL capacity, indexing, and partition maintenance must accommodate the audit workload. ### Risks and Required Safeguards - Exported partitions must be validated before their PostgreSQL copies are removed. - Migration must account for events arriving during the backfill and prevent lost or duplicated events at cutover. - Retention and deletion controls must preserve the required seven-year history across both storage tiers. - Access controls, integrity protections, and recovery procedures must cover both PostgreSQL and S3. ## Implementation Plan Owner: Ines Duarte. Atlas decommissioning deadline: 2027-03-31. 1. Define the PostgreSQL schema for the common envelope and 11 event types, monthly partition management, and indexes needed for invoice joins. 2. Implement the S3 Parquet archival process, including export validation, retrieval procedures, and retention controls. 3. Backfill Atlas history into the appropriate storage tier and reconcile completeness and correctness. 4. Cut over event writers and readers using a documented process that accounts for writes during migration. 5. Validate ingestion, invoice joins, historical retrieval, and recovery. 6. Decommission Atlas after validation and confirmation that it is no longer needed for rollback, no later than 2027-03-31. ## Follow-up Details to Resolve - Historical query or restore workflow for archived events. - Exact retention cutoff and partition-boundary handling. - Migration reconciliation criteria and rollback procedure. - PostgreSQL and S3 capacity and cost estimates. ``` ## 2. Update `docs/adr/0007-mongodb-for-audit-log.md` Replace only its status line with: ```markdown Status: Superseded by [ADR-0008](0008-postgresql-and-s3-for-audit-log.md) (2026-10-19). Originally accepted 2024-03-12. ``` Keep its original context, decision, and consequences unchanged. They explain why the original choice was made. ## 3. Update `docs/adr/README.md` Preserve the existing index and guidelines. Update ADR-0007’s row and add ADR-0008: ```markdown | ADR | Title | Status | Date | | --- | --- | --- | --- | | [0007](0007-mongodb-for-audit-log.md) | Use MongoDB for the audit log | Superseded by ADR-0008 | 2024-03-12 | | [0008](0008-postgresql-and-s3-for-audit-log.md) | Replace MongoDB audit storage with PostgreSQL and S3 | Accepted | 2026-10-19 | ``` Use **Superseded**, rather than merely **Deprecated**, because the new ADR explicitly replaces the old decision.
without
Make two changes: mark ADR-0007 as superseded without rewriting its original rationale, and add a new ADR recording the replacement decision. The following assumes `0008` is the next available ADR number. ### `docs/adr/0007-mongodb-for-audit-log.md` ```markdown # ADR-0007: Use MongoDB for the audit log Status: Superseded (2026-10-19) by [ADR-0008](0008-postgresql-and-s3-for-audit-log.md) Originally accepted: 2024-03-12 ## Context Audit events have varied shapes per feature. Postgres schema changes were slow to get through review at the time. ## Decision Store audit events in a dedicated MongoDB Atlas cluster. ## Consequences
Show the rest (55 more lines)
Flexible schema; a second database to operate. ``` ### `docs/adr/0008-postgresql-and-s3-for-audit-log.md` ```markdown # ADR-0008: Use PostgreSQL and S3 for the audit log Status: Accepted (2026-10-19) Supersedes: [ADR-0007](0007-mongodb-for-audit-log.md) Owner: Ines Duarte ## Context ADR-0007 selected a dedicated MongoDB Atlas cluster for audit events because event shapes varied by feature and PostgreSQL schema changes were slow to get through review. The requirements and trade-offs have changed: - Compliance now requires seven-year retention. Atlas storage at that volume is quoted at $4,100 per month. - Finance needs to join audit events to invoices for disputes. Today this requires a manual export. - Audit event shapes have settled into 11 types with a common envelope, reducing the need for a separate document database. ## Decision Write audit events to a monthly-partitioned PostgreSQL table. Move partitions older than 13 months to S3 as Parquet. Retain audit events for seven years across PostgreSQL and S3. Backfill existing audit events from MongoDB Atlas, then decommission the Atlas cluster by 2027-03-31. Ines Duarte owns the migration and decommissioning. ## Consequences - Audit events retained in PostgreSQL can be joined directly to invoices, removing the manual export step for those events. - The settled event types and common envelope can be represented in PostgreSQL without maintaining a separate document database. - Decommissioning Atlas removes a second database to operate and avoids its quoted storage cost. PostgreSQL and S3 will still incur storage and operational costs. - Monthly partition management, Parquet archival, and retention enforcement become operational responsibilities. - Events archived to S3 will require a separate query or retrieval path; they will not be available through direct PostgreSQL table joins. - Backfill and cutover must preserve audit history and be validated before Atlas is decommissioned. ```

Answers are shown exactly as the model wrote them, from the first try, and nothing is picked by hand.

The models

2 models

Claude Sonnet 5.5

made by Anthropic

claude-sonnet-5-5 · revision not reported by the provider

1 try per case · tested 3 Nov 2026

GPT-6.1 Sol

made by OpenAI

gpt-6.1-sol · revision not reported by the provider

1 try per case · tested 3 Nov 2026

The tasks

written by Carte Blanche
queue-decision-from-notes

“Can you turn these meeting notes into an ADR for our repo?”

review-vague-microservices-adr

“Can you review this ADR before I merge it?”

short-pnpm-adr

“Write a one-page ADR for switching our monorepo from npm to pnpm.”

supersede-mongodb-audit-log

“We're reversing the decision below. Can you write up the changes we need in our docs/adr folder?”

which-changes-need-adrs

“Which of these upcoming changes actually need an ADR? Keep it brief.”

Install

Download the .zip and unzip it. Put its files, in a folder named architecture-decision-records, here:

Claude Code~/.claude/skills/Every project. For one project only, use .claude/skills/ inside it.
Codex~/.agents/skills/Every project. For one repository only, use .agents/skills/ inside it.
Cursor~/.cursor/skills/Cursor also reads the Claude Code and Codex folders above.

Then start a new session and ask for what the skill does. Other agents that read SKILL.md have their own skills folder; check their docs.

Coming after launch: get skills from inside your agent, no download needed.