pi-maestro-flow 0.2.0 → 0.3.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 (235) hide show
  1. package/README.md +44 -72
  2. package/agents/cross-role-reviewer.md +1 -1
  3. package/agents/impeccable-agent.md +1 -1
  4. package/agents/ralph-executor.md +1 -1
  5. package/agents/team-worker.md +1 -1
  6. package/agents/workflow-analyzer.md +1 -1
  7. package/agents/workflow-codebase-mapper.md +1 -1
  8. package/agents/workflow-collab-planner.md +1 -1
  9. package/agents/workflow-debugger.md +1 -1
  10. package/agents/workflow-executor.md +1 -1
  11. package/agents/workflow-integration-checker.md +1 -1
  12. package/agents/workflow-nyquist-auditor.md +1 -1
  13. package/agents/workflow-phase-researcher.md +1 -1
  14. package/agents/workflow-planner.md +1 -1
  15. package/agents/workflow-project-researcher.md +1 -1
  16. package/agents/workflow-reviewer.md +1 -1
  17. package/agents/workflow-verifier.md +1 -1
  18. package/package.json +13 -4
  19. package/skills/codify-to-knowhow/SKILL.md +1 -1
  20. package/skills/delegation-check/SKILL.md +1 -1
  21. package/skills/domain-add/SKILL.md +5 -7
  22. package/skills/insight-challenge/SKILL.md +1 -1
  23. package/skills/learn-decompose/SKILL.md +4 -4
  24. package/skills/learn-follow/SKILL.md +5 -5
  25. package/skills/learn-investigate/SKILL.md +5 -5
  26. package/skills/learn-second-opinion/SKILL.md +5 -5
  27. package/skills/maestro/SKILL.md +9 -10
  28. package/skills/maestro-amend/SKILL.md +3 -3
  29. package/skills/maestro-analyze/SKILL.md +10 -13
  30. package/skills/maestro-blueprint/SKILL.md +8 -11
  31. package/skills/maestro-brainstorm/SKILL.md +11 -14
  32. package/skills/maestro-collab/SKILL.md +4 -4
  33. package/skills/maestro-companion/SKILL.md +3 -3
  34. package/skills/maestro-composer/SKILL.md +11 -12
  35. package/skills/maestro-execute/SKILL.md +9 -12
  36. package/skills/maestro-fork/SKILL.md +8 -11
  37. package/skills/maestro-grill/SKILL.md +13 -16
  38. package/skills/maestro-guard/SKILL.md +5 -5
  39. package/skills/maestro-help/SKILL.md +3 -3
  40. package/skills/maestro-impeccable/SKILL.md +7 -7
  41. package/skills/maestro-init/SKILL.md +9 -12
  42. package/skills/maestro-merge/SKILL.md +6 -8
  43. package/skills/maestro-milestone-audit/SKILL.md +3 -5
  44. package/skills/maestro-milestone-complete/SKILL.md +9 -12
  45. package/skills/maestro-milestone-release/SKILL.md +9 -11
  46. package/skills/maestro-next/SKILL.md +5 -5
  47. package/skills/maestro-overlay/SKILL.md +16 -16
  48. package/skills/maestro-plan/SKILL.md +9 -12
  49. package/skills/maestro-player/SKILL.md +5 -5
  50. package/skills/maestro-quick/SKILL.md +5 -7
  51. package/skills/maestro-ralph/SKILL.md +16 -17
  52. package/skills/maestro-ralph-cli/SKILL.md +6 -6
  53. package/skills/maestro-ralph-cli-execute/SKILL.md +2 -2
  54. package/skills/maestro-ralph-execute/SKILL.md +4 -4
  55. package/skills/maestro-ralph-v2/SKILL.md +18 -19
  56. package/skills/maestro-roadmap/SKILL.md +8 -9
  57. package/skills/maestro-swarm-workflow/SKILL.md +9 -9
  58. package/skills/maestro-tools-execute/SKILL.md +5 -7
  59. package/skills/maestro-tools-register/SKILL.md +7 -9
  60. package/skills/maestro-ui-codify/SKILL.md +9 -10
  61. package/skills/maestro-universal-workflow/SKILL.md +15 -15
  62. package/skills/maestro-update/SKILL.md +10 -10
  63. package/skills/manage-codebase-rebuild/SKILL.md +4 -6
  64. package/skills/manage-drift-realign/SKILL.md +8 -11
  65. package/skills/manage-harvest/SKILL.md +6 -9
  66. package/skills/manage-issue/SKILL.md +5 -8
  67. package/skills/manage-issue-discover/SKILL.md +8 -11
  68. package/skills/manage-kg-extractors/SKILL.md +3 -3
  69. package/skills/manage-knowhow/SKILL.md +3 -5
  70. package/skills/manage-knowhow-capture/SKILL.md +4 -6
  71. package/skills/manage-knowledge-audit/SKILL.md +6 -9
  72. package/skills/manage-status/SKILL.md +3 -5
  73. package/skills/manage-wiki/SKILL.md +5 -7
  74. package/skills/odyssey-debug/SKILL.md +13 -13
  75. package/skills/odyssey-improve/SKILL.md +15 -15
  76. package/skills/odyssey-planex/SKILL.md +16 -16
  77. package/skills/odyssey-review-test-fix/SKILL.md +11 -11
  78. package/skills/odyssey-ui/SKILL.md +10 -10
  79. package/skills/prompt-generator/SKILL.md +5 -5
  80. package/skills/quality-auto-test/SKILL.md +3 -5
  81. package/skills/quality-debug/SKILL.md +3 -5
  82. package/skills/quality-refactor/SKILL.md +3 -5
  83. package/skills/quality-retrospective/SKILL.md +10 -13
  84. package/skills/quality-review/SKILL.md +5 -8
  85. package/skills/quality-sync/SKILL.md +3 -5
  86. package/skills/quality-test/SKILL.md +4 -6
  87. package/skills/scholar-anti-ai-writing/SKILL.md +1 -1
  88. package/skills/scholar-citation-verify/SKILL.md +1 -1
  89. package/skills/scholar-experiment/SKILL.md +2 -2
  90. package/skills/scholar-ideation/SKILL.md +7 -7
  91. package/skills/scholar-latex-organizer/SKILL.md +1 -1
  92. package/skills/scholar-publish/SKILL.md +3 -3
  93. package/skills/scholar-rebuttal-pro/SKILL.md +3 -3
  94. package/skills/scholar-review/SKILL.md +1 -1
  95. package/skills/scholar-writing/SKILL.md +1 -1
  96. package/skills/security-audit/SKILL.md +2 -4
  97. package/skills/skill-generator/SKILL.md +3 -3
  98. package/skills/skill-iter-tune/SKILL.md +3 -3
  99. package/skills/skill-simplify/SKILL.md +1 -1
  100. package/skills/skill-tuning/SKILL.md +1 -1
  101. package/skills/spec-add/SKILL.md +5 -7
  102. package/skills/spec-load/SKILL.md +3 -5
  103. package/skills/spec-remove/SKILL.md +4 -6
  104. package/skills/spec-setup/SKILL.md +6 -8
  105. package/skills/team-adversarial-swarm/SKILL.md +5 -5
  106. package/skills/team-arch-opt/SKILL.md +2 -2
  107. package/skills/team-brainstorm/SKILL.md +3 -3
  108. package/skills/team-coordinate/SKILL.md +4 -4
  109. package/skills/team-designer/SKILL.md +1 -1
  110. package/skills/team-executor/SKILL.md +3 -3
  111. package/skills/team-frontend/SKILL.md +2 -2
  112. package/skills/team-frontend-debug/SKILL.md +3 -3
  113. package/skills/team-interactive-craft/SKILL.md +2 -2
  114. package/skills/team-issue/SKILL.md +3 -3
  115. package/skills/team-lifecycle-v4/SKILL.md +4 -4
  116. package/skills/team-motion-design/SKILL.md +2 -2
  117. package/skills/team-perf-opt/SKILL.md +3 -3
  118. package/skills/team-planex/SKILL.md +2 -2
  119. package/skills/team-quality-assurance/SKILL.md +3 -3
  120. package/skills/team-review/SKILL.md +3 -3
  121. package/skills/team-roadmap-dev/SKILL.md +3 -3
  122. package/skills/team-swarm/SKILL.md +4 -4
  123. package/skills/team-tech-debt/SKILL.md +2 -2
  124. package/skills/team-testing/SKILL.md +3 -3
  125. package/skills/team-ui-polish/SKILL.md +2 -2
  126. package/skills/team-uidesign/SKILL.md +2 -2
  127. package/skills/team-ultra-analyze/SKILL.md +4 -4
  128. package/skills/team-ux-improve/SKILL.md +3 -3
  129. package/skills/team-visual-a11y/SKILL.md +2 -2
  130. package/skills/workflow-skill-designer/SKILL.md +8 -8
  131. package/templates/business-test-report.json +68 -0
  132. package/templates/config.json +48 -0
  133. package/templates/context.md +16 -0
  134. package/templates/doc-index.json +11 -0
  135. package/templates/index.json +68 -0
  136. package/templates/issue.json +36 -0
  137. package/templates/plan.json +38 -0
  138. package/templates/project.md +60 -0
  139. package/templates/reflection-log.md +20 -0
  140. package/templates/roadmap.md +45 -0
  141. package/templates/scratch-index.json +19 -0
  142. package/templates/search-tool.json +1 -0
  143. package/templates/search-tools.md +47 -0
  144. package/templates/state.json +18 -0
  145. package/templates/task-summary.md +21 -0
  146. package/templates/task.json +89 -0
  147. package/templates/terminology-template.json +22 -0
  148. package/templates/uat.md +21 -0
  149. package/templates/validation.json +31 -0
  150. package/templates/verification.json +37 -0
  151. package/templates/workflow.md +14 -0
  152. package/templates/worktree-scope.json +9 -0
  153. package/templates/worktrees.json +26 -0
  154. package/workflows/agy-instructions.md +156 -0
  155. package/workflows/analyze.md +768 -0
  156. package/workflows/auto-test.md +705 -0
  157. package/workflows/blueprint.md +406 -0
  158. package/workflows/boundary-grill.md +50 -0
  159. package/workflows/brainstorm.md +508 -0
  160. package/workflows/business-test.md +574 -0
  161. package/workflows/chinese-response.md +25 -0
  162. package/workflows/claude-instructions.md +167 -0
  163. package/workflows/codebase-rebuild.md +267 -0
  164. package/workflows/codebase-refresh.md +168 -0
  165. package/workflows/codex-instructions.md +156 -0
  166. package/workflows/coding-philosophy.md +70 -0
  167. package/workflows/command-authoring.md +823 -0
  168. package/workflows/debug.md +409 -0
  169. package/workflows/delegate-usage.md +99 -0
  170. package/workflows/domain-add.md +121 -0
  171. package/workflows/drift-realign.md +396 -0
  172. package/workflows/execute.md +631 -0
  173. package/workflows/explore-usage.md +93 -0
  174. package/workflows/finish-work.md +124 -0
  175. package/workflows/fork.md +162 -0
  176. package/workflows/grill.md +494 -0
  177. package/workflows/harvest.md +478 -0
  178. package/workflows/impeccable.md +168 -0
  179. package/workflows/init.md +157 -0
  180. package/workflows/instruction-authoring-guide.md +97 -0
  181. package/workflows/integration-test.md +186 -0
  182. package/workflows/interview-mechanics.md +8 -0
  183. package/workflows/issue-analyze.md +20 -0
  184. package/workflows/issue-discover.md +238 -0
  185. package/workflows/issue-execute.md +110 -0
  186. package/workflows/issue-gaps-analyze.codex.md +256 -0
  187. package/workflows/issue-gaps-analyze.md +215 -0
  188. package/workflows/issue-plan.md +110 -0
  189. package/workflows/issue.md +338 -0
  190. package/workflows/knowhow.md +429 -0
  191. package/workflows/knowledge-audit.md +355 -0
  192. package/workflows/learn.md +271 -0
  193. package/workflows/maestro-chain-execute.md +20 -0
  194. package/workflows/maestro-link-coordinate.md +114 -0
  195. package/workflows/maestro-super.md +120 -0
  196. package/workflows/maestro.md +501 -0
  197. package/workflows/map.md +74 -0
  198. package/workflows/merge.md +122 -0
  199. package/workflows/milestone-audit.md +155 -0
  200. package/workflows/milestone-complete.md +167 -0
  201. package/workflows/milestone-release.md +82 -0
  202. package/workflows/odyssey-base-codex.md +305 -0
  203. package/workflows/odyssey-base.md +256 -0
  204. package/workflows/overlays.md +109 -0
  205. package/workflows/plan.md +520 -0
  206. package/workflows/quick.md +350 -0
  207. package/workflows/ralph-amend-goal.md +177 -0
  208. package/workflows/refactor.md +87 -0
  209. package/workflows/retrospective.md +471 -0
  210. package/workflows/review.md +448 -0
  211. package/workflows/roadmap-common.md +193 -0
  212. package/workflows/roadmap.md +106 -0
  213. package/workflows/shell-exec-protocol.md +30 -0
  214. package/workflows/skill-authoring.md +265 -0
  215. package/workflows/spec-generate.md +475 -0
  216. package/workflows/specs-add.md +123 -0
  217. package/workflows/specs-load.md +76 -0
  218. package/workflows/specs-remove.md +104 -0
  219. package/workflows/specs-setup.md +316 -0
  220. package/workflows/status.md +149 -0
  221. package/workflows/sync.md +116 -0
  222. package/workflows/tdd.md +255 -0
  223. package/workflows/test-gen.md +226 -0
  224. package/workflows/test.md +385 -0
  225. package/workflows/tools-spec.md +70 -0
  226. package/workflows/ui-codify-extract.md +372 -0
  227. package/workflows/ui-codify-knowhow.md +258 -0
  228. package/workflows/ui-codify-package.md +159 -0
  229. package/workflows/ui-codify.md +227 -0
  230. package/workflows/ui-design.md +393 -0
  231. package/workflows/ui-style.md +201 -0
  232. package/workflows/verify.md +557 -0
  233. package/workflows/wiki-connect.md +153 -0
  234. package/workflows/wiki-digest.md +180 -0
  235. package/workflows/wiki-manage.md +113 -0
