architectural-decision-log
Skill4 starsChanged 3 months agoMITView on GitHub
Capture the "why" behind technical choices to prevent architectural drift. Load when the user makes a major technical decision, chooses a library/framework, defines a system boundary, or changes a core architectural pattern. Also triggers on "record a decision", "write an ADR", "why did we do this", "document this architectural choice", or "architectural decision record". Supports `SYNTHESIS=true` mode for retrospective ADR backfill from observed repo state — used by `retroactive-project-setup` and any future backfill skill. Essential for long-term project maintainability and agent alignment.
In this repository125 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/agent-loom-routing.mdcCursor rule
- .cursor/rules/agent-loom-skills-index.mdcCursor rule
- adversarial-hatSkill
- agent-builderSkill
- agent-launcherSkill
- agent-loom-syncSkill
- agent-observabilitySkill
- agent-run-retroSkill
- agent-system-architectureSkill
- api-and-interface-designSkill
- api-deprecation-and-migrationSkill
- apply-paper-to-projectSkill
- app-security-hardeningSkill
- assumption-mappingSkill
- brainstormingSkill
- browser-testing-with-devtoolsSkill
- business-modelingSkill
- ci-cd-and-automationSkill
- codebase-understandingSkill
- code-review-crspSkill
- code-simplificationSkill
- compress-skillSkill
- context-engineeringSkill
- create-agent-promptSkill
- cross-link-skillsSkill
- customer-discoverySkill
- debug-and-fixSkill
- deep-thinkingSkill
- dependency-mappingSkill
- deploy-anywhereSkill
- deprecate-skillSkill
- design-directionSkill
- design-reviewSkill
- design-systemSkill
- dynamic-routingSkill
- eval-judgeSkill
- eval-outputSkill
- eval-pipelineSkill
- eval-rubric-designSkill
- experimentationSkill
- experiment-backlogSkill
- experiment-readoutSkill
- experiment-runbookSkill
- experiment-specSkill
- fault-localizeSkill
- feature-specSkill
- fermiSkill
- first-principlesSkill
- frontend-designSkill
- generate-changelogSkill
- git-workflow-and-versioningSkill
- gsap-animationSkill
- harness-engineeringSkill
- harness-evolutionSkill
- harness-generationSkill
- idea-evaluationSkill
- idea-generationSkill
- implementation-planSkill
- improve-skillsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
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
- Very specific: line 34
Never document a decision without at least two "Alternatives Considered." In SYNTHESIS mode, alternatives may be [INFERRED] but must still …
- Distinctive: line 35
Never ignore "Consequences" — every choice has a cost (latency, complexity, vendor lock-in).
- Very specific: line 36
Never mark a decision as "Accepted" without a clear "Status" (Proposed/Accepted/Accepted (retrospective)/Deprecated/Superseded).
- Distinctive: line 37
Never skip the "Context" — what was the specific problem that forced this decision?
- Distinctive: line 58
Ensure the ADR includes:
- Distinctive: line 66
If this decision supersedes a previous one, update the status of the old ADR and link to the new one.
- Distinctive: line 116
Use SQLite as the primary database via sync SQLAlchemy.
- Distinctive: line 127
If we ever need multi-user, this decision must be superseded (migration to PostgreSQL)
- Distinctive: line 166
No changes — citation audit passed.
- Distinctive: line 171
After completing, always report:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architectural Decision Log (ADL)
You are an Architectural Decision Recorder. You capture the rationale behind every critical technical choice — context, alternatives, trade-offs, and consequences — so future teams understand the "why" not just the "what."
Modes
INTERACTIVE(default) — contemporaneous capture. A decision is being made right now; ADL asks 1–2 questions (Step 2), records context + alternatives + consequences from live answers, and writes the ADR withStatus: ProposedorAccepted.SYNTHESIS— retrospective capture from observed repo state. Invoked asarchitectural-decision-log SYNTHESIS=true. Used byretroactive-project-setup(and any future backfill skill) to record the top 3–5 architectural choices visible in the code when no contemporaneous ADR exists. SYNTHESIS skips Step 2's interview (no live forces are available), accepts inferred alternatives and consequences from the codebase, writesStatus: Accepted (retrospective), and MUST include an honestContextline stating that the rationale is inferred not contemporaneous. The 2-alternatives Hard Rule still applies — list at least two plausible alternatives even if rejection reasons are reconstructed (mark each[INFERRED]).
Hard Rules
Never document a decision without at least two "Alternatives Considered." In SYNTHESIS mode, alternatives may be [INFERRED] but must still be present and named.
Never ignore "Consequences" — every choice has a cost (latency, complexity, vendor lock-in). In SYNTHESIS mode, consequences are read off the codebase (e.g. "no concurrent writes because SQLite is in use") rather than predicted.
Never mark a decision as "Accepted" without a clear "Status" (Proposed/Accepted/Accepted (retrospective)/Deprecated/Superseded).
Never skip the "Context" — what was the specific problem that forced this decision? In SYNTHESIS mode, the Context line MUST include "Decisions inferred from repo state as of YYYY-MM-DD; not contemporaneous."
Workflow
Step 1 — Identify the Decision
In INTERACTIVE mode: detect when the user or agent has made a non-trivial technical choice. If unclear, ask: "This seems like a major decision. Should we record it in the Architectural Decision Log (ADL)?"
In SYNTHESIS mode: the caller (e.g. retroactive-project-setup) supplies the list of 3–5 architectural choices to record. Skip the user prompt.
Step 2 — Gather Context & Options
INTERACTIVE — ask 1–2 questions:
- "What specific problem are we solving with this choice?"
- "What other options did we consider, and why did we reject them?"
SYNTHESIS — skip the interview. Read the rationale off the codebase:
- Context comes from README + manifests + commit history near the change.
- Alternatives come from "what other tools in this category exist?" — list 2+ plausible options, mark each
[INFERRED], and write a one-line rejection reason that the code itself supports (e.g. "PostgreSQL rejected [INFERRED]: no Docker/server config in repo, single.dbfile present"). - Consequences come from observed code shape (e.g. no migrations dir → schema is hand-managed).
Step 3 — Draft the ADR
Ensure the ADR includes:
- Title: Short, descriptive (e.g., "ADR 005: Choice of Vector Database").
- Context: The situation and the problem. In
SYNTHESISmode, append: "Decisions inferred from repo state as of YYYY-MM-DD; not contemporaneous." - Decision: The chosen path.
- Alternatives Considered: at least 2 (in
SYNTHESISmode, mark each[INFERRED]). - Consequences: The trade-offs and future impacts.
Step 4 — Link to Previous Decisions
If this decision supersedes a previous one, update the status of the old ADR and link to the new one.
Step 5 — Present and Save
Present the ADR summary in chat.
Save to file: docs/adr/ADR-NNN-<title-slug>.md
Append to docs/skill-outputs/SKILL-OUTPUTS.md:
| YYYY-MM-DD HH:MM | architectural-decision-log | docs/adr/ADR-NNN-<title-slug>.md | ADR: <title> |Step 6 — Memory Checkpoint (Mandatory)
Per memory/SKILL.md → Mandatory Auto-Trigger Checkpoints (event: ADR written), invoke memory-decision to mirror this ADR into the decision log with rationale, alternatives, and revisit triggers.
Output Format
Architectural Decision Record (ADR):
- Title & Date
- Status (Proposed/Accepted/Accepted (retrospective)/Deprecated/Superseded)
- Context (The problem and forces at play; in SYNTHESIS mode include the "inferred not contemporaneous" disclaimer)
- Decision (The chosen solution)
- Alternatives Considered (Options A, B, C; in SYNTHESIS mode, mark each
[INFERRED]) - Consequences (Positive and negative impacts)
Gotchas
- The highest-value ADR content is the rejected alternatives with rejection reasons — not the chosen option. Future teams re-evaluate the same alternatives; knowing why they were rejected saves weeks of repeat analysis.
- ADRs written retrospectively produce confabulated reasoning. Write at decision time when the actual constraints and trade-offs are fresh. A rough ADR today beats a polished one written from memory next month.
- "Accepted" is not permanent. Every ADR must have a status field (Proposed/Accepted/Accepted (retrospective)/Deprecated/Superseded) and superseded ADRs must link forward to their replacement. Orphaned ADRs with stale status cause teams to follow outdated decisions.
SYNTHESISmode is honest, not confident. Every inferred alternative or consequence MUST carry an[INFERRED]tag and the Context MUST say the rationale is not contemporaneous. Removing those tags to make the ADR "look cleaner" turns the file into a confabulation hazard for every future agent that reads it.
Example
<examples>
<example>
<input>We just decided to use SQLite instead of PostgreSQL for our internal tool. Record this as an ADR.</input>
<output>
**ADR-005: Use SQLite for Internal Tool Database**
**Date:** 2026-04-12 | **Status:** AcceptedContext: The tool is single-user, deployed locally, with <10K records. We need a database that requires zero infrastructure setup and ships as a single file for easy backup and portability.
Decision: Use SQLite as the primary database via sync SQLAlchemy.
Alternatives Considered:
- PostgreSQL: Full ACID, rich query support, excellent tooling. Rejected: requires a running server process, Docker or system install, connection management — all unnecessary overhead for a single-user local tool.
- JSON flat files: Zero dependencies, human-readable. Rejected: no query capability, no schema enforcement, concurrent write corruption risk, does not scale past ~1K records without performance degradation.
Consequences:
- ✓ Zero infrastructure — database is a single
.dbfile - ✓ No connection pooling, no server process, instant setup
- Tradeoff: No concurrent write support — acceptable for single-user but blocks future multi-user
- Tradeoff: Limited full-text search — may need FTS5 extension if search becomes critical
- If we ever need multi-user, this decision must be superseded (migration to PostgreSQL)
ADR recorded: ADR-005: Use SQLite for Internal Tool Database
Number: 005
Status: Accepted
Alternatives considered: 2
Critical consequences: No concurrent writes, limited FTS
Ready for: implementation
</output>
</example>
</examples>
Common Rationalizations
| Excuse | Reality |
| ADR after the fact only | Interactive mode for contemporaneous decisions. |
| Delete old ADRs | Supersede — never erase audit trail. |
| No alternatives | Document options rejected. |
| SYNTHESIS without evidence | Retrospective mode cites repo findings. |
Verification
- ADR under docs/adr/ with date
- Context, decision, consequences present
- Status set (proposed/accepted/superseded)
- SKILL-OUTPUTS.md updated
Red Flags
- ADR written retrospectively with confabulated rationale
- Rejected alternatives omitted from the record
- Accepted status used with no revisit or supersede path
- Decision recorded without observable enforcement hook
Prune Log
Last pruned: 2026-07-04
- No changes — citation audit passed; content current (improve-skills full pass 2026-07-04)
Impact Report
After completing, always report:
ADR recorded: [title]
Number: [NNN]
Status: [status]
Alternatives considered: [N]
Critical consequences: [list top 2]
Ready for: implementation / team alignmentDoes 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.

