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
|
@@ -14,7 +14,7 @@ allowed-tools:
|
|
|
14
14
|
- write_to_file
|
|
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_question with 2–4 options + a (Recommended) default;
|
|
68
|
-
-
|
|
67
|
+
- One decision per turn via ask_question 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 `invoke_subagent([{ TypeName: "<TypeName>", Role: "<Role>", Prompt: "<Prompt>", Workspace: "inherit" }])` / `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>
|
|
@@ -77,10 +77,11 @@ Read `.workflow/config.json`. If file missing, initialize with empty guard secti
|
|
|
77
77
|
- Write config
|
|
78
78
|
|
|
79
79
|
**`deny <path>`:**
|
|
80
|
-
- Normalize path to forward slashes
|
|
80
|
+
- Normalize path to forward slashes, ensure trailing slash for directories
|
|
81
|
+
- If `guard.mode` is `allow`, switch to `deny` and clear paths with warning
|
|
81
82
|
- Set `guard.mode = "deny"`
|
|
82
83
|
- Add path to `guard.paths` (deduplicate)
|
|
83
|
-
- Set `guard.enabled = true` if not already
|
|
84
|
+
- Set `guard.enabled = true` if not already (symmetric with `allow`: adding a deny path auto-enables the guard)
|
|
84
85
|
- Write config
|
|
85
86
|
|
|
86
87
|
**Step 4: Confirm**
|
|
@@ -75,6 +75,8 @@ responsive-design.md, spatial-design.md, typography.md, ux-writing.md
|
|
|
75
75
|
|
|
76
76
|
## Chains
|
|
77
77
|
|
|
78
|
+
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.
|
|
79
|
+
|
|
78
80
|
| Chain | Steps | Scenario |
|
|
79
81
|
|-------|-------|----------|
|
|
80
82
|
| build | teach? → explore? → shape → craft → critique → [refine] → audit → polish | New from scratch |
|
|
@@ -182,17 +184,17 @@ Before reading any command workflow:
|
|
|
182
184
|
## Chain Execution
|
|
183
185
|
|
|
184
186
|
1. Prerequisites ✓
|
|
185
|
-
2. **Display chain preview**: parse chain definition, output full step preview:
|
|
187
|
+
2. **Display chain preview**: parse chain definition, output full step preview (chain steps prefixed `impeccable:` to disambiguate from Direct commands):
|
|
186
188
|
```
|
|
187
189
|
── Chain: build ──────────────────────────
|
|
188
|
-
1. teach (conditional: PRODUCT.md missing)
|
|
189
|
-
2. explore (conditional: DESIGN.md missing)
|
|
190
|
-
3. shape
|
|
191
|
-
4. craft
|
|
192
|
-
5. critique ◆ quality gate (threshold: 26/40)
|
|
193
|
-
6. [refine] ↺ auto-fix loop (max: 3)
|
|
194
|
-
7. audit ◆ quality gate (threshold: 14/20)
|
|
195
|
-
8. polish
|
|
190
|
+
1. impeccable:teach (conditional: PRODUCT.md missing)
|
|
191
|
+
2. impeccable:explore (conditional: DESIGN.md missing)
|
|
192
|
+
3. impeccable:shape
|
|
193
|
+
4. impeccable:craft
|
|
194
|
+
5. impeccable:critique ◆ quality gate (threshold: 26/40)
|
|
195
|
+
6. impeccable:[refine] ↺ auto-fix loop (max: 3)
|
|
196
|
+
7. impeccable:audit ◆ quality gate (threshold: 14/20)
|
|
197
|
+
8. impeccable:polish
|
|
196
198
|
─────────────────────────────────────────
|
|
197
199
|
Target: {target}
|
|
198
200
|
```
|
|
@@ -206,9 +208,9 @@ Before reading any command workflow:
|
|
|
206
208
|
"gate_history": [], "loop_count": 0, "status": "running" }
|
|
207
209
|
```
|
|
208
210
|
4. **TodoWrite init**: create todo items for all chain steps
|
|
209
|
-
- One item per step, format: `[chain] step N: {command} — {description}`
|
|
211
|
+
- One item per step, format: `[chain] step N: impeccable:{command} — {description}` (use `impeccable:` prefix to disambiguate from Direct command items)
|
|
210
212
|
- If conditional step is skipped, immediately mark completed
|
|
211
|
-
- Quality gate steps include threshold: `[chain] step 5: critique ◆ gate ≥26/40`
|
|
213
|
+
- Quality gate steps include threshold: `[chain] step 5: impeccable:critique ◆ gate ≥26/40`
|
|
212
214
|
5. For each step:
|
|
213
215
|
- Read `~/.maestro/workflows/impeccable/{command}.md` → execute
|
|
214
216
|
- **Step start**: TodoWrite 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`
|
|
@@ -15,10 +15,12 @@ Closed-loop decision engine for the maestro workflow lifecycle.
|
|
|
15
15
|
Reads project state → infers position → builds adaptive chain → delegates execution.
|
|
16
16
|
|
|
17
17
|
Entry points:
|
|
18
|
-
- **`/maestro-ralph "intent"`** — New session: infer → decompose → build → execute
|
|
19
|
-
- **`/maestro-ralph continue`** —
|
|
18
|
+
- **`/maestro-ralph "intent"`** — New session: infer → decompose → build → (decomposition → emit /goal prompt, STOP;否则 dispatch ralph-execute)
|
|
19
|
+
- **`/maestro-ralph continue`** — Wrapper; dispatches to ralph-execute(首选直接 `/maestro-ralph-execute` 推进 step)
|
|
20
20
|
- **`/maestro-ralph status`** — Display session progress
|
|
21
21
|
|
|
22
|
+
> 推进规则:**step 推进由 `/maestro-ralph-execute` 负责**;ralph 仅在 build / decision 评估时介入。decision 节点由 ralph-execute 自动 `Skill("maestro-ralph")` handoff,无需用户手动切换。
|
|
23
|
+
|
|
22
24
|
Initial decomposition (S_DECOMPOSE): boundary-clarified via ≤3 questions for broad intents (重构/全面/迁移/重写). 写入 status.json 的 `boundary_contract` / `execution_criteria` / `task_decomposition`,附 `/goal` prompt。
|
|
23
25
|
|
|
24
26
|
Node types:
|
|
@@ -66,15 +68,16 @@ Remaining → intent
|
|
|
66
68
|
|
|
67
69
|
<invariants>
|
|
68
70
|
1. **Ralph never executes steps** — only creates sessions and evaluates decisions
|
|
69
|
-
2. **Handoff via Skill("maestro-ralph-execute")** —
|
|
71
|
+
2. **Handoff via Skill("maestro-ralph-execute")** — 仅当 session 无 `task_decomposition` 时在创建后自动 handoff;decomposition 路径 STOP 等用户输入。decision 评估后始终 handoff
|
|
70
72
|
3. **Decision delegates read-only** — `maestro delegate --role analyze --mode analysis`
|
|
71
73
|
4. **Default type = internal** — `external` 仅显式标注时出现,build 不默认生成
|
|
72
74
|
5. **status.json 是唯一真源** — 不生成 markdown 清单或侧文件
|
|
73
75
|
6. **每个 step 必须 `completion_confirmed: true`** — 基于 `--- COMPLETION STATUS ---` 的 `STATUS: DONE`;缺失则视为未完成
|
|
74
76
|
7. **command_path 在 A_BUILD_STEPS 解析** — 全局优先 `~/.claude/commands/{name}.md`,fallback 项目 `.claude/commands/{name}.md`,写入 status.json
|
|
75
|
-
8. **
|
|
76
|
-
9. **
|
|
77
|
-
10. **
|
|
77
|
+
8. **Internal step 加载契约** — ralph-execute 读 `command_path` 后,必须解析并加载该命令 `<required_reading>` 引用的所有文件("入口 + workflow"形式的核心),并把 `<deferred_reading>` 路径记录到 `step.deferred_reads`;加载完成后输出 `✓ skill {name} 加载完成`。ralph 在 build 阶段只解析路径,不读 .md 内容
|
|
78
|
+
9. **Decomposition is outcome-oriented** — sub-goals 为可观测交付,禁止 lifecycle 复刻;`/goal` 用户绑定,ralph 只发提示词后 STOP,等用户输入
|
|
79
|
+
10. **planning_mode governs arg granularity** — `unified` → skill args 无 `{phase}`;`independent` → 含 `{phase}`
|
|
80
|
+
11. **task_decomposition 驱动 steps[] 动态生长** — `post-goal-audit` 按 unmet 子目标插入 scoped mini-loop;字段可选/累加,既有字段不删不改
|
|
78
81
|
</invariants>
|
|
79
82
|
|
|
80
83
|
<state_machine>
|
|
@@ -144,8 +147,9 @@ S_BUILD_CHAIN:
|
|
|
144
147
|
→ S_CREATE_SESSION DO: A_BUILD_STEPS
|
|
145
148
|
|
|
146
149
|
S_CREATE_SESSION:
|
|
147
|
-
→
|
|
148
|
-
→
|
|
150
|
+
→ END WHEN: task_decomposition present DO: A_CREATE_SESSION (emits Goal Prompt → STOP,等用户输入 /goal 后手动 /maestro-ralph-execute)
|
|
151
|
+
→ S_CONFIRM WHEN: not auto_confirm AND no decomposition DO: A_CREATE_SESSION
|
|
152
|
+
→ S_DISPATCH WHEN: auto_confirm AND no decomposition DO: A_CREATE_SESSION
|
|
149
153
|
|
|
150
154
|
S_CONFIRM:
|
|
151
155
|
→ S_DISPATCH WHEN: user selects "Proceed"
|
|
@@ -409,7 +413,8 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
409
413
|
- 全局优先:`~/.claude/commands/{name}.md` 存在 → `command_scope = "global"`
|
|
410
414
|
- Fallback:`.claude/commands/{name}.md` 存在 → `command_scope = "project"`
|
|
411
415
|
- 两者都缺 → `command_scope = "missing"`, `command_path = null`,A_CREATE_SESSION 报错 E006
|
|
412
|
-
|
|
416
|
+
- **不在 build 阶段读取 .md 内容**;`<required_reading>` / `<deferred_reading>` 解析与加载由 ralph-execute A_EXEC_INTERNAL 负责(保持入口/工作流分离)
|
|
417
|
+
10. **每个 step 初始化** `completion_confirmed: false`, `completion_status: null`, `completion_evidence: null`, `deferred_reads: []`
|
|
413
418
|
11. **scope_verdict gating**(仅当 chain 起点 = `analyze-macro`):
|
|
414
419
|
- `scope_verdict ∈ {medium, small}` → 跳过 `roadmap` + `analyze` 两 stage;`plan` 选 standalone 列(`--from analyze:{analyze_macro_id}`),不带 `{phase}`
|
|
415
420
|
- `scope_verdict == large` → 保留 `roadmap` + `analyze`;`plan` 选 phase 列(`{phase}`)
|
|
@@ -427,7 +432,7 @@ Generate steps from `session.lifecycle_position` to `milestone-complete`.
|
|
|
427
432
|
1. Validate: 所有 step 的 `command_scope != "missing"`;否则 raise E006 + 列出缺失 skill
|
|
428
433
|
2. Write `.workflow/.maestro/ralph-{YYYYMMDD-HHmmss}/status.json` (Appendix: Session Schema)
|
|
429
434
|
3. Display chain overview:每步显示 `{index}. {skill} [{type}] [{command_scope}]`
|
|
430
|
-
4. If `task_decomposition` present: display
|
|
435
|
+
4. If `task_decomposition` present: display **Goal Prompt block** (Appendix) → STOP,等用户输入 `/goal`(auto_confirm 也不跳过)
|
|
431
436
|
|
|
432
437
|
### A_DELEGATE_EVALUATE
|
|
433
438
|
|
|
@@ -616,7 +621,8 @@ Runs only when `task_decomposition` present.
|
|
|
616
621
|
"completion_confirmed": false,
|
|
617
622
|
"completion_status": null,
|
|
618
623
|
"completion_evidence": null,
|
|
619
|
-
"completed_at": null
|
|
624
|
+
"completed_at": null,
|
|
625
|
+
"deferred_reads": [] // 由 ralph-execute A_EXEC_INTERNAL 解析 .md 时填充
|
|
620
626
|
}],
|
|
621
627
|
"waves": [], "current_step": 0,
|
|
622
628
|
|
|
@@ -700,11 +706,9 @@ decision:post-goal-audit {retry+1}
|
|
|
700
706
|
链路概览后逐字显示(仅当 decomposition 已产出):
|
|
701
707
|
|
|
702
708
|
```
|
|
703
|
-
📋
|
|
704
|
-
|
|
705
|
-
/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。
|
|
709
|
+
📋 任务分解完成。复制以下 /goal 设定终止条件,随后运行 /maestro-ralph-execute:
|
|
706
710
|
|
|
707
|
-
|
|
711
|
+
/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。
|
|
708
712
|
```
|
|
709
713
|
|
|
710
714
|
`/goal` 由用户输入;ralph 只输出此提示词。判据以 status.json 为权威。
|
|
@@ -740,7 +744,8 @@ decision:post-goal-audit {retry+1}
|
|
|
740
744
|
- [ ] Decomposition: broad intent ≤3 question clarify;narrow auto-derive
|
|
741
745
|
- [ ] status.json 唯一真源:boundary_contract + execution_criteria + task_decomposition;无外部清单
|
|
742
746
|
- [ ] 每个 step 默认 `type: "internal"`,含 `command_scope` + `command_path`(全局优先 fallback 项目)
|
|
743
|
-
- [ ]
|
|
747
|
+
- [ ] Ralph build 阶段只解析路径,不读 .md 内容;`<required_reading>` 加载由 ralph-execute A_EXEC_INTERNAL 完成
|
|
748
|
+
- [ ] 每个 step 含 `completion_confirmed` + `completion_status` + `completion_evidence` + `deferred_reads`(初始 false/null/[])
|
|
744
749
|
- [ ] 每个 sub-goal 含 `completion_confirmed`(初始 false)
|
|
745
750
|
- [ ] post-goal-audit decision 仅在 decomposed 时插入,位于 milestone-complete 之前
|
|
746
751
|
- [ ] Unmet sub-goals 动态 grow steps[](goal_ref tagged);max retries → escalate
|
|
@@ -36,7 +36,9 @@ Also read `session.auto_mode` from status.json — if true, treat as `-y`.
|
|
|
36
36
|
| external (opt-in) | `maestro delegate --to claude --mode write` (STOP → callback) | Self-invoke next |
|
|
37
37
|
|
|
38
38
|
HARD RULES:
|
|
39
|
-
- internal step
|
|
39
|
+
- internal step:优先通过 `view_file({command_path})` 把命令 .md 加载进当前会话,再按内容执行;不要对 internal step 使用 `Skill({skill})` 调用
|
|
40
|
+
- **必须遵循 `<required_reading>` / `<deferred_reading>` 标签**:命令 .md 通常采用"入口 + workflow"形式,主体逻辑放在 workflow 文件中并通过 `<required_reading>` 引用;不加载 required_reading 会导致命令执行不完整
|
|
41
|
+
- decision 节点例外:A_EXEC_DECISION 必须使用 `view_file(AbsolutePath="<agy-skills-dir>/maestro-ralph/SKILL.md") + execute inline` 进行 handoff(这是 decision 节点的唯一允许用法)
|
|
40
42
|
- `command_path` 由 ralph 在 A_BUILD_STEPS 写入 status.json;ralph-execute 不再自行解析(缺失 → 报错 E002)
|
|
41
43
|
- external 仅在 `step.type == "external"` 显式声明时使用,并 always append `-y` 到 prompt args
|
|
42
44
|
- 每个 step 必须产出 `--- COMPLETION STATUS ---` 块,否则视为 NEEDS_RETRY
|
|
@@ -44,10 +46,13 @@ HARD RULES:
|
|
|
44
46
|
|
|
45
47
|
<invariants>
|
|
46
48
|
1. **Internal = Read + inline** — 通过 Read 读取 `step.command_path`,按其指令在当前 session 内执行
|
|
47
|
-
2. **
|
|
48
|
-
3.
|
|
49
|
-
4. **
|
|
50
|
-
5. **
|
|
49
|
+
2. **Required reading must be loaded** — 命令 .md 中的 `<required_reading>` 引用的所有文件必须立即 Read;缺一 → 视为加载失败,pause session(E007)
|
|
50
|
+
3. **Deferred reading recorded only** — `<deferred_reading>` 列出的文件路径需记录,执行过程按需 Read;不在加载阶段读取
|
|
51
|
+
4. **Skill loaded confirmation** — 所有 required_reading 加载完成后必须输出一行确认:`✓ skill {step.skill} 加载完成 (required: N, deferred: M)`
|
|
52
|
+
5. **External = explicit only** — `step.type == "external"` 才走 delegate;默认绝不发起
|
|
53
|
+
6. **必须显式 completion confirmation** — 每个 step 完成时需有 `STATUS: DONE` 且写入 `step.completion_confirmed = true`
|
|
54
|
+
7. **Self-invocation chain** — 持续直到全部 `completion_confirmed` 或 paused
|
|
55
|
+
8. **status.json 每步骤后写盘** — resume-safe
|
|
51
56
|
</invariants>
|
|
52
57
|
|
|
53
58
|
<state_machine>
|
|
@@ -155,12 +160,21 @@ Write enriched args back to status.json.
|
|
|
155
160
|
1. Validate `step.command_path != null`;否则 raise E002,pause session
|
|
156
161
|
2. Mark step running, write status.json
|
|
157
162
|
3. Display: `[{index}/{total}] {step.skill} [internal · {step.command_scope}]`
|
|
158
|
-
4. `view_file({ file_path: step.command_path })` — 把命令 .md
|
|
159
|
-
5.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
4. `view_file({ file_path: step.command_path })` — 把命令 .md 全文加载进当前会话(prefer Read over Skill for internal steps;decision 节点另行使用 Skill 见 A_EXEC_DECISION)
|
|
164
|
+
5. **解析 reading 标签**("入口 + workflow"形式核心步骤):
|
|
165
|
+
- 抽取 frontmatter `argument-hint` / `allowed-tools`
|
|
166
|
+
- 抽取 `<required_reading>` 块的所有 `@path` 引用 → 立刻 `view_file({ file_path: <expanded path> })` 加载(`~/` / `@~/` 展开为用户主目录);任一文件缺失或读取失败 → raise E007,pause session
|
|
167
|
+
- 抽取 `<deferred_reading>` 块的所有路径 → 仅记录到 `step.deferred_reads = [...]`,执行阶段按需 Read
|
|
168
|
+
- 抽取 `<purpose>/<context>/<state_machine>/<execution>/<actions>` 等指令块
|
|
169
|
+
6. **加载完成确认**:required_reading 全部成功 Read 后,输出一行:
|
|
170
|
+
```
|
|
171
|
+
✓ skill {step.skill} 加载完成 (required: {N}, deferred: {M})
|
|
172
|
+
```
|
|
173
|
+
其中 N = required_reading 引用数,M = deferred_reading 路径数(缺省块按 0 计)
|
|
174
|
+
7. 计算 `effective_args`:`step.args` + auto flag(`auto ? (flag_map[step.skill] || "") : ""`)
|
|
175
|
+
8. 按读到的指令在本会话中**内联执行**:调用允许的工具完成命令所规定的工作,不再发起 delegate;执行过程中如触发 deferred_reading 引用的资源 → 按需 Read
|
|
176
|
+
9. 执行结束:要求最后一段必须包含 `--- COMPLETION STATUS ---` 块(见 A_MARK_COMPLETE)
|
|
177
|
+
10. Return success / failure
|
|
164
178
|
|
|
165
179
|
**Auto flag map**: 所有 lifecycle skill → `-y`; `quality-test` → `-y --auto-fix`; 未列出 → 无 flag
|
|
166
180
|
|
|
@@ -248,7 +262,9 @@ Write enriched args back to status.json.
|
|
|
248
262
|
| E003 | error | status.json corrupt | Show path, manual check |
|
|
249
263
|
| E004 | error | Delegate failed + user abort | Mark paused, suggest resume |
|
|
250
264
|
| E005 | error | COMPLETION STATUS block missing | Trigger NEEDS_RETRY |
|
|
265
|
+
| E007 | error | required_reading file 缺失或读取失败 | List missing paths, pause session |
|
|
251
266
|
| W001 | warning | Step completed with concerns | Log and continue |
|
|
267
|
+
| W002 | warning | command .md 无 `<required_reading>` 标签 | 直接执行 .md 主体,跳过加载阶段 |
|
|
252
268
|
|
|
253
269
|
### Success Criteria
|
|
254
270
|
|
|
@@ -257,6 +273,9 @@ Write enriched args back to status.json.
|
|
|
257
273
|
- [ ] Placeholders resolved;per-skill enrichment 正确
|
|
258
274
|
- [ ] Decision 节点 Skill("maestro-ralph") handoff
|
|
259
275
|
- [ ] Internal 节点通过 view_file({step.command_path}) 内联执行,禁止 Skill()
|
|
276
|
+
- [ ] Internal 节点 Read 后必须解析并加载 `<required_reading>` 引用的文件;缺失 → E007 pause
|
|
277
|
+
- [ ] `<deferred_reading>` 仅记录路径到 `step.deferred_reads`,执行阶段按需 Read
|
|
278
|
+
- [ ] required_reading 加载完成后输出 `✓ skill {name} 加载完成 (required: N, deferred: M)`
|
|
260
279
|
- [ ] External 仅在显式声明时走 delegate,prompt 必带 `-y`
|
|
261
280
|
- [ ] 每个 step 强制 `--- COMPLETION STATUS ---`;缺失 → NEEDS_RETRY
|
|
262
281
|
- [ ] step.completion_confirmed = true 仅在 STATUS: DONE/DONE_WITH_CONCERNS 时设置
|
|
@@ -71,14 +71,15 @@ maestro-analyze {phase} → maestro-plan → maestro-execute → maestro-verify
|
|
|
71
71
|
<interview_protocol>
|
|
72
72
|
Interview the user relentlessly until shared understanding is reached. Active only in interactive mode; skip when `-y/--yes`, `--revise`, `--review`, `-c/--continue`, or input is already specific (clear requirement + mode).
|
|
73
73
|
|
|
74
|
-
- One decision per turn via ask_question with 2–4 options + a (Recommended) default;
|
|
75
|
-
-
|
|
74
|
+
- One decision per turn via ask_question 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.
|
|
75
|
+
- Search-first when uncertain: before asking, resolve via `state.json`, existing `roadmap.md`, `project.md`, `maestro spec load`, `maestro wiki search`, Glob/Grep/Read, or — for open-ended multi-file scans — spawn `invoke_subagent([{ TypeName: "<TypeName>", Role: "<Role>", Prompt: "<Prompt>", Workspace: "inherit" }])` / `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.
|
|
76
|
+
- Writeback cadence: each settled decision is immediately appended/updated in the `Roadmap Decisions` section at the top of `.workflow/roadmap.md` (create the section if absent). Do NOT batch writeback to the end — partial decisions must already be on disk before the next question.
|
|
76
77
|
- Walk the decision dependency tree strictly: mode → requirement scope → decomposition strategy → phase dependencies/order. Do not open the next branch until the current one is settled.
|
|
77
78
|
- Scope guard: only decide the shape of the roadmap. Do not pre-resolve intra-phase task breakdown — that belongs to `plan`.
|
|
78
79
|
|
|
79
80
|
Decision points: scope (MVP / complete / phased) → strategy (progressive / direct / auto) → milestone boundaries → phase dependencies and order.
|
|
80
81
|
|
|
81
|
-
Exit: on consensus or
|
|
82
|
+
Exit: on consensus or explicit user signal to proceed, finalize the `Roadmap Decisions` section (rows already populated incrementally). Schema:
|
|
82
83
|
`| # | Decision | Choice | Source (user / code / default) |`
|
|
83
84
|
</interview_protocol>
|
|
84
85
|
|
|
@@ -21,7 +21,7 @@ Verify execution results through three complementary methods:
|
|
|
21
21
|
3. **Nyquist test coverage validation** — requirement-to-test mapping with gap classification
|
|
22
22
|
|
|
23
23
|
Supports dual-level verification:
|
|
24
|
-
- **Single plan**: `verify --dir scratch/plan-xxx` — verifies one plan, writes `verification.json` into plan dir
|
|
24
|
+
- **Single plan**: `verify --dir scratch/{YYYYMMDD}-plan-xxx` — verifies one plan, writes `verification.json` into plan dir
|
|
25
25
|
- **Milestone**: `verify` (no args) — aggregates all execute artifacts for current milestone into `scratch/{YYYYMMDD}-verify-M{N}-{slug}/milestone-verification.json`
|
|
26
26
|
|
|
27
27
|
Registers VRF artifact in state.json on completion.
|
|
@@ -49,6 +49,7 @@ Follow '~/.maestro/workflows/harvest.md' Stages 1-8 in order.
|
|
|
49
49
|
1. **Read-only until Stage 6** — extraction and classification happen in-memory.
|
|
50
50
|
2. **Dedup before write** — check harvest-log.jsonl and existing stores before each write.
|
|
51
51
|
3. **Never modify source artifacts** — harvest is purely extractive.
|
|
52
|
+
4. **Dedup contract with parallel writers** — when appending to `issues.jsonl`, set `source: "harvest"` on each row so concurrent writers (e.g. `manage-issue-discover` with `source: "discover"`) can be distinguished and deduplicated.
|
|
52
53
|
|
|
53
54
|
Extraction patterns, classification rules, routing infrastructure, and fragment ID scheme defined in workflow harvest.md.
|
|
54
55
|
|
|
@@ -48,7 +48,7 @@ $ARGUMENTS -- optional. Parse first token to determine mode.
|
|
|
48
48
|
- `--depth=standard|deep` -- exploration depth (by-prompt only, default: `standard`)
|
|
49
49
|
|
|
50
50
|
**State files:**
|
|
51
|
-
- `.workflow/issues/issues.jsonl` -- issues appended here
|
|
51
|
+
- `.workflow/issues/issues.jsonl` -- issues appended here (set `source: "discover"` on each row so concurrent writers like `manage-harvest` with `source: "harvest"` can be distinguished and deduplicated)
|
|
52
52
|
- `.workflow/issues/discoveries/{SESSION_ID}/` -- session artifacts
|
|
53
53
|
|
|
54
54
|
### Pre-load specs
|
|
@@ -52,7 +52,7 @@ Follow '~/.maestro/workflows/knowhow.md' Part A (KnowHow Management) completely.
|
|
|
52
52
|
<error_codes>
|
|
53
53
|
| Code | Severity | Description | Stage |
|
|
54
54
|
|------|----------|-------------|-------|
|
|
55
|
-
| E001 | error | No memory stores found — run `/manage-knowhow-capture
|
|
55
|
+
| E001 | error | No memory stores found — for workflow store run `/manage-knowhow-capture`; for system store create `~/.claude/projects/{project}/memory/MEMORY.md` manually | resolve_paths |
|
|
56
56
|
| E002 | error | Entry ID or filename not found | execute_view, execute_delete |
|
|
57
57
|
| E003 | error | Prune requires at least one filter (--tag, --type, --before, --after) | execute_prune |
|
|
58
58
|
| E004 | error | Cannot delete MEMORY.md — use `edit` subcommand instead | execute_delete |
|
|
@@ -29,7 +29,7 @@ Arguments: $ARGUMENTS
|
|
|
29
29
|
- `"<insight text>"` (or any non-keyword text) → insight capture mode
|
|
30
30
|
- `tip <text>` → tip capture mode (quick contextual note, auto-tagged `tip`)
|
|
31
31
|
- `list` → list recent entries (default 20)
|
|
32
|
-
- `search <query>` → `maestro spec load --category learning` or text search across
|
|
32
|
+
- `search <query>` → `maestro spec load --category learning` or text search across `.workflow/specs/learnings.md`
|
|
33
33
|
- `show <INS-id>` → full detail with phase context
|
|
34
34
|
- empty → ask_question to prompt for text
|
|
35
35
|
|
|
@@ -46,19 +46,19 @@ Follow `~/.maestro/workflows/learn.md` Stages 1–5 in order.
|
|
|
46
46
|
| E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
|
|
47
47
|
| E002 | error | Unknown `--category` value (allowed: pattern, antipattern, decision, tool, gotcha, technique, tip) | parse_input |
|
|
48
48
|
| E003 | error | `show` mode requires an INS-id argument | show |
|
|
49
|
-
| E004 | error | Insight id not found in
|
|
49
|
+
| E004 | error | Insight id not found in `.workflow/specs/learnings.md` | show |
|
|
50
50
|
| W001 | warning | Auto-phase detection found a current_phase but no matching artifact in registry; phase set to null | capture |
|
|
51
51
|
</error_codes>
|
|
52
52
|
|
|
53
53
|
<success_criteria>
|
|
54
54
|
- [ ] Mode correctly routed (capture / list / search / show)
|
|
55
|
-
- [ ] Capture: `<spec-entry>` block appended to
|
|
55
|
+
- [ ] Capture: `<spec-entry>` block appended to `.workflow/specs/learnings.md` with all required fields
|
|
56
56
|
- [ ] Capture: phase auto-link resolves correctly via artifact registry when `state.json` has `current_phase`
|
|
57
57
|
- [ ] Capture: category inference produces a sensible default when `--category` absent
|
|
58
58
|
- [ ] List: filters apply, output sorted newest-first, default limit 20
|
|
59
59
|
- [ ] Search: results ranked by title (3) > tags (2) > summary (1) match
|
|
60
60
|
- [ ] Show: full insight displayed with phase context and routed-artifact link if any
|
|
61
|
-
- [ ] No file modifications outside `.workflow/knowhow/`
|
|
61
|
+
- [ ] No file modifications outside `.workflow/specs/learnings.md` and `.workflow/knowhow/`
|
|
62
62
|
- [ ] Confirmation banner displayed with INS-id and next-step hints
|
|
63
63
|
- [ ] Next step: `/manage-learn list` to browse, or `/manage-learn search <query>` to find related insights
|
|
64
64
|
</success_criteria>
|
|
@@ -39,13 +39,13 @@ Phase or task: $ARGUMENTS (required — phase number)
|
|
|
39
39
|
|
|
40
40
|
**Intelligent routing** (auto-detected from project state):
|
|
41
41
|
|
|
42
|
-
| Priority | Condition | Route |
|
|
43
|
-
|
|
42
|
+
| Priority | Condition | Route | Reference skill |
|
|
43
|
+
|----------|-----------|-------|-----------------|
|
|
44
44
|
| 1 | Active session exists (state.json status=running) | Resume | — |
|
|
45
45
|
| 2 | --re-run flag + previous failures | Re-run | — |
|
|
46
|
-
| 3 | Spec package exists (REQ-*.md) | spec | quality-business-test |
|
|
47
|
-
| 4 | Nyquist gaps exist (verification.json) | gap | quality-test-gen |
|
|
48
|
-
| 5 | Default | code | quality-integration-test |
|
|
46
|
+
| 3 | Spec package exists (REQ-*.md) | spec | quality-business-test (separate skill) |
|
|
47
|
+
| 4 | Nyquist gaps exist (verification.json) | gap | quality-test-gen (separate skill) |
|
|
48
|
+
| 5 | Default | code | quality-integration-test (separate skill) |
|
|
49
49
|
|
|
50
50
|
Flags, artifact context resolution, and output formats defined in workflow auto-test.md.
|
|
51
51
|
|
|
@@ -48,7 +48,7 @@ After successful refactoring, ask user once: "Record refactoring pattern as codi
|
|
|
48
48
|
|
|
49
49
|
**Next-step routing on completion:**
|
|
50
50
|
- All tests pass → `/quality-sync` (update codebase docs)
|
|
51
|
-
- Test failures after refactor → `/quality-debug {scope}`
|
|
51
|
+
- Test failures after refactor → `/quality-debug "test failures after refactor in {scope}"`
|
|
52
52
|
- No test suite available → `/quality-auto-test {phase}`
|
|
53
53
|
</execution>
|
|
54
54
|
|
|
@@ -15,7 +15,7 @@ allowed-tools:
|
|
|
15
15
|
- write_to_file
|
|
16
16
|
---
|
|
17
17
|
<purpose>
|
|
18
|
-
Post-execution multi-perspective retrospective (复盘) for completed phases. Consumes existing execution artifacts (verification.json, review.json, issues.jsonl, plan.json, .summaries/, uat.md, state.json) and runs four parallel lenses — technical, process, quality, decision — to distill reusable insights. Routes each insight into the appropriate store: spec stub for reusable patterns, memory tip for process notes, issue for recurring gaps. Auto-scans for unreviewed completed phases and reports the backlog. Every insight is also persisted to `.workflow/
|
|
18
|
+
Post-execution multi-perspective retrospective (复盘) for completed phases. Consumes existing execution artifacts (verification.json, review.json, issues.jsonl, plan.json, .summaries/, uat.md, state.json) and runs four parallel lenses — technical, process, quality, decision — to distill reusable insights. Routes each insight into the appropriate store: spec stub for reusable patterns, memory tip for process notes, issue for recurring gaps. Auto-scans for unreviewed completed phases and reports the backlog. Every insight is also persisted to `.workflow/specs/learnings.md` as `<spec-entry>` blocks for cross-phase queryability.
|
|
19
19
|
</purpose>
|
|
20
20
|
|
|
21
21
|
<required_reading>
|
|
@@ -72,7 +72,7 @@ Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order. Key invari
|
|
|
72
72
|
- [ ] Spec entries (if any) appended as `<spec-entry>` to matching `.workflow/specs/{category-file}.md`
|
|
73
73
|
- [ ] Issue rows (if any) match canonical issues.jsonl schema (status "open", full issue_history, all required fields)
|
|
74
74
|
- [ ] Note tips (if any) created via `view_file(AbsolutePath="<agy-skills-dir>/manage-learn/SKILL.md") + execute inline (args: "tip ...")`
|
|
75
|
-
- [ ]
|
|
75
|
+
- [ ] `.workflow/specs/learnings.md` appended with one `<spec-entry>` per insight regardless of routing target
|
|
76
76
|
- [ ] No existing phase artifacts modified (verification.json, review.json, plan.json untouched)
|
|
77
77
|
- [ ] Confirmation banner displays routing counts and next-step suggestions
|
|
78
78
|
- [ ] Next step: `/manage-status` to review state, or `/manage-issue list --source retrospective` to triage created issues, or `/manage-learn list` to browse the knowhow library
|
|
@@ -18,6 +18,10 @@ Systematic security audit covering OWASP Top 10, dependency supply chain, secret
|
|
|
18
18
|
CI/CD pipeline review, and optional STRIDE threat modeling. Three tiers control depth vs speed.
|
|
19
19
|
</purpose>
|
|
20
20
|
|
|
21
|
+
<required_reading>
|
|
22
|
+
@~/.maestro/workflows/review.md
|
|
23
|
+
</required_reading>
|
|
24
|
+
|
|
21
25
|
<context>
|
|
22
26
|
$ARGUMENTS — Parse tier and scope:
|
|
23
27
|
- Tier: `quick` (default) | `standard` | `deep`
|
|
@@ -145,6 +149,26 @@ CONCERNS: {count} critical findings require immediate action
|
|
|
145
149
|
NEXT: /quality-review
|
|
146
150
|
--- END STATUS ---
|
|
147
151
|
```
|
|
152
|
+
|
|
153
|
+
**Register artifact on completion** (so retrospective/harvest can trace this audit):
|
|
154
|
+
```
|
|
155
|
+
Append to state.json.artifacts[]:
|
|
156
|
+
{
|
|
157
|
+
id: nextArtifactId(artifacts, "review"), // RVW-NNN (security-audit reuses review type)
|
|
158
|
+
type: "review",
|
|
159
|
+
subtype: "security-audit",
|
|
160
|
+
milestone: current_milestone || null,
|
|
161
|
+
phase: target_phase || null,
|
|
162
|
+
scope: target_phase ? "phase" : "standalone",
|
|
163
|
+
path: "scratch/{YYYYMMDD}-security-audit-{tier}-{slug}",
|
|
164
|
+
status: critical_count == 0 ? "completed" : "completed_with_concerns",
|
|
165
|
+
tier: tier, // quick|standard|deep
|
|
166
|
+
harvested: false,
|
|
167
|
+
created_at: start_time,
|
|
168
|
+
completed_at: now()
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
Write findings report to the same `path` (severity matrix, file:line refs, remediation).
|
|
148
172
|
</execution>
|
|
149
173
|
|
|
150
174
|
<success_criteria>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-remove
|
|
3
3
|
description: Remove spec entry by ID
|
|
4
|
-
argument-hint: <entry-id>
|
|
4
|
+
argument-hint: <entry-id> [--cascade]
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- ask_question
|
|
7
7
|
- grep_search
|
|
@@ -25,6 +25,9 @@ $ARGUMENTS -- expects `<entry-id>` (e.g., `spec-learnings-003`, `spec-coding-con
|
|
|
25
25
|
**Entry ID format**: `spec-{file-stem}-{NNN}` — the sub-node ID assigned by WikiIndexer when indexing `<spec-entry>` blocks.
|
|
26
26
|
|
|
27
27
|
**Discovery**: Use `maestro wiki list --type spec --json` or `/spec-load --keyword <term>` to find entry IDs.
|
|
28
|
+
|
|
29
|
+
**Flags:**
|
|
30
|
+
- `--cascade` — When the target spec is a ref-type entry (created via `spec-add --ref` and linked to a knowhow document), also delete the referenced knowhow file. Without this flag, ref-type removal leaves an orphan knowhow file.
|
|
28
31
|
</context>
|
|
29
32
|
|
|
30
33
|
<execution>
|
|
@@ -46,5 +49,6 @@ Follow '~/.maestro/workflows/specs-remove.md' completely.
|
|
|
46
49
|
- [ ] User confirmed removal (unless -y flag)
|
|
47
50
|
- [ ] Entry removed from container file via `maestro wiki remove-entry`
|
|
48
51
|
- [ ] Wiki index auto-updated
|
|
49
|
-
- [ ]
|
|
52
|
+
- [ ] If `--cascade` and entry has a `ref` attribute: referenced knowhow file deleted, orphan avoided
|
|
53
|
+
- [ ] Confirmation displayed with removed entry details (and cascaded knowhow path if applicable)
|
|
50
54
|
</success_criteria>
|
|
@@ -17,9 +17,9 @@ You produce a set of analysis files for one role in a brainstorm session, organi
|
|
|
17
17
|
| Field | Required | Notes |
|
|
18
18
|
|---|---|---|
|
|
19
19
|
| `role_name` | yes | kebab-case slug, e.g. `system-architect` |
|
|
20
|
-
| `role_template_path` | yes |
|
|
21
|
-
| `guidance_path` | yes | path to `guidance-specification.md` |
|
|
22
|
-
| `output_dir` | yes | absolute path to role folder — `{session_dir}/{role}
|
|
20
|
+
| `role_template_path` | yes | **absolute** path to `planning-roles/{role}.md` (orchestrator MUST expand `~/`) |
|
|
21
|
+
| `guidance_path` | yes | **absolute** path to `guidance-specification.md` |
|
|
22
|
+
| `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`. |
|
|
23
23
|
| `feature_list` | optional | F-id + slug + title rows; if missing, fall back to non-feature organization |
|
|
24
24
|
| `design_research` | optional | external research markdown to integrate as evidence |
|
|
25
25
|
| `project_specs` | optional | pre-loaded `maestro spec load` output |
|
|
@@ -28,7 +28,9 @@ You produce a set of analysis files for one role in a brainstorm session, organi
|
|
|
28
28
|
|
|
29
29
|
## Output Contract
|
|
30
30
|
|
|
31
|
-
Write files to `output_dir
|
|
31
|
+
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`.
|
|
32
|
+
|
|
33
|
+
**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).
|
|
32
34
|
|
|
33
35
|
### File Structure
|
|
34
36
|
|
|
@@ -25,8 +25,8 @@ $ARGUMENTS — target path/module and optional flags.
|
|
|
25
25
|
- `--save-spec`: `Skill("spec-add")` for each new pattern
|
|
26
26
|
- `--save-wiki`: create wiki note per dimension group
|
|
27
27
|
|
|
28
|
-
**Storage read**: target files + `coding-conventions.md` +
|
|
29
|
-
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append
|
|
28
|
+
**Storage read**: target files + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
|
|
29
|
+
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
|
|
30
30
|
</context>
|
|
31
31
|
|
|
32
32
|
<state_machine>
|
|
@@ -47,7 +47,7 @@ S_RESOLVE:
|
|
|
47
47
|
→ S_RESOLVE WHEN: unresolvable DO: AskUserQuestion
|
|
48
48
|
|
|
49
49
|
S_DEDUP:
|
|
50
|
-
→ S_ANALYZE DO: read coding-conventions.md + specs/learnings.md → build known pattern set
|
|
50
|
+
→ S_ANALYZE DO: read coding-conventions.md + .workflow/specs/learnings.md → build known pattern set
|
|
51
51
|
|
|
52
52
|
S_ANALYZE:
|
|
53
53
|
→ S_CROSSREF DO: A_PARALLEL_DIMENSION_ANALYSIS
|
|
@@ -59,7 +59,7 @@ S_CATALOG:
|
|
|
59
59
|
→ S_PERSIST DO: write KNW-decompose report (grouped by dimension: pattern table + details)
|
|
60
60
|
|
|
61
61
|
S_PERSIST:
|
|
62
|
-
→ END DO: append specs/learnings.md [+ spec-add if --save-spec] [+ wiki note if --save-wiki]
|
|
62
|
+
→ END DO: append .workflow/specs/learnings.md [+ spec-add if --save-spec] [+ wiki note if --save-wiki]
|
|
63
63
|
|
|
64
64
|
</transitions>
|
|
65
65
|
|
|
@@ -86,7 +86,7 @@ For each finding, match against known pattern set:
|
|
|
86
86
|
| Status | Condition |
|
|
87
87
|
|--------|-----------|
|
|
88
88
|
| documented | Already in coding-conventions.md |
|
|
89
|
-
| known | In specs/learnings.md |
|
|
89
|
+
| known | In .workflow/specs/learnings.md |
|
|
90
90
|
| new | Not seen before |
|
|
91
91
|
|
|
92
92
|
Flag contradictions (finding conflicts with documented convention). Merge duplicates across agents (same pattern found by multiple dimensions).
|
|
@@ -106,7 +106,7 @@ Flag contradictions (finding conflicts with documented convention). Merge duplic
|
|
|
106
106
|
<success_criteria>
|
|
107
107
|
- [ ] 4 dimension agents spawned in parallel, findings with anchors
|
|
108
108
|
- [ ] Cross-reference: documented/known/new status assigned
|
|
109
|
-
- [ ] Pattern catalog written + specs/learnings.md appended
|
|
109
|
+
- [ ] Pattern catalog written + .workflow/specs/learnings.md appended
|
|
110
110
|
</success_criteria>
|
|
111
111
|
|
|
112
112
|
<next_step_routing>
|