rdocx: Command for Claude Code

.claude/commands/realign-docs.md

realign-docs is a command for Claude Code from tensorbee/rdocx. It costs 36 tokens per session (1,162 once invoked), scanned A, original, MIT.

A command for updating README.md and high-level design documents to match the software that was actually built. It bases edits on plans, review records, build records, and code rather than inventing explanations or writing a history of changes.

In plain words
What is it for?
Use it to preview or apply documentation repairs, update selected design sections, and remove statements that no longer describe the current software.
Why use it?
Documentation can become incomplete when decisions and scope changes happen across many features. This provides a controlled way to repair that drift at sprint or milestone boundaries.

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 →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/prose_check.py.

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/realign-docs.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 realign-docs

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/tensorbee/rdocx/realign-docs"><img src="https://agentmods.dev/badge/commands/tensorbee/rdocx/realign-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 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,162 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.00036 $0.01162
Opus 5.5 $0.00014 $0.00465
Sonnet 5.5 $0.00007 $0.00232
Haiku 4.5 $0.00004 $0.00116

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

Security

Grade A, and why

realign-docs 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/realign-docs.md · 106 lines

How it starts

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

/realign-docs [--section NN] [--dry-run]

Repair accumulated documentation drift in bulk. /complete-feature updates the HLD files one story's plan listed, which is right per story and insufficient over a sprint. Decisions taken in review, alternatives rejected during implementation, and scope that shifted mid-story do not appear in any single plan's ## HLD impact list.

Run at a sprint close, at a milestone boundary, or after /sprint-review surfaced a docs finding.

--dry-run reports the intended edits and changes nothing. Prefer it first.

The two hard rules

1. Grounded, never invented. Every sentence you write or change must trace to a citable source: a design plan, a review file, an AS_BUILT entry, or the code itself. If you cannot cite it, you do not know it, and a confident paragraph about behaviour nobody implemented is worse than the stale one it replaced.

2. Current state, never history. These documents describe what is true now. Do not write "F-042 changed this from X to Y". Describe Y. Do not add a "Changes in this milestone" heading. git log and docs/sprints/AS_BUILT.md hold history, and a changelog inside an authoritative document is the first sign it is rotting into one.

Steps

  1. Establish the window. Everything since the last realignment, or since a named tag. Report the commit range and the F-IDs it contains.

  2. Read the ground truth, in this order:

    • .claude/plans/F-XXX-design.md for each F-ID in the window, especially ## Approach, ## Rejected alternatives and ## HLD impact.
    • .claude/reviews/ for the same F-IDs, plus any SNN-sprint-review-*. Review files hold decisions that exist nowhere else, because a finding that was refuted with evidence is a decision.
    • docs/sprints/AS_BUILT.md entries in the window, especially the "Notes for future sessions" and the hash-harness fields.
    • The code, last. It settles any disagreement between the above.
  3. Run /audit-spec and fold its findings in. This command is the actor for the drift that command reports.

Read the full file on GitHub · 106 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 · 106 lines · 36 tokens per session scan A 26b0c7e96b22

Subscribe to this mod's changes

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