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.
Files changed (259) hide show
  1. package/.agents/skills/learn-follow/SKILL.md +114 -114
  2. package/.agents/skills/learn-investigate/SKILL.md +138 -139
  3. package/.agents/skills/learn-second-opinion/SKILL.md +105 -109
  4. package/.agents/skills/maestro/SKILL.md +2 -10
  5. package/.agents/skills/maestro-amend/SKILL.md +152 -152
  6. package/.agents/skills/maestro-analyze/SKILL.md +201 -252
  7. package/.agents/skills/maestro-blueprint/SKILL.md +175 -190
  8. package/.agents/skills/maestro-brainstorm/SKILL.md +196 -200
  9. package/.agents/skills/maestro-collab/SKILL.md +159 -159
  10. package/.agents/skills/maestro-companion/SKILL.md +517 -517
  11. package/.agents/skills/maestro-composer/SKILL.md +173 -164
  12. package/.agents/skills/maestro-execute/SKILL.md +169 -170
  13. package/.agents/skills/maestro-fork/SKILL.md +97 -96
  14. package/.agents/skills/maestro-grill/SKILL.md +161 -162
  15. package/.agents/skills/maestro-guard/SKILL.md +93 -92
  16. package/.agents/skills/maestro-impeccable/SKILL.md +296 -253
  17. package/.agents/skills/maestro-init/SKILL.md +117 -118
  18. package/.agents/skills/maestro-merge/SKILL.md +73 -66
  19. package/.agents/skills/maestro-milestone-audit/SKILL.md +4 -10
  20. package/.agents/skills/maestro-milestone-complete/SKILL.md +6 -7
  21. package/.agents/skills/maestro-milestone-release/SKILL.md +122 -131
  22. package/.agents/skills/maestro-next/SKILL.md +241 -245
  23. package/.agents/skills/maestro-overlay/SKILL.md +176 -166
  24. package/.agents/skills/maestro-plan/SKILL.md +211 -197
  25. package/.agents/skills/maestro-player/SKILL.md +167 -167
  26. package/.agents/skills/maestro-quick/SKILL.md +69 -63
  27. package/.agents/skills/maestro-ralph/SKILL.md +2 -36
  28. package/.agents/skills/maestro-ralph-beta/SKILL.md +861 -872
  29. package/.agents/skills/maestro-ralph-execute/SKILL.md +234 -234
  30. package/.agents/skills/maestro-roadmap/SKILL.md +159 -172
  31. package/.agents/skills/maestro-swarm-workflow/SKILL.md +229 -250
  32. package/.agents/skills/maestro-tools-execute/SKILL.md +108 -103
  33. package/.agents/skills/maestro-tools-register/SKILL.md +148 -143
  34. package/.agents/skills/maestro-ui-codify/SKILL.md +103 -86
  35. package/.agents/skills/maestro-universal-workflow/SKILL.md +534 -547
  36. package/.agents/skills/maestro-update/SKILL.md +109 -106
  37. package/.agents/skills/manage-codebase-rebuild/SKILL.md +73 -71
  38. package/.agents/skills/manage-harvest/SKILL.md +83 -81
  39. package/.agents/skills/manage-issue/SKILL.md +59 -60
  40. package/.agents/skills/manage-issue-discover/SKILL.md +70 -68
  41. package/.agents/skills/manage-kg-extractors/SKILL.md +130 -0
  42. package/.agents/skills/manage-knowhow/SKILL.md +70 -66
  43. package/.agents/skills/manage-knowhow-capture/SKILL.md +79 -69
  44. package/.agents/skills/manage-knowledge-audit/SKILL.md +91 -74
  45. package/.agents/skills/manage-status/SKILL.md +52 -42
  46. package/.agents/skills/manage-wiki/SKILL.md +69 -58
  47. package/.agents/skills/odyssey-debug/SKILL.md +445 -459
  48. package/.agents/skills/odyssey-improve/SKILL.md +477 -491
  49. package/.agents/skills/odyssey-planex/SKILL.md +576 -587
  50. package/.agents/skills/odyssey-review-test-fix/SKILL.md +400 -413
  51. package/.agents/skills/odyssey-ui/SKILL.md +431 -448
  52. package/.agents/skills/quality-auto-test/SKILL.md +140 -123
  53. package/.agents/skills/quality-debug/SKILL.md +145 -106
  54. package/.agents/skills/quality-refactor/SKILL.md +91 -53
  55. package/.agents/skills/quality-retrospective/SKILL.md +109 -63
  56. package/.agents/skills/quality-review/SKILL.md +141 -114
  57. package/.agents/skills/quality-sync/SKILL.md +74 -38
  58. package/.agents/skills/quality-test/SKILL.md +133 -103
  59. package/.agents/skills/security-audit/SKILL.md +217 -166
  60. package/.agents/skills/spec-add/SKILL.md +66 -59
  61. package/.agents/skills/spec-load/SKILL.md +68 -68
  62. package/.agents/skills/spec-remove/SKILL.md +42 -42
  63. package/.agents/skills/spec-setup/SKILL.md +38 -41
  64. package/.agy/skills/learn-follow/SKILL.md +114 -114
  65. package/.agy/skills/learn-investigate/SKILL.md +138 -139
  66. package/.agy/skills/learn-second-opinion/SKILL.md +105 -109
  67. package/.agy/skills/maestro/SKILL.md +2 -10
  68. package/.agy/skills/maestro-amend/SKILL.md +152 -152
  69. package/.agy/skills/maestro-analyze/SKILL.md +201 -252
  70. package/.agy/skills/maestro-blueprint/SKILL.md +175 -190
  71. package/.agy/skills/maestro-brainstorm/SKILL.md +196 -200
  72. package/.agy/skills/maestro-collab/SKILL.md +159 -159
  73. package/.agy/skills/maestro-companion/SKILL.md +517 -517
  74. package/.agy/skills/maestro-composer/SKILL.md +173 -164
  75. package/.agy/skills/maestro-execute/SKILL.md +169 -170
  76. package/.agy/skills/maestro-fork/SKILL.md +97 -96
  77. package/.agy/skills/maestro-grill/SKILL.md +161 -162
  78. package/.agy/skills/maestro-guard/SKILL.md +93 -92
  79. package/.agy/skills/maestro-impeccable/SKILL.md +296 -253
  80. package/.agy/skills/maestro-init/SKILL.md +117 -118
  81. package/.agy/skills/maestro-merge/SKILL.md +73 -66
  82. package/.agy/skills/maestro-milestone-audit/SKILL.md +4 -10
  83. package/.agy/skills/maestro-milestone-complete/SKILL.md +6 -7
  84. package/.agy/skills/maestro-milestone-release/SKILL.md +122 -131
  85. package/.agy/skills/maestro-next/SKILL.md +241 -245
  86. package/.agy/skills/maestro-overlay/SKILL.md +176 -166
  87. package/.agy/skills/maestro-plan/SKILL.md +211 -197
  88. package/.agy/skills/maestro-player/SKILL.md +167 -167
  89. package/.agy/skills/maestro-quick/SKILL.md +69 -63
  90. package/.agy/skills/maestro-ralph/SKILL.md +2 -36
  91. package/.agy/skills/maestro-ralph-beta/SKILL.md +861 -872
  92. package/.agy/skills/maestro-ralph-execute/SKILL.md +234 -234
  93. package/.agy/skills/maestro-roadmap/SKILL.md +159 -172
  94. package/.agy/skills/maestro-swarm-workflow/SKILL.md +229 -250
  95. package/.agy/skills/maestro-tools-execute/SKILL.md +108 -103
  96. package/.agy/skills/maestro-tools-register/SKILL.md +148 -143
  97. package/.agy/skills/maestro-ui-codify/SKILL.md +103 -86
  98. package/.agy/skills/maestro-universal-workflow/SKILL.md +534 -547
  99. package/.agy/skills/maestro-update/SKILL.md +109 -106
  100. package/.agy/skills/manage-codebase-rebuild/SKILL.md +73 -71
  101. package/.agy/skills/manage-harvest/SKILL.md +83 -81
  102. package/.agy/skills/manage-issue/SKILL.md +59 -60
  103. package/.agy/skills/manage-issue-discover/SKILL.md +70 -68
  104. package/.agy/skills/manage-kg-extractors/SKILL.md +130 -0
  105. package/.agy/skills/manage-knowhow/SKILL.md +70 -66
  106. package/.agy/skills/manage-knowhow-capture/SKILL.md +79 -69
  107. package/.agy/skills/manage-knowledge-audit/SKILL.md +91 -74
  108. package/.agy/skills/manage-status/SKILL.md +52 -42
  109. package/.agy/skills/manage-wiki/SKILL.md +69 -58
  110. package/.agy/skills/odyssey-debug/SKILL.md +445 -459
  111. package/.agy/skills/odyssey-improve/SKILL.md +477 -491
  112. package/.agy/skills/odyssey-planex/SKILL.md +576 -587
  113. package/.agy/skills/odyssey-review-test-fix/SKILL.md +400 -413
  114. package/.agy/skills/odyssey-ui/SKILL.md +431 -448
  115. package/.agy/skills/quality-auto-test/SKILL.md +140 -123
  116. package/.agy/skills/quality-debug/SKILL.md +145 -106
  117. package/.agy/skills/quality-refactor/SKILL.md +91 -53
  118. package/.agy/skills/quality-retrospective/SKILL.md +109 -63
  119. package/.agy/skills/quality-review/SKILL.md +141 -114
  120. package/.agy/skills/quality-sync/SKILL.md +74 -38
  121. package/.agy/skills/quality-test/SKILL.md +133 -103
  122. package/.agy/skills/security-audit/SKILL.md +217 -166
  123. package/.agy/skills/spec-add/SKILL.md +66 -59
  124. package/.agy/skills/spec-load/SKILL.md +68 -68
  125. package/.agy/skills/spec-remove/SKILL.md +42 -42
  126. package/.agy/skills/spec-setup/SKILL.md +38 -41
  127. package/.claude/commands/learn-follow.md +127 -127
  128. package/.claude/commands/learn-investigate.md +151 -152
  129. package/.claude/commands/learn-second-opinion.md +118 -122
  130. package/.claude/commands/maestro-amend.md +164 -164
  131. package/.claude/commands/maestro-analyze.md +215 -266
  132. package/.claude/commands/maestro-blueprint.md +189 -204
  133. package/.claude/commands/maestro-brainstorm.md +209 -213
  134. package/.claude/commands/maestro-collab.md +172 -172
  135. package/.claude/commands/maestro-companion.md +531 -531
  136. package/.claude/commands/maestro-composer.md +188 -179
  137. package/.claude/commands/maestro-execute.md +183 -184
  138. package/.claude/commands/maestro-fork.md +111 -110
  139. package/.claude/commands/maestro-grill.md +175 -176
  140. package/.claude/commands/maestro-guard.md +103 -102
  141. package/.claude/commands/maestro-impeccable.md +311 -268
  142. package/.claude/commands/maestro-init.md +130 -131
  143. package/.claude/commands/maestro-merge.md +87 -80
  144. package/.claude/commands/maestro-milestone-audit.md +4 -10
  145. package/.claude/commands/maestro-milestone-complete.md +6 -7
  146. package/.claude/commands/maestro-milestone-release.md +136 -145
  147. package/.claude/commands/maestro-next.md +253 -257
  148. package/.claude/commands/maestro-overlay.md +188 -178
  149. package/.claude/commands/maestro-plan.md +225 -211
  150. package/.claude/commands/maestro-player.md +182 -182
  151. package/.claude/commands/maestro-quick.md +83 -77
  152. package/.claude/commands/maestro-ralph-beta.md +875 -886
  153. package/.claude/commands/maestro-ralph-execute.md +247 -247
  154. package/.claude/commands/maestro-ralph.md +2 -36
  155. package/.claude/commands/maestro-roadmap.md +173 -186
  156. package/.claude/commands/maestro-swarm-workflow.md +243 -264
  157. package/.claude/commands/maestro-tools-execute.md +122 -117
  158. package/.claude/commands/maestro-tools-register.md +162 -157
  159. package/.claude/commands/maestro-ui-codify.md +117 -100
  160. package/.claude/commands/maestro-universal-workflow.md +548 -561
  161. package/.claude/commands/maestro-update.md +122 -119
  162. package/.claude/commands/maestro.md +2 -10
  163. package/.claude/commands/manage-codebase-rebuild.md +87 -85
  164. package/.claude/commands/manage-harvest.md +97 -95
  165. package/.claude/commands/manage-issue-discover.md +83 -81
  166. package/.claude/commands/manage-issue.md +72 -73
  167. package/.claude/commands/manage-kg-extractors.md +128 -0
  168. package/.claude/commands/manage-knowhow-capture.md +92 -82
  169. package/.claude/commands/manage-knowhow.md +83 -79
  170. package/.claude/commands/manage-knowledge-audit.md +105 -88
  171. package/.claude/commands/manage-status.md +62 -52
  172. package/.claude/commands/manage-wiki.md +82 -71
  173. package/.claude/commands/odyssey-debug.md +459 -473
  174. package/.claude/commands/odyssey-improve.md +491 -505
  175. package/.claude/commands/odyssey-planex.md +590 -601
  176. package/.claude/commands/odyssey-review-test-fix.md +414 -427
  177. package/.claude/commands/odyssey-ui.md +445 -462
  178. package/.claude/commands/quality-auto-test.md +153 -136
  179. package/.claude/commands/quality-debug.md +159 -120
  180. package/.claude/commands/quality-refactor.md +105 -67
  181. package/.claude/commands/quality-retrospective.md +123 -77
  182. package/.claude/commands/quality-review.md +155 -128
  183. package/.claude/commands/quality-sync.md +88 -52
  184. package/.claude/commands/quality-test.md +147 -117
  185. package/.claude/commands/security-audit.md +230 -179
  186. package/.claude/commands/spec-add.md +77 -70
  187. package/.claude/commands/spec-load.md +78 -78
  188. package/.claude/commands/spec-remove.md +55 -55
  189. package/.claude/commands/spec-setup.md +49 -52
  190. package/dist/src/cli.js +1 -1
  191. package/dist/src/cli.js.map +1 -1
  192. package/dist/src/commands/kg.d.ts.map +1 -1
  193. package/dist/src/commands/kg.js +11 -5
  194. package/dist/src/commands/kg.js.map +1 -1
  195. package/dist/src/graph/kg/extraction/code/code-extractor.d.ts +2 -0
  196. package/dist/src/graph/kg/extraction/code/code-extractor.d.ts.map +1 -1
  197. package/dist/src/graph/kg/extraction/code/code-extractor.js +32 -3
  198. package/dist/src/graph/kg/extraction/code/code-extractor.js.map +1 -1
  199. package/dist/src/graph/kg/extraction/code/plugin-engine.d.ts +35 -0
  200. package/dist/src/graph/kg/extraction/code/plugin-engine.d.ts.map +1 -0
  201. package/dist/src/graph/kg/extraction/code/plugin-engine.js +573 -0
  202. package/dist/src/graph/kg/extraction/code/plugin-engine.js.map +1 -0
  203. package/dist/src/graph/kg/extraction/code/plugin-types.d.ts +95 -0
  204. package/dist/src/graph/kg/extraction/code/plugin-types.d.ts.map +1 -0
  205. package/dist/src/graph/kg/extraction/code/plugin-types.js +5 -0
  206. package/dist/src/graph/kg/extraction/code/plugin-types.js.map +1 -0
  207. package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
  208. package/dist/src/graph/kg/extraction/orchestrator.js +17 -5
  209. package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
  210. package/dist/src/graph/kg/schema.sql +16 -11
  211. package/dist/src/graph/kg/surface/cli.d.ts.map +1 -1
  212. package/dist/src/graph/kg/surface/cli.js +153 -56
  213. package/dist/src/graph/kg/surface/cli.js.map +1 -1
  214. package/dist/src/hooks/workspace.d.ts +4 -2
  215. package/dist/src/hooks/workspace.d.ts.map +1 -1
  216. package/dist/src/hooks/workspace.js +6 -2
  217. package/dist/src/hooks/workspace.js.map +1 -1
  218. package/package.json +91 -91
  219. package/workflows/analyze.md +25 -49
  220. package/workflows/auto-test.md +699 -699
  221. package/workflows/blueprint.md +403 -431
  222. package/workflows/brainstorm.md +54 -195
  223. package/workflows/business-test.md +570 -570
  224. package/workflows/claude-instructions.md +23 -51
  225. package/workflows/codex-instructions.md +27 -77
  226. package/workflows/coding-philosophy.md +69 -69
  227. package/workflows/command-authoring.md +823 -823
  228. package/workflows/debug.md +43 -98
  229. package/workflows/delegate-usage.md +39 -241
  230. package/workflows/execute.md +4 -53
  231. package/workflows/grill.md +12 -56
  232. package/workflows/harvest.md +22 -68
  233. package/workflows/init.md +148 -148
  234. package/workflows/instruction-authoring-guide.md +97 -0
  235. package/workflows/issue-execute.md +110 -110
  236. package/workflows/issue-gaps-analyze.codex.md +260 -260
  237. package/workflows/issue-gaps-analyze.md +216 -216
  238. package/workflows/issue-plan.md +110 -110
  239. package/workflows/issue.md +338 -346
  240. package/workflows/knowhow.md +0 -32
  241. package/workflows/learn.md +277 -277
  242. package/workflows/maestro-chain-execute.md +20 -20
  243. package/workflows/refactor.md +22 -44
  244. package/workflows/retrospective.md +16 -65
  245. package/workflows/review.md +446 -486
  246. package/workflows/roadmap.md +35 -132
  247. package/workflows/skill-authoring.md +265 -265
  248. package/workflows/spec-generate.md +470 -470
  249. package/workflows/specs-remove.md +104 -104
  250. package/workflows/sync.md +11 -41
  251. package/workflows/test-gen.md +226 -226
  252. package/workflows/test.md +385 -475
  253. package/workflows/ui-design.md +391 -391
  254. package/workflows/ui-style.md +199 -199
  255. package/workflows/wiki-connect.md +151 -151
  256. package/workflows/wiki-digest.md +178 -178
  257. package/workflows/wiki-manage.md +109 -109
  258. package/workflows/cli-tools-usage.md +0 -252
  259. package/workflows/delegate-protocol.codex.md +0 -65
