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
| Category | Detail |
|---|---|
| Broken or missing skill entries | drwn-owned skill entries in downstream skill directories whose content no longer exists |
| Stale skill entries | prior-owned downstream skill entries that no longer correspond to selected machine or project skills |
| MCP drift | Per-target managed-content drift across Claude / Codex / Cursor, comparing recorded vs recomputed hashes for each managed field |
| Hook issues | A locked card declares hook policies but no hook consent has been recorded via drwn card trust |
| Instruction delivery | Consent, root AGENTS.md block identity/ownership, and Claude adapter state without instruction text |
| Worker materialization | Local bundle/receipt identity, operation journal, project digests, verified vendor bytes, projection ownership, consent source, and removed tombstone |
| Project config — unknown server | mcpServers references a server that is neither in the registry, standalone MCP inventory, nor the selected Worker closure |
| Project config — unknown skill | skills.include (or extensions.<name> derivations) references a skill that does not resolve in any layer |
| Project config — unknown extension | extensions.<name> references an extension drwn does not know |
| Project config — stale target override | targets.<name> references a target drwn does not know |
| Project config — invalid Worker root | A configured root cannot be parsed or matched against card.lock |
| Project config — unresolved Card refs | A locked Card cannot be materialized from its immutable extraction |
| Card manifest — unavailable skill | A consumed card's manifest references a skill name that does not resolve under the effective state |
| Machine Worker issues | Invalid V2 root/lock relationships, missing or changed locked Card bytes, or consent gaps |
| Machine projection conflicts | Foreign destinations or drift in prior-owned state; report-only |
| Store + write-record status | Store 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 writefails before any downstream mutation when askills.includename does not resolve — this is a hard write-time contract.drwn doctorreports the same condition as a diagnostic, so operators can see it without attempting a write.
Related
- Status — effective harness summary (use
--whyto trace why something is active) - Write — the mutating counterpart;
--dry-runpreviews 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