causantic 0.2.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/LICENSE +19 -0
- package/README.md +332 -0
- package/config.schema.json +254 -0
- package/dist/cli/commands/archive.d.ts +4 -0
- package/dist/cli/commands/archive.d.ts.map +1 -0
- package/dist/cli/commands/archive.js +76 -0
- package/dist/cli/commands/archive.js.map +1 -0
- package/dist/cli/commands/benchmark-collection.d.ts +8 -0
- package/dist/cli/commands/benchmark-collection.d.ts.map +1 -0
- package/dist/cli/commands/benchmark-collection.js +146 -0
- package/dist/cli/commands/benchmark-collection.js.map +1 -0
- package/dist/cli/commands/config.d.ts +3 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +69 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +3 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -0
- package/dist/cli/commands/dashboard.js +12 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/encryption.d.ts +3 -0
- package/dist/cli/commands/encryption.d.ts.map +1 -0
- package/dist/cli/commands/encryption.js +207 -0
- package/dist/cli/commands/encryption.js.map +1 -0
- package/dist/cli/commands/hook.d.ts +3 -0
- package/dist/cli/commands/hook.d.ts.map +1 -0
- package/dist/cli/commands/hook.js +35 -0
- package/dist/cli/commands/hook.js.map +1 -0
- package/dist/cli/commands/ingest.d.ts +4 -0
- package/dist/cli/commands/ingest.d.ts.map +1 -0
- package/dist/cli/commands/ingest.js +31 -0
- package/dist/cli/commands/ingest.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +680 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/maintenance.d.ts +3 -0
- package/dist/cli/commands/maintenance.d.ts.map +1 -0
- package/dist/cli/commands/maintenance.js +67 -0
- package/dist/cli/commands/maintenance.js.map +1 -0
- package/dist/cli/commands/search.d.ts +3 -0
- package/dist/cli/commands/search.d.ts.map +1 -0
- package/dist/cli/commands/search.js +16 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +3 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +19 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +4 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +49 -0
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/commands/uninstall.d.ts +3 -0
- package/dist/cli/commands/uninstall.d.ts.map +1 -0
- package/dist/cli/commands/uninstall.js +10 -0
- package/dist/cli/commands/uninstall.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +86 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/skill-templates.d.ts +19 -0
- package/dist/cli/skill-templates.d.ts.map +1 -0
- package/dist/cli/skill-templates.js +1128 -0
- package/dist/cli/skill-templates.js.map +1 -0
- package/dist/cli/types.d.ts +10 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +5 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/uninstall.d.ts +66 -0
- package/dist/cli/uninstall.d.ts.map +1 -0
- package/dist/cli/uninstall.js +490 -0
- package/dist/cli/uninstall.js.map +1 -0
- package/dist/cli/utils.d.ts +26 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +105 -0
- package/dist/cli/utils.js.map +1 -0
- package/dist/clusters/cluster-manager.d.ts +96 -0
- package/dist/clusters/cluster-manager.d.ts.map +1 -0
- package/dist/clusters/cluster-manager.js +321 -0
- package/dist/clusters/cluster-manager.js.map +1 -0
- package/dist/clusters/cluster-refresh.d.ts +56 -0
- package/dist/clusters/cluster-refresh.d.ts.map +1 -0
- package/dist/clusters/cluster-refresh.js +187 -0
- package/dist/clusters/cluster-refresh.js.map +1 -0
- package/dist/clusters/hdbscan/cluster-extraction.d.ts +26 -0
- package/dist/clusters/hdbscan/cluster-extraction.d.ts.map +1 -0
- package/dist/clusters/hdbscan/cluster-extraction.js +232 -0
- package/dist/clusters/hdbscan/cluster-extraction.js.map +1 -0
- package/dist/clusters/hdbscan/core-distance-worker.d.ts +6 -0
- package/dist/clusters/hdbscan/core-distance-worker.d.ts.map +1 -0
- package/dist/clusters/hdbscan/core-distance-worker.js +54 -0
- package/dist/clusters/hdbscan/core-distance-worker.js.map +1 -0
- package/dist/clusters/hdbscan/core-distance.d.ts +26 -0
- package/dist/clusters/hdbscan/core-distance.d.ts.map +1 -0
- package/dist/clusters/hdbscan/core-distance.js +94 -0
- package/dist/clusters/hdbscan/core-distance.js.map +1 -0
- package/dist/clusters/hdbscan/distance-cache.d.ts +46 -0
- package/dist/clusters/hdbscan/distance-cache.d.ts.map +1 -0
- package/dist/clusters/hdbscan/distance-cache.js +84 -0
- package/dist/clusters/hdbscan/distance-cache.js.map +1 -0
- package/dist/clusters/hdbscan/hierarchy.d.ts +34 -0
- package/dist/clusters/hdbscan/hierarchy.d.ts.map +1 -0
- package/dist/clusters/hdbscan/hierarchy.js +442 -0
- package/dist/clusters/hdbscan/hierarchy.js.map +1 -0
- package/dist/clusters/hdbscan/incremental.d.ts +30 -0
- package/dist/clusters/hdbscan/incremental.d.ts.map +1 -0
- package/dist/clusters/hdbscan/incremental.js +130 -0
- package/dist/clusters/hdbscan/incremental.js.map +1 -0
- package/dist/clusters/hdbscan/kd-tree.d.ts +51 -0
- package/dist/clusters/hdbscan/kd-tree.d.ts.map +1 -0
- package/dist/clusters/hdbscan/kd-tree.js +130 -0
- package/dist/clusters/hdbscan/kd-tree.js.map +1 -0
- package/dist/clusters/hdbscan/min-heap.d.ts +62 -0
- package/dist/clusters/hdbscan/min-heap.d.ts.map +1 -0
- package/dist/clusters/hdbscan/min-heap.js +139 -0
- package/dist/clusters/hdbscan/min-heap.js.map +1 -0
- package/dist/clusters/hdbscan/mst.d.ts +20 -0
- package/dist/clusters/hdbscan/mst.d.ts.map +1 -0
- package/dist/clusters/hdbscan/mst.js +77 -0
- package/dist/clusters/hdbscan/mst.js.map +1 -0
- package/dist/clusters/hdbscan/probabilities.d.ts +37 -0
- package/dist/clusters/hdbscan/probabilities.d.ts.map +1 -0
- package/dist/clusters/hdbscan/probabilities.js +149 -0
- package/dist/clusters/hdbscan/probabilities.js.map +1 -0
- package/dist/clusters/hdbscan/types.d.ts +123 -0
- package/dist/clusters/hdbscan/types.d.ts.map +1 -0
- package/dist/clusters/hdbscan/types.js +5 -0
- package/dist/clusters/hdbscan/types.js.map +1 -0
- package/dist/clusters/hdbscan/union-find.d.ts +51 -0
- package/dist/clusters/hdbscan/union-find.d.ts.map +1 -0
- package/dist/clusters/hdbscan/union-find.js +115 -0
- package/dist/clusters/hdbscan/union-find.js.map +1 -0
- package/dist/clusters/hdbscan.d.ts +71 -0
- package/dist/clusters/hdbscan.d.ts.map +1 -0
- package/dist/clusters/hdbscan.js +283 -0
- package/dist/clusters/hdbscan.js.map +1 -0
- package/dist/clusters/index.d.ts +8 -0
- package/dist/clusters/index.d.ts.map +1 -0
- package/dist/clusters/index.js +8 -0
- package/dist/clusters/index.js.map +1 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +6 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +105 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +339 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/memory-config.d.ts +109 -0
- package/dist/config/memory-config.d.ts.map +1 -0
- package/dist/config/memory-config.js +182 -0
- package/dist/config/memory-config.js.map +1 -0
- package/dist/core/benchmark-types.d.ts +62 -0
- package/dist/core/benchmark-types.d.ts.map +1 -0
- package/dist/core/benchmark-types.js +11 -0
- package/dist/core/benchmark-types.js.map +1 -0
- package/dist/core/decay-types.d.ts +111 -0
- package/dist/core/decay-types.d.ts.map +1 -0
- package/dist/core/decay-types.js +30 -0
- package/dist/core/decay-types.js.map +1 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/lexical-features.d.ts +34 -0
- package/dist/core/lexical-features.d.ts.map +1 -0
- package/dist/core/lexical-features.js +155 -0
- package/dist/core/lexical-features.js.map +1 -0
- package/dist/dashboard/client/assets/index-CMUKy4f9.css +1 -0
- package/dist/dashboard/client/assets/index-esv8TpCN.js +168 -0
- package/dist/dashboard/client/index.html +14 -0
- package/dist/dashboard/middleware/async-handler.d.ts +11 -0
- package/dist/dashboard/middleware/async-handler.d.ts.map +1 -0
- package/dist/dashboard/middleware/async-handler.js +12 -0
- package/dist/dashboard/middleware/async-handler.js.map +1 -0
- package/dist/dashboard/middleware/error-handler.d.ts +9 -0
- package/dist/dashboard/middleware/error-handler.d.ts.map +1 -0
- package/dist/dashboard/middleware/error-handler.js +14 -0
- package/dist/dashboard/middleware/error-handler.js.map +1 -0
- package/dist/dashboard/routes/benchmark-collection.d.ts +11 -0
- package/dist/dashboard/routes/benchmark-collection.d.ts.map +1 -0
- package/dist/dashboard/routes/benchmark-collection.js +49 -0
- package/dist/dashboard/routes/benchmark-collection.js.map +1 -0
- package/dist/dashboard/routes/chunks.d.ts +3 -0
- package/dist/dashboard/routes/chunks.d.ts.map +1 -0
- package/dist/dashboard/routes/chunks.js +25 -0
- package/dist/dashboard/routes/chunks.js.map +1 -0
- package/dist/dashboard/routes/clusters.d.ts +3 -0
- package/dist/dashboard/routes/clusters.d.ts.map +1 -0
- package/dist/dashboard/routes/clusters.js +28 -0
- package/dist/dashboard/routes/clusters.js.map +1 -0
- package/dist/dashboard/routes/edges.d.ts +3 -0
- package/dist/dashboard/routes/edges.d.ts.map +1 -0
- package/dist/dashboard/routes/edges.js +32 -0
- package/dist/dashboard/routes/edges.js.map +1 -0
- package/dist/dashboard/routes/graph.d.ts +3 -0
- package/dist/dashboard/routes/graph.d.ts.map +1 -0
- package/dist/dashboard/routes/graph.js +158 -0
- package/dist/dashboard/routes/graph.js.map +1 -0
- package/dist/dashboard/routes/projects.d.ts +3 -0
- package/dist/dashboard/routes/projects.d.ts.map +1 -0
- package/dist/dashboard/routes/projects.js +9 -0
- package/dist/dashboard/routes/projects.js.map +1 -0
- package/dist/dashboard/routes/search.d.ts +3 -0
- package/dist/dashboard/routes/search.d.ts.map +1 -0
- package/dist/dashboard/routes/search.js +105 -0
- package/dist/dashboard/routes/search.js.map +1 -0
- package/dist/dashboard/routes/sessions.d.ts +3 -0
- package/dist/dashboard/routes/sessions.d.ts.map +1 -0
- package/dist/dashboard/routes/sessions.js +16 -0
- package/dist/dashboard/routes/sessions.js.map +1 -0
- package/dist/dashboard/routes/stats.d.ts +3 -0
- package/dist/dashboard/routes/stats.d.ts.map +1 -0
- package/dist/dashboard/routes/stats.js +38 -0
- package/dist/dashboard/routes/stats.js.map +1 -0
- package/dist/dashboard/server.d.ts +3 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +85 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/eval/annotation-schema.d.ts +41 -0
- package/dist/eval/annotation-schema.d.ts.map +1 -0
- package/dist/eval/annotation-schema.js +171 -0
- package/dist/eval/annotation-schema.js.map +1 -0
- package/dist/eval/benchmark-runner.d.ts +15 -0
- package/dist/eval/benchmark-runner.d.ts.map +1 -0
- package/dist/eval/benchmark-runner.js +93 -0
- package/dist/eval/benchmark-runner.js.map +1 -0
- package/dist/eval/cluster-evaluator.d.ts +39 -0
- package/dist/eval/cluster-evaluator.d.ts.map +1 -0
- package/dist/eval/cluster-evaluator.js +51 -0
- package/dist/eval/cluster-evaluator.js.map +1 -0
- package/dist/eval/code-nl-alignment.d.ts +25 -0
- package/dist/eval/code-nl-alignment.d.ts.map +1 -0
- package/dist/eval/code-nl-alignment.js +49 -0
- package/dist/eval/code-nl-alignment.js.map +1 -0
- package/dist/eval/collection-benchmark/graph-value.d.ts +16 -0
- package/dist/eval/collection-benchmark/graph-value.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/graph-value.js +162 -0
- package/dist/eval/collection-benchmark/graph-value.js.map +1 -0
- package/dist/eval/collection-benchmark/health.d.ts +12 -0
- package/dist/eval/collection-benchmark/health.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/health.js +246 -0
- package/dist/eval/collection-benchmark/health.js.map +1 -0
- package/dist/eval/collection-benchmark/history.d.ts +27 -0
- package/dist/eval/collection-benchmark/history.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/history.js +134 -0
- package/dist/eval/collection-benchmark/history.js.map +1 -0
- package/dist/eval/collection-benchmark/latency.d.ts +16 -0
- package/dist/eval/collection-benchmark/latency.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/latency.js +115 -0
- package/dist/eval/collection-benchmark/latency.js.map +1 -0
- package/dist/eval/collection-benchmark/reporter.d.ts +18 -0
- package/dist/eval/collection-benchmark/reporter.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/reporter.js +244 -0
- package/dist/eval/collection-benchmark/reporter.js.map +1 -0
- package/dist/eval/collection-benchmark/retrieval.d.ts +15 -0
- package/dist/eval/collection-benchmark/retrieval.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/retrieval.js +203 -0
- package/dist/eval/collection-benchmark/retrieval.js.map +1 -0
- package/dist/eval/collection-benchmark/runner.d.ts +20 -0
- package/dist/eval/collection-benchmark/runner.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/runner.js +189 -0
- package/dist/eval/collection-benchmark/runner.js.map +1 -0
- package/dist/eval/collection-benchmark/sampler.d.ts +18 -0
- package/dist/eval/collection-benchmark/sampler.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/sampler.js +186 -0
- package/dist/eval/collection-benchmark/sampler.js.map +1 -0
- package/dist/eval/collection-benchmark/tuning.d.ts +12 -0
- package/dist/eval/collection-benchmark/tuning.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/tuning.js +222 -0
- package/dist/eval/collection-benchmark/tuning.js.map +1 -0
- package/dist/eval/collection-benchmark/types.d.ts +183 -0
- package/dist/eval/collection-benchmark/types.d.ts.map +1 -0
- package/dist/eval/collection-benchmark/types.js +7 -0
- package/dist/eval/collection-benchmark/types.js.map +1 -0
- package/dist/eval/context-window-test.d.ts +34 -0
- package/dist/eval/context-window-test.d.ts.map +1 -0
- package/dist/eval/context-window-test.js +59 -0
- package/dist/eval/context-window-test.js.map +1 -0
- package/dist/eval/corpus-builder.d.ts +33 -0
- package/dist/eval/corpus-builder.d.ts.map +1 -0
- package/dist/eval/corpus-builder.js +88 -0
- package/dist/eval/corpus-builder.js.map +1 -0
- package/dist/eval/experiments/boilerplate-filter.d.ts +26 -0
- package/dist/eval/experiments/boilerplate-filter.d.ts.map +1 -0
- package/dist/eval/experiments/boilerplate-filter.js +95 -0
- package/dist/eval/experiments/boilerplate-filter.js.map +1 -0
- package/dist/eval/experiments/cluster-threshold/index.d.ts +6 -0
- package/dist/eval/experiments/cluster-threshold/index.d.ts.map +1 -0
- package/dist/eval/experiments/cluster-threshold/index.js +5 -0
- package/dist/eval/experiments/cluster-threshold/index.js.map +1 -0
- package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.d.ts +58 -0
- package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.d.ts.map +1 -0
- package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.js +246 -0
- package/dist/eval/experiments/cluster-threshold/run-threshold-sweep.js.map +1 -0
- package/dist/eval/experiments/code-focused-mode.d.ts +20 -0
- package/dist/eval/experiments/code-focused-mode.d.ts.map +1 -0
- package/dist/eval/experiments/code-focused-mode.js +66 -0
- package/dist/eval/experiments/code-focused-mode.js.map +1 -0
- package/dist/eval/experiments/edge-decay/decay-curves.d.ts +59 -0
- package/dist/eval/experiments/edge-decay/decay-curves.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/decay-curves.js +124 -0
- package/dist/eval/experiments/edge-decay/decay-curves.js.map +1 -0
- package/dist/eval/experiments/edge-decay/index.d.ts +13 -0
- package/dist/eval/experiments/edge-decay/index.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/index.js +16 -0
- package/dist/eval/experiments/edge-decay/index.js.map +1 -0
- package/dist/eval/experiments/edge-decay/presets.d.ts +52 -0
- package/dist/eval/experiments/edge-decay/presets.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/presets.js +234 -0
- package/dist/eval/experiments/edge-decay/presets.js.map +1 -0
- package/dist/eval/experiments/edge-decay/reference-extractor.d.ts +34 -0
- package/dist/eval/experiments/edge-decay/reference-extractor.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/reference-extractor.js +353 -0
- package/dist/eval/experiments/edge-decay/reference-extractor.js.map +1 -0
- package/dist/eval/experiments/edge-decay/reference-types.d.ts +131 -0
- package/dist/eval/experiments/edge-decay/reference-types.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/reference-types.js +5 -0
- package/dist/eval/experiments/edge-decay/reference-types.js.map +1 -0
- package/dist/eval/experiments/edge-decay/retrieval-ranking.d.ts +64 -0
- package/dist/eval/experiments/edge-decay/retrieval-ranking.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/retrieval-ranking.js +565 -0
- package/dist/eval/experiments/edge-decay/retrieval-ranking.js.map +1 -0
- package/dist/eval/experiments/edge-decay/run-experiments.d.ts +25 -0
- package/dist/eval/experiments/edge-decay/run-experiments.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/run-experiments.js +229 -0
- package/dist/eval/experiments/edge-decay/run-experiments.js.map +1 -0
- package/dist/eval/experiments/edge-decay/simulate.d.ts +42 -0
- package/dist/eval/experiments/edge-decay/simulate.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/simulate.js +232 -0
- package/dist/eval/experiments/edge-decay/simulate.js.map +1 -0
- package/dist/eval/experiments/edge-decay/types.d.ts +10 -0
- package/dist/eval/experiments/edge-decay/types.d.ts.map +1 -0
- package/dist/eval/experiments/edge-decay/types.js +9 -0
- package/dist/eval/experiments/edge-decay/types.js.map +1 -0
- package/dist/eval/experiments/hdbscan-sweep.d.ts +19 -0
- package/dist/eval/experiments/hdbscan-sweep.d.ts.map +1 -0
- package/dist/eval/experiments/hdbscan-sweep.js +71 -0
- package/dist/eval/experiments/hdbscan-sweep.js.map +1 -0
- package/dist/eval/experiments/single-model-run.d.ts +54 -0
- package/dist/eval/experiments/single-model-run.d.ts.map +1 -0
- package/dist/eval/experiments/single-model-run.js +120 -0
- package/dist/eval/experiments/single-model-run.js.map +1 -0
- package/dist/eval/experiments/thinking-ablation.d.ts +21 -0
- package/dist/eval/experiments/thinking-ablation.d.ts.map +1 -0
- package/dist/eval/experiments/thinking-ablation.js +68 -0
- package/dist/eval/experiments/thinking-ablation.js.map +1 -0
- package/dist/eval/experiments/topic-continuity/embedding-classifier.d.ts +55 -0
- package/dist/eval/experiments/topic-continuity/embedding-classifier.d.ts.map +1 -0
- package/dist/eval/experiments/topic-continuity/embedding-classifier.js +126 -0
- package/dist/eval/experiments/topic-continuity/embedding-classifier.js.map +1 -0
- package/dist/eval/experiments/topic-continuity/hybrid-classifier.d.ts +68 -0
- package/dist/eval/experiments/topic-continuity/hybrid-classifier.d.ts.map +1 -0
- package/dist/eval/experiments/topic-continuity/hybrid-classifier.js +175 -0
- package/dist/eval/experiments/topic-continuity/hybrid-classifier.js.map +1 -0
- package/dist/eval/experiments/topic-continuity/index.d.ts +13 -0
- package/dist/eval/experiments/topic-continuity/index.d.ts.map +1 -0
- package/dist/eval/experiments/topic-continuity/index.js +17 -0
- package/dist/eval/experiments/topic-continuity/index.js.map +1 -0
- package/dist/eval/experiments/topic-continuity/labeler.d.ts +42 -0
- package/dist/eval/experiments/topic-continuity/labeler.d.ts.map +1 -0
- package/dist/eval/experiments/topic-continuity/labeler.js +253 -0
- package/dist/eval/experiments/topic-continuity/labeler.js.map +1 -0
- package/dist/eval/experiments/topic-continuity/lexical-features.d.ts +26 -0
- package/dist/eval/experiments/topic-continuity/lexical-features.d.ts.map +1 -0
- package/dist/eval/experiments/topic-continuity/lexical-features.js +58 -0
- package/dist/eval/experiments/topic-continuity/lexical-features.js.map +1 -0
- package/dist/eval/experiments/topic-continuity/run-experiment.d.ts +40 -0
- package/dist/eval/experiments/topic-continuity/run-experiment.d.ts.map +1 -0
- package/dist/eval/experiments/topic-continuity/run-experiment.js +379 -0
- package/dist/eval/experiments/topic-continuity/run-experiment.js.map +1 -0
- package/dist/eval/experiments/topic-continuity/types.d.ts +146 -0
- package/dist/eval/experiments/topic-continuity/types.d.ts.map +1 -0
- package/dist/eval/experiments/topic-continuity/types.js +9 -0
- package/dist/eval/experiments/topic-continuity/types.js.map +1 -0
- package/dist/eval/experiments/truncation.d.ts +21 -0
- package/dist/eval/experiments/truncation.d.ts.map +1 -0
- package/dist/eval/experiments/truncation.js +59 -0
- package/dist/eval/experiments/truncation.js.map +1 -0
- package/dist/eval/experiments/types.d.ts +37 -0
- package/dist/eval/experiments/types.d.ts.map +1 -0
- package/dist/eval/experiments/types.js +13 -0
- package/dist/eval/experiments/types.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.d.ts +10 -0
- package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.js +229 -0
- package/dist/eval/experiments/vector-decay-shapes/curve-shapes-experiment.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.d.ts +12 -0
- package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.js +316 -0
- package/dist/eval/experiments/vector-decay-shapes/graph-range-experiment.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/hop-decay.d.ts +19 -0
- package/dist/eval/experiments/vector-decay-shapes/hop-decay.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/hop-decay.js +127 -0
- package/dist/eval/experiments/vector-decay-shapes/hop-decay.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/index.d.ts +11 -0
- package/dist/eval/experiments/vector-decay-shapes/index.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/index.js +11 -0
- package/dist/eval/experiments/vector-decay-shapes/index.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.d.ts +14 -0
- package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.js +274 -0
- package/dist/eval/experiments/vector-decay-shapes/path-traversal-experiment.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/presets.d.ts +36 -0
- package/dist/eval/experiments/vector-decay-shapes/presets.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/presets.js +157 -0
- package/dist/eval/experiments/vector-decay-shapes/presets.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/run-experiment.d.ts +20 -0
- package/dist/eval/experiments/vector-decay-shapes/run-experiment.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/run-experiment.js +504 -0
- package/dist/eval/experiments/vector-decay-shapes/run-experiment.js.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/types.d.ts +111 -0
- package/dist/eval/experiments/vector-decay-shapes/types.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-shapes/types.js +15 -0
- package/dist/eval/experiments/vector-decay-shapes/types.js.map +1 -0
- package/dist/eval/experiments/vector-decay-sweep/index.d.ts +7 -0
- package/dist/eval/experiments/vector-decay-sweep/index.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-sweep/index.js +7 -0
- package/dist/eval/experiments/vector-decay-sweep/index.js.map +1 -0
- package/dist/eval/experiments/vector-decay-sweep/run-sweep.d.ts +30 -0
- package/dist/eval/experiments/vector-decay-sweep/run-sweep.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-sweep/run-sweep.js +378 -0
- package/dist/eval/experiments/vector-decay-sweep/run-sweep.js.map +1 -0
- package/dist/eval/experiments/vector-decay-sweep/types.d.ts +109 -0
- package/dist/eval/experiments/vector-decay-sweep/types.d.ts.map +1 -0
- package/dist/eval/experiments/vector-decay-sweep/types.js +16 -0
- package/dist/eval/experiments/vector-decay-sweep/types.js.map +1 -0
- package/dist/eval/metrics.d.ts +45 -0
- package/dist/eval/metrics.d.ts.map +1 -0
- package/dist/eval/metrics.js +134 -0
- package/dist/eval/metrics.js.map +1 -0
- package/dist/hooks/claudemd-generator.d.ts +62 -0
- package/dist/hooks/claudemd-generator.d.ts.map +1 -0
- package/dist/hooks/claudemd-generator.js +220 -0
- package/dist/hooks/claudemd-generator.js.map +1 -0
- package/dist/hooks/hook-utils.d.ts +84 -0
- package/dist/hooks/hook-utils.d.ts.map +1 -0
- package/dist/hooks/hook-utils.js +187 -0
- package/dist/hooks/hook-utils.js.map +1 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/pre-compact.d.ts +58 -0
- package/dist/hooks/pre-compact.d.ts.map +1 -0
- package/dist/hooks/pre-compact.js +127 -0
- package/dist/hooks/pre-compact.js.map +1 -0
- package/dist/hooks/session-start.d.ts +62 -0
- package/dist/hooks/session-start.d.ts.map +1 -0
- package/dist/hooks/session-start.js +249 -0
- package/dist/hooks/session-start.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/batch-ingest.d.ts +94 -0
- package/dist/ingest/batch-ingest.d.ts.map +1 -0
- package/dist/ingest/batch-ingest.js +167 -0
- package/dist/ingest/batch-ingest.js.map +1 -0
- package/dist/ingest/brief-debrief-detector.d.ts +74 -0
- package/dist/ingest/brief-debrief-detector.d.ts.map +1 -0
- package/dist/ingest/brief-debrief-detector.js +253 -0
- package/dist/ingest/brief-debrief-detector.js.map +1 -0
- package/dist/ingest/cross-session-linker.d.ts +39 -0
- package/dist/ingest/cross-session-linker.d.ts.map +1 -0
- package/dist/ingest/cross-session-linker.js +103 -0
- package/dist/ingest/cross-session-linker.js.map +1 -0
- package/dist/ingest/edge-creator.d.ts +62 -0
- package/dist/ingest/edge-creator.d.ts.map +1 -0
- package/dist/ingest/edge-creator.js +186 -0
- package/dist/ingest/edge-creator.js.map +1 -0
- package/dist/ingest/edge-detector.d.ts +37 -0
- package/dist/ingest/edge-detector.d.ts.map +1 -0
- package/dist/ingest/edge-detector.js +234 -0
- package/dist/ingest/edge-detector.js.map +1 -0
- package/dist/ingest/index.d.ts +14 -0
- package/dist/ingest/index.d.ts.map +1 -0
- package/dist/ingest/index.js +14 -0
- package/dist/ingest/index.js.map +1 -0
- package/dist/ingest/ingest-session.d.ts +83 -0
- package/dist/ingest/ingest-session.d.ts.map +1 -0
- package/dist/ingest/ingest-session.js +415 -0
- package/dist/ingest/ingest-session.js.map +1 -0
- package/dist/maintenance/index.d.ts +5 -0
- package/dist/maintenance/index.d.ts.map +1 -0
- package/dist/maintenance/index.js +5 -0
- package/dist/maintenance/index.js.map +1 -0
- package/dist/maintenance/scheduler.d.ts +79 -0
- package/dist/maintenance/scheduler.d.ts.map +1 -0
- package/dist/maintenance/scheduler.js +362 -0
- package/dist/maintenance/scheduler.js.map +1 -0
- package/dist/maintenance/tasks/cleanup-vectors.d.ts +10 -0
- package/dist/maintenance/tasks/cleanup-vectors.d.ts.map +1 -0
- package/dist/maintenance/tasks/cleanup-vectors.js +23 -0
- package/dist/maintenance/tasks/cleanup-vectors.js.map +1 -0
- package/dist/maintenance/tasks/index.d.ts +9 -0
- package/dist/maintenance/tasks/index.d.ts.map +1 -0
- package/dist/maintenance/tasks/index.js +9 -0
- package/dist/maintenance/tasks/index.js.map +1 -0
- package/dist/maintenance/tasks/prune-graph.d.ts +12 -0
- package/dist/maintenance/tasks/prune-graph.d.ts.map +1 -0
- package/dist/maintenance/tasks/prune-graph.js +23 -0
- package/dist/maintenance/tasks/prune-graph.js.map +1 -0
- package/dist/maintenance/tasks/scan-projects.d.ts +12 -0
- package/dist/maintenance/tasks/scan-projects.d.ts.map +1 -0
- package/dist/maintenance/tasks/scan-projects.js +31 -0
- package/dist/maintenance/tasks/scan-projects.js.map +1 -0
- package/dist/maintenance/tasks/update-clusters.d.ts +12 -0
- package/dist/maintenance/tasks/update-clusters.d.ts.map +1 -0
- package/dist/maintenance/tasks/update-clusters.js +41 -0
- package/dist/maintenance/tasks/update-clusters.js.map +1 -0
- package/dist/maintenance/tasks/vacuum.d.ts +10 -0
- package/dist/maintenance/tasks/vacuum.d.ts.map +1 -0
- package/dist/maintenance/tasks/vacuum.js +23 -0
- package/dist/maintenance/tasks/vacuum.js.map +1 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +90 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +395 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +52 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +292 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/models/device-detector.d.ts +32 -0
- package/dist/models/device-detector.d.ts.map +1 -0
- package/dist/models/device-detector.js +123 -0
- package/dist/models/device-detector.js.map +1 -0
- package/dist/models/embedder.d.ts +60 -0
- package/dist/models/embedder.d.ts.map +1 -0
- package/dist/models/embedder.js +171 -0
- package/dist/models/embedder.js.map +1 -0
- package/dist/models/model-registry.d.ts +25 -0
- package/dist/models/model-registry.d.ts.map +1 -0
- package/dist/models/model-registry.js +56 -0
- package/dist/models/model-registry.js.map +1 -0
- package/dist/parser/chunker.d.ts +74 -0
- package/dist/parser/chunker.d.ts.map +1 -0
- package/dist/parser/chunker.js +330 -0
- package/dist/parser/chunker.js.map +1 -0
- package/dist/parser/session-reader.d.ts +75 -0
- package/dist/parser/session-reader.d.ts.map +1 -0
- package/dist/parser/session-reader.js +198 -0
- package/dist/parser/session-reader.js.map +1 -0
- package/dist/parser/turn-assembler.d.ts +18 -0
- package/dist/parser/turn-assembler.d.ts.map +1 -0
- package/dist/parser/turn-assembler.js +150 -0
- package/dist/parser/turn-assembler.js.map +1 -0
- package/dist/parser/types.d.ts +124 -0
- package/dist/parser/types.d.ts.map +1 -0
- package/dist/parser/types.js +8 -0
- package/dist/parser/types.js.map +1 -0
- package/dist/report/reporter.d.ts +18 -0
- package/dist/report/reporter.d.ts.map +1 -0
- package/dist/report/reporter.js +121 -0
- package/dist/report/reporter.js.map +1 -0
- package/dist/retrieval/cluster-expander.d.ts +30 -0
- package/dist/retrieval/cluster-expander.d.ts.map +1 -0
- package/dist/retrieval/cluster-expander.js +87 -0
- package/dist/retrieval/cluster-expander.js.map +1 -0
- package/dist/retrieval/context-assembler.d.ts +89 -0
- package/dist/retrieval/context-assembler.d.ts.map +1 -0
- package/dist/retrieval/context-assembler.js +313 -0
- package/dist/retrieval/context-assembler.js.map +1 -0
- package/dist/retrieval/index.d.ts +12 -0
- package/dist/retrieval/index.d.ts.map +1 -0
- package/dist/retrieval/index.js +12 -0
- package/dist/retrieval/index.js.map +1 -0
- package/dist/retrieval/rrf.d.ts +25 -0
- package/dist/retrieval/rrf.d.ts.map +1 -0
- package/dist/retrieval/rrf.js +56 -0
- package/dist/retrieval/rrf.js.map +1 -0
- package/dist/retrieval/session-reconstructor.d.ts +79 -0
- package/dist/retrieval/session-reconstructor.d.ts.map +1 -0
- package/dist/retrieval/session-reconstructor.js +173 -0
- package/dist/retrieval/session-reconstructor.js.map +1 -0
- package/dist/retrieval/traverser.d.ts +66 -0
- package/dist/retrieval/traverser.d.ts.map +1 -0
- package/dist/retrieval/traverser.js +160 -0
- package/dist/retrieval/traverser.js.map +1 -0
- package/dist/storage/archive.d.ts +81 -0
- package/dist/storage/archive.d.ts.map +1 -0
- package/dist/storage/archive.js +204 -0
- package/dist/storage/archive.js.map +1 -0
- package/dist/storage/audit-log.d.ts +29 -0
- package/dist/storage/audit-log.d.ts.map +1 -0
- package/dist/storage/audit-log.js +69 -0
- package/dist/storage/audit-log.js.map +1 -0
- package/dist/storage/checkpoint-store.d.ts +38 -0
- package/dist/storage/checkpoint-store.d.ts.map +1 -0
- package/dist/storage/checkpoint-store.js +76 -0
- package/dist/storage/checkpoint-store.js.map +1 -0
- package/dist/storage/chunk-store.d.ts +111 -0
- package/dist/storage/chunk-store.d.ts.map +1 -0
- package/dist/storage/chunk-store.js +298 -0
- package/dist/storage/chunk-store.js.map +1 -0
- package/dist/storage/clock-store.d.ts +80 -0
- package/dist/storage/clock-store.d.ts.map +1 -0
- package/dist/storage/clock-store.js +155 -0
- package/dist/storage/clock-store.js.map +1 -0
- package/dist/storage/cluster-store.d.ts +63 -0
- package/dist/storage/cluster-store.d.ts.map +1 -0
- package/dist/storage/cluster-store.js +219 -0
- package/dist/storage/cluster-store.js.map +1 -0
- package/dist/storage/db.d.ts +57 -0
- package/dist/storage/db.d.ts.map +1 -0
- package/dist/storage/db.js +249 -0
- package/dist/storage/db.js.map +1 -0
- package/dist/storage/decay.d.ts +125 -0
- package/dist/storage/decay.d.ts.map +1 -0
- package/dist/storage/decay.js +276 -0
- package/dist/storage/decay.js.map +1 -0
- package/dist/storage/edge-store.d.ts +75 -0
- package/dist/storage/edge-store.d.ts.map +1 -0
- package/dist/storage/edge-store.js +259 -0
- package/dist/storage/edge-store.js.map +1 -0
- package/dist/storage/embedding-cache.d.ts +51 -0
- package/dist/storage/embedding-cache.d.ts.map +1 -0
- package/dist/storage/embedding-cache.js +155 -0
- package/dist/storage/embedding-cache.js.map +1 -0
- package/dist/storage/encryption.d.ts +55 -0
- package/dist/storage/encryption.d.ts.map +1 -0
- package/dist/storage/encryption.js +130 -0
- package/dist/storage/encryption.js.map +1 -0
- package/dist/storage/index.d.ts +15 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +20 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/keyword-store.d.ts +25 -0
- package/dist/storage/keyword-store.d.ts.map +1 -0
- package/dist/storage/keyword-store.js +104 -0
- package/dist/storage/keyword-store.js.map +1 -0
- package/dist/storage/migrations.d.ts +12 -0
- package/dist/storage/migrations.d.ts.map +1 -0
- package/dist/storage/migrations.js +345 -0
- package/dist/storage/migrations.js.map +1 -0
- package/dist/storage/pruner.d.ts +111 -0
- package/dist/storage/pruner.d.ts.map +1 -0
- package/dist/storage/pruner.js +280 -0
- package/dist/storage/pruner.js.map +1 -0
- package/dist/storage/schema-loader.d.ts +18 -0
- package/dist/storage/schema-loader.d.ts.map +1 -0
- package/dist/storage/schema-loader.js +62 -0
- package/dist/storage/schema-loader.js.map +1 -0
- package/dist/storage/schema.sql +133 -0
- package/dist/storage/types.d.ts +278 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +14 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/storage/vector-store.d.ts +213 -0
- package/dist/storage/vector-store.d.ts.map +1 -0
- package/dist/storage/vector-store.js +440 -0
- package/dist/storage/vector-store.js.map +1 -0
- package/dist/temporal/clock-compactor.d.ts +65 -0
- package/dist/temporal/clock-compactor.d.ts.map +1 -0
- package/dist/temporal/clock-compactor.js +157 -0
- package/dist/temporal/clock-compactor.js.map +1 -0
- package/dist/temporal/index.d.ts +6 -0
- package/dist/temporal/index.d.ts.map +1 -0
- package/dist/temporal/index.js +6 -0
- package/dist/temporal/index.js.map +1 -0
- package/dist/temporal/vector-clock.d.ts +143 -0
- package/dist/temporal/vector-clock.d.ts.map +1 -0
- package/dist/temporal/vector-clock.js +231 -0
- package/dist/temporal/vector-clock.js.map +1 -0
- package/dist/utils/angular-distance.d.ts +31 -0
- package/dist/utils/angular-distance.d.ts.map +1 -0
- package/dist/utils/angular-distance.js +61 -0
- package/dist/utils/angular-distance.js.map +1 -0
- package/dist/utils/array-utils.d.ts +28 -0
- package/dist/utils/array-utils.d.ts.map +1 -0
- package/dist/utils/array-utils.js +67 -0
- package/dist/utils/array-utils.js.map +1 -0
- package/dist/utils/embedding-utils.d.ts +25 -0
- package/dist/utils/embedding-utils.d.ts.map +1 -0
- package/dist/utils/embedding-utils.js +30 -0
- package/dist/utils/embedding-utils.js.map +1 -0
- package/dist/utils/errors.d.ts +143 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +220 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/keychain.d.ts +43 -0
- package/dist/utils/keychain.d.ts.map +1 -0
- package/dist/utils/keychain.js +82 -0
- package/dist/utils/keychain.js.map +1 -0
- package/dist/utils/logger.d.ts +50 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +104 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/secret-store.d.ts +110 -0
- package/dist/utils/secret-store.d.ts.map +1 -0
- package/dist/utils/secret-store.js +340 -0
- package/dist/utils/secret-store.js.map +1 -0
- package/dist/utils/secure-buffer.d.ts +66 -0
- package/dist/utils/secure-buffer.d.ts.map +1 -0
- package/dist/utils/secure-buffer.js +104 -0
- package/dist/utils/secure-buffer.js.map +1 -0
- package/dist/utils/token-counter.d.ts +13 -0
- package/dist/utils/token-counter.d.ts.map +1 -0
- package/dist/utils/token-counter.js +18 -0
- package/dist/utils/token-counter.js.map +1 -0
- package/package.json +110 -0
- package/src/dashboard/client/package-lock.json +3045 -0
- package/src/dashboard/client/package.json +30 -0
|
@@ -0,0 +1,1128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SKILL.md templates for Causantic Claude Code skills.
|
|
3
|
+
*
|
|
4
|
+
* These get installed to ~/.claude/skills/causantic-<name>/SKILL.md
|
|
5
|
+
* by the `causantic init` wizard, replacing the old CLAUDE.md injection approach.
|
|
6
|
+
*/
|
|
7
|
+
export const CAUSANTIC_SKILLS = [
|
|
8
|
+
{
|
|
9
|
+
dirName: 'causantic-recall',
|
|
10
|
+
content: `---
|
|
11
|
+
name: causantic-recall
|
|
12
|
+
description: "Look up context from past sessions using Causantic long-term memory. Use when asked about recent or past work, previous decisions, errors solved before, or context from prior sessions."
|
|
13
|
+
argument-hint: [query]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Recall Past Context
|
|
17
|
+
|
|
18
|
+
Use the \`recall\` MCP tool from \`causantic\` to look up specific context from past sessions.
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
\`\`\`
|
|
23
|
+
/causantic-recall What did we work on recently?
|
|
24
|
+
/causantic-recall authentication implementation decisions
|
|
25
|
+
/causantic-recall that migration bug we fixed last week
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
|
|
30
|
+
Pass these to the \`recall\` MCP tool:
|
|
31
|
+
|
|
32
|
+
- **query** (required): Natural language question about past work
|
|
33
|
+
- **range**: \`"short"\` for recent work (last few sessions), \`"long"\` for historical context
|
|
34
|
+
- **project**: Filter to a specific project slug (use \`/causantic-list-projects\` to discover names)
|
|
35
|
+
|
|
36
|
+
## When to Use
|
|
37
|
+
|
|
38
|
+
- User asks about recent or past work (e.g., "What did we work on?", "What was decided about X?")
|
|
39
|
+
- Starting a task in an unfamiliar area — check if past sessions covered it
|
|
40
|
+
- Encountering an error or pattern that might have been solved before
|
|
41
|
+
- User references something from a previous session
|
|
42
|
+
- Before saying "I don't have context from previous sessions" — always try recall first
|
|
43
|
+
|
|
44
|
+
## Guidelines
|
|
45
|
+
|
|
46
|
+
- Use \`range: "short"\` for recent work, \`range: "long"\` for historical context
|
|
47
|
+
- Use the \`project\` parameter to scope results to the current project when relevant
|
|
48
|
+
- Combine with \`/causantic-explain\` when the user needs deeper understanding of why something was done
|
|
49
|
+
`,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
dirName: 'causantic-explain',
|
|
53
|
+
content: `---
|
|
54
|
+
name: causantic-explain
|
|
55
|
+
description: "Explain the history behind a topic, decision, or implementation using Causantic long-term memory. Use when asked 'why' something was done, 'how we got here', or to trace the evolution of a feature."
|
|
56
|
+
argument-hint: [topic]
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
# Explain History
|
|
60
|
+
|
|
61
|
+
Use the \`explain\` MCP tool from \`causantic\` to understand the history and rationale behind topics and decisions.
|
|
62
|
+
|
|
63
|
+
## Usage
|
|
64
|
+
|
|
65
|
+
\`\`\`
|
|
66
|
+
/causantic-explain why we chose SQLite for the database
|
|
67
|
+
/causantic-explain how the authentication system evolved
|
|
68
|
+
/causantic-explain the reasoning behind the project labels design
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
## Parameters
|
|
72
|
+
|
|
73
|
+
Pass these to the \`explain\` MCP tool:
|
|
74
|
+
|
|
75
|
+
- **query** (required): Topic, decision, or feature to explain
|
|
76
|
+
- **project**: Filter to a specific project slug
|
|
77
|
+
|
|
78
|
+
## When to Use
|
|
79
|
+
|
|
80
|
+
- User asks "why" or "how did we get here"
|
|
81
|
+
- Need to understand rationale behind past architectural decisions
|
|
82
|
+
- Tracing the evolution of a feature or design pattern
|
|
83
|
+
- Investigating why a particular approach was chosen over alternatives
|
|
84
|
+
|
|
85
|
+
## Guidelines
|
|
86
|
+
|
|
87
|
+
- Defaults to long-range retrieval for comprehensive history
|
|
88
|
+
- Returns chronological narrative of relevant context
|
|
89
|
+
- Best for understanding decision-making, not just facts
|
|
90
|
+
`,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
dirName: 'causantic-predict',
|
|
94
|
+
content: `---
|
|
95
|
+
name: causantic-predict
|
|
96
|
+
description: "Proactively surface relevant past context based on the current discussion using Causantic long-term memory. Use at the start of complex tasks to surface prior work, related decisions, or known pitfalls."
|
|
97
|
+
argument-hint: [context]
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# Predict Relevant Context
|
|
101
|
+
|
|
102
|
+
Use the \`predict\` MCP tool from \`causantic\` to proactively surface relevant past context based on the current discussion.
|
|
103
|
+
|
|
104
|
+
## Usage
|
|
105
|
+
|
|
106
|
+
\`\`\`
|
|
107
|
+
/causantic-predict
|
|
108
|
+
/causantic-predict refactoring the auth module
|
|
109
|
+
\`\`\`
|
|
110
|
+
|
|
111
|
+
## Parameters
|
|
112
|
+
|
|
113
|
+
Pass these to the \`predict\` MCP tool:
|
|
114
|
+
|
|
115
|
+
- **query** (optional): Current task or topic context. If omitted, uses the current discussion.
|
|
116
|
+
- **project**: Filter to a specific project slug
|
|
117
|
+
|
|
118
|
+
## When to Use
|
|
119
|
+
|
|
120
|
+
- At the start of complex tasks to check for relevant prior work
|
|
121
|
+
- When encountering an error or pattern that might have been solved before
|
|
122
|
+
- When working on something that likely has prior art in past sessions
|
|
123
|
+
- To surface context the user might not think to ask about
|
|
124
|
+
|
|
125
|
+
## Guidelines
|
|
126
|
+
|
|
127
|
+
- Use early in a task to front-load relevant context
|
|
128
|
+
- Especially useful when starting unfamiliar work — past sessions may have covered it
|
|
129
|
+
`,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
dirName: 'causantic-list-projects',
|
|
133
|
+
content: `---
|
|
134
|
+
name: causantic-list-projects
|
|
135
|
+
description: "List all projects stored in Causantic long-term memory with chunk counts and date ranges. Use to discover available project names for filtering recall/explain/predict queries."
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
# List Memory Projects
|
|
139
|
+
|
|
140
|
+
Use the \`list-projects\` MCP tool from \`causantic\` to see all projects in memory.
|
|
141
|
+
|
|
142
|
+
## Usage
|
|
143
|
+
|
|
144
|
+
\`\`\`
|
|
145
|
+
/causantic-list-projects
|
|
146
|
+
\`\`\`
|
|
147
|
+
|
|
148
|
+
## Output
|
|
149
|
+
|
|
150
|
+
Returns a list of projects with:
|
|
151
|
+
- Project name (slug)
|
|
152
|
+
- Number of memory chunks
|
|
153
|
+
- Date range (first seen to last seen)
|
|
154
|
+
|
|
155
|
+
## When to Use
|
|
156
|
+
|
|
157
|
+
- Before using project-filtered queries with \`/causantic-recall\`, \`/causantic-explain\`, or \`/causantic-predict\`
|
|
158
|
+
- To see what projects have been ingested into memory
|
|
159
|
+
- To check the coverage and recency of memory for a specific project
|
|
160
|
+
`,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
dirName: 'causantic-reconstruct',
|
|
164
|
+
content: `---
|
|
165
|
+
name: causantic-reconstruct
|
|
166
|
+
description: "Reconstruct session context from Causantic long-term memory. Use to rebuild what was worked on yesterday, show the last session, or reconstruct context from a time range."
|
|
167
|
+
argument-hint: [time range or description]
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
# Reconstruct Session Context
|
|
171
|
+
|
|
172
|
+
Use the \`list-sessions\` and \`reconstruct\` MCP tools from \`causantic\` to rebuild session context chronologically.
|
|
173
|
+
|
|
174
|
+
## Usage
|
|
175
|
+
|
|
176
|
+
\`\`\`
|
|
177
|
+
/causantic-reconstruct what did I work on yesterday?
|
|
178
|
+
/causantic-reconstruct last session
|
|
179
|
+
/causantic-reconstruct past 3 days
|
|
180
|
+
/causantic-reconstruct session abc12345
|
|
181
|
+
\`\`\`
|
|
182
|
+
|
|
183
|
+
## Workflow
|
|
184
|
+
|
|
185
|
+
1. **Identify the project**: Use \`list-projects\` if the user hasn't specified one
|
|
186
|
+
2. **Browse sessions**: Use \`list-sessions\` to see available sessions and their time ranges
|
|
187
|
+
3. **Reconstruct**: Use \`reconstruct\` with appropriate parameters
|
|
188
|
+
|
|
189
|
+
## Parameters for \`list-sessions\`
|
|
190
|
+
|
|
191
|
+
- **project** (required): Project slug
|
|
192
|
+
- **from**: Start date (ISO 8601)
|
|
193
|
+
- **to**: End date (ISO 8601)
|
|
194
|
+
- **days_back**: Look back N days
|
|
195
|
+
|
|
196
|
+
## Parameters for \`reconstruct\`
|
|
197
|
+
|
|
198
|
+
- **project** (required): Project slug
|
|
199
|
+
- **session_id**: Specific session ID
|
|
200
|
+
- **from** / **to**: Time range (ISO 8601)
|
|
201
|
+
- **days_back**: Look back N days
|
|
202
|
+
- **previous_session**: Get the session before the current one (set to \`true\`)
|
|
203
|
+
- **current_session_id**: Required when \`previous_session\` is true
|
|
204
|
+
- **keep_newest**: Keep newest chunks when truncating (default: true)
|
|
205
|
+
|
|
206
|
+
## Interpreting User Intent
|
|
207
|
+
|
|
208
|
+
| User says | Parameters |
|
|
209
|
+
|-----------|-----------|
|
|
210
|
+
| "yesterday" | \`days_back: 1\` |
|
|
211
|
+
| "past 3 days" | \`days_back: 3\` |
|
|
212
|
+
| "last session" | \`previous_session: true\` + current session ID |
|
|
213
|
+
| "session abc123" | \`session_id: "abc123"\` |
|
|
214
|
+
| "this week" | \`days_back: 7\` |
|
|
215
|
+
| "January 15" | \`from: "2025-01-15T00:00:00Z", to: "2025-01-16T00:00:00Z"\` |
|
|
216
|
+
|
|
217
|
+
## Guidelines
|
|
218
|
+
|
|
219
|
+
- Always start with \`list-sessions\` to give the user an overview before reconstructing
|
|
220
|
+
- When the user says "last session", use \`previous_session: true\` — this finds the session before the current one
|
|
221
|
+
- Token budget is applied automatically — newest chunks are kept by default
|
|
222
|
+
- Results include session boundary markers for easy navigation
|
|
223
|
+
`,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
dirName: 'causantic-resume',
|
|
227
|
+
content: `---
|
|
228
|
+
name: causantic-resume
|
|
229
|
+
description: "Resume interrupted work by reconstructing context from recent sessions. Use at the start of a session or when asked 'where did I leave off?'"
|
|
230
|
+
argument-hint: [topic or time range]
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
# Resume Work
|
|
234
|
+
|
|
235
|
+
Reconstruct context from the most recent session(s) to help the user pick up where they left off.
|
|
236
|
+
|
|
237
|
+
## Usage
|
|
238
|
+
|
|
239
|
+
\`\`\`
|
|
240
|
+
/causantic-resume
|
|
241
|
+
/causantic-resume the API refactor
|
|
242
|
+
/causantic-resume from yesterday
|
|
243
|
+
\`\`\`
|
|
244
|
+
|
|
245
|
+
## Workflow
|
|
246
|
+
|
|
247
|
+
1. **Identify the project**: Derive from the current working directory (use \`list-projects\` if ambiguous)
|
|
248
|
+
2. **Reconstruct the last session**: Use \`reconstruct\` with \`previous_session: true\` to get the most recent session before this one
|
|
249
|
+
3. **Summarize for the user**:
|
|
250
|
+
- What was being worked on (key topics/tasks)
|
|
251
|
+
- What was completed vs in progress
|
|
252
|
+
- Any explicit next steps or TODOs mentioned
|
|
253
|
+
- Any open issues or blockers
|
|
254
|
+
4. **If the user provided a topic**: Also run \`recall\` with that topic scoped to the project
|
|
255
|
+
|
|
256
|
+
## Interpreting User Intent
|
|
257
|
+
|
|
258
|
+
| User says | Action |
|
|
259
|
+
|-----------|--------|
|
|
260
|
+
| (nothing) | \`reconstruct\` with \`previous_session: true\` |
|
|
261
|
+
| "yesterday" / "last week" | \`reconstruct\` with appropriate \`days_back\` |
|
|
262
|
+
| a topic name | \`reconstruct\` last session + \`recall\` with that topic, \`range: "long"\` |
|
|
263
|
+
|
|
264
|
+
## Output Format
|
|
265
|
+
|
|
266
|
+
Present a concise briefing:
|
|
267
|
+
- **Last session**: date and duration
|
|
268
|
+
- **Key work**: 1-3 bullet points
|
|
269
|
+
- **Status**: what was completed, what was in progress
|
|
270
|
+
- **Next steps**: any mentioned next steps or TODOs
|
|
271
|
+
- **Open issues**: any blockers or unresolved problems
|
|
272
|
+
|
|
273
|
+
## Guidelines
|
|
274
|
+
|
|
275
|
+
- Keep the summary actionable, not exhaustive
|
|
276
|
+
- Highlight unfinished work prominently — that's what the user needs most
|
|
277
|
+
- If the last session ended mid-task, flag that clearly
|
|
278
|
+
`,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
dirName: 'causantic-debug',
|
|
282
|
+
content: `---
|
|
283
|
+
name: causantic-debug
|
|
284
|
+
description: "Search past sessions for prior encounters with the current error, bug pattern, or issue. Use when stuck on an error or debugging a recurring problem."
|
|
285
|
+
argument-hint: [error message or description]
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
# Debug with Memory
|
|
289
|
+
|
|
290
|
+
Search past sessions for prior encounters with the current error, bug pattern, or issue.
|
|
291
|
+
|
|
292
|
+
## Usage
|
|
293
|
+
|
|
294
|
+
\`\`\`
|
|
295
|
+
/causantic-debug
|
|
296
|
+
/causantic-debug SQLITE_BUSY database is locked
|
|
297
|
+
/causantic-debug the embedder crashes on large files
|
|
298
|
+
\`\`\`
|
|
299
|
+
|
|
300
|
+
## Workflow
|
|
301
|
+
|
|
302
|
+
1. **Extract the error**: If no argument provided, extract the most recent error message or stack trace from the current conversation. If an argument is provided, use that as the search query.
|
|
303
|
+
2. **Search for the error/issue**: Use \`recall\` with the error text, \`range: "long"\` to search broadly across sessions
|
|
304
|
+
3. **Check for related patterns**: Use \`predict\` with the same context to surface tangentially related issues
|
|
305
|
+
4. **Present findings**:
|
|
306
|
+
- Prior occurrences of this or similar errors
|
|
307
|
+
- What was tried (including failed approaches)
|
|
308
|
+
- What ultimately resolved it
|
|
309
|
+
|
|
310
|
+
## Parameters
|
|
311
|
+
|
|
312
|
+
- **recall**: query = error text (from argument or extracted from conversation), range = "long", project = current project
|
|
313
|
+
- **predict**: context = same error text, project = current project
|
|
314
|
+
|
|
315
|
+
## Output Format
|
|
316
|
+
|
|
317
|
+
- **Prior Occurrences**: matching past encounters with dates
|
|
318
|
+
- **What Was Tried**: approaches attempted, including failures
|
|
319
|
+
- **Resolution**: what ultimately worked
|
|
320
|
+
- **Related Issues**: other potentially connected problems
|
|
321
|
+
|
|
322
|
+
If no matches found, say so clearly — do not fabricate matches.
|
|
323
|
+
|
|
324
|
+
## Guidelines
|
|
325
|
+
|
|
326
|
+
- When invoked with no arguments, scan the current conversation for the most recent error, stack trace, or failing test output and use that automatically
|
|
327
|
+
- Include failed approaches — knowing what didn't work is as valuable as what did
|
|
328
|
+
- Quote relevant snippets from past sessions rather than paraphrasing
|
|
329
|
+
- If memory shows a recurring pattern, flag it: "This error has appeared N times"
|
|
330
|
+
`,
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
dirName: 'causantic-context',
|
|
334
|
+
content: `---
|
|
335
|
+
name: causantic-context
|
|
336
|
+
description: "Deep dive into a codebase area by combining decision history, evolution, and recent activity from memory. Use when you need comprehensive background on a module, feature, or design."
|
|
337
|
+
argument-hint: [area or topic]
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
# Deep Context
|
|
341
|
+
|
|
342
|
+
Build comprehensive context about a codebase area by combining decision history, evolution, and recent activity from memory.
|
|
343
|
+
|
|
344
|
+
## Usage
|
|
345
|
+
|
|
346
|
+
\`\`\`
|
|
347
|
+
/causantic-context the authentication module
|
|
348
|
+
/causantic-context src/storage/chunk-store.ts
|
|
349
|
+
/causantic-context how we handle encryption
|
|
350
|
+
\`\`\`
|
|
351
|
+
|
|
352
|
+
## Workflow
|
|
353
|
+
|
|
354
|
+
1. **Get decision history**: Use \`explain\` with the topic for historical narrative and rationale
|
|
355
|
+
2. **Get recent work**: Use \`recall\` with the topic and \`range: "short"\` for recent changes
|
|
356
|
+
3. **Present as a structured briefing**
|
|
357
|
+
|
|
358
|
+
## Output Format
|
|
359
|
+
|
|
360
|
+
- **Purpose**: What this area does (from memory's perspective)
|
|
361
|
+
- **Key Decisions**: Decisions that shaped this area, with rationale
|
|
362
|
+
- **Evolution**: Major changes over time
|
|
363
|
+
- **Constraints & Tech Debt**: Known limitations or workarounds
|
|
364
|
+
- **Recent Activity**: What was recently changed or discussed
|
|
365
|
+
|
|
366
|
+
## Guidelines
|
|
367
|
+
|
|
368
|
+
- Focus on the "why" — the user can read the code for the "what"
|
|
369
|
+
- If memory has conflicting information across time, present the most recent and note the evolution
|
|
370
|
+
- If memory has little context for the area, say so honestly
|
|
371
|
+
`,
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
dirName: 'causantic-crossref',
|
|
375
|
+
content: `---
|
|
376
|
+
name: causantic-crossref
|
|
377
|
+
description: "Search memory across all projects to find relevant patterns, solutions, or approaches. Use for cross-project knowledge transfer and finding reusable solutions."
|
|
378
|
+
argument-hint: [pattern or topic]
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
# Cross-Project Reference
|
|
382
|
+
|
|
383
|
+
Search memory across all projects to find relevant patterns, solutions, or approaches.
|
|
384
|
+
|
|
385
|
+
## Usage
|
|
386
|
+
|
|
387
|
+
\`\`\`
|
|
388
|
+
/causantic-crossref rate limiting implementation
|
|
389
|
+
/causantic-crossref how we handle database migrations
|
|
390
|
+
/causantic-crossref error retry patterns
|
|
391
|
+
\`\`\`
|
|
392
|
+
|
|
393
|
+
## Workflow
|
|
394
|
+
|
|
395
|
+
1. **Search all projects**: Use \`recall\` WITHOUT a project filter, \`range: "long"\`
|
|
396
|
+
2. **Surface related patterns**: Use \`predict\` without a project filter
|
|
397
|
+
3. **Group by project**: Organize results by which project they came from
|
|
398
|
+
4. **Highlight transferable insights**: Focus on what can be reused or adapted
|
|
399
|
+
|
|
400
|
+
## Output Format
|
|
401
|
+
|
|
402
|
+
Group findings by project:
|
|
403
|
+
- **[Project A]**: relevant findings
|
|
404
|
+
- **[Project B]**: relevant findings
|
|
405
|
+
- **Transferable Patterns**: what can be reused or adapted
|
|
406
|
+
|
|
407
|
+
## Guidelines
|
|
408
|
+
|
|
409
|
+
- Always attribute findings to their source project
|
|
410
|
+
- Highlight patterns that transfer well vs project-specific details
|
|
411
|
+
- This is inherently a broad search — expect some noise
|
|
412
|
+
`,
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
dirName: 'causantic-retro',
|
|
416
|
+
content: `---
|
|
417
|
+
name: causantic-retro
|
|
418
|
+
description: "Analyze patterns across past sessions to surface recurring themes, problems, and decisions. Use for retrospectives, sprint reviews, or understanding work patterns."
|
|
419
|
+
argument-hint: [time range or topic]
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
# Retrospective Analysis
|
|
423
|
+
|
|
424
|
+
Analyze patterns across past sessions to surface recurring themes, problems, and decisions.
|
|
425
|
+
|
|
426
|
+
## Usage
|
|
427
|
+
|
|
428
|
+
\`\`\`
|
|
429
|
+
/causantic-retro
|
|
430
|
+
/causantic-retro past month
|
|
431
|
+
/causantic-retro deployment issues
|
|
432
|
+
\`\`\`
|
|
433
|
+
|
|
434
|
+
## Workflow
|
|
435
|
+
|
|
436
|
+
1. **Determine scope**:
|
|
437
|
+
- Time range specified → use \`list-sessions\` with that window
|
|
438
|
+
- Topic specified → use \`recall\` with \`range: "long"\`
|
|
439
|
+
- Neither → default to \`days_back: 30\`
|
|
440
|
+
2. **Gather context**: Use \`recall\` with \`range: "long"\` across the scope
|
|
441
|
+
3. **Synthesize patterns**: Analyze for recurring themes
|
|
442
|
+
|
|
443
|
+
## Output Format
|
|
444
|
+
|
|
445
|
+
- **Sessions Analyzed**: count and date range
|
|
446
|
+
- **Recurring Patterns**: themes across multiple sessions
|
|
447
|
+
- **Decisions Made**: key decisions with dates and context
|
|
448
|
+
- **Recurring Issues**: problems that came up more than once
|
|
449
|
+
- **Observations**: notable patterns in how work was done
|
|
450
|
+
|
|
451
|
+
## Guidelines
|
|
452
|
+
|
|
453
|
+
- Synthesize, don't just dump raw memory
|
|
454
|
+
- Look for patterns across sessions, not just within them
|
|
455
|
+
- Be honest about gaps: if memory is sparse for a period, note it
|
|
456
|
+
- Works best with 5+ sessions of history
|
|
457
|
+
`,
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
dirName: 'causantic-cleanup',
|
|
461
|
+
content: `---
|
|
462
|
+
name: causantic-cleanup
|
|
463
|
+
description: "Memory-informed codebase review and cleanup plan. Combines comprehensive code analysis with historical context from Causantic memory to create an actionable cleanup plan."
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
# Codebase Cleanup & Architecture Review
|
|
467
|
+
|
|
468
|
+
Perform a comprehensive review of the codebase and create a cleanup plan aligned to clean code and clean architecture principles, enriched with historical context from Causantic memory. Primary goals: audit dependency health (security vulnerabilities, deprecations, unmaintained projects), resolve linting errors and warnings, remove duplication, improve readability, eliminate dead code and artifacts, consolidate documentation, and enable high test coverage (70%+ target, ideally near 100%).
|
|
469
|
+
|
|
470
|
+
## Invoke Planning Mode
|
|
471
|
+
|
|
472
|
+
**Before any analysis, enter planning mode.** The output of this skill is a plan for user approval, not immediate code changes.
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## Phase 1: Codebase Discovery
|
|
477
|
+
|
|
478
|
+
### 1.1 Project Structure Analysis
|
|
479
|
+
- Map the directory structure and identify architectural layers
|
|
480
|
+
- Identify entry points, core domain, and infrastructure boundaries
|
|
481
|
+
- Note the tech stack, frameworks, and key dependencies
|
|
482
|
+
- Find existing tests and assess current coverage
|
|
483
|
+
|
|
484
|
+
### 1.2 Internal Dependency Analysis
|
|
485
|
+
- Map internal dependencies between modules/packages
|
|
486
|
+
- Identify circular dependencies
|
|
487
|
+
- Check for dependency direction violations (dependencies should point inward)
|
|
488
|
+
- Note coupling between modules
|
|
489
|
+
|
|
490
|
+
### 1.3 External Dependency Health Audit
|
|
491
|
+
|
|
492
|
+
**Version Currency & Updates:**
|
|
493
|
+
- List all direct dependencies with current pinned version vs latest available
|
|
494
|
+
- Identify dependencies more than one major version behind
|
|
495
|
+
- Flag any dependencies with pending breaking changes in the next major version
|
|
496
|
+
- Check for deprecated dependencies (marked deprecated by maintainers)
|
|
497
|
+
|
|
498
|
+
**Security Vulnerabilities:**
|
|
499
|
+
- Run ecosystem security audit tools (\`cargo audit\`, \`npm audit\`, \`pip-audit\`, \`govulncheck\`, etc.)
|
|
500
|
+
- Cross-reference dependencies against known vulnerability databases (RustSec, GitHub Advisory, NIST NVD)
|
|
501
|
+
- Classify findings by severity: critical, high, medium, low
|
|
502
|
+
- For each vulnerability, note whether a patched version exists
|
|
503
|
+
- Check transitive (indirect) dependencies for vulnerabilities — not just direct ones
|
|
504
|
+
|
|
505
|
+
**Project Health & Sustainability:**
|
|
506
|
+
For each dependency, assess maintenance health signals:
|
|
507
|
+
- **Last release date** — flag if >12 months since last publish
|
|
508
|
+
- **Last commit date** — flag if >6 months since last commit to default branch
|
|
509
|
+
- **Open issues / PRs** — flag accumulating unanswered issues
|
|
510
|
+
- **Bus factor** — flag single-maintainer projects for critical dependencies
|
|
511
|
+
- **Download trends** — flag declining adoption (ecosystem-specific: crates.io, npm, PyPI)
|
|
512
|
+
- **Funding / backing** — note whether the project has organisational support or is volunteer-only
|
|
513
|
+
- **Ecosystem signals** — check for "looking for maintainer" notices, archived repos, or successor projects
|
|
514
|
+
|
|
515
|
+
**Risk Classification:**
|
|
516
|
+
Classify each dependency into:
|
|
517
|
+
| Risk Level | Criteria |
|
|
518
|
+
|-----------|----------|
|
|
519
|
+
| **Low** | Actively maintained, multiple contributors, backed by org, no known CVEs |
|
|
520
|
+
| **Medium** | Maintained but single maintainer, or infrequent releases, or minor CVEs patched |
|
|
521
|
+
| **High** | Unmaintained (>12 months), single maintainer gone, unpatched CVEs, or deprecated |
|
|
522
|
+
| **Critical** | Known exploited vulnerabilities, abandoned with no successor, or archived |
|
|
523
|
+
|
|
524
|
+
**Mitigation Strategies for High/Critical Risk:**
|
|
525
|
+
For each high/critical risk dependency, recommend one of:
|
|
526
|
+
1. **Bump** — newer version resolves the issue
|
|
527
|
+
2. **Replace** — suggest well-maintained alternative with migration path
|
|
528
|
+
3. **Fork** — if no alternative exists, consider maintaining a fork
|
|
529
|
+
4. **Embed** — for small or thin dependencies, inline the relevant code to eliminate the external dependency entirely (reduces supply chain risk)
|
|
530
|
+
5. **Remove** — if the dependency is no longer needed
|
|
531
|
+
|
|
532
|
+
### 1.4 Linter & Static Analysis Audit
|
|
533
|
+
|
|
534
|
+
**Run all configured linters with warnings enabled:**
|
|
535
|
+
Detect the project's linting tools and run them in strict/pedantic mode to surface the full picture:
|
|
536
|
+
|
|
537
|
+
| Ecosystem | Lint Command | Notes |
|
|
538
|
+
|-----------|-------------|-------|
|
|
539
|
+
| Rust | \`cargo clippy --workspace --all-features -- -W clippy::pedantic\` | Run both default and pedantic; separate findings by severity |
|
|
540
|
+
| TypeScript/JS | \`eslint . --max-warnings 0\` or \`biome check .\` | Check for \`eslint-disable\` comments and \`@ts-ignore\` / \`@ts-expect-error\` suppressions |
|
|
541
|
+
| Python | \`ruff check .\` or \`flake8 . --statistics\` | Also check \`mypy\`/\`pyright\` type errors |
|
|
542
|
+
| Go | \`go vet ./...\` and \`staticcheck ./...\` | Check for \`//nolint\` directives |
|
|
543
|
+
| General | Any project-specific linters in CI config or pre-commit hooks | Match what CI enforces |
|
|
544
|
+
|
|
545
|
+
**Classify findings:**
|
|
546
|
+
- **Errors** — code that won't compile, type errors, or lint rules configured as errors. These must be fixed.
|
|
547
|
+
- **Warnings** — potential bugs, style issues, or best practice violations. Triage by category.
|
|
548
|
+
- **Suppressions** — \`#[allow(...)]\`, \`// eslint-disable\`, \`@ts-ignore\`, \`# noqa\`, \`//nolint\`, etc. Audit each:
|
|
549
|
+
- Is the suppression still necessary? (The underlying issue may have been fixed)
|
|
550
|
+
- Is there a comment explaining why it's suppressed?
|
|
551
|
+
- Can the code be refactored to eliminate the need for suppression?
|
|
552
|
+
|
|
553
|
+
**Categorise lint findings:**
|
|
554
|
+
|
|
555
|
+
| Category | Examples | Priority |
|
|
556
|
+
|----------|---------|----------|
|
|
557
|
+
| **Correctness** | Unused results, unchecked errors, unreachable code, type mismatches | High — likely bugs |
|
|
558
|
+
| **Performance** | Unnecessary allocations, redundant clones, inefficient patterns | Medium — profile first |
|
|
559
|
+
| **Style & Idiom** | Non-idiomatic patterns, naming conventions, import ordering | Low — batch fix |
|
|
560
|
+
| **Complexity** | Overly complex expressions, deeply nested logic, long functions | Medium — readability |
|
|
561
|
+
| **Deprecation** | Use of deprecated APIs, functions, or language features | High — will break on upgrade |
|
|
562
|
+
|
|
563
|
+
**Formatter compliance:**
|
|
564
|
+
- Run the project formatter (\`cargo fmt\`, \`prettier\`, \`black\`, \`gofmt\`, etc.) in check mode
|
|
565
|
+
- Note any files that don't conform
|
|
566
|
+
- Check if formatting is enforced in CI — if not, recommend adding it
|
|
567
|
+
|
|
568
|
+
### 1.5 Code Metrics Gathering
|
|
569
|
+
- Identify large files (>300 lines) and complex functions (>30 lines)
|
|
570
|
+
- Find files with high cyclomatic complexity
|
|
571
|
+
- Locate code with deep nesting (>3 levels)
|
|
572
|
+
- Note long parameter lists (>4 parameters)
|
|
573
|
+
|
|
574
|
+
\`\`\`
|
|
575
|
+
✓ CHECKPOINT: Phase 1 complete - Codebase Discovery
|
|
576
|
+
\`\`\`
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## Phase 2: Memory-Informed Context Gathering
|
|
581
|
+
|
|
582
|
+
**This phase uses Causantic memory to enrich the review with historical context.**
|
|
583
|
+
|
|
584
|
+
### 2.1 Decision History
|
|
585
|
+
- Use \`explain\` to retrieve the history behind major architectural decisions
|
|
586
|
+
- Use \`recall\` with \`range: "long"\` to find past discussions about code quality, tech debt, and refactoring
|
|
587
|
+
- Document: why things are the way they are, what was tried before, what constraints exist
|
|
588
|
+
|
|
589
|
+
### 2.2 Known Tech Debt
|
|
590
|
+
- Use \`recall\` with queries like "tech debt", "TODO", "workaround", "hack", "temporary" scoped to the project
|
|
591
|
+
- Use \`predict\` to surface areas that memory suggests are problematic
|
|
592
|
+
- Cross-reference memory findings with current code state
|
|
593
|
+
|
|
594
|
+
### 2.3 Past Cleanup Attempts
|
|
595
|
+
- Use \`recall\` to search for previous refactoring or cleanup work
|
|
596
|
+
- Note what was done before, what worked, and what was abandoned
|
|
597
|
+
- Avoid recommending changes that were previously tried and rejected (unless circumstances changed)
|
|
598
|
+
|
|
599
|
+
### 2.4 Dependency History
|
|
600
|
+
- Use \`recall\` to search for past dependency upgrade attempts, compatibility issues, or migration discussions
|
|
601
|
+
- Use \`explain\` to understand why specific dependency versions may be pinned
|
|
602
|
+
- Cross-reference memory findings with current dependency state — avoid recommending upgrades that were previously tried and caused issues
|
|
603
|
+
|
|
604
|
+
### 2.5 Lint & Suppression History
|
|
605
|
+
- Use \`recall\` to search for past discussions about lint suppressions, intentional \`eslint-disable\` or \`@ts-ignore\` additions
|
|
606
|
+
- Check if past sessions document why certain warnings were left unfixed
|
|
607
|
+
- Note when memory shows a suppression was deliberately added for a specific edge case
|
|
608
|
+
|
|
609
|
+
\`\`\`
|
|
610
|
+
✓ CHECKPOINT: Phase 2 complete - Memory-Informed Context Gathering
|
|
611
|
+
\`\`\`
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## Phase 3: Documentation Review
|
|
616
|
+
|
|
617
|
+
### 3.1 Documentation Inventory
|
|
618
|
+
- Locate all documentation files (README, docs/, wiki, inline docs)
|
|
619
|
+
- Identify documentation types: API docs, architecture docs, setup guides, user guides
|
|
620
|
+
- Map documentation to corresponding code/features
|
|
621
|
+
- Note documentation format and tooling (markdown, JSDoc, Sphinx, etc.)
|
|
622
|
+
|
|
623
|
+
### 3.2 Documentation Quality Assessment
|
|
624
|
+
- Check for outdated or stale documentation (doesn't match current code)
|
|
625
|
+
- Identify duplicate documentation (same info in multiple places)
|
|
626
|
+
- Find conflicting documentation (contradictory information)
|
|
627
|
+
- Note incomplete documentation (missing critical sections)
|
|
628
|
+
- Assess documentation accessibility and discoverability
|
|
629
|
+
|
|
630
|
+
### 3.3 Documentation Consolidation Plan
|
|
631
|
+
- Recommend single source of truth for each topic
|
|
632
|
+
- Identify documentation to merge, update, or remove
|
|
633
|
+
- Suggest documentation structure aligned with project architecture
|
|
634
|
+
- Propose automation for keeping docs in sync (doc generation, CI checks)
|
|
635
|
+
|
|
636
|
+
\`\`\`
|
|
637
|
+
✓ CHECKPOINT: Phase 3 complete - Documentation Review
|
|
638
|
+
\`\`\`
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
## Phase 4: Pattern Analysis
|
|
643
|
+
|
|
644
|
+
### 4.1 Duplication Detection
|
|
645
|
+
Search for:
|
|
646
|
+
- Exact code duplicates (copy-paste)
|
|
647
|
+
- Structural duplicates (same logic, different names)
|
|
648
|
+
- Semantic duplicates (same purpose, different implementation)
|
|
649
|
+
- Repeated patterns that could be abstracted
|
|
650
|
+
|
|
651
|
+
### 4.2 Dead Code & Artifact Detection
|
|
652
|
+
|
|
653
|
+
**Dead and Unused Code:**
|
|
654
|
+
- Unreachable code paths
|
|
655
|
+
- Unused functions, methods, and classes
|
|
656
|
+
- Unused variables and imports
|
|
657
|
+
- Vestigial code from removed features
|
|
658
|
+
- Commented-out code blocks
|
|
659
|
+
- Deprecated code still present
|
|
660
|
+
|
|
661
|
+
**Debugging Artifacts:**
|
|
662
|
+
- Console.log, print statements, and debug output
|
|
663
|
+
- Hardcoded debug flags or conditions
|
|
664
|
+
- Debug-only code paths
|
|
665
|
+
- Temporary workarounds left in place
|
|
666
|
+
|
|
667
|
+
**Testing Artifacts:**
|
|
668
|
+
- Orphaned test files for deleted code
|
|
669
|
+
- Test fixtures no longer used
|
|
670
|
+
- Mock data files that are stale
|
|
671
|
+
- Test utilities that aren't called
|
|
672
|
+
|
|
673
|
+
**Outdated Artifacts:**
|
|
674
|
+
- Old configuration files (for removed tools/services)
|
|
675
|
+
- Legacy migration scripts that have been applied
|
|
676
|
+
- Backup files (.bak, .old, .orig)
|
|
677
|
+
- Generated files that should be in .gitignore
|
|
678
|
+
- Old build outputs or cache directories
|
|
679
|
+
- Stale lock files or dependency snapshots
|
|
680
|
+
|
|
681
|
+
### 4.3 Architecture Assessment
|
|
682
|
+
|
|
683
|
+
**Clean Architecture Alignment:**
|
|
684
|
+
- Is domain logic independent of frameworks and infrastructure?
|
|
685
|
+
- Are use cases clearly defined and separated?
|
|
686
|
+
- Do dependencies point inward (toward domain)?
|
|
687
|
+
- Is the domain free of I/O and side effects?
|
|
688
|
+
|
|
689
|
+
**SOLID Principles:**
|
|
690
|
+
- **S**: Are there classes/modules doing too much?
|
|
691
|
+
- **O**: Can behaviour be extended without modification?
|
|
692
|
+
- **L**: Are substitutions safe across inheritance?
|
|
693
|
+
- **I**: Are interfaces minimal and focused?
|
|
694
|
+
- **D**: Are high-level modules depending on abstractions?
|
|
695
|
+
|
|
696
|
+
### 4.4 Code Quality Assessment
|
|
697
|
+
|
|
698
|
+
**Readability:**
|
|
699
|
+
- Are names self-documenting?
|
|
700
|
+
- Is the code explicit over implicit?
|
|
701
|
+
- Are functions small and focused?
|
|
702
|
+
- Is nesting depth reasonable?
|
|
703
|
+
|
|
704
|
+
**Maintainability:**
|
|
705
|
+
- Can components be understood in isolation?
|
|
706
|
+
- Are side effects contained and explicit?
|
|
707
|
+
- Is state management clear?
|
|
708
|
+
- Are error paths handled consistently?
|
|
709
|
+
|
|
710
|
+
\`\`\`
|
|
711
|
+
✓ CHECKPOINT: Phase 4 complete - Pattern Analysis
|
|
712
|
+
\`\`\`
|
|
713
|
+
|
|
714
|
+
---
|
|
715
|
+
|
|
716
|
+
## Phase 5: Testability Analysis
|
|
717
|
+
|
|
718
|
+
### 5.1 Current Test Assessment
|
|
719
|
+
- Document existing test coverage percentage
|
|
720
|
+
- Identify test types present (unit, integration, e2e)
|
|
721
|
+
- Note testing frameworks and patterns in use
|
|
722
|
+
- Find untested critical paths
|
|
723
|
+
|
|
724
|
+
### 5.2 Testability Barriers
|
|
725
|
+
Identify code that is hard to test:
|
|
726
|
+
- Tight coupling to infrastructure (DB, APIs, filesystem)
|
|
727
|
+
- Hidden dependencies (singletons, global state)
|
|
728
|
+
- Side effects mixed with business logic
|
|
729
|
+
- Large functions doing multiple things
|
|
730
|
+
- Missing dependency injection
|
|
731
|
+
|
|
732
|
+
### 5.3 Coverage Gap Analysis
|
|
733
|
+
Prioritise untested areas by:
|
|
734
|
+
1. Business criticality
|
|
735
|
+
2. Change frequency
|
|
736
|
+
3. Complexity/risk
|
|
737
|
+
4. Ease of testing after refactor
|
|
738
|
+
|
|
739
|
+
\`\`\`
|
|
740
|
+
✓ CHECKPOINT: Phase 5 complete - Testability Analysis
|
|
741
|
+
\`\`\`
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
745
|
+
## Phase 6: Cleanup Plan Creation
|
|
746
|
+
|
|
747
|
+
### 6.1 Dependency Actions
|
|
748
|
+
|
|
749
|
+
**Immediate Security Fixes:**
|
|
750
|
+
| Dependency | Current | Fix Version | Vulnerability | Severity |
|
|
751
|
+
|-----------|---------|-------------|---------------|----------|
|
|
752
|
+
| ... | ... | ... | CVE-... | critical/high |
|
|
753
|
+
|
|
754
|
+
**Version Bumps:**
|
|
755
|
+
| Dependency | Current | Latest | Breaking Changes | Notes |
|
|
756
|
+
|-----------|---------|--------|------------------|-------|
|
|
757
|
+
| ... | ... | ... | yes/no | ... |
|
|
758
|
+
|
|
759
|
+
**At-Risk Dependencies:**
|
|
760
|
+
| Dependency | Risk Level | Issue | Recommended Action |
|
|
761
|
+
|-----------|-----------|-------|-------------------|
|
|
762
|
+
| ... | high/critical | unmaintained/deprecated/... | replace with X / embed / fork / remove |
|
|
763
|
+
|
|
764
|
+
For each at-risk dependency, include:
|
|
765
|
+
- Why it's flagged (specific health signals)
|
|
766
|
+
- Recommended alternative (if replacing), with brief comparison
|
|
767
|
+
- Migration complexity estimate (trivial / moderate / significant)
|
|
768
|
+
- If recommending embed: identify the specific functions/types used and estimate the inlining effort
|
|
769
|
+
|
|
770
|
+
### 6.2 Lint & Static Analysis Cleanup
|
|
771
|
+
|
|
772
|
+
**Errors (must fix):**
|
|
773
|
+
| File | Line | Lint Rule | Message | Fix |
|
|
774
|
+
|------|------|-----------|---------|-----|
|
|
775
|
+
| ... | ... | ... | ... | ... |
|
|
776
|
+
|
|
777
|
+
**Warnings by category:**
|
|
778
|
+
| Category | Count | Examples | Suggested Approach |
|
|
779
|
+
|----------|-------|---------|-------------------|
|
|
780
|
+
| Correctness | N | unused Result in \`foo.ts:42\` | Fix individually — likely bugs |
|
|
781
|
+
| Deprecation | N | \`old_api()\` in \`bar.ts:15\` | Migrate to replacement API |
|
|
782
|
+
| Performance | N | unnecessary clone in \`baz.ts:88\` | Batch fix, profile first |
|
|
783
|
+
| Style/Idiom | N | non-idiomatic match in \`qux.ts:20\` | Batch fix in single commit |
|
|
784
|
+
| Complexity | N | cognitive complexity 25 in \`parse()\` | Refactor as part of Phase 4 |
|
|
785
|
+
|
|
786
|
+
**Suppression audit:**
|
|
787
|
+
| File | Line | Suppression | Still Needed? | Action |
|
|
788
|
+
|------|------|------------|---------------|--------|
|
|
789
|
+
| ... | ... | \`// eslint-disable\` | yes/no | keep with comment / remove / refactor |
|
|
790
|
+
|
|
791
|
+
**Formatter fixes:**
|
|
792
|
+
- List files not conforming to project formatter
|
|
793
|
+
- Recommend: run formatter and commit as standalone PR (no logic changes)
|
|
794
|
+
|
|
795
|
+
### 6.3 Dead Code & Artifact Removal
|
|
796
|
+
|
|
797
|
+
**Immediate Removal** (safe to delete):
|
|
798
|
+
- Commented-out code (preserved in version control)
|
|
799
|
+
- Unused imports and variables
|
|
800
|
+
- Debug statements and logging
|
|
801
|
+
- Backup and temporary files
|
|
802
|
+
- Orphaned test files
|
|
803
|
+
|
|
804
|
+
**Careful Removal** (verify before deleting):
|
|
805
|
+
- Unused functions (check for dynamic calls)
|
|
806
|
+
- Vestigial feature code (confirm feature is truly removed)
|
|
807
|
+
- Old configuration (ensure not referenced)
|
|
808
|
+
- Deprecated code (check for external consumers)
|
|
809
|
+
|
|
810
|
+
### 6.4 Documentation Updates
|
|
811
|
+
|
|
812
|
+
**Documentation Actions:**
|
|
813
|
+
| Document | Action | Reason |
|
|
814
|
+
|----------|--------|--------|
|
|
815
|
+
| ... | Keep/Update/Merge/Remove | ... |
|
|
816
|
+
|
|
817
|
+
**Consolidation Tasks:**
|
|
818
|
+
- Merge duplicate docs into single source
|
|
819
|
+
- Update outdated documentation
|
|
820
|
+
- Remove documentation for deleted features
|
|
821
|
+
- Add missing critical documentation
|
|
822
|
+
|
|
823
|
+
### 6.5 Refactoring Opportunities
|
|
824
|
+
|
|
825
|
+
Categorise findings into:
|
|
826
|
+
|
|
827
|
+
**Quick Wins** (low effort, high impact)
|
|
828
|
+
- Remove dead code, unused imports, and debug statements
|
|
829
|
+
- Extract duplicated code into shared utilities
|
|
830
|
+
- Rename unclear variables/functions
|
|
831
|
+
- Fix obvious SOLID violations
|
|
832
|
+
|
|
833
|
+
**Structural Improvements** (medium effort)
|
|
834
|
+
- Extract classes/modules from large files
|
|
835
|
+
- Introduce missing abstractions
|
|
836
|
+
- Separate pure logic from side effects
|
|
837
|
+
- Add dependency injection where missing
|
|
838
|
+
|
|
839
|
+
**Architectural Changes** (high effort)
|
|
840
|
+
- Restructure to proper layers
|
|
841
|
+
- Extract bounded contexts
|
|
842
|
+
- Introduce proper interfaces/ports
|
|
843
|
+
- Migrate to cleaner patterns
|
|
844
|
+
|
|
845
|
+
### 6.6 Testing Strategy
|
|
846
|
+
|
|
847
|
+
For each area, recommend:
|
|
848
|
+
- What test types to add (unit/integration/e2e)
|
|
849
|
+
- What refactoring enables testing
|
|
850
|
+
- Order of test introduction
|
|
851
|
+
- Target coverage per module
|
|
852
|
+
|
|
853
|
+
**Testing Pyramid Target:**
|
|
854
|
+
- Unit tests: 70-80% of tests (fast, isolated)
|
|
855
|
+
- Integration tests: 15-25% (component boundaries)
|
|
856
|
+
- E2E tests: 5-10% (critical paths only)
|
|
857
|
+
|
|
858
|
+
### 6.7 Prioritised Backlog
|
|
859
|
+
|
|
860
|
+
Create a prioritised list considering:
|
|
861
|
+
1. **Security vulnerability fixes** — patch or bump dependencies with known CVEs (critical/high first)
|
|
862
|
+
2. **Lint errors & correctness warnings** — fix compiler/linter errors and correctness-category warnings (likely bugs)
|
|
863
|
+
3. **At-risk dependency mitigation** — replace, embed, or fork unmaintained/deprecated dependencies
|
|
864
|
+
4. **Dead code removal** — quick wins that reduce noise
|
|
865
|
+
5. **Formatter & style lint fixes** — run formatter, fix style warnings (standalone PR, no logic changes)
|
|
866
|
+
6. **Dependency version bumps** — bring dependencies up to date (group minor/patch bumps)
|
|
867
|
+
7. **Suppression audit** — remove stale \`eslint-disable\` / \`@ts-ignore\` / \`# noqa\` directives
|
|
868
|
+
8. **Unlocks testing** — refactors that enable high-value tests
|
|
869
|
+
9. **Documentation consolidation** — reduce confusion and maintenance burden
|
|
870
|
+
10. **High duplication** — consolidation opportunities
|
|
871
|
+
11. **High complexity** — simplification targets (also addresses complexity lint warnings)
|
|
872
|
+
12. **Architectural violations** — dependency direction fixes
|
|
873
|
+
13. **Technical debt hotspots** — frequently changed problem areas
|
|
874
|
+
|
|
875
|
+
\`\`\`
|
|
876
|
+
✓ CHECKPOINT: Phase 6 complete - Cleanup Plan Creation
|
|
877
|
+
\`\`\`
|
|
878
|
+
|
|
879
|
+
---
|
|
880
|
+
|
|
881
|
+
## Output Format
|
|
882
|
+
|
|
883
|
+
Write the plan to \`CLEANUP_PLAN.md\` in project root with:
|
|
884
|
+
|
|
885
|
+
\`\`\`markdown
|
|
886
|
+
# Codebase Cleanup Plan
|
|
887
|
+
|
|
888
|
+
## Executive Summary
|
|
889
|
+
[2-3 paragraph overview of findings and recommended approach]
|
|
890
|
+
|
|
891
|
+
## Current State
|
|
892
|
+
- **Architecture**: [assessment]
|
|
893
|
+
- **Test Coverage**: [current %]
|
|
894
|
+
- **Documentation**: [assessment]
|
|
895
|
+
- **Dependency Health**: [assessment — e.g., "3 critical CVEs, 5 outdated, 2 unmaintained"]
|
|
896
|
+
- **Lint Health**: [assessment — e.g., "0 errors, 12 warnings (3 correctness, 9 style), 5 stale suppressions"]
|
|
897
|
+
- **Key Issues**: [top 5-7 problems]
|
|
898
|
+
|
|
899
|
+
## Memory Context
|
|
900
|
+
- **Decisions from History**: [relevant architectural decisions from memory]
|
|
901
|
+
- **Known Tech Debt**: [tech debt items surfaced from memory]
|
|
902
|
+
- **Past Attempts**: [previous cleanup/refactoring attempts and outcomes]
|
|
903
|
+
- **Dependency History**: [past upgrade attempts, pinning reasons]
|
|
904
|
+
- **Lint/Suppression History**: [deliberate suppressions, unfixed warnings context]
|
|
905
|
+
|
|
906
|
+
## Dependency Health
|
|
907
|
+
|
|
908
|
+
### Security Fixes (Priority)
|
|
909
|
+
| Dependency | Current | Fix Version | Vulnerability | Severity |
|
|
910
|
+
|-----------|---------|-------------|---------------|----------|
|
|
911
|
+
| ... | ... | ... | CVE-... | critical/high/medium |
|
|
912
|
+
|
|
913
|
+
### At-Risk Dependencies
|
|
914
|
+
| Dependency | Risk | Issue | Action | Alternative / Notes |
|
|
915
|
+
|-----------|------|-------|--------|---------------------|
|
|
916
|
+
| ... | high/critical | unmaintained since YYYY | replace / embed / fork | ... |
|
|
917
|
+
|
|
918
|
+
### Version Bumps
|
|
919
|
+
| Dependency | Current | Latest | Breaking | Notes |
|
|
920
|
+
|-----------|---------|--------|----------|-------|
|
|
921
|
+
| ... | ... | ... | yes/no | ... |
|
|
922
|
+
|
|
923
|
+
## Lint & Static Analysis
|
|
924
|
+
|
|
925
|
+
### Errors
|
|
926
|
+
| File:Line | Rule | Message | Fix |
|
|
927
|
+
|-----------|------|---------|-----|
|
|
928
|
+
| ... | ... | ... | ... |
|
|
929
|
+
|
|
930
|
+
### Warnings (by category)
|
|
931
|
+
| Category | Count | Action |
|
|
932
|
+
|----------|-------|--------|
|
|
933
|
+
| Correctness | N | Fix individually |
|
|
934
|
+
| Deprecation | N | Migrate APIs |
|
|
935
|
+
| Performance | N | Profile then fix |
|
|
936
|
+
| Style | N | Batch fix |
|
|
937
|
+
| Complexity | N | Refactor in Phase 4 |
|
|
938
|
+
|
|
939
|
+
### Suppression Audit
|
|
940
|
+
| File:Line | Suppression | Verdict | Action |
|
|
941
|
+
|-----------|------------|---------|--------|
|
|
942
|
+
| ... | \`// eslint-disable\` | stale/valid | remove / keep with comment |
|
|
943
|
+
|
|
944
|
+
## Dead Code & Artifact Removal
|
|
945
|
+
|
|
946
|
+
### Immediate Removal
|
|
947
|
+
| Item | Location | Type | Notes |
|
|
948
|
+
|------|----------|------|-------|
|
|
949
|
+
| ... | ... | dead code/debug/artifact | ... |
|
|
950
|
+
|
|
951
|
+
### Verify Before Removal
|
|
952
|
+
| Item | Location | Verification Needed |
|
|
953
|
+
|------|----------|---------------------|
|
|
954
|
+
| ... | ... | ... |
|
|
955
|
+
|
|
956
|
+
## Documentation Consolidation
|
|
957
|
+
|
|
958
|
+
### Documents to Update
|
|
959
|
+
| Document | Updates Required |
|
|
960
|
+
|----------|------------------|
|
|
961
|
+
| ... | ... |
|
|
962
|
+
|
|
963
|
+
### Documents to Remove/Merge
|
|
964
|
+
| Document | Action | Target |
|
|
965
|
+
|----------|--------|--------|
|
|
966
|
+
| ... | merge into | ... |
|
|
967
|
+
|
|
968
|
+
## Refactoring Roadmap
|
|
969
|
+
|
|
970
|
+
### Phase 0: Dependency Health (Security & Supply Chain)
|
|
971
|
+
| Task | Impact | Effort | Dependencies Affected |
|
|
972
|
+
|------|--------|--------|----------------------|
|
|
973
|
+
| ... | ... | ... | ... |
|
|
974
|
+
|
|
975
|
+
### Phase 1: Cleanup (Remove Noise)
|
|
976
|
+
| Task | Impact | Effort | Files Affected |
|
|
977
|
+
|------|--------|--------|----------------|
|
|
978
|
+
| ... | ... | ... | ... |
|
|
979
|
+
|
|
980
|
+
### Phase 2: Foundation (Enable Testing)
|
|
981
|
+
| Task | Impact | Effort | Unlocks |
|
|
982
|
+
|------|--------|--------|---------|
|
|
983
|
+
| ... | ... | ... | ... |
|
|
984
|
+
|
|
985
|
+
### Phase 3: Consolidation (Remove Duplication)
|
|
986
|
+
| Task | Impact | Effort | Files Affected |
|
|
987
|
+
|------|--------|--------|----------------|
|
|
988
|
+
| ... | ... | ... | ... |
|
|
989
|
+
|
|
990
|
+
### Phase 4: Architecture (Clean Structure)
|
|
991
|
+
| Task | Impact | Effort | Components |
|
|
992
|
+
|------|--------|--------|------------|
|
|
993
|
+
| ... | ... | ... | ... |
|
|
994
|
+
|
|
995
|
+
## Testing Strategy
|
|
996
|
+
[Detailed testing approach per module/layer]
|
|
997
|
+
|
|
998
|
+
## Target State
|
|
999
|
+
- **Test Coverage**: [target %]
|
|
1000
|
+
- **Architecture**: [target state description]
|
|
1001
|
+
- **Documentation**: [target state]
|
|
1002
|
+
- **Key Improvements**: [expected outcomes]
|
|
1003
|
+
|
|
1004
|
+
## Risks & Considerations
|
|
1005
|
+
[Migration risks, breaking changes, dependencies]
|
|
1006
|
+
\`\`\`
|
|
1007
|
+
|
|
1008
|
+
---
|
|
1009
|
+
|
|
1010
|
+
## Guidelines
|
|
1011
|
+
|
|
1012
|
+
### Do
|
|
1013
|
+
- Be specific with file paths and line references
|
|
1014
|
+
- Quantify duplication (e.g., "duplicated in 5 places")
|
|
1015
|
+
- List every piece of dead code found
|
|
1016
|
+
- Note all debug statements for removal
|
|
1017
|
+
- Explain the "why" behind each recommendation
|
|
1018
|
+
- Consider incremental refactoring paths
|
|
1019
|
+
- Check memory before recommending changes to understand why code exists as-is
|
|
1020
|
+
- Note when memory shows a decision was deliberate vs accidental
|
|
1021
|
+
- Prioritise changes that unlock testing
|
|
1022
|
+
- Run ecosystem-specific audit tools (cargo audit, npm audit, etc.) for security findings
|
|
1023
|
+
- Check GitHub/registry pages for dependency health signals (last release, contributors, issues)
|
|
1024
|
+
- Distinguish between direct and transitive dependency vulnerabilities
|
|
1025
|
+
- Provide concrete alternatives when flagging at-risk dependencies
|
|
1026
|
+
- Estimate migration effort when suggesting dependency replacements
|
|
1027
|
+
- Run linters in strict/pedantic mode to surface the full warning set, not just what CI enforces
|
|
1028
|
+
- Audit every lint suppression — check if still needed and has an explanatory comment
|
|
1029
|
+
- Categorise lint findings (correctness vs style vs performance) so fixes can be batched sensibly
|
|
1030
|
+
- Recommend formatter-only commits as standalone PRs to keep diffs reviewable
|
|
1031
|
+
|
|
1032
|
+
### Don't
|
|
1033
|
+
- Recommend rewrites when refactoring suffices
|
|
1034
|
+
- Suggest changes that break existing tests
|
|
1035
|
+
- Over-abstract prematurely
|
|
1036
|
+
- Ignore existing team conventions without discussion
|
|
1037
|
+
- Recommend removing code that memory shows was deliberately written to handle a specific edge case
|
|
1038
|
+
- Recommend an approach that memory shows was tried and abandoned
|
|
1039
|
+
- Create a plan too large to execute incrementally
|
|
1040
|
+
- Remove code without checking for dynamic references
|
|
1041
|
+
- Delete documentation without confirming it's truly outdated
|
|
1042
|
+
- Bump major versions without noting breaking changes and migration steps
|
|
1043
|
+
- Flag a dependency as "unmaintained" just because it's stable and feature-complete (some mature libraries are intentionally low-activity)
|
|
1044
|
+
- Recommend replacing a dependency without verifying the alternative covers the actual usage
|
|
1045
|
+
- Blindly fix all pedantic lint warnings — some are noise; triage by category first
|
|
1046
|
+
- Remove lint suppressions without checking if the underlying issue is actually fixed
|
|
1047
|
+
- Mix formatter changes with logic changes in the same commit (keep diffs reviewable)
|
|
1048
|
+
|
|
1049
|
+
### Clean Code Principles to Apply
|
|
1050
|
+
- Functions should do one thing
|
|
1051
|
+
- Names should reveal intent
|
|
1052
|
+
- Comments explain "why", code explains "what"
|
|
1053
|
+
- Error handling is a separate concern
|
|
1054
|
+
- Tests are first-class citizens
|
|
1055
|
+
- Boy Scout Rule: leave code cleaner than you found it
|
|
1056
|
+
- No dead code, no commented-out code, no debug leftovers
|
|
1057
|
+
|
|
1058
|
+
### Clean Architecture Principles to Apply
|
|
1059
|
+
- Independence from frameworks
|
|
1060
|
+
- Testability without external elements
|
|
1061
|
+
- Independence from UI
|
|
1062
|
+
- Independence from database
|
|
1063
|
+
- Independence from external agencies
|
|
1064
|
+
- Dependency Rule: source code dependencies point inward
|
|
1065
|
+
|
|
1066
|
+
---
|
|
1067
|
+
|
|
1068
|
+
## Notes
|
|
1069
|
+
|
|
1070
|
+
- This skill produces a **plan**, not immediate changes
|
|
1071
|
+
- User approval required before implementing any refactoring
|
|
1072
|
+
- Large codebases may need multiple planning sessions by area
|
|
1073
|
+
- Consider breaking the plan into separate PRs for review
|
|
1074
|
+
- Dead code removal is often safest to do first as a separate PR
|
|
1075
|
+
- Documentation updates can be done in parallel with code changes
|
|
1076
|
+
`,
|
|
1077
|
+
},
|
|
1078
|
+
];
|
|
1079
|
+
/**
|
|
1080
|
+
* Returns a CLAUDE.md reference block for Causantic.
|
|
1081
|
+
* Lists all skills and provides proactive memory usage guidance.
|
|
1082
|
+
*/
|
|
1083
|
+
export function getMinimalClaudeMdBlock() {
|
|
1084
|
+
const CAUSANTIC_START = '<!-- CAUSANTIC_MEMORY_START -->';
|
|
1085
|
+
const CAUSANTIC_END = '<!-- CAUSANTIC_MEMORY_END -->';
|
|
1086
|
+
return `${CAUSANTIC_START}
|
|
1087
|
+
## Memory (Causantic)
|
|
1088
|
+
|
|
1089
|
+
Long-term memory is available via the \`causantic\` MCP server.
|
|
1090
|
+
|
|
1091
|
+
### Skills
|
|
1092
|
+
- \`/causantic-resume\` — Resume interrupted work (start-of-session briefing)
|
|
1093
|
+
- \`/causantic-recall [query]\` — Look up context from past sessions
|
|
1094
|
+
- \`/causantic-explain [topic]\` — Understand history behind decisions
|
|
1095
|
+
- \`/causantic-predict\` — Surface relevant past context proactively
|
|
1096
|
+
- \`/causantic-debug [error]\` — Search for prior encounters with an error (auto-extracts from conversation if no argument)
|
|
1097
|
+
- \`/causantic-context [area]\` — Deep dive into a codebase area's history
|
|
1098
|
+
- \`/causantic-crossref [pattern]\` — Search across all projects
|
|
1099
|
+
- \`/causantic-retro [scope]\` — Retrospective pattern analysis
|
|
1100
|
+
- \`/causantic-cleanup\` — Memory-informed codebase review and cleanup plan
|
|
1101
|
+
- \`/causantic-list-projects\` — Discover available projects
|
|
1102
|
+
- \`/causantic-reconstruct [time range]\` — Reconstruct session context by time
|
|
1103
|
+
|
|
1104
|
+
### Proactive Memory Usage
|
|
1105
|
+
|
|
1106
|
+
**Check memory automatically (no skill needed) when:**
|
|
1107
|
+
- Before saying "I don't have context from previous sessions" — always try \`recall\` first
|
|
1108
|
+
- User references past work ("remember when...", "like we did before", "that bug from last week")
|
|
1109
|
+
- When stuck on an error after 2 failed attempts — use \`recall\` with the error text before trying a 3rd approach
|
|
1110
|
+
- User asks "why" about existing code or architecture — use \`explain\` before guessing
|
|
1111
|
+
- Before making significant architectural decisions — use \`recall\` to check for prior discussions
|
|
1112
|
+
|
|
1113
|
+
**Skip memory (avoid latency) when:**
|
|
1114
|
+
- The full context is already in the conversation
|
|
1115
|
+
- Simple file operations where memory adds no value
|
|
1116
|
+
- Git operations handled by /commit, /pr, /merge, /qa
|
|
1117
|
+
- The user explicitly provides all needed context
|
|
1118
|
+
- First attempt at resolving a new error (try solving it first, check memory if stuck)
|
|
1119
|
+
|
|
1120
|
+
### Combining Memory with Other Tools
|
|
1121
|
+
|
|
1122
|
+
Memory provides historical context, not current code state. After retrieving memory:
|
|
1123
|
+
- Use file search (grep/glob) to verify remembered code still exists
|
|
1124
|
+
- Use \`git log\` to check if remembered decisions were superseded
|
|
1125
|
+
- Do not treat memory as authoritative for current file contents — always verify against the actual codebase
|
|
1126
|
+
${CAUSANTIC_END}`;
|
|
1127
|
+
}
|
|
1128
|
+
//# sourceMappingURL=skill-templates.js.map
|