maestro-milestone-complete
Milestone Complete
Usage
$maestro-milestone-complete "v1.0"
$maestro-milestone-complete # uses current_milestone from state.json
$maestro-milestone-complete --force "v1.0" # skip audit check
Flags:
[milestone]: Target milestone identifier (default: current_milestone from state.json)--force: Skip audit verification, complete without passing audit
Output: .workflow/milestones/{milestone}/ archive directory
Overview
Sequential milestone archival: validate audit + phases -> create archive -> extract learnings -> update state -> report.
Implementation
Step 1: Parse Input
- Read
.workflow/state.jsonto getcurrent_milestone - If
$ARGUMENTScontains a milestone identifier, use it; otherwise usecurrent_milestone - Detect
--forceflag - If no milestone resolvable: E001 -- exit
Step 2: Validate Completion
2a. Check audit report:
Read .workflow/milestone-audit-{milestone}.md
- If missing and not
--force: E002 -- warn "No audit report found. Run milestone-audit first." Ask user to proceed or abort. - If verdict is FAIL and not
--force: E002 -- exit with suggestion to fix failing items
2b. Verify all phases completed:
For each phase in milestone (from roadmap.md):
Read .workflow/phases/{NN}-{slug}/index.json
If status != "completed": E003 -- list incomplete phases, exit
Step 3: Create Archive
-
Create archive directory:
mkdir -p .workflow/milestones/{milestone}/phases/ -
Snapshot roadmap:
cp .workflow/roadmap.md .workflow/milestones/{milestone}/roadmap-snapshot.md -
Archive each phase directory:
cp -r .workflow/phases/{NN}-{slug}/ .workflow/milestones/{milestone}/phases/{NN}-{slug}/ -
Copy audit report (if exists):
cp .workflow/milestone-audit-{milestone}.md .workflow/milestones/{milestone}/audit-report.md
Step 4: Extract Learnings
- Load existing learnings from
.workflow/specs/learnings.mdto avoid duplicates - For each phase, read
reflection-log.mdif exists:- Extract strategy adjustments, patterns discovered, pitfalls encountered
- Append aggregated learnings to
.workflow/specs/learnings.md:## Milestone {milestone} Learnings ({date}) ### Strategy Adjustments - {from reflection-log entries} ### Patterns Discovered - {from reflection-log entries} ### Pitfalls Encountered - {from reflection-log entries}
Step 5: Update State
-
Update
.workflow/state.json:current_milestone-> next version (increment minor)current_phase-> 1 (reset)status-> "idle"- Reset
phases_summarycounters - Preserve
accumulated_context(decisions + deferred items carry forward) - Set
last_updatedtimestamp
-
Clean up completed phase directories:
rm -rf .workflow/phases/{NN}-{slug}/ # for each archived phaseKeep
.workflow/phases/directory (empty, ready for new milestone).
Step 6: Report and Route
Display completion summary:
====================================================
MILESTONE COMPLETED: {milestone}
====================================================
Archived:
- {N} phases archived to .workflow/milestones/{milestone}/
- Roadmap snapshot saved
- Audit report archived
- {M} learnings extracted to specs/learnings.md
State reset:
- Current milestone: {next_milestone}
- Current phase: 1
- Status: idle
====================================================
Suggest next steps:
- "Start planning next milestone?" -> Skill({ skill: "maestro-plan" })
- "Project is idle." -> Skill({ skill: "manage-status" })
Error Handling
| Code | Severity | Condition | Recovery |
|---|---|---|---|
| E001 | error | Milestone identifier required and not resolvable | Prompt user for milestone |
| E002 | error | Audit not passed (missing or FAIL verdict) | Run milestone-audit first, or use --force |
| E003 | error | Incomplete phases remain | Complete or verify remaining phases |
Core Rules
- Never delete phase directories before archiving -- always copy first
- Preserve
accumulated_contextacross milestone boundaries - Learnings dedup -- check existing entries before appending
- Git commit if in a git repo:
chore: complete milestone {milestone} - --force bypasses audit check only, not phase completion check
More from catlog22/maestro-flow
spec-map
Analyze codebase with 4 parallel mapper agents via CSV wave pipeline. Produces .workflow/codebase/ documents for tech-stack, architecture, features, and cross-cutting concerns.
1manage-codebase-rebuild
Full codebase documentation rebuild via CSV wave pipeline. Spawns 5 parallel doc generator agents to scan project and produce complete .workflow/codebase/ documentation set. Replaces manage-codebase-rebuild command.
1maestro-quick
Fast-track single task execution with workflow guarantees — analyze, plan, execute in one pass
1quality-sync
Sync codebase docs after code changes -- traces git diff through component/feature/requirement layers
1maestro-roadmap
Lightweight roadmap generation via 2-wave CSV pipeline. Wave 1 runs parallel requirement analysis agents (scope, risk, dependency). Wave 2 runs roadmap assembly agent producing roadmap.md with phases, milestones, and success criteria. Replaces maestro-roadmap command.
1manage-memory
Manage memory entries across workflow and system stores (list, search, view, edit, delete, prune)
1