maestro-flow-one 0.2.30 → 0.2.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.
Files changed (49) hide show
  1. package/maestro-flow/commands/learn/follow.md +1 -1
  2. package/maestro-flow/commands/learn/investigate.md +2 -2
  3. package/maestro-flow/commands/learn/second-opinion.md +1 -1
  4. package/maestro-flow/commands/lifecycle/analyze.md +53 -2
  5. package/maestro-flow/commands/lifecycle/blueprint.md +36 -1
  6. package/maestro-flow/commands/lifecycle/brainstorm.md +40 -1
  7. package/maestro-flow/commands/lifecycle/collab.md +1 -1
  8. package/maestro-flow/commands/lifecycle/companion.md +4 -4
  9. package/maestro-flow/commands/lifecycle/composer.md +1 -1
  10. package/maestro-flow/commands/lifecycle/execute.md +29 -6
  11. package/maestro-flow/commands/lifecycle/fork.md +24 -0
  12. package/maestro-flow/commands/lifecycle/grill.md +38 -1
  13. package/maestro-flow/commands/lifecycle/impeccable.md +13 -0
  14. package/maestro-flow/commands/lifecycle/init.md +11 -0
  15. package/maestro-flow/commands/lifecycle/merge.md +17 -1
  16. package/maestro-flow/commands/lifecycle/next.md +8 -9
  17. package/maestro-flow/commands/lifecycle/overlay.md +3 -3
  18. package/maestro-flow/commands/lifecycle/plan.md +21 -3
  19. package/maestro-flow/commands/lifecycle/quick.md +13 -1
  20. package/maestro-flow/commands/lifecycle/roadmap.md +28 -2
  21. package/maestro-flow/commands/lifecycle/swarm-workflow.md +2 -2
  22. package/maestro-flow/commands/lifecycle/tools-register.md +2 -2
  23. package/maestro-flow/commands/lifecycle/ui-codify.md +20 -0
  24. package/maestro-flow/commands/lifecycle/update.md +59 -116
  25. package/maestro-flow/commands/manage/codebase-rebuild.md +3 -3
  26. package/maestro-flow/commands/manage/harvest.md +1 -1
  27. package/maestro-flow/commands/manage/knowhow-capture.md +3 -2
  28. package/maestro-flow/commands/manage/knowhow.md +3 -1
  29. package/maestro-flow/commands/manage/wiki.md +17 -8
  30. package/maestro-flow/commands/milestone/audit.md +34 -2
  31. package/maestro-flow/commands/milestone/complete.md +19 -1
  32. package/maestro-flow/commands/milestone/release.md +18 -0
  33. package/maestro-flow/commands/quality/auto-test.md +3 -3
  34. package/maestro-flow/commands/quality/debug.md +4 -4
  35. package/maestro-flow/commands/quality/refactor.md +2 -2
  36. package/maestro-flow/commands/quality/retrospective.md +5 -5
  37. package/maestro-flow/commands/quality/review.md +4 -4
  38. package/maestro-flow/commands/quality/sync.md +1 -0
  39. package/maestro-flow/commands/quality/test.md +4 -4
  40. package/maestro-flow/commands/spec/add.md +6 -4
  41. package/maestro-flow/commands/spec/setup.md +1 -1
  42. package/package.json +1 -1
  43. package/maestro-flow/commands/learn/retro.md +0 -157
  44. package/maestro-flow/commands/lifecycle/learn.md +0 -140
  45. package/maestro-flow/commands/lifecycle/verify.md +0 -144
  46. package/maestro-flow/commands/manage/codebase-refresh.md +0 -60
  47. package/maestro-flow/commands/manage/learn.md +0 -65
  48. package/maestro-flow/commands/wiki/connect.md +0 -62
  49. package/maestro-flow/commands/wiki/digest.md +0 -68
@@ -33,7 +33,7 @@ Parse for:
33
33
  1. **Coding specs + tools**: Run `maestro spec load --category coding` to load coding conventions and discoverable tools. Apply to implementation.
34
34
  2. **UI specs (conditional)**: If the task involves frontend/UI work (description contains component, page, style, layout, CSS, HTML, frontend), also run `maestro spec load --category ui`.
35
35
  3. **Role Knowledge**:
36
- - Browse: `maestro wiki list --category coding`
36
+ - Browse: `maestro search --category coding`
37
37
  - Load task-relevant entries: `maestro wiki load <id1> [id2...]`
38
38
  3. All are optional — proceed without if unavailable.
39
39
  </context>
@@ -41,6 +41,18 @@ Parse for:
41
41
  <execution>
42
42
  Follow '~/.maestro/workflows/quick.md' completely.
43
43
 
