micro-contracts 0.18.10 → 0.18.12

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.
Files changed (202) hide show
  1. package/README.md +7 -14
  2. package/cli-contract.yaml +15 -27
  3. package/dist/agents/context-builder.d.ts +5 -0
  4. package/dist/agents/context-builder.d.ts.map +1 -0
  5. package/dist/agents/context-builder.js +239 -0
  6. package/dist/agents/context-builder.js.map +1 -0
  7. package/dist/agents/formatter.d.ts +9 -0
  8. package/dist/agents/formatter.d.ts.map +1 -0
  9. package/dist/agents/formatter.js +124 -0
  10. package/dist/agents/formatter.js.map +1 -0
  11. package/dist/agents/index.d.ts +6 -0
  12. package/dist/agents/index.d.ts.map +1 -0
  13. package/dist/agents/index.js +4 -0
  14. package/dist/agents/index.js.map +1 -0
  15. package/dist/agents/orchestrator.d.ts +5 -0
  16. package/dist/agents/orchestrator.d.ts.map +1 -0
  17. package/dist/agents/orchestrator.js +46 -0
  18. package/dist/agents/orchestrator.js.map +1 -0
  19. package/dist/agents/types.d.ts +29 -0
  20. package/dist/agents/types.d.ts.map +1 -0
  21. package/dist/agents/types.js +7 -0
  22. package/dist/agents/types.js.map +1 -0
  23. package/dist/cli/templates.d.ts +15 -0
  24. package/dist/cli/templates.d.ts.map +1 -0
  25. package/dist/cli/templates.js +445 -0
  26. package/dist/cli/templates.js.map +1 -0
  27. package/dist/cli.d.ts +3 -0
  28. package/dist/cli.d.ts.map +1 -0
  29. package/dist/cli.js +1201 -0
  30. package/dist/cli.js.map +1 -0
  31. package/dist/commands/audit-guardrails.d.ts +15 -0
  32. package/dist/commands/audit-guardrails.d.ts.map +1 -0
  33. package/dist/commands/audit-guardrails.js +33 -0
  34. package/dist/commands/audit-guardrails.js.map +1 -0
  35. package/dist/commands/audit-openapi.d.ts +15 -0
  36. package/dist/commands/audit-openapi.d.ts.map +1 -0
  37. package/dist/commands/audit-openapi.js +33 -0
  38. package/dist/commands/audit-openapi.js.map +1 -0
  39. package/dist/commands/insights.d.ts +8 -0
  40. package/dist/commands/insights.d.ts.map +1 -0
  41. package/dist/commands/insights.js +13 -0
  42. package/dist/commands/insights.js.map +1 -0
  43. package/dist/commands/propose-overlays.d.ts +15 -0
  44. package/dist/commands/propose-overlays.d.ts.map +1 -0
  45. package/dist/commands/propose-overlays.js +33 -0
  46. package/dist/commands/propose-overlays.js.map +1 -0
  47. package/dist/commands/review-published.d.ts +15 -0
  48. package/dist/commands/review-published.d.ts.map +1 -0
  49. package/dist/commands/review-published.js +33 -0
  50. package/dist/commands/review-published.js.map +1 -0
  51. package/dist/external/insight-provider.d.ts.map +1 -0
  52. package/dist/external/insight-provider.js.map +1 -0
  53. package/dist/generated/commands.d.ts +2 -0
  54. package/dist/generated/commands.d.ts.map +1 -0
  55. package/dist/generated/commands.js +2 -0
  56. package/dist/generated/commands.js.map +1 -0
  57. package/dist/generated/contract.d.ts +3 -0
  58. package/dist/generated/contract.d.ts.map +1 -0
  59. package/dist/generated/contract.js +5 -0
  60. package/dist/generated/contract.js.map +1 -0
  61. package/dist/generated/dsl/agents.d.ts +34 -0
  62. package/dist/generated/dsl/agents.d.ts.map +1 -0
  63. package/dist/generated/dsl/agents.js +98 -0
  64. package/dist/generated/dsl/agents.js.map +1 -0
  65. package/dist/generated/dsl/dsl-data.d.ts +7 -0
  66. package/dist/generated/dsl/dsl-data.d.ts.map +1 -0
  67. package/dist/generated/dsl/dsl-data.js +1041 -0
  68. package/dist/generated/dsl/dsl-data.js.map +1 -0
  69. package/dist/generated/dsl/handoffs.d.ts +457 -0
  70. package/dist/generated/dsl/handoffs.d.ts.map +1 -0
  71. package/dist/generated/dsl/handoffs.js +205 -0
  72. package/dist/generated/dsl/handoffs.js.map +1 -0
  73. package/dist/generated/dsl/index.d.ts +14 -0
  74. package/dist/generated/dsl/index.d.ts.map +1 -0
  75. package/dist/generated/dsl/index.js +11 -0
  76. package/dist/generated/dsl/index.js.map +1 -0
  77. package/dist/generated/dsl/tasks.d.ts +28 -0
  78. package/dist/generated/dsl/tasks.d.ts.map +1 -0
  79. package/dist/generated/dsl/tasks.js +137 -0
  80. package/dist/generated/dsl/tasks.js.map +1 -0
  81. package/dist/generated/dsl/workflows.d.ts +34 -0
  82. package/dist/generated/dsl/workflows.d.ts.map +1 -0
  83. package/dist/generated/dsl/workflows.js +84 -0
  84. package/dist/generated/dsl/workflows.js.map +1 -0
  85. package/dist/generated/index.d.ts +8 -0
  86. package/dist/generated/index.d.ts.map +1 -0
  87. package/dist/generated/index.js +8 -0
  88. package/dist/generated/index.js.map +1 -0
  89. package/dist/generated/policy-runtime.d.ts +114 -0
  90. package/dist/generated/policy-runtime.d.ts.map +1 -0
  91. package/dist/generated/policy-runtime.js +195 -0
  92. package/dist/generated/policy-runtime.js.map +1 -0
  93. package/dist/generated/policy.d.ts +658 -0
  94. package/dist/generated/policy.d.ts.map +1 -0
  95. package/dist/generated/policy.js +844 -0
  96. package/dist/generated/policy.js.map +1 -0
  97. package/dist/generated/program.d.ts +120 -0
  98. package/dist/generated/program.d.ts.map +1 -0
  99. package/dist/generated/program.js +370 -0
  100. package/dist/generated/program.js.map +1 -0
  101. package/dist/generated/schemas.d.ts +779 -0
  102. package/dist/generated/schemas.d.ts.map +1 -0
  103. package/dist/generated/schemas.js +1006 -0
  104. package/dist/generated/schemas.js.map +1 -0
  105. package/dist/generated/types.d.ts +786 -0
  106. package/dist/generated/types.d.ts.map +1 -0
  107. package/dist/generated/types.js +3 -0
  108. package/dist/generated/types.js.map +1 -0
  109. package/dist/generator/dependencyGenerator.d.ts +16 -0
  110. package/dist/generator/dependencyGenerator.d.ts.map +1 -0
  111. package/dist/generator/dependencyGenerator.js +25 -0
  112. package/dist/generator/dependencyGenerator.js.map +1 -0
  113. package/dist/generator/index.d.ts +47 -0
  114. package/dist/generator/index.d.ts.map +1 -0
  115. package/dist/generator/index.js +707 -0
  116. package/dist/generator/index.js.map +1 -0
  117. package/dist/generator/inputHash.d.ts +23 -0
  118. package/dist/generator/inputHash.d.ts.map +1 -0
  119. package/dist/generator/inputHash.js +138 -0
  120. package/dist/generator/inputHash.js.map +1 -0
  121. package/dist/generator/linter.d.ts +26 -0
  122. package/dist/generator/linter.d.ts.map +1 -0
  123. package/dist/generator/linter.js +441 -0
  124. package/dist/generator/linter.js.map +1 -0
  125. package/dist/generator/overlayProcessor.d.ts +71 -0
  126. package/dist/generator/overlayProcessor.d.ts.map +1 -0
  127. package/dist/generator/overlayProcessor.js +500 -0
  128. package/dist/generator/overlayProcessor.js.map +1 -0
  129. package/dist/generator/schemaGenerator.d.ts +10 -0
  130. package/dist/generator/schemaGenerator.d.ts.map +1 -0
  131. package/dist/generator/schemaGenerator.js +296 -0
  132. package/dist/generator/schemaGenerator.js.map +1 -0
  133. package/dist/generator/serviceGenerator.d.ts +20 -0
  134. package/dist/generator/serviceGenerator.d.ts.map +1 -0
  135. package/dist/generator/serviceGenerator.js +293 -0
  136. package/dist/generator/serviceGenerator.js.map +1 -0
  137. package/dist/generator/templateProcessor.d.ts +208 -0
  138. package/dist/generator/templateProcessor.d.ts.map +1 -0
  139. package/dist/generator/templateProcessor.js +604 -0
  140. package/dist/generator/templateProcessor.js.map +1 -0
  141. package/dist/generator/typeGenerator.d.ts +22 -0
  142. package/dist/generator/typeGenerator.d.ts.map +1 -0
  143. package/dist/generator/typeGenerator.js +439 -0
  144. package/dist/generator/typeGenerator.js.map +1 -0
  145. package/dist/generator/typeGenerator.test.d.ts +2 -0
  146. package/dist/generator/typeGenerator.test.d.ts.map +1 -0
  147. package/dist/generator/typeGenerator.test.js +155 -0
  148. package/dist/generator/typeGenerator.test.js.map +1 -0
  149. package/dist/glob.d.ts +22 -0
  150. package/dist/glob.d.ts.map +1 -0
  151. package/dist/glob.js +103 -0
  152. package/dist/glob.js.map +1 -0
  153. package/dist/guardrails/allowlist.d.ts +30 -0
  154. package/dist/guardrails/allowlist.d.ts.map +1 -0
  155. package/dist/guardrails/allowlist.js +174 -0
  156. package/dist/guardrails/allowlist.js.map +1 -0
  157. package/dist/guardrails/config.d.ts +40 -0
  158. package/dist/guardrails/config.d.ts.map +1 -0
  159. package/dist/guardrails/config.js +177 -0
  160. package/dist/guardrails/config.js.map +1 -0
  161. package/dist/guardrails/drift.d.ts +19 -0
  162. package/dist/guardrails/drift.d.ts.map +1 -0
  163. package/dist/guardrails/drift.js +115 -0
  164. package/dist/guardrails/drift.js.map +1 -0
  165. package/dist/guardrails/index.d.ts +18 -0
  166. package/dist/guardrails/index.d.ts.map +1 -0
  167. package/dist/guardrails/index.js +21 -0
  168. package/dist/guardrails/index.js.map +1 -0
  169. package/dist/guardrails/lint.d.ts +16 -0
  170. package/dist/guardrails/lint.d.ts.map +1 -0
  171. package/dist/guardrails/lint.js +172 -0
  172. package/dist/guardrails/lint.js.map +1 -0
  173. package/dist/guardrails/manifest.d.ts +63 -0
  174. package/dist/guardrails/manifest.d.ts.map +1 -0
  175. package/dist/guardrails/manifest.js +310 -0
  176. package/dist/guardrails/manifest.js.map +1 -0
  177. package/dist/guardrails/runner.d.ts +53 -0
  178. package/dist/guardrails/runner.d.ts.map +1 -0
  179. package/dist/guardrails/runner.js +387 -0
  180. package/dist/guardrails/runner.js.map +1 -0
  181. package/dist/guardrails/types.d.ts +196 -0
  182. package/dist/guardrails/types.d.ts.map +1 -0
  183. package/dist/guardrails/types.js +8 -0
  184. package/dist/guardrails/types.js.map +1 -0
  185. package/dist/index.d.ts +21 -4
  186. package/dist/index.d.ts.map +1 -0
  187. package/dist/index.js +21 -4
  188. package/dist/index.js.map +1 -0
  189. package/dist/micro-contracts.bundle.mjs +349 -374
  190. package/dist/micro-contracts.bundle.mjs.map +3 -3
  191. package/dist/types.d.ts +502 -0
  192. package/dist/types.d.ts.map +1 -0
  193. package/dist/types.js +409 -0
  194. package/dist/types.js.map +1 -0
  195. package/dist/version.d.ts +10 -0
  196. package/dist/version.d.ts.map +1 -0
  197. package/dist/version.js +31 -0
  198. package/dist/version.js.map +1 -0
  199. package/docs/cli-reference.md +13 -15
  200. package/docs/development-guardrails.md +3 -3
  201. package/docs/screen-spec.md +3 -3
  202. package/package.json +13 -12
