maestro-flow 0.4.25 → 0.5.0
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/learn-follow/SKILL.md +1 -1
- package/.agents/skills/learn-investigate/SKILL.md +2 -2
- package/.agents/skills/learn-second-opinion/SKILL.md +1 -1
- package/.agents/skills/maestro/SKILL.md +6 -3
- package/.agents/skills/maestro-analyze/SKILL.md +53 -2
- package/.agents/skills/maestro-blueprint/SKILL.md +36 -1
- package/.agents/skills/maestro-brainstorm/SKILL.md +40 -1
- package/.agents/skills/maestro-collab/SKILL.md +1 -1
- package/.agents/skills/maestro-companion/SKILL.md +4 -4
- package/.agents/skills/maestro-composer/SKILL.md +1 -1
- package/.agents/skills/maestro-execute/SKILL.md +29 -6
- package/.agents/skills/maestro-fork/SKILL.md +24 -0
- package/.agents/skills/maestro-grill/SKILL.md +38 -1
- package/.agents/skills/maestro-help/SKILL.md +5 -6
- package/.agents/skills/maestro-help/index/catalog.json +7 -9
- package/.agents/skills/maestro-help/phases/02-search-present.md +2 -4
- package/.agents/skills/maestro-help/phases/03-workflow-guide.md +7 -8
- package/.agents/skills/maestro-impeccable/SKILL.md +13 -0
- package/.agents/skills/maestro-init/SKILL.md +11 -0
- package/.agents/skills/maestro-merge/SKILL.md +17 -1
- package/.agents/skills/maestro-milestone-audit/SKILL.md +34 -2
- package/.agents/skills/maestro-milestone-complete/SKILL.md +19 -1
- package/.agents/skills/maestro-milestone-release/SKILL.md +18 -0
- package/.agents/skills/maestro-next/SKILL.md +8 -9
- package/.agents/skills/maestro-overlay/SKILL.md +3 -3
- package/.agents/skills/maestro-plan/SKILL.md +21 -3
- package/.agents/skills/maestro-quick/SKILL.md +13 -1
- package/.agents/skills/maestro-ralph/SKILL.md +18 -20
- package/.agents/skills/maestro-ralph-beta/SKILL.md +10 -16
- package/.agents/skills/maestro-ralph-execute/SKILL.md +1 -2
- package/.agents/skills/maestro-roadmap/SKILL.md +28 -2
- package/.agents/skills/maestro-swarm-workflow/SKILL.md +2 -2
- package/.agents/skills/maestro-tools-register/SKILL.md +2 -2
- package/.agents/skills/maestro-ui-codify/SKILL.md +20 -0
- package/.agents/skills/maestro-update/SKILL.md +59 -116
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +3 -3
- package/.agents/skills/manage-harvest/SKILL.md +1 -1
- package/.agents/skills/manage-knowhow/SKILL.md +3 -1
- package/.agents/skills/manage-knowhow-capture/SKILL.md +3 -2
- package/.agents/skills/manage-wiki/SKILL.md +17 -8
- package/.agents/skills/quality-auto-test/SKILL.md +3 -3
- package/.agents/skills/quality-debug/SKILL.md +4 -4
- package/.agents/skills/quality-refactor/SKILL.md +2 -2
- package/.agents/skills/quality-retrospective/SKILL.md +5 -5
- package/.agents/skills/quality-review/SKILL.md +4 -4
- package/.agents/skills/quality-sync/SKILL.md +1 -0
- package/.agents/skills/quality-test/SKILL.md +4 -4
- package/.agents/skills/spec-add/SKILL.md +6 -4
- package/.agents/skills/spec-setup/SKILL.md +1 -1
- package/.agy/skills/learn-follow/SKILL.md +1 -1
- package/.agy/skills/learn-investigate/SKILL.md +2 -2
- package/.agy/skills/learn-second-opinion/SKILL.md +1 -1
- package/.agy/skills/maestro/SKILL.md +6 -3
- package/.agy/skills/maestro-analyze/SKILL.md +53 -2
- package/.agy/skills/maestro-blueprint/SKILL.md +36 -1
- package/.agy/skills/maestro-brainstorm/SKILL.md +40 -1
- package/.agy/skills/maestro-collab/SKILL.md +1 -1
- package/.agy/skills/maestro-companion/SKILL.md +4 -4
- package/.agy/skills/maestro-composer/SKILL.md +1 -1
- package/.agy/skills/maestro-execute/SKILL.md +29 -6
- package/.agy/skills/maestro-fork/SKILL.md +24 -0
- package/.agy/skills/maestro-grill/SKILL.md +38 -1
- package/.agy/skills/maestro-help/SKILL.md +5 -6
- package/.agy/skills/maestro-help/index/catalog.json +7 -9
- package/.agy/skills/maestro-help/phases/02-search-present.md +2 -4
- package/.agy/skills/maestro-help/phases/03-workflow-guide.md +7 -8
- package/.agy/skills/maestro-impeccable/SKILL.md +13 -0
- package/.agy/skills/maestro-init/SKILL.md +11 -0
- package/.agy/skills/maestro-merge/SKILL.md +17 -1
- package/.agy/skills/maestro-milestone-audit/SKILL.md +34 -2
- package/.agy/skills/maestro-milestone-complete/SKILL.md +19 -1
- package/.agy/skills/maestro-milestone-release/SKILL.md +18 -0
- package/.agy/skills/maestro-next/SKILL.md +8 -9
- package/.agy/skills/maestro-overlay/SKILL.md +3 -3
- package/.agy/skills/maestro-plan/SKILL.md +21 -3
- package/.agy/skills/maestro-quick/SKILL.md +13 -1
- package/.agy/skills/maestro-ralph/SKILL.md +18 -20
- package/.agy/skills/maestro-ralph-beta/SKILL.md +10 -16
- package/.agy/skills/maestro-ralph-execute/SKILL.md +1 -2
- package/.agy/skills/maestro-roadmap/SKILL.md +28 -2
- package/.agy/skills/maestro-swarm-workflow/SKILL.md +2 -2
- package/.agy/skills/maestro-tools-register/SKILL.md +2 -2
- package/.agy/skills/maestro-ui-codify/SKILL.md +20 -0
- package/.agy/skills/maestro-update/SKILL.md +59 -116
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +3 -3
- package/.agy/skills/manage-harvest/SKILL.md +1 -1
- package/.agy/skills/manage-knowhow/SKILL.md +3 -1
- package/.agy/skills/manage-knowhow-capture/SKILL.md +3 -2
- package/.agy/skills/manage-wiki/SKILL.md +17 -8
- package/.agy/skills/quality-auto-test/SKILL.md +3 -3
- package/.agy/skills/quality-debug/SKILL.md +4 -4
- package/.agy/skills/quality-refactor/SKILL.md +2 -2
- package/.agy/skills/quality-retrospective/SKILL.md +5 -5
- package/.agy/skills/quality-review/SKILL.md +4 -4
- package/.agy/skills/quality-sync/SKILL.md +1 -0
- package/.agy/skills/quality-test/SKILL.md +4 -4
- package/.agy/skills/spec-add/SKILL.md +6 -4
- package/.agy/skills/spec-setup/SKILL.md +1 -1
- package/.claude/commands/learn-follow.md +1 -1
- package/.claude/commands/learn-investigate.md +2 -2
- package/.claude/commands/learn-second-opinion.md +1 -1
- package/.claude/commands/maestro-analyze.md +53 -2
- package/.claude/commands/maestro-blueprint.md +36 -1
- package/.claude/commands/maestro-brainstorm.md +40 -1
- package/.claude/commands/maestro-collab.md +1 -1
- package/.claude/commands/maestro-companion.md +4 -4
- package/.claude/commands/maestro-composer.md +1 -1
- package/.claude/commands/maestro-execute.md +29 -6
- package/.claude/commands/maestro-fork.md +24 -0
- package/.claude/commands/maestro-grill.md +38 -1
- package/.claude/commands/maestro-impeccable.md +13 -0
- package/.claude/commands/maestro-init.md +11 -0
- package/.claude/commands/maestro-merge.md +17 -1
- package/.claude/commands/maestro-milestone-audit.md +34 -2
- package/.claude/commands/maestro-milestone-complete.md +19 -1
- package/.claude/commands/maestro-milestone-release.md +18 -0
- package/.claude/commands/maestro-next.md +8 -9
- package/.claude/commands/maestro-overlay.md +3 -3
- package/.claude/commands/maestro-plan.md +21 -3
- package/.claude/commands/maestro-quick.md +13 -1
- package/.claude/commands/maestro-ralph-beta.md +8 -14
- package/.claude/commands/maestro-ralph-execute.md +1 -2
- package/.claude/commands/maestro-ralph.md +18 -20
- package/.claude/commands/maestro-roadmap.md +28 -2
- package/.claude/commands/maestro-swarm-workflow.md +2 -2
- package/.claude/commands/maestro-tools-register.md +2 -2
- package/.claude/commands/maestro-ui-codify.md +20 -0
- package/.claude/commands/maestro-update.md +59 -116
- package/.claude/commands/maestro.md +6 -3
- package/.claude/commands/manage-codebase-rebuild.md +3 -3
- package/.claude/commands/manage-harvest.md +1 -1
- package/.claude/commands/manage-knowhow-capture.md +3 -2
- package/.claude/commands/manage-knowhow.md +3 -1
- package/.claude/commands/manage-wiki.md +17 -8
- package/.claude/commands/quality-auto-test.md +3 -3
- package/.claude/commands/quality-debug.md +4 -4
- package/.claude/commands/quality-refactor.md +2 -2
- package/.claude/commands/quality-retrospective.md +5 -5
- package/.claude/commands/quality-review.md +4 -4
- package/.claude/commands/quality-sync.md +1 -0
- package/.claude/commands/quality-test.md +4 -4
- package/.claude/commands/spec-add.md +6 -4
- package/.claude/commands/spec-setup.md +1 -1
- package/.claude/skills/maestro-help/SKILL.md +5 -6
- package/.claude/skills/maestro-help/index/catalog.json +7 -9
- package/.claude/skills/maestro-help/phases/02-search-present.md +2 -4
- package/.claude/skills/maestro-help/phases/03-workflow-guide.md +7 -8
- package/.codex/skills/codify-to-knowhow/SKILL.md +5 -4
- package/.codex/skills/learn-decompose/SKILL.md +1 -1
- package/.codex/skills/learn-follow/SKILL.md +1 -1
- package/.codex/skills/learn-investigate/SKILL.md +1 -1
- package/.codex/skills/learn-second-opinion/SKILL.md +2 -2
- package/.codex/skills/maestro/SKILL.md +29 -31
- package/.codex/skills/maestro-analyze/SKILL.md +16 -3
- package/.codex/skills/maestro-blueprint/SKILL.md +8 -1
- package/.codex/skills/maestro-brainstorm/SKILL.md +8 -5
- package/.codex/skills/maestro-companion/SKILL.md +2 -2
- package/.codex/skills/maestro-composer/SKILL.md +0 -1
- package/.codex/skills/maestro-execute/SKILL.md +11 -8
- package/.codex/skills/maestro-fork/SKILL.md +4 -0
- package/.codex/skills/maestro-grill/SKILL.md +8 -2
- package/.codex/skills/maestro-help/SKILL.md +6 -9
- package/.codex/skills/maestro-help/catalog.json +6 -8
- package/.codex/skills/maestro-impeccable/SKILL.md +2 -0
- package/.codex/skills/maestro-init/SKILL.md +3 -0
- package/.codex/skills/maestro-merge/SKILL.md +5 -1
- package/.codex/skills/maestro-milestone-audit/SKILL.md +14 -9
- package/.codex/skills/maestro-milestone-complete/SKILL.md +6 -1
- package/.codex/skills/maestro-milestone-release/SKILL.md +4 -0
- package/.codex/skills/maestro-next/SKILL.md +3 -4
- package/.codex/skills/maestro-plan/SKILL.md +5 -2
- package/.codex/skills/maestro-quick/SKILL.md +4 -1
- package/.codex/skills/maestro-ralph/SKILL.md +14 -20
- package/.codex/skills/maestro-ralph-beta/SKILL.md +13 -21
- package/.codex/skills/maestro-ralph-execute/SKILL.md +2 -2
- package/.codex/skills/maestro-roadmap/SKILL.md +5 -2
- package/.codex/skills/maestro-tools-register/SKILL.md +1 -1
- package/.codex/skills/maestro-ui-codify/SKILL.md +7 -4
- package/.codex/skills/maestro-update/SKILL.md +35 -130
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -2
- package/.codex/skills/manage-harvest/SKILL.md +2 -2
- package/.codex/skills/manage-knowhow/SKILL.md +1 -1
- package/.codex/skills/manage-status/SKILL.md +1 -2
- package/.codex/skills/quality-auto-test/SKILL.md +2 -2
- package/.codex/skills/quality-debug/SKILL.md +33 -27
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/quality-retrospective/SKILL.md +1 -1
- package/.codex/skills/quality-test/SKILL.md +3 -4
- package/.codex/skills/security-audit/SKILL.md +17 -1
- package/.codex/skills/spec-add/SKILL.md +5 -3
- package/.codex/skills/spec-remove/SKILL.md +2 -2
- package/.codex/skills/team-coordinate/SKILL.md +1 -1
- package/.codex/skills/team-review/SKILL.md +2 -2
- package/.codex/skills/wiki-digest/SKILL.md +2 -2
- package/chains/brainstorm-driven.json +2 -34
- package/chains/full-lifecycle.json +2 -34
- package/chains/next-milestone.json +0 -7
- package/chains/quality-loop.json +3 -19
- package/chains/roadmap-driven.json +2 -34
- package/chains/spec-driven.json +2 -34
- package/chains/ui-craft-build.json +2 -23
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +9 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.test.js +346 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +8 -11
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +3 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.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/virtual-wiki-adapters.js +9 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +9 -4
- 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 +3 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +4 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +5 -3
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/src/types/index.d.ts +2 -0
- package/dist/src/agents/cli-agent-runner.d.ts +2 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +3 -0
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/cli.js +1 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +3 -1
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +55 -5
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +2 -1
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +16 -1
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/kg.d.ts +1 -1
- package/dist/src/commands/kg.d.ts.map +1 -1
- package/dist/src/commands/kg.js +285 -112
- package/dist/src/commands/kg.js.map +1 -1
- package/dist/src/commands/knowhow.d.ts.map +1 -1
- package/dist/src/commands/knowhow.js +28 -37
- package/dist/src/commands/knowhow.js.map +1 -1
- package/dist/src/commands/ralph.js +1 -1
- package/dist/src/commands/ralph.js.map +1 -1
- package/dist/src/commands/search.d.ts +36 -0
- package/dist/src/commands/search.d.ts.map +1 -0
- package/dist/src/commands/search.js +120 -0
- package/dist/src/commands/search.js.map +1 -0
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +59 -8
- 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 +7 -0
- 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 +36 -9
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts +18 -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/core/component-defs.d.ts +13 -0
- package/dist/src/core/component-defs.d.ts.map +1 -1
- package/dist/src/core/component-defs.js +37 -85
- package/dist/src/core/component-defs.js.map +1 -1
- package/dist/src/core/skill-converter.d.ts +25 -0
- package/dist/src/core/skill-converter.d.ts.map +1 -0
- package/dist/src/core/skill-converter.js +605 -0
- package/dist/src/core/skill-converter.js.map +1 -0
- package/dist/src/graph/codegraph-adapter.d.ts +147 -0
- package/dist/src/graph/codegraph-adapter.d.ts.map +1 -0
- package/dist/src/graph/codegraph-adapter.js +266 -0
- package/dist/src/graph/codegraph-adapter.js.map +1 -0
- package/dist/src/hooks/constants.d.ts +4 -0
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +14 -1
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/context-format.d.ts +46 -0
- package/dist/src/hooks/context-format.d.ts.map +1 -0
- package/dist/src/hooks/context-format.js +58 -0
- package/dist/src/hooks/context-format.js.map +1 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js +2 -0
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.d.ts +1 -1
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.js +92 -7
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
- package/dist/src/hooks/kg-context-injector.d.ts +19 -0
- package/dist/src/hooks/kg-context-injector.d.ts.map +1 -0
- package/dist/src/hooks/kg-context-injector.js +139 -0
- package/dist/src/hooks/kg-context-injector.js.map +1 -0
- package/dist/src/hooks/kg-sync-hook.d.ts +22 -0
- package/dist/src/hooks/kg-sync-hook.d.ts.map +1 -0
- package/dist/src/hooks/kg-sync-hook.js +139 -0
- package/dist/src/hooks/kg-sync-hook.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js +2 -2
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/skill-context.d.ts.map +1 -1
- package/dist/src/hooks/skill-context.js +0 -1
- package/dist/src/hooks/skill-context.js.map +1 -1
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +66 -13
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/statusline.d.ts +8 -1
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +45 -29
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/hooks/wiki-role-loader.js +1 -1
- package/dist/src/hooks/wiki-role-loader.js.map +1 -1
- package/dist/src/ralph/cmd-skills.d.ts.map +1 -1
- package/dist/src/ralph/cmd-skills.js +9 -2
- package/dist/src/ralph/cmd-skills.js.map +1 -1
- package/dist/src/ralph/skill-scanner.d.ts +1 -1
- package/dist/src/ralph/skill-scanner.d.ts.map +1 -1
- package/dist/src/ralph/skill-scanner.js +14 -0
- package/dist/src/ralph/skill-scanner.js.map +1 -1
- package/dist/src/ralph/status-schema.d.ts +1 -1
- package/dist/src/ralph/status-schema.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts +2 -1
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +7 -4
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +27 -3
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-writer.d.ts +10 -1
- package/dist/src/tools/spec-writer.d.ts.map +1 -1
- package/dist/src/tools/spec-writer.js +86 -7
- package/dist/src/tools/spec-writer.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +27 -7
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/dist/src/tui/install-ui/ExecutionView.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ExecutionView.js +7 -1
- package/dist/src/tui/install-ui/ExecutionView.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +5 -1
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/cli-format.d.ts +6 -0
- package/dist/src/utils/cli-format.d.ts.map +1 -1
- package/dist/src/utils/cli-format.js +25 -0
- package/dist/src/utils/cli-format.js.map +1 -1
- package/dist/src/utils/update-notices.js +29 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +5 -2
- package/templates/workflows/specs/node-catalog.md +0 -2
- package/workflows/analyze.md +9 -4
- package/workflows/auto-test.md +2 -2
- package/workflows/business-test.md +1 -1
- package/workflows/claude-instructions.md +23 -11
- package/workflows/codex-instructions.md +2 -3
- package/workflows/execute.md +153 -7
- package/workflows/fork.md +1 -1
- package/workflows/integration-test.md +1 -1
- package/workflows/maestro-super.md +1 -1
- package/workflows/maestro.codex.md +18 -34
- package/workflows/maestro.md +34 -42
- package/workflows/review.md +1 -1
- package/workflows/status.md +2 -2
- package/workflows/swarm/wf-verify.js +1 -1
- package/workflows/test-gen.md +2 -2
- package/workflows/test.md +1 -1
- package/workflows/updates/README.md +41 -0
- package/workflows/updates/update-v3-setup.md +79 -0
- package/workflows/verify.md +7 -1
- package/.agents/skills/learn-retro/SKILL.md +0 -159
- package/.agents/skills/maestro-learn/SKILL.md +0 -142
- package/.agents/skills/maestro-verify/SKILL.md +0 -146
- package/.agents/skills/manage-codebase-refresh/SKILL.md +0 -62
- package/.agents/skills/manage-learn/SKILL.md +0 -67
- package/.agents/skills/wiki-connect/SKILL.md +0 -64
- package/.agents/skills/wiki-digest/SKILL.md +0 -70
- package/.agy/skills/learn-retro/SKILL.md +0 -159
- package/.agy/skills/maestro-learn/SKILL.md +0 -142
- package/.agy/skills/maestro-verify/SKILL.md +0 -146
- package/.agy/skills/manage-codebase-refresh/SKILL.md +0 -62
- package/.agy/skills/manage-learn/SKILL.md +0 -64
- package/.agy/skills/wiki-connect/SKILL.md +0 -64
- package/.agy/skills/wiki-digest/SKILL.md +0 -70
- package/.claude/commands/learn-retro.md +0 -157
- package/.claude/commands/maestro-learn.md +0 -140
- package/.claude/commands/maestro-verify.md +0 -144
- package/.claude/commands/manage-codebase-refresh.md +0 -60
- package/.claude/commands/manage-learn.md +0 -65
- package/.claude/commands/wiki-connect.md +0 -62
- package/.claude/commands/wiki-digest.md +0 -68
- package/.codex/skills/maestro-verify/SKILL.md +0 -254
- package/chains/execute-verify.json +0 -59
- package/chains/singles/verify.json +0 -26
package/dist/src/commands/kg.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Knowledge Graph Command — CLI for querying codebase knowledge graphs.
|
|
3
3
|
*
|
|
4
|
-
* Subcommands: stats, query, explain, path, diff, diff-wiki
|
|
4
|
+
* Subcommands: stats, query, explain, path, diff, diff-wiki, search, context
|
|
5
5
|
*
|
|
6
6
|
* Operates on `.workflow/codebase/knowledge-graph.json` generated by
|
|
7
7
|
* compatible code analyzers.
|
|
@@ -15,7 +15,6 @@ import { FsAnalyzer } from '../graph/analyzers/fs-analyzer.js';
|
|
|
15
15
|
import { DatabaseConnection, getDatabasePath, QueryBuilder } from '../graph/db/index.js';
|
|
16
16
|
import { GraphTraverser } from '../graph/traversal.js';
|
|
17
17
|
import { GraphQueryManager } from '../graph/graph-queries.js';
|
|
18
|
-
import { IncrementalSync } from '../graph/sync/incremental-sync.js';
|
|
19
18
|
import { FileWatcher } from '../graph/sync/watcher.js';
|
|
20
19
|
import { parseQuery } from '../graph/search/query-parser.js';
|
|
21
20
|
import { migrateJsonToSqlite, exportSqliteToJson } from '../graph/migration.js';
|
|
@@ -87,7 +86,7 @@ function openSqliteOrExit() {
|
|
|
87
86
|
const dbPath = getDatabasePath();
|
|
88
87
|
if (!existsSync(dbPath)) {
|
|
89
88
|
console.error(`SQLite graph not found: ${dbPath}`);
|
|
90
|
-
console.error(' Hint:
|
|
89
|
+
console.error(' Hint: legacy commands require a SQLite index (from older maestro versions)');
|
|
91
90
|
process.exit(1);
|
|
92
91
|
}
|
|
93
92
|
const conn = new DatabaseConnection();
|
|
@@ -97,11 +96,27 @@ function openSqliteOrExit() {
|
|
|
97
96
|
function hasSqliteDb() {
|
|
98
97
|
return existsSync(getDatabasePath());
|
|
99
98
|
}
|
|
99
|
+
// ── CodeGraph helpers ─────────────────────────────────────────────────
|
|
100
|
+
async function requireCodeGraph() {
|
|
101
|
+
const { isCodeGraphAvailable, CodeGraphAdapter } = await import('../graph/codegraph-adapter.js');
|
|
102
|
+
if (!isCodeGraphAvailable()) {
|
|
103
|
+
console.error('CodeGraph not installed.');
|
|
104
|
+
console.error(' Install: npm install -g @colbymchenry/codegraph');
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
const adapter = new CodeGraphAdapter(resolve('.'));
|
|
108
|
+
if (!adapter.isInitialized()) {
|
|
109
|
+
console.error('CodeGraph not initialized for this project.');
|
|
110
|
+
console.error(' Run: maestro kg index');
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
return { adapter };
|
|
114
|
+
}
|
|
100
115
|
// ── Registration ───────────────────────────────────────────────────────
|
|
101
116
|
export function registerKgCommand(program) {
|
|
102
117
|
const kg = program
|
|
103
118
|
.command('kg')
|
|
104
|
-
.description('Query codebase knowledge graph (
|
|
119
|
+
.description('Query codebase knowledge graph (CodeGraph engine)');
|
|
105
120
|
// ── stats ──────────────────────────────────────────────────────────
|
|
106
121
|
kg
|
|
107
122
|
.command('stats')
|
|
@@ -446,9 +461,8 @@ export function registerKgCommand(program) {
|
|
|
446
461
|
// ── index ─────────────────────────────────────────────────────────
|
|
447
462
|
kg
|
|
448
463
|
.command('index')
|
|
449
|
-
.description('Scan codebase and generate knowledge graph')
|
|
464
|
+
.description('Scan codebase and generate knowledge graph (CodeGraph)')
|
|
450
465
|
.option('--src <path>', 'Source directory to scan', 'src')
|
|
451
|
-
.option('--sqlite', 'Use SQLite backend (recommended for large projects)')
|
|
452
466
|
.option('--json', 'Output stats as JSON after indexing')
|
|
453
467
|
.action(async (opts) => {
|
|
454
468
|
const srcPath = resolve(opts.src);
|
|
@@ -456,47 +470,58 @@ export function registerKgCommand(program) {
|
|
|
456
470
|
console.error(`Source directory not found: ${srcPath}`);
|
|
457
471
|
process.exit(1);
|
|
458
472
|
}
|
|
459
|
-
//
|
|
460
|
-
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
473
|
+
// CodeGraph tree-sitter engine
|
|
474
|
+
try {
|
|
475
|
+
const { isCodeGraphAvailable, CodeGraphAdapter } = await import('../graph/codegraph-adapter.js');
|
|
476
|
+
if (isCodeGraphAvailable()) {
|
|
477
|
+
console.log('Using CodeGraph tree-sitter engine...');
|
|
478
|
+
const projectRoot = resolve('.');
|
|
479
|
+
const adapter = new CodeGraphAdapter(projectRoot);
|
|
480
|
+
try {
|
|
481
|
+
const result = await adapter.index({ verbose: true });
|
|
482
|
+
const stats = await adapter.stats();
|
|
483
|
+
if (opts.json) {
|
|
484
|
+
console.log(JSON.stringify({ ...stats, ...result, engine: 'codegraph' }, null, 2));
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
console.log('');
|
|
488
|
+
console.log(`Nodes: ${stats.nodeCount}`);
|
|
489
|
+
for (const [kind, count] of Object.entries(stats.nodesByKind)) {
|
|
490
|
+
console.log(` ${kind}: ${count}`);
|
|
491
|
+
}
|
|
492
|
+
console.log('');
|
|
493
|
+
console.log(`Edges: ${stats.edgeCount}`);
|
|
494
|
+
for (const [kind, count] of Object.entries(stats.edgesByKind)) {
|
|
495
|
+
console.log(` ${kind}: ${count}`);
|
|
496
|
+
}
|
|
497
|
+
console.log('');
|
|
498
|
+
console.log(`Files: ${stats.fileCount}`);
|
|
499
|
+
console.log(`DB size: ${(stats.dbSizeBytes / 1024).toFixed(1)} KB`);
|
|
500
|
+
console.log(`Duration: ${result.durationMs}ms`);
|
|
501
|
+
if (result.errors.length > 0) {
|
|
502
|
+
console.log(`Errors: ${result.errors.length}`);
|
|
503
|
+
for (const err of result.errors.slice(0, 5)) {
|
|
504
|
+
console.log(` [${err.severity}] ${err.message}${err.filePath ? ` (${err.filePath})` : ''}`);
|
|
505
|
+
}
|
|
506
|
+
if (result.errors.length > 5) {
|
|
507
|
+
console.log(` ... and ${result.errors.length - 5} more`);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
finally {
|
|
513
|
+
adapter.close();
|
|
514
|
+
}
|
|
487
515
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
console.
|
|
516
|
+
}
|
|
517
|
+
catch (cgErr) {
|
|
518
|
+
if (process.env.DEBUG) {
|
|
519
|
+
console.error('CodeGraph error:', cgErr instanceof Error ? cgErr.message : cgErr);
|
|
492
520
|
}
|
|
493
|
-
console.log('');
|
|
494
|
-
console.log(`Files: ${stats.fileCount}`);
|
|
495
|
-
console.log(`DB size: ${(stats.dbSizeBytes / 1024).toFixed(1)} KB`);
|
|
496
|
-
console.log(`Duration: ${result.durationMs}ms`);
|
|
497
|
-
console.log(`Written to: ${dbPath}`);
|
|
498
|
-
return;
|
|
499
521
|
}
|
|
522
|
+
console.error('CodeGraph not available. Install: npm install -g @colbymchenry/codegraph');
|
|
523
|
+
console.error('Falling back to JSON analyzer...');
|
|
524
|
+
console.error('');
|
|
500
525
|
// JSON mode (legacy)
|
|
501
526
|
const analyzer = new FsAnalyzer();
|
|
502
527
|
console.log(`Scanning ${srcPath} ...`);
|
|
@@ -578,132 +603,280 @@ export function registerKgCommand(program) {
|
|
|
578
603
|
// ── sync (incremental) ────────────────────────────────────────────
|
|
579
604
|
kg
|
|
580
605
|
.command('sync')
|
|
581
|
-
.description('Incremental sync — only re-index changed files (
|
|
606
|
+
.description('Incremental sync — only re-index changed files (CodeGraph)')
|
|
582
607
|
.option('--json', 'Output as JSON')
|
|
583
|
-
.action((opts) => {
|
|
584
|
-
const {
|
|
608
|
+
.action(async (opts) => {
|
|
609
|
+
const { adapter } = await requireCodeGraph();
|
|
585
610
|
try {
|
|
586
|
-
const
|
|
587
|
-
const sync = new IncrementalSync(projectRoot, conn);
|
|
588
|
-
const result = sync.sync();
|
|
611
|
+
const result = await adapter.sync();
|
|
589
612
|
if (opts.json) {
|
|
590
|
-
console.log(JSON.stringify(result, null, 2));
|
|
613
|
+
console.log(JSON.stringify({ ...result, engine: 'codegraph' }, null, 2));
|
|
591
614
|
}
|
|
592
615
|
else {
|
|
593
|
-
|
|
616
|
+
const changed = result.filesAdded + result.filesModified + result.filesRemoved;
|
|
617
|
+
console.log(`Sync complete: ${changed} files changed (${result.filesAdded} added, ${result.filesModified} modified, ${result.filesRemoved} removed), ${result.nodesUpdated} nodes updated (${result.durationMs}ms)`);
|
|
594
618
|
}
|
|
595
619
|
}
|
|
596
620
|
finally {
|
|
597
|
-
|
|
621
|
+
adapter.close();
|
|
598
622
|
}
|
|
599
623
|
});
|
|
600
624
|
// ── watch ──────────────────────────────────────────────────────────
|
|
601
625
|
kg
|
|
602
626
|
.command('watch')
|
|
603
|
-
.description('Watch for file changes and auto-sync (
|
|
627
|
+
.description('Watch for file changes and auto-sync (CodeGraph)')
|
|
604
628
|
.option('--debounce <ms>', 'Debounce delay in milliseconds', '2000')
|
|
605
|
-
.action((opts) => {
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
629
|
+
.action(async (opts) => {
|
|
630
|
+
const { adapter } = await requireCodeGraph();
|
|
631
|
+
try {
|
|
632
|
+
const projectRoot = resolve('.');
|
|
633
|
+
const debounceMs = Number(opts.debounce) || 2000;
|
|
634
|
+
const watcher = new FileWatcher(projectRoot, async () => {
|
|
635
|
+
const result = await adapter.sync();
|
|
636
|
+
const filesChanged = result.filesAdded + result.filesModified + result.filesRemoved;
|
|
637
|
+
return { filesChanged, durationMs: result.durationMs };
|
|
638
|
+
}, {
|
|
639
|
+
debounceMs,
|
|
640
|
+
onSyncComplete: (result) => {
|
|
641
|
+
if (result.filesChanged > 0) {
|
|
642
|
+
console.log(`[sync] ${result.filesChanged} files updated (${result.durationMs}ms)`);
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
onSyncError: (err) => {
|
|
646
|
+
console.error(`[sync error] ${err.message}`);
|
|
647
|
+
},
|
|
648
|
+
});
|
|
649
|
+
const started = watcher.start();
|
|
650
|
+
if (!started) {
|
|
651
|
+
console.error('Could not start file watcher (unsupported filesystem?)');
|
|
652
|
+
adapter.close();
|
|
653
|
+
process.exit(1);
|
|
654
|
+
}
|
|
655
|
+
console.log(`Watching for changes (debounce: ${debounceMs}ms) — press Ctrl+C to stop`);
|
|
656
|
+
process.on('SIGINT', () => {
|
|
657
|
+
watcher.stop();
|
|
658
|
+
adapter.close();
|
|
659
|
+
console.log('\nWatcher stopped.');
|
|
660
|
+
process.exit(0);
|
|
661
|
+
});
|
|
610
662
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
const projectRoot = queries.getMetadata('projectRoot') ?? process.cwd();
|
|
615
|
-
const debounceMs = Number(opts.debounce) || 2000;
|
|
616
|
-
const watcher = new FileWatcher(projectRoot, async () => {
|
|
617
|
-
const sync = new IncrementalSync(projectRoot, conn);
|
|
618
|
-
const result = sync.sync();
|
|
619
|
-
return { filesChanged: result.filesChanged, durationMs: result.durationMs };
|
|
620
|
-
}, {
|
|
621
|
-
debounceMs,
|
|
622
|
-
onSyncComplete: (result) => {
|
|
623
|
-
if (result.filesChanged > 0) {
|
|
624
|
-
console.log(`[sync] ${result.filesChanged} files updated (${result.durationMs}ms)`);
|
|
625
|
-
}
|
|
626
|
-
},
|
|
627
|
-
onSyncError: (err) => {
|
|
628
|
-
console.error(`[sync error] ${err.message}`);
|
|
629
|
-
},
|
|
630
|
-
});
|
|
631
|
-
const started = watcher.start();
|
|
632
|
-
if (!started) {
|
|
633
|
-
console.error('Could not start file watcher (unsupported filesystem?)');
|
|
634
|
-
conn.close();
|
|
635
|
-
process.exit(1);
|
|
663
|
+
catch (err) {
|
|
664
|
+
adapter.close();
|
|
665
|
+
throw err;
|
|
636
666
|
}
|
|
637
|
-
console.log(`Watching for changes (debounce: ${debounceMs}ms) — press Ctrl+C to stop`);
|
|
638
|
-
process.on('SIGINT', () => {
|
|
639
|
-
watcher.stop();
|
|
640
|
-
conn.close();
|
|
641
|
-
console.log('\nWatcher stopped.');
|
|
642
|
-
process.exit(0);
|
|
643
|
-
});
|
|
644
667
|
});
|
|
645
668
|
// ── callers ────────────────────────────────────────────────────────
|
|
646
669
|
kg
|
|
647
670
|
.command('callers <node-id>')
|
|
648
|
-
.description('Show callers of a function/method (
|
|
671
|
+
.description('Show callers of a function/method (CodeGraph)')
|
|
649
672
|
.option('--depth <n>', 'Max traversal depth', '2')
|
|
650
673
|
.option('--json', 'Output as JSON')
|
|
651
|
-
.action((nodeId, opts) => {
|
|
652
|
-
const
|
|
674
|
+
.action(async (nodeId, opts) => {
|
|
675
|
+
const depth = Number(opts.depth) || 2;
|
|
676
|
+
const { adapter } = await requireCodeGraph();
|
|
653
677
|
try {
|
|
654
|
-
const
|
|
655
|
-
const callers = traverser.getCallers(nodeId, Number(opts.depth) || 2);
|
|
678
|
+
const callers = await adapter.getCallers(nodeId, depth);
|
|
656
679
|
if (opts.json) {
|
|
657
|
-
console.log(JSON.stringify(callers.map(c => ({
|
|
680
|
+
console.log(JSON.stringify(callers.map((c) => ({
|
|
658
681
|
id: c.node.id, kind: c.node.kind, name: c.node.name,
|
|
659
|
-
filePath: c.node.filePath, edgeKind: c.edge
|
|
682
|
+
filePath: c.node.filePath, edgeKind: c.edge?.kind ?? 'calls',
|
|
660
683
|
})), null, 2));
|
|
661
684
|
return;
|
|
662
685
|
}
|
|
663
686
|
console.log(`Callers of ${nodeId} (${callers.length}):`);
|
|
664
687
|
for (const { node, edge } of callers) {
|
|
665
|
-
console.log(` [${node.kind}] ${node.id} --${edge
|
|
688
|
+
console.log(` [${node.kind}] ${node.id} --${edge?.kind ?? 'calls'}-->`);
|
|
666
689
|
if (node.signature)
|
|
667
690
|
console.log(` ${node.signature}`);
|
|
668
691
|
}
|
|
669
692
|
}
|
|
670
693
|
finally {
|
|
671
|
-
|
|
694
|
+
adapter.close();
|
|
672
695
|
}
|
|
673
696
|
});
|
|
674
697
|
// ── callees ────────────────────────────────────────────────────────
|
|
675
698
|
kg
|
|
676
699
|
.command('callees <node-id>')
|
|
677
|
-
.description('Show callees of a function/method (
|
|
700
|
+
.description('Show callees of a function/method (CodeGraph)')
|
|
678
701
|
.option('--depth <n>', 'Max traversal depth', '2')
|
|
679
702
|
.option('--json', 'Output as JSON')
|
|
680
|
-
.action((nodeId, opts) => {
|
|
681
|
-
const
|
|
703
|
+
.action(async (nodeId, opts) => {
|
|
704
|
+
const depth = Number(opts.depth) || 2;
|
|
705
|
+
const { adapter } = await requireCodeGraph();
|
|
682
706
|
try {
|
|
683
|
-
const
|
|
684
|
-
const callees = traverser.getCallees(nodeId, Number(opts.depth) || 2);
|
|
707
|
+
const callees = await adapter.getCallees(nodeId, depth);
|
|
685
708
|
if (opts.json) {
|
|
686
|
-
console.log(JSON.stringify(callees.map(c => ({
|
|
709
|
+
console.log(JSON.stringify(callees.map((c) => ({
|
|
687
710
|
id: c.node.id, kind: c.node.kind, name: c.node.name,
|
|
688
|
-
filePath: c.node.filePath, edgeKind: c.edge
|
|
711
|
+
filePath: c.node.filePath, edgeKind: c.edge?.kind ?? 'calls',
|
|
689
712
|
})), null, 2));
|
|
690
713
|
return;
|
|
691
714
|
}
|
|
692
715
|
console.log(`Callees of ${nodeId} (${callees.length}):`);
|
|
693
716
|
for (const { node, edge } of callees) {
|
|
694
|
-
console.log(` --${edge
|
|
717
|
+
console.log(` --${edge?.kind ?? 'calls'}--> [${node.kind}] ${node.id}`);
|
|
695
718
|
if (node.signature)
|
|
696
719
|
console.log(` ${node.signature}`);
|
|
697
720
|
}
|
|
698
721
|
}
|
|
699
722
|
finally {
|
|
700
|
-
|
|
723
|
+
adapter.close();
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
// ── search ─────────────────────────────────────────────────────────
|
|
727
|
+
kg
|
|
728
|
+
.command('search <text>')
|
|
729
|
+
.description('Search nodes with optional context and wiki cross-references (CodeGraph)')
|
|
730
|
+
.option('--context', 'Include caller/callee counts for each result')
|
|
731
|
+
.option('--wiki', 'Include related wiki entries for each result')
|
|
732
|
+
.option('--limit <n>', 'Max results', '10')
|
|
733
|
+
.option('--json', 'Output as JSON')
|
|
734
|
+
.action(async (text, opts) => {
|
|
735
|
+
const limit = Number(opts.limit) || 10;
|
|
736
|
+
const { adapter } = await requireCodeGraph();
|
|
737
|
+
try {
|
|
738
|
+
const cgResults = await adapter.searchNodes(text, { limit });
|
|
739
|
+
const enriched = [];
|
|
740
|
+
for (const r of cgResults) {
|
|
741
|
+
const n = r.node ?? r;
|
|
742
|
+
const entry = {
|
|
743
|
+
id: n.id, kind: n.kind, name: n.name, filePath: n.filePath,
|
|
744
|
+
signature: n.signature || undefined,
|
|
745
|
+
isExported: n.isExported || undefined,
|
|
746
|
+
};
|
|
747
|
+
if (opts.context) {
|
|
748
|
+
const callers = await adapter.getCallers(n.id, 1);
|
|
749
|
+
const callees = await adapter.getCallees(n.id, 1);
|
|
750
|
+
entry.callerCount = callers.length;
|
|
751
|
+
entry.calleeCount = callees.length;
|
|
752
|
+
}
|
|
753
|
+
if (opts.wiki) {
|
|
754
|
+
entry.wiki = await findRelatedWikiEntries(n.id, n.filePath);
|
|
755
|
+
}
|
|
756
|
+
enriched.push(entry);
|
|
757
|
+
}
|
|
758
|
+
if (opts.json) {
|
|
759
|
+
console.log(JSON.stringify({ query: text, total: enriched.length, nodes: enriched, engine: 'codegraph' }, null, 2));
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
console.log(`Search: "${text}" (${enriched.length} results, CodeGraph)`);
|
|
763
|
+
for (const n of enriched) {
|
|
764
|
+
const exported = n.isExported ? 'Exported ' : '';
|
|
765
|
+
const desc = n.signature ? truncate(n.signature, 60) : `${exported}${n.kind} "${n.name}" in ${n.filePath}`;
|
|
766
|
+
let line = ` [${n.kind}] ${n.id} -- ${desc}`;
|
|
767
|
+
if (n.callerCount !== undefined) {
|
|
768
|
+
line += ` (callers: ${n.callerCount}, callees: ${n.calleeCount})`;
|
|
769
|
+
}
|
|
770
|
+
console.log(line);
|
|
771
|
+
if (n.wiki && n.wiki.length > 0) {
|
|
772
|
+
for (const w of n.wiki) {
|
|
773
|
+
console.log(` wiki: [${w.type}] ${w.id} -- ${w.title} (${w.matchReason})`);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
finally {
|
|
779
|
+
adapter.close();
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
// ── context ──────────────────────────────────────────────────────
|
|
783
|
+
kg
|
|
784
|
+
.command('context <node-id>')
|
|
785
|
+
.description('Show full context: callers, callees, file siblings, and wiki (CodeGraph)')
|
|
786
|
+
.option('--depth <n>', 'Max traversal depth', '2')
|
|
787
|
+
.option('--wiki', 'Include related wiki entries')
|
|
788
|
+
.option('--json', 'Output as JSON')
|
|
789
|
+
.action(async (nodeId, opts) => {
|
|
790
|
+
const depth = Number(opts.depth) || 2;
|
|
791
|
+
const { adapter } = await requireCodeGraph();
|
|
792
|
+
try {
|
|
793
|
+
const resolved = await adapter.resolveNode(nodeId);
|
|
794
|
+
if (!resolved) {
|
|
795
|
+
console.error(`Node not found: ${nodeId}`);
|
|
796
|
+
process.exit(1);
|
|
797
|
+
}
|
|
798
|
+
const callers = await adapter.getCallers(nodeId, depth);
|
|
799
|
+
const callees = await adapter.getCallees(nodeId, depth);
|
|
800
|
+
const fileSiblings = resolved.filePath
|
|
801
|
+
? (await adapter.getNodesInFile(resolved.filePath)).filter((n) => n.id !== resolved.id) // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
802
|
+
: [];
|
|
803
|
+
const wikiMatches = opts.wiki
|
|
804
|
+
? await findRelatedWikiEntries(nodeId, resolved.filePath)
|
|
805
|
+
: [];
|
|
806
|
+
if (opts.json) {
|
|
807
|
+
console.log(JSON.stringify({
|
|
808
|
+
node: {
|
|
809
|
+
id: resolved.id, kind: resolved.kind, name: resolved.name,
|
|
810
|
+
filePath: resolved.filePath, signature: resolved.signature,
|
|
811
|
+
startLine: resolved.startLine, endLine: resolved.endLine,
|
|
812
|
+
isExported: resolved.isExported,
|
|
813
|
+
},
|
|
814
|
+
callers: callers.map((c) => ({
|
|
815
|
+
id: c.node.id, kind: c.node.kind, name: c.node.name,
|
|
816
|
+
filePath: c.node.filePath, edgeKind: c.edge?.kind ?? 'calls',
|
|
817
|
+
})),
|
|
818
|
+
callees: callees.map((c) => ({
|
|
819
|
+
id: c.node.id, kind: c.node.kind, name: c.node.name,
|
|
820
|
+
filePath: c.node.filePath, edgeKind: c.edge?.kind ?? 'calls',
|
|
821
|
+
})),
|
|
822
|
+
fileSiblings: fileSiblings.map((n) => ({
|
|
823
|
+
id: n.id, kind: n.kind, name: n.name,
|
|
824
|
+
})),
|
|
825
|
+
wiki: wikiMatches,
|
|
826
|
+
engine: 'codegraph',
|
|
827
|
+
}, null, 2));
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
console.log(`Node: ${resolved.id}`);
|
|
831
|
+
console.log(` Kind: ${resolved.kind}`);
|
|
832
|
+
console.log(` Name: ${resolved.name}`);
|
|
833
|
+
if (resolved.filePath)
|
|
834
|
+
console.log(` File: ${resolved.filePath}:${resolved.startLine}-${resolved.endLine}`);
|
|
835
|
+
if (resolved.signature)
|
|
836
|
+
console.log(` Signature: ${truncate(resolved.signature, 80)}`);
|
|
837
|
+
if (resolved.isExported)
|
|
838
|
+
console.log(` Exported: yes`);
|
|
839
|
+
if (callers.length > 0) {
|
|
840
|
+
console.log('');
|
|
841
|
+
console.log(`Callers (${callers.length}, depth ${depth}):`);
|
|
842
|
+
for (const { node: c, edge } of callers) {
|
|
843
|
+
console.log(` [${c.kind}] ${c.id} --${edge?.kind ?? 'calls'}-->`);
|
|
844
|
+
if (c.signature)
|
|
845
|
+
console.log(` ${truncate(c.signature, 70)}`);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
if (callees.length > 0) {
|
|
849
|
+
console.log('');
|
|
850
|
+
console.log(`Callees (${callees.length}, depth ${depth}):`);
|
|
851
|
+
for (const { node: c, edge } of callees) {
|
|
852
|
+
console.log(` --${edge?.kind ?? 'calls'}--> [${c.kind}] ${c.id}`);
|
|
853
|
+
if (c.signature)
|
|
854
|
+
console.log(` ${truncate(c.signature, 70)}`);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
if (fileSiblings.length > 0) {
|
|
858
|
+
console.log('');
|
|
859
|
+
console.log(`File siblings in ${resolved.filePath} (${fileSiblings.length}):`);
|
|
860
|
+
for (const s of fileSiblings) {
|
|
861
|
+
console.log(` [${s.kind}] ${s.id} -- ${s.name}`);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
if (wikiMatches.length > 0) {
|
|
865
|
+
console.log('');
|
|
866
|
+
console.log(`Related wiki entries (${wikiMatches.length}):`);
|
|
867
|
+
for (const w of wikiMatches) {
|
|
868
|
+
console.log(` [${w.type}] ${w.id} -- ${w.title} (${w.matchReason})`);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
finally {
|
|
873
|
+
adapter.close();
|
|
701
874
|
}
|
|
702
875
|
});
|
|
703
876
|
// ── impact ─────────────────────────────────────────────────────────
|
|
704
877
|
kg
|
|
705
878
|
.command('impact <node-id>')
|
|
706
|
-
.description('Show transitive impact radius (SQLite)')
|
|
879
|
+
.description('Show transitive impact radius (legacy, requires SQLite index)')
|
|
707
880
|
.option('--depth <n>', 'Max depth', '3')
|
|
708
881
|
.option('--json', 'Output as JSON')
|
|
709
882
|
.action((nodeId, opts) => {
|
|
@@ -732,7 +905,7 @@ export function registerKgCommand(program) {
|
|
|
732
905
|
// ── dead-code ──────────────────────────────────────────────────────
|
|
733
906
|
kg
|
|
734
907
|
.command('dead-code')
|
|
735
|
-
.description('Find unreferenced symbols (SQLite)')
|
|
908
|
+
.description('Find unreferenced symbols (legacy, requires SQLite index)')
|
|
736
909
|
.option('--kinds <kinds>', 'Comma-separated node kinds to check', 'function,method,class')
|
|
737
910
|
.option('--json', 'Output as JSON')
|
|
738
911
|
.action((opts) => {
|
|
@@ -760,7 +933,7 @@ export function registerKgCommand(program) {
|
|
|
760
933
|
// ── cycles ─────────────────────────────────────────────────────────
|
|
761
934
|
kg
|
|
762
935
|
.command('cycles')
|
|
763
|
-
.description('Find circular import dependencies (SQLite)')
|
|
936
|
+
.description('Find circular import dependencies (legacy, requires SQLite index)')
|
|
764
937
|
.option('--json', 'Output as JSON')
|
|
765
938
|
.action((opts) => {
|
|
766
939
|
const { conn, queries } = openSqliteOrExit();
|