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.
In this repository15 other files it gives its agents.
- adr-distillSkill
- adr-newSkill
- adr-reviewSkill
- adrSkill
- best-promptingSkill
- code-principlesSkill
- commitSkill
- create-skillsSkill
- fixSkill
- microcopySkill
- prSkill
- research-firstSkill
- simple-writingSkill
- test-auditSkill
- writingSkill
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
- Very specific: line 11
Create or adopt the ADR setup.
- Very specific: line 19
Find existing ADRs: Look for docs/adr, doc/adr, docs/adrs, docs/decisions, docs/architecture/decisions, adr, adrs, and any folder that the …
- Very specific: line 30
If a README exists without the <!-- ADR-INDEX:START --> markers, add the marker block at the end.
- Very specific: line 51
Do not move existing docs between kinds.
- Distinctive: line 67
Offer wiring. Do not impose it: Use AskUserQuestion if it is available.
- Very specific: line 73
add the snippet that python3 "${CLAUDE_PLUGIN_ROOT}/skills/adr/scripts/validate-adrs.py" --print-setup prints to the chosen place, in the …
- Very specific: line 79
Never write into .git/hooks without explicit approval.
- Distinctive: line 92
Do not convert existing ADRs to the plugin template.
- Very specific: line 93
Do not add the snippet two times.
- Very specific: line 94
Do not create docs/adr when ADRs already live in a different folder.
≈ “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.
Files
/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
- 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 matchNNNN-*.md, adopt it: keep its folder, numbering, and format (frontmatterstatus: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. - Create only what is missing. The target folder is the adopted folder,
--dir, ordocs/adr. Create each file only if it is absent:README.mdfrom${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.mdfrom${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/adr-template.md. Skip it if the repository already has its own template (any*template*.mdor0000-*.mdin the folder).known-debt.mdfrom${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/known-debt.md. Completion:lsof the folder shows all three files. For each file, you said if it existed before or if you created it.
- 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 createdocs/policies/anddocs/procedures/. On yes, create in each folder only what is missing:README.mdfrom${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/policy-index.mdorprocedure-index.md(add the marker block to an existing README that has no markers);template.mdfrompolicy-template.mdorprocedure-template.mdin 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.
- Agent pointer. Unless
--no-snippet: pickCLAUDE.mdif it exists, elseAGENTS.mdif it exists, else createAGENTS.md. If the file already contains<!-- ADR:START -->, do nothing. Otherwise, add the block from${CLAUDE_PLUGIN_ROOT}/skills/adr/templates/agents-snippet.mdat the end, and replacedocs/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. - 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 checksdocs/policies/anddocs/procedures/when they exist. - 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-setupprints 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 stillproposedfails 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/hookswithout explicit approval.
- Report. List the created files, adopted conventions, skipped steps, and the
next command:
/bipbop-skills:adr-distillfor an existing codebase,/bipbop-skills:adr-newfor 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/adrwhen ADRs already live in a different folder.
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.

