@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
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Analyze an existing codebase and
|
|
2
|
+
description: "Deprecated: use the codebase_extract MCP tool. Analyze an existing codebase and generate a Documentation Robotics architecture model"
|
|
3
3
|
argument-hint: "<path> [--layers <layers>] [--tech <technology>] [--recipe | --targeted]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Extract Architecture Model from Codebase
|
|
7
7
|
|
|
8
|
+
> **Deprecated.** Use the `codebase_extract` tool on the `dr` MCP server instead. It runs the
|
|
9
|
+
> extraction cascade on the indexed code (`codebase_index` first): the Tier-0 rules stage what they
|
|
10
|
+
> decide, and the symbols they can't place come back to you as cards to stage with `model_add`.
|
|
11
|
+
> Everything lands in an as-built changeset, never the base model, for the user to review and
|
|
12
|
+
> commit. This command still works but is no longer maintained.
|
|
13
|
+
|
|
8
14
|
Analyze an existing codebase and automatically generate a Documentation Robotics architecture model.
|
|
9
15
|
|
|
10
16
|
## What This Command Does
|
|
@@ -246,6 +252,19 @@ Proceed with extraction?
|
|
|
246
252
|
|
|
247
253
|
The extraction workflow can consult the dr-analyzer if one is installed and active.
|
|
248
254
|
|
|
255
|
+
**Important: Dual-Root Configuration**
|
|
256
|
+
|
|
257
|
+
If your codebase root (source code location) differs from your model root (metadata location):
|
|
258
|
+
|
|
259
|
+
1. Ensure `codebase_path` is configured in `documentation-robotics/model/manifest.yaml`
|
|
260
|
+
2. If you recently changed `codebase_path`, re-index before extraction:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
dr analyzer index --force
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
See [dr-analyzer.md](dr-analyzer.md) for complete dual-root setup instructions.
|
|
267
|
+
|
|
249
268
|
**Check analyzer status:**
|
|
250
269
|
|
|
251
270
|
Run the following command and save the result (it will guide the extraction agent):
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan a change as a staged DR changeset through the dr MCP server, pressure-test it, build from its brief, and verify the build. The human commits it in the PR.
|
|
3
|
+
argument-hint: "<the change to plan, in plain words>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan a Change
|
|
7
|
+
|
|
8
|
+
Plan `$ARGUMENTS` as a staged DR changeset instead of a prose plan.
|
|
9
|
+
|
|
10
|
+
## Instructions for Claude Code
|
|
11
|
+
|
|
12
|
+
Follow the `dr_change_planning` skill for this change.
|
|
13
|
+
In short:
|
|
14
|
+
|
|
15
|
+
1. **Frame**: propose a kebab-case name and the change's intent, and confirm both with the human
|
|
16
|
+
before `changeset_create` uses them as the name and description (or `changeset_activate` an
|
|
17
|
+
existing one). Wait for their answer. Find or stage the goal, requirement or feature it serves.
|
|
18
|
+
With no model yet, confirm the model's name before `project_init`, and ask whether to bootstrap
|
|
19
|
+
it from the code or let it grow with each change.
|
|
20
|
+
2. **Orient**: `model_search`, `model_show`, `model_trace` for what exists; `spec_type` for each
|
|
21
|
+
type you will add. Within reason, every connection the spec models for a type is expected,
|
|
22
|
+
though not every one will exist.
|
|
23
|
+
3. **Draft**: `model_add` / `model_update` / `model_delete` / `relationship_add` /
|
|
24
|
+
`relationship_delete` across every layer the change reaches. Wire several at once with the
|
|
25
|
+
lists: `model_add` `elements: [...]` (with `relationships` among them) and `relationship_add`
|
|
26
|
+
`relationships: [...]`; invalid items are skipped and reported. A planned element with no code
|
|
27
|
+
yet gets no source fields. `model_update` with
|
|
28
|
+
`attributePatch` to change one attribute; `changeset_unstage` to back out (`source` or `target`
|
|
29
|
+
alone drops every staged connection at that end; `changes: [...]` drops several in one call).
|
|
30
|
+
4. **Pressure-test**: `changeset_brief` (compact; `detail: "full"` only when you need everything)
|
|
31
|
+
and `changeset_impact`. Answer each gap by staging what is
|
|
32
|
+
missing, or accept it and say why in an annotation or the description. Steps 3 and 4 repeat:
|
|
33
|
+
stage a little, then pass the brief's `revisionToken` back as `since` to see what changed, work
|
|
34
|
+
through `unwired` (list it with `sections: ["unwired"], unwiredLayers: [...]`, naming the layers
|
|
35
|
+
the change reaches; always pass a filter), and walk `changeset_impact` with `from` set to what
|
|
36
|
+
you just added.
|
|
37
|
+
5. **Review**: show the human the brief, then call `review_open` and give them its `url`, which
|
|
38
|
+
opens the plan on the graph in the viewer. The human comments there; read the comments with
|
|
39
|
+
`annotation_list`, answer with `annotation_reply`, revise. Wait for agreement before building.
|
|
40
|
+
6. **Build** from the brief: `changeset_brief` with `sections: ["changes"]` for each changed
|
|
41
|
+
element's attributes and connections (for a large plan, one layer at a time with
|
|
42
|
+
`layers: ["<layer>"]`, from the default brief's `byLayer`). Commit only the plan's own changeset directory
|
|
43
|
+
(`documentation-robotics/changesets/<id>/`) on the branch with the code; keep `.active` and the
|
|
44
|
+
as-built changeset out of the commit. Don't verify during the build: no `codebase_extract`, no
|
|
45
|
+
as-built changeset and no `changeset_verify` until the build is committed.
|
|
46
|
+
7. **Verify**, as its own step after the build is committed: `codebase_index` with `wait: 30`
|
|
47
|
+
(then `status: true`, `wait: 30` until it is done; if it reports `ignoreFile`, tell the developer
|
|
48
|
+
to commit that file), then `codebase_extract`
|
|
49
|
+
with `since` (the branch the work started from) and `changeset: "<name>-as-built"`. Stage the
|
|
50
|
+
cards it returns that are elements with `model_add` (`sourceProvenance: "extracted"`), call it again for their relationships, then
|
|
51
|
+
`changeset_verify` the plan against `<name>-as-built`. The as-built comes from `codebase_extract`,
|
|
52
|
+
never by hand: never copy plan elements into it, and name each element after its card, not the
|
|
53
|
+
plan. Ask the developer about the cards you can't place with confidence, batched in one short
|
|
54
|
+
list, instead of guessing. Fix what diverges, in the code or in the plan, and `changeset_activate`
|
|
55
|
+
the plan again. `unverifiable` items (what extraction can't see) and `notes` (description-only
|
|
56
|
+
differences) need no plan edit; never edit the plan to match extracted placeholder text. Then the
|
|
57
|
+
plan is what lands; ask the human whether to discard the as-built changeset or keep it as a
|
|
58
|
+
record. Landing the as-built first drifts the plan's base, so the plan would need `force`.
|
|
59
|
+
8. **Land**: the human commits the plan in the PR, not the as-built changeset. When they ask you to land it, call
|
|
60
|
+
`changeset_commit`; they confirm it in a dialog, and it commits only then. If it is refused, they
|
|
61
|
+
land it in the viewer (`review_open`, then Apply), or you call it again from an interactive
|
|
62
|
+
session; never point them to the `dr` CLI. Never commit unasked, and never apply
|
|
63
|
+
or discard the plan yourself.
|
|
64
|
+
|
|
65
|
+
If the `dr` MCP tools are not available, say so and point the user to
|
|
66
|
+
`integrations/claude_code/docs/MCP_SERVER.md`.
|
|
@@ -29,9 +29,9 @@ full set of spec-defined schemas — intra-layer and cross-layer alike.
|
|
|
29
29
|
|
|
30
30
|
Relationships require the full model to be visible before wiring can begin:
|
|
31
31
|
|
|
32
|
-
- A `ux.
|
|
32
|
+
- A `ux.view.composes.ux.componentinstance` relationship can't be created until both
|
|
33
33
|
the source and target UX elements exist
|
|
34
|
-
- Cross-layer relationships (e.g., `business.businessservice --[delivers
|
|
34
|
+
- Cross-layer relationships (e.g., `business.businessservice --[delivers]--> motivation.value`)
|
|
35
35
|
can't be wired until both layers are populated
|
|
36
36
|
- Re-running `/dr-relate` after adding more layers is cheap — no nodes are re-created
|
|
37
37
|
|
|
@@ -303,16 +303,16 @@ Build a relationship map that includes both intra-layer and cross-layer schemas:
|
|
|
303
303
|
|
|
304
304
|
```
|
|
305
305
|
ux layer relationship map (intra-layer):
|
|
306
|
-
ux.
|
|
307
|
-
ux.
|
|
308
|
-
ux.
|
|
306
|
+
ux.view →[composes]→ ux.componentinstance
|
|
307
|
+
ux.componentinstance →[realizes]→ ux.librarycomponent
|
|
308
|
+
ux.librarycomponent →[specializes]→ ux.librarycomponent
|
|
309
309
|
ux.view →[handles]→ ux.event
|
|
310
310
|
ux.widget →[triggers]→ ux.event
|
|
311
311
|
... (123 total intra-layer schemas in ux)
|
|
312
312
|
|
|
313
313
|
application layer cross-layer schemas:
|
|
314
314
|
application.applicationprocess →[realizes]→ business.businessprocess
|
|
315
|
-
application.applicationservice →[delivers
|
|
315
|
+
application.applicationservice →[delivers]→ motivation.value
|
|
316
316
|
application.applicationservice →[references]→ apm.traceconfiguration
|
|
317
317
|
...
|
|
318
318
|
```
|
|
@@ -343,8 +343,8 @@ For each populated layer (in the order they appear in the model):
|
|
|
343
343
|
- Element names and descriptions
|
|
344
344
|
- Source provenance files (if elements share the same source file, a relationship
|
|
345
345
|
is likely)
|
|
346
|
-
- Domain semantics of the predicate (e.g., `
|
|
347
|
-
|
|
346
|
+
- Domain semantics of the predicate (e.g., `composes` implies a parent view
|
|
347
|
+
placing a child component)
|
|
348
348
|
|
|
349
349
|
3. For warranted pairs, create the relationship:
|
|
350
350
|
|
|
@@ -378,20 +378,20 @@ For each populated layer (in the order they appear in the model):
|
|
|
378
378
|
|
|
379
379
|
**Intra-layer relationship priorities by layer:**
|
|
380
380
|
|
|
381
|
-
| Layer | High-value predicates to look for
|
|
382
|
-
| ----------- |
|
|
383
|
-
| ux |
|
|
384
|
-
| navigation |
|
|
385
|
-
| api |
|
|
386
|
-
| data-model |
|
|
387
|
-
| data-store |
|
|
388
|
-
| application | depends-on, orchestrates, delegates-to
|
|
389
|
-
| technology |
|
|
390
|
-
| security |
|
|
391
|
-
| apm |
|
|
392
|
-
| testing |
|
|
393
|
-
| business | realizes, depends-on, triggers, supports
|
|
394
|
-
| motivation |
|
|
381
|
+
| Layer | High-value predicates to look for |
|
|
382
|
+
| ----------- | ------------------------------------------------------------------------- |
|
|
383
|
+
| ux | composes, realizes, applies, binds-to, uses, triggers, navigates-to |
|
|
384
|
+
| navigation | navigates-to, flows-to, protects, evaluates, composes, accesses |
|
|
385
|
+
| api | composes, references, specializes, governs, realizes, serves |
|
|
386
|
+
| data-model | composes, references, specializes, maps-to |
|
|
387
|
+
| data-store | composes, accesses, references, triggers, derives-from |
|
|
388
|
+
| application | depends-on, orchestrates, delegates-to |
|
|
389
|
+
| technology | composes, assigned-to, realizes, serves, connects, depends-on |
|
|
390
|
+
| security | aggregates, composes, authorizes, mandates, mitigates, generates, governs |
|
|
391
|
+
| apm | aggregates, composes, flows-to, references, monitors |
|
|
392
|
+
| testing | composes, references, validates, aggregates, covers, tests |
|
|
393
|
+
| business | realizes, depends-on, triggers, supports |
|
|
394
|
+
| motivation | realizes, aggregates, specializes, influence, associated-with, constrains |
|
|
395
395
|
|
|
396
396
|
---
|
|
397
397
|
|
|
@@ -424,79 +424,89 @@ The table below lists every cross-layer layer pair and the predicates defined in
|
|
|
424
424
|
Run `dr schema relationship <element-type>` for the exact source/destination node types
|
|
425
425
|
within each pair — this table shows the predicate vocabulary, not individual type combinations.
|
|
426
426
|
|
|
427
|
-
| Source Layer | Target Layer | Predicates
|
|
428
|
-
| ------------ | ------------ |
|
|
429
|
-
| api |
|
|
430
|
-
| api |
|
|
431
|
-
| api |
|
|
432
|
-
| api |
|
|
433
|
-
| api |
|
|
434
|
-
| api |
|
|
435
|
-
|
|
|
436
|
-
| apm |
|
|
437
|
-
| apm |
|
|
438
|
-
| apm |
|
|
439
|
-
| apm | data-
|
|
440
|
-
| apm |
|
|
441
|
-
| apm |
|
|
442
|
-
| apm |
|
|
443
|
-
| apm |
|
|
444
|
-
| apm |
|
|
445
|
-
| apm |
|
|
446
|
-
| application |
|
|
447
|
-
| application |
|
|
448
|
-
| application |
|
|
449
|
-
| application |
|
|
450
|
-
|
|
|
451
|
-
|
|
|
452
|
-
| business |
|
|
453
|
-
|
|
|
454
|
-
|
|
|
455
|
-
| data-model |
|
|
456
|
-
| data-model |
|
|
457
|
-
| data-model |
|
|
458
|
-
| data-model |
|
|
459
|
-
| data-model |
|
|
460
|
-
| data-
|
|
461
|
-
| data-
|
|
462
|
-
| data-store |
|
|
463
|
-
| data-store |
|
|
464
|
-
| data-store |
|
|
465
|
-
| data-store |
|
|
466
|
-
|
|
|
467
|
-
|
|
|
468
|
-
| navigation |
|
|
469
|
-
| navigation |
|
|
470
|
-
| navigation |
|
|
471
|
-
| navigation |
|
|
472
|
-
| navigation |
|
|
473
|
-
| navigation |
|
|
474
|
-
| navigation |
|
|
475
|
-
|
|
|
476
|
-
|
|
|
477
|
-
|
|
|
478
|
-
|
|
|
479
|
-
|
|
|
480
|
-
|
|
|
481
|
-
|
|
|
482
|
-
|
|
|
483
|
-
|
|
|
484
|
-
|
|
|
485
|
-
|
|
|
486
|
-
|
|
|
487
|
-
|
|
|
488
|
-
|
|
|
489
|
-
|
|
|
490
|
-
| testing |
|
|
491
|
-
| testing |
|
|
492
|
-
|
|
|
493
|
-
|
|
|
494
|
-
|
|
|
495
|
-
|
|
|
496
|
-
|
|
|
497
|
-
|
|
|
498
|
-
|
|
|
499
|
-
|
|
|
427
|
+
| Source Layer | Target Layer | Predicates |
|
|
428
|
+
| ------------ | ------------ | ---------------------------------------------------------------------- |
|
|
429
|
+
| api | application | realizes, references, serves, triggers, uses |
|
|
430
|
+
| api | motivation | satisfies, supports |
|
|
431
|
+
| api | navigation | serves |
|
|
432
|
+
| api | product | exposes |
|
|
433
|
+
| api | security | realizes, references, requires, satisfies |
|
|
434
|
+
| api | technology | depends-on |
|
|
435
|
+
| apm | api | monitors, references |
|
|
436
|
+
| apm | application | maps-to, monitors |
|
|
437
|
+
| apm | business | monitors |
|
|
438
|
+
| apm | data-model | monitors, references |
|
|
439
|
+
| apm | data-store | accesses, monitors |
|
|
440
|
+
| apm | motivation | measures-outcome, satisfies |
|
|
441
|
+
| apm | navigation | monitors, references |
|
|
442
|
+
| apm | security | monitors, references, satisfies |
|
|
443
|
+
| apm | technology | monitors, references |
|
|
444
|
+
| apm | ux | monitors, references |
|
|
445
|
+
| application | apm | references |
|
|
446
|
+
| application | business | accesses, realizes, serves, triggers |
|
|
447
|
+
| application | data-model | accesses |
|
|
448
|
+
| application | data-store | accesses |
|
|
449
|
+
| application | motivation | delivers, realizes, satisfies |
|
|
450
|
+
| application | product | realizes |
|
|
451
|
+
| application | security | accesses, constrained-by, exposes, realizes, requires |
|
|
452
|
+
| business | application | references |
|
|
453
|
+
| business | motivation | delivers, realizes, references, satisfies, supports |
|
|
454
|
+
| business | security | constrained-by |
|
|
455
|
+
| data-model | api | maps-to |
|
|
456
|
+
| data-model | application | realizes |
|
|
457
|
+
| data-model | business | realizes |
|
|
458
|
+
| data-model | data-store | maps-to |
|
|
459
|
+
| data-model | motivation | satisfies |
|
|
460
|
+
| data-model | security | references, requires, satisfies |
|
|
461
|
+
| data-model | technology | maps-to |
|
|
462
|
+
| data-store | api | maps-to, serves |
|
|
463
|
+
| data-store | application | realizes, serves, triggers |
|
|
464
|
+
| data-store | business | realizes, satisfies |
|
|
465
|
+
| data-store | motivation | satisfies |
|
|
466
|
+
| data-store | security | realizes, references, requires, satisfies |
|
|
467
|
+
| data-store | technology | depends-on |
|
|
468
|
+
| navigation | api | maps-to, references, requires, uses |
|
|
469
|
+
| navigation | application | accesses, depends-on, lazy-loads, realizes, references, triggers, uses |
|
|
470
|
+
| navigation | business | references |
|
|
471
|
+
| navigation | data-model | accesses, maps-to, references |
|
|
472
|
+
| navigation | motivation | satisfies |
|
|
473
|
+
| navigation | product | realizes |
|
|
474
|
+
| navigation | security | accesses, realizes, references, requires, satisfies |
|
|
475
|
+
| navigation | technology | depends-on |
|
|
476
|
+
| navigation | ux | maps-to, triggers, uses |
|
|
477
|
+
| product | business | realizes, references |
|
|
478
|
+
| product | motivation | delivers, references, satisfies, supports |
|
|
479
|
+
| security | business | constrains, governs, protects, references, targets |
|
|
480
|
+
| security | motivation | realizes, references, satisfies |
|
|
481
|
+
| technology | api | serves |
|
|
482
|
+
| technology | apm | serves |
|
|
483
|
+
| technology | application | realizes, serves |
|
|
484
|
+
| technology | data-store | serves |
|
|
485
|
+
| technology | motivation | realizes, satisfies |
|
|
486
|
+
| technology | navigation | serves |
|
|
487
|
+
| technology | product | realizes |
|
|
488
|
+
| technology | security | accesses, realizes, satisfies |
|
|
489
|
+
| technology | ux | serves |
|
|
490
|
+
| testing | api | covers, references, tests |
|
|
491
|
+
| testing | apm | tests |
|
|
492
|
+
| testing | application | covers, tests |
|
|
493
|
+
| testing | business | covers, tests |
|
|
494
|
+
| testing | data-model | covers, references, tests |
|
|
495
|
+
| testing | data-store | accesses, covers, tests |
|
|
496
|
+
| testing | motivation | measures-outcome, satisfies, supports |
|
|
497
|
+
| testing | navigation | covers, tests |
|
|
498
|
+
| testing | product | covers, tests |
|
|
499
|
+
| testing | security | covers, tests |
|
|
500
|
+
| testing | technology | covers, references, requires |
|
|
501
|
+
| testing | ux | covers, references, tests |
|
|
502
|
+
| ux | api | maps-to, references, triggers |
|
|
503
|
+
| ux | application | realizes, triggers |
|
|
504
|
+
| ux | business | references, serves |
|
|
505
|
+
| ux | data-model | maps-to, references |
|
|
506
|
+
| ux | motivation | satisfies, supports |
|
|
507
|
+
| ux | product | realizes |
|
|
508
|
+
| ux | security | references, requires, satisfies |
|
|
509
|
+
| ux | technology | depends-on |
|
|
500
510
|
|
|
501
511
|
> **API→Application traceability pattern**
|
|
502
512
|
>
|
|
@@ -644,7 +654,7 @@ Log the failure and continue. At the end of the pass, surface skipped pairs:
|
|
|
644
654
|
Skipped relationships (not in spec):
|
|
645
655
|
ux.view.dashboard-view →[contains]→ ux.widget.sidebar
|
|
646
656
|
Reason: ux.view.contains.ux.widget is not a defined relationship schema
|
|
647
|
-
Suggestion: Valid predicates for ux.view:
|
|
657
|
+
Suggestion: Valid predicates for ux.view: composes, applies, binds-to, uses
|
|
648
658
|
```
|
|
649
659
|
|
|
650
660
|
### Element not found
|
|
@@ -16,7 +16,19 @@ Cross-reference the Documentation Robotics model against an external code analyz
|
|
|
16
16
|
- **Graph-only**: Routes discovered in the code but missing from the model (suspected gaps) ⚠
|
|
17
17
|
- **Model-only**: Operations in the model but not discovered in the code (possible drift) ?
|
|
18
18
|
|
|
19
|
-
4.
|
|
19
|
+
4. Checks matched elements for connections the spec models but the model lacks, and looks for
|
|
20
|
+
evidence of each in the analyzer's graph and the code
|
|
21
|
+
5. Offers actionable next steps: add missing routes and connections, remove orphaned operations, or
|
|
22
|
+
ignore entries
|
|
23
|
+
|
|
24
|
+
## Important: Dual-Root Configuration
|
|
25
|
+
|
|
26
|
+
The verification process respects your project's dual-root configuration. If your codebase root (source code location) differs from your model root (metadata location), ensure:
|
|
27
|
+
|
|
28
|
+
1. **Configure in manifest**: Set `codebase_path` in `documentation-robotics/model/manifest.yaml` if needed
|
|
29
|
+
2. **Re-index if needed**: If you recently updated `codebase_path`, run `dr analyzer index --force` before verifying
|
|
30
|
+
|
|
31
|
+
See [dr-analyzer.md](dr-analyzer.md) for complete dual-root documentation.
|
|
20
32
|
|
|
21
33
|
## Usage
|
|
22
34
|
|
|
@@ -348,7 +360,38 @@ ignore:
|
|
|
348
360
|
match: "model_only"
|
|
349
361
|
```
|
|
350
362
|
|
|
351
|
-
### Step 7:
|
|
363
|
+
### Step 7: Check for Missing Connections
|
|
364
|
+
|
|
365
|
+
Matching elements is half the check. Within reason, every connection the spec models for a type is
|
|
366
|
+
expected, though not every one will exist. Look for the ones the model has not captured:
|
|
367
|
+
|
|
368
|
+
1. **Pick the elements.** The matched elements, plus the ones you added in Step 5. With a changeset
|
|
369
|
+
active, the elements it adds or changes.
|
|
370
|
+
2. **Ask the spec what each type can connect to:** `dr schema relationship <layer>.<type>` lists
|
|
371
|
+
the triples the catalog defines from that type (over MCP, `spec_type` lists both directions).
|
|
372
|
+
Incoming ones are covered when you check the element at the other end.
|
|
373
|
+
3. **Compare with the model:** `dr show <element-id>` lists the relationships the element has.
|
|
374
|
+
Every triple the spec models that the element lacks is a candidate.
|
|
375
|
+
4. **Look for evidence of each candidate, in this order:**
|
|
376
|
+
- the analyzer's graph: `dr analyzer callers <symbol>` / `dr analyzer callees <symbol>` for the
|
|
377
|
+
element's source symbol, or `dr analyzer query` for HTTP calls, imports and handlers between
|
|
378
|
+
the element's file and the other element's file
|
|
379
|
+
- the code at the element's source file and symbol
|
|
380
|
+
5. **Act on what you find.**
|
|
381
|
+
- Evidence found: offer the relationship with the evidence, for example
|
|
382
|
+
`dr relationship add <source-id> <target-id> --predicate <predicate>`. Say what the evidence is
|
|
383
|
+
("`createOrder` calls `OrderRepository.save`").
|
|
384
|
+
- No evidence: don't add it. The catalog says a connection can exist, not that it does here.
|
|
385
|
+
|
|
386
|
+
**Report the result in its own section:**
|
|
387
|
+
|
|
388
|
+
```
|
|
389
|
+
Missing connections: N candidates checked, X with evidence (offered), Y without evidence (left out).
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
List each one with evidence: the triple, the two elements, and where the evidence is.
|
|
393
|
+
|
|
394
|
+
### Step 8: Status and Next Steps
|
|
352
395
|
|
|
353
396
|
**After processing all buckets, summarize:**
|
|
354
397
|
|
|
@@ -168,6 +168,18 @@ If you select [y], the analyzer is installed and ready.
|
|
|
168
168
|
|
|
169
169
|
**What this does:** Scans your codebase and builds an indexed code graph for later verification.
|
|
170
170
|
|
|
171
|
+
**Important: If Your Codebase is in a Different Directory**
|
|
172
|
+
|
|
173
|
+
If your source code lives in a different directory than your model (common in monorepos), configure it first:
|
|
174
|
+
|
|
175
|
+
**In `documentation-robotics/model/manifest.yaml`:**
|
|
176
|
+
|
|
177
|
+
```yaml
|
|
178
|
+
codebase_path: src # Relative to the directory that contains documentation-robotics/
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Then proceed with indexing.
|
|
182
|
+
|
|
171
183
|
**Command:**
|
|
172
184
|
|
|
173
185
|
```bash
|
|
@@ -206,6 +218,8 @@ Ready for extraction with /dr-map
|
|
|
206
218
|
|
|
207
219
|
**Then proceed to Step 3** with the analyzer installed. This enables `/dr-verify` for gap and drift detection.
|
|
208
220
|
|
|
221
|
+
For complete analyzer documentation including dual-root configuration, see [dr-analyzer.md](../commands/dr-analyzer.md).
|
|
222
|
+
|
|
209
223
|
---
|
|
210
224
|
|
|
211
225
|
### Option B: Without Code Analyzer (Faster, Manual-First Approach)
|
|
@@ -9,47 +9,68 @@ description: Configure an MCP client to connect to the Documentation Robotics MC
|
|
|
9
9
|
|
|
10
10
|
Annotation tools (`annotation_list`, `annotation_get`, `annotation_create`, `annotation_update`, `annotation_delete`, `annotation_reply`) mirror the capabilities of the REST server's `/api/annotations/*` endpoints. Unlike the REST server's in-memory, per-process annotation store, the MCP tools persist annotations to `documentation-robotics/annotations/` on disk, so they survive across MCP sessions.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Tools
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
| Group | Tools |
|
|
15
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
16
|
+
| Read the model | `model_list`, `model_show`, `model_search`, `model_trace`, `model_stats`, `model_info`, `model_validate`, `model_export`, `model_reload` |
|
|
17
|
+
| Change the model | `model_add`, `model_update`, `model_delete`, `relationship_add`, `relationship_delete` |
|
|
18
|
+
| Look up the spec | `spec_type` |
|
|
19
|
+
| Changesets | `changeset_list`, `changeset_show`, `changeset_create`, `changeset_activate`, `changeset_deactivate`, `changeset_update`, `changeset_unstage`, `changeset_discard` |
|
|
20
|
+
| Pressure-test and verify | `changeset_brief`, `changeset_impact`, `changeset_verify` |
|
|
21
|
+
| Annotations | `annotation_list`, `annotation_get`, `annotation_create`, `annotation_update`, `annotation_delete`, `annotation_reply` |
|
|
22
|
+
| Review | `review_open` (a link that opens a changeset in the viewer; reuses or starts `dr visualize`) |
|
|
23
|
+
| Chat | `chat_launch`, `chat_status` |
|
|
24
|
+
|
|
25
|
+
With a changeset active, the "change the model" tools stage into it, and the read tools show the model as the changeset leaves it. Committing or applying a changeset is not a tool: the human does that in the viewer or with `dr changeset commit`. `changeset_discard` deletes staged changes for good, so it needs the changeset named explicitly (id or name) and `confirm: true`.
|
|
26
|
+
|
|
27
|
+
To plan a change with these tools, use `/dr-plan` (or the `dr_change_planning` skill). The design is in [`docs/CHANGE_MODELING.md`](../../../docs/CHANGE_MODELING.md).
|
|
28
|
+
|
|
29
|
+
## Installing in Claude Code
|
|
30
|
+
|
|
31
|
+
Install the `dr` plugin once per machine. It registers the MCP server for every project and adds `/dr-plan` and the DR skills. It needs the `dr` CLI on `PATH`:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install -g @documentation-robotics/cli
|
|
35
|
+
claude plugin marketplace add tinkermonkey/documentation_robotics
|
|
36
|
+
claude plugin install dr@documentation-robotics
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Inside a session, `/plugin marketplace add tinkermonkey/documentation_robotics` and `/plugin install dr@documentation-robotics` do the same.
|
|
40
|
+
|
|
41
|
+
The server serves the project the session has open: it asks Claude Code for its MCP roots (the folder the session started in) and moves there, so one registration covers every project. Tool calls can still pass `rootPath` to work on another project. From the plugin, the tools are named `mcp__plugin_dr_dr__<tool>`.
|
|
42
|
+
|
|
43
|
+
The plugin also ships the `dr:dr-architect` and `dr:dr-advisor` agents, with tool lists that use those names. See [Agents in the plugin](README.md#agents-in-the-plugin).
|
|
44
|
+
|
|
45
|
+
### Registering the server by hand
|
|
46
|
+
|
|
47
|
+
Without the plugin, add the server to a project's `.mcp.json` (or your user-scope MCP config). Name it `dr`, so its tools are `mcp__dr__<tool>`, which the `dr-architect` agent and DrBot expect:
|
|
15
48
|
|
|
16
49
|
```json
|
|
17
50
|
{
|
|
18
51
|
"mcpServers": {
|
|
19
|
-
"
|
|
52
|
+
"dr": {
|
|
20
53
|
"command": "dr",
|
|
21
|
-
"args": ["mcp"]
|
|
22
|
-
"env": {
|
|
23
|
-
"DR_MCP_API_KEY": "<key printed by dr mcp>"
|
|
24
|
-
}
|
|
54
|
+
"args": ["mcp"]
|
|
25
55
|
}
|
|
26
56
|
}
|
|
27
57
|
}
|
|
28
58
|
```
|
|
29
59
|
|
|
30
|
-
Other MCP clients follow the same shape: a `command`/`args` pair that launches `dr mcp
|
|
31
|
-
|
|
32
|
-
## Getting the API key
|
|
60
|
+
Other MCP clients follow the same shape: a `command`/`args` pair that launches `dr mcp`. Over stdio there is no API key: the client starts the server as your own user, and that user can already read the model files. An older config that still sets `DR_MCP_API_KEY` keeps working; the server ignores it.
|
|
33
61
|
|
|
34
|
-
|
|
62
|
+
## Environment
|
|
35
63
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```
|
|
64
|
+
| Variable | Effect |
|
|
65
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| `DR_MCP_ROOT_PATH` | Serve the model at this path instead of the client's roots or the working directory. An unusable path is reported on stderr and the server keeps its own directory. |
|
|
67
|
+
| `DR_CHANGESET_ONLY` | `true`/`1`/`yes`/`on` refuses model writes unless a staged changeset is active (an unrecognised value also turns it on, with a warning). DrBot sets it with `dr visualize --with-changesets`. |
|
|
68
|
+
| `DR_MCP_QUIET_KEY` | HTTP transport only: don't print the API key to stderr on start. |
|
|
42
69
|
|
|
43
|
-
|
|
70
|
+
## HTTP transport and the API key
|
|
44
71
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
If a key leaks or you just want a fresh one, run:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
dr mcp --regenerate-key
|
|
51
|
-
```
|
|
72
|
+
`dr mcp --transport http` serves MCP at `http://127.0.0.1:3100/mcp` for clients that connect over the network. HTTP clients authenticate with the API key as a bearer token (`Authorization: Bearer <key>`). The server generates the key on first launch (prompting for a storage path interactively, defaulting to `~/.dr-mcp-key` otherwise) and prints it to stderr on every launch.
|
|
52
73
|
|
|
53
|
-
|
|
74
|
+
To rotate the key, run `dr mcp --regenerate-key`. It overwrites the key at its existing storage path, updates `~/.dr-config.yaml` and prints the new key. Update every HTTP client afterwards.
|
|
54
75
|
|
|
55
76
|
See [cli/README.md](../../../cli/README.md#mcp-server) for the full command reference.
|