maestro-flow 0.5.33 → 0.5.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/.agents/agents/role-design-author.md +5 -3
  2. package/.agents/agents/workflow-collab-planner.md +1 -0
  3. package/.agents/agents/workflow-planner.md +2 -0
  4. package/.agents/skills/maestro/SKILL.md +8 -1
  5. package/.agents/skills/maestro-help/SKILL.md +39 -10
  6. package/.agents/skills/maestro-help/index/catalog.json +117 -53
  7. package/.agents/skills/maestro-help/phases/01-parse-intent.md +9 -6
  8. package/.agents/skills/maestro-help/phases/02-search-present.md +55 -15
  9. package/.agents/skills/maestro-help/phases/03-workflow-guide.md +35 -2
  10. package/.agents/skills/maestro-plan/SKILL.md +3 -1
  11. package/.agents/skills/maestro-ralph/SKILL.md +55 -19
  12. package/.agents/skills/maestro-ralph-execute/SKILL.md +52 -10
  13. package/.agents/skills/manage-harvest/SKILL.md +3 -0
  14. package/.agents/skills/manage-knowledge-audit/SKILL.md +29 -0
  15. package/.agents/skills/odyssey-debug/SKILL.md +7 -1
  16. package/.agents/skills/odyssey-improve/SKILL.md +7 -1
  17. package/.agents/skills/odyssey-planex/SKILL.md +11 -1
  18. package/.agents/skills/odyssey-review-test-fix/SKILL.md +7 -1
  19. package/.agents/skills/odyssey-ui/SKILL.md +7 -1
  20. package/.agents/skills/quality-review/SKILL.md +3 -0
  21. package/.agents/skills/quality-test/SKILL.md +27 -1
  22. package/.agy/agents/role-design-author.md +5 -3
  23. package/.agy/agents/workflow-collab-planner.md +1 -0
  24. package/.agy/agents/workflow-planner.md +2 -0
  25. package/.agy/skills/maestro/SKILL.md +8 -1
  26. package/.agy/skills/maestro-help/SKILL.md +39 -10
  27. package/.agy/skills/maestro-help/index/catalog.json +117 -53
  28. package/.agy/skills/maestro-help/phases/01-parse-intent.md +9 -6
  29. package/.agy/skills/maestro-help/phases/02-search-present.md +55 -15
  30. package/.agy/skills/maestro-help/phases/03-workflow-guide.md +35 -2
  31. package/.agy/skills/maestro-plan/SKILL.md +3 -1
  32. package/.agy/skills/maestro-ralph/SKILL.md +55 -19
  33. package/.agy/skills/maestro-ralph-execute/SKILL.md +52 -10
  34. package/.agy/skills/manage-harvest/SKILL.md +3 -0
  35. package/.agy/skills/manage-knowledge-audit/SKILL.md +29 -0
  36. package/.agy/skills/odyssey-debug/SKILL.md +7 -1
  37. package/.agy/skills/odyssey-improve/SKILL.md +7 -1
  38. package/.agy/skills/odyssey-planex/SKILL.md +11 -1
  39. package/.agy/skills/odyssey-review-test-fix/SKILL.md +7 -1
  40. package/.agy/skills/odyssey-ui/SKILL.md +7 -1
  41. package/.agy/skills/quality-review/SKILL.md +3 -0
  42. package/.agy/skills/quality-test/SKILL.md +27 -1
  43. package/.claude/agents/role-design-author.md +5 -3
  44. package/.claude/agents/workflow-collab-planner.md +1 -0
  45. package/.claude/agents/workflow-planner.md +2 -0
  46. package/.claude/commands/maestro-plan.md +3 -1
  47. package/.claude/commands/maestro-ralph-execute.md +52 -10
  48. package/.claude/commands/maestro-ralph.md +55 -19
  49. package/.claude/commands/maestro.md +8 -1
  50. package/.claude/commands/manage-harvest.md +3 -0
  51. package/.claude/commands/manage-knowledge-audit.md +29 -0
  52. package/.claude/commands/odyssey-debug.md +7 -1
  53. package/.claude/commands/odyssey-improve.md +7 -1
  54. package/.claude/commands/odyssey-planex.md +11 -1
  55. package/.claude/commands/odyssey-review-test-fix.md +7 -1
  56. package/.claude/commands/odyssey-ui.md +7 -1
  57. package/.claude/commands/quality-review.md +3 -0
  58. package/.claude/commands/quality-test.md +27 -1
  59. package/.claude/skills/maestro-help/SKILL.md +39 -10
  60. package/.claude/skills/maestro-help/index/catalog.json +117 -53
  61. package/.claude/skills/maestro-help/phases/01-parse-intent.md +9 -6
  62. package/.claude/skills/maestro-help/phases/02-search-present.md +55 -15
  63. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +35 -2
  64. package/.codex/skills/maestro/SKILL.md +17 -2
  65. package/.codex/skills/maestro-analyze/SKILL.md +20 -3
  66. package/.codex/skills/maestro-brainstorm/SKILL.md +30 -4
  67. package/.codex/skills/maestro-execute/SKILL.md +25 -3
  68. package/.codex/skills/maestro-grill/SKILL.md +9 -0
  69. package/.codex/skills/maestro-plan/SKILL.md +26 -3
  70. package/.codex/skills/maestro-ralph/SKILL.md +6 -0
  71. package/.codex/skills/maestro-ralph-execute/SKILL.md +51 -10
  72. package/.codex/skills/maestro-roadmap/SKILL.md +30 -1
  73. package/.codex/skills/manage-harvest/SKILL.md +2 -1
  74. package/.codex/skills/quality-review/SKILL.md +13 -2
  75. package/README.md +219 -87
  76. package/README.zh-CN.md +221 -79
  77. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +82 -0
  78. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +444 -0
  79. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -0
  80. package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js +9 -4
  81. package/dashboard/dist-server/dashboard/src/server/wiki/graph-analysis.js.map +1 -1
  82. package/dashboard/dist-server/dashboard/src/server/wiki/search.d.ts +54 -5
  83. package/dashboard/dist-server/dashboard/src/server/wiki/search.js +420 -46
  84. package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
  85. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +16 -0
  86. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
  87. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +14 -4
  88. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +130 -49
  89. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  90. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +64 -22
  91. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
  92. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +12 -12
  93. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
  94. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +10 -3
  95. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
  96. package/dashboard/dist-server/src/commands/hooks.d.ts +3 -0
  97. package/dashboard/dist-server/src/commands/hooks.js +11 -8
  98. package/dashboard/dist-server/src/commands/hooks.js.map +1 -1
  99. package/dashboard/dist-server/src/graph/kg/db/types.d.ts +2 -1
  100. package/dashboard/dist-server/src/graph/kg/db/types.js.map +1 -1
  101. package/dashboard/dist-server/src/graph/kg/extraction/code/code-extractor.js +1 -1
  102. package/dashboard/dist-server/src/graph/kg/extraction/code/code-extractor.js.map +1 -1
  103. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.d.ts +22 -0
  104. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.js +64 -0
  105. package/dashboard/dist-server/src/graph/kg/extraction/knowledge-extractor-registry.js.map +1 -0
  106. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js +14 -104
  107. package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js.map +1 -1
  108. package/dashboard/dist-server/src/hooks/keyword-spec-injector.js +5 -2
  109. package/dashboard/dist-server/src/hooks/keyword-spec-injector.js.map +1 -1
  110. package/dashboard/dist-server/src/hooks/wiki-role-loader.js +2 -1
  111. package/dashboard/dist-server/src/hooks/wiki-role-loader.js.map +1 -1
  112. package/dashboard/dist-server/src/tools/domain-loader.js +22 -16
  113. package/dashboard/dist-server/src/tools/domain-loader.js.map +1 -1
  114. package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +6 -1
  115. package/dashboard/dist-server/src/tools/spec-entry-parser.js +44 -13
  116. package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
  117. package/dashboard/dist-server/src/tools/spec-keyword-index.d.ts +2 -0
  118. package/dashboard/dist-server/src/tools/spec-keyword-index.js +4 -9
  119. package/dashboard/dist-server/src/tools/spec-keyword-index.js.map +1 -1
  120. package/dashboard/dist-server/src/tools/spec-loader.js +3 -11
  121. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  122. package/dashboard/dist-server/src/types/index.d.ts +14 -0
  123. package/dashboard/dist-server/src/utils/frontmatter.d.ts +15 -0
  124. package/dashboard/dist-server/src/utils/frontmatter.js +76 -0
  125. package/dashboard/dist-server/src/utils/frontmatter.js.map +1 -0
  126. package/dist/src/cli.js +1 -0
  127. package/dist/src/cli.js.map +1 -1
  128. package/dist/src/commands/domain.d.ts.map +1 -1
  129. package/dist/src/commands/domain.js +8 -2
  130. package/dist/src/commands/domain.js.map +1 -1
  131. package/dist/src/commands/hooks.d.ts +3 -0
  132. package/dist/src/commands/hooks.d.ts.map +1 -1
  133. package/dist/src/commands/hooks.js +11 -8
  134. package/dist/src/commands/hooks.js.map +1 -1
  135. package/dist/src/commands/install.d.ts.map +1 -1
  136. package/dist/src/commands/install.js +48 -11
  137. package/dist/src/commands/install.js.map +1 -1
  138. package/dist/src/commands/knowhow.d.ts.map +1 -1
  139. package/dist/src/commands/knowhow.js +3 -26
  140. package/dist/src/commands/knowhow.js.map +1 -1
  141. package/dist/src/commands/search.d.ts +6 -1
  142. package/dist/src/commands/search.d.ts.map +1 -1
  143. package/dist/src/commands/search.js +124 -52
  144. package/dist/src/commands/search.js.map +1 -1
  145. package/dist/src/commands/spec.d.ts.map +1 -1
  146. package/dist/src/commands/spec.js +106 -6
  147. package/dist/src/commands/spec.js.map +1 -1
  148. package/dist/src/commands/uninstall.d.ts.map +1 -1
  149. package/dist/src/commands/uninstall.js +12 -3
  150. package/dist/src/commands/uninstall.js.map +1 -1
  151. package/dist/src/commands/update.d.ts.map +1 -1
  152. package/dist/src/commands/update.js +37 -21
  153. package/dist/src/commands/update.js.map +1 -1
  154. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  155. package/dist/src/config/cli-tools-config.js +2 -0
  156. package/dist/src/config/cli-tools-config.js.map +1 -1
  157. package/dist/src/core/extension-loader.d.ts.map +1 -1
  158. package/dist/src/core/extension-loader.js +4 -0
  159. package/dist/src/core/extension-loader.js.map +1 -1
  160. package/dist/src/core/install-executor.d.ts.map +1 -1
  161. package/dist/src/core/install-executor.js +8 -3
  162. package/dist/src/core/install-executor.js.map +1 -1
  163. package/dist/src/graph/analyzers/fs-analyzer.js +2 -2
  164. package/dist/src/graph/analyzers/fs-analyzer.js.map +1 -1
  165. package/dist/src/graph/kg/db/node-kind-registry.d.ts +18 -0
  166. package/dist/src/graph/kg/db/node-kind-registry.d.ts.map +1 -0
  167. package/dist/src/graph/kg/db/node-kind-registry.js +42 -0
  168. package/dist/src/graph/kg/db/node-kind-registry.js.map +1 -0
  169. package/dist/src/graph/kg/db/types.d.ts +2 -1
  170. package/dist/src/graph/kg/db/types.d.ts.map +1 -1
  171. package/dist/src/graph/kg/db/types.js.map +1 -1
  172. package/dist/src/graph/kg/extraction/code/code-extractor.js +1 -1
  173. package/dist/src/graph/kg/extraction/code/code-extractor.js.map +1 -1
  174. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.d.ts +23 -0
  175. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.d.ts.map +1 -0
  176. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.js +64 -0
  177. package/dist/src/graph/kg/extraction/knowledge-extractor-registry.js.map +1 -0
  178. package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
  179. package/dist/src/graph/kg/extraction/orchestrator.js +14 -104
  180. package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
  181. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
  182. package/dist/src/hooks/keyword-spec-injector.js +5 -2
  183. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  184. package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -1
  185. package/dist/src/hooks/wiki-role-loader.js +2 -1
  186. package/dist/src/hooks/wiki-role-loader.js.map +1 -1
  187. package/dist/src/index.d.ts +6 -0
  188. package/dist/src/index.d.ts.map +1 -1
  189. package/dist/src/index.js +4 -0
  190. package/dist/src/index.js.map +1 -1
  191. package/dist/src/ralph/cmd-next.d.ts.map +1 -1
  192. package/dist/src/ralph/cmd-next.js +2 -3
  193. package/dist/src/ralph/cmd-next.js.map +1 -1
  194. package/dist/src/tools/domain-loader.d.ts.map +1 -1
  195. package/dist/src/tools/domain-loader.js +22 -16
  196. package/dist/src/tools/domain-loader.js.map +1 -1
  197. package/dist/src/tools/spec-conflict-marker.d.ts +55 -0
  198. package/dist/src/tools/spec-conflict-marker.d.ts.map +1 -0
  199. package/dist/src/tools/spec-conflict-marker.js +228 -0
  200. package/dist/src/tools/spec-conflict-marker.js.map +1 -0
  201. package/dist/src/tools/spec-entry-parser.d.ts +6 -1
  202. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  203. package/dist/src/tools/spec-entry-parser.js +44 -13
  204. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  205. package/dist/src/tools/spec-keyword-index.d.ts +2 -0
  206. package/dist/src/tools/spec-keyword-index.d.ts.map +1 -1
  207. package/dist/src/tools/spec-keyword-index.js +4 -9
  208. package/dist/src/tools/spec-keyword-index.js.map +1 -1
  209. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  210. package/dist/src/tools/spec-loader.js +3 -11
  211. package/dist/src/tools/spec-loader.js.map +1 -1
  212. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  213. package/dist/src/tools/spec-writer.js +2 -6
  214. package/dist/src/tools/spec-writer.js.map +1 -1
  215. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  216. package/dist/src/tools/store-knowhow.js +6 -52
  217. package/dist/src/tools/store-knowhow.js.map +1 -1
  218. package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts.map +1 -1
  219. package/dist/src/tui/uninstall-ui/UninstallFlow.js +3 -1
  220. package/dist/src/tui/uninstall-ui/UninstallFlow.js.map +1 -1
  221. package/dist/src/types/index.d.ts +14 -0
  222. package/dist/src/types/index.d.ts.map +1 -1
  223. package/dist/src/utils/frontmatter.d.ts +16 -0
  224. package/dist/src/utils/frontmatter.d.ts.map +1 -0
  225. package/dist/src/utils/frontmatter.js +76 -0
  226. package/dist/src/utils/frontmatter.js.map +1 -0
  227. package/dist/src/utils/migration-registry.d.ts.map +1 -1
  228. package/dist/src/utils/migration-registry.js +14 -1
  229. package/dist/src/utils/migration-registry.js.map +1 -1
  230. package/package.json +5 -3
  231. package/workflows/claude-instructions.md +63 -45
  232. package/workflows/codex-instructions.md +105 -28
  233. package/workflows/command-authoring.md +1 -1
  234. package/workflows/plan.md +2 -1
  235. package/.agents/skills/maestro-ralph-beta/SKILL.md +0 -877
  236. package/.agy/skills/maestro-ralph-beta/SKILL.md +0 -873
  237. package/.claude/commands/maestro-ralph-beta.md +0 -875
  238. package/.codex/skills/maestro-ralph-beta/SKILL.md +0 -883
