agentleFS
HexamindOrganisationHexamindOrganisation/hexgate/.claude/skills/write-adr/SKILL.md

write-adr

Skill25 starsChanged 5 months agoMITView on GitHub

Write or update an Architecture Decision Record in docs/adr/ using the hexgate house style (R-<AREA>-NNN id, Status, Applies-to globs, MUST/MUST-NOT decision, a detailed Why). Use when recording a durable design/security decision, when asked to "write an ADR / decision record", or when superseding an existing one.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use write-plan, write-tests and 6 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.
  • Arman-KudaibergenovSkill

    write-plan

    Этот скилл MUST быть вызван когда есть design.md и нужно разбить доработку на атомарные задачи (2-5 мин) с точными путями файлов и критериями проверки в tasks.md. SHOULD также вызывать как промежуточный шаг между brainstorm и subagent-dev. Do NOT использовать для обсуждения идеи — используй brainstorm; для выполнения задач — используй subagent-dev.

    Also in 3 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 3 projects that use this

  • NVIDIASkill

    review-code

    Review a code repository for concrete issues in correctness, robustness, security, maintainability, tests, and integration. Use for repository-wide or focused code review where practical engineering judgment and strict scope control matter.

    Also in 3 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 4 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 9

    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:

    Read a couple of existing records first — they are the source of truth for the house style — then match them.

    line 10
  2. Distinctive:

    One decision per file: If you can't state it in two sentences, it's probably two decisions — split it.

    line 24
  3. Very specific:

    Superseding?: Don't delete the old record.

    line 26
  4. Distinctive:

    Every record has these; keep the optional ones only when they earn their place.

    line 33
  5. Distinctive:

    Never "prefer" or "consider" — those let an agent do the opposite.

    line 42
  6. Distinctive:

    Do give the decision a stable id and cite it by id from other docs (a PR body, another ADR) instead of re-explaining it.

    line 91
  7. Distinctive:

    Do write MUST / MUST NOT, not "prefer / consider".

    line 93
  8. Distinctive:

    Do keep it under ~200 lines.

    line 94
  9. Very specific:

    Do add a Verify command whenever the rule is mechanically checkable.

    line 95
  10. Distinctive:

    Do not delete or rewrite a superseded record — supersede it and keep the chain.

    line 96
  11. Distinctive:

    Do not restate language/framework basics or anything the code already shows.

    line 97

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

Write a hexgate ADR

ADRs live in docs/adr/, one decision per file, named R-<AREA>-<NNN>-<kebab-summary>.md (e.g. R-GUARD-002-guards-fail-closed.md). Read a couple of existing records first — they are the source of truth for the house style — then match them.

Terse on what, detailed on why. An agent reads these under a token budget and acts on them literally, so the decision must be unambiguous and the rationale must survive: six months later nobody remembers why, and without it someone "cleans up" the decision and reintroduces the bug it was avoiding. The rationale is the one part you must never compress.

Before writing

  • Pick the area and the next id. Existing areas: AGENT, AUTH, GUARD, POL, USAGE. Reuse one if the decision fits it; open a new area only for a genuinely new subsystem. Number is the next free integer in that area (ls docs/adr/).
  • One decision per file. If you can't state it in two sentences, it's probably two decisions — split it.
  • Superseding? Don't delete the old record. Set the old one's Status to Superseded by R-<AREA>-NNN (date) with a short "Why superseded" note, and set the new one's Status to supersedes …, so the chain resolves. See R-AGENT-001 → R-AGENT-002 for the pattern.

Required shape

Every record has these; keep the optional ones only when they earn their place.

  • Title — # R-<AREA>-NNN: <the decision as a short imperative phrase>.
  • Status — Accepted · <YYYY-MM-DD>, or Superseded by … / supersedes ….
  • Applies to — the exact file/dir globs the decision governs, e.g. `hexgate/guards/**`, `hexgate/adapters/**/tools.py`. This is what scopes the ADR: an agent loads it when touching those paths, so it is not always-on context. Be specific.
  • ## Decision — one or two imperative sentences, then MUST / MUST NOT bullets. Never "prefer" or "consider" — those let an agent do the opposite.
  • ## Why — the forces, the tradeoff, and what breaks if the rule is ignored. Spend words here. Name the concrete failure the decision avoids (an incident, a fail-open, a drift) if there is one.

Optional, when useful:

  • ## Consequences — what this enables or costs downstream (a cleanup job now required, a dev-env dependency, a follow-up deferred).
  • ## Rejected alternatives — the specific option you turned down and why.
  • ## Verify — a grep/lint/test the agent or CI can actually run to check the rule holds. Loading an ADR into a prompt is not enforcement; a check is.

Template

# R-AREA-00N: <decision as a short imperative phrase>

**Status:** Accepted · 2026-09-14
**Applies to:** `hexgate/<path>/**`, `platform/api/<path>/**`

## Decision

<One or two imperative sentences.> Then the specifics:

- <A MUST bullet — the rule, stated so an agent cannot read it two ways.>
- <A MUST NOT bullet — the thing this decision forbids.>

## Why

<The forces and the tradeoff. What breaks if this is ignored — name the concrete
failure (fail-open, drift, incident) the decision avoids. This is the part that
must not be compressed.>

## Consequences

- <What this now requires or costs elsewhere.>

## Rejected alternatives

- **<Option>** — <why it was turned down.>

## Verify

`<a grep / lint / test that checks the rule holds>`

Do / do-not

  • Do give the decision a stable id and cite it by id from other docs (a PR body, another ADR) instead of re-explaining it.
  • Do write MUST / MUST NOT, not "prefer / consider".
  • Do keep it under ~200 lines; the Why is where the words go.
  • Do add a Verify command whenever the rule is mechanically checkable.
  • Do not delete or rewrite a superseded record — supersede it and keep the chain.
  • Do not restate language/framework basics or anything the code already shows.

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.