documentation-and-adrs
Skill0 starsChanged 9 days agoMITView on GitHub
Records decisions and documentation, and detects when documentation has drifted from the code it describes. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, when docs may be stale or out of sync with the code they describe, when working out which module docs are still accurate, or when setting up a check so docs cannot silently go out of date again.
- Reads credentials
90 other projects use a version of this, 72 of them edited; most edited versions we compared are an older text (62 of 69); 2 new projects in the last 4 weeks, against 2 the 4 before.
How people change it
Most projects run an older version: 62 of 69 add nothing and lack rules this one has, most likely added since.
Of the 69 edited versions we compared: 62 are an older text, 7 made changes of their own.
Not in older versions
- When you correct a doc that has a change log, append a dated entry that says why it changed. Never rewrite or collapse earlier entries: git keeps the old text, but the log is the only record of the reasons.missing from 62 of 62
- After checking the technical content, review the prose for the people who will use it. Clearer wording must not change the decision or its limits.missing from 47 of 62
- Before creating an ADR, inspect the available repository context for an established convention — existing ADRs, project instructions, and ADR-related configuration or tooling (e.g. an
.adr-dirfile). An established convention overrides the defaults below. …missing from 27 of 62 - If the available evidence conflicts, surface the conflict rather than silently introducing another scheme. Only when no convention can be established do you apply the default below.missing from 27 of 62
Rules people drop
- When you correct a doc that has a change log, append a dated entry that says why it changed. Never rewrite or collapse earlier entries: git keeps the old text, but the log is the only record of the reasons.dropped by 7 of 7
- After checking the technical content, review the prose for the people who will use it. Clearer wording must not change the decision or its limits.dropped by 5 of 7
- Before creating an ADR, inspect the available repository context for an established convention — existing ADRs, project instructions, and ADR-related configuration or tooling (e.g. an
.adr-dirfile). An established convention overrides the defaults below. …dropped by 4 of 7 - If the available evidence conflicts, surface the conflict rather than silently introducing another scheme. Only when no convention can be established do you apply the default below.dropped by 4 of 7
- When a decision changes, write a new ADR that references and supersedes the old one.dropped by 3 of 7
- Every project should have a README that covers:dropped by 3 of 7
- When you find yourself explaining the same thing repeatedlydropped by 2 of 7
- When NOT to use: Don't document obvious code. Don't add comments that restate what the code already says. Don't write docs for throwaway prototypes.dropped by 2 of 7
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Steady: 2 new projects took it in the last 4 weeks, 1× the 4 weeks before.thin data
Most recently taken up by
- dzikrisyairozi/agent-skillsedited, first seen Nov 29, 2026
- aakash1552005/universal-agent-skillsedited, first seen Nov 29, 2026
- karanmrn/karanagentskillsword for word, first seen Nov 29, 2026
- karanmrn/kstackword for word, first seen Nov 29, 2026
- Dannykkh/skill-olympustheir own version, first seen Nov 29, 2026
- alexj11324/Mikkaedited, first seen Nov 29, 2026
Used with
Projects with it also use accessibility-engineering, constraint-driven-development and 10 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.
steven123397Skillaccessibility-engineering
Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.
Also in 4 projects that use this
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 20 projects that use this
jaydubya818Skillobservability-and-instrumentation
Add or review logs, metrics, traces, and actionable alerts.
Also in 36 projects that use this
jaydubya818Skilldeprecation-and-migration
Retire APIs or migrate consumers and persistent data across releases.
Also in 44 projects that use this
HK-hubSkillsource-driven-development
Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.
Also in 45 projects that use this
seikaikyoSkilldoubt-driven-development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
Also in 41 projects that use this
Other versions90 projects use a version of this.
Word for word · 5
- addyosmani/agent-skills★ 121k100% same
- karanmrn/karanagentskills★ 11100% same
- karanmrn/kstack★ 11100% same
- SanHsien/agent-skills★ 1100% same
- e-landeros/gauntlet★ 0100% same
Edited · 72
- ollaya-dev/ollaya★ 1.5k95% same
- shashankswe2020-ux/whoop-mcp★ 18193% same
- muratgur/ordinus★ 11191% same
- alexj11324/Mikka★ 9096% same
- aspectly-labs/Mikka★ 9096% same
- vinvcn/addyosmani-agent-skills-zh★ 4659% same
- sampleXbro/agentsmesh★ 3193% same
- jaskirat1616/grok-skills★ 2295% same
- ishandutta2007/Awesome-Agent-Skills★ 2193% same
- aboylabs/ai-agent-skills★ 1592% same
62 more not listed
Wrote their own version · 13
- jmxt3/gitscape.ai★ 33same name
- JPeetz/agent-skills★ 21same name
- Dannykkh/skill-olympus★ 9same name
- ldaume/agentic-engineering-harness★ 5same name
- bnalwalid/walidforge-skills★ 2same name
- codexskills/agent-forge★ 2same name
- GuillemRoca/agent-skills-android★ 2same name
- NashEQify/forge★ 2same name
- Aleksandr-Litvinenko/agent-skills-ru★ 1same name
- celestialdust/achilles-skills★ 1same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- animateSkill
- api-and-interface-designSkill
- bro-whatSkill
- browser-testing-with-devtoolsSkill
- cavemanSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- debugging-and-error-recoverySkill
- design-taste-frontendSkill
- domain-modelingSkill
- file-prSkill
- gold-standard-researchSkill
- grillingSkill
- handoffSkill
- hillclimbSkill
- incremental-implementationSkill
- modern-web-guidanceSkill
- playwrightSkill
- ponytailSkill
- prompt-engineeringSkill
- repo-onboardingSkill
- review-animationsSkill
- unslopSkill
The file
We split this skill into the rules it gives an agent
9 rules. 5 are common, 3 are distinctive, and 1 is very specific to this project.
5
Common
Most of the 78 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 19
When you find yourself explaining the same thing repeatedly
- Common: line 21
When NOT to use: Don't document obvious code.
- Very specific: line 38
Before creating an ADR, inspect the available repository context for an established convention — existing ADRs, project instructions, and …
- Distinctive: line 44
If the available evidence conflicts, surface the conflict rather than silently introducing another scheme.
- Common: line 100
When a decision changes, write a new ADR that references and supersedes the old one.
- Common: line 203
Every project should have a README that covers:
- Distinctive: line 262
After checking the technical content, review the prose for the people who will use it.
- Distinctive: line 283
When you correct a doc that has a change log, append a dated entry that says why it changed.
- Common: line 303
No ADRs in a project with significant architectural choices
“Common” is measured: kept by at least 6 in 10 of the 78 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.
Files
Documentation and ADRs
Overview
Document decisions, not just code. The most valuable documentation captures the why — the context, constraints, and trade-offs that led to a decision. Code shows what was built; documentation explains why it was built this way and what alternatives were considered. This context is essential for future humans and agents working in the codebase.
When to Use
- Making a significant architectural decision
- Choosing between competing approaches
- Adding or changing a public API
- Shipping a feature that changes user-facing behavior
- Onboarding new team members (or agents) to the project
- When you find yourself explaining the same thing repeatedly
When NOT to use: Don't document obvious code. Don't add comments that restate what the code already says. Don't write docs for throwaway prototypes.
Architecture Decision Records (ADRs)
ADRs capture the reasoning behind significant technical decisions. They're the highest-value documentation you can write.
When to Write an ADR
- Choosing a framework, library, or major dependency
- Designing a data model or database schema
- Selecting an authentication strategy
- Deciding on an API architecture (REST vs. GraphQL vs. tRPC)
- Choosing between build tools, hosting platforms, or infrastructure
- Any decision that would be expensive to reverse
Match the existing convention first
Before creating an ADR, inspect the available repository context for an established convention — existing ADRs, project instructions, and ADR-related configuration or tooling (e.g. an .adr-dir file). An established convention overrides the defaults below. Match:
- Location and format — e.g.
docs/adr/*.md,Documentation/Decisions/*.rst, a MADR layout, or anadr-toolssetup. Match the existing directory, file extension, and markup (Markdown vs reStructuredText). - Numbering and naming — continue the existing sequence and filename pattern (
ADR-004-Title.rst,0004-title.md, …); don't restart at 001 or introduce a second scheme. - Section headings — reuse the project's heading set rather than imposing this template's.
If the available evidence conflicts, surface the conflict rather than silently introducing another scheme. Only when no convention can be established do you apply the default below.
ADR Template
Store ADRs in docs/decisions/ with sequential numbering (unless the project already uses another location — see above):
# ADR-001: Use PostgreSQL for primary database
## Status
Proposed | Accepted | Superseded by ADR-XXX | Deprecated
## Date
2025-01-15
## Context
We need a primary database for the task management application. Key requirements:
- Relational data model (users, tasks, teams with relationships)
- ACID transactions for task state changes
- Support for full-text search on task content
- Managed hosting available (for small team, limited ops capacity)
## Decision
Use PostgreSQL with Prisma ORM.
## Alternatives Considered
### MongoDB
- Pros: Flexible schema, easy to start with
- Cons: Our data is inherently relational; would need to manage relationships manually
- Rejected: Relational data in a document store leads to complex joins or data duplication
### SQLite
- Pros: Zero configuration, embedded, fast for reads
- Cons: Limited concurrent write support, no managed hosting for production
- Rejected: Not suitable for multi-user web application in production
### MySQL
- Pros: Mature, widely supported
- Cons: PostgreSQL has better JSON support, full-text search, and ecosystem tooling
- Rejected: PostgreSQL is the better fit for our feature requirements
## Consequences
- Prisma provides type-safe database access and migration management
- We can use PostgreSQL's full-text search instead of adding Elasticsearch
- Team needs PostgreSQL knowledge (standard skill, low risk)
- Hosting on managed service (Supabase, Neon, or RDS)ADR Lifecycle
PROPOSED → ACCEPTED → (SUPERSEDED or DEPRECATED)- Don't delete old ADRs. They capture historical context.
- When a decision changes, write a new ADR that references and supersedes the old one.
Inline Documentation
When to Comment
Comment the why, not the what:
// BAD: Restates the code
// Increment counter by 1
counter += 1;
// GOOD: Explains non-obvious intent
// Rate limit uses a fixed window that opens on the first request after the
// previous one expires, not on a clock schedule. Known gap: a client can spend
// the full limit just before a reset and again just after (2x in a moment)
if (now - windowStart > WINDOW_SIZE_MS) {
counter = 0;
windowStart = now;
}When NOT to Comment
// Don't comment self-explanatory code
function calculateTotal(items: CartItem[]): number {
return items.reduce((sum, item) => sum + item.price * item.quantity, 0);
}
// Don't leave TODO comments for things you should just do now
// TODO: add error handling ← Just add it
// Don't leave commented-out code
// const oldImplementation = () => { ... } ← Delete it, git has historyDocument Known Gotchas
/**
* IMPORTANT: This function must be called before the first render.
* If called after hydration, it causes a flash of unstyled content
* because the theme context isn't available during SSR.
*
* See ADR-003 for the full design rationale.
*/
export function initializeTheme(theme: Theme): void {
// ...
}API Documentation
For public APIs (REST, GraphQL, library interfaces):
Inline with Types (Preferred for TypeScript)
/**
* Creates a new task.
*
* @param input - Task creation data (title required, description optional)
* @returns The created task with server-generated ID and timestamps
* @throws {ValidationError} If title is empty or exceeds 200 characters
* @throws {AuthenticationError} If the user is not authenticated
*
* @example
* const task = await createTask({ title: 'Buy groceries' });
* console.log(task.id); // "task_abc123"
*/
export async function createTask(input: CreateTaskInput): Promise<Task> {
// ...
}OpenAPI / Swagger for REST APIs
paths:
/api/tasks:
post:
summary: Create a task
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTaskInput'
responses:
'201':
description: Task created
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
'422':
description: Validation errorREADME Structure
Every project should have a README that covers:
# Project Name
One-paragraph description of what this project does.
## Quick Start
1. Clone the repo
2. Install dependencies: `npm install`
3. Set up environment: `cp .env.example .env`
4. Run the dev server: `npm run dev`
## Commands
| Command | Description |
|---------|-------------|
| `npm run dev` | Start development server |
| `npm test` | Run tests |
| `npm run build` | Production build |
| `npm run lint` | Run linter |
## Architecture
Brief overview of the project structure and key design decisions.
Link to ADRs for details.
## Contributing
How to contribute, coding standards, PR process.Changelog Maintenance
For shipped features:
# Changelog
## [1.2.0] - 2025-01-20
### Added
- Task sharing: users can share tasks with team members (#123)
- Email notifications for task assignments (#124)
### Fixed
- Duplicate tasks appearing when rapidly clicking create button (#125)
### Changed
- Task list now loads 50 items per page (was 20) for better UX (#126)Documentation for Agents
Special consideration for AI agent context:
- CLAUDE.md / rules files — Document project conventions so agents follow them
- Spec files — Keep specs updated so agents build the right thing
- ADRs — Help agents understand why past decisions were made (prevents re-deciding)
- Inline gotchas — Prevent agents from falling into known traps
Prose Review
After checking the technical content, review the prose for the people who will use it. Clearer wording must not change the decision or its limits.
- Mark the details that must survive the edit: names, numbers and units, commands, paths, links, conditions, trade-offs, and uncertainty. Check them against the available code and decision context; flag anything you cannot substantiate.
- Replace stock introductions, promotional adjectives, and repeated summaries with the concrete information the reader needs. Do not replace an unsupported claim with an invented example or a stronger guarantee. Keep necessary technical repetition and the project's established terminology.
- Compare the edited document with the original and its sources. Restore any lost qualifier or caveat, verify command and code examples still work as documented, and explain any unresolved factual question rather than polishing it away.
Documentation Drift
A document that was true when written still reads as authoritative after the code moves on. When a doc may be stale, decide from version control, not from how confident the doc sounds:
code=$(git log -1 --format=%H -- src/rate-limiter.js)
doc=$(git log -1 --format=%H -- docs/rate-limiter.md)
if [ "$code" = "$doc" ]; then echo "current: changed together"
elif git merge-base --is-ancestor "$doc" "$code"; then echo "stale: code changed after the doc"
elif git merge-base --is-ancestor "$code" "$doc"; then echo "current: doc changed after the code"
else echo "can't tell"; fiUnordered history (divergent branches, a rebase, a shallow clone) means "can't tell". Say that; never report it as current.
When you correct a doc that has a change log, append a dated entry that says why it changed. Never rewrite or collapse earlier entries: git keeps the old text, but the log is the only record of the reasons.
Common Rationalizations
| Rationalization | Reality |
| "The code is self-documenting" | Code shows what. It doesn't show why, what alternatives were rejected, or what constraints apply. |
| "We'll write docs when the API stabilizes" | APIs stabilize faster when you document them. The doc is the first test of the design. |
| "Nobody reads docs" | Agents do. Future engineers do. Your 3-months-later self does. |
| "ADRs are overhead" | A 10-minute ADR prevents a 2-hour debate about the same decision six months later. |
| "Comments get outdated" | Comments on why are stable. Comments on what get outdated — that's why you only write the former. |
| "I'll tidy the change log while I'm in here" | Git holds the old text; the log holds the reasons. Rewriting it destroys the only copy of the reasoning and preserves nothing. |
Red Flags
- Architectural decisions with no written rationale
- Public APIs with no documentation or types
- README that doesn't explain how to run the project
- Commented-out code instead of deletion
- TODO comments that have been there for weeks
- No ADRs in a project with significant architectural choices
- Documentation that restates the code instead of explaining intent
- A change log that has been rewritten rather than appended to
- A doc called current when the commit order of the doc and its code could not be determined
Verification
After documenting:
- ADRs exist for all significant architectural decisions
- README covers quick start, commands, and architecture overview
- API functions have parameter and return type documentation
- Known gotchas are documented inline where they matter
- No commented-out code remains
- Rules files (CLAUDE.md etc.) are current and accurate
- Prose edits preserve source details, decision trade-offs, and qualifiers without adding unsupported guarantees
- Change logs were appended to rather than rewritten
- A doc whose staleness could not be determined is reported as "can't tell", not as current
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
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.

