pi-maestro-flow 0.2.0 → 0.3.1

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 +18 -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 -5
  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 +8 -8
  28. package/skills/maestro-amend/SKILL.md +4 -4
  29. package/skills/maestro-analyze/SKILL.md +9 -9
  30. package/skills/maestro-blueprint/SKILL.md +7 -7
  31. package/skills/maestro-brainstorm/SKILL.md +10 -10
  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 +10 -10
  35. package/skills/maestro-execute/SKILL.md +8 -8
  36. package/skills/maestro-fork/SKILL.md +7 -7
  37. package/skills/maestro-grill/SKILL.md +12 -12
  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 +8 -8
  42. package/skills/maestro-merge/SKILL.md +6 -6
  43. package/skills/maestro-milestone-audit/SKILL.md +3 -3
  44. package/skills/maestro-milestone-complete/SKILL.md +8 -8
  45. package/skills/maestro-milestone-release/SKILL.md +9 -9
  46. package/skills/maestro-next/SKILL.md +5 -5
  47. package/skills/maestro-overlay/SKILL.md +19 -19
  48. package/skills/maestro-plan/SKILL.md +8 -8
  49. package/skills/maestro-player/SKILL.md +5 -5
  50. package/skills/maestro-quick/SKILL.md +5 -5
  51. package/skills/maestro-ralph/SKILL.md +15 -15
  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 +17 -17
  56. package/skills/maestro-roadmap/SKILL.md +7 -7
  57. package/skills/maestro-swarm-workflow/SKILL.md +9 -9
  58. package/skills/maestro-tools-execute/SKILL.md +5 -5
  59. package/skills/maestro-tools-register/SKILL.md +7 -7
  60. package/skills/maestro-ui-codify/SKILL.md +8 -8
  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 -4
  64. package/skills/manage-drift-realign/SKILL.md +7 -7
  65. package/skills/manage-harvest/SKILL.md +5 -5
  66. package/skills/manage-issue/SKILL.md +4 -4
  67. package/skills/manage-issue-discover/SKILL.md +7 -7
  68. package/skills/manage-kg-extractors/SKILL.md +3 -3
  69. package/skills/manage-knowhow/SKILL.md +3 -3
  70. package/skills/manage-knowhow-capture/SKILL.md +4 -4
  71. package/skills/manage-knowledge-audit/SKILL.md +5 -5
  72. package/skills/manage-status/SKILL.md +3 -3
  73. package/skills/manage-wiki/SKILL.md +5 -5
  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 -3
  81. package/skills/quality-debug/SKILL.md +3 -3
  82. package/skills/quality-refactor/SKILL.md +3 -3
  83. package/skills/quality-retrospective/SKILL.md +9 -9
  84. package/skills/quality-review/SKILL.md +4 -4
  85. package/skills/quality-sync/SKILL.md +3 -3
  86. package/skills/quality-test/SKILL.md +4 -4
  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 -2
  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 -5
  102. package/skills/spec-load/SKILL.md +3 -3
  103. package/skills/spec-remove/SKILL.md +4 -4
  104. package/skills/spec-setup/SKILL.md +6 -6
  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
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: maestro-universal-workflow
3
3
  description: "Dynamic adversarial workflow generator — scan library, match or generate, execute, persist Arguments: <intent> [--name <slug>] [--depth shallow|standard|deep] [--dry-run] [--from <script>] [--resume <runId>]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Workflow AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep Workflow maestro
5
5
  ---
6
6
 
7
7
  <purpose>
8
8
  Dynamic workflow generator: scan library for matches or generate task-specific Workflow scripts
9
- on-the-fly with adversarial patterns. Scripts persist at `~/.maestro/workflows/dynamic/uwf-*.js`.
9
+ on-the-fly with adversarial patterns. Scripts persist at `~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-*.js`.
10
10
  </purpose>
11
11
 
12
12
  <context>
