speckit-iterate-apply
Apply a pending iteration to spec documents — update all artifacts that speckit.implement relies on, then hand off to implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Apply a pending iteration to spec documents — update all artifacts that speckit.implement relies on, then hand off to implementation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Push the LLM to reconsider, refine, and improve its recent output. Use when user asks for deeper critique or mentions a known deeper critique method, e.g. socratic, first principles, pre-mortem, red team.
System architect and technical design leader. Use when the user asks to talk to Winston or requests the architect.
Senior software engineer for story execution and code implementation. Use when the user asks to talk to Amelia or requests the developer agent.
Facilitate interactive brainstorming sessions using diverse creative techniques and ideation methods. Use when the user says help me brainstorm or help me ideate.
Review code changes adversarially using parallel review layers (Blind Hunter, Edge Case Hunter, Acceptance Auditor) with structured triage into actionable categories. Use when the user says "run code review" or "review this code"
Break requirements into epics and user stories. Use when the user says "create the epics and stories list"
| name | speckit-iterate-apply |
| description | Apply a pending iteration to spec documents — update all artifacts that speckit.implement relies on, then hand off to implementation. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"iterate:commands/apply.md"} |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
If the user provides arguments, treat them as adjustments or notes for the apply process (e.g., "skip task completion marking" or "only update spec.md and tasks.md"). The primary source of truth for what to change is pending-iteration.md.
Goal: Execute the iteration plan defined in pending-iteration.md by updating all spec artifacts that speckit.implement relies on. After apply completes, the user can go directly to /speckit.implement — skipping /speckit.plan and /speckit.tasks since this command already handles those updates.
Run .specify/scripts/bash/check-prerequisites.sh --json --paths-only from repo root once. Parse JSON payload fields:
FEATURE_DIRFEATURE_SPECIMPL_PLAN, TASKS for downstream use.)If JSON parsing fails, abort and instruct the user to run /speckit.specify or verify the feature branch environment.
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot").
Check for FEATURE_DIR/pending-iteration.md. If it does not exist, abort with:
No pending iteration found. Run
/speckit.iterate.define <change request>first to define what you want to change.
If it exists, read and parse the file:
status, created, change_request, scopeIf status is not pending, warn the user that this iteration may have already been applied.
Read all available artifacts from FEATURE_DIR:
spec.md — requirements, user stories, edge cases, scopeplan.md — tech stack, architecture, file structure, phasestasks.md — task list with IDs, phases, checkboxes, dependenciesdata-model.md — entities, attributes, relationshipsresearch.md — technical decisions and constraintsquickstart.md — integration/test scenarioschecklists/ — quality checklistsBuild an internal model of the feature's current state.
Present a brief confirmation to the user:
## Ready to Apply Iteration
**Change**: <change_request from pending-iteration.md>
**Scope**: <scope from pending-iteration.md>
**Artifacts to update**: <list from impact assessment>
**Defined on**: <created date>
**Apply now?** (yes / no)
Wait for user confirmation. If the user says no, suggest they edit pending-iteration.md or re-run /speckit.iterate.define.
Execute the planned changes from pending-iteration.md. Update each affected artifact in order of dependency to maintain consistency:
Order: spec.md → data-model.md → plan.md → tasks.md → quickstart.md → research.md
For each artifact, follow the specific changes listed in the ## Planned Changes section of the pending iteration file. Use the guidance below for each artifact type:
[P] and [Story] markers following existing conventions. Use checkbox format: - [ ] TXXX ...~~TXXX~~ (removed in iteration YYYY-MM-DD).Save each artifact immediately after updating it.
Using the implementation progress data from pending-iteration.md (the "Potential task completions to mark" field), verify and mark completed tasks:
- [ ] to - [x] for confirmed completions in tasks.md.[ ] and note it in the completion report.This step is supplementary — if no task completions are detected, skip it cleanly.
Add an entry under a ## Iterations section in spec.md (create the section if missing, place after Clarifications):
### Iteration YYYY-MM-DD: <short title>
**Change**: <1-sentence description from pending-iteration.md>
**Scope**: <scope classification>
**Artifacts updated**: <list of artifacts that were modified>
**Tasks added**: TXXX, TYYY (if any)
**Tasks removed**: TZZZ (if any)
**Tasks marked complete**: TAAA, TBBB (if any, from git detection)
After all updates, perform a quick consistency scan:
Delete FEATURE_DIR/pending-iteration.md to prevent accidental re-application.
Output a structured summary:
## Iteration Applied
**Change applied**: <1-sentence summary>
**Scope**: <scope classification>
**Date**: YYYY-MM-DD
### Artifacts Updated
| Artifact | Sections Changed |
|----------|-----------------|
| spec.md | <list> |
| plan.md | <list> |
| tasks.md | <list> |
### Task Changes
| Action | Task IDs | Details |
|--------|----------|---------|
| Added | TXXX, TYYY | <brief description> |
| Modified | TZZZ | <what changed> |
| Removed | — | — |
| Marked complete | TAAA | <confirmed from git> |
### Consistency Warnings (if any)
- <warning 1>
- <warning 2>
### Next Steps
Your spec documents are updated and ready for implementation:
- `/speckit.implement` — continue implementation with the updated specs (recommended)
- `/speckit.analyze` — verify cross-artifact consistency before implementing
- `/speckit.iterate.define` — define another iteration if more changes are needed
pending-iteration.md. If the user wants a single-step workflow, they should run define first.pending-iteration.md. Do not add, skip, or reinterpret changes beyond what the plan specifies (unless the user provides adjustments via $ARGUMENTS).[x]). If the iteration plan acknowledged risks to completed tasks, follow through as planned.pending-iteration.md after a successful apply.Context for iteration: $ARGUMENTS