maestro-flow 0.5.39 → 0.5.41

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 (139) hide show
  1. package/.agents/skills/odyssey-debug/SKILL.md +109 -143
  2. package/.agents/skills/odyssey-improve/SKILL.md +127 -141
  3. package/.agents/skills/odyssey-planex/SKILL.md +140 -231
  4. package/.agents/skills/odyssey-review-test-fix/SKILL.md +136 -90
  5. package/.agents/skills/odyssey-ui/SKILL.md +123 -143
  6. package/.agy/skills/odyssey-debug/SKILL.md +109 -143
  7. package/.agy/skills/odyssey-improve/SKILL.md +127 -141
  8. package/.agy/skills/odyssey-planex/SKILL.md +140 -231
  9. package/.agy/skills/odyssey-review-test-fix/SKILL.md +136 -90
  10. package/.agy/skills/odyssey-ui/SKILL.md +123 -143
  11. package/.claude/commands/odyssey-debug.md +109 -143
  12. package/.claude/commands/odyssey-improve.md +127 -141
  13. package/.claude/commands/odyssey-planex.md +140 -231
  14. package/.claude/commands/odyssey-review-test-fix.md +136 -90
  15. package/.claude/commands/odyssey-ui.md +123 -143
  16. package/.codex/agents/cli-explore-agent.toml +181 -0
  17. package/.codex/agents/cross-role-reviewer.toml +165 -0
  18. package/.codex/agents/impeccable-agent.toml +89 -0
  19. package/.codex/agents/role-design-author.toml +213 -0
  20. package/.codex/agents/team-worker.toml +4 -7
  21. package/.codex/agents/ui-design-agent.toml +260 -0
  22. package/.codex/agents/workflow-analyzer.toml +106 -0
  23. package/.codex/agents/workflow-codebase-mapper.toml +69 -0
  24. package/.codex/agents/workflow-collab-planner.toml +140 -0
  25. package/.codex/agents/workflow-debugger.toml +95 -0
  26. package/.codex/agents/workflow-executor.toml +124 -0
  27. package/.codex/agents/workflow-external-researcher.toml +80 -0
  28. package/.codex/agents/workflow-integration-checker.toml +76 -0
  29. package/.codex/agents/workflow-nyquist-auditor.toml +77 -0
  30. package/.codex/agents/workflow-phase-researcher.toml +76 -0
  31. package/.codex/agents/workflow-plan-checker.toml +93 -0
  32. package/.codex/agents/workflow-planner.toml +192 -0
  33. package/.codex/agents/workflow-project-researcher.toml +65 -0
  34. package/.codex/agents/workflow-research-synthesizer.toml +65 -0
  35. package/.codex/agents/workflow-reviewer.toml +75 -0
  36. package/.codex/agents/workflow-roadmapper.toml +75 -0
  37. package/.codex/agents/workflow-verifier.toml +113 -0
  38. package/.codex/skills/maestro/SKILL.md +1 -0
  39. package/.codex/skills/maestro-analyze/SKILL.md +33 -15
  40. package/.codex/skills/maestro-brainstorm/SKILL.md +13 -10
  41. package/.codex/skills/maestro-collab/SKILL.md +30 -75
  42. package/.codex/skills/maestro-execute/SKILL.md +19 -12
  43. package/.codex/skills/maestro-grill/SKILL.md +12 -11
  44. package/.codex/skills/maestro-next/SKILL.md +3 -3
  45. package/.codex/skills/maestro-overlay/SKILL.md +1 -1
  46. package/.codex/skills/maestro-plan/SKILL.md +17 -8
  47. package/.codex/skills/maestro-ralph/SKILL.md +3 -0
  48. package/.codex/skills/maestro-ralph-execute/SKILL.md +1 -0
  49. package/.codex/skills/maestro-roadmap/SKILL.md +14 -8
  50. package/.codex/skills/manage-learn/SKILL.md +1 -1
  51. package/.codex/skills/odyssey-debug/SKILL.md +176 -150
  52. package/.codex/skills/odyssey-improve/SKILL.md +210 -177
  53. package/.codex/skills/odyssey-planex/SKILL.md +162 -242
  54. package/.codex/skills/odyssey-review-test-fix/SKILL.md +96 -90
  55. package/.codex/skills/odyssey-ui/SKILL.md +211 -179
  56. package/.codex/skills/quality-review/SKILL.md +17 -10
  57. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +6 -12
  58. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +6 -14
  59. package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +2 -6
  60. package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +6 -14
  61. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +3 -7
  62. package/.codex/skills/team-quality-assurance/roles/scout/role.md +2 -5
  63. package/.codex/skills/team-review/roles/reviewer/role.md +2 -5
  64. package/.codex/skills/team-review/roles/scanner/role.md +2 -5
  65. package/.codex/skills/team-tech-debt/roles/executor/role.md +3 -7
  66. package/.codex/skills/team-tech-debt/roles/scanner/role.md +2 -5
  67. package/.codex/skills/team-tech-debt/roles/validator/role.md +3 -7
  68. package/.codex/skills/team-testing/roles/executor/role.md +3 -7
  69. package/.codex/skills/team-testing/roles/generator/role.md +3 -7
  70. package/dashboard/dist-server/src/commands/install-backend.js +19 -0
  71. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  72. package/dashboard/dist-server/src/core/manifest.d.ts +5 -0
  73. package/dashboard/dist-server/src/core/manifest.js.map +1 -1
  74. package/dashboard/dist-server/src/core/plugin-bridge.d.ts +59 -0
  75. package/dashboard/dist-server/src/core/plugin-bridge.js +355 -0
  76. package/dashboard/dist-server/src/core/plugin-bridge.js.map +1 -0
  77. package/dashboard/dist-server/src/tools/spec-loader.js +27 -19
  78. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  79. package/dashboard/dist-server/src/tools/spec-seeds.d.ts +8 -0
  80. package/dashboard/dist-server/src/tools/spec-seeds.js +114 -0
  81. package/dashboard/dist-server/src/tools/spec-seeds.js.map +1 -1
  82. package/dist/src/cli.js +19 -1
  83. package/dist/src/cli.js.map +1 -1
  84. package/dist/src/commands/install-backend.d.ts.map +1 -1
  85. package/dist/src/commands/install-backend.js +19 -0
  86. package/dist/src/commands/install-backend.js.map +1 -1
  87. package/dist/src/commands/install.d.ts.map +1 -1
  88. package/dist/src/commands/install.js +17 -1
  89. package/dist/src/commands/install.js.map +1 -1
  90. package/dist/src/commands/plugin.d.ts +3 -0
  91. package/dist/src/commands/plugin.d.ts.map +1 -0
  92. package/dist/src/commands/plugin.js +137 -0
  93. package/dist/src/commands/plugin.js.map +1 -0
  94. package/dist/src/commands/spec.d.ts.map +1 -1
  95. package/dist/src/commands/spec.js +13 -3
  96. package/dist/src/commands/spec.js.map +1 -1
  97. package/dist/src/commands/update.d.ts.map +1 -1
  98. package/dist/src/commands/update.js +23 -0
  99. package/dist/src/commands/update.js.map +1 -1
  100. package/dist/src/core/install-executor.d.ts +1 -1
  101. package/dist/src/core/install-executor.d.ts.map +1 -1
  102. package/dist/src/core/install-executor.js +27 -0
  103. package/dist/src/core/install-executor.js.map +1 -1
  104. package/dist/src/core/install-profile.d.ts +5 -0
  105. package/dist/src/core/install-profile.d.ts.map +1 -1
  106. package/dist/src/core/install-profile.js +8 -0
  107. package/dist/src/core/install-profile.js.map +1 -1
  108. package/dist/src/core/manifest.d.ts +5 -0
  109. package/dist/src/core/manifest.d.ts.map +1 -1
  110. package/dist/src/core/manifest.js.map +1 -1
  111. package/dist/src/core/plugin-bridge.d.ts +60 -0
  112. package/dist/src/core/plugin-bridge.d.ts.map +1 -0
  113. package/dist/src/core/plugin-bridge.js +355 -0
  114. package/dist/src/core/plugin-bridge.js.map +1 -0
  115. package/dist/src/tools/spec-init.d.ts +4 -3
  116. package/dist/src/tools/spec-init.d.ts.map +1 -1
  117. package/dist/src/tools/spec-init.js +9 -5
  118. package/dist/src/tools/spec-init.js.map +1 -1
  119. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  120. package/dist/src/tools/spec-loader.js +27 -19
  121. package/dist/src/tools/spec-loader.js.map +1 -1
  122. package/dist/src/tools/spec-seeds.d.ts +8 -0
  123. package/dist/src/tools/spec-seeds.d.ts.map +1 -1
  124. package/dist/src/tools/spec-seeds.js +114 -0
  125. package/dist/src/tools/spec-seeds.js.map +1 -1
  126. package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
  127. package/dist/src/tui/install-ui/InstallFlow.js +43 -14
  128. package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
  129. package/dist/src/tui/install-ui/types.d.ts +2 -0
  130. package/dist/src/tui/install-ui/types.d.ts.map +1 -1
  131. package/dist/src/tui/install-ui/types.js.map +1 -1
  132. package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -1
  133. package/dist/src/tui/install-ui/useInstallFlowState.js +13 -1
  134. package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -1
  135. package/dist/src/utils/update-notices.js +11 -0
  136. package/dist/src/utils/update-notices.js.map +1 -1
  137. package/package.json +1 -1
  138. package/workflows/odyssey-base-codex.md +306 -0
  139. package/workflows/shell-exec-protocol.md +30 -0
