staleness-check

staleness-check is a command for Claude Code from jonathanmr22/pact. It costs 0 tokens per session (921 once invoked), scanned A, original, MIT.

A command that checks whether recent code edits have made project documentation and governance records out of date.

In plain words
What is it for?
Use it to review edited files, compare them with schema documents and feature-flow records, and identify governance artifacts that need updating.
Why use it?
It helps catch missing updates after changes to databases, APIs, services, or other important files before work is marked complete.

Command for Claude Code

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

Good fit Use it to review edited files, compare them with schema documents and feature-flow records, and identify governance artifacts that need updating.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jonathanmr22/pact/staleness-check
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jonathanmr22/pact

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 staleness-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/jonathanmr22/pact/staleness-check/github.svg)](https://agentmods.dev/commands/jonathanmr22/pact/staleness-check)
Your own site
<a href="https://agentmods.dev/commands/jonathanmr22/pact/staleness-check"><img src="https://agentmods.dev/badge/commands/jonathanmr22/pact/staleness-check/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 staleness-check

Your own site · 80×15
<a href="https://agentmods.dev/commands/jonathanmr22/pact/staleness-check"><img src="https://agentmods.dev/badge/commands/jonathanmr22/pact/staleness-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 921 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.00000 $0.00921
Opus 5.5 $0.00000 $0.00368
Sonnet 5.5 $0.00000 $0.00184
Haiku 4.5 $0.00000 $0.00092

Measured 1mo ago against content hash ab36cc477852, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

staleness-check 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 1mo 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.

templates/commands/staleness-check.md · 73 lines

How it starts

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

Check what governance artifacts went stale based on what was edited this session.

This is the TEMPORAL governance check — it answers: "What docs did my changes just make stale?" Run it before declaring a task complete.

Steps

  1. Read .claude/memory/file_edit_log.yaml to find files edited today.

  2. For each edited file, check ripple effects against the project's governance layer:

    If a file in lib/database/, models/, tables/, schema/, or migrations/ was edited (database/schema-touching code):

    • Is the schema doc current? (knowledge/schema.{yaml,md} or whatever your project uses)
    • Was a new column added but FK targets/indexes/constraints not documented?
    • If the table is claimed by any feature_flows/*.yaml, is that flow's participating_files and invariants still accurate?

    If a service/handler/api/endpoint file was edited:

    • If it's a critical-system service (auth, encryption, sync, payments, broadcast, or any flow tagged critical in your project's feature flow inventory), check the matching feature_flows/{system}_flow.yaml "last_updated" date — is it today? Are participating_files and declared_dependencies current?

    If a new screen / view / route was added:

    • Is it claimed by the relevant feature flow's participating_files?
    • If the screen lives in a critical user journey, is there a flow doc for it at all?

    If any feature flow was edited:

    • Is the "last_updated" date today?
    • Do declared_dependencies between flows still resolve to existing flow files?
    • If you removed a participating_files entry, did you confirm the file is genuinely no longer part of the flow (vs. just renamed)?

    If a Postgres / Supabase function / Edge Function / API route source was edited:

    • Is the function listed in knowledge/tech_stack.yaml (or your equivalent) under the relevant section?
    • Is the relevant feature flow's participating_files updated?
  3. Check feature flow freshness overall — flag any flow whose last_updated is >7 days ago AND whose participating_files were touched this session.

  4. If your project has an automated schema-drift detector (e.g., scripts/check_schema_drift.py), check its last run from scripts/RUN_LOG.yaml. If >7 days old AND any schema-touching file was edited this session, recommend running /check-drift (or equivalent).

  5. Report:

    • Current — files whose docs/flows are accurate
    • Stale — docs/flows that should be updated as a consequence of the changes
    • Missing — code paths edited that have no corresponding documentation

Read the full file on GitHub · 73 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. 1mo ago First seen · 73 lines · 0 tokens per session scan A ab36cc477852

Subscribe to this mod's changes

staleness-check is a command published in the GitHub repository jonathanmr22/pact (15 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 921 tokens. 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-08-30.