@@ -1,7 +1,5 @@
1
1
  # Maestro
2
2
 
3
- Workflow orchestration CLI with MCP endpoint support and extensible architecture.
4
-
5
3
  - **Coding Philosophy**: @~/.maestro/workflows/coding-philosophy.md
6
4
 
7
5
  ## Delegate & CLI
@@ -11,64 +9,38 @@ Workflow orchestration CLI with MCP endpoint support and extensible architecture
11
9
 
12
10
  **Strictly follow the cli-tools.json configuration**
13
11
 
14
- Available CLI endpoints are dynamically defined by the config file
15
-
16
- ## Code Diagnostics
17
-
18
- - **Prefer `mcp__ide__getDiagnostics`** for code error checking over shell-based TypeScript compilation
19
-
20
12
  ## Knowledge System
21
13
 
22
- ### Design Principles
23
-
24
- - **Single search entry** — `maestro search` is the only user-facing search command
25
- - **Silent-skip-is-bug** — if knowledge exists but search misses it, that is a defect
26
- - **Layer 2 auto-injection** — agents receive specs via hooks, rarely need manual `spec load`
27
-
28
- ### Search — Three-Layer Architecture
29
-
30
- **Before planning or implementing, search first.** Load the right knowledge at the right time.
31
-
32
- | Layer | Command | When to Use |
33
- |-------|---------|-------------|
34
- | **1. Unified** | `maestro search "<query>" [--type spec\|knowhow\|issue] [--category <cat>]` | Daily search — BM25 full-text across all knowledge types |
35
- | **2. Agent injection** | `maestro spec load --category <cat> [--keyword <kw>]` | Domain rules for implementation (auto-injected by hooks) |
36
- | **3. Code structure** | `maestro kg search <symbol>` / `maestro kg context <node>` | Tracing dependencies, call chains, module boundaries |
37
-
38
- **Deprecated** (do not use): `spec search`, `knowhow search`, `wiki search` — all replaced by Layer 1.
39
-
40
- KG stays fresh via hooks (`kg-sync` on UserPromptSubmit, `kg-context-injector` on Agent spawn). Manual `maestro kg index --sqlite` only needed on initial setup.
14
+ **ALWAYS search before acting.** Never assume context is pre-loaded.
41
15
 
