@dogfood-lab/schemas 1.3.0 → 1.3.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogfood-lab/schemas",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "JSON schemas for the testing-os contract spine — record, finding, pattern, recommendation, doctrine, policy, scenario, submission.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/dogfood-lab/testing-os/packages/schemas/src/json/agent-output.schema.json",
|
|
4
|
+
"title": "Swarm Agent Output (canonical envelope)",
|
|
5
|
+
"description": "JSON contract for agent JSON outputs written to swarms/<run-id>/wave-N/<domain>.json. F-252713-017 (Phase 7 wave 1): collect-time schema-conformance gate. Replaces silent normalization in collect.js with a structured error pointing the agent at the canonical shape. Validates the OUTER envelope — every agent output regardless of phase has { domain, summary } at minimum. Phase-specific oneOf branches govern the inner shape: audit outputs carry findings[], feature outputs carry features[], amend outputs carry fixes[] + files_changed[]. Mirrors AUDIT_CATEGORIES + FEATURE_CATEGORIES + SEVERITY_ENUM in packages/dogfood-swarm/lib/output-schema.js — kept in lockstep.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["domain", "summary"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"domain": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"description": "Audit domain that produced this output (e.g. backend, ci-tooling, docs, outputs, pipeline)."
|
|
14
|
+
},
|
|
15
|
+
"stage": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["A", "B", "C", "D"],
|
|
18
|
+
"description": "Health-pass stage (audit outputs only). Optional in feature/amend outputs."
|
|
19
|
+
},
|
|
20
|
+
"summary": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"description": "One-line summary of what the agent did and what they found."
|
|
24
|
+
},
|
|
25
|
+
"findings": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": { "$ref": "#/$defs/finding" },
|
|
28
|
+
"description": "Audit-pass findings. Required in audit outputs (Stages A–D)."
|
|
29
|
+
},
|
|
30
|
+
"features": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": { "$ref": "#/$defs/feature" },
|
|
33
|
+
"description": "Feature-pass features. Required in feature-pass outputs."
|
|
34
|
+
},
|
|
35
|
+
"fixes": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "$ref": "#/$defs/fix" },
|
|
38
|
+
"description": "Amend-pass fixes. Required in amend outputs (Phase 7 waves)."
|
|
39
|
+
},
|
|
40
|
+
"files_changed": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": { "type": "string" },
|
|
43
|
+
"description": "Files the agent edited. Required in amend outputs."
|
|
44
|
+
},
|
|
45
|
+
"skipped": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": { "$ref": "#/$defs/skip" },
|
|
48
|
+
"description": "Findings/features skipped with a reason. Cross-domain dependencies, blocked-on items, etc."
|
|
49
|
+
},
|
|
50
|
+
"verification_skipped": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"default": false,
|
|
53
|
+
"description": "Set true when the agent skipped per-agent verification per the parallel-wave serial-final-verify discipline (PROTOCOL.md §Serial final verification). Coordinator runs a single `npm run verify` against the cumulative tree at collect time. False or absent = agent ran its own verify (legacy single-agent waves, manual dispatch)."
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"$defs": {
|
|
57
|
+
"finding": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"required": ["id", "severity", "category", "description"],
|
|
60
|
+
"additionalProperties": true,
|
|
61
|
+
"properties": {
|
|
62
|
+
"id": { "type": "string", "minLength": 1 },
|
|
63
|
+
"severity": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW"],
|
|
66
|
+
"description": "Mirrors SEVERITY_ENUM in packages/dogfood-swarm/lib/output-schema.js."
|
|
67
|
+
},
|
|
68
|
+
"category": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"bug", "security", "quality", "types", "tests", "docs",
|
|
72
|
+
"defensive", "observability", "degradation", "future-proofing",
|
|
73
|
+
"ux", "accessibility",
|
|
74
|
+
"hygiene", "error_message_quality", "cli_help_quality",
|
|
75
|
+
"silent_failure", "tests_coverage"
|
|
76
|
+
],
|
|
77
|
+
"description": "Mirrors AUDIT_CATEGORIES in packages/dogfood-swarm/lib/output-schema.js. Extended in Phase 7 wave 2 W2-BACK-002 to absorb 5 historical wave-15/20 reused categories (hygiene, error_message_quality, cli_help_quality, silent_failure, tests_coverage). Underscore form preserved as historical record."
|
|
78
|
+
},
|
|
79
|
+
"file": { "type": "string" },
|
|
80
|
+
"line": { "type": "number" },
|
|
81
|
+
"symbol": { "type": "string" },
|
|
82
|
+
"description": { "type": "string", "minLength": 1 },
|
|
83
|
+
"recommendation": { "type": "string" },
|
|
84
|
+
"rule_id": { "type": "string" }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"feature": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"required": ["id", "priority", "category", "description"],
|
|
90
|
+
"additionalProperties": true,
|
|
91
|
+
"properties": {
|
|
92
|
+
"id": { "type": "string", "pattern": "^F-[A-Za-z0-9-]+$" },
|
|
93
|
+
"priority": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW"]
|
|
96
|
+
},
|
|
97
|
+
"category": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"enum": ["missing-feature", "ux", "performance", "integration", "production-readiness"]
|
|
100
|
+
},
|
|
101
|
+
"description": { "type": "string", "minLength": 1 },
|
|
102
|
+
"use_case": { "type": "string" },
|
|
103
|
+
"evidence_base": { "type": "string" },
|
|
104
|
+
"scope": { "type": "array", "items": { "type": "string" } },
|
|
105
|
+
"effort": { "type": "string", "enum": ["small", "medium", "large"] },
|
|
106
|
+
"cross_ref": { "type": "string" },
|
|
107
|
+
"recommendation": { "type": "string" }
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"fix": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"required": ["finding_id", "description"],
|
|
113
|
+
"additionalProperties": true,
|
|
114
|
+
"properties": {
|
|
115
|
+
"finding_id": { "type": "string", "minLength": 1 },
|
|
116
|
+
"file": { "type": "string" },
|
|
117
|
+
"description": { "type": "string", "minLength": 1 }
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"skip": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"required": ["finding_id", "reason"],
|
|
123
|
+
"additionalProperties": true,
|
|
124
|
+
"properties": {
|
|
125
|
+
"finding_id": { "type": "string", "minLength": 1 },
|
|
126
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|