sdlc-version

A command for viewing, comparing, and restoring earlier content versions of an SDLC artifact, such as a requirements file. SDLC means the software development life cycle.

In plain words
What is it for?
Use it to list an artifact's versions, compare two versions, inspect prior content, or roll an artifact back.
Why use it?
It helps recover what an artifact said before a change and undo an unwanted edit using the project's change history and stored content snapshots.

Command

Part of the claude-code-sdlc plugin — 9 skills, 28 commands, 20 agents shipped together

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/mckruz/claude-code-sdlc/sdlc-version
Clone the repo
git clone --depth 1 https://github.com/MCKRUZ/claude-code-sdlc

Or install claude-code-sdlc, the plugin that ships this one along with the rest of its 9 skills, 28 commands, 20 agents.

Per session 0 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,973 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.00000 $0.01973
Opus 5 $0.00000 $0.00986
Sonnet 5 $0.00000 $0.00395
Haiku 4.5 $0.00000 $0.00197

Measured 2d ago against content hash 675ef0c48344, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sdlc-version 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 2d 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.

commands/sdlc-version.md · 121 lines

How it starts

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

/sdlc-version — Content History of One Artifact (diff & roll back)

See what a pre-Build artifact used to say, diff any two of its versions, and — when a change went wrong — roll it back. This is the content complement to /sdlc-audit-artifacts: that command tracks that an artifact changed (the metadata trail); this one recovers what it said at each version and restores it if needed.

/sdlc-version list requirements.md
/sdlc-version diff FR-012 prev latest
/sdlc-version rollback requirements.md prev

Versions are derived from the change-ledger's SHA-256 hashes — the object store is just those hashes rehydrated to bytes, so there is no second index to drift. Snapshots are a local safety net (.sdlc/versions/objects/ is gitignored by default); a fresh clone or CI degrades to "content not captured" at exit 0, never a crash.

Instructions

  1. Resolve mode and repo root:

    • Workflow mode (default): look for .sdlc/state.yaml; pass --state .sdlc/state.yaml. If not found, tell the user to run /sdlc-setup first.
    • Standalone mode (--repo <path>, or no .sdlc/): operate on the given repo. History is only as deep as that repo's ledger and object store.
  2. Pick the verb from the user's request. Every one accepts an id (FR-012) or an artifact path and joins on the repo-relative path, so FR-012 and its file resolve to the same history.

    • list <artifact> — the version list v1..vN: ordinal, event, when, who. A version whose bytes were never captured is marked [content not captured] (honest — not a lie that it's gone):

      uv run --project ${CLAUDE_PLUGIN_ROOT}/scripts ${CLAUDE_PLUGIN_ROOT}/scripts/audit_artifacts.py version list <artifact> --state .sdlc/state.yaml
      
    • show <artifact> [ref] — print one version's content. ref is vN | latest | prev | <hashprefix> (default latest). Missing blob → "content not captured for this version":

      uv run --project ${CLAUDE_PLUGIN_ROOT}/scripts ${CLAUDE_PLUGIN_ROOT}/scripts/audit_artifacts.py version show <artifact> v2 --state .sdlc/state.yaml
      

Read the full file on GitHub · 121 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. 2d ago First seen · 121 lines · 0 tokens per session scan A 675ef0c48344

Subscribe to this mod's changes

sdlc-version is a command published in the GitHub repository MCKRUZ/claude-code-sdlc (4 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,973 tokens. 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-31.