@documentation-robotics/cli 0.1.0 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +466 -693
- package/dist/analysis/data-model-analyzer.js +189 -0
- package/dist/analysis/data-model-analyzer.js.map +7 -0
- package/dist/analysis/index.js +3 -0
- package/dist/analysis/index.js.map +7 -0
- package/dist/analysis/relationship-classifier.js +181 -0
- package/dist/analysis/relationship-classifier.js.map +7 -0
- package/dist/analyzers/base-analyzer.js +1 -0
- package/dist/analyzers/base-analyzer.js.map +7 -0
- package/dist/analyzers/call-graph-utils.js +39 -0
- package/dist/analyzers/call-graph-utils.js.map +7 -0
- package/dist/analyzers/cbm-analyzer.js +1205 -0
- package/dist/analyzers/cbm-analyzer.js.map +7 -0
- package/dist/analyzers/heuristic-utils.js +55 -0
- package/dist/analyzers/heuristic-utils.js.map +7 -0
- package/dist/analyzers/mapping-loader.js +146 -0
- package/dist/analyzers/mapping-loader.js.map +7 -0
- package/dist/analyzers/registry.js +124 -0
- package/dist/analyzers/registry.js.map +7 -0
- package/dist/analyzers/session-state.js +176 -0
- package/dist/analyzers/session-state.js.map +7 -0
- package/dist/analyzers/stdio-client.js +208 -0
- package/dist/analyzers/stdio-client.js.map +7 -0
- package/dist/analyzers/types.js +15 -0
- package/dist/analyzers/types.js.map +7 -0
- package/dist/analyzers/verify-engine.js +209 -0
- package/dist/analyzers/verify-engine.js.map +7 -0
- package/dist/analyzers/verify-ignore.js +130 -0
- package/dist/analyzers/verify-ignore.js.map +7 -0
- package/dist/analyzers/version.js +8 -0
- package/dist/analyzers/version.js.map +7 -0
- package/dist/audit/ai/runner.js +41 -0
- package/dist/audit/ai/runner.js.map +7 -0
- package/dist/audit/differential-analyzer.js +183 -0
- package/dist/audit/differential-analyzer.js.map +7 -0
- package/dist/audit/index.js +32 -0
- package/dist/audit/index.js.map +7 -0
- package/dist/audit/nodes/ai/evaluator.js +49 -0
- package/dist/audit/nodes/ai/evaluator.js.map +7 -0
- package/dist/audit/nodes/ai/parser.js +55 -0
- package/dist/audit/nodes/ai/parser.js.map +7 -0
- package/dist/audit/nodes/ai/prompts.js +103 -0
- package/dist/audit/nodes/ai/prompts.js.map +7 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js +32 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js.map +7 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js +47 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js.map +7 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js +79 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js.map +7 -0
- package/dist/audit/nodes/model/orchestrator.js +82 -0
- package/dist/audit/nodes/model/orchestrator.js.map +7 -0
- package/dist/audit/nodes/spec/loader.js +116 -0
- package/dist/audit/nodes/spec/loader.js.map +7 -0
- package/dist/audit/nodes/spec/orchestrator.js +68 -0
- package/dist/audit/nodes/spec/orchestrator.js.map +7 -0
- package/dist/audit/nodes/types.js +1 -0
- package/dist/audit/nodes/types.js.map +7 -0
- package/dist/audit/pipeline/index.js +5 -0
- package/dist/audit/pipeline/index.js.map +7 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js +218 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js.map +7 -0
- package/dist/audit/relationships/ai/evaluator.js +235 -0
- package/dist/audit/relationships/ai/evaluator.js.map +7 -0
- package/dist/audit/relationships/ai/parser.js +197 -0
- package/dist/audit/relationships/ai/parser.js.map +7 -0
- package/dist/audit/relationships/ai/prompts.js +274 -0
- package/dist/audit/relationships/ai/prompts.js.map +7 -0
- package/dist/audit/relationships/analysis/balance-assessor.js +115 -0
- package/dist/audit/relationships/analysis/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js +95 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/layer-templates.js +294 -0
- package/dist/audit/relationships/analysis/layer-templates.js.map +7 -0
- package/dist/audit/relationships/graph/connectivity.js +129 -0
- package/dist/audit/relationships/graph/connectivity.js.map +7 -0
- package/dist/audit/relationships/graph/relationship-graph.js +179 -0
- package/dist/audit/relationships/graph/relationship-graph.js.map +7 -0
- package/dist/audit/relationships/model/balance-assessor.js +49 -0
- package/dist/audit/relationships/model/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/model/coverage-analyzer.js +34 -0
- package/dist/audit/relationships/model/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/duplicate-detector.js +68 -0
- package/dist/audit/relationships/model/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/model/gap-analyzer.js +41 -0
- package/dist/audit/relationships/model/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/orchestrator.js +126 -0
- package/dist/audit/relationships/model/orchestrator.js.map +7 -0
- package/dist/audit/relationships/spec/orchestrator.js +157 -0
- package/dist/audit/relationships/spec/orchestrator.js.map +7 -0
- package/dist/audit/reports/index.js +5 -0
- package/dist/audit/reports/index.js.map +7 -0
- package/dist/audit/reports/report-generator.js +118 -0
- package/dist/audit/reports/report-generator.js.map +7 -0
- package/dist/audit/snapshot-storage.js +163 -0
- package/dist/audit/snapshot-storage.js.map +7 -0
- package/dist/audit/types.js +21 -0
- package/dist/audit/types.js.map +7 -0
- package/dist/cli.js +223 -92
- package/dist/cli.js.map +3 -3
- package/dist/coding-agents/agents/claude-code.js +147 -0
- package/dist/coding-agents/agents/claude-code.js.map +7 -0
- package/dist/coding-agents/agents/index.js +5 -0
- package/dist/coding-agents/agents/index.js.map +7 -0
- package/dist/coding-agents/agents/types.js +1 -0
- package/dist/coding-agents/agents/types.js.map +7 -0
- package/dist/coding-agents/base-chat-client.js +45 -0
- package/dist/coding-agents/base-chat-client.js.map +7 -0
- package/dist/coding-agents/chat-utils.js +23 -0
- package/dist/coding-agents/chat-utils.js.map +7 -0
- package/dist/coding-agents/claude-code-client.js +246 -0
- package/dist/coding-agents/claude-code-client.js.map +7 -0
- package/dist/coding-agents/copilot-client.js +209 -0
- package/dist/coding-agents/copilot-client.js.map +7 -0
- package/dist/commands/add.js +95 -33
- package/dist/commands/add.js.map +2 -2
- package/dist/commands/analyzer.js +511 -0
- package/dist/commands/analyzer.js.map +7 -0
- package/dist/commands/audit-diff.js +49 -0
- package/dist/commands/audit-diff.js.map +7 -0
- package/dist/commands/audit-snapshots.js +62 -0
- package/dist/commands/audit-snapshots.js.map +7 -0
- package/dist/commands/audit.js +81 -0
- package/dist/commands/audit.js.map +7 -0
- package/dist/commands/catalog.js +248 -0
- package/dist/commands/catalog.js.map +7 -0
- package/dist/commands/changeset.js +577 -66
- package/dist/commands/changeset.js.map +2 -2
- package/dist/commands/chat.js +106 -83
- package/dist/commands/chat.js.map +2 -2
- package/dist/commands/claude.js +74 -0
- package/dist/commands/claude.js.map +7 -0
- package/dist/commands/conformance.js +71 -68
- package/dist/commands/conformance.js.map +2 -2
- package/dist/commands/copilot.js +75 -0
- package/dist/commands/copilot.js.map +7 -0
- package/dist/commands/delete.js +125 -11
- package/dist/commands/delete.js.map +3 -3
- package/dist/commands/discover-logic.js +44 -0
- package/dist/commands/discover-logic.js.map +7 -0
- package/dist/commands/docs.js +87 -0
- package/dist/commands/docs.js.map +7 -0
- package/dist/commands/element.js +14 -20
- package/dist/commands/element.js.map +2 -2
- package/dist/commands/export.js +13 -3
- package/dist/commands/export.js.map +2 -2
- package/dist/commands/import.js +51 -0
- package/dist/commands/import.js.map +7 -0
- package/dist/commands/info.js +30 -24
- package/dist/commands/info.js.map +2 -2
- package/dist/commands/init.js +27 -11
- package/dist/commands/init.js.map +2 -2
- package/dist/commands/list.js +63 -13
- package/dist/commands/list.js.map +3 -3
- package/dist/commands/relationship.js +225 -37
- package/dist/commands/relationship.js.map +2 -2
- package/dist/commands/report.js +54 -0
- package/dist/commands/report.js.map +7 -0
- package/dist/commands/reports.js +45 -0
- package/dist/commands/reports.js.map +7 -0
- package/dist/commands/schema.js +135 -0
- package/dist/commands/schema.js.map +7 -0
- package/dist/commands/search.js +40 -12
- package/dist/commands/search.js.map +2 -2
- package/dist/commands/show.js +58 -27
- package/dist/commands/show.js.map +2 -2
- package/dist/commands/stats.js +35 -0
- package/dist/commands/stats.js.map +7 -0
- package/dist/commands/trace.js +39 -16
- package/dist/commands/trace.js.map +2 -2
- package/dist/commands/update.js +141 -14
- package/dist/commands/update.js.map +2 -2
- package/dist/commands/upgrade.js +210 -46
- package/dist/commands/upgrade.js.map +3 -3
- package/dist/commands/validate.js +142 -23
- package/dist/commands/validate.js.map +3 -3
- package/dist/commands/version.js +8 -12
- package/dist/commands/version.js.map +2 -2
- package/dist/commands/visualize.js +162 -25
- package/dist/commands/visualize.js.map +2 -2
- package/dist/core/base-snapshot-manager.js +84 -0
- package/dist/core/base-snapshot-manager.js.map +7 -0
- package/dist/core/changeset-exporter.js +305 -0
- package/dist/core/changeset-exporter.js.map +7 -0
- package/dist/core/changeset-validator.js +41 -0
- package/dist/core/changeset-validator.js.map +7 -0
- package/dist/core/changeset.js +88 -173
- package/dist/core/changeset.js.map +2 -2
- package/dist/core/dependency-tracker.js +4 -2
- package/dist/core/dependency-tracker.js.map +2 -2
- package/dist/core/element.js +98 -27
- package/dist/core/element.js.map +2 -2
- package/dist/core/golden-copy-cache.js +290 -0
- package/dist/core/golden-copy-cache.js.map +7 -0
- package/dist/core/graph-model.js +266 -0
- package/dist/core/graph-model.js.map +7 -0
- package/dist/core/layer.js +159 -16
- package/dist/core/layer.js.map +2 -2
- package/dist/core/layers.js +32 -0
- package/dist/core/layers.js.map +7 -0
- package/dist/core/manifest.js +32 -11
- package/dist/core/manifest.js.map +2 -2
- package/dist/core/migration-registry.js +56 -1
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model.js +424 -217
- package/dist/core/model.js.map +3 -3
- package/dist/core/mutation-handler.js +179 -0
- package/dist/core/mutation-handler.js.map +7 -0
- package/dist/core/reference-registry.js +29 -21
- package/dist/core/reference-registry.js.map +2 -2
- package/dist/core/relationship-catalog.js +189 -0
- package/dist/core/relationship-catalog.js.map +7 -0
- package/dist/core/relationship-registry.js.map +2 -2
- package/dist/core/relationships.js.map +1 -1
- package/dist/core/report-data-model.js +285 -0
- package/dist/core/report-data-model.js.map +7 -0
- package/dist/core/spec-data-service.js +185 -0
- package/dist/core/spec-data-service.js.map +7 -0
- package/dist/core/spec-loader-types.js +1 -0
- package/dist/core/spec-loader-types.js.map +7 -0
- package/dist/core/spec-loader.js +234 -0
- package/dist/core/spec-loader.js.map +7 -0
- package/dist/core/staged-changeset-storage.js +282 -0
- package/dist/core/staged-changeset-storage.js.map +7 -0
- package/dist/core/staging-area.js +1002 -0
- package/dist/core/staging-area.js.map +7 -0
- package/dist/core/stats-collector.js +169 -0
- package/dist/core/stats-collector.js.map +7 -0
- package/dist/core/virtual-projection.js +443 -0
- package/dist/core/virtual-projection.js.map +7 -0
- package/dist/export/archimate-exporter.js +99 -60
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/export/audit-formatters.js +479 -0
- package/dist/export/audit-formatters.js.map +7 -0
- package/dist/export/diff-formatters.js +99 -0
- package/dist/export/diff-formatters.js.map +7 -0
- package/dist/export/export-manager.js.map +2 -2
- package/dist/export/graphml-exporter.js +44 -27
- package/dist/export/graphml-exporter.js.map +2 -2
- package/dist/export/index.js +4 -0
- package/dist/export/index.js.map +2 -2
- package/dist/export/json-schema-exporter.js +55 -42
- package/dist/export/json-schema-exporter.js.map +2 -2
- package/dist/export/markdown-exporter.js +92 -70
- package/dist/export/markdown-exporter.js.map +2 -2
- package/dist/export/markdown-generator.js +248 -0
- package/dist/export/markdown-generator.js.map +7 -0
- package/dist/export/markdown-utils.js +30 -0
- package/dist/export/markdown-utils.js.map +7 -0
- package/dist/export/mermaid-markdown-exporter.js +37 -0
- package/dist/export/mermaid-markdown-exporter.js.map +7 -0
- package/dist/export/openapi-exporter.js +119 -71
- package/dist/export/openapi-exporter.js.map +2 -2
- package/dist/export/plantuml-exporter.js +104 -39
- package/dist/export/plantuml-exporter.js.map +2 -2
- package/dist/export/report-formatters.js +111 -0
- package/dist/export/report-formatters.js.map +7 -0
- package/dist/export/stats-formatters.js +98 -0
- package/dist/export/stats-formatters.js.map +7 -0
- package/dist/export/types.js +2 -14
- package/dist/export/types.js.map +2 -2
- package/dist/export/verify-formatters.js +153 -0
- package/dist/export/verify-formatters.js.map +7 -0
- package/dist/generated/compiled-validators.js +17 -0
- package/dist/generated/compiled-validators.js.map +7 -0
- package/dist/generated/index.js +31 -0
- package/dist/generated/index.js.map +7 -0
- package/dist/generated/layer-registry.js +190 -0
- package/dist/generated/layer-registry.js.map +7 -0
- package/dist/generated/layer-types.js +7 -0
- package/dist/generated/layer-types.js.map +7 -0
- package/dist/generated/node-types.js +1719 -0
- package/dist/generated/node-types.js.map +7 -0
- package/dist/generated/relationship-index.js +14552 -0
- package/dist/generated/relationship-index.js.map +7 -0
- package/dist/import/archimate-importer.js +166 -0
- package/dist/import/archimate-importer.js.map +7 -0
- package/dist/import/index.js +47 -0
- package/dist/import/index.js.map +7 -0
- package/dist/import/openapi-importer.js +143 -0
- package/dist/import/openapi-importer.js.map +7 -0
- package/dist/import/types.js +1 -0
- package/dist/import/types.js.map +7 -0
- package/dist/integrations/base-manager.js +311 -0
- package/dist/integrations/base-manager.js.map +7 -0
- package/dist/integrations/claude-manager.js +360 -0
- package/dist/integrations/claude-manager.js.map +7 -0
- package/dist/integrations/claude_code/agents/dr-advisor.md +253 -0
- package/dist/integrations/claude_code/agents/dr-architect.md +278 -0
- package/dist/integrations/claude_code/agents/dr-extractor.md +286 -0
- package/dist/integrations/claude_code/commands/dr-changeset.md +657 -0
- package/dist/integrations/claude_code/commands/dr-design.md +373 -0
- package/dist/integrations/claude_code/commands/dr-info.md +132 -0
- package/dist/integrations/claude_code/commands/dr-init.md +251 -0
- package/dist/integrations/claude_code/commands/dr-map.md +936 -0
- package/dist/integrations/claude_code/commands/dr-model.md +493 -0
- package/dist/integrations/claude_code/commands/dr-relate.md +814 -0
- package/dist/integrations/claude_code/commands/dr-sync.md +279 -0
- package/dist/integrations/claude_code/commands/dr-validate.md +654 -0
- package/dist/integrations/claude_code/commands/dr-verify.md +559 -0
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +903 -0
- package/dist/integrations/claude_code/docs/QUICK_START.md +271 -0
- package/dist/integrations/claude_code/docs/README.md +347 -0
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +550 -0
- package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +620 -0
- package/dist/integrations/claude_code/skills/dr_03_security_layer/SKILL.md +642 -0
- package/dist/integrations/claude_code/skills/dr_04_application_layer/SKILL.md +911 -0
- package/dist/integrations/claude_code/skills/dr_05_technology_layer/SKILL.md +836 -0
- package/dist/integrations/claude_code/skills/dr_06_api_layer/SKILL.md +933 -0
- package/dist/integrations/claude_code/skills/dr_07_data_model_layer/SKILL.md +210 -0
- package/dist/integrations/claude_code/skills/dr_08_dataset_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_09_ux_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_10_navigation_layer/SKILL.md +318 -0
- package/dist/integrations/claude_code/skills/dr_11_apm_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_12_testing_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/claude_code/skills/dr_codebase_memory/SKILL.md +590 -0
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +295 -0
- package/dist/integrations/copilot-manager.js +328 -0
- package/dist/integrations/copilot-manager.js.map +7 -0
- package/dist/integrations/github_copilot/agents/dr-advisor.md +243 -0
- package/dist/integrations/github_copilot/agents/dr-architect.md +1567 -0
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +491 -0
- package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +539 -0
- package/dist/integrations/github_copilot/skills/dr_03_security_layer/SKILL.md +667 -0
- package/dist/integrations/github_copilot/skills/dr_04_application_layer/SKILL.md +670 -0
- package/dist/integrations/github_copilot/skills/dr_05_technology_layer/SKILL.md +660 -0
- package/dist/integrations/github_copilot/skills/dr_06_api_layer/SKILL.md +855 -0
- package/dist/integrations/github_copilot/skills/dr_07_data_model_layer/SKILL.md +171 -0
- package/dist/integrations/github_copilot/skills/dr_08_dataset_layer/SKILL.md +216 -0
- package/dist/integrations/github_copilot/skills/dr_09_ux_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_10_navigation_layer/SKILL.md +228 -0
- package/dist/integrations/github_copilot/skills/dr_11_apm_layer/SKILL.md +234 -0
- package/dist/integrations/github_copilot/skills/dr_12_testing_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/hash-utils.js +51 -0
- package/dist/integrations/hash-utils.js.map +7 -0
- package/dist/integrations/types.js +16 -0
- package/dist/integrations/types.js.map +7 -0
- package/dist/reports/model-layer-report-generator.js +278 -0
- package/dist/reports/model-layer-report-generator.js.map +7 -0
- package/dist/reports/model-report-data.js +57 -0
- package/dist/reports/model-report-data.js.map +7 -0
- package/dist/reports/model-report-orchestrator.js +103 -0
- package/dist/reports/model-report-orchestrator.js.map +7 -0
- package/dist/schemas/bundled/analyzers/cbm.json +595 -0
- package/dist/schemas/bundled/analyzers/manifest.json +9 -0
- package/dist/schemas/bundled/api.json +3411 -0
- package/dist/schemas/bundled/apm.json +2371 -0
- package/dist/schemas/bundled/application.json +1253 -0
- package/dist/schemas/bundled/base.json +1622 -0
- package/dist/schemas/bundled/business.json +1279 -0
- package/dist/schemas/bundled/data-model.json +1298 -0
- package/dist/schemas/bundled/data-store.json +2025 -0
- package/dist/schemas/bundled/manifest.json +93 -0
- package/dist/schemas/bundled/motivation.json +1360 -0
- package/dist/schemas/bundled/navigation.json +1874 -0
- package/dist/schemas/bundled/security.json +3488 -0
- package/dist/schemas/bundled/technology.json +2067 -0
- package/dist/schemas/bundled/testing.json +3120 -0
- package/dist/schemas/bundled/ux.json +3592 -0
- package/dist/server/schemas.js +202 -0
- package/dist/server/schemas.js.map +7 -0
- package/dist/server/server.js +1336 -252
- package/dist/server/server.js.map +3 -3
- package/dist/server/telemetry-middleware.js +22 -15
- package/dist/server/telemetry-middleware.js.map +2 -2
- package/dist/server-entry.js +65 -0
- package/dist/server-entry.js.map +7 -0
- package/dist/telemetry/config.js +89 -0
- package/dist/telemetry/config.js.map +7 -0
- package/dist/telemetry/console-interceptor.js.map +1 -1
- package/dist/telemetry/detect.js +24 -0
- package/dist/telemetry/detect.js.map +7 -0
- package/dist/telemetry/fetch-otlp-exporter.js +112 -0
- package/dist/telemetry/fetch-otlp-exporter.js.map +7 -0
- package/dist/telemetry/index.js +153 -3
- package/dist/telemetry/index.js.map +2 -2
- package/dist/telemetry/resilient-exporter.js +22 -8
- package/dist/telemetry/resilient-exporter.js.map +2 -2
- package/dist/telemetry/resilient-log-exporter.js +17 -8
- package/dist/telemetry/resilient-log-exporter.js.map +2 -2
- package/dist/telemetry/test-instrumentation.js.map +2 -2
- package/dist/types/index.js +84 -0
- package/dist/types/index.js.map +3 -3
- package/dist/types/source-reference.js +1 -0
- package/dist/types/source-reference.js.map +7 -0
- package/dist/utils/chat-logger.js +292 -0
- package/dist/utils/chat-logger.js.map +7 -0
- package/dist/utils/claude-stream.js +8 -0
- package/dist/utils/claude-stream.js.map +7 -0
- package/dist/utils/date-utils.js +7 -0
- package/dist/utils/date-utils.js.map +7 -0
- package/dist/utils/element-utils.js.map +1 -1
- package/dist/utils/errors.js +88 -15
- package/dist/utils/errors.js.map +3 -3
- package/dist/utils/export-python-annotations.js +82 -0
- package/dist/utils/export-python-annotations.js.map +7 -0
- package/dist/utils/file-io.js +7 -2
- package/dist/utils/file-io.js.map +2 -2
- package/dist/utils/file-lock.js +156 -0
- package/dist/utils/file-lock.js.map +7 -0
- package/dist/utils/id-generator.js +18 -0
- package/dist/utils/id-generator.js.map +7 -0
- package/dist/utils/layer-name-formatter.js +16 -0
- package/dist/utils/layer-name-formatter.js.map +7 -0
- package/dist/utils/markdown-anchor.js +7 -0
- package/dist/utils/markdown-anchor.js.map +7 -0
- package/dist/utils/markdown-link.js +12 -0
- package/dist/utils/markdown-link.js.map +7 -0
- package/dist/utils/markdown-table.js +17 -0
- package/dist/utils/markdown-table.js.map +7 -0
- package/dist/utils/mermaid-utils.js +11 -0
- package/dist/utils/mermaid-utils.js.map +7 -0
- package/dist/utils/project-paths.js.map +2 -2
- package/dist/utils/source-reference.js +52 -0
- package/dist/utils/source-reference.js.map +7 -0
- package/dist/utils/spec-installer.js +40 -53
- package/dist/utils/spec-installer.js.map +2 -2
- package/dist/utils/spec-version.js +5 -1
- package/dist/utils/spec-version.js.map +2 -2
- package/dist/utils/string-utils.js +12 -0
- package/dist/utils/string-utils.js.map +7 -0
- package/dist/utils/table-formatting.js +19 -0
- package/dist/utils/table-formatting.js.map +7 -0
- package/dist/validators/index.js +4 -0
- package/dist/validators/index.js.map +2 -2
- package/dist/validators/naming-validator.js +20 -23
- package/dist/validators/naming-validator.js.map +2 -2
- package/dist/validators/reference-validator.js +23 -38
- package/dist/validators/reference-validator.js.map +2 -2
- package/dist/validators/relationship-schema-validator.js +243 -0
- package/dist/validators/relationship-schema-validator.js.map +7 -0
- package/dist/validators/schema-validator.js +168 -68
- package/dist/validators/schema-validator.js.map +2 -2
- package/dist/validators/semantic-validator.js +36 -60
- package/dist/validators/semantic-validator.js.map +2 -2
- package/dist/validators/types.js.map +2 -2
- package/dist/validators/validation-formatter.js +159 -0
- package/dist/validators/validation-formatter.js.map +7 -0
- package/dist/validators/validator.js +24 -38
- package/dist/validators/validator.js.map +2 -2
- package/dist/viewer/README.md +139 -0
- package/dist/viewer/assets/main-CY0Xufuj.css +1 -0
- package/dist/viewer/assets/main-DtgErnwF.js +81 -0
- package/dist/viewer/assets/vendor-CxKvDp2x.js +17 -0
- package/dist/viewer/favicon.svg +11 -0
- package/dist/viewer/fonts/inter/Inter-Black.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Bold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Light.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Medium.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Regular.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/viewer/index.html +15 -0
- package/dist/viewer/manifest.json +99 -0
- package/dist/viewer/version.json +1 -0
- package/package.json +42 -16
- package/PYTHON_CLI_PARITY.md +0 -265
- package/PYTHON_CLI_STRUCTURE_UPDATE.md +0 -246
- package/biome.json +0 -42
- package/bunfig.toml +0 -3
- package/dist/ai/claude-client.js +0 -71
- package/dist/ai/claude-client.js.map +0 -7
- package/dist/ai/context-provider.js +0 -129
- package/dist/ai/context-provider.js.map +0 -7
- package/dist/ai/tools.js +0 -231
- package/dist/ai/tools.js.map +0 -7
- package/dist/commands/migrate.js +0 -36
- package/dist/commands/migrate.js.map +0 -7
- package/dist/commands/project.js +0 -74
- package/dist/commands/project.js.map +0 -7
- package/dist/core/active-changeset.js +0 -52
- package/dist/core/active-changeset.js.map +0 -7
- package/dist/core/projection-engine.js +0 -288
- package/dist/core/projection-engine.js.map +0 -7
- package/dist/schemas/bundled/01-motivation-layer.schema.json +0 -942
- package/dist/schemas/bundled/02-business-layer.schema.json +0 -1293
- package/dist/schemas/bundled/03-security-layer.schema.json +0 -2177
- package/dist/schemas/bundled/04-application-layer.schema.json +0 -1328
- package/dist/schemas/bundled/05-technology-layer.schema.json +0 -1465
- package/dist/schemas/bundled/06-api-layer.schema.json +0 -1743
- package/dist/schemas/bundled/07-data-model-layer.schema.json +0 -1253
- package/dist/schemas/bundled/08-datastore-layer.schema.json +0 -892
- package/dist/schemas/bundled/09-ux-layer.schema.json +0 -1506
- package/dist/schemas/bundled/10-navigation-layer.schema.json +0 -843
- package/dist/schemas/bundled/11-apm-observability-layer.schema.json +0 -1430
- package/dist/schemas/bundled/12-testing-layer.schema.json +0 -1091
- package/dist/schemas/bundled/common/layer-extensions.schema.json +0 -266
- package/dist/schemas/bundled/common/predicates.schema.json +0 -493
- package/dist/schemas/bundled/common/relationships.schema.json +0 -791
- package/dist/schemas/bundled/common/source-references.schema.json +0 -71
- package/dist/schemas/bundled/link-registry.json +0 -1839
- package/dist/schemas/bundled/link-registry.schema.json +0 -339
- package/dist/schemas/bundled/relationship-catalog.json +0 -1302
- package/dist/schemas/bundled/relationship-type.schema.json +0 -221
- package/dist/utils/model-path.js +0 -22
- package/dist/utils/model-path.js.map +0 -7
- package/docs/TEST-INSTRUMENTATION.md +0 -405
- package/docs/telemetry.md +0 -427
- package/test-debug.js +0 -33
- package/test-special.mjs +0 -46
- package/test_runner.ts +0 -7
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use natural language to create, manage, and apply isolated changes to the architecture model using changesets
|
|
3
|
+
argument-hint: "<natural language request>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Changeset Management
|
|
7
|
+
|
|
8
|
+
Use natural language to create, manage, and apply isolated changes to the architecture model using changesets.
|
|
9
|
+
|
|
10
|
+
## What This Command Does
|
|
11
|
+
|
|
12
|
+
Interprets natural language requests for changeset operations:
|
|
13
|
+
|
|
14
|
+
- Create new changesets for isolated work
|
|
15
|
+
- Check and switch active changesets
|
|
16
|
+
- Review changeset status and changes
|
|
17
|
+
- Compare changesets
|
|
18
|
+
- Apply or abandon changesets
|
|
19
|
+
- Manage multiple changesets in parallel
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
/dr-changeset <natural language request>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Instructions for Claude Code
|
|
28
|
+
|
|
29
|
+
When the user runs this command, interpret their intent and execute the appropriate changeset operations. Always:
|
|
30
|
+
|
|
31
|
+
1. **Check Context**: Determine if a changeset is currently active
|
|
32
|
+
2. **Parse Intent**: Understand what changeset operation they want
|
|
33
|
+
3. **Propose Action**: Show what you plan to do
|
|
34
|
+
4. **Execute**: Run the appropriate `dr changeset` commands
|
|
35
|
+
5. **Confirm**: Verify the operation succeeded
|
|
36
|
+
6. **Guide Next Steps**: Suggest appropriate follow-up actions
|
|
37
|
+
|
|
38
|
+
### Critical Decision Points
|
|
39
|
+
|
|
40
|
+
#### When to Create a Changeset
|
|
41
|
+
|
|
42
|
+
**CREATE a changeset when:**
|
|
43
|
+
|
|
44
|
+
- User explicitly asks to create one
|
|
45
|
+
- User wants to explore or experiment ("what if...", "let's try...", "prototype...")
|
|
46
|
+
- Building a new feature that spans multiple elements
|
|
47
|
+
- Making speculative changes they might want to undo
|
|
48
|
+
- Working on alternatives to compare
|
|
49
|
+
|
|
50
|
+
**DON'T create a changeset when:**
|
|
51
|
+
|
|
52
|
+
- Making simple, final changes to existing elements
|
|
53
|
+
- User explicitly says "make this permanent" or "update the main model"
|
|
54
|
+
- Fixing obvious typos or errors
|
|
55
|
+
- Making requested corrections to recent changes
|
|
56
|
+
|
|
57
|
+
#### When to Check for Active Changeset
|
|
58
|
+
|
|
59
|
+
**ALWAYS check at the start of any modeling session** to inform the user:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Check if changeset is active
|
|
63
|
+
dr changeset status # Show active changeset
|
|
64
|
+
|
|
65
|
+
# Or list all changesets to see which is in use
|
|
66
|
+
dr changeset list
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Inform the user:**
|
|
70
|
+
|
|
71
|
+
- "You're currently working in changeset: [name]"
|
|
72
|
+
- "All changes will be tracked in this changeset"
|
|
73
|
+
- "Use /dr-changeset apply to merge to main model"
|
|
74
|
+
|
|
75
|
+
#### When to Switch Changesets
|
|
76
|
+
|
|
77
|
+
**SWITCH changesets when:**
|
|
78
|
+
|
|
79
|
+
- User asks to work on a different feature
|
|
80
|
+
- User wants to compare with another changeset
|
|
81
|
+
- User explicitly requests to switch
|
|
82
|
+
- Returning to previously abandoned work
|
|
83
|
+
|
|
84
|
+
**DON'T automatically switch when:**
|
|
85
|
+
|
|
86
|
+
- User has uncommitted thoughts in current changeset
|
|
87
|
+
- Current changeset has unreviewed changes
|
|
88
|
+
|
|
89
|
+
#### When to Apply/Merge Changeset
|
|
90
|
+
|
|
91
|
+
**APPLY changeset when:**
|
|
92
|
+
|
|
93
|
+
- User explicitly says "apply", "merge", "commit", "make it permanent"
|
|
94
|
+
- Feature is complete and user confirms
|
|
95
|
+
- Changes have been reviewed and validated
|
|
96
|
+
|
|
97
|
+
**ALWAYS before applying:**
|
|
98
|
+
|
|
99
|
+
1. Show preview: `dr changeset preview`
|
|
100
|
+
2. Run validation: `dr validate`
|
|
101
|
+
3. Get explicit confirmation
|
|
102
|
+
4. Commit staged changes: `dr changeset commit`
|
|
103
|
+
|
|
104
|
+
### Supported Operations
|
|
105
|
+
|
|
106
|
+
#### 1. Create New Changeset
|
|
107
|
+
|
|
108
|
+
**User intent patterns:**
|
|
109
|
+
|
|
110
|
+
- "Start a new changeset for [feature]"
|
|
111
|
+
- "Create changeset called [name]"
|
|
112
|
+
- "I want to explore [idea]"
|
|
113
|
+
- "Let's prototype [feature]"
|
|
114
|
+
|
|
115
|
+
**Your process:**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# 1. Check for existing changesets
|
|
119
|
+
EXISTING=$(dr changeset list)
|
|
120
|
+
|
|
121
|
+
# 2. If changesets exist, inform user and ask
|
|
122
|
+
if [ -n "$EXISTING" ]; then
|
|
123
|
+
echo "Found existing staged changesets:"
|
|
124
|
+
echo "$EXISTING"
|
|
125
|
+
echo "Options:"
|
|
126
|
+
echo "1. Continue in current work"
|
|
127
|
+
echo "2. Create new changeset for different work"
|
|
128
|
+
# Get user choice
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
# 3. Create changeset
|
|
132
|
+
dr changeset create "feature-name"
|
|
133
|
+
# Add optional description
|
|
134
|
+
dr changeset create "feature-name" --description "Detailed description"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Example:**
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
User: /dr-changeset Start working on a new authentication system
|
|
141
|
+
|
|
142
|
+
You should:
|
|
143
|
+
1. Check for active changeset
|
|
144
|
+
2. Inform: "I'll create a new changeset for the authentication system work"
|
|
145
|
+
3. Execute:
|
|
146
|
+
dr changeset create "auth-system" \
|
|
147
|
+
--description "New authentication and authorization system"
|
|
148
|
+
4. Confirm:
|
|
149
|
+
"✓ Created changeset: feature-auth-system-2024-01-15-001
|
|
150
|
+
All your changes will be tracked here.
|
|
151
|
+
When ready to merge: /dr-changeset apply"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### 2. Check Status and Active Changeset
|
|
155
|
+
|
|
156
|
+
**User intent patterns:**
|
|
157
|
+
|
|
158
|
+
- "What changeset am I in?"
|
|
159
|
+
- "Show me what changed"
|
|
160
|
+
- "Review current changes"
|
|
161
|
+
- "What's the status?"
|
|
162
|
+
|
|
163
|
+
**Your process:**
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# 1. List all changesets
|
|
167
|
+
dr changeset list
|
|
168
|
+
|
|
169
|
+
# 2. Show active changeset status
|
|
170
|
+
dr changeset status
|
|
171
|
+
|
|
172
|
+
# 3. Preview staged changes merged with model
|
|
173
|
+
dr changeset preview
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Example:**
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
User: /dr-changeset What changes have I made?
|
|
180
|
+
|
|
181
|
+
You should:
|
|
182
|
+
1. Check active changeset
|
|
183
|
+
2. Show detailed status:
|
|
184
|
+
dr changeset status
|
|
185
|
+
3. Display output clearly:
|
|
186
|
+
"Current changeset: feature-auth-system-2024-01-15-001
|
|
187
|
+
|
|
188
|
+
Changes:
|
|
189
|
+
✓ Added: security.role.admin (5 min ago)
|
|
190
|
+
✓ Added: security.role.user (5 min ago)
|
|
191
|
+
✓ Updated: application.service.auth (2 min ago)
|
|
192
|
+
|
|
193
|
+
Summary:
|
|
194
|
+
- 2 elements added
|
|
195
|
+
- 1 element updated
|
|
196
|
+
- 0 elements deleted
|
|
197
|
+
- Affected layers: security, application"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### 3. Compare Changesets or With Main
|
|
201
|
+
|
|
202
|
+
**User intent patterns:**
|
|
203
|
+
|
|
204
|
+
- "Compare with main model"
|
|
205
|
+
- "Show differences"
|
|
206
|
+
- "Compare [changeset-a] with [changeset-b]"
|
|
207
|
+
- "What's different from main?"
|
|
208
|
+
|
|
209
|
+
**Your process:**
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Compare current changeset with main
|
|
213
|
+
dr changeset diff
|
|
214
|
+
|
|
215
|
+
# Diff for a specific layer only
|
|
216
|
+
dr changeset diff --layer <layer-name>
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Example:**
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
User: /dr-changeset Show me what's different from the main model
|
|
223
|
+
|
|
224
|
+
You should:
|
|
225
|
+
1. Run diff:
|
|
226
|
+
dr changeset diff
|
|
227
|
+
2. Format output clearly:
|
|
228
|
+
"Comparing changeset 'auth-system' with main model:
|
|
229
|
+
|
|
230
|
+
Only in changeset (new):
|
|
231
|
+
✓ security.role.admin
|
|
232
|
+
✓ security.role.user
|
|
233
|
+
✓ security.policy.auth-required
|
|
234
|
+
|
|
235
|
+
Modified in changeset:
|
|
236
|
+
✓ application.service.auth
|
|
237
|
+
- Added property: securedBy
|
|
238
|
+
- Updated property: status -> 'in-development'
|
|
239
|
+
|
|
240
|
+
Conflicts: None ✓"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
#### 4. Switch Between Changesets
|
|
244
|
+
|
|
245
|
+
**User intent patterns:**
|
|
246
|
+
|
|
247
|
+
- "Switch to [changeset]"
|
|
248
|
+
- "Work on [other-feature] instead"
|
|
249
|
+
- "Go back to main model"
|
|
250
|
+
- "List my changesets"
|
|
251
|
+
|
|
252
|
+
**Your process:**
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# 1. List available changesets
|
|
256
|
+
dr changeset list
|
|
257
|
+
|
|
258
|
+
# 2. Deactivate current changeset, then activate the target
|
|
259
|
+
dr changeset deactivate
|
|
260
|
+
dr changeset activate <changeset-id>
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Example:**
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
User: /dr-changeset Switch to my payment feature work
|
|
267
|
+
|
|
268
|
+
You should:
|
|
269
|
+
1. List changesets:
|
|
270
|
+
dr changeset list
|
|
271
|
+
2. Find matching changeset (fuzzy match on name)
|
|
272
|
+
3. Activate:
|
|
273
|
+
dr changeset activate feature-payment-feature-2024-01-10-002
|
|
274
|
+
4. Confirm:
|
|
275
|
+
"✓ Switched to: feature-payment-feature
|
|
276
|
+
|
|
277
|
+
This changeset has:
|
|
278
|
+
- 5 elements added
|
|
279
|
+
- 2 elements updated
|
|
280
|
+
- Last modified: 3 days ago"
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
#### 5. Apply Changeset to Main Model
|
|
284
|
+
|
|
285
|
+
**User intent patterns:**
|
|
286
|
+
|
|
287
|
+
- "Apply these changes"
|
|
288
|
+
- "Merge to main"
|
|
289
|
+
- "Make it permanent"
|
|
290
|
+
- "Commit the changeset"
|
|
291
|
+
|
|
292
|
+
**Your process:**
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# 1. Show preview FIRST
|
|
296
|
+
echo "Preview of staged changes:"
|
|
297
|
+
dr changeset preview
|
|
298
|
+
|
|
299
|
+
# 2. Validate
|
|
300
|
+
echo "\nRunning validation..."
|
|
301
|
+
dr validate
|
|
302
|
+
|
|
303
|
+
# 3. Commit staged changes to model — do NOT ask for confirmation before this step.
|
|
304
|
+
# The preview and validate already provide the review gate.
|
|
305
|
+
dr changeset commit
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
> **Headless / autonomous mode:** Never prompt the user for "yes/no" confirmation
|
|
309
|
+
> before `dr changeset commit`. This command is non-interactive and must complete
|
|
310
|
+
> without waiting for input.
|
|
311
|
+
|
|
312
|
+
**Example:**
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
User: /dr-changeset Apply these changes to the main model
|
|
316
|
+
|
|
317
|
+
You should:
|
|
318
|
+
1. Show current status:
|
|
319
|
+
dr changeset status
|
|
320
|
+
2. Preview:
|
|
321
|
+
"Preview of changes to apply:
|
|
322
|
+
|
|
323
|
+
Will add:
|
|
324
|
+
- security.role.admin
|
|
325
|
+
- security.role.user
|
|
326
|
+
|
|
327
|
+
Will update:
|
|
328
|
+
- application.service.auth
|
|
329
|
+
|
|
330
|
+
3 total changes"
|
|
331
|
+
|
|
332
|
+
3. Validate:
|
|
333
|
+
dr validate
|
|
334
|
+
"✓ All changes pass validation"
|
|
335
|
+
|
|
336
|
+
4. Commit:
|
|
337
|
+
dr changeset commit
|
|
338
|
+
|
|
339
|
+
5. Confirm success:
|
|
340
|
+
"✓ Applied 3 changes to main model
|
|
341
|
+
✓ Changeset marked as 'applied'
|
|
342
|
+
✓ Now working in main model
|
|
343
|
+
|
|
344
|
+
Your changes are now permanent in the architecture."
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
#### 6. Abandon or Delete Changeset
|
|
348
|
+
|
|
349
|
+
**User intent patterns:**
|
|
350
|
+
|
|
351
|
+
- "Discard these changes"
|
|
352
|
+
- "Abandon this work"
|
|
353
|
+
- "Delete the changeset"
|
|
354
|
+
- "I don't want these changes"
|
|
355
|
+
- "Clean up old changesets"
|
|
356
|
+
- "Remove applied changesets"
|
|
357
|
+
|
|
358
|
+
**Understanding the difference:**
|
|
359
|
+
|
|
360
|
+
- **Apply**: Merges changes to main model, marks changeset as 'applied', keeps file
|
|
361
|
+
- **Revert**: Reverses applied changes, marks changeset as 'reverted', keeps file
|
|
362
|
+
- **Delete**: Permanently removes the changeset file (cannot be undone)
|
|
363
|
+
|
|
364
|
+
**When to DELETE vs REVERT:**
|
|
365
|
+
|
|
366
|
+
**DELETE changeset when:**
|
|
367
|
+
|
|
368
|
+
- It's already been applied and you want to clean up
|
|
369
|
+
- It's been reverted and no longer needed
|
|
370
|
+
- It was experimental work that's obsolete
|
|
371
|
+
- You want to permanently remove it to reduce clutter
|
|
372
|
+
- User explicitly says "delete", "remove", "clean up"
|
|
373
|
+
|
|
374
|
+
**DON'T delete when:**
|
|
375
|
+
|
|
376
|
+
- Changeset is currently active (deactivate first)
|
|
377
|
+
- You want to keep history for auditing
|
|
378
|
+
- Changes might be needed again
|
|
379
|
+
- User just wants to discard changes (use revert)
|
|
380
|
+
|
|
381
|
+
**Your process:**
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
# 1. List all changesets to see their status
|
|
385
|
+
dr changeset list
|
|
386
|
+
|
|
387
|
+
# 2. Show staged changes before deletion
|
|
388
|
+
dr changeset staged
|
|
389
|
+
|
|
390
|
+
# 3. Confirm deletion
|
|
391
|
+
echo "This will PERMANENTLY delete the changeset."
|
|
392
|
+
echo "This cannot be undone."
|
|
393
|
+
read -p "Type 'delete' to confirm: "
|
|
394
|
+
|
|
395
|
+
# 4. Delete
|
|
396
|
+
dr changeset delete changeset-id
|
|
397
|
+
|
|
398
|
+
# Or with --force to skip confirmation
|
|
399
|
+
dr changeset delete changeset-id --force
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
**Example - Discard changes:**
|
|
403
|
+
|
|
404
|
+
```
|
|
405
|
+
User: /dr-changeset I don't want these changes, discard them
|
|
406
|
+
|
|
407
|
+
You should:
|
|
408
|
+
1. Show what will be discarded:
|
|
409
|
+
"Current changeset 'auth-system' has:
|
|
410
|
+
- 2 elements added
|
|
411
|
+
- 1 element updated
|
|
412
|
+
|
|
413
|
+
These changes will be REVERTED (changeset file kept)"
|
|
414
|
+
|
|
415
|
+
2. Confirm:
|
|
416
|
+
"Are you sure? Type 'revert' to confirm: "
|
|
417
|
+
|
|
418
|
+
3. Revert:
|
|
419
|
+
dr changeset revert auth-system
|
|
420
|
+
|
|
421
|
+
4. Confirm:
|
|
422
|
+
"✓ Changeset reverted
|
|
423
|
+
✓ Changes discarded
|
|
424
|
+
✓ Changeset marked as 'reverted'
|
|
425
|
+
✓ Now working in main model
|
|
426
|
+
|
|
427
|
+
To permanently delete: dr changeset delete auth-system"
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Example - Clean up old changesets:**
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
User: /dr-changeset Clean up my old applied changesets
|
|
434
|
+
|
|
435
|
+
You should:
|
|
436
|
+
1. List applied/reverted changesets:
|
|
437
|
+
dr changeset list | grep -E "APPLIED|REVERTED"
|
|
438
|
+
|
|
439
|
+
2. Show what you found:
|
|
440
|
+
"Found 3 old changesets:
|
|
441
|
+
- feature-auth (applied 2 weeks ago)
|
|
442
|
+
- bugfix-payment (applied 1 week ago)
|
|
443
|
+
- experimental-cache (reverted 3 days ago)
|
|
444
|
+
|
|
445
|
+
These can be safely deleted."
|
|
446
|
+
|
|
447
|
+
3. Confirm:
|
|
448
|
+
"Delete all 3 changesets? Type 'yes' to confirm: "
|
|
449
|
+
|
|
450
|
+
4. Delete each:
|
|
451
|
+
dr changeset delete feature-auth --force
|
|
452
|
+
dr changeset delete bugfix-payment --force
|
|
453
|
+
dr changeset delete experimental-cache --force
|
|
454
|
+
|
|
455
|
+
5. Confirm:
|
|
456
|
+
"✓ Deleted 3 changesets
|
|
457
|
+
✓ Freed up disk space
|
|
458
|
+
✓ Model history preserved in manifest"
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Integration with Other Commands
|
|
462
|
+
|
|
463
|
+
When users are working with changesets, all modeling commands automatically work in the changeset context:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
# These automatically work in active changeset:
|
|
467
|
+
dr add business service "New Service"
|
|
468
|
+
dr update business.service.existing --attributes '{"status":"updated"}'
|
|
469
|
+
dr delete business.service.old --force
|
|
470
|
+
|
|
471
|
+
# No special syntax needed - changeset is transparent
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
**Guide users:**
|
|
475
|
+
|
|
476
|
+
- "You're in changeset [name], so all changes are tracked"
|
|
477
|
+
- "Use /dr-model normally - changes stay in this changeset"
|
|
478
|
+
- "When ready: /dr-changeset apply"
|
|
479
|
+
|
|
480
|
+
### Error Handling
|
|
481
|
+
|
|
482
|
+
**Common issues:**
|
|
483
|
+
|
|
484
|
+
1. **No active changeset when trying to apply:**
|
|
485
|
+
|
|
486
|
+
```
|
|
487
|
+
Error: No active changeset
|
|
488
|
+
→ List changesets: dr changeset list
|
|
489
|
+
→ Create one: dr changeset create "name"
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
2. **Trying to apply non-existent changeset:**
|
|
493
|
+
|
|
494
|
+
```
|
|
495
|
+
Error: Changeset not found
|
|
496
|
+
→ List available: dr changeset list
|
|
497
|
+
→ Check spelling of changeset ID
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
3. **Conflicts when applying:**
|
|
501
|
+
|
|
502
|
+
```
|
|
503
|
+
Warning: Main model has changed since changeset created
|
|
504
|
+
→ Review conflicts: dr changeset diff
|
|
505
|
+
→ Resolve manually or abandon
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### Best Practices
|
|
509
|
+
|
|
510
|
+
1. **Always check for active changeset** at session start
|
|
511
|
+
2. **Create descriptive names:** "feature-auth-system" not "test1"
|
|
512
|
+
3. **Review before committing:** Run `dr changeset preview`
|
|
513
|
+
4. **Validate before applying:** Run `dr validate`
|
|
514
|
+
5. **Keep focused:** One feature per changeset
|
|
515
|
+
6. **Clean up:** Delete or abandon when done
|
|
516
|
+
7. **Communicate status:** Tell user what changeset they're in
|
|
517
|
+
|
|
518
|
+
### Quick Reference
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
# Status and viewing
|
|
522
|
+
dr changeset list # List all changesets
|
|
523
|
+
dr changeset status # Show active changeset
|
|
524
|
+
dr changeset staged # List staged changes in active changeset
|
|
525
|
+
dr changeset preview # Preview staged changes merged with model
|
|
526
|
+
|
|
527
|
+
# Lifecycle
|
|
528
|
+
dr changeset create "name" # Create new changeset
|
|
529
|
+
dr changeset activate <name> # Activate a changeset (auto-stages changes)
|
|
530
|
+
dr changeset deactivate # Deactivate the active changeset
|
|
531
|
+
dr changeset commit # Commit staged changes to model
|
|
532
|
+
dr changeset discard # Abandon all staged changes
|
|
533
|
+
|
|
534
|
+
# Export and import
|
|
535
|
+
dr changeset export <id> # Export changeset to portable file
|
|
536
|
+
dr changeset import <file> # Import changeset from file
|
|
537
|
+
|
|
538
|
+
# Cleanup (DESTRUCTIVE)
|
|
539
|
+
dr changeset delete <id> # Permanent deletion (with prompt)
|
|
540
|
+
dr changeset delete <id> --force # Delete without confirmation
|
|
541
|
+
|
|
542
|
+
# When to delete:
|
|
543
|
+
# - After changeset is committed and verified
|
|
544
|
+
# - After changeset is discarded (no longer needed)
|
|
545
|
+
# - To clean up experimental/abandoned work
|
|
546
|
+
# - Storage location: documentation-robotics/changesets/{id}/
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
### Changeset Naming Rules
|
|
550
|
+
|
|
551
|
+
Changeset names are automatically sanitized:
|
|
552
|
+
|
|
553
|
+
- Converted to lowercase
|
|
554
|
+
- Spaces and special characters replaced with hyphens
|
|
555
|
+
- Only alphanumeric characters and hyphens are kept
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
dr changeset create "Design Payment Webhooks"
|
|
559
|
+
# → stored as: design-payment-webhooks
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
**Best practice**: Use a descriptive, feature-scoped name:
|
|
563
|
+
|
|
564
|
+
- ✅ `feature-webhook-subscriptions`
|
|
565
|
+
- ✅ `design-payment-webhooks`
|
|
566
|
+
- ✅ `add-oauth2-authentication`
|
|
567
|
+
- ❌ `test1`, `wip`, `changes`
|
|
568
|
+
|
|
569
|
+
**Uniqueness**: Changeset names must be unique. Creating a changeset with a name that already exists will fail. Run `dr changeset list` first to check.
|
|
570
|
+
|
|
571
|
+
### Full Changeset Lifecycle
|
|
572
|
+
|
|
573
|
+
The complete workflow from creation to cleanup:
|
|
574
|
+
|
|
575
|
+
```bash
|
|
576
|
+
# 1. Create and activate
|
|
577
|
+
dr changeset create "feature-name"
|
|
578
|
+
|
|
579
|
+
# 2. Verify active changeset (ALWAYS check before modeling)
|
|
580
|
+
dr changeset status
|
|
581
|
+
|
|
582
|
+
# 3. Add elements — all dr add/update/delete commands auto-stage in the active changeset
|
|
583
|
+
dr add api endpoint --name "New Endpoint" ...
|
|
584
|
+
dr update api.endpoint.existing --name "Updated Endpoint"
|
|
585
|
+
dr delete api.endpoint.old --force
|
|
586
|
+
|
|
587
|
+
# 4. Review what was staged
|
|
588
|
+
dr changeset staged # List staged changes
|
|
589
|
+
dr changeset diff # See diff vs main model
|
|
590
|
+
dr changeset preview # Preview merged model
|
|
591
|
+
|
|
592
|
+
# 5. Validate (validates staged changes merged with model)
|
|
593
|
+
dr validate
|
|
594
|
+
|
|
595
|
+
# 6. Commit — applies staged changes to the main model
|
|
596
|
+
dr changeset commit
|
|
597
|
+
|
|
598
|
+
# 7. Verify committed
|
|
599
|
+
dr changeset list # Shows status: COMMITTED
|
|
600
|
+
|
|
601
|
+
# 8. Clean up (optional)
|
|
602
|
+
dr changeset delete feature-name --force
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
### Critical: Check for Active Changeset Before Modeling
|
|
606
|
+
|
|
607
|
+
**Always check at session start.** If no changeset is active, `dr add`/`dr update`/`dr delete` operate directly on the main model, bypassing the changeset workflow.
|
|
608
|
+
|
|
609
|
+
```bash
|
|
610
|
+
dr changeset status
|
|
611
|
+
# → "Active changeset: feature-payment-webhooks" (changes are tracked)
|
|
612
|
+
# → "No active changeset" (changes go directly to main model!)
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
### Empty Changeset Warning
|
|
616
|
+
|
|
617
|
+
`dr changeset commit` silently succeeds with no changes if the changeset has zero staged elements:
|
|
618
|
+
|
|
619
|
+
```
|
|
620
|
+
No staged changes to commit
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
Always verify there are staged changes before committing:
|
|
624
|
+
|
|
625
|
+
```bash
|
|
626
|
+
dr changeset staged # Check this shows > 0 changes
|
|
627
|
+
dr changeset commit # Then commit
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
### Drift Detection and --force
|
|
631
|
+
|
|
632
|
+
If the base model has been modified after the changeset was created, commit will warn about drift:
|
|
633
|
+
|
|
634
|
+
```
|
|
635
|
+
Warning: Base model has drifted since changeset creation
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
To commit despite drift (use with caution — review `dr changeset diff` first):
|
|
639
|
+
|
|
640
|
+
```bash
|
|
641
|
+
dr changeset commit --force
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
### Post-Commit State
|
|
645
|
+
|
|
646
|
+
After a successful `dr changeset commit`:
|
|
647
|
+
|
|
648
|
+
- Changeset status changes to `COMMITTED`
|
|
649
|
+
- Changeset is automatically deactivated (no longer active)
|
|
650
|
+
- The changeset file is preserved for history (not deleted)
|
|
651
|
+
- Committing the same changeset again is a safe no-op ("No staged changes to commit")
|
|
652
|
+
|
|
653
|
+
Verify success:
|
|
654
|
+
|
|
655
|
+
```bash
|
|
656
|
+
dr changeset list # Should show: feature-name COMMITTED
|
|
657
|
+
```
|