maestro-flow 0.5.42 → 0.5.44

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 (412) hide show
  1. package/.agents/skills/domain-add/SKILL.md +3 -0
  2. package/.agents/skills/learn-decompose/SKILL.md +7 -4
  3. package/.agents/skills/learn-follow/SKILL.md +4 -2
  4. package/.agents/skills/learn-investigate/SKILL.md +8 -6
  5. package/.agents/skills/learn-second-opinion/SKILL.md +6 -3
  6. package/.agents/skills/maestro/SKILL.md +1 -1
  7. package/.agents/skills/maestro-amend/SKILL.md +1 -1
  8. package/.agents/skills/maestro-analyze/SKILL.md +1 -1
  9. package/.agents/skills/maestro-blueprint/SKILL.md +1 -1
  10. package/.agents/skills/maestro-brainstorm/SKILL.md +4 -1
  11. package/.agents/skills/maestro-collab/SKILL.md +6 -2
  12. package/.agents/skills/maestro-companion/SKILL.md +4 -1
  13. package/.agents/skills/maestro-composer/SKILL.md +4 -2
  14. package/.agents/skills/maestro-execute/SKILL.md +26 -8
  15. package/.agents/skills/maestro-fork/SKILL.md +4 -3
  16. package/.agents/skills/maestro-grill/SKILL.md +1 -1
  17. package/.agents/skills/maestro-guard/SKILL.md +2 -2
  18. package/.agents/skills/maestro-impeccable/SKILL.md +2 -1
  19. package/.agents/skills/maestro-init/SKILL.md +1 -1
  20. package/.agents/skills/maestro-merge/SKILL.md +12 -1
  21. package/.agents/skills/maestro-milestone-audit/SKILL.md +1 -0
  22. package/.agents/skills/maestro-milestone-complete/SKILL.md +8 -3
  23. package/.agents/skills/maestro-milestone-release/SKILL.md +8 -4
  24. package/.agents/skills/maestro-overlay/SKILL.md +9 -0
  25. package/.agents/skills/maestro-plan/SKILL.md +1 -0
  26. package/.agents/skills/maestro-player/SKILL.md +2 -2
  27. package/.agents/skills/maestro-quick/SKILL.md +5 -3
  28. package/.agents/skills/maestro-ralph/SKILL.md +8 -8
  29. package/.agents/skills/maestro-ralph-agent/SKILL.md +697 -0
  30. package/.agents/skills/maestro-ralph-agent-execute/SKILL.md +461 -0
  31. package/.agents/skills/maestro-ralph-cli/SKILL.md +665 -0
  32. package/.agents/skills/maestro-ralph-cli-execute/SKILL.md +239 -0
  33. package/.agents/skills/maestro-ralph-execute/SKILL.md +127 -11
  34. package/.agents/skills/maestro-roadmap/SKILL.md +1 -1
  35. package/.agents/skills/maestro-swarm-workflow/SKILL.md +16 -14
  36. package/.agents/skills/maestro-tools-register/SKILL.md +16 -1
  37. package/.agents/skills/maestro-ui-codify/SKILL.md +11 -1
  38. package/.agents/skills/maestro-universal-workflow/SKILL.md +28 -5
  39. package/.agents/skills/maestro-update/SKILL.md +10 -7
  40. package/.agents/skills/manage-codebase-rebuild/SKILL.md +5 -1
  41. package/.agents/skills/manage-drift-realign/SKILL.md +6 -2
  42. package/.agents/skills/manage-harvest/SKILL.md +4 -1
  43. package/.agents/skills/manage-issue-discover/SKILL.md +1 -0
  44. package/.agents/skills/manage-kg-extractors/SKILL.md +5 -1
  45. package/.agents/skills/manage-knowhow-capture/SKILL.md +1 -0
  46. package/.agents/skills/manage-knowledge-audit/SKILL.md +3 -0
  47. package/.agents/skills/manage-wiki/SKILL.md +1 -0
  48. package/.agents/skills/odyssey-debug/SKILL.md +2 -1
  49. package/.agents/skills/odyssey-improve/SKILL.md +2 -2
  50. package/.agents/skills/odyssey-planex/SKILL.md +8 -7
  51. package/.agents/skills/odyssey-review-test-fix/SKILL.md +4 -1
  52. package/.agents/skills/odyssey-ui/SKILL.md +4 -4
  53. package/.agents/skills/quality-auto-test/SKILL.md +11 -1
  54. package/.agents/skills/quality-debug/SKILL.md +16 -2
  55. package/.agents/skills/quality-retrospective/SKILL.md +9 -1
  56. package/.agents/skills/quality-review/SKILL.md +8 -0
  57. package/.agents/skills/quality-sync/SKILL.md +2 -2
  58. package/.agents/skills/quality-test/SKILL.md +9 -1
  59. package/.agents/skills/security-audit/SKILL.md +14 -4
  60. package/.agents/skills/spec-add/SKILL.md +5 -2
  61. package/.agents/skills/spec-load/SKILL.md +1 -1
  62. package/.agents/skills/spec-remove/SKILL.md +1 -1
  63. package/.agents/skills/spec-setup/SKILL.md +3 -0
  64. package/.agy/skills/domain-add/SKILL.md +3 -0
  65. package/.agy/skills/learn-decompose/SKILL.md +7 -4
  66. package/.agy/skills/learn-follow/SKILL.md +4 -2
  67. package/.agy/skills/learn-investigate/SKILL.md +8 -6
  68. package/.agy/skills/learn-second-opinion/SKILL.md +6 -3
  69. package/.agy/skills/maestro/SKILL.md +1 -1
  70. package/.agy/skills/maestro-amend/SKILL.md +1 -1
  71. package/.agy/skills/maestro-analyze/SKILL.md +1 -1
  72. package/.agy/skills/maestro-blueprint/SKILL.md +1 -1
  73. package/.agy/skills/maestro-brainstorm/SKILL.md +4 -1
  74. package/.agy/skills/maestro-collab/SKILL.md +6 -2
  75. package/.agy/skills/maestro-companion/SKILL.md +4 -1
  76. package/.agy/skills/maestro-composer/SKILL.md +4 -2
  77. package/.agy/skills/maestro-execute/SKILL.md +26 -8
  78. package/.agy/skills/maestro-fork/SKILL.md +4 -3
  79. package/.agy/skills/maestro-grill/SKILL.md +1 -1
  80. package/.agy/skills/maestro-guard/SKILL.md +2 -2
  81. package/.agy/skills/maestro-impeccable/SKILL.md +2 -1
  82. package/.agy/skills/maestro-init/SKILL.md +1 -1
  83. package/.agy/skills/maestro-merge/SKILL.md +12 -1
  84. package/.agy/skills/maestro-milestone-audit/SKILL.md +1 -0
  85. package/.agy/skills/maestro-milestone-complete/SKILL.md +8 -3
  86. package/.agy/skills/maestro-milestone-release/SKILL.md +8 -4
  87. package/.agy/skills/maestro-overlay/SKILL.md +9 -0
  88. package/.agy/skills/maestro-plan/SKILL.md +1 -0
  89. package/.agy/skills/maestro-player/SKILL.md +2 -2
  90. package/.agy/skills/maestro-quick/SKILL.md +5 -3
  91. package/.agy/skills/maestro-ralph/SKILL.md +8 -8
  92. package/.agy/skills/maestro-ralph-agent/SKILL.md +696 -0
  93. package/.agy/skills/maestro-ralph-agent-execute/SKILL.md +457 -0
  94. package/.agy/skills/maestro-ralph-cli/SKILL.md +661 -0
  95. package/.agy/skills/maestro-ralph-cli-execute/SKILL.md +235 -0
  96. package/.agy/skills/maestro-ralph-execute/SKILL.md +127 -11
  97. package/.agy/skills/maestro-roadmap/SKILL.md +1 -1
  98. package/.agy/skills/maestro-swarm-workflow/SKILL.md +16 -14
  99. package/.agy/skills/maestro-tools-register/SKILL.md +16 -1
  100. package/.agy/skills/maestro-ui-codify/SKILL.md +11 -1
  101. package/.agy/skills/maestro-universal-workflow/SKILL.md +28 -5
  102. package/.agy/skills/maestro-update/SKILL.md +10 -7
  103. package/.agy/skills/manage-codebase-rebuild/SKILL.md +5 -1
  104. package/.agy/skills/manage-drift-realign/SKILL.md +6 -2
  105. package/.agy/skills/manage-harvest/SKILL.md +4 -1
  106. package/.agy/skills/manage-issue-discover/SKILL.md +1 -0
  107. package/.agy/skills/manage-kg-extractors/SKILL.md +5 -1
  108. package/.agy/skills/manage-knowhow-capture/SKILL.md +1 -0
  109. package/.agy/skills/manage-knowledge-audit/SKILL.md +3 -0
  110. package/.agy/skills/manage-wiki/SKILL.md +1 -0
  111. package/.agy/skills/odyssey-debug/SKILL.md +2 -1
  112. package/.agy/skills/odyssey-improve/SKILL.md +2 -2
  113. package/.agy/skills/odyssey-planex/SKILL.md +8 -7
  114. package/.agy/skills/odyssey-review-test-fix/SKILL.md +4 -1
  115. package/.agy/skills/odyssey-ui/SKILL.md +4 -4
  116. package/.agy/skills/quality-auto-test/SKILL.md +11 -1
  117. package/.agy/skills/quality-debug/SKILL.md +16 -2
  118. package/.agy/skills/quality-retrospective/SKILL.md +9 -1
  119. package/.agy/skills/quality-review/SKILL.md +8 -0
  120. package/.agy/skills/quality-sync/SKILL.md +2 -2
  121. package/.agy/skills/quality-test/SKILL.md +9 -1
  122. package/.agy/skills/security-audit/SKILL.md +14 -4
  123. package/.agy/skills/spec-add/SKILL.md +5 -2
  124. package/.agy/skills/spec-load/SKILL.md +1 -1
  125. package/.agy/skills/spec-remove/SKILL.md +1 -1
  126. package/.agy/skills/spec-setup/SKILL.md +3 -0
  127. package/.claude/commands/domain-add.md +3 -0
  128. package/.claude/commands/learn-decompose.md +7 -4
  129. package/.claude/commands/learn-follow.md +4 -2
  130. package/.claude/commands/learn-investigate.md +8 -6
  131. package/.claude/commands/learn-second-opinion.md +6 -3
  132. package/.claude/commands/maestro-amend.md +1 -1
  133. package/.claude/commands/maestro-analyze.md +1 -1
  134. package/.claude/commands/maestro-blueprint.md +1 -1
  135. package/.claude/commands/maestro-brainstorm.md +4 -1
  136. package/.claude/commands/maestro-collab.md +6 -2
  137. package/.claude/commands/maestro-companion.md +4 -1
  138. package/.claude/commands/maestro-composer.md +4 -2
  139. package/.claude/commands/maestro-execute.md +26 -8
  140. package/.claude/commands/maestro-fork.md +4 -3
  141. package/.claude/commands/maestro-grill.md +1 -1
  142. package/.claude/commands/maestro-guard.md +2 -2
  143. package/.claude/commands/maestro-impeccable.md +2 -1
  144. package/.claude/commands/maestro-init.md +1 -1
  145. package/.claude/commands/maestro-merge.md +12 -1
  146. package/.claude/commands/maestro-milestone-audit.md +1 -0
  147. package/.claude/commands/maestro-milestone-complete.md +8 -3
  148. package/.claude/commands/maestro-milestone-release.md +8 -4
  149. package/.claude/commands/maestro-overlay.md +9 -0
  150. package/.claude/commands/maestro-plan.md +1 -0
  151. package/.claude/commands/maestro-player.md +2 -2
  152. package/.claude/commands/maestro-quick.md +5 -3
  153. package/.claude/commands/maestro-ralph-agent-execute.md +459 -0
  154. package/.claude/commands/maestro-ralph-agent.md +695 -0
  155. package/.claude/commands/maestro-ralph-cli-execute.md +237 -0
  156. package/.claude/commands/maestro-ralph-cli.md +663 -0
  157. package/.claude/commands/maestro-ralph-execute.md +127 -11
  158. package/.claude/commands/maestro-ralph.md +8 -8
  159. package/.claude/commands/maestro-roadmap.md +1 -1
  160. package/.claude/commands/maestro-swarm-workflow.md +16 -14
  161. package/.claude/commands/maestro-tools-register.md +16 -1
  162. package/.claude/commands/maestro-ui-codify.md +11 -1
  163. package/.claude/commands/maestro-universal-workflow.md +28 -5
  164. package/.claude/commands/maestro-update.md +10 -7
  165. package/.claude/commands/maestro.md +1 -1
  166. package/.claude/commands/manage-codebase-rebuild.md +5 -1
  167. package/.claude/commands/manage-drift-realign.md +6 -2
  168. package/.claude/commands/manage-harvest.md +4 -1
  169. package/.claude/commands/manage-issue-discover.md +1 -0
  170. package/.claude/commands/manage-kg-extractors.md +5 -1
  171. package/.claude/commands/manage-knowhow-capture.md +1 -0
  172. package/.claude/commands/manage-knowledge-audit.md +3 -0
  173. package/.claude/commands/manage-wiki.md +1 -0
  174. package/.claude/commands/odyssey-debug.md +2 -1
  175. package/.claude/commands/odyssey-improve.md +2 -2
  176. package/.claude/commands/odyssey-planex.md +8 -7
  177. package/.claude/commands/odyssey-review-test-fix.md +4 -1
  178. package/.claude/commands/odyssey-ui.md +4 -4
  179. package/.claude/commands/quality-auto-test.md +11 -1
  180. package/.claude/commands/quality-debug.md +16 -2
  181. package/.claude/commands/quality-retrospective.md +9 -1
  182. package/.claude/commands/quality-review.md +8 -0
  183. package/.claude/commands/quality-sync.md +2 -2
  184. package/.claude/commands/quality-test.md +9 -1
  185. package/.claude/commands/security-audit.md +14 -4
  186. package/.claude/commands/spec-add.md +5 -2
  187. package/.claude/commands/spec-load.md +1 -1
  188. package/.claude/commands/spec-remove.md +1 -1
  189. package/.claude/commands/spec-setup.md +3 -0
  190. package/.codex/skills/codify-to-knowhow/SKILL.md +27 -15
  191. package/.codex/skills/domain-add/SKILL.md +5 -3
  192. package/.codex/skills/learn-decompose/SKILL.md +22 -4
  193. package/.codex/skills/learn-follow/SKILL.md +12 -6
  194. package/.codex/skills/learn-investigate/SKILL.md +11 -6
  195. package/.codex/skills/learn-retro/SKILL.md +12 -6
  196. package/.codex/skills/learn-second-opinion/SKILL.md +11 -3
  197. package/.codex/skills/maestro/SKILL.md +19 -13
  198. package/.codex/skills/maestro-amend/SKILL.md +10 -2
  199. package/.codex/skills/maestro-analyze/SKILL.md +7 -1
  200. package/.codex/skills/maestro-blueprint/SKILL.md +1 -1
  201. package/.codex/skills/maestro-brainstorm/SKILL.md +11 -8
  202. package/.codex/skills/maestro-collab/SKILL.md +5 -5
  203. package/.codex/skills/maestro-companion/SKILL.md +4 -1
  204. package/.codex/skills/maestro-composer/SKILL.md +6 -3
  205. package/.codex/skills/maestro-execute/SKILL.md +11 -8
  206. package/.codex/skills/maestro-fork/SKILL.md +4 -3
  207. package/.codex/skills/maestro-grill/SKILL.md +1 -1
  208. package/.codex/skills/maestro-guard/SKILL.md +1 -1
  209. package/.codex/skills/maestro-impeccable/SKILL.md +5 -5
  210. package/.codex/skills/maestro-init/SKILL.md +3 -2
  211. package/.codex/skills/maestro-milestone-audit/SKILL.md +21 -9
  212. package/.codex/skills/maestro-milestone-complete/SKILL.md +3 -3
  213. package/.codex/skills/maestro-milestone-release/SKILL.md +18 -1
  214. package/.codex/skills/maestro-next/SKILL.md +11 -10
  215. package/.codex/skills/maestro-overlay/SKILL.md +16 -6
  216. package/.codex/skills/maestro-player/SKILL.md +11 -5
  217. package/.codex/skills/maestro-quick/SKILL.md +2 -2
  218. package/.codex/skills/maestro-ralph/SKILL.md +44 -31
  219. package/.codex/skills/maestro-ralph-cli/SKILL.md +394 -0
  220. package/.codex/skills/maestro-ralph-cli-execute/SKILL.md +146 -0
  221. package/.codex/skills/maestro-ralph-execute/SKILL.md +105 -24
  222. package/.codex/skills/maestro-roadmap/SKILL.md +8 -2
  223. package/.codex/skills/maestro-tools-execute/SKILL.md +8 -4
  224. package/.codex/skills/maestro-tools-register/SKILL.md +10 -6
  225. package/.codex/skills/maestro-ui-codify/SKILL.md +14 -9
  226. package/.codex/skills/manage-codebase-rebuild/SKILL.md +36 -14
  227. package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
  228. package/.codex/skills/manage-drift-realign/SKILL.md +15 -12
  229. package/.codex/skills/manage-harvest/SKILL.md +1 -1
  230. package/.codex/skills/manage-issue/SKILL.md +8 -4
  231. package/.codex/skills/manage-issue-discover/SKILL.md +15 -14
  232. package/.codex/skills/manage-knowhow/SKILL.md +3 -2
  233. package/.codex/skills/manage-knowhow-capture/SKILL.md +4 -3
  234. package/.codex/skills/manage-learn/SKILL.md +2 -2
  235. package/.codex/skills/odyssey-debug/SKILL.md +12 -7
  236. package/.codex/skills/odyssey-improve/SKILL.md +11 -6
  237. package/.codex/skills/odyssey-planex/SKILL.md +14 -8
  238. package/.codex/skills/odyssey-review-test-fix/SKILL.md +12 -7
  239. package/.codex/skills/odyssey-ui/SKILL.md +10 -5
  240. package/.codex/skills/quality-auto-test/SKILL.md +13 -5
  241. package/.codex/skills/quality-debug/SKILL.md +18 -11
  242. package/.codex/skills/quality-refactor/SKILL.md +4 -4
  243. package/.codex/skills/quality-retrospective/SKILL.md +5 -6
  244. package/.codex/skills/quality-review/SKILL.md +18 -11
  245. package/.codex/skills/quality-sync/SKILL.md +2 -2
  246. package/.codex/skills/quality-test/SKILL.md +7 -5
  247. package/.codex/skills/security-audit/SKILL.md +7 -5
  248. package/.codex/skills/spec-add/SKILL.md +9 -7
  249. package/.codex/skills/spec-load/SKILL.md +3 -2
  250. package/.codex/skills/spec-map/SKILL.md +10 -1
  251. package/.codex/skills/spec-remove/SKILL.md +3 -2
  252. package/.codex/skills/team-coordinate/SKILL.md +10 -4
  253. package/.codex/skills/team-lifecycle-v4/SKILL.md +33 -26
  254. package/.codex/skills/team-quality-assurance/SKILL.md +43 -0
  255. package/.codex/skills/team-review/SKILL.md +50 -6
  256. package/.codex/skills/team-tech-debt/SKILL.md +53 -7
  257. package/.codex/skills/team-testing/SKILL.md +50 -2
  258. package/.codex/skills/wiki-connect/SKILL.md +3 -1
  259. package/.codex/skills/wiki-digest/SKILL.md +6 -4
  260. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +16 -0
  261. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +419 -44
  262. package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
  263. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +48 -10
  264. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  265. package/dashboard/dist-server/src/graph/kg/credibility.d.ts +2 -2
  266. package/dashboard/dist-server/src/graph/kg/credibility.js +10 -5
  267. package/dashboard/dist-server/src/graph/kg/credibility.js.map +1 -1
  268. package/dashboard/dist-server/src/graph/kg/db/connection.d.ts +3 -2
  269. package/dashboard/dist-server/src/graph/kg/db/connection.js +28 -16
  270. package/dashboard/dist-server/src/graph/kg/db/connection.js.map +1 -1
  271. package/dashboard/dist-server/src/graph/kg/db/queries.js +4 -4
  272. package/dashboard/dist-server/src/graph/kg/db/queries.js.map +1 -1
  273. package/dashboard/dist-server/src/graph/kg/db/types.d.ts +3 -0
  274. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.d.ts +46 -0
  275. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js +329 -0
  276. package/dashboard/dist-server/src/graph/kg/embedding/code-embedding.js.map +1 -0
  277. package/dashboard/dist-server/src/graph/kg/embedding/index.d.ts +2 -0
  278. package/dashboard/dist-server/src/graph/kg/embedding/index.js +3 -0
  279. package/dashboard/dist-server/src/graph/kg/embedding/index.js.map +1 -0
  280. package/dashboard/dist-server/src/graph/kg/engine.d.ts +20 -2
  281. package/dashboard/dist-server/src/graph/kg/engine.js +71 -1
  282. package/dashboard/dist-server/src/graph/kg/engine.js.map +1 -1
  283. package/dashboard/dist-server/src/graph/kg/extraction/knowledge/domain-extractor.d.ts +1 -1
  284. package/dashboard/dist-server/src/graph/kg/extraction/knowledge/domain-extractor.js +8 -4
  285. package/dashboard/dist-server/src/graph/kg/extraction/knowledge/domain-extractor.js.map +1 -1
  286. package/dashboard/dist-server/src/graph/kg/query/scoring.d.ts +5 -0
  287. package/dashboard/dist-server/src/graph/kg/query/scoring.js +85 -1
  288. package/dashboard/dist-server/src/graph/kg/query/scoring.js.map +1 -1
  289. package/dashboard/dist-server/src/graph/kg/query/search.d.ts +7 -0
  290. package/dashboard/dist-server/src/graph/kg/query/search.js +117 -1
  291. package/dashboard/dist-server/src/graph/kg/query/search.js.map +1 -1
  292. package/dashboard/dist-server/src/graph/kg/resolution/knowledge-resolver.d.ts +3 -3
  293. package/dashboard/dist-server/src/graph/kg/resolution/knowledge-resolver.js +3 -2
  294. package/dashboard/dist-server/src/graph/kg/resolution/knowledge-resolver.js.map +1 -1
  295. package/dashboard/dist-server/src/graph/kg/surface/hook-injector.js +2 -4
  296. package/dashboard/dist-server/src/graph/kg/surface/hook-injector.js.map +1 -1
  297. package/dashboard/dist-server/src/graph/kg/surface/mcp-tools.js +49 -0
  298. package/dashboard/dist-server/src/graph/kg/surface/mcp-tools.js.map +1 -1
  299. package/dashboard/dist-server/src/hooks/kg-sync-hook.js +3 -0
  300. package/dashboard/dist-server/src/hooks/kg-sync-hook.js.map +1 -1
  301. package/dashboard/dist-server/src/search/daemon-client.d.ts +3 -25
  302. package/dashboard/dist-server/src/search/daemon-client.js +3 -25
  303. package/dashboard/dist-server/src/search/daemon-client.js.map +1 -1
  304. package/dashboard/dist-server/src/search/daemon-types.d.ts +29 -0
  305. package/dashboard/dist-server/src/search/daemon-types.js +31 -0
  306. package/dashboard/dist-server/src/search/daemon-types.js.map +1 -0
  307. package/dist/src/agents/api-explore/agent-loop.d.ts +1 -1
  308. package/dist/src/agents/api-explore/agent-loop.d.ts.map +1 -1
  309. package/dist/src/agents/api-explore/agent-loop.js +32 -17
  310. package/dist/src/agents/api-explore/agent-loop.js.map +1 -1
  311. package/dist/src/agents/api-explore/prompt-parser.js +5 -5
  312. package/dist/src/agents/api-explore/prompt-parser.js.map +1 -1
  313. package/dist/src/agents/api-explore/runner.d.ts.map +1 -1
  314. package/dist/src/agents/api-explore/runner.js +0 -2
  315. package/dist/src/agents/api-explore/runner.js.map +1 -1
  316. package/dist/src/agents/api-explore/system-prompt.d.ts.map +1 -1
  317. package/dist/src/agents/api-explore/system-prompt.js +30 -22
  318. package/dist/src/agents/api-explore/system-prompt.js.map +1 -1
  319. package/dist/src/agents/api-explore/tools.d.ts +1 -0
  320. package/dist/src/agents/api-explore/tools.d.ts.map +1 -1
  321. package/dist/src/agents/api-explore/tools.js +219 -50
  322. package/dist/src/agents/api-explore/tools.js.map +1 -1
  323. package/dist/src/commands/search.d.ts.map +1 -1
  324. package/dist/src/commands/search.js +10 -4
  325. package/dist/src/commands/search.js.map +1 -1
  326. package/dist/src/commands/update.d.ts.map +1 -1
  327. package/dist/src/commands/update.js +89 -21
  328. package/dist/src/commands/update.js.map +1 -1
  329. package/dist/src/core/plugin-bridge.d.ts.map +1 -1
  330. package/dist/src/core/plugin-bridge.js +17 -0
  331. package/dist/src/core/plugin-bridge.js.map +1 -1
  332. package/dist/src/graph/db/connection.d.ts +3 -2
  333. package/dist/src/graph/db/connection.d.ts.map +1 -1
  334. package/dist/src/graph/db/connection.js +28 -16
  335. package/dist/src/graph/db/connection.js.map +1 -1
  336. package/dist/src/graph/db/queries.d.ts.map +1 -1
  337. package/dist/src/graph/db/queries.js.map +1 -1
  338. package/dist/src/graph/kg/credibility.d.ts +2 -2
  339. package/dist/src/graph/kg/credibility.d.ts.map +1 -1
  340. package/dist/src/graph/kg/credibility.js +10 -5
  341. package/dist/src/graph/kg/credibility.js.map +1 -1
  342. package/dist/src/graph/kg/db/connection.d.ts +3 -2
  343. package/dist/src/graph/kg/db/connection.d.ts.map +1 -1
  344. package/dist/src/graph/kg/db/connection.js +28 -16
  345. package/dist/src/graph/kg/db/connection.js.map +1 -1
  346. package/dist/src/graph/kg/db/queries.js +4 -4
  347. package/dist/src/graph/kg/db/queries.js.map +1 -1
  348. package/dist/src/graph/kg/db/types.d.ts +3 -0
  349. package/dist/src/graph/kg/db/types.d.ts.map +1 -1
  350. package/dist/src/graph/kg/embedding/code-embedding.d.ts +47 -0
  351. package/dist/src/graph/kg/embedding/code-embedding.d.ts.map +1 -0
  352. package/dist/src/graph/kg/embedding/code-embedding.js +329 -0
  353. package/dist/src/graph/kg/embedding/code-embedding.js.map +1 -0
  354. package/dist/src/graph/kg/embedding/index.d.ts +3 -0
  355. package/dist/src/graph/kg/embedding/index.d.ts.map +1 -0
  356. package/dist/src/graph/kg/embedding/index.js +3 -0
  357. package/dist/src/graph/kg/embedding/index.js.map +1 -0
  358. package/dist/src/graph/kg/engine.d.ts +20 -2
  359. package/dist/src/graph/kg/engine.d.ts.map +1 -1
  360. package/dist/src/graph/kg/engine.js +71 -1
  361. package/dist/src/graph/kg/engine.js.map +1 -1
  362. package/dist/src/graph/kg/extraction/knowledge/domain-extractor.d.ts +1 -1
  363. package/dist/src/graph/kg/extraction/knowledge/domain-extractor.d.ts.map +1 -1
  364. package/dist/src/graph/kg/extraction/knowledge/domain-extractor.js +8 -4
  365. package/dist/src/graph/kg/extraction/knowledge/domain-extractor.js.map +1 -1
  366. package/dist/src/graph/kg/query/scoring.d.ts +5 -0
  367. package/dist/src/graph/kg/query/scoring.d.ts.map +1 -1
  368. package/dist/src/graph/kg/query/scoring.js +85 -1
  369. package/dist/src/graph/kg/query/scoring.js.map +1 -1
  370. package/dist/src/graph/kg/query/search.d.ts +7 -0
  371. package/dist/src/graph/kg/query/search.d.ts.map +1 -1
  372. package/dist/src/graph/kg/query/search.js +117 -1
  373. package/dist/src/graph/kg/query/search.js.map +1 -1
  374. package/dist/src/graph/kg/resolution/knowledge-resolver.d.ts +3 -3
  375. package/dist/src/graph/kg/resolution/knowledge-resolver.d.ts.map +1 -1
  376. package/dist/src/graph/kg/resolution/knowledge-resolver.js +3 -2
  377. package/dist/src/graph/kg/resolution/knowledge-resolver.js.map +1 -1
  378. package/dist/src/graph/kg/surface/hook-injector.d.ts.map +1 -1
  379. package/dist/src/graph/kg/surface/hook-injector.js +2 -4
  380. package/dist/src/graph/kg/surface/hook-injector.js.map +1 -1
  381. package/dist/src/graph/kg/surface/mcp-tools.d.ts.map +1 -1
  382. package/dist/src/graph/kg/surface/mcp-tools.js +49 -0
  383. package/dist/src/graph/kg/surface/mcp-tools.js.map +1 -1
  384. package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
  385. package/dist/src/hooks/kg-sync-hook.js +3 -0
  386. package/dist/src/hooks/kg-sync-hook.js.map +1 -1
  387. package/dist/src/search/daemon-client.d.ts +3 -25
  388. package/dist/src/search/daemon-client.d.ts.map +1 -1
  389. package/dist/src/search/daemon-client.js +3 -25
  390. package/dist/src/search/daemon-client.js.map +1 -1
  391. package/dist/src/search/daemon-types.d.ts +30 -0
  392. package/dist/src/search/daemon-types.d.ts.map +1 -0
  393. package/dist/src/search/daemon-types.js +31 -0
  394. package/dist/src/search/daemon-types.js.map +1 -0
  395. package/dist/src/search/daemon.d.ts +2 -27
  396. package/dist/src/search/daemon.d.ts.map +1 -1
  397. package/dist/src/search/daemon.js +4 -60
  398. package/dist/src/search/daemon.js.map +1 -1
  399. package/dist/src/tools/code-semantic-search.d.ts +10 -0
  400. package/dist/src/tools/code-semantic-search.d.ts.map +1 -0
  401. package/dist/src/tools/code-semantic-search.js +81 -0
  402. package/dist/src/tools/code-semantic-search.js.map +1 -0
  403. package/dist/src/tools/index.d.ts.map +1 -1
  404. package/dist/src/tools/index.js +4 -0
  405. package/dist/src/tools/index.js.map +1 -1
  406. package/dist/src/tools/wiki-search.d.ts +13 -0
  407. package/dist/src/tools/wiki-search.d.ts.map +1 -0
  408. package/dist/src/tools/wiki-search.js +120 -0
  409. package/dist/src/tools/wiki-search.js.map +1 -0
  410. package/dist/src/utils/update-notices.js +24 -0
  411. package/dist/src/utils/update-notices.js.map +1 -1
  412. package/package.json +4 -3