@@ -0,0 +1,1041 @@
1
+ /**
2
+ * AUTO-GENERATED by agent-contracts-runtime. DO NOT EDIT.
3
+ *
4
+ * Regenerate via: npx agent-runtime generate
5
+ */
6
+ export const resolvedDsl = {
7
+ "version": 1,
8
+ "system": {
9
+ "id": "micro-contracts",
10
+ "name": "Micro-Contracts Agent System",
11
+ "default_workflow_order": [
12
+ "openapi-audit",
13
+ "published-review",
14
+ "overlay-proposal",
15
+ "guardrails-audit"
16
+ ]
17
+ },
18
+ "agents": {
19
+ "openapi-design-reviewer": {
20
+ "role_name": "OpenAPI Design Reviewer",
21
+ "purpose": "Review OpenAPI specifications for design quality, module boundary alignment, and operational readiness in contract-first TypeScript web/API systems. Identifies semantic issues that static linting cannot detect by considering service decomposition, dependency graphs, overlay coverage, and public API surface exposure.",
22
+ "mode": "read-only",
23
+ "can_read_artifacts": [
24
+ "openapi-spec-input",
25
+ "config-source",
26
+ "overlay-definitions",
27
+ "lint-results-input",
28
+ "deps-graph-input",
29
+ "published-spec-input",
30
+ "guardrails-config-input",
31
+ "cli-contract-source"
32
+ ],
33
+ "can_write_artifacts": [],
34
+ "can_invoke_agents": [],
35
+ "can_execute_tools": [],
36
+ "can_return_handoffs": [
37
+ "openapi-audit-result",
38
+ "published-review-result",
39
+ "overlay-proposal-result",
40
+ "guardrails-audit-result"
41
+ ],
42
+ "responsibilities": [
43
+ "Evaluate path design and feature module boundary alignment using x-micro-contracts-service grouping",
44
+ "Detect request/response schema bloat and overly coupled resource models",
45
+ "Verify x-micro-contracts-service and operationId consistency within modules",
46
+ "Assess CRUD-heavy APIs vs use-case-oriented design and suggest improvements",
47
+ "Detect public API surface leakage of internal types via x-micro-contracts-non-exportable analysis",
48
+ "Evaluate backward compatibility risks in published API changes",
49
+ "Propose cross-cutting overlays for auth, tenancy, rate limiting, and audit logging patterns",
50
+ "Verify overlay proposals do not conflict with existing overlay definitions",
51
+ "Check guardrails.yaml drift detection and OpenAPI lint rule coverage",
52
+ "Use module dependency graph (deps command output) for cross-module analysis"
53
+ ],
54
+ "constraints": [
55
+ "Do not modify OpenAPI specs, overlays, config files, or any source artifacts",
56
+ "Do not claim an API design is sound without citing specific structural evidence",
57
+ "Prefer actionable recommendations over abstract design principles",
58
+ "Reference micro-contracts lint rules and extension names when findings overlap",
59
+ "Consider multi-module architecture when evaluating cross-cutting concerns",
60
+ "Output must conform to AgentAuditResult schema (summary, riskLevel, findings, recommendedActions, metadata)",
61
+ "Each finding must include a recommendation when severity is warning or above"
62
+ ],
63
+ "rules": [
64
+ {
65
+ "id": "R-OAR-001",
66
+ "description": "Operations without x-micro-contracts-service are flagged as unclassified and may indicate missing module assignment",
67
+ "severity": "mandatory"
68
+ },
69
+ {
70
+ "id": "R-OAR-002",
71
+ "description": "Schemas referenced by published endpoints must not carry x-micro-contracts-non-exportable",
72
+ "severity": "mandatory"
73
+ },
74
+ {
75
+ "id": "R-OAR-003",
76
+ "description": "Overlay proposals must not conflict with existing overlay definitions in the shared overlays directory",
77
+ "severity": "mandatory"
78
+ },
79
+ {
80
+ "id": "R-OAR-004",
81
+ "description": "Response schemas with more than 20 top-level properties are flagged as potential bloat",
82
+ "severity": "recommended"
83
+ },
84
+ {
85
+ "id": "R-OAR-005",
86
+ "description": "Modules with more than 3 cross-module schema references are flagged for coupling review",
87
+ "severity": "recommended"
88
+ },
89
+ {
90
+ "id": "R-OAR-006",
91
+ "description": "Generated file patterns in guardrails.yaml must cover all output directories configured in modules",
92
+ "severity": "mandatory"
93
+ }
94
+ ],
95
+ "escalation_criteria": [
96
+ {
97
+ "condition": "OpenAPI specification cannot be parsed or is structurally invalid",
98
+ "action": "stop_and_report"
99
+ },
100
+ {
101
+ "condition": "Configuration file references missing modules or specs",
102
+ "action": "stop_and_report"
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ "tasks": {
108
+ "audit-openapi-design": {
109
+ "description": "Audit OpenAPI specification design quality and module boundary alignment",
110
+ "target_agent": "openapi-design-reviewer",
111
+ "model_class": "standard",
112
+ "allowed_from_agents": [
113
+ "openapi-design-reviewer"
114
+ ],
115
+ "workflow": "openapi-audit",
116
+ "input_artifacts": [
117
+ "openapi-spec-input",
118
+ "config-source",
119
+ "overlay-definitions",
120
+ "lint-results-input",
121
+ "deps-graph-input"
122
+ ],
123
+ "invocation_handoff": "openapi-audit-request",
124
+ "result_handoff": "openapi-audit-result",
125
+ "responsibilities": [
126
+ "Evaluate all paths for module boundary alignment",
127
+ "Check operationId and x-micro-contracts-service consistency",
128
+ "Detect schema bloat and excessive coupling",
129
+ "Assess CRUD vs use-case-oriented design",
130
+ "Review overlay usage and cross-cutting concerns"
131
+ ],
132
+ "completion_criteria": [
133
+ "All paths and operations have been evaluated for design quality",
134
+ "Findings classified by category (design_quality, responsibility_boundary, api_bloat, dependency_coupling)",
135
+ "Module boundary alignment explicitly assessed",
136
+ "Recommendations reference specific paths and operations",
137
+ "Output conforms to AgentAuditResult schema"
138
+ ]
139
+ },
140
+ "audit-published-api": {
141
+ "description": "Review published API surface for internal type leakage and compatibility",
142
+ "target_agent": "openapi-design-reviewer",
143
+ "model_class": "standard",
144
+ "allowed_from_agents": [
145
+ "openapi-design-reviewer"
146
+ ],
147
+ "workflow": "published-review",
148
+ "input_artifacts": [
149
+ "openapi-spec-input",
150
+ "published-spec-input",
151
+ "config-source",
152
+ "deps-graph-input"
153
+ ],
154
+ "invocation_handoff": "openapi-audit-request",
155
+ "result_handoff": "published-review-result",
156
+ "responsibilities": [
157
+ "Compare master spec against published spec for leakage",
158
+ "Identify schemas with x-micro-contracts-non-exportable that appear in published surface",
159
+ "Assess backward compatibility of published endpoint changes",
160
+ "Enumerate published endpoints with their operation details"
161
+ ],
162
+ "completion_criteria": [
163
+ "All published endpoints enumerated with operationId, path, method",
164
+ "Leaked internal types identified with referencing context",
165
+ "Backward compatibility risks assessed for each published endpoint",
166
+ "Output conforms to PublishedReviewResult schema (publishedEndpoints, leakedInternalTypes)"
167
+ ]
168
+ },
169
+ "propose-overlay-candidates": {
170
+ "description": "Propose cross-cutting overlay candidates for the API specification",
171
+ "target_agent": "openapi-design-reviewer",
172
+ "model_class": "standard",
173
+ "allowed_from_agents": [
174
+ "openapi-design-reviewer"
175
+ ],
176
+ "workflow": "overlay-proposal",
177
+ "input_artifacts": [
178
+ "openapi-spec-input",
179
+ "overlay-definitions",
180
+ "config-source"
181
+ ],
182
+ "invocation_handoff": "openapi-audit-request",
183
+ "result_handoff": "overlay-proposal-result",
184
+ "responsibilities": [
185
+ "Identify endpoints needing cross-cutting concerns (auth, tenancy, rate limit, audit log)",
186
+ "Generate overlay candidates with endpoint, type, rationale, and suggested config",
187
+ "Verify proposals do not conflict with existing overlay definitions",
188
+ "Group candidates by overlay type for batch application"
189
+ ],
190
+ "completion_criteria": [
191
+ "Candidate overlays identified for endpoints lacking cross-cutting concerns",
192
+ "Each candidate includes endpoint, overlayType, rationale, and suggestedConfig",
193
+ "No conflicts with existing overlay definitions confirmed",
194
+ "Output conforms to OverlayProposalResult schema (overlayCandidates)"
195
+ ]
196
+ },
197
+ "audit-guardrails-coverage": {
198
+ "description": "Audit guardrails.yaml for drift detection and lint rule coverage",
199
+ "target_agent": "openapi-design-reviewer",
200
+ "model_class": "fast",
201
+ "allowed_from_agents": [
202
+ "openapi-design-reviewer"
203
+ ],
204
+ "workflow": "guardrails-audit",
205
+ "input_artifacts": [
206
+ "guardrails-config-input",
207
+ "config-source",
208
+ "openapi-spec-input"
209
+ ],
210
+ "invocation_handoff": "openapi-audit-request",
211
+ "result_handoff": "guardrails-audit-result",
212
+ "responsibilities": [
213
+ "Verify generated file patterns cover all configured output directories",
214
+ "Check that drift detection covers all generated artifact types",
215
+ "Verify OpenAPI lint rules are configured for all spec files",
216
+ "Identify uncovered paths in guardrails configuration"
217
+ ],
218
+ "completion_criteria": [
219
+ "All configured output directories checked against guardrails generated patterns",
220
+ "Covered and uncovered paths explicitly listed",
221
+ "Lint rule coverage for each spec file assessed",
222
+ "Output conforms to GuardrailsAuditResult schema (coveredPaths, uncoveredPaths)"
223
+ ]
224
+ }
225
+ },
226
+ "handoff_types": {
227
+ "openapi-audit-request": {
228
+ "version": 1,
229
+ "description": "Request to execute an OpenAPI design review task",
230
+ "schema": {
231
+ "type": "object",
232
+ "properties": {
233
+ "task_id": {
234
+ "type": "string",
235
+ "description": "Identifier of the task to execute"
236
+ },
237
+ "context": {
238
+ "type": "string",
239
+ "description": "Built context string from OpenAPI specs, config, overlays, lint results, and deps graph"
240
+ }
241
+ },
242
+ "required": [
243
+ "task_id",
244
+ "context"
245
+ ]
246
+ }
247
+ },
248
+ "openapi-audit-result": {
249
+ "version": 1,
250
+ "description": "Result of an OpenAPI design audit task. Schema mirrors cli-contract.yaml#/components/schemas/OpenApiAuditResult.",
251
+ "schema": {
252
+ "type": "object",
253
+ "properties": {
254
+ "summary": {
255
+ "type": "string"
256
+ },
257
+ "riskLevel": {
258
+ "type": "string",
259
+ "enum": [
260
+ "low",
261
+ "medium",
262
+ "high",
263
+ "critical"
264
+ ]
265
+ },
266
+ "findings": {
267
+ "type": "array",
268
+ "items": {
269
+ "type": "object",
270
+ "properties": {
271
+ "id": {
272
+ "type": "string"
273
+ },
274
+ "severity": {
275
+ "type": "string",
276
+ "enum": [
277
+ "info",
278
+ "warning",
279
+ "error",
280
+ "critical"
281
+ ]
282
+ },
283
+ "category": {
284
+ "type": "string"
285
+ },
286
+ "target": {
287
+ "type": "string"
288
+ },
289
+ "location": {
290
+ "type": "string"
291
+ },
292
+ "message": {
293
+ "type": "string"
294
+ },
295
+ "recommendation": {
296
+ "type": "string"
297
+ },
298
+ "confidence": {
299
+ "type": "number",
300
+ "minimum": 0,
301
+ "maximum": 1
302
+ },
303
+ "evidence": {
304
+ "type": "array",
305
+ "items": {
306
+ "type": "object",
307
+ "properties": {
308
+ "kind": {
309
+ "type": "string",
310
+ "enum": [
311
+ "file",
312
+ "command",
313
+ "schema",
314
+ "diff",
315
+ "stdout",
316
+ "stderr",
317
+ "text"
318
+ ]
319
+ },
320
+ "target": {
321
+ "type": "string"
322
+ },
323
+ "location": {
324
+ "type": "string"
325
+ },
326
+ "excerpt": {
327
+ "type": "string"
328
+ }
329
+ }
330
+ }
331
+ },
332
+ "details": {
333
+ "type": "object",
334
+ "additionalProperties": true
335
+ }
336
+ },
337
+ "required": [
338
+ "severity",
339
+ "category",
340
+ "message"
341
+ ]
342
+ }
343
+ },
344
+ "recommendedActions": {
345
+ "type": "array",
346
+ "items": {
347
+ "type": "object",
348
+ "properties": {
349
+ "kind": {
350
+ "type": "string",
351
+ "enum": [
352
+ "run_command",
353
+ "edit_file",
354
+ "review",
355
+ "confirm",
356
+ "block",
357
+ "ignore"
358
+ ]
359
+ },
360
+ "title": {
361
+ "type": "string"
362
+ },
363
+ "command": {
364
+ "type": "string"
365
+ },
366
+ "target": {
367
+ "type": "string"
368
+ },
369
+ "rationale": {
370
+ "type": "string"
371
+ }
372
+ },
373
+ "required": [
374
+ "kind",
375
+ "title"
376
+ ]
377
+ }
378
+ },
379
+ "metadata": {
380
+ "type": "object",
381
+ "properties": {
382
+ "tool": {
383
+ "type": "string"
384
+ },
385
+ "command": {
386
+ "type": "string"
387
+ },
388
+ "version": {
389
+ "type": "string"
390
+ },
391
+ "generatedAt": {
392
+ "type": "string"
393
+ },
394
+ "adapter": {
395
+ "type": "string"
396
+ },
397
+ "model": {
398
+ "type": "string"
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "required": [
404
+ "summary",
405
+ "riskLevel",
406
+ "findings"
407
+ ]
408
+ }
409
+ },
410
+ "published-review-result": {
411
+ "version": 1,
412
+ "description": "Result of published API review task. Schema mirrors cli-contract.yaml#/components/schemas/PublishedReviewResult.",
413
+ "schema": {
414
+ "type": "object",
415
+ "properties": {
416
+ "summary": {
417
+ "type": "string"
418
+ },
419
+ "riskLevel": {
420
+ "type": "string",
421
+ "enum": [
422
+ "low",
423
+ "medium",
424
+ "high",
425
+ "critical"
426
+ ]
427
+ },
428
+ "findings": {
429
+ "type": "array",
430
+ "items": {
431
+ "type": "object",
432
+ "properties": {
433
+ "severity": {
434
+ "type": "string",
435
+ "enum": [
436
+ "info",
437
+ "warning",
438
+ "error",
439
+ "critical"
440
+ ]
441
+ },
442
+ "category": {
443
+ "type": "string"
444
+ },
445
+ "message": {
446
+ "type": "string"
447
+ },
448
+ "recommendation": {
449
+ "type": "string"
450
+ }
451
+ },
452
+ "required": [
453
+ "severity",
454
+ "category",
455
+ "message"
456
+ ]
457
+ }
458
+ },
459
+ "publishedEndpoints": {
460
+ "type": "array",
461
+ "items": {
462
+ "type": "object",
463
+ "properties": {
464
+ "operationId": {
465
+ "type": "string"
466
+ },
467
+ "path": {
468
+ "type": "string"
469
+ },
470
+ "method": {
471
+ "type": "string"
472
+ }
473
+ },
474
+ "required": [
475
+ "operationId",
476
+ "path",
477
+ "method"
478
+ ]
479
+ }
480
+ },
481
+ "leakedInternalTypes": {
482
+ "type": "array",
483
+ "items": {
484
+ "type": "object",
485
+ "properties": {
486
+ "schemaName": {
487
+ "type": "string"
488
+ },
489
+ "referencedBy": {
490
+ "type": "string"
491
+ },
492
+ "reason": {
493
+ "type": "string"
494
+ }
495
+ },
496
+ "required": [
497
+ "schemaName",
498
+ "referencedBy",
499
+ "reason"
500
+ ]
501
+ }
502
+ },
503
+ "recommendedActions": {
504
+ "type": "array",
505
+ "items": {
506
+ "type": "object",
507
+ "properties": {
508
+ "kind": {
509
+ "type": "string",
510
+ "enum": [
511
+ "run_command",
512
+ "edit_file",
513
+ "review",
514
+ "confirm",
515
+ "block",
516
+ "ignore"
517
+ ]
518
+ },
519
+ "title": {
520
+ "type": "string"
521
+ },
522
+ "command": {
523
+ "type": "string"
524
+ },
525
+ "target": {
526
+ "type": "string"
527
+ },
528
+ "rationale": {
529
+ "type": "string"
530
+ }
531
+ },
532
+ "required": [
533
+ "kind",
534
+ "title"
535
+ ]
536
+ }
537
+ },
538
+ "metadata": {
539
+ "type": "object",
540
+ "properties": {
541
+ "tool": {
542
+ "type": "string"
543
+ },
544
+ "command": {
545
+ "type": "string"
546
+ },
547
+ "version": {
548
+ "type": "string"
549
+ },
550
+ "generatedAt": {
551
+ "type": "string"
552
+ },
553
+ "adapter": {
554
+ "type": "string"
555
+ },
556
+ "model": {
557
+ "type": "string"
558
+ }
559
+ }
560
+ }
561
+ },
562
+ "required": [
563
+ "summary",
564
+ "riskLevel",
565
+ "findings",
566
+ "publishedEndpoints",
567
+ "leakedInternalTypes"
568
+ ]
569
+ }
570
+ },
571
+ "overlay-proposal-result": {
572
+ "version": 1,
573
+ "description": "Result of overlay proposal task. Schema mirrors cli-contract.yaml#/components/schemas/OverlayProposalResult.",
574
+ "schema": {
575
+ "type": "object",
576
+ "properties": {
577
+ "summary": {
578
+ "type": "string"
579
+ },
580
+ "riskLevel": {
581
+ "type": "string",
582
+ "enum": [
583
+ "low",
584
+ "medium",
585
+ "high",
586
+ "critical"
587
+ ]
588
+ },
589
+ "findings": {
590
+ "type": "array",
591
+ "items": {
592
+ "type": "object",
593
+ "properties": {
594
+ "severity": {
595
+ "type": "string",
596
+ "enum": [
597
+ "info",
598
+ "warning",
599
+ "error",
600
+ "critical"
601
+ ]
602
+ },
603
+ "category": {
604
+ "type": "string"
605
+ },
606
+ "message": {
607
+ "type": "string"
608
+ },
609
+ "recommendation": {
610
+ "type": "string"
611
+ }
612
+ },
613
+ "required": [
614
+ "severity",
615
+ "category",
616
+ "message"
617
+ ]
618
+ }
619
+ },
620
+ "overlayCandidates": {
621
+ "type": "array",
622
+ "items": {
623
+ "type": "object",
624
+ "properties": {
625
+ "endpoint": {
626
+ "type": "string"
627
+ },
628
+ "overlayType": {
629
+ "type": "string",
630
+ "enum": [
631
+ "auth",
632
+ "tenancy",
633
+ "rateLimit",
634
+ "auditLog",
635
+ "custom"
636
+ ]
637
+ },
638
+ "rationale": {
639
+ "type": "string"
640
+ },
641
+ "suggestedConfig": {
642
+ "type": "object",
643
+ "additionalProperties": true
644
+ }
645
+ },
646
+ "required": [
647
+ "endpoint",
648
+ "overlayType",
649
+ "rationale"
650
+ ]
651
+ }
652
+ },
653
+ "recommendedActions": {
654
+ "type": "array",
655
+ "items": {
656
+ "type": "object",
657
+ "properties": {
658
+ "kind": {
659
+ "type": "string",
660
+ "enum": [
661
+ "run_command",
662
+ "edit_file",
663
+ "review",
664
+ "confirm",
665
+ "block",
666
+ "ignore"
667
+ ]
668
+ },
669
+ "title": {
670
+ "type": "string"
671
+ },
672
+ "command": {
673
+ "type": "string"
674
+ },
675
+ "target": {
676
+ "type": "string"
677
+ },
678
+ "rationale": {
679
+ "type": "string"
680
+ }
681
+ },
682
+ "required": [
683
+ "kind",
684
+ "title"
685
+ ]
686
+ }
687
+ },
688
+ "metadata": {
689
+ "type": "object",
690
+ "properties": {
691
+ "tool": {
692
+ "type": "string"
693
+ },
694
+ "command": {
695
+ "type": "string"
696
+ },
697
+ "version": {
698
+ "type": "string"
699
+ },
700
+ "generatedAt": {
701
+ "type": "string"
702
+ },
703
+ "adapter": {
704
+ "type": "string"
705
+ },
706
+ "model": {
707
+ "type": "string"
708
+ }
709
+ }
710
+ }
711
+ },
712
+ "required": [
713
+ "summary",
714
+ "riskLevel",
715
+ "findings",
716
+ "overlayCandidates"
717
+ ]
718
+ }
719
+ },
720
+ "guardrails-audit-result": {
721
+ "version": 1,
722
+ "description": "Result of guardrails coverage audit task. Schema mirrors cli-contract.yaml#/components/schemas/GuardrailsAuditResult.",
723
+ "schema": {
724
+ "type": "object",
725
+ "properties": {
726
+ "summary": {
727
+ "type": "string"
728
+ },
729
+ "riskLevel": {
730
+ "type": "string",
731
+ "enum": [
732
+ "low",
733
+ "medium",
734
+ "high",
735
+ "critical"
736
+ ]
737
+ },
738
+ "findings": {
739
+ "type": "array",
740
+ "items": {
741
+ "type": "object",
742
+ "properties": {
743
+ "severity": {
744
+ "type": "string",
745
+ "enum": [
746
+ "info",
747
+ "warning",
748
+ "error",
749
+ "critical"
750
+ ]
751
+ },
752
+ "category": {
753
+ "type": "string"
754
+ },
755
+ "message": {
756
+ "type": "string"
757
+ },
758
+ "recommendation": {
759
+ "type": "string"
760
+ }
761
+ },
762
+ "required": [
763
+ "severity",
764
+ "category",
765
+ "message"
766
+ ]
767
+ }
768
+ },
769
+ "coveredPaths": {
770
+ "type": "array",
771
+ "items": {
772
+ "type": "string"
773
+ }
774
+ },
775
+ "uncoveredPaths": {
776
+ "type": "array",
777
+ "items": {
778
+ "type": "string"
779
+ }
780
+ },
781
+ "recommendedActions": {
782
+ "type": "array",
783
+ "items": {
784
+ "type": "object",
785
+ "properties": {
786
+ "kind": {
787
+ "type": "string",
788
+ "enum": [
789
+ "run_command",
790
+ "edit_file",
791
+ "review",
792
+ "confirm",
793
+ "block",
794
+ "ignore"
795
+ ]
796
+ },
797
+ "title": {
798
+ "type": "string"
799
+ },
800
+ "command": {
801
+ "type": "string"
802
+ },
803
+ "target": {
804
+ "type": "string"
805
+ },
806
+ "rationale": {
807
+ "type": "string"
808
+ }
809
+ },
810
+ "required": [
811
+ "kind",
812
+ "title"
813
+ ]
814
+ }
815
+ },
816
+ "metadata": {
817
+ "type": "object",
818
+ "properties": {
819
+ "tool": {
820
+ "type": "string"
821
+ },
822
+ "command": {
823
+ "type": "string"
824
+ },
825
+ "version": {
826
+ "type": "string"
827
+ },
828
+ "generatedAt": {
829
+ "type": "string"
830
+ },
831
+ "adapter": {
832
+ "type": "string"
833
+ },
834
+ "model": {
835
+ "type": "string"
836
+ }
837
+ }
838
+ }
839
+ },
840
+ "required": [
841
+ "summary",
842
+ "riskLevel",
843
+ "findings",
844
+ "coveredPaths",
845
+ "uncoveredPaths"
846
+ ]
847
+ }
848
+ }
849
+ },
850
+ "artifacts": {
851
+ "openapi-spec-input": {
852
+ "type": "document",
853
+ "description": "OpenAPI specification file(s) loaded from config modules (ephemeral input)",
854
+ "authority": "derived"
855
+ },
856
+ "config-source": {
857
+ "type": "document",
858
+ "description": "micro-contracts.config.yaml configuration (ephemeral input)",
859
+ "authority": "derived"
860
+ },
861
+ "overlay-definitions": {
862
+ "type": "document",
863
+ "description": "Overlay YAML files from shared and module-specific overlay directories (ephemeral input)",
864
+ "authority": "derived"
865
+ },
866
+ "lint-results-input": {
867
+ "type": "document",
868
+ "description": "Spectral lint results for the target OpenAPI spec (ephemeral input)",
869
+ "authority": "derived"
870
+ },
871
+ "deps-graph-input": {
872
+ "type": "document",
873
+ "description": "Module dependency graph from deps command analysis (ephemeral input)",
874
+ "authority": "derived"
875
+ },
876
+ "published-spec-input": {
877
+ "type": "document",
878
+ "description": "Published (public-facing) OpenAPI spec for comparison with master spec (ephemeral input)",
879
+ "authority": "derived"
880
+ },
881
+ "guardrails-config-input": {
882
+ "type": "document",
883
+ "description": "guardrails.yaml configuration for coverage analysis (ephemeral input)",
884
+ "authority": "derived"
885
+ },
886
+ "cli-contract-source": {
887
+ "type": "document",
888
+ "description": "cli-contract.yaml for reference (ephemeral input)",
889
+ "authority": "derived"
890
+ }
891
+ },
892
+ "guardrails": {
893
+ "output-schema-conformance": {
894
+ "description": "Ensure all agent outputs conform to AgentAuditResult schema. Validation is performed at runtime via Zod schema in handoff definition.",
895
+ "scope": {
896
+ "agents": [
897
+ "openapi-design-reviewer"
898
+ ],
899
+ "tasks": [
900
+ "audit-openapi-design",
901
+ "audit-published-api",
902
+ "propose-overlay-candidates",
903
+ "audit-guardrails-coverage"
904
+ ]
905
+ },
906
+ "rationale": "Structured output conformance is critical for CLI parsing and downstream tooling integration."
907
+ },
908
+ "no-file-modification": {
909
+ "description": "Agent must never modify OpenAPI specs, overlays, config, or any source files. Agent operates in read-only mode for analysis only.",
910
+ "scope": {
911
+ "agents": [
912
+ "openapi-design-reviewer"
913
+ ]
914
+ },
915
+ "rationale": "openapi-design-reviewer is a static analysis agent. File modification capabilities have been moved to artifact-contracts."
916
+ },
917
+ "confidence-threshold": {
918
+ "description": "Findings with confidence below 0.5 must include an explicit uncertainty disclaimer in their recommendation.",
919
+ "scope": {
920
+ "tasks": [
921
+ "audit-openapi-design",
922
+ "audit-published-api",
923
+ "propose-overlay-candidates",
924
+ "audit-guardrails-coverage"
925
+ ]
926
+ },
927
+ "rationale": "Low-confidence findings without disclaimers may mislead operators into applying unnecessary changes to API design."
928
+ }
929
+ },
930
+ "guardrail_policies": {
931
+ "openapi-review-policy": {
932
+ "description": "Policy governing OpenAPI design review operations. Groups all guardrails applicable to the openapi-design-reviewer agent.",
933
+ "rules": [
934
+ {
935
+ "guardrail": "output-schema-conformance",
936
+ "severity": "critical",
937
+ "action": "block"
938
+ },
939
+ {
940
+ "guardrail": "no-file-modification",
941
+ "severity": "critical",
942
+ "action": "block"
943
+ },
944
+ {
945
+ "guardrail": "confidence-threshold",
946
+ "severity": "warning",
947
+ "action": "warn"
948
+ }
949
+ ]
950
+ }
951
+ },
952
+ "workflow": {
953
+ "openapi-audit": {
954
+ "description": "Audit OpenAPI design quality and module boundary alignment",
955
+ "trigger": "cli-command",
956
+ "entry_conditions": [
957
+ "OpenAPI specification and config are available"
958
+ ],
959
+ "steps": [
960
+ {
961
+ "type": "delegate",
962
+ "task": "audit-openapi-design",
963
+ "from_agent": "openapi-design-reviewer"
964
+ }
965
+ ]
966
+ },
967
+ "published-review": {
968
+ "description": "Review published API surface for internal leakage and compatibility",
969
+ "trigger": "cli-command",
970
+ "entry_conditions": [
971
+ "Both master and published specs are available"
972
+ ],
973
+ "steps": [
974
+ {
975
+ "type": "delegate",
976
+ "task": "audit-published-api",
977
+ "from_agent": "openapi-design-reviewer"
978
+ }
979
+ ]
980
+ },
981
+ "overlay-proposal": {
982
+ "description": "Propose cross-cutting overlay candidates",
983
+ "trigger": "cli-command",
984
+ "entry_conditions": [
985
+ "OpenAPI specification and existing overlays are available"
986
+ ],
987
+ "steps": [
988
+ {
989
+ "type": "delegate",
990
+ "task": "propose-overlay-candidates",
991
+ "from_agent": "openapi-design-reviewer"
992
+ }
993
+ ]
994
+ },
995
+ "guardrails-audit": {
996
+ "description": "Audit guardrails configuration for drift and lint coverage",
997
+ "trigger": "cli-command",
998
+ "entry_conditions": [
999
+ "guardrails.yaml configuration exists"
1000
+ ],
1001
+ "steps": [
1002
+ {
1003
+ "type": "delegate",
1004
+ "task": "audit-guardrails-coverage",
1005
+ "from_agent": "openapi-design-reviewer"
1006
+ }
1007
+ ]
1008
+ }
1009
+ },
1010
+ "_guardrailRules": {
1011
+ "commandRules": [],
1012
+ "fileRules": [
1013
+ {
1014
+ "guardrail_id": "no-file-modification",
1015
+ "pattern": "spec/**/openapi/**/*.yaml",
1016
+ "action": "block",
1017
+ "message": "Modifying OpenAPI specs is forbidden. openapi-design-reviewer operates in read-only analysis mode."
1018
+ },
1019
+ {
1020
+ "guardrail_id": "no-file-modification",
1021
+ "pattern": "**/*.overlay.yaml",
1022
+ "action": "block",
1023
+ "message": "Modifying overlay files is forbidden. openapi-design-reviewer operates in read-only analysis mode."
1024
+ },
1025
+ {
1026
+ "guardrail_id": "no-file-modification",
1027
+ "pattern": "micro-contracts.config.yaml",
1028
+ "action": "block",
1029
+ "message": "Modifying micro-contracts config is forbidden. openapi-design-reviewer operates in read-only analysis mode."
1030
+ },
1031
+ {
1032
+ "guardrail_id": "no-file-modification",
1033
+ "pattern": "**/guardrails.yaml",
1034
+ "action": "block",
1035
+ "message": "Modifying guardrails config is forbidden. openapi-design-reviewer operates in read-only analysis mode."
1036
+ }
1037
+ ],
1038
+ "contentRules": []
1039
+ }
1040
+ };
1041
+ //# sourceMappingURL=dsl-data.js.map