maestro-flow 0.5.40 → 0.5.42

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 (101) hide show
  1. package/.agents/skills/maestro-analyze/SKILL.md +0 -42
  2. package/.agents/skills/maestro-blueprint/SKILL.md +0 -22
  3. package/.agents/skills/maestro-brainstorm/SKILL.md +4 -24
  4. package/.agents/skills/maestro-execute/SKILL.md +1 -1
  5. package/.agents/skills/maestro-grill/SKILL.md +0 -16
  6. package/.agents/skills/maestro-milestone-audit/SKILL.md +0 -15
  7. package/.agents/skills/maestro-plan/SKILL.md +5 -62
  8. package/.agents/skills/maestro-roadmap/SKILL.md +0 -8
  9. package/.agents/skills/odyssey-debug/SKILL.md +109 -143
  10. package/.agents/skills/odyssey-improve/SKILL.md +127 -141
  11. package/.agents/skills/odyssey-planex/SKILL.md +140 -231
  12. package/.agents/skills/odyssey-review-test-fix/SKILL.md +136 -90
  13. package/.agents/skills/odyssey-ui/SKILL.md +123 -143
  14. package/.agents/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  15. package/.agents/skills/team-coordinate/specs/role-spec-template.md +197 -198
  16. package/.agents/skills/team-roadmap-dev/SKILL.md +164 -164
  17. package/.agents/skills/team-roadmap-dev/specs/team-config.json +1 -1
  18. package/.agents/skills/team-swarm/roles/analyst/role.md +172 -176
  19. package/.agy/skills/maestro-analyze/SKILL.md +0 -42
  20. package/.agy/skills/maestro-blueprint/SKILL.md +0 -22
  21. package/.agy/skills/maestro-brainstorm/SKILL.md +4 -24
  22. package/.agy/skills/maestro-execute/SKILL.md +1 -1
  23. package/.agy/skills/maestro-grill/SKILL.md +0 -16
  24. package/.agy/skills/maestro-milestone-audit/SKILL.md +0 -15
  25. package/.agy/skills/maestro-plan/SKILL.md +5 -62
  26. package/.agy/skills/maestro-roadmap/SKILL.md +0 -8
  27. package/.agy/skills/odyssey-debug/SKILL.md +109 -143
  28. package/.agy/skills/odyssey-improve/SKILL.md +127 -141
  29. package/.agy/skills/odyssey-planex/SKILL.md +140 -231
  30. package/.agy/skills/odyssey-review-test-fix/SKILL.md +136 -90
  31. package/.agy/skills/odyssey-ui/SKILL.md +123 -143
  32. package/.agy/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  33. package/.agy/skills/team-coordinate/specs/role-spec-template.md +197 -198
  34. package/.agy/skills/team-roadmap-dev/SKILL.md +141 -153
  35. package/.agy/skills/team-roadmap-dev/specs/team-config.json +1 -1
  36. package/.agy/skills/team-swarm/roles/analyst/role.md +172 -176
  37. package/.claude/commands/maestro-analyze.md +0 -42
  38. package/.claude/commands/maestro-blueprint.md +0 -22
  39. package/.claude/commands/maestro-brainstorm.md +4 -24
  40. package/.claude/commands/maestro-execute.md +1 -1
  41. package/.claude/commands/maestro-grill.md +0 -16
  42. package/.claude/commands/maestro-milestone-audit.md +0 -15
  43. package/.claude/commands/maestro-plan.md +5 -62
  44. package/.claude/commands/maestro-roadmap.md +0 -8
  45. package/.claude/commands/odyssey-debug.md +109 -143
  46. package/.claude/commands/odyssey-improve.md +127 -141
  47. package/.claude/commands/odyssey-planex.md +140 -231
  48. package/.claude/commands/odyssey-review-test-fix.md +136 -90
  49. package/.claude/commands/odyssey-ui.md +123 -143
  50. package/.claude/skills/team-adversarial-swarm/workflows/wf-swarm-synthesize.js +248 -248
  51. package/.claude/skills/team-coordinate/specs/role-spec-template.md +197 -198
  52. package/.claude/skills/team-roadmap-dev/SKILL.md +169 -169
  53. package/.claude/skills/team-roadmap-dev/specs/team-config.json +1 -1
  54. package/.claude/skills/team-swarm/roles/analyst/role.md +181 -185
  55. package/.codex/skills/odyssey-debug/SKILL.md +114 -169
  56. package/.codex/skills/odyssey-improve/SKILL.md +144 -188
  57. package/.codex/skills/odyssey-planex/SKILL.md +162 -242
  58. package/.codex/skills/odyssey-review-test-fix/SKILL.md +96 -90
  59. package/.codex/skills/odyssey-ui/SKILL.md +128 -173
  60. package/dashboard/dist-server/src/commands/install-backend.js +31 -16
  61. package/dashboard/dist-server/src/commands/install-backend.js.map +1 -1
  62. package/dashboard/dist-server/src/core/component-defs.js +25 -0
  63. package/dashboard/dist-server/src/core/component-defs.js.map +1 -1
  64. package/dashboard/dist-server/src/tools/spec-loader.js +32 -20
  65. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  66. package/dashboard/dist-server/src/tools/spec-seeds.d.ts +8 -0
  67. package/dashboard/dist-server/src/tools/spec-seeds.js +114 -0
  68. package/dashboard/dist-server/src/tools/spec-seeds.js.map +1 -1
  69. package/dist/src/commands/install-backend.d.ts.map +1 -1
  70. package/dist/src/commands/install-backend.js +31 -16
  71. package/dist/src/commands/install-backend.js.map +1 -1
  72. package/dist/src/commands/spec.d.ts.map +1 -1
  73. package/dist/src/commands/spec.js +13 -3
  74. package/dist/src/commands/spec.js.map +1 -1
  75. package/dist/src/core/component-defs.d.ts.map +1 -1
  76. package/dist/src/core/component-defs.js +25 -0
  77. package/dist/src/core/component-defs.js.map +1 -1
  78. package/dist/src/tools/spec-init.d.ts +4 -3
  79. package/dist/src/tools/spec-init.d.ts.map +1 -1
  80. package/dist/src/tools/spec-init.js +9 -5
  81. package/dist/src/tools/spec-init.js.map +1 -1
  82. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  83. package/dist/src/tools/spec-loader.js +32 -20
  84. package/dist/src/tools/spec-loader.js.map +1 -1
  85. package/dist/src/tools/spec-seeds.d.ts +8 -0
  86. package/dist/src/tools/spec-seeds.d.ts.map +1 -1
  87. package/dist/src/tools/spec-seeds.js +114 -0
  88. package/dist/src/tools/spec-seeds.js.map +1 -1
  89. package/dist/src/utils/update-notices.js +11 -0
  90. package/dist/src/utils/update-notices.js.map +1 -1
  91. package/package.json +1 -1
  92. package/workflows/agy-instructions.md +147 -161
  93. package/workflows/claude-instructions.md +100 -48
  94. package/workflows/codex-instructions.md +147 -161
  95. package/workflows/execute.md +4 -3
  96. package/workflows/explore-usage.md +41 -81
  97. package/workflows/grill.md +11 -0
  98. package/workflows/milestone-audit.md +8 -0
  99. package/workflows/odyssey-base-codex.md +305 -0
  100. package/workflows/odyssey-base.md +89 -91
  101. package/workflows/plan.md +6 -0
