rdocx: Command for Claude Code

.claude/commands/spec-bump.md

spec-bump is a command for Claude Code from tensorbee/rdocx. It costs 25 tokens per session (910 once invoked), scanned A, original, MIT.

A two-step command for assigning a version and Git tag to a set of design specifications after checking them against the code. It audits for differences first, then applies the version only if the audit passes.

In plain words
What is it for?
Use it to audit and version the files in docs/hld/, report missing or conflicting details, and create the approved version tag.
Why use it?
It prevents a versioned specification from appearing authoritative when it contains known, undocumented differences from the code. Planned but not-yet-built work can remain documented when it is clearly tracked.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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/spec-bump.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 spec-bump

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/tensorbee/rdocx/spec-bump"><img src="https://agentmods.dev/badge/commands/tensorbee/rdocx/spec-bump.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 910 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.00025 $0.00910
Opus 5.5 $0.00010 $0.00364
Sonnet 5.5 $0.00005 $0.00182
Haiku 4.5 $0.00003 $0.00091

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

Security

Grade A, and why

spec-bump 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/spec-bump.md · 96 lines

How it starts

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

/spec-bump vX.Y [--apply]

Give docs/hld/ a version number and a tag, so a spec can be cited by version rather than by "whatever main said that day".

Two stages, and the first is not optional. A spec version that was tagged over known drift is worse than no version, because it lends authority to a document that does not describe the code.

Stage 1, audit

/spec-bump vX.Y
  1. Refuse a dirty working tree.
  2. Run /audit-spec in full.
  3. Report the drift by bucket. Any contradiction, or any shape divergence, stops the bump. Those must be resolved by fixing the spec or fixing the code.
  4. missing findings owned by a pending story do not block. The spec is allowed to describe work that is scheduled and not yet built. That is what the set is for. Record them in the bump commit message so a reader of the tag knows what was intentionally ahead of the code.
  5. undocumented findings block, because they are the case where the code moved and the spec did not notice.

Stage 1 changes nothing. If it is clean enough, it prints the exact --apply command.

Stage 2, apply

/spec-bump vX.Y --apply

Refuse unless stage 1 has just run clean against the current HEAD.

  1. Set the version in docs/hld/README.md, under "Living status", as a **Spec version**: vX.Y, YYYY-MM-DD line. The first bump introduces that line, later bumps replace it.

  2. Update the set index in the same file if documents were added, removed or renumbered since the last bump.

  3. Record what is intentionally ahead of the code. The missing findings stage 1 allowed through, as a short list with their owning story IDs. A reader of the tag needs to know the difference between "not built yet" and "the spec lied".

  4. Commit once:

    spec vX.Y, short summary of what changed in the set
    
    One paragraph: what moved in the set since the previous version, and what
    is intentionally ahead of the code.
    
    Tests, not applicable
    Harness, unchanged
    

Read the full file on GitHub · 96 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 · 96 lines · 25 tokens per session scan A b5020899897b

Subscribe to this mod's changes

spec-bump is a command published in the GitHub repository tensorbee/rdocx (44 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 910 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.