pi-maestro-flow 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +124 -0
  2. package/agents/aggregator.md +27 -0
  3. package/agents/cli-explore-agent.md +188 -0
  4. package/agents/cross-role-reviewer.md +171 -0
  5. package/agents/delegate.md +19 -0
  6. package/agents/explorer.md +23 -0
  7. package/agents/impeccable-agent.md +99 -0
  8. package/agents/ralph-executor.md +81 -0
  9. package/agents/reference.md +24 -0
  10. package/agents/role-design-author.md +220 -0
  11. package/agents/team-supervisor.md +143 -0
  12. package/agents/team-worker.md +237 -0
  13. package/agents/ui-design-agent.md +270 -0
  14. package/agents/workflow-analyzer.md +116 -0
  15. package/agents/workflow-codebase-mapper.md +77 -0
  16. package/agents/workflow-collab-planner.md +147 -0
  17. package/agents/workflow-debugger.md +104 -0
  18. package/agents/workflow-executor.md +133 -0
  19. package/agents/workflow-external-researcher.md +86 -0
  20. package/agents/workflow-integration-checker.md +83 -0
  21. package/agents/workflow-nyquist-auditor.md +85 -0
  22. package/agents/workflow-phase-researcher.md +85 -0
  23. package/agents/workflow-plan-checker.md +100 -0
  24. package/agents/workflow-planner.md +200 -0
  25. package/agents/workflow-project-researcher.md +74 -0
  26. package/agents/workflow-research-synthesizer.md +70 -0
  27. package/agents/workflow-reviewer.md +82 -0
  28. package/agents/workflow-roadmapper.md +81 -0
  29. package/agents/workflow-verifier.md +120 -0
  30. package/package.json +58 -0
  31. package/skills/codify-to-knowhow/SKILL.md +167 -0
  32. package/skills/delegation-check/SKILL.md +297 -0
  33. package/skills/domain-add/SKILL.md +75 -0
  34. package/skills/insight-challenge/SKILL.md +226 -0
  35. package/skills/learn-decompose/SKILL.md +124 -0
  36. package/skills/learn-follow/SKILL.md +163 -0
  37. package/skills/learn-investigate/SKILL.md +160 -0
  38. package/skills/learn-second-opinion/SKILL.md +128 -0
  39. package/skills/maestro/SKILL.md +239 -0
  40. package/skills/maestro-amend/SKILL.md +169 -0
  41. package/skills/maestro-analyze/SKILL.md +173 -0
  42. package/skills/maestro-blueprint/SKILL.md +159 -0
  43. package/skills/maestro-brainstorm/SKILL.md +193 -0
  44. package/skills/maestro-collab/SKILL.md +181 -0
  45. package/skills/maestro-companion/SKILL.md +536 -0
  46. package/skills/maestro-composer/SKILL.md +192 -0
  47. package/skills/maestro-execute/SKILL.md +193 -0
  48. package/skills/maestro-fork/SKILL.md +104 -0
  49. package/skills/maestro-grill/SKILL.md +151 -0
  50. package/skills/maestro-guard/SKILL.md +124 -0
  51. package/skills/maestro-help/SKILL.md +328 -0
  52. package/skills/maestro-impeccable/SKILL.md +302 -0
  53. package/skills/maestro-init/SKILL.md +151 -0
  54. package/skills/maestro-merge/SKILL.md +90 -0
  55. package/skills/maestro-milestone-audit/SKILL.md +117 -0
  56. package/skills/maestro-milestone-complete/SKILL.md +133 -0
  57. package/skills/maestro-milestone-release/SKILL.md +131 -0
  58. package/skills/maestro-next/SKILL.md +269 -0
  59. package/skills/maestro-overlay/SKILL.md +203 -0
  60. package/skills/maestro-plan/SKILL.md +194 -0
  61. package/skills/maestro-player/SKILL.md +184 -0
  62. package/skills/maestro-quick/SKILL.md +117 -0
  63. package/skills/maestro-ralph/SKILL.md +905 -0
  64. package/skills/maestro-ralph-cli/SKILL.md +976 -0
  65. package/skills/maestro-ralph-cli-execute/SKILL.md +229 -0
  66. package/skills/maestro-ralph-execute/SKILL.md +409 -0
  67. package/skills/maestro-ralph-v2/SKILL.md +1198 -0
  68. package/skills/maestro-roadmap/SKILL.md +157 -0
  69. package/skills/maestro-swarm-workflow/SKILL.md +272 -0
  70. package/skills/maestro-tools-execute/SKILL.md +143 -0
  71. package/skills/maestro-tools-register/SKILL.md +192 -0
  72. package/skills/maestro-ui-codify/SKILL.md +127 -0
  73. package/skills/maestro-universal-workflow/SKILL.md +622 -0
  74. package/skills/maestro-update/SKILL.md +156 -0
  75. package/skills/manage-codebase-rebuild/SKILL.md +111 -0
  76. package/skills/manage-drift-realign/SKILL.md +159 -0
  77. package/skills/manage-harvest/SKILL.md +121 -0
  78. package/skills/manage-issue/SKILL.md +88 -0
  79. package/skills/manage-issue-discover/SKILL.md +104 -0
  80. package/skills/manage-kg-extractors/SKILL.md +147 -0
  81. package/skills/manage-knowhow/SKILL.md +102 -0
  82. package/skills/manage-knowhow-capture/SKILL.md +109 -0
  83. package/skills/manage-knowledge-audit/SKILL.md +147 -0
  84. package/skills/manage-status/SKILL.md +80 -0
  85. package/skills/manage-wiki/SKILL.md +104 -0
  86. package/skills/odyssey-debug/SKILL.md +344 -0
  87. package/skills/odyssey-improve/SKILL.md +423 -0
  88. package/skills/odyssey-planex/SKILL.md +542 -0
  89. package/skills/odyssey-review-test-fix/SKILL.md +392 -0
  90. package/skills/odyssey-ui/SKILL.md +388 -0
  91. package/skills/prompt-generator/SKILL.md +470 -0
  92. package/skills/quality-auto-test/SKILL.md +168 -0
  93. package/skills/quality-debug/SKILL.md +176 -0
  94. package/skills/quality-refactor/SKILL.md +108 -0
  95. package/skills/quality-retrospective/SKILL.md +134 -0
  96. package/skills/quality-review/SKILL.md +169 -0
  97. package/skills/quality-sync/SKILL.md +90 -0
  98. package/skills/quality-test/SKILL.md +183 -0
  99. package/skills/scholar-anti-ai-writing/SKILL.md +173 -0
  100. package/skills/scholar-anti-ai-writing/references/patterns-chinese.md +242 -0
  101. package/skills/scholar-anti-ai-writing/references/patterns-english.md +242 -0
  102. package/skills/scholar-citation-verify/SKILL.md +166 -0
  103. package/skills/scholar-citation-verify/references/api-usage.md +372 -0
  104. package/skills/scholar-citation-verify/references/common-errors.md +384 -0
  105. package/skills/scholar-citation-verify/references/verification-rules.md +399 -0
  106. package/skills/scholar-experiment/SKILL.md +321 -0
  107. package/skills/scholar-ideation/SKILL.md +288 -0
  108. package/skills/scholar-latex-organizer/SKILL.md +186 -0
  109. package/skills/scholar-publish/SKILL.md +220 -0
  110. package/skills/scholar-rebuttal-pro/README.md +313 -0
  111. package/skills/scholar-rebuttal-pro/SKILL.md +511 -0
  112. package/skills/scholar-review/SKILL.md +227 -0
  113. package/skills/scholar-thesis-docx/README.md +111 -0
  114. package/skills/scholar-thesis-docx/README_EN.md +108 -0
  115. package/skills/scholar-thesis-docx/SKILL.md +212 -0
  116. package/skills/scholar-thesis-docx/references/failure-patterns-and-quality-gates.md +178 -0
  117. package/skills/scholar-thesis-docx/references/figure-and-code-rules.md +33 -0
  118. package/skills/scholar-thesis-docx/references/paper-format-workflow.md +68 -0
  119. package/skills/scholar-thesis-docx/references/script-usage.md +157 -0
  120. package/skills/scholar-thesis-docx/scripts/audit_docx_ooxml.py +429 -0
  121. package/skills/scholar-thesis-docx/scripts/check_word_com.ps1 +50 -0
  122. package/skills/scholar-thesis-docx/scripts/export_word_pdf.ps1 +62 -0
  123. package/skills/scholar-thesis-docx/scripts/normalize_word_styles.ps1 +498 -0
  124. package/skills/scholar-thesis-docx/scripts/render_mermaid_figure.ps1 +148 -0
  125. package/skills/scholar-writing/SKILL.md +296 -0
  126. package/skills/security-audit/SKILL.md +244 -0
  127. package/skills/skill-generator/SKILL.md +472 -0
  128. package/skills/skill-iter-tune/SKILL.md +382 -0
  129. package/skills/skill-simplify/SKILL.md +63 -0
  130. package/skills/skill-tuning/SKILL.md +174 -0
  131. package/skills/spec-add/SKILL.md +105 -0
  132. package/skills/spec-load/SKILL.md +98 -0
  133. package/skills/spec-remove/SKILL.md +74 -0
  134. package/skills/spec-setup/SKILL.md +75 -0
  135. package/skills/team-adversarial-swarm/SKILL.md +233 -0
  136. package/skills/team-adversarial-swarm/scripts/__pycache__/pheromone.cpython-313.pyc +0 -0
  137. package/skills/team-adversarial-swarm/scripts/__pycache__/scoring.cpython-313.pyc +0 -0
  138. package/skills/team-adversarial-swarm/scripts/aco.py +473 -0
  139. package/skills/team-adversarial-swarm/scripts/pheromone.py +144 -0
  140. package/skills/team-adversarial-swarm/scripts/scoring.py +92 -0
  141. package/skills/team-adversarial-swarm/scripts/test_aco.py +475 -0
  142. package/skills/team-arch-opt/SKILL.md +158 -0
  143. package/skills/team-brainstorm/SKILL.md +171 -0
  144. package/skills/team-coordinate/SKILL.md +266 -0
  145. package/skills/team-designer/SKILL.md +160 -0
  146. package/skills/team-executor/SKILL.md +189 -0
  147. package/skills/team-frontend/SKILL.md +136 -0
  148. package/skills/team-frontend-debug/SKILL.md +198 -0
  149. package/skills/team-interactive-craft/SKILL.md +141 -0
  150. package/skills/team-issue/SKILL.md +171 -0
  151. package/skills/team-lifecycle-v4/SKILL.md +209 -0
  152. package/skills/team-motion-design/SKILL.md +142 -0
  153. package/skills/team-perf-opt/SKILL.md +175 -0
  154. package/skills/team-planex/SKILL.md +137 -0
  155. package/skills/team-quality-assurance/SKILL.md +147 -0
  156. package/skills/team-review/SKILL.md +147 -0
  157. package/skills/team-roadmap-dev/SKILL.md +169 -0
  158. package/skills/team-swarm/SKILL.md +178 -0
  159. package/skills/team-swarm/scripts/aco.py +473 -0
  160. package/skills/team-swarm/scripts/pheromone.py +144 -0
  161. package/skills/team-swarm/scripts/scoring.py +92 -0
  162. package/skills/team-swarm/scripts/test_aco.py +475 -0
  163. package/skills/team-tech-debt/SKILL.md +128 -0
  164. package/skills/team-testing/SKILL.md +143 -0
  165. package/skills/team-ui-polish/SKILL.md +141 -0
  166. package/skills/team-uidesign/SKILL.md +144 -0
  167. package/skills/team-ultra-analyze/SKILL.md +173 -0
  168. package/skills/team-ux-improve/SKILL.md +151 -0
  169. package/skills/team-visual-a11y/SKILL.md +156 -0
  170. package/skills/workflow-skill-designer/SKILL.md +496 -0
  171. package/src/extension/index.ts +222 -0
  172. package/src/extension/schemas.ts +131 -0
  173. package/src/providers/cli-tools-loader.ts +74 -0
  174. package/src/providers/provider-registry.ts +130 -0
  175. package/src/tools/delegate.ts +85 -0
  176. package/src/tools/explore.ts +134 -0
  177. package/src/tools/moa.ts +213 -0
  178. package/src/tools/status.ts +99 -0
  179. package/src/tools/wait.ts +166 -0
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: quality-debug
3
+ description: "Use when bugs, test failures, or unexpected behavior need systematic root cause investigation Arguments: [issue description] [-c] [--from-uat <phase>] [--parallel]"
4
+ allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
5
+ ---
6
+
7
+ <purpose>
8
+ Debug issues using scientific method with subagent isolation and persistent debug state. Three entry modes (standalone, from-UAT, parallel) and structured root cause collection with UAT feedback loop. Full algorithm defined in workflow debug.md.
9
+ </purpose>
10
+
11
+ <required_reading>
12
+ @~/.maestro/workflows/debug.md
13
+ </required_reading>
14
+
15
+ <context>
16
+ User's issue: $ARGUMENTS
17
+
18
+ **Flags:**
19
+ - `--from-uat <phase>` -- Read gaps from phase's uat.md as pre-filled symptoms
20
+ - `--parallel` -- Spawn parallel debug agents (one per gap cluster)
21
+
22
+ **All context via state.json.artifacts[]:**
23
+
24
+ ```
25
+ related = artifacts.filter(a =>
26
+ a.phase === target_phase && a.milestone === current_milestone
27
+ ).sort_by(completed_at asc)
28
+ ```
29
+
30
+ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
31
+ - **execute** → .summaries/, .task/ (source of code changes)
32
+ - **review** → review.json (findings guide hypothesis formation)
33
+ - **debug** → understanding.md, evidence.ndjson (prior investigations, avoid re-investigation)
34
+ - **test** → uat.md (--from-uat gap source), .tests/
35
+
36
+ ### Pre-load (optional, proceed without)
37
+ - Codebase docs: `.workflow/codebase/ARCHITECTURE.md` → module boundaries
38
+ - Wiki: `maestro search "<symptom keywords>" --json` → prior investigations
39
+ - Specs: `maestro load --type spec --category debug --keyword "<symptom>"` → known issues/workarounds
40
+ - Role knowledge: `maestro search --category debug` → select relevant → `maestro load --type knowhow --id`
41
+
42
+ **Output**: `DEBUG_DIR = .workflow/scratch/{YYYYMMDD}-debug-P{N}-{slug}/` (P{N} = phase number when phase-scoped; omit for standalone). Output directory rules defined in workflow debug.md Step 4.
43
+
44
+ **Output boundary**: ALL file writes MUST target `DEBUG_DIR` or `.workflow/state.json` only. NEVER modify source code, test files, or other artifacts outside these paths during investigation.
45
+ </context>
46
+
47
+ <invariants>
48
+ 1. **Investigation is read-only on source** — debug MUST NOT modify source code, test files, or execution artifacts. Diagnosis produces understanding.md, evidence.ndjson, and reports only.
49
+ 2. **Root cause requires reproduction** — NEVER declare a root cause confirmed without evidence (code trace, log entry, or reproduction steps). Hypothesis without evidence stays "suspected".
50
+ 3. **Evidence is append-only** — evidence.ndjson entries MUST only be appended, NEVER modified or deleted. Each entry is an immutable observation.
51
+ 4. **Confidence is multi-factor** — root cause confidence MUST use the multi-factor scoring model (Step 7.0). NEVER use bare high/medium/low without dimensional breakdown.
52
+ 5. **Prior investigations are consulted** — when related debug artifacts exist, check understanding.md for prior root causes. NEVER re-investigate an already-confirmed root cause without new symptoms.
53
+ 6. **Fix direction is not fix execution** — debug produces `fix_direction` and `affected_files` but NEVER applies fixes. Fix execution belongs to plan→execute cycle.
54
+ </invariants>
55
+
56
+ <execution>
57
+ Follow '~/.maestro/workflows/debug.md' completely.
58
+
59
+ ### Phase Gates (MANDATORY, BLOCKING)
60
+
61
+ **GATE 1: Input → Investigation**
62
+ - REQUIRED: Symptoms gathered (interactive) or loaded from UAT (--from-uat).
63
+ - REQUIRED: Debug output directory created.
64
+ - BLOCKED if missing: cannot investigate without symptom baseline.
65
+
66
+ **GATE 2: Investigation → Diagnosis**
67
+ - REQUIRED: Debug agent(s) spawned with full symptom context.
68
+ - REQUIRED: evidence.ndjson written with structured entries.
69
+ - REQUIRED: understanding.md tracks evolving understanding.
70
+ - BLOCKED if incomplete: continue investigation before declaring root cause.
71
+
72
+ **GATE 3: Diagnosis → Completion**
73
+ - REQUIRED: Root causes collected with fix_direction and affected_files.
74
+ - REQUIRED: Multi-factor confidence scored per gap.
75
+ - REQUIRED: Readiness gate checked and pressure pass completed.
76
+ - BLOCKED if inconclusive: resume session or escalate.
77
+
78
+ **Register artifact on completion (phase-scoped only):**
79
+
80
+ Confirm before writing:
81
+ ```
82
+ AskUserQuestion("Register debug artifact DBG-{NNN} in state.json? (yes/no)")
83
+ → yes: proceed with write
84
+ → no: skip registration, continue to knowledge inquiry
85
+ ```
86
+
87
+ ```
88
+ Append to state.json.artifacts[]:
89
+ {
90
+ id: nextArtifactId(artifacts, "debug"), // DBG-001
91
+ type: "debug",
92
+ milestone: current_milestone,
93
+ phase: target_phase,
94
+ scope: "phase",
95
+ path: "scratch/{YYYYMMDD}-debug-P{N}-{slug}",
96
+ status: all_diagnosed ? "completed" : "failed",
97
+ depends_on: triggering_review_id || exec_art.id,
98
+ harvested: false,
99
+ created_at: start_time,
100
+ completed_at: now()
101
+ }
102
+ ```
103
+
104
+ ### Post-debug Knowledge Inquiry
105
+
106
+ For each matching condition, ask the user explicitly:
107
+
108
+ | Condition | Ask | Route |
109
+ |-----------|-----|-------|
110
+ | Recurring root cause pattern (seen in prior debug) | "Document in debug-notes.md?" | spec-add debug |
111
+ | Non-obvious fix / workaround | "Record as learning?" | spec-add learning |
112
+ | Root cause = architectural boundary violation | "Update architecture-constraints.md?" | spec-add arch |
113
+
114
+ ```
115
+ AskUserQuestion("<ask text> (yes/no)")
116
+ → yes: Skill("spec-add", "<category> <content> --description \"<summary>\"")
117
+ → no: skip this entry, proceed to next condition or completion
118
+ ```
119
+
120
+ </execution>
121
+
122
+ <completion>
123
+ ### Standalone report
124
+
125
+ ```
126
+ --- COMPLETION STATUS ---
127
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
128
+ CONCERNS: {description if applicable}
129
+ --- END STATUS ---
130
+ ```
131
+
132
+ ### Ralph-invoked completion
133
+
134
+ End the step by calling the CLI (no text block output):
135
+ ```
136
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
137
+ ```
138
+
139
+ ### Next-step routing
140
+
141
+ | Condition | Suggestion |
142
+ |-----------|-----------|
143
+ | Root cause found, fix needed | `/maestro-plan {phase} --gaps` |
144
+ | Root cause found (from UAT), auto-fix | `/quality-test {phase} --auto-fix` |
145
+ | Inconclusive, need more info | `/quality-debug {issue} -c` (resume) |
146
+ | Standalone fix already applied | `/maestro-execute {phase}` |
147
+ </completion>
148
+
149
+ <error_codes>
150
+ | Code | Severity | Condition | Recovery |
151
+ |------|----------|-----------|----------|
152
+ | E001 | error | Issue description required (no arguments, no active sessions) | Check arguments format, re-run with correct input |
153
+ | E002 | error | UAT file not found for --from-uat phase | Verify UAT file exists for specified phase |
154
+ | W001 | warning | Existing debug session found, offer resume | Review existing sessions, choose resume or new |
155
+ | W002 | warning | Checkpoint reached, user input needed | Provide requested input to continue |
156
+ | W003 | warning | Some gaps inconclusive, partial diagnosis | Review partial results, retry inconclusive gaps |
157
+ </error_codes>
158
+
159
+ <success_criteria>
160
+ - [ ] Input parsed: standalone, --from-uat, or --parallel mode determined
161
+ - [ ] Active sessions checked and resume offered if applicable
162
+ - [ ] Symptoms gathered (interactive) or loaded from UAT (pre-filled)
163
+ - [ ] Debug output directory created (phase .debug/ or scratch/)
164
+ - [ ] Debug agent(s) spawned with full symptom context
165
+ - [ ] If --parallel: one agent per gap cluster, all concurrent
166
+ - [ ] evidence.ndjson written with structured NDJSON entries
167
+ - [ ] understanding.md tracks evolving understanding per cluster
168
+ - [ ] Root causes collected with fix_direction and affected_files
169
+ - [ ] Multi-factor confidence scored per gap (Step 7.0) replacing simple high/medium/low
170
+ - [ ] Readiness gate checked before ROOT CAUSE declaration
171
+ - [ ] Pressure pass completed on confirmed hypothesis
172
+ - [ ] Confidence table appended to understanding.md
173
+ - [ ] If --from-uat: uat.md gaps updated with diagnosis artifacts
174
+ - [ ] Results unified into diagnosis summary with confidence section
175
+ - [ ] Next step routed (plan --gaps + execute if fix needed, verify if fix applied, resume if inconclusive)
176
+ </success_criteria>
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: quality-refactor
3
+ description: "Use when accumulated tech debt needs systematic identification and safe reduction Arguments: [<scope>]"
4
+ allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
5
+ ---
6
+
7
+ <purpose>
8
+ Targeted refactoring with safety guarantees: plan → confirm → execute with test verification per change → reflection-log.md.
9
+ </purpose>
10
+
11
+ <required_reading>
12
+ @~/.maestro/workflows/refactor.md
13
+ </required_reading>
14
+
15
+ <context>
16
+ Scope: $ARGUMENTS (required)
17
+ - Module path: "src/auth" - specific directory
18
+ - Feature area: "authentication" - conceptual scope
19
+ - "all" - full codebase scan
20
+
21
+ If not provided, prompt user for scope.
22
+
23
+ ### Pre-load context (before refactoring)
24
+
25
+ 1. **Coding specs**: Run `maestro load --type spec --category coding` to load coding conventions. Apply conventions to all refactored code.
26
+ 2. **Review specs**: Run `maestro load --type spec --category review` to load review standards. Use as quality gate for refactored code.
27
+ 3. **Role Knowledge**:
28
+ - Browse: `maestro search --category coding`
29
+ - Identify task-relevant entries, then load: `maestro load --type knowhow --id <id1> [id2...]`
30
+ 4. All are optional — proceed without if unavailable.
31
+
32
+ **Output boundary**: Refactoring modifies source files within the declared scope only. Ancillary outputs (reflection-log.md) MUST target `.workflow/scratch/{YYYYMMDD}-refactor-{slug}/`. NEVER modify files outside the confirmed scope without re-confirmation.
33
+ </context>
34
+
35
+ <invariants>
36
+ 1. **Plan before change** — NEVER apply refactoring changes without a confirmed plan. Every modification traces to a plan item.
37
+ 2. **Behavioral equivalence** — refactoring MUST preserve existing behavior. All tests MUST pass after each individual change, not just at the end.
38
+ 3. **Scope is locked after confirmation** — once the user confirms the refactoring plan, do NOT expand scope to include additional files or changes without re-confirmation.
39
+ 4. **Incremental verification** — each discrete refactoring step MUST be verified (tests run) before proceeding to the next. NEVER batch multiple unrelated changes into a single verification.
40
+ 5. **No feature creep** — refactoring MUST NOT add new functionality, change APIs, or alter public interfaces. If a beneficial API change is discovered, log it as a recommendation, do NOT apply it.
41
+ 6. **Rollback safety** — if any test fails after a refactoring step, revert that specific change before attempting alternatives. NEVER proceed with failing tests.
42
+ </invariants>
43
+
44
+ <execution>
45
+ Follow '~/.maestro/workflows/refactor.md' completely.
46
+
47
+ ### Phase Gates (MANDATORY, BLOCKING)
48
+
49
+ **GATE 1: Analysis → Plan**
50
+ - REQUIRED: Affected files and dependencies identified.
51
+ - REQUIRED: Refactoring plan created with specific changes.
52
+ - BLOCKED if missing: cannot refactor without identified targets.
53
+
54
+ **GATE 2: Plan → Execution**
55
+ - REQUIRED: User confirmed refactoring plan.
56
+ - BLOCKED if not confirmed: do not apply changes without approval.
57
+
58
+ **GATE 3: Execution → Completion**
59
+ - REQUIRED: All changes applied with test verification per modification.
60
+ - REQUIRED: Zero regressions (all tests pass).
61
+ - REQUIRED: reflection-log.md written with strategy and outcomes.
62
+ - BLOCKED if tests fail: fix regressions before completing.
63
+
64
+ **Knowledge inquiry on completion:**
65
+ After successful refactoring, ask user once: "Record refactoring pattern as coding convention?" If yes → `Skill("spec-add", "coding \"<title>\" \"<pattern>\" --keywords <kw1>,<kw2> --description \"<summary>\"")`.
66
+ </execution>
67
+
68
+ <completion>
69
+ ### Standalone report
70
+
71
+ ```
72
+ --- COMPLETION STATUS ---
73
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
74
+ CONCERNS: {description if applicable}
75
+ --- END STATUS ---
76
+ ```
77
+
78
+ ### Ralph-invoked completion
79
+
80
+ End the step by calling the CLI (no text block output):
81
+ ```
82
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
83
+ ```
84
+
85
+ ### Next-step routing
86
+
87
+ | Condition | Suggestion |
88
+ |-----------|-----------|
89
+ | All tests pass | `/quality-sync` (update codebase docs) |
90
+ | Test failures after refactor | `/quality-debug "test failures after refactor in {scope}"` |
91
+ | No test suite available | `/quality-auto-test {phase}` |
92
+ </completion>
93
+
94
+ <error_codes>
95
+ | Code | Severity | Condition | Recovery |
96
+ |------|----------|-----------|----------|
97
+ | E001 | error | Refactoring scope/description required | Prompt user for module path, feature area, or "all" |
98
+ | E002 | error | Test suite not available for affected area | Suggest creating tests first, or proceed with manual verification |
99
+ | W001 | warning | Partial test coverage for affected area | Note uncovered areas, proceed with extra caution |
100
+ </error_codes>
101
+
102
+ <success_criteria>
103
+ - [ ] Refactoring plan created and confirmed by user
104
+ - [ ] Changes implemented according to plan
105
+ - [ ] All tests pass after refactoring
106
+ - [ ] No regressions introduced
107
+ - [ ] reflection-log.md written with strategy and outcomes
108
+ </success_criteria>
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: quality-retrospective
3
+ description: "Use after completing a phase to extract lessons, patterns, and improvement opportunities Arguments: [phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [-y]"
4
+ allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
5
+ ---
6
+
7
+ <purpose>
8
+ Post-execution retrospective (复盘): four parallel lenses (technical/process/quality/decision) → distill insights → route to spec/knowhow/issue stores.
9
+ </purpose>
10
+
11
+ <required_reading>
12
+ @~/.maestro/workflows/retrospective.md
13
+ </required_reading>
14
+
15
+ <deferred_reading>
16
+ - @~/.maestro/workflows/issue.md (issues.jsonl schema for auto-creation)
17
+ - @~/.maestro/workflows/learn.md (tip routing via manage-knowhow-capture tip)
18
+ - @~/.maestro/workflows/verify.md (verification.json schema for quality lens parsing)
19
+ - @~/.maestro/workflows/review.md (review.json schema for quality lens parsing)
20
+ </deferred_reading>
21
+
22
+ <context>
23
+ Arguments: $ARGUMENTS
24
+
25
+ **Flags:**
26
+ - `-y` — Skip confirmation prompts for external writes (issues.jsonl, spec entries, knowhow capture)
27
+ - `--no-route` — Skip routing stage (produce retrospective files only, no spec/issue/knowhow writes)
28
+ - `--compare N` — Compare current phase retrospective against phase N (requires single phase argument)
29
+ - `--all` — Run retrospective on all completed phases that lack retrospective.json
30
+ - `--lens <name>` — Restrict to specific lens (technical|process|quality|decision); default: all four
31
+
32
+ Modes (scan/single/range/all) and storage paths defined in workflow retrospective.md Argument Shape and Stages 1-7.
33
+
34
+ **Output boundary**: ALL file writes MUST target the phase's retrospective directory (`.workflow/scratch/{YYYYMMDD}-retrospective-P{N}/`), `.workflow/state.json`, `.workflow/issues.jsonl`, or `.workflow/specs/` (append-only). NEVER modify source code, verification.json, review.json, plan.json, or other existing artifacts.
35
+ </context>
36
+
37
+ <invariants>
38
+ 1. **Source artifacts are read-only** — NEVER modify verification.json, review.json, plan.json, or any execution artifact. Retrospective reads these for analysis only.
39
+ 2. **Stable insight IDs** — `INS-{8hex}` MUST be deterministic from `hash(phase_num + lens + title)`. Re-runs MUST NOT create duplicate insights.
40
+ 3. **Routing requires confirmation** — unless `-y` flag is set, every external write (issues.jsonl, spec entry, knowhow capture) MUST be confirmed by user before execution.
41
+ 4. **Lens independence** — each lens agent (technical/process/quality/decision) operates independently. One lens's findings MUST NOT suppress or override another's.
42
+ 5. **Append-only for specs** — learnings.md entries are appended as `<spec-entry>` blocks. NEVER overwrite or restructure existing entries.
43
+ 6. **Archive before overwrite** — if retrospective.json already exists for a phase, the existing file MUST be archived before writing a new version.
44
+ </invariants>
45
+
46
+ <execution>
47
+ Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order.
48
+
49
+ ### Phase Gates (MANDATORY, BLOCKING)
50
+
51
+ **GATE 1: Input → Lens Analysis** (Stages 1-3 → Stage 4)
52
+ - REQUIRED: Mode resolved (scan/single/range/all) and phases validated.
53
+ - REQUIRED: At least one phase selected with status=completed and existing artifacts.
54
+ - REQUIRED: Read-only — no file writes in Stages 1-3.
55
+ - BLOCKED if no valid phases: E004/E005.
56
+
57
+ **GATE 2: Lens Analysis → Routing** (Stages 4-5 → Stage 6)
58
+ - REQUIRED: All requested lens agents returned valid JSON (or W001 logged for partial).
59
+ - REQUIRED: Insights distilled with stable `INS-{8hex}` IDs.
60
+ - REQUIRED: Archive existing `retrospective.{md,json}` before overwrite.
61
+ - BLOCKED if all lens agents failed: cannot synthesize without results.
62
+
63
+ **GATE 3: Routing → Completion** (Stage 6 → Stages 7-8)
64
+ - REQUIRED: `retrospective.json` written with metrics, findings, insights, routing.
65
+ - REQUIRED: `retrospective.md` written (human-readable).
66
+ - REQUIRED: Issue rows match canonical `issues.jsonl` schema (status "open", full fields).
67
+ - REQUIRED: Note tips routed via `Skill({ skill: "manage-knowhow-capture", args: "tip ..." })`.
68
+ - REQUIRED: Unless `-y` flag is set, confirm before each external write (issues.jsonl append, spec-entry append, knowhow-capture). With `-y`, skip all confirmation prompts.
69
+ - BLOCKED if routing incomplete: finish all write operations before reporting.
70
+
71
+ ### Execution Constraints
72
+
73
+ - **Parallel lens dispatch**: Stage 4 spawns one Agent per active lens in a single message.
74
+ - **Stable IDs**: `INS-{8 hex}` from `hash(phase_num + lens + title)` — re-runs do not duplicate.
75
+ - **No source modification**: Never modify verification.json, review.json, plan.json.
76
+ - **Backward-compat**: Append to `.workflow/specs/learnings.md` only if file already exists.
77
+ </execution>
78
+
79
+ <error_codes>
80
+ | Code | Severity | Description | Stage |
81
+ |------|----------|-------------|-------|
82
+ | E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
83
+ | E002 | error | Unknown `--lens` name (allowed: technical, process, quality, decision) | parse_input |
84
+ | E003 | error | `--compare` requires a single phase argument | parse_input |
85
+ | E004 | error | Phase has not executed yet — no `.task/` or `.summaries/` artifacts | load_artifacts |
86
+ | E005 | error | Phase argument out of range / phase directory not found | scan_unreviewed |
87
+ | W001 | warning | One or more lens agents failed — proceeding with partial coverage | multi_lens_analysis |
88
+ | W002 | warning | Existing retrospective.json found and not `--all` — prompted user to overwrite | scan_unreviewed |
89
+ | W003 | warning | `manage-knowhow-capture tip` did not return parseable INS id; fell back to direct write | route_outputs |
90
+ | W004 | warning | `--compare` target phase has no retrospective.json; delta omitted | load_artifacts |
91
+ </error_codes>
92
+
93
+ <success_criteria>
94
+ - [ ] Mode correctly resolved (scan / single / range / all)
95
+ - [ ] At least one phase selected and validated (status == "completed", artifacts exist)
96
+ - [ ] All requested lens agents returned valid JSON, or W001 logged for partial coverage
97
+ - [ ] `retrospective.json` written with metrics, findings_by_lens, distilled_insights, routing_recommendations
98
+ - [ ] `retrospective.md` written and human-readable (tweetable, metrics table, per-lens findings, insights, routing table)
99
+ - [ ] Each insight has a stable `INS-{8hex}` id
100
+ - [ ] If routing enabled (default): every recommendation either created an artifact or was explicitly skipped by user
101
+ - [ ] Spec entries (if any) appended as `<spec-entry>` to matching `.workflow/specs/{category-file}.md`
102
+ - [ ] Issue rows (if any) match canonical issues.jsonl schema (status "open", full issue_history, all required fields)
103
+ - [ ] Note tips (if any) created via `Skill({ skill: "manage-knowhow-capture", args: "tip ..." })`
104
+ - [ ] `.workflow/specs/learnings.md` appended with one `<spec-entry>` per insight regardless of routing target
105
+ - [ ] No existing phase artifacts modified (verification.json, review.json, plan.json untouched)
106
+ - [ ] Confirmation banner displays routing counts and next-step suggestions
107
+ </success_criteria>
108
+
109
+ <completion>
110
+ ### Standalone report
111
+
112
+ ```
113
+ --- COMPLETION STATUS ---
114
+ STATUS: DONE|DONE_WITH_CONCERNS
115
+ CONCERNS: {description if applicable}
116
+ --- END STATUS ---
117
+ ```
118
+
119
+ ### Ralph-invoked completion
120
+
121
+ End the step by calling the CLI (no text block output):
122
+ ```
123
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
124
+ ```
125
+
126
+ ### Next-step routing
127
+
128
+ | Condition | Suggestion |
129
+ |-----------|-----------|
130
+ | Insights routed | `/manage-status` |
131
+ | Issues created | `/manage-issue list --source retrospective` |
132
+ | Knowhow captured | `/manage-knowhow list` |
133
+ | More phases to review | `/quality-retrospective --all` |
134
+ </completion>
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: quality-review
3
+ description: "Use after execution to evaluate code quality across correctness, security, performance, and architecture Arguments: <phase> [--level quick|standard|deep] [--dimensions security,architecture,...] [--skip-specs]"
4
+ allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
5
+ ---
6
+
7
+ <purpose>
8
+ Multi-dimensional code review on a phase's changed files. Three levels (quick/standard/deep), auto-detected from file count. Level and dimension details in workflow review.md.
9
+ </purpose>
10
+
11
+ <required_reading>
12
+ @~/.maestro/workflows/review.md
13
+ </required_reading>
14
+
15
+ <deferred_reading>
16
+ - [index.json](~/.maestro/templates/index.json) — read when updating phase index after review
17
+ </deferred_reading>
18
+
19
+ <context>
20
+ Phase: $ARGUMENTS (required — phase number or slug)
21
+
22
+ **Flags:**
23
+ - `--level quick|standard|deep` — Explicit review level (default: auto-detect from file count)
24
+ - `--dimensions <list>` — Comma-separated subset of dimensions to review (overrides level defaults)
25
+ - `--skip-specs` — Skip loading project specs as review context
26
+
27
+ **All context via state.json.artifacts[]:**
28
+
29
+ ```
30
+ related = artifacts.filter(a =>
31
+ a.phase === target_phase && a.milestone === current_milestone
32
+ ).sort_by(completed_at asc)
33
+ ```
34
+
35
+ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
36
+ - **execute** → .summaries/, .task/, verification.json, plan.json (source of files to review)
37
+ - **review** → review.json (prior verdict, findings — for delta comparison)
38
+ - **debug** → understanding.md, evidence.ndjson (confirmed root causes)
39
+ - **test** → uat.md, .tests/ (user-observable gaps)
40
+
41
+ ### Pre-load (optional, proceed without)
42
+ - Codebase docs: `.workflow/codebase/ARCHITECTURE.md` → component boundaries, layer rules
43
+ - Wiki constraints: `maestro search "architecture constraint" --json` → documented decisions
44
+ - Specs: `maestro load --type spec --category review` → review standards, checklists, knowhow tools
45
+ - Conflict state: `maestro spec conflict list` → 当前已标记冲突的 spec 条目(review 时优先关注)
46
+ - Role knowledge: `maestro search --category review` → select relevant → `maestro load --type knowhow --id`
47
+
48
+ **Output**: `REVIEW_DIR = .workflow/scratch/{YYYYMMDD}-review-P{N}-{slug}/` (P{N} = phase number, enables directory-level identification as state.json fallback)
49
+
50
+ **Output boundary**: ALL file writes MUST target `REVIEW_DIR` or `.workflow/state.json` only. NEVER modify source code, execution artifacts, or files outside these paths.
51
+ </context>
52
+
53
+ <invariants>
54
+ 1. **Review is read-only on source** — NEVER modify source code, test files, or execution artifacts. Review produces reports only.
55
+ 2. **Findings require evidence** — every finding MUST reference file:line and include a code snippet or concrete description. No vague or unanchored findings.
56
+ 3. **Verdict is data-driven** — NEVER change verdict severity to accommodate user preference without new evidence. Verdicts flow from findings, not negotiation.
57
+ 4. **Dimension independence** — each review dimension produces findings independently. One dimension's results MUST NOT suppress or override another's.
58
+ 5. **Prior review delta** — when a prior review.json exists for the same phase, findings MUST be compared. Do NOT re-report already-resolved findings as new.
59
+ 6. **Spec conflict integrity** — if code contradicts a spec entry: if the code is the evolved practice (spec outdated), suggest `maestro spec supersede`; if genuinely disputed, flag via `maestro spec conflict mark`. NEVER silently accept the contradiction or edit the spec inline.
60
+ </invariants>
61
+
62
+ <execution>
63
+ Follow '~/.maestro/workflows/review.md' completely.
64
+
65
+ ### Phase Gates (MANDATORY, BLOCKING)
66
+
67
+ **GATE 1: Setup → Review**
68
+ - REQUIRED: Phase resolved and changed files collected from task summaries. E001/E002 if missing.
69
+ - REQUIRED: Review level determined (explicit flag or auto-detected from file count).
70
+ - BLOCKED if no changed files: E004.
71
+
72
+ **GATE 2: Review → Aggregation**
73
+ - REQUIRED: All dimension reviews executed (inline for quick, parallel agents for standard/deep).
74
+ - REQUIRED: Deep-dive completed if triggered (standard: auto, deep: forced).
75
+
76
+ **GATE 3: Aggregation → Completion**
77
+ - REQUIRED: review.json written with findings, severity distribution, and verdict.
78
+ - REQUIRED: Issues auto-created based on level thresholds.
79
+ - REQUIRED: index.json updated with review status.
80
+ - REQUIRED: Spec conflict check — if any finding directly contradicts a loaded spec entry (code behavior ≠ spec rule): if spec is outdated (code evolved), suggest `maestro spec supersede`; if genuinely disputed, suggest `maestro spec conflict mark`. Code is the single source of truth.
81
+
82
+ **Output writes to REVIEW_DIR** (not EXEC_DIR):
83
+ - `REVIEW_DIR/review.json` — findings, severity distribution, verdict
84
+
85
+ **Register artifact on completion:**
86
+
87
+ Confirm before writing state.json and issues.jsonl:
88
+ ```
89
+ AskUserQuestion("Register review artifact REV-{NNN} in state.json and create {N} issues in issues.jsonl? (yes/no)")
90
+ → yes: proceed with both writes
91
+ → no: skip registration and issue creation, continue to completion
92
+ ```
93
+
94
+ ```
95
+ Append to state.json.artifacts[]:
96
+ {
97
+ id: nextArtifactId(artifacts, "review"), // REV-001
98
+ type: "review",
99
+ milestone: current_milestone,
100
+ phase: target_phase,
101
+ scope: "phase",
102
+ path: "scratch/{YYYYMMDD}-review-P{N}-{slug}", // relative to .workflow/
103
+ status: "completed",
104
+ depends_on: exec_art.id, // or prior debug/review if re-review
105
+ harvested: false,
106
+ created_at: start_time,
107
+ completed_at: now()
108
+ }
109
+ ```
110
+
111
+ Report format defined in workflow review.md Report Format section.
112
+ </execution>
113
+
114
+ <completion>
115
+ ### Standalone report
116
+
117
+ ```
118
+ --- COMPLETION STATUS ---
119
+ STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
120
+ CONCERNS: {description if applicable}
121
+ --- END STATUS ---
122
+ ```
123
+
124
+ Status mapping:
125
+ - **DONE** — PASS verdict, no critical findings
126
+ - **DONE_WITH_CONCERNS** — WARN verdict, issues found but non-blocking
127
+ - **NEEDS_RETRY** — BLOCK verdict, critical findings require fix first
128
+
129
+ ### Ralph-invoked completion
130
+
131
+ End the step by calling the CLI (no text block output):
132
+ ```
133
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
134
+ ```
135
+
136
+ ### Next-step routing
137
+
138
+ | Condition | Suggestion |
139
+ |-----------|-----------|
140
+ | PASS verdict | `/quality-test {phase}` |
141
+ | WARN verdict (non-blocking issues) | `/quality-test {phase}` (proceed with caveats) |
142
+ | BLOCK verdict (critical findings) | `/maestro-plan {phase} --gaps` (fix first) |
143
+ | Spec contradictions found | `maestro spec conflict list` → `/manage-knowledge-audit --scope spec` |
144
+ | Want code cleanup | `/quality-refactor {phase}` |
145
+ </completion>
146
+
147
+ <error_codes>
148
+ | Code | Severity | Condition | Recovery |
149
+ |------|----------|-----------|----------|
150
+ | E001 | error | Phase argument required | Check arguments format, re-run with correct input |
151
+ | E002 | error | Phase directory not found | Check arguments format, re-run with correct input |
152
+ | E003 | error | No execution results found (no task summaries) | Verify execution completed with task summaries |
153
+ | E004 | error | No changed files detected in phase | Verify execution completed with task summaries |
154
+ | W001 | warning | Some dimension agents failed, partial results | Retry failed dimensions or accept partial results |
155
+ | W002 | warning | Deep-dive iteration limit reached with unresolved criticals | Accept current findings or escalate manually |
156
+ </error_codes>
157
+
158
+ <success_criteria>
159
+ - [ ] Phase resolved and changed files collected from task summaries
160
+ - [ ] Review level determined (explicit flag or auto-detected)
161
+ - [ ] Project specs loaded as review context (unless --skip-specs)
162
+ - [ ] Dimension reviews executed (inline for quick, parallel agents for standard/deep)
163
+ - [ ] All dimension results aggregated with severity classification
164
+ - [ ] Deep-dive completed if triggered (standard: auto, deep: forced)
165
+ - [ ] review.json written with complete findings, severity distribution, verdict
166
+ - [ ] Issues auto-created based on level thresholds
167
+ - [ ] index.json updated with review status
168
+ - [ ] Next step routed by verdict (PASS→test, WARN→test with caveats, BLOCK→plan --gaps)
169
+ </success_criteria>
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: quality-sync
3
+ description: "Sync codebase docs by tracing git diff impact Arguments: [--full] [--since <commit|HEAD~N>] [--dry-run]"
4
+ allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
5
+ ---
6
+
7
+ <purpose>
8
+ Sync codebase docs after code changes: git diff → trace impact via doc-index.json → refresh `.workflow/codebase/` docs.
9
+ </purpose>
10
+
11
+ <required_reading>
12
+ @~/.maestro/workflows/sync.md
13
+ </required_reading>
14
+
15
+ <context>
16
+ $ARGUMENTS -- optional flags:
17
+ - `--full` -- Complete resync of all tracked files (ignores git diff, rebuilds all docs)
18
+ - `--since <commit|HEAD~N>` -- Diff since specific commit (default: last sync timestamp)
19
+ - `--dry-run` -- Show what would be updated without writing changes
20
+
21
+ **Output boundary**: ALL file writes MUST target `.workflow/codebase/`, `.workflow/state.json`, or `doc-index.json` only. NEVER modify source code or files outside `.workflow/`. `--dry-run` MUST suppress all writes.
22
+ </context>
23
+
24
+ <invariants>
25
+ 1. **Source code is read-only** — sync reads source files to generate documentation. NEVER modify source code, test files, or any non-documentation files.
26
+ 2. **Dry-run is side-effect-free** — when `--dry-run` is set, NO file writes occur. Report only what would change.
27
+ 3. **Impact trace before refresh** — NEVER regenerate a doc file without first tracing which source changes affect it via doc-index.json. Untargeted full-refresh requires explicit `--full` flag.
28
+ 4. **Idempotent sync** — running sync twice with the same diff MUST produce identical results. State.json timestamp prevents redundant re-runs.
29
+ 5. **Incremental by default** — without `--full`, only changed components are refreshed. NEVER silently expand to a full rebuild.
30
+ </invariants>
31
+
32
+ <execution>
33
+ Follow '~/.maestro/workflows/sync.md' completely.
34
+
35
+ ### Phase Gates (MANDATORY, BLOCKING)
36
+
37
+ **GATE 1: Diff → Impact Trace**
38
+ - REQUIRED: Git diff computed (or --full flag set for all files).
39
+ - BLOCKED if no diff and no --full: nothing to sync (W001).
40
+
41
+ **GATE 2: Impact Trace → Refresh**
42
+ - REQUIRED: Affected components traced via doc-index.json.
43
+ - BLOCKED if trace fails: cannot refresh docs without impact mapping.
44
+
45
+ **GATE 3: Refresh → Completion**
46
+ - REQUIRED: `.workflow/codebase/` docs refreshed for affected components.
47
+ - REQUIRED: If `--dry-run` is set, skip state.json write and report what would change. Otherwise, update state.json with sync timestamp.
48
+ - BLOCKED if missing: do not report completion without updated docs.
49
+ </execution>
50
+
51
+ <completion>
52
+ ### Standalone report
53
+
54
+ ```
55
+ --- COMPLETION STATUS ---
56
+ STATUS: DONE|DONE_WITH_CONCERNS
57
+ CONCERNS: {description if applicable}
58
+ --- END STATUS ---
59
+ ```
60
+
61
+ ### Ralph-invoked completion
62
+
63
+ End the step by calling the CLI (no text block output):
64
+ ```
65
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
66
+ ```
67
+
68
+ ### Next-step routing
69
+
70
+ | Condition | Suggestion |
71
+ |-----------|-----------|
72
+ | Docs refreshed | `/manage-status` |
73
+ | Major structural changes | `/manage-codebase-rebuild` |
74
+ | Incremental refresh | Use `--since` flag |
75
+ </completion>
76
+
77
+ <error_codes>
78
+ | Code | Severity | Condition | Recovery |
79
+ |------|----------|-----------|----------|
80
+ | E001 | error | .workflow/ not initialized | Suggest running `/maestro-init` first|
81
+ | W001 | warning | No changes detected since last sync | Report clean state, skip updates |
82
+ </error_codes>
83
+
84
+ <success_criteria>
85
+ - [ ] state.json updated with current sync timestamp (skipped if `--dry-run`)
86
+ - [ ] Codebase docs refreshed for all affected components
87
+ - [ ] doc-index.json reflects current file state
88
+ - [ ] Changes tracked and logged
89
+ - [ ] project.md Tech Stack section refreshed if dependency manifests changed
90
+ </success_criteria>