@openplanr/protocol 0.4.0 → 0.6.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.
Files changed (31) hide show
  1. package/README.md +12 -0
  2. package/package.json +9 -1
  3. package/registries/commands.json +8 -8
  4. package/registries/diagram-authoring-capabilities.json +660 -0
  5. package/registries/skills.json +12 -12
  6. package/schemas/v1.11.0/design-handoff-readiness.schema.json +398 -0
  7. package/schemas/v1.11.0/design-implementation-handoff.schema.json +518 -0
  8. package/schemas/v1.11.0/design-planning-lineage.schema.json +106 -0
  9. package/schemas/v1.13.0/diagram-authoring-bundle.schema.json +1079 -0
  10. package/schemas/v1.13.0/diagram-authoring-capabilities.schema.json +211 -0
  11. package/schemas/v1.13.0/diagram-change-proposal.schema.json +3296 -0
  12. package/schemas/v1.13.0/diagram-document.schema.json +435 -0
  13. package/schemas/v1.13.0/diagram-edit-transaction.schema.json +3193 -0
  14. package/schemas/v1.13.0/diagram-fidelity-report.schema.json +157 -0
  15. package/schemas/v1.13.0/diagram-manifest.schema.json +311 -0
  16. package/schemas/v1.13.0/diagram-presentation.schema.json +395 -0
  17. package/schemas/v1.13.0/diagram-publication-state.schema.json +107 -0
  18. package/schemas/v1.13.0/diagram-source-map.schema.json +170 -0
  19. package/src/browser-contracts.d.mts +3 -1
  20. package/src/browser-contracts.mjs +14 -2
  21. package/src/contracts.mjs +27 -1
  22. package/src/design-handoff-contracts.d.mts +92 -0
  23. package/src/design-handoff-contracts.mjs +338 -0
  24. package/src/diagram-authoring-contracts.d.mts +112 -0
  25. package/src/diagram-authoring-contracts.mjs +668 -0
  26. package/src/diagram-contracts.d.mts +1 -1
  27. package/src/diagram-contracts.mjs +7 -4
  28. package/src/generated/canonical-registries.mjs +20 -20
  29. package/src/generated/legacy-diagram-schema.mjs +767 -0
  30. package/src/index.d.mts +2 -0
  31. package/src/index.mjs +4 -0
