@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,493 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use natural language to add, update, or query architecture model elements across all 12 layers
|
|
3
|
+
argument-hint: "<natural language request>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Interactive Architecture Modeling
|
|
7
|
+
|
|
8
|
+
Use natural language to add, update, or query architecture model elements.
|
|
9
|
+
|
|
10
|
+
## What This Command Does
|
|
11
|
+
|
|
12
|
+
Interprets natural language requests to perform modeling operations:
|
|
13
|
+
|
|
14
|
+
- Add new elements to any layer
|
|
15
|
+
- Update existing elements
|
|
16
|
+
- Query and search for elements
|
|
17
|
+
- Create cross-layer projections
|
|
18
|
+
- Establish traceability links
|
|
19
|
+
- Add security and monitoring
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
/dr-model <natural language request>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Instructions for Claude Code
|
|
28
|
+
|
|
29
|
+
When the user runs this command, interpret their intent and execute the appropriate DR CLI commands. Always:
|
|
30
|
+
|
|
31
|
+
1. **Parse the Intent**: Understand what the user wants to do
|
|
32
|
+
2. **Query Context**: Check existing model elements when relevant
|
|
33
|
+
3. **Propose Changes**: Show what you plan to do before executing
|
|
34
|
+
4. **Execute Commands**: Run the appropriate `dr` commands
|
|
35
|
+
5. **Validate**: Check that changes are valid
|
|
36
|
+
6. **Suggest Related Actions**: Recommend complementary operations
|
|
37
|
+
|
|
38
|
+
### Supported Operations
|
|
39
|
+
|
|
40
|
+
#### 1. Add New Elements
|
|
41
|
+
|
|
42
|
+
**User intent patterns:**
|
|
43
|
+
|
|
44
|
+
- "Add a [service/component/etc] called [name]"
|
|
45
|
+
- "Create a [type] named [name] in [layer]"
|
|
46
|
+
- "Model a [description]"
|
|
47
|
+
|
|
48
|
+
**Your process:**
|
|
49
|
+
|
|
50
|
+
1. Identify the layer and type
|
|
51
|
+
2. Extract name and properties from description
|
|
52
|
+
3. Query similar existing elements (avoid duplicates)
|
|
53
|
+
4. Build the `dr add` command
|
|
54
|
+
5. Show the command you'll run
|
|
55
|
+
6. Execute and confirm
|
|
56
|
+
7. Suggest related actions (projection, security, monitoring)
|
|
57
|
+
|
|
58
|
+
**Example:**
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
User: /dr-model Add a payment service that handles credit card processing
|
|
62
|
+
|
|
63
|
+
You should:
|
|
64
|
+
1. Identify: business layer, service type
|
|
65
|
+
2. Check for existing payment services:
|
|
66
|
+
dr search "payment" --layer business
|
|
67
|
+
3. Propose:
|
|
68
|
+
"I'll create a business service for payment processing with these details:
|
|
69
|
+
- Name: Payment Processing
|
|
70
|
+
- Layer: business
|
|
71
|
+
- Type: service
|
|
72
|
+
- Description: Handles credit card transactions
|
|
73
|
+
- Properties: criticality=high (financial service)
|
|
74
|
+
|
|
75
|
+
Command: dr add business service --name \"Payment Processing\" \
|
|
76
|
+
--description \"Handles credit card transactions\" \
|
|
77
|
+
--property criticality=high"
|
|
78
|
+
|
|
79
|
+
4. Get confirmation (or proceed if obvious)
|
|
80
|
+
5. Execute:
|
|
81
|
+
dr add business service "Payment Processing" \
|
|
82
|
+
--description "Handles credit card transactions"
|
|
83
|
+
6. Validate:
|
|
84
|
+
dr validate --layers business
|
|
85
|
+
7. Suggest next steps:
|
|
86
|
+
"✓ Payment service created: business.service.payment-processing
|
|
87
|
+
|
|
88
|
+
Recommended next steps:
|
|
89
|
+
- Project to application layer: /dr-model Create app service for payment processing
|
|
90
|
+
- Add security: /dr-model Add PCI-DSS compliance for payment service
|
|
91
|
+
- Add monitoring: /dr-model Add availability metric for payment service"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### 2. Add with Cross-Layer References
|
|
95
|
+
|
|
96
|
+
**User intent patterns:**
|
|
97
|
+
|
|
98
|
+
- "Add [element] that supports [goal]"
|
|
99
|
+
- "Create [element] that realizes [business service]"
|
|
100
|
+
- "Add [element] secured by [policy]"
|
|
101
|
+
|
|
102
|
+
**Your process:**
|
|
103
|
+
|
|
104
|
+
1. Parse the element to create and the reference
|
|
105
|
+
2. Verify the referenced element exists
|
|
106
|
+
3. Create element with proper references in properties
|
|
107
|
+
|
|
108
|
+
**Example:**
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
User: /dr-model Add order management service that supports the customer satisfaction goal
|
|
112
|
+
|
|
113
|
+
You should:
|
|
114
|
+
1. Check goal exists:
|
|
115
|
+
dr search "customer satisfaction" --layer motivation
|
|
116
|
+
2. If found (e.g., motivation.goal.customer-satisfaction):
|
|
117
|
+
dr add business service "Order Management" \
|
|
118
|
+
--description "Manages customer orders lifecycle"
|
|
119
|
+
3. If not found, ask:
|
|
120
|
+
"I couldn't find a 'customer satisfaction' goal. Would you like me to:
|
|
121
|
+
1. Create the goal first
|
|
122
|
+
2. List existing goals to choose from
|
|
123
|
+
3. Create the service without goal reference"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### 3. Project Across Layers
|
|
127
|
+
|
|
128
|
+
**User intent patterns:**
|
|
129
|
+
|
|
130
|
+
- "Project [element] to [layer]"
|
|
131
|
+
- "Create application service from [business service]"
|
|
132
|
+
- "Generate API for [application service]"
|
|
133
|
+
|
|
134
|
+
**Your process:**
|
|
135
|
+
|
|
136
|
+
1. Verify source element exists
|
|
137
|
+
2. Create the target-layer element referencing the source
|
|
138
|
+
3. Validate cross-layer references
|
|
139
|
+
|
|
140
|
+
**Example:**
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
User: /dr-model Create application service for payment processing
|
|
144
|
+
|
|
145
|
+
You should:
|
|
146
|
+
1. Find business service:
|
|
147
|
+
dr search "payment" --layer business
|
|
148
|
+
2. If found, create application service:
|
|
149
|
+
dr add application service "Payment Processing"
|
|
150
|
+
3. Verify creation:
|
|
151
|
+
dr show application.service.payment-processing
|
|
152
|
+
4. Suggest:
|
|
153
|
+
"✓ Application service created and linked to business service
|
|
154
|
+
|
|
155
|
+
Next steps:
|
|
156
|
+
- Add security policy: /dr-model Add OAuth2 authentication for payment API
|
|
157
|
+
- Add monitoring: /dr-model Add latency and error rate metrics
|
|
158
|
+
- Define API endpoints: /dr-model Create REST API for payment operations"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### 4. Add Security Controls
|
|
162
|
+
|
|
163
|
+
**User intent patterns:**
|
|
164
|
+
|
|
165
|
+
- "Add authentication for [element]"
|
|
166
|
+
- "Secure [element] with [scheme/policy]"
|
|
167
|
+
- "Add [compliance standard] to [element]"
|
|
168
|
+
|
|
169
|
+
**Your process:**
|
|
170
|
+
|
|
171
|
+
1. Identify the element to secure
|
|
172
|
+
2. Create appropriate security control
|
|
173
|
+
3. Link via `securedBy` property
|
|
174
|
+
|
|
175
|
+
**Example:**
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
User: /dr-model Add PCI-DSS compliance for payment service
|
|
179
|
+
|
|
180
|
+
You should:
|
|
181
|
+
1. Find payment service:
|
|
182
|
+
dr show application.service.payment-processing
|
|
183
|
+
2. Create security policy:
|
|
184
|
+
dr add security policy "PCI-DSS Compliance" \
|
|
185
|
+
--description "Payment Card Industry Data Security Standard"
|
|
186
|
+
3. Update service to reference policy:
|
|
187
|
+
dr update application.service.payment-processing \
|
|
188
|
+
--attributes '{"securedBy":"security.policy.pci-dss-compliance"}'
|
|
189
|
+
4. Validate:
|
|
190
|
+
dr validate --layers security
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
#### 5. Add Monitoring
|
|
194
|
+
|
|
195
|
+
**User intent patterns:**
|
|
196
|
+
|
|
197
|
+
- "Add monitoring for [element]"
|
|
198
|
+
- "Create [metric type] metric for [element]"
|
|
199
|
+
- "Monitor [element] availability/latency/errors"
|
|
200
|
+
|
|
201
|
+
**Your process:**
|
|
202
|
+
|
|
203
|
+
1. Identify element and metric type
|
|
204
|
+
2. Create APM metric
|
|
205
|
+
3. Link via `instrumentedBy` property
|
|
206
|
+
|
|
207
|
+
**Example:**
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
User: /dr-model Add availability and latency metrics for payment API
|
|
211
|
+
|
|
212
|
+
You should:
|
|
213
|
+
1. Find element:
|
|
214
|
+
dr show application.service.payment-api
|
|
215
|
+
2. Create availability metric:
|
|
216
|
+
dr add apm metric "payment-api-availability" \
|
|
217
|
+
--description "Payment API availability SLI" \
|
|
218
|
+
--attributes '{"type":"availability","instruments":"application.service.payment-api","threshold":"99.9%"}'
|
|
219
|
+
3. Create latency metric:
|
|
220
|
+
dr add apm metric "payment-api-latency" \
|
|
221
|
+
--description "Payment API P95 latency" \
|
|
222
|
+
--attributes '{"type":"latency","aggregation":"p95","instruments":"application.service.payment-api","threshold":"200ms"}'
|
|
223
|
+
4. Validate and report
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
#### 6. Query and Search
|
|
227
|
+
|
|
228
|
+
**User intent patterns:**
|
|
229
|
+
|
|
230
|
+
- "Show me [elements]"
|
|
231
|
+
- "List all [type] in [layer]"
|
|
232
|
+
- "Find [element name]"
|
|
233
|
+
- "What [elements] support [goal]?"
|
|
234
|
+
|
|
235
|
+
**Your process:**
|
|
236
|
+
|
|
237
|
+
1. Build appropriate search/query
|
|
238
|
+
2. Display results in readable format
|
|
239
|
+
3. Offer to take action on results
|
|
240
|
+
|
|
241
|
+
**Example:**
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
User: /dr-model Show me all critical services
|
|
245
|
+
|
|
246
|
+
You should:
|
|
247
|
+
1. Search:
|
|
248
|
+
dr search "critical" --json
|
|
249
|
+
2. Parse and display:
|
|
250
|
+
"Found 3 critical services:
|
|
251
|
+
|
|
252
|
+
Business Layer:
|
|
253
|
+
- Payment Processing (business.service.payment-processing)
|
|
254
|
+
- Order Management (business.service.order-management)
|
|
255
|
+
|
|
256
|
+
Application Layer:
|
|
257
|
+
- Payment API (application.service.payment-api)
|
|
258
|
+
|
|
259
|
+
Would you like me to:
|
|
260
|
+
- Check if all have security policies
|
|
261
|
+
- Verify monitoring is configured
|
|
262
|
+
- Show their dependencies"
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
#### 7. Update Existing Elements
|
|
266
|
+
|
|
267
|
+
**User intent patterns:**
|
|
268
|
+
|
|
269
|
+
- "Update [element] to [change]"
|
|
270
|
+
- "Change [element] [property] to [value]"
|
|
271
|
+
- "Mark [element] as [value]"
|
|
272
|
+
|
|
273
|
+
**Your process:**
|
|
274
|
+
|
|
275
|
+
1. Find the element
|
|
276
|
+
2. Determine what to update
|
|
277
|
+
3. Use `dr update` command
|
|
278
|
+
4. Validate changes
|
|
279
|
+
|
|
280
|
+
**Example:**
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
User: /dr-model Mark payment service as critical priority
|
|
284
|
+
|
|
285
|
+
You should:
|
|
286
|
+
1. Find service:
|
|
287
|
+
dr search "payment" --layer business --type service
|
|
288
|
+
2. Update:
|
|
289
|
+
dr update business.service.payment-processing \
|
|
290
|
+
--attributes '{"criticality":"critical"}'
|
|
291
|
+
3. Check implications:
|
|
292
|
+
"✓ Updated business.service.payment-processing to critical
|
|
293
|
+
|
|
294
|
+
Critical services should have:
|
|
295
|
+
✓ Security policy - checking...
|
|
296
|
+
✗ Monitoring - missing
|
|
297
|
+
✗ Backup strategy - missing
|
|
298
|
+
|
|
299
|
+
Would you like me to add missing controls?"
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Best Practices
|
|
303
|
+
|
|
304
|
+
1. **Always Query First**: Check existing elements before creating new ones
|
|
305
|
+
2. **Be Specific**: Use exact element IDs when updating
|
|
306
|
+
3. **Validate After Changes**: Run validation to catch issues early
|
|
307
|
+
4. **Suggest Next Steps**: Help users complete related tasks
|
|
308
|
+
5. **Show Your Work**: Display commands before executing
|
|
309
|
+
6. **Handle Ambiguity**: Ask for clarification when intent is unclear
|
|
310
|
+
7. **Check Dependencies**: Verify referenced elements exist
|
|
311
|
+
|
|
312
|
+
### Handling Ambiguity
|
|
313
|
+
|
|
314
|
+
When the request is unclear, ask specific questions:
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
User: /dr-model Add a service
|
|
318
|
+
|
|
319
|
+
You should ask:
|
|
320
|
+
"I'd be happy to add a service! To help me create it correctly, could you tell me:
|
|
321
|
+
1. What layer? (business, application, or another layer?)
|
|
322
|
+
2. What should it be called?
|
|
323
|
+
3. What does it do? (brief description)
|
|
324
|
+
4. Any special properties? (criticality, owner, etc.)"
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Error Recovery
|
|
328
|
+
|
|
329
|
+
If a command fails:
|
|
330
|
+
|
|
331
|
+
1. **Explain the Error**: Translate technical errors to plain language
|
|
332
|
+
2. **Suggest Fixes**: Offer specific solutions
|
|
333
|
+
3. **Show Alternatives**: Provide other ways to achieve the goal
|
|
334
|
+
|
|
335
|
+
**Example:**
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
Error: Reference not found: motivation.goal.missing
|
|
339
|
+
|
|
340
|
+
You should:
|
|
341
|
+
"The goal 'motivation.goal.missing' doesn't exist in the model.
|
|
342
|
+
|
|
343
|
+
I can:
|
|
344
|
+
1. Create the goal first, then add your service
|
|
345
|
+
2. Show you existing goals to reference instead
|
|
346
|
+
3. Create the service without a goal reference (you can add it later)
|
|
347
|
+
|
|
348
|
+
Which would you prefer?"
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Complex Workflows
|
|
352
|
+
|
|
353
|
+
For complex requests, break into steps:
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
User: /dr-model Create a complete payment feature with business service, app service, API, security, and monitoring
|
|
357
|
+
|
|
358
|
+
You should:
|
|
359
|
+
"I'll create a complete payment feature with full traceability. Here's my plan:
|
|
360
|
+
|
|
361
|
+
1. Business Service
|
|
362
|
+
- Create business.service.payment-processing
|
|
363
|
+
- Link to revenue goals
|
|
364
|
+
|
|
365
|
+
2. Application Service
|
|
366
|
+
- Project to application layer
|
|
367
|
+
- Set criticality to high
|
|
368
|
+
|
|
369
|
+
3. API Layer
|
|
370
|
+
- Create RESTful endpoints for payments
|
|
371
|
+
- Define request/response schemas
|
|
372
|
+
|
|
373
|
+
4. Security
|
|
374
|
+
- Add PCI-DSS compliance policy
|
|
375
|
+
- Require OAuth2 authentication
|
|
376
|
+
|
|
377
|
+
5. Monitoring
|
|
378
|
+
- Availability metric (99.9% SLO)
|
|
379
|
+
- Latency metric (P95 < 200ms)
|
|
380
|
+
- Error rate metric
|
|
381
|
+
|
|
382
|
+
6. Validate
|
|
383
|
+
- Run strict validation
|
|
384
|
+
- Check all references
|
|
385
|
+
|
|
386
|
+
Proceed with this plan? (I can adjust any step)"
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
## Example Interactions
|
|
390
|
+
|
|
391
|
+
### Example 1: Simple Addition
|
|
392
|
+
|
|
393
|
+
```
|
|
394
|
+
User: /dr-model Add inventory management business service
|
|
395
|
+
|
|
396
|
+
You: Creating business service for inventory management...
|
|
397
|
+
|
|
398
|
+
dr add business service --name "Inventory Management" \
|
|
399
|
+
--description "Manages product inventory and stock levels"
|
|
400
|
+
|
|
401
|
+
✓ Created: business.service.inventory-management
|
|
402
|
+
|
|
403
|
+
Suggested next steps:
|
|
404
|
+
- Project to application: /dr-model Create app service for inventory
|
|
405
|
+
- Add monitoring: /dr-model Monitor inventory service availability
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Example 2: With Traceability
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
User: /dr-model Add checkout service that supports the improve conversion goal
|
|
412
|
+
|
|
413
|
+
You: I'll create a checkout service linked to the conversion goal.
|
|
414
|
+
|
|
415
|
+
First, let me verify the goal exists...
|
|
416
|
+
dr search "conversion" --layer motivation
|
|
417
|
+
|
|
418
|
+
✓ Found: motivation.goal.improve-conversion
|
|
419
|
+
|
|
420
|
+
Creating service:
|
|
421
|
+
dr add business service "Checkout Service" \
|
|
422
|
+
--description "Handles customer checkout process"
|
|
423
|
+
|
|
424
|
+
✓ Created: business.service.checkout
|
|
425
|
+
✓ Linked to goal
|
|
426
|
+
✓ Validation passed
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### Example 3: Query Then Act
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
User: /dr-model Show me services without security policies
|
|
433
|
+
|
|
434
|
+
You: Searching for unsecured services...
|
|
435
|
+
|
|
436
|
+
dr list application --type service --json
|
|
437
|
+
|
|
438
|
+
(analyzing results...)
|
|
439
|
+
|
|
440
|
+
Found 2 services without security policies:
|
|
441
|
+
1. application.service.notification-service
|
|
442
|
+
2. application.service.reporting-service
|
|
443
|
+
|
|
444
|
+
Should I add authentication policies to these services?
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
## Element Investigation Pattern
|
|
448
|
+
|
|
449
|
+
When you need to understand an existing element before modifying it, use this standard 3-command sequence:
|
|
450
|
+
|
|
451
|
+
```bash
|
|
452
|
+
# 1. Inspect element metadata and properties
|
|
453
|
+
dr show <element-id>
|
|
454
|
+
|
|
455
|
+
# 2. Trace cross-layer dependencies (up and down the stack)
|
|
456
|
+
dr trace <element-id> --direction both
|
|
457
|
+
|
|
458
|
+
# 3. Check for validation issues affecting this element
|
|
459
|
+
dr validate --layers <layer>
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### Important: `dr show` Does Not Display Relationships
|
|
463
|
+
|
|
464
|
+
`dr show` reports `hasRelationships: false` for many elements even when they have relationships. This is because intra-layer relationships are stored in a central `relationships.yaml` file and are not surfaced by `dr show`. To see actual relationships, use:
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
dr trace <element-id> # Shows cross-layer dependency chain
|
|
468
|
+
dr relationship list <layer> # Shows all relationships in the layer
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
Do not conclude an element is isolated based on `dr show` output alone. Always follow up with `dr trace`.
|
|
472
|
+
|
|
473
|
+
### Investigation Example
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
# Wrong: only dr show
|
|
477
|
+
dr show api.operation.register-webhook-subscription
|
|
478
|
+
# → shows properties but hides all relationships
|
|
479
|
+
|
|
480
|
+
# Right: full picture
|
|
481
|
+
dr show api.operation.register-webhook-subscription
|
|
482
|
+
dr trace api.operation.register-webhook-subscription --direction both
|
|
483
|
+
dr validate --layers api
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
## Related Commands
|
|
487
|
+
|
|
488
|
+
- `/dr-info` - Model overview (layer counts, version)
|
|
489
|
+
- `/dr-init` - Initialize a new model
|
|
490
|
+
- `/dr-map` - Extract model from code
|
|
491
|
+
- `/dr-project` - Automated cross-layer projection
|
|
492
|
+
- `/dr-validate` - Validate model and check for issues
|
|
493
|
+
- `dr --help` - View all DR CLI commands
|