42
- ### Proactive Search — Mandatory Triggers
16
+ ### Search Commands
43
17
 
44
- Search is **not optional**. Execute these commands before acting in the corresponding scenarios:
18
+ | Layer | Command | Purpose |
19
+ |-------|---------|---------|
20
+ | **1. Unified** | `maestro search "<query>" [--type spec\|knowhow\|issue] [--category <cat>]` | All knowledge types |
21
+ | **2. Domain rules** | `maestro spec load --category <cat> [--keyword <kw>]` | Load rules before coding |
22
+ | **3. Code structure** | `maestro kg search <symbol>` / `maestro kg context <node>` | Dependencies, call chains |
45
23
 
46
- | Trigger Condition | Command | Purpose |
47
- |---|---|---|
48
- | Starting any implementation task | `maestro search "<feature/module keywords>"` | Load relevant specs, knowhow, existing issues |
49
- | Encountering unknown symbol/module | `maestro kg search "<symbol>"` | Understand code structure and dependencies |
50
- | Understanding module boundaries | `maestro kg context <file-or-symbol>` | Get callers, callees, related code |
51
- | Making architecture decisions | `maestro search --type spec --category arch` | Load architecture constraints |
52
- | Debugging unfamiliar code | `maestro kg callers <function>` / `maestro kg callees <function>` | Trace call chains |
53
- | Before writing tests | `maestro search --type spec --category test "<module>"` | Load test patterns and requirements |
54
- | Before refactoring | `maestro kg search "<module>" --code` | Map impact radius before changes |
24
+ Do not use deprecated commands: `spec search`, `knowhow search`, `wiki search`.
55
25
 