@@ -130,10 +130,10 @@ id,title,description,role,pipeline_phase,deps,context_from,wave
130
130
  | Column | Initial Value | Description |
131
131
  |--------|--------------|-------------|
132
132
  | `status` | `pending` | Task lifecycle: pending → completed/failed/blocked/skipped |
133
- | `findings` | `""` | Populated from output_schema merge |
134
- | `files_modified` | `""` | Populated from output_schema merge |
135
- | `quality_score` | `""` | Populated from output_schema merge |
136
- | `error` | `""` | Populated from output_schema merge |
133
+ | `findings` | `""` | Populated from output_schema `result_findings` during merge |
134
+ | `files_modified` | `""` | Populated from output_schema `result_files_modified` during merge |
135
+ | `quality_score` | `""` | Populated from output_schema `result_quality_score` during merge |
136
+ | `error` | `""` | Populated from output_schema `result_error` during merge |
137
137
 
138
138
  **Dynamic column** (added to wave-N.csv only, not in initial tasks.csv):
139
139
 
@@ -146,12 +146,12 @@ id,title,description,role,pipeline_phase,deps,context_from,wave
146
146
  | Column | Description |
147
147
  |--------|-------------|
148
148
  | `result_status` | completed / failed / blocked (maps to master `status`) |
149
- | `findings` | Key findings (max 500 chars) |
150
- | `files_modified` | Semicolon-separated paths |
151
- | `quality_score` | Numeric quality score (0-100) |
152
- | `error` | Error message if failed |
149
+ | `result_findings` | Key findings (max 500 chars) → maps to master `findings` |
150
+ | `result_files_modified` | Semicolon-separated paths → maps to master `files_modified` |
151
+ | `result_quality_score` | Numeric quality score (0-100) → maps to master `quality_score` |
152
+ | `result_error` | Error message if failed → maps to master `error` |
153
153
 
