Setting the file. One moment. Receipt Schema · Bug Receipt · github/awesome-copilot · Skills Docs(opens in a new tab)
references/receipt.schema.json
JSON·99 lines·4 KB
,
"problem"
,
"baseline"
,
"rootCause"
,
"changes"
,
"verification"
,
"gaps"
],
9 "properties": {
10 "version": { "enum": [1, 2] },
11 "status": { "enum": ["verified", "partial", "blocked"] },
12 "evidenceSource": { "enum": ["executed-now", "supplied", "mixed"] },
13 "problem": { "$ref": "#/$defs/nonEmptyString" },
14 "baseline": {
15 "type": "object",
16 "additionalProperties": false,
17 "required": ["command", "result", "evidence"],
18 "properties": {
19 "command": { "$ref": "#/$defs/nonEmptyString" },
20 "result": { "enum": ["failed", "observed", "not-run"] },
21 "evidence": { "$ref": "#/$defs/nonEmptyString" }
22 }
23 },
24 "rootCause": {
25 "type": "object",
26 "additionalProperties": false,
27 "required": ["summary", "evidence"],
28 "properties": {
29 "summary": { "$ref": "#/$defs/nonEmptyString" },
30 "evidence": {
31 "type": "array",
32 "items": {
33 "type": "object",
34 "additionalProperties": false,
35 "required": ["location", "observation"],
36 "properties": {
37 "location": { "$ref": "#/$defs/nonEmptyString" },
38 "observation": { "$ref": "#/$defs/nonEmptyString" }
39 }
40 }
41 }
42 }
43 },
44 "changes": {
45 "type": "array",
46 "items": {
47 "type": "object",
48 "additionalProperties": false,
49 "required": ["file", "summary"],
50 "properties": {
51 "file": { "$ref": "#/$defs/nonEmptyString" },
52 "summary": { "$ref": "#/$defs/nonEmptyString" }
53 }
54 }
55 },
56 "verification": {
57 "type": "array",
58 "items": {
59 "type": "object",
60 "additionalProperties": false,
61 "required": ["command", "result", "evidence"],
62 "properties": {
63 "command": { "$ref": "#/$defs/nonEmptyString" },
64 "result": { "enum": ["passed", "failed", "not-run"] },
65 "evidence": { "$ref": "#/$defs/nonEmptyString" }
66 }
67 }
68 },
69 "gaps": { "type": "array", "items": { "$ref": "#/$defs/nonEmptyString" } }
70 },
71 "$defs": {
72 "nonEmptyString": { "type": "string", "minLength": 1, "pattern": "\\S" }
73 },
74 "allOf": [
75 {
76 "if": { "properties": { "version": { "const": 2 } }, "required": ["version"] },
77 "then": {
78 "properties": { "evidenceSource": { "enum": ["executed-now", "supplied", "mixed"] } },
79 "required": ["evidenceSource"]
80 }
81 },
82 {
83 "if": { "properties": { "status": { "const": "verified" } }, "required": ["status"] },
84 "then": {
85 "properties": {
86 "baseline": { "type": "object", "properties": { "result": { "enum": ["failed", "observed"] } } },
87 "rootCause": { "type": "object", "properties": { "evidence": { "type": "array", "minItems": 1 } } },
88 "changes": { "type": "array", "minItems": 1 },
89 "verification": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "result": { "const": "passed" } } } },
90 "gaps": { "type": "array", "maxItems": 0 }
91 }
92 }
93 },
94 {
95 "if": { "properties": { "status": { "enum": ["partial", "blocked"] } }, "required": ["status"] },
96 "then": { "properties": { "gaps": { "type": "array", "minItems": 1 } } }
97 }
98 ]
99}