44
+ ### Artifact Verification (before completion)
45
+
46
+ ```
47
+ REQUIRED_ARTIFACTS = [
48
+ "plan.json", // Task definitions
49
+ ".summaries/TASK-*-summary.md" (per task) // Execution results
50
+ ]
51
+ ```
52
+ If any artifact is missing: DO NOT report completion. Complete the missing step first.
53
+
54
+ Task summaries MUST include concrete evidence of completion (files changed, tests run, commands executed) — not just "task completed successfully."
55
+
44
56
  **Next-step routing on completion:**
45
57
  - Task done, --full verification passed → /manage-status
46
58
  - Task done, verification found gaps → /quality-debug {issue}
@@ -61,13 +61,13 @@ maestro-analyze ─┘ context-package.json
61
61
 
62
62
  maestro-roadmap → .workflow/roadmap.md (Milestone > Phase hierarchy)
63
63
 
64
- maestro-analyze {phase} → maestro-plan → maestro-execute → maestro-verify
64
+ maestro-analyze {phase} → maestro-plan → maestro-execute
65
65
  ```
66
66
 
67
67
  ### Pre-load
68
68
 
69
69
  1. **Specs**: `maestro spec load --category arch` — load architecture constraints for phase decomposition
70
- 2. **Wiki search**: `maestro wiki search "{requirement keywords}" --json` → prior knowledge
70
+ 2. **Wiki search**: `maestro search "{requirement keywords}" --json` → prior knowledge
71
71
  3. All optional — proceed without if unavailable
72
72
  </context>
73
73
 
@@ -92,6 +92,32 @@ Sub-modes:
92
92
  - **Revise** (`--revise`): Follow workflow roadmap.md "Mode: Revise" section
93
93
  - **Review** (`--review`): Follow workflow roadmap.md "Mode: Review" section
94
94
 
95
+ ### Phase Gates (MANDATORY, BLOCKING — Create mode)
96
+
97
+ **GATE 1: Input → Decomposition**
98
+ - REQUIRED: Requirement parsed with goal, constraints, stakeholders.
99
+ - REQUIRED: Upstream context loaded via --from (if specified).
100
+
101
+ **GATE 2: Decomposition → Refinement**
102
+ - REQUIRED: Milestones defined with deliverable targets.
103
+ - REQUIRED: Phases defined within milestones with dependencies.
104
+ - REQUIRED: Every Active requirement from project.md mapped to exactly one phase.
105
+ - REQUIRED: No circular dependencies in phase ordering.
106
+
107
+ **GATE 3: Refinement → Completion**
108
+ - REQUIRED: User approved roadmap (or auto-approved with -y).
109
+ - REQUIRED: `.workflow/roadmap.md` written with Milestone > Phase hierarchy.
110
+ - REQUIRED: Artifact registered in state.json with milestone entries.
111
+
112
+ ### Artifact Verification (before completion)
113
+
114
+ ```
115
+ REQUIRED_ARTIFACTS = [
116
+ ".workflow/roadmap.md" // Milestone > Phase hierarchy with progress table
117
+ ]
118
+ ```
119
+ If missing: DO NOT report completion.
120
+
95
121
  </execution>
96
122
 
97
123
  <completion>
@@ -26,7 +26,7 @@ Scripts: `~/.maestro/workflows/swarm/wf-*.js`
26
26
  | `wf-analyze` | maestro-analyze | explore → 6-dim scoring → **skeptic cross-verify** → **3-way advocacy (go/no-go/conditional) + referee** |
27
27
  | `wf-brainstorm` | maestro-brainstorm | multi-role analysis → **3-specialist cross-review** → **3-proposal competition** → **arbitrator** |
28
28
  | `wf-review` | quality-review | 6-dim scan → **3-vote adversarial verify (prosecutor/defense/judge)** → **3-perspective report + arbitrated verdict** |
29
- | `wf-verify` | maestro-verify | 3-layer + antipattern + convergence → **prosecutor vs defender debate** → **judge verdict** |
29
+ | `wf-verify` | maestro-execute (verification gate) | 3-layer + antipattern + convergence → **prosecutor vs defender debate** → **judge verdict** |
30
30
  | `wf-grill` | maestro-grill | explore → parallel branch stress → **meta-skeptic challenge** → **3-vote verdict (optimist/pessimist/realist)** |
31
31
  | `wf-plan` | maestro-plan | parallel context → **3-strategy competing proposals** → **judge panel scoring** → **3-critic adversarial check** |
32
32
  | `wf-execute` | maestro-execute | wave-based parallel execution → **adversarial convergence spot-check** → **3-vote status determination** |
@@ -228,7 +228,7 @@ Ralph 可以在 A_BUILD_STEPS 中将某些 step 的执行方式标记为 `swarm-
228
228
  "args": "--script wf-analyze {phase}",
229
229
  "stage": "analyze",
230
230
  "command_scope": "project",
231
- "command_path": "<resolved by maestro ralph skills>"
231
+ "command_path": "<resolved by maestro ralph skills --platform claude>"
232
232
  }