@@ -20,161 +20,119 @@ plan → execute → verify → fix gaps → iterate until ALL criteria pass.
20
20
  </purpose>
21
21
 
22
22
  <boundary>
23
- **范围内:** 单一需求的实现闭环从需求解析到验收标准全部通过 + 泛化同类场景
24
- **范围外:** 多需求编排 → `/maestro-roadmap` | 深度 debugging → `/odyssey-debug` | 代码审查 → `/odyssey-review-test-fix` | UI 优化 → `/odyssey-ui`
25
- **探索自由度:** 边界内自由探索 — 可自主分解任务、选择实现策略、迭代修复。verify→fix 循环内可尝试不同方案。
26
- **模板支持:** `--template <name>` 从预定义需求模板启动,自动生成匹配的验收标准和任务分解:
27
-
28
- | Template | 预设 criteria 模式 | 适用场景 |
29
- |----------|-------------------|---------|
30
- | `feature` | 用户故事验收 + 边界测试 + UI 验证 | 新功能开发 |
31
- | `bugfix` | 回归测试 + 根因确认 + 边界覆盖 | Bug 修复 |
32
- | `refactor` | 行为不变验证 + 性能基准 + API 兼容 | 重构 |
33
- | `migration` | 数据一致性 + 回滚验证 + 性能对比 | 数据/API 迁移 |
34
- | `api-endpoint` | 请求/响应契约 + 错误处理 + 权限校验 | API 开发 |
23
+ **In scope:** Single requirement delivery loop from requirement parsing to all acceptance criteria passing + generalization.
24
+ **Out of scope:** Multi-requirement orchestration → `/maestro-roadmap` | Deep debugging → `/odyssey-debug` | Code review → `/odyssey-review-test-fix` | UI optimization → `/odyssey-ui`
25
+
26
+ **`--template <name>`:**
27
+
28
+ | Template | Criteria pattern | Use case |
29
+ |----------|-----------------|----------|
30
+ | `feature` | User story acceptance + boundary tests + UI verification | New feature |
31
+ | `bugfix` | Regression tests + root cause confirmation + boundary coverage | Bug fix |
32
+ | `refactor` | Behavior preservation + performance baseline + API compatibility | Refactoring |
33
+ | `migration` | Data consistency + rollback verification + performance comparison | Data/API migration |
34
+ | `api-endpoint` | Request/response contract + error handling + permission checks | API development |
35
35
  </boundary>