@@ -0,0 +1,114 @@
1
+ # Workflow: maestro-link-coordinate
2
+
3
+ Chain-graph coordinator via `maestro coordinate` CLI endpoint. Loads a chain graph, walks node by node via step-mode subcommands. Each command node executed through `maestro delegate` internally.
4
+
5
+ ---
6
+
7
+ ### Step 1: Parse Arguments
8
+
9
+ Extract from `$ARGUMENTS`:
10
+ - Flags: `--list`, `-y`/`--yes`, `-c`/`--continue [id]`, `--chain <name>`, `--tool <name>` (default: claude)
11
+ - `intent` = remaining text after flag removal
12
+
13
+ ---
14
+
15
+ ### Step 2: Handle --list
16
+
17
+ ```bash
18
+ maestro coordinate list
19
+ ```
20
+
21
+ Exit after display.
22
+
23
+ ---
24
+
25
+ ### Step 3: Start or Resume Session
26
+
27
+ #### 3a: New session (step mode)
28
+
29
+ ```bash
30
+ maestro coordinate start "{intent}" --tool {cliTool} [--chain {forcedChain}] [-y]
31
+ ```
32
+
33
+ Include `--chain` and `-y` only when set. Returns JSON with `session_id`, `status`, `graph_id`, `current_node`, `last_step`, `history`.
34
+
35
+ #### 3b: Resume existing session
36
+
37
+ ```bash
38
+ maestro coordinate next {resumeId}
39
+ ```
40
+
41
+ If bare `-c` (no ID), omit session ID to resume latest step_paused session. Same JSON output format.
42
+
43
+ ---
44
+
45
+ ### Step 4: Step Loop
46
+
47
+ Loop `maestro coordinate next {session_id}` while `status === "step_paused"`. Log each step: `[Step N] /{cmd} — {outcome} — {summary}`. Exit loop on `completed` or `failed` → **Step 5**.
48
+
49
+ The walker handles internally:
50
+ - Prompt assembly (command nodes via `coordinate-step` template, decision nodes inline)
51
+ - CLI execution via `maestro delegate --to {tool} --mode {write|analysis}`
52
+ - Decision auto-resolution: `expr` (static, instant) or `llm` (CLI spawn, expects `DECISION: <target>\nREASONING: <text>`). Expr fallback to LLM when no matching/default edge.
53
+ - max_visits loop prevention, state persistence to `.workflow/.maestro/coordinate-{session_id}/`
54
+ - Channel telemetry published to `~/.maestro/data/async/` broker, observable via `maestro coordinate watch`
55
+
56
+ > **Step-mode latency note**: LLM-driven decisions fire synchronous CLI spawns (several seconds). Do not impose tight per-step deadlines. Static `expr` decisions remain instant.
57
+
58
+ ---
59
+
60
+ ### Step 5: Completion
61
+
62
+ ```bash
63
+ maestro coordinate status {session_id}
64
+ ```
65
+
66
+ Display final summary:
67
+
68
+ ```
69
+ ============================================================
70
+ COORDINATE COMPLETE
71
+ ============================================================
72
+ Session: {session_id}
73
+ Graph: {graph_id}
74
+ Status: {completed|failed}
75
+
76
+ Steps:
77
+ [✓] plan — success — Plan generated
78
+ [✓] execute — success — Implementation done
79
+ [✗] verify — failure — 2 issues found
80
+ [→] check_result → retry_plan (decision)
81
+ [✓] retry_plan — success — Gaps fixed
82
+ [✓] retry_execute — success — All passing
83
+
84
+ Completed: {N} | Failed: {N}
85
+ ============================================================
86
+ ```
87
+
88
+ ---
89
+
90
+ ## CLI Endpoint Reference
91
+
92
+ | Command | Description | Output |
93
+ |---------|-------------|--------|
94
+ | `maestro coordinate list` | List all chain graphs | Table to stdout |
95
+ | `maestro coordinate start "intent" --chain X --tool Y` | Start step-mode session | JSON (session_id, status, last_step) |
96
+ | `maestro coordinate next [sessionId]` | Execute next step | JSON (updated state) |
97
+ | `maestro coordinate status [sessionId]` | Query session state | JSON (full state) |
98
+ | `maestro coordinate run "intent" --chain X --tool Y` | Autonomous full run | JSON (final state) |
99
+ | `maestro coordinate watch <sessionId> [--follow] [--since N] [--format json\|text]` | Stream walker events from broker (observer, read-only) | JSONL/text to stdout |
100
+ | `maestro coordinate report --session <sid> --node <id> --status SUCCESS\|FAILURE [...]` | Agent-invoked result writer — the authoritative command-node result channel | Writes `.workflow/.maestro/coordinate-{sid}/reports/{node}.json`, exits 0 |
101
+
102
+ ---
103
+
104
+ ## Core Rules
105
+
106
+ 1. **All execution via CLI endpoint** — `maestro coordinate start/next/run`, never direct walker calls
107
+ 2. **Step mode by default** — `start` pauses after each command node, `next` advances one step
108
+ 3. **JSON protocol** — all subcommands output structured JSON to stdout, logs to stderr
109
+ 4. **Session persistence** — state at `.workflow/.maestro/coordinate-{session_id}/walker-state.json`
110
+ 5. **Decision auto-resolve** — walker evaluates `ctx.result.status` internally between steps; falls back to the injected LLM decider when `expr` has no matching edge and no default
111
+ 6. **Resume** — `next {sessionId}` continues any step_paused session
112
+ 7. **Autonomous fallback** — `run` walks entire graph without pausing (backward compat)
113
+ 8. **Observation is separate from driving** — `watch` is a read-only tail on the broker; it does not advance the walker. Use it alongside `next` or `run` for live progress without disturbing the driver loop.
114
+ 9. **Result channel** — command-node results are written by the agent via `maestro coordinate report` to a JSON file the walker reads preferentially over stdout parsing.
@@ -0,0 +1,120 @@
1
+ # Super Mode (`--super`)
2
+
3
+ Goal: deliver a production-ready, complete software system from user requirements. No user decisions needed — maestro autonomously expands, refines, and implements until the system meets mainstream quality standards.
4
+
5
+ Super mode implies `-y` (all auto flags propagated) plus these additional behaviors:
6
+
7
+ ## 1. Requirement Expansion
8
+
9
+ On receiving user intent, autonomously expand incomplete requirements into a complete product scope. MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Delegate via role (`maestro delegate --role analyze --mode analysis`) for requirement completeness analysis and gap-filling. Accept requirements that add real user value; discard noise.
10
+
11
+ ## 2. Progressive Document Loading
12
+
13
+ Read execution documents (workflow maestro.md, chain steps) incrementally per-phase rather than loading all upfront. Each milestone loads only the relevant section to preserve context window.
14
+
15
+ ## 3. Autonomous Decision-Making
16
+
17
+ MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: All design/architecture/scope decisions are made via Gemini delegate (`--mode analysis`). No AskUserQuestion calls. Decision criteria: mainstream industry standards, pragmatism, simplicity.
18
+
19
+ ## 4. Auto-Advance Milestones
20
+
21
+ After each milestone completes and passes verification, automatically advance to the next milestone without user confirmation. Run `maestro-milestone-complete` → next milestone chain automatically.
22
+
23
+ ## 5. Quality Gate Scoring
24
+
25
+ Each milestone must pass a readiness score before advancing. Prevents premature exit.
26
+
27
+ | Dimension | Weight | Minimum |
28
+ |-----------|--------|---------|
29
+ | Code completeness (features implemented vs planned) | 25% | 90% |
30
+ | Test coverage (lines + branches) | 20% | 70% |
31
+ | Build & run success (clean build, app starts) | 20% | 100% |
32
+ | Code quality (lint clean, no ts errors) | 15% | 90% |
33
+ | Integration coherence (cross-module contracts) | 10% | 80% |
34
+ | Documentation (API docs, README, setup guide) | 10% | 60% |
35
+ | **Weighted total** | | **≥ 80%** |
36
+
37
+ Score is computed via `maestro-execute` verification gate + Gemini analysis. If score < 80%, generate fix plan and re-execute until threshold is met (max 3 retries per milestone, then report blockers).
38
+
39
+ ## 6. Completion Criteria
40
+
41
+ Super mode only terminates when:
42
+ - All roadmap milestones completed and scored ≥ 80%
43
+ - Final system builds, starts, and passes all tests
44
+ - Gemini confirms the system is production-ready via final audit
45
+
46
+ ## 7. State Tracking
47
+
48
+ Super mode extends the standard session `status.json` (`.workflow/.maestro/{session_id}/status.json`). No extra files — all state in one place.
49
+
50
+ ### 7a. status.json 扩展字段
51
+
52
+ ```json
53
+ {
54
+ "session_id": "...",
55
+ "status": "running",
56
+ "super": true,
57
+ "super_state": "expanding|planning|executing|scoring|advancing|completed|blocked",
58
+ "current_milestone": 1,
59
+ "total_milestones": 3,
60
+ "expanded_requirements": "...",
61
+ "milestones": [
62
+ {
63
+ "index": 1,
64
+ "name": "...",
65
+ "status": "pending|executing|scoring|completed|blocked",
66
+ "chain_session_id": null,
67
+ "retries": 0,
68
+ "max_retries": 3,
69
+ "scores": {
70
+ "code_completeness": null,
71
+ "test_coverage": null,
72
+ "build_success": null,
73
+ "code_quality": null,
74
+ "integration_coherence": null,
75
+ "documentation": null,
76
+ "weighted_total": null
77
+ },
78
+ "score_history": [],
79
+ "decisions": []
80
+ }
81
+ ],
82
+ "decision_log": [],
83
+ "steps": [ ... ]
84
+ }
85
+ ```
86
+
87
+ `super_state` values:
88
+ - `expanding` — requirement expansion via Gemini
89
+ - `planning` — roadmap/spec/plan generation
90
+ - `executing` — milestone chain execution (plan → execute → verify)
91
+ - `scoring` — quality gate evaluation
92
+ - `advancing` — milestone-complete + next milestone setup
93
+ - `completed` — all milestones passed
94
+ - `blocked` — max retries exceeded, needs user intervention
95
+
96
+ ### 7b. State transitions
97
+
98
+ ```
99
+ [start] → expanding → planning → executing(M1) → scoring(M1)
100
+ → score ≥ 80% → advancing → executing(M2) → ...
101
+ → score < 80% → retries < 3 → executing(M1) (retry)
102
+ → score < 80% → retries = 3 → blocked
103
+ → all milestones completed → completed
104
+ ```
105
+
106
+ ### 7c. Resume (`-c` or `continue`)
107
+
108
+ On resume, read `status.json`:
109
+ 1. Check `super: true` → enter super mode resume
110
+ 2. Read `super_state` + `current_milestone` → determine resume point
111
+ 3. Read milestone's `status` → resume from exact phase (e.g., interrupted during `scoring` → re-run scoring)
112
+ 4. Load `decision_log` for Gemini continuity
113
+
114
+ ### 7d. State update discipline
115
+
116
+ Update `status.json` at every state transition:
117
+ - Before milestone chain → set milestone `status: "executing"`, increment retries if retry
118
+ - After scoring → write scores to milestone, append to `score_history`
119
+ - After advancing → set previous milestone `status: "completed"`, bump `current_milestone`
120
+ - On block → set milestone `status: "blocked"`, set `super_state: "blocked"`