233
233
  ```
234
234
 
@@ -65,7 +65,7 @@ Parse $ARGUMENTS to determine mode:
65
65
  - Analyze improvement points (step splitting, prerequisites, error handling)
66
66
 
67
67
  **Promote mode** (existing knowhow → tool):
68
- - Locate document: `maestro wiki list --keyword <name>` or by path in `.workflow/knowhow/`
68
+ - Locate document: `maestro search "<name>" --type knowhow` or by path in `.workflow/knowhow/`
69
69
  - Read document, verify it contains actionable steps (numbered list or ## Steps section)
70
70
  - If no actionable steps, suggest extract mode instead
71
71
  - Determine category (Step 3) and summary ("Use when ...")
@@ -128,7 +128,7 @@ summary: "Use when <timing>. <scope description>"
128
128
  **Optionally register spec ref entry** for index discoverability:
129
129
  ```bash
130
130
  maestro spec add <category> "<title>" "Use when <timing>. <scope summary>" --keywords "<csv>" \
131
- --ref "knowhow/RCP-<slug>.md" --knowhow-type recipe
131
+ --description "<one-line summary>" --ref "knowhow/RCP-<slug>.md" --knowhow-type recipe
132
132
  ```
133
133
 
134
134
  ### Step 6: Verify
@@ -56,6 +56,26 @@ If specs not initialized, continue without — the workflow still produces valid
56
56
  Route to `~/.maestro/workflows/ui-codify.md` and follow completely.
57
57
 
58
58
  The workflow orchestrates 4 phases with deferred loading of phase-specific workflow files. Each phase reads its workflow file only when execution reaches that phase.
59
+
60
+ ### Phase Gates (MANDATORY, BLOCKING)
61
+
62
+ **GATE Phase 1 → Phase 2**: Source path validated, file discovery completed. design-tokens.json generated.
63
+ **GATE Phase 2 → Phase 3**: layout-templates.json generated with component patterns.
64
+ **GATE Phase 3 → Phase 4**: preview.html + preview.css generated as interactive showcase.
65
+ **GATE Phase 4 → Completion**: knowhow-manifest.json created. codify-to-knowhow called and completed.
66
+
67
+ ### Artifact Verification (before completion)
68
+
69
+ ```
70
+ REQUIRED_ARTIFACTS = [
71
+ "design-tokens.json", // Phase 1
72
+ "layout-templates.json", // Phase 2
73
+ "preview.html", // Phase 3
74
+ "preview.css", // Phase 3
75
+ "knowhow-manifest.json" // Phase 4
76
+ ]
77
+ ```
78
+ If any artifact is missing: DO NOT report completion.
59
79
  </execution>
60
80
 
61
81
  <error_codes>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-update
3
3
  description: Detect version, preview changes, apply workflow upgrades
4
- argument-hint: "[--dry-run] [--force]"
4
+ argument-hint: "[--dry-run] [--force] [--setup-only]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -12,9 +12,13 @@ allowed-tools:
12
12
  - AskUserQuestion
13
13
  ---
14
14
  <purpose>
15
- Detect the current `.workflow/` schema version, show available migrations, and interactively apply them step-by-step. Uses a migration registry that supports incremental version upgrades (e.g., 1.0 → 2.0 → 3.0).
15
+ Version router detect current version, run schema migration to latest, then follow the version-specific smart upgrade workflow.
16
16
 
17
- Each migration step is previewed before execution. The user confirms each step in a loop.
17
+ Migration scripts live in two layers:
18
+ - **Schema** (`src/migrations/`): code-level state.json transforms, auto-chained by registry
19
+ - **Workflow** (`~/.maestro/workflows/updates/`): version-specific upgrade guides with environment setup
20
+
21
+ Schema migrations handle the mechanical version bump. Workflow docs handle the smart part — what the user needs to know, configure, or verify for that version. The router runs schema first, then loads the matching workflow doc.
18
22
  </purpose>
19
23
 
20
24
  <context>
@@ -22,131 +26,80 @@ $ARGUMENTS — optional flags.
22
26
 
23
27
  **Flags:**
24
28
  - `--dry-run` -- Preview migration plan without executing
25
- - `--force` -- Skip confirmation prompts (apply all pending migrations)
29
+ - `--force` -- Skip confirmation prompts
30
+ - `--setup-only` -- Skip schema migration, run only the setup for current version
26
31
 
27
- **Migration registry:** `src/migrations/`
28
- - Each migration is a standalone file (e.g., `v1-to-v2.ts`) exporting a `MigrationDef`
29
- - All migrations are registered via `src/migrations/index.ts`
30
- - Registry auto-chains: detects current version → walks chain → applies in order
31
- - To add a new migration: create `src/migrations/v{N}-to-v{N+1}.ts`, register in `index.ts`
32
+ **Version source:** `.workflow/state.json` → `version` field
32
33
 
33
- **CLI runner:** `src/migrations/run.ts`
34
- - Executable entrypoint: `npx tsx src/migrations/run.ts [root] [--dry-run] [--force] [--json]`
35
- - Outputs JSON (with `--json`) or human-readable text
34
+ **Workflow docs:** `~/.maestro/workflows/updates/`
35
+ - `update-v{TO}-setup.md` post-migration setup for version {TO}
36
36
 
37
- **State version source:** `.workflow/state.json` `version` field
37
+ **Schema registry:** `src/migrations/` handles all intermediate version bumps automatically
38
38
  </context>
39
39
 
40
40
  <execution>
41
41
 
42
- ### Step 1: Detect Current State
42
+ ### Step 1: Detect Version
43
43
 
44
44
  ```