@@ -1,161 +1,147 @@
1
- # Codex Code Guidelines
2
-
3
-
4
- - **Delegate Usage**: @~/.maestro/workflows/delegate-usage.md
5
- - **Explore Usage**: @~/.maestro/workflows/explore-usage.md
6
- - **CLI Endpoints Config**: @~/.maestro/cli-tools.json
7
-
8
- **Strictly follow the cli-tools.json configuration**
9
-
10
- ## Explore Priority
11
-
12
- `maestro explore` takes priority over Glob, Grep, and Read. When locating files or searching code patterns, call `maestro explore` first and stop to wait for results.
13
-
14
- # Coding Philosophy
15
-
16
- ## Core Beliefs
17
-
18
- - **Pursue good taste** - Eliminate edge cases to make code logic natural and elegant
19
- - **Embrace extreme simplicity** - Complexity is the root of all evil
20
- - **Be pragmatic** - Code must solve real-world problems, not hypothetical ones
21
- - **Data structures first** - Bad programmers worry about code; good programmers worry about data structures
22
- - **Never break backward compatibility** - Existing functionality is sacred and inviolable
23
- - **Incremental progress over big bangs** - Small changes that compile and pass tests
24
- - **Learning from existing code** - Study and plan before implementing
25
- - **Clear intent over clever code** - Be boring and obvious
26
- - **Follow existing code style** - Match import patterns, naming conventions, and formatting of existing codebase
27
- - **Minimize changes** - Only modify what's directly required; avoid refactoring, adding features, or "improving" code beyond the request
28
- - **No unsolicited documentation** - NEVER generate reports, documentation files, or summaries without explicit user request. If required, save to .workflow/.scratchpad/
29
-
30
- ## Simplicity Means
31
-
32
- - Single responsibility per function/class
33
- - Avoid premature abstractions
34
- - No clever tricks - choose the boring solution
35
- - If you need to explain it, it's too complex
36
-
37
- ## Fix, Don't Hide
38
-
39
- **Solve problems, don't silence symptoms** - Skipped tests, `@ts-ignore`, empty catch, `as any`, excessive timeouts = hiding bugs, not fixing them
40
-
41
- **NEVER**:
42
- - Make assumptions - verify with existing code
43
- - Generate reports, summaries, or documentation files without explicit user request
44
- - Use suppression mechanisms (`skip`, `ignore`, `disable`) without fixing root cause
45
-
46
- **ALWAYS**:
47
- - Plan complex tasks thoroughly before implementation
48
- - Generate task decomposition for multi-module work (>3 modules or >5 subtasks)
49
- - Track progress using TODO checklists for complex tasks
50
- - Validate planning documents before starting development
51
- - Commit working code incrementally
52
- - Update plan documentation and progress tracking as you go
53
- - Learn from existing implementations
54
- - Stop after 3 failed attempts and reassess
55
- - **Edit fallback**: When Edit tool fails 2+ times on same file, try Bash sed/awk first, then Write to recreate if still failing
56
-
57
- ## Learning the Codebase
58
-
59
- - Find 3 similar features/components
60
- - Identify common patterns and conventions
61
- - Use same libraries/utilities when possible
62
- - Follow existing test patterns
63
-
64
- ## Tooling
65
-
66
- - Use project's existing build system
67
- - Use project's test framework
68
- - Use project's formatter/linter settings
69
- - Don't introduce new tools without strong justification
70
-
71
- ## Content Uniqueness Rules
72
-
73
- - **Each layer owns its abstraction level** - no content sharing between layers
74
- - **Reference, don't duplicate** - point to other layers, never copy content
75
- - **Maintain perspective** - each layer sees the system at its appropriate scale
76
- - **Avoid implementation creep** - higher layers stay architectural
77
-
78
- # Context Requirements
79
-
80
- Before implementation, always:
81
- - Identify 3+ existing similar patterns
82
- - Map dependencies and integration points
83
- - Understand testing framework and coding conventions
84
-
85
- ## Knowledge System
86
-
87
- **Gate rule: On any coding/modification/debugging task, run `maestro search` + `maestro load` BEFORE reading code or editing files.**
88
-
89
- ### Required (every task, no exceptions)
90
-
91
- ```bash
92
- # Search relevant knowledge (1-3 keywords, multiple short queries beat one long one)
93
- maestro search "<topic phrase>"
94
-
95
- # Load specs for the task type
96
- maestro load --type spec --category coding # coding tasks
97
- maestro load --type spec --category arch # architecture decisions
98
- maestro load --type spec --category test # test writing
99
- maestro load --type spec --category ui # UI work
100
- ```
101
-
102
- **Query rules:**
103
- - Use **1-3 core keywords** per query — never dump all context into one search
104
- - Separate concepts from symbols: `maestro search "topology layout"` + `maestro search "DetailedTopologySVG" --code`
105
- - Add as needed: `maestro search "query" --kg` (KG full-source), `maestro kg callers <fn>` (call chain), `maestro kg context <node>` (node context)
106
-
107
- ```bash
108
- # ❌ Bad: keyword dump
109
- maestro search "topology display frontend DetailedTopologySVG elk"
110
-
111
- # ✅ Good: targeted multi-search + spec load
112
- maestro search "topology layout"
113
- maestro search "DetailedTopologySVG" --code
114
- maestro load --type spec --category coding
115
- ```
116
-
117
- ### Load & Search reference
118
-
119
- ```bash
120
- maestro load --type <type> [--list] [--category <cat>] [--keyword <word>] [--id <id>]
121
- maestro search "<query>" [--type <type>] [--category <cat>] [--code] [--kg] [--json]
122
- ```
123
-
124
- **`--category` values** (for `--type spec`): `coding`, `arch`, `debug`, `test`, `review`, `learning`, `ui`
125
- **`--keyword`**: free-text filter on title/body/tags — use to narrow within a category
126
-
127
- **`--type` values**: `spec`, `knowhow`, `domain`, `issue`, `session`, `scratch`, `note`, `project`, `roadmap`
128
-
129
- | Action | Command |
130
- |--------|---------|
131
- | Load coding specs | `maestro load --type spec --category coding` |
132
- | Load arch specs with keyword | `maestro load --type spec --category arch --keyword auth` |
133
- | List sessions | `maestro load --type session --list` |
134
- | Load specific knowhow | `maestro load --type knowhow --id <id>` |
135
- | Search sessions | `maestro search "query" --type session` |
136
- | Code graph search | `maestro search "symbol" --code` |
137
- | KG full-source search | `maestro search "query" --kg` |
138
-
139
- ### Record
140
-
141
- | What | Command |
142
- |------|---------|
143
- | Spec | `/spec-add <category> "title" "content" --keywords kw1,kw2 --description "summary"` |
144
- | Knowhow | `/manage-knowhow-capture` (`--spec-category <cat>` to bridge into agent injection) |
145
-
146
- Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, tests→`test`.
147
-
148
- ### Confidence & Conflict Marking
149
-
150
- When search results conflict with current context, **mark the entry**:
151
-
152
- ```bash
153
- maestro spec conflict mark <file> <line> --note "<reason>"
154
- maestro spec conflict list
155
- ```
156
-
157
- Levels: `high` (verified) → `medium` (default) → `low` (stale) → `contested` (conflict detected).
158
-
159
- - `contested` → sorted last during injection, labeled `[CONTESTED]` with conflict note
160
- - `low` → labeled `[LOW CONFIDENCE]`
161
- - Resolution handled by `/manage-knowledge-audit`
1
+ # Maestro
2
+
3
+ - **Coding Philosophy**: @~/.maestro/workflows/coding-philosophy.md
4
+
5
+ ## Delegate & CLI
6
+
7
+ - **CLI Endpoints Config**: @~/.maestro/cli-tools.json
8
+
9
+ `maestro delegate "<PROMPT>" --to <tool> --mode analysis|write` — dispatch tasks to external CLI tools (gemini, codex, claude, opencode).
10
+ Always `run_in_background: true`. Full guide: `cat ~/.maestro/workflows/delegate-usage.md`
11
+
12
+ **Strictly follow the cli-tools.json configuration**
13
+
14
+ ## Explore
15
+
16
+ `maestro explore` takes priority over Glob, Grep, and Read. When locating files or searching code patterns, call `maestro explore` first and stop to wait for results.
17
+
18
+ ```bash
19
+ maestro explore "FIND: <target + condition>\nSCOPE: <paths>" [more prompts...] [options]
20
+ ```
21
+
22
+ Lightweight read-only codebase search. 1 prompt = 1 agent. Not for write-mode/long sessions — use `delegate`.
23
+
24
+ | Option | Description |
25
+ |--------|-------------|
26
+ | `-e, --endpoint <names>` | Endpoint name(s), comma-separated |
27
+ | `--all` | Fan out each prompt to all endpoints |
28
+ | `--max-turns <n>` | Max agent turns per job |
29
+ | `-f, --file <path>` | Load prompts from JSON or text file |
30
+ | `--cd <dir>` | Working directory |
31
+ | `--json` | Output results as JSON |
32
+
33
+ ### Context Injection
34
+
35
+ Explore agent 无项目认知,调用前注入上下文:
36
+
37
+ | 注入项 | 写入字段 | 内容 |
38
+ |--------|----------|------|
39
+ | 结构 | SCOPE | 相关目录的具体路径(非通配泛扫) |
40
+ | 领域 | SCOPE | `maestro search` 已返回的关键文件路径 |
41
+ | 约束 | ATTENTION | 框架、语言、命名惯例 |
42
+
43
+ ```
44
+ FIND: authentication middleware that validates JWT tokens
45
+ SCOPE: src/middleware/, src/auth/, src/api/routes/
46
+ ATTENTION: Express.js, middleware files named *.middleware.ts
47
+ ```
48
+
49
+ ### Prompt Structure
50
+
51
+ **FIND + SCOPE 为最低标准。** 每个字段一句陈述句,禁止嵌套条件。
52
+
53
+ | Field | Required | Rule |
54
+ |-------|----------|------|
55
+ | `FIND` | **Yes** | 可判定的具体目标(什么 + 判定条件) |
56
+ | `SCOPE` | **Yes** | 明确路径或 glob,禁止 `**/*` 泛扫 |
57
+ | `EXCLUDE` | No | 要跳过的文件类型或目录 |
58
+ | `ATTENTION` | No | 框架、命名惯例、已知陷阱 |
59
+ | `EXPECTED` | Recommended | 输出格式:`file:line` 列表 / 摘要 / JSON |
60
+
61
+ ```
62
+ FIND: Functions that call db.query() with string concatenation instead of $1/$2
63
+ SCOPE: src/db/**/*.ts, src/api/**/*.ts
64
+ EXCLUDE: **/*.test.ts
65
+ EXPECTED: file:line list with the SQL string
66
+ ```
67
+
68
+ ### Cross-Search
69
+
70
+ 对重要搜索,用 2-3 个不同角度的 prompt 并发,结果由 Claude 交叉验证。
71
+
72
+ **按角度拆分,不按关键词拆分:**
73
+
74
+ | 角度 | Prompt A | Prompt B |
75
+ |------|----------|----------|
76
+ | 定义 vs 调用 | 找函数定义 | 找调用点 |
77
+ | 正例 vs 反例 | 找正确用法 | 找遗漏用法 |
78
+ | 入口 vs 实现 | 找 export/路由 | 找内部逻辑 |
79
+ | 按文件类型 | .ts 中的用法 | .vue 中的用法 |
80
+
81
+ ```bash
82
+ maestro explore \
83
+ "FIND: All functions exported from auth module\nSCOPE: src/auth/\nEXPECTED: function name + file:line" \
84
+ "FIND: All imports from auth module\nSCOPE: src/**/*.ts\nEXCLUDE: src/auth/\nEXPECTED: import path + file:line" \
85
+ --json
86
+ ```
87
+
88
+ **结果置信度:**
89
+ - 双命中 高置信,直接使用
90
+ - 单命中 → 用 Grep/Read 二次确认
91
+ - 零命中 → 换角度重搜或目标不存在
92
+
93
+ ### Execution
94
+
95
+ Multi-prompt background;single lookup foreground:
96
+
97
+ ```
98
+ Bash({ command: "maestro explore \"p1\" \"p2\" --json", run_in_background: true })
99
+ Bash({ command: "maestro explore \"FIND: ...\nSCOPE: ...\"" })
100
+ ```
101
+
102
+ Session: `maestro explore show` / `maestro explore output <id>`
103
+
104
+ ## Knowledge System
105
+
106
+ **Gate rule**: run `maestro search` + `maestro load` BEFORE reading code or editing files.
107
+
108
+ ```bash
109
+ maestro search "<query>" [--type <type>] [--category <cat>] [--code] [--kg]
110
+ maestro load --type <type> [--list] [--category <cat>] [--keyword <word>] [--id <id>]
111
+ ```
112
+
113
+ **--type**: `spec`, `knowhow`, `domain`, `issue`, `session`, `scratch`, `note`, `project`, `roadmap`
114
+ **--category** (spec only): `coding`, `arch`, `debug`, `test`, `review`, `learning`, `ui`
115
+
116
+ ### Query Rules
117
+
118
+ 1-3 core keywords per query — multiple short queries beat one long one.
119
+ Separate concepts from symbols. Add `--code` for symbols, `--kg` for full-source.
120
+
121
+ ```bash
122
+ # ❌ keyword dump
123
+ maestro search "topology display frontend DetailedTopologySVG elk"
124
+
125
+ # targeted
126
+ maestro search "topology layout"
127
+ maestro search "DetailedTopologySVG" --code
128
+ maestro load --type spec --category coding
129
+ ```
130
+
131
+ ### Record
132
+
133
+ | What | Command |
134
+ |------|---------|
135
+ | Spec | `/spec-add <category> "title" "content" --keywords kw1,kw2 --description "summary"` |
136
+ | Knowhow | `/manage-knowhow-capture` (`--spec-category <cat>` for agent injection) |
137
+
138
+ Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, tests→`test`.
139
+
140
+ ### Conflict Marking
141
+
142
+ ```bash
143
+ maestro spec conflict mark <file> <line> --note "<reason>"
144
+ ```
145
+
146
+ Levels: `high` `medium` (default) → `low` (`[LOW CONFIDENCE]`) → `contested` (`[CONTESTED]`).
147
+ Resolution: `/manage-knowledge-audit`
@@ -43,7 +43,7 @@ For each PLAN_DIR in PLAN_DIRS (sequential):
43
43
  | `--executor <tool>` | Default CLI tool: gemini\|codex\|qwen\|opencode\|claude (default: first enabled in cli-tools.json) |