@@ -23,10 +23,10 @@ Remaining → intent
23
23
  ```
24
24
 
25
25
  **Library locations:**
26
- - Fixed scripts: `~/.maestro/workflows/swarm/wf-*.js`
27
- - Dynamic scripts: `~/.maestro/workflows/dynamic/uwf-*.js`
26
+ - Fixed scripts: `~/.pi/agent/packages/pi-maestro-flow/workflows/swarm/wf-*.js`
27
+ - Dynamic scripts: `~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-*.js`
28
28
 
29
- **Output boundary**: ALL file writes MUST target `~/.maestro/workflows/dynamic/` (generated scripts) and `.workflow/scratch/{YYYYMMDD}-uwf-*/` (execution results). Fixed scripts at `~/.maestro/workflows/swarm/` are read-only. NEVER modify source code or `.claude/commands/` files.
29
+ **Output boundary**: ALL file writes MUST target `~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/` (generated scripts) and `.workflow/scratch/{YYYYMMDD}-uwf-*/` (execution results). Fixed scripts at `~/.pi/agent/packages/pi-maestro-flow/workflows/swarm/` are read-only. NEVER modify source code or `.claude/commands/` files.
30
30
  </context>
31
31
 
32
32
  <state_machine>
@@ -94,10 +94,10 @@ S_PERSIST:
94
94
 
95
95
  扫描两个目录,读取每个 `.js` 文件的 `meta` 块提取 `name`、`description`、`whenToUse`:
96
96
 
97
- 1. **Fixed scripts**: 展开 `~/.maestro/workflows/swarm/wf-*.js` 为绝对路径
97
+ 1. **Fixed scripts**: 展开 `~/.pi/agent/packages/pi-maestro-flow/workflows/swarm/wf-*.js` 为绝对路径
98
98
  - Glob 查找所有匹配文件
99
99
  - 读取每个文件前 10 行,提取 `meta.name`、`meta.description`、`meta.whenToUse`
100
- 2. **Dynamic scripts**: 展开 `~/.maestro/workflows/dynamic/uwf-*.js`
100
+ 2. **Dynamic scripts**: 展开 `~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-*.js`
101
101
  - 同上
102
102
  3. **匹配评分**:对每个脚本,评估其 description/whenToUse 与 intent 的语义相关度
103
103
  4. **输出**:
@@ -105,7 +105,7 @@ S_PERSIST:
105
105
  - 每个列出:name、description、scriptPath、匹配理由
106
106
  - 无匹配则直接跳 S_DESIGN
107
107
 
108
- 若有匹配,用 AskUserQuestion 让用户选择:
108
+ 若有匹配,用 user prompt 让用户选择:
109
109
  - 选项 1-3: 使用现有脚本(附 preview 显示脚本 meta)
110
110
  - 最后选项: "生成全新脚本"
111
111
 
@@ -265,7 +265,7 @@ const path = 'C:/Users/project/src' // 或直接不在脚本中硬编码路径
265
265
 
266
266
  ```
267
267
  Write({
268
- file_path: expandPath('~/.maestro/workflows/dynamic/uwf-{slug}.js'),
268
+ file_path: expandPath('~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-{slug}.js'),
269
269
  content: generatedScript
270
270
  })
271
271
  ```
@@ -286,7 +286,7 @@ Bash({ command: 'node --check "path/to/uwf-{slug}.js"' })
286
286
 
287
287
  ### A_CONFIRM_EXECUTE
288
288
 
289
- Use `AskUserQuestion` to confirm before executing the generated or selected script:
289
+ Use `user prompt` to confirm before executing the generated or selected script:
290
290
 
291
291
  ```
292
292
  question: "脚本已就绪,是否执行?"
@@ -307,7 +307,7 @@ User confirms → S_EXECUTE; user declines → S_PERSIST (save only); user cance
307
307
 
308
308
  ```
309
309
  Workflow({
310
- scriptPath: expandPath('~/.maestro/workflows/dynamic/uwf-{slug}.js'),
310
+ scriptPath: expandPath('~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-{slug}.js'),
311
311
  args: taskSpecificArgs, // 从 intent 推断
312
312
  resumeFromRunId: resumeId // 若有
313
313
  })
@@ -317,12 +317,12 @@ Workflow({
317
317
 
318
318
  ### A_PERSIST_SCRIPT
319
319
 
320
- 脚本已在 A_GENERATE_SCRIPT Step 2 写入 `~/.maestro/workflows/dynamic/uwf-{slug}.js`。
320
+ 脚本已在 A_GENERATE_SCRIPT Step 2 写入 `~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-{slug}.js`。
321
321
 
322
322
  1. 确认文件存在(Glob 检查)
323
323
  2. 展示保存路径和使用方式:
324
324
  ```
325
- Saved: ~/.maestro/workflows/dynamic/uwf-{slug}.js
325
+ Saved: ~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-{slug}.js
326
326
  Reuse: /maestro-universal-workflow --from uwf-{slug} "{new intent}"
327
327
  Resume: /maestro-universal-workflow --resume {runId}
328
328
  Via swarm: /maestro-swarm-workflow --script uwf-{slug}
@@ -522,7 +522,7 @@ Findings: ${digest}
522
522
  - BLOCKED if: task cannot be decomposed (E002).
523
523
 
524
524
  **GATE 4: Generate → Execute**
525
- - REQUIRED: Script written to `~/.maestro/workflows/dynamic/uwf-{slug}.js`.
525
+ - REQUIRED: Script written to `~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-{slug}.js`.
526
526
  - REQUIRED: `node --check` syntax validation passed.
527
527
  - REQUIRED: User confirmation via AskUserQuestion (unless resuming).
528
528
  - BLOCKED if: syntax validation fails after 2 retries (E003).
@@ -617,6 +617,6 @@ universal-workflow 扫描时会同时检查 swarm/ 和 dynamic/ 目录,
617
617
  - [ ] `node --check` syntax validation passed