45
- 1. Read .workflow/state.json
46
- 2. Extract version field (default "1.0" if missing)
47
- 3. Display:
48
-
49
- === Maestro Workflow Update ===
50
- Project: {project_name}
51
- Version: {version}
52
- Location: {.workflow/ path}
45
+ 1. Read .workflow/state.json → extract version (default "1.0" if missing)
46
+ 2. Display:
47
+ === Maestro Update ===
48
+ Current version: v{version}
53
49
  ```
54
50
 
55
- ### Step 2: Dry-Run Preview
56
-
57
- Run the migration CLI in dry-run + JSON mode to get the full plan:
51
+ IF `--setup-only`:
52
+ → Glob: ~/.maestro/workflows/updates/update-v{version}-setup.md
53
+ IF exists: follow that document completely, then EXIT
54
+ → IF not exists: display "No setup script for v{version}" → EXIT
58
55
 
59
- ```bash
60
- npx tsx src/migrations/run.ts "$(pwd)" --dry-run --json
61
- ```
56
+ ### Step 2: Check for Updates
62
57
 
63
- Parse the JSON output. If status is `up-to-date`:
64
58
  ```
65
- Already up to date (v{version})
66
- ```
67
- EXIT
68
-
69
- Otherwise display the migration plan:
59
+ 1. Run: npx tsx src/migrations/run.ts "$(pwd)" --dry-run --json
60
+ 2. Parse JSON output
61
+ 3. IF status = "up-to-date":
62
+ Display "Already up to date (v{version})"
63
+ Glob: ~/.maestro/workflows/updates/update-v{version}-setup.md
64
+ → IF exists: AskUserQuestion "Run setup for v{version}?" → load and follow
65
+ → EXIT
66
+
67
+ 4. Display target:
68
+ Update available: v{current} → v{target}
69
+ Schema migrations: {N} step(s) (handled automatically)
70
70
  ```
71
- Pending Migrations ({N} step(s)):
72
-
73
- 1. [v{from} → v{to}] {name}
74
- {description}
75
-
76
- 2. [v{from} → v{to}] {name}
77
- {description}
78
- ```
79
-
80
- If `--dry-run` flag was passed by user → display plan and EXIT.
81
71
 
82
- ### Step 3: Interactive Confirmation Loop
72
+ IF `--dry-run` display info and EXIT.
83
73
 
84
- For each migration step (unless `--force`):
74
+ ### Step 3: Execute
85
75
 
86
76
  ```
87
- LOOP for step_index = 1 to N:
77
+ 1. Confirm (unless --force):
78
+ AskUserQuestion: "Upgrade v{current} → v{target}?"
79
+ Options: [执行 / 取消]
88
80
 
89
- Display:
90
- --- Step {step_index}/{N}: {name} ---
91
- Version: v{from} → v{to}
81
+ 2. Create backup:
82
+ Bash: cp .workflow/state.json .workflow/state.json.backup-v{current}-{timestamp}
92
83
 
93
- Changes:
94
- {description, indented}
84
+ 3. Run schema migration (handles all intermediate steps automatically):
85
+ Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
86
+ Parse result, display changes.
95
87
 
96
- IF NOT --force:
97
- AskUserQuestion: "Apply this migration?"
98
- Options: [yes / skip / abort]
88
+ 4. IF failed → display backup restore command → EXIT
99
89
 
100
- - "yes" → proceed to Step 4 (execute)
101
- - "skip" → WARN "Skipping may break the migration chain"
102
- continue to next step
103
- - "abort" → display summary of what was applied so far → EXIT
90
+ 5. Load version-specific setup:
91
+ Read: ~/.maestro/workflows/updates/update-v{target}-setup.md
92
+ IF exists follow completely (hooks, deps, knowledge system config)
104
93
 
105
- IF --force:
106
- → proceed to Step 4 (execute)
94
+ 6. Display: "v{current} → v{target}: done"
107
95
  ```
108
96
 
109
- ### Step 4: Execute Single Migration
97
+ ### Step 4: Summary
110
98
 
111
99
  ```
