speckit-companion-living-drift
Skill0 starsChanged 50 days agoMITView on GitHub
Report living-spec drift — per capability, the source files changed since the spec was last committed (opt-in, never halts)
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-doctorSkill
- speckit-companion-implementSkill
- speckit-companion-living-adoptSkill
- speckit-companion-living-coverageSkill
- 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
4 rules. About 0 are common, 2 are distinctive, and 2 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.
2
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 drift detector from the repository root:
≈ “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
Spec Drift
Show, for each living-spec capability, the source files that changed since that capability's spec was last committed — and how each one slipped. A living spec only stays honest if changes to its area flow back into it; this command surfaces the ones that didn't. Read-only — it never edits anything, and it never fails (always exits success). A surrounding workflow or CI may treat findings as a gate; the command itself does not.
This is opt-in. With living specs disabled (or no config), it reports nothing and exits clean.
Prerequisites
- Verify Python is available by running
python3 --version. - If
python3is not available, warn the user and skip:[companion] Warning: python3 not detected; skipped drift. Do not fail the host command.
Execution
Run the drift detector from the repository root:
python3 .specify/extensions/companion/scripts/drift.pyThe script reads the capability registry (living-specs.yml), reuses the
resolver for capability membership, and uses git to find what changed since each
capability's capabilities/<name>/<name>.spec.md was last committed. Each drifted file
is classified:
tracked— the file went through the Companion pipeline (it appears in aspecs/*/.spec-context.jsonchanged set) but was never folded back into the living spec → a missed sync.unspeced— the file changed entirely outside the pipeline; the living spec never saw it. The more concerning of the two.
Files matching any glob in the registry's exempt list (default *.config.*, *.test.*, **/migrations/**) are filtered out. A capability whose spec is not yet committed is skipped with an informational note, and the run ends on a counts line — e.g. 0 checked, 2 skipped (spec.md not yet committed) — so a check that examined nothing never reads as clean. The ✓ All N checked capabilities in sync. line is reserved for a run that checked at least one capability and found it clean.
Add --working (opt-in) to also see the working tree: uncommitted edits, deletions, and untracked files then count as drift alongside the committed history. The contract is unchanged — same checked/skipped counts semantics, same never-fails exit 0 — and without the flag the report reads committed history only, exactly as before:
python3 .specify/extensions/companion/scripts/drift.py --workingAdd --json for a machine-readable object (used by tooling/CI). It carries a checked count alongside the capabilities and skipped lists, so a caller can tell "clean" from "did not run" — the exit code stays 0 either way — plus a working boolean naming which mode produced it:
python3 .specify/extensions/companion/scripts/drift.py --jsonWhat to do with the report
Drift is a signal, not an error. To fold the reported changes back in one pass, run speckit.companion.living-sync — the write-side twin of this report (it consumes the same --working computation). Otherwise, for each unspeced or tracked row, either fold the change into the living spec by hand (e.g. run speckit.companion.living-adopt for the area, or write a delta spec) or add the path to the registry's exempt list if it shouldn't be tracked. The command never blocks the pipeline on its own.
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.