154
- **Column separation rule**: Input/lifecycle columns and output_schema MUST NOT share names. `result_status` → master `status` during merge.
154
+ **Column separation rule**: Input/lifecycle columns and output_schema MUST NOT share names. Merge mapping: `result_status` → `status`, `result_findings` `findings`, `result_files_modified` → `files_modified`, `result_quality_score` → `quality_score`, `result_error` → `error`.
155
155
 
156
156
  ### Pipeline Wave Assignments
157
157
 
@@ -201,7 +201,7 @@ spec-only waves 1-8 + user approval checkpoint + impl-only waves shifted.
201
201
  6. **Discovery Board is Append-Only**: Never clear/modify discoveries.ndjson
202
202
  7. **Cascading Skip on Failure**: Failed tasks cascade to dependents
203
203
  8. **Cleanup Temp Files**: Delete wave-N.csv and wave-N-results.csv after merge
204
- 9. **Checkpoint Pause**: After CHECKPOINT waves, pause for user approval (skip if -y)
204
+ 9. **Checkpoint Pause**: After CHECKPOINT waves, pause for user approval (skip if -y). Record approval decision in master tasks.csv (`status=approved|revision_requested|aborted`) and persist gate state to `{sessionFolder}/gate-{checkpoint_id}.json`
205
205
  10. **DO NOT STOP**: Continuous execution between checkpoints