112
- 1. Create backup:
113
- Bash: cp .workflow/state.json .workflow/state.json.backup-v{from}-{timestamp}
114
-
115
- 2. Run migration:
116
- Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
117
-
118
- NOTE: The runner executes ALL pending migrations. For step-by-step control,
119
- read state.json, call the migration function directly, or use the runner
120
- which stops on first failure.
121
-
122
- 3. Parse result JSON and display:
123
-
124
- {status_icon} Step {N} completed: {name}
125
- Summary: {summary}
126
- Changes:
127
- - {change_1}
128
- - {change_2}
129
- - ...
130
-
131
- 4. If failed:
132
- Display: "Migration failed: {summary}"
133
- Display: "Backup available at: {backup_path}"
134
- Display: "Restore with: cp {backup_path} .workflow/state.json"
135
- → EXIT
136
-
137
- 5. Continue loop to next step
138
- ```
139
-
140
- ### Step 5: Summary
141
-
142
- After all steps completed (or user aborted):
143
-
144
- ```
145
- === Migration Complete ===
146
- Applied: {applied_count} / {total_count} migration(s)
147
- Skipped: {skipped_count}
148
- Version: v{original} → v{final}
149
- Backup: .workflow/state.json.backup-v{original}-{timestamp}
100
+ === Update Complete ===
101
+ Version: v{current} v{target}
102
+ Backup: .workflow/state.json.backup-v{current}-{timestamp}
150
103
 
151
104
  Next steps:
152
105
  /manage-status -- Verify project state
@@ -155,22 +108,12 @@ Next steps:
155
108
 
156
109
  </execution>
157
110
 
158
- <error_codes>
159
- | Code | Severity | Condition | Recovery |
160
- |------|----------|-----------|----------|
161
- | E001 | error | .workflow/state.json not found | Run /maestro-init first |
162
- | E002 | error | state.json parse error | Check file for corruption |
163
- | E003 | error | Migration function failed | Restore from backup |
164
- | W001 | warning | Skipped migration may break version chain | Re-run /maestro-update later |
165
- | W002 | warning | tsx not available | Install tsx: npm i -D tsx |
166
- </error_codes>
167
-
168
111
  <success_criteria>
169
112
  - [ ] Current version detected from state.json
170
- - [ ] Dry-run preview shows full migration plan without execution
171
- - [ ] Each step confirmed interactively (unless --force)
172
- - [ ] Backup created before each migration
173
- - [ ] Migration executed and result displayed with change list
174
- - [ ] Abort stops cleanly with partial summary
175
- - [ ] Summary shows applied/skipped counts and version change
113
+ - [ ] Schema migrations run automatically (no manual intermediate steps)
114
+ - [ ] Backup created before migration
115
+ - [ ] Version-specific setup doc loaded and followed (if exists)
116
+ - [ ] --setup-only runs only setup for current version
117
+ - [ ] --dry-run previews without executing
118
+ - [ ] Summary shows version change and backup path
176
119
  </success_criteria>
@@ -53,9 +53,9 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
53
53
 
54
54
  **Next-step routing on completion:**
55
55
  - View updated project state → `/manage-status`
56
- - Incremental updates later → `/manage-codebase-refresh`
56
+ - Incremental updates later → `/quality-sync`
57
57
  - Verify KG stats → `maestro kg stats`
58
- - Verify wiki integration → `maestro wiki list --keyword kg`
58
+ - Verify wiki integration → `maestro search "kg" --type knowhow`
59
59
  - Future change impact → `maestro kg diff-wiki`
60
60
  </execution>
61
61
 
@@ -80,6 +80,6 @@ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
80
80
  - [ ] KG pipeline executed (`maestro kg index`)
81
81
  - [ ] knowledge-graph.json generated in .workflow/codebase/
82
82
  - [ ] KG nodes indexed as virtual wiki entries (automatic via WikiIndexer on next wiki access)
83
- - [ ] Next step routing: `/manage-status` or `/manage-codebase-refresh` for incremental updates later
83
+ - [ ] Next step routing: `/manage-status` or `/quality-sync` for incremental updates later
84
84
  - [ ] KG impact check available: `maestro kg diff-wiki` for future change impact analysis
85
85
  </success_criteria>
@@ -53,7 +53,7 @@ Extraction patterns, classification rules, routing infrastructure, and fragment
53
53
 
54
54
  **Next-step routing on completion:**
55
55
  - Review wiki entries → `maestro wiki list --type note`
56
- - Connect wiki graph → `/wiki-connect --fix`
56
+ - Connect wiki graph → `/manage-wiki connect --fix`
57
57
  - Triage issues → `/manage-issue list --source harvest`
58
58
  - View specs → `/spec-load --role implement`
59
59
  - Full retrospective → `/quality-retrospective`
@@ -13,7 +13,7 @@ allowed-tools:
13
13
  ---
14
14
  <purpose>