44
44
  | `--dir <path>` | Use arbitrary directory instead of phase resolution (skip roadmap validation) |
45
45
  | `--skip-verify` | Skip E2.7 verification gate (trust execution output) |
46
- | `-y` | Auto-approve execution options (skip confirmation prompt) |
46
+ | `-y` | Auto mode skip ALL interactive questions (E0.5 options, inter-wave confirmations, blocked-task prompts) |
47
47
 
48
48
  ---
49
49
 
@@ -51,7 +51,7 @@ For each PLAN_DIR in PLAN_DIRS (sequential):
51
51
 
52
52
  ### Skip conditions
53
53
 
54
- - `-y` flag → use resolved defaults, skip prompt
54
+ - `-y` flag → use resolved defaults, skip prompt (applies to ALL interactive questions throughout execution, not just E0.5)
55
55
  - `executionContext.executionMethod` already set → skip (confirmed in /maestro-plan)
56
56
 
57
57
  ### Pre-step: Load tool config
@@ -301,7 +301,8 @@ For each wave in execution_queue (sequential):
301
301
  Clear state.json.current_task_id
302
302
 
303
303
  Wait for all wave tasks; update index.json (tasks_completed, commits)
304
- If any blocked: prompt user to continue or stop
304
+ If any blocked AND NOT -y flag: prompt user to continue or stop
305
+ Else: continue to next wave automatically (NEVER ask for confirmation between waves)
305
306
  ```
306
307
 
307
308
  ### Parallel Dispatch Rules
@@ -1,19 +1,11 @@
1
1
  # Explore Usage
2
2
 
3
3
  ```bash
