Skip to main content
ClaudeWave
Slash Command2.4k estrellas del repoactualizado today

obsidian-adr

The obsidian-adr command generates Architecture Decision Records when vault structure changes, capturing the context, alternatives considered, and rationale behind organizational decisions. Use this when reorganizing folders, promoting notes to hub status, adopting new conventions, or graduating projects to prevent the vault from becoming opaque about its own design choices.

Instalar en Claude Code
Copiar
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/eugeniughelbur/obsidian-second-brain/HEAD/commands/obsidian-adr.md -o ~/.claude/commands/obsidian-adr.md
Después abre una sesión nueva de Claude Code; el slash command carga automáticamente.

obsidian-adr.md

Use the obsidian-second-brain skill. Execute `/obsidian-adr $ARGUMENTS`:

The optional argument is the decision topic. If not provided, infer from recent conversation context. To surface decisions already made in code but never recorded, run `python scripts/mine_commit_decisions.py --repo <project> --json` from the skill repo - it scans git history for decision-shaped commits ("switch to", "replace", "adopt", "rename", "migrate") and returns ADR candidates you can write up here.

1. Read `_CLAUDE.md` first if it exists in the vault root
2. Identify the structural decision:
   - From the argument, or from recent conversation (e.g., a project was graduated, a folder was reorganized, a new convention was adopted, a concept was promoted to hub status)
3. Create a decision record at `Knowledge/ADR-YYYY-MM-DD — Title.md`:

   ```yaml
   ---
   date: YYYY-MM-DD
   tags:
     - decision-record
   status: accepted
   ---
   ```

   Structure:
   - **Decision**: one-line summary of what was decided
   - **Context**: what prompted this decision - the problem or trigger
   - **Options Considered**: 2-3 alternatives that were evaluated
   - **Rationale**: why this option was chosen over the others
   - **Consequences**: what changes as a result - what notes were created, moved, or restructured
   - **Related**: links to affected project notes, people, or ideas

4. Update the relevant project note's Key Decisions section with a link to the ADR
5. Update `index.md` with the new ADR
6. Append to the operation log: if `Logs/` exists write `**HH:MM** - adr | Title - decision recorded` to `Logs/YYYY-MM-DD.md`; otherwise append `## [YYYY-MM-DD] adr | Title — decision recorded` to `log.md`
7. Link from today's daily note

Decision records prevent the vault from becoming a black box. When the user (or a future Claude session) asks "why is the vault structured this way?" - the ADR has the answer.

This command can also be triggered automatically by other commands: when `/obsidian-graduate` promotes an idea, when `/obsidian-health` recommends a structural fix, or when the user reorganizes folders. In those cases, offer to create an ADR - don't force it.

---

**AI-first rule:** Every note created or updated by this command MUST follow `references/ai-first-rules.md` - `## For future Claude` preamble, rich frontmatter (`type`, `date`, `tags`, `ai-first: true`, plus type-specific fields), recency markers per external claim, mandatory `[[wikilinks]]` for every person/project/concept referenced, sources preserved verbatim with URLs inline, and confidence levels where applicable. The vault is for future-Claude retrieval - not human reading.

**Anti-fabrication:** Search exhaustively before claiming any note, person, or file is absent - false absence is the most common failure mode - and never invent facts, entities, or dates (mark unknowns as `TBD`). See the anti-fabrication and search-completeness hard rules in `references/ai-first-rules.md`.