staleness-check

staleness-check is a command for coding agents 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

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.

agentmods
npx agentmods add commands/jonathanmr22/pact/staleness-check
Clone the repo
git clone --depth 1 https://github.com/jonathanmr22/pact

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00000 $0.00921
Opus 5 $0.00000 $0.00461
Sonnet 5 $0.00000 $0.00184
Haiku 4.5 $0.00000 $0.00092

Measured 5d ago against content hash ab36cc477852, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 2mo 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.

Related

Other commands, from other repositories

init-project

Configure the baseline for this specific project. Invokes the scout skill, then claude-automation-recommender, populates .claude/project.json, pre-creates lazy directories, re-renders swarm-worker.md from its template with any stack-specific skills appended, appends a §16 addendum to docs/init/seed.md, runs…

friedbotstudio/baseline · 108 tokens

agent-assign

/forge:agent-assign is the intelligent dispatcher for Forge's 22 specialized agents. You describe a task, and the command analyzes its domain (architecture, backend, frontend, testing, devops, security, docs), complexity, and required skills, then recommends the best-fit agent with a match score and reasoning. It also…

nxtg-ai/forge-plugin · 0 tokens

report

/forge:report builds an activity report from real project data. It pulls commits from git history, calculates lines changed, identifies the most-modified files, checks for open pull requests on the current branch, counts test files, reads governance sentinel log entries, and lists saved checkpoints. The result is a…

nxtg-ai/forge-plugin · 0 tokens

dashboard

/forge:dashboard generates and opens a visual HTML dashboard in your browser. The dashboard is created by the governance MCP server's forgeopendashboard tool, which reads live project data (health scores, governance state, git status, code metrics) at generation time and produces a self-contained HTML file with…

nxtg-ai/forge-plugin · 0 tokens

docs-audit

/forge:docs-audit is the deep documentation quality assessment. It runs five audit dimensions: coverage analysis (what percentage of exported symbols have JSDoc), file inventory (which key files like README, CHANGELOG, CONTRIBUTING, and LICENSE exist), link validation (do internal markdown links point to real files)…

nxtg-ai/forge-plugin · 0 tokens

docs-update

/forge:docs-update is the documentation fixer. It compares recently changed source files (from the last 20 commits or 7 days) against documentation files to find staleness, then reads both the outdated doc and the current source code to identify discrepancies -- new functions, changed interfaces, removed features. For…

nxtg-ai/forge-plugin · 0 tokens