@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,539 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_02_BUSINESS
|
|
3
|
+
description: Expert knowledge for Business Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"business process",
|
|
7
|
+
"business service",
|
|
8
|
+
"business actor",
|
|
9
|
+
"business role",
|
|
10
|
+
"business object",
|
|
11
|
+
"BPMN",
|
|
12
|
+
"business layer",
|
|
13
|
+
"archimate business"
|
|
14
|
+
]
|
|
15
|
+
version: 0.8.1
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Business Layer Skill
|
|
19
|
+
|
|
20
|
+
**Layer Number:** 02
|
|
21
|
+
**Specification:** Metadata Model Spec v0.8.1
|
|
22
|
+
**Purpose:** Represents business services, processes, actors, and objects that define the organization's operational structure and capabilities.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Layer Overview
|
|
27
|
+
|
|
28
|
+
The Business Layer captures the **operational structure** of the organization:
|
|
29
|
+
|
|
30
|
+
- **WHO** - Business actors, roles, and collaborations
|
|
31
|
+
- **WHAT** - Business services and products
|
|
32
|
+
- **HOW** - Business processes, functions, and interactions
|
|
33
|
+
- **INFORMATION** - Business objects and their representations
|
|
34
|
+
|
|
35
|
+
This layer uses **ArchiMate 3.2 Business Layer** standard without custom extensions, with optional extensions for BPMN integration, SLA tracking, and security controls.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Entity Types
|
|
40
|
+
|
|
41
|
+
> **CLI Introspection:** Run `dr schema types business` for the authoritative, always-current list of node types.
|
|
42
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
43
|
+
|
|
44
|
+
| Entity Type | Description | Key Attributes |
|
|
45
|
+
| ------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
|
|
46
|
+
| **BusinessActor** | Organizational entity capable of performing behavior | Examples: Customer, Employee, Partner, Supplier |
|
|
47
|
+
| **BusinessRole** | Responsibility for performing specific behavior | Examples: Sales Representative, Account Manager, System Administrator |
|
|
48
|
+
| **BusinessCollaboration** | Aggregate of business roles working together | Examples: Sales Team, Customer Service Department, Project Team |
|
|
49
|
+
| **BusinessInterface** | Point of access where business service is available | Examples: Customer Portal, Phone Support, Email Support |
|
|
50
|
+
| **BusinessProcess** | Sequence of business behaviors achieving a result | Can include BPMN references, security controls, KPI targets |
|
|
51
|
+
| **BusinessFunction** | Collection of business behavior based on criteria | Examples: Marketing, Sales, Customer Service, Finance |
|
|
52
|
+
| **BusinessInteraction** | Unit of collective behavior by collaboration | Examples: Sales Meeting, Contract Negotiation, Customer Onboarding |
|
|
53
|
+
| **BusinessEvent** | Something that happens and influences behavior | Types: time-driven, state-change, external |
|
|
54
|
+
| **BusinessService** | Service that fulfills a business need | Includes SLA properties, motivation links, APM monitoring |
|
|
55
|
+
| **BusinessObject** | Concept used within business domain | Examples: Order, Invoice, Customer, Product, Contract |
|
|
56
|
+
| **Contract** | Formal specification of agreement | Examples: SLA, Terms of Service, Purchase Agreement |
|
|
57
|
+
| **Representation** | Perceptible form of business object | Formats: document, report, form, message, dashboard |
|
|
58
|
+
| **Product** | Coherent collection of services with a value | Aggregates services and contracts, delivers value to customers |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Intra-Layer Relationships
|
|
63
|
+
|
|
64
|
+
### Structural Relationships
|
|
65
|
+
|
|
66
|
+
| Source Type | Predicate | Target Type | Example |
|
|
67
|
+
| --------------------- | ----------- | ------------------- | ----------------------------------------------------------------- |
|
|
68
|
+
| Product | composes | BusinessService | "E-commerce Platform" composes "Payment Service" |
|
|
69
|
+
| BusinessCollaboration | composes | BusinessRole | "Sales Team" composes "Sales Representative" role |
|
|
70
|
+
| BusinessProcess | composes | BusinessProcess | "Order Fulfillment" composes "Pick", "Pack", "Ship" sub-processes |
|
|
71
|
+
| BusinessFunction | composes | BusinessProcess | "Sales Function" composes "Lead Generation Process" |
|
|
72
|
+
| Product | aggregates | BusinessService | Product bundles multiple services |
|
|
73
|
+
| Product | aggregates | Contract | Product includes SLA contracts |
|
|
74
|
+
| BusinessCollaboration | aggregates | BusinessRole | Collaboration includes multiple roles |
|
|
75
|
+
| BusinessActor | assigned-to | BusinessRole | "John Smith" assigned to "Sales Rep" |
|
|
76
|
+
| BusinessActor | assigned-to | BusinessProcess | Actor directly performs process |
|
|
77
|
+
| BusinessRole | assigned-to | BusinessProcess | Role responsible for process execution |
|
|
78
|
+
| BusinessRole | assigned-to | BusinessFunction | Role performs function |
|
|
79
|
+
| BusinessCollaboration | assigned-to | BusinessInteraction | Collaboration performs interaction |
|
|
80
|
+
| BusinessProcess | realizes | BusinessService | "Order Processing" realizes "Order Management Service" |
|
|
81
|
+
| BusinessFunction | realizes | BusinessService | "Customer Support Function" realizes "Support Service" |
|
|
82
|
+
| BusinessInteraction | realizes | BusinessService | "Contract Negotiation" realizes "Contracting Service" |
|
|
83
|
+
| Representation | realizes | BusinessObject | "Invoice PDF" realizes "Invoice" concept |
|
|
84
|
+
| BusinessObject | specializes | BusinessObject | "RetailCustomer" specializes "Customer" |
|
|
85
|
+
| BusinessRole | specializes | BusinessRole | "Senior Sales Rep" specializes "Sales Rep" |
|
|
86
|
+
| Contract | specializes | Contract | "Premium SLA" specializes "Standard SLA" |
|
|
87
|
+
|
|
88
|
+
### Behavioral Relationships
|
|
89
|
+
|
|
90
|
+
| Source Type | Predicate | Target Type | Example |
|
|
91
|
+
| ------------------- | --------------- | ------------------- | ------------------------------------------------------------ |
|
|
92
|
+
| BusinessEvent | triggers | BusinessProcess | "Order Received" triggers "Order Fulfillment Process" |
|
|
93
|
+
| BusinessEvent | triggers | BusinessFunction | "Monthly Close" triggers "Financial Reporting Function" |
|
|
94
|
+
| BusinessEvent | triggers | BusinessInteraction | "Customer Complaint" triggers "Issue Resolution Interaction" |
|
|
95
|
+
| BusinessProcess | triggers | BusinessEvent | "Payment Complete" triggers "Order Confirmed Event" |
|
|
96
|
+
| BusinessInteraction | triggers | BusinessProcess | "Sales Meeting" triggers "Proposal Generation Process" |
|
|
97
|
+
| BusinessProcess | flows-to | BusinessProcess | "Credit Check" flows to "Order Approval" |
|
|
98
|
+
| BusinessInteraction | flows-to | BusinessProcess | "Negotiation" flows to "Contract Signing" |
|
|
99
|
+
| BusinessService | serves | BusinessActor | "Customer Portal" serves "Customer" |
|
|
100
|
+
| BusinessService | serves | BusinessRole | "Reporting Service" serves "Manager" role |
|
|
101
|
+
| BusinessService | serves | BusinessProcess | "Authentication Service" serves "Login Process" |
|
|
102
|
+
| BusinessInterface | serves | BusinessActor | "Mobile App" serves "Customer" |
|
|
103
|
+
| BusinessInterface | serves | BusinessRole | "Admin Console" serves "Administrator" role |
|
|
104
|
+
| BusinessProcess | accesses | BusinessObject | "Order Process" accesses "Order" object |
|
|
105
|
+
| BusinessFunction | accesses | BusinessObject | "Billing Function" accesses "Invoice" object |
|
|
106
|
+
| BusinessInteraction | accesses | BusinessObject | "Contract Review" accesses "Contract" object |
|
|
107
|
+
| Contract | associated-with | BusinessService | SLA contract associated with service delivery |
|
|
108
|
+
| BusinessObject | associated-with | BusinessProcess | "Customer" associated with "Onboarding Process" |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Cross-Layer References
|
|
113
|
+
|
|
114
|
+
### Outgoing References (Business → Lower Layers)
|
|
115
|
+
|
|
116
|
+
| Target Layer | Reference Type | Example |
|
|
117
|
+
| ------------------------- | --------------------------------------------------- | -------------------------------------------------------- |
|
|
118
|
+
| **Layer 1 (Motivation)** | BusinessService delivers **Value** | "Payment Service" delivers "Revenue Generation" value |
|
|
119
|
+
| **Layer 1 (Motivation)** | BusinessService supports **Goal** | Service achieves business goals |
|
|
120
|
+
| **Layer 1 (Motivation)** | BusinessService governed by **Principle** | Follows business principles |
|
|
121
|
+
| **Layer 1 (Motivation)** | BusinessActor **is** Stakeholder | Actor maps to stakeholder in motivation layer |
|
|
122
|
+
| **Layer 1 (Motivation)** | BusinessProcess achieves **Goal** | Process realizes business goals |
|
|
123
|
+
| **Layer 1 (Motivation)** | Contract drives **Constraint** | SLA contract defines constraints |
|
|
124
|
+
| **Layer 4 (Application)** | BusinessService realized by **ApplicationService** | "Order Service" realized by "OrderManagementAPI" |
|
|
125
|
+
| **Layer 4 (Application)** | BusinessProcess automated by **ApplicationProcess** | Process workflow automated by application |
|
|
126
|
+
| **Layer 4 (Application)** | BusinessObject represented in **DataObject** | "Customer" business concept maps to customer data object |
|
|
127
|
+
| **Layer 4 (Application)** | BusinessEvent triggers **ApplicationEvent** | Business event generates application event |
|
|
128
|
+
| **Layer 3 (Security)** | BusinessProcess protected by **SecurityControl** | Process has authentication/authorization |
|
|
129
|
+
| **Layer 3 (Security)** | BusinessCollaboration maps to **SecurityActor** | Team maps to security roles |
|
|
130
|
+
| **Layer 6 (API)** | BusinessInterface maps to **API Operation** | Portal interface maps to REST endpoints |
|
|
131
|
+
| **Layer 7 (Data Model)** | BusinessObject → **JSON Schema** | Business object defined as schema |
|
|
132
|
+
| **Layer 11 (APM)** | BusinessProcess tracked by **BusinessMetric** | Process performance measured |
|
|
133
|
+
| **Layer 11 (APM)** | BusinessService defines **KPI Target** | SLA targets for monitoring |
|
|
134
|
+
|
|
135
|
+
### Incoming References (Lower Layers → Business)
|
|
136
|
+
|
|
137
|
+
Lower layers (Application, Technology, API, etc.) reference Business layer elements to show:
|
|
138
|
+
|
|
139
|
+
- **Realization**: Application services realize business services
|
|
140
|
+
- **Support**: Technology supports business operations
|
|
141
|
+
- **Traceability**: APIs map to business interfaces
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Codebase Detection Patterns
|
|
146
|
+
|
|
147
|
+
### Pattern 1: Service Layer Classes
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
# FastAPI Business Service
|
|
151
|
+
@app.post("/api/orders")
|
|
152
|
+
async def create_order(order_data: OrderRequest):
|
|
153
|
+
"""Creates a new customer order (Business Service: Order Management)"""
|
|
154
|
+
pass
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Maps to:**
|
|
158
|
+
|
|
159
|
+
- BusinessService: "Order Management Service"
|
|
160
|
+
- BusinessProcess: "Create Order Process"
|
|
161
|
+
- BusinessObject: "Order"
|
|
162
|
+
- BusinessInterface: "API Interface"
|
|
163
|
+
|
|
164
|
+
### Pattern 2: Domain Models
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
from dataclasses import dataclass
|
|
168
|
+
|
|
169
|
+
@dataclass
|
|
170
|
+
class Customer:
|
|
171
|
+
"""Customer business object"""
|
|
172
|
+
customer_id: str
|
|
173
|
+
name: str
|
|
174
|
+
email: str
|
|
175
|
+
status: str # active, inactive, suspended
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Maps to:**
|
|
179
|
+
|
|
180
|
+
- BusinessObject: "Customer"
|
|
181
|
+
- Potential BusinessProcess: "Customer Management"
|
|
182
|
+
|
|
183
|
+
### Pattern 3: Event Definitions
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
// Domain events
|
|
187
|
+
export enum BusinessEvents {
|
|
188
|
+
ORDER_CREATED = "order.created",
|
|
189
|
+
ORDER_FULFILLED = "order.fulfilled",
|
|
190
|
+
PAYMENT_RECEIVED = "payment.received"
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Maps to:**
|
|
195
|
+
|
|
196
|
+
- BusinessEvent entities (order.created, order.fulfilled, payment.received)
|
|
197
|
+
|
|
198
|
+
### Pattern 4: BPMN Process References
|
|
199
|
+
|
|
200
|
+
```python
|
|
201
|
+
# Process definition with BPMN reference
|
|
202
|
+
class OrderFulfillmentProcess:
|
|
203
|
+
"""
|
|
204
|
+
Order fulfillment business process
|
|
205
|
+
BPMN: processes/order-fulfillment.bpmn
|
|
206
|
+
KPI: 95% orders fulfilled within 24 hours
|
|
207
|
+
"""
|
|
208
|
+
def execute(self, order_id: str):
|
|
209
|
+
pass
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Maps to:**
|
|
213
|
+
|
|
214
|
+
- BusinessProcess: "Order Fulfillment"
|
|
215
|
+
- Properties: `bpmn-file`, `kpi-target`
|
|
216
|
+
|
|
217
|
+
### Pattern 5: Role-Based Authorization
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
from enum import Enum
|
|
221
|
+
|
|
222
|
+
class BusinessRole(Enum):
|
|
223
|
+
SALES_REP = "sales_representative"
|
|
224
|
+
ACCOUNT_MANAGER = "account_manager"
|
|
225
|
+
CUSTOMER_SERVICE = "customer_service"
|
|
226
|
+
ADMIN = "administrator"
|
|
227
|
+
|
|
228
|
+
@require_role(BusinessRole.SALES_REP)
|
|
229
|
+
def create_opportunity(data):
|
|
230
|
+
pass
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Maps to:**
|
|
234
|
+
|
|
235
|
+
- BusinessRole entities (SalesRepresentative, AccountManager, etc.)
|
|
236
|
+
|
|
237
|
+
### Pattern 6: SLA Configuration
|
|
238
|
+
|
|
239
|
+
```yaml
|
|
240
|
+
# Service SLA definitions
|
|
241
|
+
services:
|
|
242
|
+
order_processing:
|
|
243
|
+
sla:
|
|
244
|
+
availability: 99.9%
|
|
245
|
+
response_time: 500ms
|
|
246
|
+
throughput: 1000 req/sec
|
|
247
|
+
business_hours: "24/7"
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Maps to:**
|
|
251
|
+
|
|
252
|
+
- BusinessService with SLA properties
|
|
253
|
+
- Contract entity for formal SLA
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Modeling Workflow
|
|
258
|
+
|
|
259
|
+
### Step 1: Identify Business Actors and Roles
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Add business actors
|
|
263
|
+
dr add business actor "Customer" \
|
|
264
|
+
--description "End user purchasing products"
|
|
265
|
+
|
|
266
|
+
dr add business actor "Sales Team" \
|
|
267
|
+
--description "Internal sales organization"
|
|
268
|
+
|
|
269
|
+
# Add business roles
|
|
270
|
+
dr add business role "Sales Representative" \
|
|
271
|
+
--description "Responsible for customer acquisition"
|
|
272
|
+
|
|
273
|
+
dr add business role "Account Manager" \
|
|
274
|
+
--description "Manages existing customer relationships"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Step 2: Define Business Services
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Core business service
|
|
281
|
+
dr add business service "Order Management Service" \
|
|
282
|
+
--properties sla-availability=99.9%,sla-response-time=500ms \
|
|
283
|
+
--description "Manages customer order lifecycle"
|
|
284
|
+
|
|
285
|
+
# Link to motivation layer
|
|
286
|
+
dr relationship add "business/service/order-management" \
|
|
287
|
+
supports "motivation/goal/improve-order-efficiency"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Step 3: Model Business Processes
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
# Main process
|
|
294
|
+
dr add business process "Order Fulfillment Process" \
|
|
295
|
+
--properties bpmn-file=processes/order-fulfillment.bpmn \
|
|
296
|
+
--description "End-to-end order fulfillment from creation to delivery"
|
|
297
|
+
|
|
298
|
+
# Sub-processes
|
|
299
|
+
dr add business process "Pick Items Process" \
|
|
300
|
+
--description "Pick items from warehouse inventory"
|
|
301
|
+
|
|
302
|
+
dr add business process "Pack Order Process" \
|
|
303
|
+
--description "Pack picked items for shipment"
|
|
304
|
+
|
|
305
|
+
# Composition relationships
|
|
306
|
+
dr relationship add "business/process/order-fulfillment" \
|
|
307
|
+
composes "business/process/pick-items"
|
|
308
|
+
|
|
309
|
+
dr relationship add "business/process/order-fulfillment" \
|
|
310
|
+
composes "business/process/pack-order"
|
|
311
|
+
|
|
312
|
+
# Process flows
|
|
313
|
+
dr relationship add "business/process/pick-items" \
|
|
314
|
+
flows-to "business/process/pack-order"
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Step 4: Define Business Objects
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Core business objects
|
|
321
|
+
dr add business object "Order" \
|
|
322
|
+
--description "Customer purchase order"
|
|
323
|
+
|
|
324
|
+
dr add business object "Customer" \
|
|
325
|
+
--description "Individual or organization purchasing products"
|
|
326
|
+
|
|
327
|
+
dr add business object "Product" \
|
|
328
|
+
--description "Item available for purchase"
|
|
329
|
+
|
|
330
|
+
# Process access to objects
|
|
331
|
+
dr relationship add "business/process/order-fulfillment" \
|
|
332
|
+
accesses "business/object/order"
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Step 5: Model Business Events
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
# Events that trigger processes
|
|
339
|
+
dr add business event "Order Received" \
|
|
340
|
+
--properties type=state-change,topic=orders.received \
|
|
341
|
+
--description "New order submitted by customer"
|
|
342
|
+
|
|
343
|
+
dr add business event "Payment Confirmed" \
|
|
344
|
+
--properties type=state-change,topic=payments.confirmed \
|
|
345
|
+
--description "Payment successfully processed"
|
|
346
|
+
|
|
347
|
+
# Event triggering
|
|
348
|
+
dr relationship add "business/event/order-received" \
|
|
349
|
+
triggers "business/process/order-fulfillment"
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Step 6: Establish Cross-Layer Relationships
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Link to application layer
|
|
356
|
+
dr relationship add "business/service/order-management" \
|
|
357
|
+
realized-by "application/service/order-api"
|
|
358
|
+
|
|
359
|
+
# Link to motivation layer
|
|
360
|
+
dr relationship add "business/service/order-management" \
|
|
361
|
+
delivers "motivation/value/customer-satisfaction"
|
|
362
|
+
|
|
363
|
+
# Link to data layer
|
|
364
|
+
dr relationship add "business/object/order" \
|
|
365
|
+
defined-by "data-model/schema/order.schema.json"
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Step 7: Validate
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
dr validate --layer business
|
|
372
|
+
dr validate --validate-relationships
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Common Modeling Scenarios
|
|
378
|
+
|
|
379
|
+
### Scenario 1: E-commerce Order Management
|
|
380
|
+
|
|
381
|
+
```
|
|
382
|
+
Product: "E-commerce Platform"
|
|
383
|
+
├── composes → BusinessService: "Order Service"
|
|
384
|
+
│ ├── realizes ← BusinessProcess: "Order Fulfillment"
|
|
385
|
+
│ │ ├── triggers ← BusinessEvent: "Order Received"
|
|
386
|
+
│ │ ├── accesses → BusinessObject: "Order"
|
|
387
|
+
│ │ └── assigned-to → BusinessRole: "Order Processor"
|
|
388
|
+
│ └── realized-by → ApplicationService: "OrderManagementAPI"
|
|
389
|
+
├── composes → BusinessService: "Payment Service"
|
|
390
|
+
│ └── realizes ← BusinessProcess: "Payment Processing"
|
|
391
|
+
└── aggregates → Contract: "E-commerce SLA"
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Scenario 2: Customer Support System
|
|
395
|
+
|
|
396
|
+
```
|
|
397
|
+
BusinessFunction: "Customer Support"
|
|
398
|
+
├── composes → BusinessProcess: "Ticket Resolution"
|
|
399
|
+
│ ├── triggers ← BusinessEvent: "Support Request Received"
|
|
400
|
+
│ ├── assigned-to → BusinessRole: "Support Agent"
|
|
401
|
+
│ ├── accesses → BusinessObject: "Support Ticket"
|
|
402
|
+
│ └── flows-to → BusinessProcess: "Follow-up Communication"
|
|
403
|
+
├── realizes → BusinessService: "Support Service"
|
|
404
|
+
│ ├── serves → BusinessActor: "Customer"
|
|
405
|
+
│ └── properties: sla-response-time=2h, sla-resolution-time=24h
|
|
406
|
+
└── tracked-by → BusinessMetric: "First Response Time"
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Scenario 3: Sales Pipeline
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
BusinessCollaboration: "Sales Team"
|
|
413
|
+
├── composes → BusinessRole: "Sales Representative"
|
|
414
|
+
├── composes → BusinessRole: "Sales Manager"
|
|
415
|
+
└── assigned-to → BusinessInteraction: "Sales Meeting"
|
|
416
|
+
├── accesses → BusinessObject: "Opportunity"
|
|
417
|
+
├── flows-to → BusinessProcess: "Proposal Generation"
|
|
418
|
+
└── triggers → BusinessEvent: "Deal Closed"
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## BPMN Integration
|
|
424
|
+
|
|
425
|
+
When business processes reference BPMN diagrams:
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
dr add business process "Loan Approval Process" \
|
|
429
|
+
--properties bpmn-file=processes/loan-approval.bpmn,bpmn-version=2.0 \
|
|
430
|
+
--description "End-to-end loan application review and approval"
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**BPMN Properties:**
|
|
434
|
+
|
|
435
|
+
- `bpmn-file`: Path to BPMN XML file
|
|
436
|
+
- `bpmn-version`: BPMN specification version (2.0)
|
|
437
|
+
- `bpmn-task-mapping`: Map BPMN tasks to business roles
|
|
438
|
+
|
|
439
|
+
**Validation:** Ensure BPMN task IDs align with business process sub-processes.
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## SLA and Performance Tracking
|
|
444
|
+
|
|
445
|
+
Business services can define SLA targets:
|
|
446
|
+
|
|
447
|
+
```yaml
|
|
448
|
+
business-service:
|
|
449
|
+
id: "payment-processing-service"
|
|
450
|
+
properties:
|
|
451
|
+
sla-availability: "99.99%"
|
|
452
|
+
sla-response-time: "200ms"
|
|
453
|
+
sla-throughput: "5000 tps"
|
|
454
|
+
business-hours: "24/7"
|
|
455
|
+
escalation-time: "15m"
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
These SLAs flow down to:
|
|
459
|
+
|
|
460
|
+
- **Application Layer** - Application services inherit targets
|
|
461
|
+
- **APM Layer** - Monitoring dashboards track against targets
|
|
462
|
+
- **Motivation Layer** - SLAs trace to business goals
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
## ArchiMate Export
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
dr export archimate --layer business --output business.archimate
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**Supported ArchiMate Elements:**
|
|
473
|
+
|
|
474
|
+
- All 13 business entity types map directly to ArchiMate 3.2 Business Layer
|
|
475
|
+
- Relationships: composition, aggregation, assignment, realization, specialization, triggering, flow, serving, access, association
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## Best Practices
|
|
480
|
+
|
|
481
|
+
1. **Start with Services, Not Processes** - Identify WHAT the business provides before HOW it's delivered
|
|
482
|
+
2. **Use Process Composition** - Break complex processes into manageable sub-processes
|
|
483
|
+
3. **Model Events Explicitly** - Event-driven architectures need explicit BusinessEvent entities
|
|
484
|
+
4. **Link to Motivation Early** - Connect services and processes to goals for traceability
|
|
485
|
+
5. **Don't Over-Detail** - Focus on architecturally significant processes, not every task
|
|
486
|
+
6. **Use BPMN for Complex Workflows** - Reference BPMN files rather than modeling every detail
|
|
487
|
+
7. **Distinguish Role from Actor** - Role is responsibility; Actor is individual/team
|
|
488
|
+
8. **Model Contracts for SLAs** - Formalize service agreements as Contract entities
|
|
489
|
+
9. **Track Business Objects** - Identify key domain concepts even if data model comes later
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## Validation Tips
|
|
494
|
+
|
|
495
|
+
| Issue | Cause | Fix |
|
|
496
|
+
| ---------------------------- | -------------------------------------------- | --------------------------------------------- |
|
|
497
|
+
| Orphaned Process | No event triggers it, no service realizes it | Add triggering event or link to service |
|
|
498
|
+
| Unrealized Service | No process/function realizes the service | Add process that implements the service |
|
|
499
|
+
| Missing Business Objects | Processes don't access any objects | Identify key domain concepts and add them |
|
|
500
|
+
| No Cross-Layer Relationships | Business not linked to application/data | Add realization relationships to lower layers |
|
|
501
|
+
| Unassigned Roles | Roles not assigned to processes | Assign roles to show responsibility |
|
|
502
|
+
| Missing SLA Properties | Services lack performance targets | Add SLA properties for monitoring |
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## Quick Reference
|
|
507
|
+
|
|
508
|
+
**Add Commands:**
|
|
509
|
+
|
|
510
|
+
```bash
|
|
511
|
+
dr add business actor <name>
|
|
512
|
+
dr add business role <name>
|
|
513
|
+
dr add business service <name> --properties sla-availability=<value>
|
|
514
|
+
dr add business process <name> --properties bpmn-file=<path>
|
|
515
|
+
dr add business object <name>
|
|
516
|
+
dr add business event <name> --properties type=<type>,topic=<topic>
|
|
517
|
+
dr add business function <name>
|
|
518
|
+
dr add business collaboration <name>
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
**Relationship Commands:**
|
|
522
|
+
|
|
523
|
+
```bash
|
|
524
|
+
dr relationship add <source> realizes <target>
|
|
525
|
+
dr relationship add <source> composes <target>
|
|
526
|
+
dr relationship add <source> assigned-to <target>
|
|
527
|
+
dr relationship add <source> triggers <target>
|
|
528
|
+
dr relationship add <source> flows-to <target>
|
|
529
|
+
dr relationship add <source> accesses <target>
|
|
530
|
+
dr relationship add <source> serves <target>
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**Cross-Layer Relationship Commands:**
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
dr relationship add <business-service> supports <motivation-goal>
|
|
537
|
+
dr relationship add <business-service> realized-by <application-service>
|
|
538
|
+
dr relationship add <business-object> defined-by <data-schema>
|
|
539
|
+
```
|