4
- maestro explore "<PROMPT>" [more prompts...] [options]
4
+ maestro explore "FIND: <target + condition>\nSCOPE: <paths>" [more prompts...] [options]
5
5
  ```
6
6
 
7
- ## When to Use
8
-
9
- | Scenario | Example |
10
- |----------|---------|
11
- | Multi-angle codebase scan | 3 prompts scanning DB/API/error patterns in parallel |
12
- | Quick code lookup | Single prompt, foreground |
13
- | Per-prompt endpoint routing | JSON file with different endpoints per prompt |
14
- | Lightweight read-only analysis | Where delegate is overkill (no session, no history) |
15
-
16
- **Not for**: write-mode tasks, long sessions, interactive follow-ups — use `delegate` instead.
7
+ Lightweight read-only codebase search. 1 prompt = 1 agent.
8
+ **Not for**: write-mode, long sessions, follow-ups — use `delegate`.
17
9
 
18
10
  ## Options
19
11
 
@@ -21,103 +13,71 @@ maestro explore "<PROMPT>" [more prompts...] [options]
21
13
  |--------|-------------|---------|
22
14
  | `-e, --endpoint <names>` | Endpoint name(s), comma-separated | First available |
23
15
  | `--all` | Fan out each prompt to all endpoints | — |
24
- | `--parallel <n>` | Max concurrent endpoint queues | Config or `4` |
25
- | `--ep-concurrency <n>` | Max concurrent jobs per endpoint | `1` (serial) |
26
16
  | `--max-turns <n>` | Max agent turns per job | Config or `6` |
27
17
  | `-f, --file <path>` | Load prompts from JSON or text file | — |
28
18
  | `--cd <dir>` | Working directory | Current |
29
- | `-o, --output-dir <dir>` | Custom session save directory | `.workflow/explore/` |
30
- | `--no-save` | Skip session save | — |
31
19
  | `--json` | Output results as JSON | — |
32
20
 
33
- > **API Format**: Each endpoint supports `"format": "openai"` (default) or `"format": "anthropic"`. OpenAI-compatible endpoints (vLLM, Ollama, SiliconFlow, DeepSeek) use `openai`; Anthropic Messages API uses `anthropic`.
34
-
35
- **1 prompt = 1 agent**. Endpoint resolution: `--endpoint` > `--all` > first available.
21
+ Endpoint resolution: `--endpoint` > `--all` > first available.
36
22
 
37
- ## Prompt Template
38
-
39
- ```
40
- FIND: [what to search for — the core query]
41
- SCOPE: [file patterns, directories, or modules]
42
- EXCLUDE: [what to skip — files, patterns, false positives]
43
- ATTENTION: [caveats, edge cases, things to watch for]
44
- EXPECTED: [output format — evidence list, summary, JSON]
45
- ```
23
+ ## Prompt Rules
46
24
 
47
- Only `FIND` required. Plain text (no `FIND:` prefix) also works.
25
+ **FIND + SCOPE is minimum standard.** Bare FIND produces unfocused results.
48
26
 
49
- | Field | Role | Example |
50
- |-------|------|---------|
51
- | `FIND` | What to search for | `All database query patterns that could cause N+1` |
52
- | `SCOPE` | Where to look | `src/db/**/*.ts`, `src/api/` |
53
- | `EXCLUDE` | What to skip | `test files, generated code, node_modules` |
54
- | `ATTENTION` | What to watch for | `ORM lazy-loading traps, raw SQL in service layer` |
55
- | `EXPECTED` | Output format | `file:line evidence list with severity` |
27
+ | Field | Required | Purpose |
28
+ |-------|----------|---------|
29
+ | `FIND` | **Yes** | Precise target what exactly + condition |
30
+ | `SCOPE` | **Yes** | File patterns or directories to search |
31
+ | `EXCLUDE` | No | What to skip |
32
+ | `ATTENTION` | No | Edge cases to watch |
33
+ | `EXPECTED` | Recommended | Output format (`file:line` list, summary, JSON) |
56
34
 
57
- ## Execution Model
35
+ ### Bad vs Good
58
36
 
59
- **Serial within endpoint, parallel across endpoints.**
37
+ ```
38
+ # ❌ Vague — no actionable target
39
+ FIND: database patterns
40
+ FIND: error handling
60
41
 
