@documentation-robotics/cli 0.1.0 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +466 -693
- package/dist/analysis/data-model-analyzer.js +189 -0
- package/dist/analysis/data-model-analyzer.js.map +7 -0
- package/dist/analysis/index.js +3 -0
- package/dist/analysis/index.js.map +7 -0
- package/dist/analysis/relationship-classifier.js +181 -0
- package/dist/analysis/relationship-classifier.js.map +7 -0
- package/dist/analyzers/base-analyzer.js +1 -0
- package/dist/analyzers/base-analyzer.js.map +7 -0
- package/dist/analyzers/call-graph-utils.js +39 -0
- package/dist/analyzers/call-graph-utils.js.map +7 -0
- package/dist/analyzers/cbm-analyzer.js +1205 -0
- package/dist/analyzers/cbm-analyzer.js.map +7 -0
- package/dist/analyzers/heuristic-utils.js +55 -0
- package/dist/analyzers/heuristic-utils.js.map +7 -0
- package/dist/analyzers/mapping-loader.js +146 -0
- package/dist/analyzers/mapping-loader.js.map +7 -0
- package/dist/analyzers/registry.js +124 -0
- package/dist/analyzers/registry.js.map +7 -0
- package/dist/analyzers/session-state.js +176 -0
- package/dist/analyzers/session-state.js.map +7 -0
- package/dist/analyzers/stdio-client.js +206 -0
- package/dist/analyzers/stdio-client.js.map +7 -0
- package/dist/analyzers/types.js +15 -0
- package/dist/analyzers/types.js.map +7 -0
- package/dist/analyzers/verify-engine.js +209 -0
- package/dist/analyzers/verify-engine.js.map +7 -0
- package/dist/analyzers/verify-ignore.js +130 -0
- package/dist/analyzers/verify-ignore.js.map +7 -0
- package/dist/analyzers/version.js +8 -0
- package/dist/analyzers/version.js.map +7 -0
- package/dist/audit/ai/runner.js +41 -0
- package/dist/audit/ai/runner.js.map +7 -0
- package/dist/audit/differential-analyzer.js +183 -0
- package/dist/audit/differential-analyzer.js.map +7 -0
- package/dist/audit/index.js +32 -0
- package/dist/audit/index.js.map +7 -0
- package/dist/audit/nodes/ai/evaluator.js +49 -0
- package/dist/audit/nodes/ai/evaluator.js.map +7 -0
- package/dist/audit/nodes/ai/parser.js +55 -0
- package/dist/audit/nodes/ai/parser.js.map +7 -0
- package/dist/audit/nodes/ai/prompts.js +103 -0
- package/dist/audit/nodes/ai/prompts.js.map +7 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js +32 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js.map +7 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js +47 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js.map +7 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js +79 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js.map +7 -0
- package/dist/audit/nodes/model/orchestrator.js +82 -0
- package/dist/audit/nodes/model/orchestrator.js.map +7 -0
- package/dist/audit/nodes/spec/loader.js +116 -0
- package/dist/audit/nodes/spec/loader.js.map +7 -0
- package/dist/audit/nodes/spec/orchestrator.js +68 -0
- package/dist/audit/nodes/spec/orchestrator.js.map +7 -0
- package/dist/audit/nodes/types.js +1 -0
- package/dist/audit/nodes/types.js.map +7 -0
- package/dist/audit/pipeline/index.js +5 -0
- package/dist/audit/pipeline/index.js.map +7 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js +218 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js.map +7 -0
- package/dist/audit/relationships/ai/evaluator.js +235 -0
- package/dist/audit/relationships/ai/evaluator.js.map +7 -0
- package/dist/audit/relationships/ai/parser.js +197 -0
- package/dist/audit/relationships/ai/parser.js.map +7 -0
- package/dist/audit/relationships/ai/prompts.js +274 -0
- package/dist/audit/relationships/ai/prompts.js.map +7 -0
- package/dist/audit/relationships/analysis/balance-assessor.js +115 -0
- package/dist/audit/relationships/analysis/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js +95 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/layer-templates.js +294 -0
- package/dist/audit/relationships/analysis/layer-templates.js.map +7 -0
- package/dist/audit/relationships/graph/connectivity.js +129 -0
- package/dist/audit/relationships/graph/connectivity.js.map +7 -0
- package/dist/audit/relationships/graph/relationship-graph.js +179 -0
- package/dist/audit/relationships/graph/relationship-graph.js.map +7 -0
- package/dist/audit/relationships/model/balance-assessor.js +49 -0
- package/dist/audit/relationships/model/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/model/coverage-analyzer.js +34 -0
- package/dist/audit/relationships/model/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/duplicate-detector.js +68 -0
- package/dist/audit/relationships/model/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/model/gap-analyzer.js +41 -0
- package/dist/audit/relationships/model/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/orchestrator.js +126 -0
- package/dist/audit/relationships/model/orchestrator.js.map +7 -0
- package/dist/audit/relationships/spec/orchestrator.js +157 -0
- package/dist/audit/relationships/spec/orchestrator.js.map +7 -0
- package/dist/audit/reports/index.js +5 -0
- package/dist/audit/reports/index.js.map +7 -0
- package/dist/audit/reports/report-generator.js +118 -0
- package/dist/audit/reports/report-generator.js.map +7 -0
- package/dist/audit/snapshot-storage.js +163 -0
- package/dist/audit/snapshot-storage.js.map +7 -0
- package/dist/audit/types.js +21 -0
- package/dist/audit/types.js.map +7 -0
- package/dist/cli.js +223 -92
- package/dist/cli.js.map +3 -3
- package/dist/coding-agents/agents/claude-code.js +147 -0
- package/dist/coding-agents/agents/claude-code.js.map +7 -0
- package/dist/coding-agents/agents/index.js +5 -0
- package/dist/coding-agents/agents/index.js.map +7 -0
- package/dist/coding-agents/agents/types.js +1 -0
- package/dist/coding-agents/agents/types.js.map +7 -0
- package/dist/coding-agents/base-chat-client.js +45 -0
- package/dist/coding-agents/base-chat-client.js.map +7 -0
- package/dist/coding-agents/chat-utils.js +23 -0
- package/dist/coding-agents/chat-utils.js.map +7 -0
- package/dist/coding-agents/claude-code-client.js +246 -0
- package/dist/coding-agents/claude-code-client.js.map +7 -0
- package/dist/coding-agents/copilot-client.js +209 -0
- package/dist/coding-agents/copilot-client.js.map +7 -0
- package/dist/commands/add.js +95 -33
- package/dist/commands/add.js.map +2 -2
- package/dist/commands/analyzer.js +511 -0
- package/dist/commands/analyzer.js.map +7 -0
- package/dist/commands/audit-diff.js +49 -0
- package/dist/commands/audit-diff.js.map +7 -0
- package/dist/commands/audit-snapshots.js +62 -0
- package/dist/commands/audit-snapshots.js.map +7 -0
- package/dist/commands/audit.js +81 -0
- package/dist/commands/audit.js.map +7 -0
- package/dist/commands/catalog.js +248 -0
- package/dist/commands/catalog.js.map +7 -0
- package/dist/commands/changeset.js +577 -66
- package/dist/commands/changeset.js.map +2 -2
- package/dist/commands/chat.js +106 -83
- package/dist/commands/chat.js.map +2 -2
- package/dist/commands/claude.js +74 -0
- package/dist/commands/claude.js.map +7 -0
- package/dist/commands/conformance.js +71 -68
- package/dist/commands/conformance.js.map +2 -2
- package/dist/commands/copilot.js +75 -0
- package/dist/commands/copilot.js.map +7 -0
- package/dist/commands/delete.js +125 -11
- package/dist/commands/delete.js.map +3 -3
- package/dist/commands/discover-logic.js +44 -0
- package/dist/commands/discover-logic.js.map +7 -0
- package/dist/commands/docs.js +87 -0
- package/dist/commands/docs.js.map +7 -0
- package/dist/commands/element.js +14 -20
- package/dist/commands/element.js.map +2 -2
- package/dist/commands/export.js +13 -3
- package/dist/commands/export.js.map +2 -2
- package/dist/commands/import.js +51 -0
- package/dist/commands/import.js.map +7 -0
- package/dist/commands/info.js +30 -24
- package/dist/commands/info.js.map +2 -2
- package/dist/commands/init.js +27 -11
- package/dist/commands/init.js.map +2 -2
- package/dist/commands/list.js +63 -13
- package/dist/commands/list.js.map +3 -3
- package/dist/commands/relationship.js +225 -37
- package/dist/commands/relationship.js.map +2 -2
- package/dist/commands/report.js +54 -0
- package/dist/commands/report.js.map +7 -0
- package/dist/commands/reports.js +45 -0
- package/dist/commands/reports.js.map +7 -0
- package/dist/commands/schema.js +135 -0
- package/dist/commands/schema.js.map +7 -0
- package/dist/commands/search.js +40 -12
- package/dist/commands/search.js.map +2 -2
- package/dist/commands/show.js +58 -27
- package/dist/commands/show.js.map +2 -2
- package/dist/commands/stats.js +35 -0
- package/dist/commands/stats.js.map +7 -0
- package/dist/commands/trace.js +39 -16
- package/dist/commands/trace.js.map +2 -2
- package/dist/commands/update.js +141 -14
- package/dist/commands/update.js.map +2 -2
- package/dist/commands/upgrade.js +210 -46
- package/dist/commands/upgrade.js.map +3 -3
- package/dist/commands/validate.js +142 -23
- package/dist/commands/validate.js.map +3 -3
- package/dist/commands/version.js +8 -12
- package/dist/commands/version.js.map +2 -2
- package/dist/commands/visualize.js +155 -25
- package/dist/commands/visualize.js.map +2 -2
- package/dist/core/base-snapshot-manager.js +84 -0
- package/dist/core/base-snapshot-manager.js.map +7 -0
- package/dist/core/changeset-exporter.js +305 -0
- package/dist/core/changeset-exporter.js.map +7 -0
- package/dist/core/changeset-validator.js +41 -0
- package/dist/core/changeset-validator.js.map +7 -0
- package/dist/core/changeset.js +88 -173
- package/dist/core/changeset.js.map +2 -2
- package/dist/core/dependency-tracker.js +4 -2
- package/dist/core/dependency-tracker.js.map +2 -2
- package/dist/core/element.js +98 -27
- package/dist/core/element.js.map +2 -2
- package/dist/core/golden-copy-cache.js +290 -0
- package/dist/core/golden-copy-cache.js.map +7 -0
- package/dist/core/graph-model.js +266 -0
- package/dist/core/graph-model.js.map +7 -0
- package/dist/core/layer.js +159 -16
- package/dist/core/layer.js.map +2 -2
- package/dist/core/layers.js +32 -0
- package/dist/core/layers.js.map +7 -0
- package/dist/core/manifest.js +32 -11
- package/dist/core/manifest.js.map +2 -2
- package/dist/core/migration-registry.js +56 -1
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model.js +424 -217
- package/dist/core/model.js.map +3 -3
- package/dist/core/mutation-handler.js +179 -0
- package/dist/core/mutation-handler.js.map +7 -0
- package/dist/core/reference-registry.js +29 -21
- package/dist/core/reference-registry.js.map +2 -2
- package/dist/core/relationship-catalog.js +189 -0
- package/dist/core/relationship-catalog.js.map +7 -0
- package/dist/core/relationship-registry.js.map +2 -2
- package/dist/core/relationships.js.map +1 -1
- package/dist/core/report-data-model.js +285 -0
- package/dist/core/report-data-model.js.map +7 -0
- package/dist/core/spec-data-service.js +185 -0
- package/dist/core/spec-data-service.js.map +7 -0
- package/dist/core/spec-loader-types.js +1 -0
- package/dist/core/spec-loader-types.js.map +7 -0
- package/dist/core/spec-loader.js +234 -0
- package/dist/core/spec-loader.js.map +7 -0
- package/dist/core/staged-changeset-storage.js +282 -0
- package/dist/core/staged-changeset-storage.js.map +7 -0
- package/dist/core/staging-area.js +1002 -0
- package/dist/core/staging-area.js.map +7 -0
- package/dist/core/stats-collector.js +169 -0
- package/dist/core/stats-collector.js.map +7 -0
- package/dist/core/virtual-projection.js +443 -0
- package/dist/core/virtual-projection.js.map +7 -0
- package/dist/export/archimate-exporter.js +99 -60
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/export/audit-formatters.js +479 -0
- package/dist/export/audit-formatters.js.map +7 -0
- package/dist/export/diff-formatters.js +99 -0
- package/dist/export/diff-formatters.js.map +7 -0
- package/dist/export/export-manager.js.map +2 -2
- package/dist/export/graphml-exporter.js +44 -27
- package/dist/export/graphml-exporter.js.map +2 -2
- package/dist/export/index.js +4 -0
- package/dist/export/index.js.map +2 -2
- package/dist/export/json-schema-exporter.js +55 -42
- package/dist/export/json-schema-exporter.js.map +2 -2
- package/dist/export/markdown-exporter.js +92 -70
- package/dist/export/markdown-exporter.js.map +2 -2
- package/dist/export/markdown-generator.js +248 -0
- package/dist/export/markdown-generator.js.map +7 -0
- package/dist/export/markdown-utils.js +30 -0
- package/dist/export/markdown-utils.js.map +7 -0
- package/dist/export/mermaid-markdown-exporter.js +37 -0
- package/dist/export/mermaid-markdown-exporter.js.map +7 -0
- package/dist/export/openapi-exporter.js +119 -71
- package/dist/export/openapi-exporter.js.map +2 -2
- package/dist/export/plantuml-exporter.js +104 -39
- package/dist/export/plantuml-exporter.js.map +2 -2
- package/dist/export/report-formatters.js +111 -0
- package/dist/export/report-formatters.js.map +7 -0
- package/dist/export/stats-formatters.js +98 -0
- package/dist/export/stats-formatters.js.map +7 -0
- package/dist/export/types.js +2 -14
- package/dist/export/types.js.map +2 -2
- package/dist/export/verify-formatters.js +153 -0
- package/dist/export/verify-formatters.js.map +7 -0
- package/dist/generated/compiled-validators.js +17 -0
- package/dist/generated/compiled-validators.js.map +7 -0
- package/dist/generated/index.js +31 -0
- package/dist/generated/index.js.map +7 -0
- package/dist/generated/layer-registry.js +190 -0
- package/dist/generated/layer-registry.js.map +7 -0
- package/dist/generated/layer-types.js +7 -0
- package/dist/generated/layer-types.js.map +7 -0
- package/dist/generated/node-types.js +1719 -0
- package/dist/generated/node-types.js.map +7 -0
- package/dist/generated/relationship-index.js +14552 -0
- package/dist/generated/relationship-index.js.map +7 -0
- package/dist/import/archimate-importer.js +166 -0
- package/dist/import/archimate-importer.js.map +7 -0
- package/dist/import/index.js +47 -0
- package/dist/import/index.js.map +7 -0
- package/dist/import/openapi-importer.js +143 -0
- package/dist/import/openapi-importer.js.map +7 -0
- package/dist/import/types.js +1 -0
- package/dist/import/types.js.map +7 -0
- package/dist/integrations/base-manager.js +311 -0
- package/dist/integrations/base-manager.js.map +7 -0
- package/dist/integrations/claude-manager.js +360 -0
- package/dist/integrations/claude-manager.js.map +7 -0
- package/dist/integrations/claude_code/agents/dr-advisor.md +253 -0
- package/dist/integrations/claude_code/agents/dr-architect.md +278 -0
- package/dist/integrations/claude_code/agents/dr-extractor.md +286 -0
- package/dist/integrations/claude_code/commands/dr-changeset.md +657 -0
- package/dist/integrations/claude_code/commands/dr-design.md +373 -0
- package/dist/integrations/claude_code/commands/dr-info.md +132 -0
- package/dist/integrations/claude_code/commands/dr-init.md +251 -0
- package/dist/integrations/claude_code/commands/dr-map.md +936 -0
- package/dist/integrations/claude_code/commands/dr-model.md +493 -0
- package/dist/integrations/claude_code/commands/dr-relate.md +814 -0
- package/dist/integrations/claude_code/commands/dr-sync.md +279 -0
- package/dist/integrations/claude_code/commands/dr-validate.md +654 -0
- package/dist/integrations/claude_code/commands/dr-verify.md +559 -0
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +903 -0
- package/dist/integrations/claude_code/docs/QUICK_START.md +271 -0
- package/dist/integrations/claude_code/docs/README.md +347 -0
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +550 -0
- package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +620 -0
- package/dist/integrations/claude_code/skills/dr_03_security_layer/SKILL.md +642 -0
- package/dist/integrations/claude_code/skills/dr_04_application_layer/SKILL.md +911 -0
- package/dist/integrations/claude_code/skills/dr_05_technology_layer/SKILL.md +836 -0
- package/dist/integrations/claude_code/skills/dr_06_api_layer/SKILL.md +933 -0
- package/dist/integrations/claude_code/skills/dr_07_data_model_layer/SKILL.md +210 -0
- package/dist/integrations/claude_code/skills/dr_08_dataset_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_09_ux_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_10_navigation_layer/SKILL.md +318 -0
- package/dist/integrations/claude_code/skills/dr_11_apm_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_12_testing_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/claude_code/skills/dr_codebase_memory/SKILL.md +590 -0
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +295 -0
- package/dist/integrations/copilot-manager.js +328 -0
- package/dist/integrations/copilot-manager.js.map +7 -0
- package/dist/integrations/github_copilot/agents/dr-advisor.md +243 -0
- package/dist/integrations/github_copilot/agents/dr-architect.md +1567 -0
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +491 -0
- package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +539 -0
- package/dist/integrations/github_copilot/skills/dr_03_security_layer/SKILL.md +667 -0
- package/dist/integrations/github_copilot/skills/dr_04_application_layer/SKILL.md +670 -0
- package/dist/integrations/github_copilot/skills/dr_05_technology_layer/SKILL.md +660 -0
- package/dist/integrations/github_copilot/skills/dr_06_api_layer/SKILL.md +855 -0
- package/dist/integrations/github_copilot/skills/dr_07_data_model_layer/SKILL.md +171 -0
- package/dist/integrations/github_copilot/skills/dr_08_dataset_layer/SKILL.md +216 -0
- package/dist/integrations/github_copilot/skills/dr_09_ux_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_10_navigation_layer/SKILL.md +228 -0
- package/dist/integrations/github_copilot/skills/dr_11_apm_layer/SKILL.md +234 -0
- package/dist/integrations/github_copilot/skills/dr_12_testing_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/hash-utils.js +51 -0
- package/dist/integrations/hash-utils.js.map +7 -0
- package/dist/integrations/types.js +16 -0
- package/dist/integrations/types.js.map +7 -0
- package/dist/reports/model-layer-report-generator.js +278 -0
- package/dist/reports/model-layer-report-generator.js.map +7 -0
- package/dist/reports/model-report-data.js +57 -0
- package/dist/reports/model-report-data.js.map +7 -0
- package/dist/reports/model-report-orchestrator.js +103 -0
- package/dist/reports/model-report-orchestrator.js.map +7 -0
- package/dist/schemas/bundled/analyzers/cbm.json +595 -0
- package/dist/schemas/bundled/analyzers/manifest.json +9 -0
- package/dist/schemas/bundled/api.json +3411 -0
- package/dist/schemas/bundled/apm.json +2371 -0
- package/dist/schemas/bundled/application.json +1253 -0
- package/dist/schemas/bundled/base.json +1622 -0
- package/dist/schemas/bundled/business.json +1279 -0
- package/dist/schemas/bundled/data-model.json +1298 -0
- package/dist/schemas/bundled/data-store.json +2025 -0
- package/dist/schemas/bundled/manifest.json +93 -0
- package/dist/schemas/bundled/motivation.json +1360 -0
- package/dist/schemas/bundled/navigation.json +1874 -0
- package/dist/schemas/bundled/security.json +3488 -0
- package/dist/schemas/bundled/technology.json +2067 -0
- package/dist/schemas/bundled/testing.json +3120 -0
- package/dist/schemas/bundled/ux.json +3592 -0
- package/dist/server/schemas.js +202 -0
- package/dist/server/schemas.js.map +7 -0
- package/dist/server/server.js +1336 -252
- package/dist/server/server.js.map +3 -3
- package/dist/server/telemetry-middleware.js +22 -15
- package/dist/server/telemetry-middleware.js.map +2 -2
- package/dist/server-entry.js +65 -0
- package/dist/server-entry.js.map +7 -0
- package/dist/telemetry/config.js +89 -0
- package/dist/telemetry/config.js.map +7 -0
- package/dist/telemetry/console-interceptor.js.map +1 -1
- package/dist/telemetry/detect.js +24 -0
- package/dist/telemetry/detect.js.map +7 -0
- package/dist/telemetry/fetch-otlp-exporter.js +112 -0
- package/dist/telemetry/fetch-otlp-exporter.js.map +7 -0
- package/dist/telemetry/index.js +153 -3
- package/dist/telemetry/index.js.map +2 -2
- package/dist/telemetry/resilient-exporter.js +22 -8
- package/dist/telemetry/resilient-exporter.js.map +2 -2
- package/dist/telemetry/resilient-log-exporter.js +17 -8
- package/dist/telemetry/resilient-log-exporter.js.map +2 -2
- package/dist/telemetry/test-instrumentation.js.map +2 -2
- package/dist/types/index.js +84 -0
- package/dist/types/index.js.map +3 -3
- package/dist/types/source-reference.js +1 -0
- package/dist/types/source-reference.js.map +7 -0
- package/dist/utils/chat-logger.js +292 -0
- package/dist/utils/chat-logger.js.map +7 -0
- package/dist/utils/claude-stream.js +8 -0
- package/dist/utils/claude-stream.js.map +7 -0
- package/dist/utils/date-utils.js +7 -0
- package/dist/utils/date-utils.js.map +7 -0
- package/dist/utils/element-utils.js.map +1 -1
- package/dist/utils/errors.js +88 -15
- package/dist/utils/errors.js.map +3 -3
- package/dist/utils/export-python-annotations.js +82 -0
- package/dist/utils/export-python-annotations.js.map +7 -0
- package/dist/utils/file-io.js +7 -2
- package/dist/utils/file-io.js.map +2 -2
- package/dist/utils/file-lock.js +156 -0
- package/dist/utils/file-lock.js.map +7 -0
- package/dist/utils/id-generator.js +18 -0
- package/dist/utils/id-generator.js.map +7 -0
- package/dist/utils/layer-name-formatter.js +16 -0
- package/dist/utils/layer-name-formatter.js.map +7 -0
- package/dist/utils/markdown-anchor.js +7 -0
- package/dist/utils/markdown-anchor.js.map +7 -0
- package/dist/utils/markdown-link.js +12 -0
- package/dist/utils/markdown-link.js.map +7 -0
- package/dist/utils/markdown-table.js +17 -0
- package/dist/utils/markdown-table.js.map +7 -0
- package/dist/utils/mermaid-utils.js +11 -0
- package/dist/utils/mermaid-utils.js.map +7 -0
- package/dist/utils/project-paths.js.map +2 -2
- package/dist/utils/source-reference.js +52 -0
- package/dist/utils/source-reference.js.map +7 -0
- package/dist/utils/spec-installer.js +40 -53
- package/dist/utils/spec-installer.js.map +2 -2
- package/dist/utils/spec-version.js +5 -1
- package/dist/utils/spec-version.js.map +2 -2
- package/dist/utils/string-utils.js +12 -0
- package/dist/utils/string-utils.js.map +7 -0
- package/dist/utils/table-formatting.js +19 -0
- package/dist/utils/table-formatting.js.map +7 -0
- package/dist/validators/index.js +4 -0
- package/dist/validators/index.js.map +2 -2
- package/dist/validators/naming-validator.js +20 -23
- package/dist/validators/naming-validator.js.map +2 -2
- package/dist/validators/reference-validator.js +23 -38
- package/dist/validators/reference-validator.js.map +2 -2
- package/dist/validators/relationship-schema-validator.js +243 -0
- package/dist/validators/relationship-schema-validator.js.map +7 -0
- package/dist/validators/schema-validator.js +168 -68
- package/dist/validators/schema-validator.js.map +2 -2
- package/dist/validators/semantic-validator.js +36 -60
- package/dist/validators/semantic-validator.js.map +2 -2
- package/dist/validators/types.js.map +2 -2
- package/dist/validators/validation-formatter.js +159 -0
- package/dist/validators/validation-formatter.js.map +7 -0
- package/dist/validators/validator.js +24 -38
- package/dist/validators/validator.js.map +2 -2
- package/dist/viewer/README.md +139 -0
- package/dist/viewer/assets/main-CY0Xufuj.css +1 -0
- package/dist/viewer/assets/main-DtgErnwF.js +81 -0
- package/dist/viewer/assets/vendor-CxKvDp2x.js +17 -0
- package/dist/viewer/favicon.svg +11 -0
- package/dist/viewer/fonts/inter/Inter-Black.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Bold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Light.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Medium.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Regular.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/viewer/index.html +15 -0
- package/dist/viewer/manifest.json +99 -0
- package/dist/viewer/version.json +1 -0
- package/package.json +37 -13
- package/PYTHON_CLI_PARITY.md +0 -265
- package/PYTHON_CLI_STRUCTURE_UPDATE.md +0 -246
- package/biome.json +0 -42
- package/bunfig.toml +0 -3
- package/dist/ai/claude-client.js +0 -71
- package/dist/ai/claude-client.js.map +0 -7
- package/dist/ai/context-provider.js +0 -129
- package/dist/ai/context-provider.js.map +0 -7
- package/dist/ai/tools.js +0 -231
- package/dist/ai/tools.js.map +0 -7
- package/dist/commands/migrate.js +0 -36
- package/dist/commands/migrate.js.map +0 -7
- package/dist/commands/project.js +0 -74
- package/dist/commands/project.js.map +0 -7
- package/dist/core/active-changeset.js +0 -52
- package/dist/core/active-changeset.js.map +0 -7
- package/dist/core/projection-engine.js +0 -288
- package/dist/core/projection-engine.js.map +0 -7
- package/dist/schemas/bundled/01-motivation-layer.schema.json +0 -942
- package/dist/schemas/bundled/02-business-layer.schema.json +0 -1293
- package/dist/schemas/bundled/03-security-layer.schema.json +0 -2177
- package/dist/schemas/bundled/04-application-layer.schema.json +0 -1328
- package/dist/schemas/bundled/05-technology-layer.schema.json +0 -1465
- package/dist/schemas/bundled/06-api-layer.schema.json +0 -1743
- package/dist/schemas/bundled/07-data-model-layer.schema.json +0 -1253
- package/dist/schemas/bundled/08-datastore-layer.schema.json +0 -892
- package/dist/schemas/bundled/09-ux-layer.schema.json +0 -1506
- package/dist/schemas/bundled/10-navigation-layer.schema.json +0 -843
- package/dist/schemas/bundled/11-apm-observability-layer.schema.json +0 -1430
- package/dist/schemas/bundled/12-testing-layer.schema.json +0 -1091
- package/dist/schemas/bundled/common/layer-extensions.schema.json +0 -266
- package/dist/schemas/bundled/common/predicates.schema.json +0 -493
- package/dist/schemas/bundled/common/relationships.schema.json +0 -791
- package/dist/schemas/bundled/common/source-references.schema.json +0 -71
- package/dist/schemas/bundled/link-registry.json +0 -1839
- package/dist/schemas/bundled/link-registry.schema.json +0 -339
- package/dist/schemas/bundled/relationship-catalog.json +0 -1302
- package/dist/schemas/bundled/relationship-type.schema.json +0 -221
- package/dist/utils/model-path.js +0 -22
- package/dist/utils/model-path.js.map +0 -7
- package/docs/TEST-INSTRUMENTATION.md +0 -405
- package/docs/telemetry.md +0 -427
- package/test-debug.js +0 -33
- package/test-special.mjs +0 -46
- package/test_runner.ts +0 -7
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_01_MOTIV
|
|
3
|
+
description: Expert knowledge for Motivation Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"stakeholder",
|
|
7
|
+
"driver",
|
|
8
|
+
"assessment",
|
|
9
|
+
"goal",
|
|
10
|
+
"outcome",
|
|
11
|
+
"principle",
|
|
12
|
+
"requirement",
|
|
13
|
+
"constraint",
|
|
14
|
+
"motivation",
|
|
15
|
+
"archimate motivation"
|
|
16
|
+
]
|
|
17
|
+
version: 0.8.3
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Motivation Layer Skill
|
|
21
|
+
|
|
22
|
+
**Layer Number:** 01
|
|
23
|
+
**Specification:** Metadata Model Spec v0.8.3
|
|
24
|
+
**Purpose:** Captures stakeholder concerns, goals, requirements, and constraints that drive architectural decisions using ArchiMate motivation elements.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Layer Overview
|
|
29
|
+
|
|
30
|
+
The Motivation Layer is the **highest layer** in the 12-layer architecture and provides governance to all other layers. It describes:
|
|
31
|
+
|
|
32
|
+
- **WHY** - The reasons and drivers behind architectural decisions
|
|
33
|
+
- **WHO** - Stakeholders with interests in the outcome
|
|
34
|
+
- **WHAT** - Goals, requirements, principles, and constraints
|
|
35
|
+
- **VALUE** - The worth and importance of business outcomes
|
|
36
|
+
|
|
37
|
+
This layer uses **ArchiMate 3.2 Motivation Layer** standard without custom extensions.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Entity Types
|
|
42
|
+
|
|
43
|
+
> **CLI Introspection:** Run `dr schema types motivation` for the authoritative, always-current list of node types.
|
|
44
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
45
|
+
|
|
46
|
+
| Entity Type | Description | Key Attributes |
|
|
47
|
+
| --------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
48
|
+
| **Stakeholder** | Individual, team, or organization with interest in the outcome | Types: internal, external, customer, partner, regulator |
|
|
49
|
+
| **Driver** | External or internal condition that motivates an organization | Categories: market, regulatory, technology, competitive, operational, strategic |
|
|
50
|
+
| **Assessment** | Outcome of analysis of the state of affairs (SWOT) | Types: strength, weakness, opportunity, threat, risk, gap |
|
|
51
|
+
| **Goal** | High-level statement of intent, direction, or desired end state | Priority: critical, high, medium, low. Can be SMART (measurable, target-date, KPI) |
|
|
52
|
+
| **Outcome** | End result that has been achieved | Status: planned, in-progress, achieved, not-achieved |
|
|
53
|
+
| **Principle** | Normative property of all systems in a given context | Categories: business, data, application, technology, security, integration |
|
|
54
|
+
| **Requirement** | Statement of need that must be realized | Types: functional, non-functional, business, technical, compliance, user |
|
|
55
|
+
| **Constraint** | Restriction on the way in which a system is realized | Types: budget, time, technology, regulatory, organizational, resource |
|
|
56
|
+
| **Meaning** | Knowledge or expertise present in a representation | Used to describe semantics and interpretations |
|
|
57
|
+
| **Value** | Relative worth, utility, or importance of something | Types: financial, customer, operational, strategic, social |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Type Decision Tree
|
|
62
|
+
|
|
63
|
+
Use this decision tree **before assigning a type** to any motivation concept.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
IS this an individual, team, or organization with an interest in the system or its outcomes?
|
|
67
|
+
→ motivation.stakeholder
|
|
68
|
+
|
|
69
|
+
IS this an external or internal condition (market, regulatory, technology, competitive, operational,
|
|
70
|
+
strategic) that motivates the organization to change or act?
|
|
71
|
+
→ motivation.driver
|
|
72
|
+
|
|
73
|
+
IS this the result of analyzing the current state — a strength, weakness, opportunity, threat, risk,
|
|
74
|
+
or gap identified through assessment (e.g., SWOT)?
|
|
75
|
+
→ motivation.assessment
|
|
76
|
+
|
|
77
|
+
IS this a high-level statement of intent, direction, or desired end state the organization wants to achieve?
|
|
78
|
+
→ motivation.goal
|
|
79
|
+
|
|
80
|
+
IS this a specific, verifiable statement of need that must be realized (functional, non-functional,
|
|
81
|
+
compliance, business, technical, or user need)?
|
|
82
|
+
→ motivation.requirement
|
|
83
|
+
|
|
84
|
+
IS this a normative rule or guideline that all systems in this context must follow
|
|
85
|
+
(business, data, application, technology, security, integration)?
|
|
86
|
+
→ motivation.principle
|
|
87
|
+
|
|
88
|
+
IS this a hard restriction on HOW the system can be realized — a limit the system cannot exceed
|
|
89
|
+
(budget, time, technology, regulatory, organizational, resource)?
|
|
90
|
+
→ motivation.constraint
|
|
91
|
+
|
|
92
|
+
IS this an end result that has been or is being achieved — tracked against a goal?
|
|
93
|
+
→ motivation.outcome
|
|
94
|
+
|
|
95
|
+
IS this the relative worth, utility, or importance that the system or feature delivers?
|
|
96
|
+
→ motivation.value
|
|
97
|
+
|
|
98
|
+
IS this a semantic definition, interpretation, or piece of knowledge attached to another element?
|
|
99
|
+
→ motivation.meaning
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Key distinctions:**
|
|
103
|
+
|
|
104
|
+
- **Goal vs Requirement**: A Goal is aspirational ("improve performance"); a Requirement is a verifiable must ("API must respond in <200ms")
|
|
105
|
+
- **Requirement vs Constraint**: A Requirement says WHAT must be done; a Constraint says HOW it is bounded ("must use OAuth 2.0" limits the solution space)
|
|
106
|
+
- **Driver vs Assessment**: A Driver is an ongoing force motivating action; an Assessment is a point-in-time finding about the current state
|
|
107
|
+
- **Outcome vs Goal**: A Goal is what you intend to achieve; an Outcome is what has been (or is being) achieved
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Intra-Layer Relationships
|
|
112
|
+
|
|
113
|
+
### Structural Relationships
|
|
114
|
+
|
|
115
|
+
| Source Type | Predicate | Target Type | Example |
|
|
116
|
+
| ----------- | ----------- | ----------- | ------------------------------------------------------------ |
|
|
117
|
+
| Goal | aggregates | Goal | Strategic Goal aggregates Operational Goals |
|
|
118
|
+
| Requirement | aggregates | Requirement | Business Requirement aggregates Functional Requirements |
|
|
119
|
+
| Principle | aggregates | Principle | Enterprise Principles aggregate Domain Principles |
|
|
120
|
+
| Constraint | aggregates | Constraint | Budget Constraint aggregates Project Budget Constraints |
|
|
121
|
+
| Outcome | realizes | Goal | "Launched Mobile App" realizes "Launch Mobile App by Q4" |
|
|
122
|
+
| Goal | realizes | Value | "Improve Customer Satisfaction" realizes "Customer Value" |
|
|
123
|
+
| Requirement | realizes | Goal | Functional Requirements realize Business Goals |
|
|
124
|
+
| Requirement | realizes | Principle | Technical Requirements realize Security Principles |
|
|
125
|
+
| Constraint | realizes | Principle | Technology Constraints realize Technology Principles |
|
|
126
|
+
| Goal | specializes | Goal | "Reduce API Latency" specializes "Improve Performance" |
|
|
127
|
+
| Requirement | specializes | Requirement | "95% Uptime SLA" specializes "High Availability Requirement" |
|
|
128
|
+
| Principle | specializes | Principle | "Encrypt All PII" specializes "Data Security Principle" |
|
|
129
|
+
| Value | specializes | Value | "Customer Retention Value" specializes "Customer Value" |
|
|
130
|
+
|
|
131
|
+
### Behavioral Relationships
|
|
132
|
+
|
|
133
|
+
| Source Type | Predicate | Target Type | Example |
|
|
134
|
+
| ----------- | --------------- | ----------- | ----------------------------------------------------------------------- |
|
|
135
|
+
| Driver | influences | Goal | "Digital Transformation" influences "Modernize Architecture" |
|
|
136
|
+
| Driver | influences | Requirement | "GDPR Compliance" influences "Data Protection Requirements" |
|
|
137
|
+
| Driver | influences | Principle | "Cloud-First Strategy" influences "Cloud-Native Principles" |
|
|
138
|
+
| Assessment | influences | Goal | "Legacy System Weakness" influences "Modernization Goal" |
|
|
139
|
+
| Goal | influences | Requirement | Business Goals influence Functional Requirements |
|
|
140
|
+
| Principle | influences | Requirement | Security Principles influence Technical Requirements |
|
|
141
|
+
| Principle | influences | Constraint | "API-First Principle" influences "RESTful API Constraint" |
|
|
142
|
+
| Constraint | influences | Requirement | Budget Constraints influence Implementation Requirements |
|
|
143
|
+
| Value | influences | Goal | "Customer Value" influences "Improve UX Goal" |
|
|
144
|
+
| Stakeholder | influences | Goal | "CEO" influences Strategic Goals |
|
|
145
|
+
| Stakeholder | influences | Requirement | "End Users" influence Functional Requirements |
|
|
146
|
+
| Stakeholder | influences | Value | "Shareholders" influence Financial Value |
|
|
147
|
+
| Stakeholder | associated-with | Driver | "Product Manager" associated with "Market Competition Driver" |
|
|
148
|
+
| Goal | associated-with | Outcome | "Improve Performance" associated with "Achieved 50ms Latency" |
|
|
149
|
+
| Requirement | associated-with | Outcome | "High Availability Requirement" associated with "99.99% Uptime Outcome" |
|
|
150
|
+
| Driver | associated-with | Assessment | "Market Driver" associated with "Competitive Threat Assessment" |
|
|
151
|
+
| Value | associated-with | Meaning | "Customer Value" associated with "Definition of Customer Success" |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Cross-Layer References
|
|
156
|
+
|
|
157
|
+
**Motivation Layer is the highest layer** - It does **NOT reference any lower layers**. Instead, lower layers reference UP to this layer for governance.
|
|
158
|
+
|
|
159
|
+
### Incoming References (Lower Layers → Motivation)
|
|
160
|
+
|
|
161
|
+
| Layer | References Motivation For |
|
|
162
|
+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
163
|
+
| **Layer 2 (Business)** | BusinessService delivers Value, supports Goals, governed by Principles; BusinessActor is Stakeholder; Contract drives Constraints |
|
|
164
|
+
| **Layer 3 (Security)** | Actor references Stakeholder; ActorObjective references Goal; Threat references Assessment; Countermeasure implements Requirement |
|
|
165
|
+
| **Layer 4 (Application)** | ApplicationService supports Goals, delivers Value, governed by Principles; ApplicationFunction fulfills Requirements |
|
|
166
|
+
| **Layer 5 (Technology)** | TechnologyService supports Goals, governed by Principles; Node fulfills Requirements, constrained by Constraints |
|
|
167
|
+
| **Layer 6 (API)** | Operation supports Goals (x-supports-goals), fulfills Requirements, governed by Principles, constrained by Constraints |
|
|
168
|
+
| **Layer 7-12** | All layers can reference Principles, Constraints, Requirements, Goals for governance and traceability |
|
|
169
|
+
|
|
170
|
+
**Design Pattern:** Lower layers "look up" to the Motivation layer to justify WHY they exist and WHAT value they deliver.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Codebase Detection Patterns
|
|
175
|
+
|
|
176
|
+
The Motivation Layer is typically **NOT extracted from code** but documented separately. However, certain patterns suggest the need for motivation elements:
|
|
177
|
+
|
|
178
|
+
### Pattern 1: Requirements Traceability Comments
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
# REQUIREMENT: REQ-001 - User authentication must support OAuth 2.0
|
|
182
|
+
# GOAL: Improve security and user experience
|
|
183
|
+
# PRINCIPLE: Security by design
|
|
184
|
+
|
|
185
|
+
def configure_oauth(provider: str):
|
|
186
|
+
pass
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Maps to:**
|
|
190
|
+
|
|
191
|
+
- Requirement entity (REQ-001)
|
|
192
|
+
- Goal entity (improve security)
|
|
193
|
+
- Principle entity (security by design)
|
|
194
|
+
|
|
195
|
+
### Pattern 2: Non-Functional Requirements in Tests
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
@npm test.mark.performance
|
|
199
|
+
def test_api_response_time():
|
|
200
|
+
"""Verify API responds within 200ms (GOAL: sub-second response)"""
|
|
201
|
+
response_time = measure_api_call()
|
|
202
|
+
assert response_time < 0.2 # Constraint: < 200ms
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Maps to:**
|
|
206
|
+
|
|
207
|
+
- Goal (sub-second response)
|
|
208
|
+
- Constraint (< 200ms)
|
|
209
|
+
- Requirement (performance requirement)
|
|
210
|
+
|
|
211
|
+
### Pattern 3: Configuration Constants
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
# Constraint: Budget limit for cloud spending
|
|
215
|
+
MAX_MONTHLY_CLOUD_COST = 10000 # USD
|
|
216
|
+
|
|
217
|
+
# Principle: Data residency compliance
|
|
218
|
+
ALLOWED_REGIONS = ["us-east-1", "us-west-2"] # Constraint: US-only
|
|
219
|
+
|
|
220
|
+
# Goal: 99.99% availability
|
|
221
|
+
TARGET_UPTIME_SLA = 0.9999
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Maps to:**
|
|
225
|
+
|
|
226
|
+
- Constraint entities (budget, region)
|
|
227
|
+
- Goal (availability target)
|
|
228
|
+
- Principle (data residency)
|
|
229
|
+
|
|
230
|
+
### Pattern 4: README/Documentation Headers
|
|
231
|
+
|
|
232
|
+
```markdown
|
|
233
|
+
## Goals
|
|
234
|
+
|
|
235
|
+
- Achieve 99.9% system availability
|
|
236
|
+
- Reduce customer onboarding time to < 5 minutes
|
|
237
|
+
- Support 10,000 concurrent users
|
|
238
|
+
|
|
239
|
+
## Principles
|
|
240
|
+
|
|
241
|
+
- API-first architecture
|
|
242
|
+
- Microservices over monoliths
|
|
243
|
+
- Security by design
|
|
244
|
+
|
|
245
|
+
## Constraints
|
|
246
|
+
|
|
247
|
+
- Budget: $500K for 2024
|
|
248
|
+
- Timeline: Launch by Q3 2024
|
|
249
|
+
- Technology: Must run on AWS
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Maps to:** Direct creation of Goal, Principle, and Constraint entities
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Coverage Completeness Checklist
|
|
257
|
+
|
|
258
|
+
Before declaring motivation layer extraction complete, verify each type was considered:
|
|
259
|
+
|
|
260
|
+
- [ ] **stakeholder** — All individuals, teams, and organizations with interests in the system are documented
|
|
261
|
+
- [ ] **driver** — External and internal forces motivating architectural decisions are captured
|
|
262
|
+
- [ ] **assessment** — SWOT-style findings (strengths, weaknesses, opportunities, threats, risks, gaps) are recorded
|
|
263
|
+
- [ ] **goal** — High-level intentions and desired end states are defined with priority
|
|
264
|
+
- [ ] **requirement** — Specific needs that must be realized are documented (functional, non-functional, compliance, etc.)
|
|
265
|
+
- [ ] **principle** — Normative guidelines governing all system implementations are listed
|
|
266
|
+
- [ ] **constraint** — Hard limits and restrictions on system realization are documented
|
|
267
|
+
- [ ] **outcome** — Achieved or tracked results linked to goals are recorded
|
|
268
|
+
- [ ] **value** — The worth and utility delivered by the system or feature is articulated
|
|
269
|
+
- [ ] **meaning** — Semantic definitions or knowledge interpretations are captured where elements need clarification
|
|
270
|
+
|
|
271
|
+
If any type has ZERO elements, explicitly decide:
|
|
272
|
+
"This type doesn't apply to this codebase" with reasoning.
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Modeling Workflow
|
|
277
|
+
|
|
278
|
+
### Step 1: Identify Stakeholders
|
|
279
|
+
|
|
280
|
+
Start by documenting **WHO cares** about the system:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Add key stakeholders
|
|
284
|
+
dr add motivation stakeholder "End Users" \
|
|
285
|
+
--description "Customers using the platform"
|
|
286
|
+
|
|
287
|
+
dr add motivation stakeholder "Product Manager" \
|
|
288
|
+
--description "Defines product vision and priorities"
|
|
289
|
+
|
|
290
|
+
dr add motivation stakeholder "Compliance Team" \
|
|
291
|
+
--description "Ensures regulatory compliance"
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Step 2: Document Drivers and Assessments
|
|
295
|
+
|
|
296
|
+
Identify **WHAT is pushing** the organization:
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
# Market driver
|
|
300
|
+
dr add motivation driver "Cloud Migration Pressure" \
|
|
301
|
+
--description "Industry shift to cloud-native architectures"
|
|
302
|
+
|
|
303
|
+
# SWOT assessment
|
|
304
|
+
dr add motivation assessment "Legacy System Debt" \
|
|
305
|
+
--description "Monolithic architecture limits agility"
|
|
306
|
+
|
|
307
|
+
dr add motivation assessment "Strong Engineering Team" \
|
|
308
|
+
--description "Experienced team with cloud expertise"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Step 3: Define Goals and Values
|
|
312
|
+
|
|
313
|
+
Articulate **WHAT we want to achieve**:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
# Strategic goal
|
|
317
|
+
dr add motivation goal "Modernize Architecture" \
|
|
318
|
+
--description "Migrate to microservices architecture"
|
|
319
|
+
|
|
320
|
+
# Value delivered
|
|
321
|
+
dr add motivation value "Operational Efficiency" \
|
|
322
|
+
--description "Reduced deployment time and increased reliability"
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Step 4: Specify Requirements and Principles
|
|
326
|
+
|
|
327
|
+
Define **HOW we will operate**:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Functional requirement
|
|
331
|
+
dr add motivation requirement "API Authentication" \
|
|
332
|
+
--description "All API endpoints must authenticate users"
|
|
333
|
+
|
|
334
|
+
# Guiding principle
|
|
335
|
+
dr add motivation principle "API-First Design" \
|
|
336
|
+
--description "All services expose RESTful APIs with OpenAPI specs"
|
|
337
|
+
|
|
338
|
+
# Hard constraint
|
|
339
|
+
dr add motivation constraint "AWS-Only Infrastructure" \
|
|
340
|
+
--description "All services must deploy to AWS (no multi-cloud)"
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Step 5: Establish Relationships
|
|
344
|
+
|
|
345
|
+
Connect motivation elements using predicates:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
# Driver influences Goal
|
|
349
|
+
dr relationship add motivation.driver.cloud-migration-pressure \
|
|
350
|
+
motivation.goal.modernize-architecture --predicate influences
|
|
351
|
+
|
|
352
|
+
# Goal realizes Value
|
|
353
|
+
dr relationship add motivation.goal.modernize-architecture \
|
|
354
|
+
motivation.value.operational-efficiency --predicate realizes
|
|
355
|
+
|
|
356
|
+
# Principle influences Requirement
|
|
357
|
+
dr relationship add motivation.principle.api-first-design \
|
|
358
|
+
motivation.requirement.api-authentication --predicate influences
|
|
359
|
+
|
|
360
|
+
# Stakeholder influences Goal
|
|
361
|
+
dr relationship add motivation.stakeholder.product-manager \
|
|
362
|
+
motivation.goal.modernize-architecture --predicate influences
|
|
363
|
+
|
|
364
|
+
# Assessment influences Goal
|
|
365
|
+
dr relationship add motivation.assessment.legacy-system-debt \
|
|
366
|
+
motivation.goal.modernize-architecture --predicate influences
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Step 6: Validate
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
dr validate --layers motivation
|
|
373
|
+
dr validate --relationships
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Traceability Patterns
|
|
379
|
+
|
|
380
|
+
### Pattern 1: Goal Decomposition Hierarchy
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
Strategic Goal: "Improve Customer Satisfaction"
|
|
384
|
+
├── aggregates → Business Goal: "Reduce Response Time"
|
|
385
|
+
│ ├── aggregates → Operational Goal: "Achieve <100ms API Latency"
|
|
386
|
+
│ └── aggregates → Operational Goal: "Implement Caching Layer"
|
|
387
|
+
└── aggregates → Business Goal: "Improve Mobile Experience"
|
|
388
|
+
├── aggregates → Operational Goal: "Launch iOS App"
|
|
389
|
+
└── aggregates → Operational Goal: "Launch Android App"
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Pattern 2: Requirement Hierarchy
|
|
393
|
+
|
|
394
|
+
```
|
|
395
|
+
Business Requirement: "Secure User Data"
|
|
396
|
+
├── aggregates → Functional Requirement: "Encrypt Data at Rest"
|
|
397
|
+
│ └── influences → Technical Requirement: "Use AES-256 Encryption"
|
|
398
|
+
├── aggregates → Functional Requirement: "Encrypt Data in Transit"
|
|
399
|
+
│ └── influences → Technical Requirement: "Use TLS 1.3"
|
|
400
|
+
└── aggregates → Compliance Requirement: "GDPR Data Protection"
|
|
401
|
+
└── influences → Technical Requirement: "Right to Deletion API"
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Pattern 3: Principle Application
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
Principle: "Cloud-Native Architecture"
|
|
408
|
+
├── influences → Requirement: "Containerized Deployments"
|
|
409
|
+
├── influences → Requirement: "Stateless Services"
|
|
410
|
+
├── influences → Constraint: "No On-Premise Infrastructure"
|
|
411
|
+
└── realizes → Value: "Scalability and Resilience"
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Pattern 4: Stakeholder → Goal → Implementation Chain
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
Stakeholder: "CEO"
|
|
418
|
+
└── influences → Goal: "Reduce Operating Costs by 20%"
|
|
419
|
+
├── influences → Requirement: "Automated CI/CD Pipeline"
|
|
420
|
+
├── influences → Principle: "Infrastructure as Code"
|
|
421
|
+
└── realizes → Value: "Financial Efficiency"
|
|
422
|
+
└── (lower layers reference this chain)
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## Common Modeling Scenarios
|
|
428
|
+
|
|
429
|
+
### Scenario 1: New Feature Justification
|
|
430
|
+
|
|
431
|
+
**Question:** "Why are we building this feature?"
|
|
432
|
+
|
|
433
|
+
**Approach:**
|
|
434
|
+
|
|
435
|
+
1. Add **Stakeholder** who requested it
|
|
436
|
+
2. Add **Driver** (market, customer, regulatory)
|
|
437
|
+
3. Add **Goal** the feature achieves
|
|
438
|
+
4. Add **Value** delivered
|
|
439
|
+
5. Lower layers reference the Goal
|
|
440
|
+
|
|
441
|
+
### Scenario 2: Regulatory Compliance
|
|
442
|
+
|
|
443
|
+
**Question:** "How do we track GDPR compliance?"
|
|
444
|
+
|
|
445
|
+
**Approach:**
|
|
446
|
+
|
|
447
|
+
1. Add **Driver** ("GDPR Regulation")
|
|
448
|
+
2. Add **Constraint** ("Data Residency: EU only")
|
|
449
|
+
3. Add **Requirement** ("Right to Deletion", "Data Portability")
|
|
450
|
+
4. Add **Principle** ("Privacy by Design")
|
|
451
|
+
5. Security layer references these elements
|
|
452
|
+
|
|
453
|
+
### Scenario 3: Architecture Decision Records (ADR)
|
|
454
|
+
|
|
455
|
+
**Question:** "Document why we chose microservices?"
|
|
456
|
+
|
|
457
|
+
**Approach:**
|
|
458
|
+
|
|
459
|
+
1. Add **Assessment** (strength/weakness of monolith)
|
|
460
|
+
2. Add **Principle** ("Microservices Architecture")
|
|
461
|
+
3. Add **Goal** ("Improve Deployment Frequency")
|
|
462
|
+
4. Add **Constraint** ("Team size supports distributed ownership")
|
|
463
|
+
5. Application layer references the Principle
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
## ArchiMate Integration
|
|
468
|
+
|
|
469
|
+
When exporting to ArchiMate format:
|
|
470
|
+
|
|
471
|
+
```bash
|
|
472
|
+
dr export archimate --layers motivation --output motivation.archimate
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Supported ArchiMate Elements:**
|
|
476
|
+
|
|
477
|
+
- `Stakeholder` → ArchiMate Stakeholder
|
|
478
|
+
- `Driver` → ArchiMate Driver
|
|
479
|
+
- `Assessment` → ArchiMate Assessment
|
|
480
|
+
- `Goal` → ArchiMate Goal
|
|
481
|
+
- `Outcome` → ArchiMate Outcome
|
|
482
|
+
- `Principle` → ArchiMate Principle
|
|
483
|
+
- `Requirement` → ArchiMate Requirement
|
|
484
|
+
- `Constraint` → ArchiMate Constraint
|
|
485
|
+
- `Meaning` → ArchiMate Meaning
|
|
486
|
+
- `Value` → ArchiMate Value
|
|
487
|
+
|
|
488
|
+
**Supported Relationships:**
|
|
489
|
+
|
|
490
|
+
- `aggregates`, `realizes`, `specializes`, `influences`, `associated-with`
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
## Best Practices
|
|
495
|
+
|
|
496
|
+
1. **Start with Stakeholders** - Understand WHO before WHAT
|
|
497
|
+
2. **Use SMART Goals** - Make goals Specific, Measurable, Achievable, Relevant, Time-bound
|
|
498
|
+
3. **Distinguish Requirements from Constraints**:
|
|
499
|
+
- **Requirement**: "System MUST authenticate users" (functional need)
|
|
500
|
+
- **Constraint**: "System MUST use OAuth 2.0" (limits HOW requirement is met)
|
|
501
|
+
4. **Link Principles to Requirements** - Every requirement should trace to a principle or goal
|
|
502
|
+
5. **Use Assessments for Trade-offs** - Document strengths/weaknesses to justify decisions
|
|
503
|
+
6. **Track Outcomes** - Update outcome status as goals are achieved
|
|
504
|
+
7. **Don't Over-Document** - Focus on high-value motivation elements that drive decisions
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## Validation Tips
|
|
509
|
+
|
|
510
|
+
Common validation issues:
|
|
511
|
+
|
|
512
|
+
| Issue | Cause | Fix |
|
|
513
|
+
| ---------------------- | --------------------------------------- | ----------------------------------------------- |
|
|
514
|
+
| Orphaned Goal | No stakeholder influences it | Add stakeholder or driver that influences goal |
|
|
515
|
+
| Unrealized Requirement | No goal justifies it | Link requirement to goal or principle |
|
|
516
|
+
| Unused Principle | No requirements reference it | Either apply principle or remove it |
|
|
517
|
+
| Missing Value | Goals don't realize any value | Add value elements and link goals |
|
|
518
|
+
| No Traceability | Lower layers don't reference motivation | Add references from business/application layers |
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
## Quick Reference
|
|
523
|
+
|
|
524
|
+
**Add Commands:**
|
|
525
|
+
|
|
526
|
+
```bash
|
|
527
|
+
dr add motivation stakeholder <name> --description <description>
|
|
528
|
+
dr add motivation driver <name> --description <description>
|
|
529
|
+
dr add motivation goal <name> --description <description>
|
|
530
|
+
dr add motivation requirement <name> --description <description>
|
|
531
|
+
dr add motivation principle <name> --description <description>
|
|
532
|
+
dr add motivation constraint <name> --description <description>
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
**Relationship Commands:**
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
dr relationship add <source-id> <target-id> --predicate influences
|
|
539
|
+
dr relationship add <source-id> <target-id> --predicate aggregates
|
|
540
|
+
dr relationship add <source-id> <target-id> --predicate realizes
|
|
541
|
+
dr relationship add <source-id> <target-id> --predicate specializes
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
**Query Commands:**
|
|
545
|
+
|
|
546
|
+
```bash
|
|
547
|
+
dr list motivation --type goal
|
|
548
|
+
dr search "" --layer motivation
|
|
549
|
+
dr relationship list <element-id> --direction outgoing
|
|
550
|
+
```
|