agentleFS
BipBop-LabsBipBop-Labs/bipbop-skills/skills/adr-init/SKILL.md

adr-init

Skill3 starsChanged 5 days agoMITView on GitHub

Set up Architecture Decision Records in the current repository (folder, template, index, known-debt log, CLAUDE.md or AGENTS.md pointer, optional validation hook), and optionally policy and procedure folders. Use when the user runs /bipbop-skills:adr-init or asks to add, bootstrap, or wire up ADRs, policies, or procedures. A second run changes nothing, and the skill adopts existing folders.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    Create or adopt the ADR setup.

    line 11
  2. Very specific:

    Find existing ADRs: Look for docs/adr, doc/adr, docs/adrs, docs/decisions, docs/architecture/decisions, adr, adrs, and any folder that the …

    line 19
  3. Very specific:

    If a README exists without the <!-- ADR-INDEX:START --> markers, add the marker block at the end.

    line 30
  4. Very specific:

    Do not move existing docs between kinds.

    line 51
  5. Distinctive:

    Offer wiring. Do not impose it: Use AskUserQuestion if it is available.

    line 67
  6. Very specific:

    add the snippet that python3 "${CLAUDE_PLUGIN_ROOT}/skills/adr/scripts/validate-adrs.py" --print-setup prints to the chosen place, in the …

    line 73
  7. Very specific:

    Never write into .git/hooks without explicit approval.

    line 79
  8. Distinctive:

    Do not convert existing ADRs to the plugin template.

    line 92
  9. Very specific:

    Do not add the snippet two times.

    line 93
  10. Very specific:

    Do not create docs/adr when ADRs already live in a different folder.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

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

/bipbop-skills:adr-init

Create or adopt the ADR setup. A second run must change nothing. Standing rules: the adr skill (../adr/SKILL.md).

Arguments: $ARGUMENTS. --dir <path> overrides the folder. --no-snippet skips the CLAUDE.md/AGENTS.md edit. --no-rule-docs skips step 3b.

Procedure

  1. Find existing ADRs. Look for docs/adr, doc/adr, docs/adrs, docs/decisions, docs/architecture/decisions, adr, adrs, and any folder that the README links as ADRs or decisions. If one of them has files that match NNNN-*.md, adopt it: keep its folder, numbering, and format (frontmatter status: or inline **Status:**). Report what you found and which convention you will follow. Do not rewrite existing ADRs. Report legacy terminal statuses, replacement chains, and mandatory history sections as incompatible with the current policy. Propose a separate scoped cleanup.
  2. Create only what is missing. The target folder is the adopted folder, --dir, or docs/adr. Create each file only if it is absent:
    • README.md from ${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/readme-index.md. If a README exists without the <!-- ADR-INDEX:START --> markers, add the marker block at the end. Do not replace the file.
    • template.md from ${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/adr-template.md. Skip it if the repository already has its own template (any *template*.md or 0000-*.md in the folder).
    • known-debt.md from ${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/known-debt.md. Completion: ls of the folder shows all three files. For each file, you said if it existed before or if you created it.
  3. Rebuild the index rows between the markers from the ADR files that are present (ID, title, status, date, paths). If an adopted index has no markers, do not change it, and say so. 3b. Policies and procedures. Unless --no-rule-docs: look for the folders that the repository already uses for policies, standards, conventions, runbooks, or procedures, and adopt them. If there are none, ask if you can create docs/policies/ and docs/procedures/. On yes, create in each folder only what is missing:
    • README.md from ${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/policy-index.md or procedure-index.md (add the marker block to an existing README that has no markers);
    • template.md from policy-template.md or procedure-template.md in the same templates folder. Do not move existing docs between kinds. List candidates for the user and point to the routing test in ../adr/SKILL.md.
  4. Agent pointer. Unless --no-snippet: pick CLAUDE.md if it exists, else AGENTS.md if it exists, else create AGENTS.md. If the file already contains <!-- ADR:START -->, do nothing. Otherwise, add the block from ${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/agents-snippet.md at the end, and replace docs/adr/ with the real folder. Remove the policies and procedures paragraph when step 3b created neither folder. Use the real folder names when step 3b adopted different folders. If the file holds an older ADR block, offer to replace it with the new block. If the file restates rules that a policy holds, offer to replace each rule with one line that names the policy. Show the diff to the user.
  5. Validation. Run python3 "${CLAUDE_PLUGIN_ROOT}/skills/adr/scripts/validate-adrs.py" --adr-dir <folder>. Report its output. With zero ADRs, it exits 0 with a warning. That is correct. It also checks docs/policies/ and docs/procedures/ when they exist.
  6. Offer wiring. Do not impose it. Use AskUserQuestion if it is available. Otherwise, ask in plain text: copy the validator into the repository and add it as a pre-commit hook, a CI step, or both? Options: pre-commit framework, plain git hook, GitHub Actions step, none. On yes:
    • cp "${CLAUDE_PLUGIN_ROOT}/skills/adr/scripts/validate-adrs.py" scripts/validate-adrs.py (or the folder where the repository keeps scripts; ask if it is not clear);
    • add the snippet that python3 "${CLAUDE_PLUGIN_ROOT}/skills/adr/scripts/validate-adrs.py" --print-setup prints to the chosen place, in the existing config style. The CI snippets run --strict --fail-on-proposed. Thus a pull request with an ADR that is still proposed fails until a person accepts the ADR or removes the rejected draft. Keep that flag out of pre-commit hooks. Tell the user. Never write into .git/hooks without explicit approval.
  7. Report. List the created files, adopted conventions, skipped steps, and the next command: /bipbop-skills:adr-distill for an existing codebase, /bipbop-skills:adr-new for a new one.

Idempotency check

A second run of /bipbop-skills:adr-init must give "nothing to do" for each step. If a step would change a file on the second run, you applied steps 2 to 4 incorrectly. Fix the approach, not the file.

Pitfalls

  • Do not convert existing ADRs to the plugin template.
  • Do not add the snippet two times. The <!-- ADR:START --> marker is the guard.
  • Do not create docs/adr when ADRs already live in a different folder.

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.