@dragonflymcp/plugin 1.0.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/.claude-plugin/plugin.json +26 -0
- package/LICENSE +21 -0
- package/README.md +126 -0
- package/dist/core/annotations.d.ts +71 -0
- package/dist/core/annotations.d.ts.map +1 -0
- package/dist/core/annotations.js +61 -0
- package/dist/core/annotations.js.map +1 -0
- package/dist/core/config.d.ts +66 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +131 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/dispatcher.d.ts +77 -0
- package/dist/core/dispatcher.d.ts.map +1 -0
- package/dist/core/dispatcher.js +132 -0
- package/dist/core/dispatcher.js.map +1 -0
- package/dist/core/server.d.ts +24 -0
- package/dist/core/server.d.ts.map +1 -0
- package/dist/core/server.js +41 -0
- package/dist/core/server.js.map +1 -0
- package/dist/core/store.d.ts +91 -0
- package/dist/core/store.d.ts.map +1 -0
- package/dist/core/store.js +157 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/types.d.ts +128 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +5 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/test-utils/store-harness.d.ts +41 -0
- package/dist/test-utils/store-harness.d.ts.map +1 -0
- package/dist/test-utils/store-harness.js +61 -0
- package/dist/test-utils/store-harness.js.map +1 -0
- package/dist/tools/analytics/aggregators.d.ts +18 -0
- package/dist/tools/analytics/aggregators.d.ts.map +1 -0
- package/dist/tools/analytics/aggregators.js +260 -0
- package/dist/tools/analytics/aggregators.js.map +1 -0
- package/dist/tools/analytics/aggregators.test.d.ts +2 -0
- package/dist/tools/analytics/aggregators.test.d.ts.map +1 -0
- package/dist/tools/analytics/aggregators.test.js +177 -0
- package/dist/tools/analytics/aggregators.test.js.map +1 -0
- package/dist/tools/analytics/drift.d.ts +15 -0
- package/dist/tools/analytics/drift.d.ts.map +1 -0
- package/dist/tools/analytics/drift.js +135 -0
- package/dist/tools/analytics/drift.js.map +1 -0
- package/dist/tools/analytics/drift.test.d.ts +2 -0
- package/dist/tools/analytics/drift.test.d.ts.map +1 -0
- package/dist/tools/analytics/drift.test.js +99 -0
- package/dist/tools/analytics/drift.test.js.map +1 -0
- package/dist/tools/analytics/index.d.ts +10 -0
- package/dist/tools/analytics/index.d.ts.map +1 -0
- package/dist/tools/analytics/index.js +192 -0
- package/dist/tools/analytics/index.js.map +1 -0
- package/dist/tools/analytics/learner.d.ts +29 -0
- package/dist/tools/analytics/learner.d.ts.map +1 -0
- package/dist/tools/analytics/learner.js +135 -0
- package/dist/tools/analytics/learner.js.map +1 -0
- package/dist/tools/analytics/learner.test.d.ts +2 -0
- package/dist/tools/analytics/learner.test.d.ts.map +1 -0
- package/dist/tools/analytics/learner.test.js +118 -0
- package/dist/tools/analytics/learner.test.js.map +1 -0
- package/dist/tools/analytics/observe.d.ts +22 -0
- package/dist/tools/analytics/observe.d.ts.map +1 -0
- package/dist/tools/analytics/observe.js +143 -0
- package/dist/tools/analytics/observe.js.map +1 -0
- package/dist/tools/analytics/observe.test.d.ts +2 -0
- package/dist/tools/analytics/observe.test.d.ts.map +1 -0
- package/dist/tools/analytics/observe.test.js +95 -0
- package/dist/tools/analytics/observe.test.js.map +1 -0
- package/dist/tools/analytics/store.d.ts +29 -0
- package/dist/tools/analytics/store.d.ts.map +1 -0
- package/dist/tools/analytics/store.js +192 -0
- package/dist/tools/analytics/store.js.map +1 -0
- package/dist/tools/analytics/types.d.ts +290 -0
- package/dist/tools/analytics/types.d.ts.map +1 -0
- package/dist/tools/analytics/types.js +7 -0
- package/dist/tools/analytics/types.js.map +1 -0
- package/dist/tools/ast/index.d.ts +8 -0
- package/dist/tools/ast/index.d.ts.map +1 -0
- package/dist/tools/ast/index.js +242 -0
- package/dist/tools/ast/index.js.map +1 -0
- package/dist/tools/ast/indexer.d.ts +41 -0
- package/dist/tools/ast/indexer.d.ts.map +1 -0
- package/dist/tools/ast/indexer.js +617 -0
- package/dist/tools/ast/indexer.js.map +1 -0
- package/dist/tools/ast/store.d.ts +87 -0
- package/dist/tools/ast/store.d.ts.map +1 -0
- package/dist/tools/ast/store.js +280 -0
- package/dist/tools/ast/store.js.map +1 -0
- package/dist/tools/ast/store.test.d.ts +6 -0
- package/dist/tools/ast/store.test.d.ts.map +1 -0
- package/dist/tools/ast/store.test.js +257 -0
- package/dist/tools/ast/store.test.js.map +1 -0
- package/dist/tools/bridge/bridge.d.ts +37 -0
- package/dist/tools/bridge/bridge.d.ts.map +1 -0
- package/dist/tools/bridge/bridge.js +82 -0
- package/dist/tools/bridge/bridge.js.map +1 -0
- package/dist/tools/bridge/bridge.test.d.ts +2 -0
- package/dist/tools/bridge/bridge.test.d.ts.map +1 -0
- package/dist/tools/bridge/bridge.test.js +119 -0
- package/dist/tools/bridge/bridge.test.js.map +1 -0
- package/dist/tools/bridge/index.d.ts +8 -0
- package/dist/tools/bridge/index.d.ts.map +1 -0
- package/dist/tools/bridge/index.js +153 -0
- package/dist/tools/bridge/index.js.map +1 -0
- package/dist/tools/bridge/store.d.ts +45 -0
- package/dist/tools/bridge/store.d.ts.map +1 -0
- package/dist/tools/bridge/store.js +307 -0
- package/dist/tools/bridge/store.js.map +1 -0
- package/dist/tools/bridge/store.test.d.ts +2 -0
- package/dist/tools/bridge/store.test.d.ts.map +1 -0
- package/dist/tools/bridge/store.test.js +180 -0
- package/dist/tools/bridge/store.test.js.map +1 -0
- package/dist/tools/bridge/types.d.ts +44 -0
- package/dist/tools/bridge/types.d.ts.map +1 -0
- package/dist/tools/bridge/types.js +6 -0
- package/dist/tools/bridge/types.js.map +1 -0
- package/dist/tools/evolve/algorithm.d.ts +33 -0
- package/dist/tools/evolve/algorithm.d.ts.map +1 -0
- package/dist/tools/evolve/algorithm.js +64 -0
- package/dist/tools/evolve/algorithm.js.map +1 -0
- package/dist/tools/evolve/algorithm.test.d.ts +6 -0
- package/dist/tools/evolve/algorithm.test.d.ts.map +1 -0
- package/dist/tools/evolve/algorithm.test.js +138 -0
- package/dist/tools/evolve/algorithm.test.js.map +1 -0
- package/dist/tools/evolve/index.d.ts +11 -0
- package/dist/tools/evolve/index.d.ts.map +1 -0
- package/dist/tools/evolve/index.js +300 -0
- package/dist/tools/evolve/index.js.map +1 -0
- package/dist/tools/evolve/store.d.ts +27 -0
- package/dist/tools/evolve/store.d.ts.map +1 -0
- package/dist/tools/evolve/store.js +147 -0
- package/dist/tools/evolve/store.js.map +1 -0
- package/dist/tools/evolve/store.test.d.ts +6 -0
- package/dist/tools/evolve/store.test.d.ts.map +1 -0
- package/dist/tools/evolve/store.test.js +162 -0
- package/dist/tools/evolve/store.test.js.map +1 -0
- package/dist/tools/evolve/types.d.ts +38 -0
- package/dist/tools/evolve/types.d.ts.map +1 -0
- package/dist/tools/evolve/types.js +6 -0
- package/dist/tools/evolve/types.js.map +1 -0
- package/dist/tools/framework/content-loader.d.ts +45 -0
- package/dist/tools/framework/content-loader.d.ts.map +1 -0
- package/dist/tools/framework/content-loader.js +258 -0
- package/dist/tools/framework/content-loader.js.map +1 -0
- package/dist/tools/framework/content-loader.test.d.ts +5 -0
- package/dist/tools/framework/content-loader.test.d.ts.map +1 -0
- package/dist/tools/framework/content-loader.test.js +262 -0
- package/dist/tools/framework/content-loader.test.js.map +1 -0
- package/dist/tools/framework/index.d.ts +30 -0
- package/dist/tools/framework/index.d.ts.map +1 -0
- package/dist/tools/framework/index.js +517 -0
- package/dist/tools/framework/index.js.map +1 -0
- package/dist/tools/framework/session.d.ts +85 -0
- package/dist/tools/framework/session.d.ts.map +1 -0
- package/dist/tools/framework/session.js +311 -0
- package/dist/tools/framework/session.js.map +1 -0
- package/dist/tools/framework/session.test.d.ts +5 -0
- package/dist/tools/framework/session.test.d.ts.map +1 -0
- package/dist/tools/framework/session.test.js +291 -0
- package/dist/tools/framework/session.test.js.map +1 -0
- package/dist/tools/framework/sync-evaluator.d.ts +41 -0
- package/dist/tools/framework/sync-evaluator.d.ts.map +1 -0
- package/dist/tools/framework/sync-evaluator.js +298 -0
- package/dist/tools/framework/sync-evaluator.js.map +1 -0
- package/dist/tools/framework/sync-evaluator.test.d.ts +5 -0
- package/dist/tools/framework/sync-evaluator.test.d.ts.map +1 -0
- package/dist/tools/framework/sync-evaluator.test.js +288 -0
- package/dist/tools/framework/sync-evaluator.test.js.map +1 -0
- package/dist/tools/framework/types.d.ts +279 -0
- package/dist/tools/framework/types.d.ts.map +1 -0
- package/dist/tools/framework/types.js +6 -0
- package/dist/tools/framework/types.js.map +1 -0
- package/dist/tools/framework/workflow-intelligence.d.ts +55 -0
- package/dist/tools/framework/workflow-intelligence.d.ts.map +1 -0
- package/dist/tools/framework/workflow-intelligence.js +199 -0
- package/dist/tools/framework/workflow-intelligence.js.map +1 -0
- package/dist/tools/framework/workflow-intelligence.test.d.ts +6 -0
- package/dist/tools/framework/workflow-intelligence.test.d.ts.map +1 -0
- package/dist/tools/framework/workflow-intelligence.test.js +257 -0
- package/dist/tools/framework/workflow-intelligence.test.js.map +1 -0
- package/dist/tools/framework/workflow-planner.d.ts +10 -0
- package/dist/tools/framework/workflow-planner.d.ts.map +1 -0
- package/dist/tools/framework/workflow-planner.js +214 -0
- package/dist/tools/framework/workflow-planner.js.map +1 -0
- package/dist/tools/framework/workflow-planner.test.d.ts +5 -0
- package/dist/tools/framework/workflow-planner.test.d.ts.map +1 -0
- package/dist/tools/framework/workflow-planner.test.js +137 -0
- package/dist/tools/framework/workflow-planner.test.js.map +1 -0
- package/dist/tools/knowledge/bridge.d.ts +34 -0
- package/dist/tools/knowledge/bridge.d.ts.map +1 -0
- package/dist/tools/knowledge/bridge.js +249 -0
- package/dist/tools/knowledge/bridge.js.map +1 -0
- package/dist/tools/knowledge/bridge.test.d.ts +5 -0
- package/dist/tools/knowledge/bridge.test.d.ts.map +1 -0
- package/dist/tools/knowledge/bridge.test.js +221 -0
- package/dist/tools/knowledge/bridge.test.js.map +1 -0
- package/dist/tools/knowledge/extractor.d.ts +22 -0
- package/dist/tools/knowledge/extractor.d.ts.map +1 -0
- package/dist/tools/knowledge/extractor.js +154 -0
- package/dist/tools/knowledge/extractor.js.map +1 -0
- package/dist/tools/knowledge/index.d.ts +12 -0
- package/dist/tools/knowledge/index.d.ts.map +1 -0
- package/dist/tools/knowledge/index.js +505 -0
- package/dist/tools/knowledge/index.js.map +1 -0
- package/dist/tools/knowledge/retrieval.d.ts +28 -0
- package/dist/tools/knowledge/retrieval.d.ts.map +1 -0
- package/dist/tools/knowledge/retrieval.js +164 -0
- package/dist/tools/knowledge/retrieval.js.map +1 -0
- package/dist/tools/knowledge/store.d.ts +96 -0
- package/dist/tools/knowledge/store.d.ts.map +1 -0
- package/dist/tools/knowledge/store.js +562 -0
- package/dist/tools/knowledge/store.js.map +1 -0
- package/dist/tools/knowledge/store.test.d.ts +6 -0
- package/dist/tools/knowledge/store.test.d.ts.map +1 -0
- package/dist/tools/knowledge/store.test.js +385 -0
- package/dist/tools/knowledge/store.test.js.map +1 -0
- package/dist/tools/knowledge/types.d.ts +168 -0
- package/dist/tools/knowledge/types.d.ts.map +1 -0
- package/dist/tools/knowledge/types.js +6 -0
- package/dist/tools/knowledge/types.js.map +1 -0
- package/dist/tools/memory/evolution.d.ts +31 -0
- package/dist/tools/memory/evolution.d.ts.map +1 -0
- package/dist/tools/memory/evolution.js +130 -0
- package/dist/tools/memory/evolution.js.map +1 -0
- package/dist/tools/memory/index.d.ts +11 -0
- package/dist/tools/memory/index.d.ts.map +1 -0
- package/dist/tools/memory/index.js +239 -0
- package/dist/tools/memory/index.js.map +1 -0
- package/dist/tools/memory/store.d.ts +75 -0
- package/dist/tools/memory/store.d.ts.map +1 -0
- package/dist/tools/memory/store.js +398 -0
- package/dist/tools/memory/store.js.map +1 -0
- package/dist/tools/memory/store.test.d.ts +6 -0
- package/dist/tools/memory/store.test.d.ts.map +1 -0
- package/dist/tools/memory/store.test.js +429 -0
- package/dist/tools/memory/store.test.js.map +1 -0
- package/dist/tools/memory/types.d.ts +171 -0
- package/dist/tools/memory/types.d.ts.map +1 -0
- package/dist/tools/memory/types.js +6 -0
- package/dist/tools/memory/types.js.map +1 -0
- package/dist/tools/pipeline/composer.d.ts +29 -0
- package/dist/tools/pipeline/composer.d.ts.map +1 -0
- package/dist/tools/pipeline/composer.js +225 -0
- package/dist/tools/pipeline/composer.js.map +1 -0
- package/dist/tools/pipeline/composer.test.d.ts +2 -0
- package/dist/tools/pipeline/composer.test.d.ts.map +1 -0
- package/dist/tools/pipeline/composer.test.js +162 -0
- package/dist/tools/pipeline/composer.test.js.map +1 -0
- package/dist/tools/pipeline/index.d.ts +8 -0
- package/dist/tools/pipeline/index.d.ts.map +1 -0
- package/dist/tools/pipeline/index.js +102 -0
- package/dist/tools/pipeline/index.js.map +1 -0
- package/dist/tools/pipeline/planner.d.ts +10 -0
- package/dist/tools/pipeline/planner.d.ts.map +1 -0
- package/dist/tools/pipeline/planner.js +147 -0
- package/dist/tools/pipeline/planner.js.map +1 -0
- package/dist/tools/pipeline/planner.test.d.ts +2 -0
- package/dist/tools/pipeline/planner.test.d.ts.map +1 -0
- package/dist/tools/pipeline/planner.test.js +96 -0
- package/dist/tools/pipeline/planner.test.js.map +1 -0
- package/dist/tools/pipeline/preconditions.d.ts +14 -0
- package/dist/tools/pipeline/preconditions.d.ts.map +1 -0
- package/dist/tools/pipeline/preconditions.js +65 -0
- package/dist/tools/pipeline/preconditions.js.map +1 -0
- package/dist/tools/pipeline/preconditions.test.d.ts +2 -0
- package/dist/tools/pipeline/preconditions.test.d.ts.map +1 -0
- package/dist/tools/pipeline/preconditions.test.js +74 -0
- package/dist/tools/pipeline/preconditions.test.js.map +1 -0
- package/dist/tools/pipeline/types.d.ts +105 -0
- package/dist/tools/pipeline/types.d.ts.map +1 -0
- package/dist/tools/pipeline/types.js +6 -0
- package/dist/tools/pipeline/types.js.map +1 -0
- package/dist/tools/repair/index.d.ts +8 -0
- package/dist/tools/repair/index.d.ts.map +1 -0
- package/dist/tools/repair/index.js +384 -0
- package/dist/tools/repair/index.js.map +1 -0
- package/dist/tools/repair/repairer.d.ts +67 -0
- package/dist/tools/repair/repairer.d.ts.map +1 -0
- package/dist/tools/repair/repairer.js +257 -0
- package/dist/tools/repair/repairer.js.map +1 -0
- package/dist/tools/repair/repairer.test.d.ts +6 -0
- package/dist/tools/repair/repairer.test.d.ts.map +1 -0
- package/dist/tools/repair/repairer.test.js +159 -0
- package/dist/tools/repair/repairer.test.js.map +1 -0
- package/dist/tools/semantic/chunker.d.ts +23 -0
- package/dist/tools/semantic/chunker.d.ts.map +1 -0
- package/dist/tools/semantic/chunker.js +244 -0
- package/dist/tools/semantic/chunker.js.map +1 -0
- package/dist/tools/semantic/embedder.d.ts +16 -0
- package/dist/tools/semantic/embedder.d.ts.map +1 -0
- package/dist/tools/semantic/embedder.js +88 -0
- package/dist/tools/semantic/embedder.js.map +1 -0
- package/dist/tools/semantic/index.d.ts +8 -0
- package/dist/tools/semantic/index.d.ts.map +1 -0
- package/dist/tools/semantic/index.js +144 -0
- package/dist/tools/semantic/index.js.map +1 -0
- package/dist/tools/semantic/store.d.ts +31 -0
- package/dist/tools/semantic/store.d.ts.map +1 -0
- package/dist/tools/semantic/store.js +168 -0
- package/dist/tools/semantic/store.js.map +1 -0
- package/dist/tools/semantic/store.test.d.ts +6 -0
- package/dist/tools/semantic/store.test.d.ts.map +1 -0
- package/dist/tools/semantic/store.test.js +240 -0
- package/dist/tools/semantic/store.test.js.map +1 -0
- package/dist/tools/spec/generator.d.ts +32 -0
- package/dist/tools/spec/generator.d.ts.map +1 -0
- package/dist/tools/spec/generator.js +278 -0
- package/dist/tools/spec/generator.js.map +1 -0
- package/dist/tools/spec/generator.test.d.ts +6 -0
- package/dist/tools/spec/generator.test.d.ts.map +1 -0
- package/dist/tools/spec/generator.test.js +208 -0
- package/dist/tools/spec/generator.test.js.map +1 -0
- package/dist/tools/spec/index.d.ts +11 -0
- package/dist/tools/spec/index.d.ts.map +1 -0
- package/dist/tools/spec/index.js +426 -0
- package/dist/tools/spec/index.js.map +1 -0
- package/dist/tools/spec/store.d.ts +24 -0
- package/dist/tools/spec/store.d.ts.map +1 -0
- package/dist/tools/spec/store.js +104 -0
- package/dist/tools/spec/store.js.map +1 -0
- package/dist/tools/spec/store.test.d.ts +6 -0
- package/dist/tools/spec/store.test.d.ts.map +1 -0
- package/dist/tools/spec/store.test.js +173 -0
- package/dist/tools/spec/store.test.js.map +1 -0
- package/dist/tools/spec/types.d.ts +61 -0
- package/dist/tools/spec/types.d.ts.map +1 -0
- package/dist/tools/spec/types.js +6 -0
- package/dist/tools/spec/types.js.map +1 -0
- package/dist/tools/state/index.d.ts +11 -0
- package/dist/tools/state/index.d.ts.map +1 -0
- package/dist/tools/state/index.js +386 -0
- package/dist/tools/state/index.js.map +1 -0
- package/dist/tools/state/migrate.d.ts +39 -0
- package/dist/tools/state/migrate.d.ts.map +1 -0
- package/dist/tools/state/migrate.js +242 -0
- package/dist/tools/state/migrate.js.map +1 -0
- package/dist/tools/state/migrate.test.d.ts +2 -0
- package/dist/tools/state/migrate.test.d.ts.map +1 -0
- package/dist/tools/state/migrate.test.js +265 -0
- package/dist/tools/state/migrate.test.js.map +1 -0
- package/dist/tools/state/store.d.ts +107 -0
- package/dist/tools/state/store.d.ts.map +1 -0
- package/dist/tools/state/store.js +365 -0
- package/dist/tools/state/store.js.map +1 -0
- package/dist/tools/state/store.test.d.ts +5 -0
- package/dist/tools/state/store.test.d.ts.map +1 -0
- package/dist/tools/state/store.test.js +293 -0
- package/dist/tools/state/store.test.js.map +1 -0
- package/dist/tools/state/types.d.ts +90 -0
- package/dist/tools/state/types.d.ts.map +1 -0
- package/dist/tools/state/types.js +6 -0
- package/dist/tools/state/types.js.map +1 -0
- package/dist/tools/testing/analyzer.d.ts +44 -0
- package/dist/tools/testing/analyzer.d.ts.map +1 -0
- package/dist/tools/testing/analyzer.js +280 -0
- package/dist/tools/testing/analyzer.js.map +1 -0
- package/dist/tools/testing/generator.d.ts +57 -0
- package/dist/tools/testing/generator.d.ts.map +1 -0
- package/dist/tools/testing/generator.js +478 -0
- package/dist/tools/testing/generator.js.map +1 -0
- package/dist/tools/testing/generator.test.d.ts +6 -0
- package/dist/tools/testing/generator.test.d.ts.map +1 -0
- package/dist/tools/testing/generator.test.js +285 -0
- package/dist/tools/testing/generator.test.js.map +1 -0
- package/dist/tools/testing/index.d.ts +8 -0
- package/dist/tools/testing/index.d.ts.map +1 -0
- package/dist/tools/testing/index.js +373 -0
- package/dist/tools/testing/index.js.map +1 -0
- package/dist/utils/embedder.d.ts +7 -0
- package/dist/utils/embedder.d.ts.map +1 -0
- package/dist/utils/embedder.js +13 -0
- package/dist/utils/embedder.js.map +1 -0
- package/dist/utils/execution.d.ts +68 -0
- package/dist/utils/execution.d.ts.map +1 -0
- package/dist/utils/execution.js +467 -0
- package/dist/utils/execution.js.map +1 -0
- package/dist/utils/graph.d.ts +26 -0
- package/dist/utils/graph.d.ts.map +1 -0
- package/dist/utils/graph.js +32 -0
- package/dist/utils/graph.js.map +1 -0
- package/dist/utils/guards.d.ts +32 -0
- package/dist/utils/guards.d.ts.map +1 -0
- package/dist/utils/guards.js +40 -0
- package/dist/utils/guards.js.map +1 -0
- package/dist/utils/ids.d.ts +5 -0
- package/dist/utils/ids.d.ts.map +1 -0
- package/dist/utils/ids.js +7 -0
- package/dist/utils/ids.js.map +1 -0
- package/dist/utils/languages.d.ts +34 -0
- package/dist/utils/languages.d.ts.map +1 -0
- package/dist/utils/languages.js +153 -0
- package/dist/utils/languages.js.map +1 -0
- package/dist/utils/lazy.d.ts +17 -0
- package/dist/utils/lazy.d.ts.map +1 -0
- package/dist/utils/lazy.js +35 -0
- package/dist/utils/lazy.js.map +1 -0
- package/dist/utils/project.d.ts +41 -0
- package/dist/utils/project.d.ts.map +1 -0
- package/dist/utils/project.js +82 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/utils/responses.d.ts +27 -0
- package/dist/utils/responses.d.ts.map +1 -0
- package/dist/utils/responses.js +72 -0
- package/dist/utils/responses.js.map +1 -0
- package/dist/utils/vectors.d.ts +33 -0
- package/dist/utils/vectors.d.ts.map +1 -0
- package/dist/utils/vectors.js +80 -0
- package/dist/utils/vectors.js.map +1 -0
- package/dist/utils/vectors.test.d.ts +6 -0
- package/dist/utils/vectors.test.d.ts.map +1 -0
- package/dist/utils/vectors.test.js +96 -0
- package/dist/utils/vectors.test.js.map +1 -0
- package/package.json +69 -0
- package/scripts/init.js +142 -0
- package/templates/CLAUDE.md.template +96 -0
- package/templates/agents/architecture-concept.md +237 -0
- package/templates/agents/checkpoint-concept.md +218 -0
- package/templates/agents/code-analysis-concept.md +171 -0
- package/templates/agents/compete-control.md +44 -0
- package/templates/agents/compete-evaluator.md +87 -0
- package/templates/agents/compete-treatment.md +55 -0
- package/templates/agents/context-concept.md +254 -0
- package/templates/agents/debate-advocate.md +127 -0
- package/templates/agents/debate-critic.md +119 -0
- package/templates/agents/debate-synthesis.md +160 -0
- package/templates/agents/documentation-concept.md +294 -0
- package/templates/agents/implementation-concept.md +165 -0
- package/templates/agents/quality-concept.md +299 -0
- package/templates/agents/research-concept.md +169 -0
- package/templates/agents/security-concept.md +255 -0
- package/templates/agents/story-concept.md +207 -0
- package/templates/agents/verification-concept.md +456 -0
- package/templates/agents/version-concept.md +163 -0
- package/templates/anchors/directory.anchor.yaml.template +53 -0
- package/templates/anchors/rules.anchor.yaml.template +70 -0
- package/templates/anchors/safety.anchor.yaml.template +96 -0
- package/templates/claude-md-managed.template +105 -0
- package/templates/commands/cache.md.template +439 -0
- package/templates/commands/checkpoint.md.template +121 -0
- package/templates/commands/classify.md.template +138 -0
- package/templates/commands/compete.md.template +90 -0
- package/templates/commands/costs.md.template +111 -0
- package/templates/commands/estimate.md.template +196 -0
- package/templates/commands/explore.md.template +186 -0
- package/templates/commands/feature.md.template +216 -0
- package/templates/commands/forget.md.template +104 -0
- package/templates/commands/global-recall.md.template +250 -0
- package/templates/commands/global-remember.md.template +187 -0
- package/templates/commands/health.md.template +107 -0
- package/templates/commands/help.md.template +253 -0
- package/templates/commands/observe.md.template +211 -0
- package/templates/commands/pr-review.md.template +164 -0
- package/templates/commands/predict-cost.md.template +251 -0
- package/templates/commands/profile.md.template +142 -0
- package/templates/commands/reasoning.md.template +228 -0
- package/templates/commands/recall.md.template +197 -0
- package/templates/commands/remember.md.template +148 -0
- package/templates/commands/replay.md.template +449 -0
- package/templates/commands/restore.md.template +87 -0
- package/templates/commands/retrospective.md.template +47 -0
- package/templates/commands/slo.md.template +286 -0
- package/templates/commands/spec.md.template +164 -0
- package/templates/commands/status.md.template +53 -0
- package/templates/commands/sync.md.template +321 -0
- package/templates/commands/task.md.template +86 -0
- package/templates/commands/trace.md.template +86 -0
- package/templates/commands/visualize.md.template +216 -0
- package/templates/commands/workflow.md.template +375 -0
- package/templates/concepts/README.md +329 -0
- package/templates/concepts/architecture.md.template +74 -0
- package/templates/concepts/code-analysis.md.template +186 -0
- package/templates/concepts/context-compactor.md.template +393 -0
- package/templates/concepts/context.md.template +62 -0
- package/templates/concepts/documentation.md.template +452 -0
- package/templates/concepts/estimator.md.template +214 -0
- package/templates/concepts/exploration.md.template +257 -0
- package/templates/concepts/global-memory.md.template +222 -0
- package/templates/concepts/implementation.md.template +62 -0
- package/templates/concepts/pr-review.md.template +277 -0
- package/templates/concepts/project-profile.md.template +358 -0
- package/templates/concepts/quality.md.template +63 -0
- package/templates/concepts/react-fallback.md.template +286 -0
- package/templates/concepts/research.md.template +221 -0
- package/templates/concepts/retrospective.md.template +93 -0
- package/templates/concepts/security.md.template +442 -0
- package/templates/concepts/slo.md.template +274 -0
- package/templates/concepts/spec.md.template +71 -0
- package/templates/concepts/story.md.template +50 -0
- package/templates/concepts/tool-router.md.template +289 -0
- package/templates/concepts/verification-synthesizer.md.template +279 -0
- package/templates/concepts/version.md.template +61 -0
- package/templates/config.yaml.template +347 -0
- package/templates/examples/README.md +77 -0
- package/templates/examples/architecture/api-design.yaml.template +286 -0
- package/templates/examples/architecture/oauth-authentication.yaml.template +305 -0
- package/templates/health/status.yaml.template +120 -0
- package/templates/hooks/concept-complete.sh.template +45 -0
- package/templates/hooks/lib/common.sh.template +160 -0
- package/templates/hooks/post-commit.sh.template +37 -0
- package/templates/hooks/post-concept-action.template +39 -0
- package/templates/hooks/post-tool-structure-check.sh.template +138 -0
- package/templates/hooks/post-tool-use.sh.template +51 -0
- package/templates/hooks/pre-compact.sh.template +48 -0
- package/templates/hooks/pre-tool-grounding.template +148 -0
- package/templates/hooks/session-exit-checkpoint.sh.template +35 -0
- package/templates/hooks/session-start.sh.template +67 -0
- package/templates/hooks/statusline.sh.template +148 -0
- package/templates/hooks/stop.sh.template +45 -0
- package/templates/hooks/subagent-stop.sh.template +40 -0
- package/templates/hooks/sync-blocked.sh.template +45 -0
- package/templates/hooks/timeout.sh.template +48 -0
- package/templates/hooks/user-prompt-submit.sh.template +68 -0
- package/templates/koan/README.md +58 -0
- package/templates/memory/index.yaml.template +48 -0
- package/templates/memory/procedural/debugging.yaml.template +24 -0
- package/templates/memory/procedural/workflows.yaml.template +22 -0
- package/templates/memory/semantic/architecture.yaml.template +21 -0
- package/templates/memory/semantic/conventions.yaml.template +18 -0
- package/templates/memory/semantic/patterns.yaml.template +21 -0
- package/templates/memory/semantic/preferences.yaml.template +18 -0
- package/templates/prompts/architecture.yaml.template +349 -0
- package/templates/prompts/context.yaml.template +384 -0
- package/templates/prompts/implementation.yaml.template +365 -0
- package/templates/prompts/planning.yaml.template +303 -0
- package/templates/prompts/quality.yaml.template +345 -0
- package/templates/prompts/retrospective.yaml.template +231 -0
- package/templates/prompts/slo.yaml.template +360 -0
- package/templates/prompts/story.yaml.template +236 -0
- package/templates/prompts/tree-of-thoughts.yaml.template +299 -0
- package/templates/prompts/verification.yaml.template +286 -0
- package/templates/prompts/version.yaml.template +279 -0
- package/templates/schemas/agent-schema.json +98 -0
- package/templates/schemas/architecture.schema.json +69 -0
- package/templates/schemas/config-schema.json +165 -0
- package/templates/schemas/implementation.schema.json +75 -0
- package/templates/schemas/planning.schema.json +243 -0
- package/templates/schemas/provenance.schema.json +111 -0
- package/templates/schemas/retrospective.schema.json +174 -0
- package/templates/schemas/review.schema.json +284 -0
- package/templates/schemas/slo.schema.json +443 -0
- package/templates/schemas/story.schema.json +68 -0
- package/templates/schemas/sync-schema.json +196 -0
- package/templates/schemas/task.schema.json +127 -0
- package/templates/schemas/tree-of-thoughts.schema.json +175 -0
- package/templates/schemas/verification.schema.json +106 -0
- package/templates/settings.full.json.template +135 -0
- package/templates/settings.minimal.json.template +68 -0
- package/templates/settings.standard.json.template +135 -0
- package/templates/skills/acceptance-criteria-generation.md.template +330 -0
- package/templates/skills/accessibility-checking.md.template +341 -0
- package/templates/skills/api-design-patterns.md.template +395 -0
- package/templates/skills/batch-processing.md.template +605 -0
- package/templates/skills/branch-strategy.md.template +362 -0
- package/templates/skills/changelog-generation.md.template +403 -0
- package/templates/skills/code-coverage-analysis.md.template +362 -0
- package/templates/skills/code-style-enforcement.md.template +294 -0
- package/templates/skills/code-template-patterns.md.template +419 -0
- package/templates/skills/concept-development.md.template +159 -0
- package/templates/skills/context-prioritization.md.template +306 -0
- package/templates/skills/cost-optimization.md.template +482 -0
- package/templates/skills/cross-project-knowledge.md.template +316 -0
- package/templates/skills/dependency-impact-analysis.md.template +263 -0
- package/templates/skills/documentation-generation.md.template +409 -0
- package/templates/skills/effort-estimation.md.template +350 -0
- package/templates/skills/error-classification.md.template +709 -0
- package/templates/skills/error-messages.md.template +339 -0
- package/templates/skills/ide-diagnostics.md.template +480 -0
- package/templates/skills/incremental-loading.md.template +574 -0
- package/templates/skills/output-caching.md.template +524 -0
- package/templates/skills/performance-estimation.md.template +325 -0
- package/templates/skills/performance-testing-patterns.md.template +341 -0
- package/templates/skills/phase2-optimizations-summary.md.template +458 -0
- package/templates/skills/progressive-disclosure-pattern.md.template +190 -0
- package/templates/skills/project-structure.md.template +372 -0
- package/templates/skills/provenance-analysis.md.template +609 -0
- package/templates/skills/react-executor.md.template +366 -0
- package/templates/skills/refactoring-patterns.md.template +422 -0
- package/templates/skills/release-management.md.template +373 -0
- package/templates/skills/requirement-prioritization.md.template +357 -0
- package/templates/skills/schema-validation.md.template +321 -0
- package/templates/skills/security-design-patterns.md.template +692 -0
- package/templates/skills/security-vulnerability-scanning.md.template +663 -0
- package/templates/skills/semantic-memory.md.template +266 -0
- package/templates/skills/semantic-versioning.md.template +371 -0
- package/templates/skills/smart-retry.md.template +676 -0
- package/templates/skills/smart-summarization.md.template +358 -0
- package/templates/skills/story-decomposition.md.template +278 -0
- package/templates/skills/synchronization-patterns.md.template +303 -0
- package/templates/skills/test-generation-strategy.md.template +247 -0
- package/templates/skills/workflow-replay.md.template +478 -0
- package/templates/skills/wysiwid-principles.md.template +364 -0
- package/templates/skills-manifest.yaml.template +526 -0
- package/templates/stubs/agents/architecture-concept.md +20 -0
- package/templates/stubs/agents/checkpoint-concept.md +19 -0
- package/templates/stubs/agents/code-analysis-concept.md +36 -0
- package/templates/stubs/agents/context-concept.md +37 -0
- package/templates/stubs/agents/debate-advocate.md +12 -0
- package/templates/stubs/agents/debate-critic.md +12 -0
- package/templates/stubs/agents/debate-synthesis.md +12 -0
- package/templates/stubs/agents/documentation-concept.md +39 -0
- package/templates/stubs/agents/implementation-concept.md +41 -0
- package/templates/stubs/agents/quality-concept.md +41 -0
- package/templates/stubs/agents/research-concept.md +35 -0
- package/templates/stubs/agents/security-concept.md +40 -0
- package/templates/stubs/agents/spec-concept.md +35 -0
- package/templates/stubs/agents/story-concept.md +36 -0
- package/templates/stubs/agents/verification-concept.md +39 -0
- package/templates/stubs/agents/version-concept.md +37 -0
- package/templates/stubs/commands/cache.md.template +2 -0
- package/templates/stubs/commands/checkpoint.md.template +2 -0
- package/templates/stubs/commands/classify.md.template +2 -0
- package/templates/stubs/commands/compete.md.template +2 -0
- package/templates/stubs/commands/costs.md.template +2 -0
- package/templates/stubs/commands/estimate.md.template +2 -0
- package/templates/stubs/commands/explore.md.template +2 -0
- package/templates/stubs/commands/feature.md.template +2 -0
- package/templates/stubs/commands/forget.md.template +2 -0
- package/templates/stubs/commands/global-recall.md.template +2 -0
- package/templates/stubs/commands/global-remember.md.template +2 -0
- package/templates/stubs/commands/health.md.template +2 -0
- package/templates/stubs/commands/help.md.template +2 -0
- package/templates/stubs/commands/observe.md.template +2 -0
- package/templates/stubs/commands/pr-review.md.template +2 -0
- package/templates/stubs/commands/predict-cost.md.template +2 -0
- package/templates/stubs/commands/profile.md.template +2 -0
- package/templates/stubs/commands/reasoning.md.template +2 -0
- package/templates/stubs/commands/recall.md.template +2 -0
- package/templates/stubs/commands/remember.md.template +2 -0
- package/templates/stubs/commands/replay.md.template +2 -0
- package/templates/stubs/commands/restore.md.template +2 -0
- package/templates/stubs/commands/retrospective.md.template +2 -0
- package/templates/stubs/commands/slo.md.template +2 -0
- package/templates/stubs/commands/spec.md.template +2 -0
- package/templates/stubs/commands/sync.md.template +2 -0
- package/templates/stubs/commands/task.md.template +2 -0
- package/templates/stubs/commands/trace.md.template +2 -0
- package/templates/stubs/commands/visualize.md.template +2 -0
- package/templates/stubs/commands/workflow.md.template +2 -0
- package/templates/synchronizations/archive/adaptive-learning.yaml.template +595 -0
- package/templates/synchronizations/archive/code-understanding-flow.yaml.template +533 -0
- package/templates/synchronizations/archive/collaboration-flow.yaml.template +521 -0
- package/templates/synchronizations/archive/context-folding.yaml.template +353 -0
- package/templates/synchronizations/archive/dead-letter-queue.yaml.template +530 -0
- package/templates/synchronizations/archive/documentation-flow.yaml.template +560 -0
- package/templates/synchronizations/archive/error-recovery-flow.yaml.template +1031 -0
- package/templates/synchronizations/archive/execution-loop.yaml.template +336 -0
- package/templates/synchronizations/archive/exploration-flow.yaml.template +369 -0
- package/templates/synchronizations/archive/feature-development.yaml.template +2145 -0
- package/templates/synchronizations/archive/learning-loop.yaml.template +657 -0
- package/templates/synchronizations/archive/multi-verify.yaml.template +346 -0
- package/templates/synchronizations/archive/planning-flow.yaml.template +312 -0
- package/templates/synchronizations/archive/retrospective-flow.yaml.template +277 -0
- package/templates/synchronizations/archive/security-flow.yaml.template +477 -0
- package/templates/synchronizations/archive/slo-monitoring.yaml.template +209 -0
- package/templates/synchronizations/archive/task-routing.yaml.template +489 -0
- package/templates/synchronizations/archive/test-driven.yaml.template +291 -0
- package/templates/synchronizations/archive/tool-routing.yaml.template +326 -0
- package/templates/synchronizations/archive/verification-flow.yaml.template +407 -0
- package/templates/synchronizations/error-policy.yaml.template +188 -0
- package/templates/synchronizations/main.sync.template +319 -0
- package/templates/synchronizations/slo-registry.yaml.template +229 -0
- package/templates/tasks/task.yaml.template +67 -0
- package/templates/zen-profile.yaml.template +14 -0
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Incremental Context Loading
|
|
3
|
+
description: Load only necessary context using MCP-first approach for 70% additional token savings
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
trigger_keywords: [incremental, loading, context, mcp, serena, symbols, overview]
|
|
6
|
+
author: Zen Architecture
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Incremental Context Loading - Expert Skill
|
|
10
|
+
|
|
11
|
+
Load context progressively using MCP tools to minimize token usage while maintaining full understanding.
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Incremental loading provides:
|
|
16
|
+
- **70% additional context reduction**: On top of Phase 1's 85% savings
|
|
17
|
+
- **Faster concept execution**: Less context to process means faster LLM responses
|
|
18
|
+
- **Targeted exploration**: Find exactly what you need without reading everything
|
|
19
|
+
- **Cost optimization**: Pay only for context you actually use
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
Use incremental loading:
|
|
24
|
+
- ✅ **Always** when exploring unfamiliar code
|
|
25
|
+
- ✅ When surveying codebase structure
|
|
26
|
+
- ✅ When finding similar implementations
|
|
27
|
+
- ✅ When locating specific symbols to modify
|
|
28
|
+
- ✅ Before reading any full files
|
|
29
|
+
|
|
30
|
+
## Loading Strategy
|
|
31
|
+
|
|
32
|
+
### Stage 1: Overview (100 tokens)
|
|
33
|
+
|
|
34
|
+
**Goal**: Understand high-level structure without reading code
|
|
35
|
+
|
|
36
|
+
**Use MCP Tools**:
|
|
37
|
+
```yaml
|
|
38
|
+
# Get file structure
|
|
39
|
+
mcp__serena__get_symbols_overview:
|
|
40
|
+
relative_path: "src/auth/oauth.ts"
|
|
41
|
+
max_answer_chars: 5000
|
|
42
|
+
|
|
43
|
+
# Returns: Symbol names, types, signatures
|
|
44
|
+
# Cost: ~100 tokens (vs 5000 for full file)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**What You Get**:
|
|
48
|
+
- Class names and inheritance
|
|
49
|
+
- Method signatures (no bodies)
|
|
50
|
+
- Import statements
|
|
51
|
+
- High-level organization
|
|
52
|
+
|
|
53
|
+
**When This Is Enough**:
|
|
54
|
+
- Architecture: Understanding component structure
|
|
55
|
+
- Quality Review: Checking public API consistency
|
|
56
|
+
- /sync: Evaluating if file is relevant
|
|
57
|
+
|
|
58
|
+
### Stage 2: Targeted Symbols (500 tokens)
|
|
59
|
+
|
|
60
|
+
**Goal**: Load specific symbols you need to understand or modify
|
|
61
|
+
|
|
62
|
+
**Use MCP Tools**:
|
|
63
|
+
```yaml
|
|
64
|
+
# Find specific symbol
|
|
65
|
+
mcp__serena__find_symbol:
|
|
66
|
+
name_path: "OAuthController/authenticate"
|
|
67
|
+
relative_path: "src/auth/oauth.ts"
|
|
68
|
+
include_body: true
|
|
69
|
+
depth: 0
|
|
70
|
+
|
|
71
|
+
# Returns: Just the authenticate method
|
|
72
|
+
# Cost: ~500 tokens (vs 5000 for full file)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**What You Get**:
|
|
76
|
+
- Complete implementation of target symbol
|
|
77
|
+
- No unrelated code
|
|
78
|
+
- Enough context for understanding/modification
|
|
79
|
+
|
|
80
|
+
**When This Is Enough**:
|
|
81
|
+
- Implementation: Modifying specific methods
|
|
82
|
+
- Quality Review: Checking specific functions
|
|
83
|
+
- Debugging: Understanding failure points
|
|
84
|
+
|
|
85
|
+
### Stage 3: Full Context (2000+ tokens)
|
|
86
|
+
|
|
87
|
+
**Goal**: Load complete file when symbol-level access insufficient
|
|
88
|
+
|
|
89
|
+
**Use Standard Tools**:
|
|
90
|
+
```yaml
|
|
91
|
+
# Read full file
|
|
92
|
+
Read:
|
|
93
|
+
file_path: "src/auth/oauth.ts"
|
|
94
|
+
|
|
95
|
+
# Cost: 2000-5000 tokens
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**When Full Context Is Needed**:
|
|
99
|
+
- Major refactoring across entire file
|
|
100
|
+
- Understanding complex interactions between many symbols
|
|
101
|
+
- Creating new files (no existing symbols to target)
|
|
102
|
+
|
|
103
|
+
## MCP-First Approach
|
|
104
|
+
|
|
105
|
+
### Always Start With MCP
|
|
106
|
+
|
|
107
|
+
**Golden Rule**: Never read a full file before checking if MCP tools can answer your question.
|
|
108
|
+
|
|
109
|
+
**MCP Tool Priority**:
|
|
110
|
+
1. **get_symbols_overview** - High-level structure (cheapest)
|
|
111
|
+
2. **find_symbol** - Specific code (targeted)
|
|
112
|
+
3. **search_for_pattern** - Similar implementations (focused)
|
|
113
|
+
4. **find_referencing_symbols** - Dependencies (relationship mapping)
|
|
114
|
+
5. **Read** - Full file (last resort, most expensive)
|
|
115
|
+
|
|
116
|
+
### Example: Architecture Exploration
|
|
117
|
+
|
|
118
|
+
**❌ Old Way (Expensive)**:
|
|
119
|
+
```yaml
|
|
120
|
+
# Read 10 full files to understand auth system
|
|
121
|
+
Read: src/auth/oauth.ts # 5000 tokens
|
|
122
|
+
Read: src/auth/session.ts # 4500 tokens
|
|
123
|
+
Read: src/auth/providers.ts # 3000 tokens
|
|
124
|
+
...
|
|
125
|
+
Total: 50,000 tokens
|
|
126
|
+
Cost: $0.15 (Sonnet)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**✅ New Way (MCP-First)**:
|
|
130
|
+
```yaml
|
|
131
|
+
# Get overview of each file
|
|
132
|
+
get_symbols_overview: src/auth/oauth.ts # 100 tokens
|
|
133
|
+
get_symbols_overview: src/auth/session.ts # 100 tokens
|
|
134
|
+
get_symbols_overview: src/auth/providers.ts # 80 tokens
|
|
135
|
+
...
|
|
136
|
+
Total: 1,000 tokens
|
|
137
|
+
Cost: $0.003 (Sonnet)
|
|
138
|
+
|
|
139
|
+
Savings: 98% ($0.147 saved)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Progressive Context Building
|
|
143
|
+
|
|
144
|
+
### Pattern: Build Context in Layers
|
|
145
|
+
|
|
146
|
+
**Layer 1: Discovery** (100-200 tokens)
|
|
147
|
+
```yaml
|
|
148
|
+
1. Use get_symbols_overview for all relevant files
|
|
149
|
+
2. Identify key components and their relationships
|
|
150
|
+
3. Note which symbols need deeper investigation
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Layer 2: Focused Exploration** (500-1000 tokens)
|
|
154
|
+
```yaml
|
|
155
|
+
4. Use find_symbol for identified key symbols
|
|
156
|
+
5. Include bodies only for symbols you'll modify
|
|
157
|
+
6. Use depth=1 to see child symbols without bodies
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Layer 3: Deep Dive** (2000+ tokens, if needed)
|
|
161
|
+
```yaml
|
|
162
|
+
7. Read full files only for complex modifications
|
|
163
|
+
8. At this point you know exactly what you're looking for
|
|
164
|
+
9. Prune earlier context that's no longer relevant
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Example: Implementation Task
|
|
168
|
+
|
|
169
|
+
**Task**: Add Google OAuth provider to existing auth system
|
|
170
|
+
|
|
171
|
+
**Layer 1: Discovery**
|
|
172
|
+
```yaml
|
|
173
|
+
# What exists?
|
|
174
|
+
get_symbols_overview: src/auth/oauth.ts
|
|
175
|
+
→ OAuthController class
|
|
176
|
+
→ authenticateWithProvider method
|
|
177
|
+
→ getCurrentProviders method
|
|
178
|
+
|
|
179
|
+
get_symbols_overview: src/auth/providers.ts
|
|
180
|
+
→ GitHubProvider class
|
|
181
|
+
→ BaseProvider interface
|
|
182
|
+
|
|
183
|
+
Conclusion: Need to add GoogleProvider similar to GitHubProvider
|
|
184
|
+
Tokens: 200
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Layer 2: Focused Exploration**
|
|
188
|
+
```yaml
|
|
189
|
+
# How does GitHubProvider work?
|
|
190
|
+
find_symbol:
|
|
191
|
+
name_path: "GitHubProvider"
|
|
192
|
+
relative_path: "src/auth/providers.ts"
|
|
193
|
+
include_body: true
|
|
194
|
+
→ Complete implementation (150 lines)
|
|
195
|
+
|
|
196
|
+
# What's the interface?
|
|
197
|
+
find_symbol:
|
|
198
|
+
name_path: "BaseProvider"
|
|
199
|
+
relative_path: "src/auth/providers.ts"
|
|
200
|
+
include_body: true
|
|
201
|
+
→ Interface definition (20 lines)
|
|
202
|
+
|
|
203
|
+
Conclusion: Know exactly what to implement for GoogleProvider
|
|
204
|
+
Tokens: 500
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Layer 3: Implementation** (may not need full context)
|
|
208
|
+
```yaml
|
|
209
|
+
# Create GoogleProvider using GitHubProvider as template
|
|
210
|
+
# Use replace_symbol_body or insert_after_symbol
|
|
211
|
+
# No need to read full file!
|
|
212
|
+
|
|
213
|
+
Tokens: 100 (just for writing)
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Total Tokens**: 800 (vs 10,000+ with full-file approach)
|
|
217
|
+
**Savings**: 92%
|
|
218
|
+
|
|
219
|
+
## Context Pruning
|
|
220
|
+
|
|
221
|
+
### Remove Irrelevant Context
|
|
222
|
+
|
|
223
|
+
**After each stage, prune context**:
|
|
224
|
+
```yaml
|
|
225
|
+
Stage 1: Keep only relevant file paths
|
|
226
|
+
- Drop files not related to task
|
|
227
|
+
- Keep list of interesting symbols
|
|
228
|
+
|
|
229
|
+
Stage 2: Keep only symbols being modified
|
|
230
|
+
- Drop exploration-only symbols
|
|
231
|
+
- Keep dependencies and modification targets
|
|
232
|
+
|
|
233
|
+
Stage 3: Keep only current work area
|
|
234
|
+
- Drop symbols from completed work
|
|
235
|
+
- Keep immediate context for current modification
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Example Pruning
|
|
239
|
+
|
|
240
|
+
**After Layer 1**:
|
|
241
|
+
```yaml
|
|
242
|
+
Discovered 20 files in auth system
|
|
243
|
+
Relevant: 3 files (oauth.ts, providers.ts, session.ts)
|
|
244
|
+
Pruned: 17 files
|
|
245
|
+
Savings: 85% of initial discovery cost
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**After Layer 2**:
|
|
249
|
+
```yaml
|
|
250
|
+
Explored 8 symbols across 3 files
|
|
251
|
+
Relevant: 2 symbols (GitHubProvider, BaseProvider)
|
|
252
|
+
Pruned: 6 symbols
|
|
253
|
+
Savings: 75% of exploration cost
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Integration with Concepts
|
|
257
|
+
|
|
258
|
+
### Architecture Concept
|
|
259
|
+
|
|
260
|
+
**Add to architecture.md.template**:
|
|
261
|
+
```markdown
|
|
262
|
+
## Step 1: Survey Existing Architecture
|
|
263
|
+
|
|
264
|
+
**Use MCP tools to build understanding**:
|
|
265
|
+
|
|
266
|
+
1. **Identify relevant directories**
|
|
267
|
+
```bash
|
|
268
|
+
mcp__serena__list_dir:
|
|
269
|
+
relative_path: "src"
|
|
270
|
+
recursive: false
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
2. **Get overview of key files**
|
|
274
|
+
```bash
|
|
275
|
+
# For each relevant file
|
|
276
|
+
mcp__serena__get_symbols_overview:
|
|
277
|
+
relative_path: "{file}"
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
3. **Explore similar implementations**
|
|
281
|
+
```bash
|
|
282
|
+
mcp__serena__search_for_pattern:
|
|
283
|
+
substring_pattern: "{pattern}"
|
|
284
|
+
relative_path: "src"
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Do NOT read full files yet!**
|
|
288
|
+
|
|
289
|
+
Use overviews to understand:
|
|
290
|
+
- Component boundaries
|
|
291
|
+
- Existing patterns
|
|
292
|
+
- Integration points
|
|
293
|
+
- Similar features
|
|
294
|
+
|
|
295
|
+
Only use Read tool if MCP tools insufficient.
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Implementation Concept
|
|
299
|
+
|
|
300
|
+
**Add to implementation.md.template**:
|
|
301
|
+
```markdown
|
|
302
|
+
## Step 1: Locate Modification Targets
|
|
303
|
+
|
|
304
|
+
**Use MCP tools for targeted exploration**:
|
|
305
|
+
|
|
306
|
+
1. **Find symbols to modify**
|
|
307
|
+
```bash
|
|
308
|
+
mcp__serena__find_symbol:
|
|
309
|
+
name_path: "{symbol}"
|
|
310
|
+
relative_path: "{file}"
|
|
311
|
+
include_body: false # Start without body
|
|
312
|
+
depth: 1 # See children
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
2. **Load only necessary symbol bodies**
|
|
316
|
+
```bash
|
|
317
|
+
mcp__serena__find_symbol:
|
|
318
|
+
name_path: "{specific_symbol}"
|
|
319
|
+
include_body: true # Now get the code
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
3. **Find references before modifying**
|
|
323
|
+
```bash
|
|
324
|
+
mcp__serena__find_referencing_symbols:
|
|
325
|
+
name_path: "{symbol}"
|
|
326
|
+
relative_path: "{file}"
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
**Progressive loading**:
|
|
330
|
+
- Start: Symbol names only
|
|
331
|
+
- Then: Signatures and structure
|
|
332
|
+
- Finally: Bodies for modification
|
|
333
|
+
|
|
334
|
+
This approach uses 90% fewer tokens than reading full files.
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Quality Review Concept
|
|
338
|
+
|
|
339
|
+
**Add to quality.md.template (review)**:
|
|
340
|
+
```markdown
|
|
341
|
+
## Step 1: Identify Changed Symbols
|
|
342
|
+
|
|
343
|
+
**Use MCP tools to target review**:
|
|
344
|
+
|
|
345
|
+
1. **Get overview of changed files**
|
|
346
|
+
```bash
|
|
347
|
+
# For each file in implementation.files_changed
|
|
348
|
+
mcp__serena__get_symbols_overview:
|
|
349
|
+
relative_path: "{file}"
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
2. **Load only changed/new symbols**
|
|
353
|
+
```bash
|
|
354
|
+
mcp__serena__find_symbol:
|
|
355
|
+
name_path: "{changed_symbol}"
|
|
356
|
+
include_body: true
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
3. **Check dependencies**
|
|
360
|
+
```bash
|
|
361
|
+
mcp__serena__find_referencing_symbols:
|
|
362
|
+
name_path: "{changed_symbol}"
|
|
363
|
+
relative_path: "{file}"
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Review focus**:
|
|
367
|
+
- Load only what changed
|
|
368
|
+
- Check references to ensure compatibility
|
|
369
|
+
- Skip unchanged code
|
|
370
|
+
|
|
371
|
+
This targets review effort precisely where needed.
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
## Performance Impact
|
|
375
|
+
|
|
376
|
+
### Token Reduction Examples
|
|
377
|
+
|
|
378
|
+
**Architecture Exploration**:
|
|
379
|
+
- Full-file approach: 50,000 tokens
|
|
380
|
+
- MCP-first approach: 1,000 tokens
|
|
381
|
+
- **Savings: 98% (49,000 tokens)**
|
|
382
|
+
|
|
383
|
+
**Implementation Task**:
|
|
384
|
+
- Full-file approach: 10,000 tokens
|
|
385
|
+
- Incremental loading: 800 tokens
|
|
386
|
+
- **Savings: 92% (9,200 tokens)**
|
|
387
|
+
|
|
388
|
+
**Quality Review**:
|
|
389
|
+
- Full-file approach: 15,000 tokens
|
|
390
|
+
- Targeted symbols: 2,000 tokens
|
|
391
|
+
- **Savings: 87% (13,000 tokens)**
|
|
392
|
+
|
|
393
|
+
### Cost Savings
|
|
394
|
+
|
|
395
|
+
**Per-Architecture**:
|
|
396
|
+
- Before: $0.15 (50K tokens @ Sonnet)
|
|
397
|
+
- After: $0.003 (1K tokens @ Sonnet)
|
|
398
|
+
- **Savings: $0.147 (98%)**
|
|
399
|
+
|
|
400
|
+
**Per-Feature Workflow**:
|
|
401
|
+
- Before: $0.25 (architecture + implementation + review)
|
|
402
|
+
- After: $0.01 (incremental loading throughout)
|
|
403
|
+
- **Savings: $0.24 (96%)**
|
|
404
|
+
|
|
405
|
+
**Annual** (100 features):
|
|
406
|
+
- Before: $25
|
|
407
|
+
- After: $1
|
|
408
|
+
- **Savings: $24**
|
|
409
|
+
|
|
410
|
+
### Speed Improvements
|
|
411
|
+
|
|
412
|
+
**Faster LLM Responses**:
|
|
413
|
+
- Less context → faster processing
|
|
414
|
+
- Typical improvement: 30-40% faster
|
|
415
|
+
- Architecture: 8min → 5min
|
|
416
|
+
- Implementation: 5min → 3min
|
|
417
|
+
|
|
418
|
+
**Reduced Latency**:
|
|
419
|
+
- Fewer tokens to transmit
|
|
420
|
+
- Faster first token
|
|
421
|
+
- Better user experience
|
|
422
|
+
|
|
423
|
+
## Best Practices
|
|
424
|
+
|
|
425
|
+
### 1. Always Start with Overview
|
|
426
|
+
|
|
427
|
+
```yaml
|
|
428
|
+
# Before any full file read
|
|
429
|
+
get_symbols_overview: {file}
|
|
430
|
+
|
|
431
|
+
# Understand structure first
|
|
432
|
+
# Then decide if you need more
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### 2. Use Depth Parameter Wisely
|
|
436
|
+
|
|
437
|
+
```yaml
|
|
438
|
+
# See class with method signatures (no bodies)
|
|
439
|
+
find_symbol:
|
|
440
|
+
name_path: "MyClass"
|
|
441
|
+
include_body: false
|
|
442
|
+
depth: 1 # Shows methods but not their code
|
|
443
|
+
|
|
444
|
+
# Then load specific method
|
|
445
|
+
find_symbol:
|
|
446
|
+
name_path: "MyClass/myMethod"
|
|
447
|
+
include_body: true
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### 3. Search Before Reading
|
|
451
|
+
|
|
452
|
+
```yaml
|
|
453
|
+
# Find similar patterns first
|
|
454
|
+
search_for_pattern:
|
|
455
|
+
substring_pattern: "class.*Provider"
|
|
456
|
+
relative_path: "src/auth"
|
|
457
|
+
|
|
458
|
+
# Then read only the relevant ones
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### 4. Prune Aggressively
|
|
462
|
+
|
|
463
|
+
```yaml
|
|
464
|
+
# After each stage, ask:
|
|
465
|
+
# - Do I still need this context?
|
|
466
|
+
# - Is this relevant to current task?
|
|
467
|
+
# - Can I drop this to save tokens?
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
### 5. Track Your Savings
|
|
471
|
+
|
|
472
|
+
```yaml
|
|
473
|
+
# Before: Estimate full-file token cost
|
|
474
|
+
# After: Calculate actual tokens used
|
|
475
|
+
# Report: Show savings achieved
|
|
476
|
+
|
|
477
|
+
Example:
|
|
478
|
+
"Used incremental loading: 1,200 tokens (vs 15,000 traditional)"
|
|
479
|
+
"Savings: 92% ($0.042 saved)"
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
## Common Patterns
|
|
483
|
+
|
|
484
|
+
### Pattern 1: File Discovery
|
|
485
|
+
|
|
486
|
+
```yaml
|
|
487
|
+
# List directory
|
|
488
|
+
list_dir:
|
|
489
|
+
relative_path: "src/auth"
|
|
490
|
+
recursive: true
|
|
491
|
+
|
|
492
|
+
# Get overview of each file
|
|
493
|
+
for file in files:
|
|
494
|
+
get_symbols_overview: file
|
|
495
|
+
|
|
496
|
+
# Total: 500-1000 tokens (vs 50,000 full read)
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### Pattern 2: Symbol Modification
|
|
500
|
+
|
|
501
|
+
```yaml
|
|
502
|
+
# Find symbol without body
|
|
503
|
+
find_symbol:
|
|
504
|
+
name_path: "MyClass/myMethod"
|
|
505
|
+
include_body: false
|
|
506
|
+
|
|
507
|
+
# Check if this is the right one
|
|
508
|
+
# Then load body
|
|
509
|
+
find_symbol:
|
|
510
|
+
name_path: "MyClass/myMethod"
|
|
511
|
+
include_body: true
|
|
512
|
+
|
|
513
|
+
# Modify using replace_symbol_body
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Pattern 3: Dependency Analysis
|
|
517
|
+
|
|
518
|
+
```yaml
|
|
519
|
+
# Find symbol
|
|
520
|
+
find_symbol:
|
|
521
|
+
name_path: "MyClass/myMethod"
|
|
522
|
+
include_body: true
|
|
523
|
+
|
|
524
|
+
# Find what depends on it
|
|
525
|
+
find_referencing_symbols:
|
|
526
|
+
name_path: "MyClass/myMethod"
|
|
527
|
+
relative_path: "{file}"
|
|
528
|
+
|
|
529
|
+
# Load only references that matter
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
## Troubleshooting
|
|
533
|
+
|
|
534
|
+
### Issue: MCP Tool Returns Too Much
|
|
535
|
+
|
|
536
|
+
**Problem**: get_symbols_overview returns huge output
|
|
537
|
+
**Solution**: Use max_answer_chars parameter
|
|
538
|
+
```yaml
|
|
539
|
+
get_symbols_overview:
|
|
540
|
+
relative_path: "{file}"
|
|
541
|
+
max_answer_chars: 5000 # Limit output
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
### Issue: Can't Find Symbol
|
|
545
|
+
|
|
546
|
+
**Problem**: find_symbol doesn't match expected symbol
|
|
547
|
+
**Solution**: Use search_for_pattern first
|
|
548
|
+
```yaml
|
|
549
|
+
search_for_pattern:
|
|
550
|
+
substring_pattern: "{approximate_name}"
|
|
551
|
+
relative_path: "{file}"
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
### Issue: Need Full Context After All
|
|
555
|
+
|
|
556
|
+
**Problem**: Incremental loading insufficient for complex refactoring
|
|
557
|
+
**Solution**: That's okay! Read full file when needed
|
|
558
|
+
```yaml
|
|
559
|
+
# You tried MCP first (good!)
|
|
560
|
+
# Now read full context (justified!)
|
|
561
|
+
Read:
|
|
562
|
+
file_path: "{file}"
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
## Related Documents
|
|
566
|
+
|
|
567
|
+
- **MCP Integration** (Phase 1 Day 1-2) - MCP tools documentation
|
|
568
|
+
- **architecture.md.template** - Updated with incremental loading
|
|
569
|
+
- **implementation.md.template** - Updated with targeted symbol loading
|
|
570
|
+
- **ZEN_PHASE2_PROGRESS.md** - Week 1 Day 1-3 tracking
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
**Use this skill when**: Exploring codebases, implementing features, reviewing code, or any task that requires understanding existing code. Always start with MCP tools before reading full files.
|