206
206
  11. **Role Files are Authoritative**: Agents read roles/{role}/role.md for domain logic
207
207
  </invariants>
@@ -227,9 +227,9 @@ S_WAVE_{N} → S_CHECKPOINT WHEN: wave N was a CHECKPOINT task
227
227
  S_WAVE_{N} → S_WAVE_{N+1} WHEN: wave N not checkpoint, more waves
228
228
  S_WAVE_{N} → S_AGGREGATE WHEN: last wave complete
229
229
 
230
- S_CHECKPOINT → S_WAVE_{N+1} WHEN: user approves or -y
231
- S_CHECKPOINT → S_WAVE_{N} WHEN: user requests revision (re-run checkpoint)
232
- S_CHECKPOINT → S_AGGREGATE WHEN: user aborts
230
+ S_CHECKPOINT → S_WAVE_{N+1} WHEN: user approves or -y (persist: set CHECKPOINT task status=approved in tasks.csv, write gate-{id}.json)
231
+ S_CHECKPOINT → S_WAVE_{N} WHEN: user requests revision (persist: set CHECKPOINT task status=revision_requested in tasks.csv, write gate-{id}.json with feedback)
232
+ S_CHECKPOINT → S_AGGREGATE WHEN: user aborts (persist: set CHECKPOINT task status=aborted in tasks.csv, write gate-{id}.json)
233
233
  </transitions>
