doc-refresh

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

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/zekiriabd/sdd-pro/doc-refresh
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

Made for: Claude Code.

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. 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.00005 $0.00711
Opus 5 $0.00003 $0.00356
Sonnet 5 $0.00001 $0.00142
Haiku 4.5 $0.00001 $0.00071

Measured 3d ago against content hash 94e51949d7fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 (187 stars, last pushed yesterday), licensed Apache-2.0. It adds 5 tokens to every session and 711 once invoked, about $0.0000 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-30.