agentleFS
irahardiantoirahardianto/awesome-agv/.agents/skills/adr/SKILL.md

adr

Skill157 starsChanged 3 months agoMITView on GitHub

Architecture Decision Record skill for documenting significant architectural decisions with context, options, and consequences. Use during the Research phase when choosing between approaches, or whenever the user asks to document an architectural decision.

35 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use coverage, observability and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • PydanticSkill

    coverage

    Fetch coverage diff from Codecov for the current branch or a specific PR. Shows uncovered lines, patch coverage, and overall coverage change.

    Also in 3 projects that use this

  • OpenAISkill

    observability

    Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.

    Also in 5 projects that use this

  • SentrySkill

    agents-md

    This skill should be used when the user asks to "create AGENTS.md", "update AGENTS.md", "maintain agent docs", "set up CLAUDE.md", or needs to keep agent instructions concise. Guides discovery of local skills and enforces minimal documentation style.

    Also in 3 projects that use this

  • MongoDBSkill

    jira

    Use this skill for any Jira operation in the DOCSP project — creating, viewing, searching, updating, transitioning, commenting on, or linking tickets. Also handles follow-up ticket creation to manage scope creep. TRIGGER when: user mentions a DOCSP-XXXXX ticket number or any Jira ticket URL; user asks to view, open, check, update, transition, close, comment on, link, or search tickets; user references \"the ticket\", \"the Jira\", or \"open a ticket\". SKIP: GitHub issues; non-Jira platforms; questions unrelated to ticket operations.

    Also in 4 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 6 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Document significant architectural decisions so institutional knowledge persists across conversations and team members.

    line 9
  2. Distinctive:

    When user explicitly asks to document a decision

    line 13
  3. Distinctive:

    When choosing between 2+ viable approaches

    line 14
  4. Distinctive:

    When introducing a new dependency or pattern

    line 15
  5. Distinctive:

    When changing existing architecture

    line 16
  6. Very specific:

    Create the ADR file at docs/decisions/NNNN-short-title.md (e.g., 0001-use-postgresql-for-storage.md):

    line 30
  7. Distinctive:

    Use Sequential Thinking skill: if the trade-off analysis is complex

    line 122
  8. Very specific:

    Completeness: When status is accepted, verify the ADR satisfies specification.md §6 and profiles/adr.md additional rules.

    line 128

“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Decision Record (ADR) Skill

Purpose

Document significant architectural decisions so institutional knowledge persists across conversations and team members. ADRs capture the why, not just the what.

When to Invoke

  • During Research phase (phase-research.md) when a significant architecture decision is identified
  • When user explicitly asks to document a decision
  • When choosing between 2+ viable approaches
  • When introducing a new dependency or pattern
  • When changing existing architecture

ADR Storage

ADRs are stored in docs/decisions/ as numbered files:

docs/decisions/
├── 0001-use-postgresql-for-storage.md
├── 0002-adopt-feature-based-structure.md
├── 0003-use-testcontainers-for-integration.md
└── NNNN-short-title.md

ADR Template

Create the ADR file at docs/decisions/NNNN-short-title.md (e.g., 0001-use-postgresql-for-storage.md):

ID conventions

An ADR has three identifiers — each serves a different purpose:

IdentifierConventionExamplePurpose
File nameNNNN-short-title.md0001-use-postgresql-for-storage.mdHuman navigation in docs/decisions/
spec_id (frontmatter)ADR-NNNN-SHORT-SLUG-VNADR-0001-USE-POSTGRESQL-V1Globally unique document ID for cross-references
id (annotation)ADR-NNNNADR-0001Annotation-level decision ID for traceability links

The file number (NNNN) is the single source of truth — spec_id and annotation id derive from it.

Template

---
$schema: "https://raw.githubusercontent.com/irahardianto/awesome-agv/main/.agents/skills/structured-spec/spec-schema.json"
spec_id: "ADR-0001-USE-POSTGRESQL-V1"
title: "Use PostgreSQL for primary storage"
doc_type: "adr"
status: "proposed"
version: "1.0.0"
owners: ["platform-team"]
created: "2026-08-20"
modified: "2026-08-20"
---

<!-- decision
  id: ADR-0001
  title: Use PostgreSQL for primary storage
  status: proposed
  context: The application needs a relational database with ACID transactions, JSON support, and row-level security for multi-tenant isolation.
  alternatives: ["PostgreSQL", "MySQL", "CockroachDB"]
  rationale: PostgreSQL provides the best combination of JSONB support, RLS, and ecosystem maturity for our scale.
  consequences: Operational complexity of managing PostgreSQL in production. Team must learn RLS patterns. Limits future migration to non-relational stores.
  affects_requirements: [REQ-DATA-001]
-->

## Context
What is the issue that we're seeing that is motivating this decision?
Include technical constraints, business requirements, and relevant context.

## Decision
We chose **PostgreSQL** as the primary storage engine.

## Alternatives Considered

### Option A: PostgreSQL
- **Pros:** JSONB, RLS, mature ecosystem, strong community
- **Cons:** Operational overhead, single-node write bottleneck at extreme scale
- **Effort:** Low (team has experience)

### Option B: MySQL
- **Pros:** Widely deployed, good tooling
- **Cons:** No native RLS, weaker JSON support, less extensible
- **Effort:** Low

### Option C: CockroachDB
- **Pros:** Distributed SQL, automatic sharding, PostgreSQL-compatible wire protocol
- **Cons:** Younger ecosystem, higher operational complexity, cost at scale
- **Effort:** Medium (unfamiliar tooling)

## Rationale
PostgreSQL provides the best combination of JSONB support, row-level security, and ecosystem maturity for our current scale. CockroachDB was a strong contender but adds operational complexity we don't need until we outgrow single-node writes.

## Consequences

### Positive
- JSONB enables flexible schema evolution without migrations for non-critical fields
- RLS simplifies multi-tenant data isolation at the database layer

### Negative
- Team must learn RLS policy patterns (training cost)
- Single-node write bottleneck may require sharding at >10K TPS

### Risks
- Migration to a non-relational store would be costly if requirements shift
- RLS misconfiguration could expose tenant data (mitigated by integration tests)

## Related
- Architectural Patterns @architectural-pattern.md
- Database Design Principles @database-design-principles.md

Process Guidelines

  1. Number sequentially — check existing ADRs in docs/decisions/ for the next number
  2. Keep titles short — descriptive enough to identify the decision at a glance
  3. Status lifecycle: proposed → accepted (after approval) → optionally deprecated or superseded
  4. Never delete ADRs — if a decision is reversed, mark as superseded (with superseded_by in frontmatter) and create a new ADR
  5. Use Sequential Thinking skill if the trade-off analysis is complex

Structured Spec Integration

  • Cross-reference: See structured-spec/profiles/adr.md for full annotation field reference and additional rules.
  • Standalone vs embedded: Standalone ADRs live in docs/decisions/; decisions scoped to a single SDD/PRD should be embedded as <!-- decision --> annotations within that document.
  • Completeness: When status is accepted, verify the ADR satisfies specification.md §6 and profiles/adr.md additional rules.
  • Annotation fields reference: Point to specification.md §4.5 for the complete field table.

Rule Compliance

ADRs should reference applicable rules:

  • Architectural Patterns @architectural-pattern.md
  • Core Design Principles @core-design-principles.md
  • Project Structure @project-structure.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.