@@ -1,45 +1,63 @@
1
- # Maestro
2
-
3
- - **Coding Philosophy**: @~/.maestro/workflows/coding-philosophy.md
4
-
5
- ## Delegate & CLI
6
-
7
- - **Delegate Usage**: @~/.maestro/workflows/delegate-usage.md
8
- - **CLI Endpoints Config**: @~/.maestro/cli-tools.json
9
-
10
- **Strictly follow the cli-tools.json configuration**
11
-
12
- ## Knowledge System
13
-
14
- **ALWAYS search before acting.** Never assume context is pre-loaded.
15
-
16
- ### Search Commands
17
-
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 |
23
-
24
-
25
- ### Proactive Search ALWAYS Execute
26
-
27
- **L0 — Every task, no exceptions:**
28
- - `maestro search "<feature/module keywords>"`
29
-
30
- **L1 — Unfamiliar code:**
31
- - `maestro kg search "<symbol>"`
32
- - `maestro kg context <file-or-symbol>`
33
-
34
- **L2 Architecture / debugging / refactoring / tests:**
35
- - `maestro search --type spec --category arch`
36
- - `maestro kg callers <fn>` / `maestro kg callees <fn>` (注意: `--json` 返回 `{node, callers/callees: [...]}` 对象,非数组)
37
- - `maestro search --type spec --category test "<module>"`
38
- - `maestro kg search "<module>" --code`
39
-
40
- ### Record
41
-
42
- - **Spec** → `/spec-add <category> "title" "content" --keywords kw1,kw2 --description "summary"`
43
- - **Knowhow** → `/manage-knowhow-capture` (use `--spec-category <cat>` to bridge into agent injection)
44
-
45
- Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, tests→`test`.
1
+ # Maestro
2
+
3
+ - **Coding Philosophy**: @~/.maestro/workflows/coding-philosophy.md
4
+
5
+ ## Delegate & CLI
6
+
7
+ - **Delegate Usage**: @~/.maestro/workflows/delegate-usage.md
8
+ - **CLI Endpoints Config**: @~/.maestro/cli-tools.json
9
+
10
+ **Strictly follow the cli-tools.json configuration**
11
+
12
+ ## Knowledge System
13
+
14
+ **Gate rule: On any coding/modification/debugging task, run `maestro search` BEFORE reading code or editing files. Use targeted queries — multiple short searches beat one long one.**
15
+
16
+ ### Required search (every task, no exceptions)
17
+
18
+ ```bash
19
+ maestro search "<1-3 word topic phrase>"
20
+ ```
21
+
22
+ **Query rules:**
23
+ - Use **1-3 core keywords** per query — never dump all context into one search
24
+ - Separate concepts from symbols: `maestro search "topology layout"` then `maestro search "DetailedTopologySVG" --code`
25
+ - Run multiple targeted searches rather than one broad query
26
+
27
+ ```bash
28
+ # Bad: keyword dump (5+ unrelated terms → diluted BM25 scores)
29
+ maestro search "topology display frontend DetailedTopologySVG elk"
30
+
31
+ # Good: targeted multi-search
32
+ maestro search "topology layout"
33
+ maestro search "DetailedTopologySVG" --code
34
+ maestro search "elk layout" --type knowhow
35
+ ```
36
+
37
+ Then add follow-up searches based on results:
38
+ - Specific symbol/function → `maestro kg search <symbol>` or `maestro kg context <node>`
39
+ - Architecture/testing → `maestro search --type spec --category arch|test`
40
+ - Call chains → `maestro kg callers <fn>` / `maestro kg callees <fn>`
41
+ - Domain rules → `maestro spec load --category <cat> [--keyword <kw>]`
42
+
43
+ ### Record
44
+
45
+ - **Spec** `/spec-add <category> "title" "content" --keywords kw1,kw2 --description "summary"`
46
+ - **Knowhow** → `/manage-knowhow-capture` (use `--spec-category <cat>` to bridge into agent injection)
47
+
48
+ Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, tests→`test`.
49
+
50
+ ### Confidence & Conflict Marking
51
+
52
+ When search results conflict with current context, **mark the entry**:
53
+
54
+ ```bash
55
+ maestro spec conflict mark <file> <line> --note "<conflict reason>"
56
+ maestro spec conflict list # view all marked entries
57
+ ```
58
+
59
+ Confidence levels: `high` (verified) → `medium` (default) → `low` (stale) → `contested` (conflict detected).
60
+
61
+ - `contested` → 注入时排末尾,`[CONTESTED]` 标记 + 冲突说明
62
+ - `low` → `[LOW CONFIDENCE]` 标记
63
+ - 消除由 `/manage-knowledge-audit` 审查命令专门处理
@@ -1,50 +1,112 @@
1
1
  # Codex Code Guidelines