234
234
 
235
235
  <actions>
@@ -311,30 +311,37 @@ spawn_agents_on_csv({
311
311
  output_schema: {
312
312
  type: "object",
313
313
  properties: {
314
- id: { type: "string" },
315
- result_status: { type: "string", enum: ["completed", "failed", "blocked"] },
316
- findings: { type: "string", maxLength: 500 },
317
- files_modified: { type: "string", description: "Semicolon-separated paths" },
318
- quality_score: { type: "string", description: "0-100" },
319
- error: { type: "string" }
314
+ id: { type: "string" },
315
+ result_status: { type: "string", enum: ["completed", "failed", "blocked"] },
316
+ result_findings: { type: "string", maxLength: 500 },
317
+ result_files_modified: { type: "string", description: "Semicolon-separated paths" },
318
+ result_quality_score: { type: "string", description: "0-100" },
319
+ result_error: { type: "string" }
320
320
  },
321
- required: ["id", "result_status", "findings"]
321
+ required: ["id", "result_status", "result_findings"]
322
322
  }
323
323
  })
324
324
  ```
325
325
 
326
326
  #### Step 5: Merge + Cleanup
327
327
  1. Map `result_status` → master `status`
328
- 2. Copy `findings`, `files_modified`, `quality_score`, `error`
328
+ 2. Map `result_findings` → master `findings`, `result_files_modified` → master `files_modified`, `result_quality_score` → master `quality_score`, `result_error` → master `error`
329
329
  3. Delete `wave-{N}.csv` AND `wave-{N}-results.csv`
330
330
  4. Cascade skip failed task dependents
331
331
 
332
332
  #### Step 6: Checkpoint handling
333
333
  If wave N was a CHECKPOINT task:
334
- - Read supervisor's `findings` and `quality_score`
334
+ - Read supervisor's `result_findings` and `result_quality_score`
335
335
  - If quality_score >= 80 (pass) → continue
336
336
  - If 60-79 (review) → display warnings, continue (or pause if not -y)
337
337
  - If < 60 (fail) → pause for user: Revise / Override / Abort
338
+ - **Persist approval decision**:
339
+ 1. Update CHECKPOINT task `status` in master tasks.csv to `approved` / `revision_requested` / `aborted`
340
+ 2. Write `{sessionFolder}/gate-{checkpoint_id}.json`:
341
+ ```json
342
+ {"checkpoint_id":"<id>","decision":"approved|revision_requested|aborted","quality_score":<N>,"feedback":"<user feedback if any>","timestamp":"<ISO>"}
343
+ ```
344
+ 3. On `--continue` resume, read gate files to restore checkpoint state
338
345
 
339
346
  ### Instruction Builder
340
347
 
@@ -393,10 +400,10 @@ Append to {sessionFolder}/discoveries.ndjson:
393
400
  ## Output
394
401
  Return via output_schema:
395
402
  - result_status: completed | failed | blocked
396
- - findings: key findings (max 500 chars)
397
- - files_modified: semicolon-separated paths
398
- - quality_score: 0-100 per quality-gates.md
399
- - error: error message if not completed
403
+ - result_findings: key findings (max 500 chars)
404
+ - result_files_modified: semicolon-separated paths
405
+ - result_quality_score: 0-100 per quality-gates.md
406
+ - result_error: error message if not completed
400
407
  ```
