maestro-flow-one 0.2.33 → 0.2.35

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.
Files changed (48) hide show
  1. package/maestro-flow/commands/learn/investigate.md +151 -152
  2. package/maestro-flow/commands/learn/second-opinion.md +118 -122
  3. package/maestro-flow/commands/lifecycle/analyze.md +215 -266
  4. package/maestro-flow/commands/lifecycle/blueprint.md +189 -204
  5. package/maestro-flow/commands/lifecycle/brainstorm.md +209 -213
  6. package/maestro-flow/commands/lifecycle/companion.md +531 -531
  7. package/maestro-flow/commands/lifecycle/composer.md +188 -179
  8. package/maestro-flow/commands/lifecycle/execute.md +183 -184
  9. package/maestro-flow/commands/lifecycle/fork.md +111 -110
  10. package/maestro-flow/commands/lifecycle/grill.md +175 -176
  11. package/maestro-flow/commands/lifecycle/guard.md +103 -102
  12. package/maestro-flow/commands/lifecycle/impeccable.md +311 -268
  13. package/maestro-flow/commands/lifecycle/init.md +130 -131
  14. package/maestro-flow/commands/lifecycle/merge.md +87 -80
  15. package/maestro-flow/commands/lifecycle/next.md +253 -257
  16. package/maestro-flow/commands/lifecycle/overlay.md +188 -178
  17. package/maestro-flow/commands/lifecycle/plan.md +225 -211
  18. package/maestro-flow/commands/lifecycle/quick.md +83 -77
  19. package/maestro-flow/commands/lifecycle/roadmap.md +173 -186
  20. package/maestro-flow/commands/lifecycle/swarm-workflow.md +243 -264
  21. package/maestro-flow/commands/lifecycle/tools-execute.md +122 -117
  22. package/maestro-flow/commands/lifecycle/tools-register.md +162 -157
  23. package/maestro-flow/commands/lifecycle/ui-codify.md +117 -100
  24. package/maestro-flow/commands/lifecycle/universal-workflow.md +548 -561
  25. package/maestro-flow/commands/lifecycle/update.md +122 -119
  26. package/maestro-flow/commands/manage/codebase-rebuild.md +87 -85
  27. package/maestro-flow/commands/manage/harvest.md +97 -95
  28. package/maestro-flow/commands/manage/issue-discover.md +83 -81
  29. package/maestro-flow/commands/manage/issue.md +72 -73
  30. package/maestro-flow/commands/manage/kg-extractors.md +128 -0
  31. package/maestro-flow/commands/manage/knowhow-capture.md +92 -82
  32. package/maestro-flow/commands/manage/knowhow.md +83 -79
  33. package/maestro-flow/commands/manage/knowledge-audit.md +105 -88
  34. package/maestro-flow/commands/manage/status.md +62 -52
  35. package/maestro-flow/commands/manage/wiki.md +82 -71
  36. package/maestro-flow/commands/milestone/audit.md +4 -10
  37. package/maestro-flow/commands/milestone/complete.md +6 -7
  38. package/maestro-flow/commands/milestone/release.md +136 -145
  39. package/maestro-flow/commands/quality/auto-test.md +153 -136
  40. package/maestro-flow/commands/quality/debug.md +159 -120
  41. package/maestro-flow/commands/quality/refactor.md +105 -67
  42. package/maestro-flow/commands/quality/retrospective.md +123 -77
  43. package/maestro-flow/commands/quality/review.md +155 -128
  44. package/maestro-flow/commands/quality/sync.md +88 -52
  45. package/maestro-flow/commands/quality/test.md +147 -117
  46. package/maestro-flow/commands/spec/add.md +77 -70
  47. package/maestro-flow/commands/spec/setup.md +49 -52
  48. package/package.json +1 -1