15
15
  Capture reusable knowledge into `.workflow/knowhow/` with type-specific structured fields.
16
- Auto-indexed by WikiIndexer (type=knowhow), searchable via `maestro knowhow search`.
16
+ Auto-indexed by WikiIndexer (type=knowhow), searchable via `maestro search --type knowhow`.
17
17
  </purpose>
18
18
 
19
19
  <required_reading>
@@ -38,8 +38,9 @@ $ARGUMENTS — type token + description + optional flags.
38
38
  | `asset`/`ast`/`资产`/`契约` | asset | AST- | assetType, codePaths, category |
39
39
  | `blueprint`/`blp`/`蓝图` | blueprint | BLP- | codePaths, category |
40
40
  | `document`/`doc`/`文档` | document | DOC- | (general fallback) |
41
+ | `insight`/`ins`/`洞察`/`经验` | insight | INS- | content, tags, phase (replaces former manage-learn) |
41
42
  | Short text + `--tag` | tip | TIP- | — |
42
- | No args | — | — | AskUserQuestion (9 options) |
43
+ | No args | — | — | AskUserQuestion (10 options) |
43
44
 
44
45
  **Output**: `.workflow/knowhow/{PREFIX}-{YYYYMMDD}-{HHMM}.md` with YAML frontmatter (title, type, category, created, tags, source, lang, status)
45
46
  </context>
@@ -13,9 +13,11 @@ allowed-tools:
13
13
  ---
14
14
  <purpose>
15
15
  Unified memory management across two stores:
16
- 1. **Workflow knowhow** (`.workflow/knowhow/`) — Session compacts and tips with JSON index, created by `manage-knowhow-capture`
16
+ 1. **Workflow knowhow** (`.workflow/knowhow/`) — Session compacts, tips, insights, and all reusable knowledge, created by `manage-knowhow-capture`
17
17
  2. **System memory** (`~/.claude/projects/{project}/memory/`) — Claude Code auto-memory (MEMORY.md + topic files), persists across conversations
18
18
 
19
+ Also scans `.workflow/specs/learnings.md` for legacy insight entries (backward compat with former `manage-learn`).
20
+
19
21
  Provides list/search/view/edit/delete/prune operations. Default store is `all` (show both).
20
22
  </purpose>
21
23
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: manage-wiki
3
3
  description: Manage wiki graph — health, cleanup, search, stats
4
- argument-hint: "<subcommand: health|search|cleanup|stats> [query] [--fix] [--dry-run]"
4
+ argument-hint: "<subcommand: health|search|cleanup|stats|connect|digest> [query] [--fix] [--dry-run]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -12,9 +12,7 @@ allowed-tools:
12
12
  - AskUserQuestion
13
13
  ---
14
14
  <purpose>
15
- Unified wiki graph management command. Provides interactive access to wiki health monitoring, entry search, orphan cleanup, and graph statistics — the day-to-day operations that keep the knowledge graph healthy.
16
-
17
- Complements `/wiki-connect` (link discovery) and `/wiki-digest` (synthesis) with operational tooling.
15
+ Unified wiki graph management command. Provides interactive access to wiki health monitoring, entry search, orphan cleanup, graph statistics, link discovery, and knowledge synthesis — the single entry point for all wiki graph operations.
18
16
  </purpose>
19
17
 
20
18
  <required_reading>
@@ -31,16 +29,26 @@ $ARGUMENTS — subcommand and optional flags.
31
29
  | `search <query>` | Interactive BM25 search with follow-up actions |
32
30
  | `cleanup` | Find and resolve orphans, broken links, stale entries |
33
31
  | `stats` | Graph statistics — type distribution, tag frequency, growth trends |
32
+ | `connect` | Find and link hidden connections — orphan rescue, missing links, transitive gaps |
33
+ | `digest [topic]` | Generate knowledge digest with theme clustering and gap analysis |
34
34
  | No args | Same as `health` |
35
35
 
36
36
  **Flags:**
37
37
  - `--type <type>` — Filter by wiki type: spec, knowhow, note, issue
38
- - `--fix` — Auto-fix issues found during cleanup (remove broken links, suggest connections)
38
+ - `--fix` — Auto-fix issues found during cleanup/connect (remove broken links, apply connections)
39
39
  - `--json` — Output in JSON format
40
+ - `--min-similarity N` — (connect) Minimum similarity threshold for link candidates
41
+ - `--max N` — (connect) Maximum number of suggestions
42
+ - `--format brief|full` — (digest) Output format
43
+ - `--recent N` — (digest) Scope to N most recent entries
44
+ - `--create-issues` — (digest) Create issues for identified knowledge gaps
40
45
  </context>
41
46
 
42
47
  <execution>