401
408
 
402
409
  ### Results Aggregation (S_AGGREGATE)
@@ -156,6 +156,49 @@ S_WAVE_{N} → S_AGGREGATE WHEN: last wave
156
156
 
157
157
  <actions>
158
158
 
159
+ ### Session Initialization (S_PARSE)
160
+
161
+ ```
162
+ Parse from $ARGUMENTS:
163
+ AUTO_YES ← --yes | -y
164
+ continueMode ← --continue
165
+ maxConcurrency ← --concurrency | -c N (default: 3)
166
+ modeFlag ← --mode discovery|testing|full
167
+ scopeTarget ← remaining text (file/module path)
168
+
169
+ Derive:
170
+ dateStr ← UTC+8 YYYYMMDD
171
+ slug ← first 3 meaningful words, kebab-case
172
+ sessionId ← "{dateStr}-qa-{slug}"
173
+ sessionFolder ← ".workflow/.csv-wave/{sessionId}"
174
+ skillRoot ← resolve path to this skill directory
175
+
176
+ mkdir -p {sessionFolder}
177
+ ```
178
+
179
+ When `--continue`: scan `.workflow/.csv-wave/*-qa-*/tasks.csv` for sessions with pending tasks. Single match → resume. Multiple → `request_user_input`. Read master tasks.csv → find first pending wave → jump to S_WAVE_{N}.
180
+
181
+ ### CSV Generation (S_CSV_GEN)
182
+
183
+ 1. Select mode: `--mode` flag, or detect from scope (single module → discovery, test files exist → testing, else → full)
184
+ 2. Load pipeline wave assignments from csv_schema section above
185
+ 3. For each task, build CSV row with PURPOSE/TASK/EXPECTED/CONSTRAINTS in description
186
+ 4. Initialize lifecycle columns: `status=pending`, empty `findings`/`files_modified`/`coverage_score`/`error`
187
+ 5. Write `tasks.csv` and empty `discoveries.ndjson`
188
+ 6. User validation (skip if `-y`): display mode, task count, wave structure
189
+
190
+ ### Wave Execution (S_WAVE_{N})
191
+
192
+ 1. Skip check: if all tasks in wave N completed/skipped → next wave
193
+ 2. Cascading skip: if any dep is failed/blocked → skip dependents
194
+ 3. Build `prev_context` from upstream findings
195
+ 4. Write `wave-{N}.csv` with qualifying rows + `prev_context` column
196
+ 5. `spawn_agents_on_csv` with output_schema (see below)
197
+ 6. Merge results: `result_status` → master `status`
198
+ 7. Cascade skip failed task dependents
199
+ 8. Delete `wave-{N}.csv` and `wave-{N}-results.csv`
200
+ 9. If wave was QARUN → transition to S_GC_CHECK
201
+
159
202
  ### GC Loop
160
203
 
161
204
  After each QARUN wave:
@@ -117,7 +117,7 @@ id,title,description,role,review_dimension,deps,context_from,wave
117
117
  1. **Wave Order Sacred**
118
118
  2. **CSV Source of Truth**
119
119
  3. **Column Separation Rule**
120
- 4. **User Checkpoint Before Fix**: In full mode, pause after REV for user approval (skip if -y)
120
+ 4. **User Checkpoint Before Fix**: In full mode, pause after REV for user approval (skip if -y; when `-y` is set, default fix scope is `critical+high` severity only)
121
121
  5. **0 Findings Shortcut**: If scanner finds 0 issues → skip REV and FIX
122
122
  6. **Discovery Board Append-Only**
123
123
  7. **Cleanup Temp Files**
@@ -141,21 +141,65 @@ S_CSV_GEN → S_WAVE_1
141
141
  S_WAVE_{N} → S_FIX_GATE WHEN: mode=full, REV wave complete, FIX pending
142
142
  S_WAVE_{N} → S_WAVE_{N+1} WHEN: more waves
143
143
  S_WAVE_{N} → S_AGGREGATE WHEN: last wave or 0 findings shortcut
144
- S_FIX_GATE → S_WAVE_{N+1} WHEN: user selects fix scope (all/critical+high)
144
+ S_FIX_GATE → S_WAVE_{N+1} WHEN: user selects fix scope (all/critical+high), or -y (default: critical+high)
145
145
  S_FIX_GATE → S_AGGREGATE WHEN: user selects skip
146
146
  </transitions>
147
147
 
148
148
  <actions>
149
149
 
150
+ ### Session Initialization (S_PARSE)
151
+
152
+ ```
153
+ Parse from $ARGUMENTS:
154
+ AUTO_YES ← --yes | -y
155
+ continueMode ← --continue
156
+ maxConcurrency ← --concurrency | -c N (default: 3)
157
+ modeFlag ← --mode default|full|fix-only|quick
158
+ scopeTarget ← remaining text (file/module path)
159
+
160
+ Derive:
161
+ dateStr ← UTC+8 YYYYMMDD
162
+ slug ← first 3 meaningful words, kebab-case
163
+ sessionId ← "{dateStr}-rv-{slug}"
164
+ sessionFolder ← ".workflow/.csv-wave/{sessionId}"
165
+ skillRoot ← resolve path to this skill directory
166
+
167
+ mkdir -p {sessionFolder}
168
+ ```
169
+
170
+ When `--continue`: scan `.workflow/.csv-wave/*-rv-*/tasks.csv` for sessions with pending tasks. Single match → resume. Multiple → `request_user_input`. Read master tasks.csv → find first pending wave → jump to S_WAVE_{N}.
171
+
172
+ ### Mode Selection + CSV Generation (S_CSV_GEN)
173
+
174
+ 1. Select mode: `--mode` flag, or default to `default`
175
+ 2. Load pipeline wave assignments from csv_schema section above
176
+ 3. For each task, build CSV row with PURPOSE/TASK/EXPECTED/CONSTRAINTS in description
177
+ 4. Initialize lifecycle columns: `status=pending`, empty `findings`/`files_modified`/`finding_count`/`verdict`/`error`
178
+ 5. Write `tasks.csv` and empty `discoveries.ndjson`
179
+ 6. User validation (skip if `-y`): display mode, task count, scope
180
+
181
+ ### Wave Execution (S_WAVE_{N})
182
+
183
+ 1. Skip check: if all tasks in wave N completed/skipped → next wave
184
+ 2. Cascading skip: if any dep is failed/blocked → skip dependents
185
+ 3. Build `prev_context` from upstream findings
186
+ 4. Write `wave-{N}.csv` with qualifying rows + `prev_context` column
187
+ 5. `spawn_agents_on_csv` with output_schema (see below)
188
+ 6. Merge results: `result_status` → master `status`
189
+ 7. Cascade skip failed task dependents
190
+ 8. Delete `wave-{N}.csv` and `wave-{N}-results.csv`
191
+ 9. If mode=full and REV wave complete → transition to S_FIX_GATE
192
+
150
193
  ### Fix Gate Logic
151
194
 
152
195
  After REV wave in full mode:
153
196
  1. Read reviewer's `findings` and `verdict`
154
197
  2. If `finding_count` = 0 or verdict = APPROVE → skip fix, aggregate
155
- 3. Display findings summary to user
156
- 4. `request_user_input`: Fix all / Fix critical+high only / Skip fixes
157
- 5. Update FIX-001 description with approved scope
158
- 6. Continue to FIX wave
198
+ 3. If `-y` auto-select fix scope = `critical+high` (default), update FIX-001 description, continue to FIX wave
199
+ 4. Otherwise display findings summary to user
200
+ 5. `request_user_input`: Fix all / Fix critical+high only / Skip fixes
201
+ 6. Update FIX-001 description with approved scope
202
+ 7. Continue to FIX wave
159
203
 