2
- ## Delegate & CLI
2
+
3
3
 
4
4
  - **Delegate Usage**: @~/.maestro/workflows/delegate-usage.md
5
5
  - **CLI Endpoints Config**: @~/.maestro/cli-tools.json
6
6
 
7
7
  **Strictly follow the cli-tools.json configuration**
8
8
 
9
- ## Core Principles
9
+ # Coding Philosophy
10
+
11
+ ## Core Beliefs
12
+
13
+ - **Pursue good taste** - Eliminate edge cases to make code logic natural and elegant
14
+ - **Embrace extreme simplicity** - Complexity is the root of all evil
15
+ - **Be pragmatic** - Code must solve real-world problems, not hypothetical ones
16
+ - **Data structures first** - Bad programmers worry about code; good programmers worry about data structures
17
+ - **Never break backward compatibility** - Existing functionality is sacred and inviolable
18
+ - **Incremental progress over big bangs** - Small changes that compile and pass tests
19
+ - **Learning from existing code** - Study and plan before implementing
20
+ - **Clear intent over clever code** - Be boring and obvious
21
+ - **Follow existing code style** - Match import patterns, naming conventions, and formatting of existing codebase
22
+ - **Minimize changes** - Only modify what's directly required; avoid refactoring, adding features, or "improving" code beyond the request
23
+ - **No unsolicited documentation** - NEVER generate reports, documentation files, or summaries without explicit user request. If required, save to .workflow/.scratchpad/
24
+
25
+ ## Simplicity Means
26
+
27
+ - Single responsibility per function/class
28
+ - Avoid premature abstractions
29
+ - No clever tricks - choose the boring solution
30
+ - If you need to explain it, it's too complex
31
+
32
+ ## Fix, Don't Hide
33
+
34
+ **Solve problems, don't silence symptoms** - Skipped tests, `@ts-ignore`, empty catch, `as any`, excessive timeouts = hiding bugs, not fixing them
35
+
36
+ **NEVER**:
37
+ - Make assumptions - verify with existing code
38
+ - Generate reports, summaries, or documentation files without explicit user request
39
+ - Use suppression mechanisms (`skip`, `ignore`, `disable`) without fixing root cause
40
+
41
+ **ALWAYS**:
42
+ - Plan complex tasks thoroughly before implementation
43
+ - Generate task decomposition for multi-module work (>3 modules or >5 subtasks)
44
+ - Track progress using TODO checklists for complex tasks
45
+ - Validate planning documents before starting development
46
+ - Commit working code incrementally
47
+ - Update plan documentation and progress tracking as you go
48
+ - Learn from existing implementations
49
+ - Stop after 3 failed attempts and reassess
50
+ - **Edit fallback**: When Edit tool fails 2+ times on same file, try Bash sed/awk first, then Write to recreate if still failing
51
+
52
+ ## Learning the Codebase
10
53
 
