maestro-flow 0.4.17 → 0.4.19
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.
- package/.agents/skills/maestro/SKILL.md +1 -1
- package/.agents/skills/maestro-analyze/SKILL.md +5 -0
- package/.agents/skills/maestro-blueprint/SKILL.md +5 -0
- package/.agents/skills/maestro-brainstorm/SKILL.md +5 -0
- package/.agents/skills/maestro-next/SKILL.md +254 -0
- package/.agents/skills/team-swarm/SKILL.md +180 -0
- package/.agents/skills/team-swarm/roles/analyst/role.md +187 -0
- package/.agents/skills/team-swarm/roles/ant/role.md +169 -0
- package/.agents/skills/team-swarm/roles/coordinator/commands/converge.md +146 -0
- package/.agents/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/.agents/skills/team-swarm/roles/coordinator/commands/iterate.md +232 -0
- package/.agents/skills/team-swarm/roles/coordinator/role.md +211 -0
- package/.agents/skills/team-swarm/roles/scorer/role.md +157 -0
- package/.agents/skills/team-swarm/scripts/aco.py +473 -0
- package/.agents/skills/team-swarm/scripts/pheromone.py +144 -0
- package/.agents/skills/team-swarm/scripts/scoring.py +92 -0
- package/.agents/skills/team-swarm/scripts/test_aco.py +475 -0
- package/.agents/skills/team-swarm/specs/ant-output-schema.md +119 -0
- package/.agents/skills/team-swarm/specs/convergence-criteria.md +106 -0
- package/.agents/skills/team-swarm/specs/pheromone-schema.md +123 -0
- package/.agents/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/.agents/skills/team-swarm/specs/swarm-protocol.md +117 -0
- package/.agy/skills/maestro/SKILL.md +1 -1
- package/.agy/skills/maestro-analyze/SKILL.md +5 -0
- package/.agy/skills/maestro-blueprint/SKILL.md +5 -0
- package/.agy/skills/maestro-brainstorm/SKILL.md +5 -0
- package/.agy/skills/maestro-next/SKILL.md +250 -0
- package/.agy/skills/team-swarm/SKILL.md +176 -0
- package/.agy/skills/team-swarm/roles/analyst/role.md +183 -0
- package/.agy/skills/team-swarm/roles/ant/role.md +165 -0
- package/.agy/skills/team-swarm/roles/coordinator/commands/converge.md +134 -0
- package/.agy/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/.agy/skills/team-swarm/roles/coordinator/commands/iterate.md +202 -0
- package/.agy/skills/team-swarm/roles/coordinator/role.md +209 -0
- package/.agy/skills/team-swarm/roles/scorer/role.md +153 -0
- package/.agy/skills/team-swarm/scripts/aco.py +473 -0
- package/.agy/skills/team-swarm/scripts/pheromone.py +144 -0
- package/.agy/skills/team-swarm/scripts/scoring.py +92 -0
- package/.agy/skills/team-swarm/scripts/test_aco.py +475 -0
- package/.agy/skills/team-swarm/specs/ant-output-schema.md +119 -0
- package/.agy/skills/team-swarm/specs/convergence-criteria.md +106 -0
- package/.agy/skills/team-swarm/specs/pheromone-schema.md +123 -0
- package/.agy/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/.agy/skills/team-swarm/specs/swarm-protocol.md +117 -0
- package/.claude/commands/maestro-analyze.md +5 -0
- package/.claude/commands/maestro-blueprint.md +5 -0
- package/.claude/commands/maestro-brainstorm.md +5 -0
- package/.claude/commands/maestro-next.md +252 -0
- package/.claude/commands/maestro.md +1 -1
- package/.claude/skills/team-swarm/SKILL.md +178 -0
- package/.claude/skills/team-swarm/roles/analyst/role.md +185 -0
- package/.claude/skills/team-swarm/roles/ant/role.md +167 -0
- package/.claude/skills/team-swarm/roles/coordinator/commands/converge.md +146 -0
- package/.claude/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/.claude/skills/team-swarm/roles/coordinator/commands/iterate.md +232 -0
- package/.claude/skills/team-swarm/roles/coordinator/role.md +209 -0
- package/.claude/skills/team-swarm/roles/scorer/role.md +155 -0
- package/.claude/skills/team-swarm/scripts/aco.py +473 -0
- package/.claude/skills/team-swarm/scripts/pheromone.py +144 -0
- package/.claude/skills/team-swarm/scripts/scoring.py +92 -0
- package/.claude/skills/team-swarm/scripts/test_aco.py +475 -0
- package/.claude/skills/team-swarm/specs/ant-output-schema.md +119 -0
- package/.claude/skills/team-swarm/specs/convergence-criteria.md +106 -0
- package/.claude/skills/team-swarm/specs/pheromone-schema.md +123 -0
- package/.claude/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/.claude/skills/team-swarm/specs/swarm-protocol.md +117 -0
- package/.codex/skills/learn-decompose/SKILL.md +34 -3
- package/.codex/skills/learn-retro/SKILL.md +31 -1
- package/.codex/skills/learn-second-opinion/SKILL.md +34 -4
- package/.codex/skills/maestro-analyze/SKILL.md +44 -5
- package/.codex/skills/maestro-blueprint/SKILL.md +5 -0
- package/.codex/skills/maestro-brainstorm/SKILL.md +46 -0
- package/.codex/skills/maestro-execute/SKILL.md +61 -5
- package/.codex/skills/maestro-milestone-audit/SKILL.md +64 -13
- package/.codex/skills/maestro-milestone-complete/SKILL.md +12 -0
- package/.codex/skills/maestro-next/SKILL.md +297 -0
- package/.codex/skills/maestro-plan/SKILL.md +36 -1
- package/.codex/skills/maestro-player/SKILL.md +25 -6
- package/.codex/skills/maestro-ralph/SKILL.md +17 -10
- package/.codex/skills/maestro-ralph-execute/SKILL.md +2 -1
- package/.codex/skills/maestro-roadmap/SKILL.md +35 -4
- package/.codex/skills/maestro-ui-codify/SKILL.md +38 -10
- package/.codex/skills/maestro-verify/SKILL.md +40 -5
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +52 -5
- package/.codex/skills/manage-issue-discover/SKILL.md +106 -15
- package/.codex/skills/quality-auto-test/SKILL.md +70 -16
- package/.codex/skills/quality-debug/SKILL.md +139 -28
- package/.codex/skills/quality-refactor/SKILL.md +61 -11
- package/.codex/skills/quality-review/SKILL.md +45 -9
- package/.codex/skills/quality-test/SKILL.md +58 -3
- package/.codex/skills/security-audit/SKILL.md +38 -0
- package/.codex/skills/spec-map/SKILL.md +65 -8
- package/.codex/skills/team-coordinate/SKILL.md +28 -11
- package/.codex/skills/team-coordinate/specs/role-catalog.md +20 -0
- package/.codex/skills/team-lifecycle-v4/SKILL.md +23 -7
- package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +20 -0
- package/.codex/skills/team-quality-assurance/SKILL.md +40 -2
- package/.codex/skills/team-review/SKILL.md +42 -2
- package/.codex/skills/team-tech-debt/SKILL.md +45 -2
- package/.codex/skills/team-testing/SKILL.md +42 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/search.d.ts +6 -4
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +50 -8
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +32 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +294 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +35 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +235 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
- package/dist/src/commands/install.js +5 -1
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +9 -0
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +9 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +3 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/ralph/cmd-check.js +1 -1
- package/dist/src/ralph/cmd-check.js.map +1 -1
- package/dist/src/ralph/cmd-complete.js +1 -1
- package/dist/src/ralph/cmd-complete.js.map +1 -1
- package/dist/src/ralph/cmd-next.d.ts.map +1 -1
- package/dist/src/ralph/cmd-next.js +12 -4
- package/dist/src/ralph/cmd-next.js.map +1 -1
- package/dist/src/ralph/cmd-session.js +2 -2
- package/dist/src/ralph/cmd-session.js.map +1 -1
- package/dist/src/ralph/status-store.d.ts +8 -1
- package/dist/src/ralph/status-store.d.ts.map +1 -1
- package/dist/src/ralph/status-store.js +12 -2
- package/dist/src/ralph/status-store.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +51 -64
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/dist/src/tui/install-ui/HooksConfig.d.ts +5 -1
- package/dist/src/tui/install-ui/HooksConfig.d.ts.map +1 -1
- package/dist/src/tui/install-ui/HooksConfig.js +5 -3
- package/dist/src/tui/install-ui/HooksConfig.js.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts +1 -0
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +26 -3
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +76 -16
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +8 -0
- package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.js +1 -1
- package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
- package/dist/src/utils/update-notices.js +23 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +1 -1
- package/workflows/finish-work.md +119 -0
- package/workflows/milestone-complete.md +23 -1
|
@@ -212,6 +212,47 @@ CONSTRAINTS:
|
|
|
212
212
|
7. **DO NOT STOP**: Continuous until all waves complete; only pause at [CHECKPOINT] (skipped with -y).
|
|
213
213
|
</invariants>
|
|
214
214
|
|
|
215
|
+
<spawn_contract>
|
|
216
|
+
|
|
217
|
+
All three waves invoke `spawn_agents_on_csv` with the same shape — only `instruction` (inflated from `<agent_prompt_template>`) and `max_concurrency` differ. The orchestrator MUST:
|
|
218
|
+
|
|
219
|
+
1. Filter master tasks.csv to `wave==N AND status=="pending"` before writing `wave-{N}.csv`.
|
|
220
|
+
2. Use the strict JSON Schema below for `output_schema`.
|
|
221
|
+
3. Append the shared termination contract to every inflated `description`.
|
|
222
|
+
4. Merge: map `result_status` → master `status`; copy `findings`, `output_path`, `error`.
|
|
223
|
+
|
|
224
|
+
**output_schema** (all waves):
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"type": "object",
|
|
229
|
+
"properties": {
|
|
230
|
+
"id": { "type": "string" },
|
|
231
|
+
"result_status": { "type": "string", "enum": ["completed", "failed", "blocked"] },
|
|
232
|
+
"findings": { "type": "string", "maxLength": 500 },
|
|
233
|
+
"output_path": { "type": "string", "description": "Primary deliverable absolute path (W1: guidance-specification.md; W2: {role}/analysis.md; W3: review-findings.json)" },
|
|
234
|
+
"error": { "type": "string" }
|
|
235
|
+
},
|
|
236
|
+
"required": ["id", "result_status", "findings"]
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Shared termination contract** (append to every inflated W1/W2/W3 description):
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
TERMINATION CONTRACT (mandatory — NO worker may end without calling report_agent_job_result):
|
|
244
|
+
- Success path → all required files written AND verified via Glob → result_status=completed, output_path set
|
|
245
|
+
- Failure path → unrecoverable error (write fail, missing input file) → result_status=failed
|
|
246
|
+
- Blocked path → upstream missing (W2 cannot read guidance-spec; W3 cannot read analysis.md) → result_status=blocked
|
|
247
|
+
- Timeout path → near max_runtime_seconds → finalize current write if safe → otherwise report blocked with error="timeout"
|
|
248
|
+
- NEVER continue indefinitely. NEVER exit silently. NEVER omit the call.
|
|
249
|
+
- NEVER return analysis as chat text — files on disk are the ONLY valid deliverable.
|
|
250
|
+
- Do NOT write to tasks.csv, wave-*.csv, results.csv.
|
|
251
|
+
- Do NOT call spawn_agents_on_csv (no recursion).
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
</spawn_contract>
|
|
255
|
+
|
|
215
256
|
<state_machine>
|
|
216
257
|
|
|
217
258
|
<states>
|
|
@@ -387,4 +428,9 @@ Protocol: read before analysis, append-only, dedup by type+key.
|
|
|
387
428
|
- [ ] context-package.json generated with per-item `ref` traceability
|
|
388
429
|
- [ ] discoveries.ndjson append-only throughout
|
|
389
430
|
- [ ] context.md aggregates session results with next-step routing
|
|
431
|
+
- [ ] Session sealed via finish-work (auto mode only)
|
|
390
432
|
</success_criteria>
|
|
433
|
+
|
|
434
|
+
<on_complete>
|
|
435
|
+
@~/.maestro/workflows/finish-work.md — SESSION_DIR={output_dir}, SESSION_TYPE=brainstorm, SESSION_ID={artifact_id}, LINKED_MILESTONE=null
|
|
436
|
+
</on_complete>
|
|
@@ -257,16 +257,72 @@ For each wave N in ascending order:
|
|
|
257
257
|
|
|
258
258
|
```javascript
|
|
259
259
|
spawn_agents_on_csv({
|
|
260
|
-
csv_path: `${sessionFolder}/wave-${N}.csv`,
|
|
260
|
+
csv_path: `${sessionFolder}/wave-${N}.csv`, // only rows where wave==N AND status=="pending"
|
|
261
261
|
id_column: "id",
|
|
262
|
-
instruction:
|
|
263
|
-
max_concurrency: maxConcurrency,
|
|
262
|
+
instruction: EXECUTOR_INSTRUCTION, // see "Executor Worker Contract" below
|
|
263
|
+
max_concurrency: maxConcurrency,
|
|
264
|
+
max_runtime_seconds: 3600,
|
|
264
265
|
output_csv_path: `${sessionFolder}/wave-${N}-results.csv`,
|
|
265
|
-
output_schema: {
|
|
266
|
+
output_schema: {
|
|
267
|
+
type: "object",
|
|
268
|
+
properties: {
|
|
269
|
+
id: { type: "string" },
|
|
270
|
+
result_status: { type: "string", enum: ["completed", "failed", "blocked"] },
|
|
271
|
+
findings: { type: "string", maxLength: 500 },
|
|
272
|
+
files_modified: { type: "string", description: "Semicolon-separated paths" },
|
|
273
|
+
tests_passed: { type: "string", enum: ["true", "false", "n/a"] },
|
|
274
|
+
error: { type: "string" }
|
|
275
|
+
},
|
|
276
|
+
required: ["id", "result_status", "findings"]
|
|
277
|
+
}
|
|
266
278
|
})
|
|
267
279
|
```
|
|
268
280
|
|
|
269
|
-
4. Merge results into master `tasks.csv`: map `result_status` from `wave-{N}-results.csv` to the `status` column in master CSV
|
|
281
|
+
4. Merge results into master `tasks.csv`: map `result_status` from `wave-{N}-results.csv` to the `status` column in master CSV; copy `findings`, `files_modified`, `tests_passed`, `error`. Delete `wave-{N}.csv` AND `wave-{N}-results.csv` after merge.
|
|
282
|
+
|
|
283
|
+
#### Executor Worker Contract (EXECUTOR_INSTRUCTION)
|
|
284
|
+
|
|
285
|
+
The literal `instruction` string passed to `spawn_agents_on_csv` MUST include the following contract (substitute `{sessionFolder}`, `{phaseDir}`, `{autoCommit}`, `{specsContent}` at build time):
|
|
286
|
+
|
|
287
|
+
```
|
|
288
|
+
You are a task executor. ONE task row is assigned to you.
|
|
289
|
+
|
|
290
|
+
INPUT (from your CSV row):
|
|
291
|
+
- id, title, description, prev_context (findings from upstream tasks)
|
|
292
|
+
- meta.tdd_phase (red|green|refactor) if TDD mode is enabled
|
|
293
|
+
|
|
294
|
+
REQUIRED STEPS:
|
|
295
|
+
1. Read prev_context — depend on upstream findings, not memory
|
|
296
|
+
2. Read shared discoveries: {sessionFolder}/discoveries.ndjson
|
|
297
|
+
3. Implement the task: edit/create files per description
|
|
298
|
+
4. Run verification — relevant tests; if TDD, honor tdd_phase semantics
|
|
299
|
+
5. If autoCommit and task succeeded → commit changes with task ID in message
|
|
300
|
+
6. Append discoveries (type=implementation_note / pattern) to discoveries.ndjson
|
|
301
|
+
7. Call report_agent_job_result EXACTLY ONCE
|
|
302
|
+
|
|
303
|
+
TERMINATION CONTRACT (mandatory — NO worker may end without calling report_agent_job_result):
|
|
304
|
+
- Success path → all files written, tests pass → result_status=completed, tests_passed="true"
|
|
305
|
+
- Blocked path → cannot proceed (missing dep, unclear requirement, contract violation) → result_status=blocked with error explaining what is needed
|
|
306
|
+
- Failure path → unrecoverable error (build error, file write fail) → result_status=failed with error message
|
|
307
|
+
- Timeout path → approaching max_runtime_seconds → revert partial work, report blocked with error="timeout"
|
|
308
|
+
- NEVER continue indefinitely. NEVER exit silently. NEVER omit the call.
|
|
309
|
+
|
|
310
|
+
OUTPUT (return via report_agent_job_result; must match output_schema):
|
|
311
|
+
{
|
|
312
|
+
"id": "<your row id>",
|
|
313
|
+
"result_status": "completed" | "failed" | "blocked",
|
|
314
|
+
"findings": "<one-sentence summary, max 500 chars>",
|
|
315
|
+
"files_modified": "<semicolon-separated paths or empty>",
|
|
316
|
+
"tests_passed": "true" | "false" | "n/a",
|
|
317
|
+
"error": "<message if not completed, else empty>"
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
CONSTRAINTS:
|
|
321
|
+
- Modify ONLY files implicated by the task description and prev_context.
|
|
322
|
+
- Do NOT write to tasks.csv, wave-*.csv, results.csv, plan.json, or state.json — orchestrator owns those.
|
|
323
|
+
- Do NOT call spawn_agents_on_csv (no recursion).
|
|
324
|
+
- Honor specs loaded by orchestrator (passed via instruction context).
|
|
325
|
+
```
|
|
270
326
|
|
|
271
327
|
#### Blocked Task Handling
|
|
272
328
|
|
|
@@ -28,9 +28,9 @@ $maestro-milestone-audit "M1"
|
|
|
28
28
|
### tasks.csv (Master State)
|
|
29
29
|
|
|
30
30
|
```csv
|
|
31
|
-
id,title,description,scope,check_targets,deps,wave
|
|
32
|
-
"integ-1","Interface & dependency chains","Verify shared interfaces are consistent across phases: re-exports match, dependency chains unbroken, no circular imports between phase outputs","cross-phase imports, shared types, re-exports","grep for shared type names across phase output dirs; verify export/import consistency","","1"
|
|
33
|
-
"integ-2","Data contracts & API consistency","Verify request/response schemas match across phases: API signatures consistent, error codes aligned, no contract drift","request/response schemas, API signatures, error codes","diff API type definitions across phases; check error code enum consistency","","1"
|
|
31
|
+
id,title,description,scope,check_targets,deps,wave,status,findings,gaps_found,severity,error
|
|
32
|
+
"integ-1","Interface & dependency chains","Verify shared interfaces are consistent across phases: re-exports match, dependency chains unbroken, no circular imports between phase outputs","cross-phase imports, shared types, re-exports","grep for shared type names across phase output dirs; verify export/import consistency","","1","pending","","","",""
|
|
33
|
+
"integ-2","Data contracts & API consistency","Verify request/response schemas match across phases: API signatures consistent, error codes aligned, no contract drift","request/response schemas, API signatures, error codes","diff API type definitions across phases; check error code enum consistency","","1","pending","","","",""
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
**Columns**:
|
|
@@ -44,13 +44,13 @@ id,title,description,scope,check_targets,deps,wave
|
|
|
44
44
|
| `check_targets` | Input | Specific verification commands/grep patterns |
|
|
45
45
|
| `deps` | Input | Dependencies (empty — all wave 1) |
|
|
46
46
|
| `wave` | Computed | Wave number (always 1 — single parallel wave) |
|
|
47
|
-
| `
|
|
48
|
-
| `findings` |
|
|
49
|
-
| `gaps_found` |
|
|
50
|
-
| `severity` |
|
|
51
|
-
| `error` |
|
|
47
|
+
| `status` | Lifecycle | `pending` (initial) → `pass`/`fail`/`warning`/`failed` (set by merge step from worker's `result_status`) |
|
|
48
|
+
| `findings` | Lifecycle | Detailed findings per dimension (max 500 chars; merged) |
|
|
49
|
+
| `gaps_found` | Lifecycle | Semicolon-separated list of integration gaps (merged) |
|
|
50
|
+
| `severity` | Lifecycle | `critical` / `warning` / `info` per gap (merged) |
|
|
51
|
+
| `error` | Lifecycle | Error message if check failed (merged) |
|
|
52
52
|
|
|
53
|
-
**Column separation rule**: Input columns
|
|
53
|
+
**Column separation rule**: Wave CSV (input to `spawn_agents_on_csv`) contains Input columns only. Workers return Output columns exclusively via `output_schema` using `result_status` (NOT `status`). Merge maps `result_status` → master `status`.
|
|
54
54
|
|
|
55
55
|
### Session Structure
|
|
56
56
|
|
|
@@ -95,16 +95,67 @@ Verify all adhoc-scoped artifacts completed. For each execute artifact, verify a
|
|
|
95
95
|
|
|
96
96
|
```javascript
|
|
97
97
|
spawn_agents_on_csv({
|
|
98
|
-
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
98
|
+
csv_path: `${sessionFolder}/wave-1.csv`, // rows where wave==1 AND status=="pending"
|
|
99
99
|
id_column: "id",
|
|
100
|
-
instruction:
|
|
101
|
-
max_concurrency: 2,
|
|
100
|
+
instruction: AUDIT_INTEGRATION_INSTRUCTION, // see "Integration Checker Worker Contract" below
|
|
101
|
+
max_concurrency: 2,
|
|
102
|
+
max_runtime_seconds: 600,
|
|
102
103
|
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
103
|
-
output_schema: {
|
|
104
|
+
output_schema: {
|
|
105
|
+
type: "object",
|
|
106
|
+
properties: {
|
|
107
|
+
id: { type: "string" },
|
|
108
|
+
result_status: { type: "string", enum: ["pass", "fail", "warning", "failed"] },
|
|
109
|
+
findings: { type: "string", maxLength: 500 },
|
|
110
|
+
gaps_found: { type: "string", description: "Semicolon-separated list of gaps" },
|
|
111
|
+
severity: { type: "string", enum: ["critical", "warning", "info", ""] },
|
|
112
|
+
error: { type: "string" }
|
|
113
|
+
},
|
|
114
|
+
required: ["id", "result_status", "findings", "severity"]
|
|
115
|
+
}
|
|
104
116
|
})
|
|
105
117
|
```
|
|
106
118
|
|
|
107
119
|
4. Merge results into master `tasks.csv`: map `result_status` → master `status` column, copy `findings`, `gaps_found`, `severity`, `error`. Delete temporary files (`wave-1.csv`, `wave-1-results.csv`) after merge.
|
|
120
|
+
|
|
121
|
+
#### Integration Checker Worker Contract (AUDIT_INTEGRATION_INSTRUCTION)
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
You are an integration checker for milestone {milestone}. ONE integration dimension row is assigned to you.
|
|
125
|
+
|
|
126
|
+
INPUT (from your CSV row):
|
|
127
|
+
- id (integ-N), title, description, scope, check_targets
|
|
128
|
+
|
|
129
|
+
REQUIRED STEPS:
|
|
130
|
+
1. Examine scope and check_targets fields
|
|
131
|
+
2. Run check_targets — grep / read phase output dirs / diff API definitions
|
|
132
|
+
3. Identify inconsistencies, contract drift, broken dependencies across phase outputs
|
|
133
|
+
4. Record findings with file:line references for every gap
|
|
134
|
+
5. Call report_agent_job_result EXACTLY ONCE
|
|
135
|
+
|
|
136
|
+
TERMINATION CONTRACT (mandatory — NO worker may end without calling report_agent_job_result):
|
|
137
|
+
- Pass path → no gaps found → result_status=pass, severity="info"
|
|
138
|
+
- Warning path → minor gaps → result_status=warning, severity="warning"
|
|
139
|
+
- Fail path → critical contract drift or broken dependencies → result_status=fail, severity="critical"
|
|
140
|
+
- Failure path → cannot read scope, tool error → result_status=failed with error message
|
|
141
|
+
- Timeout path → near 600s, finalize current findings → report with what was collected
|
|
142
|
+
- NEVER skip report_agent_job_result.
|
|
143
|
+
|
|
144
|
+
OUTPUT (must match output_schema):
|
|
145
|
+
{
|
|
146
|
+
"id": "<your row id>",
|
|
147
|
+
"result_status": "pass" | "warning" | "fail" | "failed",
|
|
148
|
+
"findings": "<one-sentence summary, max 500 chars>",
|
|
149
|
+
"gaps_found": "<semicolon-separated list of gaps, each with file:line; empty if pass>",
|
|
150
|
+
"severity": "critical" | "warning" | "info" | "",
|
|
151
|
+
"error": "<message if failed, else empty>"
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
CONSTRAINTS:
|
|
155
|
+
- Read-only inspection. Do NOT modify phase outputs.
|
|
156
|
+
- Do NOT write to tasks.csv, wave-*.csv, audit-report.md (orchestrator owns those).
|
|
157
|
+
- Do NOT call spawn_agents_on_csv (no recursion).
|
|
158
|
+
```
|
|
108
159
|
5. Parse `gaps_found` from all workers — aggregate into `.workflow/milestones/{milestone}/audit-report.md`
|
|
109
160
|
6. Any worker with `result_status == fail` and `severity == critical` → milestone verdict = FAIL
|
|
110
161
|
|
|
@@ -51,6 +51,18 @@ Copy each milestone artifact's directory to `.workflow/milestones/{milestone}/ar
|
|
|
51
51
|
- If `artifact.path` is absolute, use as-is
|
|
52
52
|
- Copy the entire resolved directory to `.workflow/milestones/{milestone}/artifacts/{artifact.name}/`
|
|
53
53
|
|
|
54
|
+
**After each copy** (per archived session dir):
|
|
55
|
+
|
|
56
|
+
a. If destination contains `archive.json` with `lifecycle.status == "sealed"`:
|
|
57
|
+
- Set `lifecycle.status = "archived"`, `lifecycle.archived_at = now`, `lifecycle.linked_milestone = {milestone}` (if null).
|
|
58
|
+
|
|
59
|
+
b. If destination contains `context-package.json`, prune (scheme C — non-destructive):
|
|
60
|
+
- Compute `pruned` = { `open_questions` without answer/resolved_in; `constraints` status=open; `insights` beyond top 20; `references` whose path does not exist on disk }
|
|
61
|
+
- If any `pruned.*` non-empty: write `context-package.pruned.json` with the dropped items; rewrite `context-package.json` keeping only answered/resolved questions, locked constraints, `insights[0..20]`, valid-path references; update `archive.json.pruned = { at: now, counts, ref: "context-package.pruned.json" }`
|
|
62
|
+
- Otherwise: set `archive.json.pruned = { at: now, counts: zeros, ref: null }`
|
|
63
|
+
|
|
64
|
+
c. If session dir lacks `archive.json` (legacy): skip a+b silently — legacy sessions are not indexed.
|
|
65
|
+
|
|
54
66
|
Snapshot `roadmap.md` as `roadmap-snapshot.md` in the milestone archive.
|
|
55
67
|
|
|
56
68
|
### Step 3: Extract Learnings
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-next
|
|
3
|
+
description: Single-command recommendation — pick the best next skill from the pool and execute it in-context
|
|
4
|
+
argument-hint: "\"<intent>\" [-y] [--dry-run] [--top N] [--list]"
|
|
5
|
+
allowed-tools: Read, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
单链推荐:解析 intent + project state → 路由表评分 → 推荐**单个原子 skill** → 确认后**在协调器上下文直接调用** `$skill {args}`。
|
|
10
|
+
|
|
11
|
+
Entry points:
|
|
12
|
+
- **`$maestro-next "intent"`** — 推荐并确认后执行
|
|
13
|
+
- **`$maestro-next -y "intent"`** — 跳过确认直接执行 top pick
|
|
14
|
+
- **`$maestro-next --dry-run "intent"`** — 仅显示推荐
|
|
15
|
+
- **`$maestro-next --list`** — 仅列出可推荐 skill 池(按 workflow 簇分组)
|
|
16
|
+
|
|
17
|
+
Codex specifics:
|
|
18
|
+
- **No agent spawning** — top pick 直接在协调器上下文以 `$skill {args}` 形式调用,单次执行后结束
|
|
19
|
+
- **Skill pool discovery via CLI** — `maestro ralph skills --platform codex --json --quiet`(project `.codex/skills/` 覆盖 global `~/.codex/skills/`)
|
|
20
|
+
- **No session, no status.json, no goal** — 不调 `create_goal` / `update_plan`,由目标 skill 自行管理产出
|
|
21
|
+
|
|
22
|
+
与 `$maestro` / `$maestro-ralph` 区别:
|
|
23
|
+
- 不创建 session、不构建 chain、不写 status.json
|
|
24
|
+
- 始终只推 1 个 top pick,最多列 2-3 个备选
|
|
25
|
+
- 适用场景:意图清晰且单步即可完成;或需要定向推荐时
|
|
26
|
+
</purpose>
|
|
27
|
+
|
|
28
|
+
<context>
|
|
29
|
+
$ARGUMENTS — 意图文本 + 可选 flags。
|
|
30
|
+
|
|
31
|
+
**Flags:**
|
|
32
|
+
- `-y, --yes` — 跳过确认,直接执行 top pick;若目标 skill 支持 `-y`,透传
|
|
33
|
+
- `--dry-run` — 仅显示推荐结果,不执行
|
|
34
|
+
- `--top N` — 显示前 N 个候选(默认 3)
|
|
35
|
+
- `--list` — 仅列出可推荐 skill 池(按 workflow 簇分组),不做推荐
|
|
36
|
+
|
|
37
|
+
**候选池:** 仅 A_SCORE_CANDIDATES 路由表中列出的 skill。管线编排器(`maestro` / `maestro-ralph*` / `maestro-player` / `maestro-composer`)**永远不在候选池**。
|
|
38
|
+
|
|
39
|
+
**State files:**
|
|
40
|
+
- `.workflow/state.json` — phase / milestone / artifact registry
|
|
41
|
+
- `.workflow/scratch/` — 最近 artifact(按 mtime 倒序定位 lifecycle)
|
|
42
|
+
- `.workflow/.maestro/` — 进行中的 session(仅作引用,不修改)
|
|
43
|
+
</context>
|
|
44
|
+
|
|
45
|
+
<invariants>
|
|
46
|
+
1. **不创建 session / 不写 status.json / 不调用 create_goal/update_plan** — 单次原子调用,产出由目标 skill 自行管理
|
|
47
|
+
2. **管线编排器不在候选池** — `maestro` / `maestro-ralph*` / `maestro-player` / `maestro-composer` 永远不会被推荐
|
|
48
|
+
3. **Skill 发现限定 codex 平台** — 通过 `maestro ralph skills --platform codex --json --quiet` 解析 `command_scope` + `command_path`(project 覆盖 global,限定 `.codex/skills/`);未命中即 E003
|
|
49
|
+
4. **空 intent 或 "continue/next/go/继续/下一步/接下来"** → 直接采用 lifecycle_position 推断的自然下一步
|
|
50
|
+
5. **字面命中路由表优先** — lifecycle 仅作加分;命中失败时 lifecycle 上升为决定性信号
|
|
51
|
+
6. **In-context invocation** — top pick 以 `$skill-name {args}` 形式在协调器上下文直接调用,**禁止** spawn_agent / spawn_agents_on_csv / exec_command 包装
|
|
52
|
+
7. **参数传递** — 默认 intent 原文作为第一个 arg;用户可在 S_CONFIRM 修改;`-y` 仅当用户传入时透传到 skill args
|
|
53
|
+
8. **`--list` 模式跳过 lifecycle 推断与评分**,仅按 workflow 簇分组列出全部候选
|
|
54
|
+
</invariants>
|
|
55
|
+
|
|
56
|
+
<state_machine>
|
|
57
|
+
|
|
58
|
+
<states>
|
|
59
|
+
S_PARSE — 解析 ARGUMENTS、提取 flags PERSIST: —
|
|
60
|
+
S_STATE — 读 project state、推断 lifecycle_position PERSIST: —
|
|
61
|
+
S_RANK — 路由表评分、生成 top-N candidates PERSIST: —
|
|
62
|
+
S_VALIDATE — `ralph skills --platform codex` 校验 top picks PERSIST: —
|
|
63
|
+
S_LIST — `--list` 模式:分组展示候选池 PERSIST: —
|
|
64
|
+
S_PRESENT — 显示 top pick + 备选 + 推荐理由 + 执行参数 PERSIST: —
|
|
65
|
+
S_CONFIRM — request_user_input 选择/修改参数(auto_mode 跳过) PERSIST: —
|
|
66
|
+
S_EXECUTE — 在协调器上下文以 `$skill {args}` 直调 PERSIST: —
|
|
67
|
+
S_FALLBACK — intent 空且 clarification 失败 PERSIST: —
|
|
68
|
+
</states>
|
|
69
|
+
|
|
70
|
+
<transitions>
|
|
71
|
+
|
|
72
|
+
S_PARSE:
|
|
73
|
+
→ S_LIST WHEN: --list flag
|
|
74
|
+
→ S_STATE WHEN: intent text present
|
|
75
|
+
→ S_STATE WHEN: keyword "continue"/"next"/"go"/"继续"/"下一步"/"接下来"
|
|
76
|
+
→ S_PARSE WHEN: no intent (max 1 clarify round) DO: request_user_input
|
|
77
|
+
→ S_FALLBACK WHEN: clarification empty
|
|
78
|
+
|
|
79
|
+
S_STATE:
|
|
80
|
+
→ S_RANK DO: A_INFER_LIFECYCLE
|
|
81
|
+
|
|
82
|
+
S_RANK:
|
|
83
|
+
→ S_VALIDATE DO: A_SCORE_CANDIDATES
|
|
84
|
+
|
|
85
|
+
S_VALIDATE:
|
|
86
|
+
→ S_PRESENT WHEN: top pick 命中 codex skill 池 DO: A_RESOLVE_COMMAND_PATH
|
|
87
|
+
→ S_PRESENT WHEN: top pick missing → 降级到下一个候选 DO: A_RESOLVE_COMMAND_PATH
|
|
88
|
+
→ S_FALLBACK WHEN: top-N 全部 missing DO: raise E003
|
|
89
|
+
|
|
90
|
+
S_LIST:
|
|
91
|
+
→ END DO: A_LIST_BY_CLUSTER
|
|
92
|
+
|
|
93
|
+
S_PRESENT:
|
|
94
|
+
→ END WHEN: --dry-run
|
|
95
|
+
→ S_EXECUTE WHEN: -y / --yes
|
|
96
|
+
→ S_CONFIRM WHEN: not auto_mode
|
|
97
|
+
|
|
98
|
+
S_CONFIRM:
|
|
99
|
+
→ S_EXECUTE WHEN: 用户确认 top pick / 选备选 / 改参数
|
|
100
|
+
→ END WHEN: 用户取消
|
|
101
|
+
|
|
102
|
+
S_EXECUTE:
|
|
103
|
+
→ END DO: A_INVOKE_SKILL → 输出 "✓ executed $<skill>"
|
|
104
|
+
|
|
105
|
+
S_FALLBACK:
|
|
106
|
+
→ END DO: raise E001
|
|
107
|
+
|
|
108
|
+
</transitions>
|
|
109
|
+
|
|
110
|
+
<actions>
|
|
111
|
+
|
|
112
|
+
### A_INFER_LIFECYCLE
|
|
113
|
+
|
|
114
|
+
读 project state 推断 `lifecycle_position`(核心信号):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
cat .workflow/state.json 2>/dev/null # phase / milestone / artifacts
|
|
118
|
+
ls -la .workflow/scratch/ 2>/dev/null | head -10 # 最近 artifact (mtime DESC)
|
|
119
|
+
ls -la .workflow/.maestro/ 2>/dev/null | head -5 # 进行中的 session
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**项目状态 → lifecycle_position → 自然下一步:**
|
|
123
|
+
|
|
124
|
+
| 项目状态 | lifecycle_position | 自然下一步 |
|
|
125
|
+
|---------|-------------------|-----------|
|
|
126
|
+
| 无 `.workflow/` + 无源码 | brainstorm | `maestro-brainstorm` |
|
|
127
|
+
| 无 `.workflow/` + 有源码 | init | `maestro-init` |
|
|
128
|
+
| 有 state.json,无 roadmap,无 milestones | analyze-macro | `maestro-analyze` (宏观调研) |
|
|
129
|
+
| 有 macro analyze artifact,无 roadmap | roadmap | `maestro-roadmap` |
|
|
130
|
+
| 有 roadmap,未启动 phase | analyze | `maestro-analyze {phase}` |
|
|
131
|
+
| 最新 artifact = analyze | plan | `maestro-plan {phase}` |
|
|
132
|
+
| 最新 artifact = plan | execute | `maestro-execute {phase}` |
|
|
133
|
+
| 最新 artifact = execute | verify | `maestro-verify {phase}` |
|
|
134
|
+
| verify passed | review | `quality-review {phase}` |
|
|
135
|
+
| review verdict=PASS | test-gen | `quality-auto-test {phase}` |
|
|
136
|
+
| 测试全绿 | milestone-audit | `maestro-milestone-audit` |
|
|
137
|
+
| 当前 milestone 全 phase 完成 | milestone-complete | `maestro-milestone-complete` |
|
|
138
|
+
| 任一 stage 产物含 gaps/failed | debug | `quality-debug {gap}` |
|
|
139
|
+
|
|
140
|
+
**Maestro Lifecycle 主线:**
|
|
141
|
+
```
|
|
142
|
+
brainstorm → blueprint → init → analyze-macro → roadmap
|
|
143
|
+
→ [per phase] analyze → plan → execute → verify
|
|
144
|
+
→ [quality gate] review → auto-test → test
|
|
145
|
+
→ milestone-audit → milestone-complete → milestone-release
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### A_SCORE_CANDIDATES
|
|
149
|
+
|
|
150
|
+
**评分信号**(高→低):
|
|
151
|
+
|
|
152
|
+
| 信号 | 权重 | 说明 |
|
|
153
|
+
|------|------|------|
|
|
154
|
+
| intent 命中路由表关键词 | 高 | 字面匹配主依据 |
|
|
155
|
+
| **lifecycle 自然下一步** | **高** | 空 intent / "continue" / "next" 时为决定性 |
|
|
156
|
+
| `name` 关键词命中 intent | 中 | intent 含 "test" → quality-test/quality-auto-test 加分 |
|
|
157
|
+
| Workflow 簇匹配 | 中 | intent 涉及学习/知识/issue 等场景触发对应簇 |
|
|
158
|
+
| Recent activity 反向避免 | 低 | 刚完成的 stage 短期内降权 |
|
|
159
|
+
|
|
160
|
+
**特殊意图处理:**
|
|
161
|
+
|
|
162
|
+
| Intent 模式 | top pick |
|
|
163
|
+
|------------|---------|
|
|
164
|
+
| 空 / "continue" / "next" / "go" / "继续" / "下一步" / "接下来" | lifecycle 自然下一步 |
|
|
165
|
+
| "status" / "状态" / "现在到哪了" | `manage-status` |
|
|
166
|
+
| 字面命中路由表 | 路由表优先(lifecycle 仅加分) |
|
|
167
|
+
| 无任何匹配 | lifecycle 下一步 + raise W002 |
|
|
168
|
+
|
|
169
|
+
**意图 → skill 路由表**(候选池):
|
|
170
|
+
|
|
171
|
+
| 意图关键词 | 推荐 skill |
|
|
172
|
+
|-----------|-----------|
|
|
173
|
+
| 头脑风暴 / 探索 / brainstorm / ideate | `maestro-brainstorm` |
|
|
174
|
+
| 规格 / 正式文档 / spec-generate / blueprint | `maestro-blueprint` |
|
|
175
|
+
| 分析 / analyze / 多维度调研 | `maestro-analyze` |
|
|
176
|
+
| 规划 / plan / 任务分解 | `maestro-plan` |
|
|
177
|
+
| 实现 / 执行 / execute | `maestro-execute` |
|
|
178
|
+
| 验证 / verify / 验收 | `maestro-verify` |
|
|
179
|
+
| 调试 / debug / 排查 / bug | `quality-debug` |
|
|
180
|
+
| 审查 / review / 代码审查 | `quality-review` |
|
|
181
|
+
| 测试 / test / UAT | `quality-test` / `quality-auto-test` |
|
|
182
|
+
| 重构 / refactor / 技术债 | `quality-refactor` |
|
|
183
|
+
| 同步文档 / sync docs | `quality-sync` |
|
|
184
|
+
| 回顾 / retro | `quality-retrospective` / `learn-retro` |
|
|
185
|
+
| issue / 缺陷管理 | `manage-issue` / `manage-issue-discover` |
|
|
186
|
+
| wiki / 知识图谱 | `manage-wiki` / `wiki-connect` / `wiki-digest` |
|
|
187
|
+
| spec / 规则 / 约束 | `spec-load` / `spec-add` / `spec-setup` |
|
|
188
|
+
| 项目初始化 / init | `maestro-init` |
|
|
189
|
+
| 状态 / status / 仪表盘 | `manage-status` |
|
|
190
|
+
| 文档重建 / codebase 文档 | `manage-codebase-rebuild` / `manage-codebase-refresh` |
|
|
191
|
+
| 安全 / security / OWASP | `security-audit` |
|
|
192
|
+
| 跟读 / 学习 / 阅读源码 | `learn-follow` / `learn-investigate` |
|
|
193
|
+
| 第二意见 / challenge / consult | `learn-second-opinion` |
|
|
194
|
+
| 提取知识 / harvest | `manage-harvest` / `manage-knowhow-capture` |
|
|
195
|
+
| 设计 / UI / 前端打磨 | `maestro-impeccable` |
|
|
196
|
+
| 里程碑 / milestone | `maestro-milestone-audit` / `maestro-milestone-release` / `maestro-milestone-complete` |
|
|
197
|
+
| fork / 分支 / 并行开发 | `maestro-fork` / `maestro-merge` |
|
|
198
|
+
| 覆盖层 / overlay / amend | `maestro-overlay` / `maestro-amend` |
|
|
199
|
+
|
|
200
|
+
**辅助 workflow 簇**(场景触发,非主线):
|
|
201
|
+
|
|
202
|
+
| 簇 | 触发 | 主推链路 |
|
|
203
|
+
|----|------|---------|
|
|
204
|
+
| Learning | 接触新代码/未知模块 | `learn-follow` → `learn-decompose` → `learn-second-opinion` |
|
|
205
|
+
| Knowledge | 提炼经验 / 沉淀知识 | `manage-harvest` → `manage-knowhow-capture` → `spec-add` |
|
|
206
|
+
| Wiki | 知识图谱整理 | `manage-wiki` → `wiki-connect` → `wiki-digest` |
|
|
207
|
+
| Issue | 缺陷管理 | `manage-issue-discover` → `manage-issue` |
|
|
208
|
+
| 文档同步 | 代码大改后 | `quality-sync` → `manage-codebase-refresh` |
|
|
209
|
+
| 重构 | 技术债积累 | `quality-refactor` → `quality-review` |
|
|
210
|
+
| 发布 | 里程碑结束 | `maestro-milestone-audit` → `maestro-milestone-release` |
|
|
211
|
+
| 并行开发 | 多 milestone 并行 | `maestro-fork` → ... → `maestro-merge` |
|
|
212
|
+
|
|
213
|
+
输出 ranked candidates,取 top N(默认 3)。
|
|
214
|
+
|
|
215
|
+
### A_RESOLVE_COMMAND_PATH
|
|
216
|
+
|
|
217
|
+
校验候选 skill 在 codex 平台可用:
|
|
218
|
+
|
|
219
|
+
1. `Bash("maestro ralph skills --platform codex --json --quiet")` — 一次性拉取 codex 可用 skills(project `.codex/skills/` 覆盖 global `~/.codex/skills/`)
|
|
220
|
+
2. 对每个 candidate 匹配 skill 名:
|
|
221
|
+
- 命中 → `command_scope ∈ {global, project}`, `command_path = <abs SKILL.md path>`
|
|
222
|
+
- 未命中 → `command_scope = "missing"`,从候选列表剔除
|
|
223
|
+
3. top pick missing → 降级到下一候选;top-N 全部 missing → S_FALLBACK 报 E003
|
|
224
|
+
|
|
225
|
+
### A_LIST_BY_CLUSTER
|
|
226
|
+
|
|
227
|
+
按 workflow 簇(**主线** / Learning / Knowledge / Wiki / Issue / 文档 / 重构 / 发布 / 并行)分组展示全部候选 + description。每项标 `[project|global]` scope,便于用户判断来源。
|
|
228
|
+
|
|
229
|
+
### A_INVOKE_SKILL
|
|
230
|
+
|
|
231
|
+
在协调器上下文以 `$skill-name {args}` 直接调用(**NO spawn_agent, NO exec_command 包装**):
|
|
232
|
+
|
|
233
|
+
1. 解析最终 args:
|
|
234
|
+
- 默认:`{intent}`(原文,去除已识别的关键词如 "continue")
|
|
235
|
+
- 用户改过:使用用户输入
|
|
236
|
+
- `-y` 透传:附加 `-y`(仅当用户传入且目标 skill 支持)
|
|
237
|
+
2. 在响应中直接写出调用指令,例如:`$maestro-analyze "优化登录流程"`
|
|
238
|
+
3. 读取目标 skill 产出后输出 `✓ executed $<skill-name>`
|
|
239
|
+
4. 不修改任何 `.workflow/` 文件;不创建 session;不触发后续 chain
|
|
240
|
+
|
|
241
|
+
</actions>
|
|
242
|
+
|
|
243
|
+
</state_machine>
|
|
244
|
+
|
|
245
|
+
<presentation>
|
|
246
|
+
|
|
247
|
+
### `--list` 模式
|
|
248
|
+
|
|
249
|
+
按 workflow 簇分组展示全部候选 + description + `[project|global]` scope,结束。
|
|
250
|
+
|
|
251
|
+
### 正常模式
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
🎯 推荐 (top pick): $<skill-name> [project|global]
|
|
255
|
+
<description>
|
|
256
|
+
推荐理由: <命中规则 + lifecycle 位置一句话>
|
|
257
|
+
|
|
258
|
+
备选:
|
|
259
|
+
2. $<alt-1> [scope] — <description>
|
|
260
|
+
3. $<alt-2> [scope] — <description>
|
|
261
|
+
|
|
262
|
+
执行参数: <args>
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
`--dry-run` 展示后结束;`-y` 直接 S_EXECUTE;否则 `request_user_input` 提供:执行 top pick / 选备选 / 修改参数 / 取消。
|
|
266
|
+
|
|
267
|
+
</presentation>
|
|
268
|
+
|
|
269
|
+
<appendix>
|
|
270
|
+
|
|
271
|
+
### Error Codes
|
|
272
|
+
|
|
273
|
+
| Code | Severity | Condition | Recovery |
|
|
274
|
+
|------|----------|-----------|----------|
|
|
275
|
+
| E001 | error | intent 空且 clarification 后仍空 | 提供意图描述或使用 `--list` 浏览 |
|
|
276
|
+
| E002 | error | codex skill 池为空(`maestro ralph skills --platform codex` 无结果) | 检查 `.codex/skills/` 与 `~/.codex/skills/` |
|
|
277
|
+
| E003 | error | 选定命令在 codex 平台未命中(`command_scope == "missing"`) | 列出 codex 可用 skill 让用户重选 |
|
|
278
|
+
| W001 | warning | top1 与 top2 得分差距 < 阈值 | 强制展示前 3 让用户裁决 |
|
|
279
|
+
| W002 | warning | intent 与所有候选匹配度均低 | 提示考虑 `$maestro` 或 `$maestro-ralph` 走管线 |
|
|
280
|
+
|
|
281
|
+
### Success Criteria
|
|
282
|
+
|
|
283
|
+
- [ ] Intent 解析 + flags 提取完成
|
|
284
|
+
- [ ] 读取 `.workflow/state.json` + scratch artifacts 推断 lifecycle_position
|
|
285
|
+
- [ ] 候选池等于路由表(管线编排器不在)
|
|
286
|
+
- [ ] 评分综合:intent 字面匹配 + lifecycle 下一步 + workflow 簇 + recent activity
|
|
287
|
+
- [ ] 空 intent / "continue" / "next" → 直接采用 lifecycle 推断的下一步
|
|
288
|
+
- [ ] top pick 展示附"推荐理由"(命中规则 + lifecycle 位置)
|
|
289
|
+
- [ ] `maestro ralph skills --platform codex --json --quiet` 校验 top picks;missing 降级到下一候选
|
|
290
|
+
- [ ] `--dry-run` 仅展示,不执行
|
|
291
|
+
- [ ] `-y` 自动执行 top pick;用户传入时透传到 skill args
|
|
292
|
+
- [ ] 非自动模式通过 `request_user_input` 确认或选备选
|
|
293
|
+
- [ ] 选定 skill 在协调器上下文以 `$skill {args}` 直调(NO spawn_agent / NO exec_command 包装)
|
|
294
|
+
- [ ] 不创建 session / 不生成 status.json / 不调用 create_goal/update_plan / 不触发后续 chain
|
|
295
|
+
- [ ] `--list` 模式按 workflow 簇分组展示,每项标 `[project|global]` scope
|
|
296
|
+
|
|
297
|
+
</appendix>
|
|
@@ -154,8 +154,41 @@ S_REGISTER → END DO: A_REGISTER
|
|
|
154
154
|
|
|
155
155
|
<actions>
|
|
156
156
|
|
|
157
|
+
### Shared Spawn Contract (W1 and W2)
|
|
158
|
+
|
|
159
|
+
Every `spawn_agents_on_csv` call MUST filter `wave==N AND status=="pending"` rows from master tasks.csv, use the strict JSON Schema below, and embed the termination contract.
|
|
160
|
+
|
|
161
|
+
**Output Schema**:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"type": "object",
|
|
166
|
+
"properties": {
|
|
167
|
+
"id": { "type": "string" },
|
|
168
|
+
"result_status": { "type": "string", "enum": ["completed", "failed", "blocked"] },
|
|
169
|
+
"findings": { "type": "string", "maxLength": 500 },
|
|
170
|
+
"files_modified":{ "type": "string", "description": "Semicolon-separated paths (W2 writes plan.json + .task/*)" },
|
|
171
|
+
"error": { "type": "string" }
|
|
172
|
+
},
|
|
173
|
+
"required": ["id", "result_status", "findings"]
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Merge: `result_status` → master `status`; copy `findings`, `files_modified`, `error`.
|
|
178
|
+
|
|
179
|
+
**Termination contract** (embed in every instruction):
|
|
180
|
+
```
|
|
181
|
+
You MUST call report_agent_job_result EXACTLY ONCE before exiting.
|
|
182
|
+
- Success → result_status=completed (W2: plan.json AND .task/* MUST exist on disk before reporting completed)
|
|
183
|
+
- Failure → result_status=failed with error message
|
|
184
|
+
- Blocked → upstream context insufficient → result_status=blocked
|
|
185
|
+
- Timeout → near max_runtime_seconds → result_status=blocked, error="timeout"
|
|
186
|
+
- NEVER continue indefinitely. NEVER exit silently. NEVER omit the call.
|
|
187
|
+
Do NOT write to tasks.csv, wave-*.csv, results.csv, state.json. Do NOT call spawn_agents_on_csv (no recursion).
|
|
188
|
+
```
|
|
189
|
+
|
|
157
190
|
### Exploration agent responsibilities (W1)
|
|
158
|
-
Each explores one angle: architecture (module boundaries, deps), patterns (similar implementations), tests (framework, conventions), risks (complexity, blockers). Reads files, maps dependencies, shares via discoveries.ndjson.
|
|
191
|
+
Each explores one angle: architecture (module boundaries, deps), patterns (similar implementations), tests (framework, conventions), risks (complexity, blockers). Reads files, maps dependencies, shares via discoveries.ndjson. Read-only — does NOT write plan.json.
|
|
159
192
|
|
|
160
193
|
### Planning agent responsibilities (W2)
|
|
161
194
|
Consumes all exploration findings + context.md + specs. Produces:
|
|
@@ -163,6 +196,8 @@ Consumes all exploration findings + context.md + specs. Produces:
|
|
|
163
196
|
- `.task/TASK-*.json`: each with read_first[], convergence.criteria[] (grep-verifiable), concrete action/implementation
|
|
164
197
|
- Deep Work Rules: every task has read_first with file being modified + source of truth files
|
|
165
198
|
|
|
199
|
+
Verifies plan.json and every .task/*.json exists on disk before reporting completed; else report blocked.
|
|
200
|
+
|
|
166
201
|
### A_PLAN_CHECK
|
|
167
202
|
Run plan-checker: coverage, dependency validity, criteria quality, pressure pass on highest-complexity task.
|
|
168
203
|
Confidence: 5-dimension factor model + readiness gate.
|