618
618
  - [ ] User confirmation obtained before execution (unless --resume)
619
619
  - [ ] Workflow executed via scriptPath (not inline script string)
620
- - [ ] Script persisted to `~/.maestro/workflows/dynamic/uwf-{slug}.js`
620
+ - [ ] Script persisted to `~/.pi/agent/packages/pi-maestro-flow/workflows/dynamic/uwf-{slug}.js`
621
621
  - [ ] Completion summary displayed with reuse/resume commands
622
622
  </success_criteria>
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: maestro-update
3
3
  description: "Detect version, preview changes, apply workflow upgrades Arguments: [--dry-run] [--force] [--setup-only]"
4
- allowed-tools: Read Write Edit Bash Glob Grep AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep maestro
5
5
  ---
6
6
 
7
7
  <purpose>
8
8
  Detect current version, run schema migration to latest, then follow the version-specific upgrade workflow.
9
- Schema migrations are handled by `maestro update --migrate`; workflow docs (`~/.maestro/workflows/updates/`) handle setup.
9
+ Schema migrations are handled by `maestro update --migrate`; workflow docs (`~/.pi/agent/packages/pi-maestro-flow/workflows/updates/`) handle setup.
10
10
  </purpose>
11
11
 
12
12
  <context>
@@ -19,7 +19,7 @@ $ARGUMENTS — optional flags.
19
19
 
20
20
  **Version source:** `.workflow/state.json` → `version` field
21
21
 
22
- **Workflow docs:** `~/.maestro/workflows/updates/`
22
+ **Workflow docs:** `~/.pi/agent/packages/pi-maestro-flow/workflows/updates/`
23
23
  - `update-v{TO}-setup.md` — post-migration setup for version {TO}
24
24
 
25
25
  **Schema registry:** `maestro update --migrate` — handles all intermediate version bumps automatically
@@ -30,7 +30,7 @@ $ARGUMENTS — optional flags.
30
30
  <invariants>
31
31
  1. **Backup before migration** — a timestamped backup of `.workflow/state.json` MUST be created before any schema migration runs; NEVER execute migration without backup
32
32
  2. **Idempotent** — running update when already on latest version MUST be a no-op (display "up to date"); NEVER re-apply migrations
33
- 3. **Confirmation before execute** — migration diff MUST be displayed and user MUST confirm via AskUserQuestion before execution (unless `--force`); NEVER silently apply schema changes
33
+ 3. **Confirmation before execute** — migration diff MUST be displayed and user MUST confirm via user prompt before execution (unless `--force`); NEVER silently apply schema changes
34
34
  4. **Migration diff always visible** — even with `--force`, the migration diff MUST be displayed for audit visibility; NEVER skip diff display
35
35
  5. **Restore path on failure** — if migration fails, the backup restore command MUST be displayed; NEVER leave user without recovery instructions
36
36
  6. **Sequential migration** — all intermediate version steps MUST be applied in order by the schema registry; NEVER skip intermediate versions
