SDD-Pro: Command for Claude Code

.claude/commands/doc-refresh.md

doc-refresh is a command for Claude Code from zekiriabd/SDD-Pro. It costs 5 tokens per session (711 once invoked), scanned A, original, Apache-2.0.

A documentation command that rebuilds an index of architecture decision records. An architecture decision record is a short document explaining an important technical choice and its reasoning.

In plain words
What is it for?
Use it after changing an architecture decision record, or when a development or quality pipeline needs to refresh the records index.
Why use it?
The index can become outdated after records are edited or added. Rebuilding it makes the collection easier to browse without manually maintaining the list.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is zekiriabd/SDD-Pro's own configuration. It tells Claude Code how to work on SDD-Pro 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 SDD-Pro configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python .sdd/python/sdd_scripts/index_adrs.py.

Reuse

Borrowing it

Nothing to install: this file belongs to zekiriabd/SDD-Pro. 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/zekiriabd/SDD-Pro/main/.claude/commands/doc-refresh.md
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

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 doc-refresh

README.md
[![agentmods](https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/doc-refresh/github.svg)](https://agentmods.dev/commands/zekiriabd/sdd-pro/doc-refresh)
Your own site
<a href="https://agentmods.dev/commands/zekiriabd/sdd-pro/doc-refresh"><img src="https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/doc-refresh/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 doc-refresh

Your own site · 80×15
<a href="https://agentmods.dev/commands/zekiriabd/sdd-pro/doc-refresh"><img src="https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/doc-refresh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 711 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.00005 $0.00711
Opus 5.5 $0.00002 $0.00284
Sonnet 5.5 $0.00001 $0.00142
Haiku 4.5 $0.00001 $0.00071

Measured 1mo ago against content hash 94e51949d7fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

doc-refresh 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 1mo 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/doc-refresh.md · 87 lines

How it starts

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

/doc-refresh

⚠️ Commande interne v7.0.0 — invoquée auto en fin de pipeline (/sdd-full, /dev-run, /qa-generate, arch Phase D). Régénère INDEX.md des ADRs via sdd_scripts/index_adrs.py (0 token, ~50 ms, idempotent). Préférer un orchestrateur en usage normal ; cette commande sert au debug/inspection ciblée.

Usage

/doc-refresh

Aucun argument. La commande scanne les ADRs du workspace et régénère l'index.

Fichier produit

Fichier Description
workspace/.sys/.context/adrs/INDEX.md Index ADRs (rebuild depuis Glob workspace/.sys/.context/adrs/ADR-*.md)

Quand l'utiliser

  • Manuel : après édition manuelle d'un ADR pour rafraîchir l'index.
  • Auto : fin de /sdd-full, /dev-run, /qa-generate, arch Phase D.

STEP 1 — Exécuter le script

python .sdd/python/sdd_scripts/index_adrs.py

Ou avec arguments explicites :

python .sdd/python/sdd_scripts/index_adrs.py \
  --adrs-dir workspace/.sys/.context/adrs \
  --output workspace/.sys/.context/adrs/INDEX.md \
  --template .sdd/templates/adrs-index.template.md

Le script :

  1. Lit .sdd/templates/adrs-index.template.md
  2. Glob workspace/.sys/.context/adrs/ADR-*.md
  3. Parse pour chaque ADR : filename (timestamp ISO + slug), H1 titre, Status: body field (défaut Accepted), Phase: body field (heuristique slug si absent)
  4. Render dans le template avec substitution {ADRRows}, {ADRCount}, {GeneratedAt}, {ProjectName}
  5. Write atomique via .tmp + read-back self-check

STEP 2 — Confirmation

Le script émet 1 ligne (chat minimal succès) :

OK index_adrs — INDEX.md ({N} ADRs) refreshed

Si aucun ADR : OK index_adrs — INDEX.md (0 ADRs, empty) refreshed.

Codes d'erreur

Exit Classe Cause
0 — succès
1 [NOT_FOUND] template adrs-index.template.md manquant ou illisible
2 [QA_OUTPUT_INVALID] atomic write self-check échec (corruption FS rare)

Read the full file on GitHub · 87 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. 1mo ago First seen · 87 lines · 5 tokens per session scan A 94e51949d7fd

Subscribe to this mod's changes

doc-refresh is a command published in the GitHub repository zekiriabd/SDD-Pro (196 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 5 tokens to every session and 711 once invoked, about $0.0000 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-08-30.