@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,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_07_DATA_MODEL
|
|
3
|
+
description: Expert knowledge for Data Model Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"JSON Schema",
|
|
7
|
+
"data model",
|
|
8
|
+
"schema",
|
|
9
|
+
"object schema",
|
|
10
|
+
"data structure",
|
|
11
|
+
"properties",
|
|
12
|
+
"validation",
|
|
13
|
+
"data type"
|
|
14
|
+
]
|
|
15
|
+
version: 0.8.1
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Data Model Layer Skill
|
|
19
|
+
|
|
20
|
+
**Layer Number:** 07
|
|
21
|
+
**Specification:** Metadata Model Spec v0.8.1
|
|
22
|
+
**Purpose:** Defines logical data structures using JSON Schema Draft 7, specifying entities, properties, validation rules, and data governance.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Layer Overview
|
|
27
|
+
|
|
28
|
+
The Data Model Layer captures **logical data structures**:
|
|
29
|
+
|
|
30
|
+
- **SCHEMAS** - Object, array, string, numeric schemas
|
|
31
|
+
- **VALIDATION** - Type constraints, required fields, patterns, ranges
|
|
32
|
+
- **COMPOSITION** - Schema combinations (allOf, anyOf, oneOf, not)
|
|
33
|
+
- **GOVERNANCE** - Data classification, PII, retention policies
|
|
34
|
+
- **INTEGRATION** - Links to business objects, database tables, API operations
|
|
35
|
+
|
|
36
|
+
This layer uses **JSON Schema Draft 7** (industry standard) with custom extensions for cross-layer traceability.
|
|
37
|
+
|
|
38
|
+
**Central Entity:** The **ObjectSchema** (defining an object structure) is the core modeling unit.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Entity Types
|
|
43
|
+
|
|
44
|
+
> **CLI Introspection:** Run `dr schema types data-model` for the authoritative, always-current list of node types.
|
|
45
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
46
|
+
|
|
47
|
+
### Core JSON Schema Entities (17 entities)
|
|
48
|
+
|
|
49
|
+
| Entity Type | Description |
|
|
50
|
+
| --------------------- | -------------------------------------------------- |
|
|
51
|
+
| **JSONSchema** | Root schema document |
|
|
52
|
+
| **ObjectSchema** | Defines object structure with properties |
|
|
53
|
+
| **ArraySchema** | Defines array with items and constraints |
|
|
54
|
+
| **StringSchema** | String validation (length, pattern, format) |
|
|
55
|
+
| **NumericSchema** | Number/integer validation (min, max, multipleOf) |
|
|
56
|
+
| **SchemaComposition** | Combines schemas (allOf, anyOf, oneOf, not) |
|
|
57
|
+
| **SchemaProperty** | Individual property definition |
|
|
58
|
+
| **Reference** | $ref to other schemas |
|
|
59
|
+
| **DataGovernance** | Governance annotations (classification, retention) |
|
|
60
|
+
| **DatabaseMapping** | Maps to physical database (x-database extension) |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## When to Use This Skill
|
|
65
|
+
|
|
66
|
+
Activate when the user:
|
|
67
|
+
|
|
68
|
+
- Mentions "data model", "schema", "JSON Schema", "data structure"
|
|
69
|
+
- Wants to define object structures, properties, or validation rules
|
|
70
|
+
- Asks about data types, constraints, or data governance
|
|
71
|
+
- Needs to model entities like User, Order, Product, etc.
|
|
72
|
+
- Wants to link data models to APIs or databases
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Cross-Layer Relationships
|
|
77
|
+
|
|
78
|
+
**Outgoing (Data Model → Other Layers):**
|
|
79
|
+
|
|
80
|
+
- `x-business-object-ref` → Business Layer (what business concept does this represent?)
|
|
81
|
+
- `x-database` → Data Store Layer (how is this stored physically?)
|
|
82
|
+
- `x-data-governance` → Security Layer (classification, PII, retention)
|
|
83
|
+
- `x-apm-data-quality-metrics` → APM Layer (data quality monitoring)
|
|
84
|
+
|
|
85
|
+
**Incoming (Other Layers → Data Model):**
|
|
86
|
+
|
|
87
|
+
- API Layer → Data Model (request/response schemas via $ref)
|
|
88
|
+
- UX Layer → Data Model (form validation rules)
|
|
89
|
+
- Testing Layer → Data Model (input constraints for test partitioning)
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Validation Best Practices
|
|
94
|
+
|
|
95
|
+
1. **Required fields** - Use `required` array for mandatory properties
|
|
96
|
+
2. **Type validation** - Always specify `type` (object, array, string, number, etc.)
|
|
97
|
+
3. **Format validation** - Use `format` for email, uuid, date-time, uri, etc.
|
|
98
|
+
4. **Range validation** - Use min/max for numbers, minLength/maxLength for strings
|
|
99
|
+
5. **Pattern validation** - Use `pattern` for regex validation (e.g., phone numbers)
|
|
100
|
+
6. **Data governance** - Always add `x-data-governance` for sensitive data
|
|
101
|
+
7. **Reusability** - Use `$ref` to reference shared schemas
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Common Commands
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Add object schema
|
|
109
|
+
dr add data_model object-schema --name "User" --property type=object
|
|
110
|
+
|
|
111
|
+
# List data models
|
|
112
|
+
dr list data_model object-schema
|
|
113
|
+
|
|
114
|
+
# Validate data model layer
|
|
115
|
+
dr validate --layer data_model
|
|
116
|
+
|
|
117
|
+
# Export as JSON Schema
|
|
118
|
+
dr export --layer data_model --format json-schema
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Example: User Schema
|
|
124
|
+
|
|
125
|
+
```yaml
|
|
126
|
+
id: data_model.object-schema.user
|
|
127
|
+
name: "User Schema"
|
|
128
|
+
type: object-schema
|
|
129
|
+
properties:
|
|
130
|
+
type: object
|
|
131
|
+
required: [id, email, username]
|
|
132
|
+
properties:
|
|
133
|
+
id:
|
|
134
|
+
type: string
|
|
135
|
+
format: uuid
|
|
136
|
+
description: "Unique user identifier"
|
|
137
|
+
email:
|
|
138
|
+
type: string
|
|
139
|
+
format: email
|
|
140
|
+
description: "User email address"
|
|
141
|
+
x-data-governance:
|
|
142
|
+
classification: confidential
|
|
143
|
+
pii: true
|
|
144
|
+
username:
|
|
145
|
+
type: string
|
|
146
|
+
minLength: 3
|
|
147
|
+
maxLength: 50
|
|
148
|
+
pattern: "^[a-zA-Z0-9_-]+$"
|
|
149
|
+
created_at:
|
|
150
|
+
type: string
|
|
151
|
+
format: date-time
|
|
152
|
+
roles:
|
|
153
|
+
type: array
|
|
154
|
+
items:
|
|
155
|
+
type: string
|
|
156
|
+
description: "User role assignments"
|
|
157
|
+
x-business-object-ref: business.actor.user
|
|
158
|
+
x-database:
|
|
159
|
+
table: users
|
|
160
|
+
schema: public
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Pitfalls to Avoid
|
|
166
|
+
|
|
167
|
+
- ❌ Missing `type` field (validation will fail)
|
|
168
|
+
- ❌ Not marking PII/sensitive data with governance
|
|
169
|
+
- ❌ Overly complex schemas (break into smaller reusable schemas)
|
|
170
|
+
- ❌ Not using `$ref` for shared definitions
|
|
171
|
+
- ❌ Missing cross-layer links to business and database layers
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_08_DATA_STORE
|
|
3
|
+
description: Expert knowledge for Data Store Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"database",
|
|
7
|
+
"collection",
|
|
8
|
+
"namespace",
|
|
9
|
+
"data-store",
|
|
10
|
+
"NoSQL",
|
|
11
|
+
"MongoDB",
|
|
12
|
+
"DynamoDB",
|
|
13
|
+
"document store",
|
|
14
|
+
"access pattern",
|
|
15
|
+
"index",
|
|
16
|
+
"field"
|
|
17
|
+
]
|
|
18
|
+
version: 0.8.1
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Data Store Layer Skill
|
|
22
|
+
|
|
23
|
+
**Layer Number:** 08
|
|
24
|
+
**Specification:** Metadata Model Spec v0.8.1
|
|
25
|
+
**Purpose:** Defines paradigm-neutral physical storage modeling, capturing databases, collections/tables, fields/columns, indexes, views, stored logic, validation rules, access patterns, event handlers, and retention policies across relational, document, key-value, time-series, and graph stores.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Layer Overview
|
|
30
|
+
|
|
31
|
+
The Data Store Layer captures **physical storage design** in a paradigm-neutral way:
|
|
32
|
+
|
|
33
|
+
- **DATABASES** - Database instances (any paradigm)
|
|
34
|
+
- **NAMESPACES** - Logical grouping of collections (schemas, keyspaces, databases)
|
|
35
|
+
- **COLLECTIONS** - Primary storage units (tables, collections, streams, buckets)
|
|
36
|
+
- **FIELDS** - Field/column definitions with types and constraints
|
|
37
|
+
- **INDEXES** - Query optimization indexes
|
|
38
|
+
- **VIEWS** - Derived or materialized views
|
|
39
|
+
- **STORED LOGIC** - Stored procedures, triggers, user-defined functions
|
|
40
|
+
- **VALIDATION RULES** - Database-level validation constraints
|
|
41
|
+
- **ACCESS PATTERNS** - Query access patterns for performance modeling
|
|
42
|
+
- **EVENT HANDLERS** - Event-driven data triggers
|
|
43
|
+
- **RETENTION POLICIES** - Data lifecycle and retention rules
|
|
44
|
+
|
|
45
|
+
This layer supports **multiple storage paradigms**: relational (PostgreSQL, MySQL), document (MongoDB, Firestore), key-value (Redis, DynamoDB), time-series (InfluxDB, TimescaleDB), and graph (Neo4j, Amazon Neptune).
|
|
46
|
+
|
|
47
|
+
**Central Entity:** The **Collection** (table, document collection, stream) is the core modeling unit.
|
|
48
|
+
|
|
49
|
+
> **CLI Introspection:** Run `dr schema types data-store` for the authoritative, always-current list of node types.
|
|
50
|
+
> Run `dr schema node <type-id>` for full attribute details on any type (e.g., `dr schema node data-store.collection`).
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Entity Types
|
|
55
|
+
|
|
56
|
+
### Core Data Store Entities (11 entities)
|
|
57
|
+
|
|
58
|
+
| Entity Type | CLI Type | Description |
|
|
59
|
+
| ------------------- | ----------------- | ------------------------------------------------------------------------ |
|
|
60
|
+
| **Database** | `database` | Database instance (any paradigm — relational, document, key-value, etc.) |
|
|
61
|
+
| **Namespace** | `namespace` | Logical grouping of collections (schema, keyspace, database prefix) |
|
|
62
|
+
| **Collection** | `collection` | Primary storage unit (table, document collection, stream, bucket) |
|
|
63
|
+
| **Field** | `field` | Field or column definition with data type and constraints |
|
|
64
|
+
| **Index** | `index` | Query optimization index (B-tree, hash, compound, text, geospatial) |
|
|
65
|
+
| **View** | `view` | Derived or materialized view over one or more collections |
|
|
66
|
+
| **StoredLogic** | `storedlogic` | Stored procedures, triggers, and user-defined functions |
|
|
67
|
+
| **ValidationRule** | `validationrule` | Database-level validation constraint or schema enforcement rule |
|
|
68
|
+
| **AccessPattern** | `accesspattern` | Named query access pattern (for performance and capacity planning) |
|
|
69
|
+
| **EventHandler** | `eventhandler` | Event-driven trigger or change-data-capture handler |
|
|
70
|
+
| **RetentionPolicy** | `retentionpolicy` | Data lifecycle, TTL, and retention rule definition |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## When to Use This Skill
|
|
75
|
+
|
|
76
|
+
Activate when the user:
|
|
77
|
+
|
|
78
|
+
- Mentions "database", "collection", "namespace", "data-store", "NoSQL", "document store"
|
|
79
|
+
- Wants to define collections, fields, indexes, or access patterns
|
|
80
|
+
- Asks about storage design for MongoDB, DynamoDB, PostgreSQL, Redis, etc.
|
|
81
|
+
- Needs to model physical storage for data models (any paradigm)
|
|
82
|
+
- Wants to link physical storage to logical data models
|
|
83
|
+
- Discusses event-driven data handling or change-data-capture
|
|
84
|
+
- Asks about data retention, TTL policies, or lifecycle management
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Cross-Layer Relationships
|
|
89
|
+
|
|
90
|
+
**Outgoing (Data Store → Other Layers):**
|
|
91
|
+
|
|
92
|
+
- `x-json-schema` → Data Model Layer (what logical schema does this implement?)
|
|
93
|
+
- `x-governed-by-*` → Security Layer (data access policies)
|
|
94
|
+
- `x-apm-performance-metrics` → APM Layer (query performance monitoring)
|
|
95
|
+
|
|
96
|
+
**Incoming (Other Layers → Data Store):**
|
|
97
|
+
|
|
98
|
+
- Data Model Layer → Data Store (physical storage mapping)
|
|
99
|
+
- Application Layer → Data Store (database connections)
|
|
100
|
+
- Technology Layer → Data Store (hosting infrastructure)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Design Best Practices
|
|
105
|
+
|
|
106
|
+
1. **Paradigm-neutral modeling** — Use `collection`/`field` regardless of whether the underlying store is relational or document
|
|
107
|
+
2. **Access patterns first** — For NoSQL (DynamoDB, Cassandra), define `AccessPattern` entities before collections
|
|
108
|
+
3. **Indexes** — Add indexes for frequent query paths; use `AccessPattern` to document which index serves which pattern
|
|
109
|
+
4. **PII marking** — Use `x-pii` on `field` entities to mark sensitive data
|
|
110
|
+
5. **Retention policies** — Always add a `RetentionPolicy` for collections with regulatory or storage requirements
|
|
111
|
+
6. **Stored logic** — Capture stored procedures, triggers, and UDFs as `StoredLogic` entities
|
|
112
|
+
7. **Event handlers** — Document CDC (change-data-capture) and event-driven triggers as `EventHandler` entities
|
|
113
|
+
8. **Validation rules** — Add `ValidationRule` for database-level constraints beyond field-level type enforcement
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Common Commands
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Add a database instance
|
|
121
|
+
dr add data-store database --name "users-db"
|
|
122
|
+
|
|
123
|
+
# Add a namespace (schema or keyspace)
|
|
124
|
+
dr add data-store namespace --name "public" --property parentDatabase=data-store.database.users-db
|
|
125
|
+
|
|
126
|
+
# Add a collection (table or document collection)
|
|
127
|
+
dr add data-store collection --name "users" --property parentNamespace=data-store.namespace.public
|
|
128
|
+
|
|
129
|
+
# Add a field to a collection
|
|
130
|
+
dr add data-store field --name "email" --property dataType=string --property nullable=false
|
|
131
|
+
|
|
132
|
+
# Add an index
|
|
133
|
+
dr add data-store index --name "idx-users-email" --property fields='["email"]' --property unique=true
|
|
134
|
+
|
|
135
|
+
# Add an access pattern (for NoSQL capacity planning)
|
|
136
|
+
dr add data-store accesspattern --name "get-user-by-email" --property queryType=point-lookup
|
|
137
|
+
|
|
138
|
+
# List collections
|
|
139
|
+
dr list data-store collection
|
|
140
|
+
|
|
141
|
+
# Validate data-store layer
|
|
142
|
+
dr validate --layer data-store
|
|
143
|
+
|
|
144
|
+
# Introspect available types
|
|
145
|
+
dr schema types data-store
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Example: Users Collection (Paradigm-Neutral)
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
id: data-store.collection.users
|
|
154
|
+
name: "Users Collection"
|
|
155
|
+
type: collection
|
|
156
|
+
properties:
|
|
157
|
+
parentNamespace: data-store.namespace.public
|
|
158
|
+
paradigm: relational # or: document, key-value, time-series, graph
|
|
159
|
+
fields:
|
|
160
|
+
- id:
|
|
161
|
+
dataType: uuid
|
|
162
|
+
nullable: false
|
|
163
|
+
primaryKey: true
|
|
164
|
+
- email:
|
|
165
|
+
dataType: string
|
|
166
|
+
nullable: false
|
|
167
|
+
x-pii: true
|
|
168
|
+
x-encrypted: true
|
|
169
|
+
- username:
|
|
170
|
+
dataType: string
|
|
171
|
+
nullable: false
|
|
172
|
+
- created_at:
|
|
173
|
+
dataType: timestamp
|
|
174
|
+
nullable: false
|
|
175
|
+
x-json-schema: data-model.object-schema.user
|
|
176
|
+
x-apm-performance-metrics:
|
|
177
|
+
- apm.metric.users-query-latency
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Access Pattern (for DynamoDB/NoSQL)
|
|
181
|
+
|
|
182
|
+
```yaml
|
|
183
|
+
id: data-store.accesspattern.get-user-by-email
|
|
184
|
+
name: "Get User by Email"
|
|
185
|
+
type: accesspattern
|
|
186
|
+
properties:
|
|
187
|
+
collection: data-store.collection.users
|
|
188
|
+
queryType: point-lookup
|
|
189
|
+
keyAttributes: ["email"]
|
|
190
|
+
consistencyLevel: strong
|
|
191
|
+
estimatedRps: 500
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Retention Policy
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
id: data-store.retentionpolicy.users-audit-log
|
|
198
|
+
name: "Users Audit Log Retention"
|
|
199
|
+
type: retentionpolicy
|
|
200
|
+
properties:
|
|
201
|
+
collection: data-store.collection.users-audit-log
|
|
202
|
+
ttlDays: 365
|
|
203
|
+
archiveAfterDays: 90
|
|
204
|
+
regulatoryBasis: "SOC2, GDPR Article 30"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Pitfalls to Avoid
|
|
210
|
+
|
|
211
|
+
- ❌ Using SQL-only concepts (Table, Column, Constraint) — use paradigm-neutral `collection`, `field`, `validationrule`
|
|
212
|
+
- ❌ Skipping `AccessPattern` for NoSQL stores (DynamoDB, Cassandra) — define access patterns first
|
|
213
|
+
- ❌ Not marking PII fields with `x-pii`
|
|
214
|
+
- ❌ Missing cross-layer links to data model layer (`x-json-schema`)
|
|
215
|
+
- ❌ Forgetting `RetentionPolicy` for regulated data
|
|
216
|
+
- ❌ Not documenting `EventHandler` for CDC or change-triggered workflows
|
|
@@ -0,0 +1,230 @@
|
|
|
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.1
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# UX Layer Skill
|
|
20
|
+
|
|
21
|
+
**Layer Number:** 09
|
|
22
|
+
**Specification:** Metadata Model Spec v0.8.1
|
|
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** - Routable screens/pages with layouts
|
|
32
|
+
- **COMPONENTS** - UI components (forms, tables, charts, cards)
|
|
33
|
+
- **STATE MACHINES** - Experience states and transitions
|
|
34
|
+
- **ACTIONS** - Interactive elements (buttons, links, voice commands)
|
|
35
|
+
- **VALIDATION** - Client-side validation rules
|
|
36
|
+
- **LAYOUTS** - Layout configurations (grid, flex, etc.)
|
|
37
|
+
|
|
38
|
+
This layer uses **Three-Tier Architecture** (v0.5.0+):
|
|
39
|
+
|
|
40
|
+
1. **Library Tier** - Reusable design system components
|
|
41
|
+
2. **Application Tier** - Application-wide configuration
|
|
42
|
+
3. **Experience Tier** - Experience-specific views and flows
|
|
43
|
+
|
|
44
|
+
**Central Entity:** The **View** (routable screen) is the core modeling unit.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Entity Types
|
|
49
|
+
|
|
50
|
+
> **CLI Introspection:** Run `dr schema types ux` for the authoritative, always-current list of node types.
|
|
51
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
52
|
+
|
|
53
|
+
### Three-Tier Architecture (26 entities)
|
|
54
|
+
|
|
55
|
+
**Library Tier:**
|
|
56
|
+
|
|
57
|
+
- **UXLibrary** - Container for library components
|
|
58
|
+
- **LibraryComponent** - Reusable component (form-field, table, chart, card)
|
|
59
|
+
- **LibrarySubView** - Reusable component groupings
|
|
60
|
+
- **StatePattern** - Reusable state machine patterns
|
|
61
|
+
- **ActionPattern** - Reusable action definitions
|
|
62
|
+
|
|
63
|
+
**Application Tier:**
|
|
64
|
+
|
|
65
|
+
- **UXApplication** - Application-wide UX configuration
|
|
66
|
+
|
|
67
|
+
**Experience Tier:**
|
|
68
|
+
|
|
69
|
+
- **UXSpec** - Container for experience specification
|
|
70
|
+
- **View** - Routable screen/page
|
|
71
|
+
- **SubView** - Component grouping within view
|
|
72
|
+
- **ComponentInstance** - Instance of library component
|
|
73
|
+
- **ActionComponent** - Interactive element
|
|
74
|
+
- **ExperienceState** - State in state machine
|
|
75
|
+
- **StateAction** - Action during state lifecycle
|
|
76
|
+
- **StateTransition** - Transition between states
|
|
77
|
+
- **ValidationRule** - Client-side validation
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## When to Use This Skill
|
|
82
|
+
|
|
83
|
+
Activate when the user:
|
|
84
|
+
|
|
85
|
+
- Mentions "UX", "UI", "view", "screen", "component", "form"
|
|
86
|
+
- Wants to define user interfaces or user experiences
|
|
87
|
+
- Asks about state machines, transitions, or user flows
|
|
88
|
+
- Needs to model screens, forms, or interactive elements
|
|
89
|
+
- Wants to link UX to navigation, APIs, or business processes
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Cross-Layer Relationships
|
|
94
|
+
|
|
95
|
+
**Outgoing (UX → Other Layers):**
|
|
96
|
+
|
|
97
|
+
- `motivation.*` → Motivation Layer (UX supports goals)
|
|
98
|
+
- `business.*` → Business Layer (UX realizes business processes)
|
|
99
|
+
- `api.*` → API Layer (API calls from components)
|
|
100
|
+
- `data.*` → Data Model Layer (form validation rules)
|
|
101
|
+
- `navigation.*` → Navigation Layer (routing to views)
|
|
102
|
+
|
|
103
|
+
**Incoming (Other Layers → UX):**
|
|
104
|
+
|
|
105
|
+
- Navigation Layer → UX (routes point to views)
|
|
106
|
+
- Business Layer → UX (business processes trigger UX flows)
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Design Best Practices
|
|
111
|
+
|
|
112
|
+
1. **Reusability** - Use library components for consistency
|
|
113
|
+
2. **State machines** - Model complex flows with states/transitions
|
|
114
|
+
3. **Validation** - Add client-side validation rules
|
|
115
|
+
4. **Accessibility** - Consider accessibility requirements
|
|
116
|
+
5. **Responsive** - Design for multiple screen sizes
|
|
117
|
+
6. **Performance** - Set performance targets (load time, interaction latency)
|
|
118
|
+
7. **Error handling** - Define error states and messages
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Common Commands
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Add view
|
|
126
|
+
dr add ux view --name "User Profile" --property route=/profile
|
|
127
|
+
|
|
128
|
+
# Add component instance
|
|
129
|
+
dr add ux component-instance --name "Profile Form"
|
|
130
|
+
|
|
131
|
+
# List views
|
|
132
|
+
dr list ux view
|
|
133
|
+
|
|
134
|
+
# Validate UX layer
|
|
135
|
+
dr validate --layer ux
|
|
136
|
+
|
|
137
|
+
# Export UX documentation
|
|
138
|
+
dr export --layer ux --format markdown
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Example: Login View
|
|
144
|
+
|
|
145
|
+
```yaml
|
|
146
|
+
id: ux.view.login
|
|
147
|
+
name: "Login View"
|
|
148
|
+
type: view
|
|
149
|
+
properties:
|
|
150
|
+
route: /login
|
|
151
|
+
layout:
|
|
152
|
+
type: centered
|
|
153
|
+
maxWidth: 400px
|
|
154
|
+
components:
|
|
155
|
+
- id: login-form
|
|
156
|
+
componentRef: library.component.form-field
|
|
157
|
+
dataBinding:
|
|
158
|
+
source: api.operation.login
|
|
159
|
+
submitAction: POST /api/auth/login
|
|
160
|
+
fields:
|
|
161
|
+
- name: email
|
|
162
|
+
type: email
|
|
163
|
+
required: true
|
|
164
|
+
validation:
|
|
165
|
+
- type: email-format
|
|
166
|
+
- type: required
|
|
167
|
+
- name: password
|
|
168
|
+
type: password
|
|
169
|
+
required: true
|
|
170
|
+
validation:
|
|
171
|
+
- type: min-length
|
|
172
|
+
value: 8
|
|
173
|
+
actions:
|
|
174
|
+
- id: submit-button
|
|
175
|
+
type: button
|
|
176
|
+
label: "Login"
|
|
177
|
+
action: submit-form
|
|
178
|
+
target: login-form
|
|
179
|
+
- id: forgot-password
|
|
180
|
+
type: link
|
|
181
|
+
label: "Forgot password?"
|
|
182
|
+
navigation: /forgot-password
|
|
183
|
+
states:
|
|
184
|
+
- id: idle
|
|
185
|
+
initial: true
|
|
186
|
+
onEnter: []
|
|
187
|
+
- id: submitting
|
|
188
|
+
onEnter:
|
|
189
|
+
- action: disable-form
|
|
190
|
+
- action: show-spinner
|
|
191
|
+
- id: success
|
|
192
|
+
onEnter:
|
|
193
|
+
- action: navigate
|
|
194
|
+
target: /dashboard
|
|
195
|
+
- id: error
|
|
196
|
+
onEnter:
|
|
197
|
+
- action: show-error
|
|
198
|
+
- action: enable-form
|
|
199
|
+
transitions:
|
|
200
|
+
- from: idle
|
|
201
|
+
to: submitting
|
|
202
|
+
trigger: submit
|
|
203
|
+
- from: submitting
|
|
204
|
+
to: success
|
|
205
|
+
trigger: success
|
|
206
|
+
- from: submitting
|
|
207
|
+
to: error
|
|
208
|
+
trigger: failure
|
|
209
|
+
- from: error
|
|
210
|
+
to: idle
|
|
211
|
+
trigger: retry
|
|
212
|
+
motivation:
|
|
213
|
+
supports-goals:
|
|
214
|
+
- motivation.goal.user-authentication
|
|
215
|
+
api:
|
|
216
|
+
operationId: login
|
|
217
|
+
navigation:
|
|
218
|
+
route-ref: navigation.route.login
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Pitfalls to Avoid
|
|
224
|
+
|
|
225
|
+
- ❌ Not using library components (inconsistent UX)
|
|
226
|
+
- ❌ Missing validation rules (poor user experience)
|
|
227
|
+
- ❌ Complex state machines without documentation
|
|
228
|
+
- ❌ Not linking to API operations or navigation routes
|
|
229
|
+
- ❌ Missing error states and handling
|
|
230
|
+
- ❌ No performance targets defined
|