plan-doctor

Installation
SKILL.md

Plan Doctor Skill

Role: Post-hoc diagnostic for plan artifacts. Walks TASK-*.json files for one or all plans, scans title and description for lesson-ID-shaped tokens, verifies each token against the live manage-lessons inventory, and emits structured findings for any tokens that resolve to non-existent lessons.

In addition to the TASK-level lesson-ID sweep, scan --all also runs three plan-directory-shape diagnostics:

  • orphan-plan-directory — a subdirectory under .plan/local/plans/ that lacks status.json, or has status.json but none of request.md / references.json / solution_outline.md.
  • stuck-low-confidence-archive — a subdirectory under .plan/local/archived-plans/ whose status.json has metadata.confidence < 95 (or the project-configured threshold), every phase after 2-refine is pending, and metadata.archived_reason is absent.
  • dangling-worktree — a subdirectory under .plan/local/worktrees/ whose corresponding .plan/local/plans/{name}/ directory does not exist.

This skill complements the at-write-time validation in manage-tasks (which prevents new bad references) by sweeping plans that may already contain stale or phantom lesson-ID references introduced before the at-write check existed (or via direct file edits that bypassed manage-tasks).

Enforcement

Execution mode: Select scan or scan-task-file based on inputs and execute immediately.

Installs
1
GitHub Stars
5
First Seen
Jul 11, 2026
plan-doctor — cuioss/plan-marshall