61
- Same API jobs queue and run one-by-one (avoids rate limits).
62
- Different APIs queues run concurrently.
42
+ # Specific target + condition + scope
43
+ FIND: Functions that execute SQL queries without parameterized inputs
44
+ SCOPE: src/db/**/*.ts, src/api/**/*.ts
63
45
 
64
- ```
65
- Endpoint A: [job1] → [job2] → [job3] (serial)
66
- Endpoint B: [job4] [job5] (serial)
67
- ↑ parallel ↑
46
+ FIND: catch blocks that swallow errors silently (empty catch or catch-and-log-only)
47
+ SCOPE: src/services/
48
+ EXPECTED: file:line list with severity
68
49
  ```
69
50
 
70
- Raise per-endpoint parallelism with `--ep-concurrency 2` when the API rate limit permits (verify via test request).
51
+ ### Multi-Prompt
71
52
 
72
- ## Multi-Prompt Input
53
+ **Decompose by angle, not by keyword.** Each prompt gets one focused question + scope.
73
54
 
74
- **Inline**: `maestro explore "prompt1" "prompt2" "prompt3"`
55
+ ```
56
+ # ❌ Keyword dump in one prompt
57
+ "database error handling auth patterns"
58
+
59
+ # ✅ One angle per prompt
60
+ maestro explore \
61
+ "FIND: N+1 query patterns\nSCOPE: src/db/" \
62
+ "FIND: Unparameterized SQL\nSCOPE: src/db/, src/api/" \
63
+ "FIND: Missing error propagation\nSCOPE: src/services/"
64
+ ```
75
65
 