@@ -0,0 +1,518 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.11.0/design-implementation-handoff.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "design-implementation-handoff",
6
+ "version": "1.11.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-design-implementation-handoff"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "id": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 160,
21
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
22
+ },
23
+ "version": {
24
+ "type": "integer",
25
+ "minimum": 1
26
+ },
27
+ "status": {
28
+ "enum": [
29
+ "draft",
30
+ "approved",
31
+ "superseded",
32
+ "revoked"
33
+ ]
34
+ },
35
+ "authority": {
36
+ "const": "prepare-plan"
37
+ },
38
+ "title": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "maxLength": 240
42
+ },
43
+ "basis": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "designId": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 160,
51
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
52
+ },
53
+ "sourceRevision": {
54
+ "type": "string",
55
+ "pattern": "^sha256:[a-f0-9]{64}$"
56
+ },
57
+ "selectedVariant": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "maxLength": 160,
61
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
62
+ },
63
+ "readiness": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "properties": {
67
+ "status": {
68
+ "enum": [
69
+ "ready",
70
+ "attention",
71
+ "blocked",
72
+ "stale"
73
+ ]
74
+ },
75
+ "digest": {
76
+ "type": "string",
77
+ "pattern": "^sha256:[a-f0-9]{64}$"
78
+ }
79
+ },
80
+ "required": [
81
+ "status",
82
+ "digest"
83
+ ]
84
+ },
85
+ "reviewHandoff": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "properties": {
89
+ "version": {
90
+ "type": "integer",
91
+ "minimum": 1
92
+ },
93
+ "contentDigest": {
94
+ "type": "string",
95
+ "pattern": "^sha256:[a-f0-9]{64}$"
96
+ }
97
+ },
98
+ "required": [
99
+ "version",
100
+ "contentDigest"
101
+ ]
102
+ }
103
+ },
104
+ "required": [
105
+ "designId",
106
+ "sourceRevision",
107
+ "selectedVariant",
108
+ "readiness",
109
+ "reviewHandoff"
110
+ ]
111
+ },
112
+ "sources": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "properties": {
118
+ "id": {
119
+ "type": "string",
120
+ "minLength": 1,
121
+ "maxLength": 160,
122
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
123
+ },
124
+ "kind": {
125
+ "enum": [
126
+ "design-revision",
127
+ "selected-direction",
128
+ "design-specification",
129
+ "rendered-verification",
130
+ "review-context",
131
+ "review-feedback",
132
+ "review-metadata",
133
+ "review-handoff",
134
+ "screen",
135
+ "frame",
136
+ "component",
137
+ "state",
138
+ "flow",
139
+ "token",
140
+ "review-decision",
141
+ "element-anchor"
142
+ ]
143
+ },
144
+ "path": {
145
+ "type": "string",
146
+ "minLength": 1,
147
+ "maxLength": 4096
148
+ },
149
+ "revision": {
150
+ "type": "string",
151
+ "pattern": "^sha256:[a-f0-9]{64}$"
152
+ },
153
+ "digest": {
154
+ "type": "string",
155
+ "pattern": "^sha256:[a-f0-9]{64}$"
156
+ },
157
+ "anchor": {
158
+ "oneOf": [
159
+ {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "properties": {
163
+ "section": {
164
+ "type": "string",
165
+ "minLength": 1,
166
+ "maxLength": 160,
167
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
168
+ }
169
+ },
170
+ "required": [
171
+ "section"
172
+ ]
173
+ },
174
+ {
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "properties": {
178
+ "screenId": {
179
+ "type": "string",
180
+ "minLength": 1,
181
+ "maxLength": 160,
182
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
183
+ }
184
+ },
185
+ "required": [
186
+ "screenId"
187
+ ]
188
+ },
189
+ {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "properties": {
193
+ "screenId": {
194
+ "type": "string",
195
+ "minLength": 1,
196
+ "maxLength": 160,
197
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
198
+ },
199
+ "elementId": {
200
+ "type": "string",
201
+ "minLength": 1,
202
+ "maxLength": 160,
203
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
204
+ }
205
+ },
206
+ "required": [
207
+ "screenId",
208
+ "elementId"
209
+ ]
210
+ },
211
+ {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "properties": {
215
+ "reviewId": {
216
+ "type": "string",
217
+ "minLength": 1,
218
+ "maxLength": 160,
219
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
220
+ },
221
+ "pinId": {
222
+ "type": "string",
223
+ "minLength": 1,
224
+ "maxLength": 160,
225
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
226
+ }
227
+ },
228
+ "required": [
229
+ "reviewId",
230
+ "pinId"
231
+ ]
232
+ }
233
+ ]
234
+ }
235
+ },
236
+ "required": [
237
+ "id",
238
+ "kind",
239
+ "path"
240
+ ]
241
+ },
242
+ "maxItems": 10000
243
+ },
244
+ "requirements": {
245
+ "type": "array",
246
+ "items": {
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "properties": {
250
+ "id": {
251
+ "type": "string",
252
+ "pattern": "^REQ-[0-9]{3,}$"
253
+ },
254
+ "kind": {
255
+ "enum": [
256
+ "behavior",
257
+ "visual-state",
258
+ "responsive",
259
+ "accessibility",
260
+ "content-data-assumption",
261
+ "constraint",
262
+ "verification-intent"
263
+ ]
264
+ },
265
+ "statement": {
266
+ "type": "string",
267
+ "minLength": 1,
268
+ "maxLength": 16384
269
+ },
270
+ "sourceRefs": {
271
+ "type": "array",
272
+ "items": {
273
+ "type": "string",
274
+ "minLength": 1,
275
+ "maxLength": 160,
276
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
277
+ },
278
+ "maxItems": 256,
279
+ "minItems": 1
280
+ },
281
+ "verification": {
282
+ "type": "array",
283
+ "items": {
284
+ "type": "string",
285
+ "minLength": 1,
286
+ "maxLength": 16384
287
+ },
288
+ "maxItems": 256,
289
+ "minItems": 1
290
+ }
291
+ },
292
+ "required": [
293
+ "id",
294
+ "kind",
295
+ "statement",
296
+ "sourceRefs",
297
+ "verification"
298
+ ]
299
+ },
300
+ "maxItems": 10000,
301
+ "minItems": 1
302
+ },
303
+ "contentDigest": {
304
+ "type": "string",
305
+ "pattern": "^sha256:[a-f0-9]{64}$"
306
+ },
307
+ "markdown": {
308
+ "type": "string",
309
+ "maxLength": 2097152
310
+ },
311
+ "approval": {
312
+ "type": "object",
313
+ "additionalProperties": false,
314
+ "properties": {
315
+ "actorId": {
316
+ "type": "string",
317
+ "minLength": 1,
318
+ "maxLength": 160,
319
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
320
+ },
321
+ "approvedAt": {
322
+ "type": "string",
323
+ "format": "date-time"
324
+ },
325
+ "contentDigest": {
326
+ "type": "string",
327
+ "pattern": "^sha256:[a-f0-9]{64}$"
328
+ },
329
+ "authority": {
330
+ "const": "prepare-plan"
331
+ }
332
+ },
333
+ "required": [
334
+ "actorId",
335
+ "approvedAt",
336
+ "contentDigest",
337
+ "authority"
338
+ ]
339
+ },
340
+ "supersededBy": {
341
+ "type": "object",
342
+ "additionalProperties": false,
343
+ "properties": {
344
+ "id": {
345
+ "type": "string",
346
+ "minLength": 1,
347
+ "maxLength": 160,
348
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
349
+ },
350
+ "version": {
351
+ "type": "integer",
352
+ "minimum": 1
353
+ },
354
+ "contentDigest": {
355
+ "type": "string",
356
+ "pattern": "^sha256:[a-f0-9]{64}$"
357
+ }
358
+ },
359
+ "required": [
360
+ "id",
361
+ "version",
362
+ "contentDigest"
363
+ ]
364
+ },
365
+ "revocation": {
366
+ "type": "object",
367
+ "additionalProperties": false,
368
+ "properties": {
369
+ "actorId": {
370
+ "type": "string",
371
+ "minLength": 1,
372
+ "maxLength": 160,
373
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
374
+ },
375
+ "revokedAt": {
376
+ "type": "string",
377
+ "format": "date-time"
378
+ },
379
+ "reason": {
380
+ "type": "string",
381
+ "minLength": 1,
382
+ "maxLength": 16384
383
+ }
384
+ },
385
+ "required": [
386
+ "actorId",
387
+ "revokedAt",
388
+ "reason"
389
+ ]
390
+ }
391
+ },
392
+ "required": [
393
+ "kind",
394
+ "schemaVersion",
395
+ "id",
396
+ "version",
397
+ "status",
398
+ "authority",
399
+ "title",
400
+ "basis",
401
+ "sources",
402
+ "requirements",
403
+ "contentDigest",
404
+ "markdown"
405
+ ],
406
+ "allOf": [
407
+ {
408
+ "if": {
409
+ "properties": {
410
+ "status": {
411
+ "const": "approved"
412
+ }
413
+ },
414
+ "required": [
415
+ "status"
416
+ ]
417
+ },
418
+ "then": {
419
+ "required": [
420
+ "approval"
421
+ ],
422
+ "not": {
423
+ "anyOf": [
424
+ {
425
+ "required": [
426
+ "supersededBy"
427
+ ]
428
+ },
429
+ {
430
+ "required": [
431
+ "revocation"
432
+ ]
433
+ }
434
+ ]
435
+ }
436
+ }
437
+ },
438
+ {
439
+ "if": {
440
+ "properties": {
441
+ "status": {
442
+ "const": "superseded"
443
+ }
444
+ },
445
+ "required": [
446
+ "status"
447
+ ]
448
+ },
449
+ "then": {
450
+ "required": [
451
+ "approval",
452
+ "supersededBy"
453
+ ],
454
+ "not": {
455
+ "required": [
456
+ "revocation"
457
+ ]
458
+ }
459
+ }
460
+ },
461
+ {
462
+ "if": {
463
+ "properties": {
464
+ "status": {
465
+ "const": "revoked"
466
+ }
467
+ },
468
+ "required": [
469
+ "status"
470
+ ]
471
+ },
472
+ "then": {
473
+ "required": [
474
+ "approval",
475
+ "revocation"
476
+ ],
477
+ "not": {
478
+ "required": [
479
+ "supersededBy"
480
+ ]
481
+ }
482
+ }
483
+ },
484
+ {
485
+ "if": {
486
+ "properties": {
487
+ "status": {
488
+ "const": "draft"
489
+ }
490
+ },
491
+ "required": [
492
+ "status"
493
+ ]
494
+ },
495
+ "then": {
496
+ "not": {
497
+ "anyOf": [
498
+ {
499
+ "required": [
500
+ "approval"
501
+ ]
502
+ },
503
+ {
504
+ "required": [
505
+ "supersededBy"
506
+ ]
507
+ },
508
+ {
509
+ "required": [
510
+ "revocation"
511
+ ]
512
+ }
513
+ ]
514
+ }
515
+ }
516
+ }
517
+ ]
518
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.11.0/design-planning-lineage.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "design-planning-lineage",
6
+ "version": "1.11.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-design-planning-lineage"
13
+ },
14
+ "schemaVersion": {
15
+ "const": "1.0.0"
16
+ },
17
+ "handoff": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "properties": {
21
+ "id": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 160,
25
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
26
+ },
27
+ "version": {
28
+ "type": "integer",
29
+ "minimum": 1
30
+ },
31
+ "contentDigest": {
32
+ "type": "string",
33
+ "pattern": "^sha256:[a-f0-9]{64}$"
34
+ }
35
+ },
36
+ "required": [
37
+ "id",
38
+ "version",
39
+ "contentDigest"
40
+ ]
41
+ },
42
+ "specId": {
43
+ "type": "string",
44
+ "pattern": "^SPEC-[0-9]{3,}$"
45
+ },
46
+ "mappings": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "properties": {
52
+ "requirementId": {
53
+ "type": "string",
54
+ "pattern": "^REQ-[0-9]{3,}$"
55
+ },
56
+ "acceptanceRefs": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "storyId": {
63
+ "type": "string",
64
+ "pattern": "^US-[0-9]{3,}$"
65
+ },
66
+ "acceptanceId": {
67
+ "type": "string",
68
+ "pattern": "^AC-[0-9]{3,}$"
69
+ }
70
+ },
71
+ "required": [
72
+ "storyId",
73
+ "acceptanceId"
74
+ ]
75
+ },
76
+ "maxItems": 256,
77
+ "minItems": 1
78
+ },
79
+ "taskIds": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "string",
83
+ "pattern": "^T-[0-9]{3,}$"
84
+ },
85
+ "maxItems": 256,
86
+ "minItems": 1
87
+ }
88
+ },
89
+ "required": [
90
+ "requirementId",
91
+ "acceptanceRefs",
92
+ "taskIds"
93
+ ]
94
+ },
95
+ "maxItems": 10000,
96
+ "minItems": 1
97
+ }
98
+ },
99
+ "required": [
100
+ "kind",
101
+ "schemaVersion",
102
+ "handoff",
103
+ "specId",
104
+ "mappings"
105
+ ]
106
+ }