@documentation-robotics/cli 0.1.0 → 0.1.7
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 +208 -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 +162 -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 +42 -16
- 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,559 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Cross-reference the DR model against an external code analyzer and report matched elements, graph-only evidence (suspected gaps), and model-only entries (possible drift). Reports against the active changeset when one is active.
|
|
3
|
+
argument-hint: "[--layer <layer>...] [--name <analyzer>] [--output <path>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verify Model Against Code Analyzer
|
|
7
|
+
|
|
8
|
+
Cross-reference the Documentation Robotics model against an external code analyzer and report on alignment. Surface matched elements, graph-only evidence (suspected gaps in the model), and model-only entries (possible drift from the code).
|
|
9
|
+
|
|
10
|
+
## What This Command Does
|
|
11
|
+
|
|
12
|
+
1. Checks for an active code analyzer and confirms it is indexed
|
|
13
|
+
2. Runs verification against the model (base model or active changeset if present)
|
|
14
|
+
3. Reports results in three buckets:
|
|
15
|
+
- **Matched**: Routes discovered in the code that exist in the model ✓
|
|
16
|
+
- **Graph-only**: Routes discovered in the code but missing from the model (suspected gaps) ⚠
|
|
17
|
+
- **Model-only**: Operations in the model but not discovered in the code (possible drift) ?
|
|
18
|
+
|
|
19
|
+
4. Offers actionable next steps: add missing routes, remove orphaned operations, or ignore entries
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
/dr-verify [--layer <layer>...] [--name <analyzer>] [--output <path>]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Options:**
|
|
28
|
+
|
|
29
|
+
- `--layer <layer>`: Layer(s) to verify (default: api; v1 only supports api)
|
|
30
|
+
- `--name <analyzer>`: Analyzer name (default: active analyzer from session)
|
|
31
|
+
- `--output <path>`: Write report to file (format inferred from extension: .json or .md)
|
|
32
|
+
|
|
33
|
+
## Instructions for Claude Code
|
|
34
|
+
|
|
35
|
+
When the user runs this command, perform intelligent verification with helpful suggestions.
|
|
36
|
+
|
|
37
|
+
### Step 1: Check Analyzer Status
|
|
38
|
+
|
|
39
|
+
**Check if an analyzer is installed and active:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
dr analyzer status --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Handle four scenarios:**
|
|
46
|
+
|
|
47
|
+
**Scenario 1: No active analyzer**
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Analyzers are optional but enable deeper insights into your codebase.
|
|
51
|
+
See available analyzers:
|
|
52
|
+
dr analyzer discover
|
|
53
|
+
|
|
54
|
+
Once installed, run:
|
|
55
|
+
/dr-verify
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then exit cleanly (no error).
|
|
59
|
+
|
|
60
|
+
**Scenario 2: Analyzer inactive (detected.installed: false)**
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Analyzer not installed or unavailable.
|
|
64
|
+
|
|
65
|
+
To enable code verification:
|
|
66
|
+
1. Run: dr analyzer discover
|
|
67
|
+
2. Install the recommended analyzer
|
|
68
|
+
3. Run: /dr-verify
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Then exit cleanly (no error).
|
|
72
|
+
|
|
73
|
+
**Scenario 3: Analyzer installed but not indexed (detected.installed: true, indexed: false)**
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Analyzer is installed but the project has not been indexed yet.
|
|
77
|
+
|
|
78
|
+
To enable code verification:
|
|
79
|
+
dr analyzer index
|
|
80
|
+
|
|
81
|
+
This scans your codebase and builds the code graph (~1-2 minutes).
|
|
82
|
+
|
|
83
|
+
Would you like me to index now?
|
|
84
|
+
|
|
85
|
+
[y] Index now and proceed with verification
|
|
86
|
+
[n] Skip indexing (cannot verify without an index)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If user selects [y]: Run `dr analyzer index`, then proceed to Step 2.
|
|
90
|
+
|
|
91
|
+
If user selects [n]: Exit cleanly (no error).
|
|
92
|
+
|
|
93
|
+
**Scenario 4: Analyzer active and indexed (detected.installed: true, indexed: true)**
|
|
94
|
+
|
|
95
|
+
Proceed to Step 2.
|
|
96
|
+
|
|
97
|
+
### Step 2: Check Index Freshness
|
|
98
|
+
|
|
99
|
+
**When analyzer is active, check freshness:**
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
dr analyzer status --json | jq '.fresh'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**If fresh: true**
|
|
106
|
+
|
|
107
|
+
Proceed to Step 3.
|
|
108
|
+
|
|
109
|
+
**If fresh: false (stale index)**
|
|
110
|
+
|
|
111
|
+
If you are in an **interactive session** with a user present, show a freshness warning and ask:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
Index is stale (last updated: <timestamp>).
|
|
115
|
+
|
|
116
|
+
The code may have changed since the index was built.
|
|
117
|
+
Would you like me to reindex before verifying?
|
|
118
|
+
|
|
119
|
+
[y] Reindex now (takes ~1-2 minutes)
|
|
120
|
+
[n] Skip and verify against current index
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
If user selects [y]: Run `dr analyzer index`, then proceed to Step 3.
|
|
124
|
+
|
|
125
|
+
If user selects [n]: Proceed to Step 3.
|
|
126
|
+
|
|
127
|
+
**If running autonomously** (headless mode, sub-agent, or no interactive user present):
|
|
128
|
+
|
|
129
|
+
Note the stale index in your output and proceed directly to Step 3 without asking:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Note: Index is stale (last updated: <timestamp>). Proceeding with current index.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Step 3: Run Verification
|
|
136
|
+
|
|
137
|
+
**Run verification against api layer (v1 scope):**
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
dr analyzer verify --layer api --json
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Parse JSON output** — it contains the `VerifyReport` structure:
|
|
144
|
+
|
|
145
|
+
- `summary`: matched_count, gap_count, drift_count, ignored_count, total_graph_entries, total_model_entries
|
|
146
|
+
- `buckets.matched`: array of matched entries
|
|
147
|
+
- `buckets.in_graph_only`: array of routes found in code but not in model
|
|
148
|
+
- `buckets.in_model_only`: array of operations in model but not in code
|
|
149
|
+
- `changeset_context`: active_changeset (string or null), verified_against ("changeset_view" or "base_model")
|
|
150
|
+
|
|
151
|
+
### Step 4: Present Summary and Changeset Context
|
|
152
|
+
|
|
153
|
+
**Display the verification summary using exact format:**
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
Verified N graph routes against M model operations.
|
|
157
|
+
X matched, Y graph-only (suspected gaps), Z model-only (possible drift).
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Where:**
|
|
161
|
+
|
|
162
|
+
- N = `summary.total_graph_entries`
|
|
163
|
+
- M = `summary.total_model_entries`
|
|
164
|
+
- X = `summary.matched_count`
|
|
165
|
+
- Y = `summary.gap_count`
|
|
166
|
+
- Z = `summary.drift_count`
|
|
167
|
+
|
|
168
|
+
**Display changeset context prominently:**
|
|
169
|
+
|
|
170
|
+
**If changeset is active:**
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
Verifying against active changeset `<changeset_id>`
|
|
174
|
+
(Report reflects staged changes merged with the base model)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**If no changeset:**
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
Verifying against base model (no active changeset)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Surface top entries from each bucket:**
|
|
184
|
+
|
|
185
|
+
For each bucket (matched, in_graph_only, in_model_only):
|
|
186
|
+
|
|
187
|
+
- Show first 5 entries with full details
|
|
188
|
+
- If more exist, show count: `` ... and N more — see full report with `dr analyzer verify --output verify.json` ``
|
|
189
|
+
|
|
190
|
+
### Step 5: Handle Graph-Only Entries (Suspected Gaps)
|
|
191
|
+
|
|
192
|
+
**For each `in_graph_only` entry, offer to add it to the model:**
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
Route discovered but not in model:
|
|
196
|
+
POST /api/v1/orders
|
|
197
|
+
|
|
198
|
+
Source: src/routes/orders.ts:createOrder
|
|
199
|
+
|
|
200
|
+
Add this operation to the model?
|
|
201
|
+
|
|
202
|
+
[a] Add with command
|
|
203
|
+
[i] Ignore (add to .dr-verify-ignore.yaml)
|
|
204
|
+
[s] Skip
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**If user selects [a]:**
|
|
208
|
+
|
|
209
|
+
**Generate pre-populated `dr add` command with all source flags from graph evidence:**
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
dr add api operation "create-order" \
|
|
213
|
+
--description "POST /api/v1/orders" \
|
|
214
|
+
--source-file "src/routes/orders.ts" \
|
|
215
|
+
--source-symbol "createOrder" \
|
|
216
|
+
--source-provenance extracted
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**If no changeset is active**, offer changeset recommendation before executing:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
Tip: You can track this work in an isolated changeset.
|
|
223
|
+
|
|
224
|
+
Would you like to create a changeset before adding entries?
|
|
225
|
+
|
|
226
|
+
[y] Create changeset (I'll name it verify-<timestamp>)
|
|
227
|
+
[n] Add directly to the base model
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
If user selects [y]: Create the changeset and activate it before proceeding.
|
|
231
|
+
|
|
232
|
+
Show the commands and offer to run them:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
dr changeset create "verify-<timestamp>"
|
|
236
|
+
dr changeset activate "verify-<timestamp>"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Present options:
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
[r] Run these commands
|
|
243
|
+
[e] Edit and run
|
|
244
|
+
[c] Cancel
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
If user selects [r]: execute the commands and show result.
|
|
248
|
+
|
|
249
|
+
**If user selects [i] (ignore):**
|
|
250
|
+
|
|
251
|
+
**Ask for reason:**
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
Reason for ignoring (e.g., "deprecated endpoint", "internal debug route"):
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Append to `.dr-verify-ignore.yaml` (created if it doesn't exist):
|
|
258
|
+
|
|
259
|
+
```yaml
|
|
260
|
+
version: 1
|
|
261
|
+
ignore:
|
|
262
|
+
- patterns:
|
|
263
|
+
- path: "/api/v1/orders"
|
|
264
|
+
reason: "<user-provided reason>"
|
|
265
|
+
match: "graph_only"
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Step 6: Handle Model-Only Entries (Possible Drift)
|
|
269
|
+
|
|
270
|
+
**For each `in_model_only` entry, offer investigation options:**
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Operation in model but not discovered in code:
|
|
274
|
+
api.operation.old-endpoint
|
|
275
|
+
|
|
276
|
+
Possible reasons:
|
|
277
|
+
- Code was refactored or removed
|
|
278
|
+
- Route handler is in a file the analyzer didn't scan
|
|
279
|
+
- Confidence threshold filtered it out
|
|
280
|
+
|
|
281
|
+
Options:
|
|
282
|
+
|
|
283
|
+
[s] Show element details: dr show api.operation.old-endpoint
|
|
284
|
+
[q] Search codebase: dr analyzer query "<handler-pattern>"
|
|
285
|
+
[r] Remove from model: dr delete api.operation.old-endpoint
|
|
286
|
+
[u] Update element: dr update api.operation.old-endpoint
|
|
287
|
+
[i] Ignore (add to .dr-verify-ignore.yaml)
|
|
288
|
+
[n] Next entry
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**If user selects [s]:**
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
dr show api.operation.old-endpoint
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Show output and re-offer options.
|
|
298
|
+
|
|
299
|
+
**If user selects [q]:**
|
|
300
|
+
|
|
301
|
+
Ask for a search term and run query:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
dr analyzer query "MATCH (n) WHERE n.name CONTAINS '<term>' RETURN n"
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Show results and re-offer options.
|
|
308
|
+
|
|
309
|
+
**If user selects [r]:**
|
|
310
|
+
|
|
311
|
+
Ask for confirmation:
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
Delete api.operation.old-endpoint from the model?
|
|
315
|
+
This cannot be undone.
|
|
316
|
+
|
|
317
|
+
[y] Confirm deletion
|
|
318
|
+
[n] Cancel
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
If confirmed:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
dr delete api.operation.old-endpoint
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Show result and move to next entry.
|
|
328
|
+
|
|
329
|
+
**If user selects [u]:**
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
dr update api.operation.old-endpoint
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Prompt for updated field(s) and proceed to next entry.
|
|
336
|
+
|
|
337
|
+
**If user selects [i]:**
|
|
338
|
+
|
|
339
|
+
Ask for reason and append to `.dr-verify-ignore.yaml`:
|
|
340
|
+
|
|
341
|
+
```yaml
|
|
342
|
+
version: 1
|
|
343
|
+
ignore:
|
|
344
|
+
- patterns:
|
|
345
|
+
- handler: "*"
|
|
346
|
+
element_ids: ["api.operation.old-endpoint"]
|
|
347
|
+
reason: "<user-provided reason>"
|
|
348
|
+
match: "model_only"
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Step 7: Status and Next Steps
|
|
352
|
+
|
|
353
|
+
**After processing all buckets, summarize:**
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
Verification Complete
|
|
357
|
+
====================================================
|
|
358
|
+
|
|
359
|
+
Summary:
|
|
360
|
+
✓ X matched (operations aligned)
|
|
361
|
+
⚠ Y graph-only (suggested adds)
|
|
362
|
+
? Z model-only (suggested removes/updates)
|
|
363
|
+
|
|
364
|
+
Next Steps:
|
|
365
|
+
|
|
366
|
+
1. Review added operations:
|
|
367
|
+
/dr-validate --strict
|
|
368
|
+
|
|
369
|
+
2. Sync with your team:
|
|
370
|
+
/dr-changeset preview
|
|
371
|
+
|
|
372
|
+
3. Full report:
|
|
373
|
+
/dr-verify --output verify.json
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
**Provide clickable next-step recommendations:**
|
|
377
|
+
|
|
378
|
+
- If gaps exist: `I found potential routes to add. Run /dr-map to extract more systematically.`
|
|
379
|
+
- If drift exists: `Review model-only operations to see if they've been refactored or deprecated.`
|
|
380
|
+
- If all matched: `✓ Model and code are well-aligned!`
|
|
381
|
+
|
|
382
|
+
## Advanced Features
|
|
383
|
+
|
|
384
|
+
### Full Report Export
|
|
385
|
+
|
|
386
|
+
**User can request full report output:**
|
|
387
|
+
|
|
388
|
+
```
|
|
389
|
+
User: /dr-verify --output verify.json
|
|
390
|
+
|
|
391
|
+
You: Generating verification report...
|
|
392
|
+
|
|
393
|
+
dr analyzer verify --layer api --json --output verify.json
|
|
394
|
+
|
|
395
|
+
✓ Report written to: verify.json
|
|
396
|
+
|
|
397
|
+
Summary:
|
|
398
|
+
- Matched: X
|
|
399
|
+
- Gaps: Y
|
|
400
|
+
- Drift: Z
|
|
401
|
+
|
|
402
|
+
View report: cat verify.json | jq
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
**Supported formats:**
|
|
406
|
+
|
|
407
|
+
- `.json` — Machine-readable for CI/CD integration
|
|
408
|
+
- `.md` — Markdown documentation with tables
|
|
409
|
+
- Default (stdout) — Colored text for interactive review
|
|
410
|
+
|
|
411
|
+
### Verify Specific Analyzer
|
|
412
|
+
|
|
413
|
+
**User can specify analyzer by name:**
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
dr analyzer verify --name cbm --layer api --json
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
If the analyzer is not installed, the command fails cleanly:
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
Analyzer not found: cbm
|
|
423
|
+
|
|
424
|
+
Available analyzers:
|
|
425
|
+
dr analyzer discover
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## Error Handling
|
|
429
|
+
|
|
430
|
+
### Error: No Analyzer Installed
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
No code analyzer found.
|
|
434
|
+
|
|
435
|
+
To enable verification:
|
|
436
|
+
dr analyzer discover
|
|
437
|
+
|
|
438
|
+
Analyzers are optional — the model is still valid without one.
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Error: Project Not Indexed
|
|
442
|
+
|
|
443
|
+
```
|
|
444
|
+
Analyzer is installed but project index is missing.
|
|
445
|
+
|
|
446
|
+
Run:
|
|
447
|
+
dr analyzer index
|
|
448
|
+
|
|
449
|
+
This scans your codebase and builds the code graph.
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### Error: Verification Failed
|
|
453
|
+
|
|
454
|
+
```
|
|
455
|
+
Verification encountered an error:
|
|
456
|
+
[error details]
|
|
457
|
+
|
|
458
|
+
Troubleshooting:
|
|
459
|
+
1. Check analyzer status: dr analyzer status
|
|
460
|
+
2. Rebuild index: dr analyzer index --force
|
|
461
|
+
3. Check logs: cat .dr/logs/dr.log
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
## Example Interactions
|
|
465
|
+
|
|
466
|
+
### Example 1: Clean Verification
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
User: /dr-verify
|
|
470
|
+
|
|
471
|
+
You: Checking analyzer status...
|
|
472
|
+
|
|
473
|
+
✓ Analyzer: cbm (installed and indexed)
|
|
474
|
+
✓ Index is fresh
|
|
475
|
+
|
|
476
|
+
Running verification...
|
|
477
|
+
|
|
478
|
+
Verified 45 graph routes against 40 model operations.
|
|
479
|
+
35 matched, 8 graph-only (suspected gaps), 2 model-only (possible drift).
|
|
480
|
+
|
|
481
|
+
Verifying against base model (no active changeset).
|
|
482
|
+
|
|
483
|
+
Matched Operations (35):
|
|
484
|
+
✓ api.operation.create-order (POST /api/v1/orders)
|
|
485
|
+
✓ api.operation.get-order (GET /api/v1/orders/{id})
|
|
486
|
+
... and 33 more
|
|
487
|
+
|
|
488
|
+
Graph-Only Routes (8 suspected gaps):
|
|
489
|
+
⚠ POST /api/v1/orders/bulk-create
|
|
490
|
+
Source: src/routes/orders.ts:bulkCreate
|
|
491
|
+
Add this operation? [a] Add [i] Ignore [s] Skip
|
|
492
|
+
|
|
493
|
+
Model-Only Operations (2):
|
|
494
|
+
? api.operation.legacy-endpoint
|
|
495
|
+
Source: src/legacy/endpoints.ts:oldEndpoint
|
|
496
|
+
Options: [s] Show [q] Query [r] Remove [u] Update [i] Ignore [n] Next
|
|
497
|
+
|
|
498
|
+
Verification Complete
|
|
499
|
+
====================================================
|
|
500
|
+
Next Steps:
|
|
501
|
+
1. Review gaps: /dr-map ./src --layers api
|
|
502
|
+
2. Validate model: /dr-validate --strict
|
|
503
|
+
3. Full report: /dr-verify --output verify.json
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### Example 2: With Stale Index
|
|
507
|
+
|
|
508
|
+
```
|
|
509
|
+
User: /dr-verify
|
|
510
|
+
|
|
511
|
+
You: Checking analyzer status...
|
|
512
|
+
|
|
513
|
+
⚠ Index is stale (last updated 2 hours ago)
|
|
514
|
+
|
|
515
|
+
Reindex before verifying?
|
|
516
|
+
[y] Reindex now
|
|
517
|
+
[n] Skip and verify against current index
|
|
518
|
+
|
|
519
|
+
User: y
|
|
520
|
+
|
|
521
|
+
You: Reindexing...
|
|
522
|
+
|
|
523
|
+
dr analyzer index
|
|
524
|
+
|
|
525
|
+
✓ Reindex complete (892 nodes, 1247 edges)
|
|
526
|
+
|
|
527
|
+
Running verification...
|
|
528
|
+
[continues with fresh verification results]
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
### Example 3: No Analyzer
|
|
532
|
+
|
|
533
|
+
```
|
|
534
|
+
User: /dr-verify
|
|
535
|
+
|
|
536
|
+
You: Checking analyzer status...
|
|
537
|
+
|
|
538
|
+
No analyzer installed.
|
|
539
|
+
|
|
540
|
+
Analyzers are optional but enable deeper code insights.
|
|
541
|
+
|
|
542
|
+
To install:
|
|
543
|
+
dr analyzer discover
|
|
544
|
+
|
|
545
|
+
Once installed, run:
|
|
546
|
+
/dr-verify
|
|
547
|
+
|
|
548
|
+
Your model is still valid without an analyzer.
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
## Related Commands
|
|
552
|
+
|
|
553
|
+
- `/dr-validate` - Validate model schema and references
|
|
554
|
+
- `/dr-map` - Extract model from codebase (complementary to verify)
|
|
555
|
+
- `/dr-model` - Manually add/update elements
|
|
556
|
+
- `/dr-changeset` - Create changesets for isolated work
|
|
557
|
+
- `dr analyzer discover` - Install and select a code analyzer
|
|
558
|
+
- `dr analyzer index` - Rebuild the project index
|
|
559
|
+
- `dr show <element-id>` - Inspect element details
|