160
204
  ### Instruction Builder
161
205
 
@@ -78,7 +78,7 @@ id,title,description,role,scan_dimension,deps,context_from,wave
78
78
  | `result_status` | completed / failed / blocked |
79
79
  | `findings` | Key findings (max 500 chars) |
80
80
  | `files_modified` | Semicolon-separated paths |
81
- | `debt_count` | Number of debt items found/fixed |
81
+ | `debt_count` | Number of debt items found/fixed (string type, e.g. "5") |
82
82
  | `regression_detected` | true/false (for TDVAL tasks) |
83
83
  | `error` | Error message |
84
84
 
@@ -136,6 +136,7 @@ S_CSV_GEN — Generate tasks.csv
136
136
  S_WAVE_{N} — Execute wave N
137
137
  S_PLAN_GATE — User approval of remediation plan
138
138
  S_GC_CHECK — Regression check after TDVAL
139
+ S_DEGRADED_AGGREGATE — Aggregate partial results after GC exhaustion (regression persists)
139
140
  S_AGGREGATE — Generate report
140
141
  </states>
141
142
 
@@ -149,12 +150,57 @@ S_WAVE_{N} → S_AGGREGATE WHEN: last wave
149
150
  S_PLAN_GATE → S_WAVE_{N+1} WHEN: user approves
150
151
  S_PLAN_GATE → S_WAVE_{N} WHEN: user requests revision (re-run TDPLAN with feedback)
151
152
  S_PLAN_GATE → S_AGGREGATE WHEN: user aborts
152
- S_GC_CHECK → S_AGGREGATE WHEN: no regression or gc_rounds >= 3
153
- S_GC_CHECK → S_WAVE_{N+1} WHEN: regression, add TDFIX+TDVAL rows
153
+ S_GC_CHECK → S_AGGREGATE WHEN: no regression (clean pass)
154
+ S_GC_CHECK → S_WAVE_{N+1} WHEN: regression AND gc_rounds < 3 (add TDFIX+TDVAL rows)
155
+ S_GC_CHECK → S_DEGRADED_AGGREGATE WHEN: regression AND gc_rounds >= 3 (aggregate partial results with regression warning)
154
156
  </transitions>
155
157
 
156
158
  <actions>
157
159
 
160
+ ### Session Initialization (S_PARSE)
161
+
162
+ ```
163
+ Parse from $ARGUMENTS:
164
+ AUTO_YES ← --yes | -y
165
+ continueMode ← --continue
166
+ maxConcurrency ← --concurrency | -c N (default: 3)
167
+ modeFlag ← --mode scan|remediate|targeted
168
+ scopeTarget ← remaining text (file/module path)
169
+
170
+ Derive:
171
+ dateStr ← UTC+8 YYYYMMDD
172
+ slug ← first 3 meaningful words, kebab-case
173
+ sessionId ← "{dateStr}-td-{slug}"
174
+ sessionFolder ← ".workflow/.csv-wave/{sessionId}"
175
+ skillRoot ← resolve path to this skill directory
176
+
177
+ mkdir -p {sessionFolder}
178
+ ```
179
+
180
+ When `--continue`: scan `.workflow/.csv-wave/*-td-*/tasks.csv` for sessions with pending tasks. Single match → resume. Multiple → `request_user_input`. Read master tasks.csv → find first pending wave → jump to S_WAVE_{N}.
181
+
182
+ ### Mode Selection + CSV Generation (S_CSV_GEN)
183
+
184
+ 1. Select mode: `--mode` flag, or detect from scope (no existing scan → scan, existing scan results → remediate, specific debt items → targeted)
185
+ 2. Load pipeline wave assignments from csv_schema section above
186
+ 3. For each task, build CSV row with PURPOSE/TASK/EXPECTED/CONSTRAINTS in description
187
+ 4. Initialize lifecycle columns: `status=pending`, empty `findings`/`files_modified`/`debt_count`/`regression_detected`/`error`
188
+ 5. Write `tasks.csv` and empty `discoveries.ndjson`
189
+ 6. User validation (skip if `-y`): display mode, task count, wave structure
190
+
191
+ ### Wave Execution (S_WAVE_{N})
192
+
193
+ 1. Skip check: if all tasks in wave N completed/skipped → next wave
194
+ 2. Cascading skip: if any dep is failed/blocked → skip dependents
195
+ 3. Build `prev_context` from upstream findings
196
+ 4. Write `wave-{N}.csv` with qualifying rows + `prev_context` column
197
+ 5. `spawn_agents_on_csv` with output_schema (see below)
198
+ 6. Merge results: `result_status` → master `status`
199
+ 7. Cascade skip failed task dependents
200
+ 8. Delete `wave-{N}.csv` and `wave-{N}-results.csv`
201
+ 9. If TDPLAN wave complete → transition to S_PLAN_GATE
202
+ 10. If TDVAL wave complete → transition to S_GC_CHECK
203
+
158
204
  ### Plan Gate
159
205
 
160
206
  After TDPLAN wave:
@@ -169,9 +215,9 @@ After TDPLAN wave:
169
215
 
170
216
  After TDVAL wave:
171
217
  1. Read `regression_detected` from results
172
- 2. No regression → complete
173
- 3. Regression AND gc_rounds < 3 → add TDFIX+TDVAL rows, iterate
174
- 4. gc_rounds >= 3 → escalate to user
218
+ 2. No regression → S_AGGREGATE (clean pass)
219
+ 3. Regression AND gc_rounds < 3 → add TDFIX+TDVAL rows to tasks.csv, increment wave, iterate
220
+ 4. Regression AND gc_rounds >= 3 → S_DEGRADED_AGGREGATE (aggregate partial results with regression warning, escalate to user)
175
221
 
176
222
  ### Instruction Builder
177
223
 
@@ -202,7 +248,7 @@ Return JSON:
202
248
  "result_status": "completed" | "failed" | "blocked",
203
249
  "findings": "<key findings, max 500 chars>",
204
250
  "files_modified": "<semicolon-separated paths or empty>",
205
- "debt_count": <integer or empty>,
251
+ "debt_count": "<integer as string or empty>",
206
252
  "regression_detected": "true" | "false" | "" (TDVAL only),
207
253
  "error": "<message if not completed>"
208
254
  }
@@ -161,6 +161,54 @@ S_WAVE_{N} → S_AGGREGATE WHEN: last wave
161
161
 
162
162
  <actions>
163
163
 
