@gtrabanco/agentic-workflow-schema 2.1.0 → 3.0.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.es.md +93 -168
- package/README.md +90 -158
- package/dist/index.d.ts +193 -5
- package/dist/index.js +902 -10
- package/envelope.schema.json +17 -3
- package/package.json +9 -5
- package/skill-outcome.schema.json +68 -0
- package/workflow-snapshot.schema.json +90 -0
package/envelope.schema.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://github.com/gtrabanco/agentic-workflow/packages/agentic-workflow-schema/envelope.schema.json",
|
|
4
|
-
"title": "agentic-workflow machine envelope",
|
|
5
|
-
"description": "The
|
|
4
|
+
"title": "agentic-workflow machine envelope v2",
|
|
5
|
+
"description": "The strict v2 machine envelope emitted by workflow-status and accepted by compatibility-aware drivers. Source of truth: @gtrabanco/agentic-workflow-schema.",
|
|
6
6
|
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
7
8
|
"required": [
|
|
8
9
|
"skill",
|
|
9
10
|
"state",
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
"dependencies",
|
|
18
19
|
"recommendations",
|
|
19
20
|
"needs_input",
|
|
20
|
-
"next"
|
|
21
|
+
"next",
|
|
22
|
+
"detail"
|
|
21
23
|
],
|
|
22
24
|
"properties": {
|
|
23
25
|
"skill": { "type": "string", "minLength": 1 },
|
|
@@ -39,6 +41,7 @@
|
|
|
39
41
|
"summary": { "type": "string" },
|
|
40
42
|
"unit": {
|
|
41
43
|
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
42
45
|
"required": ["type", "id", "issue", "branch"],
|
|
43
46
|
"properties": {
|
|
44
47
|
"type": { "enum": ["feature", "fix", "docs", "none"] },
|
|
@@ -49,6 +52,7 @@
|
|
|
49
52
|
},
|
|
50
53
|
"phase": {
|
|
51
54
|
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
52
56
|
"required": ["current", "total", "completed"],
|
|
53
57
|
"properties": {
|
|
54
58
|
"current": { "type": ["string", "null"] },
|
|
@@ -58,6 +62,7 @@
|
|
|
58
62
|
},
|
|
59
63
|
"pr": {
|
|
60
64
|
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
61
66
|
"required": ["number", "url", "state", "head_sha", "merge_ready", "ci"],
|
|
62
67
|
"properties": {
|
|
63
68
|
"number": { "type": ["integer", "null"] },
|
|
@@ -70,6 +75,7 @@
|
|
|
70
75
|
},
|
|
71
76
|
"gates": {
|
|
72
77
|
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
73
79
|
"required": ["verification", "review_pending", "audit_pending"],
|
|
74
80
|
"properties": {
|
|
75
81
|
"verification": { "enum": ["green", "red", "not-run", null] },
|
|
@@ -79,12 +85,14 @@
|
|
|
79
85
|
},
|
|
80
86
|
"findings": {
|
|
81
87
|
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
82
89
|
"required": ["fix_now", "issues_filed", "untriaged", "decisions_recorded"],
|
|
83
90
|
"properties": {
|
|
84
91
|
"fix_now": {
|
|
85
92
|
"type": "array",
|
|
86
93
|
"items": {
|
|
87
94
|
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
88
96
|
"required": ["id", "file", "axis", "severity", "class", "route", "suggested_tier"],
|
|
89
97
|
"properties": {
|
|
90
98
|
"id": { "type": "string" },
|
|
@@ -106,6 +114,7 @@
|
|
|
106
114
|
"type": "array",
|
|
107
115
|
"items": {
|
|
108
116
|
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
109
118
|
"required": ["kind", "id", "scope", "detail"],
|
|
110
119
|
"properties": {
|
|
111
120
|
"kind": {
|
|
@@ -119,6 +128,7 @@
|
|
|
119
128
|
},
|
|
120
129
|
"dependencies": {
|
|
121
130
|
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
122
132
|
"required": ["unmet", "build_order"],
|
|
123
133
|
"properties": {
|
|
124
134
|
"unmet": { "type": "array", "items": { "type": "string" } },
|
|
@@ -127,6 +137,7 @@
|
|
|
127
137
|
},
|
|
128
138
|
"recommendations": {
|
|
129
139
|
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
130
141
|
"required": ["product_audit", "reason"],
|
|
131
142
|
"properties": {
|
|
132
143
|
"product_audit": { "type": "boolean" },
|
|
@@ -138,6 +149,7 @@
|
|
|
138
149
|
{ "type": "null" },
|
|
139
150
|
{
|
|
140
151
|
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
141
153
|
"required": ["question", "options"],
|
|
142
154
|
"properties": {
|
|
143
155
|
"question": { "type": "string" },
|
|
@@ -148,6 +160,7 @@
|
|
|
148
160
|
},
|
|
149
161
|
"next": {
|
|
150
162
|
"type": "object",
|
|
163
|
+
"additionalProperties": false,
|
|
151
164
|
"required": ["recommended", "alternatives", "tier"],
|
|
152
165
|
"properties": {
|
|
153
166
|
"recommended": { "type": "string" },
|
|
@@ -157,6 +170,7 @@
|
|
|
157
170
|
"type": "array",
|
|
158
171
|
"items": {
|
|
159
172
|
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
160
174
|
"required": ["command", "trigger", "source_skill"],
|
|
161
175
|
"properties": {
|
|
162
176
|
"command": { "type": "string" },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gtrabanco/agentic-workflow-schema",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "Versioned machine contracts, JSON Schemas, parsers, and deterministic document snapshots for agentic-workflow orchestration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic-workflow",
|
|
7
7
|
"agent",
|
|
@@ -26,11 +26,15 @@
|
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"import": "./dist/index.js"
|
|
28
28
|
},
|
|
29
|
-
"./envelope.schema.json": "./envelope.schema.json"
|
|
29
|
+
"./envelope.schema.json": "./envelope.schema.json",
|
|
30
|
+
"./skill-outcome.schema.json": "./skill-outcome.schema.json",
|
|
31
|
+
"./workflow-snapshot.schema.json": "./workflow-snapshot.schema.json"
|
|
30
32
|
},
|
|
31
33
|
"files": [
|
|
32
34
|
"dist",
|
|
33
35
|
"envelope.schema.json",
|
|
36
|
+
"skill-outcome.schema.json",
|
|
37
|
+
"workflow-snapshot.schema.json",
|
|
34
38
|
"README.md",
|
|
35
39
|
"README.es.md",
|
|
36
40
|
"LICENSE"
|
|
@@ -43,10 +47,10 @@
|
|
|
43
47
|
},
|
|
44
48
|
"scripts": {
|
|
45
49
|
"build": "tsc",
|
|
46
|
-
"test": "tsc && node --test test
|
|
50
|
+
"test": "tsc && node --test test/*.test.mjs",
|
|
47
51
|
"prepublishOnly": "npm test"
|
|
48
52
|
},
|
|
49
53
|
"devDependencies": {
|
|
50
54
|
"typescript": "6"
|
|
51
55
|
}
|
|
52
|
-
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/gtrabanco/agentic-workflow/packages/agentic-workflow-schema/skill-outcome.schema.json",
|
|
4
|
+
"title": "agentic-workflow skill outcome v1",
|
|
5
|
+
"description": "The small model-owned semantic result for a driven skill turn. Deterministic repository facts belong to workflow-snapshot instead.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contract", "version", "skill", "status", "summary", "next", "blockers", "questions", "discoveries", "evidence_refs"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contract": { "const": "agentic-workflow/skill-outcome" },
|
|
11
|
+
"version": { "const": 1 },
|
|
12
|
+
"skill": { "type": "string", "minLength": 1 },
|
|
13
|
+
"status": { "enum": ["completed", "continue", "blocked", "needs-input", "failed"] },
|
|
14
|
+
"summary": { "type": "string" },
|
|
15
|
+
"next": { "$ref": "#/definitions/next" },
|
|
16
|
+
"blockers": { "type": "array", "items": { "$ref": "#/definitions/blocker" } },
|
|
17
|
+
"questions": { "type": "array", "items": { "$ref": "#/definitions/question" } },
|
|
18
|
+
"discoveries": { "type": "array", "items": { "$ref": "#/definitions/discovery" } },
|
|
19
|
+
"evidence_refs": { "type": "array", "items": { "type": "string" } }
|
|
20
|
+
},
|
|
21
|
+
"definitions": {
|
|
22
|
+
"intent": {
|
|
23
|
+
"enum": ["init-workspace", "status", "discover-repository-state", "resolve-repository-state", "design-feature", "plan-feature", "plan-fix", "triage-issue", "execute-phase", "review-change", "loop-review-fold", "audit-pr", "merge", "ask-human", "stop", "none"]
|
|
24
|
+
},
|
|
25
|
+
"next": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["intent", "targets"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"intent": { "$ref": "#/definitions/intent" },
|
|
31
|
+
"targets": { "type": "array", "items": { "type": "string" } }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"blocker": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["kind", "id", "scope", "detail"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"kind": { "enum": ["dependency", "issue", "gate", "merge-conflict", "substrate", "input"] },
|
|
40
|
+
"id": { "type": "string" },
|
|
41
|
+
"scope": { "enum": ["unit", "run"] },
|
|
42
|
+
"detail": { "type": "string" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"question": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["id", "question", "options"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"id": { "type": "string" },
|
|
51
|
+
"question": { "type": "string" },
|
|
52
|
+
"options": { "type": "array", "items": { "type": "string" } }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"discovery": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["kind", "scope", "summary", "evidence_refs", "proposed_intent"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"kind": { "enum": ["defect", "risk", "opportunity", "environment", "scope-gap", "unknown"] },
|
|
61
|
+
"scope": { "enum": ["current-unit", "outside-unit", "run"] },
|
|
62
|
+
"summary": { "type": "string" },
|
|
63
|
+
"evidence_refs": { "type": "array", "items": { "type": "string" } },
|
|
64
|
+
"proposed_intent": { "$ref": "#/definitions/intent" }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/gtrabanco/agentic-workflow/packages/agentic-workflow-schema/workflow-snapshot.schema.json",
|
|
4
|
+
"title": "agentic-workflow workflow snapshot v1",
|
|
5
|
+
"description": "Deterministic workflow facts compiled from versioned documents and caller-supplied repository facts. Unknown and contradictory facts are explicit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contract", "version", "sourceRevision", "repository", "repositoryState", "unit", "phase", "provenance", "contradictions", "unknowns"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contract": { "const": "agentic-workflow/workflow-snapshot" },
|
|
11
|
+
"version": { "const": 1 },
|
|
12
|
+
"sourceRevision": { "type": "string", "minLength": 1 },
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["branch", "headSha", "dirty"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"branch": { "type": "string" },
|
|
19
|
+
"headSha": { "type": "string" },
|
|
20
|
+
"dirty": { "type": "boolean" }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"repositoryState": { "enum": ["missing", "draft", "frozen", "contradicted", "needs-input", "unknown"] },
|
|
24
|
+
"unit": {
|
|
25
|
+
"oneOf": [
|
|
26
|
+
{ "type": "null" },
|
|
27
|
+
{
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["kind", "id", "status"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"kind": { "enum": ["feature", "fix"] },
|
|
33
|
+
"id": { "type": "string" },
|
|
34
|
+
"status": { "type": "string" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"phase": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["current", "total", "completed", "names"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"current": { "type": ["string", "null"] },
|
|
45
|
+
"total": { "type": ["integer", "null"] },
|
|
46
|
+
"completed": { "type": ["integer", "null"] },
|
|
47
|
+
"names": { "type": "array", "items": { "type": "string" } }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"provenance": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["field", "source", "line"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"field": { "type": "string" },
|
|
58
|
+
"source": { "type": "string" },
|
|
59
|
+
"line": { "type": "integer", "minimum": 1 }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"unknowns": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": ["field", "reason"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"field": { "type": "string" },
|
|
71
|
+
"reason": { "type": "string" }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"contradictions": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": ["field", "source", "line", "detail"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"field": { "type": "string" },
|
|
83
|
+
"source": { "type": "string" },
|
|
84
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
85
|
+
"detail": { "type": "string" }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|