speckit-companion-doctor
Skill0 starsChanged 50 days agoMITView on GitHub
Report on a spec's run health — unfinished steps, unjournaled tasks, step bleed, drift you can judge, a step that closed having verified nothing, a step that closed without the file it promised, and why completion did not land (read-only, retroactive, never halts)
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- monicahq/monicaedited, first seen Nov 29, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- monicahq/monica★ 26k83% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- speckit-analyzeSkill
- speckit-assess-decideSkill
- speckit-assess-defineSkill
- speckit-assess-intakeSkill
- speckit-assess-researchSkill
- speckit-assess-shapeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-companion-after-convergeSkill
- speckit-companion-after-implementSkill
- speckit-companion-after-planSkill
- speckit-companion-after-specifySkill
- speckit-companion-after-tasksSkill
- speckit-companion-autoSkill
- speckit-companion-before-convergeSkill
- speckit-companion-before-stepSkill
- speckit-companion-classifySkill
- speckit-companion-implementSkill
- speckit-companion-living-adoptSkill
- speckit-companion-living-coverageSkill
- speckit-companion-living-driftSkill
- speckit-companion-living-moveSkill
- speckit-companion-living-showSkill
- speckit-companion-living-syncSkill
- speckit-companion-living-validateSkill
- speckit-companion-mark-completeSkill
- speckit-companion-planSkill
- speckit-companion-resumeSkill
- speckit-companion-specifySkill
- speckit-companion-statusSkill
- speckit-companion-tasksSkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Verify Python is available by running python3 --version.
- Very specific: line 19
If python3 is not available, warn the user and skip: [companion] Warning: python3 not detected.
- Distinctive: line 21
Do not fail the host command.
- Distinctive: line 25
Run the doctor from the repository root.
- Very specific: line 38
Add --json for the machine-readable report (stable top-level keys: checks, findings, bleed, drift, completion, chat), and --chat for the …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pipeline Doctor
Say what actually happened in a run — and where the record, the display, or the run's own claim is at fault. Everything here is recomputed, never read off a prior verdict: a run that claimed it was drift-clean gets checked against a fresh drift computation, not believed.
Read-only. It creates, modifies, and deletes nothing. Never halts — it always exits 0, and a check that crashes becomes that check's skip reason while the rest still run. Retroactive — every core check derives from .spec-context.json and the spec's own documents, so it produces a meaningful verdict on a spec created long before this command existed.
Prerequisites
- Verify Python is available by running
python3 --version. - If
python3is not available, warn the user and skip:[companion] Warning: python3 not detected; skipped doctor. Do not fail the host command.
Execution
Run the doctor from the repository root. With no argument it examines the active spec, resolved the same way every capture call resolves it:
python3 .specify/extensions/companion/scripts/doctor.pyName a spec explicitly, or sweep every spec in the repository:
python3 .specify/extensions/companion/scripts/doctor.py --feature-dir specs/<NNN>-<slug>
python3 .specify/extensions/companion/scripts/doctor.py --allAdd --json for the machine-readable report (stable top-level keys: checks, findings, bleed, drift, completion, chat), and --chat for the deep transcript audit described below.
What it checks
Each check reports whether it ran, was skipped (always with a reason), or is not applicable. A check that could not look never prints as clean — the summary counts checks, not just findings.
- record — steps that started and never finished, tasks checked off in
tasks.mdwith no journal entry, task finishes clustered into one burst (journaling that was batched, so the per-task durations mean nothing), and steps closed by the wrong author. - triage — the "status says one thing, the pipeline bar offers another" symptom, resolved into exactly one of two verdicts: records disagree with each other (a capture defect — the stepper is derived from
history[], so a missing step-level complete is why it will not advance) or records are consistent (look at the display). - bleed — where one step did the next step's work: plan content in the spec, a task checklist in the plan, implementation code in the task list, one task list living in two documents, source files committed before implement started, and a pre-implement step that outlasted implement itself.
- drift — re-runs the drift computation and shows its work: which capability, which files, which commits. Every flag is classified real, self-inflicted (the only changes are records the companion writes during a run), suspect baseline (the comparison commit is not an ancestor of
HEAD, or the change is a rename git can follow), or unknown (the baseline could not be reached — never reported as clean). A recorded drift-clean claim the recomputation contradicts is reported as a false claim, with both sides and their timestamps. - completion — when a spec did not land as
completed, which of four things happened: the write was refused (with the writer's own reason), it reported success and never arrived, it landed and the display disagrees, or completion was never attempted at all. - verification — whether the run actually executed anything before implement closed. Running the project's own checks is an instruction with nothing observing it, so a run can write code, tick off a task naming a test, and finish having proven nothing. An implement step that closed with no executed check recorded against the run is reported. A spec that never reached implement reports no record, never a problem.
- artifact — whether each step left behind the file it declared it would write. Every author node names its output in
writes:, and the build collects those into a manifest of what a run of this pipeline must produce; a step that quietly stops writing its document otherwise closes exactly like one that wrote it. Reported as a warning, never a gate: the manifest describes the pipeline as built today, and a spec on disk may have been produced by an earlier one. An artifact the size budget is allowed to fold away is not judged, and a step that produced none of what this pipeline declares reports no record — it ran some other pipeline. - template — whether
tasks.mdstill has the shape it was generated with: user-story phases containing waves,⟶ Waitjoin lines and checkpoints intact. A file whose story sections were renamed or flattened is reported with the offending headings named. - trace — what the run self-trace recorded: capture calls that failed and why, call counts, payload sizes, and how many times each file was rewritten. Calls that could not resolve a spec at all land in the repo-level unattributed log and are reported here too, because a spec whose own trace is clean is not evidence that nothing broke while it was being built. The marker naming calls that succeeded but could not be written to the trace is read before the check decides a spec has no trace evidence — a run that could not write into its spec directory has no trace file at all, and that is precisely the run with something to report.
- chat (only with
--chat) — reads the AI session transcript covering the run's recorded time window and explains causes: work tried and failed, work retried, and steps that stopped rather than failed. It surfaces claims the run made that the recomputation contradicts, and quantifies waste — narration, repeated commands, the same file rewritten over and over. Claude-first; on a provider that keeps no transcript it prints one line and exits successfully. The transcript format is not a stable contract, so treat this as a builder's tool, not a product promise.
The self-trace
Every capture and drift call records itself to specs/<NNN>/.trace.jsonl — one line, success or failure, with the reason verbatim. This costs no extra call and adds nothing to any command body; the scripts the pipeline already runs write it from the inside. The file is size-capped, ignores itself on first write, and is read by nothing but this command. Deleting it is safe; a missing trace is a skipped check, never an error.
Debug mode
Setting debug: true in .specify/companion.yml is read by the body renderers, but the renderers are build-time tools and are not part of a release — so on an installed project this switch currently does nothing. Treat it as a maintainer tool: from a source checkout, python3 speckit-extension/scripts/build.py --debug renders the bodies with per-section timing instrumentation, and a plain rebuild removes it again. Never commit an instrumented body.
To instrument a run on an installed project today, attach the instruction as a node hook in your own .specify/companion.yml — that mechanism ships and takes effect on the next dispatched command. See the debug-timing hook in this repository's own config for the wording.
Reporting
Report the doctor's output as it stands. Do not fix what it finds as part of running it — the doctor reports, and acting on a finding is a separate, deliberate decision. If it finds nothing, say so along with which checks were skipped and why, so "clean" is never mistaken for "did not look".
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

