@documentation-robotics/cli 0.1.0 → 0.1.5
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 +206 -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 +155 -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 +37 -13
- 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,319 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_09_UX
|
|
3
|
+
description: Expert knowledge for UX Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"UX",
|
|
7
|
+
"user interface",
|
|
8
|
+
"UI",
|
|
9
|
+
"view",
|
|
10
|
+
"component",
|
|
11
|
+
"screen",
|
|
12
|
+
"form",
|
|
13
|
+
"user experience",
|
|
14
|
+
"state machine"
|
|
15
|
+
]
|
|
16
|
+
version: 0.8.3
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# UX Layer Skill
|
|
20
|
+
|
|
21
|
+
**Layer Number:** 09
|
|
22
|
+
**Specification:** Metadata Model Spec v0.8.3
|
|
23
|
+
**Purpose:** Defines user experience using Three-Tier Architecture, specifying views, components, state machines, and interactions.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Layer Overview
|
|
28
|
+
|
|
29
|
+
The UX Layer captures **user experience design**:
|
|
30
|
+
|
|
31
|
+
- **VIEWS** - Screens/pages, modals, dialogs, drawers, and panels
|
|
32
|
+
- **COMPONENTS** - UI components (forms, tables, charts, cards)
|
|
33
|
+
- **STATE MACHINES** - Experience states and transitions
|
|
34
|
+
- **ACTIONS** - Interactive elements (buttons, links, voice commands)
|
|
35
|
+
- **LAYOUTS** - Layout configurations (grid, flex, etc.)
|
|
36
|
+
|
|
37
|
+
This layer uses **Three-Tier Architecture** (v0.5.0+):
|
|
38
|
+
|
|
39
|
+
1. **Library Tier** - Reusable design system components
|
|
40
|
+
2. **Application Tier** - Application-wide configuration
|
|
41
|
+
3. **Experience Tier** - Experience-specific views and flows
|
|
42
|
+
|
|
43
|
+
**Central Entity:** The **View** (page, modal, dialog, drawer, or panel) is the core modeling unit.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## When to Use This Skill
|
|
48
|
+
|
|
49
|
+
Activate when the user:
|
|
50
|
+
|
|
51
|
+
- Mentions "UX", "UI", "view", "screen", "component", "form"
|
|
52
|
+
- Wants to define user interfaces or user experiences
|
|
53
|
+
- Asks about state machines, transitions, or user flows
|
|
54
|
+
- Needs to model screens, forms, or interactive elements
|
|
55
|
+
- Wants to link UX to navigation, APIs, or business processes
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Entity Types
|
|
60
|
+
|
|
61
|
+
> **CLI Introspection:** Run `dr schema types ux` for the authoritative, always-current list of node types.
|
|
62
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
63
|
+
|
|
64
|
+
### Three-Tier Architecture (22 entities)
|
|
65
|
+
|
|
66
|
+
**Library Tier:**
|
|
67
|
+
|
|
68
|
+
- **UXLibrary** - Container for library components
|
|
69
|
+
- **LibraryComponent** - Reusable component (form-field, table, chart, card)
|
|
70
|
+
- **LibrarySubView** - Reusable component groupings
|
|
71
|
+
- **StatePattern** - Reusable state machine patterns
|
|
72
|
+
- **ActionPattern** - Reusable action definitions
|
|
73
|
+
- **StateActionTemplate** - Reusable template for state lifecycle actions (required: `action`)
|
|
74
|
+
- **TransitionTemplate** - Reusable template for state transitions (required: `to`, `trigger`)
|
|
75
|
+
- **TableColumn** - Column definition for table components (required: `header`, `field`)
|
|
76
|
+
- **ChartSeries** - Data series configuration for chart components (required: `label`, `dataField`)
|
|
77
|
+
|
|
78
|
+
**Application Tier:**
|
|
79
|
+
|
|
80
|
+
- **UXApplication** - Application-wide UX configuration
|
|
81
|
+
|
|
82
|
+
**Experience Tier:**
|
|
83
|
+
|
|
84
|
+
- **UXSpec** - Container for experience specification
|
|
85
|
+
- **View** - Screen/page/modal/dialog/drawer/panel (required: `type`)
|
|
86
|
+
- **SubView** - Component grouping within view
|
|
87
|
+
- **ComponentInstance** - Instance of library component
|
|
88
|
+
- **ComponentReference** - Reference to a library component by ID (required: `ref`)
|
|
89
|
+
- **ActionComponent** - Interactive element (button, link, voice command)
|
|
90
|
+
- **ExperienceState** - State in state machine
|
|
91
|
+
- **StateAction** - Action during state lifecycle
|
|
92
|
+
- **StateTransition** - Transition between states
|
|
93
|
+
- **LayoutConfig** - Layout configuration for views and components (required: `type`)
|
|
94
|
+
- **DataConfig** - Data binding configuration (required: `source`, `target`)
|
|
95
|
+
- **ErrorConfig** - Error handling configuration for components
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Type Decision Tree
|
|
100
|
+
|
|
101
|
+
Use this decision tree **before assigning a type** to any UX element.
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
LIBRARY TIER — reusable, cross-experience artifacts
|
|
105
|
+
├── Component library container? → ux.uxlibrary
|
|
106
|
+
├── Reusable UI component type (form, table, chart, card)? → ux.librarycomponent
|
|
107
|
+
├── Reusable grouping of components? → ux.librarysubview
|
|
108
|
+
├── Reusable state machine pattern? → ux.statepattern
|
|
109
|
+
├── Reusable action definition? → ux.actionpattern
|
|
110
|
+
├── Reusable parameterized state action template? → ux.stateactiontemplate
|
|
111
|
+
│ (no lifecycle binding; has parameters array)
|
|
112
|
+
├── Reusable transition template with animation? → ux.transitiontemplate
|
|
113
|
+
│ (has animationType/duration/easing; both `to` and `trigger` required)
|
|
114
|
+
├── Column definition for a table component? → ux.tablecolumn
|
|
115
|
+
└── Data series definition for a chart component? → ux.chartseries
|
|
116
|
+
|
|
117
|
+
APPLICATION TIER — app-wide UX configuration
|
|
118
|
+
└── Application-wide UX configuration (channel required)? → ux.uxapplication
|
|
119
|
+
|
|
120
|
+
EXPERIENCE TIER — specific to a view or experience
|
|
121
|
+
├── Top-level experience specification container? → ux.uxspec
|
|
122
|
+
├── Screen, page, modal, dialog, drawer, or panel? → ux.view
|
|
123
|
+
│ (required: type enum — page|modal|dialog|drawer|panel|overlay|embedded|full-screen)
|
|
124
|
+
├── Section or grouping within a view? → ux.subview
|
|
125
|
+
├── Placed instance of a component on a view? → ux.componentinstance
|
|
126
|
+
│ (has `order` for positioning and `props` for overrides)
|
|
127
|
+
├── Typed reference to a component by slot or variant? → ux.componentreference
|
|
128
|
+
│ (ref required; use when targeting a specific variant or slot, not placement)
|
|
129
|
+
├── Interactive element (button, link, voice command)? → ux.actioncomponent
|
|
130
|
+
├── State in an experience state machine? → ux.experiencestate
|
|
131
|
+
├── Concrete action bound to a state lifecycle? → ux.stateaction
|
|
132
|
+
│ (has lifecycle: on-enter|on-exit|on-transition and timing; no parameters)
|
|
133
|
+
├── Concrete transition with trigger and optional guard? → ux.statetransition
|
|
134
|
+
│ (trigger required; has guard conditions and inline actions; no animation)
|
|
135
|
+
├── Layout configuration (grid, flex, block, etc.)? → ux.layoutconfig
|
|
136
|
+
├── Data binding configuration (source → target)? → ux.dataconfig
|
|
137
|
+
└── Error handling configuration? → ux.errorconfig
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Cross-Layer Relationships
|
|
143
|
+
|
|
144
|
+
**Outgoing (UX → Other Layers):**
|
|
145
|
+
|
|
146
|
+
- `motivation.*` → Motivation Layer (UX supports goals)
|
|
147
|
+
- `business.*` → Business Layer (UX realizes business processes)
|
|
148
|
+
- `api.*` → API Layer (API calls from components)
|
|
149
|
+
- `data-model.*` → Data Model Layer (schema references for data-bound components)
|
|
150
|
+
- `navigation.*` → Navigation Layer (routing to views)
|
|
151
|
+
|
|
152
|
+
**Incoming (Other Layers → UX):**
|
|
153
|
+
|
|
154
|
+
- Navigation Layer → UX (routes point to views)
|
|
155
|
+
- Business Layer → UX (business processes trigger UX flows)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Design Best Practices
|
|
160
|
+
|
|
161
|
+
1. **Reusability** - Use library components for consistency
|
|
162
|
+
2. **State machines** - Model complex flows with states/transitions
|
|
163
|
+
3. **Error handling** - Define error states, ErrorConfig, and recovery transitions
|
|
164
|
+
4. **Accessibility** - Consider accessibility requirements
|
|
165
|
+
5. **Responsive** - Design for multiple screen sizes
|
|
166
|
+
6. **Performance** - Set performance targets (load time, interaction latency)
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## React Flow / Graph Visualization Patterns
|
|
171
|
+
|
|
172
|
+
When the codebase uses a graph visualization library (React Flow, D3, Cytoscape), apply these patterns in addition to the standard UX decision tree.
|
|
173
|
+
|
|
174
|
+
### Configuration-Driven Node Renderer
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
// src/core/nodes/components/UnifiedNode.tsx
|
|
178
|
+
export function UnifiedNode({ data }: NodeProps<UnifiedNodeData>) {
|
|
179
|
+
const config = nodeConfigLoader.get(data.elementType);
|
|
180
|
+
return <div style={config.styles}>{data.name}</div>;
|
|
181
|
+
}
|
|
182
|
+
// src/core/nodes/nodeConfig.json ← drives all 20 node type styles
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
→ `UnifiedNode.tsx` → `ux.librarycomponent.unified-node` (type: graph-node)
|
|
186
|
+
→ `nodeConfig.json` → `data-model.objectschema.node-config`
|
|
187
|
+
→ Do NOT create 20 separate elements for each node type in the config — the configuration-driven system as a whole is one `librarycomponent`
|
|
188
|
+
|
|
189
|
+
### Custom Edge Type
|
|
190
|
+
|
|
191
|
+
```tsx
|
|
192
|
+
// src/core/edges/ElbowEdge.tsx
|
|
193
|
+
export function ElbowEdge(props: EdgeProps) { ... }
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
→ `ux.librarycomponent.elbow-edge` (type: graph-edge)
|
|
197
|
+
→ Each distinct custom edge type → one `librarycomponent`
|
|
198
|
+
|
|
199
|
+
### Layer Container / Swimlane Node
|
|
200
|
+
|
|
201
|
+
```tsx
|
|
202
|
+
// src/core/nodes/LayerContainerNode.tsx
|
|
203
|
+
export function LayerContainerNode({ data }: NodeProps) { ... }
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
→ `ux.librarycomponent.layer-container-node` (type: graph-container)
|
|
207
|
+
|
|
208
|
+
### Graph Canvas Component
|
|
209
|
+
|
|
210
|
+
```tsx
|
|
211
|
+
// src/core/components/GraphViewer.tsx
|
|
212
|
+
export function GraphViewer({ nodes, edges }) {
|
|
213
|
+
return <ReactFlow nodeTypes={nodeTypes} edgeTypes={edgeTypes} />;
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
→ Already captured in the application layer as `ApplicationComponent`. Do NOT add it again as a UX element — the `ux.view.*` that represents the graph page already serves this purpose in the UX layer.
|
|
218
|
+
|
|
219
|
+
### Sub-components (field lists, tooltips, badges)
|
|
220
|
+
|
|
221
|
+
`FieldList.tsx`, `FieldTooltip.tsx`, `RelationshipBadge.tsx`, `BadgeRenderer.tsx` are internal implementation details of `UnifiedNode`. Do NOT add them as separate `librarycomponent` entries.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Common Commands
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# Add view
|
|
229
|
+
dr add ux view "User Profile" --description "User profile page"
|
|
230
|
+
|
|
231
|
+
# Add component instance
|
|
232
|
+
dr add ux component-instance "Profile Form"
|
|
233
|
+
|
|
234
|
+
# List views
|
|
235
|
+
dr list ux --type view
|
|
236
|
+
|
|
237
|
+
# Validate UX layer
|
|
238
|
+
dr validate --layers ux
|
|
239
|
+
|
|
240
|
+
# Export UX documentation
|
|
241
|
+
dr export markdown --layers ux
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Example: Login Screen
|
|
247
|
+
|
|
248
|
+
A login page with a form component, state machine, and data binding:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
# Add the view (page type, routable)
|
|
252
|
+
dr add ux view "Login" --description "Login page" --attributes '{"type":"page","routable":true}'
|
|
253
|
+
# → id: ux.view.login
|
|
254
|
+
|
|
255
|
+
# Add a form component from the library
|
|
256
|
+
dr add ux librarycomponent "Login Form" --description "Email/password form" --attributes '{"type":"form"}'
|
|
257
|
+
# → id: ux.librarycomponent.login-form
|
|
258
|
+
|
|
259
|
+
# Place the form as an instance on the login view
|
|
260
|
+
dr add ux componentinstance "Login Form Instance"
|
|
261
|
+
# → id: ux.componentinstance.login-form-instance
|
|
262
|
+
|
|
263
|
+
# Add states for the login flow
|
|
264
|
+
dr add ux experiencestate "Idle"
|
|
265
|
+
dr add ux experiencestate "Submitting"
|
|
266
|
+
dr add ux experiencestate "Error"
|
|
267
|
+
|
|
268
|
+
# Add a transition: click submit → submitting
|
|
269
|
+
dr add ux statetransition "Submit Clicked" --attributes '{"trigger":"click","to":"ux.experiencestate.submitting"}'
|
|
270
|
+
# → id: ux.statetransition.submit-clicked
|
|
271
|
+
|
|
272
|
+
# Add data config binding the form to the API
|
|
273
|
+
dr add ux dataconfig "Login Data" --attributes '{"source":"api","target":"ux.componentinstance.login-form-instance"}'
|
|
274
|
+
|
|
275
|
+
# Add error config for failed login
|
|
276
|
+
dr add ux errorconfig "Login Error" --description "Show inline error on auth failure"
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Pitfalls to Avoid
|
|
282
|
+
|
|
283
|
+
- ❌ Not using library components (inconsistent UX)
|
|
284
|
+
- ❌ Complex state machines without documentation
|
|
285
|
+
- ❌ Not linking to API operations or navigation routes
|
|
286
|
+
- ❌ Missing error states and handling
|
|
287
|
+
- ❌ No performance targets defined
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Coverage Completeness Checklist
|
|
292
|
+
|
|
293
|
+
Before declaring UX layer extraction complete, verify each type was considered:
|
|
294
|
+
|
|
295
|
+
- [ ] **ux.uxlibrary** — Component library container
|
|
296
|
+
- [ ] **ux.librarycomponent** — Reusable UI component (form-field, table, chart, card)
|
|
297
|
+
- [ ] **ux.librarysubview** — Reusable grouping of components
|
|
298
|
+
- [ ] **ux.statepattern** — Reusable state machine pattern
|
|
299
|
+
- [ ] **ux.actionpattern** — Reusable action definition
|
|
300
|
+
- [ ] **ux.stateactiontemplate** — Reusable state action template
|
|
301
|
+
- [ ] **ux.transitiontemplate** — Reusable transition template
|
|
302
|
+
- [ ] **ux.tablecolumn** — Column definition for table components
|
|
303
|
+
- [ ] **ux.chartseries** — Data series configuration for chart components
|
|
304
|
+
- [ ] **ux.uxapplication** — Application-wide UX configuration
|
|
305
|
+
- [ ] **ux.uxspec** — Experience specification container
|
|
306
|
+
- [ ] **ux.view** — Screen, page, modal, dialog, drawer, or panel (required: `type`)
|
|
307
|
+
- [ ] **ux.subview** — Section or panel within a view
|
|
308
|
+
- [ ] **ux.componentinstance** — Instance of a library component on a view
|
|
309
|
+
- [ ] **ux.componentreference** — Reference to a library component by ID
|
|
310
|
+
- [ ] **ux.actioncomponent** — Interactive element (button, link, voice command)
|
|
311
|
+
- [ ] **ux.experiencestate** — State in experience state machine
|
|
312
|
+
- [ ] **ux.stateaction** — Action executed during a state lifecycle
|
|
313
|
+
- [ ] **ux.statetransition** — Transition between states
|
|
314
|
+
- [ ] **ux.layoutconfig** — Layout configuration (grid, flex, block, etc.)
|
|
315
|
+
- [ ] **ux.dataconfig** — Data binding configuration (source → target)
|
|
316
|
+
- [ ] **ux.errorconfig** — Error handling configuration
|
|
317
|
+
|
|
318
|
+
If any type has ZERO elements, explicitly decide:
|
|
319
|
+
"This type doesn't apply to this codebase" with reasoning.
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_10_NAVIGATION
|
|
3
|
+
description: Expert knowledge for Navigation Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"navigation",
|
|
7
|
+
"routing",
|
|
8
|
+
"route",
|
|
9
|
+
"flow",
|
|
10
|
+
"navigation guard",
|
|
11
|
+
"redirect",
|
|
12
|
+
"navigation flow"
|
|
13
|
+
]
|
|
14
|
+
version: 0.8.3
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Navigation Layer Skill
|
|
18
|
+
|
|
19
|
+
**Layer Number:** 10
|
|
20
|
+
**Specification:** Metadata Model Spec v0.8.3
|
|
21
|
+
**Purpose:** Defines multi-modal navigation flows, routes, guards, and transitions between views.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Layer Overview
|
|
26
|
+
|
|
27
|
+
The Navigation Layer captures **navigation and routing**:
|
|
28
|
+
|
|
29
|
+
- **GRAPH** - Top-level container for the entire navigation model (`navigationgraph`)
|
|
30
|
+
- **ROUTES** - URL paths to views; types include `public`, `protected`, `redirect`, `alias`, `lazy` (`route`)
|
|
31
|
+
- **ROUTE METADATA** - Auth requirements, layout, keepAlive metadata per route (`routemeta`)
|
|
32
|
+
- **BREADCRUMBS** - Breadcrumb trail configuration per route (`breadcrumbconfig`)
|
|
33
|
+
- **GUARDS** - Pre-navigation authorization/validation checks (`navigationguard`)
|
|
34
|
+
- **GUARD CONDITIONS** - Boolean expressions evaluated by guards (`guardcondition`)
|
|
35
|
+
- **GUARD ACTIONS** - Actions on guard failure: redirect, block, notify, prompt (`guardaction`)
|
|
36
|
+
- **FLOWS** - Multi-step navigation sequences (`navigationflow`)
|
|
37
|
+
- **FLOW STEPS** - Individual steps within a flow (`flowstep`)
|
|
38
|
+
- **TRANSITIONS** - Directed transitions between routes with triggers (`navigationtransition`)
|
|
39
|
+
- **CONTEXT** - Navigation-scoped context variables (`contextvariable`)
|
|
40
|
+
|
|
41
|
+
This layer uses **Multi-Modal Navigation** supporting web, mobile, voice, and other modalities.
|
|
42
|
+
|
|
43
|
+
**Central Entity:** The **Route** (URL path to view) is the core modeling unit.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Entity Types
|
|
48
|
+
|
|
49
|
+
> **CLI Introspection:** Run `dr schema types navigation` for the authoritative, always-current list of node types.
|
|
50
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
51
|
+
|
|
52
|
+
### Core Navigation Entities (11 entities)
|
|
53
|
+
|
|
54
|
+
| Entity Type | Description |
|
|
55
|
+
| ------------------------ | ----------------------------------------------------------------- |
|
|
56
|
+
| **NavigationGraph** | Top-level container representing the complete navigation model |
|
|
57
|
+
| **Route** | URL path mapped to a view; the core modeling unit |
|
|
58
|
+
| **RouteMeta** | Auth, layout, and lifecycle metadata attached to a route |
|
|
59
|
+
| **NavigationGuard** | Authorization/validation check executed before navigation |
|
|
60
|
+
| **GuardCondition** | Boolean expression evaluated by a navigation guard |
|
|
61
|
+
| **GuardAction** | Action taken when a guard fails (redirect, block, notify, prompt) |
|
|
62
|
+
| **NavigationFlow** | Multi-step navigation sequence |
|
|
63
|
+
| **FlowStep** | A single step within a navigation flow |
|
|
64
|
+
| **NavigationTransition** | Directed transition between two routes |
|
|
65
|
+
| **ContextVariable** | Navigation-scoped context data passed between routes |
|
|
66
|
+
| **BreadcrumbConfig** | Breadcrumb trail configuration for a route |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Type Decision Tree
|
|
71
|
+
|
|
72
|
+
Use this decision tree **before assigning a type** to any navigation element.
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Is this the top-level navigation model for an application?
|
|
76
|
+
→ navigation.navigationgraph.*
|
|
77
|
+
|
|
78
|
+
Is this a URL path/route that maps to a view?
|
|
79
|
+
→ navigation.route.*
|
|
80
|
+
|
|
81
|
+
Is this metadata about a route (auth requirements, layout, keepAlive)?
|
|
82
|
+
→ navigation.routemeta.*
|
|
83
|
+
|
|
84
|
+
Is this a breadcrumb configuration for a route?
|
|
85
|
+
→ navigation.breadcrumbconfig.*
|
|
86
|
+
|
|
87
|
+
Is this a guard that checks conditions before allowing navigation?
|
|
88
|
+
→ navigation.navigationguard.*
|
|
89
|
+
|
|
90
|
+
Is this a boolean expression/predicate evaluated inside a guard?
|
|
91
|
+
→ navigation.guardcondition.*
|
|
92
|
+
|
|
93
|
+
Is this the action to take when a guard fails (redirect, block, notify, prompt)?
|
|
94
|
+
→ navigation.guardaction.*
|
|
95
|
+
|
|
96
|
+
Is this a named multi-step navigation sequence (wizard, checkout, onboarding)?
|
|
97
|
+
→ navigation.navigationflow.*
|
|
98
|
+
|
|
99
|
+
Is this a single step within a navigation flow?
|
|
100
|
+
→ navigation.flowstep.*
|
|
101
|
+
|
|
102
|
+
Is this a directed transition between two specific routes with a trigger?
|
|
103
|
+
→ navigation.navigationtransition.*
|
|
104
|
+
|
|
105
|
+
Is this a context variable scoped to the navigation session?
|
|
106
|
+
→ navigation.contextvariable.*
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## When to Use This Skill
|
|
112
|
+
|
|
113
|
+
Activate when the user:
|
|
114
|
+
|
|
115
|
+
- Mentions "navigation", "routing", "routes", "flows"
|
|
116
|
+
- Wants to define URL paths or route guards
|
|
117
|
+
- Asks about multi-step flows or navigation transitions
|
|
118
|
+
- Needs to model navigation between screens
|
|
119
|
+
- Wants to link navigation to UX views or business processes
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Cross-Layer Relationships
|
|
124
|
+
|
|
125
|
+
**Outgoing (Navigation → Other Layers):**
|
|
126
|
+
|
|
127
|
+
- `view-ref` → UX Layer (which view does this route show?)
|
|
128
|
+
- `business.realizes-process` → Business Layer (what process does this flow realize?)
|
|
129
|
+
- `security.required-roles` → Security Layer (authorization requirements)
|
|
130
|
+
- `apm.flow-metrics` → APM Layer (navigation analytics)
|
|
131
|
+
|
|
132
|
+
**Incoming (Other Layers → Navigation):**
|
|
133
|
+
|
|
134
|
+
- UX Layer → Navigation (views reference routes)
|
|
135
|
+
- Business Layer → Navigation (processes trigger flows)
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Design Best Practices
|
|
140
|
+
|
|
141
|
+
1. **Guards** - Add navigation guards for protected routes
|
|
142
|
+
2. **Context** - Pass necessary context between routes
|
|
143
|
+
3. **Analytics** - Track navigation flows for insights
|
|
144
|
+
4. **Error handling** - Define fallback routes for errors
|
|
145
|
+
5. **Deep linking** - Support deep linking for all routes
|
|
146
|
+
6. **SEO** - Consider SEO requirements for public routes
|
|
147
|
+
7. **Performance** - Lazy-load routes when appropriate
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Common Commands
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Add navigation graph (one per application)
|
|
155
|
+
dr add navigation navigationgraph "My App Navigation"
|
|
156
|
+
|
|
157
|
+
# Add route (types: public | protected | redirect | alias | lazy)
|
|
158
|
+
dr add navigation route "User Profile Route" --description "User profile page route"
|
|
159
|
+
|
|
160
|
+
# Add route metadata
|
|
161
|
+
dr add navigation routemeta "Profile Route Meta"
|
|
162
|
+
|
|
163
|
+
# Add breadcrumb configuration
|
|
164
|
+
dr add navigation breadcrumbconfig "Profile Breadcrumb"
|
|
165
|
+
|
|
166
|
+
# Add navigation guard
|
|
167
|
+
dr add navigation navigationguard "Auth Guard"
|
|
168
|
+
|
|
169
|
+
# Add guard condition
|
|
170
|
+
dr add navigation guardcondition "Is Authenticated"
|
|
171
|
+
|
|
172
|
+
# Add guard action (on failure)
|
|
173
|
+
dr add navigation guardaction "Redirect To Login"
|
|
174
|
+
|
|
175
|
+
# Add navigation flow
|
|
176
|
+
dr add navigation navigationflow "Checkout Flow"
|
|
177
|
+
|
|
178
|
+
# Add flow step
|
|
179
|
+
dr add navigation flowstep "Cart Review Step"
|
|
180
|
+
|
|
181
|
+
# Add transition between routes
|
|
182
|
+
dr add navigation navigationtransition "Cart To Shipping"
|
|
183
|
+
|
|
184
|
+
# Add context variable
|
|
185
|
+
dr add navigation contextvariable "Cart ID"
|
|
186
|
+
|
|
187
|
+
# List by type
|
|
188
|
+
dr list navigation --type route
|
|
189
|
+
dr list navigation --type navigationguard
|
|
190
|
+
|
|
191
|
+
# Validate navigation layer
|
|
192
|
+
dr validate --layers navigation
|
|
193
|
+
|
|
194
|
+
# Export navigation map
|
|
195
|
+
dr export plantuml --layers navigation
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Example: Protected Profile Route
|
|
201
|
+
|
|
202
|
+
```yaml
|
|
203
|
+
id: navigation.route.user-profile
|
|
204
|
+
name: "User Profile Route"
|
|
205
|
+
type: route
|
|
206
|
+
properties:
|
|
207
|
+
path: /profile/:userId
|
|
208
|
+
view-ref: ux.view.user-profile
|
|
209
|
+
guards:
|
|
210
|
+
- navigation.navigationguard.authentication
|
|
211
|
+
- navigation.navigationguard.profile-ownership
|
|
212
|
+
parameters:
|
|
213
|
+
- name: userId
|
|
214
|
+
type: string
|
|
215
|
+
format: uuid
|
|
216
|
+
required: true
|
|
217
|
+
meta:
|
|
218
|
+
title: "User Profile"
|
|
219
|
+
requiresAuth: true
|
|
220
|
+
allowedRoles:
|
|
221
|
+
- user
|
|
222
|
+
- admin
|
|
223
|
+
contextVariables:
|
|
224
|
+
- name: currentUserId
|
|
225
|
+
source: auth.user.id
|
|
226
|
+
dataMapping:
|
|
227
|
+
- source: route.params.userId
|
|
228
|
+
target: view.data.userId
|
|
229
|
+
security:
|
|
230
|
+
required-roles:
|
|
231
|
+
- security.role.authenticated-user
|
|
232
|
+
business:
|
|
233
|
+
realizes-process: business.process.profile-management
|
|
234
|
+
apm:
|
|
235
|
+
flow-metrics:
|
|
236
|
+
- apm.metric.profile-view-count
|
|
237
|
+
- apm.metric.profile-load-time
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Example: Multi-Step Checkout Flow
|
|
243
|
+
|
|
244
|
+
```yaml
|
|
245
|
+
id: navigation.navigationflow.checkout
|
|
246
|
+
name: "Checkout Flow"
|
|
247
|
+
type: navigationflow
|
|
248
|
+
properties:
|
|
249
|
+
steps:
|
|
250
|
+
- id: cart-review
|
|
251
|
+
route: /checkout/cart
|
|
252
|
+
view: ux.view.cart-review
|
|
253
|
+
onNext: validate-cart
|
|
254
|
+
- id: shipping-address
|
|
255
|
+
route: /checkout/shipping
|
|
256
|
+
view: ux.view.shipping-form
|
|
257
|
+
onNext: validate-address
|
|
258
|
+
- id: payment
|
|
259
|
+
route: /checkout/payment
|
|
260
|
+
view: ux.view.payment-form
|
|
261
|
+
onNext: validate-payment
|
|
262
|
+
- id: confirmation
|
|
263
|
+
route: /checkout/confirm
|
|
264
|
+
view: ux.view.order-confirmation
|
|
265
|
+
final: true
|
|
266
|
+
transitions:
|
|
267
|
+
- from: cart-review
|
|
268
|
+
to: shipping-address
|
|
269
|
+
trigger: next-button
|
|
270
|
+
guard: navigation.navigationguard.cart-not-empty
|
|
271
|
+
- from: shipping-address
|
|
272
|
+
to: payment
|
|
273
|
+
trigger: next-button
|
|
274
|
+
guard: navigation.navigationguard.valid-address
|
|
275
|
+
- from: payment
|
|
276
|
+
to: confirmation
|
|
277
|
+
trigger: submit
|
|
278
|
+
guard: navigation.navigationguard.payment-successful
|
|
279
|
+
context:
|
|
280
|
+
- cartId
|
|
281
|
+
- selectedAddress
|
|
282
|
+
- paymentMethod
|
|
283
|
+
business:
|
|
284
|
+
realizes-process: business.process.checkout
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Coverage Completeness Checklist
|
|
290
|
+
|
|
291
|
+
Before declaring navigation layer extraction complete, verify each type was considered:
|
|
292
|
+
|
|
293
|
+
- [ ] `navigation.navigationgraph.*` — Top-level navigation model container
|
|
294
|
+
- [ ] `navigation.route.*` — URL path to view mappings (core unit)
|
|
295
|
+
- [ ] `navigation.routemeta.*` — Auth, layout, keepAlive metadata per route
|
|
296
|
+
- [ ] `navigation.breadcrumbconfig.*` — Breadcrumb trail configuration
|
|
297
|
+
- [ ] `navigation.navigationguard.*` — Pre-navigation authorization/validation checks
|
|
298
|
+
- [ ] `navigation.guardcondition.*` — Boolean expressions evaluated by guards
|
|
299
|
+
- [ ] `navigation.guardaction.*` — Actions taken on guard failure
|
|
300
|
+
- [ ] `navigation.navigationflow.*` — Multi-step navigation sequences
|
|
301
|
+
- [ ] `navigation.flowstep.*` — Individual steps within flows
|
|
302
|
+
- [ ] `navigation.navigationtransition.*` — Directed transitions between routes
|
|
303
|
+
- [ ] `navigation.contextvariable.*` — Navigation-scoped context data
|
|
304
|
+
|
|
305
|
+
If any type has ZERO elements, explicitly decide:
|
|
306
|
+
"This type doesn't apply to this codebase" with reasoning.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Pitfalls to Avoid
|
|
311
|
+
|
|
312
|
+
- ❌ Missing authentication guards on protected routes — use `navigationguard` + `guardcondition` + `guardaction` together
|
|
313
|
+
- ❌ Using `navigation.guard.*` or `navigation.flow.*` as element IDs — correct types are `navigationguard` and `navigationflow`
|
|
314
|
+
- ❌ Not decomposing guards into conditions (`guardcondition`) and actions (`guardaction`) — model these as separate elements
|
|
315
|
+
- ❌ Complex flows without explicit `flowstep` elements — each step in a flow should be a distinct `flowstep`
|
|
316
|
+
- ❌ Missing `routemeta` for protected routes — auth requirements belong in `routemeta`, not embedded in route properties
|
|
317
|
+
- ❌ Missing cross-layer links to UX views (`view-ref`) and business processes (`realizes-process`)
|
|
318
|
+
- ❌ No error/fallback routes defined — model these as `route` with `type: redirect`
|