36
36
 
37
37
  <context>
38
- $ARGUMENTS — requirement description and optional flags.
38
+ $ARGUMENTS
39
39
 
40
40
  **Flags:**
41
+
41
42
  | Flag | Description | Default |
42
43
  |------|-------------|---------|
43
- | `--template <name>` | 预定义需求模板 | — |
44
- | `--max-iterations N` | Max verifyfix cycles before escalation | 3 |
44
+ | `--template <name>` | Predefined requirement template | — |
45
+ | `--max-iterations N` | Max verify-fix cycles before escalation | 3 |
45
46
  | `--skip-generalize` | Skip S_GENERALIZE + S_DISCOVER | false |
46
47
  | `--auto` | CLI delegate calls without confirmation | false |
47
- | `--method agent\|cli\|auto` | Execution method: Agent tool, CLI delegate, or auto-select | `auto` |
48
- | `--executor <tool>` | Explicit executor tool for CLI delegate mode | First enabled in config |
49
- | `--skip-verify` | Skip execution post-validation gate | false |
48
+ | `--method agent\|cli\|auto` | Execution method | `auto` |
49
+ | `--executor <tool>` | Explicit executor tool for CLI delegate | First enabled |
50
+ | `--skip-verify` | Skip post-execution validation gate | false |
50
51
  | `--heartbeat` | Enable periodic progress heartbeat | false |
51
52
  | `-y` | Auto-confirm — decisions recorded as `deferred` | false |
52
53
  | `-c` | Resume most recent session | — |
53
54
 
54
- **Session**: `SESSION_DIR = .workflow/scratch/{YYYYMMDD}-planex-odyssey-{slug}/`
55
-
56
- **Output — 3 files:**
57
- ```
58
- SESSION_DIR/
59
- ├── session.json # state + criteria + iterations + plan
60
- ├── evidence.ndjson # append-only log (phase distinguishes origin)
61
- └── understanding.md # evolving narrative (8 sections, one per phase)
62
- ```
55
+ **Session**: `.workflow/scratch/{YYYYMMDD}-planex-odyssey-{slug}/`
56
+ **Output**: `session.json` | `evidence.ndjson` | `understanding.md`
63
57
 
64
- **session.json schema:**
58
+ **session.json — planex-specific fields:**
65
59
  ```json
66
- {
67
- "session_id": "planex-odyssey-{YYYYMMDD-HHmmss}",
68
- "requirement": "",
69
- "flags": { "max_iterations": 3, "skip_generalize": false, "auto": false, "auto_confirm": false },
70
- "current_state": "S_INTAKE",
71
- "acceptance_criteria": [
72
- {"id":"AC1","criterion":"","verify_method":"test|grep|cli-review|manual","status":"pending","evidence":"","passed_at":null}
73
- ],
74
- "plan": { "tasks": [{"id":"T1","title":"","description":"","criteria_refs":["AC1"],"status":"pending","files_modified":[],"domain":"general","executor":"agent"}], "created_at":"" },
75
- "execution_config": {
76
- "method": "auto",
77
- "default_executor": "",
78
- "domain_routing": { "frontend": "", "backend": "", "default": "agent" },
79
- "code_review_tool": "Skip",
80
- "verification_tool": "Auto",
81
- "confirmed": false
82
- },
83
- "iterations": [
84
- {"iteration":1,"started_at":"","completed_at":"","criteria_before":{"passed":0,"total":0},"criteria_after":{"passed":0,"total":0},"gaps_fixed":[],"files_modified":[]}
85
- ],
60
+ { "requirement": "",
61
+ "acceptance_criteria": [{"id":"AC1","criterion":"","verify_method":"test|grep|cli-review|manual","status":"pending","evidence":"","passed_at":null}],
62
+ "plan": {"tasks":[{"id":"T1","title":"","description":"","criteria_refs":["AC1"],"status":"pending","files_modified":[],"domain":"general","executor":"agent"}],"created_at":""},
63
+ "execution_config": {"method":"auto","default_executor":"","domain_routing":{"frontend":"","backend":"","default":"agent"},"code_review_tool":"Skip","verification_tool":"Auto","confirmed":false},
64
+ "iterations": [{"iteration":1,"started_at":"","completed_at":"","criteria_before":{"passed":0,"total":0},"criteria_after":{"passed":0,"total":0},"gaps_fixed":[],"files_modified":[]}],
86
65
  "current_iteration": 0,
87
- "patterns": [
88
- {"id":"P1","source":"AC1 fix","layer":"syntax|semantic|structural","signature":"","description":"","risk":"","fix_template":""}
89
- ],
90
- "generalization_stats": {"patterns_extracted":0,"total_hits":0,"cross_layer_confirmed":0,"by_layer":{"syntax":0,"semantic":0,"structural":0},"deepening_triggered":false},
91
- "phase_goals": [],
92
- "phase_goals_all_done": false,
93
- "self_iteration_log": [],
94
- "progress_metrics": "→ base",
95
- "directions_tried": "→ base",
96
- "cross_phase_loops": 0, "max_loops": 5,
97
- "created_at": "", "updated_at": ""
98
- }
66
+ "patterns": [{"id":"P1","source":"AC1 fix","layer":"syntax|semantic|structural","signature":"","description":"","risk":"","fix_template":""}],
67
+ "generalization_stats": "-> base shared_schemas" }
99
68
  ```