56
- ### FallbackWhen Hooks Are Not Firing
26
+ ### Proactive Search ALWAYS Execute
57
27
 
58
- If automatic injection seems absent (no `<maestro-context>` blocks appearing):
28
+ **L0 Every task, no exceptions:**
29
+ - `maestro search "<feature/module keywords>"`
59
30
 
60
- 1. Check hook status: `maestro hooks status`
61
- 2. Sync graph manually: `maestro kg sync`
62
- 3. Search directly: `maestro search "<query>"` or `maestro kg search "<symbol>"`
63
- 4. Reinstall hooks if needed: `maestro hooks install --level standard`
31
+ **L1 Unfamiliar code:**
32
+ - `maestro kg search "<symbol>"`
33
+ - `maestro kg context <file-or-symbol>`
64
34
 
65
- ### Record Capture Knowledge
35
+ **L2Architecture / debugging / refactoring / tests:**
36
+ - `maestro search --type spec --category arch`
37
+ - `maestro kg callers <fn>` / `maestro kg callees <fn>` (注意: `--json` 返回 `{node, callers/callees: [...]}` 对象,非数组)
38
+ - `maestro search --type spec --category test "<module>"`
39
+ - `maestro kg search "<module>" --code`
66
40
 
67
- When execution surfaces non-obvious knowledge, persist it:
41
+ ### Record
68
42
 