43
- Follow '~/.maestro/workflows/wiki-manage.md' completely.
48
+ **Subcommand routing:**
49
+ - `health|search|cleanup|stats` → Follow `~/.maestro/workflows/wiki-manage.md` completely.
50
+ - `connect` → Follow `~/.maestro/workflows/wiki-connect.md` completely (Stages 1-6).
51
+ - `digest` → Follow `~/.maestro/workflows/wiki-digest.md` completely (Stages 1-8).
44
52
  </execution>
45
53
 
46
54
  <error_codes>
@@ -54,9 +62,10 @@ Follow '~/.maestro/workflows/wiki-manage.md' completely.
54
62
  </error_codes>
55
63
 
56
64
  <success_criteria>
57
- - [ ] Subcommand parsed (health/search/cleanup/stats)
65
+ - [ ] Subcommand parsed (health/search/cleanup/stats/connect/digest)
58
66
  - [ ] Wiki data loaded via `maestro wiki` CLI
59
67
  - [ ] Results displayed in formatted output
60
- - [ ] If cleanup --fix: issues resolved and delta reported
68
+ - [ ] If cleanup/connect --fix: issues resolved and delta reported
69
+ - [ ] If digest: themes clustered, gaps identified, coverage heatmap generated
61
70
  - [ ] Next-step suggestions provided
62
71
  </success_criteria>
@@ -22,7 +22,7 @@ Audit milestone completion using the artifact registry. Checks:
22
22
  Data source: `state.json.artifacts[]` filtered by current milestone.
23
23
  Produces audit report at `.workflow/milestones/{milestone}/audit-report.md`.
24
24
 
25
- Pipeline position: downstream of maestro-verify (all phases verified), upstream of maestro-milestone-complete.
25
+ Pipeline position: downstream of maestro-execute (which includes verification), upstream of maestro-milestone-complete.
26
26
  </purpose>
27
27
 
28
28
  <required_reading>
@@ -49,7 +49,7 @@ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json
49
49
 
50
50
  ### Role Knowledge
51
51
 
52
- 1. Browse: `maestro wiki list --category review`
52
+ 1. Browse: `maestro search --category review`
53
53
  2. Select entries relevant to milestone integration audit
54
54
  3. Load: `maestro wiki load <id1> [id2...]`
55
55
  </context>
@@ -58,6 +58,38 @@ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json
58
58
  Follow '~/.maestro/workflows/milestone-audit.md' completely.
59
59
 
60
60
  Audit checklist steps (phase coverage, ad-hoc completeness, execution completeness, cross-artifact integration) are defined in workflow `milestone-audit.md`.
61
+
62
+ ### Phase Gates (MANDATORY, BLOCKING)
63
+
64
+ **GATE 1: Load → Phase Coverage Check**
65
+ - REQUIRED: state.json loaded with artifacts[] filtered by target milestone.
66
+ - REQUIRED: Milestone phases identified from roadmap (standard) or milestone_obj.phases (adhoc).
67
+ - BLOCKED if no execute artifacts found: error E003.
68
+
69
+ **GATE 2: Phase Coverage → Integration Check**
70
+ - REQUIRED: Every phase checked for artifact chain completeness (ANL→PLN→EXC for standard, PLN→EXC for adhoc).
71
+ - REQUIRED: Execution completeness verified — all tasks in executed plans checked for status.
72
+ - Do NOT skip incomplete chains — each gap MUST be logged in audit report.
73
+
74
+ **GATE 3: Integration Check → Report**
75
+ - REQUIRED: Cross-artifact integration check completed (shared interfaces, data contracts, configuration consistency).
76
+ - REQUIRED: Clear PASS/FAIL verdict determined with evidence for each check.
77
+
78
+ ### Artifact Verification (before completion)
79
+
80
+ ```
81
+ REQUIRED_ARTIFACTS = [
82
+ ".workflow/milestones/{milestone}/audit-report.md" // Clear PASS/FAIL verdict
83
+ ]
84
+ ```
85
+ If missing: DO NOT report completion. Write the audit report first.
86
+
87
+ ### Evidence Requirement
88
+
89
+ Every audit check result MUST cite what was examined and what was found:
90
+ - PASS: "Phase 1 chain complete: ANL-001 → PLN-001 → EXC-001, all tasks completed"
91
+ - FAIL: "Phase 2 missing EXC artifact — PLN-002 exists but no execution found"
92
+ - Do NOT mark checks as PASS without verifying the actual artifact exists and contains expected content.
61
93
  </execution>
62
94
 
63
95
  <completion>
@@ -46,6 +46,24 @@ Follow '~/.maestro/workflows/milestone-complete.md' completely.
46
46
 
47
47
  Archive flow steps (validation, directory archival, artifact history, knowhow extraction, state advancement, cleanup) are defined in workflow `milestone-complete.md`.
48
48
 
