rdocx: Command for Claude Code

.claude/commands/audit-spec.md

audit-spec is a command for Claude Code from tensorbee/rdocx. It costs 22 tokens per session (1,412 once invoked), scanned A, original, MIT.

A read-only checker that compares the documented design and development plans with the code in the workspace. It reports claims that no longer match, without editing files.

In plain words
What is it for?
Use it to compare documented crate names, types, functions, feature settings, stories, test categories, and bundled assets with the actual Rust project.
Why use it?
It finds stale or incomplete documentation before a milestone or feature handoff. This prevents the written plan from quietly drifting away from the software.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is tensorbee/rdocx's own configuration. It tells Claude Code how to work on rdocx itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rdocx configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tensorbee/rdocx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tensorbee/rdocx/main/.claude/commands/audit-spec.md
Clone the repo
git clone --depth 1 https://github.com/tensorbee/rdocx

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 audit-spec

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/tensorbee/rdocx/audit-spec"><img src="https://agentmods.dev/badge/commands/tensorbee/rdocx/audit-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 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,412 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.00022 $0.01412
Opus 5.5 $0.00009 $0.00565
Sonnet 5.5 $0.00004 $0.00282
Haiku 4.5 $0.00002 $0.00141

Measured 26d ago against content hash 0929ccba9389, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-spec 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 26d 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.

.claude/commands/audit-spec.md · 124 lines

How it starts

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

/audit-spec [--section NN]

Find where the spec set and the workspace disagree. This command changes no file. It produces a report someone then acts on.

Run it before a milestone boundary, before /spec-bump, after a long absence, and whenever /sync-status comes back clean but something still feels stale. /sync-status checks the trackers against each other. This checks the spec against the code.

Steps

  1. Build the spec inventory. Walk docs/hld/00-vision.md through 15-build-and-toolchain.md and index every checkable claim:

    • Crate names, and the dependency edges 03-architecture.md draws.
    • Type and function names cited by 04 through 10.
    • Feature flags and their defaults, from 15-build-and-toolchain.md.
    • Story IDs, sizes and test gates, from 14-development-backlog.md.
    • Named test categories and harnesses, from 12-testing-strategy.md.
    • Bundled asset claims, fonts and their licences.
  2. Build the code inventory.

    cargo metadata --no-deps --format-version 1
    

    Plus the things metadata does not answer: [features] blocks across every Cargo.toml, pub items in each crate's lib.rs, the files under crates/rdocx-layout/fonts/ and crates/rpptx/assets/, and the integration test binaries under each tests/.

  3. Diff into four buckets.

    Bucket Meaning
    Missing The spec names it, the code has no such thing
    Undocumented The code has it, no spec section mentions it
    Shape divergence Both have it, with different shapes
    Contradiction Two spec documents disagree with each other
  4. Run the checks that are specific to this workspace. These are the ones worth the command existing:

    • Dependency direction. Every oxml-* crate's dependency list against the rule in 03-architecture.md. A path from oxml-* into rdocx-* or rpptx-*, other than the documented oxml-drawing -> rdocx-oxml Theme adapter, is a contradiction, not a note.
    • Backlog integrity. Every ### F-XXX in 14-development-backlog.md appears in docs/sprints/BACKLOG.md and the reverse. Sizes and test gates match. Each Depends on names a story that exists.
    • Feature flags. Every flag in a Cargo.toml has a named consumer, and 15-build-and-toolchain.md describes every flag that exists.
    • Bundled assets. Every font family under crates/rdocx-layout/fonts/ has a licence file, and the licence the code claims is the real one. Every asset rpptx loads lives under the crate directory, since one outside it is absent from the published tarball.
    • Carried defects. Each entry in CLAUDE.md under "Known defects being carried" either still exists at the cited location, or has been fixed and the entry is stale. Both are findings.
    • Deliberate wrongness. Each entry under "Things that are deliberately wrong" still matches the code, and the document that explains why still says so.

Read the full file on GitHub · 124 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. 26d ago First seen · 124 lines · 22 tokens per session scan A 0929ccba9389

Subscribe to this mod's changes

audit-spec is a command published in the GitHub repository tensorbee/rdocx (44 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 1,412 once invoked, about $0.0001 per session on Opus 5.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-10-04.