sdd-archive

sdd-archive is a command for Claude Code from Gentleman-Programming/gentle-ai. It costs 14 tokens per session (918 once invoked), scanned A, original, MIT.

A command for archiving a completed specification-driven development change after its verification report confirms that the work is ready.

In plain words
What is it for?
Use it to close an active SDD change once verification has no critical issues and all tasks are complete.
Why use it?
It prevents unfinished or critically flawed changes from being closed and preserves the completed specification cycle in the required order.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: agent in frontmatter; mentions subagents; mentions OpenCode.

About the project

Gentle-AI configures an existing AI coding agent into an engineering environment with persistent memory, planning workflows, skills, tool servers, model routing, and optional review. Developers and teams use it to make coding agents follow project conventions and retain decisions across sessions. The catalogue entries are its skills, commands, agents, and instruction.

Gentleman-Programming/gentle-ai · 6,301 stars · on GitHub · gentle-ai.gentlemanprogramming.com

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/gentleman-programming/gentle-ai/sdd-archive
Clone the repo
git clone --depth 1 https://github.com/Gentleman-Programming/gentle-ai

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-archive

README.md
[![agentmods](https://agentmods.dev/badge/commands/gentleman-programming/gentle-ai/sdd-archive.svg)](https://agentmods.dev/commands/gentleman-programming/gentle-ai/sdd-archive)
Your own site
<a href="https://agentmods.dev/commands/gentleman-programming/gentle-ai/sdd-archive"><img src="https://agentmods.dev/badge/commands/gentleman-programming/gentle-ai/sdd-archive.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 918 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.1 $0.00014 $0.00918
Opus 5 $0.00007 $0.00459
Sonnet 5 $0.00003 $0.00184
Haiku 4.5 $0.00001 $0.00092

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

Security

Grade A, and why

sdd-archive 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

internal/assets/opencode/commands/sdd-archive.md · 35 lines

How it starts

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

You are the gentle-orchestrator, not an SDD executor. This command may launch the hidden sdd-archive sub-agent only after the orchestration gates below pass.

CONTEXT:

  • Working directory: before doing anything else, run git rev-parse --show-toplevel 2>/dev/null || pwd with your bash tool and use the returned path as the authoritative workspace. In OpenCode Desktop (Electron) the parse-time interpolation resolves to the app data directory, not the project.
  • Current project: the basename of the detected workspace above.

HARD GATES:

  1. SDD Session Preflight must already be complete for this session. It must include execution mode, artifact store, chained PR strategy, and review budget. If missing, ask the exact orchestrator preflight prompt and STOP. Do not run archive in the same turn.
  2. sdd-init must already exist or be run after preflight, per the orchestrator init guard.
  3. Resolve the active change using the status contract. If $ARGUMENTS is missing or ambiguous, ask the user to choose and STOP. Do not guess.
  4. Produce structured status before acting. Use the resolved artifact store from session preflight; do not hardcode Engram. Archive only when refreshed native SDD status reports dependencies.archive: ready and nextRecommended: archive.
  5. The active change must have tasks and verify-report at the exact selected-store references. reviewOffer is optional and never an archive or delivery gate. Archive reads only task completion and independent verification; a review offer may be declined or completed without changing archive readiness. Proposal/spec/design are expected for full spec-driven archive; if missing, report the exact missing artifacts and require an explicit user override before archiving.
  6. actionContext must allow archive operations. If status reports workspace-planning, STOP and explain that workspace archive is not supported in this slice.
  7. The persisted tasks artifact must reflect completion before the archive is considered successful. Internal todos do not count, and sdd-apply is responsible for marking completed tasks.

DEPENDENCY CHECK:

  • If the verification report is missing or does not say the change is ready, do NOT archive.
  • If tasks still contains unchecked implementation items (- [ ]), do NOT archive by default. Send the change back to sdd-apply to correct the persisted tasks artifact. Only allow archive-time mechanical reconciliation when apply-progress / verify-report prove every unchecked task is complete; record the reconciliation in the archive report.
  • If verify-report contains CRITICAL issues, do NOT archive. There is no CRITICAL override.
  • Tell the user what is missing and suggest /sdd-verify <change> or /sdd-continue <change>.

TASK: If all gates pass, launch the hidden sdd-archive sub-agent with the structured status, required artifacts, the resolved artifact store, and any explicit non-critical partial-archive or stale-checkbox reconciliation text. Enforce task completion and verification evidence only; review does not supply an archive gate or durable approval artifact. Treat checkbox fixes as exceptional reconciliation rather than normal archive work. For openspec or hybrid stores only, mandate mechanical filesystem copy/move (cp -R/mv/git mv via the shell) for every filesystem artifact — NEVER model Read/Write copying, which can truncate bytes silently — and require a diff -r readback (source vs. destination, archive-report additive-only) whose verbatim output appears in the result; an empty diff is the only passing evidence and a skipped diff -r FAILS the phase. For engram, do not perform filesystem synchronization or archive moves; retrieve the required Engram artifacts and persist the final archive report to sdd/{change-name}/archive-report. For none, do not perform filesystem operations or Engram persistence; return the closure summary only. Forward explicit final-state facts for any work completed after apply-progress or verify-report were persisted (fixed warnings, resolved blockers, updated counts); those artifacts are intermediate snapshots, and explicit final-state facts in the launch prompt outrank stale snapshot claims.

Read the full file on GitHub · 35 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. 4d ago Changed · -12 lines 4a178f8513dd
  2. 6d ago First seen · 47 lines · 14 tokens per session scan A 77849cc250dc

Subscribe to this mod's changes

sdd-archive is a command published in the GitHub repository Gentleman-Programming/gentle-ai (6,301 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 918 once invoked, about $0.0001 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.

Related

Other commands, from other repositories

cross-critique

Adversarial multi-angle critique. All three auditors fire in parallel (codex=technical, gemini=strategic, claude=ux). Counter-args ranked by rebuttal survival score, not raw severity. Usage: /cross-critique [--with | list | compare].

FerroxLabs/ijfw · 65 tokens

cross-audit

Second-model review. Picks an auditor (codex/gemini/opencode/aider/copilot), excludes the caller, writes a prompt to paste, reads the response back. Usage: /cross-audit [--with | list | compare].

FerroxLabs/ijfw · 55 tokens

make

Refresh, reconfigure, or extend the project's harness at /.claude/. Asks the user what they want to do before invoking the CLI.

Ecro/harness-maker · 0 tokens

repo-consistency-sweep

Proactive defect-class detection that handles the lower-value half of code review (per Bacchelli and Bird 2013) so human reviewers stay focused on design, intent, and knowledge transfer. Catches convention drift, ordering bugs, type-safety gaps, security and multi-tenant invariants (CWE-grounded), and operability…

Mozurok/fhorja.dev · 200 tokens

pr-feedback-ingest

Turn PR feedback (Greptile, CI, bots, humans) into a structured traceable backlog aligned with TASKSTATE.md, DECISIONS.md, and IMPLEMENTATIONPLAN.md so the next execution step can be a narrow implement-approved-slice or a small planning touch without losing alignment. Corrective scope only. Use when a PR is open or…

Mozurok/fhorja.dev · 230 tokens

code-review

Run parallel specialized review agents and produce aggregated quality report.

zxpmail/ReqForge · 10 tokens