Reverse-engineer a legacy codebase into ATDD-ready, traceable specifications
69
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Read .doc-this/state.json and .doc-this/plan.md.
Read the installed plugin version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json (.version field). Compare with state.json.plugin_version:
state.json.plugin_version is null (legacy state file): proceed silently."⚠️ Doc-This: state was created on plugin v<old>, currently running v<new>. Resume continues; rerun a phase with --regenerate=<phase> if you want it re-done under the new version." — then proceed. Do NOT block.After the check, write the current plugin version into state.json.plugin_version so subsequent resumes compare against the up-to-date stamp.
If state.json.structural_extraction exists:
ToolSearch("select:LSP") to ensure the deferred tool is loaded in this session. Run a quick documentSymbol on a known file to verify LSP is still responsive. Update lsp_available if it changed.ua_detected is true, compare ua_commit_hash with current git rev-parse HEAD. Update ua_staleness flag. If UA was stale before and now matches HEAD (user re-ran /understand), clear the staleness flag.If structural_extraction does not exist (legacy state from before this feature), run the full check from step-01-first-run.md step 4a.
Say: "[Name], welcome back to Doc-This."
Show:
completed field)phase field) with the last checkpoint recordedpending field)Example:
"Progress so far: ✅ Reconnaissance done 🔄 Analysis in progress — modules
billingandinvoicinganalyzed;paymentsandreportspending. Coverage: 1720/2000 source files; 280 pending, resuming atsrc/payments/refund_form.aspx⏳ Interpretation, Synthesis, Generation, Review"
If state.json.coverage exists and files_pending > 0: resume the Code Analyst from coverage.cursor (module + next_file) — the ledger (.doc-this/context/coverage-ledger.json) is append-only, so the unread set is always manifest source ∖ ledger. Include the coverage line in the progress summary (above).
If coverage is absent and the run is past reconnaissance, this is a legacy (pre-coverage) run — mention once: "This run predates Total Source Coverage; /doc-this --backfill-coverage brings it into compliance."
If legacy_runnable is absent or null (legacy state from before this field), ask the
step-01 §2a question once and persist the answer. Never re-ask when set.
If database_ownership is null and Scout has completed (Scout is always before step-04), prompt to run step-04 before continuing. Otherwise carry on.
If answer_mode = "file":
"Reminder: your answers to the gap questions go in
.doc-this-sdd/questions.md. Let me know when you're done."
If answer_mode = "chat" (default), no extra prompt.
Ask only: "Continue from where we left off? (CONTINUE to proceed)"
After confirmation, resume the next pending task in .doc-this/plan.md.
🚫 Do NOT offer /clear + /doc-this here. The user just resumed a fresh session; suggesting they clear and reopen is redundant. The preventive-pause prompt (described in SKILL.md under "Preventive pause between heavy steps") only fires after an agent completes work in this session — never on the resume greeting itself.
See references/checkpoint-guide.md for state.json write rules.
.tessl-plugin
hooks
skills
doc-this
references
scripts
doc-this-architect
references
doc-this-code-analyst
references
doc-this-data-master
doc-this-design-system
doc-this-detective
references
doc-this-help
doc-this-promote
doc-this-reviewer
doc-this-scout
doc-this-tracer
doc-this-viewer
doc-this-visor
doc-this-writer