164
+ ### Session Initialization (S_PARSE)
165
+
166
+ ```
167
+ Parse from $ARGUMENTS:
168
+ AUTO_YES ← --yes | -y
169
+ continueMode ← --continue
170
+ maxConcurrency ← --concurrency | -c N (default: 3)
171
+ pipelineFlag ← --pipeline targeted|standard|comprehensive
172
+ scopeTarget ← remaining text (file/module path)
173
+
174
+ Derive:
175
+ dateStr ← UTC+8 YYYYMMDD
176
+ slug ← first 3 meaningful words, kebab-case
177
+ sessionId ← "{dateStr}-tst-{slug}"
178
+ sessionFolder ← ".workflow/.csv-wave/{sessionId}"
179
+ skillRoot ← resolve path to this skill directory
180
+
181
+ mkdir -p {sessionFolder}
182
+ ```
183
+
184
+ When `--continue`: scan `.workflow/.csv-wave/*-tst-*/tasks.csv` for sessions with pending tasks. Single match → resume. Multiple → `request_user_input`. Read master tasks.csv → find first pending wave → jump to S_WAVE_{N}.
185
+
186
+ ### Scope Detection + Pipeline Selection (S_CSV_GEN)
187
+
188
+ 1. If `--pipeline` flag → use specified pipeline
189
+ 2. Else detect from scope:
190
+ - Count files and modules in scopeTarget
191
+ - ≤3 files, ≤1 module → `targeted`
192
+ - ≤10 files, ≤3 modules → `standard`
193
+ - >10 files or >3 modules → `comprehensive`
194
+ 3. Load pipeline wave assignments from csv_schema section above
195
+ 4. For each task, build CSV row with PURPOSE/TASK/EXPECTED/CONSTRAINTS in description
196
+ 5. Initialize lifecycle columns: `status=pending`, empty `findings`/`files_modified`/`pass_rate`/`coverage_score`/`error`
197
+ 6. Write `tasks.csv` and empty `discoveries.ndjson`
198
+ 7. User validation (skip if `-y`): display pipeline, task count, layer coverage targets
199
+
200
+ ### Wave Execution (S_WAVE_{N})
201
+
202
+ 1. Skip check: if all tasks in wave N completed/skipped → next wave
203
+ 2. Cascading skip: if any dep is failed/blocked → skip dependents
204
+ 3. Build `prev_context` from upstream findings
205
+ 4. Write `wave-{N}.csv` with qualifying rows + `prev_context` column
206
+ 5. `spawn_agents_on_csv` with output_schema (see below)
207
+ 6. Merge results: `result_status` → master `status`
208
+ 7. Cascade skip failed task dependents
209
+ 8. Delete `wave-{N}.csv` and `wave-{N}-results.csv`
210
+ 9. If wave was TESTRUN → transition to S_GC_CHECK
211
+
164
212
  ### GC Loop
165
213
 
166
214
  After each TESTRUN wave:
@@ -197,7 +245,7 @@ You MUST call report_agent_job_result EXACTLY ONCE before exiting. NO exceptions
197
245
  "result_status": "completed" | "failed" | "blocked",
198
246
  "findings": "<key findings, max 500 chars>",
199
247
  "files_modified": "<semicolon-separated paths or empty>",
200
- "pass_rate": "<0-100 or empty>" (TESTRUN only),
248
+ "pass_rate": "<0.0-1.0 or empty>" (TESTRUN only),
201
249
  "coverage_score": "<0-100 or empty>" (TESTRUN only),
202
250
  "error": "<message if not completed>"
203
251
  }
@@ -217,7 +265,7 @@ You MUST call report_agent_job_result EXACTLY ONCE before exiting. NO exceptions
217
265
  "result_status": { "type": "string", "enum": ["completed", "failed", "blocked"] },
218
266
  "findings": { "type": "string", "maxLength": 500 },
219
267
  "files_modified": { "type": "string" },
220
- "pass_rate": { "type": "string" },
268
+ "pass_rate": { "type": "string", "description": "0.0-1.0 ratio, e.g. 0.95" },
221
269
  "coverage_score": { "type": "string" },
222
270
  "error": { "type": "string" }
223
271
  },
@@ -43,7 +43,9 @@ Display ranked suggestions with scores, reasons, projected health delta.
43
43
  If not `--fix`: display and exit.
44
44
 
45
45
  ### Stage 5: Apply (--fix only)
46
- For each suggestion: get entry append target to `related` update via `maestro wiki update`.
46
+ **Confirmation gate**: Before applying, present the list of link changes to user via `request_user_input` for confirmation. Only proceed with user-approved changes. Skip confirmation only if `-y` flag is also set.
47
+
48
+ For each approved suggestion: get entry → append target to `related` → update via `maestro wiki update`.
47
49
  Re-run `maestro wiki health` for delta.
48
50
 
49
51
  ### Stage 6: Persist
@@ -26,7 +26,7 @@ $ARGUMENTS — scope and optional flags.
26
26
  - `--format full` — Detailed with per-entry summaries
27
27
  - `--create-issues` — Auto-create knowledge-gap issues in issues.jsonl
28
28
 
29
- **Output**: `.workflow/knowhow/KNW-digest-{slug}-{date}.md`
29
+ **Output**: `.workflow/knowhow/digest-{slug}-{date}.md`
30
30
  </context>
31
31
 
32
32
  <execution>
@@ -54,10 +54,12 @@ knowhow █░░░░ ██░░░ ████░
54
54
  Empty cells = knowledge gaps.
55
55
 
56
56
  ### Stage 6: Write Digest
57
- Produce `digest-{slug}-{date}.md` with themes, heatmap, gaps, unlinked insights, recommended actions.
57
+ Produce `.workflow/knowhow/digest-{slug}-{date}.md` with themes, heatmap, gaps, unlinked insights, recommended actions.
58
58
 
59
59
  ### Stage 7: Gap → Issue (if --create-issues)
60
- For each gap: dedup against issues.jsonl, append with `type: "knowledge-gap"`, `source: "wiki-digest"`.
60
+ **Confirmation gate**: Before creating issues, present the list of proposed gap issues to user via `request_user_input` for confirmation. Only create user-approved issues. Skip confirmation only if `-y` flag is also set.
61
+
62
+ For each approved gap: dedup against issues.jsonl, append with `type: "knowledge-gap"`, `source: "wiki-digest"`.
61
63
 
62
64
  ### Stage 8: Persist
63
65
  Append meta-insights to `specs/learnings.md` (source: "wiki-digest"). Display summary.
@@ -82,6 +84,6 @@ Append meta-insights to `specs/learnings.md` (source: "wiki-digest"). Display su
82
84
  - [ ] Cross-reference with specs/learnings.md completed
83
85
  - [ ] Coverage heatmap generated
84
86
  - [ ] If --create-issues: gap issues created (deduped)
85
- - [ ] Digest written to `KNW-digest-{slug}-{date}.md`
87
+ - [ ] Digest written to `.workflow/knowhow/digest-{slug}-{date}.md`
86
88
  - [ ] Meta-insights appended to specs/learnings.md
87
89
  </success_criteria>
@@ -13,6 +13,7 @@ export interface EmbeddingIndex {
13
13
  docIds: string[];
14
14
  vectors: Float32Array[];
15
15
  contentHashes?: string[];
16
+ chunkDocIds?: string[];
16
17
  builtAt: number;
17
18
  deviceUsed?: string;
18
19
  buildTimeMs?: number;
@@ -89,6 +90,11 @@ export declare function getUnavailableReason(): string | null;
89
90
  export declare function embedTexts(texts: string[]): Promise<Float32Array[]>;
90
91
  export declare function embedQuery(query: string): Promise<Float32Array>;
91
92
  export declare function vectorSearch(queryVector: Float32Array, index: EmbeddingIndex, limit: number): VectorSearchResult[];
93
+ /**
94
+ * Async vector search using zvec collection.
95
+ * Falls back to flat cosine scan when zvec is unavailable or feature flag is set.
96
+ */
97
+ export declare function vectorSearchZvec(queryVector: Float32Array, dir: string, limit: number): Promise<VectorSearchResult[]>;
92
98
  export declare function saveEmbeddingIndex(index: EmbeddingIndex, dir: string): void;
93
99
  export declare function loadEmbeddingIndex(dir: string): EmbeddingIndex | null;
94
100
  export interface DocForEmbedding {
@@ -99,5 +105,15 @@ export interface DocForEmbedding {
99
105
  body?: string;
100
106
  }
101
107
  export declare function hashDocContent(d: DocForEmbedding): string;
108
+ /**
109
+ * Split a document into multiple chunks for embedding.
110
+ * Short docs (<500 chars body) produce a single chunk.
111
+ * Long docs are split by markdown heading regex /^#{1,3}\s/m, max 5 chunks.
112
+ * Each chunk inherits title+summary as context prefix.
113
+ */
114
+ export declare function splitDocToChunks(d: DocForEmbedding): Array<{
115
+ chunkId: string;
116
+ text: string;
117
+ }>;
102
118
  export declare function buildEmbeddingIndex(docs: DocForEmbedding[], existingIndex?: EmbeddingIndex | null, precomputedHashes?: string[]): Promise<EmbeddingIndex>;
103
119
  export {};