Skip to content

complete-slice

complete-slice is the closer. After all tasks in a slice are marked complete, this prompt dispatches an agent that verifies the assembled work actually delivers what the slice promised — not just that individual tasks finished, but that the whole slice goal is met end-to-end. If any slice-level verification checks fail, the closer fixes them before declaring the slice done. If the slice plan includes observability or diagnostic surfaces, the closer confirms those work too.

Beyond verification, the closer has several primary outputs. The slice summary compresses all task summaries into a concise record of what the slice actually delivered — written not just for archival purposes but for the reassess-roadmap agent that reads it next, and for future slice researchers who depend on this slice. The slice summary’s Forward Intelligence section is particularly important: it captures hard-won knowledge about what’s fragile, what assumptions changed, and what downstream slices need to watch out for.

The UAT script is a concrete set of test cases derived from the slice plan and task summaries — numbered steps with preconditions and expected outcomes tailored to what this slice actually built. It is not a generic template.

The closer also performs knowledge capture: it appends significant architectural decisions to .gsd/DECISIONS.md and non-obvious lessons learned to .gsd/KNOWLEDGE.md, but only when the content would genuinely save future agents from repeating investigation. If execution produced evidence that a requirement changed status, the closer calls gsd_requirement_update with the requirement ID, updated status, and validation evidence — it does not write .gsd/REQUIREMENTS.md directly, as the engine renders that file from the database. Similarly, if .gsd/PROJECT.md exists, the closer refreshes it as a full-document write using the write tool, not edit.

After writing all artifacts, the closer calls gsd_complete_slice with the milestone ID, slice ID, slice summary, and UAT content. This tool persists to both the database and disk and renders the roadmap projection automatically — the closer never manually marks roadmap checkboxes.

Effort scales with complexity — a simple 1-2 task slice gets a brief summary and lightweight verification, while a complex multi-system slice gets thorough verification and a detailed summary.

The dispatcher fires this prompt when the slice plan shows all tasks as [x] but the slice itself is not yet marked done in the roadmap. The closer must call gsd_complete_slice before finishing — this call persists the slice summary and UAT to disk and marks the slice complete in the database, which then renders the updated ROADMAP.md projection automatically.

VariableDescriptionRequired
sliceIdCurrent slice identifier within the milestone (e.g. S01)Yes
sliceTitleHuman-readable title of the slice being completedYes
milestoneIdCurrent milestone identifier (e.g. M001)Yes
workingDirectoryAbsolute path to the project working directoryYes
inlinedContextPre-assembled context block containing the slice plan, all task summaries, output templates, and the milestone roadmapYes
skillActivationInjected skill-loading instruction block; activates any skills that match the current slice contextYes
sliceSummaryPathFile path where the slice completion summary should be writtenYes
sliceUatPathFile path where the UAT script should be writtenYes
slicePathDirectory path to the current slice (used as a safe reference; must not be passed directly to the read tool)Yes
  • /gsd auto — dispatched when all tasks in a slice are complete but the slice is not yet marked done in the roadmap