maestro-flow 0.4.18 → 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-next/SKILL.md +147 -112
- 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/.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/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-next/SKILL.md +147 -112
- 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/.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/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-next.md +147 -112
- 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/.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/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-next/SKILL.md +297 -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 +23 -1
- 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 +19 -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 +19 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +12 -0
- package/dist/src/i18n/types.d.ts.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 +3 -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 +2 -0
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +48 -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 +95 -17
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts +4 -0
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +14 -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 +22 -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>
|
|
@@ -14,70 +14,114 @@ allowed-tools:
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
<purpose>
|
|
17
|
-
|
|
17
|
+
单链推荐:解析 intent + project state → 路由表评分 → 推荐**单个原子命令** → 确认后通过 `invoke_skill()` 执行。
|
|
18
18
|
|
|
19
|
-
与 `/maestro` / `/maestro-ralph`
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
19
|
+
与 `/maestro` / `/maestro-ralph` 区别:
|
|
20
|
+
- 不创建 session、不构建 chain、不写 status.json
|
|
21
|
+
- 始终只推 1 个 top pick,最多列 2-3 个备选
|
|
22
|
+
- 适用场景:意图清晰且单步即可完成;或需要定向推荐时
|
|
23
23
|
</purpose>
|
|
24
24
|
|
|
25
25
|
<context>
|
|
26
|
-
$ARGUMENTS —
|
|
26
|
+
$ARGUMENTS — 意图文本 + 可选 flags。
|
|
27
27
|
|
|
28
28
|
**Flags:**
|
|
29
|
-
- `-y` / `--yes` —
|
|
29
|
+
- `-y` / `--yes` — 跳过确认,直接执行 top pick
|
|
30
30
|
- `--dry-run` — 仅显示推荐结果,不执行
|
|
31
|
-
- `--top N` — 显示前 N
|
|
31
|
+
- `--top N` — 显示前 N 个候选(默认 3)
|
|
32
32
|
- `--list` — 仅列出可推荐命令池,不做推荐
|
|
33
33
|
|
|
34
|
-
**候选池:** 仅
|
|
34
|
+
**候选池:** 仅 A_SCORE_CANDIDATES 路由表中列出的命令。管线编排器(`maestro` / `maestro-ralph*` / `maestro-player` / `maestro-composer`)**永远不在候选池**。
|
|
35
35
|
</context>
|
|
36
36
|
|
|
37
|
-
<
|
|
37
|
+
<invariants>
|
|
38
|
+
1. **不创建 session / 不写 status.json / 不触发后续 chain** — 单次原子执行,产出由目标命令自行管理
|
|
39
|
+
2. **管线编排器不在候选池** — 仅推荐原子命令
|
|
40
|
+
3. **空 intent 或 "继续/下一步/next/接下来"** → 直接采用 lifecycle_position 推断的自然下一步
|
|
41
|
+
4. **字面命中路由表优先** — lifecycle 仅作加分;命中失败时 lifecycle 上升为决定性信号
|
|
42
|
+
5. **参数传递** — 默认 intent 原文作为第一个 arg;用户可在确认环节修改;`-y` 仅当用户传入时透传到 skill args
|
|
43
|
+
6. **`--list` 模式跳过 lifecycle 推断与评分**,仅按 workflow 簇分组列出全部候选
|
|
44
|
+
</invariants>
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
<state_machine>
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
<states>
|
|
49
|
+
S_PARSE — 解析 ARGUMENTS、提取 flags PERSIST: —
|
|
50
|
+
S_STATE — 读 project state、推断 lifecycle_position PERSIST: —
|
|
51
|
+
S_RANK — 路由表评分、生成 top-N candidates PERSIST: —
|
|
52
|
+
S_LIST — `--list` 模式:分组展示候选池 PERSIST: —
|
|
53
|
+
S_PRESENT — 显示 top pick + 备选 + 推荐理由 + 执行参数 PERSIST: —
|
|
54
|
+
S_CONFIRM — ask_user 选择/修改参数(auto_mode 跳过) PERSIST: —
|
|
55
|
+
S_EXECUTE — `invoke_skill({ skill, args })` 单次调用 PERSIST: —
|
|
56
|
+
S_FALLBACK — intent 空且 clarification 失败 PERSIST: —
|
|
57
|
+
</states>
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
- `intent` 为空且非 `--list` → `ask_user`:让用户输入意图(最多 1 轮,仍空则 E001)
|
|
59
|
+
<transitions>
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
S_PARSE:
|
|
62
|
+
→ S_LIST WHEN: --list flag
|
|
63
|
+
→ S_STATE WHEN: intent text present
|
|
64
|
+
→ S_STATE WHEN: keyword "continue"/"next"/"go"/"继续"/"下一步"/"接下来"
|
|
65
|
+
→ S_PARSE WHEN: no intent (max 1 clarify round) DO: ask_user
|
|
66
|
+
→ S_FALLBACK WHEN: clarification empty
|
|
47
67
|
|
|
48
|
-
|
|
68
|
+
S_STATE:
|
|
69
|
+
→ S_RANK DO: A_INFER_LIFECYCLE
|
|
49
70
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
cat .workflow/state.json 2>$null
|
|
71
|
+
S_RANK:
|
|
72
|
+
→ S_PRESENT DO: A_SCORE_CANDIDATES
|
|
53
73
|
|
|
54
|
-
|
|
55
|
-
|
|
74
|
+
S_LIST:
|
|
75
|
+
→ END DO: 按 workflow 簇分组列出全部候选 + description
|
|
56
76
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
77
|
+
S_PRESENT:
|
|
78
|
+
→ END WHEN: --dry-run
|
|
79
|
+
→ S_EXECUTE WHEN: -y / --yes
|
|
80
|
+
→ S_CONFIRM WHEN: not auto_mode
|
|
81
|
+
|
|
82
|
+
S_CONFIRM:
|
|
83
|
+
→ S_EXECUTE WHEN: 用户确认 top pick / 选备选 / 改参数
|
|
84
|
+
→ END WHEN: 用户取消
|
|
85
|
+
|
|
86
|
+
S_EXECUTE:
|
|
87
|
+
→ END DO: invoke_skill({ skill: <chosen>, args: <args> }) → 输出 "✅ 已执行 /<command>"
|
|
88
|
+
|
|
89
|
+
S_FALLBACK:
|
|
90
|
+
→ END DO: raise E001
|
|
60
91
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| 项目状态特征 | lifecycle_position | 自然下一步 |
|
|
64
|
-
|--------------|-------------------|-----------|
|
|
65
|
-
| 无 `.workflow/` + 无源码 | `brainstorm` | `maestro-brainstorm` |
|
|
66
|
-
| 无 `.workflow/` + 有源码 | `init` | `maestro-init` |
|
|
67
|
-
| 有 state.json,无 roadmap.md,无 milestones | `analyze-macro` | `maestro-analyze` (宏观调研) |
|
|
68
|
-
| 有 macro analyze artifact,无 roadmap.md | `roadmap` | `maestro-roadmap` |
|
|
69
|
-
| 有 roadmap,未启动 phase | `analyze` | `maestro-analyze {phase}` |
|
|
70
|
-
| 最新 artifact = `analyze` | `plan` | `maestro-plan {phase}` |
|
|
71
|
-
| 最新 artifact = `plan` | `execute` | `maestro-execute {phase}` |
|
|
72
|
-
| 最新 artifact = `execute` | `verify` | `maestro-verify {phase}` |
|
|
73
|
-
| 最新 artifact = `verify`,passed | `review` | `quality-review {phase}` |
|
|
74
|
-
| 最新 artifact = `review`,verdict=PASS | `test-gen` | `quality-auto-test {phase}` |
|
|
75
|
-
| 最新 artifact = `test`,全绿 | `milestone-audit` | `maestro-milestone-audit` |
|
|
76
|
-
| 当前 milestone 全部 phase 完成 | `milestone-complete` | `maestro-milestone-complete` |
|
|
77
|
-
| 任一 stage 产物含 gaps/failed | `debug` | `quality-debug {gap}` |
|
|
78
|
-
|
|
79
|
-
**Maestro Lifecycle 主线(核心 workflow,供推断"下一步"使用):**
|
|
92
|
+
</transitions>
|
|
80
93
|
|
|
94
|
+
<actions>
|
|
95
|
+
|
|
96
|
+
### A_INFER_LIFECYCLE
|
|
97
|
+
|
|
98
|
+
读 project state 推断 `lifecycle_position`(核心信号):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
cat .workflow/state.json 2>$null # phase / milestone / artifacts
|
|
102
|
+
ls -la .workflow/scratch/ 2>$null | head -10 # 最近 artifact (mtime DESC)
|
|
103
|
+
ls -la .workflow/.maestro/ 2>$null | head -5 # 进行中的 session
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**项目状态 → lifecycle_position → 自然下一步:**
|
|
107
|
+
|
|
108
|
+
| 项目状态 | lifecycle_position | 自然下一步 |
|
|
109
|
+
|---------|-------------------|-----------|
|
|
110
|
+
| 无 `.workflow/` + 无源码 | brainstorm | `maestro-brainstorm` |
|
|
111
|
+
| 无 `.workflow/` + 有源码 | init | `maestro-init` |
|
|
112
|
+
| 有 state.json,无 roadmap,无 milestones | analyze-macro | `maestro-analyze` (宏观调研) |
|
|
113
|
+
| 有 macro analyze artifact,无 roadmap | roadmap | `maestro-roadmap` |
|
|
114
|
+
| 有 roadmap,未启动 phase | analyze | `maestro-analyze {phase}` |
|
|
115
|
+
| 最新 artifact = analyze | plan | `maestro-plan {phase}` |
|
|
116
|
+
| 最新 artifact = plan | execute | `maestro-execute {phase}` |
|
|
117
|
+
| 最新 artifact = execute | verify | `maestro-verify {phase}` |
|
|
118
|
+
| verify passed | review | `quality-review {phase}` |
|
|
119
|
+
| review verdict=PASS | test-gen | `quality-auto-test {phase}` |
|
|
120
|
+
| 测试全绿 | milestone-audit | `maestro-milestone-audit` |
|
|
121
|
+
| 当前 milestone 全 phase 完成 | milestone-complete | `maestro-milestone-complete` |
|
|
122
|
+
| 任一 stage 产物含 gaps/failed | debug | `quality-debug {gap}` |
|
|
123
|
+
|
|
124
|
+
**Maestro Lifecycle 主线:**
|
|
81
125
|
```
|
|
82
126
|
brainstorm → blueprint → init → analyze-macro → roadmap
|
|
83
127
|
→ [per phase] analyze → plan → execute → verify
|
|
@@ -85,41 +129,28 @@ brainstorm → blueprint → init → analyze-macro → roadmap
|
|
|
85
129
|
→ milestone-audit → milestone-complete → milestone-release
|
|
86
130
|
```
|
|
87
131
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| Workflow 簇 | 触发场景 | 主推命令 |
|
|
91
|
-
|-------------|---------|---------|
|
|
92
|
-
| Learning | 接触新代码/未知模块 | `learn-follow` → `learn-decompose` → `learn-second-opinion` |
|
|
93
|
-
| Knowledge | 提炼经验 / 沉淀知识 | `manage-harvest` → `manage-knowhow-capture` → `spec-add` |
|
|
94
|
-
| Wiki 维护 | 知识图谱整理 | `manage-wiki` → `wiki-connect` → `wiki-digest` |
|
|
95
|
-
| Issue 治理 | 缺陷管理 | `manage-issue-discover` → `manage-issue` |
|
|
96
|
-
| 文档同步 | 代码大改后 | `quality-sync` → `manage-codebase-refresh` |
|
|
97
|
-
| 重构 | 技术债积累 | `quality-refactor` → `quality-review` |
|
|
98
|
-
| 发布 | 里程碑结束 | `maestro-milestone-audit` → `maestro-milestone-release` |
|
|
99
|
-
| 并行开发 | 多 milestone 并行 | `maestro-fork` → ... → `maestro-merge` |
|
|
100
|
-
|
|
101
|
-
### Step 2.5: Semantic Match & Rank
|
|
132
|
+
### A_SCORE_CANDIDATES
|
|
102
133
|
|
|
103
|
-
|
|
134
|
+
**评分信号**(高→低):
|
|
104
135
|
|
|
105
136
|
| 信号 | 权重 | 说明 |
|
|
106
137
|
|------|------|------|
|
|
107
|
-
| intent
|
|
108
|
-
| **
|
|
109
|
-
| `name` 关键词命中 intent | 中 |
|
|
110
|
-
| Workflow 簇匹配 | 中 | intent 涉及学习/知识/issue
|
|
111
|
-
| Recent activity 反向避免 | 低 | 刚完成的 stage
|
|
138
|
+
| intent 命中路由表关键词 | 高 | 字面匹配主依据 |
|
|
139
|
+
| **lifecycle 自然下一步** | **高** | 空 intent / "继续" / "next" 时为决定性 |
|
|
140
|
+
| `name` 关键词命中 intent | 中 | intent 含 "test" → quality-test/quality-auto-test 加分 |
|
|
141
|
+
| Workflow 簇匹配 | 中 | intent 涉及学习/知识/issue 等场景触发对应簇 |
|
|
142
|
+
| Recent activity 反向避免 | 低 | 刚完成的 stage 短期内降权 |
|
|
112
143
|
|
|
113
144
|
**特殊意图处理:**
|
|
114
145
|
|
|
115
|
-
| Intent 模式 |
|
|
116
|
-
|
|
117
|
-
| 空 / "继续" / "下一步" / "next" / "
|
|
118
|
-
| "什么状态" / "现在到哪了" / "status" |
|
|
119
|
-
|
|
|
120
|
-
| 无任何匹配 |
|
|
146
|
+
| Intent 模式 | top pick |
|
|
147
|
+
|------------|---------|
|
|
148
|
+
| 空 / "继续" / "下一步" / "next" / "接下来" | lifecycle 自然下一步 |
|
|
149
|
+
| "什么状态" / "现在到哪了" / "status" | `manage-status` |
|
|
150
|
+
| 字面命中路由表 | 路由表优先(lifecycle 仅加分) |
|
|
151
|
+
| 无任何匹配 | lifecycle 下一步 + raise W002 |
|
|
121
152
|
|
|
122
|
-
**意图 →
|
|
153
|
+
**意图 → 命令路由表**(候选池):
|
|
123
154
|
|
|
124
155
|
| 意图关键词 | 推荐命令 |
|
|
125
156
|
|-----------|---------|
|
|
@@ -150,70 +181,74 @@ brainstorm → blueprint → init → analyze-macro → roadmap
|
|
|
150
181
|
| fork / 分支 / 并行开发 | `maestro-fork` / `maestro-merge` |
|
|
151
182
|
| 覆盖层 / overlay / amend | `maestro-overlay` / `maestro-amend` |
|
|
152
183
|
|
|
184
|
+
**辅助 workflow 簇**(场景触发,非主线):
|
|
185
|
+
|
|
186
|
+
| 簇 | 触发 | 主推链路 |
|
|
187
|
+
|----|------|---------|
|
|
188
|
+
| Learning | 接触新代码/未知模块 | `learn-follow` → `learn-decompose` → `learn-second-opinion` |
|
|
189
|
+
| Knowledge | 提炼经验 / 沉淀知识 | `manage-harvest` → `manage-knowhow-capture` → `spec-add` |
|
|
190
|
+
| Wiki | 知识图谱整理 | `manage-wiki` → `wiki-connect` → `wiki-digest` |
|
|
191
|
+
| Issue | 缺陷管理 | `manage-issue-discover` → `manage-issue` |
|
|
192
|
+
| 文档同步 | 代码大改后 | `quality-sync` → `manage-codebase-refresh` |
|
|
193
|
+
| 重构 | 技术债积累 | `quality-refactor` → `quality-review` |
|
|
194
|
+
| 发布 | 里程碑结束 | `maestro-milestone-audit` → `maestro-milestone-release` |
|
|
195
|
+
| 并行开发 | 多 milestone 并行 | `maestro-fork` → ... → `maestro-merge` |
|
|
196
|
+
|
|
153
197
|
输出 ranked candidates,取 top N(默认 3)。
|
|
154
198
|
|
|
155
|
-
|
|
199
|
+
</actions>
|
|
200
|
+
|
|
201
|
+
</state_machine>
|
|
202
|
+
|
|
203
|
+
<presentation>
|
|
156
204
|
|
|
157
|
-
|
|
205
|
+
### `--list` 模式
|
|
158
206
|
|
|
159
|
-
|
|
207
|
+
按 workflow 簇(主线 / Learning / Knowledge / Wiki / Issue / 文档 / 重构 / 发布 / 并行)分组展示全部候选 + description,结束。
|
|
208
|
+
|
|
209
|
+
### 正常模式
|
|
160
210
|
|
|
161
|
-
显示:
|
|
162
211
|
```
|
|
163
212
|
🎯 推荐 (top pick): /<command-name>
|
|
164
213
|
<description>
|
|
165
|
-
推荐理由:
|
|
214
|
+
推荐理由: <命中规则 + lifecycle 位置一句话>
|
|
166
215
|
|
|
167
216
|
备选:
|
|
168
217
|
2. /<alt-1> — <description>
|
|
169
218
|
3. /<alt-2> — <description>
|
|
170
219
|
|
|
171
|
-
执行参数: <args
|
|
220
|
+
执行参数: <args>
|
|
172
221
|
```
|
|
173
222
|
|
|
174
|
-
|
|
175
|
-
- `-y` → 直接执行 top pick
|
|
176
|
-
- 否则 → `ask_user` 让用户:执行 top pick / 选备选 / 修改参数 / 取消
|
|
177
|
-
|
|
178
|
-
### Step 4: Execute
|
|
179
|
-
|
|
180
|
-
通过 `invoke_skill({ skill: "<chosen-command-name>", args: "<args>" })` 执行。
|
|
223
|
+
`--dry-run` 展示后结束;`-y` 直接 S_EXECUTE;否则 ask_user 提供:执行 top pick / 选备选 / 修改参数 / 取消。
|
|
181
224
|
|
|
182
|
-
|
|
183
|
-
- 默认把 intent 原文作为第一个参数传给目标命令
|
|
184
|
-
- 若用户在 Step 3 修改了参数,使用修改后的版本
|
|
185
|
-
- `-y` flag 透传给目标命令(如果目标命令支持)
|
|
225
|
+
</presentation>
|
|
186
226
|
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
✅ 已执行 /<command-name>
|
|
190
|
-
```
|
|
227
|
+
<appendix>
|
|
191
228
|
|
|
192
|
-
|
|
229
|
+
### Error Codes
|
|
193
230
|
|
|
194
|
-
</execution>
|
|
195
|
-
|
|
196
|
-
<error_codes>
|
|
197
231
|
| Code | Severity | Condition | Recovery |
|
|
198
232
|
|------|----------|-----------|----------|
|
|
199
|
-
| E001 | error |
|
|
200
|
-
| E002 | error |
|
|
201
|
-
| E003 | error |
|
|
202
|
-
| W001 | warning |
|
|
203
|
-
| W002 | warning | intent 与所有候选匹配度均低 |
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
233
|
+
| E001 | error | intent 空且 clarification 后仍空 | 提供意图描述或使用 `--list` 浏览 |
|
|
234
|
+
| E002 | error | 候选池为空(`.claude/commands/` 缺失或无 .md) | 检查 commands 目录 |
|
|
235
|
+
| E003 | error | 选定命令名无法解析为有效 skill | 列出有效命令重选 |
|
|
236
|
+
| W001 | warning | top1 与 top2 得分差距 < 阈值 | 强制展示前 3 让用户裁决 |
|
|
237
|
+
| W002 | warning | intent 与所有候选匹配度均低 | 提示考虑 `/maestro` 或 `/maestro-ralph` 走管线 |
|
|
238
|
+
|
|
239
|
+
### Success Criteria
|
|
240
|
+
|
|
207
241
|
- [ ] Intent 解析 + flags 提取完成
|
|
208
242
|
- [ ] 读取 `.workflow/state.json` + scratch artifacts 推断 lifecycle_position
|
|
209
|
-
- [ ]
|
|
210
|
-
- [ ] 评分综合:intent 字面匹配 + lifecycle
|
|
243
|
+
- [ ] 候选池等于路由表(管线编排器不在)
|
|
244
|
+
- [ ] 评分综合:intent 字面匹配 + lifecycle 下一步 + workflow 簇 + recent activity
|
|
211
245
|
- [ ] 空 intent / "继续" / "下一步" → 直接采用 lifecycle 推断的下一步
|
|
212
|
-
- [ ] top pick
|
|
246
|
+
- [ ] top pick 展示附"推荐理由"(命中规则 + lifecycle 位置)
|
|
213
247
|
- [ ] `--dry-run` 仅展示,不执行
|
|
214
|
-
- [ ] `-y` 自动执行 top pick
|
|
215
|
-
- [ ]
|
|
216
|
-
- [ ]
|
|
217
|
-
- [ ] 不创建 session
|
|
218
|
-
- [ ] `--list` 模式按 workflow
|
|
219
|
-
|
|
248
|
+
- [ ] `-y` 自动执行 top pick;用户传入时透传到 skill args
|
|
249
|
+
- [ ] 非自动模式通过 ask_user 确认或选备选
|
|
250
|
+
- [ ] 选定命令通过单次 `invoke_skill()` 调用执行
|
|
251
|
+
- [ ] 不创建 session / 不生成 status.json / 不触发后续 chain
|
|
252
|
+
- [ ] `--list` 模式按 workflow 簇分组展示
|
|
253
|
+
|
|
254
|
+
</appendix>
|
|
@@ -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 重塑链路
|