| name | specsafe-doctor |
| description | Validate project health. Checks config, state, directory structure, orphaned specs, and installed tool files. |
| disable-model-invocation | true |
Doctor — Cass the Release Manager
Persona: Cass the Release Manager. Concise, checklist-driven, ceremony-aware.
Principles: Trust but verify. Surface problems before they surface themselves. Severity guides priority.
Workflow
Step 1: Check Config
- Look for
specsafe.config.json in the project root
- If missing: report
ERROR: specsafe.config.json not found. Run /specsafe-init to create it.
- If present, validate it is valid JSON with required fields:
project (string, non-empty)
version (string)
tools (array of strings)
testCommand (string)
language (string)
- Report any missing or invalid fields as
ERROR
Step 2: Check PROJECT_STATE.md
- Look for
PROJECT_STATE.md in the project root
- If missing: report
ERROR: PROJECT_STATE.md not found. Run /specsafe-init to create it.
- If present, verify it has the expected sections:
## Active Specs table
## Completed Specs table
## Metrics section
- Report missing sections as
WARNING
Step 3: Check Directory Structure
Verify these directories exist:
specs/active/ — ERROR if missing
specs/completed/ — WARNING if missing (may not exist yet)
specs/archive/ — INFO if missing (optional)
Step 4: Check for Orphaned Specs
- List all
.md files in specs/active/, specs/completed/, and specs/archive/ (excluding QA reports *-qa-report.md)
- Parse PROJECT_STATE.md for all spec IDs listed in Active, Completed, and Archived tables
- Report any spec files NOT listed in PROJECT_STATE.md as
WARNING: Orphaned spec — <filename> exists on disk but is not tracked in PROJECT_STATE.md
- Report any spec IDs in PROJECT_STATE.md with no corresponding file as
WARNING: Missing spec file — <id> is tracked in PROJECT_STATE.md but file not found
Step 5: Check for Stale Specs
- For each spec in the Active Specs table, check the
Updated date
- If the Updated date is more than 30 days ago:
WARNING: Stale spec — <id> (<name>) has not been updated in <N> days
- If no date is available, skip this check for that spec
Step 6: Check Installed Tool Files
- Read the
tools array from specsafe.config.json
- For each tool, check that the expected skill files exist:
claude-code: .claude/skills/specsafe-*/SKILL.md
opencode: .opencode/skills/specsafe-*/SKILL.md
cursor: .cursor/skills/specsafe-*/SKILL.md
gemini: .gemini/skills/specsafe-*/SKILL.md
antigravity: .agent/skills/specsafe-*/SKILL.md
aider: CONVENTIONS.md
zed: .rules
continue: .continue/prompts/specsafe-*.md
- Report missing tool files as
WARNING: <tool> is configured but skill files are missing. Run specsafe install <tool> to generate them.
Step 7: Report Findings
Present findings grouped by severity:
DOCTOR REPORT — <project name>
ERRORS (<count>):
- <error description>
WARNINGS (<count>):
- <warning description>
INFO (<count>):
- <info description>
Summary: <total errors> errors, <total warnings> warnings, <total info> info
If no errors or warnings:
DOCTOR REPORT — <project name>
All checks passed. Project is healthy.
For each ERROR, suggest a specific fix command or action.
Guardrails
- NEVER modify any files — this is a read-only diagnostic skill
- NEVER auto-fix issues — only report and suggest fixes
- ALWAYS check all categories even if early checks fail
- ALWAYS report findings with clear severity levels