Skip to main content

Doctor

drwn doctor reports drift, broken links, missing generated files, and project-config issues without mutating anything. It is the read-only counterpart to drwn write.

Run a health check:

drwn doctor
drwn doctor --json

drwn doctor is project-aware: when run inside a configured project, the report scopes to that project's write record, generated dir, and overlay. Outside a project, the report is machine-scoped.

What it surfaces

CategoryDetail
Broken or missing skill entriesdrwn-owned skill entries in downstream skill directories whose content no longer exists
Stale skill entriesdrwn-owned downstream skill entries that no longer correspond to the desired set (curated + scope + card-source resolved skills)
MCP driftPer-target managed-content drift across Claude / Codex / Cursor, comparing recorded vs recomputed hashes for each managed field
Hook issuesA locked card declares hook policies but no hook consent has been recorded via drwn card trust
Project config — unknown serverserverOverrides references a server that is neither in the registry nor the user MCP library
Project config — unknown skillskills.include (or extensions.<name> derivations) references a skill that does not resolve in any layer
Project config — unknown extensionextensions.<name> references an extension drwn does not know
Project config — stale target overridetargets.<name> references a target drwn does not know
Project config — unknown cardA config.cards entry cannot be parsed or matched against card.lock
Project config — unresolved card refsA locked card cannot be materialized (missing extract, missing remote, etc.)
Card manifest — unavailable skillA consumed card's manifest references a skill name that does not resolve under the effective state
Store + write-record statusStore schema version, card count, and last-write record presence/corruption

Report-only by design

drwn doctor never mutates files. It is safe to run anywhere, including under DRWN_STORE_READONLY=1.

The unresolved skills.include case is split across two surfaces:

  • drwn write fails before any downstream mutation when a skills.include name does not resolve — this is a hard write-time contract.
  • drwn doctor reports the same condition as a diagnostic, so operators can see it without attempting a write.
  • Status — effective harness summary (use --why to trace why something is active)
  • Write — the mutating counterpart; --dry-run previews the same writes doctor reports drift against
  • Extensions doctor — extension-specific diagnostics (Parallel, Beads, MarkItDown)
  • Store status / verify — store-layer health