@dogfood-lab/schemas 1.2.2 → 1.3.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/README.md +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/validate.d.ts +26 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +46 -0
- package/dist/validate.js.map +1 -1
- package/package.json +3 -2
- package/src/json/dogfood-doctrine.schema.json +86 -86
- package/src/json/dogfood-finding.schema.json +433 -414
- package/src/json/dogfood-pattern.schema.json +124 -124
- package/src/json/dogfood-recommendation.schema.json +107 -107
- package/src/json/dogfood-record-submission.schema.json +226 -226
- package/src/json/dogfood-record.schema.json +303 -303
- package/src/json/policy.schema.json +182 -182
- package/src/json/scenario.schema.json +143 -143
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/dogfood-lab/testing-os/packages/schemas/src/json/dogfood-pattern.schema.json",
|
|
4
|
-
"title": "Dogfood Pattern",
|
|
5
|
-
"description": "A repeated lesson class backed by multiple accepted findings. Patterns represent recurrence, not individual incidents. Only accepted, non-invalidated findings may support a pattern.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"schema_version",
|
|
9
|
-
"pattern_id",
|
|
10
|
-
"title",
|
|
11
|
-
"status",
|
|
12
|
-
"pattern_kind",
|
|
13
|
-
"summary",
|
|
14
|
-
"source_finding_ids",
|
|
15
|
-
"support",
|
|
16
|
-
"dimensions",
|
|
17
|
-
"transfer_scope"
|
|
18
|
-
],
|
|
19
|
-
"additionalProperties": false,
|
|
20
|
-
"properties": {
|
|
21
|
-
"schema_version": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
24
|
-
},
|
|
25
|
-
"pattern_id": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"pattern": "^dpat-[a-z0-9][a-z0-9-]*$",
|
|
28
|
-
"minLength": 6
|
|
29
|
-
},
|
|
30
|
-
"title": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"minLength": 10,
|
|
33
|
-
"maxLength": 200
|
|
34
|
-
},
|
|
35
|
-
"status": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"enum": ["candidate", "accepted", "rejected", "invalidated"]
|
|
38
|
-
},
|
|
39
|
-
"pattern_kind": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"enum": [
|
|
42
|
-
"recurring_failure",
|
|
43
|
-
"recurring_success",
|
|
44
|
-
"calibration_signal",
|
|
45
|
-
"coverage_gap",
|
|
46
|
-
"verification_seam",
|
|
47
|
-
"evidence_calibration"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"summary": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"minLength": 20,
|
|
53
|
-
"maxLength": 1000
|
|
54
|
-
},
|
|
55
|
-
"source_finding_ids": {
|
|
56
|
-
"type": "array",
|
|
57
|
-
"minItems": 2,
|
|
58
|
-
"items": { "type": "string", "minLength": 1 },
|
|
59
|
-
"description": "Finding IDs that support this pattern. Minimum 2."
|
|
60
|
-
},
|
|
61
|
-
"support": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"required": ["finding_count", "repo_count"],
|
|
64
|
-
"additionalProperties": false,
|
|
65
|
-
"properties": {
|
|
66
|
-
"finding_count": { "type": "integer", "minimum": 2 },
|
|
67
|
-
"repo_count": { "type": "integer", "minimum": 1 },
|
|
68
|
-
"surface_count": { "type": "integer", "minimum": 1 },
|
|
69
|
-
"execution_modes": {
|
|
70
|
-
"type": "array",
|
|
71
|
-
"items": { "type": "string", "enum": ["bot", "human", "mixed"] }
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"dimensions": {
|
|
76
|
-
"type": "object",
|
|
77
|
-
"required": ["issue_kinds"],
|
|
78
|
-
"additionalProperties": false,
|
|
79
|
-
"properties": {
|
|
80
|
-
"product_surfaces": {
|
|
81
|
-
"type": "array",
|
|
82
|
-
"items": { "type": "string", "enum": ["cli", "desktop", "web", "api", "mcp-server", "npm-package", "plugin", "library"] }
|
|
83
|
-
},
|
|
84
|
-
"issue_kinds": {
|
|
85
|
-
"type": "array",
|
|
86
|
-
"minItems": 1,
|
|
87
|
-
"items": { "type": "string" }
|
|
88
|
-
},
|
|
89
|
-
"root_cause_kinds": {
|
|
90
|
-
"type": "array",
|
|
91
|
-
"items": { "type": "string" }
|
|
92
|
-
},
|
|
93
|
-
"remediation_kinds": {
|
|
94
|
-
"type": "array",
|
|
95
|
-
"items": { "type": "string" }
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"transfer_scope": {
|
|
100
|
-
"type": "string",
|
|
101
|
-
"enum": ["repo_local", "surface_local", "surface_archetype", "execution_mode", "org_wide"]
|
|
102
|
-
},
|
|
103
|
-
"pattern_strength": {
|
|
104
|
-
"type": "string",
|
|
105
|
-
"enum": ["emerging", "strong", "portfolio_stable"]
|
|
106
|
-
},
|
|
107
|
-
"lineage_note": {
|
|
108
|
-
"type": "string",
|
|
109
|
-
"maxLength": 1000
|
|
110
|
-
},
|
|
111
|
-
"review": {
|
|
112
|
-
"type": "object",
|
|
113
|
-
"additionalProperties": false,
|
|
114
|
-
"properties": {
|
|
115
|
-
"reviewed_by": { "type": "string" },
|
|
116
|
-
"reviewed_at": { "type": "string", "format": "date-time" },
|
|
117
|
-
"decision_reason": { "type": "string", "maxLength": 1000 },
|
|
118
|
-
"last_action": { "type": "string", "enum": ["accept", "reject", "edit", "invalidate"] }
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"created_at": { "type": "string", "format": "date-time" },
|
|
122
|
-
"updated_at": { "type": "string", "format": "date-time" }
|
|
123
|
-
}
|
|
124
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/dogfood-lab/testing-os/packages/schemas/src/json/dogfood-pattern.schema.json",
|
|
4
|
+
"title": "Dogfood Pattern",
|
|
5
|
+
"description": "A repeated lesson class backed by multiple accepted findings. Patterns represent recurrence, not individual incidents. Only accepted, non-invalidated findings may support a pattern.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"pattern_id",
|
|
10
|
+
"title",
|
|
11
|
+
"status",
|
|
12
|
+
"pattern_kind",
|
|
13
|
+
"summary",
|
|
14
|
+
"source_finding_ids",
|
|
15
|
+
"support",
|
|
16
|
+
"dimensions",
|
|
17
|
+
"transfer_scope"
|
|
18
|
+
],
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {
|
|
21
|
+
"schema_version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
24
|
+
},
|
|
25
|
+
"pattern_id": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^dpat-[a-z0-9][a-z0-9-]*$",
|
|
28
|
+
"minLength": 6
|
|
29
|
+
},
|
|
30
|
+
"title": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 10,
|
|
33
|
+
"maxLength": 200
|
|
34
|
+
},
|
|
35
|
+
"status": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": ["candidate", "accepted", "rejected", "invalidated"]
|
|
38
|
+
},
|
|
39
|
+
"pattern_kind": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"recurring_failure",
|
|
43
|
+
"recurring_success",
|
|
44
|
+
"calibration_signal",
|
|
45
|
+
"coverage_gap",
|
|
46
|
+
"verification_seam",
|
|
47
|
+
"evidence_calibration"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"summary": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 20,
|
|
53
|
+
"maxLength": 1000
|
|
54
|
+
},
|
|
55
|
+
"source_finding_ids": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"minItems": 2,
|
|
58
|
+
"items": { "type": "string", "minLength": 1 },
|
|
59
|
+
"description": "Finding IDs that support this pattern. Minimum 2."
|
|
60
|
+
},
|
|
61
|
+
"support": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": ["finding_count", "repo_count"],
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"properties": {
|
|
66
|
+
"finding_count": { "type": "integer", "minimum": 2 },
|
|
67
|
+
"repo_count": { "type": "integer", "minimum": 1 },
|
|
68
|
+
"surface_count": { "type": "integer", "minimum": 1 },
|
|
69
|
+
"execution_modes": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "type": "string", "enum": ["bot", "human", "mixed"] }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"dimensions": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"required": ["issue_kinds"],
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"properties": {
|
|
80
|
+
"product_surfaces": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": { "type": "string", "enum": ["cli", "desktop", "web", "api", "mcp-server", "npm-package", "plugin", "library"] }
|
|
83
|
+
},
|
|
84
|
+
"issue_kinds": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"minItems": 1,
|
|
87
|
+
"items": { "type": "string" }
|
|
88
|
+
},
|
|
89
|
+
"root_cause_kinds": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": { "type": "string" }
|
|
92
|
+
},
|
|
93
|
+
"remediation_kinds": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": { "type": "string" }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"transfer_scope": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"enum": ["repo_local", "surface_local", "surface_archetype", "execution_mode", "org_wide"]
|
|
102
|
+
},
|
|
103
|
+
"pattern_strength": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"enum": ["emerging", "strong", "portfolio_stable"]
|
|
106
|
+
},
|
|
107
|
+
"lineage_note": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"maxLength": 1000
|
|
110
|
+
},
|
|
111
|
+
"review": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"properties": {
|
|
115
|
+
"reviewed_by": { "type": "string" },
|
|
116
|
+
"reviewed_at": { "type": "string", "format": "date-time" },
|
|
117
|
+
"decision_reason": { "type": "string", "maxLength": 1000 },
|
|
118
|
+
"last_action": { "type": "string", "enum": ["accept", "reject", "edit", "invalidate"] }
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
122
|
+
"updated_at": { "type": "string", "format": "date-time" }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/dogfood-lab/testing-os/packages/schemas/src/json/dogfood-recommendation.schema.json",
|
|
4
|
-
"title": "Dogfood Recommendation",
|
|
5
|
-
"description": "Actionable guidance for future repos, surfaces, or execution modes. Derived from accepted patterns. Narrower and more operational than doctrine.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"schema_version",
|
|
9
|
-
"recommendation_id",
|
|
10
|
-
"title",
|
|
11
|
-
"status",
|
|
12
|
-
"recommendation_kind",
|
|
13
|
-
"summary",
|
|
14
|
-
"applies_to",
|
|
15
|
-
"based_on_pattern_ids",
|
|
16
|
-
"action"
|
|
17
|
-
],
|
|
18
|
-
"additionalProperties": false,
|
|
19
|
-
"properties": {
|
|
20
|
-
"schema_version": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
23
|
-
},
|
|
24
|
-
"recommendation_id": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"pattern": "^drec-[a-z0-9][a-z0-9-]*$",
|
|
27
|
-
"minLength": 6
|
|
28
|
-
},
|
|
29
|
-
"title": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"minLength": 10,
|
|
32
|
-
"maxLength": 200
|
|
33
|
-
},
|
|
34
|
-
"status": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"enum": ["candidate", "accepted", "rejected"]
|
|
37
|
-
},
|
|
38
|
-
"recommendation_kind": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"enum": [
|
|
41
|
-
"starter_scenario",
|
|
42
|
-
"starter_check",
|
|
43
|
-
"policy_seed",
|
|
44
|
-
"evidence_expectation",
|
|
45
|
-
"review_prompt",
|
|
46
|
-
"verification_rule"
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
"summary": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"minLength": 20,
|
|
52
|
-
"maxLength": 1000
|
|
53
|
-
},
|
|
54
|
-
"applies_to": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"additionalProperties": false,
|
|
57
|
-
"properties": {
|
|
58
|
-
"product_surfaces": {
|
|
59
|
-
"type": "array",
|
|
60
|
-
"items": { "type": "string", "enum": ["cli", "desktop", "web", "api", "mcp-server", "npm-package", "plugin", "library"] }
|
|
61
|
-
},
|
|
62
|
-
"execution_modes": {
|
|
63
|
-
"type": "array",
|
|
64
|
-
"items": { "type": "string", "enum": ["bot", "human", "mixed"] }
|
|
65
|
-
},
|
|
66
|
-
"transfer_scope": {
|
|
67
|
-
"type": "string",
|
|
68
|
-
"enum": ["repo_local", "surface_local", "surface_archetype", "execution_mode", "org_wide"]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"based_on_pattern_ids": {
|
|
73
|
-
"type": "array",
|
|
74
|
-
"minItems": 1,
|
|
75
|
-
"items": { "type": "string", "minLength": 1 }
|
|
76
|
-
},
|
|
77
|
-
"action": {
|
|
78
|
-
"type": "object",
|
|
79
|
-
"required": ["type", "details"],
|
|
80
|
-
"additionalProperties": false,
|
|
81
|
-
"properties": {
|
|
82
|
-
"type": {
|
|
83
|
-
"type": "string",
|
|
84
|
-
"enum": ["add_check", "add_scenario", "set_policy", "set_evidence", "add_review_step", "set_verification"]
|
|
85
|
-
},
|
|
86
|
-
"target": { "type": "string", "maxLength": 100 },
|
|
87
|
-
"details": { "type": "string", "minLength": 5, "maxLength": 1000 }
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"confidence": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"enum": ["emerging", "strong", "proven"]
|
|
93
|
-
},
|
|
94
|
-
"review": {
|
|
95
|
-
"type": "object",
|
|
96
|
-
"additionalProperties": false,
|
|
97
|
-
"properties": {
|
|
98
|
-
"reviewed_by": { "type": "string" },
|
|
99
|
-
"reviewed_at": { "type": "string", "format": "date-time" },
|
|
100
|
-
"decision_reason": { "type": "string", "maxLength": 1000 },
|
|
101
|
-
"last_action": { "type": "string", "enum": ["accept", "reject", "edit"] }
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"created_at": { "type": "string", "format": "date-time" },
|
|
105
|
-
"updated_at": { "type": "string", "format": "date-time" }
|
|
106
|
-
}
|
|
107
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/dogfood-lab/testing-os/packages/schemas/src/json/dogfood-recommendation.schema.json",
|
|
4
|
+
"title": "Dogfood Recommendation",
|
|
5
|
+
"description": "Actionable guidance for future repos, surfaces, or execution modes. Derived from accepted patterns. Narrower and more operational than doctrine.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"recommendation_id",
|
|
10
|
+
"title",
|
|
11
|
+
"status",
|
|
12
|
+
"recommendation_kind",
|
|
13
|
+
"summary",
|
|
14
|
+
"applies_to",
|
|
15
|
+
"based_on_pattern_ids",
|
|
16
|
+
"action"
|
|
17
|
+
],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"schema_version": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
23
|
+
},
|
|
24
|
+
"recommendation_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^drec-[a-z0-9][a-z0-9-]*$",
|
|
27
|
+
"minLength": 6
|
|
28
|
+
},
|
|
29
|
+
"title": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 10,
|
|
32
|
+
"maxLength": 200
|
|
33
|
+
},
|
|
34
|
+
"status": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["candidate", "accepted", "rejected"]
|
|
37
|
+
},
|
|
38
|
+
"recommendation_kind": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"starter_scenario",
|
|
42
|
+
"starter_check",
|
|
43
|
+
"policy_seed",
|
|
44
|
+
"evidence_expectation",
|
|
45
|
+
"review_prompt",
|
|
46
|
+
"verification_rule"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"summary": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 20,
|
|
52
|
+
"maxLength": 1000
|
|
53
|
+
},
|
|
54
|
+
"applies_to": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"properties": {
|
|
58
|
+
"product_surfaces": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "type": "string", "enum": ["cli", "desktop", "web", "api", "mcp-server", "npm-package", "plugin", "library"] }
|
|
61
|
+
},
|
|
62
|
+
"execution_modes": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": { "type": "string", "enum": ["bot", "human", "mixed"] }
|
|
65
|
+
},
|
|
66
|
+
"transfer_scope": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"enum": ["repo_local", "surface_local", "surface_archetype", "execution_mode", "org_wide"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"based_on_pattern_ids": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"minItems": 1,
|
|
75
|
+
"items": { "type": "string", "minLength": 1 }
|
|
76
|
+
},
|
|
77
|
+
"action": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": ["type", "details"],
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"properties": {
|
|
82
|
+
"type": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": ["add_check", "add_scenario", "set_policy", "set_evidence", "add_review_step", "set_verification"]
|
|
85
|
+
},
|
|
86
|
+
"target": { "type": "string", "maxLength": 100 },
|
|
87
|
+
"details": { "type": "string", "minLength": 5, "maxLength": 1000 }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"confidence": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"enum": ["emerging", "strong", "proven"]
|
|
93
|
+
},
|
|
94
|
+
"review": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"properties": {
|
|
98
|
+
"reviewed_by": { "type": "string" },
|
|
99
|
+
"reviewed_at": { "type": "string", "format": "date-time" },
|
|
100
|
+
"decision_reason": { "type": "string", "maxLength": 1000 },
|
|
101
|
+
"last_action": { "type": "string", "enum": ["accept", "reject", "edit"] }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
105
|
+
"updated_at": { "type": "string", "format": "date-time" }
|
|
106
|
+
}
|
|
107
|
+
}
|