@@ -1,131 +1,130 @@
1
- ---
2
- name: maestro-init
3
- description: Initialize project with auto state detection
4
- argument-hint: "[-y] [--from <source>]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- - Agent
12
- - AskUserQuestion
13
- ---
14
- <purpose>
15
- Initialize a new project through auto state detection and unified flow. Invoked when starting a fresh project or onboarding an existing codebase into workflow management. Produces the `.workflow/` directory structure with project.md, state.json, config.json, and specs. Does NOT create roadmap — use maestro-roadmap (light mode, default) or maestro-roadmap --mode full (spec package) as the next step.
16
-
17
- Pipeline position: entry point (no upstream). Downstream: `maestro-roadmap` or `maestro-brainstorm`.
18
- </purpose>
19
-
20
- <required_reading>
21
- @~/.maestro/workflows/init.md
22
- </required_reading>
23
-
24
- <deferred_reading>
25
- - [project.md](~/.maestro/templates/project.md) — read when generating project description
26
- - [state.json](~/.maestro/templates/state.json) — read when creating initial state
27
- - [config.json](~/.maestro/templates/config.json) — read when creating workflow configuration
28
- </deferred_reading>
29
-
30
- <context>
31
- $ARGUMENTS — none for interactive mode, or `-y` with `@file` reference for auto mode.
32
-
33
- **Flags:**
34
-
35
- | Flag | Effect | Default |
36
- |------|--------|---------|
37
- | `-y` / `--yes` | Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference. | `false` |
38
- | `--from <source>` | Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning. Alias: `--from-brainstorm` | — |
39
-
40
- **Load project state if exists:**
41
- Check for `.workflow/state.json` -- loads context if project already initialized.
42
- </context>
43
-
44
- <interview_protocol>
45
- Follows @~/.maestro/workflows/interview-mechanics.md standard.
46
-
47
- **Interaction mode**: convergent menu-driven
48
- **Decision tree** (strict order): project type (greenfield / existing codebase onboarding) → tech stack detection and confirmation → directory structure preferences initial configuration (specs categories, wiki bootstrap)
49
- **Scope guard**: only init decisions; do not prejudge roadmap structure or plan scope
50
- **Writeback target**: project.md (project description) + config.json (settings) + state.json (initial state)
51
- **Additional skip conditions**: --from source (upstream context pre-fills decisions)
52
- **Exit condition**: all configuration questions settled → proceed to workflow execution
53
- </interview_protocol>
54
-
55
- <execution>
56
- ### Pre-flight
57
-
58
- 1. Check if `.workflow/` already exists if so, load state and warn (E002 for greenfield conflicts)
59
- 2. Validate `--from` source is accessible if provided
60
-
61
- Follow '~/.maestro/workflows/init.md' completely.
62
-
63
- ### Artifact Verification (before completion)
64
-
65
- ```
66
- REQUIRED_ARTIFACTS = [
67
- ".workflow/project.md", // Core Value, Requirements, Key Decisions
68
- ".workflow/state.json", // artifacts[], initialized to idle state
69
- ".workflow/config.json" // Workflow configuration
70
- ]
71
- ```
72
- If any artifact is missing: DO NOT report completion. Write the missing file first.
73
- </execution>
74
-
75
- <completion>
76
- ### Standalone report
77
-
78
- ```
79
- === WORKFLOW INITIALIZED ===
80
- Project: {project_name}
81
- State: .workflow/state.json (active)
82
-
83
- Created:
84
- .workflow/project.md
85
- .workflow/state.json
86
- .workflow/config.json
87
- .workflow/specs/
88
- ```
89
-
90
- ### Ralph-invoked completion
91
-
92
- End the step by calling the CLI (no text block output):
93
- ```
94
- maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
95
- ```
96
-
97
- Status verdicts:
98
- - **DONE** — Normal completion
99
- - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
100
- - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
101
- - **BLOCKED** — External hard blocker; pass `--reason`
102
-
103
- ### Next-step routing
104
-
105
- | Condition | Suggestion |
106
- |-----------|-----------|
107
- | Roadmap needed (default light) | `/maestro-roadmap <requirement>` |
108
- | Full spec package + roadmap | `/maestro-roadmap --mode full <idea>` |
109
- | Explore ideas first | `/maestro-brainstorm <topic>` |
110
- | View project dashboard | `/manage-status` |
111
- | Quick ad-hoc task | `/maestro-quick <task>` |
112
- </completion>
113
-
114
- <error_codes>
115
- | Code | Severity | Condition | Recovery |
116
- |------|----------|-----------|----------|
117
- | E001 | error | No arguments provided when -y requires @ reference | Check arguments format, re-run with correct input |
118
- | E002 | error | .workflow/ already exists for greenfield init | Check .workflow/ directory state, resolve conflicts |
119
- | E003 | error | Context source not found (--from / --from-brainstorm) | Check arguments format, re-run with correct input |
120
- | W001 | warning | Research agent failed, continuing with partial results | Retry research or proceed with partial results |
121
- </error_codes>
122
-
123
- <success_criteria>
124
- - [ ] `.workflow/project.md` created with Core Value, Requirements (Validated/Active/Out of Scope), Key Decisions
125
- - [ ] `.workflow/state.json` created with artifacts[] array, initialized to idle state
126
- - [ ] `.workflow/config.json` created with workflow / execution / git / gates / codebase / guard / collab / specInjection / dashboard segments
127
- - [ ] `.workflow/specs/` initialized with convention files
128
- - [ ] All interview decisions written to project.md / config.json before proceeding
129
- - [ ] Research completed (if enabled) parallel agents spawned with results merged
130
- - [ ] Next-step routing displayed in completion report
131
- </success_criteria>
1
+ ---
2
+ name: maestro-init
3
+ description: Initialize project with auto state detection
4
+ argument-hint: "[-y] [--from <source>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ - AskUserQuestion
13
+ ---
14
+ <purpose>
15
+ Initialize project: detect state, create `.workflow/` with project.md, state.json, config.json.
16
+ Entry point; downstream: maestro-roadmap or maestro-brainstorm.
17
+ </purpose>
18
+
19
+ <required_reading>
20
+ @~/.maestro/workflows/init.md
21
+ </required_reading>
22
+
23
+ <deferred_reading>
24
+ - [project.md](~/.maestro/templates/project.md) — read when generating project description
25
+ - [state.json](~/.maestro/templates/state.json) — read when creating initial state
26
+ - [config.json](~/.maestro/templates/config.json) — read when creating workflow configuration
27
+ </deferred_reading>
28
+
29
+ <context>
30
+ $ARGUMENTS — none for interactive mode, or `-y` with `@file` reference for auto mode.
31
+
32
+ **Flags:**
33
+
34
+ | Flag | Effect | Default |
35
+ |------|--------|---------|
36
+ | `-y` / `--yes` | Automatic mode. After config questions, runs research without further interaction. Expects idea document via @ reference. | `false` |
37
+ | `--from <source>` | Load upstream context package (brainstorm:ID, @file, or path). Consumes context-package.json to pre-fill project vision, goals, constraints, and terminology. Skips interactive questioning. Alias: `--from-brainstorm` | — |
38
+
39
+ **Load project state if exists:**
40
+ Check for `.workflow/state.json` -- loads context if project already initialized.
41
+ </context>
42
+
43
+ <interview_protocol>
44
+ Follows @~/.maestro/workflows/interview-mechanics.md standard.
45
+
46
+ **Interaction mode**: convergent menu-driven
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)
48
+ **Scope guard**: only init decisions; do not prejudge roadmap structure or plan scope
49
+ **Writeback target**: project.md (project description) + config.json (settings) + state.json (initial state)
50
+ **Additional skip conditions**: --from source (upstream context pre-fills decisions)
51
+ **Exit condition**: all configuration questions settled proceed to workflow execution
52
+ </interview_protocol>
53
+
54
+ <execution>
55
+ ### Pre-flight
56
+
57
+ 1. Check if `.workflow/` already exists — if so, load state and warn (E002 for greenfield conflicts)
58
+ 2. Validate `--from` source is accessible if provided
59
+
60
+ Follow '~/.maestro/workflows/init.md' completely.
61
+
62
+ ### Artifact Verification (before completion)
63
+
64
+ ```
65
+ REQUIRED_ARTIFACTS = [
66
+ ".workflow/project.md", // Core Value, Requirements, Key Decisions
67
+ ".workflow/state.json", // artifacts[], initialized to idle state
68
+ ".workflow/config.json" // Workflow configuration
69
+ ]
70
+ ```
71
+ If any artifact is missing: DO NOT report completion. Write the missing file first.
72
+ </execution>
73
+
74
+ <completion>
75
+ ### Standalone report
76
+
77
+ ```
78
+ === WORKFLOW INITIALIZED ===
79
+ Project: {project_name}
80
+ State: .workflow/state.json (active)
81
+
82
+ Created:
83
+ .workflow/project.md
84
+ .workflow/state.json
85
+ .workflow/config.json
86
+ .workflow/specs/
87
+ ```
88
+
89
+ ### Ralph-invoked completion
90
+
91
+ End the step by calling the CLI (no text block output):
92
+ ```
93
+ maestro ralph complete <idx> --status {STATUS} [--evidence {path}]
94
+ ```
95
+
96
+ Status verdicts:
97
+ - **DONE** — Normal completion
98
+ - **DONE_WITH_CONCERNS** — Completed with caveats; pass `--concerns`
99
+ - **NEEDS_RETRY** — Tooling error / transient issue; ralph will retry
100
+ - **BLOCKED** — External hard blocker; pass `--reason`
101
+
102
+ ### Next-step routing
103
+
104
+ | Condition | Suggestion |
105
+ |-----------|-----------|
106
+ | Roadmap needed (default light) | `/maestro-roadmap <requirement>` |
107
+ | Full spec package + roadmap | `/maestro-roadmap --mode full <idea>` |
108
+ | Explore ideas first | `/maestro-brainstorm <topic>` |
109
+ | View project dashboard | `/manage-status` |
110
+ | Quick ad-hoc task | `/maestro-quick <task>` |
111
+ </completion>
112
+
113
+ <error_codes>
114
+ | Code | Severity | Condition | Recovery |
115
+ |------|----------|-----------|----------|
116
+ | E001 | error | No arguments provided when -y requires @ reference | Check arguments format, re-run with correct input |
117
+ | E002 | error | .workflow/ already exists for greenfield init | Check .workflow/ directory state, resolve conflicts |
118
+ | E003 | error | Context source not found (--from / --from-brainstorm) | Check arguments format, re-run with correct input |
119
+ | W001 | warning | Research agent failed, continuing with partial results | Retry research or proceed with partial results |
120
+ </error_codes>
121
+
122
+ <success_criteria>
123
+ - [ ] `.workflow/project.md` created with Core Value, Requirements (Validated/Active/Out of Scope), Key Decisions
124
+ - [ ] `.workflow/state.json` created with artifacts[] array, initialized to idle state
125
+ - [ ] `.workflow/config.json` created with workflow / execution / git / gates / codebase / guard / collab / specInjection / dashboard segments
126
+ - [ ] `.workflow/specs/` initialized with convention files
127
+ - [ ] All interview decisions written to project.md / config.json before proceeding
128
+ - [ ] Research completed (if enabled) parallel agents spawned with results merged
129
+ - [ ] Next-step routing displayed in completion report
130
+ </success_criteria>
@@ -1,80 +1,87 @@
1
- ---
2
- name: maestro-merge
3
- description: Merge milestone worktree branch back to main
4
- argument-hint: "-m <milestone-number> [--force] [--dry-run] [--no-cleanup] [--continue]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- - AskUserQuestion
14
- ---
15
- <purpose>
16
- Merge a completed milestone worktree branch back into the main branch, sync scratch artifacts, and reconcile the artifact registry. Uses a two-phase approach: git merge first (source code), artifact sync second (only after git succeeds). This prevents partial state corruption when merge conflicts occur.
17
-
18
- Includes registry health check, pre-merge rebase (pull main into worktree to minimize conflicts), and atomic state reconciliation (merge artifact entries, don't overwrite).
19
- </purpose>
20
-
21
- <required_reading>
22
- @~/.maestro/workflows/merge.md
23
- </required_reading>
24
-
25
- <context>
26
- $ARGUMENTS -- milestone number and optional flags.
27
-
28
- Flags (`-m`, `--force`, `--dry-run`, `--no-cleanup`, `--continue`), merge sequence, artifact sync detail, and conflict handling are defined in workflow `merge.md`.
29
- </context>
30
-
31
- <execution>
32
- Follow '~/.maestro/workflows/merge.md' completely.
33
-
34
- ### Phase Gates (MANDATORY, BLOCKING)
35
-
36
- **GATE 1: Pre-merge Git Merge**
37
- - REQUIRED: Registry health check completed (stale entries cleaned or flagged).
38
- - REQUIRED: Pre-merge rebase successful (worktree has latest main).
39
- - BLOCKED if rebase has conflicts: resolve in worktree first (W003).
40
-
41
- **GATE 2: Git Merge Artifact Sync**
42
- - REQUIRED: Git merge completed without conflicts (or conflicts resolved via --continue).
43
- - Do NOT sync artifacts until git merge succeeds — prevents partial state corruption.
44
-
45
- **GATE 3: Artifact Sync Completion**
46
- - REQUIRED: All scratch artifacts synced to main `.workflow/scratch/`.
47
- - REQUIRED: `state.json.artifacts[]` reconciled (worktree entries merged into main).
48
- - REQUIRED: Worktree cleaned up (unless --no-cleanup).
49
-
50
- **Knowledge inquiry on completion:**
51
- After successful merge, ask user once: "Record milestone learnings?" If yes, persist via `Skill("spec-add", "learning \"<title>\" \"<insight>\" --keywords <kw1>,<kw2> --description \"<summary>\"")`.
52
-
53
- **Next-step routing on completion:**
54
- - View dashboard → Skill({ skill: "manage-status" })
55
- - Audit milestone Skill({ skill: "maestro-milestone-audit" })
56
- </execution>
57
-
58
- <error_codes>
59
- | Code | Severity | Condition | Recovery |
60
- |------|----------|-----------|----------|
61
- | E001 | error | Running inside a worktree | Run from main worktree |
62
- | E002 | error | No worktree registry found | Nothing to merge |
63
- | E003 | error | --continue but no merge state | Start fresh merge |
64
- | E004 | error | No milestone number provided | Provide `-m <N>` |
65
- | W001 | warning | Stale registry entries found | Auto-cleaned |
66
- | W002 | warning | Incomplete artifacts (without --force) | Confirm or use --force |
67
- | W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
68
- </error_codes>
69
-
70
- <success_criteria>
71
- - [ ] Registry health check passed (stale entries cleaned)
72
- - [ ] Pre-merge rebase successful (worktree has latest main)
73
- - [ ] Git merge completed without conflicts (or conflicts resolved via --continue)
74
- - [ ] All scratch artifacts synced to main `.workflow/scratch/`
75
- - [ ] `state.json.artifacts[]` reconciled (worktree entries merged into main)
76
- - [ ] Milestone `"forked"` flag removed in `state.json.milestones[]`
77
- - [ ] `roadmap.md` completed phases marked
78
- - [ ] Worktree removed and branch deleted (unless --no-cleanup)
79
- - [ ] `worktrees.json` registry updated (entry removed)
80
- </success_criteria>
1
+ ---
2
+ name: maestro-merge
3
+ description: Merge milestone worktree branch back to main
4
+ argument-hint: "-m <milestone-number> [--force] [--dry-run] [--no-cleanup] [--continue]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+ <purpose>
16
+ Merge a milestone worktree branch back into main, sync scratch artifacts, and reconcile the artifact registry.
17
+ Two-phase: git merge first, artifact sync second (only after git succeeds).
18
+ </purpose>
19
+
20
+ <required_reading>
21
+ @~/.maestro/workflows/merge.md
22
+ </required_reading>
23
+
24
+ <context>
25
+ $ARGUMENTS -- milestone number and optional flags.
26
+
27
+ Flags (`-m`, `--force`, `--dry-run`, `--no-cleanup`, `--continue`), merge sequence, artifact sync detail, and conflict handling are defined in workflow `merge.md`.
28
+ </context>
29
+
30
+ <execution>
31
+ Follow '~/.maestro/workflows/merge.md' completely.
32
+
33
+ ### Phase Gates (MANDATORY, BLOCKING)
34
+
35
+ **GATE 1: Pre-merge → Git Merge**
36
+ - REQUIRED: Registry health check completed (stale entries cleaned or flagged).
37
+ - REQUIRED: Pre-merge rebase successful (worktree has latest main).
38
+ - BLOCKED if rebase has conflicts: resolve in worktree first (W003).
39
+
40
+ **GATE 2: Git Merge → Artifact Sync**
41
+ - REQUIRED: Git merge completed without conflicts (or conflicts resolved via --continue).
42
+ - BLOCKED if: merge has unresolved conflicts — do NOT sync artifacts until git merge succeeds (prevents partial state corruption).
43
+
44
+ **GATE 3: Artifact Sync → Completion**
45
+ - REQUIRED: All scratch artifacts synced to main `.workflow/scratch/`.
46
+ - REQUIRED: `state.json.artifacts[]` reconciled (worktree entries merged into main).
47
+ - REQUIRED: Worktree cleaned up (unless --no-cleanup).
48
+ - BLOCKED if missing: artifacts not synced or registry not reconciled — main worktree would have incomplete state.
49
+
50
+ </execution>
51
+
52
+ <completion>
53
+ ### Knowledge inquiry
54
+
55
+ After successful merge, ask user once: "Record milestone learnings?" If yes, persist via `Skill("spec-add", "learning \"<title>\" \"<insight>\" --keywords <kw1>,<kw2> --description \"<summary>\"")`.
56
+
57
+ ### Next-step routing
58
+
59
+ | Condition | Suggestion |
60
+ |-----------|-----------|
61
+ | Merge complete | Skill({ skill: "manage-status" }) |
62
+ | Audit needed | Skill({ skill: "maestro-milestone-audit" }) |
63
+ </completion>
64
+
65
+ <error_codes>
66
+ | Code | Severity | Condition | Recovery |
67
+ |------|----------|-----------|----------|
68
+ | E001 | error | Running inside a worktree | Run from main worktree |
69
+ | E002 | error | No worktree registry found | Nothing to merge |
70
+ | E003 | error | --continue but no merge state | Start fresh merge |
71
+ | E004 | error | No milestone number provided | Provide `-m <N>` |
72
+ | W001 | warning | Stale registry entries found | Auto-cleaned |
73
+ | W002 | warning | Incomplete artifacts (without --force) | Confirm or use --force |
74
+ | W003 | warning | Conflict pulling main into worktree | Resolve in worktree first |
75
+ </error_codes>
76
+
77
+ <success_criteria>
78
+ - [ ] Registry health check passed (stale entries cleaned)
79
+ - [ ] Pre-merge rebase successful (worktree has latest main)
80
+ - [ ] Git merge completed without conflicts (or conflicts resolved via --continue)
81
+ - [ ] All scratch artifacts synced to main `.workflow/scratch/`
82
+ - [ ] `state.json.artifacts[]` reconciled (worktree entries merged into main)
83
+ - [ ] Milestone `"forked"` flag removed in `state.json.milestones[]`
84
+ - [ ] `roadmap.md` completed phases marked
85
+ - [ ] Worktree removed and branch deleted (unless --no-cleanup)
86
+ - [ ] `worktrees.json` registry updated (entry removed)
87
+ </success_criteria>