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.
- package/maestro-flow/commands/learn/investigate.md +151 -152
- package/maestro-flow/commands/learn/second-opinion.md +118 -122
- package/maestro-flow/commands/lifecycle/analyze.md +215 -266
- package/maestro-flow/commands/lifecycle/blueprint.md +189 -204
- package/maestro-flow/commands/lifecycle/brainstorm.md +209 -213
- package/maestro-flow/commands/lifecycle/companion.md +531 -531
- package/maestro-flow/commands/lifecycle/composer.md +188 -179
- package/maestro-flow/commands/lifecycle/execute.md +183 -184
- package/maestro-flow/commands/lifecycle/fork.md +111 -110
- package/maestro-flow/commands/lifecycle/grill.md +175 -176
- package/maestro-flow/commands/lifecycle/guard.md +103 -102
- package/maestro-flow/commands/lifecycle/impeccable.md +311 -268
- package/maestro-flow/commands/lifecycle/init.md +130 -131
- package/maestro-flow/commands/lifecycle/merge.md +87 -80
- package/maestro-flow/commands/lifecycle/next.md +253 -257
- package/maestro-flow/commands/lifecycle/overlay.md +188 -178
- package/maestro-flow/commands/lifecycle/plan.md +225 -211
- package/maestro-flow/commands/lifecycle/quick.md +83 -77
- package/maestro-flow/commands/lifecycle/roadmap.md +173 -186
- package/maestro-flow/commands/lifecycle/swarm-workflow.md +243 -264
- package/maestro-flow/commands/lifecycle/tools-execute.md +122 -117
- package/maestro-flow/commands/lifecycle/tools-register.md +162 -157
- package/maestro-flow/commands/lifecycle/ui-codify.md +117 -100
- package/maestro-flow/commands/lifecycle/universal-workflow.md +548 -561
- package/maestro-flow/commands/lifecycle/update.md +122 -119
- package/maestro-flow/commands/manage/codebase-rebuild.md +87 -85
- package/maestro-flow/commands/manage/harvest.md +97 -95
- package/maestro-flow/commands/manage/issue-discover.md +83 -81
- package/maestro-flow/commands/manage/issue.md +72 -73
- package/maestro-flow/commands/manage/kg-extractors.md +128 -0
- package/maestro-flow/commands/manage/knowhow-capture.md +92 -82
- package/maestro-flow/commands/manage/knowhow.md +83 -79
- package/maestro-flow/commands/manage/knowledge-audit.md +105 -88
- package/maestro-flow/commands/manage/status.md +62 -52
- package/maestro-flow/commands/manage/wiki.md +82 -71
- package/maestro-flow/commands/milestone/audit.md +4 -10
- package/maestro-flow/commands/milestone/complete.md +6 -7
- package/maestro-flow/commands/milestone/release.md +136 -145
- package/maestro-flow/commands/quality/auto-test.md +153 -136
- package/maestro-flow/commands/quality/debug.md +159 -120
- package/maestro-flow/commands/quality/refactor.md +105 -67
- package/maestro-flow/commands/quality/retrospective.md +123 -77
- package/maestro-flow/commands/quality/review.md +155 -128
- package/maestro-flow/commands/quality/sync.md +88 -52
- package/maestro-flow/commands/quality/test.md +147 -117
- package/maestro-flow/commands/spec/add.md +77 -70
- package/maestro-flow/commands/spec/setup.md +49 -52
- package/package.json +1 -1
|
@@ -1,119 +1,122 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maestro-update
|
|
3
|
-
description: Detect version, preview changes, apply workflow upgrades
|
|
4
|
-
argument-hint: "[--dry-run] [--force] [--setup-only]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- AskUserQuestion
|
|
13
|
-
---
|
|
14
|
-
<purpose>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- [ ]
|
|
113
|
-
- [ ]
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
---
|
|
2
|
+
name: maestro-update
|
|
3
|
+
description: Detect version, preview changes, apply workflow upgrades
|
|
4
|
+
argument-hint: "[--dry-run] [--force] [--setup-only]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Detect current version, run schema migration to latest, then follow the version-specific upgrade workflow.
|
|
16
|
+
Schema (`src/migrations/`) handles transforms; workflow docs (`~/.maestro/workflows/updates/`) handle setup.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<context>
|
|
20
|
+
$ARGUMENTS — optional flags.
|
|
21
|
+
|
|
22
|
+
**Flags:**
|
|
23
|
+
- `--dry-run` -- Preview migration plan without executing
|
|
24
|
+
- `--force` -- Skip confirmation prompts
|
|
25
|
+
- `--setup-only` -- Skip schema migration, run only the setup for current version
|
|
26
|
+
|
|
27
|
+
**Version source:** `.workflow/state.json` → `version` field
|
|
28
|
+
|
|
29
|
+
**Workflow docs:** `~/.maestro/workflows/updates/`
|
|
30
|
+
- `update-v{TO}-setup.md` — post-migration setup for version {TO}
|
|
31
|
+
|
|
32
|
+
**Schema registry:** `src/migrations/` — handles all intermediate version bumps automatically
|
|
33
|
+
</context>
|
|
34
|
+
|
|
35
|
+
<execution>
|
|
36
|
+
|
|
37
|
+
### Step 1: Detect Version
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
1. Read .workflow/state.json → extract version (default "1.0" if missing)
|
|
41
|
+
2. Display:
|
|
42
|
+
=== Maestro Update ===
|
|
43
|
+
Current version: v{version}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
IF `--setup-only`:
|
|
47
|
+
→ Glob: ~/.maestro/workflows/updates/update-v{version}-setup.md
|
|
48
|
+
→ IF exists: follow that document completely, then EXIT
|
|
49
|
+
→ IF not exists: display "No setup script for v{version}" → EXIT
|
|
50
|
+
|
|
51
|
+
### Step 2: Check for Updates
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
1. Run: npx tsx src/migrations/run.ts "$(pwd)" --dry-run --json
|
|
55
|
+
2. Parse JSON output
|
|
56
|
+
3. IF status = "up-to-date":
|
|
57
|
+
Display "Already up to date (v{version})"
|
|
58
|
+
→ Glob: ~/.maestro/workflows/updates/update-v{version}-setup.md
|
|
59
|
+
→ IF exists: AskUserQuestion "Run setup for v{version}?" → load and follow
|
|
60
|
+
→ EXIT
|
|
61
|
+
|
|
62
|
+
4. Display target:
|
|
63
|
+
Update available: v{current} → v{target}
|
|
64
|
+
Schema migrations: {N} step(s) (handled automatically)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
IF `--dry-run` → display info and EXIT.
|
|
68
|
+
|
|
69
|
+
### Step 3: Execute
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
1. Confirm (unless --force):
|
|
73
|
+
AskUserQuestion: "Upgrade v{current} → v{target}?"
|
|
74
|
+
Options: [执行 / 取消]
|
|
75
|
+
|
|
76
|
+
2. Create backup:
|
|
77
|
+
Bash: cp .workflow/state.json .workflow/state.json.backup-v{current}-{timestamp}
|
|
78
|
+
|
|
79
|
+
3. Run schema migration (handles all intermediate steps automatically):
|
|
80
|
+
Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
|
|
81
|
+
Parse result, display changes.
|
|
82
|
+
|
|
83
|
+
4. IF failed → display backup restore command → EXIT
|
|
84
|
+
|
|
85
|
+
5. Load version-specific setup:
|
|
86
|
+
Read: ~/.maestro/workflows/updates/update-v{target}-setup.md
|
|
87
|
+
IF exists → follow completely (hooks, deps, knowledge system config)
|
|
88
|
+
|
|
89
|
+
6. Display: "v{current} → v{target}: done"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Step 4: Summary
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
=== Update Complete ===
|
|
96
|
+
Version: v{current} → v{target}
|
|
97
|
+
Backup: .workflow/state.json.backup-v{current}-{timestamp}
|
|
98
|
+
|
|
99
|
+
Next steps:
|
|
100
|
+
/manage-status -- Verify project state
|
|
101
|
+
/maestro -- Continue workflow
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
</execution>
|
|
105
|
+
|
|
106
|
+
<success_criteria>
|
|
107
|
+
- [ ] Current version detected from state.json
|
|
108
|
+
- [ ] Schema migrations run automatically (no manual intermediate steps)
|
|
109
|
+
- [ ] Backup created before migration
|
|
110
|
+
- [ ] Version-specific setup doc loaded and followed (if exists)
|
|
111
|
+
- [ ] --setup-only runs only setup for current version
|
|
112
|
+
- [ ] --dry-run previews without executing
|
|
113
|
+
- [ ] Summary shows version change and backup path
|
|
114
|
+
</success_criteria>
|
|
115
|
+
|
|
116
|
+
<completion>
|
|
117
|
+
### Next-step routing
|
|
118
|
+
| Condition | Suggestion |
|
|
119
|
+
|-----------|-----------|
|
|
120
|
+
| Update complete | `/manage-status` to verify project state |
|
|
121
|
+
| Want to continue workflow | `/maestro` |
|
|
122
|
+
</completion>
|
|
@@ -1,85 +1,87 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: manage-codebase-rebuild
|
|
3
|
-
description: Rebuild all codebase documentation from scratch
|
|
4
|
-
argument-hint: "[--focus <area>] [--force] [--skip-commit]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Agent
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<purpose>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- `--
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
| Mapper
|
|
38
|
-
| Mapper
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- `.workflow
|
|
44
|
-
- `.workflow/codebase
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
|
67
|
-
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- [ ]
|
|
77
|
-
- [ ]
|
|
78
|
-
- [ ]
|
|
79
|
-
- [ ]
|
|
80
|
-
- [ ]
|
|
81
|
-
- [ ]
|
|
82
|
-
- [ ]
|
|
83
|
-
- [ ]
|
|
84
|
-
- [ ]
|
|
85
|
-
|
|
1
|
+
---
|
|
2
|
+
name: manage-codebase-rebuild
|
|
3
|
+
description: Rebuild all codebase documentation from scratch
|
|
4
|
+
argument-hint: "[--focus <area>] [--force] [--skip-commit]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<purpose>
|
|
17
|
+
Full rebuild of `.workflow/codebase/` docs: 4 parallel mapper agents → tech-stack, architecture, features, concerns. Destructive — overwrites existing docs.
|
|
18
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<required_reading>
|
|
21
|
+
@~/.maestro/workflows/codebase-rebuild.md
|
|
22
|
+
</required_reading>
|
|
23
|
+
|
|
24
|
+
<context>
|
|
25
|
+
$ARGUMENTS -- optional flags.
|
|
26
|
+
|
|
27
|
+
**Flags:**
|
|
28
|
+
- `--focus <area>` -- Scope mapper agents to a single domain (e.g., `auth`, `api`, `database`). When omitted, all 4 mappers run on the full codebase.
|
|
29
|
+
- `--force` -- Skip confirmation prompt and proceed directly
|
|
30
|
+
- `--skip-commit` -- Do not auto-commit after rebuild
|
|
31
|
+
|
|
32
|
+
**Mapper agent assignments (when `--focus` omitted):**
|
|
33
|
+
| Agent | Focus | Output file |
|
|
34
|
+
|-------|-------|-------------|
|
|
35
|
+
| Mapper 1 | **Tech stack** -- languages, frameworks, dependencies, build system | `tech-stack.md` |
|
|
36
|
+
| Mapper 2 | **Architecture** -- layers, module boundaries, data flow, entry points | `architecture.md` |
|
|
37
|
+
| Mapper 3 | **Features** -- capabilities, API surface, user-facing functionality | `features.md` |
|
|
38
|
+
| Mapper 4 | **Cross-cutting concerns** -- error handling, logging, auth, config, testing | `concerns.md` |
|
|
39
|
+
|
|
40
|
+
**State files:**
|
|
41
|
+
- `.workflow/` -- must be initialized (project.md, state.json exist)
|
|
42
|
+
- `.workflow/codebase/` -- target directory (will be cleared and rebuilt)
|
|
43
|
+
- `.workflow/codebase/doc-index.json` -- generated documentation index
|
|
44
|
+
- `.workflow/codebase/knowledge-graph.json` -- Knowledge Graph with nodes, edges, layers, and tour (generated by `maestro kg index`)
|
|
45
|
+
</context>
|
|
46
|
+
|
|
47
|
+
<execution>
|
|
48
|
+
Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
|
|
49
|
+
|
|
50
|
+
**When `--focus <area>` is set:** pass the area string to each mapper agent as scoping context; only regenerate the docs relevant to that scope (leave others untouched unless missing).
|
|
51
|
+
|
|
52
|
+
</execution>
|
|
53
|
+
|
|
54
|
+
<completion>
|
|
55
|
+
### Next-step routing
|
|
56
|
+
|
|
57
|
+
| Condition | Suggestion |
|
|
58
|
+
|-----------|-----------|
|
|
59
|
+
| View updated state | `/manage-status` |
|
|
60
|
+
| Incremental updates later | `/quality-sync` |
|
|
61
|
+
| Verify KG stats | `maestro kg stats` |
|
|
62
|
+
| Future change impact | `maestro kg diff-wiki` |
|
|
63
|
+
</completion>
|
|
64
|
+
|
|
65
|
+
<error_codes>
|
|
66
|
+
| Code | Severity | Condition | Recovery |
|
|
67
|
+
|------|----------|-----------|----------|
|
|
68
|
+
| E001 | error | .workflow/ not initialized | Run maestro-init first to create .workflow/ |
|
|
69
|
+
| W001 | warning | A mapper agent failed (partial results) | Retry failed mapper or accept partial results |
|
|
70
|
+
| W002 | warning | `.workflow/codebase/` already exists -- user prompted for rebuild/skip | check_existing |
|
|
71
|
+
| W003 | warning | KG validation failed (graph written with valid=false) | Review .kg-tmp/ artifacts, re-run KG pipeline |
|
|
72
|
+
| W004 | warning | Wiki index rebuild failed after KG generation | Non-fatal, retries on next wiki access |
|
|
73
|
+
</error_codes>
|
|
74
|
+
|
|
75
|
+
<success_criteria>
|
|
76
|
+
- [ ] User confirmed rebuild (or --force used)
|
|
77
|
+
- [ ] .workflow/codebase/ cleared and rebuilt from scratch (or scoped subset when --focus set)
|
|
78
|
+
- [ ] All 4 mapper agents spawned (failures logged as W001)
|
|
79
|
+
- [ ] doc-index.json generated and valid
|
|
80
|
+
- [ ] All documentation files regenerated
|
|
81
|
+
- [ ] state.json updated with rebuild timestamp
|
|
82
|
+
- [ ] project.md Tech Stack section updated if changes detected
|
|
83
|
+
- [ ] KG pipeline executed (`maestro kg index`)
|
|
84
|
+
- [ ] knowledge-graph.json generated in .workflow/codebase/
|
|
85
|
+
- [ ] KG nodes indexed as virtual wiki entries (automatic via WikiIndexer on next wiki access)
|
|
86
|
+
- [ ] Next step routed
|
|
87
|
+
</success_criteria>
|
|
@@ -1,95 +1,97 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: manage-harvest
|
|
3
|
-
description: Extract knowledge from artifacts into wiki/spec/issues
|
|
4
|
-
argument-hint: "[<session-id|path>] [--to wiki|spec|issue|auto] [--source <type>] [--recent N] [--dry-run] [-y]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Agent
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
<purpose>
|
|
16
|
-
Extract knowledge
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
@~/.maestro/workflows/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- [ ]
|
|
81
|
-
- [ ]
|
|
82
|
-
- [ ]
|
|
83
|
-
- [ ]
|
|
84
|
-
- [ ]
|
|
85
|
-
- [ ]
|
|
86
|
-
- [ ]
|
|
87
|
-
- [ ]
|
|
88
|
-
- [ ]
|
|
89
|
-
- [ ]
|
|
90
|
-
- [ ]
|
|
91
|
-
- [ ]
|
|
92
|
-
- [ ] `
|
|
93
|
-
- [ ]
|
|
94
|
-
- [ ]
|
|
95
|
-
|
|
1
|
+
---
|
|
2
|
+
name: manage-harvest
|
|
3
|
+
description: Extract knowledge from artifacts into wiki/spec/issues
|
|
4
|
+
argument-hint: "[<session-id|path>] [--to wiki|spec|issue|auto] [--source <type>] [--recent N] [--dry-run] [-y]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Extract knowledge from workflow artifacts → route to wiki/spec/issue stores. Works on any artifact (vs retrospective which is phase-scoped).
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/harvest.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<deferred_reading>
|
|
24
|
+
- @~/.maestro/workflows/issue.md (issues.jsonl schema for issue routing — read when creating issues in Stage 6c)
|
|
25
|
+
- @~/.maestro/workflows/specs-add.md (spec entry format — read when routing to spec in Stage 6b)
|
|
26
|
+
</deferred_reading>
|
|
27
|
+
|
|
28
|
+
<context>
|
|
29
|
+
Arguments: $ARGUMENTS
|
|
30
|
+
|
|
31
|
+
**Modes (auto-detected):**
|
|
32
|
+
- No arguments → `scan` mode: discover all harvestable artifacts, interactive selection
|
|
33
|
+
- `<session-id>` (e.g., `ANL-auth-20260410`, `WFS-xxx`) → `session` mode: harvest specific session
|
|
34
|
+
- `<path>` (e.g., `.workflow/.analysis/ANL-auth-20260410/`) → `path` mode: harvest from explicit directory
|
|
35
|
+
|
|
36
|
+
Flags, source registry (scan paths), and storage locations defined in workflow harvest.md.
|
|
37
|
+
</context>
|
|
38
|
+
|
|
39
|
+
<execution>
|
|
40
|
+
Follow '~/.maestro/workflows/harvest.md' Stages 1-8 in order.
|
|
41
|
+
|
|
42
|
+
**Key invariants:**
|
|
43
|
+
1. **Read-only until Stage 6** — extraction and classification happen in-memory.
|
|
44
|
+
2. **Dedup before write** — check harvest-log.jsonl and existing stores before each write.
|
|
45
|
+
3. **Never modify source artifacts** — harvest is purely extractive.
|
|
46
|
+
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.
|
|
47
|
+
|
|
48
|
+
Extraction patterns, classification rules, routing infrastructure, and fragment ID scheme defined in workflow harvest.md.
|
|
49
|
+
|
|
50
|
+
</execution>
|
|
51
|
+
|
|
52
|
+
<completion>
|
|
53
|
+
### Next-step routing
|
|
54
|
+
|
|
55
|
+
| Condition | Suggestion |
|
|
56
|
+
|-----------|-----------|
|
|
57
|
+
| Wiki entries created | `maestro wiki list --type note` |
|
|
58
|
+
| Wiki graph needs linking | `/manage-wiki connect --fix` |
|
|
59
|
+
| Issues created | `/manage-issue list --source harvest` |
|
|
60
|
+
| Specs extracted | `/spec-load --role implement` |
|
|
61
|
+
| Full phase retrospective | `/quality-retrospective` |
|
|
62
|
+
</completion>
|
|
63
|
+
|
|
64
|
+
<error_codes>
|
|
65
|
+
| Code | Severity | Condition | Recovery |
|
|
66
|
+
|------|----------|-----------|----------|
|
|
67
|
+
| E001 | error | `.workflow/` not initialized | Run `/maestro-init` first |
|
|
68
|
+
| E002 | error | Invalid `--to` target (must be: wiki, spec, issue, auto) | Display valid options |
|
|
69
|
+
| E003 | error | Invalid `--source` type | Display valid source types from registry |
|
|
70
|
+
| E004 | error | Session ID not found in any source path | Show available sessions with `--source all` |
|
|
71
|
+
| E005 | error | Path does not exist or contains no parseable artifacts | Verify path and file structure |
|
|
72
|
+
| W001 | warning | No harvestable artifacts found within `--recent` window | Widen time window or check `.workflow/` contents |
|
|
73
|
+
| W002 | warning | `maestro wiki create` failed — wiki entries saved to `.workflow/harvest/wiki-pending-*.md` | Apply pending entries manually or retry |
|
|
74
|
+
| W003 | warning | Some fragments below confidence threshold — logged but not routed | Lower `--min-confidence` to include |
|
|
75
|
+
| W004 | warning | Duplicate fragments skipped | Review harvest-log.jsonl for prior routing |
|
|
76
|
+
| W005 | warning | `.workflow/issues/` directory missing | Auto-create directory and empty issues.jsonl |
|
|
77
|
+
</error_codes>
|
|
78
|
+
|
|
79
|
+
<success_criteria>
|
|
80
|
+
- [ ] Mode correctly resolved (scan / session / path)
|
|
81
|
+
- [ ] Source artifacts discovered and listed with metadata
|
|
82
|
+
- [ ] User selected artifact(s) to harvest (or auto-selected via session/path mode)
|
|
83
|
+
- [ ] All files in selected artifacts loaded and parsed
|
|
84
|
+
- [ ] Knowledge fragments extracted with category, confidence, tags
|
|
85
|
+
- [ ] Fragments filtered by `--min-confidence`
|
|
86
|
+
- [ ] Routing classification applied (auto or forced by `--to`)
|
|
87
|
+
- [ ] Dedup check passed against harvest-log.jsonl and existing stores
|
|
88
|
+
- [ ] If `--dry-run`: preview displayed, no files written
|
|
89
|
+
- [ ] If not dry-run: all routed items written to target stores
|
|
90
|
+
- [ ] Wiki entries created via `maestro wiki create` (or fallback to pending files)
|
|
91
|
+
- [ ] Spec entries added via `spec-add` mechanism
|
|
92
|
+
- [ ] Issue entries appended to `issues.jsonl` with canonical schema
|
|
93
|
+
- [ ] `harvest-log.jsonl` updated with provenance for each routed item
|
|
94
|
+
- [ ] `harvest-report-{date}.md` written with full summary
|
|
95
|
+
- [ ] No source artifacts modified
|
|
96
|
+
- [ ] Summary displayed with counts and next-step routing
|
|
97
|
+
</success_criteria>
|