maestro-flow-one 0.1.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.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +173 -0
  3. package/bin/maestro-flow.js +730 -0
  4. package/claude/maestro-flow/SKILL.md +239 -0
  5. package/claude/maestro-flow/chains/templates.json +256 -0
  6. package/claude/maestro-flow/commands/learn/decompose.md +176 -0
  7. package/claude/maestro-flow/commands/learn/follow.md +167 -0
  8. package/claude/maestro-flow/commands/learn/investigate.md +221 -0
  9. package/claude/maestro-flow/commands/learn/retro.md +303 -0
  10. package/claude/maestro-flow/commands/learn/second-opinion.md +167 -0
  11. package/claude/maestro-flow/commands/lifecycle/amend.md +300 -0
  12. package/claude/maestro-flow/commands/lifecycle/analyze.md +126 -0
  13. package/claude/maestro-flow/commands/lifecycle/brainstorm.md +100 -0
  14. package/claude/maestro-flow/commands/lifecycle/composer.md +354 -0
  15. package/claude/maestro-flow/commands/lifecycle/execute.md +114 -0
  16. package/claude/maestro-flow/commands/lifecycle/fork.md +86 -0
  17. package/claude/maestro-flow/commands/lifecycle/init.md +78 -0
  18. package/claude/maestro-flow/commands/lifecycle/learn.md +140 -0
  19. package/claude/maestro-flow/commands/lifecycle/link-coordinate.md +71 -0
  20. package/claude/maestro-flow/commands/lifecycle/merge.md +61 -0
  21. package/claude/maestro-flow/commands/lifecycle/overlay.md +178 -0
  22. package/claude/maestro-flow/commands/lifecycle/plan.md +138 -0
  23. package/claude/maestro-flow/commands/lifecycle/player.md +404 -0
  24. package/claude/maestro-flow/commands/lifecycle/quick.md +56 -0
  25. package/claude/maestro-flow/commands/lifecycle/roadmap.md +164 -0
  26. package/claude/maestro-flow/commands/lifecycle/ui-design.md +93 -0
  27. package/claude/maestro-flow/commands/lifecycle/update.md +176 -0
  28. package/claude/maestro-flow/commands/lifecycle/verify.md +90 -0
  29. package/claude/maestro-flow/commands/manage/codebase-rebuild.md +75 -0
  30. package/claude/maestro-flow/commands/manage/codebase-refresh.md +57 -0
  31. package/claude/maestro-flow/commands/manage/harvest.md +94 -0
  32. package/claude/maestro-flow/commands/manage/issue-discover.md +77 -0
  33. package/claude/maestro-flow/commands/manage/issue.md +73 -0
  34. package/claude/maestro-flow/commands/manage/knowhow-capture.md +193 -0
  35. package/claude/maestro-flow/commands/manage/knowhow.md +77 -0
  36. package/claude/maestro-flow/commands/manage/learn.md +67 -0
  37. package/claude/maestro-flow/commands/manage/status.md +51 -0
  38. package/claude/maestro-flow/commands/manage/wiki.md +62 -0
  39. package/claude/maestro-flow/commands/milestone/audit.md +68 -0
  40. package/claude/maestro-flow/commands/milestone/complete.md +75 -0
  41. package/claude/maestro-flow/commands/milestone/release.md +96 -0
  42. package/claude/maestro-flow/commands/quality/auto-test.md +124 -0
  43. package/claude/maestro-flow/commands/quality/debug.md +115 -0
  44. package/claude/maestro-flow/commands/quality/refactor.md +55 -0
  45. package/claude/maestro-flow/commands/quality/retrospective.md +78 -0
  46. package/claude/maestro-flow/commands/quality/review.md +108 -0
  47. package/claude/maestro-flow/commands/quality/sync.md +51 -0
  48. package/claude/maestro-flow/commands/quality/test.md +103 -0
  49. package/claude/maestro-flow/commands/spec/add.md +49 -0
  50. package/claude/maestro-flow/commands/spec/load.md +51 -0
  51. package/claude/maestro-flow/commands/spec/remove.md +51 -0
  52. package/claude/maestro-flow/commands/spec/setup.md +51 -0
  53. package/claude/maestro-flow/commands/wiki/connect.md +62 -0
  54. package/claude/maestro-flow/commands/wiki/digest.md +69 -0
  55. package/codex/maestro-flow/SKILL.md +505 -0
  56. package/codex/maestro-flow/chains/templates.json +256 -0
  57. package/codex/maestro-flow/commands/learn/decompose.md +113 -0
  58. package/codex/maestro-flow/commands/learn/follow.md +83 -0
  59. package/codex/maestro-flow/commands/learn/investigate.md +83 -0
  60. package/codex/maestro-flow/commands/learn/retro.md +83 -0
  61. package/codex/maestro-flow/commands/learn/second-opinion.md +86 -0
  62. package/codex/maestro-flow/commands/lifecycle/amend.md +300 -0
  63. package/codex/maestro-flow/commands/lifecycle/analyze.md +483 -0
  64. package/codex/maestro-flow/commands/lifecycle/brainstorm.md +397 -0
  65. package/codex/maestro-flow/commands/lifecycle/composer.md +213 -0
  66. package/codex/maestro-flow/commands/lifecycle/execute.md +318 -0
  67. package/codex/maestro-flow/commands/lifecycle/fork.md +98 -0
  68. package/codex/maestro-flow/commands/lifecycle/init.md +134 -0
  69. package/codex/maestro-flow/commands/lifecycle/learn.md +80 -0
  70. package/codex/maestro-flow/commands/lifecycle/link-coordinate.md +257 -0
  71. package/codex/maestro-flow/commands/lifecycle/merge.md +69 -0
  72. package/codex/maestro-flow/commands/lifecycle/overlay.md +119 -0
  73. package/codex/maestro-flow/commands/lifecycle/plan.md +460 -0
  74. package/codex/maestro-flow/commands/lifecycle/player.md +323 -0
  75. package/codex/maestro-flow/commands/lifecycle/quick.md +124 -0
  76. package/codex/maestro-flow/commands/lifecycle/roadmap.md +468 -0
  77. package/codex/maestro-flow/commands/lifecycle/ui-design.md +135 -0
  78. package/codex/maestro-flow/commands/lifecycle/update.md +176 -0
  79. package/codex/maestro-flow/commands/lifecycle/verify.md +468 -0
  80. package/codex/maestro-flow/commands/manage/codebase-rebuild.md +347 -0
  81. package/codex/maestro-flow/commands/manage/codebase-refresh.md +66 -0
  82. package/codex/maestro-flow/commands/manage/harvest.md +91 -0
  83. package/codex/maestro-flow/commands/manage/issue-discover.md +431 -0
  84. package/codex/maestro-flow/commands/manage/issue.md +75 -0
  85. package/codex/maestro-flow/commands/manage/knowhow-capture.md +110 -0
  86. package/codex/maestro-flow/commands/manage/knowhow.md +95 -0
  87. package/codex/maestro-flow/commands/manage/learn.md +137 -0
  88. package/codex/maestro-flow/commands/manage/status.md +76 -0
  89. package/codex/maestro-flow/commands/manage/wiki.md +55 -0
  90. package/codex/maestro-flow/commands/milestone/audit.md +87 -0
  91. package/codex/maestro-flow/commands/milestone/complete.md +91 -0
  92. package/codex/maestro-flow/commands/milestone/release.md +70 -0
  93. package/codex/maestro-flow/commands/quality/auto-test.md +547 -0
  94. package/codex/maestro-flow/commands/quality/debug.md +334 -0
  95. package/codex/maestro-flow/commands/quality/refactor.md +151 -0
  96. package/codex/maestro-flow/commands/quality/retrospective.md +292 -0
  97. package/codex/maestro-flow/commands/quality/review.md +364 -0
  98. package/codex/maestro-flow/commands/quality/sync.md +111 -0
  99. package/codex/maestro-flow/commands/quality/test.md +498 -0
  100. package/codex/maestro-flow/commands/spec/add.md +101 -0
  101. package/codex/maestro-flow/commands/spec/load.md +77 -0
  102. package/codex/maestro-flow/commands/spec/remove.md +69 -0
  103. package/codex/maestro-flow/commands/spec/setup.md +75 -0
  104. package/codex/maestro-flow/commands/wiki/connect.md +73 -0
  105. package/codex/maestro-flow/commands/wiki/digest.md +87 -0
  106. package/package.json +24 -0
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: manage-knowhow
3
+ description: Manage knowhow entries across workflow and system stores (list, search, view, edit, delete, prune)
4
+ argument-hint: "[list|search|view|edit|delete|prune] [query|id|file] [--store workflow|system|all] [--tag tag] [--type type]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Manage knowhow entries across workflow and system stores. Provides list, search, view, edit, delete, and prune operations over `.workflow/knowhow/` (workflow store) and `~/.claude/projects/{project}/memory/` (system store).
10
+ </purpose>
11
+
12
+ <context>
13
+ $ARGUMENTS — subcommand followed by options. Defaults to `list` if no arguments.
14
+
15
+ ```bash
16
+ $manage-knowhow
17
+ $manage-knowhow "list --store workflow"
18
+ $manage-knowhow "search authentication"
19
+ $manage-knowhow "view KNW-20260318-001"
20
+ $manage-knowhow "edit MEMORY.md"
21
+ $manage-knowhow "delete TIP-20260318-001 --confirm"
22
+ $manage-knowhow "prune --before 2026-01-01 --type tip --dry-run"
23
+ ```
24
+
25
+ **Subcommands**: `list`, `search`, `view`, `edit`, `delete`, `prune`.
26
+
27
+ **Flags**:
28
+ - `--store workflow|system|all` — Target store (default: all)
29
+ - `--tag <tag>` — Filter by tag
30
+ - `--type <session|tip|template|recipe|reference|decision>` — Filter by knowhow type
31
+ - `--confirm` — Skip delete confirmation prompt
32
+ - `--before <date>` / `--after <date>` — Date filters for prune
33
+ - `--dry-run` — Preview prune without deleting
34
+ </context>
35
+
36
+ <execution>
37
+
38
+ ### Step 1: Resolve Store Paths
39
+
40
+ - **Workflow store**: `.workflow/knowhow/` (entries: `KNW-*.md`, `TIP-*.md`, `TPL-*.md`, `RCP-*.md`, `REF-*.md`, `DCS-*.md`, indexed in `.workflow/wiki-index.json`)
41
+ - **System store**: `~/.claude/projects/{project}/memory/` (files: `MEMORY.md` + topic `.md` files)
42
+
43
+ Derive system path from project root (replace path separators with `--`, prefix drive letter).
44
+
45
+ ### Step 2: Parse Subcommand
46
+
47
+ Default to `list` if no arguments. Parse first token as subcommand.
48
+
49
+ ### Step 3: Execute Subcommand
50
+
51
+ **list**: Show entries from both stores (or filtered by `--store`, `--tag`, `--type`).
52
+ - Workflow: use `maestro wiki list --type knowhow --json` or read `.workflow/wiki-index.json`, display ID, type, category, date, tags, title
53
+ - System: list `.md` files in system memory directory
54
+
55
+ **search `<query>`**: Full-text grep across both stores. Rank by match count.
56
+
57
+ **view `<id|file>`**: Auto-detect store from format (`KNW-*/TIP-*/TPL-*/RCP-*/REF-*/DCS-*` = workflow, else system). Display full content.
58
+
59
+ **edit `<file>`**: Edit a system memory file. Read current content, apply changes. Warn if MEMORY.md exceeds 200 lines (W003).
60
+
61
+ **delete `<id|file>`**: Require confirmation (or `--confirm` flag). MEMORY.md cannot be deleted (E004). Remove entry file (WikiIndexer auto-updates `.workflow/wiki-index.json` on next access).
62
+
63
+ **prune**: Requires at least one filter (`--tag`, `--type`, `--before`, `--after`). Workflow store only. `--dry-run` previews without deleting.
64
+
65
+ ### Step 4: Integrity Check
66
+
67
+ After write operations, verify:
68
+ - No orphaned files without index entries (W001)
69
+ - No dangling index references to missing files (W001)
70
+ - System MEMORY.md references valid topic files (W002)
71
+ </execution>
72
+
73
+ <error_codes>
74
+ | Code | Severity | Description |
75
+ |------|----------|-------------|
76
+ | E001 | error | No stores found — run `Skill({ skill: "maestro-flow", args: "--cmd manage-knowhow-capture" })` or create MEMORY.md |
77
+ | E002 | error | Entry ID or filename not found |
78
+ | E003 | error | Prune requires at least one filter flag |
79
+ | E004 | error | Cannot delete MEMORY.md — use `edit` subcommand instead |
80
+ | W001 | warning | Index has orphaned files or dangling references |
81
+ | W002 | warning | MEMORY.md references non-existent topic file |
82
+ | W003 | warning | MEMORY.md exceeds 200 lines — content truncated at load |
83
+ </error_codes>
84
+
85
+ <success_criteria>
86
+ - [ ] Store paths resolved correctly for both workflow and system stores
87
+ - [ ] Subcommand parsed and validated (defaults to list)
88
+ - [ ] list: displays entries from selected stores with filtering
89
+ - [ ] search: full-text grep across stores, ranked by match count
90
+ - [ ] view: auto-detects store, displays full content
91
+ - [ ] edit: reads and applies changes to system memory files
92
+ - [ ] delete: requires confirmation, prevents MEMORY.md deletion
93
+ - [ ] prune: requires filter, supports --dry-run, workflow store only
94
+ - [ ] Integrity check after write operations (orphans, dangling refs)
95
+ </success_criteria>
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: manage-learn
3
+ description: Capture atomic learning insights into .workflow/learning/lessons.jsonl. Lightweight CRUD over the shared learning store — supports capture, list, search, and show modes. No LLM or CLI calls; all operations are pure file reads and writes.
4
+ argument-hint: "[\"<insight text>\"|list|search <query>|show <INS-id>] [--category pattern|antipattern|decision|tool|gotcha|technique] [--tag t1,t2] [--phase N] [--confidence high|medium|low]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
+ ---
7
+
8
+ <purpose>
9
+ Pure file-operation CRUD skill for the workflow learning library. No agent spawning, no CLI calls, no LLM inference — just parse-infer-append-confirm. Complements `quality-retrospective`: where retrospective extracts insights in bulk from completed phases, `manage-learn` captures one timeless insight at a time during active work. Both write to the same `lessons.jsonl` store, disambiguated by `source` and `lens` fields.
10
+
11
+ ```
12
+ Parse Mode → Bootstrap Store → Execute Mode → Confirm
13
+ (capture / (on first use) (Bash/Read/ (INS-id
14
+ list / Bash+Write) Write/Grep) + hints)
15
+ search /
16
+ show)
17
+ ```
18
+ </purpose>
19
+
20
+ <context>
21
+ $ARGUMENTS — mode token followed by options.
22
+
23
+ ```bash
24
+ $manage-learn "Always read state.json before planning to detect current phase"
25
+ $manage-learn "list --limit 10 --category antipattern"
26
+ $manage-learn "search context propagation"
27
+ $manage-learn "show INS-a3f7b2c1"
28
+ $manage-learn "\"Zod v4 breaks z.object().strict() API\" --category gotcha --tag zod,typescript"
29
+ ```
30
+
31
+ **Flags** (capture mode):
32
+ - `--category <name>` — `pattern|antipattern|decision|tool|gotcha|technique`. Default: inferred from text keywords.
33
+ - `--tag t1,t2` — Comma-separated tags. Always adds `manual` implicitly.
34
+ - `--phase <N>` — Override auto-detected current phase. `--phase 0` forces no phase link.
35
+ - `--confidence high|medium|low` — Default: medium.
36
+
37
+ **Flags** (list/search mode):
38
+ - `--tag t1,t2` — Filter by tag
39
+ - `--category <name>` — Filter by category
40
+ - `--phase <N>` — Filter by phase
41
+ - `--lens <name>` — Filter by retrospective lens (technical|process|quality|decision)
42
+ - `--limit <N>` — Row limit (default 20)
43
+
44
+ **Storage**:
45
+ - `.workflow/learning/lessons.jsonl` — append-only JSONL (shared with `quality-retrospective`)
46
+ - `.workflow/learning/learning-index.json` — searchable index
47
+ </context>
48
+
49
+ <invariants>
50
+ 1. **No LLM or CLI calls**: This skill is pure file I/O — parse, infer, append, confirm. No `exec_command`, no `spawn_agent`.
51
+ 2. **Bootstrap on demand**: Create `.workflow/learning/` structure on first use; do not require it to exist.
52
+ 3. **Append-only lessons.jsonl**: Never rewrite or delete existing rows.
53
+ 4. **Stable INS-ids**: `INS-{8hex}` from `hash(insightText + timestamp)` — same text at different times gets different ids.
54
+ 5. **Source field**: Always `"manual"` for captures from this skill; `"retrospective"` is reserved for `quality-retrospective`.
55
+ 6. **Phase auto-link**: Read `state.json` automatically; `--phase 0` is the only way to force null.
56
+ 7. **Keyword inference is approximate**: When in doubt, default to `pattern` category rather than prompting user.
57
+ </invariants>
58
+
59
+ <execution>
60
+
61
+ ### Step 1: Parse Mode and Validate Arguments
62
+
63
+ Parse the first non-flag token from `$ARGUMENTS`:
64
+
65
+ | First token | Mode |
66
+ |-------------|------|
67
+ | `list` | list |
68
+ | `search` followed by query | search |
69
+ | `show` followed by INS-id | show |
70
+ | Empty | Prompt with `functions.request_user_input` |
71
+ | Any other text (quoted or not) | capture |
72
+
73
+ Validate `--category` if provided (allowed: pattern, antipattern, decision, tool, gotcha, technique). E002 if unknown.
74
+
75
+ ### Step 2: Bootstrap Learning Store (on first use)
76
+
77
+ Verify `.workflow/` exists (E001 if not). If `.workflow/learning/lessons.jsonl` missing: create directory, empty `lessons.jsonl`, and initialize `learning-index.json` with `{"version":1,"entries":[]}`.
78
+
79
+ ### Step 3: Execute Mode
80
+
81
+ #### Capture Mode
82
+
83
+ 1. **Infer category** from keywords (no LLM):
84
+
85
+ | Keywords | Category |
86
+ |----------|----------|
87
+ | always, should, prefer, best practice | pattern |
88
+ | never, avoid, don't, pitfall, breaks | antipattern |
89
+ | decided, chose, tradeoff, because | decision |
90
+ | tool, library, framework, package | tool |
91
+ | gotcha, surprising, unexpected | gotcha |
92
+ | technique, approach, method | technique |
93
+
94
+ 2. **Auto-link phase** from `state.json` artifact registry. `--phase 0` forces null.
95
+ 3. **Generate INS-id**: `INS-{8 hex}` from `hash(insightText + timestamp)`.
96
+ 4. **Build row** with fields: id, title (first 80 chars), summary, source="manual", lens=null, category, tags (includes "manual"), phase, phase_slug, confidence, routed_to=null, created_at.
97
+ 5. **Append** JSON line to `lessons.jsonl` (append-only, never rewrite).
98
+ 6. **Update** `learning-index.json`: push entry with id, title, category, tags, phase, created_at.
99
+
100
+ #### List Mode
101
+
102
+ Read `learning-index.json`, apply filters (`--tag`, `--category`, `--phase`, `--lens`), sort newest-first, display up to `--limit` rows (default 20) as table.
103
+
104
+ #### Search Mode
105
+
106
+ Grep `lessons.jsonl` for query. Rank by field weight: title (3) > tags (2) > summary (1). Display top matches.
107
+
108
+ #### Show Mode
109
+
110
+ Validate `INS-[0-9a-f]{8}` format. Find matching row, display full record. Show linked artifact if `routed_to` is set.
111
+
112
+ ### Step 4: Display Confirmation
113
+
114
+ Capture mode: display ID, category, phase, confidence, tags, and next-step commands (`$manage-learn "list"`, `$manage-learn "search ..."`).
115
+ </execution>
116
+
117
+ <error_codes>
118
+ | Code | Severity | Description | Stage |
119
+ |------|----------|-------------|-------|
120
+ | E001 | error | `.workflow/` not initialized — run `$maestro-init` first | parse_input |
121
+ | E002 | error | Unknown `--category` value | parse_input |
122
+ | E003 | error | `show` mode requires INS-id argument | show |
123
+ | E004 | error | INS-id not found in lessons.jsonl | show |
124
+ | W001 | warning | Auto-phase detection: no matching artifact directory found; phase set to null | capture |
125
+ | W002 | warning | `learning-index.json` row count differs from `lessons.jsonl`; offer to rebuild index | list/search |
126
+ </error_codes>
127
+
128
+ <success_criteria>
129
+ - [ ] Mode parsed correctly (capture, list, search, show)
130
+ - [ ] Learning store bootstrapped on first use
131
+ - [ ] Capture: category inferred from keywords, phase auto-linked, INS-id generated
132
+ - [ ] Capture: row appended to lessons.jsonl (append-only), index updated
133
+ - [ ] List: filters applied, newest-first, respects --limit
134
+ - [ ] Search: grep with weighted ranking across title/tags/summary
135
+ - [ ] Show: full record displayed for valid INS-id
136
+ - [ ] No LLM or CLI calls — pure file I/O only
137
+ </success_criteria>
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: manage-status
3
+ description: Display project dashboard with phase progress, active tasks, and next steps
4
+ argument-hint: ""
5
+ allowed-tools: Read, Bash, Glob, Grep
6
+ ---
7
+
8
+ <purpose>
9
+ Display project dashboard with phase progress, active tasks, and suggested next steps. Reads `.workflow/` state files and renders a formatted project overview. No arguments required.
10
+ </purpose>
11
+
12
+ <context>
13
+ $ARGUMENTS — none required.
14
+
15
+ ```bash
16
+ $manage-status
17
+ ```
18
+
19
+ Reads from:
20
+ - `.workflow/state.json` — project-level state machine
21
+ - `.workflow/roadmap.md` — milestone and phase structure
22
+ - `.workflow/scratch/*/index.json` — per-phase metadata and progress (resolved via state.json artifact registry)
23
+ - `.workflow/scratch/*/.task/TASK-*.json` — individual task statuses (resolved via state.json artifact registry)
24
+ - `.workflow/wiki-index.json` — unified wiki graph index (entry counts, health)
25
+ </context>
26
+
27
+ <execution>
28
+
29
+ ### Step 1: Validate Project
30
+
31
+ Verify `.workflow/` exists (E001) and `state.json` is present (E002).
32
+
33
+ ### Step 2: Load State Files
34
+
35
+ Read: `state.json`, `roadmap.md`, per-phase `scratch/*/index.json`, task files `scratch/*/.task/TASK-*.json` (all resolved via artifact registry).
36
+
37
+ ### Step 3: Calculate Progress
38
+
39
+ For each phase directory found:
40
+ 1. Count total tasks, completed, failed, blocked, pending
41
+ 2. Calculate completion percentage
42
+ 3. Determine phase status from index.json
43
+
44
+ ### Step 4: Render Dashboard
45
+
46
+ Display sections: **Milestones & Phases** (per-phase status, progress bars, completion %), **Active Work** (in-progress and blocked tasks), **Knowledge Graph** (wiki entry counts by type, health score, orphans), **Next Steps** (state-based suggestion).
47
+
48
+ ### Step 5: Suggest Next Steps
49
+
50
+ Use this decision table to suggest the next action:
51
+
52
+ | Current State | Suggestion |
53
+ |---------------|------------|
54
+ | No phases planned | `Skill({ skill: "maestro-flow", args: "--cmd maestro-brainstorm" })` or `Skill({ skill: "maestro-flow", args: "--cmd maestro-plan" })` |
55
+ | Phase planned, not executed | `Skill({ skill: "maestro-flow", args: "--cmd maestro-execute <N>" })` |
56
+ | Phase executed, not verified | `Skill({ skill: "maestro-flow", args: "--cmd maestro-verify <N>" })` |
57
+ | Phase verified with gaps | `Skill({ skill: "maestro-flow", args: "--cmd maestro-plan <N> --gaps" })` |
58
+ | Phase reviewed PASS/WARN | `Skill({ skill: "maestro-flow", args: "--cmd quality-test <N>" })` |
59
+ | UAT passed | `Skill({ skill: "maestro-flow", args: "--cmd maestro-milestone-audit" })` |
60
+ | All milestone phases done | `Skill({ skill: "maestro-flow", args: "--cmd maestro-milestone-audit" })` |
61
+ </execution>
62
+
63
+ <error_codes>
64
+ | Code | Severity | Description |
65
+ |------|----------|-------------|
66
+ | E001 | fatal | `.workflow/` not initialized -- run `Skill({ skill: "maestro-flow", args: "--cmd maestro-init" })` first |
67
+ | E002 | fatal | `state.json` missing or corrupt |
68
+ </error_codes>
69
+
70
+ <success_criteria>
71
+ - [ ] `.workflow/` and `state.json` validated
72
+ - [ ] All state sources loaded (state.json, roadmap, phase indexes, task files)
73
+ - [ ] Progress calculated per phase (total, completed, failed, blocked, pending, percentage)
74
+ - [ ] Dashboard rendered with milestones, phases, active work, and next steps
75
+ - [ ] Next step suggestion matches current project state via decision table
76
+ </success_criteria>
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: manage-wiki
3
+ description: Wiki knowledge graph management — health dashboard, orphan cleanup, entry search, and graph statistics
4
+ argument-hint: "[health|search|cleanup|stats] [options]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Unified wiki graph management. Health monitoring, interactive search, orphan cleanup, and graph statistics. Day-to-day operations to keep the knowledge graph healthy.
10
+
11
+ Complements `wiki-connect` (link discovery) and `wiki-digest` (synthesis) with operational tooling.
12
+ </purpose>
13
+
14
+ <required_reading>
15
+ @~/.maestro/workflows/wiki-manage.md
16
+ </required_reading>
17
+
18
+ <context>
19
+ $ARGUMENTS — subcommand and optional flags.
20
+
21
+ **Subcommands:**
22
+ | Subcommand | Description |
23
+ |-----------|-------------|
24
+ | `health` | Health dashboard — score, broken links, orphans, hubs (default) |
25
+ | `search <query>` | Interactive BM25 search with follow-up actions |
26
+ | `cleanup` | Find and resolve orphans, broken links, stale entries |
27
+ | `stats` | Graph statistics — type distribution, tag frequency, growth |
28
+
29
+ **Flags:**
30
+ - `--type <type>` — Filter: spec, knowhow, note, lesson, issue
31
+ - `--fix` — Auto-fix issues during cleanup
32
+ - `--json` — JSON output
33
+ </context>
34
+
35
+ <execution>
36
+ Follow '~/.maestro/workflows/wiki-manage.md' completely.
37
+ </execution>
38
+
39
+ <error_codes>
40
+ | Code | Severity | Description |
41
+ |------|----------|-------------|
42
+ | E001 | fatal | `.workflow/` not initialized |
43
+ | E002 | fatal | No wiki entries found |
44
+ | E003 | error | Invalid subcommand |
45
+ | W001 | warning | Health score below 50 |
46
+ | W002 | warning | Cleanup had partial failures |
47
+ </error_codes>
48
+
49
+ <success_criteria>
50
+ - [ ] Subcommand parsed (health/search/cleanup/stats)
51
+ - [ ] Wiki data loaded via `maestro wiki` CLI
52
+ - [ ] Results displayed in formatted output
53
+ - [ ] If cleanup --fix: issues resolved and delta reported
54
+ - [ ] Next-step suggestions provided
55
+ </success_criteria>
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: maestro-milestone-audit
3
+ description: Audit current milestone using artifact registry for cross-phase integration gaps and produce verdict report
4
+ argument-hint: "[milestone, e.g., 'M1']"
5
+ allowed-tools: Read, Write, Bash, Glob, Grep, Agent
6
+ ---
7
+
8
+ <purpose>
9
+ Sequential audit based on artifact registry in state.json. Checks phase coverage (ANL->PLN->EXC chains), ad-hoc completeness, execution completeness, and cross-artifact integration. Produces PASS/FAIL verdict report.
10
+ </purpose>
11
+
12
+ <context>
13
+
14
+ ```bash
15
+ $maestro-milestone-audit ""
16
+ $maestro-milestone-audit "M1"
17
+ ```
18
+
19
+ **Output**: Audit report with artifact chain verification, integration analysis, and PASS/FAIL verdict
20
+
21
+ </context>
22
+
23
+ <invariants>
24
+ 1. **Artifact registry is source of truth** — don't scan directories, read state.json
25
+ 2. **Non-blocking warnings** — missing analyze is warning, missing execute is error
26
+ 3. **Integration check is required** — always spawn checker agent
27
+ 4. **Clear verdict** — PASS or FAIL with specific reasons
28
+ </invariants>
29
+
30
+ <execution>
31
+
32
+ ### Step 1: Parse Arguments
33
+
34
+ Extract milestone identifier from arguments. Fallback: read `current_milestone` from `.workflow/state.json`. If still empty: E001.
35
+
36
+ ### Step 2: Load Artifact Registry
37
+
38
+ Read `.workflow/state.json` and `.workflow/roadmap.md`. Filter `artifacts[]` by milestone, parse phase list, group by type and phase.
39
+
40
+ ### Step 3: Phase Coverage Check
41
+
42
+ For each phase: check for completed analyze (optional), plan (required), execute (required) artifacts. Report coverage matrix.
43
+
44
+ ### Step 4: Ad-hoc & Execution Completeness
45
+
46
+ Verify all adhoc-scoped artifacts completed. For each execute artifact, verify all tasks in plan dir completed.
47
+
48
+ ### Step 5: Integration Check
49
+
50
+ Spawn Agent for cross-phase validation: shared interfaces, dependency chains, data contracts, API consistency. Write report to `.workflow/milestones/{milestone}/audit-report.md`.
51
+
52
+ ### Step 6: Verdict
53
+
54
+ **PASS**: All phases have completed EXC artifacts, no critical integration gaps, all adhoc completed.
55
+ **FAIL**: Missing EXC artifacts or critical integration gaps found.
56
+
57
+ Display structured audit report.
58
+
59
+ **Next-step routing:**
60
+
61
+ | Verdict | Next Step |
62
+ |---------|-----------|
63
+ | PASS | `$maestro-milestone-complete "{milestone}"` |
64
+ | FAIL, integration gaps | `$maestro-plan "--gaps"` |
65
+ | FAIL, incomplete execution | `$maestro-execute` |
66
+
67
+ </execution>
68
+
69
+ <error_codes>
70
+
71
+ | Code | Severity | Description | Recovery |
72
+ |------|----------|-------------|----------|
73
+ | E001 | error | Milestone identifier required | Specify milestone or ensure current_milestone is set |
74
+ | E002 | error | Milestone not found in state.json | Check milestone ID |
75
+ | E003 | error | No execute artifacts found | Run maestro-execute first |
76
+ | W001 | warning | Some phases lack analyze artifacts | Note: analysis optional but recommended |
77
+
78
+ </error_codes>
79
+
80
+ <success_criteria>
81
+ - [ ] Artifact registry loaded and filtered by milestone
82
+ - [ ] Phase coverage matrix generated
83
+ - [ ] Ad-hoc and execution completeness verified
84
+ - [ ] Integration check performed via agent
85
+ - [ ] Audit report written to milestones/ directory
86
+ - [ ] Clear PASS/FAIL verdict with specific reasons
87
+ </success_criteria>
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: maestro-milestone-complete
3
+ description: Archive completed milestone scratch artifacts to milestones/ dir, move artifact entries to milestone_history, extract learnings, advance state.
4
+ argument-hint: "[milestone] [--force] [-y]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
6
+ ---
7
+
8
+ <purpose>
9
+ Sequential milestone archival: validate audit → archive scratch dirs → extract learnings → move artifact entries to milestone_history → advance state → clean scratch.
10
+ </purpose>
11
+
12
+ <context>
13
+
14
+ ```bash
15
+ $maestro-milestone-complete "M1"
16
+ $maestro-milestone-complete # uses current_milestone from state.json
17
+ $maestro-milestone-complete --force "M1" # skip audit check
18
+ ```
19
+
20
+ **Output**: `.workflow/milestones/{milestone}/` archive directory
21
+
22
+ </context>
23
+
24
+ <invariants>
25
+ 1. **Audit before archive** — refuse without passing audit (unless --force)
26
+ 2. **Atomic state update** — write state.json via tmp+rename
27
+ 3. **Learnings are mandatory** — always extract before archiving
28
+ 4. **Clean after archive** — remove scratch dirs only after successful copy
29
+ 5. **Advance state** — always set next milestone or mark project complete
30
+ </invariants>
31
+
32
+ <execution>
33
+
34
+ ### Step 1: Parse & Validate
35
+
36
+ Read `.workflow/state.json` for `current_milestone`, `artifacts[]`, `milestones[]`. Determine target from args or current_milestone (E001 if none). Validate audit report at `.workflow/milestones/{milestone}/audit-report.md` with PASS verdict (E002 unless `--force`). Verify all milestone artifacts completed (E003 unless `--force`).
37
+
38
+ ### Step 2: Archive Scratch Dirs
39
+
40
+ Copy each milestone artifact's directory to `.workflow/milestones/{milestone}/artifacts/`. Snapshot `roadmap.md` as `roadmap-snapshot.md` in the milestone archive.
41
+
42
+ ### Step 3: Extract Learnings
43
+
44
+ Read `.summaries/` and `reflection-log.md` from execute artifacts. Extract patterns, pitfalls, strategy adjustments. Dedup against existing entries via `maestro spec load --category learning`. Append to `.workflow/specs/learnings.md` using `<spec-entry>` closed-tag format (category=`learning`, auto-extract keywords, date=today, source=`milestone-complete`).
45
+
46
+ ### Step 3b: Knowledge Promotion Inquiry
47
+
48
+ 1. **High-frequency patterns**: Scan learning entries for keyword overlap (>=2 entries) -- offer promotion to coding convention via `/spec-add coding`
49
+ 2. **Convention drift**: Compare summaries against `coding-conventions.md` and `architecture-constraints.md` -- ask if conventions need updating
50
+ 3. **Wiki island check**: Auto-trigger `wiki-connect --fix` to link new knowledge
51
+
52
+ If `-y`: auto-accept all promotions without asking.
53
+ If not `-y`: ask user for confirmation. If user confirms, append `<spec-entry>` to target category file preserving original date and source.
54
+
55
+ ### Step 4: Archive Artifact Entries
56
+
57
+ Move milestone artifacts from `state.json.artifacts[]` to `milestone_history[]` with completion metadata (id, name, status, completed_at, archive_path, archived_artifacts). Remove from active `artifacts[]`.
58
+
59
+ ### Step 5: Advance State
60
+
61
+ Set `current_milestone` to next pending milestone (mark it active), or set project `status: "completed"` if none remain. Atomic write to `state.json`.
62
+
63
+ ### Step 6: Clean Scratch
64
+
65
+ Remove archived artifact directories from `.workflow/`.
66
+
67
+ ### Step 7: Generate Summary & Report
68
+
69
+ Write `.workflow/milestones/{milestone}/summary.md` with outcomes and learnings. Update `.workflow/project.md` Context section. Display completion report with next steps: `$maestro-milestone-release`, `$maestro-analyze`, `$manage-status`, `$manage-wiki health`, `$wiki-digest`.
70
+
71
+ </execution>
72
+
73
+ <error_codes>
74
+
75
+ | Code | Severity | Description | Recovery |
76
+ |------|----------|-------------|----------|
77
+ | E001 | error | Milestone identifier required | Specify milestone |
78
+ | E002 | error | Audit not passed | Run milestone-audit first |
79
+ | E003 | error | Incomplete artifacts remain | Complete work first |
80
+
81
+ </error_codes>
82
+
83
+ <success_criteria>
84
+ - [ ] Audit report validated (or --force used)
85
+ - [ ] Scratch directories archived to milestones/
86
+ - [ ] Learnings extracted and appended to specs/learnings.md
87
+ - [ ] Artifact entries moved to milestone_history in state.json
88
+ - [ ] State advanced to next milestone (or project marked complete)
89
+ - [ ] Scratch directories cleaned
90
+ - [ ] Summary and completion report generated
91
+ </success_criteria>
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: maestro-milestone-release
3
+ description: Version bump, changelog generation, and git tag for a completed milestone. Auto-detects version manifest (package.json, pyproject.toml, Cargo.toml), generates changelog from milestone summaries + git log, creates annotated tag.
4
+ argument-hint: "[<version>] [--bump patch|minor|major] [--dry-run] [--no-tag] [--no-push]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Package a completed milestone into a releasable version. Bumps project version in manifest,
10
+ generates CHANGELOG.md entry from phase/milestone summaries and git log, creates annotated
11
+ git tag, optionally pushes to remote. Runs after `/maestro-milestone-complete`.
12
+ </purpose>
13
+
14
+ <required_reading>
15
+ @~/.maestro/workflows/milestone-release.md
16
+ </required_reading>
17
+
18
+ <context>
19
+ $ARGUMENTS — optional explicit version and flags.
20
+
21
+ **Flags:**
22
+ - `<version>` — Explicit version (e.g. `1.2.0`). If omitted, derived from `--bump`.
23
+ - `--bump patch|minor|major` — Semver bump (default: `minor`)
24
+ - `--dry-run` — Compute version + changelog without writing
25
+ - `--no-tag` — Skip git tag creation
26
+ - `--no-push` — Skip `git push --follow-tags`
27
+
28
+ **Preconditions:**
29
+ - Current milestone completed (audit PASS + milestone-complete run)
30
+ - Working tree clean (no uncommitted changes) unless `--dry-run`
31
+ </context>
32
+
33
+ <execution>
34
+ Follow '~/.maestro/workflows/milestone-release.md' completely.
35
+
36
+ **Flow:** Validate preconditions → Resolve version → Collect changes → Generate CHANGELOG →
37
+ Bump manifest → Commit → Tag → Push
38
+
39
+ **Report:**
40
+ ```
41
+ === RELEASE COMPLETE ===
42
+ Version: v{previous} → v{new}
43
+ Milestone: {name}
44
+ Tag: v{new} {pushed|local-only}
45
+ Changelog: {N} entries
46
+ ```
47
+ </execution>
48
+
49
+ <error_codes>
50
+ | Code | Severity | Condition | Recovery |
51
+ |------|----------|-----------|----------|
52
+ | E001 | error | Milestone not completed | Run `$maestro-milestone-complete` first |
53
+ | E002 | error | Audit verdict not PASS | Re-run `$maestro-milestone-audit` |
54
+ | E003 | error | Working tree not clean | Commit or stash changes |
55
+ | E004 | error | Version manifest not found | Add manifest or pass explicit version |
56
+ | E005 | error | Version not greater than current | Choose higher version |
57
+ | W001 | warning | No changes since last tag | Confirm release is desired |
58
+ | W002 | warning | Remote push failed | Retry `git push --follow-tags` |
59
+ </error_codes>
60
+
61
+ <success_criteria>
62
+ - [ ] Preconditions validated
63
+ - [ ] Target version computed and greater than previous
64
+ - [ ] Version manifest(s) updated
65
+ - [ ] CHANGELOG.md entry with milestone summary + grouped changes
66
+ - [ ] Release commit created
67
+ - [ ] Annotated git tag created (unless --no-tag)
68
+ - [ ] Pushed to remote (unless --no-push)
69
+ - [ ] state.json updated with last_release_version
70
+ </success_criteria>