Reference

Doctor JSON contract

Every field and every check kind in rig doctor --json.

rig doctor --json

The output is the canonical machine-readable readiness state for the current rig workspace. Schema below.

Top-level

FieldTypeWhat
schema_versionintCurrent: 1. Bumped on breaking changes.
generated_atstring (ISO-8601)Timestamp of the doctor run.
okbooleantrue if every required check passes.
manifestobjectParsed rig.toml (as JSON).
configobjectEffective configuration (resolved [package].include etc.).
rigobjectname, author, version, runtime.
pathsobjectResolved paths to key files (see below).
summaryobjecttotal_checks: int, gaps: int.
checksarrayEvery check, ok or not.
gapsarrayThe subset of checks where required: true and ok: false.

paths

KeyWhat
manifestPath to rig.toml.
instancePath to .rig/instance.toml (may be missing for un-installed workspaces).
setup_cachePath to .rig/setup.json (cached doctor output from last rig install).
claude_skillPath to project-level .claude/skills/rig/SKILL.md.
mcpPath to MCP config (typically .mcp.json).

Check entries

Every entry in checks[] (and the subset in gaps[]):

{
  "id": "string",
  "kind": "dir | env | tool | mcp | plugin | permissions | collab",
  "name": "string",
  "required": true,
  "ok": false,
  "status": "ok | missing | found | not_on_path | not_declared | …",
  "message": "string",
  "remediation": {
    "action": "string",
    "command": "string"
  }
}

Per-kind status values

dir

statusmeaning
foundDirectory exists.
missingDirectory doesn't exist.

Remediation command: mkdir -p <path>. Safe for agents to run unprompted.

env

statusmeaning
okVariable is set (in target file or process.env).
missingVariable not set anywhere.

Remediation: typically an interactive prompt for value, or pointer to the [env].template file.

tool

statusmeaning
okCLI is on PATH.
not_on_pathCLI absent.

Remediation: install URL when known (e.g. https://astral.sh/uv for uvx).

mcp

statusmeaning
okServer declared in .mcp.json (and, if probed, launchable).
not_declaredServer expected by manifest but absent from .mcp.json.
not_launchableServer declared but the launch command failed.

Remediation: the launch command, or a pointer to fix the MCP config.

plugin

statusmeaning
okPlugin appears to be installed (heuristic).
not_installedPlugin not detected.

Advisory only — Claude Code plugin install isn't yet automated, so gaps of kind plugin are surfaced but don't make ok: false.

permissions

statusmeaning
okDeclared [permissions] are in .claude/settings.json.
out_of_syncDeclared rules not yet merged (run rig install).

collab

Only present when [sync] is in the manifest. Sub-checks:

namestatusmeaning
tapdok, not_on_path, version_mismatchDaemon binary.
bindingok, not_initialised.rig/tap-binding.local.json valid.
daemonrunning, stoppedProcess state.
syncidle, pulling, conflicts, apply_errors, offlineSync state.

Remediation for each typically points at a rig workspace command (e.g. rig resume, rig status).

summary

{
  "total_checks": 12,
  "gaps": 2
}

Exit code

The CLI exits non-zero if summary.gaps > 0. Useful in scripts:

rig doctor || exit 1

Schema version

Currently 1. Future versions may add fields (forward-compatible) or restructure (in which case schema_version bumps). Read carefully if you're building tools on top.

See also