maestro-flow 0.4.12 → 0.4.14
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/role-design-author.md +6 -4
- package/.agents/skills/learn-decompose/SKILL.md +6 -6
- package/.agents/skills/learn-follow/SKILL.md +4 -4
- package/.agents/skills/learn-investigate/SKILL.md +6 -6
- package/.agents/skills/learn-retro/SKILL.md +7 -7
- package/.agents/skills/learn-second-opinion/SKILL.md +4 -4
- package/.agents/skills/maestro-amend/SKILL.md +1 -0
- package/.agents/skills/maestro-analyze/SKILL.md +10 -3
- package/.agents/skills/maestro-blueprint/SKILL.md +4 -3
- package/.agents/skills/maestro-brainstorm/SKILL.md +6 -5
- package/.agents/skills/maestro-fork/SKILL.md +1 -1
- package/.agents/skills/maestro-guard/SKILL.md +3 -2
- package/.agents/skills/maestro-impeccable/SKILL.md +13 -11
- package/.agents/skills/maestro-milestone-release/SKILL.md +1 -1
- package/.agents/skills/maestro-plan/SKILL.md +3 -1
- package/.agents/skills/maestro-ralph/SKILL.md +21 -16
- package/.agents/skills/maestro-ralph-execute/SKILL.md +30 -11
- package/.agents/skills/maestro-roadmap/SKILL.md +4 -3
- package/.agents/skills/maestro-verify/SKILL.md +1 -1
- package/.agents/skills/manage-harvest/SKILL.md +1 -0
- package/.agents/skills/manage-issue-discover/SKILL.md +1 -1
- package/.agents/skills/manage-knowhow/SKILL.md +1 -1
- package/.agents/skills/manage-learn/SKILL.md +4 -4
- package/.agents/skills/quality-auto-test/SKILL.md +5 -5
- package/.agents/skills/quality-refactor/SKILL.md +1 -1
- package/.agents/skills/quality-retrospective/SKILL.md +2 -2
- package/.agents/skills/security-audit/SKILL.md +24 -0
- package/.agents/skills/spec-remove/SKILL.md +6 -2
- package/.agy/agents/role-design-author.md +6 -4
- package/.agy/skills/learn-decompose/SKILL.md +6 -6
- package/.agy/skills/learn-follow/SKILL.md +4 -4
- package/.agy/skills/learn-investigate/SKILL.md +6 -6
- package/.agy/skills/learn-retro/SKILL.md +7 -7
- package/.agy/skills/learn-second-opinion/SKILL.md +4 -4
- package/.agy/skills/maestro-amend/SKILL.md +1 -0
- package/.agy/skills/maestro-analyze/SKILL.md +10 -3
- package/.agy/skills/maestro-blueprint/SKILL.md +4 -3
- package/.agy/skills/maestro-brainstorm/SKILL.md +6 -5
- package/.agy/skills/maestro-fork/SKILL.md +1 -1
- package/.agy/skills/maestro-guard/SKILL.md +3 -2
- package/.agy/skills/maestro-impeccable/SKILL.md +13 -11
- package/.agy/skills/maestro-milestone-release/SKILL.md +1 -1
- package/.agy/skills/maestro-plan/SKILL.md +3 -1
- package/.agy/skills/maestro-ralph/SKILL.md +21 -16
- package/.agy/skills/maestro-ralph-execute/SKILL.md +30 -11
- package/.agy/skills/maestro-roadmap/SKILL.md +4 -3
- package/.agy/skills/maestro-verify/SKILL.md +1 -1
- package/.agy/skills/manage-harvest/SKILL.md +1 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +1 -1
- package/.agy/skills/manage-knowhow/SKILL.md +1 -1
- package/.agy/skills/manage-learn/SKILL.md +4 -4
- package/.agy/skills/quality-auto-test/SKILL.md +5 -5
- package/.agy/skills/quality-refactor/SKILL.md +1 -1
- package/.agy/skills/quality-retrospective/SKILL.md +2 -2
- package/.agy/skills/security-audit/SKILL.md +24 -0
- package/.agy/skills/spec-remove/SKILL.md +6 -2
- package/.claude/agents/role-design-author.md +6 -4
- package/.claude/commands/learn-decompose.md +6 -6
- package/.claude/commands/learn-follow.md +4 -4
- package/.claude/commands/learn-investigate.md +6 -6
- package/.claude/commands/learn-retro.md +7 -7
- package/.claude/commands/learn-second-opinion.md +4 -4
- package/.claude/commands/maestro-amend.md +1 -0
- package/.claude/commands/maestro-analyze.md +10 -3
- package/.claude/commands/maestro-blueprint.md +4 -3
- package/.claude/commands/maestro-brainstorm.md +6 -5
- package/.claude/commands/maestro-fork.md +1 -1
- package/.claude/commands/maestro-guard.md +3 -2
- package/.claude/commands/maestro-impeccable.md +13 -11
- package/.claude/commands/maestro-milestone-release.md +1 -1
- package/.claude/commands/maestro-plan.md +3 -1
- package/.claude/commands/maestro-ralph-execute.md +30 -11
- package/.claude/commands/maestro-ralph.md +21 -16
- package/.claude/commands/maestro-roadmap.md +4 -3
- package/.claude/commands/maestro-verify.md +1 -1
- package/.claude/commands/manage-harvest.md +1 -0
- package/.claude/commands/manage-issue-discover.md +1 -1
- package/.claude/commands/manage-knowhow.md +1 -1
- package/.claude/commands/manage-learn.md +4 -4
- package/.claude/commands/quality-auto-test.md +5 -5
- package/.claude/commands/quality-refactor.md +1 -1
- package/.claude/commands/quality-retrospective.md +2 -2
- package/.claude/commands/security-audit.md +24 -0
- package/.claude/commands/spec-remove.md +6 -2
- package/.codex/skills/learn-decompose/SKILL.md +4 -4
- package/.codex/skills/learn-follow/SKILL.md +3 -3
- package/.codex/skills/learn-investigate/SKILL.md +3 -3
- package/.codex/skills/learn-retro/SKILL.md +3 -3
- package/.codex/skills/learn-second-opinion/SKILL.md +3 -3
- package/.codex/skills/maestro-analyze/SKILL.md +4 -3
- package/.codex/skills/maestro-blueprint/SKILL.md +4 -3
- package/.codex/skills/maestro-brainstorm/SKILL.md +148 -7
- package/.codex/skills/maestro-fork/SKILL.md +2 -0
- package/.codex/skills/maestro-guard/SKILL.md +3 -2
- package/.codex/skills/maestro-impeccable/SKILL.md +13 -11
- package/.codex/skills/maestro-ralph/SKILL.md +1 -1
- package/.codex/skills/maestro-roadmap/SKILL.md +4 -3
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +9 -5
- package/.codex/skills/manage-harvest/SKILL.md +1 -1
- package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
- package/.codex/skills/manage-knowhow/SKILL.md +1 -1
- package/.codex/skills/manage-learn/SKILL.md +3 -3
- package/.codex/skills/quality-refactor/SKILL.md +2 -2
- package/.codex/skills/quality-retrospective/SKILL.md +3 -3
- package/.codex/skills/security-audit/SKILL.md +24 -0
- package/.codex/skills/spec-remove/SKILL.md +8 -2
- package/package.json +1 -1
- package/workflows/agy-instructions.md +2 -0
- package/workflows/analyze.md +6 -6
- package/workflows/auto-test.md +6 -1
- package/workflows/brainstorm.md +26 -12
- package/workflows/claude-instructions.md +2 -0
- package/workflows/codex-instructions.md +16 -83
- package/workflows/debug.md +5 -5
- package/workflows/harvest.md +2 -2
- package/workflows/impeccable.md +2 -0
- package/workflows/init.md +1 -1
- package/workflows/issue-analyze.md +14 -100
- package/workflows/issue-discover.md +2 -3
- package/workflows/issue-execute.md +1 -1
- package/workflows/issue-gaps-analyze.md +2 -0
- package/workflows/learn.md +1 -1
- package/workflows/maestro-chain-execute.md +10 -228
- package/workflows/maestro.md +1 -0
- package/workflows/milestone-complete.md +3 -3
- package/workflows/milestone-release.md +82 -0
- package/workflows/plan.md +5 -5
- package/workflows/quick.md +4 -4
- package/workflows/refactor.md +3 -3
- package/workflows/retrospective.md +4 -4
- package/workflows/roadmap.md +1 -1
- package/workflows/spec-generate.md +2 -0
- package/workflows/specs-add.md +6 -1
- package/workflows/specs-load.md +6 -1
- package/workflows/specs-setup.md +6 -1
- package/workflows/sync.md +13 -0
- package/workflows/tools-spec.md +4 -0
- package/workflows/ui-design.md +4 -4
- package/workflows/ui-style.md +1 -1
- package/workflows/verify.md +1 -1
- package/workflows/wiki-manage.md +2 -0
|
@@ -19,9 +19,9 @@ You produce a set of analysis files for one role in a brainstorm session, organi
|
|
|
19
19
|
| Field | Required | Notes |
|
|
20
20
|
|---|---|---|
|
|
21
21
|
| `role_name` | yes | kebab-case slug, e.g. `system-architect` |
|
|
22
|
-
| `role_template_path` | yes |
|
|
23
|
-
| `guidance_path` | yes | path to `guidance-specification.md` |
|
|
24
|
-
| `output_dir` | yes | absolute path to role folder — `{session_dir}/{role}
|
|
22
|
+
| `role_template_path` | yes | **absolute** path to `planning-roles/{role}.md` (orchestrator MUST expand `~/`) |
|
|
23
|
+
| `guidance_path` | yes | **absolute** path to `guidance-specification.md` |
|
|
24
|
+
| `output_dir` | yes | **absolute** path to role folder — `{session_dir}/{role}/`. If you receive a relative path or a literal `{output_dir}` placeholder, fail fast with `TASK BLOCKED: output_dir is not absolute`. |
|
|
25
25
|
| `feature_list` | optional | F-id + slug + title rows; if missing, fall back to non-feature organization |
|
|
26
26
|
| `design_research` | optional | external research markdown to integrate as evidence |
|
|
27
27
|
| `project_specs` | optional | pre-loaded `maestro spec load` output |
|
|
@@ -30,7 +30,9 @@ You produce a set of analysis files for one role in a brainstorm session, organi
|
|
|
30
30
|
|
|
31
31
|
## Output Contract
|
|
32
32
|
|
|
33
|
-
Write files to `output_dir
|
|
33
|
+
Write files to `output_dir/` using the Write tool. Do NOT write files anywhere else. Do NOT return analysis as chat text — files on disk are the only valid deliverable. After writing, verify with Glob that `analysis.md` exists; if any Write call fails (e.g. relative path rejected), fail fast with `TASK BLOCKED`.
|
|
34
|
+
|
|
35
|
+
**Authority note**: This Output Contract is authoritative for file layout. The role template at `role_template_path` may contain a legacy "## Brainstorming Analysis Structure" section describing a single-file layout — ignore it for file structure. Use the role template ONLY to source §3 subsection headings (via its "## MUST-Have Sections (Brainstorming)" block when present).
|
|
34
36
|
|
|
35
37
|
### File Structure
|
|
36
38
|
|
|
@@ -27,8 +27,8 @@ $ARGUMENTS — target path/module and optional flags.
|
|
|
27
27
|
- `--save-spec`: `invoke_skill("spec-add")` for each new pattern
|
|
28
28
|
- `--save-wiki`: create wiki note per dimension group
|
|
29
29
|
|
|
30
|
-
**Storage read**: target files + `coding-conventions.md` +
|
|
31
|
-
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append
|
|
30
|
+
**Storage read**: target files + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
|
|
31
|
+
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
|
|
32
32
|
</context>
|
|
33
33
|
|
|
34
34
|
<state_machine>
|
|
@@ -49,7 +49,7 @@ S_RESOLVE:
|
|
|
49
49
|
→ S_RESOLVE WHEN: unresolvable DO: ask_user
|
|
50
50
|
|
|
51
51
|
S_DEDUP:
|
|
52
|
-
→ S_ANALYZE DO: read coding-conventions.md + specs/learnings.md → build known pattern set
|
|
52
|
+
→ S_ANALYZE DO: read coding-conventions.md + .workflow/specs/learnings.md → build known pattern set
|
|
53
53
|
|
|
54
54
|
S_ANALYZE:
|
|
55
55
|
→ S_CROSSREF DO: A_PARALLEL_DIMENSION_ANALYSIS
|
|
@@ -61,7 +61,7 @@ S_CATALOG:
|
|
|
61
61
|
→ S_PERSIST DO: write KNW-decompose report (grouped by dimension: pattern table + details)
|
|
62
62
|
|
|
63
63
|
S_PERSIST:
|
|
64
|
-
→ END DO: append specs/learnings.md [+ spec-add if --save-spec] [+ wiki note if --save-wiki]
|
|
64
|
+
→ END DO: append .workflow/specs/learnings.md [+ spec-add if --save-spec] [+ wiki note if --save-wiki]
|
|
65
65
|
|
|
66
66
|
</transitions>
|
|
67
67
|
|
|
@@ -88,7 +88,7 @@ For each finding, match against known pattern set:
|
|
|
88
88
|
| Status | Condition |
|
|
89
89
|
|--------|-----------|
|
|
90
90
|
| documented | Already in coding-conventions.md |
|
|
91
|
-
| known | In specs/learnings.md |
|
|
91
|
+
| known | In .workflow/specs/learnings.md |
|
|
92
92
|
| new | Not seen before |
|
|
93
93
|
|
|
94
94
|
Flag contradictions (finding conflicts with documented convention). Merge duplicates across agents (same pattern found by multiple dimensions).
|
|
@@ -108,7 +108,7 @@ Flag contradictions (finding conflicts with documented convention). Merge duplic
|
|
|
108
108
|
<success_criteria>
|
|
109
109
|
- [ ] 4 dimension agents spawned in parallel, findings with anchors
|
|
110
110
|
- [ ] Cross-reference: documented/known/new status assigned
|
|
111
|
-
- [ ] Pattern catalog written + specs/learnings.md appended
|
|
111
|
+
- [ ] Pattern catalog written + .workflow/specs/learnings.md appended
|
|
112
112
|
</success_criteria>
|
|
113
113
|
|
|
114
114
|
<next_step_routing>
|
|
@@ -14,7 +14,7 @@ allowed-tools:
|
|
|
14
14
|
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
15
15
|
|
|
16
16
|
<purpose>
|
|
17
|
-
Guided reading: walk through content section-by-section using forcing questions to extract patterns, identify assumptions, and build an understanding map. Findings persist to
|
|
17
|
+
Guided reading: walk through content section-by-section using forcing questions to extract patterns, identify assumptions, and build an understanding map. Findings persist to `.workflow/specs/learnings.md` as `<spec-entry>` blocks.
|
|
18
18
|
</purpose>
|
|
19
19
|
|
|
20
20
|
<context>
|
|
@@ -32,8 +32,8 @@ $ARGUMENTS — target and optional flags.
|
|
|
32
32
|
- `--depth deep`: every function, every branch, every assumption
|
|
33
33
|
- `--save-wiki`: create wiki note entry with reading notes
|
|
34
34
|
|
|
35
|
-
**Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` +
|
|
36
|
-
**Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append
|
|
35
|
+
**Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
|
|
36
|
+
**Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
|
|
37
37
|
</context>
|
|
38
38
|
|
|
39
39
|
<state_machine>
|
|
@@ -66,7 +66,7 @@ S_EXTRACT:
|
|
|
66
66
|
→ S_PERSIST DO: A_EXTRACT_PATTERNS
|
|
67
67
|
|
|
68
68
|
S_PERSIST:
|
|
69
|
-
→ END DO: write KNW-follow + append specs/learnings.md [+ wiki note if --save-wiki]
|
|
69
|
+
→ END DO: write KNW-follow + append .workflow/specs/learnings.md [+ wiki note if --save-wiki]
|
|
70
70
|
|
|
71
71
|
</transitions>
|
|
72
72
|
|
|
@@ -30,9 +30,9 @@ $ARGUMENTS — question text and optional flags.
|
|
|
30
30
|
- `.workflow/knowhow/KNW-investigate-{slug}/evidence.ndjson` — structured evidence (one JSON line per item)
|
|
31
31
|
- `.workflow/knowhow/KNW-investigate-{slug}/understanding.md` — evolving understanding
|
|
32
32
|
- `.workflow/knowhow/KNW-investigate-{slug}/report.md` — final report
|
|
33
|
-
-
|
|
33
|
+
- `.workflow/specs/learnings.md` — appended `<spec-entry>` blocks
|
|
34
34
|
|
|
35
|
-
**Storage read**: source files in scope + `maestro wiki search` +
|
|
35
|
+
**Storage read**: source files in scope + `maestro wiki search` + `.workflow/specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
|
|
36
36
|
</context>
|
|
37
37
|
|
|
38
38
|
<state_machine>
|
|
@@ -45,7 +45,7 @@ S_HYPOTHESIZE — 生成假设列表 PERSIST:
|
|
|
45
45
|
S_CLI_EXPLORE — CLI 辅助探索(可选) PERSIST: evidence.ndjson (append)
|
|
46
46
|
S_TEST — 逐假设测试 PERSIST: evidence.ndjson + understanding.md
|
|
47
47
|
S_ESCALATE — 3-strike 升级 PERSIST: —
|
|
48
|
-
S_REPORT — 综合报告 + persist PERSIST: report.md + specs/learnings.md
|
|
48
|
+
S_REPORT — 综合报告 + persist PERSIST: report.md + .workflow/specs/learnings.md
|
|
49
49
|
</states>
|
|
50
50
|
|
|
51
51
|
<transitions>
|
|
@@ -57,7 +57,7 @@ S_EVIDENCE:
|
|
|
57
57
|
→ S_PATTERN DO: A_COLLECT_EVIDENCE
|
|
58
58
|
|
|
59
59
|
S_PATTERN:
|
|
60
|
-
→ S_HYPOTHESIZE DO: match evidence against debug-notes.md + specs/learnings.md patterns
|
|
60
|
+
→ S_HYPOTHESIZE DO: match evidence against debug-notes.md + .workflow/specs/learnings.md patterns
|
|
61
61
|
|
|
62
62
|
S_HYPOTHESIZE:
|
|
63
63
|
→ S_CLI_EXPLORE WHEN: CLI tools enabled AND hypotheses non-trivial DO: A_FORM_HYPOTHESES
|
|
@@ -85,7 +85,7 @@ S_REPORT:
|
|
|
85
85
|
### A_FRAME_QUESTION
|
|
86
86
|
|
|
87
87
|
1. Parse question, generate slug, create KNW-investigate-{slug}/
|
|
88
|
-
2. Search prior knowledge: `maestro wiki search "<question>"` + search specs/learnings.md + read debug-notes.md
|
|
88
|
+
2. Search prior knowledge: `maestro wiki search "<question>"` + search .workflow/specs/learnings.md + read debug-notes.md
|
|
89
89
|
3. Write initial understanding.md (question, prior knowledge summary, scope, timestamp)
|
|
90
90
|
|
|
91
91
|
### A_COLLECT_EVIDENCE
|
|
@@ -126,7 +126,7 @@ For each hypothesis (rank order):
|
|
|
126
126
|
### A_SYNTHESIZE_REPORT
|
|
127
127
|
|
|
128
128
|
Write report.md: Answer (or INCONCLUSIVE), Evidence Trail table, Hypotheses Tested table, Key Learnings, Open Questions.
|
|
129
|
-
Append to specs/learnings.md: confirmed → roles="implement", disproved → roles="analyze" (gotcha).
|
|
129
|
+
Append to .workflow/specs/learnings.md: confirmed → roles="implement", disproved → roles="analyze" (gotcha).
|
|
130
130
|
|
|
131
131
|
</actions>
|
|
132
132
|
|
|
@@ -16,7 +16,7 @@ allowed-tools:
|
|
|
16
16
|
<purpose>
|
|
17
17
|
Unified retrospective combining git activity analysis and decision quality evaluation. Works on raw git history and wiki/spec data. Two lenses (git, decision), usable independently or together.
|
|
18
18
|
|
|
19
|
-
All insights persist to
|
|
19
|
+
All insights persist to `.workflow/specs/learnings.md` as `<spec-entry>` blocks.
|
|
20
20
|
</purpose>
|
|
21
21
|
|
|
22
22
|
<context>
|
|
@@ -30,9 +30,9 @@ $ARGUMENTS — lens selection and scope flags.
|
|
|
30
30
|
**Storage write**:
|
|
31
31
|
- `.workflow/knowhow/KNW-retro-{date}.md` — unified report
|
|
32
32
|
- `.workflow/knowhow/KNW-retro-{date}.json` — structured metrics
|
|
33
|
-
-
|
|
33
|
+
- `.workflow/specs/learnings.md` — appended `<spec-entry>` blocks (source: retro-git / retro-decision)
|
|
34
34
|
|
|
35
|
-
**Storage read**: git history, `.workflow/state.json`, prior `KNW-retro-*.json`,
|
|
35
|
+
**Storage read**: git history, `.workflow/state.json`, prior `KNW-retro-*.json`, `.workflow/specs/learnings.md`, wiki specs, `architecture-constraints.md`, phase context files
|
|
36
36
|
</context>
|
|
37
37
|
|
|
38
38
|
<state_machine>
|
|
@@ -42,7 +42,7 @@ S_PARSE — 解析 lens + flags PERSIST: —
|
|
|
42
42
|
S_GIT — git 活动分析(lens=git/all 时) PERSIST: metrics
|
|
43
43
|
S_DECISION — 决策质量评估(lens=decision/all 时) PERSIST: evaluations
|
|
44
44
|
S_REPORT — 生成统一报告 PERSIST: .md + .json
|
|
45
|
-
S_PERSIST — 写 spec-entry 块 PERSIST: specs/learnings.md
|
|
45
|
+
S_PERSIST — 写 spec-entry 块 PERSIST: .workflow/specs/learnings.md
|
|
46
46
|
</states>
|
|
47
47
|
|
|
48
48
|
<transitions>
|
|
@@ -62,7 +62,7 @@ S_REPORT:
|
|
|
62
62
|
→ S_PERSIST DO: write KNW-retro-{date}.md + .json
|
|
63
63
|
|
|
64
64
|
S_PERSIST:
|
|
65
|
-
→ END DO: append insights to specs/learnings.md via `maestro spec add learning`
|
|
65
|
+
→ END DO: append insights to .workflow/specs/learnings.md via `maestro spec add learning`
|
|
66
66
|
RULE: INS-id = hash(lens + metric_or_decision_id + date) for cross-session stability
|
|
67
67
|
|
|
68
68
|
</transitions>
|
|
@@ -104,7 +104,7 @@ maestro wiki search "decision" --json
|
|
|
104
104
|
maestro wiki list --type spec --json
|
|
105
105
|
git log --oneline --all --grep="decision\|chose\|decided" -20
|
|
106
106
|
```
|
|
107
|
-
Plus: architecture-constraints.md, phase context Locked/Deferred sections, specs/learnings.md.
|
|
107
|
+
Plus: architecture-constraints.md, phase context Locked/Deferred sections, .workflow/specs/learnings.md.
|
|
108
108
|
Apply --phase/--tag/--id filters.
|
|
109
109
|
|
|
110
110
|
**Build registry** per decision: id, title, source, date, rationale, alternatives, phase, implementation_evidence [file paths].
|
|
@@ -148,7 +148,7 @@ Apply --phase/--tag/--id filters.
|
|
|
148
148
|
- [ ] Git lens: metrics computed (commits, LOC, test ratio, churn, sessions), insights distilled
|
|
149
149
|
- [ ] Decision lens: decisions collected, 3 agents evaluated in parallel, lifecycle classified
|
|
150
150
|
- [ ] Unified report + structured JSON written
|
|
151
|
-
- [ ] specs/learnings.md appended with stable INS-ids
|
|
151
|
+
- [ ] .workflow/specs/learnings.md appended with stable INS-ids
|
|
152
152
|
</success_criteria>
|
|
153
153
|
|
|
154
154
|
<next_step_routing>
|
|
@@ -19,7 +19,7 @@ Structured second-opinion on code, decisions, or plans. Three modes:
|
|
|
19
19
|
- **challenge**: single adversarial agent — break assumptions, propose alternatives
|
|
20
20
|
- **consult**: interactive Q&A — agent studies target, answers your questions
|
|
21
21
|
|
|
22
|
-
Findings persist to
|
|
22
|
+
Findings persist to `.workflow/specs/learnings.md` as `<spec-entry>` blocks.
|
|
23
23
|
</purpose>
|
|
24
24
|
|
|
25
25
|
<context>
|
|
@@ -47,7 +47,7 @@ S_RESOLVE — 解析 target PERSIST: —
|
|
|
47
47
|
S_CONTEXT — 加载 specs/wiki 上下文 PERSIST: —
|
|
48
48
|
S_EXECUTE — 按 mode 执行分析 PERSIST: —
|
|
49
49
|
S_SYNTHESIZE — 综合观点、生成报告 PERSIST: outputs
|
|
50
|
-
S_PERSIST — 写文件、append specs/learnings.md PERSIST: knowhow files
|
|
50
|
+
S_PERSIST — 写文件、append .workflow/specs/learnings.md PERSIST: knowhow files
|
|
51
51
|
</states>
|
|
52
52
|
|
|
53
53
|
<transitions>
|
|
@@ -68,7 +68,7 @@ S_SYNTHESIZE:
|
|
|
68
68
|
→ S_PERSIST DO: merge perspectives → agreements, disagreements, verdict, top 3 recommendations
|
|
69
69
|
|
|
70
70
|
S_PERSIST:
|
|
71
|
-
→ END DO: write KNW-opinion + append <spec-entry> blocks to specs/learnings.md
|
|
71
|
+
→ END DO: write KNW-opinion + append <spec-entry> blocks to .workflow/specs/learnings.md
|
|
72
72
|
|
|
73
73
|
</transitions>
|
|
74
74
|
|
|
@@ -114,7 +114,7 @@ Interactive loop:
|
|
|
114
114
|
<success_criteria>
|
|
115
115
|
- [ ] Mode executed: review (3 parallel agents) / challenge (adversarial) / consult (interactive Q&A)
|
|
116
116
|
- [ ] Synthesis with agreements, disagreements, verdict
|
|
117
|
-
- [ ] Report written + findings appended to specs/learnings.md
|
|
117
|
+
- [ ] Report written + findings appended to .workflow/specs/learnings.md
|
|
118
118
|
</success_criteria>
|
|
119
119
|
|
|
120
120
|
<next_step_routing>
|
|
@@ -150,6 +150,7 @@ On validation failure: fix JSON, retry (max 2).
|
|
|
150
150
|
| Code | Condition | Recovery |
|
|
151
151
|
|------|-----------|----------|
|
|
152
152
|
| E001 | No signals from any source | Verify artifact paths or provide description |
|
|
153
|
+
| E002 | Signal source path invalid or unreadable | Check `--from-*` path; ensure artifact exists |
|
|
153
154
|
| E003 | All signals are code bugs, not command gaps | Use /maestro-quick or /maestro-plan --gaps |
|
|
154
155
|
| E004 | Overlay validation failed after 2 retries | Review JSON manually |
|
|
155
156
|
| W001 | Some signals skipped (code bugs) | Route to appropriate fix command |
|
|
@@ -40,6 +40,12 @@ $ARGUMENTS -- phase number for micro mode, topic text for macro/adhoc mode, no a
|
|
|
40
40
|
- **Macro mode** (text argument): Explore impact surface of a topic/requirement. Produces coarse-grained context with `scope_verdict` to route next step. Use before roadmap or for standalone analysis.
|
|
41
41
|
- **Micro mode** (numeric argument): Phase-level deep analysis within an existing roadmap. Produces fine-grained context for plan consumption. `analyze 1` = Phase 1 of current milestone.
|
|
42
42
|
|
|
43
|
+
**Disambiguation rule (mode selection):**
|
|
44
|
+
- First positional arg matches `^\d+$` (pure digits, e.g. `1`, `42`) → **micro mode** (treat as phase number)
|
|
45
|
+
- First positional arg is non-numeric text (e.g. `auth-refactor`, `improve search`) → **macro mode** (treat as topic)
|
|
46
|
+
- No positional arg → milestone-wide micro mode (when roadmap present) else macro fallback
|
|
47
|
+
- Mixed input like `"1 phase"` is treated as text → macro mode (only bare numerics trigger micro)
|
|
48
|
+
|
|
43
49
|
**Flags:**
|
|
44
50
|
- `-y` / `--yes`: Auto mode — skip interactive scoping, use recommended defaults, auto-deepen
|
|
45
51
|
- `-c` / `--continue`: Resume from existing session (auto-detect session folder + discussion.md)
|
|
@@ -56,14 +62,15 @@ Scope routing, output directory format, artifact registration schema, and output
|
|
|
56
62
|
<interview_protocol>
|
|
57
63
|
Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `-y/--yes`, `-c/--continue`, or input is already specific (explicit phase number or unambiguous topic).
|
|
58
64
|
|
|
59
|
-
- One decision per turn via ask_user with 2–4 options + a (Recommended) default
|
|
60
|
-
-
|
|
65
|
+
- One decision per turn via ask_user with 2–4 options + a (Recommended) default. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
|
|
66
|
+
- Search-first when uncertain: before asking, resolve via `state.json`, `roadmap.md`, `issues.jsonl`, `maestro spec load`, `maestro wiki search`, Grep, Read, or — for open-ended multi-file scans — spawn `delegate_subagent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user — search first, then ask only what truly needs human judgment.
|
|
67
|
+
- Writeback cadence: each settled decision is immediately appended/updated in `discussion.md` (top table) and mirrored into `context.md` "Interview Decisions". Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
|
|
61
68
|
- Walk the decision dependency tree strictly: scope → depth → dimensions → Go/No-Go threshold. Do not open the next branch until the current one is settled.
|
|
62
69
|
- Scope guard: only ask about decisions owned by `analyze`. Do not prejudge plan/execute concerns.
|
|
63
70
|
|
|
64
71
|
Decision points: scope (phase / topic / milestone-wide / adhoc / --gaps) → depth (quick / standard / deep) → dimensions (which of the 6 to keep) → Go/No-Go threshold.
|
|
65
72
|
|
|
66
|
-
Exit:
|
|
73
|
+
Exit: when all decision points are settled (or user explicitly signals to proceed), finalize session metadata. The decision table (populated incrementally during interview) uses this schema:
|
|
67
74
|
`| # | Decision | Choice | Source (user / code / default) |`
|
|
68
75
|
</interview_protocol>
|
|
69
76
|
|
|
@@ -66,14 +66,15 @@ maestro-analyze → maestro-roadmap → maestro-plan
|
|
|
66
66
|
<interview_protocol>
|
|
67
67
|
Interview the user relentlessly about every aspect of the spec until shared understanding is reached. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one; if a question can be answered by exploring the codebase, explore the codebase instead. Active only in interactive mode; skip when `-y/--yes`, `-c/--continue`, or input is already specific (clear idea + scope).
|
|
68
68
|
|
|
69
|
-
- Ask one question per turn via ask_user and wait for the user's feedback before continuing; every question must carry a recommended answer marked `(Recommended)`, 2–4 options total
|
|
70
|
-
-
|
|
69
|
+
- Ask one question per turn via ask_user and wait for the user's feedback before continuing; every question must carry a recommended answer marked `(Recommended)`, 2–4 options total. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
|
|
70
|
+
- Search-first when uncertain: before asking, resolve via `state.json`, existing artifacts, `maestro spec load`, direct codebase exploration (Glob/Grep/Read), or — for open-ended multi-file scans — spawn `delegate_subagent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user — search first, then ask only what truly needs human judgment.
|
|
71
|
+
- Writeback cadence: each settled decision is immediately persisted into `blueprint-config.json` before the next question. Do NOT batch writeback to the end — partial decisions must already be on disk.
|
|
71
72
|
- Walk the decision dependency tree depth-first: scope → spec type → focus areas → requirement priorities. Do not open the next branch until the current one is settled.
|
|
72
73
|
- Scope guard: only decide the shape of the specification. Do not pre-resolve roadmap phases or plan tasks — those belong to downstream commands.
|
|
73
74
|
|
|
74
75
|
Decision points: scope (full product / feature set / single feature) → spec type (service / api / library / platform) → focus areas → whether to run codebase exploration.
|
|
75
76
|
|
|
76
|
-
Exit: on consensus or
|
|
77
|
+
Exit: on consensus or explicit user signal to proceed, finalize blueprint-config.json (decisions already written incrementally) and proceed to Phase 1.
|
|
77
78
|
</interview_protocol>
|
|
78
79
|
|
|
79
80
|
<execution>
|
|
@@ -14,7 +14,7 @@ allowed-tools:
|
|
|
14
14
|
<!-- Open-standard mirror generated by scripts/build-agents-standard.mjs — do not edit; re-run after editing .claude/ source. -->
|
|
15
15
|
|
|
16
16
|
<purpose>
|
|
17
|
-
Unified brainstorming combining interactive framework generation, multi-role parallel analysis, cross-role review, and resolution writeback. Two modes: Auto (full pipeline: guidance-specification → parallel {role}/ multi-file analysis → cross-role-reviewer compares Decision Digests for conflicts/gaps/synergies → user-confirmed resolutions patched into role files + logged in guidance §12) and Single Role (individual role analysis for an existing session). Outputs structured artifacts in `.workflow/scratch/brainstorm-{slug}
|
|
17
|
+
Unified brainstorming combining interactive framework generation, multi-role parallel analysis, cross-role review, and resolution writeback. Two modes: Auto (full pipeline: guidance-specification → parallel {role}/ multi-file analysis → cross-role-reviewer compares Decision Digests for conflicts/gaps/synergies → user-confirmed resolutions patched into role files + logged in guidance §12) and Single Role (individual role analysis for an existing session). Outputs structured artifacts in `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}/` ready for downstream planning (roadmap / analyze / blueprint consume `guidance-specification.md`).
|
|
18
18
|
</purpose>
|
|
19
19
|
|
|
20
20
|
<required_reading>
|
|
@@ -32,7 +32,7 @@ $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
|
|
|
32
32
|
|
|
33
33
|
**Auto mode**: topic text (e.g., "Build real-time collaboration platform") triggers full pipeline.
|
|
34
34
|
**Single role mode**: valid role name (e.g., "system-architect") runs one role analysis.
|
|
35
|
-
**All output** goes to `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}
|
|
35
|
+
**All output** goes to `.workflow/scratch/{YYYYMMDD}-brainstorm-{slug}/` (orchestrator MUST resolve this to an absolute path before passing to sub-agents).
|
|
36
36
|
**Artifact registration**: On completion, registers artifact (type=brainstorm) in state.json.
|
|
37
37
|
**Output boundary**: ALL file writes MUST target `{output_dir}/` or `.workflow/state.json` only. NEVER modify source code or files outside these paths.
|
|
38
38
|
**Produced files**: `guidance-specification.md`, `design-research.md` (optional), `{role}/analysis.md` + `{role}/analysis-F-*.md` + `{role}/findings-*.md` (per selected role).
|
|
@@ -64,14 +64,15 @@ $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
|
|
|
64
64
|
<interview_protocol>
|
|
65
65
|
Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `--yes/-y`, `--skip-questions`, `--session` (existing session), or input is already specific.
|
|
66
66
|
|
|
67
|
-
- One decision per turn via ask_user with 2–4 options + a (Recommended) default;
|
|
68
|
-
-
|
|
67
|
+
- One decision per turn via ask_user with 2–4 options + a (Recommended) default. The user controls termination — keep interviewing until convergence; they can interrupt naturally or via `Other` at any time.
|
|
68
|
+
- Search-first when uncertain: before asking, resolve via `state.json`, the session directory, `maestro spec load`, `maestro wiki search`, Glob/Grep/Read, or — for open-ended multi-file scans — spawn `delegate_subagent(subagent_type: Explore)` / `maestro delegate ... --role explore`. Never ask what code or memory can verify; never bounce your own ambiguity back to the user — search first, then ask only what truly needs human judgment.
|
|
69
|
+
- Writeback cadence: each time a decision settles, immediately append/update its row in `guidance-specification.md` §11 (create the section if absent). Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
|
|
69
70
|
- Branch jumps allowed: the user may switch freely between mode / role / upstream / sub-pipeline branches; sequence is not enforced, but every decision point must end with a definite answer.
|
|
70
71
|
- Scope guard: only ask about decisions owned by `brainstorm`. Do not pre-resolve roadmap/plan choices.
|
|
71
72
|
|
|
72
73
|
Decision points: mode (auto / single-role / review-only) / role selection and `--count` / `--from` upstream source / whether to enable design-research and the DESIGN.md sub-pipeline.
|
|
73
74
|
|
|
74
|
-
Exit: on consensus or
|
|
75
|
+
Exit: on consensus or explicit user signal to proceed, finalize session metadata. The §11 table (already populated incrementally) uses this schema:
|
|
75
76
|
`| # | Decision | Choice | Source (user / code / default) |`
|
|
76
77
|
</interview_protocol>
|
|
77
78
|
|
|
@@ -21,7 +21,7 @@ Since `.workflow/` is gitignored, this command explicitly copies project context
|
|
|
21
21
|
|
|
22
22
|
Also supports `--sync` mode to pull latest main branch changes and shared artifacts into an active worktree (prevents source and artifact drift for long-lived worktrees).
|
|
23
23
|
|
|
24
|
-
Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree.
|
|
24
|
+
Produces `.workflow/worktrees.json` registry in the main worktree and `.workflow/worktree-scope.json` marker in the worktree, and writes a scoped `state.json` inside the worktree containing only the forked milestone's artifacts.
|
|
25
25
|
</purpose>
|
|
26
26
|
|
|
27
27
|
<required_reading>
|
|
@@ -79,10 +79,11 @@ Read `.workflow/config.json`. If file missing, initialize with empty guard secti
|
|
|
79
79
|
- Write config
|
|
80
80
|
|
|
81
81
|
**`deny <path>`:**
|
|
82
|
-
- Normalize path to forward slashes
|
|
82
|
+
- Normalize path to forward slashes, ensure trailing slash for directories
|
|
83
|
+
- If `guard.mode` is `allow`, switch to `deny` and clear paths with warning
|
|
83
84
|
- Set `guard.mode = "deny"`
|
|
84
85
|
- Add path to `guard.paths` (deduplicate)
|
|
85
|
-
- Set `guard.enabled = true` if not already
|
|
86
|
+
- Set `guard.enabled = true` if not already (symmetric with `allow`: adding a deny path auto-enables the guard)
|
|
86
87
|
- Write config
|
|
87
88
|
|
|
88
89
|
**Step 4: Confirm**
|
|
@@ -76,6 +76,8 @@ responsive-design.md, spatial-design.md, typography.md, ux-writing.md
|
|
|
76
76
|
|
|
77
77
|
## Chains
|
|
78
78
|
|
|
79
|
+
Chain step names below reuse Command Routing names but resolve through the chain runner. To avoid ambiguity with Direct command invocation, internal display, todo items, and session status records always tag chain steps with the `impeccable:` prefix (e.g. `impeccable:craft`, `impeccable:critique`). The bare names in this table refer to the workflow file at `~/.maestro/workflows/impeccable/{name}.md` that the chain step reads.
|
|
80
|
+
|
|
79
81
|
| Chain | Steps | Scenario |
|
|
80
82
|
|-------|-------|----------|
|
|
81
83
|
| build | teach? → explore? → shape → craft → critique → [refine] → audit → polish | New from scratch |
|
|
@@ -183,17 +185,17 @@ Before reading any command workflow:
|
|
|
183
185
|
## Chain Execution
|
|
184
186
|
|
|
185
187
|
1. Prerequisites ✓
|
|
186
|
-
2. **Display chain preview**: parse chain definition, output full step preview:
|
|
188
|
+
2. **Display chain preview**: parse chain definition, output full step preview (chain steps prefixed `impeccable:` to disambiguate from Direct commands):
|
|
187
189
|
```
|
|
188
190
|
── Chain: build ──────────────────────────
|
|
189
|
-
1. teach (conditional: PRODUCT.md missing)
|
|
190
|
-
2. explore (conditional: DESIGN.md missing)
|
|
191
|
-
3. shape
|
|
192
|
-
4. craft
|
|
193
|
-
5. critique ◆ quality gate (threshold: 26/40)
|
|
194
|
-
6. [refine] ↺ auto-fix loop (max: 3)
|
|
195
|
-
7. audit ◆ quality gate (threshold: 14/20)
|
|
196
|
-
8. polish
|
|
191
|
+
1. impeccable:teach (conditional: PRODUCT.md missing)
|
|
192
|
+
2. impeccable:explore (conditional: DESIGN.md missing)
|
|
193
|
+
3. impeccable:shape
|
|
194
|
+
4. impeccable:craft
|
|
195
|
+
5. impeccable:critique ◆ quality gate (threshold: 26/40)
|
|
196
|
+
6. impeccable:[refine] ↺ auto-fix loop (max: 3)
|
|
197
|
+
7. impeccable:audit ◆ quality gate (threshold: 14/20)
|
|
198
|
+
8. impeccable:polish
|
|
197
199
|
─────────────────────────────────────────
|
|
198
200
|
Target: {target}
|
|
199
201
|
```
|
|
@@ -207,9 +209,9 @@ Before reading any command workflow:
|
|
|
207
209
|
"gate_history": [], "loop_count": 0, "status": "running" }
|
|
208
210
|
```
|
|
209
211
|
4. **track_tasks init**: create todo items for all chain steps
|
|
210
|
-
- One item per step, format: `[chain] step N: {command} — {description}`
|
|
212
|
+
- One item per step, format: `[chain] step N: impeccable:{command} — {description}` (use `impeccable:` prefix to disambiguate from Direct command items)
|
|
211
213
|
- If conditional step is skipped, immediately mark completed
|
|
212
|
-
- Quality gate steps include threshold: `[chain] step 5: critique ◆ gate ≥26/40`
|
|
214
|
+
- Quality gate steps include threshold: `[chain] step 5: impeccable:critique ◆ gate ≥26/40`
|
|
213
215
|
5. For each step:
|
|
214
216
|
- Read `~/.maestro/workflows/impeccable/{command}.md` → execute
|
|
215
217
|
- **Step start**: track_tasks marks current step in_progress
|
|
@@ -46,7 +46,7 @@ $ARGUMENTS -- optional explicit version string and flags.
|
|
|
46
46
|
</context>
|
|
47
47
|
|
|
48
48
|
<execution>
|
|
49
|
-
Follow '~/.maestro/workflows/release.md' completely.
|
|
49
|
+
Follow '~/.maestro/workflows/milestone-release.md' completely.
|
|
50
50
|
|
|
51
51
|
**High-level flow:**
|
|
52
52
|
1. Validate preconditions (milestone completed, clean tree, audit PASS)
|
|
@@ -56,7 +56,9 @@ Scope routing, base flags (`--collab`, `--spec`, `-y`, `--gaps`, `--dir`), outpu
|
|
|
56
56
|
5. No args + roadmap → scope = "milestone" (unchanged)
|
|
57
57
|
6. No args + no roadmap → search state.json for latest analyze artifact, fallback standalone
|
|
58
58
|
|
|
59
|
-
**Ad-hoc milestone (D-008):** When scope resolves to "standalone" and `current_milestone == null`, plan auto-creates an adhoc milestone (`type: "adhoc"`) in state.json before proceeding. This ensures downstream milestone-audit/complete have a valid milestone context. See workflow plan.md § "Ad-hoc Milestone Auto-Creation".
|
|
59
|
+
**Ad-hoc milestone (D-008):** When scope resolves to "standalone" via the standard standalone resolution (no `--from` source), and `current_milestone == null`, plan auto-creates an adhoc milestone (`type: "adhoc"`) in state.json before proceeding. This ensures downstream milestone-audit/complete have a valid milestone context. See workflow plan.md § "Ad-hoc Milestone Auto-Creation".
|
|
60
|
+
|
|
61
|
+
**Exception (`--from analyze:ANL-xxx` / `blueprint:BLP-xxx`):** When scope is set to "standalone" by `--from`, skip adhoc milestone auto-creation — the upstream analyze/blueprint artifact already provides the milestone context (or is intentionally milestone-free). Adhoc creation in this path would conflict with the `--from` semantic of "this is a one-shot plan rooted in an existing artifact".
|
|
60
62
|
|
|
61
63
|
### Role Knowledge
|
|
62
64
|
`maestro wiki list --category arch` → select relevant → `maestro wiki load`
|
|
@@ -19,10 +19,12 @@ Closed-loop decision engine for the maestro workflow lifecycle.
|
|
|
19
19
|
Reads project state → infers position → builds adaptive chain → delegates execution.
|
|
20
20
|
|
|
21
21
|
Entry points:
|
|
22
|
-
- **`/maestro-ralph "intent"`** — New session: infer → decompose → build → execute
|
|
23
|
-
- **`/maestro-ralph continue`** —
|
|
22
|
+
- **`/maestro-ralph "intent"`** — New session: infer → decompose → build → (decomposition → emit /goal prompt, STOP;否则 dispatch ralph-execute)
|
|
23
|
+
- **`/maestro-ralph continue`** — Wrapper; dispatches to ralph-execute(首选直接 `/maestro-ralph-execute` 推进 step)
|
|
24
24
|
- **`/maestro-ralph status`** — Display session progress
|
|
25
25
|
|
|
26
|
+
> 推进规则:**step 推进由 `/maestro-ralph-execute` 负责**;ralph 仅在 build / decision 评估时介入。decision 节点由 ralph-execute 自动 `invoke_skill("maestro-ralph")` handoff,无需用户手动切换。
|
|
27
|
+
|
|
26
28
|
Initial decomposition (S_DECOMPOSE): boundary-clarified via ≤3 questions for broad intents (重构/全面/迁移/重写). 写入 status.json 的 `boundary_contract` / `execution_criteria` / `task_decomposition`,附 `/goal` prompt。
|
|
27
29
|
|
|
28
30
|
Node types:
|
|
@@ -70,15 +72,16 @@ Remaining → intent
|
|
|
70
72
|
|
|
71
73
|
<invariants>
|
|
72
74
|
1. **Ralph never executes steps** — only creates sessions and evaluates decisions
|
|
73
|
-
2. **Handoff via invoke_skill("maestro-ralph-execute")** —
|
|
75
|
+
2. **Handoff via invoke_skill("maestro-ralph-execute")** — 仅当 session 无 `task_decomposition` 时在创建后自动 handoff;decomposition 路径 STOP 等用户输入。decision 评估后始终 handoff
|
|
74
76
|
3. **Decision delegates read-only** — `maestro delegate --role analyze --mode analysis`
|
|
75
77
|
4. **Default type = internal** — `external` 仅显式标注时出现,build 不默认生成
|
|
76
78
|
5. **status.json 是唯一真源** — 不生成 markdown 清单或侧文件
|
|
77
79
|
6. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` 的 `STATUS: DONE`;缺失则视为未完成
|
|
78
80
|
7. **command_path 在 A_BUILD_STEPS 解析** — 全局优先 `~/.claude/commands/{name}.md`,fallback 项目 `.claude/commands/{name}.md`,写入 status.json
|
|
79
|
-
8. **
|
|
80
|
-
9. **
|
|
81
|
-
10. **
|
|
81
|
+
8. **Internal step 加载契约** — ralph-execute 读 `command_path` 后,必须解析并加载该命令 `<required_reading>` 引用的所有文件("入口 + workflow"形式的核心),并把 `<deferred_reading>` 路径记录到 `step.deferred_reads`;加载完成后输出 `✓ skill {name} 加载完成`。ralph 在 build 阶段只解析路径,不读 .md 内容
|
|
82
|
+
9. **Decomposition is outcome-oriented** — sub-goals 为可观测交付,禁止 lifecycle 复刻;`/goal` 用户绑定,ralph 只发提示词后 STOP,等用户输入
|
|
83
|
+
10. **planning_mode governs arg granularity** — `unified` → skill args 无 `{phase}`;`independent` → 含 `{phase}`
|
|
84
|
+
11. **task_decomposition 驱动 steps[] 动态生长** — `post-goal-audit` 按 unmet 子目标插入 scoped mini-loop;字段可选/累加,既有字段不删不改
|
|
82
85
|
</invariants>
|
|
83
86
|
|
|
84
87
|
<state_machine>
|
|
@@ -148,8 +151,9 @@ S_BUILD_CHAIN:
|
|
|
148
151
|
→ S_CREATE_SESSION DO: A_BUILD_STEPS
|
|
149
152
|
|
|
150
153
|
S_CREATE_SESSION:
|
|
151
|
-
→
|
|
152
|
-
→
|
|
154
|
+
→ END WHEN: task_decomposition present DO: A_CREATE_SESSION (emits Goal Prompt → STOP,等用户输入 /goal 后手动 /maestro-ralph-execute)
|
|
155
|
+
→ S_CONFIRM WHEN: not auto_confirm AND no decomposition DO: A_CREATE_SESSION
|
|
156
|
+
→ S_DISPATCH WHEN: auto_confirm AND no decomposition DO: A_CREATE_SESSION
|
|
153
157
|
|
|
154
158
|
S_CONFIRM:
|
|
155
159
|
→ S_DISPATCH WHEN: user selects "Proceed"
|
|
@@ -413,7 +417,8 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
413
417
|
- 全局优先:`~/.claude/commands/{name}.md` 存在 → `command_scope = "global"`
|
|
414
418
|
- Fallback:`.claude/commands/{name}.md` 存在 → `command_scope = "project"`
|
|
415
419
|
- 两者都缺 → `command_scope = "missing"`, `command_path = null`,A_CREATE_SESSION 报错 E006
|
|
416
|
-
|
|
420
|
+
- **不在 build 阶段读取 .md 内容**;`<required_reading>` / `<deferred_reading>` 解析与加载由 ralph-execute A_EXEC_INTERNAL 负责(保持入口/工作流分离)
|
|
421
|
+
10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`, `deferred_reads: []`
|
|
417
422
|
11. **scope_verdict gating**(仅当 chain 起点 = `analyze-macro`):
|
|
418
423
|
- `scope_verdict ∈ {medium, small}` → 跳过 `roadmap` + `analyze` 两 stage;`plan` 选 standalone 列(`--from analyze:{analyze_macro_id}`),不带 `{phase}`
|
|
419
424
|
- `scope_verdict == large` → 保留 `roadmap` + `analyze`;`plan` 选 phase 列(`{phase}`)
|
|
@@ -431,7 +436,7 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
431
436
|
1. Validate: 所有 step 的 `command_scope != "missing"`;否则 raise E006 + 列出缺失 skill
|
|
432
437
|
2. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (Appendix: Session Schema)
|
|
433
438
|
3. Display chain overview:每步显示 `{index}. {skill} [{type}] [{command_scope}]`
|
|
434
|
-
4. If `task_decomposition` present: display
|
|
439
|
+
4. If `task_decomposition` present: display **Goal Prompt block** (Appendix) → STOP,等用户输入 `/goal`(auto_confirm 也不跳过)
|
|
435
440
|
|
|
436
441
|
### A_DELEGATE_EVALUATE
|
|
437
442
|
|
|
@@ -620,7 +625,8 @@ Runs only when `task_decomposition` present.
|
|
|
620
625
|
"completion_confirmed": false,
|
|
621
626
|
"completion_status": null,
|
|
622
627
|
"completion_evidence": null,
|
|
623
|
-
"completed_at": null
|
|
628
|
+
"completed_at": null,
|
|
629
|
+
"deferred_reads": [] // 由 ralph-execute A_EXEC_INTERNAL 解析 .md 时填充
|
|
624
630
|
}],
|
|
625
631
|
"waves": [], "current_step": 0,
|
|
626
632
|
|
|
@@ -704,11 +710,9 @@ decision:post-goal-audit {retry+1}
|
|
|
704
710
|
链路概览后逐字显示(仅当 decomposition 已产出):
|
|
705
711
|
|
|
706
712
|
```
|
|
707
|
-
📋
|
|
708
|
-
|
|
709
|
-
/goal 目标达成条件: {session_dir}/status.json 中 task_decomposition[*].status == "done" 且 task_decomposition[*].completion_confirmed == true 且 steps[*].completion_confirmed == true。未达成时:阅读 {session_dir}/status.json 取得 execution_criteria / boundary_contract / task_decomposition / steps 作为行动手册,调用 /maestro-ralph continue 推进;严禁手动执行 skill 或越界修改 status.json.boundary_contract.out_of_scope。
|
|
713
|
+
📋 任务分解完成。复制以下 /goal 设定终止条件,随后运行 /maestro-ralph-execute:
|
|
710
714
|
|
|
711
|
-
|
|
715
|
+
/goal 直到 {session_dir}/status.json 的 task_decomposition[*] 与 steps[*] 全部 completion_confirmed=true 才停。每轮以 status.json 为唯一行动手册,通过 /maestro-ralph-execute 推进 step;decision 节点由其自动 handoff 回 ralph 评估。禁止手动执行 skill 或修改 boundary_contract.out_of_scope。
|
|
712
716
|
```
|
|
713
717
|
|
|
714
718
|
`/goal` 由用户输入;ralph 只输出此提示词。判据以 status.json 为权威。
|
|
@@ -744,7 +748,8 @@ decision:post-goal-audit {retry+1}
|
|
|
744
748
|
- [ ] Decomposition: broad intent ≤3 question clarify;narrow auto-derive
|
|
745
749
|
- [ ] status.json 唯一真源:boundary_contract + execution_criteria + task_decomposition;无外部清单
|
|
746
750
|
- [ ] 每个 step 默认 `type: "internal"`,含 `command_scope` + `command_path`(全局优先 fallback 项目)
|
|
747
|
-
- [ ]
|
|
751
|
+
- [ ] Ralph build 阶段只解析路径,不读 .md 内容;`<required_reading>` 加载由 ralph-execute A_EXEC_INTERNAL 完成
|
|
752
|
+
- [ ] 每个 step 含 `completion_confirmed` + `completion_status` + `completion_evidence` + `deferred_reads`(初始 false/null/[])
|
|
748
753
|
- [ ] 每个 sub-goal 含 `completion_confirmed`(初始 false)
|
|
749
754
|
- [ ] post-goal-audit decision 仅在 decomposed 时插入,位于 milestone-complete 之前
|
|
750
755
|
- [ ] Unmet sub-goals 动态 grow steps[](goal_ref tagged);max retries → escalate
|