100
69
 
101
- **evidence.ndjson** one JSON per line, `phase` field = `planning|execution|verification|fix|decision|generalization|discovery|self-iteration`
70
+ **evidence.ndjson phases:** `planning|execution|verification|fix|decision|generalization|discovery|self-iteration`
102
71
 
103
- **understanding.md sections:** §1 Requirement & Criteria ← S_INTAKE, §2 Plan ← S_PLAN, §3 Execution ← S_EXECUTE, §4 Verification (per iter) ← S_VERIFY, §5 Fix Log (per iter) ← S_FIX, §6 Generalization ← S_GENERALIZE, §7 Discoveries ← S_DISCOVER, §8 Learnings ← S_RECORD
72
+ **understanding.md 8 sections:**
73
+ 1. Requirement & Criteria <- S_INTAKE | 2. Plan <- S_PLAN | 3. Execution <- S_EXECUTE
74
+ 4. Verification <- S_VERIFY | 5. Fix Log <- S_FIX | 6. Generalization <- S_GENERALIZE
75
+ 7. Discoveries <- S_DISCOVER | 8. Learnings <- S_RECORD
104
76
 
105
77
  **phase_goals[]:**
106
- | ID | Goal | Done When | Phase | Skip When |
78
+
79
+ | ID | Goal | done_when | phase | skip_when |
107
80
  |----|------|-----------|-------|-----------|
108
- | G1 | Acceptance criteria defined | 1 criterion in acceptance_criteria[] | S_INTAKE | — |
81
+ | G1 | Acceptance criteria defined | >=1 criterion in acceptance_criteria[] | S_INTAKE | — |
109
82
  | G2 | Plan created | session.json.plan populated | S_PLAN | — |
110
83
  | G3 | Implementation complete | all plan tasks executed | S_EXECUTE | — |
111
84
  | G4 | All criteria pass | all acceptance_criteria[].status == passed | S_VERIFY | — |
112
- | G5 | Pattern generalized | patterns[] populated ≥1 entry | S_GENERALIZE | skip_generalize |
85
+ | G5 | Pattern generalized | patterns[] >=1 entry | S_GENERALIZE | skip_generalize |
113
86
  | G6 | Discoveries triaged | all scan hits classified | S_DISCOVER | skip_generalize |
114
87
  | G7 | Learnings persisted | spec entries created OR no actionable | S_RECORD | — |
115
88
 
116
- ### Pre-load(可选,缺失不阻塞)
117
-
118
- | 层级 | 命令 | 作用 |
119
- |------|------|------|
120
- | Codebase docs | Read `.workflow/codebase/ARCHITECTURE.md` | 模块边界,架构约束 |
121
- | Wiki search | `maestro search "<requirement keywords>" --json` | 先前实现、相关决策(取 top 5) |
122
- | Coding specs | `maestro load --type spec --category coding` | 编码规范 + 可发现的 knowhow 工具 |
123
- | UI specs(条件) | 若涉及前端 → `maestro load --type spec --category ui` | UI 规范 |
124
- | Role knowledge | `maestro search --category coding` → 选相关 → `maestro load --type knowhow --id <id>` | 累积实现领域知识 |
125
- | Prior sessions | `Glob(".workflow/scratch/*-planex-odyssey-*")` | 相关 odyssey 会话 |
126
-
127
- ### Knowledge Persistence(S_RECORD 中写入产出文件)
128
-
129
- S_RECORD 阶段将可沉淀知识 **写入 understanding.md §8 Learnings**,按以下分类结构化:
89
+ **Knowledge Persistence (written to understanding.md section 8):**
130
90
 
131
- | 分类 | 写入内容 | 后续建议命令 |
132
- |------|---------|-------------|
133
- | 多轮 fix cycle pattern | 问题场景 + fix 迭代过程 + 最终方案 | `/spec-add debug "..."` |
134
- | 可复用实现模式 | 模式描述 + 适用场景 + 代码模板 | `/spec-add coding "..."` |
135
- | 验收标准模板 | 标准模板 + verify_method 建议 | `/spec-add review "..."` |
136
- | 泛化 pattern | pattern 签名 + 风险说明 + fix 模板 | `/spec-add coding "..."` |
91
+ | Category | Content | Follow-up |
92
+ |----------|---------|-----------|
93
+ | Multi-round fix cycle pattern | Problem scenario + fix iteration + final approach | `/spec-add debug` |
94
+ | Reusable implementation pattern | Pattern + applicable scope + code template | `/spec-add coding` |
95
+ | Acceptance criteria template | Standard template + verify_method suggestion | `/spec-add review` |
96
+ | Generalization pattern | Signature + risk + fix template | `/spec-add coding` |
137
97
  </context>
138
98
 
99
+ <invariants>
100
+ Base execution_discipline #1-5.
101
+ 6. **Acceptance criteria are sacred** — no "close enough", no manual override without explicit escalation
102
+ </invariants>
103
+
139
104
  <self_iteration>
140
- 适用阶段: S_PLAN, S_VERIFY, S_GENERALIZE
105
+ Applies to: **S_PLAN, S_VERIFY, S_GENERALIZE**. Logic in base.
141
106
  </self_iteration>
142
107
 
143
108
  <state_machine>
144
109
 
145
110
  <states>