69
- - **Spec entry** (short rule/constraint) → `/spec-add <category> "title" "content" --keywords kw1,kw2 --description "summary"`
70
- - **Knowhow document** (detailed recipe/template/decision) → `/manage-knowhow-capture`
71
- - Use `--spec-category <cat>` to bridge knowhow into agent injection
72
- - Files use `{PREFIX}-{YYYYMMDD}-{slug}.md` naming for readable filenames
43
+ - **Spec** → `/spec-add <category> "title" "content" --keywords kw1,kw2 --description "summary"`
44
+ - **Knowhow** → `/manage-knowhow-capture` (use `--spec-category <cat>` to bridge into agent injection)
73
45
 
74
- Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, test strategy→`test`.
46
+ Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, tests→`test`.
@@ -6,99 +6,49 @@
6
6
 
7
7
  **Strictly follow the cli-tools.json configuration**
8
8
 
9
- Available CLI endpoints are dynamically defined by the config file
10
-
11
- ## Code Quality Standards
12
-
13
- ### Code Quality
14
- - Follow project's existing patterns
15
- - Match import style and naming conventions
16
- - Single responsibility per function/class
17
- - DRY (Don't Repeat Yourself)
18
- - YAGNI (You Aren't Gonna Need It)
19
-
20
- ### Testing
21
- - Test all public functions
22
- - Test edge cases and error conditions
23
- - Mock external dependencies
24
- - Target 80%+ coverage
25
-
26
- ### Error Handling
27
- - Proper try-catch blocks
28
- - Clear error messages
29
- - Graceful degradation
30
- - Don't expose sensitive info
31
-
32
9
  ## Core Principles
33
10
 
34
- **Incremental Progress**:
35
- - Small, testable changes
36
- - Commit working code frequently
37
- - Build on previous work (subtasks)
38
-
39
- **Evidence-Based**:
11
+ - Follow project's existing patterns and conventions
12
+ - Single responsibility, DRY, YAGNI
13
+ - Small testable changes, commit frequently
40
14
  - Study 3+ similar patterns before implementing
41
- - Match project style exactly
42
- - Verify with existing code
43
-
44
- **Pragmatic**:
45
15
  - Boring solutions over clever code
46
- - Simple over complex
47
- - Adapt to project reality
48
-
49
- **Context Continuity** (Multi-Task):
50
- - Leverage resume for consistency
51
- - Maintain established patterns
52
- - Test integration between subtasks
53
16
 
54
- **Git Operations** (Parallel Task Safety):
55
- - Only stage/commit files directly produced by current task
56
- - Never touch unrelated changes or other task outputs
17
+ **Git Operations:**
18
+ - Only stage/commit files produced by current task
57
19
  - Use `git add <specific-files>` instead of `git add .`
58
- - Verify staged files before commit to avoid cross-task conflicts
59
-
60
- **Multi-CLI Coexistence** (CRITICAL):
61
- - If your task conflicts with existing uncommitted changes, **STOP and report the conflict** instead of overwriting
62
- - Treat all pre-existing uncommitted changes as intentional work-in-progress by other tools
63
20
 
21
+ **Multi-CLI Coexistence (CRITICAL):**
22
+ - Conflicts with uncommitted changes → **STOP and report**, never overwrite
64
23
 
65
24
  ## Knowledge System
66
25
 
67
- ### Search Query Before Acting
68
-
69
- **Before planning or implementing any task, search wiki and spec first** — the knowledge base contains reusable methods, tools, and hard-won experience. Load the right knowledge at the right time: search before you plan, load relevant entries before you implement, and revisit when you hit unfamiliar territory mid-task.
70
-
71
- - `maestro search "<query>" [--type spec|knowhow|issue] [--category <cat>]` — BM25 full-text across all knowledge types
72
- - `maestro spec load --category <cat>` — load rules by category (coding/arch/debug/test/review/learning)
73
- - `maestro spec load --keyword <kw>` — cross-category keyword match
74
- ### Proactive Search — Mandatory Triggers
26
+ **ALWAYS search before acting.** Never assume context is pre-loaded.
75
27
 
76
- Search is **not optional**. Execute these commands before acting in the corresponding scenarios:
28
+ ### Search Commands
77
29
 
78
- | Trigger Condition | Command | Purpose |
79
- |---|---|---|
80
- | Starting any implementation task | `maestro search "<feature/module keywords>"` | Load relevant specs, knowhow, existing issues |
81
- | Encountering unknown symbol/module | `maestro kg search "<symbol>"` | Understand code structure and dependencies |
82
- | Understanding module boundaries | `maestro kg context <file-or-symbol>` | Get callers, callees, related code |
83
- | Making architecture decisions | `maestro search --type spec --category arch` | Load architecture constraints |
84
- | Debugging unfamiliar code | `maestro kg callers <function>` / `maestro kg callees <function>` | Trace call chains |
85
- | Before writing tests | `maestro search --type spec --category test "<module>"` | Load test patterns and requirements |
86
- | Before refactoring | `maestro kg search "<module>" --code` | Map impact radius before changes |
30
+ - `maestro search "<query>" [--type spec|knowhow|issue] [--category <cat>]`
31
+ - `maestro spec load --category <cat>` / `--keyword <kw>`
32
+ - `maestro kg search <symbol>` / `maestro kg context <node>`
87
33
 
88
- ### FallbackWhen Hooks Are Not Firing
34
+ ### Proactive Search ALWAYS Execute
89
35
 
90
- If automatic injection seems absent (no `<maestro-context>` blocks appearing):
36
+ **L0 Every task, no exceptions:**
37
+ - `maestro search "<feature/module keywords>"`
91
38
 
92
- 1. Check hook status: `maestro hooks status`
93
- 2. Sync graph manually: `maestro kg sync`
94
- 3. Search directly: `maestro search "<query>"` or `maestro kg search "<symbol>"`
95
- 4. Reinstall hooks if needed: `maestro hooks install --level standard`
39
+ **L1 Unfamiliar code:**
40
+ - `maestro kg search "<symbol>"`
41
+ - `maestro kg context <file-or-symbol>`
96
42
 
97
- ### Knowledge Capture
43
+ **L2 Architecture / debugging / refactoring / tests:**
44
+ - `maestro search --type spec --category arch`
45
+ - `maestro kg callers <fn>` / `maestro kg callees <fn>` (注意: `--json` 返回 `{node, callers/callees: [...]}` 对象,非数组)
46
+ - `maestro search --type spec --category test "<module>"`
47
+ - `maestro kg search "<module>" --code`
98
48
 
99
- - **Spec writes** → always `<spec-entry>` closed-tag format with `title`, `description`, `category`, `keywords`, `date`, `source`. Never raw Markdown. Route through `spec-add` when possible.
100
- - **Capture signal** → when execution surfaces non-obvious knowledge (plan deviation, retry pattern, root cause, constraint violation), ask user once whether to persist it. Match category to content: decisions→`arch`, pitfalls→`debug`/`learning`, patterns→`coding`, rules→`quality`.
101
- - **Promotion** → at milestone close, scan learnings for repeated keywords (≥2 entries) and offer to graduate them into formal conventions.
102
- - **Traceability** → every entry needs a source anchor: `file:line`, `INS-{id}`, commit, or phase path.
49
+ ### Record
103
50
 
51
+ - **Spec** → `/spec-add <category> "title" "content" --keywords kw1,kw2 --description "summary"`
52
+ - **Knowhow** → persist non-obvious knowledge (deviations, root causes, constraints)
104
53
 
54
+ Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, tests→`test`.
@@ -1,70 +1,70 @@
1
- # Coding Philosophy
2
-
3
- ## Core Beliefs
4
-
5
- - **Pursue good taste** - Eliminate edge cases to make code logic natural and elegant
6
- - **Embrace extreme simplicity** - Complexity is the root of all evil
7
- - **Be pragmatic** - Code must solve real-world problems, not hypothetical ones
8
- - **Data structures first** - Bad programmers worry about code; good programmers worry about data structures
9
- - **Never break backward compatibility** - Existing functionality is sacred and inviolable
10
- - **Incremental progress over big bangs** - Small changes that compile and pass tests
11
- - **Learning from existing code** - Study and plan before implementing
12
- - **Clear intent over clever code** - Be boring and obvious
13
- - **Follow existing code style** - Match import patterns, naming conventions, and formatting of existing codebase
14
- - **Minimize changes** - Only modify what's directly required; avoid refactoring, adding features, or "improving" code beyond the request
15
- - **No unsolicited documentation** - NEVER generate reports, documentation files, or summaries without explicit user request. If required, save to .workflow/.scratchpad/
16
-
17
- ## Simplicity Means
18
-
19
- - Single responsibility per function/class
20
- - Avoid premature abstractions
21
- - No clever tricks - choose the boring solution
22
- - If you need to explain it, it's too complex
23
-
24
- ## Fix, Don't Hide
25
-
26
- **Solve problems, don't silence symptoms** - Skipped tests, `@ts-ignore`, empty catch, `as any`, excessive timeouts = hiding bugs, not fixing them
27
-
28
- **NEVER**:
29
- - Make assumptions - verify with existing code
30
- - Generate reports, summaries, or documentation files without explicit user request
31
- - Use suppression mechanisms (`skip`, `ignore`, `disable`) without fixing root cause
32
-
33
- **ALWAYS**:
34
- - Plan complex tasks thoroughly before implementation
35
- - Generate task decomposition for multi-module work (>3 modules or >5 subtasks)
36
- - Track progress using TODO checklists for complex tasks
37
- - Validate planning documents before starting development
38
- - Commit working code incrementally
39
- - Update plan documentation and progress tracking as you go
40
- - Learn from existing implementations
41
- - Stop after 3 failed attempts and reassess
42
- - **Edit fallback**: When Edit tool fails 2+ times on same file, try Bash sed/awk first, then Write to recreate if still failing
43
-
44
- ## Learning the Codebase
45
-
46
- - Find 3 similar features/components
47
- - Identify common patterns and conventions
48
- - Use same libraries/utilities when possible
49
- - Follow existing test patterns
50
-
51
- ## Tooling
52
-
53
- - Use project's existing build system
54
- - Use project's test framework
55
- - Use project's formatter/linter settings
56
- - Don't introduce new tools without strong justification
57
-
58
- ## Content Uniqueness Rules
59
-
60
- - **Each layer owns its abstraction level** - no content sharing between layers
61
- - **Reference, don't duplicate** - point to other layers, never copy content
62
- - **Maintain perspective** - each layer sees the system at its appropriate scale
63
- - **Avoid implementation creep** - higher layers stay architectural
64
-
65
- # Context Requirements
66
-
67
- Before implementation, always:
68
- - Identify 3+ existing similar patterns
69
- - Map dependencies and integration points
1
+ # Coding Philosophy
2
+
3
+ ## Core Beliefs
4
+
5
+ - **Pursue good taste** - Eliminate edge cases to make code logic natural and elegant
6
+ - **Embrace extreme simplicity** - Complexity is the root of all evil
7
+ - **Be pragmatic** - Code must solve real-world problems, not hypothetical ones
8
+ - **Data structures first** - Bad programmers worry about code; good programmers worry about data structures
9
+ - **Never break backward compatibility** - Existing functionality is sacred and inviolable
10
+ - **Incremental progress over big bangs** - Small changes that compile and pass tests
11
+ - **Learning from existing code** - Study and plan before implementing
12
+ - **Clear intent over clever code** - Be boring and obvious
13
+ - **Follow existing code style** - Match import patterns, naming conventions, and formatting of existing codebase
14
+ - **Minimize changes** - Only modify what's directly required; avoid refactoring, adding features, or "improving" code beyond the request
15
+ - **No unsolicited documentation** - NEVER generate reports, documentation files, or summaries without explicit user request. If required, save to .workflow/.scratchpad/
16
+
17
+ ## Simplicity Means
18
+
19
+ - Single responsibility per function/class
20
+ - Avoid premature abstractions
21
+ - No clever tricks - choose the boring solution
22
+ - If you need to explain it, it's too complex
23
+
24
+ ## Fix, Don't Hide
25
+
26
+ **Solve problems, don't silence symptoms** - Skipped tests, `@ts-ignore`, empty catch, `as any`, excessive timeouts = hiding bugs, not fixing them
27
+
28
+ **NEVER**:
29
+ - Make assumptions - verify with existing code
30
+ - Generate reports, summaries, or documentation files without explicit user request
31
+ - Use suppression mechanisms (`skip`, `ignore`, `disable`) without fixing root cause
32
+
33
+ **ALWAYS**:
34
+ - Plan complex tasks thoroughly before implementation
35
+ - Generate task decomposition for multi-module work (>3 modules or >5 subtasks)
36
+ - Track progress using TODO checklists for complex tasks
37
+ - Validate planning documents before starting development
38
+ - Commit working code incrementally
39
+ - Update plan documentation and progress tracking as you go
40
+ - Learn from existing implementations
41
+ - Stop after 3 failed attempts and reassess
42
+ - **Edit fallback**: When Edit tool fails 2+ times on same file, try Bash sed/awk first, then Write to recreate if still failing
43
+
44
+ ## Learning the Codebase
45
+
46
+ - Find 3 similar features/components
47
+ - Identify common patterns and conventions
48
+ - Use same libraries/utilities when possible
49
+ - Follow existing test patterns
50
+
51
+ ## Tooling
52
+
53
+ - Use project's existing build system
54
+ - Use project's test framework
55
+ - Use project's formatter/linter settings
56
+ - Don't introduce new tools without strong justification
57
+
58
+ ## Content Uniqueness Rules
59
+
60
+ - **Each layer owns its abstraction level** - no content sharing between layers
61
+ - **Reference, don't duplicate** - point to other layers, never copy content
62
+ - **Maintain perspective** - each layer sees the system at its appropriate scale
63
+ - **Avoid implementation creep** - higher layers stay architectural
64
+
65
+ # Context Requirements
66
+
67
+ Before implementation, always:
68
+ - Identify 3+ existing similar patterns
69
+ - Map dependencies and integration points
70
70
  - Understand testing framework and coding conventions