pi-maestro-flow 0.2.0 → 0.3.0
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/README.md +44 -72
- package/agents/cross-role-reviewer.md +1 -1
- package/agents/impeccable-agent.md +1 -1
- package/agents/ralph-executor.md +1 -1
- package/agents/team-worker.md +1 -1
- package/agents/workflow-analyzer.md +1 -1
- package/agents/workflow-codebase-mapper.md +1 -1
- package/agents/workflow-collab-planner.md +1 -1
- package/agents/workflow-debugger.md +1 -1
- package/agents/workflow-executor.md +1 -1
- package/agents/workflow-integration-checker.md +1 -1
- package/agents/workflow-nyquist-auditor.md +1 -1
- package/agents/workflow-phase-researcher.md +1 -1
- package/agents/workflow-planner.md +1 -1
- package/agents/workflow-project-researcher.md +1 -1
- package/agents/workflow-reviewer.md +1 -1
- package/agents/workflow-verifier.md +1 -1
- package/package.json +13 -4
- package/skills/codify-to-knowhow/SKILL.md +1 -1
- package/skills/delegation-check/SKILL.md +1 -1
- package/skills/domain-add/SKILL.md +5 -7
- package/skills/insight-challenge/SKILL.md +1 -1
- package/skills/learn-decompose/SKILL.md +4 -4
- package/skills/learn-follow/SKILL.md +5 -5
- package/skills/learn-investigate/SKILL.md +5 -5
- package/skills/learn-second-opinion/SKILL.md +5 -5
- package/skills/maestro/SKILL.md +9 -10
- package/skills/maestro-amend/SKILL.md +3 -3
- package/skills/maestro-analyze/SKILL.md +10 -13
- package/skills/maestro-blueprint/SKILL.md +8 -11
- package/skills/maestro-brainstorm/SKILL.md +11 -14
- package/skills/maestro-collab/SKILL.md +4 -4
- package/skills/maestro-companion/SKILL.md +3 -3
- package/skills/maestro-composer/SKILL.md +11 -12
- package/skills/maestro-execute/SKILL.md +9 -12
- package/skills/maestro-fork/SKILL.md +8 -11
- package/skills/maestro-grill/SKILL.md +13 -16
- package/skills/maestro-guard/SKILL.md +5 -5
- package/skills/maestro-help/SKILL.md +3 -3
- package/skills/maestro-impeccable/SKILL.md +7 -7
- package/skills/maestro-init/SKILL.md +9 -12
- package/skills/maestro-merge/SKILL.md +6 -8
- package/skills/maestro-milestone-audit/SKILL.md +3 -5
- package/skills/maestro-milestone-complete/SKILL.md +9 -12
- package/skills/maestro-milestone-release/SKILL.md +9 -11
- package/skills/maestro-next/SKILL.md +5 -5
- package/skills/maestro-overlay/SKILL.md +16 -16
- package/skills/maestro-plan/SKILL.md +9 -12
- package/skills/maestro-player/SKILL.md +5 -5
- package/skills/maestro-quick/SKILL.md +5 -7
- package/skills/maestro-ralph/SKILL.md +16 -17
- package/skills/maestro-ralph-cli/SKILL.md +6 -6
- package/skills/maestro-ralph-cli-execute/SKILL.md +2 -2
- package/skills/maestro-ralph-execute/SKILL.md +4 -4
- package/skills/maestro-ralph-v2/SKILL.md +18 -19
- package/skills/maestro-roadmap/SKILL.md +8 -9
- package/skills/maestro-swarm-workflow/SKILL.md +9 -9
- package/skills/maestro-tools-execute/SKILL.md +5 -7
- package/skills/maestro-tools-register/SKILL.md +7 -9
- package/skills/maestro-ui-codify/SKILL.md +9 -10
- package/skills/maestro-universal-workflow/SKILL.md +15 -15
- package/skills/maestro-update/SKILL.md +10 -10
- package/skills/manage-codebase-rebuild/SKILL.md +4 -6
- package/skills/manage-drift-realign/SKILL.md +8 -11
- package/skills/manage-harvest/SKILL.md +6 -9
- package/skills/manage-issue/SKILL.md +5 -8
- package/skills/manage-issue-discover/SKILL.md +8 -11
- package/skills/manage-kg-extractors/SKILL.md +3 -3
- package/skills/manage-knowhow/SKILL.md +3 -5
- package/skills/manage-knowhow-capture/SKILL.md +4 -6
- package/skills/manage-knowledge-audit/SKILL.md +6 -9
- package/skills/manage-status/SKILL.md +3 -5
- package/skills/manage-wiki/SKILL.md +5 -7
- package/skills/odyssey-debug/SKILL.md +13 -13
- package/skills/odyssey-improve/SKILL.md +15 -15
- package/skills/odyssey-planex/SKILL.md +16 -16
- package/skills/odyssey-review-test-fix/SKILL.md +11 -11
- package/skills/odyssey-ui/SKILL.md +10 -10
- package/skills/prompt-generator/SKILL.md +5 -5
- package/skills/quality-auto-test/SKILL.md +3 -5
- package/skills/quality-debug/SKILL.md +3 -5
- package/skills/quality-refactor/SKILL.md +3 -5
- package/skills/quality-retrospective/SKILL.md +10 -13
- package/skills/quality-review/SKILL.md +5 -8
- package/skills/quality-sync/SKILL.md +3 -5
- package/skills/quality-test/SKILL.md +4 -6
- package/skills/scholar-anti-ai-writing/SKILL.md +1 -1
- package/skills/scholar-citation-verify/SKILL.md +1 -1
- package/skills/scholar-experiment/SKILL.md +2 -2
- package/skills/scholar-ideation/SKILL.md +7 -7
- package/skills/scholar-latex-organizer/SKILL.md +1 -1
- package/skills/scholar-publish/SKILL.md +3 -3
- package/skills/scholar-rebuttal-pro/SKILL.md +3 -3
- package/skills/scholar-review/SKILL.md +1 -1
- package/skills/scholar-writing/SKILL.md +1 -1
- package/skills/security-audit/SKILL.md +2 -4
- package/skills/skill-generator/SKILL.md +3 -3
- package/skills/skill-iter-tune/SKILL.md +3 -3
- package/skills/skill-simplify/SKILL.md +1 -1
- package/skills/skill-tuning/SKILL.md +1 -1
- package/skills/spec-add/SKILL.md +5 -7
- package/skills/spec-load/SKILL.md +3 -5
- package/skills/spec-remove/SKILL.md +4 -6
- package/skills/spec-setup/SKILL.md +6 -8
- package/skills/team-adversarial-swarm/SKILL.md +5 -5
- package/skills/team-arch-opt/SKILL.md +2 -2
- package/skills/team-brainstorm/SKILL.md +3 -3
- package/skills/team-coordinate/SKILL.md +4 -4
- package/skills/team-designer/SKILL.md +1 -1
- package/skills/team-executor/SKILL.md +3 -3
- package/skills/team-frontend/SKILL.md +2 -2
- package/skills/team-frontend-debug/SKILL.md +3 -3
- package/skills/team-interactive-craft/SKILL.md +2 -2
- package/skills/team-issue/SKILL.md +3 -3
- package/skills/team-lifecycle-v4/SKILL.md +4 -4
- package/skills/team-motion-design/SKILL.md +2 -2
- package/skills/team-perf-opt/SKILL.md +3 -3
- package/skills/team-planex/SKILL.md +2 -2
- package/skills/team-quality-assurance/SKILL.md +3 -3
- package/skills/team-review/SKILL.md +3 -3
- package/skills/team-roadmap-dev/SKILL.md +3 -3
- package/skills/team-swarm/SKILL.md +4 -4
- package/skills/team-tech-debt/SKILL.md +2 -2
- package/skills/team-testing/SKILL.md +3 -3
- package/skills/team-ui-polish/SKILL.md +2 -2
- package/skills/team-uidesign/SKILL.md +2 -2
- package/skills/team-ultra-analyze/SKILL.md +4 -4
- package/skills/team-ux-improve/SKILL.md +3 -3
- package/skills/team-visual-a11y/SKILL.md +2 -2
- package/skills/workflow-skill-designer/SKILL.md +8 -8
- package/templates/business-test-report.json +68 -0
- package/templates/config.json +48 -0
- package/templates/context.md +16 -0
- package/templates/doc-index.json +11 -0
- package/templates/index.json +68 -0
- package/templates/issue.json +36 -0
- package/templates/plan.json +38 -0
- package/templates/project.md +60 -0
- package/templates/reflection-log.md +20 -0
- package/templates/roadmap.md +45 -0
- package/templates/scratch-index.json +19 -0
- package/templates/search-tool.json +1 -0
- package/templates/search-tools.md +47 -0
- package/templates/state.json +18 -0
- package/templates/task-summary.md +21 -0
- package/templates/task.json +89 -0
- package/templates/terminology-template.json +22 -0
- package/templates/uat.md +21 -0
- package/templates/validation.json +31 -0
- package/templates/verification.json +37 -0
- package/templates/workflow.md +14 -0
- package/templates/worktree-scope.json +9 -0
- package/templates/worktrees.json +26 -0
- package/workflows/agy-instructions.md +156 -0
- package/workflows/analyze.md +768 -0
- package/workflows/auto-test.md +705 -0
- package/workflows/blueprint.md +406 -0
- package/workflows/boundary-grill.md +50 -0
- package/workflows/brainstorm.md +508 -0
- package/workflows/business-test.md +574 -0
- package/workflows/chinese-response.md +25 -0
- package/workflows/claude-instructions.md +167 -0
- package/workflows/codebase-rebuild.md +267 -0
- package/workflows/codebase-refresh.md +168 -0
- package/workflows/codex-instructions.md +156 -0
- package/workflows/coding-philosophy.md +70 -0
- package/workflows/command-authoring.md +823 -0
- package/workflows/debug.md +409 -0
- package/workflows/delegate-usage.md +99 -0
- package/workflows/domain-add.md +121 -0
- package/workflows/drift-realign.md +396 -0
- package/workflows/execute.md +631 -0
- package/workflows/explore-usage.md +93 -0
- package/workflows/finish-work.md +124 -0
- package/workflows/fork.md +162 -0
- package/workflows/grill.md +494 -0
- package/workflows/harvest.md +478 -0
- package/workflows/impeccable.md +168 -0
- package/workflows/init.md +157 -0
- package/workflows/instruction-authoring-guide.md +97 -0
- package/workflows/integration-test.md +186 -0
- package/workflows/interview-mechanics.md +8 -0
- package/workflows/issue-analyze.md +20 -0
- package/workflows/issue-discover.md +238 -0
- package/workflows/issue-execute.md +110 -0
- package/workflows/issue-gaps-analyze.codex.md +256 -0
- package/workflows/issue-gaps-analyze.md +215 -0
- package/workflows/issue-plan.md +110 -0
- package/workflows/issue.md +338 -0
- package/workflows/knowhow.md +429 -0
- package/workflows/knowledge-audit.md +355 -0
- package/workflows/learn.md +271 -0
- package/workflows/maestro-chain-execute.md +20 -0
- package/workflows/maestro-link-coordinate.md +114 -0
- package/workflows/maestro-super.md +120 -0
- package/workflows/maestro.md +501 -0
- package/workflows/map.md +74 -0
- package/workflows/merge.md +122 -0
- package/workflows/milestone-audit.md +155 -0
- package/workflows/milestone-complete.md +167 -0
- package/workflows/milestone-release.md +82 -0
- package/workflows/odyssey-base-codex.md +305 -0
- package/workflows/odyssey-base.md +256 -0
- package/workflows/overlays.md +109 -0
- package/workflows/plan.md +520 -0
- package/workflows/quick.md +350 -0
- package/workflows/ralph-amend-goal.md +177 -0
- package/workflows/refactor.md +87 -0
- package/workflows/retrospective.md +471 -0
- package/workflows/review.md +448 -0
- package/workflows/roadmap-common.md +193 -0
- package/workflows/roadmap.md +106 -0
- package/workflows/shell-exec-protocol.md +30 -0
- package/workflows/skill-authoring.md +265 -0
- package/workflows/spec-generate.md +475 -0
- package/workflows/specs-add.md +123 -0
- package/workflows/specs-load.md +76 -0
- package/workflows/specs-remove.md +104 -0
- package/workflows/specs-setup.md +316 -0
- package/workflows/status.md +149 -0
- package/workflows/sync.md +116 -0
- package/workflows/tdd.md +255 -0
- package/workflows/test-gen.md +226 -0
- package/workflows/test.md +385 -0
- package/workflows/tools-spec.md +70 -0
- package/workflows/ui-codify-extract.md +372 -0
- package/workflows/ui-codify-knowhow.md +258 -0
- package/workflows/ui-codify-package.md +159 -0
- package/workflows/ui-codify.md +227 -0
- package/workflows/ui-design.md +393 -0
- package/workflows/ui-style.md +201 -0
- package/workflows/verify.md +557 -0
- package/workflows/wiki-connect.md +153 -0
- package/workflows/wiki-digest.md +180 -0
- package/workflows/wiki-manage.md +113 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-guard
|
|
3
3
|
description: "Manage editing boundary restrictions Arguments: <on|off|status|allow <path>|deny <path>>"
|
|
4
|
-
allowed-tools: Read Write Bash Glob
|
|
4
|
+
allowed-tools: Read Write Bash Glob maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -33,7 +33,7 @@ and blocks operations targeting files outside boundaries. Requires hooks level >
|
|
|
33
33
|
<invariants>
|
|
34
34
|
1. **Config-only mutation** — guard MUST only modify the `guard` section of `.workflow/config.json`; NEVER touch other config sections or files
|
|
35
35
|
2. **Non-destructive** — `off` MUST preserve existing paths and mode; NEVER clear the path list when disabling
|
|
36
|
-
3. **Mode switch confirmation** — switching between allow/deny mode MUST require
|
|
36
|
+
3. **Mode switch confirmation** — switching between allow/deny mode MUST require user prompt confirmation when existing paths will be cleared
|
|
37
37
|
4. **Hook dependency** — guard MUST warn when enabled but `workflow-guard` hook is not active (hooks level < full)
|
|
38
38
|
5. **Path normalization** — all paths MUST use forward slashes with trailing slash for directories; NEVER store raw backslash paths
|
|
39
39
|
</invariants>
|
|
@@ -52,7 +52,7 @@ and blocks operations targeting files outside boundaries. Requires hooks level >
|
|
|
52
52
|
|
|
53
53
|
**GATE 3: Execute → Confirm**
|
|
54
54
|
- REQUIRED: Config mutation applied (for on/off/allow/deny) or status displayed (for status).
|
|
55
|
-
- REQUIRED: Mode-switch
|
|
55
|
+
- REQUIRED: Mode-switch user prompt answered (for allow↔deny transitions with existing paths).
|
|
56
56
|
- BLOCKED if: user declines mode switch.
|
|
57
57
|
|
|
58
58
|
**Step 1: Parse subcommand**
|
|
@@ -85,14 +85,14 @@ Read `.workflow/config.json`. If file missing, initialize with empty guard secti
|
|
|
85
85
|
|
|
86
86
|
**`allow <path>`:**
|
|
87
87
|
- Normalize path to forward slashes, ensure trailing slash for directories
|
|
88
|
-
- If `guard.mode` is `deny`,
|
|
88
|
+
- If `guard.mode` is `deny`, user prompt: "Switching from deny to allow mode will clear existing paths ({N} paths). Continue?" — abort if user declines.
|
|
89
89
|
- Add path to `guard.paths` (deduplicate)
|
|
90
90
|
- Set `guard.enabled = true` if not already
|
|
91
91
|
- Write config
|
|
92
92
|
|
|
93
93
|
**`deny <path>`:**
|
|
94
94
|
- Normalize path to forward slashes, ensure trailing slash for directories
|
|
95
|
-
- If `guard.mode` is `allow`,
|
|
95
|
+
- If `guard.mode` is `allow`, user prompt: "Switching from allow to deny mode will clear existing paths ({N} paths). Continue?" — abort if user declines.
|
|
96
96
|
- Set `guard.mode = "deny"`
|
|
97
97
|
- Add path to `guard.paths` (deduplicate)
|
|
98
98
|
- Set `guard.enabled = true` if not already (symmetric with `allow`: adding a deny path auto-enables the guard)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-help
|
|
3
3
|
description: "Maestro Flow 命令帮助系统。搜索命令、浏览技能、工作流推荐、新手引导。Triggers on \"maestro-help\", \"帮助\", \"命令\", \"怎么用\", \"skill\", \"workflow\", \"maestro 怎么用\"."
|
|
4
|
-
allowed-tools: Read Grep Glob
|
|
4
|
+
allowed-tools: Read Grep Glob maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Maestro Help
|
|
@@ -314,8 +314,8 @@ Odyssey 长周期循环(独立路径)
|
|
|
314
314
|
## Related Resources
|
|
315
315
|
|
|
316
316
|
- **Guide 目录**: `guide/` — 17 个专题指南文档
|
|
317
|
-
- **Delegate 参考**: `~/.maestro/workflows/delegate-usage.md`
|
|
318
|
-
- **Coding 哲学**: `~/.maestro/workflows/coding-philosophy.md`
|
|
317
|
+
- **Delegate 参考**: `~/.pi/agent/packages/pi-maestro-flow/workflows/delegate-usage.md`
|
|
318
|
+
- **Coding 哲学**: `~/.pi/agent/packages/pi-maestro-flow/workflows/coding-philosophy.md`
|
|
319
319
|
- **CLI 工具配置**: `~/.maestro/cli-tools.json`
|
|
320
320
|
|
|
321
321
|
## Statistics
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-impeccable
|
|
3
3
|
description: "Use when designing, auditing, polishing, or improving frontend UI — websites, dashboards, landing pages, components Arguments: <command|intent> [target] [flags] — 可选 chain: build|redesign|improve|enhance|launch|harden|foundation|live"
|
|
4
|
-
allowed-tools: Read Write Edit Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -25,7 +25,7 @@ $ARGUMENTS first word determines mode:
|
|
|
25
25
|
|
|
26
26
|
## Command Routing
|
|
27
27
|
|
|
28
|
-
All workflows at `~/.maestro/workflows/impeccable/{command}.md`:
|
|
28
|
+
All workflows at `~/.pi/agent/packages/pi-maestro-flow/workflows/impeccable/{command}.md`:
|
|
29
29
|
|
|
30
30
|
| Command | Category | Description |
|
|
31
31
|
|---------|----------|-------------|
|
|
@@ -61,7 +61,7 @@ responsive-design.md, spatial-design.md, typography.md, ux-writing.md
|
|
|
61
61
|
|
|
62
62
|
## Chains
|
|
63
63
|
|
|
64
|
-
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.
|
|
64
|
+
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 `~/.pi/agent/packages/pi-maestro-flow/workflows/impeccable/{name}.md` that the chain step reads.
|
|
65
65
|
|
|
66
66
|
| Chain | Steps | Scenario |
|
|
67
67
|
|-------|-------|----------|
|
|
@@ -153,7 +153,7 @@ Before reading any command workflow:
|
|
|
153
153
|
|
|
154
154
|
1. **Context**: `maestro load --type spec --category ui` → if empty → `maestro impeccable load-context`
|
|
155
155
|
2. **PRODUCT.md**: missing/placeholder (<200 chars / `[TODO]`) → execute teach first, then resume original task
|
|
156
|
-
3. **Register**: identify brand/product → Read `~/.maestro/workflows/impeccable/{brand|product}.md`
|
|
156
|
+
3. **Register**: identify brand/product → Read `~/.pi/agent/packages/pi-maestro-flow/workflows/impeccable/{brand|product}.md`
|
|
157
157
|
|
|
158
158
|
## Direct Execution
|
|
159
159
|
|
|
@@ -164,7 +164,7 @@ Before reading any command workflow:
|
|
|
164
164
|
Category: {category} | Target: {target}
|
|
165
165
|
─────────────────────────────────────────
|
|
166
166
|
```
|
|
167
|
-
3. Read `~/.maestro/workflows/impeccable/{command}.md`
|
|
167
|
+
3. Read `~/.pi/agent/packages/pi-maestro-flow/workflows/impeccable/{command}.md`
|
|
168
168
|
4. **TodoWrite tracking**: create todo items for each major phase in the workflow file
|
|
169
169
|
- Format: `[{command}] {phase description}`
|
|
170
170
|
- Mark each phase completed immediately upon finishing
|
|
@@ -192,7 +192,7 @@ Before reading any command workflow:
|
|
|
192
192
|
- `↺` marks refine loop with max iteration count
|
|
193
193
|
- Conditional steps show trigger condition
|
|
194
194
|
- Skipped conditional steps marked `(skipped)`
|
|
195
|
-
3. **Confirm chain session**:
|
|
195
|
+
3. **Confirm chain session**: user prompt "Create chain session for '{chain_type}' targeting '{target}'?" — proceed only if user confirms. On decline, abort chain.
|
|
196
196
|
Create session: `.workflow/.maestro/ui-craft-{YYYYMMDD-HHmmss}/status.json`
|
|
197
197
|
```json
|
|
198
198
|
{ "chain_type": "...", "target": "...", "steps": [...], "current_step": 0,
|
|
@@ -203,7 +203,7 @@ Before reading any command workflow:
|
|
|
203
203
|
- If conditional step is skipped, immediately mark completed
|
|
204
204
|
- Quality gate steps include threshold: `[chain] step 5: impeccable:critique ◆ gate ≥26/40`
|
|
205
205
|
5. For each step:
|
|
206
|
-
- Read `~/.maestro/workflows/impeccable/{command}.md` → execute
|
|
206
|
+
- Read `~/.pi/agent/packages/pi-maestro-flow/workflows/impeccable/{command}.md` → execute
|
|
207
207
|
- **Step start**: TodoWrite marks current step in_progress
|
|
208
208
|
- **Step done**: TodoWrite marks completed + update status.json (`current_step`, step `status`)
|
|
209
209
|
- **Step failed**: TodoWrite marks completed (with note) + record reason
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-init
|
|
3
3
|
description: "Initialize project with auto state detection Arguments: [-y] [--from <source>] [--from-brainstorm SESSION-ID]"
|
|
4
|
-
allowed-tools: Read Write Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -9,15 +9,12 @@ Initialize project: detect state, create `.workflow/` with project.md, state.jso
|
|
|
9
9
|
Entry point; downstream: maestro-roadmap or maestro-brainstorm.
|
|
10
10
|
</purpose>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@~/.maestro/workflows/init.md
|
|
14
|
-
</required_reading>
|
|
12
|
+
> **Required**: Read `~/.pi/agent/packages/pi-maestro-flow/workflows/init.md` before proceeding.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
- [project.md](~/.maestro/templates/project.md) — read when generating project description
|
|
18
|
-
- [state.json](~/.maestro/templates/state.json) — read when creating initial state
|
|
19
|
-
- [config.json](~/.maestro/templates/config.json) — read when creating workflow configuration
|
|
20
|
-
</deferred_reading>
|
|
14
|
+
> **Reference files** (read when needed):
|
|
15
|
+
> - [project.md](~/.pi/agent/packages/pi-maestro-flow/templates/project.md) — read when generating project description
|
|
16
|
+
> - [state.json](~/.pi/agent/packages/pi-maestro-flow/templates/state.json) — read when creating initial state
|
|
17
|
+
> - [config.json](~/.pi/agent/packages/pi-maestro-flow/templates/config.json) — read when creating workflow configuration
|
|
21
18
|
|
|
22
19
|
<context>
|
|
23
20
|
$ARGUMENTS — none for interactive mode, or `-y` with `@file` reference for auto mode.
|
|
@@ -39,12 +36,12 @@ Check for `.workflow/state.json` -- loads context if project already initialized
|
|
|
39
36
|
1. **Idempotent init** — re-running init on an already-initialized project MUST detect existing `.workflow/` and warn (E002); NEVER silently overwrite existing state
|
|
40
37
|
2. **Scope guard** — init MUST only make initialization decisions; NEVER prejudge roadmap structure, plan scope, or implementation details
|
|
41
38
|
3. **All artifacts required** — init MUST NOT report completion until project.md, state.json, and config.json all exist; missing artifacts MUST be created before exit
|
|
42
|
-
4. **Template-driven** — deferred templates (project.md, state.json, config.json) MUST be read from `~/.maestro/templates/` and customized; NEVER generate from scratch without template
|
|
39
|
+
4. **Template-driven** — deferred templates (project.md, state.json, config.json) MUST be read from `~/.pi/agent/packages/pi-maestro-flow/templates/` and customized; NEVER generate from scratch without template
|
|
43
40
|
5. **Interview writes back** — all interactive decisions MUST be written to project.md/config.json before proceeding to research or completion; NEVER leave decisions unrecorded
|
|
44
41
|
</invariants>
|
|
45
42
|
|
|
46
43
|
<interview_protocol>
|
|
47
|
-
Follows
|
|
44
|
+
Follows `~/.pi/agent/packages/pi-maestro-flow/workflows/interview-mechanics.md` standard.
|
|
48
45
|
|
|
49
46
|
**Interaction mode**: convergent menu-driven
|
|
50
47
|
**Decision tree** (strict order): project type (greenfield / existing codebase onboarding) → tech stack detection and confirmation → directory structure preferences → initial configuration (specs categories, wiki bootstrap)
|
|
@@ -78,7 +75,7 @@ Follows @~/.maestro/workflows/interview-mechanics.md standard.
|
|
|
78
75
|
1. Check if `.workflow/` already exists — if so, load state and warn (E002 for greenfield conflicts)
|
|
79
76
|
2. Validate `--from` source is accessible if provided
|
|
80
77
|
|
|
81
|
-
Follow '~/.maestro/workflows/init.md' completely.
|
|
78
|
+
Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/init.md' completely.
|
|
82
79
|
|
|
83
80
|
### Artifact Verification (before completion)
|
|
84
81
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-merge
|
|
3
3
|
description: "Merge milestone worktree branch back to main Arguments: -m <milestone-number> [--force] [--dry-run] [--no-cleanup] [--continue]"
|
|
4
|
-
allowed-tools: Read Write Edit Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -9,9 +9,7 @@ Merge a milestone worktree branch back into main, sync scratch artifacts, and re
|
|
|
9
9
|
Two-phase: git merge first, artifact sync second (only after git succeeds).
|
|
10
10
|
</purpose>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@~/.maestro/workflows/merge.md
|
|
14
|
-
</required_reading>
|
|
12
|
+
> **Required**: Read `~/.pi/agent/packages/pi-maestro-flow/workflows/merge.md` before proceeding.
|
|
15
13
|
|
|
16
14
|
<context>
|
|
17
15
|
$ARGUMENTS -- milestone number and optional flags.
|
|
@@ -20,7 +18,7 @@ Flags (`-m`, `--force`, `--dry-run`, `--no-cleanup`, `--continue`), merge sequen
|
|
|
20
18
|
</context>
|
|
21
19
|
|
|
22
20
|
<execution>
|
|
23
|
-
Follow '~/.maestro/workflows/merge.md' completely.
|
|
21
|
+
Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/merge.md' completely.
|
|
24
22
|
|
|
25
23
|
### Phase Gates (MANDATORY, BLOCKING)
|
|
26
24
|
|
|
@@ -44,7 +42,7 @@ Follow '~/.maestro/workflows/merge.md' completely.
|
|
|
44
42
|
<completion>
|
|
45
43
|
### Knowledge inquiry
|
|
46
44
|
|
|
47
|
-
After successful merge, use `
|
|
45
|
+
After successful merge, use `user prompt` to confirm knowledge persistence:
|
|
48
46
|
|
|
49
47
|
```
|
|
50
48
|
question: "Merge 完成。是否记录里程碑经验教训?"
|
|
@@ -61,8 +59,8 @@ User selects "记录经验" → prompt for title/insight, then persist via `Skil
|
|
|
61
59
|
|
|
62
60
|
| Condition | Suggestion |
|
|
63
61
|
|-----------|-----------|
|
|
64
|
-
| Merge complete |
|
|
65
|
-
| Audit needed |
|
|
62
|
+
| Merge complete | invoke /skill: "manage-status" }) |
|
|
63
|
+
| Audit needed | invoke /skill: "maestro-milestone-audit" }) |
|
|
66
64
|
</completion>
|
|
67
65
|
|
|
68
66
|
<error_codes>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-milestone-audit
|
|
3
3
|
description: "Audit current milestone for cross-phase integration gaps Arguments: [<milestone>]"
|
|
4
|
-
allowed-tools: Read Write Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -9,9 +9,7 @@ Audit milestone for phase coverage, execution completeness, and integration gaps
|
|
|
9
9
|
Produces audit-report.md with PASS/FAIL verdict.
|
|
10
10
|
</purpose>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@~/.maestro/workflows/milestone-audit.md
|
|
14
|
-
</required_reading>
|
|
12
|
+
> **Required**: Read `~/.pi/agent/packages/pi-maestro-flow/workflows/milestone-audit.md` before proceeding.
|
|
15
13
|
|
|
16
14
|
<context>
|
|
17
15
|
Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
|
|
@@ -40,7 +38,7 @@ If $ARGUMENTS is empty AND current_milestone is null → raise E001 with message
|
|
|
40
38
|
</context>
|
|
41
39
|
|
|
42
40
|
<execution>
|
|
43
|
-
Follow '~/.maestro/workflows/milestone-audit.md' completely.
|
|
41
|
+
Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/milestone-audit.md' completely.
|
|
44
42
|
|
|
45
43
|
Audit checklist steps (phase coverage, ad-hoc completeness, execution completeness, cross-artifact integration) are defined in workflow `milestone-audit.md`.
|
|
46
44
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-milestone-complete
|
|
3
3
|
description: "Archive completed milestone and prepare for next Arguments: [<milestone>]"
|
|
4
|
-
allowed-tools: Read Write Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -9,13 +9,10 @@ Archive passed milestone: validate, archive artifacts, extract knowhow, advance
|
|
|
9
9
|
Requires audit PASS; produces milestone archive and learnings.
|
|
10
10
|
</purpose>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@~/.maestro/workflows/milestone-complete.md
|
|
14
|
-
</required_reading>
|
|
12
|
+
> **Required**: Read `~/.pi/agent/packages/pi-maestro-flow/workflows/milestone-complete.md` before proceeding.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
- [state.json](~/.maestro/templates/state.json) — read when updating milestone_history and advancing state
|
|
18
|
-
</deferred_reading>
|
|
14
|
+
> **Reference files** (read when needed):
|
|
15
|
+
> - [state.json](~/.pi/agent/packages/pi-maestro-flow/templates/state.json) — read when updating milestone_history and advancing state
|
|
19
16
|
|
|
20
17
|
<context>
|
|
21
18
|
Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json).
|
|
@@ -30,7 +27,7 @@ If $ARGUMENTS is empty AND current_milestone is null → raise E001 with message
|
|
|
30
27
|
</context>
|
|
31
28
|
|
|
32
29
|
<execution>
|
|
33
|
-
Follow '~/.maestro/workflows/milestone-complete.md' completely.
|
|
30
|
+
Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/milestone-complete.md' completely.
|
|
34
31
|
|
|
35
32
|
Archive flow steps (validation, directory archival, artifact history, knowhow extraction, state advancement, cleanup) are defined in workflow `milestone-complete.md`.
|
|
36
33
|
|
|
@@ -52,7 +49,7 @@ Archive flow steps (validation, directory archival, artifact history, knowhow ex
|
|
|
52
49
|
- BLOCKED if missing: knowhow extraction not attempted or project.md not updated — state advancement requires completed knowledge capture.
|
|
53
50
|
|
|
54
51
|
**GATE 4: State Advancement → Completion**
|
|
55
|
-
- REQUIRED:
|
|
52
|
+
- REQUIRED: user prompt confirmation before state.json advancement — show current milestone, next milestone (or null for adhoc), and artifacts to clear. User must confirm or abort.
|
|
56
53
|
- REQUIRED: state.json updated — next milestone as current (standard) or current_milestone=null (adhoc) (after confirmation).
|
|
57
54
|
- REQUIRED: Roadmap snapshot saved (standard only).
|
|
58
55
|
- BLOCKED if missing: state.json not advanced — project remains stuck on completed milestone.
|
|
@@ -67,10 +64,10 @@ After knowhow extraction (step 4), scan `learnings.md` for promotion candidates:
|
|
|
67
64
|
2. **Convention drift detection**: Compare executed task summaries against `coding-conventions.md` and `architecture-constraints.md`:
|
|
68
65
|
→ Ask: "Were any established conventions bypassed during this milestone? Should conventions be updated?"
|
|
69
66
|
|
|
70
|
-
3. **Wiki island check**:
|
|
67
|
+
3. **Wiki island check**: user prompt "Run wiki-connect --fix to link newly extracted knowledge?" — execute `manage-wiki connect --fix` only if user confirms.
|
|
71
68
|
|
|
72
|
-
Each promotion candidate requires explicit user confirmation via
|
|
73
|
-
- **"Promote"** → invoke `
|
|
69
|
+
Each promotion candidate requires explicit user confirmation via user prompt before writing:
|
|
70
|
+
- **"Promote"** → invoke `invoke /skill: "spec-add", args: "<category> <content>" })` with promoted content, preserving original date and source traceability.
|
|
74
71
|
- **"Skip"** → do not promote this candidate; proceed to next.
|
|
75
72
|
- **"Skip all"** → skip remaining candidates.
|
|
76
73
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-milestone-release
|
|
3
3
|
description: "Bump version, generate changelog, tag milestone Arguments: [<version>] [--bump patch|minor|major] [--dry-run] [--no-tag] [--no-push]"
|
|
4
|
-
allowed-tools: Read Write Edit Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -10,9 +10,7 @@ Package a completed milestone into a releasable version: version bump → change
|
|
|
10
10
|
Pipeline position: downstream of `/maestro-milestone-complete`. Terminal command.
|
|
11
11
|
</purpose>
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
@~/.maestro/workflows/milestone-release.md
|
|
15
|
-
</required_reading>
|
|
13
|
+
> **Required**: Read `~/.pi/agent/packages/pi-maestro-flow/workflows/milestone-release.md` before proceeding.
|
|
16
14
|
|
|
17
15
|
<context>
|
|
18
16
|
$ARGUMENTS -- optional explicit version string and flags.
|
|
@@ -40,14 +38,14 @@ $ARGUMENTS -- optional explicit version string and flags.
|
|
|
40
38
|
</context>
|
|
41
39
|
|
|
42
40
|
<interview_protocol>
|
|
43
|
-
Follows
|
|
41
|
+
Follows `~/.pi/agent/packages/pi-maestro-flow/workflows/interview-mechanics.md` standard.
|
|
44
42
|
|
|
45
43
|
**Decision points**: version bump type (major / minor / patch / custom), changelog review and confirmation
|
|
46
44
|
**Scope guard**: only release decisions; do not prejudge next milestone scope
|
|
47
45
|
</interview_protocol>
|
|
48
46
|
|
|
49
47
|
<execution>
|
|
50
|
-
Follow '~/.maestro/workflows/milestone-release.md' completely.
|
|
48
|
+
Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/milestone-release.md' completely.
|
|
51
49
|
|
|
52
50
|
### Phase Gates (MANDATORY, BLOCKING)
|
|
53
51
|
|
|
@@ -61,13 +59,13 @@ Follow '~/.maestro/workflows/milestone-release.md' completely.
|
|
|
61
59
|
|
|
62
60
|
**GATE 3: Changelog → Tag/Push**
|
|
63
61
|
- REQUIRED: CHANGELOG.md entry written with milestone summary + grouped changes.
|
|
64
|
-
- REQUIRED:
|
|
62
|
+
- REQUIRED: user prompt confirmation before creating release commit — show version, changelog diff, and files to be committed. User must confirm or abort.
|
|
65
63
|
- REQUIRED: Release commit created with conventional message (after confirmation).
|
|
66
64
|
|
|
67
65
|
**GATE 4: Tag → Push → Completion**
|
|
68
|
-
- REQUIRED:
|
|
66
|
+
- REQUIRED: user prompt confirmation before git tag creation — show tag name and annotation (unless --no-tag). User must confirm or abort.
|
|
69
67
|
- REQUIRED: Annotated git tag created (unless --no-tag) (after confirmation).
|
|
70
|
-
- REQUIRED:
|
|
68
|
+
- REQUIRED: user prompt confirmation before git push — show remote and refs to push (unless --no-push). User must confirm or abort.
|
|
71
69
|
- REQUIRED: state.json updated with last_release_version + last_release_at.
|
|
72
70
|
|
|
73
71
|
For `--dry-run`: print computed version, changelog diff, and tag name without side effects.
|
|
@@ -126,6 +124,6 @@ Status verdicts:
|
|
|
126
124
|
- [ ] Release commit created with conventional message
|
|
127
125
|
- [ ] Annotated git tag created (unless `--no-tag`)
|
|
128
126
|
- [ ] Commit + tag pushed to remote (unless `--no-push` or push failed → W002)
|
|
129
|
-
- [ ] User confirmed before each destructive git operation (commit, tag, push) via
|
|
130
|
-
- [ ] state.json updated with last_release_version + last_release_at timestamp (after
|
|
127
|
+
- [ ] User confirmed before each destructive git operation (commit, tag, push) via user prompt
|
|
128
|
+
- [ ] state.json updated with last_release_version + last_release_at timestamp (after user prompt confirmation)
|
|
131
129
|
</success_criteria>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-next
|
|
3
3
|
description: "Single-command recommendation — pick the best next command from the pool and execute it Arguments: <intent> [-y] [--dry-run] [--top N] [--list]"
|
|
4
|
-
allowed-tools: Read Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Bash Glob Grep maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -38,7 +38,7 @@ S_STATE — 读 project state、推断 lifecycle_position PERSIST:
|
|
|
38
38
|
S_RANK — 路由表评分、生成 top-N candidates PERSIST: —
|
|
39
39
|
S_LIST — `--list` 模式:分组展示候选池 PERSIST: —
|
|
40
40
|
S_PRESENT — 显示 top pick + 备选 + 推荐理由 + 执行参数 PERSIST: —
|
|
41
|
-
S_CONFIRM —
|
|
41
|
+
S_CONFIRM — user prompt 选择/修改参数(auto_mode 跳过) PERSIST: —
|
|
42
42
|
S_EXECUTE — `Skill({ skill, args })` 单次调用 PERSIST: —
|
|
43
43
|
S_FALLBACK — intent 空且 clarification 失败 PERSIST: —
|
|
44
44
|
</states>
|
|
@@ -49,7 +49,7 @@ S_PARSE:
|
|
|
49
49
|
→ S_LIST WHEN: --list flag
|
|
50
50
|
→ S_STATE WHEN: intent text present
|
|
51
51
|
→ S_STATE WHEN: keyword "continue"/"next"/"go"/"继续"/"下一步"/"接下来"
|
|
52
|
-
→ S_PARSE WHEN: no intent (max 1 clarify round) DO:
|
|
52
|
+
→ S_PARSE WHEN: no intent (max 1 clarify round) DO: user prompt
|
|
53
53
|
→ S_FALLBACK WHEN: clarification empty
|
|
54
54
|
|
|
55
55
|
S_STATE:
|
|
@@ -71,7 +71,7 @@ S_CONFIRM:
|
|
|
71
71
|
→ END WHEN: 用户取消
|
|
72
72
|
|
|
73
73
|
S_EXECUTE:
|
|
74
|
-
→ END DO:
|
|
74
|
+
→ END DO: invoke /skill: <chosen>, args: <args> }) → 输出 "✅ 已执行 /<command>"
|
|
75
75
|
|
|
76
76
|
S_FALLBACK:
|
|
77
77
|
→ END DO: raise E001
|
|
@@ -261,7 +261,7 @@ AskUserQuestion (single-select, header: "执行确认"):
|
|
|
261
261
|
- [ ] top pick 展示附"推荐理由"(命中规则 + lifecycle 位置)
|
|
262
262
|
- [ ] `--dry-run` 仅展示,不执行
|
|
263
263
|
- [ ] `-y` 自动执行 top pick;用户传入时透传到 skill args
|
|
264
|
-
- [ ] 非自动模式通过
|
|
264
|
+
- [ ] 非自动模式通过 user prompt 确认或选备选
|
|
265
265
|
- [ ] 选定命令通过单次 `Skill()` 调用执行
|
|
266
266
|
- [ ] 不创建 session / 不生成 status.json / 不触发后续 chain
|
|
267
267
|
- [ ] `--list` 模式按 workflow 簇分组展示
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-overlay
|
|
3
3
|
description: "Create or edit command overlays from natural language Arguments: <intent> — 描述要添加的规则或步骤,如 'always verify after execute'"
|
|
4
|
-
allowed-tools: Read Write Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Bash Glob Grep maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -10,7 +10,7 @@ Turn natural-language instructions into command overlays — JSON patch files th
|
|
|
10
10
|
</purpose>
|
|
11
11
|
|
|
12
12
|
<required_reading>
|
|
13
|
-
|
|
13
|
+
Read and follow `~/.pi/agent/packages/pi-maestro-flow/workflows/overlays.md`.
|
|
14
14
|
@~/.maestro/cli-tools.json
|
|
15
15
|
</required_reading>
|
|
16
16
|
|
|
@@ -37,14 +37,14 @@ Turn natural-language instructions into command overlays — JSON patch files th
|
|
|
37
37
|
2. **Idempotent** — re-running `maestro overlay apply` with the same overlay JSON MUST produce no file changes
|
|
38
38
|
3. **Creation only** — this skill MUST only create overlays; listing and removal are handled by `maestro overlay list` (ink TUI)
|
|
39
39
|
4. **Pristine source preferred** — injection point analysis MUST read from `$PKG_ROOT/.claude/commands/` (untouched originals) first, fall back to `~/.claude/commands/` only if pristine unavailable
|
|
40
|
-
5. **User approval before write** — overlay JSON MUST be shown and approved via
|
|
41
|
-
6. **Chain skip option mandatory** — if a skill chain is configured, the injected content MUST include a "Skip" option in
|
|
40
|
+
5. **User approval before write** — overlay JSON MUST be shown and approved via user prompt before writing to disk; NEVER auto-install without confirmation
|
|
41
|
+
6. **Chain skip option mandatory** — if a skill chain is configured, the injected content MUST include a "Skip" option in user prompt; NEVER force the user into a chain
|
|
42
42
|
</invariants>
|
|
43
43
|
|
|
44
44
|
<execution>
|
|
45
45
|
### 1. Parse user intent
|
|
46
46
|
|
|
47
|
-
Treat the argument as natural-language intent. If unclear, ask up to 2 questions with
|
|
47
|
+
Treat the argument as natural-language intent. If unclear, ask up to 2 questions with user prompt: (a) which command(s) to target, (b) where in the command flow the injection should happen.
|
|
48
48
|
|
|
49
49
|
### 2. Identify targets, injection points, and visualize
|
|
50
50
|
|
|
@@ -71,16 +71,16 @@ If the user wants a whole new section, use `mode: new-section` with `afterSectio
|
|
|
71
71
|
<success_criteria>
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Use
|
|
74
|
+
Use user prompt to confirm:
|
|
75
75
|
- **"Confirm"** — proceed with this injection point
|
|
76
76
|
- **"Pick different section"** — re-select section/mode
|
|
77
77
|
- **"Cancel"** — abort
|
|
78
78
|
|
|
79
79
|
### 2.5. Skill chain configuration
|
|
80
80
|
|
|
81
|
-
After confirming the injection point, ask whether this overlay should chain to another skill upon completion. This enables the overlay's injected content to hand off to a skill via
|
|
81
|
+
After confirming the injection point, ask whether this overlay should chain to another skill upon completion. This enables the overlay's injected content to hand off to a skill via user prompt at runtime, using `invoke /skill: "...", args: "..." })` syntax.
|
|
82
82
|
|
|
83
|
-
Use
|
|
83
|
+
Use user prompt:
|
|
84
84
|
- **"No chain"** — standard overlay, no skill handoff
|
|
85
85
|
- **"Chain to skill"** → ask for the target skill name (e.g., `quality-review`, `maestro-execute`, `quality-test`)
|
|
86
86
|
- **"Chain with alternatives"** → ask for primary skill + 1-2 alternative skills
|
|
@@ -114,34 +114,34 @@ Build a slug from the user's intent (kebab-case, lowercase). Write to `~/.maestr
|
|
|
114
114
|
- `@~/.maestro/...` references are encouraged for pointing at docs
|
|
115
115
|
- Escape `\n` in JSON strings; use a HEREDOC via Bash if content is long
|
|
116
116
|
|
|
117
|
-
**Skill chain content** — if a chain was configured in Step 2.5, append a Skill Handoff block at the end of the patch `content`. The handoff uses
|
|
117
|
+
**Skill chain content** — if a chain was configured in Step 2.5, append a Skill Handoff block at the end of the patch `content`. The handoff uses user prompt so the user controls whether to proceed:
|
|
118
118
|
|
|
119
119
|
```markdown
|
|
120
120
|
---
|
|
121
121
|
|
|
122
122
|
**Skill Handoff** (overlay)
|
|
123
123
|
|
|
124
|
-
After the above step completes, use
|
|
124
|
+
After the above step completes, use user prompt:
|
|
125
125
|
- "Proceed to /quality-review" — Hand off to quality review
|
|
126
126
|
- "Skip" — Continue with current command flow
|
|
127
127
|
- "Alternative: /maestro-execute" — Run execution with built-in verification instead
|
|
128
128
|
|
|
129
129
|
On user selection:
|
|
130
|
-
- Proceed →
|
|
131
|
-
- Alternative →
|
|
130
|
+
- Proceed → invoke /skill: "quality-review", args: "{phase}" })
|
|
131
|
+
- Alternative → invoke /skill: "maestro-execute", args: "{phase}" })
|
|
132
132
|
- Skip → continue normally
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
Handoff rules:
|
|
136
136
|
- Always include a **"Skip"** option — the user can always decline the chain
|
|
137
|
-
- Use `
|
|
137
|
+
- Use `invoke /skill: "<name>", args: "..." })` syntax for handoff calls
|
|
138
138
|
- Mark handoff heading with `(overlay)` tag
|
|
139
139
|
- Support runtime variable placeholders: `{phase}`, `{description}`, `{session_id}`
|
|
140
140
|
- Keep handoff block under 10 lines of markdown
|
|
141
141
|
|
|
142
142
|
### 3.5. Content approval
|
|
143
143
|
|
|
144
|
-
Display the full overlay JSON to the user.
|
|
144
|
+
Display the full overlay JSON to the user. user prompt:
|
|
145
145
|
- **"Approve & install"** — proceed to installation
|
|
146
146
|
- **"Edit"** — user provides corrections, re-draft
|
|
147
147
|
- **"Cancel"** — discard overlay, do not write
|
|
@@ -172,7 +172,7 @@ Show the user:
|
|
|
172
172
|
Name: <slug>
|
|
173
173
|
Path: ~/.maestro/overlays/<slug>.json
|
|
174
174
|
Targets: maestro-execute (applied), maestro-plan (skipped: missing)
|
|
175
|
-
Chain: quality-review (via
|
|
175
|
+
Chain: quality-review (via user prompt) | none
|
|
176
176
|
Scopes: [global]
|
|
177
177
|
|
|
178
178
|
Re-apply: maestro overlay apply
|
|
@@ -190,7 +190,7 @@ After the report, remind the user they can run `maestro overlay list` for the in
|
|
|
190
190
|
- [ ] Re-running `maestro overlay apply` produces no file changes (idempotent)
|
|
191
191
|
- [ ] User shown the report with target list and removal instructions
|
|
192
192
|
- [ ] Injection point preview shown (with existing overlays + `>>>` marker) and confirmed before drafting
|
|
193
|
-
- [ ] If chain configured, `content` includes Skill Handoff block with
|
|
193
|
+
- [ ] If chain configured, `content` includes Skill Handoff block with user prompt + Skip option + `Skill()` calls
|
|
194
194
|
</success_criteria>
|
|
195
195
|
|
|
196
196
|
<completion>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-plan
|
|
3
3
|
description: "Use when creating, revising, or verifying an execution plan for a milestone or task Arguments: [milestone] [--spec SPEC-xxx] [-y] [--gaps] [--tdd] [--dir <path>] [--from <source>] [--revise [instructions]] [--check <plan-dir>]"
|
|
4
|
-
allowed-tools: Read Write Edit Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -9,16 +9,13 @@ Create, revise, or verify execution plans (5-stage pipeline).
|
|
|
9
9
|
Produces plan.json + TASK files; registers PLN artifact in state.json.
|
|
10
10
|
</purpose>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@~/.maestro/workflows/plan.md
|
|
14
|
-
</required_reading>
|
|
12
|
+
> **Required**: Read `~/.pi/agent/packages/pi-maestro-flow/workflows/plan.md` before proceeding.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
- [plan.json](~/.maestro/templates/plan.json) — read when generating plan output
|
|
18
|
-
- [task.json](~/.maestro/templates/task.json) — read when generating task files
|
|
19
|
-
- [state.json](~/.maestro/templates/state.json) — read when registering artifact
|
|
20
|
-
- [boundary-grill.md](~/.maestro/workflows/boundary-grill.md) — read when boundary conflicts detected (in P4)
|
|
21
|
-
</deferred_reading>
|
|
14
|
+
> **Reference files** (read when needed):
|
|
15
|
+
> - [plan.json](~/.pi/agent/packages/pi-maestro-flow/templates/plan.json) — read when generating plan output
|
|
16
|
+
> - [task.json](~/.pi/agent/packages/pi-maestro-flow/templates/task.json) — read when generating task files
|
|
17
|
+
> - [state.json](~/.pi/agent/packages/pi-maestro-flow/templates/state.json) — read when registering artifact
|
|
18
|
+
> - [boundary-grill.md](~/.pi/agent/packages/pi-maestro-flow/workflows/boundary-grill.md) — read when boundary conflicts detected (in P4)
|
|
22
19
|
|
|
23
20
|
<context>
|
|
24
21
|
$ARGUMENTS — milestone number, or no args for current milestone, with optional flags.
|
|
@@ -59,7 +56,7 @@ Bash("maestro collab preflight --phase <phase-number>")
|
|
|
59
56
|
```
|
|
60
57
|
If exit code is 1, present warnings and ask whether to proceed.
|
|
61
58
|
|
|
62
|
-
Follow '~/.maestro/workflows/plan.md' completely.
|
|
59
|
+
Follow '~/.pi/agent/packages/pi-maestro-flow/workflows/plan.md' completely.
|
|
63
60
|
|
|
64
61
|
### Plan Agent Model
|
|
65
62
|
|
|
@@ -149,7 +146,7 @@ Status verdicts:
|
|
|
149
146
|
- **NEEDS_RETRY** — Plan failed (tooling error, transient issue); ralph will retry
|
|
150
147
|
- **BLOCKED** — External hard blocker (e.g., upstream artifact missing, dependency unavailable); pass `--reason "..."`
|
|
151
148
|
|
|
152
|
-
> Ambiguous requirements are NOT a completion status — resolve them in-place via `
|
|
149
|
+
> Ambiguous requirements are NOT a completion status — resolve them in-place via `user prompt` during planning (≤3 rounds), then proceed to DONE. `NEEDS_CONTEXT` has been removed; context shortage is handled by the harness's automatic compaction.
|
|
153
150
|
|
|
154
151
|
### Next-step routing
|
|
155
152
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: maestro-player
|
|
3
3
|
description: "Play workflow templates with checkpoint resume Arguments: <template-slug|path> [--context key=value...] [-c [session-id]] [--list] [--dry-run]"
|
|
4
|
-
allowed-tools: Read Write Edit Bash Glob Grep
|
|
4
|
+
allowed-tools: Read Write Edit Bash Glob Grep teammate maestro
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<purpose>
|
|
@@ -59,7 +59,7 @@ $ARGUMENTS — template slug/path, or flags.
|
|
|
59
59
|
}
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
**Output boundary**: ALL file writes MUST target `.workflow/.maestro/player-*/` (session status.json + step outputs) only. Template files (`~/.maestro/templates/workflows/`) are read-only. NEVER modify source code or `.claude/commands/` files.
|
|
62
|
+
**Output boundary**: ALL file writes MUST target `.workflow/.maestro/player-*/` (session status.json + step outputs) only. Template files (`~/.pi/agent/packages/pi-maestro-flow/templates/workflows/`) are read-only. NEVER modify source code or `.claude/commands/` files.
|
|
63
63
|
</context>
|
|
64
64
|
|
|
65
65
|
<invariants>
|
|
@@ -88,7 +88,7 @@ S_ROUTE:
|
|
|
88
88
|
→ handleList WHEN: --list DO: scan index.json, display templates
|
|
89
89
|
→ S_RESUME WHEN: -c flag
|
|
90
90
|
→ S_LOAD WHEN: template slug/path provided
|
|
91
|
-
→ handleList WHEN: no args DO: display templates +
|
|
91
|
+
→ handleList WHEN: no args DO: display templates + user prompt
|
|
92
92
|
|
|
93
93
|
S_RESUME:
|
|
94
94
|
→ S_EXEC_LOOP WHEN: session found DO: A_RESUME_SESSION
|
|
@@ -107,7 +107,7 @@ S_EXEC_LOOP:
|
|
|
107
107
|
→ END WHEN: checkpoint pause DO: set status=paused, display resume command
|
|
108
108
|
→ END WHEN: abort chosen DO: set status=aborted, save progress
|
|
109
109
|
GUARD: cli nodes → Bash(run_in_background: true) + STOP, wait for callback
|
|
110
|
-
GUARD: on failure → on_fail: skip (log, advance) | retry (once) | abort (
|
|
110
|
+
GUARD: on failure → on_fail: skip (log, advance) | retry (once) | abort (user prompt: Retry/Skip/Abort). Default on_fail when not specified: `abort` (prompt user via user prompt).
|
|
111
111
|
GUARD: after step 3+ → display context hint "可随时 /maestro-player -c 恢复"
|
|
112
112
|
|
|
113
113
|
S_COMPLETE:
|
|
@@ -129,7 +129,7 @@ S_COMPLETE:
|
|
|
129
129
|
1. Resolve template: absolute path → as-is; relative → from cwd; slug → index.json lookup
|
|
130
130
|
2. Parse `--context key=value` pairs
|
|
131
131
|
3. Validate template (template_id, nodes, edges, context_schema required)
|
|
132
|
-
4. Collect missing required variables via
|
|
132
|
+
4. Collect missing required variables via user prompt
|
|
133
133
|
5. Bind {variable} placeholders (leave {N-xxx.field} and {prev_*} for runtime)
|
|
134
134
|
|
|
135
135
|
### A_INIT_SESSION
|