76
- **JSON file** (`-f prompts.json`):
66
+ Input formats: inline strings, JSON file (`-f`), text file (`-f`), or mixed.
67
+ JSON supports per-prompt endpoint override:
77
68
 
78
69
  ```json
79
- [
80
- "simple string prompt",
81
- { "prompt": "FIND: auth bypass\nSCOPE: src/api/", "endpoint": "deepseek" }
82
- ]
70
+ [{ "prompt": "FIND: auth bypass\nSCOPE: src/api/", "endpoint": "deepseek" }]
83
71
  ```
84
72
 
85
- Per-prompt `endpoint` overrides global `--endpoint`.
86
-
87
- **Text file** (`-f prompts.txt`): paragraphs separated by blank lines.
88
-
89
- **Mixed**: `maestro explore "inline" -f file.json`
90
-
91
73
  ## Session
92
74
 
93
- Results auto-save to `.workflow/explore/{session-id}.json` per workspace.
94
-
95
75
  ```bash
96
76
  maestro explore show # list sessions
97
- maestro explore output <id> # view session results
77
+ maestro explore output <id> # view results
98
78
  maestro explore output <id> --json # JSON output
99
79
  ```
100
80
 
101
- ## Endpoint Config
102
-
103
- File: `~/.maestro/api-explore.json`
104
-
105
- ```json
106
- {
107
- "endpoints": {
108
- "qwen": { "baseUrl": "https://...", "apiKey": "sk-xxx", "model": "Qwen/Qwen3-8B" },
109
- "deepseek": { "baseUrl": "https://...", "apiKey": "sk-yyy", "model": "deepseek-chat" },
110
- "sonnet": { "baseUrl": "https://api.anthropic.com", "apiKey": "sk-ant-...", "model": "claude-sonnet-4-20250514", "format": "anthropic" }
111
- },
112
- "maxTurns": 6,
113
- "concurrency": 4
114
- }
115
- ```
116
-
117
- `format` per endpoint: `"openai"` (default) for OpenAI-compatible APIs, `"anthropic"` for Anthropic Messages API.
118
-
119
- Proxy auto-inherited from `~/.maestro/cli-tools.json`. Legacy single-endpoint and env vars also supported.
120
-
121
81
  ## Execution Rules
