maestro-flow 0.5.1 → 0.5.3
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.
- package/.agents/skills/insight-challenge/SKILL.md +228 -0
- package/.agents/skills/insight-challenge/specs/challenge-protocol.md +154 -0
- package/.agents/skills/insight-challenge/specs/verdict-schema.md +239 -0
- package/.agents/skills/maestro/SKILL.md +6 -6
- package/.agents/skills/maestro-help/SKILL.md +1 -1
- package/.agents/skills/maestro-help/index/catalog.json +3 -2
- package/.agents/skills/maestro-ralph/SKILL.md +11 -10
- package/.agents/skills/maestro-ralph-beta/SKILL.md +11 -10
- package/.agents/skills/odyssey-debug/SKILL.md +475 -0
- package/.agents/skills/odyssey-improve/SKILL.md +507 -0
- package/.agents/skills/odyssey-planex/SKILL.md +603 -0
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +429 -0
- package/.agents/skills/odyssey-ui/SKILL.md +464 -0
- package/.agy/skills/insight-challenge/SKILL.md +230 -0
- package/.agy/skills/insight-challenge/specs/challenge-protocol.md +154 -0
- package/.agy/skills/insight-challenge/specs/verdict-schema.md +239 -0
- package/.agy/skills/maestro/SKILL.md +6 -6
- package/.agy/skills/maestro-help/SKILL.md +1 -1
- package/.agy/skills/maestro-help/index/catalog.json +3 -2
- package/.agy/skills/maestro-ralph/SKILL.md +11 -10
- package/.agy/skills/maestro-ralph-beta/SKILL.md +11 -10
- package/.agy/skills/odyssey-debug/SKILL.md +475 -0
- package/.agy/skills/odyssey-improve/SKILL.md +507 -0
- package/.agy/skills/odyssey-planex/SKILL.md +603 -0
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +429 -0
- package/.agy/skills/odyssey-ui/SKILL.md +464 -0
- package/.claude/commands/maestro-ralph-beta.md +11 -10
- package/.claude/commands/maestro-ralph.md +11 -10
- package/.claude/commands/maestro.md +6 -6
- package/.claude/commands/odyssey-debug.md +473 -0
- package/.claude/commands/odyssey-improve.md +505 -0
- package/.claude/commands/odyssey-planex.md +601 -0
- package/.claude/commands/odyssey-review-test-fix.md +427 -0
- package/.claude/commands/odyssey-ui.md +462 -0
- package/.claude/skills/insight-challenge/SKILL.md +226 -0
- package/.claude/skills/insight-challenge/specs/challenge-protocol.md +154 -0
- package/.claude/skills/insight-challenge/specs/verdict-schema.md +239 -0
- package/.claude/skills/maestro-help/SKILL.md +1 -1
- package/.claude/skills/maestro-help/index/catalog.json +3 -2
- package/.codex/skills/codify-to-knowhow/SKILL.md +1 -1
- package/.codex/skills/learn-decompose/SKILL.md +144 -144
- package/.codex/skills/learn-follow/SKILL.md +83 -83
- package/.codex/skills/learn-investigate/SKILL.md +84 -84
- package/.codex/skills/learn-retro/SKILL.md +113 -113
- package/.codex/skills/learn-second-opinion/SKILL.md +116 -116
- package/.codex/skills/maestro/SKILL.md +11 -8
- package/.codex/skills/maestro-amend/SKILL.md +4 -4
- package/.codex/skills/maestro-analyze/SKILL.md +2 -2
- package/.codex/skills/maestro-blueprint/SKILL.md +4 -4
- package/.codex/skills/maestro-companion/SKILL.md +5 -5
- package/.codex/skills/maestro-composer/SKILL.md +217 -217
- package/.codex/skills/maestro-grill/SKILL.md +1 -1
- package/.codex/skills/maestro-help/SKILL.md +31 -31
- package/.codex/skills/maestro-impeccable/SKILL.md +1 -1
- package/.codex/skills/maestro-init/SKILL.md +1 -1
- package/.codex/skills/maestro-learn/SKILL.md +80 -80
- package/.codex/skills/maestro-merge/SKILL.md +76 -76
- package/.codex/skills/maestro-milestone-release/SKILL.md +74 -74
- package/.codex/skills/maestro-next/SKILL.md +1 -1
- package/.codex/skills/maestro-player/SKILL.md +3 -3
- package/.codex/skills/maestro-quick/SKILL.md +129 -129
- package/.codex/skills/maestro-ralph/SKILL.md +9 -9
- package/.codex/skills/maestro-ralph-beta/SKILL.md +35 -35
- package/.codex/skills/maestro-ralph-execute/SKILL.md +5 -5
- package/.codex/skills/maestro-tools-execute/SKILL.md +3 -3
- package/.codex/skills/maestro-tools-register/SKILL.md +3 -3
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +412 -412
- package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
- package/.codex/skills/manage-harvest/SKILL.md +99 -99
- package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
- package/.codex/skills/manage-knowhow/SKILL.md +95 -95
- package/.codex/skills/manage-knowhow-capture/SKILL.md +137 -137
- package/.codex/skills/manage-status/SKILL.md +7 -7
- package/.codex/skills/manage-wiki/SKILL.md +55 -55
- package/.codex/skills/odyssey-debug/SKILL.md +456 -0
- package/.codex/skills/odyssey-improve/SKILL.md +466 -0
- package/.codex/skills/odyssey-planex/SKILL.md +409 -0
- package/.codex/skills/odyssey-review-test-fix/SKILL.md +377 -0
- package/.codex/skills/odyssey-ui/SKILL.md +411 -0
- package/.codex/skills/quality-auto-test/SKILL.md +1 -1
- package/.codex/skills/quality-debug/SKILL.md +8 -8
- package/.codex/skills/quality-refactor/SKILL.md +3 -3
- package/.codex/skills/quality-review/SKILL.md +1 -1
- package/.codex/skills/quality-sync/SKILL.md +111 -111
- package/.codex/skills/quality-test/SKILL.md +1 -1
- package/.codex/skills/spec-add/SKILL.md +2 -2
- package/.codex/skills/spec-load/SKILL.md +1 -1
- package/.codex/skills/spec-map/SKILL.md +204 -204
- package/.codex/skills/spec-remove/SKILL.md +75 -75
- package/.codex/skills/spec-setup/SKILL.md +2 -2
- package/.codex/skills/wiki-connect/SKILL.md +73 -73
- package/.codex/skills/wiki-digest/SKILL.md +87 -87
- package/dashboard/dist/assets/{ArtifactsPage-BLvAqQlQ.js → ArtifactsPage-B6z23DfG.js} +2 -2
- package/dashboard/dist/assets/{ChatInput-DU9YGZKX.js → ChatInput-tBtGKV2i.js} +1 -1
- package/dashboard/dist/assets/{ChatPage-DYHfheXC.js → ChatPage-CcggDVs4.js} +2 -2
- package/dashboard/dist/assets/{CollabPage-CSlmvEa-.js → CollabPage-FaZeqqeS.js} +1 -1
- package/dashboard/dist/assets/{ExecutionPanel-RYWf0dYC.js → ExecutionPanel-DNRwYDXp.js} +1 -1
- package/dashboard/dist/assets/{KanbanPage-N55Iv0-X.js → KanbanPage-B2xh2s_N.js} +1 -1
- package/dashboard/dist/assets/{MaestroCoordinatePage-BxwZ6yy5.js → MaestroCoordinatePage-DCMGHDAL.js} +1 -1
- package/dashboard/dist/assets/{MarkdownRenderer-ZGtOY7Ti.js → MarkdownRenderer-C3FvTqVe.js} +1 -1
- package/dashboard/dist/assets/McpPage-HKaJ8cQP.js +16 -0
- package/dashboard/dist/assets/{MeetingRoomPage-CxHRn1xx.js → MeetingRoomPage-DGN5oUXH.js} +1 -1
- package/dashboard/dist/assets/{OutputPanel-DaL8c1i5.js → OutputPanel-BiCteH5k.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-BQTd5812.js → ProblemsPanel-Dk4v9tol.js} +1 -1
- package/dashboard/dist/assets/{RequirementBoardPage-22y9u1qh.js → RequirementBoardPage-D10A26gi.js} +1 -1
- package/dashboard/dist/assets/{RequirementPage-_mO743Xm.js → RequirementPage-Cs-2omLz.js} +1 -1
- package/dashboard/dist/assets/{RoomsPage-CExTbOGr.js → RoomsPage-tKQQhw1W.js} +1 -1
- package/dashboard/dist/assets/SpecsPage-LK1QCtcg.js +36 -0
- package/dashboard/dist/assets/{TeamsPage-BxEXLb5g.js → TeamsPage-C-bEwB8E.js} +1 -1
- package/dashboard/dist/assets/{TreeBrowser-CVtPF5C9.js → TreeBrowser-1YP-DfTY.js} +2 -2
- package/dashboard/dist/assets/{WorkflowPage-BoN18Lhs.js → WorkflowPage-dGHPsDDr.js} +2 -2
- package/dashboard/dist/assets/{arrow-left-C5ROg97G.js → arrow-left-BPFSEpfO.js} +1 -1
- package/dashboard/dist/assets/{check-Bs8PM0tQ.js → check-D5hOViiQ.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-SmErd_1F.js → chevron-right-D9BsXrIg.js} +1 -1
- package/dashboard/dist/assets/{circle-CjpslL_D.js → circle-Cn5fNpmp.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-CuzAg2fd.js → circle-alert-CZvK3B1K.js} +1 -1
- package/dashboard/dist/assets/{circle-check-BIkDU5D5.js → circle-check-DApOBP0J.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-CYctV8bK.js → circle-check-big-Cd9ztJpl.js} +1 -1
- package/dashboard/dist/assets/{code-DoB7rfxt.js → code-C3TuHjMs.js} +1 -1
- package/dashboard/dist/assets/{columns-3-Ch5KIyRa.js → columns-3-CO2SvNJb.js} +1 -1
- package/dashboard/dist/assets/{download-DadtG2Nr.js → download-BuKGI7KX.js} +1 -1
- package/dashboard/dist/assets/{en-2h6fD0j8.js → en-BmpYsIfb.js} +1 -1
- package/dashboard/dist/assets/folder-Chwj_P4A.js +11 -0
- package/dashboard/dist/assets/folder-open-S72FbKvn.js +6 -0
- package/dashboard/dist/assets/{index-BL4h1OKY.js → index-CN0YdC9M.js} +1 -1
- package/dashboard/dist/assets/{index-DQIlX2w_.js → index-Cbs79erW.js} +5 -5
- package/dashboard/dist/assets/{index-DaFwSmVJ.js → index-CdT1WNND.js} +1 -1
- package/dashboard/dist/assets/index-DEvP8cgc.css +1 -0
- package/dashboard/dist/assets/{list-CI-XIPZh.js → list-Dg_ojUpi.js} +1 -1
- package/dashboard/dist/assets/{loader-DpdMoQvh.js → loader-CMcc73C_.js} +1 -1
- package/dashboard/dist/assets/{minus-BVbfXGrC.js → minus-KxmVOIB7.js} +1 -1
- package/dashboard/dist/assets/pen-line-D1YTNDPw.js +11 -0
- package/dashboard/dist/assets/{pencil-I7GE0y29.js → pencil-BAjxSHuh.js} +1 -1
- package/dashboard/dist/assets/{proxy-CcYyZZWI.js → proxy-BewnIei6.js} +1 -1
- package/dashboard/dist/assets/{refresh-cw-BG9V_T4R.js → refresh-cw-Chc0RcRY.js} +1 -1
- package/dashboard/dist/assets/{rows-2-DP6NjQFk.js → rows-2-DWJuw8OM.js} +1 -1
- package/dashboard/dist/assets/{search-b78eLlw2.js → search-CPGb2sEw.js} +1 -1
- package/dashboard/dist/assets/{shallow-CJEesgtu.js → shallow-Dy0-7n5s.js} +1 -1
- package/dashboard/dist/assets/{table-B_lk-a1d.js → table-VI5scWpO.js} +1 -1
- package/dashboard/dist/assets/{team-types-Se7f9LfJ.js → team-types-Cu8zCPN3.js} +1 -1
- package/dashboard/dist/assets/{terminal-DXx4tvzq.js → terminal-Bqt5c6Ny.js} +1 -1
- package/dashboard/dist/assets/{trash-2-CVh9mnRj.js → trash-2-BcTVifbw.js} +1 -1
- package/dashboard/dist/assets/{users-Da9zGME5.js → users-BhFAHz4H.js} +1 -1
- package/dashboard/dist/assets/{zap-C0zaC7gJ.js → zap-BWbLhgr6.js} +1 -1
- package/dashboard/dist/assets/{zh-CN-r3AvxxOL.js → zh-CN-BIRiTdAD.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +1 -0
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/search.d.ts +14 -14
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +188 -56
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +37 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +560 -22
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +6 -2
- package/dashboard/dist-server/src/types/index.d.ts +9 -0
- package/dist/src/cli.js +3 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +50 -8
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/domain.d.ts +9 -0
- package/dist/src/commands/domain.d.ts.map +1 -0
- package/dist/src/commands/domain.js +445 -0
- package/dist/src/commands/domain.js.map +1 -0
- package/dist/src/commands/hooks.d.ts +10 -0
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +132 -22
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +82 -204
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/kg.d.ts.map +1 -1
- package/dist/src/commands/kg.js +183 -90
- package/dist/src/commands/kg.js.map +1 -1
- package/dist/src/commands/search.d.ts +15 -8
- package/dist/src/commands/search.d.ts.map +1 -1
- package/dist/src/commands/search.js +205 -59
- package/dist/src/commands/search.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +9 -1
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +0 -7
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +8 -1
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/commands/workspace.d.ts +12 -0
- package/dist/src/commands/workspace.d.ts.map +1 -0
- package/dist/src/commands/workspace.js +230 -0
- package/dist/src/commands/workspace.js.map +1 -0
- package/dist/src/config/cli-tools-config.d.ts +5 -0
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +31 -0
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/config/index.d.ts +9 -1
- package/dist/src/config/index.d.ts.map +1 -1
- package/dist/src/config/index.js +35 -1
- package/dist/src/config/index.js.map +1 -1
- package/dist/src/core/install-executor.d.ts +31 -0
- package/dist/src/core/install-executor.d.ts.map +1 -0
- package/dist/src/core/install-executor.js +231 -0
- package/dist/src/core/install-executor.js.map +1 -0
- package/dist/src/core/install-profile.d.ts +103 -0
- package/dist/src/core/install-profile.d.ts.map +1 -0
- package/dist/src/core/install-profile.js +225 -0
- package/dist/src/core/install-profile.js.map +1 -0
- package/dist/src/graph/kg/credibility.d.ts +37 -0
- package/dist/src/graph/kg/credibility.d.ts.map +1 -0
- package/dist/src/graph/kg/credibility.js +141 -0
- package/dist/src/graph/kg/credibility.js.map +1 -0
- package/dist/src/graph/kg/db/connection.d.ts +28 -0
- package/dist/src/graph/kg/db/connection.d.ts.map +1 -0
- package/dist/src/graph/kg/db/connection.js +142 -0
- package/dist/src/graph/kg/db/connection.js.map +1 -0
- package/dist/src/graph/kg/db/index.d.ts +5 -0
- package/dist/src/graph/kg/db/index.d.ts.map +1 -0
- package/dist/src/graph/kg/db/index.js +6 -0
- package/dist/src/graph/kg/db/index.js.map +1 -0
- package/dist/src/graph/kg/db/migrations.d.ts +8 -0
- package/dist/src/graph/kg/db/migrations.d.ts.map +1 -0
- package/dist/src/graph/kg/db/migrations.js +88 -0
- package/dist/src/graph/kg/db/migrations.js.map +1 -0
- package/dist/src/graph/kg/db/queries.d.ts +84 -0
- package/dist/src/graph/kg/db/queries.d.ts.map +1 -0
- package/dist/src/graph/kg/db/queries.js +471 -0
- package/dist/src/graph/kg/db/queries.js.map +1 -0
- package/dist/src/graph/kg/db/types.d.ts +123 -0
- package/dist/src/graph/kg/db/types.d.ts.map +1 -0
- package/dist/src/graph/kg/db/types.js +75 -0
- package/dist/src/graph/kg/db/types.js.map +1 -0
- package/dist/src/graph/kg/engine.d.ts +87 -0
- package/dist/src/graph/kg/engine.d.ts.map +1 -0
- package/dist/src/graph/kg/engine.js +247 -0
- package/dist/src/graph/kg/engine.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/code-extractor.d.ts +40 -0
- package/dist/src/graph/kg/extraction/code/code-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/code-extractor.js +296 -0
- package/dist/src/graph/kg/extraction/code/code-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/dfm-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/code/dfm-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/dfm-extractor.js +122 -0
- package/dist/src/graph/kg/extraction/code/dfm-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/generated-detection.d.ts +14 -0
- package/dist/src/graph/kg/extraction/code/generated-detection.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/generated-detection.js +65 -0
- package/dist/src/graph/kg/extraction/code/generated-detection.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/languages/index.d.ts +9 -0
- package/dist/src/graph/kg/extraction/code/languages/index.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/languages/index.js +2119 -0
- package/dist/src/graph/kg/extraction/code/languages/index.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/languages/typescript.d.ts +5 -0
- package/dist/src/graph/kg/extraction/code/languages/typescript.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/languages/typescript.js +191 -0
- package/dist/src/graph/kg/extraction/code/languages/typescript.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/liquid-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/code/liquid-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/liquid-extractor.js +117 -0
- package/dist/src/graph/kg/extraction/code/liquid-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/mybatis-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/code/mybatis-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/mybatis-extractor.js +84 -0
- package/dist/src/graph/kg/extraction/code/mybatis-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/svelte-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/code/svelte-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/svelte-extractor.js +92 -0
- package/dist/src/graph/kg/extraction/code/svelte-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter-types.d.ts +61 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter-types.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter-types.js +53 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter-types.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter.d.ts +55 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter.js +227 -0
- package/dist/src/graph/kg/extraction/code/tree-sitter.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/vue-extractor.d.ts +6 -0
- package/dist/src/graph/kg/extraction/code/vue-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/vue-extractor.js +109 -0
- package/dist/src/graph/kg/extraction/code/vue-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/code/wasm-stability.d.ts +44 -0
- package/dist/src/graph/kg/extraction/code/wasm-stability.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/code/wasm-stability.js +140 -0
- package/dist/src/graph/kg/extraction/code/wasm-stability.js.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/codebase-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/knowledge/codebase-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/codebase-extractor.js +149 -0
- package/dist/src/graph/kg/extraction/knowledge/codebase-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/domain-extractor.d.ts +4 -0
- package/dist/src/graph/kg/extraction/knowledge/domain-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/domain-extractor.js +114 -0
- package/dist/src/graph/kg/extraction/knowledge/domain-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/issue-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/knowledge/issue-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/issue-extractor.js +84 -0
- package/dist/src/graph/kg/extraction/knowledge/issue-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/spec-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/knowledge/spec-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/spec-extractor.js +173 -0
- package/dist/src/graph/kg/extraction/knowledge/spec-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/wiki-extractor.d.ts +3 -0
- package/dist/src/graph/kg/extraction/knowledge/wiki-extractor.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/knowledge/wiki-extractor.js +165 -0
- package/dist/src/graph/kg/extraction/knowledge/wiki-extractor.js.map +1 -0
- package/dist/src/graph/kg/extraction/orchestrator.d.ts +6 -0
- package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -0
- package/dist/src/graph/kg/extraction/orchestrator.js +208 -0
- package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -0
- package/dist/src/graph/kg/index.d.ts +29 -0
- package/dist/src/graph/kg/index.d.ts.map +1 -0
- package/dist/src/graph/kg/index.js +35 -0
- package/dist/src/graph/kg/index.js.map +1 -0
- package/dist/src/graph/kg/query/context-builder.d.ts +38 -0
- package/dist/src/graph/kg/query/context-builder.d.ts.map +1 -0
- package/dist/src/graph/kg/query/context-builder.js +184 -0
- package/dist/src/graph/kg/query/context-builder.js.map +1 -0
- package/dist/src/graph/kg/query/index.d.ts +8 -0
- package/dist/src/graph/kg/query/index.d.ts.map +1 -0
- package/dist/src/graph/kg/query/index.js +6 -0
- package/dist/src/graph/kg/query/index.js.map +1 -0
- package/dist/src/graph/kg/query/scoring.d.ts +19 -0
- package/dist/src/graph/kg/query/scoring.d.ts.map +1 -0
- package/dist/src/graph/kg/query/scoring.js +158 -0
- package/dist/src/graph/kg/query/scoring.js.map +1 -0
- package/dist/src/graph/kg/query/search.d.ts +59 -0
- package/dist/src/graph/kg/query/search.d.ts.map +1 -0
- package/dist/src/graph/kg/query/search.js +158 -0
- package/dist/src/graph/kg/query/search.js.map +1 -0
- package/dist/src/graph/kg/query/traversal.d.ts +75 -0
- package/dist/src/graph/kg/query/traversal.d.ts.map +1 -0
- package/dist/src/graph/kg/query/traversal.js +420 -0
- package/dist/src/graph/kg/query/traversal.js.map +1 -0
- package/dist/src/graph/kg/resolution/callback-synthesizer.d.ts +41 -0
- package/dist/src/graph/kg/resolution/callback-synthesizer.d.ts.map +1 -0
- package/dist/src/graph/kg/resolution/callback-synthesizer.js +450 -0
- package/dist/src/graph/kg/resolution/callback-synthesizer.js.map +1 -0
- package/dist/src/graph/kg/resolution/frameworks/index.d.ts +18 -0
- package/dist/src/graph/kg/resolution/frameworks/index.d.ts.map +1 -0
- package/dist/src/graph/kg/resolution/frameworks/index.js +632 -0
- package/dist/src/graph/kg/resolution/frameworks/index.js.map +1 -0
- package/dist/src/graph/kg/resolution/import-resolver.d.ts +73 -0
- package/dist/src/graph/kg/resolution/import-resolver.d.ts.map +1 -0
- package/dist/src/graph/kg/resolution/import-resolver.js +257 -0
- package/dist/src/graph/kg/resolution/import-resolver.js.map +1 -0
- package/dist/src/graph/kg/resolution/index.d.ts +11 -0
- package/dist/src/graph/kg/resolution/index.d.ts.map +1 -0
- package/dist/src/graph/kg/resolution/index.js +7 -0
- package/dist/src/graph/kg/resolution/index.js.map +1 -0
- package/dist/src/graph/kg/resolution/knowledge-resolver.d.ts +22 -0
- package/dist/src/graph/kg/resolution/knowledge-resolver.d.ts.map +1 -0
- package/dist/src/graph/kg/resolution/knowledge-resolver.js +288 -0
- package/dist/src/graph/kg/resolution/knowledge-resolver.js.map +1 -0
- package/dist/src/graph/kg/resolution/name-matcher.d.ts +25 -0
- package/dist/src/graph/kg/resolution/name-matcher.d.ts.map +1 -0
- package/dist/src/graph/kg/resolution/name-matcher.js +162 -0
- package/dist/src/graph/kg/resolution/name-matcher.js.map +1 -0
- package/dist/src/graph/kg/schema.sql +210 -0
- package/dist/src/graph/kg/surface/cli.d.ts +3 -0
- package/dist/src/graph/kg/surface/cli.d.ts.map +1 -0
- package/dist/src/graph/kg/surface/cli.js +500 -0
- package/dist/src/graph/kg/surface/cli.js.map +1 -0
- package/dist/src/graph/kg/surface/hook-injector.d.ts +33 -0
- package/dist/src/graph/kg/surface/hook-injector.d.ts.map +1 -0
- package/dist/src/graph/kg/surface/hook-injector.js +172 -0
- package/dist/src/graph/kg/surface/hook-injector.js.map +1 -0
- package/dist/src/graph/kg/surface/index.d.ts +6 -0
- package/dist/src/graph/kg/surface/index.d.ts.map +1 -0
- package/dist/src/graph/kg/surface/index.js +5 -0
- package/dist/src/graph/kg/surface/index.js.map +1 -0
- package/dist/src/graph/kg/surface/mcp-tools.d.ts +20 -0
- package/dist/src/graph/kg/surface/mcp-tools.d.ts.map +1 -0
- package/dist/src/graph/kg/surface/mcp-tools.js +253 -0
- package/dist/src/graph/kg/surface/mcp-tools.js.map +1 -0
- package/dist/src/graph/kg/sync/incremental-sync.d.ts +24 -0
- package/dist/src/graph/kg/sync/incremental-sync.d.ts.map +1 -0
- package/dist/src/graph/kg/sync/incremental-sync.js +71 -0
- package/dist/src/graph/kg/sync/incremental-sync.js.map +1 -0
- package/dist/src/graph/kg/sync/index.d.ts +5 -0
- package/dist/src/graph/kg/sync/index.d.ts.map +1 -0
- package/dist/src/graph/kg/sync/index.js +4 -0
- package/dist/src/graph/kg/sync/index.js.map +1 -0
- package/dist/src/graph/kg/sync/watch-policy.d.ts +33 -0
- package/dist/src/graph/kg/sync/watch-policy.d.ts.map +1 -0
- package/dist/src/graph/kg/sync/watch-policy.js +90 -0
- package/dist/src/graph/kg/sync/watch-policy.js.map +1 -0
- package/dist/src/hooks/constants.d.ts +0 -2
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +0 -2
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.d.ts +6 -0
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.js +157 -81
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
- package/dist/src/hooks/kg-auto-init.d.ts +13 -0
- package/dist/src/hooks/kg-auto-init.d.ts.map +1 -0
- package/dist/src/hooks/kg-auto-init.js +38 -0
- package/dist/src/hooks/kg-auto-init.js.map +1 -0
- package/dist/src/hooks/kg-context-injector.d.ts +1 -3
- package/dist/src/hooks/kg-context-injector.d.ts.map +1 -1
- package/dist/src/hooks/kg-context-injector.js +12 -17
- package/dist/src/hooks/kg-context-injector.js.map +1 -1
- package/dist/src/hooks/kg-sync-hook.d.ts +1 -9
- package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -1
- package/dist/src/hooks/kg-sync-hook.js +21 -90
- package/dist/src/hooks/kg-sync-hook.js.map +1 -1
- package/dist/src/hooks/spec-analytics.d.ts +1 -0
- package/dist/src/hooks/spec-analytics.d.ts.map +1 -1
- package/dist/src/hooks/spec-analytics.js +1 -3
- package/dist/src/hooks/spec-analytics.js.map +1 -1
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +65 -1
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +52 -9
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +52 -9
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +40 -4
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/ralph/skill-scanner.d.ts.map +1 -1
- package/dist/src/ralph/skill-scanner.js +9 -3
- package/dist/src/ralph/skill-scanner.js.map +1 -1
- package/dist/src/tools/__tests__/domain-search-debug.d.ts +2 -0
- package/dist/src/tools/__tests__/domain-search-debug.d.ts.map +1 -0
- package/dist/src/tools/__tests__/domain-search-debug.js +32 -0
- package/dist/src/tools/__tests__/domain-search-debug.js.map +1 -0
- package/dist/src/tools/domain-loader.d.ts +63 -0
- package/dist/src/tools/domain-loader.d.ts.map +1 -0
- package/dist/src/tools/domain-loader.js +295 -0
- package/dist/src/tools/domain-loader.js.map +1 -0
- package/dist/src/tools/domain-matcher.d.ts +24 -0
- package/dist/src/tools/domain-matcher.d.ts.map +1 -0
- package/dist/src/tools/domain-matcher.js +117 -0
- package/dist/src/tools/domain-matcher.js.map +1 -0
- package/dist/src/tools/domain-scanner.d.ts +32 -0
- package/dist/src/tools/domain-scanner.d.ts.map +1 -0
- package/dist/src/tools/domain-scanner.js +263 -0
- package/dist/src/tools/domain-scanner.js.map +1 -0
- package/dist/src/tools/domain-schema.d.ts +18 -0
- package/dist/src/tools/domain-schema.d.ts.map +1 -0
- package/dist/src/tools/domain-schema.js +104 -0
- package/dist/src/tools/domain-schema.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +1 -0
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +5 -0
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +10 -2
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tui/install-ui/ConfigPanel.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ConfigPanel.js +9 -1
- package/dist/src/tui/install-ui/ConfigPanel.js.map +1 -1
- package/dist/src/tui/install-ui/GroupedHub.d.ts +55 -0
- package/dist/src/tui/install-ui/GroupedHub.d.ts.map +1 -0
- package/dist/src/tui/install-ui/GroupedHub.js +210 -0
- package/dist/src/tui/install-ui/GroupedHub.js.map +1 -0
- package/dist/src/tui/install-ui/HooksConfig.d.ts +10 -5
- package/dist/src/tui/install-ui/HooksConfig.d.ts.map +1 -1
- package/dist/src/tui/install-ui/HooksConfig.js +83 -18
- package/dist/src/tui/install-ui/HooksConfig.js.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.d.ts +1 -30
- package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js +72 -12
- package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts +4 -21
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +89 -260
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts +3 -7
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +45 -267
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +2 -4
- package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.js +1 -5
- package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
- package/dist/src/tui/install-ui/index.d.ts +5 -1
- package/dist/src/tui/install-ui/index.d.ts.map +1 -1
- package/dist/src/tui/install-ui/index.js +1 -0
- package/dist/src/tui/install-ui/index.js.map +1 -1
- package/dist/src/tui/install-ui/types.d.ts +39 -0
- package/dist/src/tui/install-ui/types.d.ts.map +1 -1
- package/dist/src/tui/install-ui/types.js +1 -1
- package/dist/src/tui/install-ui/types.js.map +1 -1
- package/dist/src/tui/install-ui/useInstallFlowState.d.ts +69 -0
- package/dist/src/tui/install-ui/useInstallFlowState.d.ts.map +1 -0
- package/dist/src/tui/install-ui/useInstallFlowState.js +288 -0
- package/dist/src/tui/install-ui/useInstallFlowState.js.map +1 -0
- package/dist/src/tui/shared/components.d.ts +4 -0
- package/dist/src/tui/shared/components.d.ts.map +1 -1
- package/dist/src/tui/shared/components.js +4 -0
- package/dist/src/tui/shared/components.js.map +1 -1
- package/dist/src/tui/shared/index.d.ts +1 -1
- package/dist/src/tui/shared/index.d.ts.map +1 -1
- package/dist/src/tui/shared/index.js +1 -1
- package/dist/src/tui/shared/index.js.map +1 -1
- package/dist/src/tui/shared/tokens.d.ts +5 -5
- package/dist/src/tui/shared/tokens.js +5 -5
- package/dist/src/tui/shared/tokens.js.map +1 -1
- package/dist/src/types/index.d.ts +9 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/cli-format.d.ts +2 -1
- package/dist/src/utils/cli-format.d.ts.map +1 -1
- package/dist/src/utils/cli-format.js +14 -3
- package/dist/src/utils/cli-format.js.map +1 -1
- package/dist/src/utils/cooldown-guard.d.ts +17 -0
- package/dist/src/utils/cooldown-guard.d.ts.map +1 -0
- package/dist/src/utils/cooldown-guard.js +59 -0
- package/dist/src/utils/cooldown-guard.js.map +1 -0
- package/dist/src/utils/jsonl-log.d.ts.map +1 -1
- package/dist/src/utils/jsonl-log.js +2 -1
- package/dist/src/utils/jsonl-log.js.map +1 -1
- package/dist/src/utils/update-notices.js +17 -4
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +4 -5
- package/workflows/claude-instructions.md +23 -0
- package/workflows/codex-instructions.md +22 -0
- package/workflows/finish-work.md +25 -0
- package/workflows/updates/update-v3-setup.md +7 -15
- package/dashboard/dist/assets/McpPage-Im6s4pGR.js +0 -21
- package/dashboard/dist/assets/SpecsPage-gr4KX51-.js +0 -36
- package/dashboard/dist/assets/folder-B8ODoZfb.js +0 -16
- package/dashboard/dist/assets/index-6-yE5Yl9.css +0 -1
- package/dashboard/dist/assets/pen-line-CR8GaHt-.js +0 -6
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: learn-decompose
|
|
3
|
-
description: Extract design patterns from code into specs and wiki
|
|
4
|
-
argument-hint: "[-y|--yes] [-c|--concurrency 4] [--continue] \"<path|module> [--patterns <list>] [--save-spec] [--save-wiki]\""
|
|
5
|
-
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep,
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
Systematic pattern extraction from code via CSV wave pipeline. 4 parallel dimension agents
|
|
10
|
-
scan a module, then a cross-reference agent deduplicates against existing patterns and
|
|
11
|
-
produces a catalog. Discovered patterns persist to `.workflow/specs/learnings.md` and optionally to
|
|
12
|
-
specs (via `spec-add`) and wiki.
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
Resolve Target → Load Existing Patterns → Wave 1 (4 parallel dimension scans) → Wave 2 (cross-ref + catalog) → Persist
|
|
16
|
-
```
|
|
17
|
-
</purpose>
|
|
18
|
-
|
|
19
|
-
<context>
|
|
20
|
-
$ARGUMENTS — target path/module and optional flags.
|
|
21
|
-
|
|
22
|
-
**Target resolution:**
|
|
23
|
-
- File path → analyze that file
|
|
24
|
-
- Directory path → all source files in it
|
|
25
|
-
- Module name → Glob `src/**/{module}*`
|
|
26
|
-
|
|
27
|
-
**Flags:**
|
|
28
|
-
- `-y, --yes`: Skip confirmations
|
|
29
|
-
- `-c, --concurrency N`: Max concurrent agents (default: 4)
|
|
30
|
-
- `--continue`: Resume existing session
|
|
31
|
-
- `--patterns <list>`: Comma-separated pattern names to focus on
|
|
32
|
-
- `--save-spec`: Invoke `spec-add` for each new pattern
|
|
33
|
-
- `--save-wiki`: Create wiki note entries per dimension group
|
|
34
|
-
|
|
35
|
-
**Output**: `.workflow/.csv-wave/{session-id}/` + `.workflow/knowhow/KNW-decompose-{slug}-{date}.md`
|
|
36
|
-
</context>
|
|
37
|
-
|
|
38
|
-
<invariants>
|
|
39
|
-
1. **4 dimensions always**: structural, behavioral, data, error — each a wave 1 task
|
|
40
|
-
2. **Evidence required**: Every finding must have file:line anchors
|
|
41
|
-
3. **Dedup before persist**: Cross-reference against existing specs + lessons
|
|
42
|
-
4. **Stable IDs**: INS-id from `hash("decompose" + target + pattern_name)`
|
|
43
|
-
5. **No files modified outside** `.workflow/knowhow/` (and optionally specs/wiki)
|
|
44
|
-
</invariants>
|
|
45
|
-
|
|
46
|
-
<execution>
|
|
47
|
-
|
|
48
|
-
### Phase 1: Session Init + Target Resolution
|
|
49
|
-
|
|
50
|
-
Parse flags from `$ARGUMENTS`: `-y`/`--yes`, `--patterns <list>`, `--save-spec`, `--save-wiki`, `--continue`, `-c N`.
|
|
51
|
-
Extract remaining text as target path/module.
|
|
52
|
-
|
|
53
|
-
Resolve target to file list. Load coding specs: `maestro spec load --category coding` for documented patterns and conventions. Load existing patterns from `coding-conventions.md` + `.workflow/specs/learnings.md` for dedup set. Browse wiki: `maestro search --category coding`, load relevant entries.
|
|
54
|
-
|
|
55
|
-
### Phase 2: Wave 1 — Parallel Dimension Scans
|
|
56
|
-
|
|
57
|
-
Generate `tasks.csv` with 4 dimension rows (wave 1) + 1 cross-ref row (wave 2). Initialize every row with `status="pending"`. Filter `wave==N AND status=="pending"` when writing each wave CSV.
|
|
58
|
-
|
|
59
|
-
| id | dimension | focus |
|
|
60
|
-
|----|-----------|-------|
|
|
61
|
-
| 1 | structural | Class hierarchy, composition, DI, factories, exports |
|
|
62
|
-
| 2 | behavioral | Events, middleware, observer, command, state machines |
|
|
63
|
-
| 3 | data | Repository, DTO, caching, serialization, validation |
|
|
64
|
-
| 4 | error | Boundaries, retry/backoff, fallbacks, guards, logging |
|
|
65
|
-
| 5 | cross-ref | Dedup + catalog from wave 1 findings |
|
|
66
|
-
|
|
67
|
-
**output_schema** (both waves):
|
|
68
|
-
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"type": "object",
|
|
72
|
-
"properties": {
|
|
73
|
-
"id": { "type": "string" },
|
|
74
|
-
"result_status": { "type": "string", "enum": ["completed", "failed"] },
|
|
75
|
-
"dimension": { "type": "string", "enum": ["structural", "behavioral", "data", "error", "cross-ref"] },
|
|
76
|
-
"patterns": { "type": "string", "description": "JSON array string: [{name, dimension, confidence, anchors, description, rationale, tradeoffs}]" },
|
|
77
|
-
"findings": { "type": "string", "maxLength": 500 },
|
|
78
|
-
"error": { "type": "string" }
|
|
79
|
-
},
|
|
80
|
-
"required": ["id", "result_status", "findings"]
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Merge: `result_status` → master `status`; copy `dimension`, `patterns`, `findings`, `error`.
|
|
85
|
-
|
|
86
|
-
**Shared termination contract** (embed in every instruction):
|
|
87
|
-
```
|
|
88
|
-
You MUST call report_agent_job_result EXACTLY ONCE before exiting.
|
|
89
|
-
- Success → result_status=completed (patterns may be empty array if nothing found)
|
|
90
|
-
- Failure → result_status=failed with error message
|
|
91
|
-
- Timeout → near max_runtime_seconds → result_status=completed with partial patterns
|
|
92
|
-
- NEVER continue indefinitely. NEVER exit silently. NEVER omit the call.
|
|
93
|
-
- Every finding MUST include file:line anchors. No speculation.
|
|
94
|
-
- Read-only analysis. Do NOT modify source.
|
|
95
|
-
Do NOT write to tasks.csv, wave-*.csv, results.csv. Do NOT call spawn_agents_on_csv (no recursion).
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Each dimension agent populates `patterns` as a JSON array string of:
|
|
99
|
-
```json
|
|
100
|
-
[{
|
|
101
|
-
"name": "pattern name",
|
|
102
|
-
"dimension": "structural|behavioral|data|error",
|
|
103
|
-
"confidence": "high|medium|low",
|
|
104
|
-
"anchors": ["file:line"],
|
|
105
|
-
"description": "what it does",
|
|
106
|
-
"rationale": "why this approach",
|
|
107
|
-
"tradeoffs": "what was given up"
|
|
108
|
-
}]
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Phase 3: Wave 2 — Cross-Reference + Catalog
|
|
112
|
-
|
|
113
|
-
Single agent receives all wave 1 findings via `prev_context`. Uses same `output_schema` + termination contract above. Tasks:
|
|
114
|
-
- Match against dedup set → mark as `documented`, `known`, or `new`
|
|
115
|
-
- Merge duplicates across dimensions (same pattern found by multiple agents)
|
|
116
|
-
- Flag contradictions with documented conventions
|
|
117
|
-
- Build pattern catalog grouped by dimension
|
|
118
|
-
|
|
119
|
-
### Phase 4: Persist
|
|
120
|
-
|
|
121
|
-
1. Write `KNW-decompose-{slug}-{date}.md` with full catalog
|
|
122
|
-
2. Append each **new** pattern to `.workflow/specs/learnings.md` (source: "decompose", category: "pattern")
|
|
123
|
-
3. If `--save-spec`: invoke `spec-add` per new pattern
|
|
124
|
-
4. If `--save-wiki`: create wiki note per dimension group
|
|
125
|
-
</execution>
|
|
126
|
-
|
|
127
|
-
<error_codes>
|
|
128
|
-
| Code | Severity | Condition | Recovery |
|
|
129
|
-
|------|----------|-----------|----------|
|
|
130
|
-
| E001 | error | Target path not found | Check path or use module name |
|
|
131
|
-
| E002 | error | No source files in target | Check target has .ts/.js files |
|
|
132
|
-
| W001 | warning | Dimension agent failed — partial results | Proceed with available dimensions |
|
|
133
|
-
| W002 | warning | coding-conventions.md not found | All patterns marked "new" |
|
|
134
|
-
</error_codes>
|
|
135
|
-
|
|
136
|
-
<success_criteria>
|
|
137
|
-
- [ ] Target resolved to concrete file list
|
|
138
|
-
- [ ] 4 dimension agents spawned in parallel via spawn_agents_on_csv
|
|
139
|
-
- [ ] Each finding has: name, dimension, confidence, anchors, description
|
|
140
|
-
- [ ] Cross-reference performed (documented / known / new)
|
|
141
|
-
- [ ] Pattern catalog written to `KNW-decompose-{slug}-{date}.md`
|
|
142
|
-
- [ ] New patterns appended to `.workflow/specs/learnings.md` with stable INS-ids
|
|
143
|
-
- [ ] If --save-spec / --save-wiki: entries created
|
|
144
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: learn-decompose
|
|
3
|
+
description: Extract design patterns from code into specs and wiki
|
|
4
|
+
argument-hint: "[-y|--yes] [-c|--concurrency 4] [--continue] \"<path|module> [--patterns <list>] [--save-spec] [--save-wiki]\""
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Systematic pattern extraction from code via CSV wave pipeline. 4 parallel dimension agents
|
|
10
|
+
scan a module, then a cross-reference agent deduplicates against existing patterns and
|
|
11
|
+
produces a catalog. Discovered patterns persist to `.workflow/specs/learnings.md` and optionally to
|
|
12
|
+
specs (via `spec-add`) and wiki.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Resolve Target → Load Existing Patterns → Wave 1 (4 parallel dimension scans) → Wave 2 (cross-ref + catalog) → Persist
|
|
16
|
+
```
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<context>
|
|
20
|
+
$ARGUMENTS — target path/module and optional flags.
|
|
21
|
+
|
|
22
|
+
**Target resolution:**
|
|
23
|
+
- File path → analyze that file
|
|
24
|
+
- Directory path → all source files in it
|
|
25
|
+
- Module name → Glob `src/**/{module}*`
|
|
26
|
+
|
|
27
|
+
**Flags:**
|
|
28
|
+
- `-y, --yes`: Skip confirmations
|
|
29
|
+
- `-c, --concurrency N`: Max concurrent agents (default: 4)
|
|
30
|
+
- `--continue`: Resume existing session
|
|
31
|
+
- `--patterns <list>`: Comma-separated pattern names to focus on
|
|
32
|
+
- `--save-spec`: Invoke `spec-add` for each new pattern
|
|
33
|
+
- `--save-wiki`: Create wiki note entries per dimension group
|
|
34
|
+
|
|
35
|
+
**Output**: `.workflow/.csv-wave/{session-id}/` + `.workflow/knowhow/KNW-decompose-{slug}-{date}.md`
|
|
36
|
+
</context>
|
|
37
|
+
|
|
38
|
+
<invariants>
|
|
39
|
+
1. **4 dimensions always**: structural, behavioral, data, error — each a wave 1 task
|
|
40
|
+
2. **Evidence required**: Every finding must have file:line anchors
|
|
41
|
+
3. **Dedup before persist**: Cross-reference against existing specs + lessons
|
|
42
|
+
4. **Stable IDs**: INS-id from `hash("decompose" + target + pattern_name)`
|
|
43
|
+
5. **No files modified outside** `.workflow/knowhow/` (and optionally specs/wiki)
|
|
44
|
+
</invariants>
|
|
45
|
+
|
|
46
|
+
<execution>
|
|
47
|
+
|
|
48
|
+
### Phase 1: Session Init + Target Resolution
|
|
49
|
+
|
|
50
|
+
Parse flags from `$ARGUMENTS`: `-y`/`--yes`, `--patterns <list>`, `--save-spec`, `--save-wiki`, `--continue`, `-c N`.
|
|
51
|
+
Extract remaining text as target path/module.
|
|
52
|
+
|
|
53
|
+
Resolve target to file list. Load coding specs: `maestro spec load --category coding` for documented patterns and conventions. Load existing patterns from `coding-conventions.md` + `.workflow/specs/learnings.md` for dedup set. Browse wiki: `maestro search --category coding`, load relevant entries.
|
|
54
|
+
|
|
55
|
+
### Phase 2: Wave 1 — Parallel Dimension Scans
|
|
56
|
+
|
|
57
|
+
Generate `tasks.csv` with 4 dimension rows (wave 1) + 1 cross-ref row (wave 2). Initialize every row with `status="pending"`. Filter `wave==N AND status=="pending"` when writing each wave CSV.
|
|
58
|
+
|
|
59
|
+
| id | dimension | focus |
|
|
60
|
+
|----|-----------|-------|
|
|
61
|
+
| 1 | structural | Class hierarchy, composition, DI, factories, exports |
|
|
62
|
+
| 2 | behavioral | Events, middleware, observer, command, state machines |
|
|
63
|
+
| 3 | data | Repository, DTO, caching, serialization, validation |
|
|
64
|
+
| 4 | error | Boundaries, retry/backoff, fallbacks, guards, logging |
|
|
65
|
+
| 5 | cross-ref | Dedup + catalog from wave 1 findings |
|
|
66
|
+
|
|
67
|
+
**output_schema** (both waves):
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"id": { "type": "string" },
|
|
74
|
+
"result_status": { "type": "string", "enum": ["completed", "failed"] },
|
|
75
|
+
"dimension": { "type": "string", "enum": ["structural", "behavioral", "data", "error", "cross-ref"] },
|
|
76
|
+
"patterns": { "type": "string", "description": "JSON array string: [{name, dimension, confidence, anchors, description, rationale, tradeoffs}]" },
|
|
77
|
+
"findings": { "type": "string", "maxLength": 500 },
|
|
78
|
+
"error": { "type": "string" }
|
|
79
|
+
},
|
|
80
|
+
"required": ["id", "result_status", "findings"]
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Merge: `result_status` → master `status`; copy `dimension`, `patterns`, `findings`, `error`.
|
|
85
|
+
|
|
86
|
+
**Shared termination contract** (embed in every instruction):
|
|
87
|
+
```
|
|
88
|
+
You MUST call report_agent_job_result EXACTLY ONCE before exiting.
|
|
89
|
+
- Success → result_status=completed (patterns may be empty array if nothing found)
|
|
90
|
+
- Failure → result_status=failed with error message
|
|
91
|
+
- Timeout → near max_runtime_seconds → result_status=completed with partial patterns
|
|
92
|
+
- NEVER continue indefinitely. NEVER exit silently. NEVER omit the call.
|
|
93
|
+
- Every finding MUST include file:line anchors. No speculation.
|
|
94
|
+
- Read-only analysis. Do NOT modify source.
|
|
95
|
+
Do NOT write to tasks.csv, wave-*.csv, results.csv. Do NOT call spawn_agents_on_csv (no recursion).
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Each dimension agent populates `patterns` as a JSON array string of:
|
|
99
|
+
```json
|
|
100
|
+
[{
|
|
101
|
+
"name": "pattern name",
|
|
102
|
+
"dimension": "structural|behavioral|data|error",
|
|
103
|
+
"confidence": "high|medium|low",
|
|
104
|
+
"anchors": ["file:line"],
|
|
105
|
+
"description": "what it does",
|
|
106
|
+
"rationale": "why this approach",
|
|
107
|
+
"tradeoffs": "what was given up"
|
|
108
|
+
}]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Phase 3: Wave 2 — Cross-Reference + Catalog
|
|
112
|
+
|
|
113
|
+
Single agent receives all wave 1 findings via `prev_context`. Uses same `output_schema` + termination contract above. Tasks:
|
|
114
|
+
- Match against dedup set → mark as `documented`, `known`, or `new`
|
|
115
|
+
- Merge duplicates across dimensions (same pattern found by multiple agents)
|
|
116
|
+
- Flag contradictions with documented conventions
|
|
117
|
+
- Build pattern catalog grouped by dimension
|
|
118
|
+
|
|
119
|
+
### Phase 4: Persist
|
|
120
|
+
|
|
121
|
+
1. Write `KNW-decompose-{slug}-{date}.md` with full catalog
|
|
122
|
+
2. Append each **new** pattern to `.workflow/specs/learnings.md` (source: "decompose", category: "pattern")
|
|
123
|
+
3. If `--save-spec`: invoke `spec-add` per new pattern
|
|
124
|
+
4. If `--save-wiki`: create wiki note per dimension group
|
|
125
|
+
</execution>
|
|
126
|
+
|
|
127
|
+
<error_codes>
|
|
128
|
+
| Code | Severity | Condition | Recovery |
|
|
129
|
+
|------|----------|-----------|----------|
|
|
130
|
+
| E001 | error | Target path not found | Check path or use module name |
|
|
131
|
+
| E002 | error | No source files in target | Check target has .ts/.js files |
|
|
132
|
+
| W001 | warning | Dimension agent failed — partial results | Proceed with available dimensions |
|
|
133
|
+
| W002 | warning | coding-conventions.md not found | All patterns marked "new" |
|
|
134
|
+
</error_codes>
|
|
135
|
+
|
|
136
|
+
<success_criteria>
|
|
137
|
+
- [ ] Target resolved to concrete file list
|
|
138
|
+
- [ ] 4 dimension agents spawned in parallel via spawn_agents_on_csv
|
|
139
|
+
- [ ] Each finding has: name, dimension, confidence, anchors, description
|
|
140
|
+
- [ ] Cross-reference performed (documented / known / new)
|
|
141
|
+
- [ ] Pattern catalog written to `KNW-decompose-{slug}-{date}.md`
|
|
142
|
+
- [ ] New patterns appended to `.workflow/specs/learnings.md` with stable INS-ids
|
|
143
|
+
- [ ] If --save-spec / --save-wiki: entries created
|
|
144
|
+
</success_criteria>
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: learn-follow
|
|
3
|
-
description: Guided reading of code or wiki to extract patterns
|
|
4
|
-
argument-hint: "<path|wiki-id|topic> [--depth shallow|deep] [--save-wiki]"
|
|
5
|
-
allowed-tools: Read, Write, Edit, Bash, Glob, Grep,
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
Guided reading experience for code files, wiki entries, or topics. Walks through content
|
|
10
|
-
section by section using 4 forcing questions to extract patterns, identify assumptions,
|
|
11
|
-
and build a structured understanding map. Insights persist to `.workflow/specs/learnings.md`.
|
|
12
|
-
|
|
13
|
-
Unlike `learn-decompose` which is parallel pattern extraction, this is sequential
|
|
14
|
-
deep reading that builds understanding incrementally.
|
|
15
|
-
</purpose>
|
|
16
|
-
|
|
17
|
-
<context>
|
|
18
|
-
$ARGUMENTS — target and optional flags.
|
|
19
|
-
|
|
20
|
-
**Target resolution (auto-detected):**
|
|
21
|
-
- File path → Read source file
|
|
22
|
-
- Wiki ID (`type-slug`) → Fetch via `maestro wiki get`
|
|
23
|
-
- Topic string → Search via `maestro search`, use top result
|
|
24
|
-
|
|
25
|
-
**Flags:**
|
|
26
|
-
- `--depth shallow` — Key patterns and structure only (default)
|
|
27
|
-
- `--depth deep` — Every function, branch, assumption
|
|
28
|
-
- `--save-wiki` — Create wiki note with reading notes
|
|
29
|
-
|
|
30
|
-
**Output**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md`
|
|
31
|
-
</context>
|
|
32
|
-
|
|
33
|
-
<execution>
|
|
34
|
-
|
|
35
|
-
### Stage 1: Resolve Target + Load Context Web
|
|
36
|
-
- File: verify exists, parse imports for dependency files
|
|
37
|
-
- Wiki ID: fetch + load forward/backlinks
|
|
38
|
-
- Topic: search wiki, take top result
|
|
39
|
-
- Build 1-hop context neighborhood (imports/exports or wiki links)
|
|
40
|
-
|
|
41
|
-
### Stage 2: Build Reading Order
|
|
42
|
-
- Single file: split into logical sections (function/class boundaries)
|
|
43
|
-
- Directory: entry point → core modules → utilities → tests
|
|
44
|
-
- `--depth shallow`: top-level structure only
|
|
45
|
-
- `--depth deep`: every function body, every branch
|
|
46
|
-
|
|
47
|
-
### Stage 3: Guided Reading (4 Forcing Questions per Section)
|
|
48
|
-
1. **"What pattern is being used here?"** — design patterns, idioms, conventions
|
|
49
|
-
2. **"Why this approach instead of alternatives?"** — trade-offs made
|
|
50
|
-
3. **"What assumption does this depend on?"** — external state, input shape, ordering
|
|
51
|
-
4. **"What would break if this changed?"** — fragility, downstream effects
|
|
52
|
-
|
|
53
|
-
### Stage 4: Extract Patterns + Produce Understanding Map
|
|
54
|
-
From forcing question answers, extract: design patterns (with file:line anchors), naming conventions, error handling approach, data flow, assumptions.
|
|
55
|
-
|
|
56
|
-
Cross-reference against `coding-conventions.md`: documented vs undocumented patterns.
|
|
57
|
-
|
|
58
|
-
### Stage 5: Persist
|
|
59
|
-
1. Write `KNW-follow-{slug}-{date}.md` with understanding map
|
|
60
|
-
2. Append new patterns to `.workflow/specs/learnings.md` (source: "follow", stable INS-ids)
|
|
61
|
-
3. If `--save-wiki`: create wiki note entry
|
|
62
|
-
|
|
63
|
-
**Next steps:**
|
|
64
|
-
</execution>
|
|
65
|
-
|
|
66
|
-
<error_codes>
|
|
67
|
-
| Code | Severity | Condition | Recovery |
|
|
68
|
-
|------|----------|-----------|----------|
|
|
69
|
-
| E001 | error | Target not resolvable | Check path/ID or rephrase topic |
|
|
70
|
-
| W001 | warning | Wiki graph unavailable | Proceed with code-only context |
|
|
71
|
-
| W002 | warning | coding-conventions.md not found | Patterns flagged "unknown status" |
|
|
72
|
-
| W003 | warning | Large target (>1000 lines) | Auto-switch to shallow depth |
|
|
73
|
-
</error_codes>
|
|
74
|
-
|
|
75
|
-
<success_criteria>
|
|
76
|
-
- [ ] Target resolved to concrete content
|
|
77
|
-
- [ ] Context web loaded (imports/exports or wiki links)
|
|
78
|
-
- [ ] All 4 forcing questions applied per section
|
|
79
|
-
- [ ] Patterns extracted with file:line anchors
|
|
80
|
-
- [ ] Understanding map produced with concepts, patterns, assumptions, questions
|
|
81
|
-
- [ ] `KNW-follow-{slug}-{date}.md` written
|
|
82
|
-
- [ ] `.workflow/specs/learnings.md` appended with stable INS-ids
|
|
83
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: learn-follow
|
|
3
|
+
description: Guided reading of code or wiki to extract patterns
|
|
4
|
+
argument-hint: "<path|wiki-id|topic> [--depth shallow|deep] [--save-wiki]"
|
|
5
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Guided reading experience for code files, wiki entries, or topics. Walks through content
|
|
10
|
+
section by section using 4 forcing questions to extract patterns, identify assumptions,
|
|
11
|
+
and build a structured understanding map. Insights persist to `.workflow/specs/learnings.md`.
|
|
12
|
+
|
|
13
|
+
Unlike `learn-decompose` which is parallel pattern extraction, this is sequential
|
|
14
|
+
deep reading that builds understanding incrementally.
|
|
15
|
+
</purpose>
|
|
16
|
+
|
|
17
|
+
<context>
|
|
18
|
+
$ARGUMENTS — target and optional flags.
|
|
19
|
+
|
|
20
|
+
**Target resolution (auto-detected):**
|
|
21
|
+
- File path → Read source file
|
|
22
|
+
- Wiki ID (`type-slug`) → Fetch via `maestro wiki get`
|
|
23
|
+
- Topic string → Search via `maestro search`, use top result
|
|
24
|
+
|
|
25
|
+
**Flags:**
|
|
26
|
+
- `--depth shallow` — Key patterns and structure only (default)
|
|
27
|
+
- `--depth deep` — Every function, branch, assumption
|
|
28
|
+
- `--save-wiki` — Create wiki note with reading notes
|
|
29
|
+
|
|
30
|
+
**Output**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md`
|
|
31
|
+
</context>
|
|
32
|
+
|
|
33
|
+
<execution>
|
|
34
|
+
|
|
35
|
+
### Stage 1: Resolve Target + Load Context Web
|
|
36
|
+
- File: verify exists, parse imports for dependency files
|
|
37
|
+
- Wiki ID: fetch + load forward/backlinks
|
|
38
|
+
- Topic: search wiki, take top result
|
|
39
|
+
- Build 1-hop context neighborhood (imports/exports or wiki links)
|
|
40
|
+
|
|
41
|
+
### Stage 2: Build Reading Order
|
|
42
|
+
- Single file: split into logical sections (function/class boundaries)
|
|
43
|
+
- Directory: entry point → core modules → utilities → tests
|
|
44
|
+
- `--depth shallow`: top-level structure only
|
|
45
|
+
- `--depth deep`: every function body, every branch
|
|
46
|
+
|
|
47
|
+
### Stage 3: Guided Reading (4 Forcing Questions per Section)
|
|
48
|
+
1. **"What pattern is being used here?"** — design patterns, idioms, conventions
|
|
49
|
+
2. **"Why this approach instead of alternatives?"** — trade-offs made
|
|
50
|
+
3. **"What assumption does this depend on?"** — external state, input shape, ordering
|
|
51
|
+
4. **"What would break if this changed?"** — fragility, downstream effects
|
|
52
|
+
|
|
53
|
+
### Stage 4: Extract Patterns + Produce Understanding Map
|
|
54
|
+
From forcing question answers, extract: design patterns (with file:line anchors), naming conventions, error handling approach, data flow, assumptions.
|
|
55
|
+
|
|
56
|
+
Cross-reference against `coding-conventions.md`: documented vs undocumented patterns.
|
|
57
|
+
|
|
58
|
+
### Stage 5: Persist
|
|
59
|
+
1. Write `KNW-follow-{slug}-{date}.md` with understanding map
|
|
60
|
+
2. Append new patterns to `.workflow/specs/learnings.md` (source: "follow", stable INS-ids)
|
|
61
|
+
3. If `--save-wiki`: create wiki note entry
|
|
62
|
+
|
|
63
|
+
**Next steps:** `$learn-decompose <path>`, `$spec-add coding ...`, `$learn-second-opinion <file>`
|
|
64
|
+
</execution>
|
|
65
|
+
|
|
66
|
+
<error_codes>
|
|
67
|
+
| Code | Severity | Condition | Recovery |
|
|
68
|
+
|------|----------|-----------|----------|
|
|
69
|
+
| E001 | error | Target not resolvable | Check path/ID or rephrase topic |
|
|
70
|
+
| W001 | warning | Wiki graph unavailable | Proceed with code-only context |
|
|
71
|
+
| W002 | warning | coding-conventions.md not found | Patterns flagged "unknown status" |
|
|
72
|
+
| W003 | warning | Large target (>1000 lines) | Auto-switch to shallow depth |
|
|
73
|
+
</error_codes>
|
|
74
|
+
|
|
75
|
+
<success_criteria>
|
|
76
|
+
- [ ] Target resolved to concrete content
|
|
77
|
+
- [ ] Context web loaded (imports/exports or wiki links)
|
|
78
|
+
- [ ] All 4 forcing questions applied per section
|
|
79
|
+
- [ ] Patterns extracted with file:line anchors
|
|
80
|
+
- [ ] Understanding map produced with concepts, patterns, assumptions, questions
|
|
81
|
+
- [ ] `KNW-follow-{slug}-{date}.md` written
|
|
82
|
+
- [ ] `.workflow/specs/learnings.md` appended with stable INS-ids
|
|
83
|
+
</success_criteria>
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: learn-investigate
|
|
3
|
-
description: Investigate questions with hypothesis testing and evidence logging
|
|
4
|
-
argument-hint: "<question> [--scope <path>] [--max-hypotheses N]"
|
|
5
|
-
allowed-tools: Read, Write, Edit, Bash, Glob, Grep,
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
Systematic investigation for understanding questions (not bug-fixing). 4-phase approach
|
|
10
|
-
with scope lock and 3-strike escalation. Produces structured evidence trails and
|
|
11
|
-
understanding documents that persist to the learning system.
|
|
12
|
-
|
|
13
|
-
Unlike `quality-debug` (fixing bugs during execution), this answers "how does X work?",
|
|
14
|
-
"why does Y happen?", "what would happen if Z?" questions.
|
|
15
|
-
</purpose>
|
|
16
|
-
|
|
17
|
-
<context>
|
|
18
|
-
$ARGUMENTS — question text and optional flags.
|
|
19
|
-
|
|
20
|
-
**Flags:**
|
|
21
|
-
- `--scope <path>` — Restrict to files under this directory (default: entire project)
|
|
22
|
-
- `--max-hypotheses N` — Max hypotheses before escalating (default: 3)
|
|
23
|
-
|
|
24
|
-
**Output**: `.workflow/knowhow/KNW-investigate-{slug}/` (evidence.ndjson, understanding.md, report.md)
|
|
25
|
-
</context>
|
|
26
|
-
|
|
27
|
-
<execution>
|
|
28
|
-
|
|
29
|
-
### Stage 1: Frame the Question
|
|
30
|
-
- Parse question, generate slug, create investigation directory
|
|
31
|
-
- Load debug specs: `maestro spec load --category debug` for known issues and patterns
|
|
32
|
-
- Search prior knowledge: `maestro search --category debug`, wiki search, grep .workflow/specs/learnings.md
|
|
33
|
-
- Write initial `understanding.md`
|
|
34
|
-
|
|
35
|
-
### Stage 2: Evidence Collection
|
|
36
|
-
1. **Code search**: Grep keywords across scoped files
|
|
37
|
-
2. **File inspection**: Read most relevant files
|
|
38
|
-
3. **Import tracing**: Follow dependency chain
|
|
39
|
-
4. **Git history**: `git log --oneline -10 -- <relevant-files>`
|
|
40
|
-
|
|
41
|
-
Each evidence item → `evidence.ndjson`:
|
|
42
|
-
```json
|
|
43
|
-
{"ts":"ISO","type":"code|git|search|doc","source":"file:line","relevance":"high|medium|low","content":"...","note":"..."}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Stage 3: Hypothesis Formation + Testing
|
|
47
|
-
Generate ranked hypotheses from evidence. For each (in rank order):
|
|
48
|
-
1. Design test: what evidence would confirm/disprove?
|
|
49
|
-
2. Execute test: code trace, targeted search, experiment
|
|
50
|
-
3. Record result in `evidence.ndjson` (type: "test")
|
|
51
|
-
4. Update `understanding.md`: confirmed / disproved / inconclusive
|
|
52
|
-
|
|
53
|
-
### Stage 4: 3-Strike Escalation
|
|
54
|
-
If all hypotheses fail: broaden scope, search wiki with alt keywords, or mark INCONCLUSIVE.
|
|
55
|
-
|
|
56
|
-
### Stage 5: Synthesize + Persist
|
|
57
|
-
1. Write `report.md` with answer, evidence trail, hypothesis results
|
|
58
|
-
2. Append to `.workflow/specs/learnings.md`:
|
|
59
|
-
- Confirmed → category: "technique" / "pattern"
|
|
60
|
-
- Disproved → category: "gotcha"
|
|
61
|
-
3. Display summary with next-step routing
|
|
62
|
-
|
|
63
|
-
**Next steps:**
|
|
64
|
-
</execution>
|
|
65
|
-
|
|
66
|
-
<error_codes>
|
|
67
|
-
| Code | Severity | Condition | Recovery |
|
|
68
|
-
|------|----------|-----------|----------|
|
|
69
|
-
| E001 | error | No question provided | Provide question as first argument |
|
|
70
|
-
| E002 | error | Scope path does not exist | Check --scope path |
|
|
71
|
-
| W001 | warning | No prior knowledge found | Proceed with fresh investigation |
|
|
72
|
-
| W002 | warning | Very few evidence matches (<3) | Broaden search terms |
|
|
73
|
-
| W003 | warning | All hypotheses inconclusive | Marked INCONCLUSIVE |
|
|
74
|
-
</error_codes>
|
|
75
|
-
|
|
76
|
-
<success_criteria>
|
|
77
|
-
- [ ] Question parsed and investigation directory created
|
|
78
|
-
- [ ] Evidence collected and logged to evidence.ndjson
|
|
79
|
-
- [ ] At least 1 hypothesis formed and tested
|
|
80
|
-
- [ ] understanding.md tracks evolving understanding
|
|
81
|
-
- [ ] report.md written with answer and evidence trail
|
|
82
|
-
- [ ] Findings appended to .workflow/specs/learnings.md with stable INS-ids
|
|
83
|
-
- [ ] 3-strike escalation triggered if all hypotheses fail
|
|
84
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: learn-investigate
|
|
3
|
+
description: Investigate questions with hypothesis testing and evidence logging
|
|
4
|
+
argument-hint: "<question> [--scope <path>] [--max-hypotheses N]"
|
|
5
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Systematic investigation for understanding questions (not bug-fixing). 4-phase approach
|
|
10
|
+
with scope lock and 3-strike escalation. Produces structured evidence trails and
|
|
11
|
+
understanding documents that persist to the learning system.
|
|
12
|
+
|
|
13
|
+
Unlike `quality-debug` (fixing bugs during execution), this answers "how does X work?",
|
|
14
|
+
"why does Y happen?", "what would happen if Z?" questions.
|
|
15
|
+
</purpose>
|
|
16
|
+
|
|
17
|
+
<context>
|
|
18
|
+
$ARGUMENTS — question text and optional flags.
|
|
19
|
+
|
|
20
|
+
**Flags:**
|
|
21
|
+
- `--scope <path>` — Restrict to files under this directory (default: entire project)
|
|
22
|
+
- `--max-hypotheses N` — Max hypotheses before escalating (default: 3)
|
|
23
|
+
|
|
24
|
+
**Output**: `.workflow/knowhow/KNW-investigate-{slug}/` (evidence.ndjson, understanding.md, report.md)
|
|
25
|
+
</context>
|
|
26
|
+
|
|
27
|
+
<execution>
|
|
28
|
+
|
|
29
|
+
### Stage 1: Frame the Question
|
|
30
|
+
- Parse question, generate slug, create investigation directory
|
|
31
|
+
- Load debug specs: `maestro spec load --category debug` for known issues and patterns
|
|
32
|
+
- Search prior knowledge: `maestro search --category debug`, wiki search, grep .workflow/specs/learnings.md
|
|
33
|
+
- Write initial `understanding.md`
|
|
34
|
+
|
|
35
|
+
### Stage 2: Evidence Collection
|
|
36
|
+
1. **Code search**: Grep keywords across scoped files
|
|
37
|
+
2. **File inspection**: Read most relevant files
|
|
38
|
+
3. **Import tracing**: Follow dependency chain
|
|
39
|
+
4. **Git history**: `git log --oneline -10 -- <relevant-files>`
|
|
40
|
+
|
|
41
|
+
Each evidence item → `evidence.ndjson`:
|
|
42
|
+
```json
|
|
43
|
+
{"ts":"ISO","type":"code|git|search|doc","source":"file:line","relevance":"high|medium|low","content":"...","note":"..."}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Stage 3: Hypothesis Formation + Testing
|
|
47
|
+
Generate ranked hypotheses from evidence. For each (in rank order):
|
|
48
|
+
1. Design test: what evidence would confirm/disprove?
|
|
49
|
+
2. Execute test: code trace, targeted search, experiment
|
|
50
|
+
3. Record result in `evidence.ndjson` (type: "test")
|
|
51
|
+
4. Update `understanding.md`: confirmed / disproved / inconclusive
|
|
52
|
+
|
|
53
|
+
### Stage 4: 3-Strike Escalation
|
|
54
|
+
If all hypotheses fail: broaden scope, search wiki with alt keywords, or mark INCONCLUSIVE.
|
|
55
|
+
|
|
56
|
+
### Stage 5: Synthesize + Persist
|
|
57
|
+
1. Write `report.md` with answer, evidence trail, hypothesis results
|
|
58
|
+
2. Append to `.workflow/specs/learnings.md`:
|
|
59
|
+
- Confirmed → category: "technique" / "pattern"
|
|
60
|
+
- Disproved → category: "gotcha"
|
|
61
|
+
3. Display summary with next-step routing
|
|
62
|
+
|
|
63
|
+
**Next steps:** `$spec-add debug <finding>`, `$learn-follow <path>`, `$learn-decompose <module>`
|
|
64
|
+
</execution>
|
|
65
|
+
|
|
66
|
+
<error_codes>
|
|
67
|
+
| Code | Severity | Condition | Recovery |
|
|
68
|
+
|------|----------|-----------|----------|
|
|
69
|
+
| E001 | error | No question provided | Provide question as first argument |
|
|
70
|
+
| E002 | error | Scope path does not exist | Check --scope path |
|
|
71
|
+
| W001 | warning | No prior knowledge found | Proceed with fresh investigation |
|
|
72
|
+
| W002 | warning | Very few evidence matches (<3) | Broaden search terms |
|
|
73
|
+
| W003 | warning | All hypotheses inconclusive | Marked INCONCLUSIVE |
|
|
74
|
+
</error_codes>
|
|
75
|
+
|
|
76
|
+
<success_criteria>
|
|
77
|
+
- [ ] Question parsed and investigation directory created
|
|
78
|
+
- [ ] Evidence collected and logged to evidence.ndjson
|
|
79
|
+
- [ ] At least 1 hypothesis formed and tested
|
|
80
|
+
- [ ] understanding.md tracks evolving understanding
|
|
81
|
+
- [ ] report.md written with answer and evidence trail
|
|
82
|
+
- [ ] Findings appended to .workflow/specs/learnings.md with stable INS-ids
|
|
83
|
+
- [ ] 3-strike escalation triggered if all hypotheses fail
|
|
84
|
+
</success_criteria>
|