pi-maestro-flow 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +124 -0
  2. package/agents/aggregator.md +27 -0
  3. package/agents/cli-explore-agent.md +188 -0
  4. package/agents/cross-role-reviewer.md +171 -0
  5. package/agents/delegate.md +19 -0
  6. package/agents/explorer.md +23 -0
  7. package/agents/impeccable-agent.md +99 -0
  8. package/agents/ralph-executor.md +81 -0
  9. package/agents/reference.md +24 -0
  10. package/agents/role-design-author.md +220 -0
  11. package/agents/team-supervisor.md +143 -0
  12. package/agents/team-worker.md +237 -0
  13. package/agents/ui-design-agent.md +270 -0
  14. package/agents/workflow-analyzer.md +116 -0
  15. package/agents/workflow-codebase-mapper.md +77 -0
  16. package/agents/workflow-collab-planner.md +147 -0
  17. package/agents/workflow-debugger.md +104 -0
  18. package/agents/workflow-executor.md +133 -0
  19. package/agents/workflow-external-researcher.md +86 -0
  20. package/agents/workflow-integration-checker.md +83 -0
  21. package/agents/workflow-nyquist-auditor.md +85 -0
  22. package/agents/workflow-phase-researcher.md +85 -0
  23. package/agents/workflow-plan-checker.md +100 -0
  24. package/agents/workflow-planner.md +200 -0
  25. package/agents/workflow-project-researcher.md +74 -0
  26. package/agents/workflow-research-synthesizer.md +70 -0
  27. package/agents/workflow-reviewer.md +82 -0
  28. package/agents/workflow-roadmapper.md +81 -0
  29. package/agents/workflow-verifier.md +120 -0
  30. package/package.json +58 -0
  31. package/skills/codify-to-knowhow/SKILL.md +167 -0
  32. package/skills/delegation-check/SKILL.md +297 -0
  33. package/skills/domain-add/SKILL.md +75 -0
  34. package/skills/insight-challenge/SKILL.md +226 -0
  35. package/skills/learn-decompose/SKILL.md +124 -0
  36. package/skills/learn-follow/SKILL.md +163 -0
  37. package/skills/learn-investigate/SKILL.md +160 -0
  38. package/skills/learn-second-opinion/SKILL.md +128 -0
  39. package/skills/maestro/SKILL.md +239 -0
  40. package/skills/maestro-amend/SKILL.md +169 -0
  41. package/skills/maestro-analyze/SKILL.md +173 -0
  42. package/skills/maestro-blueprint/SKILL.md +159 -0
  43. package/skills/maestro-brainstorm/SKILL.md +193 -0
  44. package/skills/maestro-collab/SKILL.md +181 -0
  45. package/skills/maestro-companion/SKILL.md +536 -0
  46. package/skills/maestro-composer/SKILL.md +192 -0
  47. package/skills/maestro-execute/SKILL.md +193 -0
  48. package/skills/maestro-fork/SKILL.md +104 -0
  49. package/skills/maestro-grill/SKILL.md +151 -0
  50. package/skills/maestro-guard/SKILL.md +124 -0
  51. package/skills/maestro-help/SKILL.md +328 -0
  52. package/skills/maestro-impeccable/SKILL.md +302 -0
  53. package/skills/maestro-init/SKILL.md +151 -0
  54. package/skills/maestro-merge/SKILL.md +90 -0
  55. package/skills/maestro-milestone-audit/SKILL.md +117 -0
  56. package/skills/maestro-milestone-complete/SKILL.md +133 -0
  57. package/skills/maestro-milestone-release/SKILL.md +131 -0
  58. package/skills/maestro-next/SKILL.md +269 -0
  59. package/skills/maestro-overlay/SKILL.md +203 -0
  60. package/skills/maestro-plan/SKILL.md +194 -0
  61. package/skills/maestro-player/SKILL.md +184 -0
  62. package/skills/maestro-quick/SKILL.md +117 -0
  63. package/skills/maestro-ralph/SKILL.md +905 -0
  64. package/skills/maestro-ralph-cli/SKILL.md +976 -0
  65. package/skills/maestro-ralph-cli-execute/SKILL.md +229 -0
  66. package/skills/maestro-ralph-execute/SKILL.md +409 -0
  67. package/skills/maestro-ralph-v2/SKILL.md +1198 -0
  68. package/skills/maestro-roadmap/SKILL.md +157 -0
  69. package/skills/maestro-swarm-workflow/SKILL.md +272 -0
  70. package/skills/maestro-tools-execute/SKILL.md +143 -0
  71. package/skills/maestro-tools-register/SKILL.md +192 -0
  72. package/skills/maestro-ui-codify/SKILL.md +127 -0
  73. package/skills/maestro-universal-workflow/SKILL.md +622 -0
  74. package/skills/maestro-update/SKILL.md +156 -0
  75. package/skills/manage-codebase-rebuild/SKILL.md +111 -0
  76. package/skills/manage-drift-realign/SKILL.md +159 -0
  77. package/skills/manage-harvest/SKILL.md +121 -0
  78. package/skills/manage-issue/SKILL.md +88 -0
  79. package/skills/manage-issue-discover/SKILL.md +104 -0
  80. package/skills/manage-kg-extractors/SKILL.md +147 -0
  81. package/skills/manage-knowhow/SKILL.md +102 -0
  82. package/skills/manage-knowhow-capture/SKILL.md +109 -0
  83. package/skills/manage-knowledge-audit/SKILL.md +147 -0
  84. package/skills/manage-status/SKILL.md +80 -0
  85. package/skills/manage-wiki/SKILL.md +104 -0
  86. package/skills/odyssey-debug/SKILL.md +344 -0
  87. package/skills/odyssey-improve/SKILL.md +423 -0
  88. package/skills/odyssey-planex/SKILL.md +542 -0
  89. package/skills/odyssey-review-test-fix/SKILL.md +392 -0
  90. package/skills/odyssey-ui/SKILL.md +388 -0
  91. package/skills/prompt-generator/SKILL.md +470 -0
  92. package/skills/quality-auto-test/SKILL.md +168 -0
  93. package/skills/quality-debug/SKILL.md +176 -0
  94. package/skills/quality-refactor/SKILL.md +108 -0
  95. package/skills/quality-retrospective/SKILL.md +134 -0
  96. package/skills/quality-review/SKILL.md +169 -0
  97. package/skills/quality-sync/SKILL.md +90 -0
  98. package/skills/quality-test/SKILL.md +183 -0
  99. package/skills/scholar-anti-ai-writing/SKILL.md +173 -0
  100. package/skills/scholar-anti-ai-writing/references/patterns-chinese.md +242 -0
  101. package/skills/scholar-anti-ai-writing/references/patterns-english.md +242 -0
  102. package/skills/scholar-citation-verify/SKILL.md +166 -0
  103. package/skills/scholar-citation-verify/references/api-usage.md +372 -0
  104. package/skills/scholar-citation-verify/references/common-errors.md +384 -0
  105. package/skills/scholar-citation-verify/references/verification-rules.md +399 -0
  106. package/skills/scholar-experiment/SKILL.md +321 -0
  107. package/skills/scholar-ideation/SKILL.md +288 -0
  108. package/skills/scholar-latex-organizer/SKILL.md +186 -0
  109. package/skills/scholar-publish/SKILL.md +220 -0
  110. package/skills/scholar-rebuttal-pro/README.md +313 -0
  111. package/skills/scholar-rebuttal-pro/SKILL.md +511 -0
  112. package/skills/scholar-review/SKILL.md +227 -0
  113. package/skills/scholar-thesis-docx/README.md +111 -0
  114. package/skills/scholar-thesis-docx/README_EN.md +108 -0
  115. package/skills/scholar-thesis-docx/SKILL.md +212 -0
  116. package/skills/scholar-thesis-docx/references/failure-patterns-and-quality-gates.md +178 -0
  117. package/skills/scholar-thesis-docx/references/figure-and-code-rules.md +33 -0
  118. package/skills/scholar-thesis-docx/references/paper-format-workflow.md +68 -0
  119. package/skills/scholar-thesis-docx/references/script-usage.md +157 -0
  120. package/skills/scholar-thesis-docx/scripts/audit_docx_ooxml.py +429 -0
  121. package/skills/scholar-thesis-docx/scripts/check_word_com.ps1 +50 -0
  122. package/skills/scholar-thesis-docx/scripts/export_word_pdf.ps1 +62 -0
  123. package/skills/scholar-thesis-docx/scripts/normalize_word_styles.ps1 +498 -0
  124. package/skills/scholar-thesis-docx/scripts/render_mermaid_figure.ps1 +148 -0
  125. package/skills/scholar-writing/SKILL.md +296 -0
  126. package/skills/security-audit/SKILL.md +244 -0
  127. package/skills/skill-generator/SKILL.md +472 -0
  128. package/skills/skill-iter-tune/SKILL.md +382 -0
  129. package/skills/skill-simplify/SKILL.md +63 -0
  130. package/skills/skill-tuning/SKILL.md +174 -0
  131. package/skills/spec-add/SKILL.md +105 -0
  132. package/skills/spec-load/SKILL.md +98 -0
  133. package/skills/spec-remove/SKILL.md +74 -0
  134. package/skills/spec-setup/SKILL.md +75 -0
  135. package/skills/team-adversarial-swarm/SKILL.md +233 -0
  136. package/skills/team-adversarial-swarm/scripts/__pycache__/pheromone.cpython-313.pyc +0 -0
  137. package/skills/team-adversarial-swarm/scripts/__pycache__/scoring.cpython-313.pyc +0 -0
  138. package/skills/team-adversarial-swarm/scripts/aco.py +473 -0
  139. package/skills/team-adversarial-swarm/scripts/pheromone.py +144 -0
  140. package/skills/team-adversarial-swarm/scripts/scoring.py +92 -0
  141. package/skills/team-adversarial-swarm/scripts/test_aco.py +475 -0
  142. package/skills/team-arch-opt/SKILL.md +158 -0
  143. package/skills/team-brainstorm/SKILL.md +171 -0
  144. package/skills/team-coordinate/SKILL.md +266 -0
  145. package/skills/team-designer/SKILL.md +160 -0
  146. package/skills/team-executor/SKILL.md +189 -0
  147. package/skills/team-frontend/SKILL.md +136 -0
  148. package/skills/team-frontend-debug/SKILL.md +198 -0
  149. package/skills/team-interactive-craft/SKILL.md +141 -0
  150. package/skills/team-issue/SKILL.md +171 -0
  151. package/skills/team-lifecycle-v4/SKILL.md +209 -0
  152. package/skills/team-motion-design/SKILL.md +142 -0
  153. package/skills/team-perf-opt/SKILL.md +175 -0
  154. package/skills/team-planex/SKILL.md +137 -0
  155. package/skills/team-quality-assurance/SKILL.md +147 -0
  156. package/skills/team-review/SKILL.md +147 -0
  157. package/skills/team-roadmap-dev/SKILL.md +169 -0
  158. package/skills/team-swarm/SKILL.md +178 -0
  159. package/skills/team-swarm/scripts/aco.py +473 -0
  160. package/skills/team-swarm/scripts/pheromone.py +144 -0
  161. package/skills/team-swarm/scripts/scoring.py +92 -0
  162. package/skills/team-swarm/scripts/test_aco.py +475 -0
  163. package/skills/team-tech-debt/SKILL.md +128 -0
  164. package/skills/team-testing/SKILL.md +143 -0
  165. package/skills/team-ui-polish/SKILL.md +141 -0
  166. package/skills/team-uidesign/SKILL.md +144 -0
  167. package/skills/team-ultra-analyze/SKILL.md +173 -0
  168. package/skills/team-ux-improve/SKILL.md +151 -0
  169. package/skills/team-visual-a11y/SKILL.md +156 -0
  170. package/skills/workflow-skill-designer/SKILL.md +496 -0
  171. package/src/extension/index.ts +222 -0
  172. package/src/extension/schemas.ts +131 -0
  173. package/src/providers/cli-tools-loader.ts +74 -0
  174. package/src/providers/provider-registry.ts +130 -0
  175. package/src/tools/delegate.ts +85 -0
  176. package/src/tools/explore.ts +134 -0
  177. package/src/tools/moa.ts +213 -0
  178. package/src/tools/status.ts +99 -0
  179. package/src/tools/wait.ts +166 -0
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: maestro-guard
3
+ description: "Manage editing boundary restrictions Arguments: <on|off|status|allow <path>|deny <path>>"
4
+ allowed-tools: Read Write Bash Glob
5
+ ---
6
+
7
+ <purpose>
8
+ Configure directory-level write boundaries enforced by the workflow-guard PreToolUse hook.
9
+ Subcommands: on, off, status, allow `<path>`, deny `<path>`.
10
+ </purpose>
11
+
12
+ <context>
13
+ $ARGUMENTS — Parse subcommand and optional path argument.
14
+
15
+ **Config location:** `.workflow/config.json` → `guard` section
16
+
17
+ ```json
18
+ {
19
+ "guard": {
20
+ "enabled": false,
21
+ "mode": "allow",
22
+ "paths": []
23
+ }
24
+ }
25
+ ```
26
+
27
+ **Enforcement:** The `workflow-guard` hook (PreToolUse on Write/Edit) reads this config
28
+ and blocks operations targeting files outside boundaries. Requires hooks level >= `full`.
29
+
30
+ **Output boundary**: ALL file writes MUST target `.workflow/config.json` (guard section) only. NEVER modify hook files, `.claude/settings.json`, or source code.
31
+ </context>
32
+
33
+ <invariants>
34
+ 1. **Config-only mutation** — guard MUST only modify the `guard` section of `.workflow/config.json`; NEVER touch other config sections or files
35
+ 2. **Non-destructive** — `off` MUST preserve existing paths and mode; NEVER clear the path list when disabling
36
+ 3. **Mode switch confirmation** — switching between allow/deny mode MUST require AskUserQuestion confirmation when existing paths will be cleared
37
+ 4. **Hook dependency** — guard MUST warn when enabled but `workflow-guard` hook is not active (hooks level < full)
38
+ 5. **Path normalization** — all paths MUST use forward slashes with trailing slash for directories; NEVER store raw backslash paths
39
+ </invariants>
40
+
41
+ <execution>
42
+
43
+ ### Phase Gates (MANDATORY, BLOCKING)
44
+
45
+ **GATE 1: Parse → Config Read**
46
+ - REQUIRED: Subcommand parsed (on/off/status/allow/deny) or defaulted to `status`.
47
+ - BLOCKED if: invalid subcommand provided.
48
+
49
+ **GATE 2: Config Read → Execute**
50
+ - REQUIRED: `.workflow/config.json` read successfully or initialized with empty guard section.
51
+ - BLOCKED if: file unreadable and cannot be created (E001).
52
+
53
+ **GATE 3: Execute → Confirm**
54
+ - REQUIRED: Config mutation applied (for on/off/allow/deny) or status displayed (for status).
55
+ - REQUIRED: Mode-switch AskUserQuestion answered (for allow↔deny transitions with existing paths).
56
+ - BLOCKED if: user declines mode switch.
57
+
58
+ **Step 1: Parse subcommand**
59
+
60
+ Extract from $ARGUMENTS:
61
+ - `on` / `off` / `status` / `allow <path>` / `deny <path>`
62
+ - If no subcommand, default to `status`
63
+
64
+ **Step 2: Read config**
65
+
66
+ Read `.workflow/config.json`. If file missing, initialize with empty guard section.
67
+
68
+ **Step 3: Execute subcommand**
69
+
70
+ **`status`:**
71
+ - Display: enabled/disabled, mode (allow/deny), paths list
72
+ - Check if workflow-guard hook is active (read `.claude/settings.json` for hook presence)
73
+ - If guard enabled but hook not active, warn: "⚠ PathGuard enabled but workflow-guard hook not installed. Run `maestro hooks level full` to activate."
74
+
75
+ **`on`:**
76
+ - Set `guard.enabled = true`
77
+ - If `guard.paths` is empty, set default: `["src/", "tests/", ".workflow/"]`
78
+ - Check hook level, warn if < full
79
+ - Write config
80
+
81
+ **`off`:**
82
+ - Set `guard.enabled = false`
83
+ - Preserve existing paths and mode
84
+ - Write config
85
+
86
+ **`allow <path>`:**
87
+ - Normalize path to forward slashes, ensure trailing slash for directories
88
+ - If `guard.mode` is `deny`, AskUserQuestion: "Switching from deny to allow mode will clear existing paths ({N} paths). Continue?" — abort if user declines.
89
+ - Add path to `guard.paths` (deduplicate)
90
+ - Set `guard.enabled = true` if not already
91
+ - Write config
92
+
93
+ **`deny <path>`:**
94
+ - Normalize path to forward slashes, ensure trailing slash for directories
95
+ - If `guard.mode` is `allow`, AskUserQuestion: "Switching from allow to deny mode will clear existing paths ({N} paths). Continue?" — abort if user declines.
96
+ - Set `guard.mode = "deny"`
97
+ - Add path to `guard.paths` (deduplicate)
98
+ - Set `guard.enabled = true` if not already (symmetric with `allow`: adding a deny path auto-enables the guard)
99
+ - Write config
100
+
101
+ **Step 4: Confirm**
102
+
103
+ Display updated guard configuration.
104
+
105
+ </execution>
106
+
107
+ <error_codes>
108
+ - E001: `.workflow/config.json` not found and cannot be created (not a maestro project)
109
+ - W001: PathGuard enabled but workflow-guard hook not installed
110
+ </error_codes>
111
+
112
+ <success_criteria>
113
+ - [ ] Config read/written correctly
114
+ - [ ] Hook level warning displayed when applicable
115
+ - [ ] Updated configuration shown after changes
116
+ </success_criteria>
117
+
118
+ <completion>
119
+ ### Next-step routing
120
+ | Condition | Suggestion |
121
+ |-----------|-----------|
122
+ | Guard enabled, hook not installed | `maestro hooks level full` |
123
+ | Want to verify guard works | Edit a file outside allowed paths |
124
+ </completion>
@@ -0,0 +1,328 @@
1
+ ---
2
+ name: maestro-help
3
+ description: "Maestro Flow 命令帮助系统。搜索命令、浏览技能、工作流推荐、新手引导。Triggers on \"maestro-help\", \"帮助\", \"命令\", \"怎么用\", \"skill\", \"workflow\", \"maestro 怎么用\"."
4
+ allowed-tools: Read Grep Glob AskUserQuestion
5
+ ---
6
+
7
+ # Maestro Help
8
+
9
+ Maestro Flow 命令帮助系统,提供命令搜索、技能浏览、工作流推荐、新手引导功能。
10
+
11
+ ## Trigger Conditions
12
+
13
+ - 关键词: "maestro-help", "帮助", "命令", "怎么用", "maestro 怎么用", "工作流", "skill", "workflow", "有哪些命令", "用什么命令"
14
+ - 场景: 询问命令用法、搜索命令、请求下一步建议、选择工作流、浏览 Skill/Agent 目录
15
+ - 斜杠: `/maestro-help`, `/maestro-help search <keyword>`, `/maestro-help skills`, `/maestro-help guide`
16
+
17
+ ## Architecture Overview
18
+
19
+ ```
20
+ ┌──────────────────────────────────────────────────────────────────┐
21
+ │ Maestro Help (SKILL.md) — Orchestrator │
22
+ │ → Parse intent → Route to mode → Execute phase → Present │
23
+ └────────────────────────┬─────────────────────────────────────────┘
24
+
25
+ ┌────────────────────┼────────────────────────┐
26
+ ↓ ↓ ↓
27
+ ┌──────────┐ ┌──────────────┐ ┌──────────┐
28
+ │ Phase 1 │ │ Phase 2 │ │ Phase 3 │
29
+ │ Parse │─────→│ Search & │────────→│ Workflow │
30
+ │ Intent │ │ Present │ │ Guide │
31
+ └──────────┘ └──────────────┘ └──────────┘
32
+ ↑ ↗ │
33
+ └──────┘ ↓
34
+ (refine search) present guide
35
+ ```
36
+
37
+ ## Key Design Principles
38
+
39
+ 1. **Catalog 驱动**: 所有查询基于 `index/catalog.json`,不做硬编码
40
+ 2. **Guide 深度链接**: 命令详情链接到 `guide/` 目录中的参考文档
41
+ 3. **上下文感知**: 根据项目状态(.workflow/ 是否存在、当前 Phase)调整推荐
42
+ 4. **中英双语**: 命令名英文,说明和示例中文
43
+
44
+ ## Data Source
45
+
46
+ Single source of truth: **[index/catalog.json](index/catalog.json)**
47
+
48
+ | Field | Purpose |
49
+ |-------|---------|
50
+ | `commands[]` | 64 个 slash 命令,含分类和描述 |
51
+ | `skills[]` | 44 个 Skill,含分类和描述 |
52
+ | `agents[]` | 24 个 Agent,含分类和描述 |
53
+ | `cli_commands[]` | 21 个终端命令 |
54
+ | `guide_files[]` | 17 个 Guide 文档索引(planned,尚未创建) |
55
+ | `essential_commands[]` | 10 个核心命令(新手用) |
56
+ | `workflows` | 主干管线、快速渠道、Issue 闭环、初始化路径 |
57
+
58
+ ## Operation Modes
59
+
60
+ ### Mode 1: Command Search
61
+
62
+ **Triggers**: "搜索命令", "find command", "search", 命令名关键词
63
+
64
+ **Process**:
65
+ 1. Read `Ref: phases/01-parse-intent.md` — 解析搜索意图
66
+ 2. Query `catalog.json` commands[] + cli_commands[]
67
+ 3. Filter by name, description, category
68
+ 4. Present top 5 相关结果,含命令名、描述、分类
69
+
70
+ ### Mode 2: Command Documentation
71
+
72
+ **Triggers**: "怎么用", "how to use", "详情", 具体命令名
73
+
74
+ **Process**:
75
+ 1. Locate command in `catalog.json`
76
+ 2. Read source file via `source` path(从 catalog 相对路径)
77
+ 3. 若有对应 guide 文档,读取并提取相关段落
78
+ 4. 提供上下文相关的用法示例
79
+
80
+ ### Mode 3: Smart Recommendations
81
+
82
+ **Triggers**: "下一步", "what's next", "推荐", "继续"
83
+
84
+ **Process**:
85
+ 1. 检测当前项目状态(.workflow/state.json)
86
+ 2. 根据 workflows 配置推荐后续命令
87
+ 3. Explain WHY 每个推荐适合当前状态
88
+
89
+ ### Mode 4: Workflow Guide
90
+
91
+ **Triggers**: "工作流", "workflow", "怎么开始", "用什么流程"
92
+
93
+ **Process**:
94
+ 1. Read `Ref: phases/03-workflow-guide.md`
95
+ 2. 分析用户任务类型和复杂度
96
+ 3. 推荐匹配的工作流(主干管线/快速渠道/Issue 闭环)
97
+ 4. 给出具体命令序列
98
+
99
+ ### Mode 5: Beginner Onboarding
100
+
101
+ **Triggers**: "新手", "getting started", "常用命令", "入门"
102
+
103
+ **Process**:
104
+ 1. Query `catalog.json` essential_commands[]
105
+ 2. 逐个展示核心命令的简要说明
106
+ 3. 引导用户完成首次项目初始化
107
+
108
+ ### Mode 6: Skill & Agent Browsing
109
+
110
+ **Triggers**: "skill", "agent", "技能", "有哪些 skill", "团队"
111
+
112
+ **Process**:
113
+ 1. Read `Ref: phases/02-search-present.md`
114
+ 2. Query `catalog.json` skills[] 或 agents[]
115
+ 3. Filter by category
116
+ 4. 呈现分类列表,含描述
117
+
118
+ ### Mode 7: CLI Command Reference
119
+
120
+ **Triggers**: "终端命令", "CLI", "maestro 命令", "terminal"
121
+
122
+ **Process**:
123
+ 1. Query `catalog.json` cli_commands[]
124
+ 2. 按分类分组呈现
125
+ 3. 含别名和常用选项
126
+
127
+ ## Execution Flow
128
+
129
+ ```
130
+ Input: $ARGUMENTS (free text)
131
+
132
+ Phase 1: Parse Intent
133
+ └─ Ref: phases/01-parse-intent.md
134
+ ├─ 分析关键词确定 operation mode
135
+ ├─ 提取搜索词 / 命令名 / 分类过滤
136
+ └─ Output: { mode, query, category?, context? }
137
+
138
+ Phase 2: Search & Present (Mode 1/2/3/6/7)
139
+ └─ Ref: phases/02-search-present.md
140
+ ├─ 查询 catalog.json
141
+ ├─ 按模式过滤和排序
142
+ ├─ 读取 source 文件(Mode 2)
143
+ └─ Output: 格式化结果
144
+
145
+ Phase 3: Workflow Guide (Mode 4/5)
146
+ └─ Ref: phases/03-workflow-guide.md
147
+ ├─ 检测项目状态
148
+ ├─ 匹配工作流模板
149
+ ├─ 生成推荐命令序列
150
+ └─ Output: 引导信息
151
+ ```
152
+
153
+ **Phase Reference Documents** (read on-demand):
154
+
155
+ | Phase | Document | Purpose |
156
+ |-------|----------|---------|
157
+ | 1 | [phases/01-parse-intent.md](phases/01-parse-intent.md) | 意图解析和模式路由 |
158
+ | 2 | [phases/02-search-present.md](phases/02-search-present.md) | 搜索和呈现 |
159
+ | 3 | [phases/03-workflow-guide.md](phases/03-workflow-guide.md) | 工作流推荐和引导 |
160
+
161
+ ## Input Processing
162
+
163
+ ```
164
+ $ARGUMENTS → Parse:
165
+ ├─ "search <keyword>" → Mode 1: Command Search
166
+ ├─ 命令名 (如 "analyze") → Mode 2: Documentation
167
+ ├─ "下一步" / "next" → Mode 3: Smart Recommendations
168
+ ├─ "工作流" / "workflow" → Mode 4: Workflow Guide
169
+ ├─ "新手" / "入门" → Mode 5: Beginner Onboarding
170
+ ├─ "skill" / "agent" → Mode 6: Skill & Agent Browsing
171
+ ├─ "CLI" / "终端" → Mode 7: CLI Reference
172
+ ├─ 空参数 → Mode 5: Beginner Onboarding
173
+ └─ 其他自由文本 → Mode 1: Command Search (fuzzy)
174
+ ```
175
+
176
+ ## Command Catalog Quick Reference
177
+
178
+ ### 上游起源 + 核心 (core)
179
+
180
+ | 命令 | 用途 |
181
+ |------|------|
182
+ | `/maestro` | 智能协调器,自动路由 |
183
+ | `/maestro-init` | 项目初始化 |
184
+ | `/maestro-brainstorm` | 头脑风暴 — 发散探索,多角色创意 |
185
+ | `/maestro-blueprint` | 正式规格文档化 — 7-phase 收敛规格链 |
186
+ | `/maestro-roadmap` | 路线图编排 — 消费上游 context,纯 Milestone > Phase 分解 |
187
+ | `/maestro-quick` | 快速任务 |
188
+ | `/maestro-overlay` | Overlay 管理 |
189
+ | `/maestro-amend` | 修正补丁 |
190
+ | `/maestro-grill` | 压力测试 — 对计划或需求进行代码库现实性压力测试 |
191
+ | `/maestro-next` | 智能导航 — 检测状态并推荐下一步最优命令 |
192
+ | `/maestro-companion` | 知识伴侣 — 上下文加载、洞察捕获、技能路由 |
193
+ | `/maestro-swarm-workflow` | Swarm 并行加速器 — 多 agent 并发执行 |
194
+ | `/maestro-universal-workflow` | 动态对抗工作流生成器 |
195
+
196
+ ### 理解层 + 执行管线 (pipeline)
197
+
198
+ | 命令 | 用途 |
199
+ |------|------|
200
+ | `/maestro-analyze` | 双层分析 — 宏观(文本参数)探索影响面 / 微观(数字参数)Phase 级深入 |
201
+ | `/maestro-plan` | 任务规划 — 支持 `--from analyze:ANL-xxx` 直达 |
202
+ | `/maestro-execute` | 任务执行 |
203
+
204
+ ### 质量管线 (quality)
205
+
206
+ | 命令 | 用途 |
207
+ |------|------|
208
+ | `/quality-review` | 代码审查 |
209
+ | `/quality-auto-test` | 自动测试 |
210
+ | `/quality-test` | 业务测试 |
211
+ | `/quality-debug` | 质量调试 |
212
+ | `/quality-refactor` | 重构 |
213
+ | `/quality-retrospective` | 复盘 |
214
+
215
+ ### 管理命令 (manage)
216
+
217
+ | 命令 | 用途 |
218
+ |------|------|
219
+ | `/manage-issue` | Issue 管理 |
220
+ | `/manage-issue-discover` | Issue 发现 |
221
+ | `/manage-knowhow` | 知识管理 |
222
+ | `/manage-knowhow-capture` | 知识捕获 |
223
+ | `/manage-status` | 状态查看 |
224
+ | `/manage-wiki` | Wiki 管理 |
225
+ | `/manage-harvest` | 收获 |
226
+ | `/manage-codebase-rebuild` | 代码库重建 |
227
+ | `/manage-kg-extractors` | 知识图谱提取器管理 |
228
+ | `/manage-knowledge-audit` | 知识审计 |
229
+
230
+ ### Odyssey 长周期循环 (odyssey)
231
+
232
+ | 命令 | 用途 |
233
+ |------|------|
234
+ | `/odyssey-debug` | 长周期调试 — 考古、诊断、修复、泛化 |
235
+ | `/odyssey-improve` | 长周期代码改进 — 多维审计、深度诊断、定向修复 |
236
+ | `/odyssey-review-test-fix` | 深度审查修复循环 |
237
+ | `/odyssey-planex` | 需求驱动迭代 — 计划/执行/验证/修复循环 |
238
+ | `/odyssey-ui` | 长周期 UI 优化 — 视觉调研、多维审计、修复 |
239
+
240
+ ## Workflow Mapping
241
+
242
+ ### 层级模型
243
+
244
+ ```
245
+ Roadmap > Milestone > Phase > Task
246
+ ```
247
+
248
+ - **Roadmap** = 项目级常驻规划文档
249
+ - **Milestone** = 可独立交付的版本节点(v0.1.0-rc1, v0.2.0)
250
+ - **Phase** = Milestone 内的同步屏障执行阶段
251
+ - **Task** = Phase 内的具体代码修改单元(wave DAG 管理并行)
252
+
253
+ ### 命令拓扑
254
+
255
+ ```
256
+ 上游起源层(并列,可选)
257
+ brainstorm(发散/轻量) | blueprint(收敛/重型) | grill(压力测试)
258
+
259
+ 理解层
260
+ analyze 双层: 宏观(文本参数) → scope_verdict | 微观(数字参数) → Phase 级决策
261
+
262
+ 编排层(可选)
263
+ roadmap — 消费上游 context,纯 Milestone > Phase 分解
264
+
265
+ 执行层
266
+ plan → execute
267
+
268
+ Odyssey 长周期循环(独立路径)
269
+ odyssey-debug / odyssey-improve / odyssey-review-test-fix / odyssey-planex / odyssey-ui
270
+
271
+ 自适应引擎(高级)
272
+ ralph → 自运行决策循环
273
+ swarm-workflow / universal-workflow → 多 agent 并行执行
274
+ ```
275
+
276
+ ### 合法路径
277
+
278
+ | 路径 | 场景 | 命令序列 |
279
+ |------|------|---------|
280
+ | Path A | 完整新项目 | `brainstorm` → `blueprint`(可选) → `analyze "topic"` → `roadmap` → `analyze 1` → `plan 1` → `execute` |
281
+ | Path B | 旧项目大功能 | `analyze "feature X"` → `roadmap` → `analyze 1` → `plan 1` → `execute` |
282
+ | Path C | 中等功能 | `analyze "feature X"` → `plan --from analyze:ANL-xxx` → `execute` |
283
+ | Path D | 小改动 | `plan "fix auth bug"` → `execute` |
284
+ | Path E | 纯规格文档 | `blueprint "project idea"` → (供人阅读) |
285
+ | Path F | 纯探索 | `brainstorm "idea"` → (供人决策) |
286
+ | 快速修复 | 已知简单问题 | `/maestro-quick "修复描述"` |
287
+ | Bug 追踪 | Issue 闭环 | `/manage-issue-discover` → `/manage-issue create` → analyze/plan/execute → close |
288
+ | 全自动 | /maestro 入口 | `/maestro -y "任务描述"` |
289
+ | 代码审查 | 质量管线 | `/quality-review` → `/quality-auto-test` → `/quality-test` |
290
+ | 团队开发 | Team Lite | `/maestro-collab` |
291
+ | 长周期调试 | Odyssey 深度循环 | `/odyssey-debug "问题描述"` |
292
+ | 长周期改进 | Odyssey 深度循环 | `/odyssey-improve "改进目标"` |
293
+ | 需求迭代 | Odyssey 深度循环 | `/odyssey-planex "需求描述"` |
294
+
295
+ > 注:Path A/B 中 `analyze 1` / `plan 1` 的数字 `1` 指 **milestone 编号**(第 1 个里程碑),下游以 milestone 为入口。
296
+
297
+ ## Core Rules
298
+
299
+ 1. **Catalog First**: 先查 catalog.json,再按需读 source 文件
300
+ 2. **Guide 链接**: 对深层问题引用 guide/ 文档,告知用户具体文件名
301
+ 3. **上下文感知**: 检查 .workflow/ 存在性和 state.json 当前状态
302
+ 4. **精确匹配**: 搜索时支持命令名(不含前缀)、分类名、关键词
303
+ 5. **不执行命令**: 本 skill 只提供信息和推荐,不执行任何 maestro 命令
304
+
305
+ ## Error Handling
306
+
307
+ | 场景 | 处理 |
308
+ |------|------|
309
+ | 命令未找到 | 模糊搜索最近匹配,提示正确命令名 |
310
+ | 项目未初始化 | 推荐先运行 `/maestro-init` |
311
+ | Guide 文件不存在 | 跳过,仅提供 catalog 中的描述 |
312
+ | 参数为空 | 默认进入 Beginner Onboarding 模式 |
313
+
314
+ ## Related Resources
315
+
316
+ - **Guide 目录**: `guide/` — 17 个专题指南文档
317
+ - **Delegate 参考**: `~/.maestro/workflows/delegate-usage.md`
318
+ - **Coding 哲学**: `~/.maestro/workflows/coding-philosophy.md`
319
+ - **CLI 工具配置**: `~/.maestro/cli-tools.json`
320
+
321
+ ## Statistics
322
+
323
+ - **Slash 命令**: 64 个(13 个分类:core/pipeline/milestone/manage/quality/spec/learn/worktree/team/ralph/ui/tools/odyssey)
324
+ - **CLI 命令**: 21 个
325
+ - **Skills**: 44 个(5 个分类:meta/team/knowledge/quality/scholar)
326
+ - **Agents**: 24 个(4 个分类:workflow/team/cli/ui)
327
+ - **Guide 文档**: 17 个(planned,尚未创建)
328
+ - **工作流路径**: 7 个合法路径 (Path A-G) + 4 个辅助流程