11
- - Follow project's existing patterns and conventions
12
- - Single responsibility, DRY, YAGNI
13
- - Small testable changes, commit frequently
14
- - Study 3+ similar patterns before implementing
15
- - Boring solutions over clever code
54
+ - Find 3 similar features/components
55
+ - Identify common patterns and conventions
56
+ - Use same libraries/utilities when possible
57
+ - Follow existing test patterns
16
58
 
17
- **Git Operations:**
18
- - Only stage/commit files produced by current task
19
- - Use `git add <specific-files>` instead of `git add .`
59
+ ## Tooling
20
60
 
21
- **Multi-CLI Coexistence (CRITICAL):**
22
- - Conflicts with uncommitted changes → **STOP and report**, never overwrite
61
+ - Use project's existing build system
62
+ - Use project's test framework
63
+ - Use project's formatter/linter settings
64
+ - Don't introduce new tools without strong justification
65
+
66
+ ## Content Uniqueness Rules
67
+
68
+ - **Each layer owns its abstraction level** - no content sharing between layers
69
+ - **Reference, don't duplicate** - point to other layers, never copy content
70
+ - **Maintain perspective** - each layer sees the system at its appropriate scale
71
+ - **Avoid implementation creep** - higher layers stay architectural
72
+
73
+ # Context Requirements
74
+
75
+ Before implementation, always:
76
+ - Identify 3+ existing similar patterns
77
+ - Map dependencies and integration points
78
+ - Understand testing framework and coding conventions
23
79
 
