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 entriesprior-owned downstream skill entries that no longer correspond to selected machine or project 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
Instruction deliveryConsent, root AGENTS.md block identity/ownership, and Claude adapter state without instruction text
Worker materializationLocal bundle/receipt identity, operation journal, project digests, verified vendor bytes, projection ownership, consent source, and removed tombstone
Project config — unknown servermcpServers references a server that is neither in the registry, standalone MCP inventory, nor the selected Worker closure
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 — invalid Worker rootA configured root cannot be parsed or matched against card.lock
Project config — unresolved Card refsA locked Card cannot be materialized from its immutable extraction
Card manifest — unavailable skillA consumed card's manifest references a skill name that does not resolve under the effective state
Machine Worker issuesInvalid V2 root/lock relationships, missing or changed locked Card bytes, or consent gaps
Machine projection conflictsForeign destinations or drift in prior-owned state; report-only
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.

Project JSON diagnostics include instructionDelivery. Block malformation, stale content/identity, missing consent, and ownership drift are errors that make doctor unhealthy. A missing or drifted Claude adapter is advisory or a warning unless canonical AGENTS.md delivery itself is blocked.

Project JSON also includes orgWorkerMaterialization. It is local-only and read-only: doctor does not contact an organization service or report readiness. An error-severity materialization issue makes doctor exit non-zero. Use the exact immutable handoff with drwn install --reconcile for owned repair, or drwn install --remove for owned cleanup; doctor never performs either action. See Status for the bounded materialization issue-code table.

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)
  • Machine Inventory — standalone package, MCP record, reference, and GC behavior