SDD-Pro: Command for Claude Code

.claude/commands/sdd-reverse-stories.md

sdd-reverse-stories is a command for Claude Code from zekiriabd/SDD-Pro. It costs 129 tokens per session (741 once invoked), scanned A, original, Apache-2.0.

A workflow command that converts a technical analysis of one legacy application unit into user stories grouped by business capability. User stories describe what users should be able to do and how to check the result.

In plain words
What is it for?
Use it to create user-story documents from a completed reverse-engineering analysis. It is intended for planning the rebuild of one part of a legacy system.
Why use it?
It bridges the gap between code-level findings and work that product and development teams can understand. It also keeps each story linked to the technical tasks behind it.

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 →

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/sdd-reverse-stories.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 sdd-reverse-stories

README.md
[![agentmods](https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/sdd-reverse-stories.svg)](https://agentmods.dev/commands/zekiriabd/sdd-pro/sdd-reverse-stories)
Your own site
<a href="https://agentmods.dev/commands/zekiriabd/sdd-pro/sdd-reverse-stories"><img src="https://agentmods.dev/badge/commands/zekiriabd/sdd-pro/sdd-reverse-stories.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 741 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.00129 $0.00741
Opus 5 $0.00064 $0.00370
Sonnet 5 $0.00026 $0.00148
Haiku 4.5 $0.00013 $0.00074

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

Security

Grade A, and why

sdd-reverse-stories 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 4d 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/sdd-reverse-stories.md · 54 lines

What it actually says

/sdd-reverse-stories {U-N} [--json]

Rôle

Lancer la Phase 3b : remonter l'analyse technique 3a d'une marche d'altitude vers des User Stories par capability métier. Une seule unité par invocation.

plans/{n}-{FeatName}.analysis.md --[3b /sdd-reverse-stories]--> us/{n}-{m}-{Name}.md

Le fil de traçabilité monte : chaque AC d'US pointe vers les tasks T-N de l'analyse (<!-- covers: T-N -->). Confidence min-monotone (≤ analyse 3a).

Args

Arg Type Description
{U-N} string requis Identifiant U-N stable (ex. U-3)
--json flag Émet le rapport en JSON

Pré-conditions

  1. (n, FeatName) résolu via inventory.json._featAllocations[{U-N}] (3a a tourné). Absent → ERROR [REVERSE_UNIT_NOT_FOUND].
  2. workspace/plans/{n}-{FeatName}.analysis.md existe (barreau 3a). Absent → ERROR [REVERSE_UNIT_NOT_FOUND] + suggérer /sdd-reverse-analyze {U-N}.
  3. .sdd/python/sdd_reverse/us.reverse.template.md présent (ADV-9). Sinon → ERROR [REVERSE_TEMPLATE_MISSING].

Actions

  1. Résoudre le projet legacy via inventory.json._featAllocations.
  2. Spawn unique Agent(reverse-us-writer) avec args = {U-N}.
  3. L'agent suit STEP 0 à 5 de .sdd/agents/reverse-us-writer.md.
  4. Émission ligne chat finale [REVERSE] {U-N} → {U} US 3b (...). (PROGRESS%).

Sortie

workspace/us/{n}-{m}-{Name}.md                  (1 à 5 US par capability)
workspace/old/{P}/.sys/modules/{FeatName}/stories-3b.md    (log décision)

Anti-derive

  • Une seule unité par invocation.
  • L'agent ne lit PAS le code legacy — uniquement l'analyse 3a (lecture sélective stricte).
  • Remontée d'altitude réelle : AC observables utilisateur, jamais recopie de tasks techniques.
  • No-spawn d'agent autre que reverse-us-writer.
  • Idempotence : re-lancer réécrit les mêmes US (mêmes n/Name).

Voir .sdd/docs/reverse-engineering-workflow.md §Phase 3 + ADR governance-major-reverse-spec-ladder.

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. 4d ago First seen · 54 lines · 129 tokens per session scan A fac1c821d67f

Subscribe to this mod's changes

sdd-reverse-stories is a command published in the GitHub repository zekiriabd/SDD-Pro (191 stars, last pushed 4d ago), licensed Apache-2.0. It adds 129 tokens to every session and 741 once invoked, about $0.0006 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-09-03.