146
- S_INTAKE parse requirement, define acceptance criteria PERSIST: session.json + understanding.md §1
147
- S_PLAN — decompose tasks, generate execution plan PERSIST: session.json.plan + evidence (planning) + understanding.md §2
148
- S_EXECUTE — implement tasks PERSIST: code + evidence (execution) + understanding.md §3
149
- S_VERIFY — iron gate: check every acceptance criterion PERSIST: evidence (verification) + understanding.md §4
150
- S_FIX — targeted fix for failing criteria (loops to VERIFY) PERSIST: code + evidence (fix) + understanding.md §5
151
- S_GENERALIZE — extract patterns, 4-agent scan PERSIST: session.json.patterns + understanding.md §6
152
- S_DISCOVER — triage scan hits, route decisions PERSIST: evidence (discovery|decision) + understanding.md §7
153
- S_RECORD — persist learnings, final summary PERSIST: understanding.md §8 + spec entries
111
+ S_INTAKE S_PLAN S_EXECUTE S_VERIFY S_GENERALIZE → S_DISCOVER → S_RECORD → END
154
112
  </states>
155
113
 
156
114
  <transitions>
157
- S_INTAKE → S_INTAKE WHEN -c + session found (resume)
158
- S_INTAKE → S_PLAN WHEN requirement + criteria defined
159
- S_INTAKE → S_INTAKE WHEN no requirement → AskUserQuestion
115
+ S_INTAKE → S_INTAKE : -c + session found (resume)
116
+ S_INTAKE → S_PLAN : requirement + criteria defined
117
+ S_INTAKE → S_INTAKE : no requirement → AskUserQuestion
160
118
 
161
- S_PLAN → S_EXECUTE
119
+ S_PLAN → S_EXECUTE
162
120
  S_EXECUTE → S_VERIFY
163
121
 
164
- S_VERIFY → S_GENERALIZE WHEN all passed AND NOT skip_generalize
165
- S_VERIFY → S_RECORD WHEN all passed AND skip_generalize
166
- S_VERIFY → S_FIX WHEN some failed AND iteration < max
167
- S_VERIFY → S_PLAN WHEN fundamental plan flaw discovered, loops < max_loops → cross_phase_loops++ (重规划)
168
- S_VERIFY → S_RECORD WHEN some failed AND iteration >= max (escalate)
122
+ S_VERIFY → S_GENERALIZE : all passed AND NOT skip_generalize
123
+ S_VERIFY → S_RECORD : all passed AND skip_generalize
124
+ S_VERIFY → S_FIX : some failed AND iteration < max
125
+ S_VERIFY → S_PLAN : fundamental plan flaw → cross_phase_loops++ (replan)
126
+ S_VERIFY → S_RECORD : some failed AND iteration >= max (escalate)
169
127
 
170
128
  S_FIX → S_VERIFY (loop)
171
129
 
172
- S_GENERALIZE → S_DISCOVER WHEN hits found
173
- S_GENERALIZE → S_RECORD WHEN no hits
130
+ S_GENERALIZE → S_DISCOVER : hits found
131
+ S_GENERALIZE → S_RECORD : no hits
174
132
 
175
- S_DISCOVER → S_EXECUTE : discovery finds area needing same implementation → cross_phase_loops++
176
- S_DISCOVER → S_RECORD : triage complete AND remaining_actionable == 0
177
- S_DISCOVER → S_RECORD : loops >= max_loops → MUST log each unfixed item with specific reason (blanket "pre-existing" is forbidden)
133
+ S_DISCOVER → S_EXECUTE : discovery finds area needing same implementation → cross_phase_loops++
134
+ S_DISCOVER → S_RECORD : triage complete AND remaining_actionable == 0
135
+ S_DISCOVER → S_RECORD : loops >= max_loops → log per-item reasons
178
136
 
179
137
  S_RECORD → END
180
138
  </transitions>
@@ -185,12 +143,12 @@ S_RECORD → END
185
143
 
186
144
  1. Parse requirement and flags, generate slug, create SESSION_DIR
187
145
  2. **Define acceptance criteria** — analyze requirement → derive testable criteria. Each gets `verify_method`: test | grep | cli-review | manual
188
- - **Normal**: AskUserQuestion to confirm/edit
189
- - **`-y`**: auto-derive, record `{"phase":"decision","type":"criteria-confirmation","status":"deferred"}`
146
+ - Normal: AskUserQuestion to confirm/edit
147
+ - `-y`: auto-derive, record `{"phase":"decision","type":"criteria-confirmation","status":"deferred"}`
190
148
  3. Search prior knowledge: `maestro search`, related sessions
191
- 4. Write session.json + understanding.md §1. Mark G1 done. Display Goal Prompt (see Appendix)
149
+ 4. Write session.json + understanding.md section 1. Mark G1 done. Emit Goal Prompt.
192
150
 
193
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): INTAKE — 目标解析"`
151
+ Commit: `"odyssey-planex({slug}): INTAKE — parse requirement and define criteria"`
194
152
 
195
153
  ### A_PLAN
196
154
 
@@ -204,10 +162,10 @@ S_RECORD → END
204
162
  EXPECTED: JSON [{task_id, title, description, criteria_refs, deps}]
205
163
  " --role analyze --mode analysis
206
164
  ```
207
- Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
208
- 3. Write session.json.plan, append evidence (planning), update understanding.md §2. Mark G2 done.
165
+ Run with `run_in_background: true`, wait for callback.
166
+ 3. Write session.json.plan, append evidence (planning), update understanding.md section 2. Mark G2 done.
209
167
 
210
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): PLAN — 计划制定"`
168
+ Commit: `"odyssey-planex({slug}): PLAN — create execution plan"`
211
169
 
212
170
  ### A_EXECUTE
213
171
 
@@ -215,51 +173,21 @@ S_RECORD → END
215
173
 
