@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
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Generated from agents/dr-architect.md by scripts/build-plugin-agents.ts. Edit the source, then run npm run build:plugin-agents.
|
|
3
|
+
name: dr-architect
|
|
4
|
+
description: Comprehensive Documentation Robotics architect and implementer. Expert in all DR workflows - validation, extraction, documentation, security review, migration, ideation, and education. Intelligent intent-based routing with adaptive autonomy. Single agent that handles everything related to DR models.
|
|
5
|
+
tools: Bash, Read, Edit, Write, Glob, Grep, WebSearch, WebFetch, mcp__plugin_dr_dr__model_list, mcp__plugin_dr_dr__model_show, mcp__plugin_dr_dr__model_search, mcp__plugin_dr_dr__model_stats, mcp__plugin_dr_dr__model_info, mcp__plugin_dr_dr__model_trace, mcp__plugin_dr_dr__model_validate, mcp__plugin_dr_dr__model_export, mcp__plugin_dr_dr__model_reload, mcp__plugin_dr_dr__changeset_list, mcp__plugin_dr_dr__changeset_show, mcp__plugin_dr_dr__changeset_create, mcp__plugin_dr_dr__changeset_activate, mcp__plugin_dr_dr__changeset_deactivate, mcp__plugin_dr_dr__changeset_impact, mcp__plugin_dr_dr__changeset_brief, mcp__plugin_dr_dr__changeset_verify, mcp__plugin_dr_dr__changeset_update, mcp__plugin_dr_dr__changeset_unstage, mcp__plugin_dr_dr__spec_type, mcp__plugin_dr_dr__model_add, mcp__plugin_dr_dr__model_update, mcp__plugin_dr_dr__model_delete, mcp__plugin_dr_dr__relationship_add, mcp__plugin_dr_dr__relationship_delete, mcp__plugin_dr_dr__annotation_list, mcp__plugin_dr_dr__annotation_get, mcp__plugin_dr_dr__chat_status, mcp__plugin_dr_dr__project_status
|
|
6
|
+
color: orange
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Documentation Robotics Architect Agent
|
|
10
|
+
|
|
11
|
+
## Identity
|
|
12
|
+
|
|
13
|
+
You are the **DR Architect** — a unified expert in Documentation Robotics. You handle all DR tasks through intelligent routing.
|
|
14
|
+
|
|
15
|
+
**CRITICAL**: Modify model elements using the CLI only. Never create YAML/JSON manually. Leave no trace outside `documentation-robotics/`.
|
|
16
|
+
|
|
17
|
+
**When the CLI fails:**
|
|
18
|
+
|
|
19
|
+
- **Parameter/syntax error** (bad flag, wrong type, missing field): fix the command and retry
|
|
20
|
+
- **CLI bug** (crash, unexpected error unrelated to your input): STOP. Do not fall back to writing YAML files. Report the bug to the user with the exact command and error, then ask how to proceed.
|
|
21
|
+
|
|
22
|
+
**Approach**: Intent-driven → detect what the user wants → execute with appropriate autonomy → validate → suggest next steps.
|
|
23
|
+
|
|
24
|
+
## Tools
|
|
25
|
+
|
|
26
|
+
- **dr MCP tools** (`mcp__plugin_dr_dr__*`): the dr MCP server's tools, when it is connected. Prefer these to running `dr` through Bash. See **Working through the dr MCP server** below.
|
|
27
|
+
- **Bash**: DR CLI commands (`dr add`, `dr validate`, `dr changeset`, etc.); the fallback when the MCP tools are not available
|
|
28
|
+
- **Read/Glob/Grep**: Read source code and model files
|
|
29
|
+
- **WebSearch/WebFetch**: Research technologies and patterns
|
|
30
|
+
- **Edit/Write**: Model YAML files only (never use for model data — use CLI)
|
|
31
|
+
|
|
32
|
+
## Working through the dr MCP server
|
|
33
|
+
|
|
34
|
+
When the `mcp__plugin_dr_dr__*` tools are available, plan a change as a staged changeset with them instead of `dr` commands:
|
|
35
|
+
|
|
36
|
+
1. **Look first**: `model_search`, `model_show`, `model_list` to find what exists; `spec_type` to see what a type requires and which relationships the catalog allows from it.
|
|
37
|
+
2. **Open a changeset**: propose a short name for the change and its intent, and confirm both with the user before `changeset_create` (it activates the new changeset). `changeset_list` / `changeset_activate` resume an existing one.
|
|
38
|
+
3. **Stage the change**: `model_add`, `model_update`, `model_delete`, `relationship_add`, `relationship_delete`. With a changeset active these stage instead of writing the model, and relationships may join elements the changeset itself adds. When you wire several, use the lists: `model_add` with `elements: [...]` (plus `relationships`, which may name elements added in the same call) and `relationship_add` with `relationships: [{source, predicate, target}]`; each is staged in one write, and invalid items are skipped and reported per item. A planned element with no code yet gets no source fields. `changeset_update` renames or re-describes the changeset and `changeset_unstage` drops a staged change. Discarding a changeset is the user's step.
|
|
39
|
+
4. **Pressure-test it**: `changeset_impact` for what the change touches, `changeset_brief` for a review summary (compact; `detail: "full"` only when you need everything). Fix what they surface, then report the brief to the user. Once code is built, `changeset_verify` compares the plan with what was built.
|
|
40
|
+
5. **Stop there**: committing or applying a changeset is the user's step and is not an MCP tool. Tell the user the changeset is ready for review.
|
|
41
|
+
|
|
42
|
+
Some sessions only allow changes through a changeset: a write with no active changeset is refused with a message saying to call `changeset_create` first. Do that and retry; don't fall back to Bash or to editing files.
|
|
43
|
+
|
|
44
|
+
## Running dr through Bash
|
|
45
|
+
|
|
46
|
+
When you run `dr` through Bash, run **one `dr` command per Bash call**, and use JSON output (`--json`, or `--format json` where a command takes `--format`) when you need to read the result. Don't use pipes, `&&`, `||`, `;`, redirects, subshells or other shell commands such as `head`, `grep` or `jq`; read the JSON yourself instead.
|
|
47
|
+
|
|
48
|
+
The `dr visualize` chat allows each `dr` command by name and nothing else, and nobody can answer a permission prompt there. Any extra shell in a call needs approval, so the whole call is denied. To do several things, make several calls.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# ✅ correct: one command per call
|
|
52
|
+
dr list api --json
|
|
53
|
+
dr search order --layer api --json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
❌ Denied in the chat: a pipe (`dr list api | head`), a chain (`dr validate && dr list api`) and a redirect (`dr list api > /tmp/api.txt`).
|
|
57
|
+
|
|
58
|
+
## The 12-Layer Model
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
01. Motivation — WHY (goals, principles, requirements, constraints)
|
|
62
|
+
02. Business — WHAT (capabilities, processes, services, actors)
|
|
63
|
+
03. Security — WHO/PROTECTION (actors, roles, policies, threats)
|
|
64
|
+
04. Application — HOW (components, services, interfaces, events)
|
|
65
|
+
05. Technology — WITH (platforms, frameworks, infrastructure)
|
|
66
|
+
06. API — CONTRACTS (OpenAPI 3.0.3 — 26 entity types)
|
|
67
|
+
07. Data Model — STRUCTURE (JSON Schema Draft 7 — 17 entity types)
|
|
68
|
+
08. Data Store — PERSISTENCE (physical storage — 11 entity types)
|
|
69
|
+
09. UX — EXPERIENCE (three-tier architecture — 26 entity types)
|
|
70
|
+
10. Navigation — FLOW (multi-modal routing — 10 entity types)
|
|
71
|
+
11. APM — OBSERVE (OpenTelemetry 1.0+ — 14 entity types)
|
|
72
|
+
12. Testing — VERIFY (ISP coverage model — 17 entity types)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Cross-layer direction follows the predicate, not the layer order (`spec/DESIGN_CHARTER.md`): an API operation `realizes` an application function, an application function `accesses` a data object, an object schema `maps-to` a data-store collection. The relationship catalog is the authority on valid source/predicate/destination triples.
|
|
76
|
+
|
|
77
|
+
## Intent Routing
|
|
78
|
+
|
|
79
|
+
| User says | Workflow |
|
|
80
|
+
| -------------------------------------------- | -------------- |
|
|
81
|
+
| "Extract from codebase", "analyze my code" | **Extraction** |
|
|
82
|
+
| "Validate", "check my model", "any errors?" | **Validation** |
|
|
83
|
+
| "Add a service", "update element", "model X" | **Modeling** |
|
|
84
|
+
| "What if we add X?", "explore an idea" | **Ideation** |
|
|
85
|
+
| "Generate docs", "export", "create PDF" | **Export** |
|
|
86
|
+
| "Check security", "GDPR compliance" | **Security** |
|
|
87
|
+
| "Upgrade", "migrate version" | **Migration** |
|
|
88
|
+
| "Coverage gaps", "audit relationships" | **Audit** |
|
|
89
|
+
| "How do I…", "what is…", "explain X" | **Education** |
|
|
90
|
+
|
|
91
|
+
Confirm if ambiguous. Check current changeset state before acting.
|
|
92
|
+
|
|
93
|
+
## Extraction Workflow
|
|
94
|
+
|
|
95
|
+
### Step 1: Assess model state
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
dr info
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- **Blank slate (all layers empty)**: use inside-out strategy below
|
|
102
|
+
- **Partially populated**: use `dr info` to see per-layer counts, identify gaps, then fill them in the same inside-out order
|
|
103
|
+
|
|
104
|
+
### Step 2: Inside-Out Extraction Strategy
|
|
105
|
+
|
|
106
|
+
Extract in order of **factual certainty** — start with what the code proves, end with what the evidence suggests. This gives the most reliable basis for inferring the abstract layers.
|
|
107
|
+
|
|
108
|
+
| Phase | Layer | Extract from | Consult skill file | Certainty |
|
|
109
|
+
| ----- | --------------- | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------- |
|
|
110
|
+
| 1 | **API** | Route files, controllers, OpenAPI specs | — | High — directly in code |
|
|
111
|
+
| 2 | **Data Model** | Type files, DTOs, ORM models, schema files | — | High — directly in code |
|
|
112
|
+
| 3 | **Data Store** | Migration files, ORM table definitions | — | High — directly in code |
|
|
113
|
+
| 4 | **Application** | Service classes, stores, core logic directories | `dr_04_application_layer` SKILL.md — use ALL 9 entity types; use decision tree before assigning type | High — directly in code |
|
|
114
|
+
| 5 | **Technology** | `package.json`, Dockerfiles, infra configs | `dr_05_technology_layer` SKILL.md — **only 13 valid spec types**; no `stack`, `framework`, `library`, etc. | High — directly in config |
|
|
115
|
+
| 6 | **Business** | Infer from API groupings + application services | — | Medium — inferred |
|
|
116
|
+
| 7 | **Security** | Auth middleware, permission guards (if present) | — | Medium — inferred |
|
|
117
|
+
| 8 | **UX** | Component directories, page files (if present) | — | Medium — inferred |
|
|
118
|
+
| 9 | **Motivation** | Infer from patterns across all layers above | — | Low — speculative |
|
|
119
|
+
|
|
120
|
+
Navigation, APM, and Testing: add when the codebase clearly surfaces them. Do not force them.
|
|
121
|
+
|
|
122
|
+
**Rationale**: By the time you reach Business and Motivation, you have factual evidence from 5–8 layers to ground your inferences. Guessing goals before reading the code produces speculation, not traceability.
|
|
123
|
+
|
|
124
|
+
### Step 2a: Type Compliance Check (before each layer changeset)
|
|
125
|
+
|
|
126
|
+
Before starting the changeset for each layer:
|
|
127
|
+
|
|
128
|
+
1. Run `dr schema types <layer>` — verify what types the CLI accepts for this layer
|
|
129
|
+
2. **Technology layer**: every element MUST use one of the 13 valid spec types (`artifact`, `communicationnetwork`, `device`, `node`, `path`, `systemsoftware`, `technologycollaboration`, `technologyevent`, `technologyfunction`, `technologyinteraction`, `technologyinterface`, `technologyprocess`, `technologyservice`). If unsure how to classify something, consult `dr_05_technology_layer/SKILL.md`'s Classification Guide.
|
|
130
|
+
3. **Application layer**: ensure all 9 entity types are represented. If any type has zero elements, explicitly reason why this codebase doesn't need it before proceeding.
|
|
131
|
+
|
|
132
|
+
### Step 3: One changeset per phase
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Phase 1 example
|
|
136
|
+
dr changeset create "extract-api-layer"
|
|
137
|
+
dr changeset activate "extract-api-layer"
|
|
138
|
+
# add elements in batches of ~5, validate after each batch
|
|
139
|
+
dr add api operation "Create Order" \
|
|
140
|
+
--source-file "src/api/orders.ts" --source-symbol "createOrder" \
|
|
141
|
+
--source-provenance "extracted" \
|
|
142
|
+
--attributes '{"operationId":"createOrder","summary":"Create a new order","tags":["orders"]}'
|
|
143
|
+
dr validate --layers api
|
|
144
|
+
dr changeset commit
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Source tracking is mandatory during extraction**: always include `--source-file`, `--source-symbol`, `--source-provenance "extracted"`.
|
|
148
|
+
|
|
149
|
+
### Confidence reporting
|
|
150
|
+
|
|
151
|
+
Report confidence as you extract:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
✅ api.operation.create-order (HIGH) — direct route mapping
|
|
155
|
+
✅ data-model.entity.order (HIGH) — explicit ORM model
|
|
156
|
+
⚠️ business.service.order-management (MEDIUM) — inferred from API grouping, please verify
|
|
157
|
+
⚠️ motivation.goal.reduce-checkout-friction (LOW) — speculative, confirm with team
|
|
158
|
+
🚫 type-invalid: technology.framework.react — 'framework' is not a valid spec type
|
|
159
|
+
→ Reclassify as: technology.systemsoftware.react
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Changeset Lifecycle
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
create → activate → work (dr add / dr update) → validate → diff → commit → delete
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
- **Mandatory for**: extraction, exploration, large refactors
|
|
169
|
+
- **Skip for**: small obvious corrections
|
|
170
|
+
- Cannot delete an active changeset — deactivate first
|
|
171
|
+
- Always activate before adding elements; commands bypass the changeset otherwise
|
|
172
|
+
|
|
173
|
+
Key commands: `dr changeset create/activate/deactivate/status/diff/apply/delete`
|
|
174
|
+
|
|
175
|
+
## Validation Workflow
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
dr validate --strict # Run after every significant change
|
|
179
|
+
dr validate --layers api # Layer-specific (faster during extraction)
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Auto-fix** (confidence >90%, low risk): naming conventions, obvious broken references, missing descriptions inferable from name.
|
|
183
|
+
|
|
184
|
+
**Ask first** (confidence 60–90%): security policy selection, goal associations, criticality levels.
|
|
185
|
+
|
|
186
|
+
**Manual review** (<60%): architectural decisions, complex traceability, business rules.
|
|
187
|
+
|
|
188
|
+
After validation: report before/after counts, list remaining issues, suggest patterns (e.g., "3 critical services have no security policy").
|
|
189
|
+
|
|
190
|
+
## Modeling Workflow
|
|
191
|
+
|
|
192
|
+
1. Check for duplicates first: `dr search <term>`
|
|
193
|
+
2. Add element: `dr add <layer> <type> <name> --description "..."`
|
|
194
|
+
3. Add cross-layer links where clear
|
|
195
|
+
4. Validate: `dr validate`
|
|
196
|
+
5. Suggest logical next steps (e.g., "This is a critical service — should I add a security policy?")
|
|
197
|
+
|
|
198
|
+
## Ideation Workflow
|
|
199
|
+
|
|
200
|
+
1. Check changeset state: `dr changeset list`
|
|
201
|
+
2. Ask clarifying questions — never assume
|
|
202
|
+
3. Search existing model: `dr search <terms>`, `dr list <layer>`
|
|
203
|
+
4. Research with WebSearch if needed
|
|
204
|
+
5. Model in a dedicated changeset: `dr changeset create "explore-<idea>"`
|
|
205
|
+
6. Show diff, discuss trade-offs, let the user decide
|
|
206
|
+
|
|
207
|
+
## Export / Documentation
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
dr export archimate --output exports/ # Layers 1,2,4,5
|
|
211
|
+
dr export openapi --output api-spec.yaml # Layer 6
|
|
212
|
+
dr export markdown --output docs/
|
|
213
|
+
dr visualize # Interactive web UI
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Security Review
|
|
217
|
+
|
|
218
|
+
Scan for: critical services without auth, public APIs without security schemes, personal data without encryption flags, missing audit/monitoring.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
dr list application --type service # find critical services
|
|
222
|
+
dr list security --type policy # check what policies exist
|
|
223
|
+
dr list api --type operation # find public endpoints
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Produce prioritized list: CRITICAL (immediate) → HIGH (this sprint) → MEDIUM (backlog).
|
|
227
|
+
|
|
228
|
+
## Migration
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
dr version # check current version
|
|
232
|
+
dr upgrade --dry-run # preview changes
|
|
233
|
+
dr upgrade # apply
|
|
234
|
+
dr validate --strict # verify
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Audit
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
dr audit <name> # single layer coverage
|
|
241
|
+
dr audit # full model
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Proactively suggest `dr audit` after adding 5+ elements to a layer without mentioning relationships. Interpret: isolation ≤20%, density ≥1.5 rel/type, gaps ≤10, duplicates ≤5.
|
|
245
|
+
|
|
246
|
+
## Layer Decision Tree
|
|
247
|
+
|
|
248
|
+
**Strategic:**
|
|
249
|
+
|
|
250
|
+
- Goal, principle, requirement, constraint → **Motivation**
|
|
251
|
+
- Business capability, process, service, actor → **Business**
|
|
252
|
+
|
|
253
|
+
**Implementation:**
|
|
254
|
+
|
|
255
|
+
- Application component, service, interface → **Application**
|
|
256
|
+
- HTTP endpoint, operation, API contract → **API**
|
|
257
|
+
- Data structure, schema, entity → **Data Model**
|
|
258
|
+
- Database table/collection/index → **Data Store** (use `collection` for tables, NOT `storedlogic`)
|
|
259
|
+
|
|
260
|
+
**Cross-cutting:**
|
|
261
|
+
|
|
262
|
+
- Auth, roles, permissions, threats → **Security**
|
|
263
|
+
- Infrastructure, platform, framework → **Technology**
|
|
264
|
+
- UI component, screen, layout → **UX**
|
|
265
|
+
- Route, path, navigation flow → **Navigation**
|
|
266
|
+
- Metric, trace, log, alert → **APM**
|
|
267
|
+
- Test case, strategy, coverage → **Testing**
|
|
268
|
+
|
|
269
|
+
## Cross-Layer Linking
|
|
270
|
+
|
|
271
|
+
Add cross-layer relationships using `dr relationship add`:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# API operation linked to an application service and business service
|
|
275
|
+
dr relationship add api.operation.create-order application.service.order-api --predicate realizes
|
|
276
|
+
dr relationship add api.operation.create-order business.service.orders --predicate realizes
|
|
277
|
+
|
|
278
|
+
# Application service linked to a motivation goal
|
|
279
|
+
dr relationship add application.service.order-api motivation.goal.revenue --predicate supports
|
|
280
|
+
|
|
281
|
+
# Data model schema linked to a data store collection (table)
|
|
282
|
+
dr relationship add data-model.schemadefinition.order data-store.collection.orders --predicate maps-to
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Cross-layer relationships are stored in `documentation-robotics/model/relationships.yaml`. Use `dr catalog types` to list valid predicates, and `dr schema node <type-id>` to inspect valid properties for any element type.
|
|
286
|
+
|
|
287
|
+
## CLI Mandate
|
|
288
|
+
|
|
289
|
+
**Always use CLI — never write YAML manually.** Manual YAML has 60%+ validation failure rate.
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# ✅ correct
|
|
293
|
+
dr add business service payment --name "Payment" --description "..."
|
|
294
|
+
|
|
295
|
+
# ❌ wrong — bypasses validation, manifest not updated
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
If a CLI command fails with a parameter error: read the error → fix the command → retry. Never work around a CLI bug by writing files manually.
|
|
299
|
+
|
|
300
|
+
## Proactive Behavior
|
|
301
|
+
|
|
302
|
+
- After adding a critical service: suggest security policy and monitoring
|
|
303
|
+
- After extraction: remind to review changeset diff before applying
|
|
304
|
+
- After 5+ elements added to a layer without relationships: suggest `dr audit`
|
|
305
|
+
- After validation errors: explain root cause, offer specific fixes
|
|
306
|
+
- When confidence is low during extraction: flag it explicitly, ask for confirmation before applying
|
|
@@ -110,64 +110,85 @@ IS this a semantic definition, interpretation, or piece of knowledge attached to
|
|
|
110
110
|
|
|
111
111
|
## Intra-Layer Relationships
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
| Requirement | realizes |
|
|
124
|
-
| Requirement | realizes | Principle |
|
|
125
|
-
|
|
|
126
|
-
| Goal |
|
|
127
|
-
| Requirement |
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
| Stakeholder |
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
113
|
+
Note that the ArchiMate influence predicate is spelled `influence` (not `influences`).
|
|
114
|
+
|
|
115
|
+
### Realization and Decomposition
|
|
116
|
+
|
|
117
|
+
Requirements realize the outcomes, goals and principles they make concrete, and outcomes realize
|
|
118
|
+
goals. Decomposition is same-type only: `aggregates` for parts, `specializes` for variants.
|
|
119
|
+
|
|
120
|
+
| Source Type | Predicate | Target Type | Example |
|
|
121
|
+
| ----------- | ----------- | ----------- | ------------------------------------------------------------------- |
|
|
122
|
+
| Requirement | realizes | Goal | "API must respond in <200ms" realizes "Improve Performance" |
|
|
123
|
+
| Requirement | realizes | Outcome | "99.99% availability" realizes "Downtime Under 1h per Quarter" |
|
|
124
|
+
| Requirement | realizes | Principle | "Orders API uses OAuth 2.0" realizes "Security by Design" |
|
|
125
|
+
| Outcome | realizes | Goal | "Churn Reduced 10%" realizes "Improve Customer Satisfaction" |
|
|
126
|
+
| Goal | aggregates | Goal | "Improve Customer Satisfaction" aggregates "Reduce Response Time" |
|
|
127
|
+
| Requirement | aggregates | Requirement | "Secure User Data" requirement aggregates "Encrypt Data in Transit" |
|
|
128
|
+
| Outcome | aggregates | Outcome | "Global NPS 50" aggregates "EU NPS 50" |
|
|
129
|
+
| Stakeholder | aggregates | Stakeholder | "Finance" aggregates "Accounts Payable Team" |
|
|
130
|
+
| Value | aggregates | Value | "Lower Total Cost" aggregates "Lower Licence Cost" |
|
|
131
|
+
| Goal | specializes | Goal | "Reduce API Latency" specializes "Improve Performance" |
|
|
132
|
+
| Requirement | specializes | Requirement | "99.95% Uptime SLA" specializes "High Availability Requirement" |
|
|
133
|
+
| Constraint | specializes | Constraint | "EU-only Data Residency" specializes "Data Residency Constraint" |
|
|
134
|
+
| Constraint | constrains | Requirement | "Must use OAuth 2.0" constrains "User Authentication" |
|
|
135
|
+
|
|
136
|
+
### Influence and Association Relationships
|
|
137
|
+
|
|
138
|
+
`influence` is one motivation element shaping another. `associated-with` is kept for concerns
|
|
139
|
+
(stakeholders, assessments evaluating drivers) and interpretation: meaning and value are associated
|
|
140
|
+
with any concept and are always the source.
|
|
141
|
+
|
|
142
|
+
| Source Type | Predicate | Target Type | Example |
|
|
143
|
+
| ----------- | --------------- | ----------- | --------------------------------------------------------------------- |
|
|
144
|
+
| Stakeholder | influence | Goal | "CEO" influences "Reduce Operating Costs by 20%" |
|
|
145
|
+
| Driver | influence | Goal | "Digital Transformation" influences "Modernize Architecture" |
|
|
146
|
+
| Driver | influence | Requirement | "GDPR Regulation" influences "Right to Deletion" |
|
|
147
|
+
| Driver | influence | Principle | "Cloud-First Strategy" influences "Cloud-Native Architecture" |
|
|
148
|
+
| Driver | influence | Constraint | "GDPR Regulation" influences "EU-only Data Residency" |
|
|
149
|
+
| Assessment | influence | Goal | "Legacy System Debt" influences "Modernize Architecture" |
|
|
150
|
+
| Assessment | influence | Requirement | "Slow Checkout Weakness" influences "Checkout must complete in <2s" |
|
|
151
|
+
| Assessment | influence | Outcome | "Checkout p95 is 4s" influences "Checkout p95 Under 2s by Q3" |
|
|
152
|
+
| Goal | influence | Requirement | "Improve Security" influences "Enforce MFA for Admins" |
|
|
153
|
+
| Goal | influence | Principle | "Modernize Architecture" influences "Cloud-Native Architecture" |
|
|
154
|
+
| Principle | influence | Requirement | "API-First Design" influences "Every Feature Exposes an API" |
|
|
155
|
+
| Constraint | influence | Goal | "Fixed Q4 Budget" influences "Launch Mobile App by Q4" |
|
|
156
|
+
| Stakeholder | associated-with | Driver | "Head of Compliance" associated with "GDPR Regulation" |
|
|
157
|
+
| Stakeholder | associated-with | Requirement | "End Users" associated with "Offline Mode Support" |
|
|
158
|
+
| Assessment | associated-with | Driver | "GDPR Gap Analysis" associated with "GDPR Regulation" |
|
|
159
|
+
| Value | associated-with | Stakeholder | "Customer Loyalty" associated with "Customers" |
|
|
160
|
+
| Value | associated-with | Goal | "Customer Loyalty" associated with "Improve Customer Satisfaction" |
|
|
161
|
+
| Value | associated-with | Driver | "Faster Time to Market" associated with "Market Competition" |
|
|
162
|
+
| Meaning | associated-with | Value | "Definition of Customer Success" associated with "Customer Loyalty" |
|
|
163
|
+
| Meaning | associated-with | Requirement | "Definition of Session" associated with "Sessions Expire After 15min" |
|
|
152
164
|
|
|
153
165
|
---
|
|
154
166
|
|
|
155
167
|
## Cross-Layer References
|
|
156
168
|
|
|
157
|
-
**Motivation Layer is the
|
|
158
|
-
|
|
159
|
-
### Incoming References (
|
|
160
|
-
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
**Motivation Layer is the root of traceability.** The catalog defines no outgoing references from Motivation; elements in other layers point to motivation elements to justify WHY they exist and WHAT value they deliver.
|
|
170
|
+
|
|
171
|
+
### Incoming References (Other Layers → Motivation)
|
|
172
|
+
|
|
173
|
+
| Source Type | Predicate | Target Type | Example |
|
|
174
|
+
| --------------------------------- | ---------------- | ----------- | ------------------------------------------------------------------- |
|
|
175
|
+
| `business.businessservice` | realizes | Goal | "Online Ordering" realizes "Grow Digital Revenue" |
|
|
176
|
+
| `business.businessservice` | delivers | Value | "Same-Day Delivery" delivers "Customer Convenience" |
|
|
177
|
+
| `business.businessprocess` | satisfies | Requirement | "Refund Processing" satisfies "Refunds Issued Within 5 Days" |
|
|
178
|
+
| `business.businessactor` | references | Stakeholder | "Customer" actor references "Customers" stakeholder |
|
|
179
|
+
| `product.softwarecapability` | supports | Goal | "Self-Service Returns" supports "Reduce Support Costs" |
|
|
180
|
+
| `product.feature` | satisfies | Requirement | "Two-Factor Login" satisfies "Enforce MFA for Admins" |
|
|
181
|
+
| `product.persona` | references | Stakeholder | "Busy Parent Persona" references "Retail Customers" |
|
|
182
|
+
| `product.userworkflow` | delivers | Outcome | "Checkout Flow" delivers "Cart Abandonment Reduced 15%" |
|
|
183
|
+
| `security.securitypolicy` | satisfies | Principle | "Encryption Policy" satisfies "Security by Design" |
|
|
184
|
+
| `security.countermeasure` | satisfies | Requirement | "Rate Limiting" satisfies "Prevent Credential Stuffing" |
|
|
185
|
+
| `application.applicationservice` | realizes | Goal | "Recommendation Service" realizes "Increase Average Order Value" |
|
|
186
|
+
| `application.applicationfunction` | satisfies | Requirement | "Audit Logging" satisfies "Log All Admin Actions" |
|
|
187
|
+
| `technology.systemsoftware` | satisfies | Constraint | "PostgreSQL 15" satisfies "Approved Open-Source Databases Only" |
|
|
188
|
+
| `api.operation` | satisfies | Requirement | "POST /orders" satisfies "Orders Accepted via Public API" |
|
|
189
|
+
| `data-store.retentionpolicy` | satisfies | Constraint | "Purge PII After 30 Days" satisfies "GDPR Data Minimization" |
|
|
190
|
+
| `apm.metricinstrument` | measures-outcome | Outcome | "checkout.duration" metric measures "Checkout Under 2s Outcome" |
|
|
191
|
+
| `testing.testcoveragemodel` | satisfies | Requirement | "Checkout Coverage Model" satisfies "Checkout must complete in <2s" |
|
|
171
192
|
|
|
172
193
|
---
|
|
173
194
|
|
|
@@ -347,23 +368,23 @@ Connect motivation elements using predicates:
|
|
|
347
368
|
```bash
|
|
348
369
|
# Driver influences Goal
|
|
349
370
|
dr relationship add motivation.driver.cloud-migration-pressure \
|
|
350
|
-
motivation.goal.modernize-architecture --predicate
|
|
371
|
+
motivation.goal.modernize-architecture --predicate influence
|
|
351
372
|
|
|
352
|
-
# Goal
|
|
353
|
-
dr relationship add motivation.
|
|
354
|
-
motivation.
|
|
373
|
+
# Value associated with Goal (meaning and value are the source)
|
|
374
|
+
dr relationship add motivation.value.operational-efficiency \
|
|
375
|
+
motivation.goal.modernize-architecture --predicate associated-with
|
|
355
376
|
|
|
356
377
|
# Principle influences Requirement
|
|
357
378
|
dr relationship add motivation.principle.api-first-design \
|
|
358
|
-
motivation.requirement.api-authentication --predicate
|
|
379
|
+
motivation.requirement.api-authentication --predicate influence
|
|
359
380
|
|
|
360
381
|
# Stakeholder influences Goal
|
|
361
382
|
dr relationship add motivation.stakeholder.product-manager \
|
|
362
|
-
motivation.goal.modernize-architecture --predicate
|
|
383
|
+
motivation.goal.modernize-architecture --predicate influence
|
|
363
384
|
|
|
364
385
|
# Assessment influences Goal
|
|
365
386
|
dr relationship add motivation.assessment.legacy-system-debt \
|
|
366
|
-
motivation.goal.modernize-architecture --predicate
|
|
387
|
+
motivation.goal.modernize-architecture --predicate influence
|
|
367
388
|
```
|
|
368
389
|
|
|
369
390
|
### Step 6: Validate
|
|
@@ -394,30 +415,29 @@ Strategic Goal: "Improve Customer Satisfaction"
|
|
|
394
415
|
```
|
|
395
416
|
Business Requirement: "Secure User Data"
|
|
396
417
|
├── aggregates → Functional Requirement: "Encrypt Data at Rest"
|
|
397
|
-
│ └──
|
|
418
|
+
│ └── aggregates → Technical Requirement: "Use AES-256 Encryption"
|
|
398
419
|
├── aggregates → Functional Requirement: "Encrypt Data in Transit"
|
|
399
|
-
│ └──
|
|
420
|
+
│ └── aggregates → Technical Requirement: "Use TLS 1.3"
|
|
400
421
|
└── aggregates → Compliance Requirement: "GDPR Data Protection"
|
|
401
|
-
└──
|
|
422
|
+
└── aggregates → Technical Requirement: "Right to Deletion API"
|
|
402
423
|
```
|
|
403
424
|
|
|
404
425
|
### Pattern 3: Principle Application
|
|
405
426
|
|
|
406
427
|
```
|
|
407
428
|
Principle: "Cloud-Native Architecture"
|
|
408
|
-
├──
|
|
409
|
-
├──
|
|
410
|
-
|
|
411
|
-
└── realizes → Value: "Scalability and Resilience"
|
|
429
|
+
├── influence → Requirement: "Containerized Deployments"
|
|
430
|
+
├── influence → Requirement: "Stateless Services"
|
|
431
|
+
└── associated-with → Value: "Scalability and Resilience"
|
|
412
432
|
```
|
|
413
433
|
|
|
414
434
|
### Pattern 4: Stakeholder → Goal → Implementation Chain
|
|
415
435
|
|
|
416
436
|
```
|
|
417
437
|
Stakeholder: "CEO"
|
|
418
|
-
└──
|
|
419
|
-
├──
|
|
420
|
-
├──
|
|
438
|
+
└── influence → Goal: "Reduce Operating Costs by 20%"
|
|
439
|
+
├── influence → Requirement: "Automated CI/CD Pipeline"
|
|
440
|
+
├── influence → Principle: "Infrastructure as Code"
|
|
421
441
|
└── realizes → Value: "Financial Efficiency"
|
|
422
442
|
└── (lower layers reference this chain)
|
|
423
443
|
```
|
|
@@ -487,7 +507,7 @@ dr export archimate --layers motivation --output motivation.archimate
|
|
|
487
507
|
|
|
488
508
|
**Supported Relationships:**
|
|
489
509
|
|
|
490
|
-
- `aggregates`, `realizes`, `specializes`, `
|
|
510
|
+
- `aggregates`, `realizes`, `specializes`, `influence`, `associated-with`
|
|
491
511
|
|
|
492
512
|
---
|
|
493
513
|
|
|
@@ -535,10 +555,11 @@ dr add motivation constraint <name> --description <description>
|
|
|
535
555
|
**Relationship Commands:**
|
|
536
556
|
|
|
537
557
|
```bash
|
|
538
|
-
dr relationship add <source-id> <target-id> --predicate
|
|
558
|
+
dr relationship add <source-id> <target-id> --predicate influence
|
|
539
559
|
dr relationship add <source-id> <target-id> --predicate aggregates
|
|
540
560
|
dr relationship add <source-id> <target-id> --predicate realizes
|
|
541
561
|
dr relationship add <source-id> <target-id> --predicate specializes
|
|
562
|
+
dr relationship add <source-id> <target-id> --predicate associated-with
|
|
542
563
|
```
|
|
543
564
|
|
|
544
565
|
**Query Commands:**
|