49
+ ### Phase Gates (MANDATORY, BLOCKING)
50
+
51
+ **GATE 1: Validation → Archival**
52
+ - REQUIRED: Audit report verified as PASS (E002 if not).
53
+ - REQUIRED: No incomplete artifacts remain (E003 if any).
54
+
55
+ **GATE 2: Archival → Knowhow Extraction**
56
+ - REQUIRED: Scratch artifacts moved to `milestones/{M}/artifacts/`.
57
+ - REQUIRED: Artifact entries archived to milestone_history in state.json.
58
+
59
+ **GATE 3: Knowhow Extraction → State Advancement**
60
+ - REQUIRED: Knowhow extraction attempted (may produce 0 entries — W001).
61
+ - REQUIRED: `project.md` Context updated with milestone summary.
62
+
63
+ **GATE 4: State Advancement → Completion**
64
+ - REQUIRED: state.json updated — next milestone as current (standard) or current_milestone=null (adhoc).
65
+ - REQUIRED: Roadmap snapshot saved (standard only).
66
+
49
67
  ### Knowledge Promotion Inquiry
50
68
 
51
69
  After knowhow extraction (step 4), scan `learnings.md` for promotion candidates:
@@ -56,7 +74,7 @@ After knowhow extraction (step 4), scan `learnings.md` for promotion candidates:
56
74
  2. **Convention drift detection**: Compare executed task summaries against `coding-conventions.md` and `architecture-constraints.md`:
57
75
  → Ask: "Were any established conventions bypassed during this milestone? Should conventions be updated?"
58
76
 
59
- 3. **Wiki island check**: Auto-trigger `wiki-connect --fix` to link newly extracted knowledge.
77
+ 3. **Wiki island check**: Auto-trigger `manage-wiki connect --fix` to link newly extracted knowledge.
60
78
 
61
79
  If user confirms promotion, invoke `Skill({ skill: "spec-add", args: "<category> <content>" })` with promoted content, preserving original date and source traceability.
62
80
 
@@ -58,6 +58,24 @@ Follows @~/.maestro/workflows/interview-mechanics.md standard.
58
58
  <execution>
59
59
  Follow '~/.maestro/workflows/milestone-release.md' completely.
60
60
 
61
+ ### Phase Gates (MANDATORY, BLOCKING)
62
+
63
+ **GATE 1: Validation → Version Bump**
64
+ - REQUIRED: Current milestone completed (audit PASS + milestone-complete run). E001 if not.
65
+ - REQUIRED: Working tree clean (no uncommitted changes). E003 if dirty.
66
+
67
+ **GATE 2: Version Bump → Changelog**
68
+ - REQUIRED: Target version computed and greater than previous (E005 if not).
69
+ - REQUIRED: Version manifest file(s) identified and accessible.
70
+
71
+ **GATE 3: Changelog → Tag/Push**
72
+ - REQUIRED: CHANGELOG.md entry written with milestone summary + grouped changes.
73
+ - REQUIRED: Release commit created with conventional message.
74
+
75
+ **GATE 4: Tag → Completion**
76
+ - REQUIRED: Annotated git tag created (unless --no-tag).
77
+ - REQUIRED: state.json updated with last_release_version + last_release_at.
78
+
61
79
  **High-level flow:**
62
80
  1. Validate preconditions (milestone completed, clean tree, audit PASS)
63
81
  2. Resolve target version from `<version>` or `--bump` against current manifest
@@ -55,7 +55,7 @@ Flags, artifact context resolution, and output formats defined in workflow auto-
55
55
  1. **Test specs + tools**: Run `maestro spec load --category test` to load test conventions (framework, patterns, naming). Apply to all generated tests.
56
56
  2. **Coding specs**: Run `maestro spec load --category coding` to understand coding patterns for accurate test targeting.
57
57
  3. **Role Knowledge**:
58
- - Browse: `maestro wiki list --category test`
58
+ - Browse: `maestro search --category test`
59
59
  - Load task-relevant entries: `maestro wiki load <id1> [id2...]`
60
60
  4. All are optional — proceed without if unavailable.
61
61
  </context>
@@ -91,13 +91,13 @@ Append to state.json.artifacts[]:
91
91
  ```
92
92
 
93
93
  **Next-step routing on completion:**
94
- - Converged (>=95%) → `/maestro-verify {phase}`
94
+ - Converged (>=95%) → `/quality-review {phase}`
95
95
  - All requirements verified (spec source) → `/maestro-milestone-audit`
96
96
  - Bugs discovered → `/quality-debug --from-uat {phase}`
97
97
  - Max iter, >80% → `/quality-test {phase}` for manual UAT
98
98
  - Max iter, <80% → `/quality-debug {phase}`
99
99
  - Coverage still low → `/quality-auto-test {phase} --layer {missing}`
100
- - Re-run all pass → `/maestro-verify {phase}`
100
+ - Re-run all pass → `/quality-review {phase}`
101
101
  - Single pass, all pass → `/quality-test {phase}`
102
102
  </execution>
103
103