Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.
This repository was archived by the owner on May 26, 2026. It is now read-only.

Add /cairn-doctor health-check command #65

Description

@SnowboardTechie

Problem / Motivation

cairn-notes has multiple moving parts: identity at ~/.claude/cairn/identity.md, Obsidian vaults under ~/notes/, .notes/ symlinks per repo, optional MCPs (Exa, Context7), registered skills and agents. When one quietly breaks — missing identity, broken symlink, vault moved, MCP not running — the failure mode is usually a confused subagent giving worse-than-baseline output rather than an explicit error.

The only existing diagnostic surface is /cairn-setup, which is geared at first-run bootstrap, not ongoing health verification. There is no equivalent of oh-my-openagent's doctor for "is everything wired up correctly right now?"

Proposed behavior

A /cairn-doctor slash command that runs a non-mutating health check across the plugin's runtime dependencies and reports a one-screen summary with status per check, plus a one-line next-step when a check fails.

Scope

In scope

  • Identity: ~/.claude/cairn/identity.md exists, parses, required fields present
  • Vaults: configured vault paths resolve and are writable; ~/notes/second-brain/ exists when expected
  • .notes/ resolution: trunk-resolution lands somewhere sensible from cwd, including from a worktree
  • Skills: each plugin skill's SKILL.md readable, has frontmatter
  • Agents: each agent file readable
  • Optional MCPs (Exa, Context7): report present / absent, not pass/fail (they're optional, not required)
  • Read-only — never repairs, only reports

Out of scope

  • Auto-repair (separate command if wanted later)
  • Network probes against MCP servers beyond "is it registered"
  • Vault-content validation (Obsidian / scribe concern, not health)

Implementation hints

  • Likely lives in plugins/cairn-notes/commands/cairn-doctor.md alongside cairn-setup.md
  • Reuse trunk-resolution from agent-workspace so the worktree case is exercised
  • Output terse: one line per check, status glyph, one-line next-step on failure
  • Should detect the failure mode in archivist: vault search fails from a worktree (trunk-resolution missing) #59 (archivist vault search broken from a worktree)

Acceptance criteria

  • /cairn-doctor runs to completion without mutating any file
  • Every check above surfaces pass / fail / optional status
  • When a check fails, output names the next step (file path, command, etc.)
  • Runs cleanly from both trunk and a worktree

Open questions

  • Slash command, skill, or both? Slash command feels right for a one-shot diagnostic; a skill might be more discoverable.
  • Should this auto-run at the end of /cairn-setup once identity is written?

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew featurequick winSmall, self-contained scope — good candidate for a focused sessionreframing-2026Touched by the capture-first reframing + rename to cairn-notes. See tracking issue.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions