@ai-dossier/core 1.0.1

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 (114) hide show
  1. package/dist/checksum.d.ts +15 -0
  2. package/dist/checksum.d.ts.map +1 -0
  3. package/dist/checksum.js +45 -0
  4. package/dist/checksum.js.map +1 -0
  5. package/dist/formatter/formatter.d.ts +3 -0
  6. package/dist/formatter/formatter.d.ts.map +1 -0
  7. package/dist/formatter/formatter.js +120 -0
  8. package/dist/formatter/formatter.js.map +1 -0
  9. package/dist/formatter/index.d.ts +5 -0
  10. package/dist/formatter/index.d.ts.map +1 -0
  11. package/dist/formatter/index.js +32 -0
  12. package/dist/formatter/index.js.map +1 -0
  13. package/dist/formatter/types.d.ts +11 -0
  14. package/dist/formatter/types.d.ts.map +1 -0
  15. package/dist/formatter/types.js +9 -0
  16. package/dist/formatter/types.js.map +1 -0
  17. package/dist/index.d.ts +23 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +77 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/linter/config.d.ts +4 -0
  22. package/dist/linter/config.d.ts.map +1 -0
  23. package/dist/linter/config.js +42 -0
  24. package/dist/linter/config.js.map +1 -0
  25. package/dist/linter/index.d.ts +8 -0
  26. package/dist/linter/index.d.ts.map +1 -0
  27. package/dist/linter/index.js +69 -0
  28. package/dist/linter/index.js.map +1 -0
  29. package/dist/linter/registry.d.ts +10 -0
  30. package/dist/linter/registry.d.ts.map +1 -0
  31. package/dist/linter/registry.js +37 -0
  32. package/dist/linter/registry.js.map +1 -0
  33. package/dist/linter/rules/checksum-valid.d.ts +3 -0
  34. package/dist/linter/rules/checksum-valid.d.ts.map +1 -0
  35. package/dist/linter/rules/checksum-valid.js +46 -0
  36. package/dist/linter/rules/checksum-valid.js.map +1 -0
  37. package/dist/linter/rules/index.d.ts +11 -0
  38. package/dist/linter/rules/index.d.ts.map +1 -0
  39. package/dist/linter/rules/index.js +27 -0
  40. package/dist/linter/rules/index.js.map +1 -0
  41. package/dist/linter/rules/objective-quality.d.ts +3 -0
  42. package/dist/linter/rules/objective-quality.d.ts.map +1 -0
  43. package/dist/linter/rules/objective-quality.js +44 -0
  44. package/dist/linter/rules/objective-quality.js.map +1 -0
  45. package/dist/linter/rules/required-sections.d.ts +3 -0
  46. package/dist/linter/rules/required-sections.d.ts.map +1 -0
  47. package/dist/linter/rules/required-sections.js +32 -0
  48. package/dist/linter/rules/required-sections.js.map +1 -0
  49. package/dist/linter/rules/risk-level-consistency.d.ts +3 -0
  50. package/dist/linter/rules/risk-level-consistency.d.ts.map +1 -0
  51. package/dist/linter/rules/risk-level-consistency.js +24 -0
  52. package/dist/linter/rules/risk-level-consistency.js.map +1 -0
  53. package/dist/linter/rules/schema-valid.d.ts +3 -0
  54. package/dist/linter/rules/schema-valid.d.ts.map +1 -0
  55. package/dist/linter/rules/schema-valid.js +63 -0
  56. package/dist/linter/rules/schema-valid.js.map +1 -0
  57. package/dist/linter/rules/semver-version.d.ts +3 -0
  58. package/dist/linter/rules/semver-version.d.ts.map +1 -0
  59. package/dist/linter/rules/semver-version.js +34 -0
  60. package/dist/linter/rules/semver-version.js.map +1 -0
  61. package/dist/linter/rules/tools-check-command.d.ts +3 -0
  62. package/dist/linter/rules/tools-check-command.d.ts.map +1 -0
  63. package/dist/linter/rules/tools-check-command.js +27 -0
  64. package/dist/linter/rules/tools-check-command.js.map +1 -0
  65. package/dist/linter/types.d.ts +31 -0
  66. package/dist/linter/types.d.ts.map +1 -0
  67. package/dist/linter/types.js +3 -0
  68. package/dist/linter/types.js.map +1 -0
  69. package/dist/parser.d.ts +18 -0
  70. package/dist/parser.d.ts.map +1 -0
  71. package/dist/parser.js +74 -0
  72. package/dist/parser.js.map +1 -0
  73. package/dist/schema/dossier-schema.json +745 -0
  74. package/dist/signature.d.ts +33 -0
  75. package/dist/signature.d.ts.map +1 -0
  76. package/dist/signature.js +111 -0
  77. package/dist/signature.js.map +1 -0
  78. package/dist/signers/ed25519.d.ts +17 -0
  79. package/dist/signers/ed25519.d.ts.map +1 -0
  80. package/dist/signers/ed25519.js +66 -0
  81. package/dist/signers/ed25519.js.map +1 -0
  82. package/dist/signers/index.d.ts +39 -0
  83. package/dist/signers/index.d.ts.map +1 -0
  84. package/dist/signers/index.js +18 -0
  85. package/dist/signers/index.js.map +1 -0
  86. package/dist/signers/kms.d.ts +20 -0
  87. package/dist/signers/kms.d.ts.map +1 -0
  88. package/dist/signers/kms.js +108 -0
  89. package/dist/signers/kms.js.map +1 -0
  90. package/dist/signers/registry.d.ts +29 -0
  91. package/dist/signers/registry.d.ts.map +1 -0
  92. package/dist/signers/registry.js +67 -0
  93. package/dist/signers/registry.js.map +1 -0
  94. package/dist/types.d.ts +79 -0
  95. package/dist/types.d.ts.map +1 -0
  96. package/dist/types.js +6 -0
  97. package/dist/types.js.map +1 -0
  98. package/dist/utils/crypto.d.ts +16 -0
  99. package/dist/utils/crypto.d.ts.map +1 -0
  100. package/dist/utils/crypto.js +25 -0
  101. package/dist/utils/crypto.js.map +1 -0
  102. package/dist/utils/errors.d.ts +18 -0
  103. package/dist/utils/errors.d.ts.map +1 -0
  104. package/dist/utils/errors.js +32 -0
  105. package/dist/utils/errors.js.map +1 -0
  106. package/dist/utils/fs.d.ts +12 -0
  107. package/dist/utils/fs.d.ts.map +1 -0
  108. package/dist/utils/fs.js +24 -0
  109. package/dist/utils/fs.js.map +1 -0
  110. package/dist/utils/verification.d.ts +11 -0
  111. package/dist/utils/verification.d.ts.map +1 -0
  112. package/dist/utils/verification.js +35 -0
  113. package/dist/utils/verification.js.map +1 -0
  114. package/package.json +52 -0
@@ -0,0 +1,745 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/imboard-ai/ai-dossier/schema/v1.0.0",
4
+ "title": "Dossier Schema",
5
+ "description": "JSON Schema for Dossier frontmatter metadata, providing deterministic structure for LLM agent automation",
6
+ "type": "object",
7
+ "required": [
8
+ "dossier_schema_version",
9
+ "title",
10
+ "version",
11
+ "protocol_version",
12
+ "status",
13
+ "objective",
14
+ "checksum",
15
+ "risk_level",
16
+ "requires_approval"
17
+ ],
18
+ "properties": {
19
+ "dossier_schema_version": {
20
+ "type": "string",
21
+ "description": "Version of the Dossier Schema specification being used",
22
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
23
+ "const": "1.0.0"
24
+ },
25
+ "title": {
26
+ "type": "string",
27
+ "description": "Human-readable title of the Dossier",
28
+ "minLength": 3,
29
+ "maxLength": 200
30
+ },
31
+ "version": {
32
+ "type": "string",
33
+ "description": "Semantic version of this specific Dossier",
34
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
35
+ },
36
+ "protocol_version": {
37
+ "type": "string",
38
+ "description": "Dossier Protocol version this Dossier adheres to",
39
+ "pattern": "^\\d+\\.\\d+$"
40
+ },
41
+ "status": {
42
+ "type": "string",
43
+ "description": "Lifecycle status of this Dossier",
44
+ "enum": ["Draft", "Stable", "Deprecated", "Experimental"]
45
+ },
46
+ "last_updated": {
47
+ "type": "string",
48
+ "description": "ISO 8601 date when the Dossier was last updated",
49
+ "format": "date"
50
+ },
51
+ "objective": {
52
+ "type": "string",
53
+ "description": "Clear, single-purpose statement (1-3 sentences) describing what this Dossier accomplishes",
54
+ "minLength": 10,
55
+ "maxLength": 500
56
+ },
57
+ "category": {
58
+ "type": "array",
59
+ "description": "Categories for organizing and discovering Dossiers",
60
+ "items": {
61
+ "type": "string",
62
+ "enum": [
63
+ "devops",
64
+ "database",
65
+ "development",
66
+ "data-science",
67
+ "security",
68
+ "testing",
69
+ "deployment",
70
+ "maintenance",
71
+ "setup",
72
+ "migration",
73
+ "monitoring",
74
+ "infrastructure",
75
+ "ci-cd",
76
+ "documentation"
77
+ ]
78
+ },
79
+ "minItems": 1,
80
+ "uniqueItems": true
81
+ },
82
+ "tags": {
83
+ "type": "array",
84
+ "description": "Free-form tags for searchability (e.g., 'docker', 'aws', 'postgresql')",
85
+ "items": {
86
+ "type": "string",
87
+ "minLength": 2,
88
+ "maxLength": 50
89
+ },
90
+ "uniqueItems": true
91
+ },
92
+ "tools_required": {
93
+ "type": "array",
94
+ "description": "List of tools/commands that must be available for execution",
95
+ "items": {
96
+ "type": "object",
97
+ "required": ["name"],
98
+ "properties": {
99
+ "name": {
100
+ "type": "string",
101
+ "description": "Tool or command name (e.g., 'docker', 'terraform', 'npm')"
102
+ },
103
+ "version": {
104
+ "type": "string",
105
+ "description": "Minimum version required (optional)"
106
+ },
107
+ "check_command": {
108
+ "type": "string",
109
+ "description": "Command to verify tool availability (e.g., 'docker --version')"
110
+ },
111
+ "install_url": {
112
+ "type": "string",
113
+ "description": "URL to installation instructions",
114
+ "format": "uri"
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "estimated_duration": {
120
+ "type": "object",
121
+ "description": "Estimated time to complete this Dossier",
122
+ "properties": {
123
+ "min_minutes": {
124
+ "type": "number",
125
+ "description": "Minimum estimated duration in minutes",
126
+ "minimum": 0
127
+ },
128
+ "max_minutes": {
129
+ "type": "number",
130
+ "description": "Maximum estimated duration in minutes",
131
+ "minimum": 0
132
+ }
133
+ }
134
+ },
135
+ "risk_level": {
136
+ "type": "string",
137
+ "description": "Risk assessment of executing this Dossier (REQUIRED for security)",
138
+ "enum": ["low", "medium", "high", "critical"]
139
+ },
140
+ "risk_factors": {
141
+ "type": "array",
142
+ "description": "Specific risk factors this dossier involves",
143
+ "items": {
144
+ "type": "string",
145
+ "enum": [
146
+ "modifies_files",
147
+ "deletes_files",
148
+ "modifies_cloud_resources",
149
+ "requires_credentials",
150
+ "network_access",
151
+ "executes_external_code",
152
+ "database_operations",
153
+ "system_configuration"
154
+ ]
155
+ },
156
+ "uniqueItems": true
157
+ },
158
+ "requires_approval": {
159
+ "type": "boolean",
160
+ "description": "Whether user approval is required before execution (REQUIRED)",
161
+ "default": true
162
+ },
163
+ "destructive_operations": {
164
+ "type": "array",
165
+ "description": "Human-readable list of potentially destructive operations this dossier performs",
166
+ "items": {
167
+ "type": "string",
168
+ "minLength": 10
169
+ }
170
+ },
171
+ "checksum": {
172
+ "type": "object",
173
+ "description": "Content integrity hash (REQUIRED for security - verifies dossier hasn't been tampered with)",
174
+ "required": ["algorithm", "hash"],
175
+ "properties": {
176
+ "algorithm": {
177
+ "type": "string",
178
+ "description": "Hash algorithm used",
179
+ "enum": ["sha256"],
180
+ "const": "sha256"
181
+ },
182
+ "hash": {
183
+ "type": "string",
184
+ "description": "SHA256 hash of dossier body content (after frontmatter)",
185
+ "pattern": "^[a-f0-9]{64}$"
186
+ }
187
+ }
188
+ },
189
+ "signature": {
190
+ "type": "object",
191
+ "description": "Optional cryptographic signature for authenticity verification (dual-signature system: AWS KMS for official, minisign for community)",
192
+ "required": ["algorithm", "signed_by"],
193
+ "oneOf": [
194
+ {
195
+ "description": "AWS KMS signature (official dossiers)",
196
+ "required": ["algorithm", "key_id", "signature", "signed_by"],
197
+ "properties": {
198
+ "algorithm": {
199
+ "type": "string",
200
+ "const": "ecdsa-sha256",
201
+ "description": "ECDSA signature with SHA256 (AWS KMS)"
202
+ },
203
+ "key_id": {
204
+ "type": "string",
205
+ "description": "AWS KMS key identifier (e.g., 'imboard-ai-2024-kms' or ARN)",
206
+ "examples": ["imboard-ai-2024-kms", "arn:aws:kms:us-east-1:942039714848:key/xxx"]
207
+ },
208
+ "signature": {
209
+ "type": "string",
210
+ "description": "Base64-encoded ECDSA signature (DER format)",
211
+ "pattern": "^[A-Za-z0-9+/]+=*$"
212
+ },
213
+ "public_key": {
214
+ "type": "string",
215
+ "description": "Base64-encoded DER public key from AWS KMS (optional, can be fetched from KMS)"
216
+ },
217
+ "signed_by": {
218
+ "type": "string",
219
+ "description": "Signer identity",
220
+ "examples": ["Imboard AI Security Team <security@imboard.ai>"]
221
+ },
222
+ "timestamp": {
223
+ "type": "string",
224
+ "description": "When the signature was created (ISO 8601 format)",
225
+ "format": "date-time"
226
+ }
227
+ }
228
+ },
229
+ {
230
+ "description": "minisign signature (community dossiers)",
231
+ "required": ["algorithm", "public_key", "signature", "signed_by"],
232
+ "properties": {
233
+ "algorithm": {
234
+ "type": "string",
235
+ "const": "ed25519",
236
+ "description": "Ed25519 signature (minisign)"
237
+ },
238
+ "public_key": {
239
+ "type": "string",
240
+ "description": "Minisign public key (base64 encoded, starts with 'RWT')",
241
+ "pattern": "^RWT[A-Za-z0-9+/=]+$"
242
+ },
243
+ "signature": {
244
+ "type": "string",
245
+ "description": "Minisign signature data (includes trusted comment)"
246
+ },
247
+ "key_id": {
248
+ "type": "string",
249
+ "description": "Human-readable key identifier",
250
+ "examples": ["author-2024", "community-member-2024"]
251
+ },
252
+ "signed_by": {
253
+ "type": "string",
254
+ "description": "Signer identity",
255
+ "examples": ["Author Name <author@example.com>"]
256
+ },
257
+ "timestamp": {
258
+ "type": "string",
259
+ "description": "When the signature was created (ISO 8601 format)",
260
+ "format": "date-time"
261
+ }
262
+ }
263
+ }
264
+ ]
265
+ },
266
+ "relationships": {
267
+ "type": "object",
268
+ "description": "Relationships with other Dossiers",
269
+ "properties": {
270
+ "preceded_by": {
271
+ "type": "array",
272
+ "description": "Dossiers that should run before this one",
273
+ "items": {
274
+ "type": "object",
275
+ "required": ["dossier"],
276
+ "properties": {
277
+ "dossier": {
278
+ "type": "string",
279
+ "description": "Name or path of the preceding Dossier"
280
+ },
281
+ "condition": {
282
+ "type": "string",
283
+ "enum": ["required", "optional", "suggested"],
284
+ "description": "Whether this prerequisite is required, optional, or suggested"
285
+ },
286
+ "reason": {
287
+ "type": "string",
288
+ "description": "Why this prerequisite exists"
289
+ }
290
+ }
291
+ }
292
+ },
293
+ "followed_by": {
294
+ "type": "array",
295
+ "description": "Dossiers that should run after this one",
296
+ "items": {
297
+ "type": "object",
298
+ "required": ["dossier"],
299
+ "properties": {
300
+ "dossier": {
301
+ "type": "string",
302
+ "description": "Name or path of the following Dossier"
303
+ },
304
+ "condition": {
305
+ "type": "string",
306
+ "enum": ["required", "suggested"],
307
+ "description": "Whether this follow-up is required or suggested"
308
+ },
309
+ "purpose": {
310
+ "type": "string",
311
+ "description": "Purpose of the follow-up Dossier"
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "alternatives": {
317
+ "type": "array",
318
+ "description": "Alternative Dossiers that accomplish similar goals",
319
+ "items": {
320
+ "type": "object",
321
+ "required": ["dossier"],
322
+ "properties": {
323
+ "dossier": {
324
+ "type": "string",
325
+ "description": "Name or path of the alternative Dossier"
326
+ },
327
+ "when_to_use": {
328
+ "type": "string",
329
+ "description": "When to use the alternative instead"
330
+ }
331
+ }
332
+ }
333
+ },
334
+ "conflicts_with": {
335
+ "type": "array",
336
+ "description": "Dossiers that conflict with this one",
337
+ "items": {
338
+ "type": "object",
339
+ "required": ["dossier", "reason"],
340
+ "properties": {
341
+ "dossier": {
342
+ "type": "string",
343
+ "description": "Name or path of the conflicting Dossier"
344
+ },
345
+ "reason": {
346
+ "type": "string",
347
+ "description": "Why they conflict"
348
+ }
349
+ }
350
+ }
351
+ },
352
+ "can_run_parallel_with": {
353
+ "type": "array",
354
+ "description": "Dossiers that can be executed in parallel",
355
+ "items": {
356
+ "type": "string",
357
+ "description": "Name or path of parallelizable Dossier"
358
+ }
359
+ }
360
+ }
361
+ },
362
+ "inputs": {
363
+ "type": "object",
364
+ "description": "Input parameters and data required",
365
+ "properties": {
366
+ "required": {
367
+ "type": "array",
368
+ "description": "Required inputs that must be provided",
369
+ "items": {
370
+ "type": "object",
371
+ "required": ["name", "description"],
372
+ "properties": {
373
+ "name": {
374
+ "type": "string",
375
+ "description": "Input parameter name"
376
+ },
377
+ "description": {
378
+ "type": "string",
379
+ "description": "Description of the input"
380
+ },
381
+ "type": {
382
+ "type": "string",
383
+ "description": "Data type (e.g., 'string', 'number', 'file', 'array')"
384
+ },
385
+ "validation": {
386
+ "type": "string",
387
+ "description": "Validation rules or regex pattern"
388
+ },
389
+ "example": {
390
+ "type": "string",
391
+ "description": "Example value"
392
+ }
393
+ }
394
+ }
395
+ },
396
+ "optional": {
397
+ "type": "array",
398
+ "description": "Optional inputs with default behaviors",
399
+ "items": {
400
+ "type": "object",
401
+ "required": ["name", "description"],
402
+ "properties": {
403
+ "name": {
404
+ "type": "string",
405
+ "description": "Input parameter name"
406
+ },
407
+ "description": {
408
+ "type": "string",
409
+ "description": "Description of the input"
410
+ },
411
+ "type": {
412
+ "type": "string",
413
+ "description": "Data type"
414
+ },
415
+ "default": {
416
+ "description": "Default value if not provided"
417
+ },
418
+ "example": {
419
+ "type": "string",
420
+ "description": "Example value"
421
+ }
422
+ }
423
+ }
424
+ },
425
+ "from_dossiers": {
426
+ "type": "array",
427
+ "description": "Inputs sourced from other Dossiers' outputs",
428
+ "items": {
429
+ "type": "object",
430
+ "required": ["source_dossier", "output_name"],
431
+ "properties": {
432
+ "source_dossier": {
433
+ "type": "string",
434
+ "description": "Name or path of source Dossier"
435
+ },
436
+ "output_name": {
437
+ "type": "string",
438
+ "description": "Name of the output from source Dossier"
439
+ },
440
+ "usage": {
441
+ "type": "string",
442
+ "description": "How this input is used"
443
+ }
444
+ }
445
+ }
446
+ }
447
+ }
448
+ },
449
+ "outputs": {
450
+ "type": "object",
451
+ "description": "Outputs produced by this Dossier",
452
+ "properties": {
453
+ "files": {
454
+ "type": "array",
455
+ "description": "Files created or modified",
456
+ "items": {
457
+ "type": "object",
458
+ "required": ["path", "description"],
459
+ "properties": {
460
+ "path": {
461
+ "type": "string",
462
+ "description": "File path (may include variables like ${PROJECT_ROOT})"
463
+ },
464
+ "description": {
465
+ "type": "string",
466
+ "description": "Description of the file"
467
+ },
468
+ "required": {
469
+ "type": "boolean",
470
+ "description": "Whether this file is always created",
471
+ "default": true
472
+ },
473
+ "format": {
474
+ "type": "string",
475
+ "description": "File format (e.g., 'json', 'yaml', 'sql')"
476
+ }
477
+ }
478
+ }
479
+ },
480
+ "configuration": {
481
+ "type": "array",
482
+ "description": "Configuration values produced",
483
+ "items": {
484
+ "type": "object",
485
+ "required": ["key", "description"],
486
+ "properties": {
487
+ "key": {
488
+ "type": "string",
489
+ "description": "Configuration key or variable name"
490
+ },
491
+ "description": {
492
+ "type": "string",
493
+ "description": "Description of the configuration"
494
+ },
495
+ "consumed_by": {
496
+ "type": "array",
497
+ "description": "Dossiers that consume this configuration",
498
+ "items": {
499
+ "type": "string"
500
+ }
501
+ },
502
+ "export_as": {
503
+ "type": "string",
504
+ "description": "How to export (e.g., 'env_var', 'file', 'terraform_output')"
505
+ }
506
+ }
507
+ }
508
+ },
509
+ "state_changes": {
510
+ "type": "array",
511
+ "description": "State changes made by this Dossier",
512
+ "items": {
513
+ "type": "object",
514
+ "required": ["description"],
515
+ "properties": {
516
+ "description": {
517
+ "type": "string",
518
+ "description": "Description of the state change"
519
+ },
520
+ "affects": {
521
+ "type": "string",
522
+ "description": "What this state change affects"
523
+ },
524
+ "reversible": {
525
+ "type": "boolean",
526
+ "description": "Whether this change can be rolled back"
527
+ }
528
+ }
529
+ }
530
+ },
531
+ "artifacts": {
532
+ "type": "array",
533
+ "description": "Generated artifacts (scripts, reports, logs)",
534
+ "items": {
535
+ "type": "object",
536
+ "required": ["path", "purpose"],
537
+ "properties": {
538
+ "path": {
539
+ "type": "string",
540
+ "description": "Artifact path"
541
+ },
542
+ "purpose": {
543
+ "type": "string",
544
+ "description": "Purpose of the artifact"
545
+ },
546
+ "type": {
547
+ "type": "string",
548
+ "description": "Type of artifact (e.g., 'script', 'log', 'report')"
549
+ }
550
+ }
551
+ }
552
+ }
553
+ }
554
+ },
555
+ "coupling": {
556
+ "type": "object",
557
+ "description": "Coupling level with other systems and Dossiers",
558
+ "required": ["level"],
559
+ "properties": {
560
+ "level": {
561
+ "type": "string",
562
+ "enum": ["None", "Loose", "Medium", "Tight"],
563
+ "description": "Coupling level"
564
+ },
565
+ "details": {
566
+ "type": "string",
567
+ "description": "Explanation of coupling level and dependencies"
568
+ }
569
+ }
570
+ },
571
+ "prerequisites": {
572
+ "type": "array",
573
+ "description": "Prerequisites that must exist before execution",
574
+ "items": {
575
+ "type": "object",
576
+ "required": ["description"],
577
+ "properties": {
578
+ "description": {
579
+ "type": "string",
580
+ "description": "Description of the prerequisite"
581
+ },
582
+ "validation_command": {
583
+ "type": "string",
584
+ "description": "Command to validate this prerequisite exists"
585
+ },
586
+ "type": {
587
+ "type": "string",
588
+ "enum": ["file", "directory", "tool", "service", "permission", "environment"],
589
+ "description": "Type of prerequisite"
590
+ }
591
+ }
592
+ }
593
+ },
594
+ "validation": {
595
+ "type": "object",
596
+ "description": "Success criteria and validation commands",
597
+ "properties": {
598
+ "success_criteria": {
599
+ "type": "array",
600
+ "description": "Verifiable criteria for success",
601
+ "items": {
602
+ "type": "string"
603
+ }
604
+ },
605
+ "verification_commands": {
606
+ "type": "array",
607
+ "description": "Commands to verify success",
608
+ "items": {
609
+ "type": "object",
610
+ "required": ["command", "expected"],
611
+ "properties": {
612
+ "command": {
613
+ "type": "string",
614
+ "description": "Command to run"
615
+ },
616
+ "expected": {
617
+ "type": "string",
618
+ "description": "Expected output or result"
619
+ },
620
+ "description": {
621
+ "type": "string",
622
+ "description": "What this verifies"
623
+ }
624
+ }
625
+ }
626
+ }
627
+ }
628
+ },
629
+ "rollback": {
630
+ "type": "object",
631
+ "description": "Rollback information for reversing this Dossier",
632
+ "properties": {
633
+ "supported": {
634
+ "type": "boolean",
635
+ "description": "Whether rollback is supported"
636
+ },
637
+ "procedure": {
638
+ "type": "string",
639
+ "description": "Description of rollback procedure"
640
+ },
641
+ "automated": {
642
+ "type": "boolean",
643
+ "description": "Whether rollback can be automated"
644
+ },
645
+ "backup_required": {
646
+ "type": "boolean",
647
+ "description": "Whether backup is required before execution"
648
+ }
649
+ }
650
+ },
651
+ "authors": {
652
+ "type": "array",
653
+ "description": "Authors or maintainers of this Dossier",
654
+ "items": {
655
+ "type": "object",
656
+ "properties": {
657
+ "name": {
658
+ "type": "string",
659
+ "description": "Author name"
660
+ },
661
+ "email": {
662
+ "type": "string",
663
+ "description": "Author email",
664
+ "format": "email"
665
+ },
666
+ "url": {
667
+ "type": "string",
668
+ "description": "Author URL",
669
+ "format": "uri"
670
+ }
671
+ }
672
+ }
673
+ },
674
+ "license": {
675
+ "type": "string",
676
+ "description": "License identifier (SPDX format recommended)"
677
+ },
678
+ "homepage": {
679
+ "type": "string",
680
+ "description": "URL to Dossier homepage or documentation",
681
+ "format": "uri"
682
+ },
683
+ "repository": {
684
+ "type": "string",
685
+ "description": "URL to Dossier source repository",
686
+ "format": "uri"
687
+ },
688
+ "custom": {
689
+ "type": "object",
690
+ "description": "Custom metadata fields (prefixed with X- in markdown)",
691
+ "additionalProperties": true
692
+ },
693
+ "mcp_integration": {
694
+ "type": "object",
695
+ "description": "MCP (Model Context Protocol) server integration metadata for automatic dossier execution",
696
+ "properties": {
697
+ "required": {
698
+ "type": "boolean",
699
+ "description": "Whether the dossier MCP server is required for execution",
700
+ "default": false
701
+ },
702
+ "server_name": {
703
+ "type": "string",
704
+ "description": "npm package name of the required MCP server",
705
+ "default": "@ai-dossier/mcp-server"
706
+ },
707
+ "min_version": {
708
+ "type": "string",
709
+ "description": "Minimum MCP server version required (semver format)",
710
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
711
+ },
712
+ "features_used": {
713
+ "type": "array",
714
+ "description": "List of MCP tools and resources this dossier uses",
715
+ "items": {
716
+ "type": "string",
717
+ "enum": [
718
+ "verify_dossier",
719
+ "read_dossier",
720
+ "list_dossiers",
721
+ "validate_dossier",
722
+ "dossier://protocol",
723
+ "dossier://security",
724
+ "dossier://concept"
725
+ ]
726
+ },
727
+ "uniqueItems": true
728
+ },
729
+ "fallback": {
730
+ "type": "string",
731
+ "description": "Behavior when MCP server is not available",
732
+ "enum": ["manual_execution", "degraded", "error"],
733
+ "default": "manual_execution"
734
+ },
735
+ "benefits": {
736
+ "type": "array",
737
+ "description": "Benefits of using MCP server for this dossier",
738
+ "items": {
739
+ "type": "string"
740
+ }
741
+ }
742
+ }
743
+ }
744
+ }
745
+ }