tidy

A housekeeping command for repositories that organize knowledge with INDEX.md files and project notes such as MEMORY.md.

In plain words
What is it for?
Use it to scan the repository, process pending update files, fix issues that can be corrected automatically, and report decisions that still need a person.
Why use it?
It finds missing or outdated file listings, orphaned files, stale dates, and unfinished waiting markers so the knowledge structure stays reliable.

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/odinmb/ops-workflow/tidy
Clone the repo
git clone --depth 1 https://github.com/OdinMB/ops-workflow
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,873 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.00033 $0.01873
Opus 5 $0.00016 $0.00937
Sonnet 5 $0.00007 $0.00375
Haiku 4.5 $0.00003 $0.00187

Measured 2d ago against content hash 49edf3f70897, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tidy 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.

commands/tidy.md · 152 lines

How it starts

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

Ops Housekeeping

Scan this project's knowledge structure for inconsistencies and staleness, fix everything that can be fixed automatically, then brief the user on the little that's left for them to decide.

Pre-check: Process .update/ Inbox

Before running consistency checks, process any pending files in .update/. Spawn the updater agent (agents/updater.md) to handle this in an isolated context. Pass it a follow-up file path at .tmp/housekeeping-update-followup.md.

If .update/ is empty or doesn't exist, skip this step.

Wait for the updater agent to finish before proceeding — the consistency checks should run against the freshly-updated knowledge base.

Phase 1: Scan

1. INDEX.md Accuracy

For every folder that contains an INDEX.md:

  1. Read the INDEX.md.
  2. List the actual files and subfolders in that directory.
  3. Flag:
    • Missing entries: files/subfolders that exist but aren't listed in INDEX.md
    • Stale entries: entries in INDEX.md that reference files/subfolders that no longer exist
    • Outdated summaries: entries whose one-line description doesn't match the file's actual content (spot-check the 3 largest files per folder)

2. MEMORY.md References

  1. Read MEMORY.md.
  2. Check every file path or folder reference it mentions — verify they exist.
  3. Check that state/ file summaries in MEMORY.md roughly match the actual file content.
  4. Flag references to deleted or renamed files.

3. Orphaned Files

Find .md files that aren't listed in any INDEX.md. Exclude:

  • MEMORY.md, CLAUDE.md, README.md (root-level files)
  • Files in .claude/, .context/, .plans/ directories
  • Files in plans/ (active plans aren't indexed)

4. Stale Dates

Check _Last updated:_ lines in state/ and backlog/ files. Flag any that are older than 60 days — they may need review.

5. WAITING Markers

Grep for WAITING ( across all files. For each match:

  • Extract who/what is being waited on and the since-date
  • Flag any that are older than 30 days — they may need follow-up

Read the full file on GitHub · 152 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 First seen · 152 lines · 33 tokens per session scan A 49edf3f70897

Subscribe to this mod's changes

tidy is a command published in the GitHub repository OdinMB/ops-workflow (7 stars, last pushed 15d ago), licensed MIT. It adds 33 tokens to every session and 1,873 once invoked, about $0.0002 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-08-31.