216
174
  **Skip if** `-y` flag OR `--method` explicitly set OR `execution_config.confirmed == true` (resume).
217
175
 
218
- Load available tools: `maestro delegate-config show --json` → extract enabled tools and domain tags.
219
-
220
- ```
221
- AskUserQuestion({
222
- questions: [
223
- {
224
- question: "任务如何执行?选择一种方式,或 Other 指定域路由规则(如 '前端agy 后端codex 其余agent')",
225
- header: "Executor",
226
- options: [
227
- { label: "Auto (Recommended)", description: "域路由: frontend→{frontendTool}, backend→{backendTool}, general→agent" },
228
- { label: "Agent", description: "Claude Code Agent 执行所有任务(最快)" },
229
- ...availableTools.map(t => ({ label: t, description: `${t} CLI 执行所有任务` }))
230
- ]
231
- },
232
- {
233
- question: "执行后运行代码审查?",
234
- header: "Review",
235
- options: [
236
- { label: "Skip", description: "不审查" },
237
- ...availableTools.map(t => ({ label: `${t} Review`, description: `${t} CLI: git diff 质量审查` }))
238
- ]
239
- },
240
- {
241
- question: "验证门控?(外部模型检查收敛 + 结构 + 反模式)",
242
- header: "Verify",
243
- options: [
244
- { label: "Auto (Recommended)", description: `Delegate 到 ${availableTools[0]} 做收敛+结构+反模式检查` },
245
- ...availableTools.map(t => ({ label: t, description: `${t}: 验证门控` })),
246
- { label: "Skip", description: "不验证" }
247
- ]
248
- }
249
- ]
250
- })
251
- ```
176
+ Load available tools: `maestro delegate-config show --json`.
252
177
 
253
- Parse response write `execution_config` to session.json, set `confirmed: true`.
178
+ Present AskUserQuestion with 3 questions:
179
+ 1. **Executor** — Auto (domain routing) | Agent (all tasks) | specific CLI tool | Other (custom domain routing)
180
+ 2. **Review** — Skip | {tool} review (git diff quality check)
181
+ 3. **Verify** — Auto (delegate convergence + structure + anti-pattern check) | specific tool | Skip
254
182
 
255
- `--skip-verify` flag overrides verification to `"Skip"`.
183
+ Parse response → write `execution_config` to session.json, set `confirmed: true`. `--skip-verify` overrides verification to `"Skip"`.
256
184
 
257
185
  #### Step 2: Executor Resolution
258
186
 
259
187
  Per-task domain routing (when method == "auto"):
260
188
 
261
- | Domain | Keywords / Patterns | File Extensions |
262
- |--------|-------------------|-----------------|
189
+ | Domain | Keywords / Patterns | Extensions |
190
+ |--------|-------------------|------------|
263
191
  | frontend | UI, component, page, style, layout, CSS, view | .tsx/.jsx/.vue/.css/.html/.svelte |
264
192
  | backend | API, server, database, service, algorithm, worker | .go/.rs/.java/.py/.sql/.proto |
265
193
  | general | mixed, config, tests, unclear | .ts/.js/other |
@@ -268,16 +196,15 @@ Resolution: `execution_config.domain_routing[domain]` → fallback `domain_routi
268
196
 
269
197
  #### Step 3: Task Execution
270
198
 
271
- Execute tasks per plan order. Independent tasks (no cross-dependency) may run in parallel.
199
+ Execute tasks per plan order. Independent tasks may run in parallel.
272
200
 
273
201
  **Agent path:**
274
202
  ```
275
- Spawn Agent with:
276
- task definition, acceptance criteria refs, prior task summaries, specs_content
277
- Agent implements → verifies convergence criteria → auto-fix (max 3) → returns result
203
+ Spawn Agent with: task definition, acceptance criteria refs, prior task summaries, specs_content
204
+ Agent implements verifies convergence auto-fix (max 3) → returns result
278
205
  ```
279
206
 
280
- **CLI path (via maestro delegate):**
207
+ **CLI path:**
281
208
  ```bash
282
209
  maestro delegate "PURPOSE: Implement task ${task_id}: ${title}; success = criteria ${criteria_refs} satisfied
283
210
  TASK: ${description} | Read existing code first | Verify convergence criteria after changes
@@ -300,7 +227,7 @@ ${prior_summaries}
300
227
  " --to ${resolved_executor} --mode write --id planex-${slug}-${task_id}
301
228
  ```
302
229
 
303
- Run CLI delegate with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
230
+ Run with `run_in_background: true`, wait for callback.
304
231
 
305
232
  **Deviation Rule** — max 3 auto-fix attempts per task:
306
233
  1. First attempt: normal dispatch
@@ -341,11 +268,11 @@ ${modified_files.join('\n')}
341
268
  " --to ${execution_config.verification_tool} --mode analysis
342
269
  ```
343
270
 
344
- Execute with `run_in_background: true`, then wait for callback (do NOT halt the Odyssey flow).
271
+ Run with `run_in_background: true`, wait for callback.
345
272
 
346
273
  On result:
347
- - `overall == "passed"` → proceed to S_VERIFY (criteria gate) with boosted confidence
348
- - `overall == "gaps_found"` → log findings, proceed to S_VERIFY (criteria will catch failures)
274
+ - `overall == "passed"` → proceed to S_VERIFY with boosted confidence
275
+ - `overall == "gaps_found"` → log findings, proceed to S_VERIFY
349
276
 
350
277
  **Check 3: Code Review** (if `execution_config.code_review_tool != "Skip"`):
