speckit.companion.living-drift

speckit.companion.living-drift is a command for Claude Code from alfredoperez/speckit-companion. It costs 26 tokens per session (826 once invoked), scanned A, original, MIT.

A read-only report that finds source files changed since each living specification was last committed. It also explains how each change became disconnected from its specification.

In plain words
What is it for?
Use it to review documentation drift for each registered capability, either manually or in a surrounding continuous-integration check.
Why use it?
It reveals when code has changed without the document describing that code being updated.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .specify/extensions/companion/scripts/drift.py.

Good fit Use it to review documentation drift for each registered capability, either manually or in a surrounding continuous-integration check.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/alfredoperez/speckit-companion
agentmods
npx agentmods add commands/alfredoperez/speckit-companion/speckit.companion.living-drift

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for speckit.companion.living-drift

README.md
[![agentmods](https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/speckit.companion.living-drift/github.svg)](https://agentmods.dev/commands/alfredoperez/speckit-companion/speckit.companion.living-drift)
Your own site
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/speckit.companion.living-drift"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/speckit.companion.living-drift/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for speckit.companion.living-drift

Your own site · 80×15
<a href="https://agentmods.dev/commands/alfredoperez/speckit-companion/speckit.companion.living-drift"><img src="https://agentmods.dev/badge/commands/alfredoperez/speckit-companion/speckit.companion.living-drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 826 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.00826
Opus 5 $0.00013 $0.00413
Sonnet 5 $0.00005 $0.00165
Haiku 4.5 $0.00003 $0.00083

Measured 2d ago against content hash 780c4aff730a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

speckit.companion.living-drift scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

speckit-extension/commands/speckit.companion.living-drift.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 python3 is 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.py

The 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 a specs/*/.spec-context.json changed 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:

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed 780c4aff730a
  2. 3d ago Changed 741b0d933efb
  3. 9d ago First seen · 54 lines · 26 tokens per session scan A c2d5bb092e69

Subscribe to this mod's changes

speckit.companion.living-drift is a command published in the GitHub repository alfredoperez/speckit-companion (90 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 826 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other commands, from other repositories

pr-ready

Run the project's pre-commit review loop to determine whether the current branch is ready to push — lint, tests, parallel pr-review-toolkit agents plus an over-engineering audit, fix-and-re-run until convergence.

costajohnt/oss-autopilot · 45 tokens

devs-team

Parallel multi-lens critique of a solution design (the active spec if present, else the decision brief). Dispatches 5 engineering lenses, merges findings, reports a verdict. Report-only, never blocks.

dwarvesf/dwarves-kit · 41 tokens

quiz-gate

The ★-tap NUDGE before merging a significant+worthy gate PR: a 5-question quiz built from the ACTUAL diff+tests, handed to the operator's configured teacher seam. Three logged responses (engage/defer/wave); advisory, never must-pass. Gates the human's attention, not the merge.

dwarvesf/dwarves-kit · 65 tokens

review

Multi-agent code review with parallel validation.

Joncik91/ucai · 7 tokens

pr-feedback-ingest

Turn PR feedback (Greptile, CI, bots, humans) into a structured traceable backlog aligned with TASKSTATE.md, DECISIONS.md, and IMPLEMENTATIONPLAN.md so the next execution step can be a narrow implement-approved-slice or a small planning touch without losing alignment. Corrective scope only. Use when a PR is open or…

Mozurok/fhorja.dev · 230 tokens

review-hard

Review the current task changes for real correctness, safety, and maintainability risks before slice closure or PR prep, and recommend the smallest safe next step. Surfaces meaningful issues (not cosmetic feedback); not a replacement for external review systems. Returns no-op when the review would not materially…

Mozurok/fhorja.dev · 176 tokens