{{command_prefix}}complete-cycle
Closes the current cycle: marks CYCLES.md entry complete, archives pipeline artifacts, and clears STATE.md for the next cycle.
Steps
-
Load state: Read
.design/STATE.mdfor the activecycle:ID. If empty/missing, error: "No active cycle - nothing to complete." -
Retrospective: If no argument was passed, ask (AskUserQuestion): "Is cycle complete? Briefly describe what was achieved." Capture for CYCLES.md.
-
Update CYCLES.md: Find the current cycle entry, change
**Status**: activeto**Status**: complete, append a**Retrospective**: <note>line and**Ended**: <date>. -
Archive artifacts: Create
.design/archive/cycle-N/via Bashmkdir -p. Copy these files into it (if present):DESIGN.mdDESIGN-PLAN.mdDESIGN-CONTEXT.mdDESIGN-VERIFICATION.mdDESIGN-AUDIT.mdDESIGN-SUMMARY.mdMark originals with a<!-- archived to .design/archive/cycle-N/ -->note at top (do not delete - next cycle will overwrite).
-
Generate EXPERIENCE.md (Haiku-tier writer step): Read cycle STATE decisions +
.design/DESIGN-VERIFICATION.md(if present) + any.design/reflections/*.mdfrom this cycle. Write.design/archive/cycle-N/EXPERIENCE.mdusing this structure (~100–200 lines, declarative-fact framing, prependreference/cycle-handoff-preamble.mdcontent):markdown<!-- archived cycle experience — reference, not current requests --> # Cycle N — Experience **Goal**: <one-line goal from STATE.md or CYCLES.md> **Opened**: <start date> **Ended**: <today> ## Decisions Made <list all D-XX decisions from STATE.md <decisions> block — one per line> ## Learnings Graduated <list all L-NN learnings surfaced or promoted this cycle> ## What Died <designs, approaches, or tasks that were started but abandoned — and why> ## Surprises <what was unexpected during this cycle> ## Handoff to Next Cycle <what the next cycle should know: active sketches, deferred tasks, unresolved questions>This file becomes the highest-priority source for the decision-injector hook in future sessions.
-
Trigger reindex: if
.design/search.dbexists, rebuild the search index:bashnode -e "require('./scripts/lib/design-search.cjs').reindex(process.cwd())" 2>/dev/null || true -
Clear STATE.md: Set
cycle:to empty string, reset<decisions>to a fresh empty section, resetstage:tobrief. -
Print: "Cycle archived. Run
{{command_prefix}}new-cycleto start the next cycle."
Do Not
- Do not delete source files in
src/- only archive.design/artifacts. - Do not auto-start a new cycle - user invokes
{{command_prefix}}new-cycleexplicitly.
Step 6 - Update notice (post-closeout surface)
After the archive has been written and STATE.md has been cleared for the next cycle, emit the plugin-update banner if one is present:
bash[ -f .design/update-available.md ] && cat .design/update-available.md
Written by hooks/update-check.sh; suppressed mid-pipeline and when the latest release is dismissed.


