@documentation-robotics/cli 0.2.0 → 0.4.0
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/README.md +46 -16
- package/dist/analysis/relationship-classifier.js +2 -9
- package/dist/analysis/relationship-classifier.js.map +2 -2
- package/dist/analyzers/active-analyzer.js +62 -0
- package/dist/analyzers/active-analyzer.js.map +7 -0
- package/dist/analyzers/call-graph-utils.js +2 -2
- package/dist/analyzers/call-graph-utils.js.map +2 -2
- package/dist/analyzers/cards/build.js +191 -0
- package/dist/analyzers/cards/build.js.map +7 -0
- package/dist/analyzers/cards/classify.js +42 -0
- package/dist/analyzers/cards/classify.js.map +7 -0
- package/dist/analyzers/cards/edge-index.js +44 -0
- package/dist/analyzers/cards/edge-index.js.map +7 -0
- package/dist/analyzers/cards/extract.js +138 -0
- package/dist/analyzers/cards/extract.js.map +7 -0
- package/dist/analyzers/cards/facts.js +46 -0
- package/dist/analyzers/cards/facts.js.map +7 -0
- package/dist/analyzers/cards/graph.js +42 -0
- package/dist/analyzers/cards/graph.js.map +7 -0
- package/dist/analyzers/cards/index.js +8 -0
- package/dist/analyzers/cards/index.js.map +7 -0
- package/dist/analyzers/cards/routes.js +96 -0
- package/dist/analyzers/cards/routes.js.map +7 -0
- package/dist/analyzers/cards/tier0.js +18 -0
- package/dist/analyzers/cards/tier0.js.map +7 -0
- package/dist/analyzers/cards/types.js +1 -0
- package/dist/analyzers/cards/types.js.map +7 -0
- package/dist/analyzers/cbm-analyzer.js +270 -174
- package/dist/analyzers/cbm-analyzer.js.map +2 -2
- package/dist/analyzers/cbm-responses.js +342 -0
- package/dist/analyzers/cbm-responses.js.map +7 -0
- package/dist/analyzers/code-changes.js +159 -0
- package/dist/analyzers/code-changes.js.map +7 -0
- package/dist/analyzers/edge-relationships.js +49 -0
- package/dist/analyzers/edge-relationships.js.map +7 -0
- package/dist/analyzers/extraction-plan.js +541 -0
- package/dist/analyzers/extraction-plan.js.map +7 -0
- package/dist/analyzers/index-job.js +229 -0
- package/dist/analyzers/index-job.js.map +7 -0
- package/dist/analyzers/mapping-loader.js +9 -0
- package/dist/analyzers/mapping-loader.js.map +2 -2
- package/dist/analyzers/tier0-rules.js +153 -0
- package/dist/analyzers/tier0-rules.js.map +7 -0
- package/dist/analyzers/types.js.map +1 -1
- package/dist/audit/relationships/ai/prompts.js +10 -10
- package/dist/audit/relationships/ai/prompts.js.map +2 -2
- package/dist/audit/relationships/analysis/layer-templates.js +52 -52
- package/dist/audit/relationships/analysis/layer-templates.js.map +1 -1
- package/dist/cli.js +23 -11
- package/dist/cli.js.map +2 -2
- package/dist/coding-agents/default-permissions.js +31 -1
- package/dist/coding-agents/default-permissions.js.map +2 -2
- package/dist/coding-agents/drbot-mcp.js +269 -0
- package/dist/coding-agents/drbot-mcp.js.map +7 -0
- package/dist/commands/add.js +7 -4
- package/dist/commands/add.js.map +2 -2
- package/dist/commands/analyzer.js +143 -40
- package/dist/commands/analyzer.js.map +2 -2
- package/dist/commands/changeset-verify.js +63 -0
- package/dist/commands/changeset-verify.js.map +7 -0
- package/dist/commands/changeset.js +80 -29
- package/dist/commands/changeset.js.map +2 -2
- package/dist/commands/delete.js +10 -4
- package/dist/commands/delete.js.map +2 -2
- package/dist/commands/farm.js +176 -60
- package/dist/commands/farm.js.map +2 -2
- package/dist/commands/init.js +9 -26
- package/dist/commands/init.js.map +2 -2
- package/dist/commands/mcp.js +40 -21
- package/dist/commands/mcp.js.map +3 -3
- package/dist/commands/relationship.js +208 -37
- package/dist/commands/relationship.js.map +2 -2
- package/dist/commands/reports.js +3 -3
- package/dist/commands/reports.js.map +2 -2
- package/dist/commands/update.js +52 -32
- package/dist/commands/update.js.map +2 -2
- package/dist/commands/upgrade.js +99 -103
- package/dist/commands/upgrade.js.map +3 -3
- package/dist/commands/validate.js +19 -3
- package/dist/commands/validate.js.map +2 -2
- package/dist/commands/version.js +1 -1
- package/dist/commands/visualize.js +34 -15
- package/dist/commands/visualize.js.map +2 -2
- package/dist/core/annotation-store.js +15 -5
- package/dist/core/annotation-store.js.map +2 -2
- package/dist/core/catalog-migration.js +34 -0
- package/dist/core/catalog-migration.js.map +7 -0
- package/dist/core/changeset-analysis.js +421 -0
- package/dist/core/changeset-analysis.js.map +7 -0
- package/dist/core/changeset-base-index.js +160 -0
- package/dist/core/changeset-base-index.js.map +7 -0
- package/dist/core/changeset-brief-compact.js +256 -0
- package/dist/core/changeset-brief-compact.js.map +7 -0
- package/dist/core/changeset-brief-delta.js +102 -0
- package/dist/core/changeset-brief-delta.js.map +7 -0
- package/dist/core/changeset-graph.js +281 -0
- package/dist/core/changeset-graph.js.map +7 -0
- package/dist/core/changeset-only-guard.js +32 -0
- package/dist/core/changeset-only-guard.js.map +7 -0
- package/dist/core/changeset-summary.js +68 -0
- package/dist/core/changeset-summary.js.map +7 -0
- package/dist/core/changeset-validator.js +66 -20
- package/dist/core/changeset-validator.js.map +2 -2
- package/dist/core/changeset-verify.js +848 -0
- package/dist/core/changeset-verify.js.map +7 -0
- package/dist/core/changeset.js +56 -9
- package/dist/core/changeset.js.map +2 -2
- package/dist/core/element-type-migration.js +145 -0
- package/dist/core/element-type-migration.js.map +7 -0
- package/dist/core/extraction-observability.js +161 -0
- package/dist/core/extraction-observability.js.map +7 -0
- package/dist/core/farm-manifest.js +12 -6
- package/dist/core/farm-manifest.js.map +2 -2
- package/dist/core/farm-sync-engine.js +1 -1
- package/dist/core/farm-sync-engine.js.map +2 -2
- package/dist/core/farm-sync-state.js +10 -2
- package/dist/core/farm-sync-state.js.map +2 -2
- package/dist/core/migration-registry.js +88 -47
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model-upgrade.js +102 -0
- package/dist/core/model-upgrade.js.map +7 -0
- package/dist/core/model.js +82 -30
- package/dist/core/model.js.map +2 -2
- package/dist/core/mutation-handler.js +71 -6
- package/dist/core/mutation-handler.js.map +2 -2
- package/dist/core/project-init.js +53 -0
- package/dist/core/project-init.js.map +7 -0
- package/dist/core/relationship-migration-table.js +6639 -0
- package/dist/core/relationship-migration-table.js.map +7 -0
- package/dist/core/relationship-migration.js +272 -0
- package/dist/core/relationship-migration.js.map +7 -0
- package/dist/core/relationship-prune.js +49 -0
- package/dist/core/relationship-prune.js.map +7 -0
- package/dist/core/relationship-staging.js +161 -0
- package/dist/core/relationship-staging.js.map +7 -0
- package/dist/core/relationships.js +26 -4
- package/dist/core/relationships.js.map +2 -2
- package/dist/core/report-data-model.js +7 -13
- package/dist/core/report-data-model.js.map +2 -2
- package/dist/core/staged-changeset-storage.js +145 -18
- package/dist/core/staged-changeset-storage.js.map +2 -2
- package/dist/core/staged-source-reference.js +28 -0
- package/dist/core/staged-source-reference.js.map +7 -0
- package/dist/core/staging-area.js +166 -24
- package/dist/core/staging-area.js.map +2 -2
- package/dist/core/upgrade-plan.js +117 -0
- package/dist/core/upgrade-plan.js.map +7 -0
- package/dist/core/virtual-projection.js +13 -5
- package/dist/core/virtual-projection.js.map +2 -2
- package/dist/export/archimate-exporter.js +1 -0
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/generated/compiled-validators.js +2 -2
- package/dist/generated/compiled-validators.js.map +2 -2
- package/dist/generated/layer-registry.js +16 -16
- package/dist/generated/layer-registry.js.map +2 -2
- package/dist/generated/node-types.js +186 -168
- package/dist/generated/node-types.js.map +2 -2
- package/dist/generated/relationship-index.js +2468 -7913
- package/dist/generated/relationship-index.js.map +2 -2
- package/dist/integrations/claude_code/.claude-plugin/plugin.json +24 -0
- package/dist/integrations/claude_code/agents/dr-architect.md +30 -3
- package/dist/integrations/claude_code/agents/dr-extractor.md +8 -2
- package/dist/integrations/claude_code/commands/dr-analyzer.md +565 -0
- package/dist/integrations/claude_code/commands/dr-changeset.md +2 -1
- package/dist/integrations/claude_code/commands/dr-map.md +20 -1
- package/dist/integrations/claude_code/commands/dr-plan.md +66 -0
- package/dist/integrations/claude_code/commands/dr-relate.md +106 -96
- package/dist/integrations/claude_code/commands/dr-verify.md +45 -2
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +14 -0
- package/dist/integrations/claude_code/docs/MCP_SERVER.md +47 -26
- package/dist/integrations/claude_code/docs/QUICK_START.md +37 -8
- package/dist/integrations/claude_code/docs/README.md +68 -2
- package/dist/integrations/claude_code/plugin-agents/dr-advisor.md +255 -0
- package/dist/integrations/claude_code/plugin-agents/dr-architect.md +306 -0
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +93 -72
- package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +163 -126
- package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +161 -126
- package/dist/integrations/claude_code/skills/dr_04_security_layer/SKILL.md +153 -133
- package/dist/integrations/claude_code/skills/dr_05_application_layer/SKILL.md +129 -100
- package/dist/integrations/claude_code/skills/dr_06_technology_layer/SKILL.md +111 -94
- package/dist/integrations/claude_code/skills/dr_07_api_layer/SKILL.md +143 -157
- package/dist/integrations/claude_code/skills/dr_08_data_model_layer/SKILL.md +117 -33
- package/dist/integrations/claude_code/skills/dr_09_dataset_layer/SKILL.md +74 -25
- package/dist/integrations/claude_code/skills/dr_10_ux_layer/SKILL.md +88 -12
- package/dist/integrations/claude_code/skills/dr_11_navigation_layer/SKILL.md +83 -24
- package/dist/integrations/claude_code/skills/dr_12_apm_layer/SKILL.md +57 -12
- package/dist/integrations/claude_code/skills/dr_13_testing_layer/SKILL.md +95 -15
- package/dist/integrations/claude_code/skills/dr_change_planning/SKILL.md +178 -0
- package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +8 -0
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +6 -1
- package/dist/integrations/github_copilot/agents/dr-architect.md +3 -1
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +182 -102
- package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +266 -148
- package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +547 -86
- package/dist/integrations/github_copilot/skills/dr_04_security_layer/SKILL.md +164 -169
- package/dist/integrations/github_copilot/skills/dr_05_application_layer/SKILL.md +420 -150
- package/dist/integrations/github_copilot/skills/dr_06_technology_layer/SKILL.md +331 -138
- package/dist/integrations/github_copilot/skills/dr_07_api_layer/SKILL.md +265 -201
- package/dist/integrations/github_copilot/skills/dr_08_data_model_layer/SKILL.md +181 -58
- package/dist/integrations/github_copilot/skills/dr_09_dataset_layer/SKILL.md +209 -57
- package/dist/integrations/github_copilot/skills/dr_10_ux_layer/SKILL.md +277 -112
- package/dist/integrations/github_copilot/skills/dr_11_navigation_layer/SKILL.md +219 -70
- package/dist/integrations/github_copilot/skills/dr_12_apm_layer/SKILL.md +189 -105
- package/dist/integrations/github_copilot/skills/dr_13_testing_layer/SKILL.md +225 -102
- package/dist/integrations/github_copilot/skills/dr_change_planning/SKILL.md +177 -0
- package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +3 -0
- package/dist/integrations/hash-utils.js.map +2 -2
- package/dist/mcp/api-key-manager.js +14 -1
- package/dist/mcp/api-key-manager.js.map +2 -2
- package/dist/mcp/changeset-only.js +45 -0
- package/dist/mcp/changeset-only.js.map +7 -0
- package/dist/mcp/project-root.js +85 -0
- package/dist/mcp/project-root.js.map +7 -0
- package/dist/mcp/server-instructions.js +27 -0
- package/dist/mcp/server-instructions.js.map +7 -0
- package/dist/mcp/strict-schema.js +52 -0
- package/dist/mcp/strict-schema.js.map +7 -0
- package/dist/mcp/tool-registry.js +55 -5
- package/dist/mcp/tool-registry.js.map +2 -2
- package/dist/mcp/tools/changeset-analysis-tools.js +98 -0
- package/dist/mcp/tools/changeset-analysis-tools.js.map +7 -0
- package/dist/mcp/tools/changeset-commit.js +224 -0
- package/dist/mcp/tools/changeset-commit.js.map +7 -0
- package/dist/mcp/tools/changeset-editing.js +260 -0
- package/dist/mcp/tools/changeset-editing.js.map +7 -0
- package/dist/mcp/tools/changeset-lifecycle.js +83 -0
- package/dist/mcp/tools/changeset-lifecycle.js.map +7 -0
- package/dist/mcp/tools/changeset-shared.js +31 -0
- package/dist/mcp/tools/changeset-shared.js.map +7 -0
- package/dist/mcp/tools/changeset-show.js +17 -1
- package/dist/mcp/tools/changeset-show.js.map +2 -2
- package/dist/mcp/tools/changeset-verify.js +49 -0
- package/dist/mcp/tools/changeset-verify.js.map +7 -0
- package/dist/mcp/tools/codebase-extract.js +836 -0
- package/dist/mcp/tools/codebase-extract.js.map +7 -0
- package/dist/mcp/tools/codebase-index.js +125 -0
- package/dist/mcp/tools/codebase-index.js.map +7 -0
- package/dist/mcp/tools/codebase-shared.js +265 -0
- package/dist/mcp/tools/codebase-shared.js.map +7 -0
- package/dist/mcp/tools/codebase-verify.js +48 -0
- package/dist/mcp/tools/codebase-verify.js.map +7 -0
- package/dist/mcp/tools/index.js +34 -1
- package/dist/mcp/tools/index.js.map +2 -2
- package/dist/mcp/tools/model-add.js +191 -74
- package/dist/mcp/tools/model-add.js.map +2 -2
- package/dist/mcp/tools/model-delete.js +2 -2
- package/dist/mcp/tools/model-delete.js.map +2 -2
- package/dist/mcp/tools/model-search.js +14 -0
- package/dist/mcp/tools/model-search.js.map +2 -2
- package/dist/mcp/tools/model-show.js +29 -2
- package/dist/mcp/tools/model-show.js.map +2 -2
- package/dist/mcp/tools/model-trace.js +93 -30
- package/dist/mcp/tools/model-trace.js.map +2 -2
- package/dist/mcp/tools/model-update.js +46 -26
- package/dist/mcp/tools/model-update.js.map +2 -2
- package/dist/mcp/tools/model-validate.js +46 -4
- package/dist/mcp/tools/model-validate.js.map +2 -2
- package/dist/mcp/tools/project-status-collectors.js +381 -0
- package/dist/mcp/tools/project-status-collectors.js.map +7 -0
- package/dist/mcp/tools/project-status.js +237 -0
- package/dist/mcp/tools/project-status.js.map +7 -0
- package/dist/mcp/tools/project-tools.js +505 -0
- package/dist/mcp/tools/project-tools.js.map +7 -0
- package/dist/mcp/tools/relationship-tools.js +167 -0
- package/dist/mcp/tools/relationship-tools.js.map +7 -0
- package/dist/mcp/tools/review-open.js +210 -0
- package/dist/mcp/tools/review-open.js.map +7 -0
- package/dist/mcp/tools/shared.js +35 -4
- package/dist/mcp/tools/shared.js.map +2 -2
- package/dist/mcp/tools/spec-type.js +90 -0
- package/dist/mcp/tools/spec-type.js.map +7 -0
- package/dist/reports/model-report-orchestrator.js +31 -2
- package/dist/reports/model-report-orchestrator.js.map +2 -2
- package/dist/schemas/bundled/analyzers/cbm.json +1200 -70
- package/dist/schemas/bundled/analyzers/manifest.json +2 -2
- package/dist/schemas/bundled/api.json +1029 -1658
- package/dist/schemas/bundled/apm.json +499 -734
- package/dist/schemas/bundled/application.json +735 -371
- package/dist/schemas/bundled/base.json +3 -220
- package/dist/schemas/bundled/business.json +452 -366
- package/dist/schemas/bundled/data-model.json +395 -411
- package/dist/schemas/bundled/data-store.json +334 -558
- package/dist/schemas/bundled/manifest.json +18 -18
- package/dist/schemas/bundled/motivation.json +349 -368
- package/dist/schemas/bundled/navigation.json +415 -731
- package/dist/schemas/bundled/product.json +325 -159
- package/dist/schemas/bundled/security.json +864 -1232
- package/dist/schemas/bundled/technology.json +574 -703
- package/dist/schemas/bundled/testing.json +865 -1646
- package/dist/schemas/bundled/ux.json +739 -1352
- package/dist/server/schemas.js +8 -0
- package/dist/server/schemas.js.map +2 -2
- package/dist/server/server.js +686 -231
- package/dist/server/server.js.map +3 -3
- package/dist/server/viewer-registry.js +264 -0
- package/dist/server/viewer-registry.js.map +7 -0
- package/dist/server-entry.js +2 -1
- package/dist/server-entry.js.map +2 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/utils/ansi-suppressor.js +6 -8
- package/dist/utils/ansi-suppressor.js.map +2 -2
- package/dist/utils/attribute-patch.js +41 -0
- package/dist/utils/attribute-patch.js.map +7 -0
- package/dist/utils/error-hints.js +29 -0
- package/dist/utils/error-hints.js.map +7 -0
- package/dist/utils/errors.js +9 -3
- package/dist/utils/errors.js.map +2 -2
- package/dist/utils/id-generator.js +5 -2
- package/dist/utils/id-generator.js.map +2 -2
- package/dist/utils/project-paths.js +26 -1
- package/dist/utils/project-paths.js.map +2 -2
- package/dist/utils/source-reference.js +64 -31
- package/dist/utils/source-reference.js.map +2 -2
- package/dist/utils/spec-version.js +2 -2
- package/dist/utils/spec-version.js.map +1 -1
- package/dist/validators/composed-reference-validator.js +5 -27
- package/dist/validators/composed-reference-validator.js.map +2 -2
- package/dist/validators/model-warnings.js +28 -0
- package/dist/validators/model-warnings.js.map +7 -0
- package/dist/validators/reference-validator.js +0 -7
- package/dist/validators/reference-validator.js.map +2 -2
- package/dist/validators/relationship-schema-validator.js +3 -3
- package/dist/validators/relationship-schema-validator.js.map +2 -2
- package/dist/validators/schema-validator.js +27 -9
- package/dist/validators/schema-validator.js.map +2 -2
- package/dist/validators/types.js.map +1 -1
- package/dist/viewer/README.md +6 -6
- package/dist/viewer/assets/main-CUOQGGRA.css +1 -0
- package/dist/viewer/assets/main-DvH3gYrI.js +84 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer/manifest.json +10 -10
- package/dist/viewer/version.json +1 -1
- package/package.json +2 -1
- package/dist/viewer/assets/main-B7AOQXXX.js +0 -81
- package/dist/viewer/assets/main-vdrFrG7q.css +0 -1
|
@@ -11,13 +11,13 @@ triggers:
|
|
|
11
11
|
"microservice",
|
|
12
12
|
"archimate application"
|
|
13
13
|
]
|
|
14
|
-
version: 0.8.
|
|
14
|
+
version: 0.8.3
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
# Application Layer Skill
|
|
18
18
|
|
|
19
19
|
**Layer Number:** 04
|
|
20
|
-
**Specification:** Metadata Model Spec v0.8.
|
|
20
|
+
**Specification:** Metadata Model Spec v0.8.3
|
|
21
21
|
**Purpose:** Describes application services, components, and interfaces that support business processes and bridge requirements with technical implementation.
|
|
22
22
|
|
|
23
23
|
---
|
|
@@ -43,7 +43,7 @@ This layer uses **ArchiMate 3.2 Application Layer** standard with optional prope
|
|
|
43
43
|
|
|
44
44
|
| Entity Type | Description | Key Attributes |
|
|
45
45
|
| ---------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------- |
|
|
46
|
-
| **ApplicationComponent** | Modular, deployable, replaceable part of a system | Types:
|
|
46
|
+
| **ApplicationComponent** | Modular, deployable, replaceable part of a system | Types: generic, external, internal, service-component |
|
|
47
47
|
| **ApplicationCollaboration** | Aggregate of application components working together | Example: Microservices ecosystem, service mesh |
|
|
48
48
|
| **ApplicationInterface** | Point of access where application service is available | Protocols: REST, GraphQL, SOAP, gRPC, WebSocket, Message Queue, Event Bus |
|
|
49
49
|
| **ApplicationFunction** | Automated behavior performed by application component | Examples: Authentication, Data Validation, Caching, Logging |
|
|
@@ -55,6 +55,75 @@ This layer uses **ArchiMate 3.2 Application Layer** standard with optional prope
|
|
|
55
55
|
|
|
56
56
|
---
|
|
57
57
|
|
|
58
|
+
## Type Decision Tree
|
|
59
|
+
|
|
60
|
+
Use this decision tree **before assigning a type** to any code pattern. Follow the first matching branch.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
IS this a deployed, executable unit (container, microservice, SPA app shell, module)?
|
|
64
|
+
→ ApplicationComponent (type: generic/internal/external)
|
|
65
|
+
|
|
66
|
+
IS this a React component, UI widget, or view?
|
|
67
|
+
→ ApplicationComponent (type: generic) — link to ux.component.* for UI detail
|
|
68
|
+
|
|
69
|
+
IS this a Zustand store, Redux slice, or other state container?
|
|
70
|
+
→ ApplicationFunction (performs automated state management behavior)
|
|
71
|
+
NOT ApplicationComponent — stores are behavior, not deployable modules
|
|
72
|
+
Cross-reference: assign the function to the parent ApplicationComponent that owns it
|
|
73
|
+
|
|
74
|
+
IS this a class/function that provides a capability to other parts of the system
|
|
75
|
+
(business logic, data transformation, orchestration)?
|
|
76
|
+
→ ApplicationService (serviceType: synchronous/asynchronous/event-driven/batch)
|
|
77
|
+
|
|
78
|
+
IS this a URL, port, protocol interface, or access point
|
|
79
|
+
(REST endpoint group, WebSocket endpoint, message queue, postMessage bridge)?
|
|
80
|
+
→ ApplicationInterface (protocol: REST/WebSocket/AMQP/HTTP)
|
|
81
|
+
|
|
82
|
+
IS this a stateless, single-purpose algorithm or behavior
|
|
83
|
+
(parse, validate, transform, export, calculate, layout)?
|
|
84
|
+
→ ApplicationFunction (NOT ApplicationService)
|
|
85
|
+
|
|
86
|
+
IS this a multi-step workflow, pipeline, or saga
|
|
87
|
+
(load → parse → validate → render)?
|
|
88
|
+
→ ApplicationProcess
|
|
89
|
+
NOTE: Use ApplicationProcess for orchestration logic triggered by navigation
|
|
90
|
+
(data loading pipelines, guards that orchestrate multiple async operations).
|
|
91
|
+
Use navigation.route for route definitions that map URL patterns to views.
|
|
92
|
+
If a route component is purely declarative (no significant orchestration logic),
|
|
93
|
+
it belongs only in navigation.route — not ApplicationProcess.
|
|
94
|
+
|
|
95
|
+
IS this a state change notification or domain event
|
|
96
|
+
(model.updated, annotation.added)?
|
|
97
|
+
→ ApplicationEvent (eventType: domain/integration/system)
|
|
98
|
+
|
|
99
|
+
IS this a data structure, DTO, or typed payload
|
|
100
|
+
(ModelData, Annotation, Changeset)?
|
|
101
|
+
→ DataObject
|
|
102
|
+
|
|
103
|
+
IS this a collection of components that together form a subsystem
|
|
104
|
+
(all layout engines, all application services)?
|
|
105
|
+
→ ApplicationCollaboration
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Common Misclassifications
|
|
111
|
+
|
|
112
|
+
Explicit DO NOT rules with rationale:
|
|
113
|
+
|
|
114
|
+
| Misclassification | Correct Classification | Why |
|
|
115
|
+
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
116
|
+
| Zustand store as `ApplicationService` | `ApplicationFunction` (performs automated state management behavior) | Stores are behavior, not deployable modules — assign to parent ApplicationComponent |
|
|
117
|
+
| Zustand store as `ApplicationComponent` | `ApplicationFunction` (performs automated state management behavior) | ArchiMate `ApplicationFunction` = "automated behavior performed by a component" — maps exactly to Zustand stores |
|
|
118
|
+
| WebSocket client as `ApplicationService` | `ApplicationInterface` (protocol: WebSocket) | A WebSocket connection is an interface/access point, not a service |
|
|
119
|
+
| Layout algorithm as `ApplicationService` | `ApplicationFunction` | Stateless algorithm = function, not a service with a contract |
|
|
120
|
+
| Layout engine CLASS as `ApplicationFunction` | `ApplicationComponent` (type: internal) | A class implementing an interface IS a deployable, replaceable module — not a stateless function |
|
|
121
|
+
| Export function as `ApplicationService` | `ApplicationFunction` if purely internal; `ApplicationService` only if it exposes an output contract | If purely internal algorithm: function. If it has an external contract (API, file): service |
|
|
122
|
+
| React UI component as `ApplicationService` | `ApplicationComponent` (type: generic) with UX cross-reference | UI components are components; link to UX layer for rendering details |
|
|
123
|
+
| Fetch interceptor / auth header injector | `ApplicationFunction` | Stateless function that wraps fetch — NOT a service; cross-reference `security.securitypolicy.*` |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
58
127
|
## Intra-Layer Relationships
|
|
59
128
|
|
|
60
129
|
### Structural Relationships
|
|
@@ -62,31 +131,43 @@ This layer uses **ArchiMate 3.2 Application Layer** standard with optional prope
|
|
|
62
131
|
| Source Type | Predicate | Target Type | Example |
|
|
63
132
|
| ------------------------ | ----------- | ---------------------- | ---------------------------------------------------------------------------------------- |
|
|
64
133
|
| ApplicationCollaboration | aggregates | ApplicationComponent | "Payment Ecosystem" aggregates "PaymentService", "FraudDetection", "NotificationService" |
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| ApplicationComponent |
|
|
68
|
-
|
|
|
134
|
+
| ApplicationCollaboration | assigned-to | ApplicationInteraction | "Checkout Collaboration" assigned-to "Checkout Handshake" interaction |
|
|
135
|
+
| ApplicationCollaboration | realizes | ApplicationService | "Payment Ecosystem" realizes "Payment Service" |
|
|
136
|
+
| ApplicationComponent | provides | ApplicationInterface | "UserService" provides "User REST API" |
|
|
137
|
+
| ApplicationComponent | assigned-to | ApplicationFunction | "UserService" assigned-to "Token Validation" |
|
|
138
|
+
| ApplicationComponent | assigned-to | ApplicationProcess | "OrderOrchestrator" assigned-to "Order Fulfillment Saga" |
|
|
69
139
|
| ApplicationComponent | realizes | ApplicationService | "UserManagementAPI" realizes "User Management Service" |
|
|
140
|
+
| ApplicationComponent | uses | ApplicationComponent | "OrderService" uses "InventoryService" |
|
|
70
141
|
| ApplicationFunction | realizes | ApplicationService | "Authentication Function" realizes "Auth Service" |
|
|
71
142
|
| ApplicationProcess | realizes | ApplicationService | "Order Processing Workflow" realizes "Order Service" |
|
|
72
|
-
|
|
|
73
|
-
| DataObject |
|
|
143
|
+
| ApplicationInterface | assigned-to | ApplicationService | "User REST API" assigned-to "User Management Service" (interface exposes the service) |
|
|
144
|
+
| DataObject | composes | DataObject | "Order" composes "OrderLineItem" |
|
|
145
|
+
| DataObject | aggregates | DataObject | "Cart" aggregates "Product" references |
|
|
74
146
|
|
|
75
147
|
### Behavioral Relationships
|
|
76
148
|
|
|
77
|
-
| Source Type | Predicate
|
|
78
|
-
| ---------------------- |
|
|
79
|
-
| ApplicationEvent | triggers
|
|
80
|
-
| ApplicationEvent | triggers
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
| ApplicationFunction |
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
149
|
+
| Source Type | Predicate | Target Type | Example |
|
|
150
|
+
| ---------------------- | ---------- | ---------------------- | ---------------------------------------------------------------- |
|
|
151
|
+
| ApplicationEvent | triggers | ApplicationProcess | "PaymentFailed" triggers "Refund Process" |
|
|
152
|
+
| ApplicationEvent | triggers | ApplicationInteraction | "CheckoutStarted" triggers "Checkout Handshake" |
|
|
153
|
+
| ApplicationProcess | triggers | ApplicationEvent | "Place Order" triggers "OrderCreated" |
|
|
154
|
+
| ApplicationEvent | triggers | ApplicationFunction | "UserLoggedIn" triggers "Audit Logging" (event handler) |
|
|
155
|
+
| ApplicationFunction | triggers | ApplicationEvent | "Publish Order" triggers "OrderCreated" |
|
|
156
|
+
| ApplicationInteraction | triggers | ApplicationEvent | "Checkout Handshake" triggers "CheckoutCompleted" |
|
|
157
|
+
| ApplicationProcess | flows-to | ApplicationProcess | "Reserve Inventory" flows-to "Process Payment" |
|
|
158
|
+
| ApplicationFunction | flows-to | ApplicationFunction | "Parse Document" flows-to "Embed Chunks" |
|
|
159
|
+
| ApplicationService | flows-to | ApplicationService | "Checkout Service" flows-to "Payment Service" (synchronous call) |
|
|
160
|
+
| ApplicationService | depends-on | ApplicationService | "Order Service" depends-on "Inventory Service" |
|
|
161
|
+
| ApplicationService | serves | ApplicationComponent | "Auth Service" serves "WebApp" |
|
|
162
|
+
| ApplicationService | serves | ApplicationProcess | "Payment Service" serves "Order Fulfillment Saga" |
|
|
163
|
+
| ApplicationInterface | depends-on | ApplicationFunction | "API Gateway" depends-on "Rate Limiting" |
|
|
164
|
+
| ApplicationService | serves | ApplicationInteraction | "Payment Service" serves "Checkout Handshake" |
|
|
165
|
+
| ApplicationService | accesses | DataObject | "User Management Service" accesses "User" |
|
|
166
|
+
| ApplicationComponent | accesses | DataObject | "OrderService" accesses "Order" |
|
|
167
|
+
| ApplicationFunction | accesses | DataObject | "Data Validation" accesses "Order" |
|
|
168
|
+
| ApplicationProcess | accesses | DataObject | "Order Fulfillment Saga" accesses "Order" |
|
|
169
|
+
| ApplicationEvent | accesses | DataObject | "OrderCreated" accesses "Order" (event payload) |
|
|
170
|
+
| ApplicationInteraction | accesses | DataObject | "Checkout Handshake" accesses "PaymentIntent" |
|
|
90
171
|
|
|
91
172
|
---
|
|
92
173
|
|
|
@@ -94,31 +175,52 @@ This layer uses **ArchiMate 3.2 Application Layer** standard with optional prope
|
|
|
94
175
|
|
|
95
176
|
### Outgoing References (Application → Other Layers)
|
|
96
177
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
178
|
+
| Source Type | Predicate | Target Type | Example |
|
|
179
|
+
| -------------------- | -------------- | ------------------------------- | -------------------------------------------------------------- |
|
|
180
|
+
| ApplicationService | realizes | `business.businessservice` | "Order API" realizes "Order Management" |
|
|
181
|
+
| ApplicationService | serves | `business.businessprocess` | "Payment Service" serves "Checkout" business process |
|
|
182
|
+
| ApplicationService | accesses | `business.businessobject` | "Order API" accesses "Customer Order" |
|
|
183
|
+
| ApplicationProcess | realizes | `business.businessprocess` | "Order Fulfillment Saga" realizes "Fulfill Order" |
|
|
184
|
+
| ApplicationFunction | realizes | `business.businessfunction` | "Credit Scoring" realizes "Risk Assessment" |
|
|
185
|
+
| ApplicationEvent | triggers | `business.businessprocess` | "PaymentFailed" triggers "Dunning" process |
|
|
186
|
+
| ApplicationInterface | serves | `business.businessrole` | "Admin Console" serves "Support Agent" |
|
|
187
|
+
| ApplicationService | realizes | `motivation.goal` | "User Management API" realizes "Improve User Experience" |
|
|
188
|
+
| ApplicationService | delivers | `motivation.value` | "Instant Checkout" delivers "Convenience" |
|
|
189
|
+
| ApplicationFunction | satisfies | `motivation.requirement` | "Token Validation" satisfies "Sessions Expire After 30 Min" |
|
|
190
|
+
| ApplicationService | realizes | `product.softwarecapability` | "Search Service" realizes "Product Discovery" |
|
|
191
|
+
| ApplicationService | realizes | `product.feature` | "Graph Layout Service" realizes "Interactive Graph View" |
|
|
192
|
+
| ApplicationService | requires | `security.authenticationconfig` | "Order API" requires "OAuth2 JWT Auth" |
|
|
193
|
+
| ApplicationService | constrained-by | `security.securitypolicy` | "Patient Records Service" constrained-by "HIPAA Access Policy" |
|
|
194
|
+
| ApplicationComponent | realizes | `security.countermeasure` | "Fetch Interceptor" realizes "Bearer Token Injection" |
|
|
195
|
+
| ApplicationComponent | accesses | `security.secureresource` | "OrderService" accesses "Order Records" |
|
|
196
|
+
| ApplicationComponent | accesses | `data-model.objectschema` | "OrderRepository" accesses the "Order" entity class |
|
|
197
|
+
| ApplicationFunction | accesses | `data-model.objectschema` | "saveOrder" accesses the "Order" entity class |
|
|
198
|
+
| ApplicationComponent | accesses | `data-model.schemadefinition` | "PayloadValidator" accesses the "Address" definition |
|
|
199
|
+
| ApplicationFunction | accesses | `data-model.schemadefinition` | "buildInvoice" accesses the "Invoice" definition |
|
|
200
|
+
| ApplicationEvent | accesses | `data-model.schemadefinition` | "OrderPlaced" accesses its "OrderPlacedPayload" definition |
|
|
201
|
+
| ApplicationComponent | accesses | `data-store.collection` | "OrderRepository" accesses the `orders` table |
|
|
202
|
+
| ApplicationFunction | accesses | `data-store.collection` | "findOrdersByCustomer" accesses `orders` |
|
|
203
|
+
| ApplicationFunction | accesses | `data-store.view` | "monthlyRevenueReport" accesses `monthly_revenue_mv` |
|
|
204
|
+
| ApplicationService | accesses | `data-store.collection` | "Order API" accesses `orders` |
|
|
205
|
+
| ApplicationService | accesses | `data-store.view` | "Reporting Service" accesses `monthly_revenue_mv` |
|
|
206
|
+
| ApplicationService | references | `apm.traceconfiguration` | "Order API" references "Order Service Tracing" |
|
|
207
|
+
|
|
208
|
+
### Incoming References (Other Layers → Application)
|
|
209
|
+
|
|
210
|
+
| Source Type | Predicate | Target Type | Example |
|
|
211
|
+
| ------------------------------ | ---------- | -------------------- | --------------------------------------------------------- |
|
|
212
|
+
| `technology.node` | serves | ApplicationComponent | "K8s Cluster Prod" serves "UserService" (deployment host) |
|
|
213
|
+
| `technology.systemsoftware` | serves | ApplicationComponent | "React 18" serves "WebApp" |
|
|
214
|
+
| `technology.technologyservice` | serves | ApplicationService | "Managed PostgreSQL" serves "Order API" |
|
|
215
|
+
| `api.openapidocument` | realizes | ApplicationService | "user-api.yaml" realizes "User Management API" |
|
|
216
|
+
| `api.operation` | realizes | ApplicationFunction | "POST /auth/token" realizes "Token Issuance" |
|
|
217
|
+
| `data-model.objectschema` | realizes | DataObject | "User schema" realizes "User" |
|
|
218
|
+
| `business.businessobject` | references | DataObject | "Customer Order" references "Order" |
|
|
219
|
+
| `ux.actioncomponent` | triggers | ApplicationService | "Place Order" button triggers "Checkout Service" |
|
|
220
|
+
| `navigation.route` | lazy-loads | ApplicationComponent | "/settings" lazy-loads "SettingsPanel" |
|
|
221
|
+
| `apm.span` | monitors | ApplicationService | "checkout.process" span monitors "Checkout Service" |
|
|
222
|
+
| `apm.metricinstrument` | monitors | ApplicationService | "order_processing_latency" monitors "Order API" |
|
|
223
|
+
| `testing.testcasesketch` | tests | ApplicationService | "Checkout happy path" tests "Checkout Service" |
|
|
122
224
|
|
|
123
225
|
---
|
|
124
226
|
|
|
@@ -228,7 +330,7 @@ class OrderFulfillmentWorkflow:
|
|
|
228
330
|
|
|
229
331
|
- ApplicationProcess: "OrderFulfillmentSaga" (pattern: saga)
|
|
230
332
|
- Properties: orchestration-engine=temporal, compensation-enabled=true
|
|
231
|
-
-
|
|
333
|
+
- Sequences sub-processes (reserve, pay, ship) with `flows-to`
|
|
232
334
|
|
|
233
335
|
### Pattern 5: Data Transfer Object (DTO)
|
|
234
336
|
|
|
@@ -272,7 +374,49 @@ service UserService {
|
|
|
272
374
|
- ApplicationService: "User Service"
|
|
273
375
|
- ApplicationComponent: "UserService"
|
|
274
376
|
|
|
275
|
-
### Pattern 7:
|
|
377
|
+
### Pattern 7: AI / RAG Processing Pipeline
|
|
378
|
+
|
|
379
|
+
```python
|
|
380
|
+
# Retrieval-Augmented Generation pipeline
|
|
381
|
+
class RAGPipeline:
|
|
382
|
+
"""
|
|
383
|
+
Multi-stage AI document processing pipeline.
|
|
384
|
+
ApplicationProcess: RAGPipeline (pattern: pipeline)
|
|
385
|
+
"""
|
|
386
|
+
|
|
387
|
+
def run(self, query: str) -> str:
|
|
388
|
+
chunks = self.chunker.chunk(documents) # ApplicationFunction: DocumentChunker
|
|
389
|
+
embeddings = self.embedder.embed(chunks) # ApplicationFunction: EmbeddingGenerator
|
|
390
|
+
results = self.retriever.retrieve( # ApplicationFunction: VectorRetriever
|
|
391
|
+
query_embedding, embeddings
|
|
392
|
+
)
|
|
393
|
+
return self.reranker.rerank(results, query) # ApplicationFunction: ResultReranker
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
**Maps to:**
|
|
397
|
+
|
|
398
|
+
- ApplicationProcess: "RAGPipeline" (pattern: pipeline) — the orchestrating process
|
|
399
|
+
- ApplicationFunction: "DocumentChunker" — assigned-to the RAG component; `flows-to` EmbeddingGenerator
|
|
400
|
+
- ApplicationFunction: "EmbeddingGenerator" — `flows-to` VectorRetriever
|
|
401
|
+
- ApplicationFunction: "VectorRetriever" — `flows-to` ResultReranker
|
|
402
|
+
- ApplicationFunction: "ResultReranker" — terminal stage; delivers output to the calling service
|
|
403
|
+
- ApplicationComponent: "RAGService" — owns all four functions via `assigned-to`
|
|
404
|
+
|
|
405
|
+
**Key relationships:**
|
|
406
|
+
|
|
407
|
+
```
|
|
408
|
+
ApplicationFunction: chunker → flows-to → ApplicationFunction: embedder
|
|
409
|
+
ApplicationFunction: embedder → flows-to → ApplicationFunction: retriever
|
|
410
|
+
ApplicationFunction: retriever → flows-to → ApplicationFunction: reranker
|
|
411
|
+
ApplicationComponent: rag-service → assigned-to → ApplicationFunction: chunker (×4)
|
|
412
|
+
ApplicationProcess: rag-pipeline → realizes → ApplicationService: rag-service
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
> **Rule:** Each discrete pipeline stage is an `ApplicationFunction`, not a separate service — stages share the same component boundary and have no independent business contract. Use `ApplicationProcess` to model the orchestration. If a stage is independently deployable (e.g., a separate embedding microservice), elevate it to `ApplicationComponent` + `ApplicationService`.
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
### Pattern 8: Message Queue Consumer
|
|
276
420
|
|
|
277
421
|
```python
|
|
278
422
|
# RabbitMQ consumer
|
|
@@ -312,21 +456,17 @@ class OrderEventConsumer:
|
|
|
312
456
|
```bash
|
|
313
457
|
# Frontend component
|
|
314
458
|
dr add application component "web-app" \
|
|
315
|
-
--properties type=frontend,technology=react,repository=github.com/org/web-app \
|
|
316
459
|
--description "Customer-facing web application"
|
|
317
460
|
|
|
318
461
|
# Backend microservices
|
|
319
462
|
dr add application component "user-service" \
|
|
320
|
-
--properties type=backend,subtype=microservice,language=python \
|
|
321
463
|
--description "User management microservice"
|
|
322
464
|
|
|
323
465
|
dr add application component "order-service" \
|
|
324
|
-
--properties type=backend,subtype=microservice,language=typescript \
|
|
325
466
|
--description "Order processing microservice"
|
|
326
467
|
|
|
327
468
|
# Worker component
|
|
328
469
|
dr add application component "email-worker" \
|
|
329
|
-
--properties type=worker,runtime=nodejs \
|
|
330
470
|
--description "Background worker for email notifications"
|
|
331
471
|
```
|
|
332
472
|
|
|
@@ -335,17 +475,15 @@ dr add application component "email-worker" \
|
|
|
335
475
|
```bash
|
|
336
476
|
# Synchronous service
|
|
337
477
|
dr add application service "user-management-api" \
|
|
338
|
-
--properties type=synchronous,protocol=REST,openapi-spec=specs/user-api.yaml \
|
|
339
478
|
--description "User management REST API"
|
|
340
479
|
|
|
341
480
|
# Asynchronous service
|
|
342
481
|
dr add application service "notification-service" \
|
|
343
|
-
--properties type=asynchronous,pattern=publish-subscribe \
|
|
344
482
|
--description "Asynchronous notification delivery"
|
|
345
483
|
|
|
346
484
|
# Link component to service
|
|
347
|
-
dr relationship add
|
|
348
|
-
|
|
485
|
+
dr relationship add application.applicationcomponent.user-service \
|
|
486
|
+
application.applicationservice.user-management-api --predicate realizes
|
|
349
487
|
```
|
|
350
488
|
|
|
351
489
|
### Step 3: Model Application Interfaces
|
|
@@ -353,22 +491,22 @@ dr relationship add "application/component/user-service" \
|
|
|
353
491
|
```bash
|
|
354
492
|
# REST API interface
|
|
355
493
|
dr add application interface "user-api-rest" \
|
|
356
|
-
--properties protocol=REST,base-url=/api/v1/users,authentication=JWT \
|
|
357
494
|
--description "REST interface for user service"
|
|
358
495
|
|
|
359
496
|
# gRPC interface
|
|
360
497
|
dr add application interface "order-grpc" \
|
|
361
|
-
--properties protocol=gRPC,port=50051 \
|
|
362
498
|
--description "gRPC interface for order service"
|
|
363
499
|
|
|
364
500
|
# Message queue interface
|
|
365
501
|
dr add application interface "event-bus" \
|
|
366
|
-
--properties protocol=AMQP,broker=rabbitmq \
|
|
367
502
|
--description "Event bus for async communication"
|
|
368
503
|
|
|
369
|
-
# Link service to interface
|
|
370
|
-
dr relationship add
|
|
371
|
-
|
|
504
|
+
# Link interface to the service it exposes, and component to interface
|
|
505
|
+
dr relationship add application.applicationinterface.user-api-rest \
|
|
506
|
+
application.applicationservice.user-management-api --predicate assigned-to
|
|
507
|
+
|
|
508
|
+
dr relationship add application.applicationcomponent.user-service \
|
|
509
|
+
application.applicationinterface.user-api-rest --predicate provides
|
|
372
510
|
```
|
|
373
511
|
|
|
374
512
|
### Step 4: Define Application Functions
|
|
@@ -376,20 +514,17 @@ dr relationship add "application/service/user-management-api" \
|
|
|
376
514
|
```bash
|
|
377
515
|
# Core functions
|
|
378
516
|
dr add application function "authentication" \
|
|
379
|
-
--properties type=security \
|
|
380
517
|
--description "Validates user credentials and issues tokens"
|
|
381
518
|
|
|
382
519
|
dr add application function "data-validation" \
|
|
383
|
-
--properties type=business-logic \
|
|
384
520
|
--description "Validates input data against business rules"
|
|
385
521
|
|
|
386
522
|
dr add application function "caching" \
|
|
387
|
-
--properties type=performance,strategy=redis \
|
|
388
523
|
--description "Caches frequently accessed data"
|
|
389
524
|
|
|
390
525
|
# Assign function to component
|
|
391
|
-
dr relationship add
|
|
392
|
-
assigned-to
|
|
526
|
+
dr relationship add application.applicationcomponent.user-service \
|
|
527
|
+
application.applicationfunction.authentication --predicate assigned-to
|
|
393
528
|
```
|
|
394
529
|
|
|
395
530
|
### Step 5: Model Application Events
|
|
@@ -397,19 +532,17 @@ dr relationship add "application/component/user-service" \
|
|
|
397
532
|
```bash
|
|
398
533
|
# Domain events
|
|
399
534
|
dr add application event "order-created" \
|
|
400
|
-
--properties type=domain-event,topic=orders.created,schema=schemas/order-created.json \
|
|
401
535
|
--description "Published when new order is created"
|
|
402
536
|
|
|
403
537
|
dr add application event "payment-processed" \
|
|
404
|
-
--properties type=domain-event,topic=payments.processed,schema=schemas/payment-processed.json \
|
|
405
538
|
--description "Published when payment completes"
|
|
406
539
|
|
|
407
|
-
# Event triggering
|
|
408
|
-
dr relationship add
|
|
409
|
-
|
|
540
|
+
# Event triggering (processes are defined in Step 7)
|
|
541
|
+
dr relationship add application.applicationevent.order-created \
|
|
542
|
+
application.applicationprocess.order-fulfillment-saga --predicate triggers
|
|
410
543
|
|
|
411
|
-
dr relationship add
|
|
412
|
-
|
|
544
|
+
dr relationship add application.applicationprocess.process-payment \
|
|
545
|
+
application.applicationevent.payment-processed --predicate triggers
|
|
413
546
|
```
|
|
414
547
|
|
|
415
548
|
### Step 6: Define Data Objects
|
|
@@ -417,19 +550,17 @@ dr relationship add "application/event/order-created" \
|
|
|
417
550
|
```bash
|
|
418
551
|
# Core data objects
|
|
419
552
|
dr add application data-object "user" \
|
|
420
|
-
--properties schema-ref=schemas/user.schema.json,pii=true,retention-period=7y \
|
|
421
553
|
--description "User account information"
|
|
422
554
|
|
|
423
555
|
dr add application data-object "order" \
|
|
424
|
-
--properties schema-ref=schemas/order.schema.json,pii=false,retention-period=10y \
|
|
425
556
|
--description "Customer order data"
|
|
426
557
|
|
|
427
558
|
# Service access to data
|
|
428
|
-
dr relationship add
|
|
429
|
-
|
|
559
|
+
dr relationship add application.applicationservice.user-management-api \
|
|
560
|
+
application.dataobject.user --predicate accesses
|
|
430
561
|
|
|
431
|
-
dr relationship add
|
|
432
|
-
|
|
562
|
+
dr relationship add application.applicationservice.order-api \
|
|
563
|
+
application.dataobject.order --predicate accesses
|
|
433
564
|
```
|
|
434
565
|
|
|
435
566
|
### Step 7: Model Application Processes (Orchestration)
|
|
@@ -437,7 +568,6 @@ dr relationship add "application/service/order-api" \
|
|
|
437
568
|
```bash
|
|
438
569
|
# Saga workflow
|
|
439
570
|
dr add application process "order-fulfillment-saga" \
|
|
440
|
-
--properties pattern=saga,orchestration-engine=temporal,compensation=true \
|
|
441
571
|
--description "End-to-end order fulfillment orchestration"
|
|
442
572
|
|
|
443
573
|
# Sub-processes
|
|
@@ -450,57 +580,50 @@ dr add application process "process-payment" \
|
|
|
450
580
|
dr add application process "ship-order" \
|
|
451
581
|
--description "Initiate shipping workflow"
|
|
452
582
|
|
|
453
|
-
# Process
|
|
454
|
-
dr relationship add
|
|
455
|
-
|
|
583
|
+
# Process flows (the catalog has no process-composes-process; model saga steps as a flows-to chain)
|
|
584
|
+
dr relationship add application.applicationprocess.order-fulfillment-saga \
|
|
585
|
+
application.applicationprocess.reserve-inventory --predicate flows-to
|
|
456
586
|
|
|
457
|
-
dr relationship add
|
|
458
|
-
|
|
587
|
+
dr relationship add application.applicationprocess.reserve-inventory \
|
|
588
|
+
application.applicationprocess.process-payment --predicate flows-to
|
|
459
589
|
|
|
460
|
-
dr relationship add
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
# Process flows
|
|
464
|
-
dr relationship add "application/process/reserve-inventory" \
|
|
465
|
-
flows-to "application/process/process-payment"
|
|
466
|
-
|
|
467
|
-
dr relationship add "application/process/process-payment" \
|
|
468
|
-
flows-to "application/process/ship-order"
|
|
590
|
+
dr relationship add application.applicationprocess.process-payment \
|
|
591
|
+
application.applicationprocess.ship-order --predicate flows-to
|
|
469
592
|
```
|
|
470
593
|
|
|
471
594
|
### Step 8: Cross-Layer Integration
|
|
472
595
|
|
|
473
596
|
```bash
|
|
474
597
|
# Link to business layer
|
|
475
|
-
dr relationship add
|
|
476
|
-
|
|
598
|
+
dr relationship add application.applicationservice.order-api \
|
|
599
|
+
business.businessservice.order-management --predicate realizes
|
|
477
600
|
|
|
478
601
|
# Link to motivation layer
|
|
479
|
-
dr relationship add
|
|
480
|
-
|
|
602
|
+
dr relationship add application.applicationservice.user-management-api \
|
|
603
|
+
motivation.goal.improve-user-experience --predicate realizes
|
|
481
604
|
|
|
482
|
-
# Link
|
|
483
|
-
dr relationship add
|
|
484
|
-
|
|
605
|
+
# Link from technology layer (the node hosting the component serves it)
|
|
606
|
+
dr relationship add technology.node.k8s-cluster-prod \
|
|
607
|
+
application.applicationcomponent.user-service --predicate serves
|
|
485
608
|
|
|
486
|
-
# Link
|
|
487
|
-
dr relationship add
|
|
488
|
-
|
|
609
|
+
# Link from API layer (the OpenAPI document realizes the service contract)
|
|
610
|
+
dr relationship add api.openapidocument.user-api \
|
|
611
|
+
application.applicationservice.user-management-api --predicate realizes
|
|
489
612
|
|
|
490
|
-
# Link
|
|
491
|
-
dr relationship add
|
|
492
|
-
|
|
613
|
+
# Link from data model layer (the schema realizes the data object)
|
|
614
|
+
dr relationship add data-model.objectschema.user \
|
|
615
|
+
application.dataobject.user --predicate realizes
|
|
493
616
|
|
|
494
|
-
# Link
|
|
495
|
-
dr relationship add
|
|
496
|
-
|
|
617
|
+
# Link from APM layer
|
|
618
|
+
dr relationship add apm.metricinstrument.order-processing-latency \
|
|
619
|
+
application.applicationservice.order-api --predicate monitors
|
|
497
620
|
```
|
|
498
621
|
|
|
499
622
|
### Step 9: Validate
|
|
500
623
|
|
|
501
624
|
```bash
|
|
502
|
-
dr validate --
|
|
503
|
-
dr validate --
|
|
625
|
+
dr validate --layers application
|
|
626
|
+
dr validate --relationships
|
|
504
627
|
```
|
|
505
628
|
|
|
506
629
|
---
|
|
@@ -513,36 +636,36 @@ dr validate --validate-relationships
|
|
|
513
636
|
ApplicationCollaboration: "E-commerce Platform"
|
|
514
637
|
├── aggregates → ApplicationComponent: "UserService"
|
|
515
638
|
│ ├── realizes → ApplicationService: "User API"
|
|
516
|
-
│ └──
|
|
639
|
+
│ └── ← serves — technology.node: "K8s Cluster"
|
|
517
640
|
├── aggregates → ApplicationComponent: "OrderService"
|
|
518
641
|
│ ├── realizes → ApplicationService: "Order API"
|
|
519
|
-
│ └──
|
|
642
|
+
│ └── ← serves — technology.node: "K8s Cluster"
|
|
520
643
|
├── aggregates → ApplicationComponent: "PaymentService"
|
|
521
644
|
│ └── realizes → ApplicationService: "Payment API"
|
|
522
|
-
└──
|
|
645
|
+
└── provides → ApplicationInterface: "API Gateway"
|
|
523
646
|
```
|
|
524
647
|
|
|
525
648
|
### Pattern 2: Event-Driven Architecture
|
|
526
649
|
|
|
527
650
|
```
|
|
528
651
|
ApplicationEvent: "OrderCreated"
|
|
529
|
-
├── triggers →
|
|
530
|
-
├── triggers →
|
|
531
|
-
├──
|
|
532
|
-
└──
|
|
533
|
-
└──
|
|
652
|
+
├── triggers → ApplicationProcess: "Reserve Inventory" (assigned to "InventoryService")
|
|
653
|
+
├── triggers → ApplicationProcess: "Send Confirmation Email" (assigned to "EmailWorker")
|
|
654
|
+
├── ← depends-on — ApplicationFunction: "Analytics Ingest" (handler in "AnalyticsService")
|
|
655
|
+
└── ← triggers — ApplicationProcess: "Place Order" (assigned to "OrderService")
|
|
656
|
+
└── "OrderService" provides → ApplicationInterface: "EventBus" (protocol: AMQP)
|
|
534
657
|
```
|
|
535
658
|
|
|
536
659
|
### Pattern 3: Saga Orchestration
|
|
537
660
|
|
|
538
661
|
```
|
|
539
662
|
ApplicationProcess: "Order Fulfillment Saga"
|
|
540
|
-
├──
|
|
663
|
+
├── flows-to → ApplicationProcess: "Reserve Inventory"
|
|
541
664
|
│ ├── flows-to → ApplicationProcess: "Process Payment"
|
|
542
|
-
│ └──
|
|
543
|
-
├──
|
|
665
|
+
│ └── flows-to (on failure) → ApplicationProcess: "Release Inventory"
|
|
666
|
+
├── ApplicationProcess: "Process Payment"
|
|
544
667
|
│ ├── flows-to → ApplicationProcess: "Ship Order"
|
|
545
|
-
│ └──
|
|
668
|
+
│ └── flows-to (on failure) → ApplicationProcess: "Refund Payment"
|
|
546
669
|
└── properties: orchestration-engine=temporal, pattern=saga
|
|
547
670
|
```
|
|
548
671
|
|
|
@@ -551,12 +674,12 @@ ApplicationProcess: "Order Fulfillment Saga"
|
|
|
551
674
|
```
|
|
552
675
|
ApplicationInterface: "API Gateway"
|
|
553
676
|
├── protocol: REST
|
|
554
|
-
├──
|
|
555
|
-
├──
|
|
556
|
-
├──
|
|
557
|
-
├──
|
|
558
|
-
├──
|
|
559
|
-
└──
|
|
677
|
+
├── assigned-to → ApplicationService: "User API"
|
|
678
|
+
├── assigned-to → ApplicationService: "Order API"
|
|
679
|
+
├── assigned-to → ApplicationService: "Payment API"
|
|
680
|
+
├── depends-on → ApplicationFunction: "Authentication"
|
|
681
|
+
├── depends-on → ApplicationFunction: "Rate Limiting"
|
|
682
|
+
└── depends-on → ApplicationFunction: "Request Logging"
|
|
560
683
|
```
|
|
561
684
|
|
|
562
685
|
---
|
|
@@ -576,6 +699,153 @@ ApplicationInterface: "API Gateway"
|
|
|
576
699
|
|
|
577
700
|
---
|
|
578
701
|
|
|
702
|
+
## React / SPA Codebase Detection Patterns
|
|
703
|
+
|
|
704
|
+
These patterns cover the actual structure of React/TypeScript single-page applications. Apply the Type Decision Tree to each pattern.
|
|
705
|
+
|
|
706
|
+
### Pattern: React Component
|
|
707
|
+
|
|
708
|
+
```tsx
|
|
709
|
+
// src/core/components/GraphViewer.tsx
|
|
710
|
+
export function GraphViewer({ nodes, edges }: GraphViewerProps) {
|
|
711
|
+
return <ReactFlow nodes={nodes} edges={edges} />;
|
|
712
|
+
}
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
→ `ApplicationComponent` (type: generic)
|
|
716
|
+
→ Cross-reference: `technology.systemsoftware.react` serves this component (a `technology.systemsoftware` → `serves` → `ApplicationComponent` relationship)
|
|
717
|
+
→ Also add `ux.component.graph-viewer` in the UX layer for rendering detail
|
|
718
|
+
|
|
719
|
+
### Pattern: Zustand Store
|
|
720
|
+
|
|
721
|
+
```typescript
|
|
722
|
+
// src/core/stores/modelStore.ts
|
|
723
|
+
export const useModelStore = create<ModelStoreState>((set) => ({
|
|
724
|
+
layers: {}, elements: {},
|
|
725
|
+
loadModel: (data) => set({ ... })
|
|
726
|
+
}));
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
→ `ApplicationFunction` (performs automated state management behavior)
|
|
730
|
+
→ NOT `ApplicationComponent` — stores are behavior, not deployable modules
|
|
731
|
+
→ Cross-reference: assign to the parent `ApplicationComponent` that owns the store
|
|
732
|
+
|
|
733
|
+
### Pattern: Stateless Service / Utility (parser, transformer)
|
|
734
|
+
|
|
735
|
+
```typescript
|
|
736
|
+
// src/core/services/yamlParser.ts
|
|
737
|
+
export function parseYAMLModel(yaml: string): ModelData { ... }
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
→ `ApplicationService` (serviceType: synchronous) if it orchestrates other services
|
|
741
|
+
→ OR `ApplicationFunction` if it is a purely stateless computation with no external contract
|
|
742
|
+
|
|
743
|
+
### Pattern: WebSocket Client
|
|
744
|
+
|
|
745
|
+
```typescript
|
|
746
|
+
// src/apps/embedded/services/websocketClient.ts
|
|
747
|
+
const ws = new WebSocket("ws://localhost:3000/ws");
|
|
748
|
+
ws.on("model.updated", handler);
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
→ `ApplicationInterface` (protocol: WebSocket) — the ws connection is the interface
|
|
752
|
+
→ `ApplicationEvent` for each event type: `model.updated`, `annotation.added`, `changeset.created`
|
|
753
|
+
|
|
754
|
+
### Pattern: Layout Engine Class (implements interface)
|
|
755
|
+
|
|
756
|
+
```typescript
|
|
757
|
+
// src/core/layout/engines/DagreLayoutEngine.ts
|
|
758
|
+
export class DagreLayoutEngine implements LayoutEngine {
|
|
759
|
+
async layout(nodes: Node[], edges: Edge[]): Promise<PositionedGraph> { ... }
|
|
760
|
+
}
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
→ `ApplicationComponent` (type: internal) — it IS a deployable, replaceable module
|
|
764
|
+
→ NOT `ApplicationFunction` — it has class structure, implements an interface, has state
|
|
765
|
+
|
|
766
|
+
### Pattern: Layout Utility (pure function)
|
|
767
|
+
|
|
768
|
+
```typescript
|
|
769
|
+
// src/core/layout/verticalLayerLayout.ts
|
|
770
|
+
export function computeVerticalLayout(layers: Layer[]): LayoutResult { ... }
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
→ `ApplicationFunction` — stateless algorithm, no interface
|
|
774
|
+
→ Capture even if standalone (not in an engines/ directory)
|
|
775
|
+
|
|
776
|
+
### Pattern: Multi-step Loading Pipeline
|
|
777
|
+
|
|
778
|
+
```typescript
|
|
779
|
+
// src/core/services/dataLoader.ts
|
|
780
|
+
async function loadModel(source: DataSource): Promise<void> {
|
|
781
|
+
const raw = await fetch(source.url);
|
|
782
|
+
const parsed = parseYAMLModel(raw);
|
|
783
|
+
const validated = validateSchema(parsed);
|
|
784
|
+
const transformed = transformToReactFlow(validated);
|
|
785
|
+
modelStore.setModel(transformed);
|
|
786
|
+
}
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
→ `ApplicationProcess` (orchestration pipeline: fetch → parse → validate → transform → store)
|
|
790
|
+
|
|
791
|
+
### Pattern: Fetch Interceptor
|
|
792
|
+
|
|
793
|
+
```typescript
|
|
794
|
+
// src/apps/embedded/utils/fetchInterceptor.ts
|
|
795
|
+
export function interceptFetch(token: string) {
|
|
796
|
+
window.fetch = async (url, options = {}) => {
|
|
797
|
+
return originalFetch(url, {
|
|
798
|
+
...options,
|
|
799
|
+
headers: { ...options.headers, Authorization: `Bearer ${token}` }
|
|
800
|
+
});
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
→ `ApplicationFunction`
|
|
806
|
+
→ source-provenance: extracted
|
|
807
|
+
→ Relationship: `security.securitypolicy.bearer-token-policy` (governed-by)
|
|
808
|
+
|
|
809
|
+
### Pattern: Data Transfer Object / Interface
|
|
810
|
+
|
|
811
|
+
```typescript
|
|
812
|
+
// src/core/types/model.ts
|
|
813
|
+
export interface ModelData {
|
|
814
|
+
layers: Layer[];
|
|
815
|
+
elements: Element[];
|
|
816
|
+
}
|
|
817
|
+
export interface Annotation {
|
|
818
|
+
id: string;
|
|
819
|
+
elementId: string;
|
|
820
|
+
content: string;
|
|
821
|
+
}
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
→ `DataObject` for each significant data structure (`ModelData`, `Annotation`, `Changeset`, etc.)
|
|
825
|
+
|
|
826
|
+
---
|
|
827
|
+
|
|
828
|
+
## Coverage Completeness Checklist
|
|
829
|
+
|
|
830
|
+
Before declaring application layer extraction complete, verify ALL 9 entity types have been considered:
|
|
831
|
+
|
|
832
|
+
```
|
|
833
|
+
□ ApplicationComponent — deployable units, UI components, layout engine classes (NOT Zustand stores — those are ApplicationFunction)
|
|
834
|
+
□ ApplicationService — capabilities with a business contract (data loader, parser service)
|
|
835
|
+
□ ApplicationInterface — access points: WebSocket endpoint, REST interface, postMessage bridge
|
|
836
|
+
□ ApplicationFunction — stateless algorithms: parse, validate, transform, export, layout; Zustand/Redux stores (state management behavior); fetch interceptors
|
|
837
|
+
□ ApplicationProcess — multi-step pipelines: loading pipeline, export pipeline
|
|
838
|
+
□ ApplicationEvent — state change notifications: model.updated, annotation.added, user events
|
|
839
|
+
□ DataObject — key data structures: ModelData, Annotation, Changeset, GraphNode, LayoutPreset
|
|
840
|
+
□ ApplicationCollaboration — component groupings: layout engine suite (groups of deployable ApplicationComponents)
|
|
841
|
+
□ ApplicationInteraction — collective behaviors across multiple components (if applicable)
|
|
842
|
+
|
|
843
|
+
If any type has ZERO elements, explicitly decide:
|
|
844
|
+
"This type doesn't apply to this codebase" with reasoning.
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
---
|
|
848
|
+
|
|
579
849
|
## Framework-Specific Patterns
|
|
580
850
|
|
|
581
851
|
### FastAPI / Flask (Python)
|
|
@@ -639,32 +909,32 @@ public class ProductController {
|
|
|
639
909
|
**Add Commands:**
|
|
640
910
|
|
|
641
911
|
```bash
|
|
642
|
-
dr add application component <name>
|
|
643
|
-
dr add application service <name>
|
|
644
|
-
dr add application interface <name>
|
|
645
|
-
dr add application function <name>
|
|
646
|
-
dr add application event <name>
|
|
647
|
-
dr add application data-object <name>
|
|
648
|
-
dr add application process <name>
|
|
912
|
+
dr add application component <name>
|
|
913
|
+
dr add application service <name>
|
|
914
|
+
dr add application interface <name>
|
|
915
|
+
dr add application function <name>
|
|
916
|
+
dr add application event <name>
|
|
917
|
+
dr add application data-object <name>
|
|
918
|
+
dr add application process <name>
|
|
649
919
|
```
|
|
650
920
|
|
|
651
921
|
**Relationship Commands:**
|
|
652
922
|
|
|
653
923
|
```bash
|
|
654
|
-
dr relationship add <component>
|
|
655
|
-
dr relationship add <service>
|
|
656
|
-
dr relationship add <component>
|
|
657
|
-
dr relationship add <
|
|
658
|
-
dr relationship add <
|
|
659
|
-
dr relationship add <
|
|
660
|
-
dr relationship add <process-a>
|
|
924
|
+
dr relationship add <component> <service> --predicate realizes
|
|
925
|
+
dr relationship add <interface> <service> --predicate assigned-to
|
|
926
|
+
dr relationship add <component> <interface> --predicate provides
|
|
927
|
+
dr relationship add <component> <function> --predicate assigned-to
|
|
928
|
+
dr relationship add <event> <process> --predicate triggers
|
|
929
|
+
dr relationship add <service> <data-object> --predicate accesses
|
|
930
|
+
dr relationship add <process-a> <process-b> --predicate flows-to
|
|
661
931
|
```
|
|
662
932
|
|
|
663
933
|
**Cross-Layer Commands:**
|
|
664
934
|
|
|
665
935
|
```bash
|
|
666
|
-
dr relationship add application
|
|
667
|
-
dr relationship add application
|
|
668
|
-
dr relationship add application
|
|
669
|
-
dr relationship add
|
|
936
|
+
dr relationship add application.<service> business.<service> --predicate realizes
|
|
937
|
+
dr relationship add technology.<node> application.<component> --predicate serves
|
|
938
|
+
dr relationship add api.<openapi-doc> application.<service> --predicate realizes
|
|
939
|
+
dr relationship add data-model.<object-schema> application.<data-object> --predicate realizes
|
|
670
940
|
```
|