351
278
  ```bash
@@ -354,29 +281,30 @@ maestro delegate "Review git diff for correctness, style, bugs" --to ${code_revi
354
281
 
355
282
  #### Step 6: Completion
356
283
 
357
- Update understanding.md §3. Mark G3 done.
284
+ Update understanding.md section 3. Mark G3 done.
358
285
 
359
- 📌 **Auto-commit**: `git add -A && git commit -m "odyssey-planex({slug}): EXECUTE — 实现执行"`
286
+ Commit: `"odyssey-planex({slug}): EXECUTE — implementation complete"`
360
287
 
361
288
  ### A_VERIFY
362
289
 
363
290
  Iron gate — every acceptance criterion checked objectively.
364
291
 
365
292
  **Verify each criterion by method:**
293
+
366
294
  | Method | Action |
367
295
  |--------|--------|
368
296
  | `test` | Run relevant tests, check pass/fail |
369
297
  | `grep` | Grep for expected pattern |
370
298
  | `cli-review` | `maestro delegate --role review --mode analysis` with criterion as focus |
371
- | `manual` | **Normal**: AskUserQuestion / **`-y`**: record `deferred` |
299
+ | `manual` | Normal: AskUserQuestion / `-y`: record `deferred` |
372
300
 
373
301
  Record per criterion: `{"phase":"verification","type":"criterion-check","criterion_id":"AC1","method":"","result":"passed|failed","evidence":"","iteration":N}`. Update acceptance_criteria[].status. Append to iterations[].
374
302
 
375
- Update understanding.md §4 with pass/fail table.
303
+ Update understanding.md section 4 with pass/fail table.
376
304
 
377
- **Route:** all passed → mark G4 done → next state. Some failed + iteration < max → S_FIX. Some failed + iteration >= max → **Normal**: AskUserQuestion (continue/lower bar/accept) / **`-y`**: `deferred`, proceed S_RECORD.
305
+ **Route:** all passed → mark G4 done → next state. Some failed + iteration < max → S_FIX. Some failed + iteration >= max → Normal: AskUserQuestion (continue/lower bar/accept) / `-y`: `deferred`, proceed S_RECORD.
378
306
 
379
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): VERIFY — 验收验证"`
307
+ Commit: `"odyssey-planex({slug}): VERIFY — acceptance check"`
380
308
 
381
309
  ### A_FIX
382
310
 
@@ -391,88 +319,68 @@ Update understanding.md §4 with pass/fail table.
391
319
  EXPECTED: JSON {verdict, regression_risk, concerns}
392
320
  " --role review --mode analysis
393
321
  ```
394
- 4. Append evidence (fix), update understanding.md §5 → S_VERIFY
322
+ 4. Append evidence (fix), update understanding.md section 5 → S_VERIFY
395
323
 
396
- 📌 **Auto-commit**: `git add -A && git commit -m "odyssey-planex({slug}): FIX — 修复"`
324
+ Commit: `"odyssey-planex({slug}): FIX — targeted fix for failing criteria"`
397
325
 
398
326
  ### A_GENERALIZE
399
327
 
400
- base A_GENERALIZE 执行。Pattern 来源: implementation patterns。Mark G5 done.
328
+ Base shared_actions. Pattern source: implementation patterns.
401
329
 
402
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): GENERALIZE — 泛化扫描"`
330
+ Commit: `"odyssey-planex({slug}): GENERALIZE — pattern scan complete"`
403
331
 
404
332
  ### A_DISCOVER
405
333
 
406
- base A_DISCOVER 执行。Mark G6 done.
334
+ Base shared_actions. Planex override: discovery finding needing same implementation → route back to S_EXECUTE (not S_FIX).
407
335
 
408
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): DISCOVER — 发现分类"`
336
+ Commit: `"odyssey-planex({slug}): DISCOVER — findings classified"`
409
337
 
410
338
  ### A_RECORD
411
339
 
412
- 1. Finalize understanding.md §8 — iteration summary, what worked, what needed rework
413
- 2. Write learnings to understanding.md §8: Knowledge Persistence 表分类记录
414
- 3. Pending decisions: **Normal** AskUserQuestion. **`-y`** display deferred count.
415
- 4. Goal audit: check all phase_goals[*].completion_confirmed. Mark G7 done.
416
- 5. Output completion summary:
417
- ```
418
- --- PLANEX ODYSSEY COMPLETE ---
419
- Requirement: {requirement}
420
- Criteria: {passed}/{total} passed
421
- Iterations: {N} cycles
422
- Patterns: {patterns_extracted} ({by_layer} distribution)
423
- Scan hits: {total_hits} ({cross_layer_confirmed} cross-layer confirmed)
424
- Issues: {N} created | Decisions: {N} resolved, {M} pending, {K} deferred
425
- Learnings: {N} spec entries
426
- Self-iter: {N} rounds across {M} stages
427
- Goals: {done}/{total} confirmed ({skipped} skipped)
428
- Status: {ALL_PASSED|PARTIAL|ESCALATED}
429
- ---
430
- ```
431
- 6. 其余按 base A_RECORD 执行。
340
+ Base shared_actions. Planex additions:
341
+ 1. Iteration summary: what worked, what needed rework, fix cycle patterns
342
+ 2. Learnings structured per Knowledge Persistence table: problem scenario + fix iteration process + final approach + applicable scope
432
343
 
433
- 📌 **Auto-commit**: `git add understanding.md && git commit -m "odyssey-planex({slug}): RECORD — 会话总结"`
344
+ **Completion summary:**
345
+ ```
346
+ --- PLANEX ODYSSEY COMPLETE ---
347
+ Requirement: {requirement}
348
+ Criteria: {passed}/{total} passed
349
+ Iterations: {N} cycles
350
+ Patterns: {patterns_extracted} ({by_layer} distribution)
351
+ Scan hits: {total_hits} ({cross_layer_confirmed} cross-layer confirmed)
352
+ Issues: {N} created | Decisions: {N} resolved, {M} pending, {K} deferred
353
+ Learnings: {N} spec entries
354
+ Self-iter: {N} rounds across {M} stages
355
+ Goals: {done}/{total} confirmed ({skipped} skipped)
356
+ Status: {ALL_PASSED|PARTIAL|ESCALATED}
357
+ ---
358
+ ```
359
+
360
+ Commit: `"odyssey-planex({slug}): RECORD — session summary"`
434
361
 
