agentleFS
NarekManukyanNarekManukyan/flutter-mobx-kit/skills/create-adr/SKILL.md

create-adr

Skill0 starsChanged 56 days agoMITView on GitHub

Write a new Architecture Decision Record in MADR format — when a decision deserves an ADR versus a playbook edit, numbering, real alternatives with honest trade-offs, and the index/AGENTS.md updates that must follow. Use when introducing, changing or superseding an architectural rule.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-plan.

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.
  • JetBrainsSkill

    create-plan

    Research the codebase and create an implementation plan with architecture notes, design document, and track decomposition. Use when starting a new feature or large change.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the answer is a *procedure*, it belongs in a playbook under .claude/skills/.

    line 21
  2. Very specific:

    Add a row to the table in docs/adr/README.md.

    line 74
  3. Very specific:

    Add the one-line form to the Architectural decisions list in AGENTS.md, then run melos run sync-agents.

    line 75
  4. Distinctive:

    If it introduces a procedure, add or update the playbook and add it to the AGENTS.md Playbooks table.

    line 76

“Common” is measured: kept by at least 6 in 10 of the 13 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

Create an ADR

Format: MADR 3.0. Template: docs/adr/0000-template.md. Index: docs/adr/README.md.

Does this need an ADR?

An ADR is for a decision that had real alternatives and constrains future work.

Write an ADRDo not
Choosing MobX over BlocAdding one more @readonly field
Banning use-case → use-case dependenciesDocumenting how to write a use case → that is a playbook
Moving from integration_test to MaestroAdding a Maestro flow
Deprecating lib/shared/Moving one file out of it

If the answer is a procedure, it belongs in a playbook under .claude/skills/. If it is a rule with a rejected alternative, it is an ADR. If it is a one-line constraint everyone must always follow, it goes in AGENTS.md — usually pointing at an ADR.

Numbering and status

Next free number, zero-padded, kebab slug: 0018-short-decision-title.md. Numbers are never reused, and an ADR is never deleted.

  • Proposed — under discussion. Do not enforce it yet.
  • Accepted — describes how the codebase works now. This is the normal status here: an ADR is written when the rule is real, not aspirational.
  • Rejected — considered and turned down. Keep the file so the same proposal is not argued again from scratch.
  • Deprecated — no longer applies, nothing replaced it.
  • Superseded by ADR-NNNN — replaced. Set the old ADR's status to Superseded by ADR-NNNN; do not delete it. The new one links back.

Metadata is a bullet list under the title: Status, Date, Deciders. Consulted (people whose opinion was asked for) and Informed (people kept up to date) are optional; delete the bullets you do not use.

The part that matters: alternatives

List at least two alternatives, each with a concrete trade-off. An ADR whose alternatives are strawmen is worse than no ADR — it launders a preference as a decision, and the next person cannot tell what was actually weighed.

For each option, give real "Good" and "Bad" bullets. The chosen option gets Bad bullets too. If you cannot name a downside of your own choice, you have not understood it.

### Hexagonal / ports-and-adapters
- Good: maximum decoupling of domain from frameworks.
- Bad: overkill for a Flutter UI app — domain logic is thin, most code is presentation + IO.
- Bad: introduces ports/adapters/domain entities that duplicate DTOs.

Consequences, honestly

### Consequences under the decision outcome carries both directions. The "Bad" bullets are what make the ADR worth reading in a year — they are the cost the team knowingly accepted, and the reason someone might revisit it. Use a "Neutral" bullet for a side effect that is neither good nor bad but that a reader should know about (for example, a directory that now exists in every feature).

Confirmation

### Confirmation says how the team knows the decision is implemented and still upheld: a lint rule, a CI check (a step in melos run verify), a review checklist item, or a test. Name the mechanism concretely. "Reviewers check it" is acceptable only when you also say what they look for, such as an import of DioService in a *_state.dart file. A rule nothing can check drifts, and the Confirmation section is where that becomes visible.

AI Implementation Guidelines

The last section holds an <ai_context_rules> block for coding agents. Fill in all four fields, or delete the whole section when the decision needs no agent-specific handling.

  • Autonomy level
    • Full: the agent applies the rule without asking.
    • Guardrailed (human review required): the agent may implement, and a human reviews before merge.
    • Human-in-the-loop: the agent proposes, and a human decides before any code is written.
  • Architecture constraints: the hard limits, phrased as do / never pairs the agent can check a diff against.
  • File paths affected: globs of the files the ADR governs, e.g. lib/features/**/*_use_case.dart.
  • Verification command: what the agent runs to confirm its change, usually melos run verify or a narrower melos run analyze.

Write for the reader who disagrees

The audience is a developer six months from now who thinks the rule is wrong. Give them the context, the drivers, and the alternatives so they can either be persuaded or make a well-informed case to supersede it. Prose, not bullet soup — two or three paragraphs of context beat ten fragments.

After writing

  1. Add a row to the table in docs/adr/README.md.
  2. Add the one-line form to the Architectural decisions list in AGENTS.md, then run melos run sync-agents.
  3. If it introduces a procedure, add or update the playbook and add it to the AGENTS.md Playbooks table.
  4. Link related ADRs both ways. If the new ADR supersedes an existing one, set that ADR's status to Superseded by ADR-NNNN and update its index row.
  5. Link to the code the decision governs, so the ADR can be checked against reality.

Checklist

  • Real decision with real alternatives — not a procedure in disguise
  • Next free number; MADR sections from the template
  • ≥ 2 alternatives, each with honest Good/Bad
  • Chosen option has stated downsides
  • Confirmation names a concrete lint rule, CI check, checklist item or test
  • AI Implementation Guidelines filled in (all four fields) or the section deleted
  • Unused Consulted / Informed bullets deleted
  • Context is prose, written for someone who disagrees
  • docs/adr/README.md index row added
  • AGENTS.md one-liner added and melos run sync-agents run
  • Superseded ADRs updated, links both ways

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.