@documentation-robotics/cli 0.1.0 → 0.1.5
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 +21 -0
- package/README.md +466 -693
- package/dist/analysis/data-model-analyzer.js +189 -0
- package/dist/analysis/data-model-analyzer.js.map +7 -0
- package/dist/analysis/index.js +3 -0
- package/dist/analysis/index.js.map +7 -0
- package/dist/analysis/relationship-classifier.js +181 -0
- package/dist/analysis/relationship-classifier.js.map +7 -0
- package/dist/analyzers/base-analyzer.js +1 -0
- package/dist/analyzers/base-analyzer.js.map +7 -0
- package/dist/analyzers/call-graph-utils.js +39 -0
- package/dist/analyzers/call-graph-utils.js.map +7 -0
- package/dist/analyzers/cbm-analyzer.js +1205 -0
- package/dist/analyzers/cbm-analyzer.js.map +7 -0
- package/dist/analyzers/heuristic-utils.js +55 -0
- package/dist/analyzers/heuristic-utils.js.map +7 -0
- package/dist/analyzers/mapping-loader.js +146 -0
- package/dist/analyzers/mapping-loader.js.map +7 -0
- package/dist/analyzers/registry.js +124 -0
- package/dist/analyzers/registry.js.map +7 -0
- package/dist/analyzers/session-state.js +176 -0
- package/dist/analyzers/session-state.js.map +7 -0
- package/dist/analyzers/stdio-client.js +206 -0
- package/dist/analyzers/stdio-client.js.map +7 -0
- package/dist/analyzers/types.js +15 -0
- package/dist/analyzers/types.js.map +7 -0
- package/dist/analyzers/verify-engine.js +209 -0
- package/dist/analyzers/verify-engine.js.map +7 -0
- package/dist/analyzers/verify-ignore.js +130 -0
- package/dist/analyzers/verify-ignore.js.map +7 -0
- package/dist/analyzers/version.js +8 -0
- package/dist/analyzers/version.js.map +7 -0
- package/dist/audit/ai/runner.js +41 -0
- package/dist/audit/ai/runner.js.map +7 -0
- package/dist/audit/differential-analyzer.js +183 -0
- package/dist/audit/differential-analyzer.js.map +7 -0
- package/dist/audit/index.js +32 -0
- package/dist/audit/index.js.map +7 -0
- package/dist/audit/nodes/ai/evaluator.js +49 -0
- package/dist/audit/nodes/ai/evaluator.js.map +7 -0
- package/dist/audit/nodes/ai/parser.js +55 -0
- package/dist/audit/nodes/ai/parser.js.map +7 -0
- package/dist/audit/nodes/ai/prompts.js +103 -0
- package/dist/audit/nodes/ai/prompts.js.map +7 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js +32 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js.map +7 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js +47 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js.map +7 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js +79 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js.map +7 -0
- package/dist/audit/nodes/model/orchestrator.js +82 -0
- package/dist/audit/nodes/model/orchestrator.js.map +7 -0
- package/dist/audit/nodes/spec/loader.js +116 -0
- package/dist/audit/nodes/spec/loader.js.map +7 -0
- package/dist/audit/nodes/spec/orchestrator.js +68 -0
- package/dist/audit/nodes/spec/orchestrator.js.map +7 -0
- package/dist/audit/nodes/types.js +1 -0
- package/dist/audit/nodes/types.js.map +7 -0
- package/dist/audit/pipeline/index.js +5 -0
- package/dist/audit/pipeline/index.js.map +7 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js +218 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js.map +7 -0
- package/dist/audit/relationships/ai/evaluator.js +235 -0
- package/dist/audit/relationships/ai/evaluator.js.map +7 -0
- package/dist/audit/relationships/ai/parser.js +197 -0
- package/dist/audit/relationships/ai/parser.js.map +7 -0
- package/dist/audit/relationships/ai/prompts.js +274 -0
- package/dist/audit/relationships/ai/prompts.js.map +7 -0
- package/dist/audit/relationships/analysis/balance-assessor.js +115 -0
- package/dist/audit/relationships/analysis/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js +95 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/layer-templates.js +294 -0
- package/dist/audit/relationships/analysis/layer-templates.js.map +7 -0
- package/dist/audit/relationships/graph/connectivity.js +129 -0
- package/dist/audit/relationships/graph/connectivity.js.map +7 -0
- package/dist/audit/relationships/graph/relationship-graph.js +179 -0
- package/dist/audit/relationships/graph/relationship-graph.js.map +7 -0
- package/dist/audit/relationships/model/balance-assessor.js +49 -0
- package/dist/audit/relationships/model/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/model/coverage-analyzer.js +34 -0
- package/dist/audit/relationships/model/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/duplicate-detector.js +68 -0
- package/dist/audit/relationships/model/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/model/gap-analyzer.js +41 -0
- package/dist/audit/relationships/model/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/orchestrator.js +126 -0
- package/dist/audit/relationships/model/orchestrator.js.map +7 -0
- package/dist/audit/relationships/spec/orchestrator.js +157 -0
- package/dist/audit/relationships/spec/orchestrator.js.map +7 -0
- package/dist/audit/reports/index.js +5 -0
- package/dist/audit/reports/index.js.map +7 -0
- package/dist/audit/reports/report-generator.js +118 -0
- package/dist/audit/reports/report-generator.js.map +7 -0
- package/dist/audit/snapshot-storage.js +163 -0
- package/dist/audit/snapshot-storage.js.map +7 -0
- package/dist/audit/types.js +21 -0
- package/dist/audit/types.js.map +7 -0
- package/dist/cli.js +223 -92
- package/dist/cli.js.map +3 -3
- package/dist/coding-agents/agents/claude-code.js +147 -0
- package/dist/coding-agents/agents/claude-code.js.map +7 -0
- package/dist/coding-agents/agents/index.js +5 -0
- package/dist/coding-agents/agents/index.js.map +7 -0
- package/dist/coding-agents/agents/types.js +1 -0
- package/dist/coding-agents/agents/types.js.map +7 -0
- package/dist/coding-agents/base-chat-client.js +45 -0
- package/dist/coding-agents/base-chat-client.js.map +7 -0
- package/dist/coding-agents/chat-utils.js +23 -0
- package/dist/coding-agents/chat-utils.js.map +7 -0
- package/dist/coding-agents/claude-code-client.js +246 -0
- package/dist/coding-agents/claude-code-client.js.map +7 -0
- package/dist/coding-agents/copilot-client.js +209 -0
- package/dist/coding-agents/copilot-client.js.map +7 -0
- package/dist/commands/add.js +95 -33
- package/dist/commands/add.js.map +2 -2
- package/dist/commands/analyzer.js +511 -0
- package/dist/commands/analyzer.js.map +7 -0
- package/dist/commands/audit-diff.js +49 -0
- package/dist/commands/audit-diff.js.map +7 -0
- package/dist/commands/audit-snapshots.js +62 -0
- package/dist/commands/audit-snapshots.js.map +7 -0
- package/dist/commands/audit.js +81 -0
- package/dist/commands/audit.js.map +7 -0
- package/dist/commands/catalog.js +248 -0
- package/dist/commands/catalog.js.map +7 -0
- package/dist/commands/changeset.js +577 -66
- package/dist/commands/changeset.js.map +2 -2
- package/dist/commands/chat.js +106 -83
- package/dist/commands/chat.js.map +2 -2
- package/dist/commands/claude.js +74 -0
- package/dist/commands/claude.js.map +7 -0
- package/dist/commands/conformance.js +71 -68
- package/dist/commands/conformance.js.map +2 -2
- package/dist/commands/copilot.js +75 -0
- package/dist/commands/copilot.js.map +7 -0
- package/dist/commands/delete.js +125 -11
- package/dist/commands/delete.js.map +3 -3
- package/dist/commands/discover-logic.js +44 -0
- package/dist/commands/discover-logic.js.map +7 -0
- package/dist/commands/docs.js +87 -0
- package/dist/commands/docs.js.map +7 -0
- package/dist/commands/element.js +14 -20
- package/dist/commands/element.js.map +2 -2
- package/dist/commands/export.js +13 -3
- package/dist/commands/export.js.map +2 -2
- package/dist/commands/import.js +51 -0
- package/dist/commands/import.js.map +7 -0
- package/dist/commands/info.js +30 -24
- package/dist/commands/info.js.map +2 -2
- package/dist/commands/init.js +27 -11
- package/dist/commands/init.js.map +2 -2
- package/dist/commands/list.js +63 -13
- package/dist/commands/list.js.map +3 -3
- package/dist/commands/relationship.js +225 -37
- package/dist/commands/relationship.js.map +2 -2
- package/dist/commands/report.js +54 -0
- package/dist/commands/report.js.map +7 -0
- package/dist/commands/reports.js +45 -0
- package/dist/commands/reports.js.map +7 -0
- package/dist/commands/schema.js +135 -0
- package/dist/commands/schema.js.map +7 -0
- package/dist/commands/search.js +40 -12
- package/dist/commands/search.js.map +2 -2
- package/dist/commands/show.js +58 -27
- package/dist/commands/show.js.map +2 -2
- package/dist/commands/stats.js +35 -0
- package/dist/commands/stats.js.map +7 -0
- package/dist/commands/trace.js +39 -16
- package/dist/commands/trace.js.map +2 -2
- package/dist/commands/update.js +141 -14
- package/dist/commands/update.js.map +2 -2
- package/dist/commands/upgrade.js +210 -46
- package/dist/commands/upgrade.js.map +3 -3
- package/dist/commands/validate.js +142 -23
- package/dist/commands/validate.js.map +3 -3
- package/dist/commands/version.js +8 -12
- package/dist/commands/version.js.map +2 -2
- package/dist/commands/visualize.js +155 -25
- package/dist/commands/visualize.js.map +2 -2
- package/dist/core/base-snapshot-manager.js +84 -0
- package/dist/core/base-snapshot-manager.js.map +7 -0
- package/dist/core/changeset-exporter.js +305 -0
- package/dist/core/changeset-exporter.js.map +7 -0
- package/dist/core/changeset-validator.js +41 -0
- package/dist/core/changeset-validator.js.map +7 -0
- package/dist/core/changeset.js +88 -173
- package/dist/core/changeset.js.map +2 -2
- package/dist/core/dependency-tracker.js +4 -2
- package/dist/core/dependency-tracker.js.map +2 -2
- package/dist/core/element.js +98 -27
- package/dist/core/element.js.map +2 -2
- package/dist/core/golden-copy-cache.js +290 -0
- package/dist/core/golden-copy-cache.js.map +7 -0
- package/dist/core/graph-model.js +266 -0
- package/dist/core/graph-model.js.map +7 -0
- package/dist/core/layer.js +159 -16
- package/dist/core/layer.js.map +2 -2
- package/dist/core/layers.js +32 -0
- package/dist/core/layers.js.map +7 -0
- package/dist/core/manifest.js +32 -11
- package/dist/core/manifest.js.map +2 -2
- package/dist/core/migration-registry.js +56 -1
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model.js +424 -217
- package/dist/core/model.js.map +3 -3
- package/dist/core/mutation-handler.js +179 -0
- package/dist/core/mutation-handler.js.map +7 -0
- package/dist/core/reference-registry.js +29 -21
- package/dist/core/reference-registry.js.map +2 -2
- package/dist/core/relationship-catalog.js +189 -0
- package/dist/core/relationship-catalog.js.map +7 -0
- package/dist/core/relationship-registry.js.map +2 -2
- package/dist/core/relationships.js.map +1 -1
- package/dist/core/report-data-model.js +285 -0
- package/dist/core/report-data-model.js.map +7 -0
- package/dist/core/spec-data-service.js +185 -0
- package/dist/core/spec-data-service.js.map +7 -0
- package/dist/core/spec-loader-types.js +1 -0
- package/dist/core/spec-loader-types.js.map +7 -0
- package/dist/core/spec-loader.js +234 -0
- package/dist/core/spec-loader.js.map +7 -0
- package/dist/core/staged-changeset-storage.js +282 -0
- package/dist/core/staged-changeset-storage.js.map +7 -0
- package/dist/core/staging-area.js +1002 -0
- package/dist/core/staging-area.js.map +7 -0
- package/dist/core/stats-collector.js +169 -0
- package/dist/core/stats-collector.js.map +7 -0
- package/dist/core/virtual-projection.js +443 -0
- package/dist/core/virtual-projection.js.map +7 -0
- package/dist/export/archimate-exporter.js +99 -60
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/export/audit-formatters.js +479 -0
- package/dist/export/audit-formatters.js.map +7 -0
- package/dist/export/diff-formatters.js +99 -0
- package/dist/export/diff-formatters.js.map +7 -0
- package/dist/export/export-manager.js.map +2 -2
- package/dist/export/graphml-exporter.js +44 -27
- package/dist/export/graphml-exporter.js.map +2 -2
- package/dist/export/index.js +4 -0
- package/dist/export/index.js.map +2 -2
- package/dist/export/json-schema-exporter.js +55 -42
- package/dist/export/json-schema-exporter.js.map +2 -2
- package/dist/export/markdown-exporter.js +92 -70
- package/dist/export/markdown-exporter.js.map +2 -2
- package/dist/export/markdown-generator.js +248 -0
- package/dist/export/markdown-generator.js.map +7 -0
- package/dist/export/markdown-utils.js +30 -0
- package/dist/export/markdown-utils.js.map +7 -0
- package/dist/export/mermaid-markdown-exporter.js +37 -0
- package/dist/export/mermaid-markdown-exporter.js.map +7 -0
- package/dist/export/openapi-exporter.js +119 -71
- package/dist/export/openapi-exporter.js.map +2 -2
- package/dist/export/plantuml-exporter.js +104 -39
- package/dist/export/plantuml-exporter.js.map +2 -2
- package/dist/export/report-formatters.js +111 -0
- package/dist/export/report-formatters.js.map +7 -0
- package/dist/export/stats-formatters.js +98 -0
- package/dist/export/stats-formatters.js.map +7 -0
- package/dist/export/types.js +2 -14
- package/dist/export/types.js.map +2 -2
- package/dist/export/verify-formatters.js +153 -0
- package/dist/export/verify-formatters.js.map +7 -0
- package/dist/generated/compiled-validators.js +17 -0
- package/dist/generated/compiled-validators.js.map +7 -0
- package/dist/generated/index.js +31 -0
- package/dist/generated/index.js.map +7 -0
- package/dist/generated/layer-registry.js +190 -0
- package/dist/generated/layer-registry.js.map +7 -0
- package/dist/generated/layer-types.js +7 -0
- package/dist/generated/layer-types.js.map +7 -0
- package/dist/generated/node-types.js +1719 -0
- package/dist/generated/node-types.js.map +7 -0
- package/dist/generated/relationship-index.js +14552 -0
- package/dist/generated/relationship-index.js.map +7 -0
- package/dist/import/archimate-importer.js +166 -0
- package/dist/import/archimate-importer.js.map +7 -0
- package/dist/import/index.js +47 -0
- package/dist/import/index.js.map +7 -0
- package/dist/import/openapi-importer.js +143 -0
- package/dist/import/openapi-importer.js.map +7 -0
- package/dist/import/types.js +1 -0
- package/dist/import/types.js.map +7 -0
- package/dist/integrations/base-manager.js +311 -0
- package/dist/integrations/base-manager.js.map +7 -0
- package/dist/integrations/claude-manager.js +360 -0
- package/dist/integrations/claude-manager.js.map +7 -0
- package/dist/integrations/claude_code/agents/dr-advisor.md +253 -0
- package/dist/integrations/claude_code/agents/dr-architect.md +278 -0
- package/dist/integrations/claude_code/agents/dr-extractor.md +286 -0
- package/dist/integrations/claude_code/commands/dr-changeset.md +657 -0
- package/dist/integrations/claude_code/commands/dr-design.md +373 -0
- package/dist/integrations/claude_code/commands/dr-info.md +132 -0
- package/dist/integrations/claude_code/commands/dr-init.md +251 -0
- package/dist/integrations/claude_code/commands/dr-map.md +936 -0
- package/dist/integrations/claude_code/commands/dr-model.md +493 -0
- package/dist/integrations/claude_code/commands/dr-relate.md +814 -0
- package/dist/integrations/claude_code/commands/dr-sync.md +279 -0
- package/dist/integrations/claude_code/commands/dr-validate.md +654 -0
- package/dist/integrations/claude_code/commands/dr-verify.md +559 -0
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +903 -0
- package/dist/integrations/claude_code/docs/QUICK_START.md +271 -0
- package/dist/integrations/claude_code/docs/README.md +347 -0
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +550 -0
- package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +620 -0
- package/dist/integrations/claude_code/skills/dr_03_security_layer/SKILL.md +642 -0
- package/dist/integrations/claude_code/skills/dr_04_application_layer/SKILL.md +911 -0
- package/dist/integrations/claude_code/skills/dr_05_technology_layer/SKILL.md +836 -0
- package/dist/integrations/claude_code/skills/dr_06_api_layer/SKILL.md +933 -0
- package/dist/integrations/claude_code/skills/dr_07_data_model_layer/SKILL.md +210 -0
- package/dist/integrations/claude_code/skills/dr_08_dataset_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_09_ux_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_10_navigation_layer/SKILL.md +318 -0
- package/dist/integrations/claude_code/skills/dr_11_apm_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_12_testing_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/claude_code/skills/dr_codebase_memory/SKILL.md +590 -0
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +295 -0
- package/dist/integrations/copilot-manager.js +328 -0
- package/dist/integrations/copilot-manager.js.map +7 -0
- package/dist/integrations/github_copilot/agents/dr-advisor.md +243 -0
- package/dist/integrations/github_copilot/agents/dr-architect.md +1567 -0
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +491 -0
- package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +539 -0
- package/dist/integrations/github_copilot/skills/dr_03_security_layer/SKILL.md +667 -0
- package/dist/integrations/github_copilot/skills/dr_04_application_layer/SKILL.md +670 -0
- package/dist/integrations/github_copilot/skills/dr_05_technology_layer/SKILL.md +660 -0
- package/dist/integrations/github_copilot/skills/dr_06_api_layer/SKILL.md +855 -0
- package/dist/integrations/github_copilot/skills/dr_07_data_model_layer/SKILL.md +171 -0
- package/dist/integrations/github_copilot/skills/dr_08_dataset_layer/SKILL.md +216 -0
- package/dist/integrations/github_copilot/skills/dr_09_ux_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_10_navigation_layer/SKILL.md +228 -0
- package/dist/integrations/github_copilot/skills/dr_11_apm_layer/SKILL.md +234 -0
- package/dist/integrations/github_copilot/skills/dr_12_testing_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/hash-utils.js +51 -0
- package/dist/integrations/hash-utils.js.map +7 -0
- package/dist/integrations/types.js +16 -0
- package/dist/integrations/types.js.map +7 -0
- package/dist/reports/model-layer-report-generator.js +278 -0
- package/dist/reports/model-layer-report-generator.js.map +7 -0
- package/dist/reports/model-report-data.js +57 -0
- package/dist/reports/model-report-data.js.map +7 -0
- package/dist/reports/model-report-orchestrator.js +103 -0
- package/dist/reports/model-report-orchestrator.js.map +7 -0
- package/dist/schemas/bundled/analyzers/cbm.json +595 -0
- package/dist/schemas/bundled/analyzers/manifest.json +9 -0
- package/dist/schemas/bundled/api.json +3411 -0
- package/dist/schemas/bundled/apm.json +2371 -0
- package/dist/schemas/bundled/application.json +1253 -0
- package/dist/schemas/bundled/base.json +1622 -0
- package/dist/schemas/bundled/business.json +1279 -0
- package/dist/schemas/bundled/data-model.json +1298 -0
- package/dist/schemas/bundled/data-store.json +2025 -0
- package/dist/schemas/bundled/manifest.json +93 -0
- package/dist/schemas/bundled/motivation.json +1360 -0
- package/dist/schemas/bundled/navigation.json +1874 -0
- package/dist/schemas/bundled/security.json +3488 -0
- package/dist/schemas/bundled/technology.json +2067 -0
- package/dist/schemas/bundled/testing.json +3120 -0
- package/dist/schemas/bundled/ux.json +3592 -0
- package/dist/server/schemas.js +202 -0
- package/dist/server/schemas.js.map +7 -0
- package/dist/server/server.js +1336 -252
- package/dist/server/server.js.map +3 -3
- package/dist/server/telemetry-middleware.js +22 -15
- package/dist/server/telemetry-middleware.js.map +2 -2
- package/dist/server-entry.js +65 -0
- package/dist/server-entry.js.map +7 -0
- package/dist/telemetry/config.js +89 -0
- package/dist/telemetry/config.js.map +7 -0
- package/dist/telemetry/console-interceptor.js.map +1 -1
- package/dist/telemetry/detect.js +24 -0
- package/dist/telemetry/detect.js.map +7 -0
- package/dist/telemetry/fetch-otlp-exporter.js +112 -0
- package/dist/telemetry/fetch-otlp-exporter.js.map +7 -0
- package/dist/telemetry/index.js +153 -3
- package/dist/telemetry/index.js.map +2 -2
- package/dist/telemetry/resilient-exporter.js +22 -8
- package/dist/telemetry/resilient-exporter.js.map +2 -2
- package/dist/telemetry/resilient-log-exporter.js +17 -8
- package/dist/telemetry/resilient-log-exporter.js.map +2 -2
- package/dist/telemetry/test-instrumentation.js.map +2 -2
- package/dist/types/index.js +84 -0
- package/dist/types/index.js.map +3 -3
- package/dist/types/source-reference.js +1 -0
- package/dist/types/source-reference.js.map +7 -0
- package/dist/utils/chat-logger.js +292 -0
- package/dist/utils/chat-logger.js.map +7 -0
- package/dist/utils/claude-stream.js +8 -0
- package/dist/utils/claude-stream.js.map +7 -0
- package/dist/utils/date-utils.js +7 -0
- package/dist/utils/date-utils.js.map +7 -0
- package/dist/utils/element-utils.js.map +1 -1
- package/dist/utils/errors.js +88 -15
- package/dist/utils/errors.js.map +3 -3
- package/dist/utils/export-python-annotations.js +82 -0
- package/dist/utils/export-python-annotations.js.map +7 -0
- package/dist/utils/file-io.js +7 -2
- package/dist/utils/file-io.js.map +2 -2
- package/dist/utils/file-lock.js +156 -0
- package/dist/utils/file-lock.js.map +7 -0
- package/dist/utils/id-generator.js +18 -0
- package/dist/utils/id-generator.js.map +7 -0
- package/dist/utils/layer-name-formatter.js +16 -0
- package/dist/utils/layer-name-formatter.js.map +7 -0
- package/dist/utils/markdown-anchor.js +7 -0
- package/dist/utils/markdown-anchor.js.map +7 -0
- package/dist/utils/markdown-link.js +12 -0
- package/dist/utils/markdown-link.js.map +7 -0
- package/dist/utils/markdown-table.js +17 -0
- package/dist/utils/markdown-table.js.map +7 -0
- package/dist/utils/mermaid-utils.js +11 -0
- package/dist/utils/mermaid-utils.js.map +7 -0
- package/dist/utils/project-paths.js.map +2 -2
- package/dist/utils/source-reference.js +52 -0
- package/dist/utils/source-reference.js.map +7 -0
- package/dist/utils/spec-installer.js +40 -53
- package/dist/utils/spec-installer.js.map +2 -2
- package/dist/utils/spec-version.js +5 -1
- package/dist/utils/spec-version.js.map +2 -2
- package/dist/utils/string-utils.js +12 -0
- package/dist/utils/string-utils.js.map +7 -0
- package/dist/utils/table-formatting.js +19 -0
- package/dist/utils/table-formatting.js.map +7 -0
- package/dist/validators/index.js +4 -0
- package/dist/validators/index.js.map +2 -2
- package/dist/validators/naming-validator.js +20 -23
- package/dist/validators/naming-validator.js.map +2 -2
- package/dist/validators/reference-validator.js +23 -38
- package/dist/validators/reference-validator.js.map +2 -2
- package/dist/validators/relationship-schema-validator.js +243 -0
- package/dist/validators/relationship-schema-validator.js.map +7 -0
- package/dist/validators/schema-validator.js +168 -68
- package/dist/validators/schema-validator.js.map +2 -2
- package/dist/validators/semantic-validator.js +36 -60
- package/dist/validators/semantic-validator.js.map +2 -2
- package/dist/validators/types.js.map +2 -2
- package/dist/validators/validation-formatter.js +159 -0
- package/dist/validators/validation-formatter.js.map +7 -0
- package/dist/validators/validator.js +24 -38
- package/dist/validators/validator.js.map +2 -2
- package/dist/viewer/README.md +139 -0
- package/dist/viewer/assets/main-CY0Xufuj.css +1 -0
- package/dist/viewer/assets/main-DtgErnwF.js +81 -0
- package/dist/viewer/assets/vendor-CxKvDp2x.js +17 -0
- package/dist/viewer/favicon.svg +11 -0
- package/dist/viewer/fonts/inter/Inter-Black.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Bold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Light.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Medium.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Regular.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/viewer/index.html +15 -0
- package/dist/viewer/manifest.json +99 -0
- package/dist/viewer/version.json +1 -0
- package/package.json +37 -13
- package/PYTHON_CLI_PARITY.md +0 -265
- package/PYTHON_CLI_STRUCTURE_UPDATE.md +0 -246
- package/biome.json +0 -42
- package/bunfig.toml +0 -3
- package/dist/ai/claude-client.js +0 -71
- package/dist/ai/claude-client.js.map +0 -7
- package/dist/ai/context-provider.js +0 -129
- package/dist/ai/context-provider.js.map +0 -7
- package/dist/ai/tools.js +0 -231
- package/dist/ai/tools.js.map +0 -7
- package/dist/commands/migrate.js +0 -36
- package/dist/commands/migrate.js.map +0 -7
- package/dist/commands/project.js +0 -74
- package/dist/commands/project.js.map +0 -7
- package/dist/core/active-changeset.js +0 -52
- package/dist/core/active-changeset.js.map +0 -7
- package/dist/core/projection-engine.js +0 -288
- package/dist/core/projection-engine.js.map +0 -7
- package/dist/schemas/bundled/01-motivation-layer.schema.json +0 -942
- package/dist/schemas/bundled/02-business-layer.schema.json +0 -1293
- package/dist/schemas/bundled/03-security-layer.schema.json +0 -2177
- package/dist/schemas/bundled/04-application-layer.schema.json +0 -1328
- package/dist/schemas/bundled/05-technology-layer.schema.json +0 -1465
- package/dist/schemas/bundled/06-api-layer.schema.json +0 -1743
- package/dist/schemas/bundled/07-data-model-layer.schema.json +0 -1253
- package/dist/schemas/bundled/08-datastore-layer.schema.json +0 -892
- package/dist/schemas/bundled/09-ux-layer.schema.json +0 -1506
- package/dist/schemas/bundled/10-navigation-layer.schema.json +0 -843
- package/dist/schemas/bundled/11-apm-observability-layer.schema.json +0 -1430
- package/dist/schemas/bundled/12-testing-layer.schema.json +0 -1091
- package/dist/schemas/bundled/common/layer-extensions.schema.json +0 -266
- package/dist/schemas/bundled/common/predicates.schema.json +0 -493
- package/dist/schemas/bundled/common/relationships.schema.json +0 -791
- package/dist/schemas/bundled/common/source-references.schema.json +0 -71
- package/dist/schemas/bundled/link-registry.json +0 -1839
- package/dist/schemas/bundled/link-registry.schema.json +0 -339
- package/dist/schemas/bundled/relationship-catalog.json +0 -1302
- package/dist/schemas/bundled/relationship-type.schema.json +0 -221
- package/dist/utils/model-path.js +0 -22
- package/dist/utils/model-path.js.map +0 -7
- package/docs/TEST-INSTRUMENTATION.md +0 -405
- package/docs/telemetry.md +0 -427
- package/test-debug.js +0 -33
- package/test-special.mjs +0 -46
- package/test_runner.ts +0 -7
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cbm",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"source_version": "0.8.4",
|
|
5
|
+
"analyzer": {
|
|
6
|
+
"name": "cbm",
|
|
7
|
+
"display_name": "codebase-memory-mcp",
|
|
8
|
+
"description": "Tree-sitter-based code knowledge graph server by DeusData",
|
|
9
|
+
"homepage": "https://github.com/DeusData/codebase-memory-mcp",
|
|
10
|
+
"mcp_server_name": "codebase-memory-mcp",
|
|
11
|
+
"binary_names": ["codebase-memory-mcp"],
|
|
12
|
+
"supported_tool_contract": {
|
|
13
|
+
"required_tools": [
|
|
14
|
+
"search_graph",
|
|
15
|
+
"index_repository",
|
|
16
|
+
"list_projects",
|
|
17
|
+
"trace_path"
|
|
18
|
+
],
|
|
19
|
+
"optional_tools": [
|
|
20
|
+
"query_graph",
|
|
21
|
+
"detect_changes",
|
|
22
|
+
"index_status",
|
|
23
|
+
"get_graph_schema",
|
|
24
|
+
"search_code"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"supported_languages": [
|
|
28
|
+
"typescript",
|
|
29
|
+
"javascript",
|
|
30
|
+
"python",
|
|
31
|
+
"java",
|
|
32
|
+
"go",
|
|
33
|
+
"rust",
|
|
34
|
+
"c#",
|
|
35
|
+
"php",
|
|
36
|
+
"tsx",
|
|
37
|
+
"c++",
|
|
38
|
+
"lua",
|
|
39
|
+
"scala"
|
|
40
|
+
],
|
|
41
|
+
"known_minimum_version": null,
|
|
42
|
+
"project_identification": {
|
|
43
|
+
"strategy": "absolute_path",
|
|
44
|
+
"description": "DR CLI passes the project root as an absolute path via findProjectRoot(). The analyzer uses this path to establish a stable project identity for consistent indexing and caching across sessions."
|
|
45
|
+
},
|
|
46
|
+
"notes": "Uses absolute path indexing for project identification. Ensures consistent graph generation and caching across multiple analysis runs within the same project."
|
|
47
|
+
},
|
|
48
|
+
"nodes_by_label": {
|
|
49
|
+
"Route": {
|
|
50
|
+
"cbm_label": "Route",
|
|
51
|
+
"dr_layer": "api",
|
|
52
|
+
"dr_element_type": "operation",
|
|
53
|
+
"confidence": "high",
|
|
54
|
+
"description": "HTTP route maps to API operation with high confidence",
|
|
55
|
+
"source_reference": {
|
|
56
|
+
"provenance": "extracted",
|
|
57
|
+
"file": {
|
|
58
|
+
"from": "file_path"
|
|
59
|
+
},
|
|
60
|
+
"symbol": {
|
|
61
|
+
"from": "name"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"dr_element_fields": {
|
|
65
|
+
"operationId": {
|
|
66
|
+
"name_template": "{name}",
|
|
67
|
+
"id_source": "name",
|
|
68
|
+
"id_transform": "kebab_case"
|
|
69
|
+
},
|
|
70
|
+
"summary": {
|
|
71
|
+
"template": "{properties.method} {properties.path}"
|
|
72
|
+
},
|
|
73
|
+
"tags": {
|
|
74
|
+
"name_template": "tags"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"verify_role": "primary"
|
|
78
|
+
},
|
|
79
|
+
"Function": {
|
|
80
|
+
"cbm_label": "Function",
|
|
81
|
+
"dr_layer": "application",
|
|
82
|
+
"dr_element_type": "applicationfunction",
|
|
83
|
+
"confidence": "medium",
|
|
84
|
+
"description": "Function maps to application function; may be promoted to service via heuristics",
|
|
85
|
+
"source_reference": {
|
|
86
|
+
"provenance": "extracted",
|
|
87
|
+
"file": {
|
|
88
|
+
"from": "file_path"
|
|
89
|
+
},
|
|
90
|
+
"symbol": {
|
|
91
|
+
"from": "name"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"attribute_mappings": [
|
|
95
|
+
{
|
|
96
|
+
"from": "name",
|
|
97
|
+
"dr_attribute": "name"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"dr_element_type_promoted": "applicationservice",
|
|
101
|
+
"promotion_heuristics": [
|
|
102
|
+
"is_entry_point",
|
|
103
|
+
"handles_route",
|
|
104
|
+
"naming_patterns"
|
|
105
|
+
],
|
|
106
|
+
"evidence_fields": {
|
|
107
|
+
"fan_in": {
|
|
108
|
+
"from": "fan_in"
|
|
109
|
+
},
|
|
110
|
+
"fan_out": {
|
|
111
|
+
"from": "fan_out"
|
|
112
|
+
},
|
|
113
|
+
"is_exported": {
|
|
114
|
+
"from": "is_exported"
|
|
115
|
+
},
|
|
116
|
+
"argument_types": {
|
|
117
|
+
"from": "argument_types"
|
|
118
|
+
},
|
|
119
|
+
"return_type": {
|
|
120
|
+
"from": "return_type"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"conditions": {
|
|
124
|
+
"serviceType": {
|
|
125
|
+
"default": "synchronous"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"Method": {
|
|
130
|
+
"cbm_label": "Method",
|
|
131
|
+
"dr_layer": "application",
|
|
132
|
+
"dr_element_type": "applicationfunction",
|
|
133
|
+
"confidence": "medium",
|
|
134
|
+
"description": "Class method maps to application function; may be promoted to service via heuristics",
|
|
135
|
+
"source_reference": {
|
|
136
|
+
"provenance": "extracted",
|
|
137
|
+
"file": {
|
|
138
|
+
"from": "file_path"
|
|
139
|
+
},
|
|
140
|
+
"symbol": {
|
|
141
|
+
"from": "name"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"attribute_mappings": [
|
|
145
|
+
{
|
|
146
|
+
"from": "name",
|
|
147
|
+
"dr_attribute": "name"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"dr_element_type_promoted": "applicationservice",
|
|
151
|
+
"promotion_heuristics": [
|
|
152
|
+
"is_entry_point",
|
|
153
|
+
"naming_patterns",
|
|
154
|
+
"directory_match"
|
|
155
|
+
],
|
|
156
|
+
"evidence_fields": {
|
|
157
|
+
"visibility": {
|
|
158
|
+
"from": "visibility"
|
|
159
|
+
},
|
|
160
|
+
"is_static": {
|
|
161
|
+
"from": "is_static"
|
|
162
|
+
},
|
|
163
|
+
"is_abstract": {
|
|
164
|
+
"from": "is_abstract"
|
|
165
|
+
},
|
|
166
|
+
"parent_class": {
|
|
167
|
+
"from": "parent_class"
|
|
168
|
+
},
|
|
169
|
+
"overrides": {
|
|
170
|
+
"from": "overrides"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"conditions": {
|
|
174
|
+
"serviceType": {
|
|
175
|
+
"default": "synchronous"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"Class": {
|
|
180
|
+
"cbm_label": "Class",
|
|
181
|
+
"dr_layer": "application",
|
|
182
|
+
"dr_element_type": "applicationcomponent",
|
|
183
|
+
"confidence": "medium",
|
|
184
|
+
"description": "Class maps to application component",
|
|
185
|
+
"source_reference": {
|
|
186
|
+
"provenance": "extracted",
|
|
187
|
+
"file": {
|
|
188
|
+
"from": "file_path"
|
|
189
|
+
},
|
|
190
|
+
"symbol": {
|
|
191
|
+
"from": "name"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"evidence_fields": {
|
|
195
|
+
"abstract": {
|
|
196
|
+
"from": "abstract"
|
|
197
|
+
},
|
|
198
|
+
"interfaces": {
|
|
199
|
+
"from": "interfaces"
|
|
200
|
+
},
|
|
201
|
+
"parent_class": {
|
|
202
|
+
"from": "parent_class"
|
|
203
|
+
},
|
|
204
|
+
"methods_count": {
|
|
205
|
+
"from": "methods_count"
|
|
206
|
+
},
|
|
207
|
+
"properties_count": {
|
|
208
|
+
"from": "properties_count"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"Module": {
|
|
213
|
+
"cbm_label": "Module",
|
|
214
|
+
"dr_layer": "application",
|
|
215
|
+
"dr_element_type": "applicationcomponent",
|
|
216
|
+
"confidence": "low",
|
|
217
|
+
"description": "Module (file/namespace) maps to application component with low confidence",
|
|
218
|
+
"source_reference": {
|
|
219
|
+
"provenance": "extracted",
|
|
220
|
+
"file": {
|
|
221
|
+
"from": "file_path"
|
|
222
|
+
},
|
|
223
|
+
"symbol": {
|
|
224
|
+
"from": "name"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"edges_by_type": {
|
|
230
|
+
"HTTP_CALLS": {
|
|
231
|
+
"cbm_edge": "HTTP_CALLS",
|
|
232
|
+
"dr_relationship": "consumes",
|
|
233
|
+
"confidence": "high",
|
|
234
|
+
"description": "HTTP API call between services maps to consumes relationship",
|
|
235
|
+
"usage": "verification_and_mapping",
|
|
236
|
+
"dr_scope": "cross-layer",
|
|
237
|
+
"direction": "caller_to_callee",
|
|
238
|
+
"confidence_from_property": "confidence",
|
|
239
|
+
"dr_pattern": "application.applicationservice → api.operation",
|
|
240
|
+
"implementation_note": "Requires HTTP verb and endpoint analysis to create cross-layer reference"
|
|
241
|
+
},
|
|
242
|
+
"HANDLES": {
|
|
243
|
+
"cbm_edge": "HANDLES",
|
|
244
|
+
"dr_relationship": "provides",
|
|
245
|
+
"confidence": "high",
|
|
246
|
+
"description": "HTTP request handler maps to provides relationship",
|
|
247
|
+
"usage": "verification_and_mapping",
|
|
248
|
+
"dr_scope": "cross-layer",
|
|
249
|
+
"direction": "forward",
|
|
250
|
+
"confidence_from_property": "handler_decorator",
|
|
251
|
+
"dr_pattern": "application.applicationfunction → api.operation",
|
|
252
|
+
"implementation_note": "HTTP handler decoration indicates implementation relationship"
|
|
253
|
+
},
|
|
254
|
+
"CALLS": {
|
|
255
|
+
"cbm_edge": "CALLS",
|
|
256
|
+
"dr_relationship": null,
|
|
257
|
+
"confidence": "medium",
|
|
258
|
+
"description": "Function/method call within codebase",
|
|
259
|
+
"usage": "traversal_only",
|
|
260
|
+
"dr_scope": "intra-layer",
|
|
261
|
+
"direction": "forward",
|
|
262
|
+
"conditions": {
|
|
263
|
+
"usage_detail": "intra-layer behavioral"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"IMPORTS": {
|
|
267
|
+
"cbm_edge": "IMPORTS",
|
|
268
|
+
"dr_relationship": null,
|
|
269
|
+
"confidence": "high",
|
|
270
|
+
"description": "Module/file import dependency",
|
|
271
|
+
"usage": "traversal_only",
|
|
272
|
+
"dr_scope": "intra-layer",
|
|
273
|
+
"direction": "forward",
|
|
274
|
+
"conditions": {
|
|
275
|
+
"usage_detail": "intra-layer structural"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"DEPENDS_ON": {
|
|
279
|
+
"cbm_edge": "DEPENDS_ON",
|
|
280
|
+
"dr_relationship": null,
|
|
281
|
+
"confidence": "medium",
|
|
282
|
+
"description": "Runtime dependency relationship",
|
|
283
|
+
"usage": "traversal_only",
|
|
284
|
+
"dr_scope": "intra-layer",
|
|
285
|
+
"direction": "forward",
|
|
286
|
+
"conditions": {
|
|
287
|
+
"usage_detail": "intra-layer dependency"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"INHERITS": {
|
|
291
|
+
"cbm_edge": "INHERITS",
|
|
292
|
+
"dr_relationship": null,
|
|
293
|
+
"confidence": "high",
|
|
294
|
+
"description": "Class inheritance relationship",
|
|
295
|
+
"usage": "traversal_only",
|
|
296
|
+
"dr_scope": "intra-layer",
|
|
297
|
+
"direction": "forward",
|
|
298
|
+
"conditions": {
|
|
299
|
+
"usage_detail": "intra-layer structural"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"IMPLEMENTS": {
|
|
303
|
+
"cbm_edge": "IMPLEMENTS",
|
|
304
|
+
"dr_relationship": null,
|
|
305
|
+
"confidence": "high",
|
|
306
|
+
"description": "Interface implementation relationship",
|
|
307
|
+
"usage": "traversal_only",
|
|
308
|
+
"dr_scope": "intra-layer",
|
|
309
|
+
"direction": "forward",
|
|
310
|
+
"conditions": {
|
|
311
|
+
"usage_detail": "intra-layer structural"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"CREATES": {
|
|
315
|
+
"cbm_edge": "CREATES",
|
|
316
|
+
"dr_relationship": null,
|
|
317
|
+
"confidence": "medium",
|
|
318
|
+
"description": "Object instantiation or component creation",
|
|
319
|
+
"usage": "traversal_only",
|
|
320
|
+
"dr_scope": "intra-layer",
|
|
321
|
+
"direction": "forward",
|
|
322
|
+
"conditions": {
|
|
323
|
+
"usage_detail": "intra-layer behavioral"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"USES": {
|
|
327
|
+
"cbm_edge": "USES",
|
|
328
|
+
"dr_relationship": null,
|
|
329
|
+
"confidence": "medium",
|
|
330
|
+
"description": "General usage relationship",
|
|
331
|
+
"usage": "traversal_only",
|
|
332
|
+
"dr_scope": "intra-layer",
|
|
333
|
+
"direction": "forward",
|
|
334
|
+
"conditions": {
|
|
335
|
+
"usage_detail": "intra-layer dependency"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"EXTENDS": {
|
|
339
|
+
"cbm_edge": "EXTENDS",
|
|
340
|
+
"dr_relationship": null,
|
|
341
|
+
"confidence": "high",
|
|
342
|
+
"description": "Class or interface extension",
|
|
343
|
+
"usage": "traversal_only",
|
|
344
|
+
"dr_scope": "intra-layer",
|
|
345
|
+
"direction": "forward",
|
|
346
|
+
"conditions": {
|
|
347
|
+
"usage_detail": "intra-layer structural"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"REFERENCES": {
|
|
351
|
+
"cbm_edge": "REFERENCES",
|
|
352
|
+
"dr_relationship": null,
|
|
353
|
+
"confidence": "medium",
|
|
354
|
+
"description": "Reference to variable, field, or constant",
|
|
355
|
+
"usage": "traversal_only",
|
|
356
|
+
"dr_scope": "intra-layer",
|
|
357
|
+
"direction": "forward",
|
|
358
|
+
"conditions": {
|
|
359
|
+
"usage_detail": "intra-layer dependency"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"RETURNS": {
|
|
363
|
+
"cbm_edge": "RETURNS",
|
|
364
|
+
"dr_relationship": null,
|
|
365
|
+
"confidence": "low",
|
|
366
|
+
"description": "Return type relationship (type information only)",
|
|
367
|
+
"usage": "traversal_only",
|
|
368
|
+
"dr_scope": "intra-layer",
|
|
369
|
+
"direction": "forward",
|
|
370
|
+
"conditions": {
|
|
371
|
+
"usage_detail": "type-level metadata"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"MODIFIES": {
|
|
375
|
+
"cbm_edge": "MODIFIES",
|
|
376
|
+
"dr_relationship": null,
|
|
377
|
+
"confidence": "medium",
|
|
378
|
+
"description": "State modification relationship",
|
|
379
|
+
"usage": "traversal_only",
|
|
380
|
+
"dr_scope": "intra-layer",
|
|
381
|
+
"direction": "forward",
|
|
382
|
+
"conditions": {
|
|
383
|
+
"usage_detail": "intra-layer behavioral"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"heuristics": {
|
|
388
|
+
"confidence_rubric": {
|
|
389
|
+
"high": {
|
|
390
|
+
"min": 0.8,
|
|
391
|
+
"max": 1,
|
|
392
|
+
"description": "High confidence: mapping is reliable and well-supported by evidence"
|
|
393
|
+
},
|
|
394
|
+
"medium": {
|
|
395
|
+
"min": 0.5,
|
|
396
|
+
"max": 0.79,
|
|
397
|
+
"description": "Medium confidence: mapping is reasonably supported but may have ambiguity"
|
|
398
|
+
},
|
|
399
|
+
"low": {
|
|
400
|
+
"min": 0,
|
|
401
|
+
"max": 0.49,
|
|
402
|
+
"description": "Low confidence: mapping is tentative and may require manual verification"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"heuristics": [
|
|
406
|
+
{
|
|
407
|
+
"name": "min_fan_in",
|
|
408
|
+
"description": "Function/method with high fan-in (many callers) may be a service",
|
|
409
|
+
"applies_to": ["application.applicationfunction"],
|
|
410
|
+
"parameters": {
|
|
411
|
+
"threshold": 5,
|
|
412
|
+
"source_types": ["function", "method"]
|
|
413
|
+
},
|
|
414
|
+
"rule": "If a function/method is called by 5+ other functions/methods, it exhibits service-like behavior and is eligible for promotion to applicationservice",
|
|
415
|
+
"confidence_adjustment": 0.15
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "directory_match",
|
|
419
|
+
"description": "Element location in canonical service directories indicates service-level component",
|
|
420
|
+
"applies_to": [
|
|
421
|
+
"application.applicationfunction",
|
|
422
|
+
"application.applicationcomponent"
|
|
423
|
+
],
|
|
424
|
+
"parameters": {
|
|
425
|
+
"patterns": [
|
|
426
|
+
"**/services/**",
|
|
427
|
+
"**/service/**",
|
|
428
|
+
"**/service.ts",
|
|
429
|
+
"**/service.js",
|
|
430
|
+
"**/service.py"
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
"rule": "If element resides in directory matching service-level patterns, promote eligible functions to applicationservice",
|
|
434
|
+
"confidence_adjustment": 0.2
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "naming_patterns",
|
|
438
|
+
"description": "Naming conventions indicate service-level components",
|
|
439
|
+
"applies_to": [
|
|
440
|
+
"application.applicationfunction",
|
|
441
|
+
"application.applicationcomponent"
|
|
442
|
+
],
|
|
443
|
+
"parameters": {
|
|
444
|
+
"service_suffixes": [
|
|
445
|
+
"Service",
|
|
446
|
+
"Manager",
|
|
447
|
+
"Repository",
|
|
448
|
+
"Factory",
|
|
449
|
+
"Handler"
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
"rule": "If function/class name ends with service-indicating suffix (Service, Manager, Repository, etc.), promote eligible functions to applicationservice",
|
|
453
|
+
"confidence_adjustment": 0.25
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "class_is_service",
|
|
457
|
+
"description": "Class structure and interface patterns indicate service behavior",
|
|
458
|
+
"applies_to": ["application.applicationcomponent"],
|
|
459
|
+
"parameters": {
|
|
460
|
+
"indicators": [
|
|
461
|
+
"implements_interface",
|
|
462
|
+
"dependency_injection",
|
|
463
|
+
"public_methods_count"
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
"rule": "If class implements interfaces, uses dependency injection, or has 3+ public methods, it may represent a service abstraction",
|
|
467
|
+
"conditions": {
|
|
468
|
+
"public_methods_threshold": 3
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"name": "service_class_naming",
|
|
473
|
+
"description": "Class names following service patterns within classes indicate service methods",
|
|
474
|
+
"applies_to": ["application.applicationfunction"],
|
|
475
|
+
"parameters": {
|
|
476
|
+
"service_method_prefixes": [
|
|
477
|
+
"create",
|
|
478
|
+
"fetch",
|
|
479
|
+
"get",
|
|
480
|
+
"update",
|
|
481
|
+
"delete",
|
|
482
|
+
"list",
|
|
483
|
+
"search",
|
|
484
|
+
"process",
|
|
485
|
+
"handle",
|
|
486
|
+
"execute"
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
"rule": "If method within service-named class uses CRUD or action-oriented prefix, it exhibits service operation behavior",
|
|
490
|
+
"confidence_adjustment": 0.2
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "is_entry_point",
|
|
494
|
+
"description": "Functions that serve as entry points (main, handler, endpoint) indicate service potential",
|
|
495
|
+
"applies_to": ["application.applicationfunction"],
|
|
496
|
+
"parameters": {
|
|
497
|
+
"entry_point_patterns": [
|
|
498
|
+
"main",
|
|
499
|
+
"handler",
|
|
500
|
+
"endpoint",
|
|
501
|
+
"route",
|
|
502
|
+
"controller",
|
|
503
|
+
"listener"
|
|
504
|
+
]
|
|
505
|
+
},
|
|
506
|
+
"rule": "If function name or type suggests it serves as entry point (handler, endpoint, listener), it may represent service operation",
|
|
507
|
+
"confidence_adjustment": 0.15
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "handles_route",
|
|
511
|
+
"description": "Functions that handle HTTP routes map directly to API operations",
|
|
512
|
+
"applies_to": ["api.operation"],
|
|
513
|
+
"rule": "Function/method decorated with @Route, @Handler, or similar HTTP decorator maps to api.operation with high confidence",
|
|
514
|
+
"confidence_adjustment": 0.3
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"name": "datastore_detection",
|
|
518
|
+
"description": "Patterns and conventions that identify datastore-related elements (tables, schemas, migrations)",
|
|
519
|
+
"applies_to": [
|
|
520
|
+
"data-store.table",
|
|
521
|
+
"data-store.column",
|
|
522
|
+
"data-model.entity",
|
|
523
|
+
"data-model.attribute"
|
|
524
|
+
],
|
|
525
|
+
"parameters": {
|
|
526
|
+
"patterns": [
|
|
527
|
+
"**/migrations/**",
|
|
528
|
+
"**/schema/**",
|
|
529
|
+
"**/*.sql",
|
|
530
|
+
"**/*.migration.*",
|
|
531
|
+
"**/*schema.ts",
|
|
532
|
+
"**/*model.ts"
|
|
533
|
+
],
|
|
534
|
+
"naming_indicators": [
|
|
535
|
+
"table",
|
|
536
|
+
"column",
|
|
537
|
+
"schema",
|
|
538
|
+
"migration",
|
|
539
|
+
"entity",
|
|
540
|
+
"dto",
|
|
541
|
+
"model"
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
"rule": "If element resides in datastore-related directories or files, or follows datastore naming conventions, identify as data-store or data-model layer element",
|
|
545
|
+
"confidence_adjustment": 0.25
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"inference_rules": [
|
|
549
|
+
{
|
|
550
|
+
"name": "function-promotion-to-service",
|
|
551
|
+
"description": "Qualified functions can be promoted to services via heuristic signals",
|
|
552
|
+
"pattern": "applicationfunction + (min_fan_in >= 5 OR directory_match OR naming_patterns OR is_entry_point) => applicationservice",
|
|
553
|
+
"confidence": "medium",
|
|
554
|
+
"enabled": true
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "verify_scope_v1",
|
|
558
|
+
"description": "Scope boundary rule: verify_role=primary applies only to api.operation (Route elements) in v1",
|
|
559
|
+
"pattern": "verify_role: primary => api.operation only (excludes Function, Method, Class, Module)",
|
|
560
|
+
"confidence": "high",
|
|
561
|
+
"enabled": true
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
"filtering_rules": [
|
|
565
|
+
{
|
|
566
|
+
"name": "confidence_floor",
|
|
567
|
+
"description": "Filter mappings below confidence threshold to reduce noise",
|
|
568
|
+
"filter_type": "confidence",
|
|
569
|
+
"threshold": 0.35,
|
|
570
|
+
"enabled": true
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "test_code_exclusion",
|
|
574
|
+
"description": "Exclude test files and test-related code from mapping",
|
|
575
|
+
"filter_type": "pattern",
|
|
576
|
+
"pattern": "^.*(\\.test\\.|_test\\.|spec\\.|__tests__)",
|
|
577
|
+
"enabled": true
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
"deduplication_rules": [
|
|
581
|
+
{
|
|
582
|
+
"name": "semantic-duplicate-detection",
|
|
583
|
+
"description": "Detect and merge semantically equivalent mappings",
|
|
584
|
+
"match_strategy": "semantic",
|
|
585
|
+
"resolution_strategy": "keep_highest_confidence",
|
|
586
|
+
"enabled": true
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"metadata": {
|
|
590
|
+
"version": "1.0",
|
|
591
|
+
"created_at": "2026-04-17T00:00:00Z",
|
|
592
|
+
"updated_at": "2026-04-17T00:00:00Z"
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|