24
80
  ## Knowledge System
25
81
 
26
- **ALWAYS search before acting.** Never assume context is pre-loaded.
82
+ **Gate rule: On any coding/modification/debugging task, run `maestro search` BEFORE reading code or editing files. Use targeted queries — multiple short searches beat one long one.**
27
83
 
28
- ### Search Commands
84
+ ### Required search (every task, no exceptions)
29
85
 
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>`
86
+ ```bash
87
+ maestro search "<1-3 word topic phrase>"
88
+ ```
33
89
 
34
- ### Proactive Search — ALWAYS Execute
90
+ **Query rules:**
91
+ - Use **1-3 core keywords** per query — never dump all context into one search
92
+ - Separate concepts from symbols: `maestro search "topology layout"` then `maestro search "DetailedTopologySVG" --code`
93
+ - Run multiple targeted searches rather than one broad query
35
94
 
36
- **L0 — Every task, no exceptions:**
37
- - `maestro search "<feature/module keywords>"`
95
+ ```bash
96
+ # Bad: keyword dump (5+ unrelated terms → diluted BM25 scores)
97
+ maestro search "topology display frontend DetailedTopologySVG elk"
38
98
 
39
- **L1 Unfamiliar code:**
40
- - `maestro kg search "<symbol>"`
41
- - `maestro kg context <file-or-symbol>`
99
+ # Good: targeted multi-search
100
+ maestro search "topology layout"
101
+ maestro search "DetailedTopologySVG" --code
102
+ maestro search "elk layout" --type knowhow
103
+ ```
42
104
 
43
- **L2 Architecture / debugging / refactoring / tests:**
44
- - `maestro search --type spec --category arch`
45
- - `maestro kg callers <fn>` / `maestro kg callees <fn>`
46
- - `maestro search --type spec --category test "<module>"`
47
- - `maestro kg search "<module>" --code`
105
+ Then add follow-up searches based on results:
106
+ - Specific symbol/function → `maestro kg search <symbol>` or `maestro kg context <node>`
107
+ - Architecture/testing → `maestro search --type spec --category arch|test`
108
+ - Call chains → `maestro kg callers <fn>` / `maestro kg callees <fn>`
109
+ - Domain rules → `maestro spec load --category <cat> [--keyword <kw>]`
48
110
 
49
111
  ### Record
50
112
 
@@ -52,3 +114,18 @@
52
114
  - **Knowhow** → persist non-obvious knowledge (deviations, root causes, constraints)
53
115
 
54
116
  Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, tests→`test`.
117
+
118
+ ### Confidence & Conflict Marking
119
+
120
+ When search results conflict with current context, **mark the entry**:
121
+
122
+ ```bash
123
+ maestro spec conflict mark <file> <line> --note "<conflict reason>"
124
+ maestro spec conflict list # view all marked entries
125
+ ```
126
+
127
+ Confidence levels: `high` (verified) → `medium` (default) → `low` (stale) → `contested` (conflict detected).
128
+
129
+ - `contested` → 注入时排末尾,`[CONTESTED]` 标记 + 冲突说明
130
+ - `low` → `[LOW CONFIDENCE]` 标记
131
+ - 消除由 `/manage-knowledge-audit` 审查命令专门处理
@@ -526,7 +526,7 @@ The two styles are complementary: FSM orchestrators invoke pipeline commands; pi
526
526
  | Style | Commands |
527
527
  |-------|----------|
528
528
  | **Pipeline** | init, analyze, plan, execute, verify, brainstorm, grill, blueprint, roadmap, milestone-audit, milestone-complete, milestone-release |
529
- | **FSM** | ralph, ralph-execute, ralph-beta |
529
+ | **FSM** | ralph, ralph-execute |
530
530
  | **Needs evaluation** | coordinate (multi-role handoff may need FSM) |
531
531
 
532
532
  ---
package/workflows/plan.md CHANGED
@@ -261,6 +261,7 @@ Output: `plan.json` (summary, approach, task_ids[], task_count, complexity, wave
261
261
  - Group simple unrelated changes into a batch task to minimize agent spawns
262
262
  - depends_on only for genuine output dependencies; most tasks should be parallel
263
263
  - Each task must be substantial (15-60 min); sub-5-min changes must be merged
264
+ - **Vertical slice for UI**: a user-facing feature is ONE end-to-end task/wave (backend endpoint + frontend wiring + integration); never split into backend-only/frontend-only. Each UI delivery wave needs ≥1 task carrying a `[UI-observable]` convergence criterion (verifiable user flow; runtime-checked by ralph frontend-verify gate)
264
265
 
265
266
  ### Deep Work Rules (MANDATORY for all modes)
266
267
 
@@ -322,7 +323,7 @@ Bidirectional linking (main flow, post-planner): update matching issues in `.wor
322
323
 
323
324
  1. **Spawn workflow-plan-checker agent**
324
325
  - Input: plan.json + all .task/TASK-*.json + index.json (success_criteria)
325
- - Check dimensions: requirements coverage, feasibility, dependency correctness (no circular deps), convergence criteria quality (grep-verifiable, no subjective language), read_first completeness, action concreteness (no vague references), wave structure (no conflicting files), completeness (no orphan tasks)
326
+ - Check dimensions: requirements coverage, feasibility, dependency correctness (no circular deps), convergence criteria quality (grep-verifiable, no subjective language), read_first completeness, action concreteness (no vague references), wave structure (no conflicting files), completeness (no orphan tasks), UI-observable coverage (when plan touches UI: each delivery wave has ≥1 `[UI-observable]` criterion)
326
327
 
327
328
  2. **Revision loop** (max 3 rounds)
328
329
  - Critical issues → re-spawn planner with issues, revise, re-check