specrew-iteration-resume
Resume an interrupted iteration by analyzing state.md plus plan.md's task table and suggesting the next safe execution step or escalation.
- License 许可
- MIT
- 最近更新
- 2026-08-28
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- specrew-iteration-resume
- domain
- lifecycle-recovery
- source
- Specrew governance pillar — iteration resume / recovery helper
- confidence
- high
- description
- Resume an interrupted iteration by analyzing state.md plus plan.md's task table and suggesting the next safe execution step or escalation.
02 资源文件 1
- 其他.specrew-managed81 B
03 SKILL.md 正文
specrew-iteration-resume
Type: Recovery Skill
Schema: v1
Status: Active recovery method
Purpose
Resumes interrupted iterations by analyzing state.md plus the authoritative task table in plan.md, then suggests the next execution step or active repair escalation.
When to Use
- When an iteration is interrupted (agent crash, user stops work, blocker encountered)
- When resuming work after a break
- When transferring iteration ownership (handoff between agents/humans)
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
| iteration_directory | path | Yes | Path to specs/<feature>/iterations/NNN/ containing state.md and plan.md |
| resume_mode | enum: continue, replan, abort | Yes | How to resume the iteration |
Process
- Parse
state.mdto extract:- Last completed task
- In-progress tasks (started but not done)
- Remaining tasks (not yet started)
- Active repair escalation state, if one is recorded
- Parse
plan.mdto read the authoritative task table and current task statuses. - Reconcile stale or partial
state.mdmetadata against the task table:- Repair missing
Tasks Remaining,In Progress, andUpdatedmetadata when possible - Treat
plannedtasks as remaining work andin-progress/needs-reworktasks as active work - Surface blockers when
state.mdreferences unknown tasks or plan-blocked tasks
- Repair missing
- Determine resumption strategy based on
resume_mode:- continue: Resume the current repair escalation first; after activating or resolving escalation, sync
.squad/config.jsonwithsync-squad-model-overrides.ps1, otherwise resume the current in-progress task or suggest the next incomplete task - replan: Suggest re-planning remaining tasks
- abort: Mark iteration as abandoned, list salvageable tasks
- continue: Resume the current repair escalation first; after activating or resolving escalation, sync
- Generate resume report
- Write the report back into
state.mdwhen the iteration is resumable or intentionally being re-planned/aborted
Outputs
| Output | Type | Description |
|---|---|---|
| status | enum: ready, blocked, needs-replan | Resumption readiness |
| last_completed_task | string? | ID of last successfully completed task |
| in_progress_tasks[] | array | Tasks that were started but not finished |
| remaining_tasks[] | array | Tasks not yet started |
| next_suggested_task | string? | Task ID to execute next (null if blocked) |
| next_recovery_action | string? | Escalation step to resume before normal task work |
| repair_escalation | object | Persisted escalation state from state.md |
| blockers[] | array | Issues preventing resumption |
| blockers[].type | enum: dependency, role, resource | Type of blocker |
| blockers[].description | string | What is blocking progress |
| salvageable_tasks[] | array? | Tasks that can be moved to next iteration (if abort mode) |
Side Effects
- Updates
state.mdwith repaired execution metadata, resume timestamp, escalation summary, suggested next task, and resume report - No file writes if status is "blocked"
Error Handling
- If
state.mdis not found underiteration_directory: infer state fromplan.md(all tasks assumed "planned") - If
plan.mdis not found underiteration_directory: return error (cannot resume without plan) - If
state.mdreferences unknown tasks or blocked work: report blockers and preserve the existing file
Example Usage
pwsh -File .\.specify\extensions\specrew-speckit\scripts\resume-iteration.ps1 `
-IterationDirectory .\specs\001-feature\iterations\000 `
-ResumeMode continue
Expected Output (READY): status: "ready" last_completed_task: "T-003" in_progress_tasks: [] remaining_tasks: ["T-004", "T-005", "T-006"] next_suggested_task: "T-004" blockers: [] salvageable_tasks: null
Expected Output (BLOCKED): status: "blocked" last_completed_task: "T-003" in_progress_tasks: ["T-004"] remaining_tasks: ["T-005", "T-006"] next_suggested_task: null blockers: - type: "dependency" description: "T-004 is blocked waiting for external API access" - type: "role" description: "Reviewer role is unassigned; cannot proceed to review phase" salvageable_tasks: null
Expected Output (ABORT): status: "needs-replan" last_completed_task: "T-002" in_progress_tasks: [] remaining_tasks: ["T-003", "T-004", "T-005"] next_suggested_task: null blockers: - type: "resource" description: "Critical blocker: upstream dependency no longer available" salvageable_tasks: ["T-005", "T-006"]
---
**Implementation Status**: Implemented for FR-019 / Iteration 2.
04 同仓库更多 Skills
windows-compatibility
Cross-platform path handling and command patterns
versioning-policy
Semver versioning rules for Squad SDK and CLI — prevents prerelease version incidents
tiered-memory
Three-tier agent memory model (hot/cold/wiki) for context reduction per spawn
test-discipline
Update tests when changing APIs — no exceptions
squad
Squad's command catalog and interactive menu. Invoke via /squad (slash command) or natural language ("squad commands", "what can squad do", "show me squad options"). Presents categorized operations (Install & Upgrade, Team Management, Issues & PRs, Plugins & Skills, Model & Cost, Sessions & State) as an interactive picker. Routes to the right squad CLI command or the Squad coordinator agent.
squad-version-check
Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt.