/agentspec:sdd-iteratefrom agentspec
Updates SDD phase documents (BRAINSTORM/DEFINE/DESIGN) mid-stream with cascade awareness, version tracking, and user-confirmed downstream propagation.
Ships in agentspec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Requirements change mid-stream; that is normal. This skill owns the methodology for updating any SDD phase document without breaking the chain: classify the change, apply it with version tracking, analyze downstream cascades, and propagate updates only after user confirmation.
Executor: iterate-agent. Entrypoint: /iterate <file> "<change-description>". Contract: the
iterate block in ${CLAUDE_PLUGIN_ROOT}/sdd/architecture/WORKFLOW_CONTRACTS.yaml owns the command surface,
the works_with chain, and the thresholds; per that block's skill entry, this skill owns the
rules below.
/iterate works on the document phases of the SDD workflow:
Phase 0: /brainstorm → BRAINSTORM_{FEATURE}.md ← /iterate can update
Phase 1: /define → DEFINE_{FEATURE}.md ← /iterate can update
Phase 2: /design → DESIGN_{FEATURE}.md ← /iterate can update
Phase 3: /build → (code) ← update DESIGN, then /build
Phase 4: /ship → (archive) ← N/A
Changes ripple downstream:
BRAINSTORM ────► DEFINE ────► DESIGN ────► CODE
│ │ │ │
▼ ▼ ▼ ▼
Changes May need May need May need
here update update rebuild
| Change In | Cascades To | Example |
|---|---|---|
| BRAINSTORM | DEFINE | New YAGNI items → update out-of-scope |
| DEFINE | DESIGN | New requirement → add component |
| DESIGN | CODE | New file in manifest → create via /build; removed file → delete |
To change code during Phase 3, update the DESIGN document first — the cascade to code
triggers a rebuild via /build. Editing code directly breaks traceability.
Six steps, in order:
BRAINSTORM_*.md → Phase 0, DEFINE_*.md → Phase 1, DESIGN_*.md → Phase 2). Read the
downstream documents that exist. Never classify a change before loading current state.Classify every change before touching the document:
| Type | Marker | Impact | Example |
|---|---|---|---|
| Additive | + | Low — adds to existing scope | "Also support PDF" |
| Modifying | ~ | Medium — changes existing scope | "Change from X to Y" |
| Removing | − | Medium — reduces scope | "Remove feature Z" |
| Architectural | ! | High — fundamental approach change | "Use a different pattern entirely" |
Confidence assignment drives how to proceed:
| Situation | Confidence | Action |
|---|---|---|
| Additive change, no cascade | 0.95 | Apply directly |
| Modifying change, cascade needed | 0.85 | Ask user |
| Removing change, cascade needed | 0.80 | Ask user |
| Architectural change | 0.70 | Full review with user |
For each downstream document: check whether the change affects it, calculate the required updates, and present options to the user before applying anything downstream.
BRAINSTORM → DEFINE:
| BRAINSTORM Change | DEFINE Impact |
|---|---|
| Changed approach | May need different problem focus |
| New YAGNI items | Out of scope needs update |
| Changed users | Target users section needs update |
| Changed constraints | Constraints section needs update |
| New discovery answers | May affect requirements |
DEFINE → DESIGN:
| DEFINE Change | DESIGN Impact |
|---|---|
| New requirement | May need new component |
| Changed success criteria | May need different approach |
| Scope expansion | Needs new sections |
| Scope reduction | Can simplify |
| New constraint | Must be accommodated |
DESIGN → CODE:
| DESIGN Change | CODE Impact |
|---|---|
| New file in manifest | Create file |
| Removed file | Delete file |
| Changed pattern | Update affected files |
| New decision | May need refactor |
| Architecture change | Significant refactor |
Code-level cascades are never hand-applied: the DESIGN update is the deliverable here, and the
rebuild routes through /build (escalation to build-agent).
Never apply cascading edits silently. When a cascade is needed, ask the user:
"This change to {DOCUMENT} affects {DOWNSTREAM}. Options:
(a) Update {DOWNSTREAM} automatically to match
(b) Just update {DOCUMENT}, I'll handle {DOWNSTREAM} manually
(c) Show me what would change first"
Architectural changes always get a full review with the user before anything is written.
Every applied change is tracked. Obligations:
Fields: version, date, author, changes. The section shape is owned by the templates
(${CLAUDE_PLUGIN_ROOT}/sdd/templates/DEFINE_TEMPLATE.md, DESIGN_TEMPLATE.md):
## Revision History
| Version | Date | Author | Changes |
|---------|------|--------|---------|
| 1.0 | 2026-01-25 | define-agent | Initial version |
| 1.1 | 2026-01-25 | iterate-agent | Added PDF support |
| 1.2 | 2026-01-26 | iterate-agent | Removed OCR (out of scope) |
Status fields: document Status values are set by phase completions per
status_transitions.update_rules in WORKFLOW_CONTRACTS (for example, /design completing marks
DEFINE "✅ Complete (Designed)"). A mid-stream change can invalidate that claim — after updating
a document whose downstream phase already completed, verify the Status fields still tell the
truth, and surface any mismatch in the cascade prompt instead of silently rewriting the flow.
Verify before reporting completion:
PRE-FLIGHT CHECK
├─ [ ] Target document loaded
├─ [ ] Change classified (additive/modifying/removing/architectural)
├─ [ ] Downstream documents identified
├─ [ ] Cascade impact assessed
├─ [ ] User informed of cascade requirements
├─ [ ] Version bumped in revision history
├─ [ ] Change note added with reasoning
└─ [ ] Downstream updates applied (if cascaded and confirmed)
Iterate has no contract of its own: after applying the edit, validate the edited document against the contract for its own phase. The artifact is whatever document you just edited, and the --phase is the phase that produced it (define for a DEFINE document, design for a DESIGN document) — repeat this for each document a cascade touched:
# --phase must match the document being validated, not the phase you came from
${CLAUDE_PLUGIN_ROOT}/tools/spec-linter/spec-lint <EDITED_DOC.md> --phase <define|design> \
--contracts-file ${CLAUDE_PLUGIN_ROOT}/sdd/architecture/WORKFLOW_CONTRACTS.yaml
Which phases carry a contract is decided by required_sections in ${CLAUDE_PLUGIN_ROOT}/sdd/architecture/WORKFLOW_CONTRACTS.yaml, not by this skill — if the edited document's phase has none, the linter reports that itself; act on what it returns. Run it as ${CLAUDE_PLUGIN_ROOT}/tools/spec-linter/USAGE.md documents, and act on the verdict exactly as defined there. The exit-code contract and verdict semantics are owned by that document and by the contract_enforcement block (exit_code_contract, verdict_semantics) of the same contract file — which is also where this binding is declared. Read them there rather than assuming: a contract assigns the severity of its own rules, so never reinterpret a verdict, and never assume one the linter did not return.
| Never Do | Why | Instead |
|---|---|---|
| Skip cascade analysis | Inconsistent documents | Always check downstream |
| Update without versioning | Lost history | Always bump version |
| Apply cascading edits without confirmation | User loses control of scope | Ask with the (a)/(b)/(c) prompt |
| Apply architectural changes silently | Major impact | Full review with user |
| Ignore downstream conflicts | Broken workflow | Resolve conflicts first |
| Edit CODE directly | Breaks traceability | Update DESIGN, rebuild via /build |
Thresholds (contract: iterate.thresholds):
| Situation | Action |
|---|---|
| < 30% change | /iterate |
| Add/modify features | /iterate |
| Change constraints | /iterate |
| > 50% different | New /define |
| Different problem entirely | New /define |
| Different target users | New /define |
| Fundamental approach change | New /define |
An architectural change classified in-flow (0.70 confidence) triggers a full review — that
review decides between an in-place update and a fresh /define.
${CLAUDE_PLUGIN_ROOT}/sdd/architecture/WORKFLOW_CONTRACTS.yaml (iterate block: command
surface, works_with chain, thresholds; status_transitions.update_rules for Status fields;
contract_enforcement for the binding, exit-code contract, and verdict semantics)${CLAUDE_PLUGIN_ROOT}/tools/spec-linter/USAGE.md${CLAUDE_PLUGIN_ROOT}/sdd/templates/DEFINE_TEMPLATE.md,
${CLAUDE_PLUGIN_ROOT}/sdd/templates/DESIGN_TEMPLATE.md (Revision History shape)${CLAUDE_PLUGIN_ROOT}/agents/workflow/iterate-agent.md${CLAUDE_PLUGIN_ROOT}/commands/workflow/iterate.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sdd, change-management, cascade, document-workflow, version-tracking
16 skills in this plugin
/agent-routerIntelligent agent routing -- automatically matches tasks to the best specialist agent based on file patterns, intent keywords, and domain context. Loaded every session to give Claude explicit routing rules for all 58 AgentSpec agents./component-modelDecides where new logic lives in the component model — agent, skill, command, KB, or
template — and how to keep components in their layer, routing each decision to the
right authoring resource and running the fat-to-thin refactor when a component has
outgrown its layer. Loaded by the authoring flows (create-skill, create-agent,
kb-build, create-kb) as their layer-decision gate. Use for "should this be an agent
or a skill", "where does this logic go", adding a new component, "this agent is too
big", or restructuring/refactoring an agent into skills. Do not use to author the
chosen component itself — that is create-skill, create-agent, or /create-kb.
/data-engineering-guideData engineering expertise for pipelines, schemas, data quality, SQL, lakehouse, and streaming.
Use PROACTIVELY when the user discusses data pipelines, ETL/ELT, schema design, dimensional modeling,
data quality checks, SQL optimization, dbt models, Spark jobs, Airflow DAGs, streaming pipelines,
lakehouse architecture, or data contracts.
/excalidraw-diagramCreate Excalidraw diagram JSON files that make visual arguments. Use when the user wants to visualize workflows, architectures, or concepts./github-cr-adrDrafts an Architecture Decision Record (ADR) for the current repository: searches existing GitHub issues for duplicates first, applies a worthiness gate, then drafts from the context/decision/alternatives/consequences template with the standard status lifecycle, ready for publication as a GitHub issue. Use when the user asks to "create an ADR", "draft an ADR", "new ADR", "document an architecture decision", or to formalize an architecturally significant, hard-to-reverse technical choice. Do not use for routine feature or bug tracking — use `github-cr-issue`; publishing a drafted ADR to GitHub is `github-post-issue`.
/github-cr-issueDrafts the body of a well-formed, self-contained GitHub issue for the current repository from a per-type template — feature, component, task, bug, or spike — searching existing issues for duplicates before any drafting, and saving the result as an ephemeral draft ready for review and publication. Use when the user wants to create, draft, or write an issue, or asks for a feature, component, task, bug, or spike issue, or wants to turn an idea, defect report, or investigation into a tracked GitHub issue. For epic-scale initiatives it drafts a parent issue plus child issues joined by native GitHub relationships instead of an epic document. Do not use for architecture decisions — use `github-cr-adr`; to publish a draft to GitHub use `github-post-issue`.
npx claudepluginhub luanmorenommaciel/agentspec --plugin agentspecOther plugins' skills for the same job