122
82
 
123
83
  Multi-prompt — **background**:
@@ -126,7 +86,7 @@ Multi-prompt — **background**:
126
86
  Bash({ command: "maestro explore \"p1\" \"p2\" --json", run_in_background: true })
127
87
  ```
128
88
 
129
- Single quick lookup — run in foreground:
89
+ Single quick lookup — foreground:
130
90
 
131
91
  ```
132
92
  Bash({ command: "maestro explore \"Where is X defined?\"" })
@@ -428,6 +428,17 @@ Write `{output_dir}/context-package.json`:
428
428
 
429
429
  ---
430
430
 
431
+ ## Step 6.5: Artifact Verification (before completion)
432
+
433
+ Verify all required artifacts exist before proceeding to artifact registration:
434
+ - `grill-report.md` — Branch Log + Q&A entries + synthesis
435
+ - `terminology.md` — ≥5 terms with code refs
436
+ - `context-package.json` — schema "context-package/1.0"
437
+
438
+ If any missing: produce the missing artifact before Step 7. Do NOT register completion without all artifacts present.
439
+
440
+ ---
441
+
431
442
  ## Step 7: Register Artifact
432
443
 
433
444
  ### 7.1: Register in state.json
@@ -107,6 +107,14 @@ CONSTRAINTS: Only check cross-phase boundaries | Ignore intra-phase issues
107
107
 
108
108
  ---
109
109
 
110
+ ## Step 5.9: Artifact & Evidence Verification
111
+
112
+ Before proceeding to verdict:
113
+ - Verify `audit-report.md` exists at `.workflow/milestones/{milestone}/audit-report.md`. If missing: re-run Step 5.
114
+ - Every audit check result MUST cite what was examined and what was found (e.g., "Phase 1 chain complete: ANL-001 → PLN-001 → EXC-001" or "Phase 2 missing EXC artifact"). Do NOT mark checks as PASS without verifying the actual artifact exists.
115
+
116
+ ---
117
+
110
118
  ## Step 6: Audit Report & Verdict
111
119
 
112
120
  1. Read the audit report generated by the integration checker