maestro-flow 0.5.3 → 0.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/learn-follow/SKILL.md +114 -114
- package/.agents/skills/learn-investigate/SKILL.md +138 -139
- package/.agents/skills/learn-second-opinion/SKILL.md +105 -109
- package/.agents/skills/maestro/SKILL.md +2 -10
- package/.agents/skills/maestro-amend/SKILL.md +152 -152
- package/.agents/skills/maestro-analyze/SKILL.md +201 -252
- package/.agents/skills/maestro-blueprint/SKILL.md +175 -190
- package/.agents/skills/maestro-brainstorm/SKILL.md +196 -200
- package/.agents/skills/maestro-collab/SKILL.md +159 -159
- package/.agents/skills/maestro-companion/SKILL.md +517 -517
- package/.agents/skills/maestro-composer/SKILL.md +173 -164
- package/.agents/skills/maestro-execute/SKILL.md +169 -170
- package/.agents/skills/maestro-fork/SKILL.md +97 -96
- package/.agents/skills/maestro-grill/SKILL.md +161 -162
- package/.agents/skills/maestro-guard/SKILL.md +93 -92
- package/.agents/skills/maestro-impeccable/SKILL.md +296 -253
- package/.agents/skills/maestro-init/SKILL.md +117 -118
- package/.agents/skills/maestro-merge/SKILL.md +73 -66
- package/.agents/skills/maestro-milestone-audit/SKILL.md +4 -10
- package/.agents/skills/maestro-milestone-complete/SKILL.md +6 -7
- package/.agents/skills/maestro-milestone-release/SKILL.md +122 -131
- package/.agents/skills/maestro-next/SKILL.md +241 -245
- package/.agents/skills/maestro-overlay/SKILL.md +176 -166
- package/.agents/skills/maestro-plan/SKILL.md +211 -197
- package/.agents/skills/maestro-player/SKILL.md +167 -167
- package/.agents/skills/maestro-quick/SKILL.md +69 -63
- package/.agents/skills/maestro-ralph/SKILL.md +2 -36
- package/.agents/skills/maestro-ralph-beta/SKILL.md +861 -872
- package/.agents/skills/maestro-ralph-execute/SKILL.md +234 -234
- package/.agents/skills/maestro-roadmap/SKILL.md +159 -172
- package/.agents/skills/maestro-swarm-workflow/SKILL.md +229 -250
- package/.agents/skills/maestro-tools-execute/SKILL.md +108 -103
- package/.agents/skills/maestro-tools-register/SKILL.md +148 -143
- package/.agents/skills/maestro-ui-codify/SKILL.md +103 -86
- package/.agents/skills/maestro-universal-workflow/SKILL.md +534 -547
- package/.agents/skills/maestro-update/SKILL.md +109 -106
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +73 -71
- package/.agents/skills/manage-harvest/SKILL.md +83 -81
- package/.agents/skills/manage-issue/SKILL.md +59 -60
- package/.agents/skills/manage-issue-discover/SKILL.md +70 -68
- package/.agents/skills/manage-kg-extractors/SKILL.md +130 -0
- package/.agents/skills/manage-knowhow/SKILL.md +70 -66
- package/.agents/skills/manage-knowhow-capture/SKILL.md +79 -69
- package/.agents/skills/manage-knowledge-audit/SKILL.md +91 -74
- package/.agents/skills/manage-status/SKILL.md +52 -42
- package/.agents/skills/manage-wiki/SKILL.md +69 -58
- package/.agents/skills/odyssey-debug/SKILL.md +445 -459
- package/.agents/skills/odyssey-improve/SKILL.md +477 -491
- package/.agents/skills/odyssey-planex/SKILL.md +576 -587
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +400 -413
- package/.agents/skills/odyssey-ui/SKILL.md +431 -448
- package/.agents/skills/quality-auto-test/SKILL.md +140 -123
- package/.agents/skills/quality-debug/SKILL.md +145 -106
- package/.agents/skills/quality-refactor/SKILL.md +91 -53
- package/.agents/skills/quality-retrospective/SKILL.md +109 -63
- package/.agents/skills/quality-review/SKILL.md +141 -114
- package/.agents/skills/quality-sync/SKILL.md +74 -38
- package/.agents/skills/quality-test/SKILL.md +133 -103
- package/.agents/skills/security-audit/SKILL.md +217 -166
- package/.agents/skills/spec-add/SKILL.md +66 -59
- package/.agents/skills/spec-load/SKILL.md +68 -68
- package/.agents/skills/spec-remove/SKILL.md +42 -42
- package/.agents/skills/spec-setup/SKILL.md +38 -41
- package/.agy/skills/learn-follow/SKILL.md +114 -114
- package/.agy/skills/learn-investigate/SKILL.md +138 -139
- package/.agy/skills/learn-second-opinion/SKILL.md +105 -109
- package/.agy/skills/maestro/SKILL.md +2 -10
- package/.agy/skills/maestro-amend/SKILL.md +152 -152
- package/.agy/skills/maestro-analyze/SKILL.md +201 -252
- package/.agy/skills/maestro-blueprint/SKILL.md +175 -190
- package/.agy/skills/maestro-brainstorm/SKILL.md +196 -200
- package/.agy/skills/maestro-collab/SKILL.md +159 -159
- package/.agy/skills/maestro-companion/SKILL.md +517 -517
- package/.agy/skills/maestro-composer/SKILL.md +173 -164
- package/.agy/skills/maestro-execute/SKILL.md +169 -170
- package/.agy/skills/maestro-fork/SKILL.md +97 -96
- package/.agy/skills/maestro-grill/SKILL.md +161 -162
- package/.agy/skills/maestro-guard/SKILL.md +93 -92
- package/.agy/skills/maestro-impeccable/SKILL.md +296 -253
- package/.agy/skills/maestro-init/SKILL.md +117 -118
- package/.agy/skills/maestro-merge/SKILL.md +73 -66
- package/.agy/skills/maestro-milestone-audit/SKILL.md +4 -10
- package/.agy/skills/maestro-milestone-complete/SKILL.md +6 -7
- package/.agy/skills/maestro-milestone-release/SKILL.md +122 -131
- package/.agy/skills/maestro-next/SKILL.md +241 -245
- package/.agy/skills/maestro-overlay/SKILL.md +176 -166
- package/.agy/skills/maestro-plan/SKILL.md +211 -197
- package/.agy/skills/maestro-player/SKILL.md +167 -167
- package/.agy/skills/maestro-quick/SKILL.md +69 -63
- package/.agy/skills/maestro-ralph/SKILL.md +2 -36
- package/.agy/skills/maestro-ralph-beta/SKILL.md +861 -872
- package/.agy/skills/maestro-ralph-execute/SKILL.md +234 -234
- package/.agy/skills/maestro-roadmap/SKILL.md +159 -172
- package/.agy/skills/maestro-swarm-workflow/SKILL.md +229 -250
- package/.agy/skills/maestro-tools-execute/SKILL.md +108 -103
- package/.agy/skills/maestro-tools-register/SKILL.md +148 -143
- package/.agy/skills/maestro-ui-codify/SKILL.md +103 -86
- package/.agy/skills/maestro-universal-workflow/SKILL.md +534 -547
- package/.agy/skills/maestro-update/SKILL.md +109 -106
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +73 -71
- package/.agy/skills/manage-harvest/SKILL.md +83 -81
- package/.agy/skills/manage-issue/SKILL.md +59 -60
- package/.agy/skills/manage-issue-discover/SKILL.md +70 -68
- package/.agy/skills/manage-kg-extractors/SKILL.md +130 -0
- package/.agy/skills/manage-knowhow/SKILL.md +70 -66
- package/.agy/skills/manage-knowhow-capture/SKILL.md +79 -69
- package/.agy/skills/manage-knowledge-audit/SKILL.md +91 -74
- package/.agy/skills/manage-status/SKILL.md +52 -42
- package/.agy/skills/manage-wiki/SKILL.md +69 -58
- package/.agy/skills/odyssey-debug/SKILL.md +445 -459
- package/.agy/skills/odyssey-improve/SKILL.md +477 -491
- package/.agy/skills/odyssey-planex/SKILL.md +576 -587
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +400 -413
- package/.agy/skills/odyssey-ui/SKILL.md +431 -448
- package/.agy/skills/quality-auto-test/SKILL.md +140 -123
- package/.agy/skills/quality-debug/SKILL.md +145 -106
- package/.agy/skills/quality-refactor/SKILL.md +91 -53
- package/.agy/skills/quality-retrospective/SKILL.md +109 -63
- package/.agy/skills/quality-review/SKILL.md +141 -114
- package/.agy/skills/quality-sync/SKILL.md +74 -38
- package/.agy/skills/quality-test/SKILL.md +133 -103
- package/.agy/skills/security-audit/SKILL.md +217 -166
- package/.agy/skills/spec-add/SKILL.md +66 -59
- package/.agy/skills/spec-load/SKILL.md +68 -68
- package/.agy/skills/spec-remove/SKILL.md +42 -42
- package/.agy/skills/spec-setup/SKILL.md +38 -41
- package/.claude/commands/learn-follow.md +127 -127
- package/.claude/commands/learn-investigate.md +151 -152
- package/.claude/commands/learn-second-opinion.md +118 -122
- package/.claude/commands/maestro-amend.md +164 -164
- package/.claude/commands/maestro-analyze.md +215 -266
- package/.claude/commands/maestro-blueprint.md +189 -204
- package/.claude/commands/maestro-brainstorm.md +209 -213
- package/.claude/commands/maestro-collab.md +172 -172
- package/.claude/commands/maestro-companion.md +531 -531
- package/.claude/commands/maestro-composer.md +188 -179
- package/.claude/commands/maestro-execute.md +183 -184
- package/.claude/commands/maestro-fork.md +111 -110
- package/.claude/commands/maestro-grill.md +175 -176
- package/.claude/commands/maestro-guard.md +103 -102
- package/.claude/commands/maestro-impeccable.md +311 -268
- package/.claude/commands/maestro-init.md +130 -131
- package/.claude/commands/maestro-merge.md +87 -80
- package/.claude/commands/maestro-milestone-audit.md +4 -10
- package/.claude/commands/maestro-milestone-complete.md +6 -7
- package/.claude/commands/maestro-milestone-release.md +136 -145
- package/.claude/commands/maestro-next.md +253 -257
- package/.claude/commands/maestro-overlay.md +188 -178
- package/.claude/commands/maestro-plan.md +225 -211
- package/.claude/commands/maestro-player.md +182 -182
- package/.claude/commands/maestro-quick.md +83 -77
- package/.claude/commands/maestro-ralph-beta.md +875 -886
- package/.claude/commands/maestro-ralph-execute.md +247 -247
- package/.claude/commands/maestro-ralph.md +2 -36
- package/.claude/commands/maestro-roadmap.md +173 -186
- package/.claude/commands/maestro-swarm-workflow.md +243 -264
- package/.claude/commands/maestro-tools-execute.md +122 -117
- package/.claude/commands/maestro-tools-register.md +162 -157
- package/.claude/commands/maestro-ui-codify.md +117 -100
- package/.claude/commands/maestro-universal-workflow.md +548 -561
- package/.claude/commands/maestro-update.md +122 -119
- package/.claude/commands/maestro.md +2 -10
- package/.claude/commands/manage-codebase-rebuild.md +87 -85
- package/.claude/commands/manage-harvest.md +97 -95
- package/.claude/commands/manage-issue-discover.md +83 -81
- package/.claude/commands/manage-issue.md +72 -73
- package/.claude/commands/manage-kg-extractors.md +128 -0
- package/.claude/commands/manage-knowhow-capture.md +92 -82
- package/.claude/commands/manage-knowhow.md +83 -79
- package/.claude/commands/manage-knowledge-audit.md +105 -88
- package/.claude/commands/manage-status.md +62 -52
- package/.claude/commands/manage-wiki.md +82 -71
- package/.claude/commands/odyssey-debug.md +459 -473
- package/.claude/commands/odyssey-improve.md +491 -505
- package/.claude/commands/odyssey-planex.md +590 -601
- package/.claude/commands/odyssey-review-test-fix.md +414 -427
- package/.claude/commands/odyssey-ui.md +445 -462
- package/.claude/commands/quality-auto-test.md +153 -136
- package/.claude/commands/quality-debug.md +159 -120
- package/.claude/commands/quality-refactor.md +105 -67
- package/.claude/commands/quality-retrospective.md +123 -77
- package/.claude/commands/quality-review.md +155 -128
- package/.claude/commands/quality-sync.md +88 -52
- package/.claude/commands/quality-test.md +147 -117
- package/.claude/commands/security-audit.md +230 -179
- package/.claude/commands/spec-add.md +77 -70
- package/.claude/commands/spec-load.md +78 -78
- package/.claude/commands/spec-remove.md +55 -55
- package/.claude/commands/spec-setup.md +49 -52
- package/dist/src/cli.js +1 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/kg.d.ts.map +1 -1
- package/dist/src/commands/kg.js +11 -5
- package/dist/src/commands/kg.js.map +1 -1
- package/dist/src/graph/kg/extraction/code/code-extractor.d.ts +2 -0
- package/dist/src/graph/kg/extraction/code/code-extractor.d.ts.map +1 -1
- package/dist/src/graph/kg/extraction/code/code-extractor.js +32 -3
- package/dist/src/graph/kg/extraction/code/code-extractor.js.map +1 -1
- package/dist/src/graph/kg/extraction/code/plugin-engine.d.ts +35 -0
- package/dist/src/graph/kg/extraction/code/plugin-engine.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/plugin-engine.js +573 -0
- package/dist/src/graph/kg/extraction/code/plugin-engine.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/plugin-types.d.ts +95 -0
- package/dist/src/graph/kg/extraction/code/plugin-types.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/plugin-types.js +5 -0
- package/dist/src/graph/kg/extraction/code/plugin-types.js.map +1 -0
- package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
- package/dist/src/graph/kg/extraction/orchestrator.js +17 -5
- package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
- package/dist/src/graph/kg/schema.sql +16 -11
- package/dist/src/graph/kg/surface/cli.d.ts.map +1 -1
- package/dist/src/graph/kg/surface/cli.js +153 -56
- package/dist/src/graph/kg/surface/cli.js.map +1 -1
- package/dist/src/hooks/workspace.d.ts +4 -2
- package/dist/src/hooks/workspace.d.ts.map +1 -1
- package/dist/src/hooks/workspace.js +6 -2
- package/dist/src/hooks/workspace.js.map +1 -1
- package/package.json +91 -91
- package/workflows/analyze.md +25 -49
- package/workflows/auto-test.md +699 -699
- package/workflows/blueprint.md +403 -431
- package/workflows/brainstorm.md +54 -195
- package/workflows/business-test.md +570 -570
- package/workflows/claude-instructions.md +23 -51
- package/workflows/codex-instructions.md +27 -77
- package/workflows/coding-philosophy.md +69 -69
- package/workflows/command-authoring.md +823 -823
- package/workflows/debug.md +43 -98
- package/workflows/delegate-usage.md +39 -241
- package/workflows/execute.md +4 -53
- package/workflows/grill.md +12 -56
- package/workflows/harvest.md +22 -68
- package/workflows/init.md +148 -148
- package/workflows/instruction-authoring-guide.md +97 -0
- package/workflows/issue-execute.md +110 -110
- package/workflows/issue-gaps-analyze.codex.md +260 -260
- package/workflows/issue-gaps-analyze.md +216 -216
- package/workflows/issue-plan.md +110 -110
- package/workflows/issue.md +338 -346
- package/workflows/knowhow.md +0 -32
- package/workflows/learn.md +277 -277
- package/workflows/maestro-chain-execute.md +20 -20
- package/workflows/refactor.md +22 -44
- package/workflows/retrospective.md +16 -65
- package/workflows/review.md +446 -486
- package/workflows/roadmap.md +35 -132
- package/workflows/skill-authoring.md +265 -265
- package/workflows/spec-generate.md +470 -470
- package/workflows/specs-remove.md +104 -104
- package/workflows/sync.md +11 -41
- package/workflows/test-gen.md +226 -226
- package/workflows/test.md +385 -475
- package/workflows/ui-design.md +391 -391
- package/workflows/ui-style.md +199 -199
- package/workflows/wiki-connect.md +151 -151
- package/workflows/wiki-digest.md +178 -178
- package/workflows/wiki-manage.md +109 -109
- package/workflows/cli-tools-usage.md +0 -252
- package/workflows/delegate-protocol.codex.md +0 -65
package/workflows/wiki-manage.md
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
# Wiki Manage Workflow
|
|
2
|
-
|
|
3
|
-
Unified wiki knowledge graph management — health monitoring, interactive search, orphan cleanup, and graph statistics.
|
|
4
|
-
|
|
5
|
-
Complements `wiki-connect.md` (link discovery) and `wiki-digest.md` (synthesis) with day-to-day operational tooling.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Prerequisites
|
|
10
|
-
|
|
11
|
-
- `.workflow/` initialized
|
|
12
|
-
- Wiki entries exist
|
|
13
|
-
- `maestro wiki` CLI available
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Argument Shape
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
/manage-wiki → health dashboard (default)
|
|
21
|
-
/manage-wiki health → health dashboard
|
|
22
|
-
/manage-wiki search auth → search for "auth" with follow-up actions
|
|
23
|
-
/manage-wiki cleanup → find orphans, broken links, stale entries
|
|
24
|
-
/manage-wiki cleanup --fix → auto-fix issues
|
|
25
|
-
/manage-wiki stats → graph statistics
|
|
26
|
-
/manage-wiki stats --type spec → spec-only statistics
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
| Flag | Effect |
|
|
30
|
-
|------|--------|
|
|
31
|
-
| `--type <type>` | Filter: spec, knowhow, note, issue |
|
|
32
|
-
| `--fix` | Auto-fix issues during cleanup |
|
|
33
|
-
| `--json` | JSON output |
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Subcommand: health (default)
|
|
38
|
-
|
|
39
|
-
### Step 1: Gather Data
|
|
40
|
-
|
|
41
|
-
Run in parallel: `maestro wiki health`, `list --json`, `orphans`, `hubs --top 5`.
|
|
42
|
-
|
|
43
|
-
### Step 2: Render Dashboard
|
|
44
|
-
|
|
45
|
-
Display: health score, entry counts by type, broken links, orphan count, top hubs. Include health status message and quick-action commands (`/wiki-connect --fix`, `/wiki-digest`, `/manage-wiki cleanup --fix`, `maestro wiki graph`).
|
|
46
|
-
|
|
47
|
-
> **Scope split (complementary, not conflicting):** `/wiki-connect --fix` repairs/augments `related` links between existing entries (no deletion). `/manage-wiki cleanup --fix` deletes/flags orphans and removes broken-link entries from frontmatter. Run `wiki-connect` first to maximize link recovery, then `cleanup` to handle the true residual orphans.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Subcommand: search <query>
|
|
52
|
-
|
|
53
|
-
### Step 1: Execute Search
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
maestro wiki search "<query>" --json
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Step 2: Display Results
|
|
60
|
-
|
|
61
|
-
Show table of results (ID, type, title, tags) with action hints: `maestro wiki get <id>`, `backlinks <id>`, `/learn-follow <id>`, `/wiki-connect --scope <type>`.
|
|
62
|
-
|
|
63
|
-
### Step 3: Interactive Follow-up
|
|
64
|
-
|
|
65
|
-
If not `--json`: offer to view an entry by number selection.
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Subcommand: cleanup
|
|
70
|
-
|
|
71
|
-
### Step 1: Scan Issues
|
|
72
|
-
|
|
73
|
-
Gather baseline via `maestro wiki health`, `orphans --json`, `graph`.
|
|
74
|
-
|
|
75
|
-
### Step 2: Categorize Issues
|
|
76
|
-
|
|
77
|
-
| Issue Type | Detection | Auto-fix Action |
|
|
78
|
-
|-----------|-----------|----------------|
|
|
79
|
-
| Broken links | Forward link target doesn't exist | Remove broken link from frontmatter |
|
|
80
|
-
| Orphans | No in/out links | Suggest connections via BM25 title match |
|
|
81
|
-
| Stale entries | No updates in 90+ days, status=draft | Flag for review |
|
|
82
|
-
| Empty body | Entry exists but body is empty/placeholder | Flag for review |
|
|
83
|
-
|
|
84
|
-
### Step 3: Display Issues
|
|
85
|
-
|
|
86
|
-
Show baseline health, issue counts by type, and entry-level details.
|
|
87
|
-
|
|
88
|
-
### Step 4: Apply Fixes (--fix only)
|
|
89
|
-
|
|
90
|
-
Broken links: remove from frontmatter via `maestro wiki update`. Orphans: mini wiki-connect (BM25 + tag match). Stale/empty: flag only (no auto-delete).
|
|
91
|
-
|
|
92
|
-
Report: fixed count, remaining count, health delta.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Subcommand: stats
|
|
97
|
-
|
|
98
|
-
### Step 1: Gather Data
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
maestro wiki list --json
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Step 2: Compute & Display Statistics
|
|
105
|
-
|
|
106
|
-
Compute: type distribution (count/%), top 20 tags, category distribution (specs), connectivity (avg in/out-degree, max hub), growth (entries/week).
|
|
107
|
-
|
|
108
|
-
Display as bar charts and summary tables.
|
|
109
|
-
|
|
1
|
+
# Wiki Manage Workflow
|
|
2
|
+
|
|
3
|
+
Unified wiki knowledge graph management — health monitoring, interactive search, orphan cleanup, and graph statistics.
|
|
4
|
+
|
|
5
|
+
Complements `wiki-connect.md` (link discovery) and `wiki-digest.md` (synthesis) with day-to-day operational tooling.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- `.workflow/` initialized
|
|
12
|
+
- Wiki entries exist
|
|
13
|
+
- `maestro wiki` CLI available
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Argument Shape
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/manage-wiki → health dashboard (default)
|
|
21
|
+
/manage-wiki health → health dashboard
|
|
22
|
+
/manage-wiki search auth → search for "auth" with follow-up actions
|
|
23
|
+
/manage-wiki cleanup → find orphans, broken links, stale entries
|
|
24
|
+
/manage-wiki cleanup --fix → auto-fix issues
|
|
25
|
+
/manage-wiki stats → graph statistics
|
|
26
|
+
/manage-wiki stats --type spec → spec-only statistics
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Flag | Effect |
|
|
30
|
+
|------|--------|
|
|
31
|
+
| `--type <type>` | Filter: spec, knowhow, note, issue |
|
|
32
|
+
| `--fix` | Auto-fix issues during cleanup |
|
|
33
|
+
| `--json` | JSON output |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Subcommand: health (default)
|
|
38
|
+
|
|
39
|
+
### Step 1: Gather Data
|
|
40
|
+
|
|
41
|
+
Run in parallel: `maestro wiki health`, `list --json`, `orphans`, `hubs --top 5`.
|
|
42
|
+
|
|
43
|
+
### Step 2: Render Dashboard
|
|
44
|
+
|
|
45
|
+
Display: health score, entry counts by type, broken links, orphan count, top hubs. Include health status message and quick-action commands (`/wiki-connect --fix`, `/wiki-digest`, `/manage-wiki cleanup --fix`, `maestro wiki graph`).
|
|
46
|
+
|
|
47
|
+
> **Scope split (complementary, not conflicting):** `/wiki-connect --fix` repairs/augments `related` links between existing entries (no deletion). `/manage-wiki cleanup --fix` deletes/flags orphans and removes broken-link entries from frontmatter. Run `wiki-connect` first to maximize link recovery, then `cleanup` to handle the true residual orphans.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Subcommand: search <query>
|
|
52
|
+
|
|
53
|
+
### Step 1: Execute Search
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
maestro wiki search "<query>" --json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 2: Display Results
|
|
60
|
+
|
|
61
|
+
Show table of results (ID, type, title, tags) with action hints: `maestro wiki get <id>`, `backlinks <id>`, `/learn-follow <id>`, `/wiki-connect --scope <type>`.
|
|
62
|
+
|
|
63
|
+
### Step 3: Interactive Follow-up
|
|
64
|
+
|
|
65
|
+
If not `--json`: offer to view an entry by number selection.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Subcommand: cleanup
|
|
70
|
+
|
|
71
|
+
### Step 1: Scan Issues
|
|
72
|
+
|
|
73
|
+
Gather baseline via `maestro wiki health`, `orphans --json`, `graph`.
|
|
74
|
+
|
|
75
|
+
### Step 2: Categorize Issues
|
|
76
|
+
|
|
77
|
+
| Issue Type | Detection | Auto-fix Action |
|
|
78
|
+
|-----------|-----------|----------------|
|
|
79
|
+
| Broken links | Forward link target doesn't exist | Remove broken link from frontmatter |
|
|
80
|
+
| Orphans | No in/out links | Suggest connections via BM25 title match |
|
|
81
|
+
| Stale entries | No updates in 90+ days, status=draft | Flag for review |
|
|
82
|
+
| Empty body | Entry exists but body is empty/placeholder | Flag for review |
|
|
83
|
+
|
|
84
|
+
### Step 3: Display Issues
|
|
85
|
+
|
|
86
|
+
Show baseline health, issue counts by type, and entry-level details.
|
|
87
|
+
|
|
88
|
+
### Step 4: Apply Fixes (--fix only)
|
|
89
|
+
|
|
90
|
+
Broken links: remove from frontmatter via `maestro wiki update`. Orphans: mini wiki-connect (BM25 + tag match). Stale/empty: flag only (no auto-delete).
|
|
91
|
+
|
|
92
|
+
Report: fixed count, remaining count, health delta.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Subcommand: stats
|
|
97
|
+
|
|
98
|
+
### Step 1: Gather Data
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
maestro wiki list --json
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 2: Compute & Display Statistics
|
|
105
|
+
|
|
106
|
+
Compute: type distribution (count/%), top 20 tags, category distribution (specs), connectivity (avg in/out-degree, max hub), growth (entries/week).
|
|
107
|
+
|
|
108
|
+
Display as bar charts and summary tables.
|
|
109
|
+
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
# Delegate Execution Specification
|
|
2
|
-
|
|
3
|
-
<purpose>
|
|
4
|
-
Unified reference for `maestro delegate` — synchronous task delegation with broker-managed lifecycle, message injection, and MCP notifications.
|
|
5
|
-
</purpose>
|
|
6
|
-
|
|
7
|
-
**References**: `~/.maestro/cli-tools.json` (tool config), `~/.maestro/templates/cli/` (protocol + prompt templates)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## 1. Quick Reference
|
|
12
|
-
|
|
13
|
-
<context>
|
|
14
|
-
|
|
15
|
-
### Command Syntax
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
maestro delegate "<PROMPT>" [options]
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Options
|
|
22
|
-
|
|
23
|
-
| Option | Description | Default |
|
|
24
|
-
|--------|-------------|---------|
|
|
25
|
-
| `--to <tool>` | Explicit tool: gemini, qwen, codex, claude, opencode | First enabled in config |
|
|
26
|
-
| `--role <role>` | Capability role: analyze, explore, review, implement, plan, brainstorm, research | — (resolves via config) |
|
|
27
|
-
| `--mode <mode>` | `analysis` (read-only) or `write` (create/modify/delete) | `analysis` |
|
|
28
|
-
| `--model <model>` | Model override | Tool's `primaryModel` |
|
|
29
|
-
| `--cd <dir>` | Working directory | Current directory |
|
|
30
|
-
| `--includeDirs <dirs>` | Additional directories (comma-separated) | — |
|
|
31
|
-
| `--rule <template>` | Load protocol + prompt template | — (optional) |
|
|
32
|
-
| `--id <id>` | Execution ID | Auto: `{prefix}-{HHmmss}-{rand4}` |
|
|
33
|
-
| `--resume [id]` | Resume session (last if no id, comma-separated for merge) | — |
|
|
34
|
-
| `--backend <type>` | Adapter backend: `direct` or `terminal` (tmux/wezterm) | `direct` |
|
|
35
|
-
|
|
36
|
-
### Tool Resolution Priority
|
|
37
|
-
|
|
38
|
-
1. `--to <tool>` — explicit tool selection (highest priority)
|
|
39
|
-
2. `--role <role>` — capability-based auto-selection via config
|
|
40
|
-
3. No flag — first enabled tool in config
|
|
41
|
-
|
|
42
|
-
### Caller Decision Rule
|
|
43
|
-
|
|
44
|
-
- **User names a tool** (e.g. "用 gemini 分析", "ask codex") → **must use `--to <tool>`**
|
|
45
|
-
- **User names a capability** (e.g. "分析一下", "review this") → use `--role <role>` or omit
|
|
46
|
-
- **Never use `--role` when user has explicitly named a tool** — `--role` may route to a different tool
|
|
47
|
-
|
|
48
|
-
### Role-Based Tool Selection
|
|
49
|
-
|
|
50
|
-
Roles map to tools via `cli-tools.json` configuration:
|
|
51
|
-
- User-defined roles in `roles` section override built-in defaults
|
|
52
|
-
- Workspace `.maestro/cli-tools.json` overrides global `~/.maestro/cli-tools.json`
|
|
53
|
-
- Built-in roles: `analyze`, `explore`, `review`, `implement`, `plan`, `brainstorm`, `research`
|
|
54
|
-
|
|
55
|
-
### Mode Definition (Authoritative)
|
|
56
|
-
|
|
57
|
-
| Mode | Permission | Auto-Invoke Safe | Use For |
|
|
58
|
-
|------|-----------|------------------|---------|
|
|
59
|
-
| `analysis` | Read-only | Yes | Review, exploration, diagnosis, architecture analysis |
|
|
60
|
-
| `write` | Create/Modify/Delete | No — requires explicit intent | Implementation, bug fixes, refactoring |
|
|
61
|
-
|
|
62
|
-
> `--mode` is the **authoritative** permission control. The `MODE:` field inside prompt text is a hint for the agent — both should be consistent, but `--mode` governs actual behavior.
|
|
63
|
-
</context>
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## 2. Configuration
|
|
68
|
-
|
|
69
|
-
<context>
|
|
70
|
-
|
|
71
|
-
### Config File: `~/.maestro/cli-tools.json`
|
|
72
|
-
|
|
73
|
-
| Field | Description |
|
|
74
|
-
|-------|-------------|
|
|
75
|
-
| `enabled` | Tool availability |
|
|
76
|
-
| `primaryModel` | Default model |
|
|
77
|
-
| `secondaryModel` | Fallback model |
|
|
78
|
-
| `tags` | Capability tags (for caller-side routing) |
|
|
79
|
-
| `type` | `builtin` / `cli-wrapper` / `api-endpoint` |
|
|
80
|
-
|
|
81
|
-
> `api-endpoint` tools support **analysis only** — no file write capability.
|
|
82
|
-
|
|
83
|
-
### Supported Tools
|
|
84
|
-
|
|
85
|
-
| Tool | Agent Type | Adapter |
|
|
86
|
-
|------|-----------|---------|
|
|
87
|
-
| `gemini` | gemini | StreamJsonAdapter |
|
|
88
|
-
| `qwen` | qwen | StreamJsonAdapter |
|
|
89
|
-
| `codex` | codex | CodexCliAdapter |
|
|
90
|
-
| `claude` | claude-code | ClaudeCodeAdapter |
|
|
91
|
-
| `opencode` | opencode | OpenCodeAdapter |
|
|
92
|
-
|
|
93
|
-
### Tool Selection
|
|
94
|
-
|
|
95
|
-
1. Explicit `--to` specified → use it (validate enabled)
|
|
96
|
-
2. No `--to` → first enabled tool in config order
|
|
97
|
-
|
|
98
|
-
### Fallback Chain
|
|
99
|
-
|
|
100
|
-
Primary model fails → `secondaryModel` → next enabled tool → first enabled (default).
|
|
101
|
-
</context>
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## 3. Prompt Construction
|
|
106
|
-
|
|
107
|
-
<context>
|
|
108
|
-
|
|
109
|
-
### Assembly Order
|
|
110
|
-
|
|
111
|
-
`maestro delegate` builds the final prompt as:
|
|
112
|
-
|
|
113
|
-
1. **Mode protocol** — `~/.maestro/templates/cli/protocols/{mode}-protocol.md`
|
|
114
|
-
2. **User prompt** — the positional `"<PROMPT>"` value
|
|
115
|
-
3. **Rule template** — `~/.maestro/templates/cli/prompts/{rule}.txt` (if `--rule` specified)
|
|
116
|
-
|
|
117
|
-
### Prompt Template (6 Fields)
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
PURPOSE: [goal] + [why] + [success criteria]
|
|
121
|
-
TASK: [step 1] | [step 2] | [step 3]
|
|
122
|
-
MODE: analysis|write
|
|
123
|
-
CONTEXT: @[file patterns] | Memory: [prior work context]
|
|
124
|
-
EXPECTED: [output format] + [quality criteria]
|
|
125
|
-
CONSTRAINTS: [scope limits] | [special requirements]
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
- **PURPOSE**: What + Why + Success. Not "Analyze code" but "Identify auth vulnerabilities; success = OWASP Top 10 covered"
|
|
129
|
-
- **TASK**: Specific verbs. Not "Review code" but "Scan for SQL injection | Check XSS | Verify CSRF"
|
|
130
|
-
- **MODE**: Must match `--mode` flag
|
|
131
|
-
- **CONTEXT**: File scope + memory from prior work
|
|
132
|
-
- **EXPECTED**: Deliverable format, not just "Report"
|
|
133
|
-
- **CONSTRAINTS**: Task-specific limits (vs `--rule` which loads generic templates)
|
|
134
|
-
|
|
135
|
-
### CONTEXT: File Patterns + Directory
|
|
136
|
-
|
|
137
|
-
- `@**/*` — all files in working directory (default)
|
|
138
|
-
- `@src/**/*.ts` — scoped pattern
|
|
139
|
-
- `@../shared/**/*` — sibling directory (**requires `--includeDirs`**)
|
|
140
|
-
|
|
141
|
-
**Rule**: If CONTEXT uses `@../dir/**/*`, must add `--includeDirs ../dir`.
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
# Cross-directory example
|
|
145
|
-
maestro delegate "CONTEXT: @**/* @../shared/**/*" --to gemini --mode analysis \
|
|
146
|
-
--cd "src/auth" --includeDirs "../shared"
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### CONTEXT: Memory
|
|
150
|
-
|
|
151
|
-
Include when building on previous work:
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
Memory: Building on auth refactoring (commit abc123), implementing refresh tokens
|
|
155
|
-
Memory: Integration with auth module, using shared error patterns
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### --rule Templates
|
|
159
|
-
|
|
160
|
-
**Universal**: `universal-rigorous-style`, `universal-creative-style`
|
|
161
|
-
|
|
162
|
-
**Analysis**: `analysis-trace-code-execution`, `analysis-diagnose-bug-root-cause`, `analysis-analyze-code-patterns`, `analysis-analyze-technical-document`, `analysis-review-architecture`, `analysis-review-code-quality`, `analysis-analyze-performance`, `analysis-assess-security-risks`
|
|
163
|
-
|
|
164
|
-
**Planning**: `planning-plan-architecture-design`, `planning-breakdown-task-steps`, `planning-design-component-spec`, `planning-plan-migration-strategy`
|
|
165
|
-
|
|
166
|
-
**Development**: `development-implement-feature`, `development-refactor-codebase`, `development-generate-tests`, `development-implement-component-ui`, `development-debug-runtime-issues`
|
|
167
|
-
|
|
168
|
-
### Complete Example
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
maestro delegate "PURPOSE: Identify OWASP Top 10 vulnerabilities in auth module; success = all critical/high documented with remediation
|
|
172
|
-
TASK: Scan for injection flaws | Check auth bypass vectors | Evaluate session management | Assess data exposure
|
|
173
|
-
MODE: analysis
|
|
174
|
-
CONTEXT: @src/auth/**/* @src/middleware/auth.ts | Memory: Using bcrypt + JWT
|
|
175
|
-
EXPECTED: Severity matrix, file:line references, remediation snippets, priority ranking
|
|
176
|
-
CONSTRAINTS: Focus on authentication | Ignore test files
|
|
177
|
-
" --to gemini --mode analysis --rule analysis-assess-security-risks --cd "src/auth"
|
|
178
|
-
```
|
|
179
|
-
</context>
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## 4. Execution
|
|
184
|
-
|
|
185
|
-
<execution>
|
|
186
|
-
|
|
187
|
-
### Calling Convention
|
|
188
|
-
|
|
189
|
-
`maestro delegate` runs synchronously. Status summary and output are **auto-appended** on completion — no manual `output` or `status` commands needed.
|
|
190
|
-
|
|
191
|
-
**Always** use `run_in_background: true` and **end your response immediately**:
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
Bash({ command: "maestro delegate \"...\" --to gemini --mode analysis", run_in_background: true })
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
When the background callback arrives, the result is already included:
|
|
198
|
-
```
|
|
199
|
-
[MAESTRO_EXEC_ID=gem-143022-a7f2] , at start
|
|
200
|
-
[DELEGATE COMPLETED] gem-143022-a7f2 gemini/analysis ← status, on completion
|
|
201
|
-
--- Output ---
|
|
202
|
-
<actual output content> ← output, on completion
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**Rules:**
|
|
206
|
-
- NEVER use foreground Bash for delegate calls
|
|
207
|
-
- NEVER output text or tool calls after the `run_in_background` Bash call
|
|
208
|
-
- When the callback arrives, output is already included — directly use it
|
|
209
|
-
|
|
210
|
-
### Execution ID
|
|
211
|
-
|
|
212
|
-
ID prefix: gemini→`gem`, qwen→`qwn`, codex→`cdx`, claude→`cld`, opencode→`opc`
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
maestro delegate "<PROMPT>" --to gemini --mode analysis # auto-ID: gem-143022-a7f2
|
|
216
|
-
maestro delegate "<PROMPT>" --to gemini --mode write --id my-task-1 # custom ID
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Session Resume
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
maestro delegate "<PROMPT>" --to gemini --resume # last session
|
|
223
|
-
maestro delegate "<PROMPT>" --to gemini --mode write --resume <id> # specific
|
|
224
|
-
maestro delegate "<PROMPT>" --to gemini --resume <id1>,<id2> # merge multiple
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
Resume auto-assembles previous conversation context. Warning emitted when context exceeds 32KB.
|
|
228
|
-
</execution>
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## 5. Auto-Invoke Triggers
|
|
233
|
-
|
|
234
|
-
<execution>
|
|
235
|
-
|
|
236
|
-
Proactively invoke `maestro delegate` when these conditions are met — no user confirmation needed for `analysis` mode:
|
|
237
|
-
|
|
238
|
-
| Trigger | Suggested Rule |
|
|
239
|
-
|---------|---------------|
|
|
240
|
-
| Self-repair fails (1+ attempts) | `analysis-diagnose-bug-root-cause` |
|
|
241
|
-
| Ambiguous requirements | `planning-breakdown-task-steps` |
|
|
242
|
-
| Architecture decisions needed | `planning-plan-architecture-design` |
|
|
243
|
-
| Pattern uncertainty | `analysis-analyze-code-patterns` |
|
|
244
|
-
| Critical/security code paths | `analysis-assess-security-risks` |
|
|
245
|
-
|
|
246
|
-
### Principles
|
|
247
|
-
|
|
248
|
-
- Default `--mode analysis` (safe, read-only)
|
|
249
|
-
- Wait for results before next action
|
|
250
|
-
- User named a tool → `--to <tool>`; user didn't → `--role` or omit (see Caller Decision Rule)
|
|
251
|
-
- Rule suggestions are guidelines — choose the best fit
|
|
252
|
-
</execution>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Maestro Delegate Execution Protocol (Codex)
|
|
2
|
-
|
|
3
|
-
`maestro delegate` is a long-running shell command (30s–5min+). All Codex agents MUST follow this polling protocol when executing delegate calls.
|
|
4
|
-
|
|
5
|
-
## Execution Steps
|
|
6
|
-
|
|
7
|
-
### Step 1: Start Delegate
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
exec_command({
|
|
11
|
-
cmd: `maestro delegate "<PROMPT>" [options]`,
|
|
12
|
-
yield_time_ms: 30000,
|
|
13
|
-
max_output_tokens: 6000
|
|
14
|
-
})
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
- `yield_time_ms: 30000` — wait up to 30s for initial output
|
|
18
|
-
- If the command completes within yield time → result is final, proceed to Step 3
|
|
19
|
-
|
|
20
|
-
### Step 2: Poll Loop (if session_id returned)
|
|
21
|
-
|
|
22
|
-
If `exec_command` returns `{ session_id: N, ... }` (command still running), enter poll loop:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
poll_interval = 15000 // start at 15s
|
|
26
|
-
|
|
27
|
-
LOOP:
|
|
28
|
-
result = write_stdin({
|
|
29
|
-
session_id: <session_id>,
|
|
30
|
-
chars: "",
|
|
31
|
-
yield_time_ms: poll_interval,
|
|
32
|
-
max_output_tokens: 6000
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
IF result indicates command completed → BREAK, proceed to Step 3
|
|
36
|
-
IF result indicates command still running:
|
|
37
|
-
poll_interval = min(poll_interval * 2, 60000) // backoff: 15s → 30s → 60s cap
|
|
38
|
-
GOTO LOOP
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Step 3: Parse Result
|
|
42
|
-
|
|
43
|
-
Extract the delegate output (assistant response) from the final result. Parse according to the caller's expected format (JSON, structured text, etc.).
|
|
44
|
-
|
|
45
|
-
## Invariants
|
|
46
|
-
|
|
47
|
-
| Rule | Description |
|
|
48
|
-
|------|-------------|
|
|
49
|
-
| **NEVER skip polling** | Delegate output is required for workflow continuation. If session_id is returned, you MUST poll until completion. |
|
|
50
|
-
| **NEVER abandon session** | Do not move to next workflow step while delegate is still running. |
|
|
51
|
-
| **NEVER fire-and-forget** | Every delegate call must be awaited and its result consumed. |
|
|
52
|
-
| **Increasing backoff** | Poll intervals: 15s → 30s → 60s (capped). Prevents unnecessary load. |
|
|
53
|
-
| **Error still completes** | If output contains error/failed, still finish reading the full output before handling the error. |
|
|
54
|
-
| **Timeout escalation** | If polling exceeds 5 minutes total, report as blocker but do NOT abandon — continue polling. |
|
|
55
|
-
|
|
56
|
-
## Quick Reference
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
// Compact pattern for inline use:
|
|
60
|
-
//
|
|
61
|
-
// 1. exec_command({ cmd: `maestro delegate "..."`, yield_time_ms: 30000 })
|
|
62
|
-
// 2. If session_id → poll write_stdin({ session_id, chars: "", yield_time_ms: 15000→60000 })
|
|
63
|
-
// 3. Parse result after completion
|
|
64
|
-
// ⚠️ MUST poll until completion — NEVER skip
|
|
65
|
-
```
|