maestro-flow 0.4.19 → 0.4.20
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/agents/workflow-collab-planner.md +4 -1
- package/.agents/agents/workflow-plan-checker.md +11 -1
- package/.agents/agents/workflow-planner.md +4 -1
- package/.agents/skills/maestro/SKILL.md +8 -5
- package/.agents/skills/maestro-analyze/SKILL.md +1 -1
- package/.agents/skills/maestro-brainstorm/SKILL.md +2 -1
- package/.agents/skills/maestro-companion/SKILL.md +533 -0
- package/.agents/skills/maestro-grill/SKILL.md +116 -0
- package/.agents/skills/maestro-plan/SKILL.md +4 -0
- package/.agents/skills/maestro-ralph/SKILL.md +11 -7
- package/.agents/skills/maestro-swarm-workflow/SKILL.md +258 -0
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +13 -1
- package/.agents/skills/manage-codebase-refresh/SKILL.md +3 -0
- package/.agents/skills/spec-setup/SKILL.md +9 -5
- package/.agy/agents/workflow-collab-planner.md +4 -1
- package/.agy/agents/workflow-plan-checker.md +11 -1
- package/.agy/agents/workflow-planner.md +4 -1
- package/.agy/skills/maestro/SKILL.md +8 -5
- package/.agy/skills/maestro-analyze/SKILL.md +1 -1
- package/.agy/skills/maestro-brainstorm/SKILL.md +2 -1
- package/.agy/skills/maestro-companion/SKILL.md +529 -0
- package/.agy/skills/maestro-grill/SKILL.md +116 -0
- package/.agy/skills/maestro-plan/SKILL.md +4 -0
- package/.agy/skills/maestro-ralph/SKILL.md +11 -7
- package/.agy/skills/maestro-swarm-workflow/SKILL.md +255 -0
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +13 -1
- package/.agy/skills/manage-codebase-refresh/SKILL.md +3 -0
- package/.agy/skills/spec-setup/SKILL.md +9 -5
- package/.claude/agents/workflow-collab-planner.md +4 -1
- package/.claude/agents/workflow-plan-checker.md +11 -1
- package/.claude/agents/workflow-planner.md +4 -1
- package/.claude/commands/maestro-analyze.md +1 -1
- package/.claude/commands/maestro-brainstorm.md +2 -1
- package/.claude/commands/maestro-companion.md +531 -0
- package/.claude/commands/maestro-grill.md +114 -0
- package/.claude/commands/maestro-plan.md +4 -0
- package/.claude/commands/maestro-ralph.md +11 -7
- package/.claude/commands/maestro-swarm-workflow.md +256 -0
- package/.claude/commands/maestro.md +8 -5
- package/.claude/commands/manage-codebase-rebuild.md +13 -1
- package/.claude/commands/manage-codebase-refresh.md +3 -0
- package/.claude/commands/spec-setup.md +9 -5
- package/.codex/skills/maestro/SKILL.md +7 -2
- package/.codex/skills/maestro-companion/SKILL.md +485 -0
- package/.codex/skills/maestro-grill/SKILL.md +111 -0
- package/.codex/skills/maestro-ralph/SKILL.md +11 -7
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +6 -0
- package/.codex/skills/manage-codebase-refresh/SKILL.md +6 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.d.ts +36 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js +138 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +13 -0
- 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 +11 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +178 -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 +39 -23
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dist/src/cli.js +1 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +7 -0
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +14 -0
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +18 -0
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/kg.d.ts +11 -0
- package/dist/src/commands/kg.d.ts.map +1 -0
- package/dist/src/commands/kg.js +515 -0
- package/dist/src/commands/kg.js.map +1 -0
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +10 -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 +10 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +9 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.d.ts +1 -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 +22 -0
- 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 +23 -5
- 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 +6 -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/tui/install-ui/KgVendorConfig.d.ts +7 -0
- package/dist/src/tui/install-ui/KgVendorConfig.d.ts.map +1 -0
- package/dist/src/tui/install-ui/KgVendorConfig.js +9 -0
- package/dist/src/tui/install-ui/KgVendorConfig.js.map +1 -0
- package/dist/src/utils/update-notices.js +11 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +1 -1
- package/workflows/analyze.md +2 -1
- package/workflows/brainstorm.md +24 -1
- package/workflows/codebase-rebuild.md +141 -1
- package/workflows/codebase-refresh.md +20 -0
- package/workflows/finish-work.md +7 -2
- package/workflows/grill.md +513 -0
- package/workflows/plan.md +7 -4
- package/workflows/specs-setup.md +99 -3
- package/workflows/swarm/wf-analyze.js +186 -0
- package/workflows/swarm/wf-brainstorm.js +284 -0
- package/workflows/swarm/wf-execute.js +203 -0
- package/workflows/swarm/wf-grill.js +198 -0
- package/workflows/swarm/wf-milestone-audit.js +236 -0
- package/workflows/swarm/wf-plan.js +233 -0
- package/workflows/swarm/wf-review.js +226 -0
- package/workflows/swarm/wf-verify.js +298 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-grill
|
|
3
|
+
description: Use when stress-testing a plan, idea, or requirement against codebase reality before brainstorming
|
|
4
|
+
argument-hint: "<topic|plan> [-y] [-c] [--from <source>] [--depth shallow|standard|deep]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- read_file
|
|
7
|
+
- write_file
|
|
8
|
+
- edit_file
|
|
9
|
+
- shell
|
|
10
|
+
- find_files
|
|
11
|
+
- search
|
|
12
|
+
- delegate_subagent
|
|
13
|
+
- ask_user
|
|
14
|
+
---
|
|
15
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
16
|
+
|
|
17
|
+
<purpose>
|
|
18
|
+
Socratic stress-testing of a plan, idea, or requirement against codebase reality. Walks every branch of the decision tree one question at a time — challenging vague terminology against existing code, probing edge cases with concrete scenarios, and verifying assumptions with code evidence. Produces a verified context package (grill-report.md + terminology.md + context-package.json) for downstream brainstorm/analyze/roadmap consumption.
|
|
19
|
+
|
|
20
|
+
Positioned BEFORE brainstorm in the pipeline: grill stress-tests and sharpens; brainstorm generates and elaborates.
|
|
21
|
+
</purpose>
|
|
22
|
+
|
|
23
|
+
<required_reading>
|
|
24
|
+
@~/.maestro/workflows/grill.md
|
|
25
|
+
</required_reading>
|
|
26
|
+
|
|
27
|
+
<deferred_reading>
|
|
28
|
+
- [state.json](~/.maestro/templates/state.json) — read when registering artifact
|
|
29
|
+
</deferred_reading>
|
|
30
|
+
|
|
31
|
+
<context>
|
|
32
|
+
$ARGUMENTS -- topic/plan text for interactive mode, or --from source for upstream input.
|
|
33
|
+
|
|
34
|
+
**Mode selection:**
|
|
35
|
+
- **Interactive mode** (default): Topic text triggers full Socratic grilling with user Q&A
|
|
36
|
+
- **Auto mode** (`-y`): Code exploration answers questions instead of the user
|
|
37
|
+
- **Resume mode** (`-c` or `--session ID`): Continue from a previous grill session
|
|
38
|
+
|
|
39
|
+
**Flags:**
|
|
40
|
+
- `-y` / `--yes`: Auto mode — CLI exploration replaces human answers
|
|
41
|
+
- `-c` / `--continue`: Resume from last grill session
|
|
42
|
+
- `--session ID`: Resume specific session
|
|
43
|
+
- `--depth shallow|standard|deep`: Branch count 3/5/8 (default: standard)
|
|
44
|
+
- `--from <source>`: Load upstream material (`blueprint:ID`, `@file`, or path)
|
|
45
|
+
|
|
46
|
+
**Output directory**: `.workflow/scratch/{YYYYMMDD}-grill-{slug}/`
|
|
47
|
+
**Produced files**: `grill-report.md`, `terminology.md`, `context-package.json`
|
|
48
|
+
|
|
49
|
+
### Role Knowledge
|
|
50
|
+
`maestro wiki search "{topic keywords}"` → load relevant entries before grilling.
|
|
51
|
+
`maestro spec load --category arch` → load architecture constraints.
|
|
52
|
+
</context>
|
|
53
|
+
|
|
54
|
+
<interview_protocol>
|
|
55
|
+
Grill the user relentlessly until every branch of the decision tree is walked. This is NOT a menu-driven interview — it is adversarial Socratic questioning. Active only in interactive mode; skip when `-y/--yes` or `-c/--continue`.
|
|
56
|
+
|
|
57
|
+
Core protocol:
|
|
58
|
+
- **One question per turn**. Each question probes ONE specific aspect. Never ask compound questions.
|
|
59
|
+
- **Code-grounded**: Before asking, search the codebase for evidence. Use findings to sharpen the question or challenge the user's answer. Never ask what code can verify — search first, then confront.
|
|
60
|
+
- **Escalating depth**: Start with scope boundaries, progress to data model, edge cases, failure modes. Each branch goes basic → specific → adversarial.
|
|
61
|
+
- **Immediate writeback**: After each answered question, immediately append the Q&A + decision to `grill-report.md`. Do NOT batch — partial progress must be on disk before the next question.
|
|
62
|
+
- **Challenge contradictions**: If an answer conflicts with code evidence or a prior answer, immediately surface the contradiction and demand resolution.
|
|
63
|
+
- **Terminology enforcement**: When the user uses a term that conflicts with codebase naming, challenge it immediately. Propose the code-consistent alternative. Update `terminology.md` as terms crystallize.
|
|
64
|
+
|
|
65
|
+
Question framing rules:
|
|
66
|
+
- Reference specific code findings: "The codebase uses `{symbol}` at `{file:line}` — your proposal calls it `{term}`. Which wins?"
|
|
67
|
+
- Use concrete scenarios: "What happens when a user does {action} while {condition} is true?"
|
|
68
|
+
- Probe boundaries: "You said {X} is in scope — does that include {edge_case}, or is that separate?"
|
|
69
|
+
- Challenge scale: "This touches `{table}` — at 10x current data volume, which query breaks first?"
|
|
70
|
+
|
|
71
|
+
Branch walking order: Scope & Boundaries → Data Model & State → Edge Cases & Failure Modes → Integration & Dependencies → Scale & Performance → Security & Access Control → Observability & Operations → Migration & Rollback. Number of branches determined by `--depth`.
|
|
72
|
+
|
|
73
|
+
Exit: When all depth-selected branches are fully walked (every question answered or explicitly deferred), finalize the report and generate context-package.json.
|
|
74
|
+
</interview_protocol>
|
|
75
|
+
|
|
76
|
+
<execution>
|
|
77
|
+
Follow '~/.maestro/workflows/grill.md' completely.
|
|
78
|
+
|
|
79
|
+
**Next-step routing on completion:**
|
|
80
|
+
|
|
81
|
+
Standard routing:
|
|
82
|
+
- Need multi-role elaboration → invoke_skill({ skill: "maestro-brainstorm", args: "{topic} --from grill:{artifact_id}" })
|
|
83
|
+
- Need deep technical analysis → invoke_skill({ skill: "maestro-analyze", args: "{topic} --from grill:{artifact_id}" })
|
|
84
|
+
- Scope is clear, ready for roadmap → invoke_skill({ skill: "maestro-roadmap", args: "--from grill:{artifact_id}" })
|
|
85
|
+
- Need formal spec package → invoke_skill({ skill: "maestro-blueprint", args: "--from grill:{artifact_id}" })
|
|
86
|
+
|
|
87
|
+
Resume routing:
|
|
88
|
+
- More branches to walk → invoke_skill({ skill: "maestro-grill", args: "{topic} -c" })
|
|
89
|
+
</execution>
|
|
90
|
+
|
|
91
|
+
<error_codes>
|
|
92
|
+
| Code | Severity | Condition | Recovery |
|
|
93
|
+
|------|----------|-----------|----------|
|
|
94
|
+
| E001 | error | No topic/plan and no --from/--continue flag | Prompt user for topic text |
|
|
95
|
+
| E002 | error | --session ID not found | Show available sessions |
|
|
96
|
+
| W001 | warning | Codebase scan failed or returned empty | Continue without code grounding, note limitation |
|
|
97
|
+
| W002 | warning | CLI exploration timeout in auto mode | Skip question, mark as open |
|
|
98
|
+
| W003 | warning | Max branch depth reached without resolution | Force synthesis, offer continuation |
|
|
99
|
+
</error_codes>
|
|
100
|
+
|
|
101
|
+
<success_criteria>
|
|
102
|
+
- [ ] Interactive mode: all depth-selected branches walked (shallow=3, standard=5, deep=8)
|
|
103
|
+
- [ ] Each branch has >= 2 question-answer pairs with evidence or explicit user input
|
|
104
|
+
- [ ] `grill-report.md` written with Branch Log table, all Q&A entries, synthesis section
|
|
105
|
+
- [ ] `terminology.md` written with >= 5 terms, code references where applicable
|
|
106
|
+
- [ ] Every locked decision has evidence (code reference or explicit user confirmation)
|
|
107
|
+
- [ ] Contradictions between answers and code surfaced and resolved (or logged as risks)
|
|
108
|
+
- [ ] Risk register captures all unresolved tensions
|
|
109
|
+
- [ ] `context-package.json` generated with schema "context-package/1.0"
|
|
110
|
+
- [ ] Artifact registered in state.json (type=grill, id=GRL-xxx)
|
|
111
|
+
- [ ] Session sealed via finish-work
|
|
112
|
+
</success_criteria>
|
|
113
|
+
|
|
114
|
+
<on_complete>
|
|
115
|
+
@~/.maestro/workflows/finish-work.md — SESSION_DIR={output_dir}, SESSION_TYPE=grill, SESSION_ID={artifact_id}, LINKED_MILESTONE=null
|
|
116
|
+
</on_complete>
|
|
@@ -75,6 +75,10 @@ If exit code is 1, present warnings and ask whether to proceed.
|
|
|
75
75
|
|
|
76
76
|
Follow '~/.maestro/workflows/plan.md' completely.
|
|
77
77
|
|
|
78
|
+
### P3 Agent Constraint (MANDATORY)
|
|
79
|
+
|
|
80
|
+
Main flow **MUST** spawn a planner agent (Agent tool) for P3 planning — inline planning by main flow is FORBIDDEN. The agent produces both `plan.json` and `.task/TASK-*.json` files. Main flow only passes context and validates output.
|
|
81
|
+
|
|
78
82
|
### Codebase Docs Loading (P1 addition)
|
|
79
83
|
|
|
80
84
|
During P1 Context Collection, after loading context files, load codebase documentation if available:
|
|
@@ -131,20 +131,20 @@ S_INFER:
|
|
|
131
131
|
|
|
132
132
|
S_RESOLVE_SCOPE:
|
|
133
133
|
→ S_QUALITY_MODE DO: A_RESOLVE_SCOPE_VERDICT
|
|
134
|
-
GUARD: position ∈ {brainstorm, blueprint, init} → skip (scope_verdict = null)
|
|
134
|
+
GUARD: position ∈ {grill, brainstorm, blueprint, init} → skip (scope_verdict = null)
|
|
135
135
|
|
|
136
136
|
S_QUALITY_MODE:
|
|
137
137
|
→ S_PLANNING_MODE DO: A_DETERMINE_QUALITY_MODE
|
|
138
138
|
|
|
139
139
|
S_PLANNING_MODE:
|
|
140
140
|
→ S_DECOMPOSE DO: A_DETERMINE_PLANNING_MODE
|
|
141
|
-
GUARD: lifecycle_position ∈ {brainstorm, blueprint, init, analyze-macro, roadmap} → skip (force independent)
|
|
141
|
+
GUARD: lifecycle_position ∈ {grill, brainstorm, blueprint, init, analyze-macro, roadmap} → skip (force independent)
|
|
142
142
|
|
|
143
143
|
S_DECOMPOSE:
|
|
144
144
|
→ S_BUILD_CHAIN DO: A_DECOMPOSE_TASKS
|
|
145
145
|
GUARD: broad intent → MUST clarify boundary even if auto_confirm
|
|
146
146
|
GUARD: narrow intent → auto-derive, skip questions
|
|
147
|
-
GUARD: position ∈ {brainstorm, blueprint, init} → skip decomposition
|
|
147
|
+
GUARD: position ∈ {grill, brainstorm, blueprint, init} → skip decomposition
|
|
148
148
|
|
|
149
149
|
S_BUILD_CHAIN:
|
|
150
150
|
→ S_CREATE_SESSION DO: A_BUILD_STEPS
|
|
@@ -244,6 +244,7 @@ resolve_milestone(phase_number):
|
|
|
244
244
|
|
|
245
245
|
| Pattern | Position |
|
|
246
246
|
|---------|----------|
|
|
247
|
+
| 压力测试 / 拷问 / 验证假设 / grill / stress-test | `grill`(**auto_confirm=true 时跳过,直接 `brainstorm`**) |
|
|
247
248
|
| brainstorm / 头脑风暴 / 探索 / ideate / 设计思路 | `brainstorm` |
|
|
248
249
|
| blueprint / 规格 / 正式文档 / spec-generate / 7-phase | `blueprint` |
|
|
249
250
|
| broad/medium intent 无数字 phase (重构/全面/重写/迁移/新功能 X) | `analyze-macro` |
|
|
@@ -264,7 +265,7 @@ resolve_milestone(phase_number):
|
|
|
264
265
|
| `phase_is_new == true` (新 phase) | `analyze` |
|
|
265
266
|
| no milestones AND no roadmap.md AND has analyze macro artifact | `roadmap` |
|
|
266
267
|
| no milestones AND no roadmap.md AND no analyze artifact | `analyze-macro` |
|
|
267
|
-
| `phase == null` (brainstorm/blueprint/init/roadmap/analyze-macro override 已定) | n/a |
|
|
268
|
+
| `phase == null` (grill/brainstorm/blueprint/init/roadmap/analyze-macro override 已定) | n/a |
|
|
268
269
|
| phase 已存在 + 无任何 artifact | `analyze` |
|
|
269
270
|
| phase 已存在 + 最新 artifact = analyze | `plan` |
|
|
270
271
|
| phase 已存在 + 最新 artifact = plan | `execute` |
|
|
@@ -319,7 +320,7 @@ resolve_milestone(phase_number):
|
|
|
319
320
|
|
|
320
321
|
| Condition | Mode | Reason |
|
|
321
322
|
|-----------|------|--------|
|
|
322
|
-
| lifecycle_position ∈ {brainstorm, init, roadmap} | `independent` | 前期阶段不涉及多 phase 规划 |
|
|
323
|
+
| lifecycle_position ∈ {grill, brainstorm, init, roadmap} | `independent` | 前期阶段不涉及多 phase 规划 |
|
|
323
324
|
| `phase_is_new == true` | `independent` | 新 phase 尚无里程碑上下文 |
|
|
324
325
|
| intent 显式指定 phase 编号(如 "phase 2"、"P3") | `independent` | 用户明确针对单个 phase |
|
|
325
326
|
| milestone 仅含 1 个 phase(读 state.json) | `independent` | 统一无意义 |
|
|
@@ -382,7 +383,8 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
382
383
|
|
|
383
384
|
| Stage | invoke_skill(independent) | invoke_skill(unified) | Decision after | quality_mode |
|
|
384
385
|
|-------|---------------------|-----------------|----------------|--------------|
|
|
385
|
-
|
|
|
386
|
+
| grill | `maestro-grill "{intent}"` | *(same)* | — | all (**skip when auto_confirm**) |
|
|
387
|
+
| brainstorm | `maestro-brainstorm "{intent}" --from grill:{grill_id}` *(if grill ran)* / `maestro-brainstorm "{intent}"` *(otherwise)* | *(same)* | — | all |
|
|
386
388
|
| blueprint | `maestro-blueprint "{intent}"` | *(same)* | — | all |
|
|
387
389
|
| init | `maestro-init` | *(same)* | — | all |
|
|
388
390
|
| analyze-macro | `maestro-analyze "{intent}"` | *(same)* | `post-analyze-scope` | all |
|
|
@@ -407,6 +409,7 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
407
409
|
1. **起点**:从 `session.lifecycle_position` 开始
|
|
408
410
|
2. **跳过已完成**:跳过当前 milestone+phase 下已有 completed artifact 的 stage(按 `session.phase` 过滤);unified 按 milestone 过滤
|
|
409
411
|
3. **quality_mode 过滤**:按 `session.quality_mode` 排除不匹配 stage
|
|
412
|
+
3.5. **grill auto_confirm 跳过**:`auto_confirm == true` 时删除 `grill` stage(grill 为交互式苏格拉底拷问,不支持自动模式);brainstorm args 不含 `--from grill:*`
|
|
410
413
|
4. **决策节点**:每个 Decision after 非空的 stage 之后插入 `{ decision: "<gate>", retry_count: 0, max_retries: 2, command_scope: null, command_path: null }`
|
|
411
414
|
5. **goal-audit 插入**:`task_decomposition` 存在时,在最后一个 evidence-producing stage(verify/review/test)之后、`milestone-complete` 之前插入 `decision:post-goal-audit`
|
|
412
415
|
6. **终点硬约束**:chain 以 `milestone-complete` 结尾
|
|
@@ -743,7 +746,8 @@ decision:post-goal-audit {retry+1}
|
|
|
743
746
|
- [ ] Phase 先于 position 解析;phase_is_new 标记写入 session
|
|
744
747
|
- [ ] D-007 反查:phase 数字 → `session.milestone`,禁止读 current_milestone;写入 step.milestone_id
|
|
745
748
|
- [ ] phase_is_new=true → lifecycle_position 强制 `analyze`
|
|
746
|
-
- [ ] Intent overrides 识别 brainstorm / blueprint / analyze-macro
|
|
749
|
+
- [ ] Intent overrides 识别 grill / brainstorm / blueprint / analyze-macro
|
|
750
|
+
- [ ] auto_confirm=true 时 grill stage 跳过(交互式拷问不支持自动模式)
|
|
747
751
|
- [ ] A_RESOLVE_SCOPE_VERDICT 读 macro analyze conclusions.scope_verdict,写入 session.scope_verdict + analyze_macro_id
|
|
748
752
|
- [ ] 链路起点 = analyze-macro 时:large→roadmap+analyze+plan(phase);medium/small→直跳 plan --from analyze:{ANL_ID}(跳过 roadmap+analyze)
|
|
749
753
|
- [ ] post-analyze-scope decision 节点在 macro analyze 之后插入;A_SCOPE_EVALUATE/A_APPLY_SCOPE_VERDICT 重塑链路
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-swarm-workflow
|
|
3
|
+
description: Parallel workflow accelerator — route intent to fixed Workflow scripts for multi-agent concurrent execution
|
|
4
|
+
argument-hint: "<intent> [--script <name>] [--dims <d1,d2>] [--roles <r1,r2>] [--count N] [--tier quick|standard] [--resume <runId>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- read_file
|
|
7
|
+
- write_file
|
|
8
|
+
- edit_file
|
|
9
|
+
- shell
|
|
10
|
+
- find_files
|
|
11
|
+
- search
|
|
12
|
+
- workflow
|
|
13
|
+
- ask_user
|
|
14
|
+
---
|
|
15
|
+
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
16
|
+
|
|
17
|
+
<purpose>
|
|
18
|
+
Parallel accelerator layer for maestro commands. Routes user intent to pre-built Workflow scripts
|
|
19
|
+
that leverage `parallel()` / `pipeline()` for multi-agent concurrent execution.
|
|
20
|
+
|
|
21
|
+
Complements maestro-ralph (sequential decision chain) — ralph manages state + decisions,
|
|
22
|
+
swarm-workflow provides parallel compute bursts within individual steps.
|
|
23
|
+
|
|
24
|
+
Scripts: `~/.maestro/workflows/swarm/wf-*.js`
|
|
25
|
+
|
|
26
|
+
| Script | Accelerates | Pattern |
|
|
27
|
+
|--------|-------------|---------|
|
|
28
|
+
| `wf-analyze` | maestro-analyze | cli-explore-agent → 6-dimension parallel scoring → synthesis |
|
|
29
|
+
| `wf-brainstorm` | maestro-brainstorm | multi-role parallel analysis → cross-role-reviewer → guidance |
|
|
30
|
+
| `wf-review` | quality-review | 6-dimension workflow-reviewer → adversarial verify → report |
|
|
31
|
+
| `wf-verify` | maestro-verify | 3-layer workflow-verifier + convergence + antipattern → aggregate |
|
|
32
|
+
| `wf-grill` | maestro-grill | cli-explore-agent → parallel branch stress-testing → contradiction synthesis |
|
|
33
|
+
| `wf-plan` | maestro-plan | parallel context exploration → workflow-planner → plan-checker |
|
|
34
|
+
| `wf-execute` | maestro-execute | wave-based parallel workflow-executor (worktree isolation) |
|
|
35
|
+
| `wf-milestone-audit` | maestro-milestone-audit | parallel coverage + execution + integration-checker |
|
|
36
|
+
|
|
37
|
+
Integration modes:
|
|
38
|
+
- **Standalone**: `/maestro-swarm-workflow "analyze auth module"` — direct invocation
|
|
39
|
+
- **Ralph step**: ralph chain 中某个 step 可指定 `swarm-workflow` 作为加速执行器
|
|
40
|
+
- **Chained**: 输出 JSON 可被下游命令通过 `--from` 消费
|
|
41
|
+
</purpose>
|
|
42
|
+
|
|
43
|
+
<context>
|
|
44
|
+
$ARGUMENTS — intent text with optional flags.
|
|
45
|
+
|
|
46
|
+
**Parse:**
|
|
47
|
+
```
|
|
48
|
+
--script <name> → 强制指定脚本(wf-analyze, wf-brainstorm, wf-review, wf-verify)
|
|
49
|
+
--dims <d1,d2> → 限定分析维度(analyze: architecture,complexity,patterns,risk,testability,performance)
|
|
50
|
+
--roles <r1,r2> → 限定角色(brainstorm: system-architect,product-manager,test-strategist,ux-expert,security-analyst,data-architect)
|
|
51
|
+
--count N → 角色数量(brainstorm 默认 3)
|
|
52
|
+
--tier <level> → review 层级(quick=2 维度, standard=4 维度)
|
|
53
|
+
--resume <runId> → 从之前的 workflow 运行恢复(增量重跑)
|
|
54
|
+
Remaining → intent
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Script inventory** (`~/.maestro/workflows/swarm/`):
|
|
58
|
+
|
|
59
|
+
| Script | args 接口 |
|
|
60
|
+
|--------|-----------|
|
|
61
|
+
| `wf-analyze` | `{ target, scope, context, phase?, dimensions? }` |
|
|
62
|
+
| `wf-brainstorm` | `{ topic, context, count?, roles? }` |
|
|
63
|
+
| `wf-review` | `{ target, scope, specs?, tier?, dimensions? }` |
|
|
64
|
+
| `wf-verify` | `{ goals, plan_dir?, scope?, task_files?, must_haves?, skip_antipattern? }` |
|
|
65
|
+
| `wf-grill` | `{ topic, context?, depth?: "shallow"\|"standard"\|"deep" }` |
|
|
66
|
+
| `wf-plan` | `{ context_dir?, from?, phase?, scope?, specs?, gaps?, quick? }` |
|
|
67
|
+
| `wf-execute` | `{ plan_dir, specs?, codebase_context?, wiki_context?, auto_commit? }` |
|
|
68
|
+
| `wf-milestone-audit` | `{ milestone?, is_adhoc? }` |
|
|
69
|
+
</context>
|
|
70
|
+
|
|
71
|
+
<state_machine>
|
|
72
|
+
|
|
73
|
+
<states>
|
|
74
|
+
S_PARSE — 解析参数和意图 PERSIST: —
|
|
75
|
+
S_ROUTE — 路由到目标脚本 PERSIST: —
|
|
76
|
+
S_CONTEXT — 组装 context payload PERSIST: —
|
|
77
|
+
S_DISPATCH — 调用 Workflow 工具 PERSIST: —
|
|
78
|
+
S_INGEST — 处理返回结果 PERSIST: —
|
|
79
|
+
S_FALLBACK — 无法路由 PERSIST: —
|
|
80
|
+
</states>
|
|
81
|
+
|
|
82
|
+
<transitions>
|
|
83
|
+
|
|
84
|
+
S_PARSE:
|
|
85
|
+
→ S_ROUTE WHEN: intent parsed DO: A_PARSE_ARGS
|
|
86
|
+
→ S_FALLBACK WHEN: no intent
|
|
87
|
+
|
|
88
|
+
S_ROUTE:
|
|
89
|
+
→ S_CONTEXT WHEN: script resolved DO: A_ROUTE_SCRIPT
|
|
90
|
+
→ S_FALLBACK WHEN: ambiguous intent DO: ask_user
|
|
91
|
+
|
|
92
|
+
S_CONTEXT:
|
|
93
|
+
→ S_DISPATCH DO: A_ASSEMBLE_CONTEXT
|
|
94
|
+
|
|
95
|
+
S_DISPATCH:
|
|
96
|
+
→ S_INGEST WHEN: workflow completed DO: A_DISPATCH_WORKFLOW
|
|
97
|
+
→ S_FALLBACK WHEN: workflow failed
|
|
98
|
+
|
|
99
|
+
S_INGEST:
|
|
100
|
+
→ END DO: A_INGEST_RESULTS
|
|
101
|
+
|
|
102
|
+
S_FALLBACK:
|
|
103
|
+
→ S_PARSE WHEN: user provides input
|
|
104
|
+
→ END WHEN: user cancels
|
|
105
|
+
|
|
106
|
+
</transitions>
|
|
107
|
+
|
|
108
|
+
<actions>
|
|
109
|
+
|
|
110
|
+
### A_PARSE_ARGS
|
|
111
|
+
|
|
112
|
+
1. 提取 flags(--script, --dims, --roles, --count, --tier, --resume)
|
|
113
|
+
2. 剩余文本作为 intent
|
|
114
|
+
3. 若有 --resume,记录 resumeRunId
|
|
115
|
+
|
|
116
|
+
### A_ROUTE_SCRIPT
|
|
117
|
+
|
|
118
|
+
Intent-to-script routing(按关键词匹配,--script 优先级最高):
|
|
119
|
+
|
|
120
|
+
| Keywords | Script |
|
|
121
|
+
|----------|--------|
|
|
122
|
+
| 分析 / analyze / 探索 / explore / 架构 / architecture / 复杂度 / 风险 | `wf-analyze` |
|
|
123
|
+
| 头脑风暴 / brainstorm / 方案 / 设计 / 评估 / evaluate / 多角度 | `wf-brainstorm` |
|
|
124
|
+
| 审查 / review / 代码审查 / code review / 质量 / quality | `wf-review` |
|
|
125
|
+
| 验证 / verify / 检查 / check / 反模式 / antipattern | `wf-verify` |
|
|
126
|
+
| 拷问 / grill / 压力测试 / stress-test / 挑战 / challenge | `wf-grill` |
|
|
127
|
+
| 规划 / plan / 任务分解 / decompose / 分波 / wave | `wf-plan` |
|
|
128
|
+
| 执行 / execute / 实现 / implement / 开发 / develop | `wf-execute` |
|
|
129
|
+
| 里程碑审计 / milestone-audit / 集成检查 / integration | `wf-milestone-audit` |
|
|
130
|
+
|
|
131
|
+
多命中 → ask_user 让用户选择。
|
|
132
|
+
|
|
133
|
+
### A_ASSEMBLE_CONTEXT
|
|
134
|
+
|
|
135
|
+
根据目标脚本组装 args payload:
|
|
136
|
+
|
|
137
|
+
**wf-analyze:**
|
|
138
|
+
1. Read `.workflow/state.json` 获取当前 phase/milestone 信息
|
|
139
|
+
2. `target` = intent 中的目标描述
|
|
140
|
+
3. `scope` = 从 intent 推断文件范围,或读 roadmap 获取 phase scope
|
|
141
|
+
4. `context` = 拼接相关上下文(上游 artifact 摘要、specs)
|
|
142
|
+
5. `dimensions` = --dims 解析结果(可选)
|
|
143
|
+
|
|
144
|
+
**wf-brainstorm:**
|
|
145
|
+
1. `topic` = intent 文本
|
|
146
|
+
2. `context` = 读取相关代码文件摘要 + 已有 specs
|
|
147
|
+
3. `count` = --count 或默认 3
|
|
148
|
+
4. `roles` = --roles 解析结果(可选)
|
|
149
|
+
|
|
150
|
+
**wf-review:**
|
|
151
|
+
1. `target` = 读 git diff 描述变更范围
|
|
152
|
+
2. `scope` = 变更文件列表
|
|
153
|
+
3. `tier` = --tier 或 "standard"
|
|
154
|
+
4. `dimensions` = --dims 解析结果(可选)
|
|
155
|
+
|
|
156
|
+
**wf-verify:**
|
|
157
|
+
1. `goals` = 读最近的 plan artifact 提取目标列表
|
|
158
|
+
2. `plan_dir` = 定位最近的 plan scratch 目录
|
|
159
|
+
3. `scope` = plan 涉及的文件范围
|
|
160
|
+
4. `skip_tests` / `skip_antipattern` = 从 flags 提取
|
|
161
|
+
|
|
162
|
+
### A_DISPATCH_WORKFLOW
|
|
163
|
+
|
|
164
|
+
1. 确定 scriptPath = `~/.maestro/workflows/swarm/{script}.js`(展开为绝对路径)
|
|
165
|
+
2. 构建 Workflow 调用:
|
|
166
|
+
```
|
|
167
|
+
Workflow({
|
|
168
|
+
scriptPath: absoluteScriptPath,
|
|
169
|
+
args: assembledArgs,
|
|
170
|
+
resumeFromRunId: resumeRunId // 若有
|
|
171
|
+
})
|
|
172
|
+
```
|
|
173
|
+
3. 等待 Workflow 返回结果
|
|
174
|
+
4. 记录 runId 用于潜在的后续 resume
|
|
175
|
+
|
|
176
|
+
### A_INGEST_RESULTS
|
|
177
|
+
|
|
178
|
+
Workflow 返回 JSON 后:
|
|
179
|
+
|
|
180
|
+
1. **摘要输出**:按脚本类型格式化关键指标
|
|
181
|
+
- analyze: overall_score, scope_verdict, go_no_go, critical findings count
|
|
182
|
+
- brainstorm: role count, conflict/synergy count, top guidance items
|
|
183
|
+
- review: verdict (APPROVE/REQUEST_CHANGES/BLOCK), confirmed vs false-positive count
|
|
184
|
+
- verify: overall_passed, confidence, gap count, antipattern blocker count
|
|
185
|
+
|
|
186
|
+
2. **Artifact 写入**(可选):
|
|
187
|
+
- 若当前在 ralph session 中(检测 `.workflow/.maestro/ralph-*/status.json` 状态为 running):
|
|
188
|
+
将结果写入对应 step 的 scratch 目录,格式兼容命令产出
|
|
189
|
+
- 否则写入 `.workflow/scratch/{YYYYMMDD}-swarm-{script}-{slug}/results.json`
|
|
190
|
+
|
|
191
|
+
3. **Ralph 兼容产出**:
|
|
192
|
+
- analyze → `analysis.md` + `context.md`(decisions)+ `conclusions.json`
|
|
193
|
+
- brainstorm → `guidance-specification.md`
|
|
194
|
+
- review → `review.json`
|
|
195
|
+
- verify → `verification.json`
|
|
196
|
+
|
|
197
|
+
4. **RunId 提示**:显示 `Resume: /maestro-swarm-workflow --resume {runId}` 用于增量重跑
|
|
198
|
+
|
|
199
|
+
</actions>
|
|
200
|
+
|
|
201
|
+
</state_machine>
|
|
202
|
+
|
|
203
|
+
<invariants>
|
|
204
|
+
1. **只做并行加速,不做状态决策** — 不修改 ralph status.json,不推进 step
|
|
205
|
+
2. **args 预编译** — 所有 FS 读取在 A_ASSEMBLE_CONTEXT 完成,脚本内 agent 通过工具自行读取补充
|
|
206
|
+
3. **产出格式兼容** — 写入的 artifact 格式必须与对应命令(analyze/brainstorm/review/verify)的产出一致
|
|
207
|
+
4. **resume 透传** — resumeFromRunId 直接透传给 Workflow 工具,利用内置缓存机制
|
|
208
|
+
5. **脚本只读** — 路由命令不修改 `~/.maestro/workflows/swarm/wf-*.js` 脚本文件
|
|
209
|
+
6. **结果必须展示** — Workflow 返回后必须向用户展示格式化摘要,不得静默完成
|
|
210
|
+
</invariants>
|
|
211
|
+
|
|
212
|
+
<appendix>
|
|
213
|
+
|
|
214
|
+
### 与 Ralph 集成
|
|
215
|
+
|
|
216
|
+
Ralph 可以在 A_BUILD_STEPS 中将某些 step 的执行方式标记为 `swarm-workflow`:
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"index": 2,
|
|
221
|
+
"skill": "maestro-swarm-workflow",
|
|
222
|
+
"args": "--script wf-analyze {phase}",
|
|
223
|
+
"stage": "analyze",
|
|
224
|
+
"command_scope": "project",
|
|
225
|
+
"command_path": "<resolved by maestro ralph skills>"
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
ralph-execute 正常通过 `maestro ralph next` 加载并执行,swarm-workflow 内部再调 Workflow 工具。
|
|
230
|
+
|
|
231
|
+
### 输出示例
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
┌─ wf-analyze ──────────────────────────────────────┐
|
|
235
|
+
│ Explore [████████████████████] 6/6 dimensions │
|
|
236
|
+
│ Synthesize [████████████████] done │
|
|
237
|
+
├────────────────────────────────────────────────────┤
|
|
238
|
+
│ Score: 7.2/10 Scope: medium Verdict: go │
|
|
239
|
+
│ Findings: 23 total (2 critical, 5 high) │
|
|
240
|
+
│ Cross-cutting: 3 themes │
|
|
241
|
+
│ Decisions: 4 locked, 2 free, 1 deferred │
|
|
242
|
+
├────────────────────────────────────────────────────┤
|
|
243
|
+
│ Output: .workflow/scratch/20260530-swarm-analyze/ │
|
|
244
|
+
│ Resume: /maestro-swarm-workflow --resume wf_abc123 │
|
|
245
|
+
└────────────────────────────────────────────────────┘
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Error Codes
|
|
249
|
+
|
|
250
|
+
| Code | Description | Recovery |
|
|
251
|
+
|------|-------------|----------|
|
|
252
|
+
| E001 | No intent and no --script | Prompt for intent |
|
|
253
|
+
| E002 | Ambiguous routing | ask_user |
|
|
254
|
+
| E003 | Script file not found | Check .claude/workflows/ |
|
|
255
|
+
| E004 | Workflow execution failed | Show error, suggest --resume |
|
|
256
|
+
| E005 | Result ingestion failed | Write raw JSON to scratch |
|
|
257
|
+
|
|
258
|
+
</appendix>
|
|
@@ -37,7 +37,7 @@ $ARGUMENTS -- optional flags.
|
|
|
37
37
|
| Agent | Focus | Output file |
|
|
38
38
|
|-------|-------|-------------|
|
|
39
39
|
| Mapper 1 | **Tech stack** -- languages, frameworks, dependencies, build system | `tech-stack.md` |
|
|
40
|
-
| Mapper 2 | **Architecture** -- layers, module boundaries, data flow, entry points | `architecture.md` |
|
|
40
|
+
| Mapper 2 | **Architecture** -- produced by KG pipeline Step 14 (UA architecture-analyzer delegate); layers, module boundaries, data flow, entry points | `architecture.md` |
|
|
41
41
|
| Mapper 3 | **Features** -- capabilities, API surface, user-facing functionality | `features.md` |
|
|
42
42
|
| Mapper 4 | **Cross-cutting concerns** -- error handling, logging, auth, config, testing | `concerns.md` |
|
|
43
43
|
|
|
@@ -45,6 +45,9 @@ $ARGUMENTS -- optional flags.
|
|
|
45
45
|
- `.workflow/` -- must be initialized (project.md, state.json exist)
|
|
46
46
|
- `.workflow/codebase/` -- target directory (will be cleared and rebuilt)
|
|
47
47
|
- `.workflow/codebase/doc-index.json` -- generated documentation index
|
|
48
|
+
- `.workflow/codebase/knowledge-graph.json` -- Knowledge Graph with nodes, edges, layers, and tour (generated by KG pipeline Steps 10–17 if UA vendor is installed)
|
|
49
|
+
|
|
50
|
+
**UA vendor requirement:** The KG pipeline (Steps 10–17) requires the UA vendor at `~/.maestro/vendor/ua/understand-anything-plugin/`. If not installed, these steps are skipped automatically. Run `scripts/ua-vendor-setup.sh` to install.
|
|
48
51
|
</context>
|
|
49
52
|
|
|
50
53
|
<execution>
|
|
@@ -55,6 +58,9 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
|
|
|
55
58
|
**Next-step routing on completion:**
|
|
56
59
|
- View updated project state → `/manage-status`
|
|
57
60
|
- Incremental updates later → `/manage-codebase-refresh`
|
|
61
|
+
- Verify KG stats → `maestro kg stats`
|
|
62
|
+
- Verify wiki integration → `maestro wiki list --keyword kg`
|
|
63
|
+
- Future change impact → `maestro kg diff-wiki`
|
|
58
64
|
</execution>
|
|
59
65
|
|
|
60
66
|
<error_codes>
|
|
@@ -63,6 +69,8 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
|
|
|
63
69
|
| E001 | error | .workflow/ not initialized | Run maestro-init first to create .workflow/ |
|
|
64
70
|
| W001 | warning | A mapper agent failed (partial results) | Retry failed mapper or accept partial results |
|
|
65
71
|
| W002 | warning | `.workflow/codebase/` already exists -- user prompted for rebuild/skip | check_existing |
|
|
72
|
+
| W003 | warning | KG validation failed (graph written with valid=false) | Review .kg-tmp/ artifacts, re-run KG pipeline |
|
|
73
|
+
| W004 | warning | Wiki index rebuild failed after KG generation | Non-fatal, retries on next wiki access |
|
|
66
74
|
</error_codes>
|
|
67
75
|
|
|
68
76
|
<success_criteria>
|
|
@@ -73,5 +81,9 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
|
|
|
73
81
|
- [ ] All documentation files regenerated
|
|
74
82
|
- [ ] state.json updated with rebuild timestamp
|
|
75
83
|
- [ ] project.md Tech Stack section updated if changes detected
|
|
84
|
+
- [ ] KG pipeline executed (if UA vendor installed)
|
|
85
|
+
- [ ] knowledge-graph.json generated in .workflow/codebase/ (if UA vendor installed)
|
|
86
|
+
- [ ] KG nodes indexed as virtual wiki entries (automatic via WikiIndexer on next wiki access)
|
|
76
87
|
- [ ] Next step routing: `/manage-status` or `/manage-codebase-refresh` for incremental updates later
|
|
88
|
+
- [ ] KG impact check available: `maestro kg diff-wiki` for future change impact analysis
|
|
77
89
|
</success_criteria>
|
|
@@ -34,6 +34,7 @@ $ARGUMENTS -- optional flags.
|
|
|
34
34
|
- `.workflow/` -- must be initialized
|
|
35
35
|
- `.workflow/codebase/` -- must contain existing docs (from prior rebuild)
|
|
36
36
|
- `.workflow/codebase/doc-index.json` -- documentation index with timestamps
|
|
37
|
+
- `.workflow/codebase/knowledge-graph.json` -- Knowledge Graph (optional, for KG impact analysis)
|
|
37
38
|
- `.workflow/state.json` -- contains `codebase_last_rebuilt` timestamp
|
|
38
39
|
</context>
|
|
39
40
|
|
|
@@ -52,6 +53,8 @@ Follow '~/.maestro/workflows/codebase-refresh.md' completely.
|
|
|
52
53
|
<success_criteria>
|
|
53
54
|
- [ ] Changed files detected via git diff since last refresh
|
|
54
55
|
- [ ] Affected documentation entries identified from doc-index.json
|
|
56
|
+
- [ ] KG impact analysis run (if knowledge-graph.json exists): `maestro kg diff-wiki --json`
|
|
57
|
+
- [ ] Affected wiki entries flagged with warnings (if any)
|
|
55
58
|
- [ ] Only affected docs refreshed (selective mapper re-run)
|
|
56
59
|
- [ ] doc-index.json timestamps updated per affected entry
|
|
57
60
|
- [ ] state.json updated with codebase_last_refreshed timestamp
|
|
@@ -13,8 +13,9 @@ allowed-tools:
|
|
|
13
13
|
|
|
14
14
|
<purpose>
|
|
15
15
|
Initialize the project-level specs directory by scanning the codebase for conventions, patterns, and tech stack.
|
|
16
|
-
Core files (coding, arch,
|
|
17
|
-
|
|
16
|
+
Core files (coding, arch, learnings) are always created. Optional spec files (quality, test, ui) are created only when relevant signals are detected.
|
|
17
|
+
Additionally, generates recipe-type knowhow docs in `.workflow/knowhow/` for detected operational workflows (test / debug / build / dev / lint) — capturing "how to do X in this project" so future agents can find them via `maestro wiki search`.
|
|
18
|
+
Spec output lands in `.workflow/specs/`; recipe output lands in `.workflow/knowhow/`.
|
|
18
19
|
</purpose>
|
|
19
20
|
|
|
20
21
|
<required_reading>
|
|
@@ -39,12 +40,15 @@ Follow '~/.maestro/workflows/specs-setup.md' completely.
|
|
|
39
40
|
| E001 | fatal | `.workflow/` directory not initialized -- run `/maestro-init` first | parse_input |
|
|
40
41
|
| E002 | fatal | No source files found in project -- nothing to scan | scan_codebase |
|
|
41
42
|
| W001 | warning | Convention detection uncertain for one or more categories -- marked `[UNCERTAIN]` | generate_specs |
|
|
43
|
+
| W002 | warning | Workflow recipe signals detected but commands ambiguous -- recipe skipped | generate_recipes |
|
|
44
|
+
| W003 | warning | Existing recipe slug found -- new content written as `.proposed.md` for manual diff | generate_recipes |
|
|
42
45
|
</error_codes>
|
|
43
46
|
|
|
44
47
|
<success_criteria>
|
|
45
48
|
- [ ] `.workflow/specs/` directory created
|
|
46
|
-
- [ ] Core files always created: `coding-conventions.md`, `architecture-constraints.md`, `
|
|
47
|
-
- [ ] Optional files created when detected: `quality-rules.md` (linter/CI), `test-conventions.md` (test framework), `
|
|
48
|
-
- [ ]
|
|
49
|
+
- [ ] Core spec files always created: `coding-conventions.md`, `architecture-constraints.md`, `learnings.md`
|
|
50
|
+
- [ ] Optional spec files created when detected: `quality-rules.md` (linter/CI), `test-conventions.md` (test framework), `ui-conventions.md` (frontend framework). `debug-notes.md` / `review-standards.md` deferred (on demand via `/spec-add`).
|
|
51
|
+
- [ ] Workflow recipe knowhow created in `.workflow/knowhow/` for each detected operational workflow (test / debug / build / dev / lint). Each recipe matches the `recipe` schema in `~/.maestro/workflows/knowhow.md` Part B and contains at least one runnable command.
|
|
52
|
+
- [ ] Report displayed grouped by destination (specs / recipes / skipped / deferred), with `.proposed.md` files surfaced when an existing recipe slug was preserved.
|
|
49
53
|
</success_criteria>
|
|
50
54
|
</output>
|
|
@@ -41,9 +41,10 @@ You are a collaborative planner that works within a pre-allocated task ID range.
|
|
|
41
41
|
"type": "feature",
|
|
42
42
|
"priority": "medium",
|
|
43
43
|
"effort": "medium",
|
|
44
|
-
"action": "
|
|
44
|
+
"action": "<concrete action with exact values: function signatures, config keys, import paths>",
|
|
45
45
|
"scope": "<module path>",
|
|
46
46
|
"focus_paths": [],
|
|
47
|
+
"read_first": ["src/module/existing.ts", "src/types/shared.ts"],
|
|
47
48
|
"depends_on": [],
|
|
48
49
|
"parallel_group": null,
|
|
49
50
|
"convergence": {
|
|
@@ -115,6 +116,8 @@ You are a collaborative planner that works within a pre-allocated task ID range.
|
|
|
115
116
|
- Task files must use `convergence.criteria` (array of testable strings), not `done_when`
|
|
116
117
|
- files must use `[{path, action, target, change}]` format, not `["path"]`
|
|
117
118
|
- Each task must have convergence.criteria with min 2 testable conditions
|
|
119
|
+
- Each task must have `read_first[]` — files the executor MUST read before implementation
|
|
120
|
+
- `action` must contain concrete values (function signatures, config keys, import paths), not just a verb
|
|
118
121
|
- Task definitions follow the same schema as workflow-planner output
|
|
119
122
|
- If you discover scope that belongs to another planner's range, note it in plan-note.md
|
|
120
123
|
- Do not modify other planners' task files
|
|
@@ -29,7 +29,9 @@ You validate the quality of execution plans before they proceed to implementatio
|
|
|
29
29
|
- Each criterion must reference a concrete artifact, output, or behavior
|
|
30
30
|
- Criteria should be sufficient to prove the task is complete
|
|
31
31
|
7. **Check files array** -- Verify each task's `files[]` array is consistent with its description
|
|
32
|
-
8. **
|
|
32
|
+
8. **Check read_first** -- Verify each task has `read_first[]` containing: the file being modified + source-of-truth files. Missing or empty `read_first` is a critical issue.
|
|
33
|
+
9. **Check action concreteness** -- Verify each task's `action` contains concrete values (function signatures, config keys, import paths), not vague verbs like "Implement" or references like "align X with Y"
|
|
34
|
+
10. **Report** -- Write check report with issues or approval
|
|
33
35
|
|
|
34
36
|
### Revision Loop (max 3 rounds)
|
|
35
37
|
- If issues found: write report with specific issues and suggested fixes
|
|
@@ -71,6 +73,14 @@ Check report written to the output location above:
|
|
|
71
73
|
## Files Array Consistency
|
|
72
74
|
- TASK-006: description mentions "update config" but files[] does not include any config file
|
|
73
75
|
|
|
76
|
+
## Read First Completeness
|
|
77
|
+
- TASK-001 read_first: Missing — must include src/auth.ts (file being modified) + src/types/auth.ts (type definitions)
|
|
78
|
+
- TASK-003 read_first: Has target file but missing source-of-truth reference
|
|
79
|
+
|
|
80
|
+
## Action Concreteness
|
|
81
|
+
- TASK-002 action: Too vague ("Implement auth") — should include: "Add verifyToken(token: string): Promise<AuthPayload> to src/auth.ts, import from jsonwebtoken"
|
|
82
|
+
- TASK-005 action: Contains "align with existing pattern" — must specify the exact target state
|
|
83
|
+
|
|
74
84
|
## Summary
|
|
75
85
|
<Overall assessment>
|
|
76
86
|
```
|
|
@@ -91,9 +91,10 @@ When invoked with `quick` flag:
|
|
|
91
91
|
"type": "feature",
|
|
92
92
|
"priority": "medium",
|
|
93
93
|
"effort": "medium",
|
|
94
|
-
"action": "
|
|
94
|
+
"action": "<concrete action with exact values: function signatures, config keys, import paths>",
|
|
95
95
|
"scope": "<module path>",
|
|
96
96
|
"focus_paths": ["src/tools/"],
|
|
97
|
+
"read_first": ["src/tools/existing-tool.ts", "src/types/tool.ts"],
|
|
97
98
|
"depends_on": [],
|
|
98
99
|
"parallel_group": null,
|
|
99
100
|
"convergence": {
|
|
@@ -163,6 +164,8 @@ These rules prevent over-splitting that wastes tokens on unnecessary agent spawn
|
|
|
163
164
|
- Each task must be substantial (15-60 min of work); group related changes, avoid file-per-task
|
|
164
165
|
- Each task must have convergence.criteria (min 2 testable conditions)
|
|
165
166
|
- convergence.criteria must be specific and testable (not "works correctly")
|
|
167
|
+
- Each task must have `read_first[]` — files the executor MUST read before implementation (the file being modified + source-of-truth files)
|
|
168
|
+
- `action` must contain concrete values (function signatures, config keys, import paths), not just a verb like "Implement"
|
|
166
169
|
- files must use array format `[{path, action, target, change}]`
|
|
167
170
|
- Wave ordering must respect dependencies (no task before its dependency)
|
|
168
171
|
- Task descriptions must be clear enough for the executor to implement without ambiguity
|