@@ -65,7 +65,7 @@ $ARGUMENTS — optional flags.
65
65
  ```
66
66
 
67
67
  IF `--setup-only`:
68
- → Glob: ~/.maestro/workflows/updates/update-v{version}-setup.md
68
+ → Glob: ~/.pi/agent/packages/pi-maestro-flow/workflows/updates/update-v{version}-setup.md
69
69
  → IF exists: follow that document completely, then EXIT
70
70
  → IF not exists: display "No setup script for v{version}" → EXIT
71
71
 
@@ -76,8 +76,8 @@ IF `--setup-only`:
76
76
  2. Parse JSON output
77
77
  3. IF status = "up-to-date":
78
78
  Display "Already up to date (v{version})"
79
- → Glob: ~/.maestro/workflows/updates/update-v{version}-setup.md
80
- → IF exists: AskUserQuestion "Run setup for v{version}?" → load and follow
79
+ → Glob: ~/.pi/agent/packages/pi-maestro-flow/workflows/updates/update-v{version}-setup.md
80
+ → IF exists: user prompt "Run setup for v{version}?" → load and follow
81
81
  → EXIT
82
82
 
83
83
  4. Display target:
@@ -94,7 +94,7 @@ IF `--dry-run` → display info and EXIT.
94
94
  Show schema changes that will be applied.
95
95
 
96
96
  2. Confirm (unless --force):
97
- AskUserQuestion: "Upgrade v{current} → v{target}?"
97
+ user prompt: "Upgrade v{current} → v{target}?"
98
98
  Options: [执行 / 取消]
99
99
 
100
100
  3. Create backup:
@@ -107,7 +107,7 @@ IF `--dry-run` → display info and EXIT.
107
107
  5. IF failed → display backup restore command → EXIT
108
108
 
109
109
  6. Load version-specific setup:
110
- Read: ~/.maestro/workflows/updates/update-v{target}-setup.md
110
+ Read: ~/.pi/agent/packages/pi-maestro-flow/workflows/updates/update-v{target}-setup.md
111
111
  IF exists → follow completely (hooks, deps, knowledge system config)
112
112
 
113
113
  7. Display: "v{current} → v{target}: done"
@@ -132,7 +132,7 @@ Next steps:
132
132
  |------|----------|-----------|----------|
133
133
  | E001 | error | `.workflow/state.json` not found or unreadable | Run `/maestro-init` first |
134
134
  | E002 | error | Schema migration failed (npx tsx returned error) | Display backup restore command: `cp .workflow/state.json.backup-* .workflow/state.json` |
135
- | E003 | error | Version-specific setup doc failed to execute | Manual setup: read `~/.maestro/workflows/updates/update-v{target}-setup.md` |
135
+ | E003 | error | Version-specific setup doc failed to execute | Manual setup: read `~/.pi/agent/packages/pi-maestro-flow/workflows/updates/update-v{target}-setup.md` |
136
136
  | W001 | warning | No version-specific setup doc found for target version | Proceed without setup; schema migration alone is sufficient |
137
137
  | W002 | warning | `--setup-only` but no setup script exists for current version | Display message and exit |
138
138
  </error_codes>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-codebase-rebuild
3
3
  description: "Rebuild all codebase documentation from scratch Arguments: [--focus <area>] [--force] [--skip-commit]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,7 +9,7 @@ Full rebuild of `.workflow/codebase/` docs: 4 parallel mapper agents → tech-st
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/codebase-rebuild.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/codebase-rebuild.md
13
13
  </required_reading>
14
14
 
15
15
  <context>
@@ -20,7 +20,7 @@ $ARGUMENTS -- optional flags.
20
20
  - `--force` -- Skip confirmation prompt and proceed directly
21
21
  - `--skip-commit` -- Do not auto-commit after rebuild
22
22
 
23
- **Confirmation gate:** Unless `--force` is set, prompt the user (AskUserQuestion) before executing git commit. Show the list of changed files and proposed commit message. If `--skip-commit` is set, skip the commit entirely.
23
+ **Confirmation gate:** Unless `--force` is set, prompt the user (user prompt) before executing git commit. Show the list of changed files and proposed commit message. If `--skip-commit` is set, skip the commit entirely.
24
24
 
25
25
  **Mapper agent assignments (when `--focus` omitted):**
26
26
  | Agent | Focus | Output file |
@@ -49,7 +49,7 @@ $ARGUMENTS -- optional flags.
49
49
  </invariants>
50
50
 
51
51
  <execution>
52
- Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
52
+ Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/codebase-rebuild.md' completely.
53
53
 
54
54
  **When `--focus <area>` is set:** pass the area string to each mapper agent as scoping context; only regenerate the docs relevant to that scope (leave others untouched unless missing).
55
55
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-drift-realign
3
3
  description: "Detect and realign .workflow/ artifact drift against code reality after refactoring Arguments: [--scope <roadmap|spec|codebase|state|issue|knowhow|project|all>] [--since YYYY-MM-DD|commit|HEAD~N] [--depth shallow|deep] [--dry-run] [--report] [--auto-archive] [--interactive]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,13 +9,13 @@ allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/drift-realign.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/drift-realign.md
13
13
  </required_reading>
14
14
 
15
15
  <deferred_reading>
16
- - ~/.maestro/workflows/knowledge-audit.md (交叉引用已有审计发现)
17
- - ~/.maestro/workflows/sync.md (codebase 文档严重漂移时自动触发)
18
- - ~/.maestro/workflows/codebase-rebuild.md (sync 不足时的回退方案)
16
+ - ~/.pi/agent/packages/pi-maestro-flow/workflows/knowledge-audit.md (交叉引用已有审计发现)
17
+ - ~/.pi/agent/packages/pi-maestro-flow/workflows/sync.md (codebase 文档严重漂移时自动触发)
18
+ - ~/.pi/agent/packages/pi-maestro-flow/workflows/codebase-rebuild.md (sync 不足时的回退方案)
19
19
  </deferred_reading>
20
20
 
21
21
  <context>
@@ -65,7 +65,7 @@ Arguments: $ARGUMENTS
65
65
  </invariants>
66
66
 
67
67
  <execution>
68
- Follow `~/.maestro/workflows/drift-realign.md` Stages 1-9 in order.
68
+ Follow `~/.pi/agent/packages/pi-maestro-flow/workflows/drift-realign.md` Stages 1-9 in order.
69
69
 
70
70
  ### Phase Gates (MANDATORY, BLOCKING)
71
71
 
@@ -100,7 +100,7 @@ Follow `~/.maestro/workflows/drift-realign.md` Stages 1-9 in order.
100
100
 
101
101
  ### Platform Inquiry(Stage 2a,交互式)
102
102
 
103
- 当 `session_summary.by_platform` 包含多个平台且 session 总量 > 20 时,使用 AskUserQuestion 询问用户修改主要在哪个平台进行。用户选择后以 `--platform` 参数重新获取 timeline,缩小后续分析范围。
103
+ 当 `session_summary.by_platform` 包含多个平台且 session 总量 > 20 时,使用 user prompt 询问用户修改主要在哪个平台进行。用户选择后以 `--platform` 参数重新获取 timeline,缩小后续分析范围。
104
104
 
105
105
  ### Session 详情加载策略(Stage 2b)
106
106
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-harvest
3
3
  description: "Extract knowledge from artifacts into wiki/spec/issues Arguments: [<session-id|path>] [--to wiki|spec|issue|auto] [--source <type>] [--recent N] [--dry-run] [-y]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,12 +9,12 @@ Extract knowledge from workflow artifacts → route to wiki/spec/issue stores. W
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/harvest.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/harvest.md
13
13
  </required_reading>
14
14
 
15
15
  <deferred_reading>
16
- - @~/.maestro/workflows/issue.md (issues.jsonl schema for issue routing — read when creating issues in Stage 6c)
17
- - @~/.maestro/workflows/specs-add.md (spec entry format — read when routing to spec in Stage 6b)
16
+ - ~/.pi/agent/packages/pi-maestro-flow/workflows/issue.md (issues.jsonl schema for issue routing — read when creating issues in Stage 6c)
17
+ - ~/.pi/agent/packages/pi-maestro-flow/workflows/specs-add.md (spec entry format — read when routing to spec in Stage 6b)
18
18
  </deferred_reading>
19
19
 
20
20
  <context>
@@ -44,7 +44,7 @@ Additional flags, source registry (scan paths), and storage locations defined in
44
44
  </invariants>
45
45
 
46
46
  <execution>
47
- Follow '~/.maestro/workflows/harvest.md' Stages 1-8 in order.
47
+ Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/harvest.md' Stages 1-8 in order.
48
48
 
49
49
  ### Phase Gates (MANDATORY, BLOCKING)
50
50
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-issue
3
3
  description: "Create, query, update, close, and link issues Arguments: <subcommand: create|list|status|update|close|link> [--title text] [--severity S] [--status S] [--resolution text]"
4
- allowed-tools: Read Write Edit Bash Glob Grep AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,11 +9,11 @@ Issue lifecycle management: create, list, status, update, close, link. Stored in
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/issue.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/issue.md
13
13
  </required_reading>
14
14
 
15
15
  <deferred_reading>
16
- - [issue.json template](~/.maestro/templates/issue.json) — read when creating or updating issue records (create, update, close)
16
+ - [issue.json template](~/.pi/agent/packages/pi-maestro-flow/templates/issue.json) — read when creating or updating issue records (create, update, close)
17
17
  </deferred_reading>
18
18
 
19
19
  <context>
@@ -45,7 +45,7 @@ $ARGUMENTS -- subcommand + options. Parse first token as subcommand.
45
45
 
46
46
  <execution>
47
47
  Parse subcommand from first token of $ARGUMENTS.
48
- Follow '~/.maestro/workflows/issue.md' completely.
48
+ Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/issue.md' completely.
49
49
 
50
50
  ### Phase Gates (MANDATORY, BLOCKING)
51
51
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-issue-discover
3
3
  description: "Discover issues via multi-perspective analysis Arguments: [multi-perspective | by-prompt <prompt>] [-y] [--scope <glob>] [--depth standard|deep]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,19 +9,19 @@ Automated issue discovery: multi-perspective (8 perspectives) or prompt-driven.
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/issue-discover.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/issue-discover.md
13
13
  </required_reading>
14
14
 
15
15
  <deferred_reading>
16
- - [issue.json template](~/.maestro/templates/issue.json) — read when creating issue records from findings (Step 6/11)
17
- - [search-tools](~/.maestro/templates/search-tools.md) — search tool priority, passed to agents via workflow
16
+ - [issue.json template](~/.pi/agent/packages/pi-maestro-flow/templates/issue.json) — read when creating issue records from findings (Step 6/11)
17
+ - [search-tools](~/.pi/agent/packages/pi-maestro-flow/templates/search-tools.md) — search tool priority, passed to agents via workflow
18
18
  </deferred_reading>
19
19
 
20
20
  <context>
21
21
  $ARGUMENTS -- optional. Parse first token to determine mode.
22
22
 
23
23
  **Modes:**
24
- - _(empty)_ -- interactive mode selection (AskUserQuestion)
24
+ - _(empty)_ -- interactive mode selection (user prompt)
25
25
  - `multi-perspective` -- 8-perspective parallel agent scan
26
26
  - `by-prompt "..."` -- prompt-driven iterative agent exploration (CLI-planned)
27
27
 
@@ -52,11 +52,11 @@ $ARGUMENTS -- optional. Parse first token to determine mode.
52
52
 
53
53
  <execution>
54
54
  Determine mode from $ARGUMENTS:
55
- - No arguments or empty → interactive selection via AskUserQuestion
55
+ - No arguments or empty → interactive selection via user prompt
56
56
  - First token is `multi-perspective` → multi-perspective mode
57
57
  - First token is `by-prompt` → prompt-driven mode, remaining tokens are the user prompt
58
58
 
59
- Follow '~/.maestro/workflows/issue-discover.md' completely.
59
+ Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/issue-discover.md' completely.
60
60
 
61
61
  ### Phase Gates (MANDATORY, BLOCKING)
62
62
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-kg-extractors
3
3
  description: "Analyze codebase patterns and generate .workflow/kg/extractors.yaml for custom symbol extraction Arguments: [--scan-only] [--append] [--language <lang>] [--min-count <n>]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -89,7 +89,7 @@ Each agent returns: `[{pattern_type, regex_evidence, file_count, sample_matches:
89
89
 
90
90
  **GATE 2: Generation → Write** (Phase 2 → Phase 3)
91
91
  - REQUIRED: At least 1 pattern meets `--min-count` threshold.
92
- - REQUIRED: User confirmed pattern groups via AskUserQuestion.
92
+ - REQUIRED: User confirmed pattern groups via user prompt.
93
93
  - BLOCKED if `--scan-only` is set — stop after summary.
94
94
 
95
95
  **GATE 3: Write → Validation** (Phase 3 → KG Index)
@@ -108,7 +108,7 @@ For each discovered pattern with ≥3 occurrences:
108
108
  ### Phase 3: Validate & write
109
109
 
110
110
  1. Show discovered patterns summary to user
111
- 2. AskUserQuestion: confirm/edit/skip each pattern group
111
+ 2. user prompt: confirm/edit/skip each pattern group
112
112
  3. Write `.workflow/kg/extractors.yaml`
113
113
  4. Run `maestro kg index` to verify new symbols are extracted
114
114
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-knowhow
3
3
  description: "Manage knowhow entries (workflow and system) Arguments: <subcommand: list|search|view|edit|delete|prune> [query|id] [--store workflow|system|all] [--tag <tag>] [--type compact|tip]"
4
- allowed-tools: Read Write Edit Bash Glob Grep AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,7 +9,7 @@ Manage knowhow across two stores: workflow (`.workflow/knowhow/`) and system mem
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/knowhow.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/knowhow.md
13
13
  </required_reading>
14
14
 
15
15
  <context>
@@ -38,7 +38,7 @@ Dual store architecture (paths, formats, index) defined in workflow knowhow.md.
38
38
  </context>
39
39
 
40
40
  <execution>
41
- Follow '~/.maestro/workflows/knowhow.md' Part A (KnowHow Management) completely.
41
+ Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/knowhow.md' Part A (KnowHow Management) completely.
42
42
 
43
43
  ### Phase Gates (MANDATORY, BLOCKING)
44
44
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-knowhow-capture
3
3
  description: "Capture reusable knowledge as templates, recipes, or tips Arguments: [<type>] [<description>] [--lang <lang>] [--source <url>] [--tag t1,t2]"
4
- allowed-tools: Read Write Edit Bash Glob Grep WebFetch AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep WebFetch maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -10,7 +10,7 @@ Auto-indexed by WikiIndexer (type=knowhow), searchable via `maestro search --typ
10
10
  </purpose>
11
11
 
12
12
  <required_reading>
13
- @~/.maestro/workflows/knowhow.md
13
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/knowhow.md
14
14
  </required_reading>
15
15
 
16
16
  <context>
@@ -50,12 +50,12 @@ $ARGUMENTS — type token + description + optional flags.
50
50
  </invariants>
51
51
 
52
52
  <execution>
53
- Follow '~/.maestro/workflows/knowhow.md' completely.
53
+ Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/knowhow.md' completely.
54
54
 
55
55
  ### Phase Gates (MANDATORY, BLOCKING)
56
56
 
57
57
  **GATE 1: Type Detection → Content Collection** (Type routing → Content extraction)
58
- - REQUIRED: Type detected from first token or selected via AskUserQuestion.
58
+ - REQUIRED: Type detected from first token or selected via user prompt.
59
59
  - REQUIRED: Type maps to a valid prefix (KNW-/TPL-/RCP-/REF-/DCS-/TIP-/AST-/BLP-/DOC-/INS-).
60
60
  - BLOCKED if type unresolvable after interactive prompt.
61
61
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-knowledge-audit
3
3
  description: "Audit and prune knowledge across spec / knowhow / artifact stores Arguments: --scope <spec|knowhow|artifact|all> [--level P0|P1|P2] [--timeline T1..T6] [--since YYYY-MM-DD] [--milestone <name>] [--include-archive] [--interactive] [--mark|--delete|--purge] [--dry-run] [--report]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,12 +9,12 @@ allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/knowledge-audit.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/knowledge-audit.md
13
13
  </required_reading>
14
14
 
15
15
  <deferred_reading>
16
- - @~/.maestro/workflows/harvest.md (audit 检测的 artifact 是 harvest 的产物源)
17
- - @~/.maestro/workflows/specs-add.md (deprecate 操作所需的 `<spec-entry>` 变形)
16
+ - ~/.pi/agent/packages/pi-maestro-flow/workflows/harvest.md (audit 检测的 artifact 是 harvest 的产物源)
17
+ - ~/.pi/agent/packages/pi-maestro-flow/workflows/specs-add.md (deprecate 操作所需的 `<spec-entry>` 变形)
18
18
  </deferred_reading>
19
19
 
20
20
  <context>
@@ -43,7 +43,7 @@ Flag 全集、scope 对应的扫描路径、Stage 步骤、检测算法定义在
43
43
  </invariants>
44
44
 
45
45
  <execution>
46
- Follow `~/.maestro/workflows/knowledge-audit.md` Stages 1-8 in order.
46
+ Follow `~/.pi/agent/packages/pi-maestro-flow/workflows/knowledge-audit.md` Stages 1-8 in order.
47
47
 
48
48
  ### Phase Gates (MANDATORY, BLOCKING)
49
49
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-status
3
3
  description: "Show project dashboard with progress and next steps Arguments: "
4
- allowed-tools: Read Bash Glob Grep
4
+ allowed-tools: Read Bash Glob Grep maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,7 +9,7 @@ Project dashboard: artifact progress, task counts, active work, next-step sugges
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/status.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/status.md
13
13
  </required_reading>
14
14
 
15
15
  <context>
@@ -33,7 +33,7 @@ $ARGUMENTS (no arguments required)
33
33
  </invariants>
34
34
 
35
35
  <execution>
36
- Follow '~/.maestro/workflows/status.md' completely.
36
+ Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/status.md' completely.
37
37
 
38
38
  Next-step decision table defined in workflow status.md Step 5.
39
39
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-wiki
3
3
  description: "Manage wiki graph — health, cleanup, search, stats Arguments: <subcommand: health|search|cleanup|stats|connect|digest> [query] [--fix] [--dry-run]"
4
- allowed-tools: Read Write Edit Bash Glob Grep AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep maestro
5
5
  ---
6
6
 
7
7
  <purpose>
@@ -9,7 +9,7 @@ Wiki graph management: health, search, cleanup, stats, connect, digest.
9
9
  </purpose>
10
10
 
11
11
  <required_reading>
12
- @~/.maestro/workflows/wiki-manage.md
12
+ ~/.pi/agent/packages/pi-maestro-flow/workflows/wiki-manage.md
13
13
  </required_reading>
14
14
 
15
15
  <context>
@@ -51,9 +51,9 @@ $ARGUMENTS — subcommand and optional flags.
51
51
 
52
52
  <execution>
53
53
  **Subcommand routing:**
54
- - `health|search|cleanup|stats` → Follow `~/.maestro/workflows/wiki-manage.md` completely.
55
- - `connect` → Follow `~/.maestro/workflows/wiki-connect.md` completely (Stages 1-6).
56
- - `digest` → Follow `~/.maestro/workflows/wiki-digest.md` completely (Stages 1-8).
54
+ - `health|search|cleanup|stats` → Follow `~/.pi/agent/packages/pi-maestro-flow/workflows/wiki-manage.md` completely.
55
+ - `connect` → Follow `~/.pi/agent/packages/pi-maestro-flow/workflows/wiki-connect.md` completely (Stages 1-6).
56
+ - `digest` → Follow `~/.pi/agent/packages/pi-maestro-flow/workflows/wiki-digest.md` completely (Stages 1-8).
57
57
 
58
58
  ### Phase Gates (MANDATORY, BLOCKING)
59
59
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: odyssey-debug
3
3
  description: "Long-running debug cycle — archaeology, diagnosis, fix, confirmation, generalization, discovery, and knowledge persistence Arguments: <issue> [--template <name>] [--skip-fix] [--skip-generalize] [--auto] [-y] [-c] [--heartbeat]"
4
- allowed-tools: Read Write Edit Bash Glob Grep Agent AskUserQuestion
4
+ allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
5
5
  ---
6
6
 
7
- <base>@~/.maestro/workflows/odyssey-base.md</base>
7
+ <base>~/.pi/agent/packages/pi-maestro-flow/workflows/odyssey-base.md</base>
8
8
 
9
9
  <purpose>
10
10
  archaeology → explore → diagnose → fix & confirm → generalize → discover siblings → persist.
@@ -95,7 +95,7 @@ S_INTAKE → S_ARCHAEOLOGY → S_EXPLORE → S_DIAGNOSE → S_FIX → S_CONFIRM
95
95
  <transitions>
96
96
  S_INTAKE → S_INTAKE : -c + session found → A_RESUME_SESSION
97
97
  S_INTAKE → S_ARCHAEOLOGY : issue parsed → A_INTAKE
98
- S_INTAKE → S_INTAKE : no issue, no session → AskUserQuestion
98
+ S_INTAKE → S_INTAKE : no issue, no session → user prompt
99
99
 
100
100
  S_ARCHAEOLOGY → S_EXPLORE : complete
101
101
  S_EXPLORE → S_DIAGNOSE : complete
@@ -156,16 +156,16 @@ Write `explore.json` + evidence phase=explore. Update §3. Mark G2. Commit: `"od
156
156
  ### A_DIAGNOSE
157
157
  1. Hypotheses from evidence, ranked [HIGH]/[MEDIUM]/[LOW] → §4
158
158
  2. Test each → evidence phase=diagnosis
159
- 3. Ambiguity → evidence phase=decision; Normal: AskUserQuestion | `-y`: defer
159
+ 3. Ambiguity → evidence phase=decision; Normal: user prompt | `-y`: defer
160
160
  4. Confirmed → `session.json.root_cause` + §5. Mark G1.
161
161
 
162
162
  Commit: `"odyssey-debug({slug}): DIAGNOSE — root cause confirmed"`
163
163
 
164
164
  ### A_ESCALATE_DIAGNOSIS
165
- `diagnosis_retries++`. < 3: `maestro delegate --role analyze`, new hypotheses, → S_DIAGNOSE. >= 3: Normal → AskUserQuestion | `-y` → INCONCLUSIVE → S_RECORD.
165
+ `diagnosis_retries++`. < 3: `maestro delegate --role analyze`, new hypotheses, → S_DIAGNOSE. >= 3: Normal → user prompt | `-y` → INCONCLUSIVE → S_RECORD.
166
166
 
167
167
  ### A_FIX
168
- 1. Present root cause + proposed fix. Normal: AskUserQuestion | `-y`: auto proceed
168
+ 1. Present root cause + proposed fix. Normal: user prompt | `-y`: auto proceed
169
169
  2. Implement fix, evidence phase=decision
170
170
 
171
171
  Commit: `"odyssey-debug({slug}): FIX — {summary}"`
@@ -238,7 +238,7 @@ Commit: `"odyssey-debug({slug}): GENERALIZE — pattern scan complete"`
238
238
  | risk + complex | Create issue |
239
239
  | safe | Skip with logged per-item reason |
240
240
 
241
- Normal: AskUserQuestion per hit | `-y`: auto-fix bugs with fix_template, create issue for rest
241
+ Normal: user prompt per hit | `-y`: auto-fix bugs with fix_template, create issue for rest
242
242
 
243
243
  3. **Cross-phase loops:** `cross_phase_loops++` on fix/diagnose return. `loops >= max_loops` → must log per-item reasons.
244
244
 
@@ -254,12 +254,12 @@ Commit: `"odyssey-debug({slug}): DISCOVER — sibling triage complete"`
254
254
  - Architecture boundary violation → `/spec-add arch`
255
255
  - Reusable generalization pattern → `/spec-add coding`
256
256
 
257
- 2. Mark G6 done. Pending decisions: Normal → AskUserQuestion | `-y` → skip (show deferred count).
257
+ 2. Mark G6 done. Pending decisions: Normal → user prompt | `-y` → skip (show deferred count).
258
258
 
259
259
  3. **Goal audit (hardened):**
260
260
  - `done` → confirmed
261
261
  - `skipped` → confirmed ONLY if corresponding `skip_when` flag is true
262
- - **Hard rule:** G4 and G5 CANNOT be `skipped` unless `skip_generalize == true`. Pending without flag → `failed` (Normal: AskUserQuestion | `-y`: record `failed`)
262
+ - **Hard rule:** G4 and G5 CANNOT be `skipped` unless `skip_generalize == true`. Pending without flag → `failed` (Normal: user prompt | `-y`: record `failed`)
263
263
  - `phase_goals_all_done = true` only when all goals pass this audit
264
264
 
265
265
  4. `current_state = "COMPLETED"`, emit completion summary.
@@ -290,10 +290,10 @@ Commit: `"odyssey-debug({slug}): RECORD — summary and knowledge persistence"`
290
290
 
291
291
  | Decision Point | Normal | `-y` |
292
292
  |---------------|--------|------|
293
- | A_DIAGNOSE ambiguity | AskUserQuestion | deferred |
294
- | A_ESCALATE 3-strike | AskUserQuestion | INCONCLUSIVE |
295
- | A_FIX direction | AskUserQuestion | auto proceed |
296
- | A_DISCOVER hit routing | AskUserQuestion | auto-fix bugs with template, create issue for rest |
293
+ | A_DIAGNOSE ambiguity | user prompt | deferred |
294
+ | A_ESCALATE 3-strike | user prompt | INCONCLUSIVE |
295
+ | A_FIX direction | user prompt | auto proceed |
296
+ | A_DISCOVER hit routing | user prompt | auto-fix bugs with template, create issue for rest |
297
297
 
298
298
  ### Goal Prompt convergence rules
299
299