435
362
  </actions>
436
363
 
437
364
  <appendix>
438
365
 
439
- ### Goal Prompt Template
440
-
441
- **⚠️ 时机守卫:仅在 A_INTAKE 完成后显示一次(session 创建后、开始 Plan 前)。A_RECORD 完成时禁止重新显示。**
442
-
443
- ```
444
- 📋 Planex Odyssey 会话已创建。可随时复制以下 /goal 设定终止条件(执行过程中输入即可):
445
-
446
- /goal 完成以下目标:
447
- {for each G in phase_goals where status != "skipped":}
448
- - {G.id}: {G.goal} — 完成条件: {G.done_when}
449
- {end for}
450
- 验收标准:
451
- {for each AC in acceptance_criteria:}
452
- - {AC.id}: {AC.criterion} (验证方式: {AC.verify_method})
453
- {end for}
454
- 穷尽迭代:直到 acceptance_criteria[*] 全部 status==passed
455
- 且 phase_goals_all_done=true 才停。verify 失败自动 fix→re-verify 循环。
456
- 每轮修复后重新验证,新发现的标准违反继续修,不超过 max_iterations。
457
- 遇到 phase=decision 的 pending 必须 AskUserQuestion,不得自行 resolve。
458
- 不允许"接近通过",验收标准必须 ALL pass。
459
- ```
460
-
461
- 完成时仅输出 completion summary,不重复此提示。
462
-
463
- ### `-y` Auto-Confirm Behavior
366
+ ### `-y` planex-specific points
464
367
 
465
368
  | Decision Point | Normal | `-y` |
466
- |----------------|--------|------|
369
+ |---------------|--------|------|
467
370
  | S_INTAKE criteria confirmation | AskUserQuestion | auto-derive, `deferred` |
468
- | S_EXECUTE execution options | AskUserQuestion (executor/review/verify) | use defaults (auto/Skip/Auto), `confirmed: true` |
371
+ | S_EXECUTE execution options | AskUserQuestion | use defaults (auto/Skip/Auto), `confirmed: true` |
469
372
  | S_EXECUTE task blocked (3 retries) | AskUserQuestion: continue or stop | auto continue, log blocked |
470
373
  | S_VERIFY manual criterion | AskUserQuestion | `deferred` |
471
374
  | S_VERIFY max iteration reached | AskUserQuestion | auto accept, `deferred` |
472
- | S_DISCOVER classification routing | AskUserQuestion | auto create issue, `deferred` |
473
- | S_DISCOVER ambiguous items | AskUserQuestion | all `deferred` |
474
- | S_RECORD decision list | AskUserQuestion | skip |
475
- | S_RECORD goal audit | AskUserQuestion | auto accept |
375
+
376
+ ### Goal Prompt convergence rules
377
+
378
+ ```
379
+ Exhaustive iteration: until all acceptance_criteria[*].status==passed
380
+ AND phase_goals_all_done=true. Verify failure auto-triggers fix->re-verify loop.
381
+ Each fix round re-verifies; new criterion violations continue fixing within max_iterations.
382
+ No "close enough" — all criteria must ALL pass.
383
+ ```
476
384
 
477
385
  ### Iteration Model
478
386
 
@@ -500,13 +408,13 @@ Max iterations (default 3) prevents infinite loops. Each iteration records crite
500
408
  </error_codes>
501
409
 
502
410
  <success_criteria>
503
- - [ ] Requirement parsed with 1 acceptance criterion (verify_method assigned)
411
+ - [ ] Requirement parsed with >=1 acceptance criterion (verify_method assigned)
504
412
  - [ ] Plan tasks mapped to criteria; execution options confirmed
505
413
  - [ ] Tasks dispatched via resolved executor with deviation rule (max 3 retries)
506
414
  - [ ] Post-execution validation gate run (unless --skip-verify)
507
415
  - [ ] Every criterion verified per method; failing → targeted fix (not re-implementation)
508
416
  - [ ] Iteration count tracked and max respected; unfixed criteria individually classified
509
- - [ ] understanding.md §18 updated per phase; phase_goals G1-G7 audited
417
+ - [ ] understanding.md sections 1-8 updated per phase; phase_goals G1-G7 audited
510
418
  - [ ] Generalization + discovery completed (unless --skip-generalize)
511
419
  - [ ] Quality Gate self-iteration triggered when insufficient
512
420
  - [ ] Goal Prompt displayed once after intake; `-y` mode: no blocking prompts
@@ -514,11 +422,12 @@ Max iterations (default 3) prevents infinite loops. Each iteration records crite
514
422
  </success_criteria>
515
423
 
516
424
  <next_step_routing>
517
- | Condition | Next step |
518
- |-----------|-----------|
425
+ | Condition | Next |
426
+ |-----------|------|
519
427
  | All criteria passed | `/odyssey-review-test-fix <changed-files>` |
520
428
  | Max iterations, still failing | `/odyssey-debug "<failing criterion>"` |
521
- | Want formal review | `/quality-review <phase>` |
429
+ | Formal review | `/quality-review <phase>` |
522
430
  | Issues from discoveries | `/manage-issue list --source planex-odyssey` |
523
431
  | Pattern worth documenting | `/learn-decompose <module>` |
524
432
  </next_step_routing>
433
+ </output>