@documentation-robotics/cli 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -17
- package/dist/audit/nodes/ai/prompts.js +1 -0
- package/dist/audit/nodes/ai/prompts.js.map +2 -2
- package/dist/audit/relationships/ai/prompts.js +20 -29
- package/dist/audit/relationships/ai/prompts.js.map +2 -2
- package/dist/audit/relationships/analysis/gap-analyzer.js.map +1 -1
- package/dist/audit/relationships/analysis/layer-templates.js +36 -0
- package/dist/audit/relationships/analysis/layer-templates.js.map +2 -2
- package/dist/cli.js +8 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/reports.js +3 -3
- package/dist/commands/reports.js.map +1 -1
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/upgrade.js +1 -1
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/version.js +1 -1
- package/dist/commands/visualize.js +2 -8
- package/dist/commands/visualize.js.map +2 -2
- package/dist/core/layers.js +1 -0
- package/dist/core/layers.js.map +2 -2
- package/dist/core/migration-registry.js +59 -2
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model.js +3 -16
- package/dist/core/model.js.map +2 -2
- package/dist/core/spec-loader.js.map +1 -1
- package/dist/core/stats-collector.js +2 -0
- package/dist/core/stats-collector.js.map +2 -2
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/export/json-schema-exporter.js.map +1 -1
- package/dist/export/markdown-exporter.js.map +1 -1
- package/dist/export/markdown-utils.js +1 -0
- package/dist/export/markdown-utils.js.map +2 -2
- package/dist/export/mermaid-markdown-exporter.js.map +1 -1
- package/dist/export/openapi-exporter.js.map +1 -1
- package/dist/export/plantuml-exporter.js.map +1 -1
- package/dist/export/report-formatters.js +2 -2
- package/dist/export/report-formatters.js.map +1 -1
- package/dist/export/types.js +1 -0
- package/dist/export/types.js.map +2 -2
- package/dist/generated/layer-registry.js +44 -31
- package/dist/generated/layer-registry.js.map +2 -2
- package/dist/generated/layer-types.js +1 -1
- package/dist/generated/layer-types.js.map +2 -2
- package/dist/generated/node-types.js +45 -0
- package/dist/generated/node-types.js.map +2 -2
- package/dist/generated/relationship-index.js +201 -19
- package/dist/generated/relationship-index.js.map +2 -2
- package/dist/import/archimate-importer.js.map +1 -1
- package/dist/import/openapi-importer.js.map +1 -1
- package/dist/integrations/claude_code/agents/dr-advisor.md +14 -13
- package/dist/integrations/claude_code/agents/dr-extractor.md +2 -2
- package/dist/integrations/claude_code/commands/dr-info.md +1 -1
- package/dist/integrations/claude_code/commands/dr-init.md +3 -3
- package/dist/integrations/claude_code/commands/dr-map.md +2 -2
- package/dist/integrations/claude_code/commands/dr-model.md +1 -1
- package/dist/integrations/claude_code/commands/dr-relate.md +14 -4
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +3 -3
- package/dist/integrations/claude_code/docs/QUICK_START.md +1 -1
- package/dist/integrations/claude_code/docs/README.md +2 -2
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +2 -2
- package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +679 -0
- package/dist/integrations/claude_code/skills/{dr_08_dataset_layer → dr_09_dataset_layer}/SKILL.md +1 -1
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +2 -2
- package/dist/integrations/github_copilot/agents/dr-advisor.md +14 -13
- package/dist/integrations/github_copilot/agents/dr-architect.md +15 -14
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +2 -2
- package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +253 -0
- package/dist/reports/model-report-orchestrator.js +3 -3
- package/dist/reports/model-report-orchestrator.js.map +1 -1
- package/dist/schemas/bundled/analyzers/cbm.json +2 -2
- package/dist/schemas/bundled/analyzers/manifest.json +2 -2
- package/dist/schemas/bundled/api.json +3 -3
- package/dist/schemas/bundled/apm.json +3 -3
- package/dist/schemas/bundled/application.json +3 -3
- package/dist/schemas/bundled/base.json +29 -1
- package/dist/schemas/bundled/business.json +1 -1
- package/dist/schemas/bundled/data-model.json +3 -3
- package/dist/schemas/bundled/data-store.json +3 -3
- package/dist/schemas/bundled/manifest.json +20 -13
- package/dist/schemas/bundled/motivation.json +1 -1
- package/dist/schemas/bundled/navigation.json +3 -3
- package/dist/schemas/bundled/product.json +469 -0
- package/dist/schemas/bundled/security.json +3 -3
- package/dist/schemas/bundled/technology.json +3 -3
- package/dist/schemas/bundled/testing.json +3 -3
- package/dist/schemas/bundled/ux.json +3 -3
- package/dist/server/server.js +148 -101
- package/dist/server/server.js.map +2 -2
- package/dist/server-entry.js.map +2 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/utils/spec-installer.js +2 -2
- package/dist/utils/spec-installer.js.map +1 -1
- package/dist/utils/spec-version.js +1 -1
- package/dist/utils/spec-version.js.map +1 -1
- package/dist/viewer/README.md +6 -6
- package/dist/viewer/assets/main-D114QwJo.css +1 -0
- package/dist/viewer/assets/main-DyuokeQj.js +81 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer/manifest.json +10 -10
- package/dist/viewer/version.json +1 -1
- package/package.json +4 -1
- package/dist/viewer/assets/main-CY0Xufuj.css +0 -1
- package/dist/viewer/assets/main-DtgErnwF.js +0 -81
- /package/dist/integrations/claude_code/skills/{dr_03_security_layer → dr_04_security_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_04_application_layer → dr_05_application_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_05_technology_layer → dr_06_technology_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_06_api_layer → dr_07_api_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_07_data_model_layer → dr_08_data_model_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_09_ux_layer → dr_10_ux_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_10_navigation_layer → dr_11_navigation_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_11_apm_layer → dr_12_apm_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_12_testing_layer → dr_13_testing_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_03_security_layer → dr_04_security_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_04_application_layer → dr_05_application_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_05_technology_layer → dr_06_technology_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_06_api_layer → dr_07_api_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_07_data_model_layer → dr_08_data_model_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_08_dataset_layer → dr_09_dataset_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_09_ux_layer → dr_10_ux_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_10_navigation_layer → dr_11_navigation_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_11_apm_layer → dr_12_apm_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_12_testing_layer → dr_13_testing_layer}/SKILL.md +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/import/archimate-importer.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Model } from \"../core/model.js\";\nimport type { Importer, ImportOptions, ImportResult } from \"./types.js\";\nimport type { Span } from \"@opentelemetry/api\";\nimport { isTelemetryEnabled, startSpan, endSpan } from \"../telemetry/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { DOMParser } from \"@xmldom/xmldom\";\n\n/**\n * ArchiMate XML Importer for layers 1, 2,
|
|
4
|
+
"sourcesContent": ["import type { Model } from \"../core/model.js\";\nimport type { Importer, ImportOptions, ImportResult } from \"./types.js\";\nimport type { Span } from \"@opentelemetry/api\";\nimport { isTelemetryEnabled, startSpan, endSpan } from \"../telemetry/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { DOMParser } from \"@xmldom/xmldom\";\n\n/**\n * ArchiMate XML Importer for layers 1, 2, 5, 6\n * Parses ArchiMate 3.2 XML and creates graph nodes/edges\n */\nexport class ArchiMateImporter implements Importer {\n name = \"ArchiMate\";\n supportedFormats = [\"xml\"];\n\n async import(data: string, model: Model, _options: ImportOptions = {}): Promise<ImportResult> {\n const span: Span | null = isTelemetryEnabled ? startSpan(\"import.format.archimate\") : null;\n const result: ImportResult = {\n success: false,\n nodesAdded: 0,\n edgesAdded: 0,\n errorsCount: 0,\n errors: [],\n };\n\n try {\n // Validate merge strategy - only 'add' is supported\n if (_options.mergeStrategy && _options.mergeStrategy !== 'add') {\n result.errors.push({\n message: `ArchiMate importer only supports 'add' merge strategy. Requested: '${_options.mergeStrategy}'.`\n });\n result.errorsCount++;\n return result;\n }\n\n // Parse XML using @xmldom/xmldom (server-side DOM parser)\n const parser = new DOMParser();\n const xmlDoc = parser.parseFromString(data, \"application/xml\");\n\n if (xmlDoc.getElementsByTagName(\"parsererror\").length > 0) {\n result.errors.push({ message: \"Failed to parse XML: Invalid XML structure\" });\n result.errorsCount++;\n return result;\n }\n\n const modelElement = xmlDoc.documentElement;\n if (modelElement.tagName !== \"model\") {\n result.errors.push({ message: \"Root element must be 'model'\" });\n result.errorsCount++;\n return result;\n }\n\n // Parse elements\n const elementsElement = modelElement.getElementsByTagName(\"elements\")[0];\n if (!elementsElement) {\n result.errors.push({ message: \"No elements section found\" });\n result.errorsCount++;\n return result;\n }\n\n const elementNodes = elementsElement.getElementsByTagName(\"element\");\n const layerMap = new Map<string, string>(); // id -> layer mapping\n\n for (let i = 0; i < elementNodes.length; i++) {\n const elem = elementNodes[i];\n const id = elem.getAttribute(\"identifier\");\n const type = elem.getAttribute(\"xsi:type\") || \"Element\";\n const nameElement = elem.getElementsByTagName(\"name\")[0];\n const name = nameElement?.textContent || id || \"Unnamed\";\n const docElement = elem.getElementsByTagName(\"documentation\")[0];\n const description = docElement?.textContent || undefined;\n\n if (!id) {\n result.errors.push({ message: \"Element missing identifier attribute\" });\n result.errorsCount++;\n continue;\n }\n\n // Infer layer from ArchiMate type\n const layer = this.inferLayerFromType(type);\n if (!layer) {\n result.errors.push({\n message: `Unable to infer layer for ArchiMate type: ${type}`,\n element: id,\n });\n result.errorsCount++;\n continue;\n }\n\n // Extract properties\n const properties: Record<string, unknown> = {};\n const propsElement = elem.getElementsByTagName(\"properties\")[0];\n if (propsElement) {\n const propElements = propsElement.getElementsByTagName(\"property\");\n for (let j = 0; j < propElements.length; j++) {\n const prop = propElements[j];\n const key = prop.getAttribute(\"key\");\n const value = prop.getAttribute(\"value\");\n if (key && value !== null) {\n properties[key] = value;\n }\n }\n }\n\n // Create graph node\n const graphNode = {\n id,\n layer,\n type: this.mapArchiMateTypeToElementType(type, layer),\n name,\n description,\n properties,\n };\n\n model.graph.addNode(graphNode);\n layerMap.set(id, layer);\n result.nodesAdded++;\n }\n\n // Parse relationships\n const relationshipsElement = modelElement.getElementsByTagName(\"relationships\")[0];\n if (relationshipsElement) {\n const relElements = relationshipsElement.getElementsByTagName(\"relationship\");\n\n for (let i = 0; i < relElements.length; i++) {\n const rel = relElements[i];\n const id = rel.getAttribute(\"identifier\");\n const source = rel.getAttribute(\"source\");\n const target = rel.getAttribute(\"target\");\n const nameElement = rel.getElementsByTagName(\"name\")[0];\n const predicate = nameElement?.textContent || \"Association\";\n\n if (!id || !source || !target) {\n result.errors.push({\n message: \"Relationship missing required attributes (identifier, source, target)\",\n });\n result.errorsCount++;\n continue;\n }\n\n // Verify both nodes exist\n if (!model.graph.getNode(source) || !model.graph.getNode(target)) {\n result.errors.push({\n message: `Relationship references non-existent nodes: ${source} -> ${target}`,\n element: id,\n });\n result.errorsCount++;\n continue;\n }\n\n // Create graph edge\n const graphEdge = {\n id,\n source,\n destination: target,\n predicate,\n properties: {},\n };\n\n model.graph.addEdge(graphEdge);\n result.edgesAdded++;\n }\n }\n\n result.success = result.errorsCount === 0;\n\n if (isTelemetryEnabled && span) {\n span.setAttribute(\"import.nodesAdded\", result.nodesAdded);\n span.setAttribute(\"import.edgesAdded\", result.edgesAdded);\n span.setAttribute(\"import.errors\", result.errorsCount);\n span.setStatus({ code: result.success ? 0 : 1 });\n }\n\n return result;\n } catch (error) {\n result.errors.push({\n message: getErrorMessage(error),\n });\n result.errorsCount++;\n\n if (isTelemetryEnabled && span) {\n span.recordException(error as Error);\n span.setStatus({ code: 2, message: String(error) });\n }\n\n return result;\n } finally {\n endSpan(span);\n }\n }\n\n /**\n * Infer layer from ArchiMate element type\n */\n private inferLayerFromType(archimateType: string): string | undefined {\n // Motivation layer types\n const motivationTypes = [\n \"Stakeholder\",\n \"Driver\",\n \"Assessment\",\n \"Goal\",\n \"Outcome\",\n \"Principle\",\n \"Requirement\",\n \"Constraint\",\n ];\n if (motivationTypes.includes(archimateType)) return \"motivation\";\n\n // Business layer types\n const businessTypes = [\n \"BusinessActor\",\n \"BusinessRole\",\n \"BusinessCollaboration\",\n \"BusinessInterface\",\n \"BusinessProcess\",\n \"BusinessFunction\",\n \"BusinessInteraction\",\n \"BusinessEvent\",\n \"BusinessService\",\n \"BusinessObject\",\n ];\n if (businessTypes.includes(archimateType)) return \"business\";\n\n // Application layer types\n const applicationTypes = [\n \"ApplicationComponent\",\n \"ApplicationCollaboration\",\n \"ApplicationInterface\",\n \"ApplicationFunction\",\n \"ApplicationInteraction\",\n \"ApplicationProcess\",\n \"ApplicationEvent\",\n \"ApplicationService\",\n \"DataObject\",\n ];\n if (applicationTypes.includes(archimateType)) return \"application\";\n\n // Technology layer types\n const technologyTypes = [\n \"Node\",\n \"Device\",\n \"SystemSoftware\",\n \"TechnologyCollaboration\",\n \"TechnologyInterface\",\n \"Path\",\n \"CommunicationNetwork\",\n \"TechnologyFunction\",\n \"TechnologyProcess\",\n \"TechnologyInteraction\",\n \"TechnologyEvent\",\n \"TechnologyService\",\n \"Artifact\",\n ];\n if (technologyTypes.includes(archimateType)) return \"technology\";\n\n return undefined;\n }\n\n /**\n * Map ArchiMate type to element type (lowercase format)\n */\n private mapArchiMateTypeToElementType(archimateType: string, _layer: string): string {\n // Convert PascalCase to kebab-case\n const kebabCase = archimateType\n .replace(/([A-Z])/g, \"-$1\")\n .toLowerCase()\n .replace(/^-/, \"\");\n\n return kebabCase;\n }\n}\n"],
|
|
5
5
|
"mappings": "AAGA,SAAS,oBAAoB,WAAW,eAAe;AACvD,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAMpB,MAAO,kBAAiB;EAC5B,OAAO;EACP,mBAAmB,CAAC,KAAK;EAEzB,MAAM,OAAO,MAAc,OAAc,WAA0B,CAAA,GAAE;AACnE,UAAM,OAAoB,qBAAqB,UAAU,yBAAyB,IAAI,MAChF,SAAuB;MAC3B,SAAS;MACT,YAAY;MACZ,YAAY;MACZ,aAAa;MACb,QAAQ,CAAA;;AAGV,QAAI;AAEF,UAAI,SAAS,iBAAiB,SAAS,kBAAkB;AACvD,sBAAO,OAAO,KAAK;UACjB,SAAS,sEAAsE,SAAS,aAAa;SACtG,GACD,OAAO,eACA;AAKT,YAAM,SADS,IAAI,UAAS,EACN,gBAAgB,MAAM,iBAAiB;AAE7D,UAAI,OAAO,qBAAqB,aAAa,EAAE,SAAS;AACtD,sBAAO,OAAO,KAAK,EAAE,SAAS,6CAA4C,CAAE,GAC5E,OAAO,eACA;AAGT,YAAM,eAAe,OAAO;AAC5B,UAAI,aAAa,YAAY;AAC3B,sBAAO,OAAO,KAAK,EAAE,SAAS,+BAA8B,CAAE,GAC9D,OAAO,eACA;AAIT,YAAM,kBAAkB,aAAa,qBAAqB,UAAU,EAAE,CAAC;AACvE,UAAI,CAAC;AACH,sBAAO,OAAO,KAAK,EAAE,SAAS,4BAA2B,CAAE,GAC3D,O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A;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MAEgB,SAAS,aAAa;AAAG,aAAO;AAclD,QAXyB;MACvB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MAEmB,SAAS,aAAa;AAAG,aAAO;AAkBrD,QAfwB;MACtB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MAEkB,SAAS,aAAa;AAAG,aAAO;EAGtD;;;;EAKQ,8BAA8B,eAAuB,QAAc;AAOzE,WALkB,cACf,QAAQ,YAAY,KAAK,EACzB,YAAW,EACX,QAAQ,MAAM,EAAE;EAGrB;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/import/openapi-importer.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Model } from \"../core/model.js\";\nimport type { Importer, ImportOptions, ImportResult } from \"./types.js\";\nimport type { Span } from \"@opentelemetry/api\";\nimport { isTelemetryEnabled, startSpan, endSpan } from \"../telemetry/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\n\n/**\n * OpenAPI 3.0 Importer for layer
|
|
4
|
+
"sourcesContent": ["import type { Model } from \"../core/model.js\";\nimport type { Importer, ImportOptions, ImportResult } from \"./types.js\";\nimport type { Span } from \"@opentelemetry/api\";\nimport { isTelemetryEnabled, startSpan, endSpan } from \"../telemetry/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\n\n/**\n * OpenAPI 3.0 Importer for layer 7 (API)\n * Parses OpenAPI JSON specifications and creates graph nodes/edges\n */\nexport class OpenAPIImporter implements Importer {\n name = \"OpenAPI\";\n supportedFormats = [\"json\"];\n\n async import(data: string, model: Model, _options: ImportOptions = {}): Promise<ImportResult> {\n const span: Span | null = isTelemetryEnabled ? startSpan(\"import.format.openapi\") : null;\n const result: ImportResult = {\n success: false,\n nodesAdded: 0,\n edgesAdded: 0,\n errorsCount: 0,\n errors: [],\n };\n\n try {\n // Validate merge strategy - only 'add' is supported\n if (_options.mergeStrategy && _options.mergeStrategy !== 'add') {\n result.errors.push({\n message: `OpenAPI importer only supports 'add' merge strategy. Requested: '${_options.mergeStrategy}'.`\n });\n result.errorsCount++;\n return result;\n }\n\n // Parse JSON specification\n let spec: any;\n try {\n spec = JSON.parse(data);\n } catch (e) {\n result.errors.push({\n message: \"Failed to parse OpenAPI specification: Invalid JSON\",\n });\n result.errorsCount++;\n return result;\n }\n\n if (!spec.openapi && !spec.swagger) {\n result.errors.push({\n message: \"Not a valid OpenAPI specification (missing openapi or swagger field)\",\n });\n result.errorsCount++;\n return result;\n }\n\n // Create root document node with unique ID based on spec title\n const titlePart = (spec.info?.title || \"api\")\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\");\n const docNodeId = `api.openapi-document.${titlePart}`;\n const docNode = {\n id: docNodeId,\n layer: \"api\",\n type: \"openapi-document\",\n name: spec.info?.title || \"OpenAPI Document\",\n description: spec.info?.description,\n properties: {\n version: spec.info?.version || \"1.0.0\",\n servers: spec.servers || [],\n info: spec.info || {},\n },\n };\n\n model.graph.addNode(docNode);\n result.nodesAdded++;\n\n // Create endpoint nodes from paths\n if (spec.paths) {\n const pathEntries = Object.entries(spec.paths);\n for (const [pathName, pathSpec] of pathEntries) {\n const pathSpec_ = pathSpec as Record<string, any>;\n const methods = Object.keys(pathSpec_).filter((k) =>\n [\"get\", \"post\", \"put\", \"delete\", \"patch\", \"head\", \"options\"].includes(k)\n );\n\n for (const method of methods) {\n const operation = pathSpec_[method];\n const operationId =\n operation.operationId || `${method}-${pathName}`.replace(/[^a-zA-Z0-9-]/g, \"-\");\n const endpointId = `api.endpoint.${operationId}`;\n\n // Create endpoint node\n const endpointNode = {\n id: endpointId,\n layer: \"api\",\n type: \"endpoint\",\n name: operation.summary || `${method.toUpperCase()} ${pathName}`,\n description: operation.description,\n properties: {\n method: method.toUpperCase(),\n path: pathName,\n tags: operation.tags || [],\n parameters: operation.parameters || [],\n requestBody: operation.requestBody,\n responses: operation.responses || {},\n security: operation.security,\n deprecated: operation.deprecated || false,\n },\n };\n\n model.graph.addNode(endpointNode);\n result.nodesAdded++;\n\n // Create edge from document to endpoint\n const docEdge = {\n id: `${docNodeId}-composes-${endpointId}`,\n source: docNodeId,\n destination: endpointId,\n predicate: \"composes\",\n properties: {},\n };\n\n model.graph.addEdge(docEdge);\n result.edgesAdded++;\n }\n }\n }\n\n // Create schema nodes from components.schemas\n if (spec.components?.schemas) {\n const schemaEntries = Object.entries(spec.components.schemas);\n for (const [schemaName, schemaSpec] of schemaEntries) {\n const schemaId = `api.schema.${schemaName}`;\n\n const schemaNode = {\n id: schemaId,\n layer: \"api\",\n type: \"schema\",\n name: schemaName,\n description: (schemaSpec as Record<string, any>).description,\n properties: {\n schemaName,\n schema: schemaSpec,\n },\n };\n\n model.graph.addNode(schemaNode);\n result.nodesAdded++;\n\n // Create edge from document to schema\n const schemaEdge = {\n id: `${docNodeId}-contains-${schemaId}`,\n source: docNodeId,\n destination: schemaId,\n predicate: \"contains\",\n properties: {},\n };\n\n model.graph.addEdge(schemaEdge);\n result.edgesAdded++;\n }\n }\n\n // Create security scheme nodes from components.securitySchemes\n if (spec.components?.securitySchemes) {\n const schemeEntries = Object.entries(spec.components.securitySchemes);\n for (const [schemeName, schemeSpec] of schemeEntries) {\n const schemeId = `api.security-scheme.${schemeName}`;\n const schemeSpec_ = schemeSpec as Record<string, any>;\n\n const securityNode = {\n id: schemeId,\n layer: \"api\",\n type: \"security-scheme\",\n name: schemeName,\n description: schemeSpec_.description,\n properties: {\n type: schemeSpec_.type,\n scheme: schemeSpec_.scheme,\n bearerFormat: schemeSpec_.bearerFormat,\n flows: schemeSpec_.flows,\n openIdConnectUrl: schemeSpec_.openIdConnectUrl,\n },\n };\n\n model.graph.addNode(securityNode);\n result.nodesAdded++;\n\n // Create edge from document to security scheme\n const secEdge = {\n id: `${docNodeId}-uses-${schemeId}`,\n source: docNodeId,\n destination: schemeId,\n predicate: \"uses\",\n properties: {},\n };\n\n model.graph.addEdge(secEdge);\n result.edgesAdded++;\n }\n }\n\n result.success = result.errorsCount === 0;\n\n if (isTelemetryEnabled && span) {\n span.setAttribute(\"import.nodesAdded\", result.nodesAdded);\n span.setAttribute(\"import.edgesAdded\", result.edgesAdded);\n span.setAttribute(\"import.errors\", result.errorsCount);\n span.setStatus({ code: result.success ? 0 : 1 });\n }\n\n return result;\n } catch (error) {\n result.errors.push({\n message: getErrorMessage(error),\n });\n result.errorsCount++;\n\n if (isTelemetryEnabled && span) {\n span.recordException(error as Error);\n span.setStatus({ code: 2, message: String(error) });\n }\n\n return result;\n } finally {\n endSpan(span);\n }\n }\n}\n"],
|
|
5
5
|
"mappings": "AAGA,SAAS,oBAAoB,WAAW,eAAe;AACvD,SAAS,uBAAuB;AAM1B,MAAO,gBAAe;EAC1B,OAAO;EACP,mBAAmB,CAAC,MAAM;EAE1B,MAAM,OAAO,MAAc,OAAc,WAA0B,CAAA,GAAE;AACnE,UAAM,OAAoB,qBAAqB,UAAU,uBAAuB,IAAI,MAC9E,SAAuB;MAC3B,SAAS;MACT,YAAY;MACZ,YAAY;MACZ,aAAa;MACb,QAAQ,CAAA;;AAGV,QAAI;AAEF,UAAI,SAAS,iBAAiB,SAAS,kBAAkB;AACvD,sBAAO,OAAO,KAAK;UACjB,SAAS,oEAAoE,SAAS,aAAa;SACpG,GACD,OAAO,eACA;AAIT,UAAI;AACJ,UAAI;AACF,eAAO,KAAK,MAAM,IAAI;MACxB,QAAY;AACV,sBAAO,OAAO,KAAK;UACjB,SAAS;SACV,GACD,OAAO,eACA;MACT;AAEA,UAAI,CAAC,KAAK,WAAW,CAAC,KAAK;AACzB,sBAAO,OAAO,KAAK;UACjB,SAAS;SACV,GACD,OAAO,eACA;AAQT,YAAM,YAAY,yBAJC,KAAK,MAAM,SAAS,OACpC,YAAW,EACX,QAAQ,eAAe,GAAG,EAC1B,QAAQ,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,EAAE,MAAM,OAAO,UAAU,IAAI,EAAC,CAAE,IAG1C;IACT,SAAS,OAAO;AACd,oBAAO,OAAO,KAAK;QACjB,SAAS,gBAAgB,KAAK;OAC/B,GACD,OAAO,eAEH,sBAAsB,SACxB,KAAK,gBAAgB,KAAc,GACnC,KAAK,UAAU,EAAE,MAAM,GAAG,SAAS,OAAO,KAAK,EAAC,CAAE,IAG7C;IACT;AACE,cAAQ,IAAI;IACd;EACF;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -19,7 +19,7 @@ You are an expert advisor for **Documentation Robotics** end users, specializing
|
|
|
19
19
|
- Best practices for naming, organization, and structure
|
|
20
20
|
|
|
21
21
|
2. **Concept Explanation**: Provide clear explanations of:
|
|
22
|
-
- The
|
|
22
|
+
- The 13-layer architecture and what each layer represents
|
|
23
23
|
- Cross-layer relationship patterns (A, B, C, D)
|
|
24
24
|
- Intra-layer relationship types (34 semantic predicates)
|
|
25
25
|
- The purpose and benefits of changesets
|
|
@@ -99,7 +99,7 @@ You are an expert advisor for **Documentation Robotics** end users, specializing
|
|
|
99
99
|
|
|
100
100
|
**Be Precise**: Use correct DR terminology
|
|
101
101
|
|
|
102
|
-
-
|
|
102
|
+
- 13 layers, not "tiers" or "levels"
|
|
103
103
|
- "Relationships" not "links" (post-v0.8.2)
|
|
104
104
|
- Specific entity types (not generic terms)
|
|
105
105
|
- Correct field names and formats
|
|
@@ -119,21 +119,22 @@ You are an expert advisor for **Documentation Robotics** end users, specializing
|
|
|
119
119
|
|
|
120
120
|
## Key Knowledge Areas
|
|
121
121
|
|
|
122
|
-
### The
|
|
122
|
+
### The 13-Layer Architecture
|
|
123
123
|
|
|
124
124
|
```
|
|
125
125
|
01. Motivation - Goals, principles, requirements, constraints (WHY)
|
|
126
126
|
02. Business - Capabilities, processes, services, actors (WHAT)
|
|
127
|
-
03.
|
|
128
|
-
04.
|
|
129
|
-
05.
|
|
130
|
-
06.
|
|
131
|
-
07.
|
|
132
|
-
08. Data
|
|
133
|
-
09.
|
|
134
|
-
10.
|
|
135
|
-
11.
|
|
136
|
-
12.
|
|
127
|
+
03. Product - Personas, capabilities, features, workflows, milestones (PRODUCT)
|
|
128
|
+
04. Security - Roles, policies, threats, controls (WHO/PROTECTION)
|
|
129
|
+
05. Application - Components, services, interfaces (HOW)
|
|
130
|
+
06. Technology - Platforms, frameworks, infrastructure (WITH)
|
|
131
|
+
07. API - OpenAPI 3.0.3 specifications (CONTRACTS)
|
|
132
|
+
08. Data Model - JSON Schema Draft 7 structures (STRUCTURE)
|
|
133
|
+
09. Data Store - SQL DDL persistence (STORAGE)
|
|
134
|
+
10. UX - Three-Tier UI architecture (EXPERIENCE)
|
|
135
|
+
11. Navigation - Multi-modal routing (FLOW)
|
|
136
|
+
12. APM - OpenTelemetry observability (MONITORING)
|
|
137
|
+
13. Testing - ISP coverage model (VERIFICATION)
|
|
137
138
|
```
|
|
138
139
|
|
|
139
140
|
### Cross-Layer Relationship Patterns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dr-extractor
|
|
3
|
-
description: Specialized extraction agent for Documentation Robotics model creation from codebases. Analyzes source code to identify architectural elements across all
|
|
3
|
+
description: Specialized extraction agent for Documentation Robotics model creation from codebases. Analyzes source code to identify architectural elements across all 13 layers with mandatory source provenance tracking.
|
|
4
4
|
tools: Bash, Read, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ tools: Bash, Read, Glob, Grep
|
|
|
10
10
|
|
|
11
11
|
You are the **DR Extractor** — a code analysis specialist focused exclusively on extracting architectural elements from codebases and creating Documentation Robotics model entries. You operate entirely through the `dr add` command line interface, never creating YAML or JSON directly.
|
|
12
12
|
|
|
13
|
-
**Your sole responsibility**: Analyze source code, identify architectural elements (services, components, endpoints, data models, etc.) across all
|
|
13
|
+
**Your sole responsibility**: Analyze source code, identify architectural elements (services, components, endpoints, data models, etc.) across all 13 DR layers, and add them to the model using `dr add` commands with complete source provenance.
|
|
14
14
|
|
|
15
15
|
**Critical constraint**: Every element you create must include source file references, symbol mappings, and provenance type (extracted vs. inferred). This traceability is not optional — it enables drift detection, validation, and future synchronization between code and model.
|
|
16
16
|
|
|
@@ -12,7 +12,7 @@ Show an overview of the Documentation Robotics model: project metadata, layer na
|
|
|
12
12
|
Displays:
|
|
13
13
|
|
|
14
14
|
- Project name, version, spec version, author, description
|
|
15
|
-
- List of all
|
|
15
|
+
- List of all 13 layers with their element counts
|
|
16
16
|
- With `--layer <name>`: detailed view of a single layer
|
|
17
17
|
- With `--layer <name> --verbose`: per-type breakdown within that layer
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ Initialize a new Documentation Robotics architecture model in the current projec
|
|
|
12
12
|
1. Checks if a DR model already exists in the current directory
|
|
13
13
|
2. Prompts for project information (if not provided)
|
|
14
14
|
3. Runs `dr init` to create the model structure
|
|
15
|
-
4. Creates the
|
|
15
|
+
4. Creates the 13-layer directory structure
|
|
16
16
|
5. Initializes manifest, config, and projection rules
|
|
17
17
|
6. Installs Claude Code integration files (if not already present)
|
|
18
18
|
7. Provides next steps and guidance
|
|
@@ -60,7 +60,7 @@ Otherwise, ask the user for:
|
|
|
60
60
|
- No: Creates empty layer directories
|
|
61
61
|
|
|
62
62
|
3. **Template** (optional, default: basic)
|
|
63
|
-
- basic: Standard
|
|
63
|
+
- basic: Standard 13-layer structure
|
|
64
64
|
- minimal: Essential layers only
|
|
65
65
|
- full: Includes examples and documentation
|
|
66
66
|
|
|
@@ -79,7 +79,7 @@ Examples:
|
|
|
79
79
|
dr init --name "My Project"
|
|
80
80
|
|
|
81
81
|
# With description
|
|
82
|
-
dr init --name "My Project" --description "
|
|
82
|
+
dr init --name "My Project" --description "13-layer federated architecture model"
|
|
83
83
|
|
|
84
84
|
# With author
|
|
85
85
|
dr init --name "My Project" --author "Team A"
|
|
@@ -18,7 +18,7 @@ Analyze an existing codebase and automatically generate a Documentation Robotics
|
|
|
18
18
|
|
|
19
19
|
## Two Modes: Recipe vs. Targeted
|
|
20
20
|
|
|
21
|
-
**Recipe Mode** (default for new/empty models): Extracts all
|
|
21
|
+
**Recipe Mode** (default for new/empty models): Extracts all 13 layers in a prescribed bottom-up order with validation checkpoints between each layer. Best for building a complete model from scratch — ensures no layers are skipped and lower layers (infrastructure, data) are populated before higher layers (business, motivation) are inferred.
|
|
22
22
|
|
|
23
23
|
**Targeted Mode** (default if `--layers` is specified or model has existing elements): Extracts specific layers without step-by-step checkpoints. Best for focused extraction or incremental additions to an existing model.
|
|
24
24
|
|
|
@@ -59,7 +59,7 @@ I see this is a new model with no existing elements.
|
|
|
59
59
|
|
|
60
60
|
I can extract in two ways:
|
|
61
61
|
|
|
62
|
-
1. Recipe Mode (recommended) — Walks through all
|
|
62
|
+
1. Recipe Mode (recommended) — Walks through all 13 layers in the correct
|
|
63
63
|
architectural order, with checkpoints to review and validate each layer
|
|
64
64
|
before proceeding. Takes longer but produces a complete, well-structured model.
|
|
65
65
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Use natural language to add, update, or query architecture model elements across all
|
|
2
|
+
description: Use natural language to add, update, or query architecture model elements across all 13 layers
|
|
3
3
|
argument-hint: "<natural language request>"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -170,8 +170,15 @@ dr validate --orphans --output orphans.json
|
|
|
170
170
|
"type": "api.operation",
|
|
171
171
|
"status": "connectable",
|
|
172
172
|
"reachablePredicates": ["realizes", "references"],
|
|
173
|
-
"reachableTargetTypes": [
|
|
174
|
-
|
|
173
|
+
"reachableTargetTypes": [
|
|
174
|
+
"application.applicationfunction",
|
|
175
|
+
"application.applicationservice"
|
|
176
|
+
],
|
|
177
|
+
"needsTypes": [
|
|
178
|
+
"application.applicationfunction",
|
|
179
|
+
"application.applicationservice",
|
|
180
|
+
"business.businessprocess"
|
|
181
|
+
]
|
|
175
182
|
},
|
|
176
183
|
{
|
|
177
184
|
"id": "api.info.x",
|
|
@@ -189,7 +196,10 @@ dr validate --orphans --output orphans.json
|
|
|
189
196
|
"status": "connectable",
|
|
190
197
|
"reachablePredicates": ["serves", "accesses"],
|
|
191
198
|
"reachableTargetTypes": ["application.applicationservice"],
|
|
192
|
-
"needsTypes": [
|
|
199
|
+
"needsTypes": [
|
|
200
|
+
"application.applicationservice",
|
|
201
|
+
"data-store.collection"
|
|
202
|
+
]
|
|
193
203
|
}
|
|
194
204
|
]
|
|
195
205
|
}
|
|
@@ -252,7 +262,7 @@ Or per layer if a global list is unavailable:
|
|
|
252
262
|
```bash
|
|
253
263
|
dr list motivation --json
|
|
254
264
|
dr list business --json
|
|
255
|
-
# ... repeat for all
|
|
265
|
+
# ... repeat for all 13 layers
|
|
256
266
|
```
|
|
257
267
|
|
|
258
268
|
Build a table of populated layers — layers with at least 1 element:
|
|
@@ -110,7 +110,7 @@ dr init my-awesome-api
|
|
|
110
110
|
**What was created:**
|
|
111
111
|
|
|
112
112
|
- `documentation-robotics/model/manifest.yaml` — Project metadata
|
|
113
|
-
- `documentation-robotics/model/{NN}_{layer-name}/` — Empty layer directories for all
|
|
113
|
+
- `documentation-robotics/model/{NN}_{layer-name}/` — Empty layer directories for all 13 layers (e.g., `01_motivation/`, `02_business/`, `03_product/`, ..., `13_testing/`)
|
|
114
114
|
- `.dr/` — Local DR configuration directory
|
|
115
115
|
|
|
116
116
|
(Use `--verbose` to see additional details about the model setup)
|
|
@@ -285,7 +285,7 @@ I see this is a new model with no existing elements.
|
|
|
285
285
|
I can extract in two ways:
|
|
286
286
|
|
|
287
287
|
1. Recipe Mode (recommended)
|
|
288
|
-
Walks through all
|
|
288
|
+
Walks through all 13 layers in the correct architectural order,
|
|
289
289
|
with checkpoints to review and validate each layer before proceeding.
|
|
290
290
|
Takes longer but produces a complete, well-structured model.
|
|
291
291
|
|
|
@@ -748,7 +748,7 @@ dr analyzer index # Index the codebase (~2 minutes)
|
|
|
748
748
|
/dr-map ./src --tech "Python FastAPI PostgreSQL"
|
|
749
749
|
|
|
750
750
|
# At prompt: Select Recipe Mode
|
|
751
|
-
# Work through all
|
|
751
|
+
# Work through all 13 layers, validating at each checkpoint
|
|
752
752
|
# Take ~5-10 minutes to complete
|
|
753
753
|
|
|
754
754
|
# Step 4: Verify alignment
|
|
@@ -175,7 +175,7 @@ dr analyzer index
|
|
|
175
175
|
/dr-verify # Answer prompts interactively
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
**Pro tip:** Recipe Mode walks you through all
|
|
178
|
+
**Pro tip:** Recipe Mode walks you through all 13 layers with checkpoints. Most thorough approach.
|
|
179
179
|
|
|
180
180
|
---
|
|
181
181
|
|
|
@@ -72,7 +72,7 @@ The comprehensive manual walkthrough covering every step from fresh project thro
|
|
|
72
72
|
### Skills & Agents
|
|
73
73
|
|
|
74
74
|
- **[dr-codebase-memory/SKILL.md](../skills/dr_codebase_memory/SKILL.md)** — Codebase memory and context management
|
|
75
|
-
- Layer-specific skills (Layer 1-
|
|
75
|
+
- Layer-specific skills (Layer 1-13)
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
@@ -160,7 +160,7 @@ integrations/claude_code/
|
|
|
160
160
|
├── skills/ ← Specialized knowledge modules
|
|
161
161
|
│ ├── dr_codebase_memory/
|
|
162
162
|
│ ├── dr_01_motivation_layer/
|
|
163
|
-
│ ├── ... (all
|
|
163
|
+
│ ├── ... (all 13 layers)
|
|
164
164
|
│ └── dr_engineering_guide/
|
|
165
165
|
│
|
|
166
166
|
└── agents/ ← Specialized agents
|
|
@@ -27,7 +27,7 @@ version: 0.8.3
|
|
|
27
27
|
|
|
28
28
|
## Layer Overview
|
|
29
29
|
|
|
30
|
-
The Motivation Layer is the **highest layer** in the
|
|
30
|
+
The Motivation Layer is the **highest layer** in the 13-layer architecture and provides governance to all other layers. It describes:
|
|
31
31
|
|
|
32
32
|
- **WHY** - The reasons and drivers behind architectural decisions
|
|
33
33
|
- **WHO** - Stakeholders with interests in the outcome
|
|
@@ -165,7 +165,7 @@ IS this a semantic definition, interpretation, or piece of knowledge attached to
|
|
|
165
165
|
| **Layer 4 (Application)** | ApplicationService supports Goals, delivers Value, governed by Principles; ApplicationFunction fulfills Requirements |
|
|
166
166
|
| **Layer 5 (Technology)** | TechnologyService supports Goals, governed by Principles; Node fulfills Requirements, constrained by Constraints |
|
|
167
167
|
| **Layer 6 (API)** | Operation supports Goals (x-supports-goals), fulfills Requirements, governed by Principles, constrained by Constraints |
|
|
168
|
-
| **Layer 7-
|
|
168
|
+
| **Layer 7-13** | All layers can reference Principles, Constraints, Requirements, Goals for governance and traceability |
|
|
169
169
|
|
|
170
170
|
**Design Pattern:** Lower layers "look up" to the Motivation layer to justify WHY they exist and WHAT value they deliver.
|
|
171
171
|
|