agent-doc-system 0.0.0-stage → 1.0.0
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/INSTALL_FOR_AGENTS.md +60 -0
- package/LICENSE +21 -0
- package/README.md +151 -2
- package/adapters/cache.mjs +27 -0
- package/adapters/contract-consumers.mjs +56 -0
- package/adapters/database.mjs +116 -0
- package/adapters/deploy-config.mjs +34 -0
- package/adapters/dockerfile.mjs +26 -0
- package/adapters/events.mjs +145 -0
- package/adapters/generic.mjs +86 -0
- package/adapters/github-actions.mjs +106 -0
- package/adapters/go.mjs +91 -0
- package/adapters/graphql.mjs +28 -0
- package/adapters/index.mjs +55 -0
- package/adapters/node.mjs +118 -0
- package/adapters/object-store.mjs +64 -0
- package/adapters/oidc.mjs +56 -0
- package/adapters/openapi.mjs +50 -0
- package/adapters/pnpm.mjs +42 -0
- package/adapters/protobuf.mjs +35 -0
- package/adapters/registry.mjs +27 -0
- package/adapters/resource-client.mjs +61 -0
- package/adapters/turborepo.mjs +135 -0
- package/adapters/typescript.mjs +85 -0
- package/adapters/wrangler.mjs +206 -0
- package/bin/agentdoc.mjs +478 -0
- package/bin/usage.txt +26 -0
- package/core/acceptances.mjs +69 -0
- package/core/audit.mjs +407 -0
- package/core/authority/classes.mjs +39 -0
- package/core/authority/engine.mjs +243 -0
- package/core/authority/facts.mjs +41 -0
- package/core/codes.mjs +119 -0
- package/core/compile.mjs +881 -0
- package/core/contracts.mjs +121 -0
- package/core/derive.mjs +102 -0
- package/core/descriptors.mjs +486 -0
- package/core/determinism.mjs +95 -0
- package/core/discover.mjs +147 -0
- package/core/facts.mjs +53 -0
- package/core/fsx.mjs +342 -0
- package/core/graph.mjs +260 -0
- package/core/impact.mjs +175 -0
- package/core/indexes.mjs +165 -0
- package/core/jsonschema.mjs +298 -0
- package/core/observations.mjs +129 -0
- package/core/provenance.mjs +83 -0
- package/core/query.mjs +384 -0
- package/core/relations.mjs +286 -0
- package/core/scaffold.mjs +322 -0
- package/core/secrets.mjs +92 -0
- package/core/sourcescan.mjs +88 -0
- package/core/toml.mjs +163 -0
- package/core/yaml.mjs +475 -0
- package/docs/ADAPTERS.md +172 -0
- package/docs/AUTHORITY.md +260 -0
- package/docs/CI.md +136 -0
- package/docs/COMPARISON-KODA.md +164 -0
- package/docs/EVALS.md +166 -0
- package/docs/MIGRATION.md +193 -0
- package/docs/PROVENANCE.md +133 -0
- package/docs/QUERY.md +180 -0
- package/docs/SPEC.md +339 -0
- package/docs/VERIFICATION.md +28 -0
- package/docs/ci/generic-ci.sh +28 -0
- package/docs/ci/github-actions.yml +35 -0
- package/evals/harness.mjs +426 -0
- package/evals/scenarios/fixture-a-01-change-api.json +9 -0
- package/evals/scenarios/fixture-a-02-change-db.json +9 -0
- package/evals/scenarios/fixture-a-03-enforce-constraint.json +9 -0
- package/evals/scenarios/fixture-b-01-change-proto.json +9 -0
- package/evals/scenarios/fixture-b-02-change-write-path.json +9 -0
- package/evals/scenarios/fixture-b-03-change-shared-lib.json +9 -0
- package/evals/scenarios/fixture-b-04-journey.json +9 -0
- package/evals/scenarios/fixture-c-01-mixed-runtime-edge.json +19 -0
- package/evals/scenarios/fixture-c-02-stale-doc-contradiction.json +9 -0
- package/evals/scenarios/fixture-c-03-shared-vocabulary.json +9 -0
- package/evals/scenarios/fixture-c-04-contract-change.json +9 -0
- package/evals/scenarios/koda-01-modify-api-consumer.json +26 -0
- package/evals/scenarios/koda-02-change-db-schema.json +20 -0
- package/evals/scenarios/koda-03-change-auth.json +21 -0
- package/evals/scenarios/koda-04-add-event-producer.json +19 -0
- package/evals/scenarios/koda-05-modify-worker-binding.json +25 -0
- package/evals/scenarios/koda-06-change-cross-component-endpoint.json +22 -0
- package/evals/scenarios/koda-07-change-shared-package.json +16 -0
- package/evals/scenarios/koda-08-change-runtime-cron.json +23 -0
- package/evals/scenarios/koda-09-debug-production-mismatch.json +26 -0
- package/evals/thresholds.json +11 -0
- package/package.json +46 -4
- package/schemas/api.schema.json +84 -0
- package/schemas/common.schema.json +107 -0
- package/schemas/component.schema.json +40 -0
- package/schemas/config.schema.json +685 -0
- package/schemas/domain.schema.json +14 -0
- package/schemas/graph.schema.json +1084 -0
- package/schemas/journeys.schema.json +47 -0
- package/schemas/observation.schema.json +143 -0
- package/schemas/resource.schema.json +28 -0
- package/schemas/system.schema.json +26 -0
- package/skills/agent-doc-system/SKILL.md +113 -0
- package/skills/agent-doc-system/references/authority-and-conflicts.md +70 -0
- package/skills/agent-doc-system/references/cli.md +89 -0
- package/skills/agent-doc-system/references/create-migrate.md +101 -0
- package/skills/agent-doc-system/references/maintenance.md +52 -0
- package/templates/ADR.md +26 -0
- package/templates/ARCHITECTURE.md +19 -0
- package/templates/CONSTRAINTS.md +17 -0
- package/templates/PRODUCT.md +17 -0
- package/templates/api.yaml +10 -0
- package/templates/ci.yml +31 -0
- package/templates/component.yaml +14 -0
- package/templates/domain.yaml +6 -0
- package/templates/journey.yaml +7 -0
- package/templates/observation.yaml +19 -0
- package/templates/resource.yaml +8 -0
- package/templates/system.yaml +10 -0
- package/templates/warning-acceptance.yaml +14 -0
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "agentdoc.dev/schema/config.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"apiVersion",
|
|
8
|
+
"namespace",
|
|
9
|
+
"discovery",
|
|
10
|
+
"adapters",
|
|
11
|
+
"authority",
|
|
12
|
+
"output"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"apiVersion": {
|
|
16
|
+
"const": "agentdoc.dev/config/v1"
|
|
17
|
+
},
|
|
18
|
+
"namespace": {
|
|
19
|
+
"description": "Ref namespace for this repository. Entity refs read <kind>:<namespace>/<name>.",
|
|
20
|
+
"$ref": "common.json#/$defs/namespace"
|
|
21
|
+
},
|
|
22
|
+
"discovery": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"componentDescriptorName",
|
|
27
|
+
"componentDescriptors",
|
|
28
|
+
"centralDescriptors"
|
|
29
|
+
],
|
|
30
|
+
"properties": {
|
|
31
|
+
"componentDescriptorName": {
|
|
32
|
+
"description": "Descriptor file name that must sit at the root of every discovered unit.",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"maxLength": 60,
|
|
36
|
+
"pattern": "^[A-Za-z0-9._-]+\\.ya?ml$"
|
|
37
|
+
},
|
|
38
|
+
"componentDescriptors": {
|
|
39
|
+
"description": "Globs enumerating component descriptor files. Typically one per workspace layout.",
|
|
40
|
+
"type": "array",
|
|
41
|
+
"minItems": 1,
|
|
42
|
+
"maxItems": 32,
|
|
43
|
+
"items": {
|
|
44
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"centralDescriptors": {
|
|
48
|
+
"description": "Globs enumerating central Domain/System/API/Resource descriptor files.",
|
|
49
|
+
"type": "array",
|
|
50
|
+
"minItems": 1,
|
|
51
|
+
"maxItems": 32,
|
|
52
|
+
"items": {
|
|
53
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"supplementalRoots": {
|
|
57
|
+
"description": "Directories that are units even when no adapter marker is present.",
|
|
58
|
+
"type": "array",
|
|
59
|
+
"maxItems": 64,
|
|
60
|
+
"items": {
|
|
61
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"journeyDefinitions": {
|
|
65
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
66
|
+
},
|
|
67
|
+
"notUnitRoots": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"maxItems": 32,
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"contractRoots": {
|
|
75
|
+
"description": "Directories whose canonical contract files must each be claimed by exactly one API descriptor.",
|
|
76
|
+
"type": "array",
|
|
77
|
+
"maxItems": 32,
|
|
78
|
+
"items": {
|
|
79
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"eventContracts": {
|
|
83
|
+
"description": "Declared event pattern catalogs: path + optional format. Consumers of the catalog are derived.",
|
|
84
|
+
"type": "array",
|
|
85
|
+
"maxItems": 32,
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": [
|
|
90
|
+
"path",
|
|
91
|
+
"consumer"
|
|
92
|
+
],
|
|
93
|
+
"properties": {
|
|
94
|
+
"path": {
|
|
95
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
96
|
+
},
|
|
97
|
+
"consumer": {
|
|
98
|
+
"$ref": "common.json#/$defs/componentRef"
|
|
99
|
+
},
|
|
100
|
+
"format": {
|
|
101
|
+
"enum": [
|
|
102
|
+
"json-map",
|
|
103
|
+
"code"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"eventPatternPrefixes": {
|
|
110
|
+
"description": "Accepted event subject prefixes. Empty or absent means accept any non-empty subject token.",
|
|
111
|
+
"type": "array",
|
|
112
|
+
"maxItems": 16,
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1,
|
|
116
|
+
"maxLength": 40,
|
|
117
|
+
"pattern": "^[A-Za-z0-9._-]+$"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"docCandidates": {
|
|
121
|
+
"description": "Conventional per-component doc file names.",
|
|
122
|
+
"type": "array",
|
|
123
|
+
"maxItems": 24,
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"maxLength": 60,
|
|
128
|
+
"pattern": "^[A-Za-z0-9._-]+$"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"externalDependencies": {
|
|
132
|
+
"description": "Third-party services a component depends on. Adapters match production dependencies against these patterns; nothing else is classified as an external dependency, because a package in a lockfile is not an architectural dependency.",
|
|
133
|
+
"type": "array",
|
|
134
|
+
"maxItems": 128,
|
|
135
|
+
"items": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": [
|
|
139
|
+
"match",
|
|
140
|
+
"name",
|
|
141
|
+
"mechanism",
|
|
142
|
+
"role"
|
|
143
|
+
],
|
|
144
|
+
"properties": {
|
|
145
|
+
"match": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"maxLength": 200,
|
|
149
|
+
"description": "Regular expression matched against the dependency name."
|
|
150
|
+
},
|
|
151
|
+
"name": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
154
|
+
},
|
|
155
|
+
"mechanism": {
|
|
156
|
+
"enum": [
|
|
157
|
+
"sdk",
|
|
158
|
+
"http",
|
|
159
|
+
"smtp",
|
|
160
|
+
"webhook",
|
|
161
|
+
"platform-binding",
|
|
162
|
+
"file"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"role": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"minLength": 1,
|
|
168
|
+
"maxLength": 200
|
|
169
|
+
},
|
|
170
|
+
"resourceType": {
|
|
171
|
+
"description": "When set, a component depending on this service also uses the single authored Resource of this type. A broker client binds to the event bus; a cache client to the cache.",
|
|
172
|
+
"enum": [
|
|
173
|
+
"logical-database",
|
|
174
|
+
"logical-dataset",
|
|
175
|
+
"event-bus",
|
|
176
|
+
"queue",
|
|
177
|
+
"cache",
|
|
178
|
+
"search-index",
|
|
179
|
+
"object-store",
|
|
180
|
+
"secret-store",
|
|
181
|
+
"other"
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"verificationPreference": {
|
|
188
|
+
"description": "Which verification command wins when a task graph and a package script both cover the same tier. 'task-graph' keeps one runnable command per component per tier; 'script' keeps the package script; 'both' keeps everything.",
|
|
189
|
+
"enum": [
|
|
190
|
+
"task-graph",
|
|
191
|
+
"script",
|
|
192
|
+
"both"
|
|
193
|
+
],
|
|
194
|
+
"default": "task-graph"
|
|
195
|
+
},
|
|
196
|
+
"capabilities": {
|
|
197
|
+
"description": "Capability detectors: a regular expression over a component's production sources, producing a named capability. A package in a manifest cannot tell you a component can use web speech; a source literal can.",
|
|
198
|
+
"type": "array",
|
|
199
|
+
"maxItems": 32,
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"required": [
|
|
204
|
+
"name",
|
|
205
|
+
"match"
|
|
206
|
+
],
|
|
207
|
+
"properties": {
|
|
208
|
+
"name": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
211
|
+
},
|
|
212
|
+
"match": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"minLength": 1,
|
|
215
|
+
"maxLength": 200
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"generatedClientPatterns": {
|
|
221
|
+
"description": "Path fragments marking generated client code. A generated client references a route; only a component that declares the route serves it. Used to disambiguate scheduled trigger targets.",
|
|
222
|
+
"type": "array",
|
|
223
|
+
"maxItems": 32,
|
|
224
|
+
"items": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"minLength": 1,
|
|
227
|
+
"maxLength": 120
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"generatedDirs": {
|
|
231
|
+
"description": "Additional directories to treat as build output and never as repository authority. Replaces the built-in list when present.",
|
|
232
|
+
"type": "array",
|
|
233
|
+
"maxItems": 64,
|
|
234
|
+
"items": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"minLength": 1,
|
|
237
|
+
"maxLength": 120
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"constraintCandidates": {
|
|
241
|
+
"description": "Conventional per-component constraint file names.",
|
|
242
|
+
"type": "array",
|
|
243
|
+
"maxItems": 24,
|
|
244
|
+
"items": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"minLength": 1,
|
|
247
|
+
"maxLength": 60,
|
|
248
|
+
"pattern": "^[A-Za-z0-9._-]+$"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"runbookCandidates": {
|
|
252
|
+
"type": "array",
|
|
253
|
+
"maxItems": 24,
|
|
254
|
+
"items": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"minLength": 1,
|
|
257
|
+
"maxLength": 60,
|
|
258
|
+
"pattern": "^[A-Za-z0-9._-]+$"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"adapters": {
|
|
264
|
+
"description": "Enabled extractor adapters. The generic adapter is always on and needs no entry.",
|
|
265
|
+
"type": "array",
|
|
266
|
+
"maxItems": 48,
|
|
267
|
+
"uniqueItems": true,
|
|
268
|
+
"items": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"authority": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"additionalProperties": false,
|
|
276
|
+
"required": [
|
|
277
|
+
"rules"
|
|
278
|
+
],
|
|
279
|
+
"properties": {
|
|
280
|
+
"rules": {
|
|
281
|
+
"description": "Per-fact authority elections. There is deliberately NO default global precedence: a fact with no matching rule stays unresolved.",
|
|
282
|
+
"type": "array",
|
|
283
|
+
"maxItems": 128,
|
|
284
|
+
"items": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"required": [
|
|
288
|
+
"id",
|
|
289
|
+
"keyPattern",
|
|
290
|
+
"elect",
|
|
291
|
+
"rationale",
|
|
292
|
+
"reviewWhen"
|
|
293
|
+
],
|
|
294
|
+
"properties": {
|
|
295
|
+
"id": {
|
|
296
|
+
"$ref": "common.json#/$defs/name"
|
|
297
|
+
},
|
|
298
|
+
"keyPattern": {
|
|
299
|
+
"description": "Regular expression matched against '<subject> <key>'.",
|
|
300
|
+
"type": "string",
|
|
301
|
+
"minLength": 1,
|
|
302
|
+
"maxLength": 200
|
|
303
|
+
},
|
|
304
|
+
"elect": {
|
|
305
|
+
"type": "array",
|
|
306
|
+
"minItems": 1,
|
|
307
|
+
"maxItems": 3,
|
|
308
|
+
"uniqueItems": true,
|
|
309
|
+
"items": {
|
|
310
|
+
"enum": [
|
|
311
|
+
"AUTHORED",
|
|
312
|
+
"DERIVED",
|
|
313
|
+
"OBSERVED_RUNTIME",
|
|
314
|
+
"EXTERNAL_STANDARD",
|
|
315
|
+
"REVIEWED_OVERRIDE"
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"rationale": {
|
|
320
|
+
"$ref": "common.json#/$defs/rationale"
|
|
321
|
+
},
|
|
322
|
+
"reviewWhen": {
|
|
323
|
+
"$ref": "common.json#/$defs/rationale"
|
|
324
|
+
},
|
|
325
|
+
"degradeOnStale": {
|
|
326
|
+
"description": "What to do when the elected evidence class is stale. Default: keep the election and raise a staleness conflict.",
|
|
327
|
+
"enum": [
|
|
328
|
+
"conflict",
|
|
329
|
+
"unresolved"
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"reviewedOverrides": {
|
|
338
|
+
"description": "Bounded reviewed interpretations for facts deterministic discovery cannot resolve. Never a silent default.",
|
|
339
|
+
"type": "array",
|
|
340
|
+
"maxItems": 512,
|
|
341
|
+
"items": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"additionalProperties": false,
|
|
344
|
+
"required": [
|
|
345
|
+
"fact",
|
|
346
|
+
"subject",
|
|
347
|
+
"reason",
|
|
348
|
+
"reviewWhen",
|
|
349
|
+
"evidence"
|
|
350
|
+
],
|
|
351
|
+
"properties": {
|
|
352
|
+
"fact": {
|
|
353
|
+
"enum": [
|
|
354
|
+
"runtime-call",
|
|
355
|
+
"api-consumer",
|
|
356
|
+
"external-dependency-role",
|
|
357
|
+
"binding",
|
|
358
|
+
"capability",
|
|
359
|
+
"component-placement",
|
|
360
|
+
"event-producer",
|
|
361
|
+
"event-consumer"
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
"subject": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"pattern": "^\\S+$"
|
|
367
|
+
},
|
|
368
|
+
"target": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"pattern": "^\\S+$"
|
|
371
|
+
},
|
|
372
|
+
"transport": {
|
|
373
|
+
"enum": [
|
|
374
|
+
"http",
|
|
375
|
+
"service-binding",
|
|
376
|
+
"signed-http",
|
|
377
|
+
"grpc",
|
|
378
|
+
"queue",
|
|
379
|
+
"in-process"
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"contractRef": {
|
|
383
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
384
|
+
},
|
|
385
|
+
"deliverySemantics": {
|
|
386
|
+
"enum": [
|
|
387
|
+
"request-response",
|
|
388
|
+
"at-least-once",
|
|
389
|
+
"at-most-once",
|
|
390
|
+
"best-effort",
|
|
391
|
+
"exactly-once"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
"role": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"minLength": 1,
|
|
397
|
+
"maxLength": 200
|
|
398
|
+
},
|
|
399
|
+
"kind": {
|
|
400
|
+
"type": "string",
|
|
401
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
402
|
+
},
|
|
403
|
+
"logicalResourceRef": {
|
|
404
|
+
"type": "string"
|
|
405
|
+
},
|
|
406
|
+
"system": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
409
|
+
},
|
|
410
|
+
"domain": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
413
|
+
},
|
|
414
|
+
"eventPattern": {
|
|
415
|
+
"type": "string",
|
|
416
|
+
"minLength": 1,
|
|
417
|
+
"maxLength": 200
|
|
418
|
+
},
|
|
419
|
+
"reason": {
|
|
420
|
+
"$ref": "common.json#/$defs/rationale"
|
|
421
|
+
},
|
|
422
|
+
"reviewWhen": {
|
|
423
|
+
"description": "The condition under which this interpretation must be re-examined. Required: a review that states no re-examination condition is a review that is never revisited.",
|
|
424
|
+
"type": "string",
|
|
425
|
+
"minLength": 12
|
|
426
|
+
},
|
|
427
|
+
"evidence": {
|
|
428
|
+
"description": "Evidence the interpretation rests on, pinned by content hash. The digests are re-verified on every compile: if a cited file changes, the override stops applying and a fresh review is forced. A digest recorded but never compared would be decoration.",
|
|
429
|
+
"allOf": [
|
|
430
|
+
{
|
|
431
|
+
"$ref": "common.json#/$defs/evidence"
|
|
432
|
+
}
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"allOf": [
|
|
437
|
+
{
|
|
438
|
+
"if": {
|
|
439
|
+
"properties": {
|
|
440
|
+
"fact": {
|
|
441
|
+
"const": "runtime-call"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"required": [
|
|
445
|
+
"fact"
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
"then": {
|
|
449
|
+
"required": [
|
|
450
|
+
"target",
|
|
451
|
+
"transport",
|
|
452
|
+
"contractRef"
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
"else": {
|
|
456
|
+
"not": {
|
|
457
|
+
"required": [
|
|
458
|
+
"transport"
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"if": {
|
|
465
|
+
"properties": {
|
|
466
|
+
"fact": {
|
|
467
|
+
"const": "api-consumer"
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"required": [
|
|
471
|
+
"fact"
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
"then": {
|
|
475
|
+
"required": [
|
|
476
|
+
"target"
|
|
477
|
+
],
|
|
478
|
+
"not": {
|
|
479
|
+
"anyOf": [
|
|
480
|
+
{
|
|
481
|
+
"required": [
|
|
482
|
+
"transport"
|
|
483
|
+
]
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"required": [
|
|
487
|
+
"contractRef"
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"required": [
|
|
492
|
+
"deliverySemantics"
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"required": [
|
|
497
|
+
"role"
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"if": {
|
|
506
|
+
"properties": {
|
|
507
|
+
"fact": {
|
|
508
|
+
"const": "external-dependency-role"
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
"required": [
|
|
512
|
+
"fact"
|
|
513
|
+
]
|
|
514
|
+
},
|
|
515
|
+
"then": {
|
|
516
|
+
"required": [
|
|
517
|
+
"target",
|
|
518
|
+
"role"
|
|
519
|
+
],
|
|
520
|
+
"not": {
|
|
521
|
+
"anyOf": [
|
|
522
|
+
{
|
|
523
|
+
"required": [
|
|
524
|
+
"transport"
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"required": [
|
|
529
|
+
"contractRef"
|
|
530
|
+
]
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"required": [
|
|
534
|
+
"deliverySemantics"
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"if": {
|
|
543
|
+
"properties": {
|
|
544
|
+
"fact": {
|
|
545
|
+
"const": "binding"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"required": [
|
|
549
|
+
"fact"
|
|
550
|
+
]
|
|
551
|
+
},
|
|
552
|
+
"then": {
|
|
553
|
+
"required": [
|
|
554
|
+
"kind"
|
|
555
|
+
],
|
|
556
|
+
"not": {
|
|
557
|
+
"anyOf": [
|
|
558
|
+
{
|
|
559
|
+
"required": [
|
|
560
|
+
"transport"
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"required": [
|
|
565
|
+
"role"
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"if": {
|
|
574
|
+
"properties": {
|
|
575
|
+
"fact": {
|
|
576
|
+
"const": "capability"
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"required": [
|
|
580
|
+
"fact"
|
|
581
|
+
]
|
|
582
|
+
},
|
|
583
|
+
"then": {
|
|
584
|
+
"required": [
|
|
585
|
+
"kind"
|
|
586
|
+
],
|
|
587
|
+
"not": {
|
|
588
|
+
"anyOf": [
|
|
589
|
+
{
|
|
590
|
+
"required": [
|
|
591
|
+
"transport"
|
|
592
|
+
]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"required": [
|
|
596
|
+
"role"
|
|
597
|
+
]
|
|
598
|
+
}
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"if": {
|
|
605
|
+
"properties": {
|
|
606
|
+
"fact": {
|
|
607
|
+
"enum": [
|
|
608
|
+
"event-producer",
|
|
609
|
+
"event-consumer"
|
|
610
|
+
]
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"required": [
|
|
614
|
+
"fact"
|
|
615
|
+
]
|
|
616
|
+
},
|
|
617
|
+
"then": {
|
|
618
|
+
"required": [
|
|
619
|
+
"eventPattern"
|
|
620
|
+
],
|
|
621
|
+
"not": {
|
|
622
|
+
"anyOf": [
|
|
623
|
+
{
|
|
624
|
+
"required": [
|
|
625
|
+
"transport"
|
|
626
|
+
]
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"required": [
|
|
630
|
+
"role"
|
|
631
|
+
]
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"warningAcceptances": {
|
|
641
|
+
"type": "array",
|
|
642
|
+
"maxItems": 128,
|
|
643
|
+
"items": {
|
|
644
|
+
"$ref": "common.json#/$defs/warningAcceptance"
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
"output": {
|
|
648
|
+
"type": "object",
|
|
649
|
+
"additionalProperties": false,
|
|
650
|
+
"required": [
|
|
651
|
+
"graph",
|
|
652
|
+
"observations"
|
|
653
|
+
],
|
|
654
|
+
"properties": {
|
|
655
|
+
"graph": {
|
|
656
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
657
|
+
},
|
|
658
|
+
"observations": {
|
|
659
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"docs": {
|
|
664
|
+
"type": "object",
|
|
665
|
+
"additionalProperties": false,
|
|
666
|
+
"properties": {
|
|
667
|
+
"product": {
|
|
668
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
669
|
+
},
|
|
670
|
+
"architecture": {
|
|
671
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
672
|
+
},
|
|
673
|
+
"constraints": {
|
|
674
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
675
|
+
},
|
|
676
|
+
"adrDir": {
|
|
677
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
678
|
+
},
|
|
679
|
+
"runbookDir": {
|
|
680
|
+
"$ref": "common.json#/$defs/repoPath"
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "agentdoc.dev/schema/domain.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["apiVersion", "kind", "metadata"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"apiVersion": { "const": "agentdoc.dev/v1" },
|
|
9
|
+
"kind": { "const": "Domain" },
|
|
10
|
+
"metadata": { "$ref": "common.json#/$defs/metadata" },
|
|
11
|
+
"spec": { "type": "object", "additionalProperties": false, "properties": {} },
|
|
12
|
+
"extensions": { "$ref": "common.json#/$defs/extensions" }
|
|
13
|
+
}
|
|
14
|
+
}
|