@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,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dr",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Documentation Robotics for Claude Code: the dr MCP server (it serves the project you have open), /dr-plan for planning a change as a staged changeset, the DR layer skills, and the dr-architect and dr-advisor agents. Needs the dr CLI on PATH (npm install -g @documentation-robotics/cli).",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Documentation Robotics",
|
|
7
|
+
"url": "https://github.com/tinkermonkey/documentation_robotics"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/tinkermonkey/documentation_robotics",
|
|
10
|
+
"repository": "https://github.com/tinkermonkey/documentation_robotics",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": ["architecture", "changesets", "mcp", "planning"],
|
|
13
|
+
"commands": ["./commands/dr-plan.md"],
|
|
14
|
+
"agents": [
|
|
15
|
+
"./plugin-agents/dr-architect.md",
|
|
16
|
+
"./plugin-agents/dr-advisor.md"
|
|
17
|
+
],
|
|
18
|
+
"mcpServers": {
|
|
19
|
+
"dr": {
|
|
20
|
+
"command": "dr",
|
|
21
|
+
"args": ["mcp"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dr-architect
|
|
3
3
|
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.
|
|
4
|
-
tools: Bash, Read, Edit, Write, Glob, Grep, WebSearch, WebFetch
|
|
4
|
+
tools: Bash, Read, Edit, Write, Glob, Grep, WebSearch, WebFetch, mcp__dr__model_list, mcp__dr__model_show, mcp__dr__model_search, mcp__dr__model_stats, mcp__dr__model_info, mcp__dr__model_trace, mcp__dr__model_validate, mcp__dr__model_export, mcp__dr__model_reload, mcp__dr__changeset_list, mcp__dr__changeset_show, mcp__dr__changeset_create, mcp__dr__changeset_activate, mcp__dr__changeset_deactivate, mcp__dr__changeset_impact, mcp__dr__changeset_brief, mcp__dr__changeset_verify, mcp__dr__changeset_update, mcp__dr__changeset_unstage, mcp__dr__spec_type, mcp__dr__model_add, mcp__dr__model_update, mcp__dr__model_delete, mcp__dr__relationship_add, mcp__dr__relationship_delete, mcp__dr__annotation_list, mcp__dr__annotation_get, mcp__dr__chat_status, mcp__dr__project_status
|
|
5
5
|
color: orange
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -22,11 +22,38 @@ You are the **DR Architect** — a unified expert in Documentation Robotics. You
|
|
|
22
22
|
|
|
23
23
|
## Tools
|
|
24
24
|
|
|
25
|
-
- **
|
|
25
|
+
- **dr MCP tools** (`mcp__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.
|
|
26
|
+
- **Bash**: DR CLI commands (`dr add`, `dr validate`, `dr changeset`, etc.); the fallback when the MCP tools are not available
|
|
26
27
|
- **Read/Glob/Grep**: Read source code and model files
|
|
27
28
|
- **WebSearch/WebFetch**: Research technologies and patterns
|
|
28
29
|
- **Edit/Write**: Model YAML files only (never use for model data — use CLI)
|
|
29
30
|
|
|
31
|
+
## Working through the dr MCP server
|
|
32
|
+
|
|
33
|
+
When the `mcp__dr__*` tools are available, plan a change as a staged changeset with them instead of `dr` commands:
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
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.
|
|
37
|
+
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.
|
|
38
|
+
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.
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
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.
|
|
42
|
+
|
|
43
|
+
## Running dr through Bash
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# ✅ correct: one command per call
|
|
51
|
+
dr list api --json
|
|
52
|
+
dr search order --layer api --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
❌ 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`).
|
|
56
|
+
|
|
30
57
|
## The 12-Layer Model
|
|
31
58
|
|
|
32
59
|
```
|
|
@@ -44,7 +71,7 @@ You are the **DR Architect** — a unified expert in Documentation Robotics. You
|
|
|
44
71
|
12. Testing — VERIFY (ISP coverage model — 17 entity types)
|
|
45
72
|
```
|
|
46
73
|
|
|
47
|
-
Cross-layer direction
|
|
74
|
+
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.
|
|
48
75
|
|
|
49
76
|
## Intent Routing
|
|
50
77
|
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dr-extractor
|
|
3
|
-
description: Specialized extraction agent for Documentation Robotics model creation from codebases. Analyzes source code to identify architectural elements across all 13 layers with mandatory source provenance tracking.
|
|
3
|
+
description: "Deprecated: use the codebase_extract MCP tool. Specialized extraction agent for Documentation Robotics model creation from codebases. Analyzes source code to identify architectural elements across all 13 layers with mandatory source provenance tracking."
|
|
4
4
|
tools: Bash, Read, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Documentation Robotics Extraction Agent
|
|
8
8
|
|
|
9
|
+
> **Deprecated.** The `codebase_extract` tool on the `dr` MCP server replaces this agent. It runs
|
|
10
|
+
> the extraction cascade on the indexed code (`codebase_index` first) and stages the result in an
|
|
11
|
+
> as-built changeset, never the base model: the Tier-0 rules stage what they decide, and the calling
|
|
12
|
+
> agent stages the symbols they can't place, from the cards it returns, with `model_add`. Use it
|
|
13
|
+
> instead of driving `dr add` through Bash. This agent still works but is no longer maintained.
|
|
14
|
+
|
|
9
15
|
## Identity
|
|
10
16
|
|
|
11
17
|
You are the **DR Extractor** — a code analysis specialist focused exclusively on extracting architectural elements from codebases and creating Documentation Robotics model entries. You operate entirely through the `dr add` command line interface, never creating YAML or JSON directly.
|
|
@@ -269,7 +275,7 @@ Recommendations:
|
|
|
269
275
|
1. **Use kebab-case for all element IDs**: Element names should be lowercase with hyphens, not spaces or underscores
|
|
270
276
|
2. **Create realistic, meaningful descriptions**: Each element should have a clear description of its purpose
|
|
271
277
|
3. **Every `dr add` must include source metadata**: No exceptions. The test suite enforces `source_files_exist` assertions
|
|
272
|
-
4. **Establish cross-layer references**: Use `dr relationship add` to link API operations to application services, services to business capabilities, etc.
|
|
278
|
+
4. **Establish cross-layer references**: Use `dr relationship add` to link API operations to application services, services to business capabilities, etc. Within reason, every connection the spec models for a type is expected, though not every one will exist. For each element you add, run `dr schema relationship <layer>.<type>` to see what its type can connect to, and add each connection the code shows (calls, imports, handlers, reads and writes). Leave out the ones the code gives no evidence for.
|
|
273
279
|
5. **Run validation after each batch**: Extract ~5 elements, validate immediately, fix issues before continuing
|
|
274
280
|
6. **Flag uncertain mappings**: If an element might be misclassified or its purpose unclear, flag it in the report for manual review
|
|
275
281
|
|
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Discover, install, index, and query code analyzers. Supports graph-based analysis of your codebase with dual-root awareness (metadata root may differ from source code root).
|
|
3
|
+
argument-hint: "[discover|status|index|endpoints|services|datastores|callers|callees|query|verify] [options]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Analyzer Management
|
|
7
|
+
|
|
8
|
+
Discover, install, and manage code analyzers that scan your codebase and build a code graph for verification and querying. These commands respect the configured codebase root, allowing metadata (model) and source code to reside in separate directories.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Analyzers are optional but powerful: they enable verification of your architecture model against actual code, detection of missing or drifted elements, and deep code querying. The DR CLI currently supports **Codebase Memory** (CBM), a graph-based analyzer.
|
|
13
|
+
|
|
14
|
+
## Key Concept: Dual-Root Architecture
|
|
15
|
+
|
|
16
|
+
Your Documentation Robotics project has two roots:
|
|
17
|
+
|
|
18
|
+
- **Model Root** (project root): The directory that **contains** your `documentation-robotics/` folder (manifest, changesets, layers live under `documentation-robotics/model/`)
|
|
19
|
+
- **Codebase Root**: Where your actual source code is located
|
|
20
|
+
|
|
21
|
+
These can be the **same directory** (typical case) or **different directories** (useful for monorepos, federated architectures, or farms).
|
|
22
|
+
|
|
23
|
+
### Resolution Priority
|
|
24
|
+
|
|
25
|
+
When you run analyzer commands, the codebase root is resolved in this order:
|
|
26
|
+
|
|
27
|
+
1. **`--codebase-path` CLI flag** — Global option that overrides all other resolution methods
|
|
28
|
+
2. **`manifest.codebase_path`** — Path relative to the model root, i.e. the directory that contains `documentation-robotics/`, **not** the `documentation-robotics/model/` folder the manifest sits in (configured in `documentation-robotics/model/manifest.yaml`; an absolute path also works)
|
|
29
|
+
3. **Farm auto-resolution** — If your model is inside a farm, resolved from farm configuration
|
|
30
|
+
4. **Default** — Uses the model root itself
|
|
31
|
+
|
|
32
|
+
**Example Resolution:**
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Model root: /workspace/my-app-model/ (contains documentation-robotics/model/manifest.yaml)
|
|
36
|
+
Codebase root: /workspace/my-app/ (source code lives here)
|
|
37
|
+
|
|
38
|
+
Configure in /workspace/my-app-model/documentation-robotics/model/manifest.yaml:
|
|
39
|
+
codebase_path: ../my-app
|
|
40
|
+
|
|
41
|
+
Resolved as /workspace/my-app-model/../my-app = /workspace/my-app
|
|
42
|
+
|
|
43
|
+
Monorepo variant: model root /workspace/monorepo/, code in /workspace/monorepo/services/api/
|
|
44
|
+
codebase_path: services/api
|
|
45
|
+
|
|
46
|
+
Or configure via farm (auto-detected if model is in a farm)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Important: Re-indexing After Update
|
|
50
|
+
|
|
51
|
+
If you have a pre-existing CBM project entry that was indexed under the old (incorrect) model root, you need to re-index after enabling the dual-root configuration:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# After configuring codebase_path in manifest.yaml:
|
|
55
|
+
dr analyzer index --force
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This ensures the analyzer indexes the correct codebase root.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Commands
|
|
63
|
+
|
|
64
|
+
### discover — Discover and Select Analyzer
|
|
65
|
+
|
|
66
|
+
Scan for installed analyzers and select the one to use for your project.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
dr analyzer discover [--json] [--reselect]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Options:**
|
|
73
|
+
|
|
74
|
+
- `--json` — Output discovery results as JSON (includes installed count, available analyzers, selected analyzer)
|
|
75
|
+
- `--reselect` — Force re-selection even if an analyzer is already selected
|
|
76
|
+
|
|
77
|
+
**Output:**
|
|
78
|
+
|
|
79
|
+
- Interactive mode: Prompts to select from installed analyzers
|
|
80
|
+
- JSON mode: Returns list of discovered analyzers with installation status
|
|
81
|
+
- Result: Saves selection to `.dr/analyzers/session.json` (project root)
|
|
82
|
+
|
|
83
|
+
**Examples:**
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Interactive discovery and selection
|
|
87
|
+
dr analyzer discover
|
|
88
|
+
|
|
89
|
+
# Non-interactive discovery (auto-selects first installed)
|
|
90
|
+
dr analyzer discover --json
|
|
91
|
+
|
|
92
|
+
# Force re-selection
|
|
93
|
+
dr analyzer discover --reselect
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### status — Check Analyzer Status
|
|
99
|
+
|
|
100
|
+
Report on analyzer detection and project index state.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
dr analyzer status [--name <analyzer>] [--json]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Options:**
|
|
107
|
+
|
|
108
|
+
- `--name <analyzer>` — Specific analyzer name (default: active analyzer from session)
|
|
109
|
+
- `--json` — Output status as JSON
|
|
110
|
+
|
|
111
|
+
**Status Fields:**
|
|
112
|
+
|
|
113
|
+
- `detected.installed` — Whether analyzer is installed
|
|
114
|
+
- `detected.binary_path` — Path to analyzer binary (if installed)
|
|
115
|
+
- `detected.version` — Analyzer version
|
|
116
|
+
- `detected.mcp_registered` — Whether analyzer is registered as an MCP server
|
|
117
|
+
- `detected.contract_ok` — Whether contract validation passed
|
|
118
|
+
- `indexed` — Whether project has been indexed
|
|
119
|
+
- `fresh` — Whether index is current (not stale)
|
|
120
|
+
- `last_indexed` — Timestamp of last indexing
|
|
121
|
+
|
|
122
|
+
**Important:** Status respects the dual-root configuration — it checks the codebase root for index status, not the model root.
|
|
123
|
+
|
|
124
|
+
**Examples:**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Check active analyzer
|
|
128
|
+
dr analyzer status
|
|
129
|
+
|
|
130
|
+
# Check specific analyzer
|
|
131
|
+
dr analyzer status --name cbm
|
|
132
|
+
|
|
133
|
+
# JSON output
|
|
134
|
+
dr analyzer status --json
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### index — Index Project with Analyzer
|
|
140
|
+
|
|
141
|
+
Build the code graph by scanning the codebase. Respects the configured codebase root.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
dr analyzer index [--name <analyzer>] [--force]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Options:**
|
|
148
|
+
|
|
149
|
+
- `--name <analyzer>` — Specific analyzer name (default: active analyzer from session)
|
|
150
|
+
- `--force` — Force re-indexing even if index is current
|
|
151
|
+
|
|
152
|
+
**Output:**
|
|
153
|
+
|
|
154
|
+
- Indexing progress
|
|
155
|
+
- Node count (code entities discovered)
|
|
156
|
+
- Edge count (relationships discovered)
|
|
157
|
+
- Git HEAD (commit hash of indexed code)
|
|
158
|
+
|
|
159
|
+
**Codebase Root Resolution:**
|
|
160
|
+
|
|
161
|
+
When indexing, the analyzer:
|
|
162
|
+
|
|
163
|
+
1. Locates your model root
|
|
164
|
+
2. Resolves the codebase root using the priority order (see "Dual-Root Architecture")
|
|
165
|
+
3. Scans the codebase root for code
|
|
166
|
+
4. Stores index metadata in `.dr/analyzers/` at the model root
|
|
167
|
+
|
|
168
|
+
**Important for Dual-Root Users:**
|
|
169
|
+
|
|
170
|
+
If you recently configured `manifest.codebase_path`, re-index with `--force`:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# After updating manifest.codebase_path
|
|
174
|
+
dr analyzer index --force
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Examples:**
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Index with active analyzer
|
|
181
|
+
dr analyzer index
|
|
182
|
+
|
|
183
|
+
# Force re-index
|
|
184
|
+
dr analyzer index --force
|
|
185
|
+
|
|
186
|
+
# Index with specific analyzer
|
|
187
|
+
dr analyzer index --name cbm
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### endpoints — List Discovered API Endpoints
|
|
193
|
+
|
|
194
|
+
Query the indexed code graph for discovered API endpoints.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
dr analyzer endpoints [--name <analyzer>] [--json]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Options:**
|
|
201
|
+
|
|
202
|
+
- `--name <analyzer>` — Specific analyzer name (default: active)
|
|
203
|
+
- `--json` — Output as JSON
|
|
204
|
+
|
|
205
|
+
**Output Columns:**
|
|
206
|
+
|
|
207
|
+
- Method (HTTP verb)
|
|
208
|
+
- Path (URL route)
|
|
209
|
+
- Name (suggested element name)
|
|
210
|
+
- ID Fragment (suggested element ID suffix)
|
|
211
|
+
- Symbol (source code symbol)
|
|
212
|
+
- Confidence (high/medium/low)
|
|
213
|
+
- File (source file path)
|
|
214
|
+
|
|
215
|
+
**Examples:**
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# List endpoints
|
|
219
|
+
dr analyzer endpoints
|
|
220
|
+
|
|
221
|
+
# JSON output
|
|
222
|
+
dr analyzer endpoints --json
|
|
223
|
+
|
|
224
|
+
# Specific analyzer
|
|
225
|
+
dr analyzer endpoints --name cbm
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### services — Query for Services/Components
|
|
231
|
+
|
|
232
|
+
Discover application services and components from the indexed code.
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
dr analyzer services [--name <analyzer>] [--layer <layer>] [--json]
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Options:**
|
|
239
|
+
|
|
240
|
+
- `--name <analyzer>` — Specific analyzer name (default: active)
|
|
241
|
+
- `--layer <layer>` — Filter by suggested layer (e.g., application)
|
|
242
|
+
- `--json` — Output as JSON
|
|
243
|
+
|
|
244
|
+
**Output Columns:**
|
|
245
|
+
|
|
246
|
+
- Name
|
|
247
|
+
- Layer (suggested layer)
|
|
248
|
+
- Type (suggested element type)
|
|
249
|
+
- Symbol (source code symbol)
|
|
250
|
+
- Confidence (high/medium/low)
|
|
251
|
+
- File (source file)
|
|
252
|
+
|
|
253
|
+
**Examples:**
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# List all services
|
|
257
|
+
dr analyzer services
|
|
258
|
+
|
|
259
|
+
# Filter by layer
|
|
260
|
+
dr analyzer services --layer application
|
|
261
|
+
|
|
262
|
+
# JSON output
|
|
263
|
+
dr analyzer services --json
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### datastores — Query for Databases
|
|
269
|
+
|
|
270
|
+
Discover data stores and databases inferred from code (database libraries, ORMs, migrations).
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
dr analyzer datastores [--name <analyzer>] [--json]
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Options:**
|
|
277
|
+
|
|
278
|
+
- `--name <analyzer>` — Specific analyzer name (default: active)
|
|
279
|
+
- `--json` — Output as JSON
|
|
280
|
+
|
|
281
|
+
**Output:**
|
|
282
|
+
|
|
283
|
+
For each datastore:
|
|
284
|
+
|
|
285
|
+
- Name (inferred)
|
|
286
|
+
- Source evidence (files and patterns)
|
|
287
|
+
- Notes (if available)
|
|
288
|
+
|
|
289
|
+
**Examples:**
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# List datastores
|
|
293
|
+
dr analyzer datastores
|
|
294
|
+
|
|
295
|
+
# JSON output
|
|
296
|
+
dr analyzer datastores --json
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
### callers — Trace Callers of a Symbol
|
|
302
|
+
|
|
303
|
+
Find all functions or methods that call a specific symbol.
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
dr analyzer callers <qualified-name> [--name <analyzer>] [--depth <n>] [--json]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Arguments:**
|
|
310
|
+
|
|
311
|
+
- `<qualified-name>` — Fully-qualified name of the target symbol (e.g., `com.example.Service.handleRequest`)
|
|
312
|
+
|
|
313
|
+
**Options:**
|
|
314
|
+
|
|
315
|
+
- `--name <analyzer>` — Specific analyzer name (default: active)
|
|
316
|
+
- `--depth <n>` — Maximum traversal depth (default: 3, max: 10)
|
|
317
|
+
- `--json` — Output as JSON
|
|
318
|
+
|
|
319
|
+
**Output:**
|
|
320
|
+
|
|
321
|
+
For each caller:
|
|
322
|
+
|
|
323
|
+
- Qualified name
|
|
324
|
+
- Source file
|
|
325
|
+
- Source symbol
|
|
326
|
+
- Depth (distance in call graph)
|
|
327
|
+
- Edge type (direct call, inheritance, etc.)
|
|
328
|
+
|
|
329
|
+
**Examples:**
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
# Find callers of a method
|
|
333
|
+
dr analyzer callers com.example.Service.handleRequest
|
|
334
|
+
|
|
335
|
+
# Deeper traversal
|
|
336
|
+
dr analyzer callers com.example.Service.handleRequest --depth 5
|
|
337
|
+
|
|
338
|
+
# JSON output
|
|
339
|
+
dr analyzer callers com.example.Service.handleRequest --json
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
### callees — Trace Callees of a Symbol
|
|
345
|
+
|
|
346
|
+
Find all functions or methods called by a specific symbol.
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
dr analyzer callees <qualified-name> [--name <analyzer>] [--depth <n>] [--json]
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**Arguments:**
|
|
353
|
+
|
|
354
|
+
- `<qualified-name>` — Fully-qualified name of the target symbol
|
|
355
|
+
|
|
356
|
+
**Options:**
|
|
357
|
+
|
|
358
|
+
- `--name <analyzer>` — Specific analyzer name (default: active)
|
|
359
|
+
- `--depth <n>` — Maximum traversal depth (default: 3, max: 10)
|
|
360
|
+
- `--json` — Output as JSON
|
|
361
|
+
|
|
362
|
+
**Output:**
|
|
363
|
+
|
|
364
|
+
For each callee:
|
|
365
|
+
|
|
366
|
+
- Qualified name
|
|
367
|
+
- Source file
|
|
368
|
+
- Source symbol
|
|
369
|
+
- Depth (distance in call graph)
|
|
370
|
+
- Edge type (direct call, inheritance, etc.)
|
|
371
|
+
|
|
372
|
+
**Examples:**
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
# Find methods called by a handler
|
|
376
|
+
dr analyzer callees com.example.Service.handleRequest
|
|
377
|
+
|
|
378
|
+
# Deeper traversal
|
|
379
|
+
dr analyzer callees com.example.Service.handleRequest --depth 5
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
### query — Execute Raw Graph Query
|
|
385
|
+
|
|
386
|
+
Advanced: Execute a raw query (Cypher) against the analyzer's graph. Use when standard commands don't meet your needs.
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
dr analyzer query "<cypher>" [--name <analyzer>]
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**Arguments:**
|
|
393
|
+
|
|
394
|
+
- `<cypher>` — Cypher query string (note: backend-specific, currently supports Cypher for graph analyzers)
|
|
395
|
+
|
|
396
|
+
**Options:**
|
|
397
|
+
|
|
398
|
+
- `--name <analyzer>` — Specific analyzer name (default: active)
|
|
399
|
+
|
|
400
|
+
**Output:**
|
|
401
|
+
|
|
402
|
+
Always JSON format. Query results depend on the query itself.
|
|
403
|
+
|
|
404
|
+
**Warning:**
|
|
405
|
+
|
|
406
|
+
This is an advanced escape hatch. Query syntax and result format depend on the analyzer backend. Use standard commands when possible.
|
|
407
|
+
|
|
408
|
+
**Examples:**
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
# Find all services
|
|
412
|
+
dr analyzer query "MATCH (n:Service) RETURN n.name"
|
|
413
|
+
|
|
414
|
+
# Count nodes
|
|
415
|
+
dr analyzer query "MATCH (n) RETURN count(n)"
|
|
416
|
+
|
|
417
|
+
# Find nodes with specific property
|
|
418
|
+
dr analyzer query "MATCH (n) WHERE n.name CONTAINS 'order' RETURN n"
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
### verify — Verify Model Against Code Graph
|
|
424
|
+
|
|
425
|
+
Cross-reference your model against discovered code routes. Reports matched, graph-only (suspected gaps), and model-only (possible drift) entries.
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
dr analyzer verify [--name <analyzer>] [--layer <layer>...] [--json | --format <format>] [--output <path>]
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
**Options:**
|
|
432
|
+
|
|
433
|
+
- `--name <analyzer>` — Specific analyzer name (default: active)
|
|
434
|
+
- `--layer <layer>` — Layer(s) to verify (default: api; v1 only supports api)
|
|
435
|
+
- `--json` — Output as JSON (legacy shorthand equivalent to `--format json`)
|
|
436
|
+
- `--format <format>` — Output format: text (default), json, markdown
|
|
437
|
+
- `--output <path>` — Write report to file (format inferred from extension)
|
|
438
|
+
|
|
439
|
+
**Note on `--json` and `--format`**: If both flags are provided, `--json` takes precedence and a warning is issued. Use `--format` for consistency with other tools.
|
|
440
|
+
|
|
441
|
+
**Output Buckets:**
|
|
442
|
+
|
|
443
|
+
- **Matched**: Graph routes that exist in model ✓
|
|
444
|
+
- **Graph-Only**: Code routes not in model (suspected gaps) ⚠
|
|
445
|
+
- **Model-Only**: Model operations not in code (possible drift) ?
|
|
446
|
+
|
|
447
|
+
**Report Fields:**
|
|
448
|
+
|
|
449
|
+
- Summary counts (matched, gaps, drift, ignored)
|
|
450
|
+
- Changeset context (which version verified)
|
|
451
|
+
- Detailed buckets with source information
|
|
452
|
+
|
|
453
|
+
**Examples:**
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
# Verify to console
|
|
457
|
+
dr analyzer verify
|
|
458
|
+
|
|
459
|
+
# JSON output
|
|
460
|
+
dr analyzer verify --json
|
|
461
|
+
|
|
462
|
+
# Save markdown report
|
|
463
|
+
dr analyzer verify --output verify.md
|
|
464
|
+
|
|
465
|
+
# Save JSON report
|
|
466
|
+
dr analyzer verify --output verify.json
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
For detailed verification workflow and reconciliation options, see `/dr-verify` command reference.
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Configuration
|
|
474
|
+
|
|
475
|
+
### Setting the Codebase Root
|
|
476
|
+
|
|
477
|
+
**Option 1: Via manifest.yaml** (recommended for persistent configuration)
|
|
478
|
+
|
|
479
|
+
```yaml
|
|
480
|
+
# documentation-robotics/model/manifest.yaml
|
|
481
|
+
version: 0.1.0
|
|
482
|
+
schema: documentation-robotics-v1
|
|
483
|
+
---
|
|
484
|
+
codebase_path: ../my-app # Relative to the directory that contains documentation-robotics/
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
Then re-index:
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
dr analyzer index --force
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Option 2: Via Farm Configuration** (if model is in a farm)
|
|
494
|
+
|
|
495
|
+
Farm auto-resolves the codebase root. See your farm's configuration for details.
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## Troubleshooting
|
|
500
|
+
|
|
501
|
+
### Problem: "Project not indexed"
|
|
502
|
+
|
|
503
|
+
**Solution:**
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
dr analyzer index
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Problem: "No analyzer selected"
|
|
510
|
+
|
|
511
|
+
**Solution:**
|
|
512
|
+
|
|
513
|
+
```bash
|
|
514
|
+
dr analyzer discover
|
|
515
|
+
# Then select an analyzer
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### Problem: "Analyzer not installed"
|
|
519
|
+
|
|
520
|
+
**Solution:**
|
|
521
|
+
|
|
522
|
+
1. Run `dr analyzer discover` to see installation instructions
|
|
523
|
+
2. Follow the links to install the analyzer for your platform
|
|
524
|
+
3. Run `dr analyzer index` to index your codebase
|
|
525
|
+
|
|
526
|
+
### Problem: Index is Stale
|
|
527
|
+
|
|
528
|
+
**Solution:**
|
|
529
|
+
|
|
530
|
+
```bash
|
|
531
|
+
dr analyzer index --force
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
### Problem: Dual-Root Configuration Not Recognized
|
|
535
|
+
|
|
536
|
+
After updating `manifest.codebase_path`, analyzer commands may still read from the old root. Re-index:
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
dr analyzer index --force
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
The analyzer cache must be rebuilt at the correct codebase root.
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
## Related Commands
|
|
547
|
+
|
|
548
|
+
- `/dr-verify` — Interactive verification workflow against indexed code
|
|
549
|
+
- `/dr-map` — Extract architecture model from codebase (consumes analyzer pre-briefs)
|
|
550
|
+
- `/dr-validate` — Validate model integrity
|
|
551
|
+
- `dr show <element-id>` — Inspect element details
|
|
552
|
+
- `dr add <layer> <type> <name>` — Manually add elements
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Advanced: Integration with Claude Code
|
|
557
|
+
|
|
558
|
+
When running DR commands in Claude Code, the analyzer integration enables:
|
|
559
|
+
|
|
560
|
+
1. **Pre-briefs**: `/dr-map` consumes analyzer results to accelerate extraction
|
|
561
|
+
2. **Verification**: `/dr-verify` cross-references model against code
|
|
562
|
+
3. **Querying**: Direct code graph access via `dr analyzer query`
|
|
563
|
+
4. **Codebase Memory**: Shared cache of analyzer results across commands
|
|
564
|
+
|
|
565
|
+
Dual-root awareness ensures all these operations work correctly whether metadata and source are co-located or separate.
|
|
@@ -528,7 +528,8 @@ dr changeset preview # Preview staged changes merged with model
|
|
|
528
528
|
dr changeset create "name" # Create new changeset
|
|
529
529
|
dr changeset activate <name> # Activate a changeset (auto-stages changes)
|
|
530
530
|
dr changeset deactivate # Deactivate the active changeset
|
|
531
|
-
dr changeset commit # Commit staged changes to model
|
|
531
|
+
dr changeset commit # Commit the active changeset's staged changes to model
|
|
532
|
+
dr changeset commit <name> # Commit the changeset named (need not be active)
|
|
532
533
|
dr changeset discard # Abandon all staged changes
|
|
533
534
|
|
|
534
535
|
# Export and import
|