@documentation-robotics/cli 0.1.0 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +466 -693
- package/dist/analysis/data-model-analyzer.js +189 -0
- package/dist/analysis/data-model-analyzer.js.map +7 -0
- package/dist/analysis/index.js +3 -0
- package/dist/analysis/index.js.map +7 -0
- package/dist/analysis/relationship-classifier.js +181 -0
- package/dist/analysis/relationship-classifier.js.map +7 -0
- package/dist/analyzers/base-analyzer.js +1 -0
- package/dist/analyzers/base-analyzer.js.map +7 -0
- package/dist/analyzers/call-graph-utils.js +39 -0
- package/dist/analyzers/call-graph-utils.js.map +7 -0
- package/dist/analyzers/cbm-analyzer.js +1205 -0
- package/dist/analyzers/cbm-analyzer.js.map +7 -0
- package/dist/analyzers/heuristic-utils.js +55 -0
- package/dist/analyzers/heuristic-utils.js.map +7 -0
- package/dist/analyzers/mapping-loader.js +146 -0
- package/dist/analyzers/mapping-loader.js.map +7 -0
- package/dist/analyzers/registry.js +124 -0
- package/dist/analyzers/registry.js.map +7 -0
- package/dist/analyzers/session-state.js +176 -0
- package/dist/analyzers/session-state.js.map +7 -0
- package/dist/analyzers/stdio-client.js +208 -0
- package/dist/analyzers/stdio-client.js.map +7 -0
- package/dist/analyzers/types.js +15 -0
- package/dist/analyzers/types.js.map +7 -0
- package/dist/analyzers/verify-engine.js +209 -0
- package/dist/analyzers/verify-engine.js.map +7 -0
- package/dist/analyzers/verify-ignore.js +130 -0
- package/dist/analyzers/verify-ignore.js.map +7 -0
- package/dist/analyzers/version.js +8 -0
- package/dist/analyzers/version.js.map +7 -0
- package/dist/audit/ai/runner.js +41 -0
- package/dist/audit/ai/runner.js.map +7 -0
- package/dist/audit/differential-analyzer.js +183 -0
- package/dist/audit/differential-analyzer.js.map +7 -0
- package/dist/audit/index.js +32 -0
- package/dist/audit/index.js.map +7 -0
- package/dist/audit/nodes/ai/evaluator.js +49 -0
- package/dist/audit/nodes/ai/evaluator.js.map +7 -0
- package/dist/audit/nodes/ai/parser.js +55 -0
- package/dist/audit/nodes/ai/parser.js.map +7 -0
- package/dist/audit/nodes/ai/prompts.js +103 -0
- package/dist/audit/nodes/ai/prompts.js.map +7 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js +32 -0
- package/dist/audit/nodes/analysis/node-completeness-checker.js.map +7 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js +47 -0
- package/dist/audit/nodes/analysis/node-definition-analyzer.js.map +7 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js +79 -0
- package/dist/audit/nodes/analysis/node-overlap-detector.js.map +7 -0
- package/dist/audit/nodes/model/orchestrator.js +82 -0
- package/dist/audit/nodes/model/orchestrator.js.map +7 -0
- package/dist/audit/nodes/spec/loader.js +116 -0
- package/dist/audit/nodes/spec/loader.js.map +7 -0
- package/dist/audit/nodes/spec/orchestrator.js +68 -0
- package/dist/audit/nodes/spec/orchestrator.js.map +7 -0
- package/dist/audit/nodes/types.js +1 -0
- package/dist/audit/nodes/types.js.map +7 -0
- package/dist/audit/pipeline/index.js +5 -0
- package/dist/audit/pipeline/index.js.map +7 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js +218 -0
- package/dist/audit/pipeline/pipeline-orchestrator.js.map +7 -0
- package/dist/audit/relationships/ai/evaluator.js +235 -0
- package/dist/audit/relationships/ai/evaluator.js.map +7 -0
- package/dist/audit/relationships/ai/parser.js +197 -0
- package/dist/audit/relationships/ai/parser.js.map +7 -0
- package/dist/audit/relationships/ai/prompts.js +274 -0
- package/dist/audit/relationships/ai/prompts.js.map +7 -0
- package/dist/audit/relationships/analysis/balance-assessor.js +115 -0
- package/dist/audit/relationships/analysis/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js +95 -0
- package/dist/audit/relationships/analysis/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js +99 -0
- package/dist/audit/relationships/analysis/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/analysis/layer-templates.js +294 -0
- package/dist/audit/relationships/analysis/layer-templates.js.map +7 -0
- package/dist/audit/relationships/graph/connectivity.js +129 -0
- package/dist/audit/relationships/graph/connectivity.js.map +7 -0
- package/dist/audit/relationships/graph/relationship-graph.js +179 -0
- package/dist/audit/relationships/graph/relationship-graph.js.map +7 -0
- package/dist/audit/relationships/model/balance-assessor.js +49 -0
- package/dist/audit/relationships/model/balance-assessor.js.map +7 -0
- package/dist/audit/relationships/model/coverage-analyzer.js +34 -0
- package/dist/audit/relationships/model/coverage-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/duplicate-detector.js +68 -0
- package/dist/audit/relationships/model/duplicate-detector.js.map +7 -0
- package/dist/audit/relationships/model/gap-analyzer.js +41 -0
- package/dist/audit/relationships/model/gap-analyzer.js.map +7 -0
- package/dist/audit/relationships/model/orchestrator.js +126 -0
- package/dist/audit/relationships/model/orchestrator.js.map +7 -0
- package/dist/audit/relationships/spec/orchestrator.js +157 -0
- package/dist/audit/relationships/spec/orchestrator.js.map +7 -0
- package/dist/audit/reports/index.js +5 -0
- package/dist/audit/reports/index.js.map +7 -0
- package/dist/audit/reports/report-generator.js +118 -0
- package/dist/audit/reports/report-generator.js.map +7 -0
- package/dist/audit/snapshot-storage.js +163 -0
- package/dist/audit/snapshot-storage.js.map +7 -0
- package/dist/audit/types.js +21 -0
- package/dist/audit/types.js.map +7 -0
- package/dist/cli.js +223 -92
- package/dist/cli.js.map +3 -3
- package/dist/coding-agents/agents/claude-code.js +147 -0
- package/dist/coding-agents/agents/claude-code.js.map +7 -0
- package/dist/coding-agents/agents/index.js +5 -0
- package/dist/coding-agents/agents/index.js.map +7 -0
- package/dist/coding-agents/agents/types.js +1 -0
- package/dist/coding-agents/agents/types.js.map +7 -0
- package/dist/coding-agents/base-chat-client.js +45 -0
- package/dist/coding-agents/base-chat-client.js.map +7 -0
- package/dist/coding-agents/chat-utils.js +23 -0
- package/dist/coding-agents/chat-utils.js.map +7 -0
- package/dist/coding-agents/claude-code-client.js +246 -0
- package/dist/coding-agents/claude-code-client.js.map +7 -0
- package/dist/coding-agents/copilot-client.js +209 -0
- package/dist/coding-agents/copilot-client.js.map +7 -0
- package/dist/commands/add.js +95 -33
- package/dist/commands/add.js.map +2 -2
- package/dist/commands/analyzer.js +511 -0
- package/dist/commands/analyzer.js.map +7 -0
- package/dist/commands/audit-diff.js +49 -0
- package/dist/commands/audit-diff.js.map +7 -0
- package/dist/commands/audit-snapshots.js +62 -0
- package/dist/commands/audit-snapshots.js.map +7 -0
- package/dist/commands/audit.js +81 -0
- package/dist/commands/audit.js.map +7 -0
- package/dist/commands/catalog.js +248 -0
- package/dist/commands/catalog.js.map +7 -0
- package/dist/commands/changeset.js +577 -66
- package/dist/commands/changeset.js.map +2 -2
- package/dist/commands/chat.js +106 -83
- package/dist/commands/chat.js.map +2 -2
- package/dist/commands/claude.js +74 -0
- package/dist/commands/claude.js.map +7 -0
- package/dist/commands/conformance.js +71 -68
- package/dist/commands/conformance.js.map +2 -2
- package/dist/commands/copilot.js +75 -0
- package/dist/commands/copilot.js.map +7 -0
- package/dist/commands/delete.js +125 -11
- package/dist/commands/delete.js.map +3 -3
- package/dist/commands/discover-logic.js +44 -0
- package/dist/commands/discover-logic.js.map +7 -0
- package/dist/commands/docs.js +87 -0
- package/dist/commands/docs.js.map +7 -0
- package/dist/commands/element.js +14 -20
- package/dist/commands/element.js.map +2 -2
- package/dist/commands/export.js +13 -3
- package/dist/commands/export.js.map +2 -2
- package/dist/commands/import.js +51 -0
- package/dist/commands/import.js.map +7 -0
- package/dist/commands/info.js +30 -24
- package/dist/commands/info.js.map +2 -2
- package/dist/commands/init.js +27 -11
- package/dist/commands/init.js.map +2 -2
- package/dist/commands/list.js +63 -13
- package/dist/commands/list.js.map +3 -3
- package/dist/commands/relationship.js +225 -37
- package/dist/commands/relationship.js.map +2 -2
- package/dist/commands/report.js +54 -0
- package/dist/commands/report.js.map +7 -0
- package/dist/commands/reports.js +45 -0
- package/dist/commands/reports.js.map +7 -0
- package/dist/commands/schema.js +135 -0
- package/dist/commands/schema.js.map +7 -0
- package/dist/commands/search.js +40 -12
- package/dist/commands/search.js.map +2 -2
- package/dist/commands/show.js +58 -27
- package/dist/commands/show.js.map +2 -2
- package/dist/commands/stats.js +35 -0
- package/dist/commands/stats.js.map +7 -0
- package/dist/commands/trace.js +39 -16
- package/dist/commands/trace.js.map +2 -2
- package/dist/commands/update.js +141 -14
- package/dist/commands/update.js.map +2 -2
- package/dist/commands/upgrade.js +210 -46
- package/dist/commands/upgrade.js.map +3 -3
- package/dist/commands/validate.js +142 -23
- package/dist/commands/validate.js.map +3 -3
- package/dist/commands/version.js +8 -12
- package/dist/commands/version.js.map +2 -2
- package/dist/commands/visualize.js +162 -25
- package/dist/commands/visualize.js.map +2 -2
- package/dist/core/base-snapshot-manager.js +84 -0
- package/dist/core/base-snapshot-manager.js.map +7 -0
- package/dist/core/changeset-exporter.js +305 -0
- package/dist/core/changeset-exporter.js.map +7 -0
- package/dist/core/changeset-validator.js +41 -0
- package/dist/core/changeset-validator.js.map +7 -0
- package/dist/core/changeset.js +88 -173
- package/dist/core/changeset.js.map +2 -2
- package/dist/core/dependency-tracker.js +4 -2
- package/dist/core/dependency-tracker.js.map +2 -2
- package/dist/core/element.js +98 -27
- package/dist/core/element.js.map +2 -2
- package/dist/core/golden-copy-cache.js +290 -0
- package/dist/core/golden-copy-cache.js.map +7 -0
- package/dist/core/graph-model.js +266 -0
- package/dist/core/graph-model.js.map +7 -0
- package/dist/core/layer.js +159 -16
- package/dist/core/layer.js.map +2 -2
- package/dist/core/layers.js +32 -0
- package/dist/core/layers.js.map +7 -0
- package/dist/core/manifest.js +32 -11
- package/dist/core/manifest.js.map +2 -2
- package/dist/core/migration-registry.js +56 -1
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model.js +424 -217
- package/dist/core/model.js.map +3 -3
- package/dist/core/mutation-handler.js +179 -0
- package/dist/core/mutation-handler.js.map +7 -0
- package/dist/core/reference-registry.js +29 -21
- package/dist/core/reference-registry.js.map +2 -2
- package/dist/core/relationship-catalog.js +189 -0
- package/dist/core/relationship-catalog.js.map +7 -0
- package/dist/core/relationship-registry.js.map +2 -2
- package/dist/core/relationships.js.map +1 -1
- package/dist/core/report-data-model.js +285 -0
- package/dist/core/report-data-model.js.map +7 -0
- package/dist/core/spec-data-service.js +185 -0
- package/dist/core/spec-data-service.js.map +7 -0
- package/dist/core/spec-loader-types.js +1 -0
- package/dist/core/spec-loader-types.js.map +7 -0
- package/dist/core/spec-loader.js +234 -0
- package/dist/core/spec-loader.js.map +7 -0
- package/dist/core/staged-changeset-storage.js +282 -0
- package/dist/core/staged-changeset-storage.js.map +7 -0
- package/dist/core/staging-area.js +1002 -0
- package/dist/core/staging-area.js.map +7 -0
- package/dist/core/stats-collector.js +169 -0
- package/dist/core/stats-collector.js.map +7 -0
- package/dist/core/virtual-projection.js +443 -0
- package/dist/core/virtual-projection.js.map +7 -0
- package/dist/export/archimate-exporter.js +99 -60
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/export/audit-formatters.js +479 -0
- package/dist/export/audit-formatters.js.map +7 -0
- package/dist/export/diff-formatters.js +99 -0
- package/dist/export/diff-formatters.js.map +7 -0
- package/dist/export/export-manager.js.map +2 -2
- package/dist/export/graphml-exporter.js +44 -27
- package/dist/export/graphml-exporter.js.map +2 -2
- package/dist/export/index.js +4 -0
- package/dist/export/index.js.map +2 -2
- package/dist/export/json-schema-exporter.js +55 -42
- package/dist/export/json-schema-exporter.js.map +2 -2
- package/dist/export/markdown-exporter.js +92 -70
- package/dist/export/markdown-exporter.js.map +2 -2
- package/dist/export/markdown-generator.js +248 -0
- package/dist/export/markdown-generator.js.map +7 -0
- package/dist/export/markdown-utils.js +30 -0
- package/dist/export/markdown-utils.js.map +7 -0
- package/dist/export/mermaid-markdown-exporter.js +37 -0
- package/dist/export/mermaid-markdown-exporter.js.map +7 -0
- package/dist/export/openapi-exporter.js +119 -71
- package/dist/export/openapi-exporter.js.map +2 -2
- package/dist/export/plantuml-exporter.js +104 -39
- package/dist/export/plantuml-exporter.js.map +2 -2
- package/dist/export/report-formatters.js +111 -0
- package/dist/export/report-formatters.js.map +7 -0
- package/dist/export/stats-formatters.js +98 -0
- package/dist/export/stats-formatters.js.map +7 -0
- package/dist/export/types.js +2 -14
- package/dist/export/types.js.map +2 -2
- package/dist/export/verify-formatters.js +153 -0
- package/dist/export/verify-formatters.js.map +7 -0
- package/dist/generated/compiled-validators.js +17 -0
- package/dist/generated/compiled-validators.js.map +7 -0
- package/dist/generated/index.js +31 -0
- package/dist/generated/index.js.map +7 -0
- package/dist/generated/layer-registry.js +190 -0
- package/dist/generated/layer-registry.js.map +7 -0
- package/dist/generated/layer-types.js +7 -0
- package/dist/generated/layer-types.js.map +7 -0
- package/dist/generated/node-types.js +1719 -0
- package/dist/generated/node-types.js.map +7 -0
- package/dist/generated/relationship-index.js +14552 -0
- package/dist/generated/relationship-index.js.map +7 -0
- package/dist/import/archimate-importer.js +166 -0
- package/dist/import/archimate-importer.js.map +7 -0
- package/dist/import/index.js +47 -0
- package/dist/import/index.js.map +7 -0
- package/dist/import/openapi-importer.js +143 -0
- package/dist/import/openapi-importer.js.map +7 -0
- package/dist/import/types.js +1 -0
- package/dist/import/types.js.map +7 -0
- package/dist/integrations/base-manager.js +311 -0
- package/dist/integrations/base-manager.js.map +7 -0
- package/dist/integrations/claude-manager.js +360 -0
- package/dist/integrations/claude-manager.js.map +7 -0
- package/dist/integrations/claude_code/agents/dr-advisor.md +253 -0
- package/dist/integrations/claude_code/agents/dr-architect.md +278 -0
- package/dist/integrations/claude_code/agents/dr-extractor.md +286 -0
- package/dist/integrations/claude_code/commands/dr-changeset.md +657 -0
- package/dist/integrations/claude_code/commands/dr-design.md +373 -0
- package/dist/integrations/claude_code/commands/dr-info.md +132 -0
- package/dist/integrations/claude_code/commands/dr-init.md +251 -0
- package/dist/integrations/claude_code/commands/dr-map.md +936 -0
- package/dist/integrations/claude_code/commands/dr-model.md +493 -0
- package/dist/integrations/claude_code/commands/dr-relate.md +814 -0
- package/dist/integrations/claude_code/commands/dr-sync.md +279 -0
- package/dist/integrations/claude_code/commands/dr-validate.md +654 -0
- package/dist/integrations/claude_code/commands/dr-verify.md +559 -0
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +903 -0
- package/dist/integrations/claude_code/docs/QUICK_START.md +271 -0
- package/dist/integrations/claude_code/docs/README.md +347 -0
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +550 -0
- package/dist/integrations/claude_code/skills/dr_02_business_layer/SKILL.md +620 -0
- package/dist/integrations/claude_code/skills/dr_03_security_layer/SKILL.md +642 -0
- package/dist/integrations/claude_code/skills/dr_04_application_layer/SKILL.md +911 -0
- package/dist/integrations/claude_code/skills/dr_05_technology_layer/SKILL.md +836 -0
- package/dist/integrations/claude_code/skills/dr_06_api_layer/SKILL.md +933 -0
- package/dist/integrations/claude_code/skills/dr_07_data_model_layer/SKILL.md +210 -0
- package/dist/integrations/claude_code/skills/dr_08_dataset_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_09_ux_layer/SKILL.md +319 -0
- package/dist/integrations/claude_code/skills/dr_10_navigation_layer/SKILL.md +318 -0
- package/dist/integrations/claude_code/skills/dr_11_apm_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_12_testing_layer/SKILL.md +273 -0
- package/dist/integrations/claude_code/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/claude_code/skills/dr_codebase_memory/SKILL.md +590 -0
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +295 -0
- package/dist/integrations/copilot-manager.js +328 -0
- package/dist/integrations/copilot-manager.js.map +7 -0
- package/dist/integrations/github_copilot/agents/dr-advisor.md +243 -0
- package/dist/integrations/github_copilot/agents/dr-architect.md +1567 -0
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +491 -0
- package/dist/integrations/github_copilot/skills/dr_02_business_layer/SKILL.md +539 -0
- package/dist/integrations/github_copilot/skills/dr_03_security_layer/SKILL.md +667 -0
- package/dist/integrations/github_copilot/skills/dr_04_application_layer/SKILL.md +670 -0
- package/dist/integrations/github_copilot/skills/dr_05_technology_layer/SKILL.md +660 -0
- package/dist/integrations/github_copilot/skills/dr_06_api_layer/SKILL.md +855 -0
- package/dist/integrations/github_copilot/skills/dr_07_data_model_layer/SKILL.md +171 -0
- package/dist/integrations/github_copilot/skills/dr_08_dataset_layer/SKILL.md +216 -0
- package/dist/integrations/github_copilot/skills/dr_09_ux_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_10_navigation_layer/SKILL.md +228 -0
- package/dist/integrations/github_copilot/skills/dr_11_apm_layer/SKILL.md +234 -0
- package/dist/integrations/github_copilot/skills/dr_12_testing_layer/SKILL.md +230 -0
- package/dist/integrations/github_copilot/skills/dr_changeset_reviewer/SKILL.md +187 -0
- package/dist/integrations/hash-utils.js +51 -0
- package/dist/integrations/hash-utils.js.map +7 -0
- package/dist/integrations/types.js +16 -0
- package/dist/integrations/types.js.map +7 -0
- package/dist/reports/model-layer-report-generator.js +278 -0
- package/dist/reports/model-layer-report-generator.js.map +7 -0
- package/dist/reports/model-report-data.js +57 -0
- package/dist/reports/model-report-data.js.map +7 -0
- package/dist/reports/model-report-orchestrator.js +103 -0
- package/dist/reports/model-report-orchestrator.js.map +7 -0
- package/dist/schemas/bundled/analyzers/cbm.json +595 -0
- package/dist/schemas/bundled/analyzers/manifest.json +9 -0
- package/dist/schemas/bundled/api.json +3411 -0
- package/dist/schemas/bundled/apm.json +2371 -0
- package/dist/schemas/bundled/application.json +1253 -0
- package/dist/schemas/bundled/base.json +1622 -0
- package/dist/schemas/bundled/business.json +1279 -0
- package/dist/schemas/bundled/data-model.json +1298 -0
- package/dist/schemas/bundled/data-store.json +2025 -0
- package/dist/schemas/bundled/manifest.json +93 -0
- package/dist/schemas/bundled/motivation.json +1360 -0
- package/dist/schemas/bundled/navigation.json +1874 -0
- package/dist/schemas/bundled/security.json +3488 -0
- package/dist/schemas/bundled/technology.json +2067 -0
- package/dist/schemas/bundled/testing.json +3120 -0
- package/dist/schemas/bundled/ux.json +3592 -0
- package/dist/server/schemas.js +202 -0
- package/dist/server/schemas.js.map +7 -0
- package/dist/server/server.js +1336 -252
- package/dist/server/server.js.map +3 -3
- package/dist/server/telemetry-middleware.js +22 -15
- package/dist/server/telemetry-middleware.js.map +2 -2
- package/dist/server-entry.js +65 -0
- package/dist/server-entry.js.map +7 -0
- package/dist/telemetry/config.js +89 -0
- package/dist/telemetry/config.js.map +7 -0
- package/dist/telemetry/console-interceptor.js.map +1 -1
- package/dist/telemetry/detect.js +24 -0
- package/dist/telemetry/detect.js.map +7 -0
- package/dist/telemetry/fetch-otlp-exporter.js +112 -0
- package/dist/telemetry/fetch-otlp-exporter.js.map +7 -0
- package/dist/telemetry/index.js +153 -3
- package/dist/telemetry/index.js.map +2 -2
- package/dist/telemetry/resilient-exporter.js +22 -8
- package/dist/telemetry/resilient-exporter.js.map +2 -2
- package/dist/telemetry/resilient-log-exporter.js +17 -8
- package/dist/telemetry/resilient-log-exporter.js.map +2 -2
- package/dist/telemetry/test-instrumentation.js.map +2 -2
- package/dist/types/index.js +84 -0
- package/dist/types/index.js.map +3 -3
- package/dist/types/source-reference.js +1 -0
- package/dist/types/source-reference.js.map +7 -0
- package/dist/utils/chat-logger.js +292 -0
- package/dist/utils/chat-logger.js.map +7 -0
- package/dist/utils/claude-stream.js +8 -0
- package/dist/utils/claude-stream.js.map +7 -0
- package/dist/utils/date-utils.js +7 -0
- package/dist/utils/date-utils.js.map +7 -0
- package/dist/utils/element-utils.js.map +1 -1
- package/dist/utils/errors.js +88 -15
- package/dist/utils/errors.js.map +3 -3
- package/dist/utils/export-python-annotations.js +82 -0
- package/dist/utils/export-python-annotations.js.map +7 -0
- package/dist/utils/file-io.js +7 -2
- package/dist/utils/file-io.js.map +2 -2
- package/dist/utils/file-lock.js +156 -0
- package/dist/utils/file-lock.js.map +7 -0
- package/dist/utils/id-generator.js +18 -0
- package/dist/utils/id-generator.js.map +7 -0
- package/dist/utils/layer-name-formatter.js +16 -0
- package/dist/utils/layer-name-formatter.js.map +7 -0
- package/dist/utils/markdown-anchor.js +7 -0
- package/dist/utils/markdown-anchor.js.map +7 -0
- package/dist/utils/markdown-link.js +12 -0
- package/dist/utils/markdown-link.js.map +7 -0
- package/dist/utils/markdown-table.js +17 -0
- package/dist/utils/markdown-table.js.map +7 -0
- package/dist/utils/mermaid-utils.js +11 -0
- package/dist/utils/mermaid-utils.js.map +7 -0
- package/dist/utils/project-paths.js.map +2 -2
- package/dist/utils/source-reference.js +52 -0
- package/dist/utils/source-reference.js.map +7 -0
- package/dist/utils/spec-installer.js +40 -53
- package/dist/utils/spec-installer.js.map +2 -2
- package/dist/utils/spec-version.js +5 -1
- package/dist/utils/spec-version.js.map +2 -2
- package/dist/utils/string-utils.js +12 -0
- package/dist/utils/string-utils.js.map +7 -0
- package/dist/utils/table-formatting.js +19 -0
- package/dist/utils/table-formatting.js.map +7 -0
- package/dist/validators/index.js +4 -0
- package/dist/validators/index.js.map +2 -2
- package/dist/validators/naming-validator.js +20 -23
- package/dist/validators/naming-validator.js.map +2 -2
- package/dist/validators/reference-validator.js +23 -38
- package/dist/validators/reference-validator.js.map +2 -2
- package/dist/validators/relationship-schema-validator.js +243 -0
- package/dist/validators/relationship-schema-validator.js.map +7 -0
- package/dist/validators/schema-validator.js +168 -68
- package/dist/validators/schema-validator.js.map +2 -2
- package/dist/validators/semantic-validator.js +36 -60
- package/dist/validators/semantic-validator.js.map +2 -2
- package/dist/validators/types.js.map +2 -2
- package/dist/validators/validation-formatter.js +159 -0
- package/dist/validators/validation-formatter.js.map +7 -0
- package/dist/validators/validator.js +24 -38
- package/dist/validators/validator.js.map +2 -2
- package/dist/viewer/README.md +139 -0
- package/dist/viewer/assets/main-CY0Xufuj.css +1 -0
- package/dist/viewer/assets/main-DtgErnwF.js +81 -0
- package/dist/viewer/assets/vendor-CxKvDp2x.js +17 -0
- package/dist/viewer/favicon.svg +11 -0
- package/dist/viewer/fonts/inter/Inter-Black.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Bold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Light.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Medium.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-Regular.woff2 +0 -0
- package/dist/viewer/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2 +0 -0
- package/dist/viewer/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2 +0 -0
- package/dist/viewer/index.html +15 -0
- package/dist/viewer/manifest.json +99 -0
- package/dist/viewer/version.json +1 -0
- package/package.json +42 -16
- package/PYTHON_CLI_PARITY.md +0 -265
- package/PYTHON_CLI_STRUCTURE_UPDATE.md +0 -246
- package/biome.json +0 -42
- package/bunfig.toml +0 -3
- package/dist/ai/claude-client.js +0 -71
- package/dist/ai/claude-client.js.map +0 -7
- package/dist/ai/context-provider.js +0 -129
- package/dist/ai/context-provider.js.map +0 -7
- package/dist/ai/tools.js +0 -231
- package/dist/ai/tools.js.map +0 -7
- package/dist/commands/migrate.js +0 -36
- package/dist/commands/migrate.js.map +0 -7
- package/dist/commands/project.js +0 -74
- package/dist/commands/project.js.map +0 -7
- package/dist/core/active-changeset.js +0 -52
- package/dist/core/active-changeset.js.map +0 -7
- package/dist/core/projection-engine.js +0 -288
- package/dist/core/projection-engine.js.map +0 -7
- package/dist/schemas/bundled/01-motivation-layer.schema.json +0 -942
- package/dist/schemas/bundled/02-business-layer.schema.json +0 -1293
- package/dist/schemas/bundled/03-security-layer.schema.json +0 -2177
- package/dist/schemas/bundled/04-application-layer.schema.json +0 -1328
- package/dist/schemas/bundled/05-technology-layer.schema.json +0 -1465
- package/dist/schemas/bundled/06-api-layer.schema.json +0 -1743
- package/dist/schemas/bundled/07-data-model-layer.schema.json +0 -1253
- package/dist/schemas/bundled/08-datastore-layer.schema.json +0 -892
- package/dist/schemas/bundled/09-ux-layer.schema.json +0 -1506
- package/dist/schemas/bundled/10-navigation-layer.schema.json +0 -843
- package/dist/schemas/bundled/11-apm-observability-layer.schema.json +0 -1430
- package/dist/schemas/bundled/12-testing-layer.schema.json +0 -1091
- package/dist/schemas/bundled/common/layer-extensions.schema.json +0 -266
- package/dist/schemas/bundled/common/predicates.schema.json +0 -493
- package/dist/schemas/bundled/common/relationships.schema.json +0 -791
- package/dist/schemas/bundled/common/source-references.schema.json +0 -71
- package/dist/schemas/bundled/link-registry.json +0 -1839
- package/dist/schemas/bundled/link-registry.schema.json +0 -339
- package/dist/schemas/bundled/relationship-catalog.json +0 -1302
- package/dist/schemas/bundled/relationship-type.schema.json +0 -221
- package/dist/utils/model-path.js +0 -22
- package/dist/utils/model-path.js.map +0 -7
- package/docs/TEST-INSTRUMENTATION.md +0 -405
- package/docs/telemetry.md +0 -427
- package/test-debug.js +0 -33
- package/test-special.mjs +0 -46
- package/test_runner.ts +0 -7
|
@@ -0,0 +1,228 @@
|
|
|
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.1
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Navigation Layer Skill
|
|
18
|
+
|
|
19
|
+
**Layer Number:** 10
|
|
20
|
+
**Specification:** Metadata Model Spec v0.8.1
|
|
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
|
+
- **ROUTES** - URL paths to views
|
|
30
|
+
- **GUARDS** - Authorization checks before navigation
|
|
31
|
+
- **FLOWS** - Multi-step navigation flows
|
|
32
|
+
- **TRANSITIONS** - Navigation between routes
|
|
33
|
+
- **REDIRECTS** - Conditional redirects
|
|
34
|
+
- **CONTEXT** - Navigation context variables
|
|
35
|
+
- **TRACKING** - Analytics and process tracking
|
|
36
|
+
|
|
37
|
+
This layer uses **Multi-Modal Navigation** supporting web, mobile, voice, and other modalities.
|
|
38
|
+
|
|
39
|
+
**Central Entity:** The **Route** (URL path to view) is the core modeling unit.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Entity Types
|
|
44
|
+
|
|
45
|
+
> **CLI Introspection:** Run `dr schema types navigation` for the authoritative, always-current list of node types.
|
|
46
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
47
|
+
|
|
48
|
+
### Core Navigation Entities (10 entities)
|
|
49
|
+
|
|
50
|
+
| Entity Type | Description |
|
|
51
|
+
| ------------------------ | ------------------------------------------ |
|
|
52
|
+
| **Route** | URL path mapped to view |
|
|
53
|
+
| **NavigationGuard** | Authorization/validation before navigation |
|
|
54
|
+
| **NavigationFlow** | Multi-step navigation sequence |
|
|
55
|
+
| **NavigationTransition** | Transition between routes |
|
|
56
|
+
| **FlowStep** | Step in navigation flow |
|
|
57
|
+
| **ContextVariable** | Navigation context data |
|
|
58
|
+
| **DataMapping** | Data passing between routes |
|
|
59
|
+
| **NotificationAction** | Navigation-triggered notifications |
|
|
60
|
+
| **ProcessTracking** | Business process tracking |
|
|
61
|
+
| **FlowAnalytics** | Navigation analytics |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## When to Use This Skill
|
|
66
|
+
|
|
67
|
+
Activate when the user:
|
|
68
|
+
|
|
69
|
+
- Mentions "navigation", "routing", "routes", "flows"
|
|
70
|
+
- Wants to define URL paths or route guards
|
|
71
|
+
- Asks about multi-step flows or navigation transitions
|
|
72
|
+
- Needs to model navigation between screens
|
|
73
|
+
- Wants to link navigation to UX views or business processes
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Cross-Layer Relationships
|
|
78
|
+
|
|
79
|
+
**Outgoing (Navigation → Other Layers):**
|
|
80
|
+
|
|
81
|
+
- `view-ref` → UX Layer (which view does this route show?)
|
|
82
|
+
- `business.realizes-process` → Business Layer (what process does this flow realize?)
|
|
83
|
+
- `security.required-roles` → Security Layer (authorization requirements)
|
|
84
|
+
- `apm.flow-metrics` → APM Layer (navigation analytics)
|
|
85
|
+
|
|
86
|
+
**Incoming (Other Layers → Navigation):**
|
|
87
|
+
|
|
88
|
+
- UX Layer → Navigation (views reference routes)
|
|
89
|
+
- Business Layer → Navigation (processes trigger flows)
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Design Best Practices
|
|
94
|
+
|
|
95
|
+
1. **Guards** - Add navigation guards for protected routes
|
|
96
|
+
2. **Context** - Pass necessary context between routes
|
|
97
|
+
3. **Analytics** - Track navigation flows for insights
|
|
98
|
+
4. **Error handling** - Define fallback routes for errors
|
|
99
|
+
5. **Deep linking** - Support deep linking for all routes
|
|
100
|
+
6. **SEO** - Consider SEO requirements for public routes
|
|
101
|
+
7. **Performance** - Lazy-load routes when appropriate
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Common Commands
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Add route
|
|
109
|
+
dr add navigation route --name "User Profile Route" --property path=/profile/:id
|
|
110
|
+
|
|
111
|
+
# Add navigation guard
|
|
112
|
+
dr add navigation navigation-guard --name "Auth Guard"
|
|
113
|
+
|
|
114
|
+
# Add navigation flow
|
|
115
|
+
dr add navigation navigation-flow --name "Checkout Flow"
|
|
116
|
+
|
|
117
|
+
# List routes
|
|
118
|
+
dr list navigation route
|
|
119
|
+
|
|
120
|
+
# Validate navigation layer
|
|
121
|
+
dr validate --layer navigation
|
|
122
|
+
|
|
123
|
+
# Export navigation map
|
|
124
|
+
dr export --layer navigation --format mermaid
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Example: Protected Profile Route
|
|
130
|
+
|
|
131
|
+
```yaml
|
|
132
|
+
id: navigation.route.user-profile
|
|
133
|
+
name: "User Profile Route"
|
|
134
|
+
type: route
|
|
135
|
+
properties:
|
|
136
|
+
path: /profile/:userId
|
|
137
|
+
view-ref: ux.view.user-profile
|
|
138
|
+
guards:
|
|
139
|
+
- navigation.guard.authentication
|
|
140
|
+
- navigation.guard.profile-ownership
|
|
141
|
+
parameters:
|
|
142
|
+
- name: userId
|
|
143
|
+
type: string
|
|
144
|
+
format: uuid
|
|
145
|
+
required: true
|
|
146
|
+
meta:
|
|
147
|
+
title: "User Profile"
|
|
148
|
+
requiresAuth: true
|
|
149
|
+
allowedRoles:
|
|
150
|
+
- user
|
|
151
|
+
- admin
|
|
152
|
+
contextVariables:
|
|
153
|
+
- name: currentUserId
|
|
154
|
+
source: auth.user.id
|
|
155
|
+
dataMapping:
|
|
156
|
+
- source: route.params.userId
|
|
157
|
+
target: view.data.userId
|
|
158
|
+
security:
|
|
159
|
+
required-roles:
|
|
160
|
+
- security.role.authenticated-user
|
|
161
|
+
business:
|
|
162
|
+
realizes-process: business.process.profile-management
|
|
163
|
+
apm:
|
|
164
|
+
flow-metrics:
|
|
165
|
+
- apm.metric.profile-view-count
|
|
166
|
+
- apm.metric.profile-load-time
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Example: Multi-Step Checkout Flow
|
|
172
|
+
|
|
173
|
+
```yaml
|
|
174
|
+
id: navigation.flow.checkout
|
|
175
|
+
name: "Checkout Flow"
|
|
176
|
+
type: navigation-flow
|
|
177
|
+
properties:
|
|
178
|
+
steps:
|
|
179
|
+
- id: cart-review
|
|
180
|
+
route: /checkout/cart
|
|
181
|
+
view: ux.view.cart-review
|
|
182
|
+
onNext: validate-cart
|
|
183
|
+
- id: shipping-address
|
|
184
|
+
route: /checkout/shipping
|
|
185
|
+
view: ux.view.shipping-form
|
|
186
|
+
onNext: validate-address
|
|
187
|
+
- id: payment
|
|
188
|
+
route: /checkout/payment
|
|
189
|
+
view: ux.view.payment-form
|
|
190
|
+
onNext: validate-payment
|
|
191
|
+
- id: confirmation
|
|
192
|
+
route: /checkout/confirm
|
|
193
|
+
view: ux.view.order-confirmation
|
|
194
|
+
final: true
|
|
195
|
+
transitions:
|
|
196
|
+
- from: cart-review
|
|
197
|
+
to: shipping-address
|
|
198
|
+
trigger: next-button
|
|
199
|
+
guard: cart-not-empty
|
|
200
|
+
- from: shipping-address
|
|
201
|
+
to: payment
|
|
202
|
+
trigger: next-button
|
|
203
|
+
guard: valid-address
|
|
204
|
+
- from: payment
|
|
205
|
+
to: confirmation
|
|
206
|
+
trigger: submit
|
|
207
|
+
guard: payment-successful
|
|
208
|
+
context:
|
|
209
|
+
- cartId
|
|
210
|
+
- selectedAddress
|
|
211
|
+
- paymentMethod
|
|
212
|
+
analytics:
|
|
213
|
+
trackStepCompletion: true
|
|
214
|
+
trackAbandonmentRate: true
|
|
215
|
+
business:
|
|
216
|
+
realizes-process: business.process.checkout
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Pitfalls to Avoid
|
|
222
|
+
|
|
223
|
+
- ❌ Missing authentication guards on protected routes
|
|
224
|
+
- ❌ Not validating route parameters
|
|
225
|
+
- ❌ Complex flows without clear step definitions
|
|
226
|
+
- ❌ Not tracking navigation analytics
|
|
227
|
+
- ❌ Missing cross-layer links to UX views
|
|
228
|
+
- ❌ No error/fallback routes defined
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_11_APM
|
|
3
|
+
description: Expert knowledge for APM (Observability) Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"APM",
|
|
7
|
+
"observability",
|
|
8
|
+
"monitoring",
|
|
9
|
+
"metrics",
|
|
10
|
+
"spans",
|
|
11
|
+
"traces",
|
|
12
|
+
"logs",
|
|
13
|
+
"OpenTelemetry",
|
|
14
|
+
"telemetry"
|
|
15
|
+
]
|
|
16
|
+
version: 0.8.1
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# APM Layer Skill
|
|
20
|
+
|
|
21
|
+
**Layer Number:** 11
|
|
22
|
+
**Specification:** Metadata Model Spec v0.8.1
|
|
23
|
+
**Purpose:** Defines observability using OpenTelemetry 1.0+, specifying traces, metrics, logs, and instrumentation.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Layer Overview
|
|
28
|
+
|
|
29
|
+
The APM Layer captures **application performance monitoring**:
|
|
30
|
+
|
|
31
|
+
- **TRACES** - Distributed tracing with spans
|
|
32
|
+
- **METRICS** - Performance and business metrics
|
|
33
|
+
- **LOGS** - Structured logging
|
|
34
|
+
- **INSTRUMENTATION** - Code instrumentation configuration
|
|
35
|
+
- **RESOURCES** - Telemetry resource attributes
|
|
36
|
+
- **SLOs/SLAs** - Service level objectives and agreements
|
|
37
|
+
|
|
38
|
+
This layer uses **OpenTelemetry 1.0+** (industry standard for observability).
|
|
39
|
+
|
|
40
|
+
**Central Entity:** The **Span** (unit of work in trace) is the core modeling unit.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Entity Types
|
|
45
|
+
|
|
46
|
+
> **CLI Introspection:** Run `dr schema types apm` for the authoritative, always-current list of node types.
|
|
47
|
+
> Run `dr schema node <type-id>` for full attribute details on any type.
|
|
48
|
+
|
|
49
|
+
### Core APM Entities (14 entities)
|
|
50
|
+
|
|
51
|
+
| Entity Type | Description |
|
|
52
|
+
| ------------------------ | --------------------------------------------- |
|
|
53
|
+
| **APMConfiguration** | Root configuration for observability |
|
|
54
|
+
| **TraceConfiguration** | Distributed tracing configuration |
|
|
55
|
+
| **Span** | Unit of work in distributed trace |
|
|
56
|
+
| **SpanEvent** | Timestamped event within span |
|
|
57
|
+
| **MetricConfiguration** | Metrics collection configuration |
|
|
58
|
+
| **MeterConfig** | Meter for metric instruments |
|
|
59
|
+
| **InstrumentConfig** | Metric instrument (counter, gauge, histogram) |
|
|
60
|
+
| **LogConfiguration** | Structured logging configuration |
|
|
61
|
+
| **LogRecord** | Individual log record |
|
|
62
|
+
| **Resource** | Telemetry resource attributes |
|
|
63
|
+
| **Attribute** | Key-value telemetry attribute |
|
|
64
|
+
| **InstrumentationScope** | Scope of instrumentation |
|
|
65
|
+
| **DataQualityMetric** | Data quality metrics |
|
|
66
|
+
| **DataQualityMetrics** | Collection of data quality metrics |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## When to Use This Skill
|
|
71
|
+
|
|
72
|
+
Activate when the user:
|
|
73
|
+
|
|
74
|
+
- Mentions "APM", "observability", "monitoring", "telemetry"
|
|
75
|
+
- Wants to add tracing, metrics, or logging
|
|
76
|
+
- Asks about performance monitoring or SLOs
|
|
77
|
+
- Needs to instrument code or track business metrics
|
|
78
|
+
- Wants to link observability to application services
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Cross-Layer Relationships
|
|
83
|
+
|
|
84
|
+
**Outgoing (APM → Other Layers):**
|
|
85
|
+
|
|
86
|
+
- `instrumented-service` → Application Layer (which service is being monitored?)
|
|
87
|
+
- `business-metrics` → Business Layer (business KPIs)
|
|
88
|
+
|
|
89
|
+
**Incoming (Other Layers → APM):**
|
|
90
|
+
|
|
91
|
+
- Application Layer → APM (services reference metrics)
|
|
92
|
+
- API Layer → APM (operations set SLA targets)
|
|
93
|
+
- Business Layer → APM (processes reference business metrics)
|
|
94
|
+
- Data Model Layer → APM (data quality metrics)
|
|
95
|
+
- Data Store Layer → APM (query performance metrics)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Observability Best Practices
|
|
100
|
+
|
|
101
|
+
1. **Traces** - Add spans for critical operations
|
|
102
|
+
2. **Metrics** - Track both technical and business metrics
|
|
103
|
+
3. **Logs** - Use structured logging (JSON)
|
|
104
|
+
4. **Context** - Propagate trace context across services
|
|
105
|
+
5. **Sampling** - Configure appropriate sampling rates
|
|
106
|
+
6. **SLOs** - Define service level objectives
|
|
107
|
+
7. **Alerting** - Set up alerts for critical metrics
|
|
108
|
+
8. **Cardinality** - Avoid high-cardinality attributes
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Common Commands
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Add span
|
|
116
|
+
dr add apm span --name "Process Order"
|
|
117
|
+
|
|
118
|
+
# Add metric
|
|
119
|
+
dr add apm instrument-config --name "order_rate" --property type=counter
|
|
120
|
+
|
|
121
|
+
# Add log record
|
|
122
|
+
dr add apm log-record --name "Error Log"
|
|
123
|
+
|
|
124
|
+
# List APM elements
|
|
125
|
+
dr list apm span
|
|
126
|
+
|
|
127
|
+
# Validate APM layer
|
|
128
|
+
dr validate --layer apm
|
|
129
|
+
|
|
130
|
+
# Export APM configuration
|
|
131
|
+
dr export --layer apm --format json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Example: Order Processing Span
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
id: apm.span.process-order
|
|
140
|
+
name: "Process Order Span"
|
|
141
|
+
type: span
|
|
142
|
+
properties:
|
|
143
|
+
spanKind: INTERNAL
|
|
144
|
+
operationName: process_order
|
|
145
|
+
attributes:
|
|
146
|
+
- key: order.id
|
|
147
|
+
type: string
|
|
148
|
+
- key: order.total
|
|
149
|
+
type: double
|
|
150
|
+
- key: customer.id
|
|
151
|
+
type: string
|
|
152
|
+
events:
|
|
153
|
+
- name: order_validated
|
|
154
|
+
timestamp: relative
|
|
155
|
+
- name: payment_processed
|
|
156
|
+
timestamp: relative
|
|
157
|
+
- name: inventory_reserved
|
|
158
|
+
timestamp: relative
|
|
159
|
+
instrumented-service: application.service.order-processing
|
|
160
|
+
business-metrics:
|
|
161
|
+
- apm.metric.orders-processed
|
|
162
|
+
- apm.metric.order-processing-time
|
|
163
|
+
sla-target-latency: 500ms
|
|
164
|
+
sla-target-availability: 99.9%
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Example: Business Metrics
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
id: apm.metric.order-rate
|
|
173
|
+
name: "Order Rate Metric"
|
|
174
|
+
type: instrument-config
|
|
175
|
+
properties:
|
|
176
|
+
instrumentType: counter
|
|
177
|
+
unit: orders
|
|
178
|
+
description: "Number of orders processed"
|
|
179
|
+
attributes:
|
|
180
|
+
- key: order.type
|
|
181
|
+
type: string
|
|
182
|
+
values: [standard, express, subscription]
|
|
183
|
+
- key: payment.method
|
|
184
|
+
type: string
|
|
185
|
+
values: [credit_card, paypal, bank_transfer]
|
|
186
|
+
business-context:
|
|
187
|
+
kpi: true
|
|
188
|
+
dashboard: revenue-dashboard
|
|
189
|
+
alerts:
|
|
190
|
+
- threshold: 100
|
|
191
|
+
condition: less-than
|
|
192
|
+
severity: warning
|
|
193
|
+
message: "Order rate below threshold"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Example: Data Quality Metrics
|
|
199
|
+
|
|
200
|
+
```yaml
|
|
201
|
+
id: apm.data-quality-metrics.user-data
|
|
202
|
+
name: "User Data Quality Metrics"
|
|
203
|
+
type: data-quality-metrics
|
|
204
|
+
properties:
|
|
205
|
+
entity: data_model.object-schema.user
|
|
206
|
+
metrics:
|
|
207
|
+
- name: completeness
|
|
208
|
+
type: gauge
|
|
209
|
+
description: "Percentage of non-null required fields"
|
|
210
|
+
target: 95%
|
|
211
|
+
- name: validity
|
|
212
|
+
type: gauge
|
|
213
|
+
description: "Percentage of records passing validation"
|
|
214
|
+
target: 99%
|
|
215
|
+
- name: uniqueness
|
|
216
|
+
type: gauge
|
|
217
|
+
description: "Percentage of unique email addresses"
|
|
218
|
+
target: 100%
|
|
219
|
+
- name: freshness
|
|
220
|
+
type: histogram
|
|
221
|
+
description: "Time since last update"
|
|
222
|
+
target: 24h
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Pitfalls to Avoid
|
|
228
|
+
|
|
229
|
+
- ❌ Not propagating trace context across services
|
|
230
|
+
- ❌ High-cardinality attributes (e.g., unique IDs in tags)
|
|
231
|
+
- ❌ Missing business metrics (only technical metrics)
|
|
232
|
+
- ❌ Not setting SLOs/SLAs
|
|
233
|
+
- ❌ Over-instrumentation (too many spans)
|
|
234
|
+
- ❌ Missing cross-layer links to instrumented services
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: LAYER_12_TESTING
|
|
3
|
+
description: Expert knowledge for Testing Layer modeling in Documentation Robotics
|
|
4
|
+
triggers:
|
|
5
|
+
[
|
|
6
|
+
"testing",
|
|
7
|
+
"test coverage",
|
|
8
|
+
"test case",
|
|
9
|
+
"input partition",
|
|
10
|
+
"ISP",
|
|
11
|
+
"test strategy",
|
|
12
|
+
"coverage model"
|
|
13
|
+
]
|
|
14
|
+
version: 0.8.1
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Testing Layer Skill
|
|
18
|
+
|
|
19
|
+
**Layer Number:** 12
|
|
20
|
+
**Specification:** Metadata Model Spec v0.8.1
|
|
21
|
+
**Purpose:** Defines test coverage using ISP (Input Space Partitioning) Coverage Model, specifying coverage requirements, test cases, and input partitions.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Layer Overview
|
|
26
|
+
|
|
27
|
+
The Testing Layer captures **test coverage strategy**:
|
|
28
|
+
|
|
29
|
+
- **COVERAGE MODELS** - Overall test coverage requirements
|
|
30
|
+
- **COVERAGE TARGETS** - What needs testing (APIs, features, data)
|
|
31
|
+
- **INPUT PARTITIONS** - Partition input space for systematic coverage
|
|
32
|
+
- **TEST CASES** - Concrete test case sketches
|
|
33
|
+
- **CONTEXT VARIATIONS** - Environmental and contextual variations
|
|
34
|
+
- **COVERAGE GAPS** - Identified gaps in coverage
|
|
35
|
+
|
|
36
|
+
This layer uses **ISP Coverage Model** (systematic input space partitioning).
|
|
37
|
+
|
|
38
|
+
**Central Entity:** The **TestCoverageModel** is the core modeling unit.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Entity Types
|
|
43
|
+
|
|
44
|
+
> **CLI Introspection:** Run `dr schema types testing` 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 Testing Entities (17 entities)
|
|
48
|
+
|
|
49
|
+
| Entity Type | Description |
|
|
50
|
+
| --------------------------- | ---------------------------------------- |
|
|
51
|
+
| **TestCoverageModel** | Root coverage model for system/component |
|
|
52
|
+
| **TestCoverageTarget** | What needs testing (API, feature, data) |
|
|
53
|
+
| **InputSpacePartition** | Partition of input space |
|
|
54
|
+
| **PartitionValue** | Value/range within partition |
|
|
55
|
+
| **InputPartitionSelection** | Selected partition values for coverage |
|
|
56
|
+
| **CoverageRequirement** | Specific coverage requirement |
|
|
57
|
+
| **TestCaseSketch** | High-level test case description |
|
|
58
|
+
| **OutcomeCategory** | Expected outcome categories |
|
|
59
|
+
| **ContextVariation** | Environmental/contextual variation |
|
|
60
|
+
| **EnvironmentFactor** | Environment-specific factor |
|
|
61
|
+
| **PartitionDependency** | Dependencies between partitions |
|
|
62
|
+
| **CoverageGap** | Identified gap in coverage |
|
|
63
|
+
| **CoverageExclusion** | Explicitly excluded coverage |
|
|
64
|
+
| **CoverageSummary** | Summary of coverage status |
|
|
65
|
+
| **TargetCoverageSummary** | Coverage summary for target |
|
|
66
|
+
| **TargetInputField** | Input field for target |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## When to Use This Skill
|
|
71
|
+
|
|
72
|
+
Activate when the user:
|
|
73
|
+
|
|
74
|
+
- Mentions "testing", "test coverage", "test cases", "ISP"
|
|
75
|
+
- Wants to define test strategy or coverage requirements
|
|
76
|
+
- Asks about input partitioning or systematic testing
|
|
77
|
+
- Needs to model test cases for APIs, features, or data
|
|
78
|
+
- Wants to link testing to requirements or business goals
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Cross-Layer Relationships
|
|
83
|
+
|
|
84
|
+
**Outgoing (Testing → Other Layers):**
|
|
85
|
+
|
|
86
|
+
- `motivation.supports-goals` → Motivation Layer (quality goals)
|
|
87
|
+
- `motivation.fulfills-requirements` → Motivation Layer (test requirements)
|
|
88
|
+
- `business.covers-process` → Business Layer (process coverage)
|
|
89
|
+
- `api.tests-operation` → API Layer (API endpoint testing)
|
|
90
|
+
- `data.validates-schema` → Data Model Layer (data validation)
|
|
91
|
+
- `ux.tests-view` → UX Layer (UI testing)
|
|
92
|
+
|
|
93
|
+
**Incoming (Other Layers → Testing):**
|
|
94
|
+
|
|
95
|
+
- Motivation Layer → Testing (requirements drive coverage)
|
|
96
|
+
- API Layer → Testing (operations need test coverage)
|
|
97
|
+
- Business Layer → Testing (processes need testing)
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Testing Best Practices
|
|
102
|
+
|
|
103
|
+
1. **Systematic partitioning** - Use ISP to partition input space
|
|
104
|
+
2. **Coverage criteria** - Define clear coverage criteria
|
|
105
|
+
3. **Context variations** - Test across different contexts
|
|
106
|
+
4. **Traceability** - Link tests to requirements and features
|
|
107
|
+
5. **Gap analysis** - Identify and document coverage gaps
|
|
108
|
+
6. **Exclusions** - Explicitly document what's not tested
|
|
109
|
+
7. **Outcome categories** - Define expected outcomes clearly
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Common Commands
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Add coverage model
|
|
117
|
+
dr add testing test-coverage-model --name "API Coverage Model"
|
|
118
|
+
|
|
119
|
+
# Add coverage target
|
|
120
|
+
dr add testing test-coverage-target --name "Login API Coverage"
|
|
121
|
+
|
|
122
|
+
# Add test case sketch
|
|
123
|
+
dr add testing test-case-sketch --name "Valid Login Test"
|
|
124
|
+
|
|
125
|
+
# List coverage models
|
|
126
|
+
dr list testing test-coverage-model
|
|
127
|
+
|
|
128
|
+
# Validate testing layer
|
|
129
|
+
dr validate --layer testing
|
|
130
|
+
|
|
131
|
+
# Export coverage report
|
|
132
|
+
dr export --layer testing --format markdown
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Example: Login API Coverage Model
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
id: testing.coverage-model.login-api
|
|
141
|
+
name: "Login API Coverage Model"
|
|
142
|
+
type: test-coverage-model
|
|
143
|
+
properties:
|
|
144
|
+
targets:
|
|
145
|
+
- testing.target.login-endpoint
|
|
146
|
+
coverageCriteria: each-choice
|
|
147
|
+
contextVariations:
|
|
148
|
+
- browser: [Chrome, Firefox, Safari]
|
|
149
|
+
- network: [high-speed, low-speed, offline]
|
|
150
|
+
- device: [desktop, mobile, tablet]
|
|
151
|
+
motivation:
|
|
152
|
+
supports-goals:
|
|
153
|
+
- motivation.goal.quality-assurance
|
|
154
|
+
fulfills-requirements:
|
|
155
|
+
- motivation.requirement.comprehensive-testing
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Example: Login Test Coverage Target
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
id: testing.target.login-endpoint
|
|
164
|
+
name: "Login Endpoint Coverage"
|
|
165
|
+
type: test-coverage-target
|
|
166
|
+
properties:
|
|
167
|
+
targetRef: api.operation.login
|
|
168
|
+
inputFields:
|
|
169
|
+
- name: email
|
|
170
|
+
partitions:
|
|
171
|
+
- valid-email: [user@example.com]
|
|
172
|
+
- invalid-format: [notanemail, @example.com]
|
|
173
|
+
- missing: [null, empty]
|
|
174
|
+
- name: password
|
|
175
|
+
partitions:
|
|
176
|
+
- valid-password: [StrongPass123!]
|
|
177
|
+
- weak-password: [123, abc]
|
|
178
|
+
- missing: [null, empty]
|
|
179
|
+
- too-long: [1000-char-string]
|
|
180
|
+
outcomeCategories:
|
|
181
|
+
- success: 200 OK with auth token
|
|
182
|
+
- invalid-credentials: 401 Unauthorized
|
|
183
|
+
- validation-error: 400 Bad Request
|
|
184
|
+
- rate-limited: 429 Too Many Requests
|
|
185
|
+
testCases:
|
|
186
|
+
- testing.test-case.valid-login
|
|
187
|
+
- testing.test-case.invalid-email
|
|
188
|
+
- testing.test-case.invalid-password
|
|
189
|
+
- testing.test-case.missing-credentials
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Example: Test Case Sketch
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
id: testing.test-case.valid-login
|
|
198
|
+
name: "Valid Login Test Case"
|
|
199
|
+
type: test-case-sketch
|
|
200
|
+
properties:
|
|
201
|
+
target: testing.target.login-endpoint
|
|
202
|
+
description: "Test successful login with valid credentials"
|
|
203
|
+
inputSelection:
|
|
204
|
+
email: valid-email
|
|
205
|
+
password: valid-password
|
|
206
|
+
contextSelection:
|
|
207
|
+
browser: Chrome
|
|
208
|
+
network: high-speed
|
|
209
|
+
device: desktop
|
|
210
|
+
expectedOutcome: success
|
|
211
|
+
expectedResponse:
|
|
212
|
+
status: 200
|
|
213
|
+
body:
|
|
214
|
+
token: JWT token present
|
|
215
|
+
user: User object with id and email
|
|
216
|
+
motivation:
|
|
217
|
+
supports-goals:
|
|
218
|
+
- motivation.goal.secure-authentication
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Pitfalls to Avoid
|
|
224
|
+
|
|
225
|
+
- ❌ Ad-hoc testing without systematic partitioning
|
|
226
|
+
- ❌ Missing context variations (only testing happy path)
|
|
227
|
+
- ❌ Not documenting coverage gaps
|
|
228
|
+
- ❌ No traceability to requirements
|
|
229
|
+
- ❌ Missing cross-layer links to tested elements
|
|
230
|
+
- ❌ Incomplete outcome categories
|