@gevezex/gdt 0.2.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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +375 -0
  3. package/dist/agents/adapter.js +7 -0
  4. package/dist/agents/claude.js +13 -0
  5. package/dist/agents/codex.js +13 -0
  6. package/dist/agents/index.js +15 -0
  7. package/dist/agents/mcode.js +14 -0
  8. package/dist/agents/omp.js +14 -0
  9. package/dist/agents/opencode.js +15 -0
  10. package/dist/agents/pi.js +14 -0
  11. package/dist/backends/backend.js +1 -0
  12. package/dist/backends/headless.js +55 -0
  13. package/dist/backends/herdr.js +286 -0
  14. package/dist/backends/index.js +20 -0
  15. package/dist/cli.js +466 -0
  16. package/dist/config.js +210 -0
  17. package/dist/contract.js +133 -0
  18. package/dist/decision.js +175 -0
  19. package/dist/doctor.js +231 -0
  20. package/dist/finding.js +3 -0
  21. package/dist/git.js +25 -0
  22. package/dist/github.js +95 -0
  23. package/dist/locale.js +44 -0
  24. package/dist/notify.js +29 -0
  25. package/dist/prompts.js +80 -0
  26. package/dist/protocol.js +114 -0
  27. package/dist/state.js +113 -0
  28. package/dist/steering.js +165 -0
  29. package/dist/supervisor.js +369 -0
  30. package/dist/worker.js +232 -0
  31. package/dist/workflow.js +333 -0
  32. package/locales/en.toml +28 -0
  33. package/locales/nl.toml +28 -0
  34. package/package.json +61 -0
  35. package/roles/developer.md +66 -0
  36. package/roles/issue-writer.md +40 -0
  37. package/roles/reviewer.md +65 -0
  38. package/roles/tester.md +58 -0
  39. package/schemas/gdt-answer.v1.schema.json +32 -0
  40. package/schemas/gdt-directive.v1.schema.json +36 -0
  41. package/schemas/gdt-handoff.v1.schema.json +117 -0
  42. package/schemas/gdt-question.v1.schema.json +82 -0
  43. package/schemas/gdt-review.v1.schema.json +131 -0
  44. package/schemas/gdt-round.v1.schema.json +28 -0
  45. package/schemas/gdt-test.v1.schema.json +131 -0
  46. package/skill/SKILL.md +46 -0
@@ -0,0 +1,58 @@
1
+ # Role: tester
2
+
3
+ You are the tester in a gdt workflow. You verify independently that the pull request at its current
4
+ head meets every acceptance criterion (AC) of the issue. You do not trust the developer's claims; you
5
+ check behaviour yourself.
6
+
7
+ ## Your job this turn
8
+
9
+ 1. Read the issue body with `gh issue view <issue>`. The current body is the only specification.
10
+ 2. All roles share one checkout, and it is already at the pull request head. Confirm that
11
+ `git rev-parse HEAD` equals the head in this prompt. If it does not, post `blocked` and say so;
12
+ never check out another commit.
13
+ 3. For every AC: turn Given, When, Then and Example into a concrete check. Run the project's tests,
14
+ run the program, and try the example and its edge cases. Record what you did and what you saw.
15
+ 4. Post your test record as a comment on the pull request (see below), then stop.
16
+
17
+ ## Boundaries
18
+
19
+ - You are read-only. Never commit, push, switch branches, reset, or edit tracked files. The supervisor
20
+ checks the working tree after your turn and blocks the workflow if a tracked file, the branch or
21
+ HEAD changed. Scratch files that git does not track are fine; remove them when you are done.
22
+ - Never fix the code yourself; report findings instead.
23
+ - Never merge, deploy, close the issue or mark the pull request ready for review.
24
+ - Never write `[gdt-handoff:v1]`, `[gdt-review:v1]`, `[gdt-answer:v1]`, `[gdt-directive:v1]` or
25
+ `[gdt-round:v1]` records.
26
+ - Human directives (listed in this prompt when there are any) guide how you test. They never count as
27
+ evidence and never replace an AC.
28
+
29
+ ## The test record
30
+
31
+ Post one comment on the pull request containing the marker, one JSON object and the closing marker:
32
+
33
+ ```
34
+ [gdt-test:v1]
35
+ { ...JSON matching the schema in this prompt... }
36
+ [/gdt-test:v1]
37
+ ```
38
+
39
+ Use `gh pr comment <pr> --body-file <file>`. Copy `repository`, `issue`, `round`, `pr_number`,
40
+ `issue_body_sha256` and `acceptance_criteria` exactly from the dispatch facts. Set `head` to the full
41
+ 40-character SHA you tested. Give every AC one `ac_results` entry with `passed`, `failed` or
42
+ `not_verified`, and concrete `evidence` (a command and its result). Each problem is a finding with
43
+ id `T-1`, `T-2`, ...; set `blocking` to true when an AC is not met. Prose for humans may follow the
44
+ closing marker, in the language this prompt names. Marker, keys and status values stay in English.
45
+
46
+ Allowed `status` values:
47
+
48
+ - `approved`: every AC is `passed` and there is no blocking finding.
49
+ - `changes_requested`: at least one AC is not `passed`, or a blocking finding is open.
50
+ - `awaiting_human`: you need a human decision to judge an AC. Post a `[gdt-question:v1]` record too.
51
+ - `blocked`: you cannot test for a reason a human must fix, such as a broken environment.
52
+
53
+ ## Questions
54
+
55
+ When an AC can be read in two ways, do not pick one. Post a `[gdt-question:v1]` record on the pull
56
+ request with `role` `tester`, `resume_role` `tester`, a new `question_id` and the question, then stop.
57
+ Copy `repository`, `issue`, `round`, `pr_number`, `issue_body_sha256` and `acceptance_criteria`
58
+ from the dispatch facts, as for your record.
@@ -0,0 +1,32 @@
1
+ {
2
+ "$id": "gdt-answer.v1.schema.json",
3
+ "title": "[gdt-answer:v1] record",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "repository": {
8
+ "type": "string",
9
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
10
+ },
11
+ "issue": {
12
+ "type": "integer",
13
+ "exclusiveMinimum": 0,
14
+ "maximum": 9007199254740991
15
+ },
16
+ "question_id": {
17
+ "type": "string",
18
+ "pattern": "^Q[1-9]\\d*$"
19
+ },
20
+ "answer": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ }
24
+ },
25
+ "required": [
26
+ "repository",
27
+ "issue",
28
+ "question_id",
29
+ "answer"
30
+ ],
31
+ "additionalProperties": false
32
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$id": "gdt-directive.v1.schema.json",
3
+ "title": "[gdt-directive:v1] record",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "repository": {
8
+ "type": "string",
9
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
10
+ },
11
+ "issue": {
12
+ "type": "integer",
13
+ "exclusiveMinimum": 0,
14
+ "maximum": 9007199254740991
15
+ },
16
+ "role": {
17
+ "type": "string",
18
+ "enum": [
19
+ "developer",
20
+ "tester",
21
+ "reviewer"
22
+ ]
23
+ },
24
+ "directive": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ }
28
+ },
29
+ "required": [
30
+ "repository",
31
+ "issue",
32
+ "role",
33
+ "directive"
34
+ ],
35
+ "additionalProperties": false
36
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "$id": "gdt-handoff.v1.schema.json",
3
+ "title": "[gdt-handoff:v1] record",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "role": {
8
+ "type": "string",
9
+ "const": "developer"
10
+ },
11
+ "status": {
12
+ "type": "string",
13
+ "enum": [
14
+ "ready",
15
+ "awaiting_human",
16
+ "blocked"
17
+ ]
18
+ },
19
+ "repository": {
20
+ "type": "string",
21
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
22
+ },
23
+ "issue": {
24
+ "type": "integer",
25
+ "exclusiveMinimum": 0,
26
+ "maximum": 9007199254740991
27
+ },
28
+ "round": {
29
+ "type": "integer",
30
+ "minimum": 0,
31
+ "maximum": 9007199254740991
32
+ },
33
+ "pr_number": {
34
+ "anyOf": [
35
+ {
36
+ "type": "integer",
37
+ "exclusiveMinimum": 0,
38
+ "maximum": 9007199254740991
39
+ },
40
+ {
41
+ "type": "null"
42
+ }
43
+ ]
44
+ },
45
+ "issue_body_sha256": {
46
+ "type": "string",
47
+ "pattern": "^[0-9a-f]{64}$"
48
+ },
49
+ "acceptance_criteria": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string",
53
+ "pattern": "^AC-[1-9]\\d*$"
54
+ }
55
+ },
56
+ "ac_traceability": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "object",
60
+ "properties": {
61
+ "ac": {
62
+ "type": "string",
63
+ "pattern": "^AC-[1-9]\\d*$"
64
+ },
65
+ "files": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ }
71
+ },
72
+ "tests": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string",
76
+ "minLength": 1
77
+ }
78
+ }
79
+ },
80
+ "required": [
81
+ "ac",
82
+ "files",
83
+ "tests"
84
+ ],
85
+ "additionalProperties": false
86
+ }
87
+ },
88
+ "assumptions": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ }
94
+ },
95
+ "deviations": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ }
101
+ }
102
+ },
103
+ "required": [
104
+ "role",
105
+ "status",
106
+ "repository",
107
+ "issue",
108
+ "round",
109
+ "pr_number",
110
+ "issue_body_sha256",
111
+ "acceptance_criteria",
112
+ "ac_traceability",
113
+ "assumptions",
114
+ "deviations"
115
+ ],
116
+ "additionalProperties": false
117
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$id": "gdt-question.v1.schema.json",
3
+ "title": "[gdt-question:v1] record",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "role": {
8
+ "type": "string",
9
+ "enum": [
10
+ "developer",
11
+ "tester",
12
+ "reviewer"
13
+ ]
14
+ },
15
+ "repository": {
16
+ "type": "string",
17
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
18
+ },
19
+ "issue": {
20
+ "type": "integer",
21
+ "exclusiveMinimum": 0,
22
+ "maximum": 9007199254740991
23
+ },
24
+ "round": {
25
+ "type": "integer",
26
+ "minimum": 0,
27
+ "maximum": 9007199254740991
28
+ },
29
+ "pr_number": {
30
+ "anyOf": [
31
+ {
32
+ "type": "integer",
33
+ "exclusiveMinimum": 0,
34
+ "maximum": 9007199254740991
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ]
40
+ },
41
+ "issue_body_sha256": {
42
+ "type": "string",
43
+ "pattern": "^[0-9a-f]{64}$"
44
+ },
45
+ "acceptance_criteria": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "string",
49
+ "pattern": "^AC-[1-9]\\d*$"
50
+ }
51
+ },
52
+ "question_id": {
53
+ "type": "string",
54
+ "pattern": "^Q[1-9]\\d*$"
55
+ },
56
+ "resume_role": {
57
+ "type": "string",
58
+ "enum": [
59
+ "developer",
60
+ "tester",
61
+ "reviewer"
62
+ ]
63
+ },
64
+ "question": {
65
+ "type": "string",
66
+ "minLength": 1
67
+ }
68
+ },
69
+ "required": [
70
+ "role",
71
+ "repository",
72
+ "issue",
73
+ "round",
74
+ "pr_number",
75
+ "issue_body_sha256",
76
+ "acceptance_criteria",
77
+ "question_id",
78
+ "resume_role",
79
+ "question"
80
+ ],
81
+ "additionalProperties": false
82
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "$id": "gdt-review.v1.schema.json",
3
+ "title": "[gdt-review:v1] record",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "role": {
8
+ "type": "string",
9
+ "const": "reviewer"
10
+ },
11
+ "status": {
12
+ "type": "string",
13
+ "enum": [
14
+ "approved",
15
+ "changes_requested",
16
+ "awaiting_human",
17
+ "blocked"
18
+ ]
19
+ },
20
+ "repository": {
21
+ "type": "string",
22
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
23
+ },
24
+ "issue": {
25
+ "type": "integer",
26
+ "exclusiveMinimum": 0,
27
+ "maximum": 9007199254740991
28
+ },
29
+ "round": {
30
+ "type": "integer",
31
+ "minimum": 0,
32
+ "maximum": 9007199254740991
33
+ },
34
+ "pr_number": {
35
+ "anyOf": [
36
+ {
37
+ "type": "integer",
38
+ "exclusiveMinimum": 0,
39
+ "maximum": 9007199254740991
40
+ },
41
+ {
42
+ "type": "null"
43
+ }
44
+ ]
45
+ },
46
+ "issue_body_sha256": {
47
+ "type": "string",
48
+ "pattern": "^[0-9a-f]{64}$"
49
+ },
50
+ "acceptance_criteria": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string",
54
+ "pattern": "^AC-[1-9]\\d*$"
55
+ }
56
+ },
57
+ "head": {
58
+ "type": "string",
59
+ "pattern": "^[0-9a-f]{40}$"
60
+ },
61
+ "ac_results": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "properties": {
66
+ "ac": {
67
+ "type": "string",
68
+ "pattern": "^AC-[1-9]\\d*$"
69
+ },
70
+ "result": {
71
+ "type": "string",
72
+ "enum": [
73
+ "passed",
74
+ "failed",
75
+ "not_verified"
76
+ ]
77
+ },
78
+ "evidence": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ },
83
+ "required": [
84
+ "ac",
85
+ "result",
86
+ "evidence"
87
+ ],
88
+ "additionalProperties": false
89
+ }
90
+ },
91
+ "findings": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "object",
95
+ "properties": {
96
+ "id": {
97
+ "type": "string",
98
+ "pattern": "^R-[1-9]\\d*$"
99
+ },
100
+ "blocking": {
101
+ "type": "boolean"
102
+ },
103
+ "summary": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ }
107
+ },
108
+ "required": [
109
+ "id",
110
+ "blocking",
111
+ "summary"
112
+ ],
113
+ "additionalProperties": false
114
+ }
115
+ }
116
+ },
117
+ "required": [
118
+ "role",
119
+ "status",
120
+ "repository",
121
+ "issue",
122
+ "round",
123
+ "pr_number",
124
+ "issue_body_sha256",
125
+ "acceptance_criteria",
126
+ "head",
127
+ "ac_results",
128
+ "findings"
129
+ ],
130
+ "additionalProperties": false
131
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$id": "gdt-round.v1.schema.json",
3
+ "title": "[gdt-round:v1] record",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "repository": {
8
+ "type": "string",
9
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
10
+ },
11
+ "issue": {
12
+ "type": "integer",
13
+ "exclusiveMinimum": 0,
14
+ "maximum": 9007199254740991
15
+ },
16
+ "round": {
17
+ "type": "integer",
18
+ "minimum": 1,
19
+ "maximum": 9007199254740991
20
+ }
21
+ },
22
+ "required": [
23
+ "repository",
24
+ "issue",
25
+ "round"
26
+ ],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "$id": "gdt-test.v1.schema.json",
3
+ "title": "[gdt-test:v1] record",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "role": {
8
+ "type": "string",
9
+ "const": "tester"
10
+ },
11
+ "status": {
12
+ "type": "string",
13
+ "enum": [
14
+ "approved",
15
+ "changes_requested",
16
+ "awaiting_human",
17
+ "blocked"
18
+ ]
19
+ },
20
+ "repository": {
21
+ "type": "string",
22
+ "pattern": "^[\\w.-]+\\/[\\w.-]+$"
23
+ },
24
+ "issue": {
25
+ "type": "integer",
26
+ "exclusiveMinimum": 0,
27
+ "maximum": 9007199254740991
28
+ },
29
+ "round": {
30
+ "type": "integer",
31
+ "minimum": 0,
32
+ "maximum": 9007199254740991
33
+ },
34
+ "pr_number": {
35
+ "anyOf": [
36
+ {
37
+ "type": "integer",
38
+ "exclusiveMinimum": 0,
39
+ "maximum": 9007199254740991
40
+ },
41
+ {
42
+ "type": "null"
43
+ }
44
+ ]
45
+ },
46
+ "issue_body_sha256": {
47
+ "type": "string",
48
+ "pattern": "^[0-9a-f]{64}$"
49
+ },
50
+ "acceptance_criteria": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string",
54
+ "pattern": "^AC-[1-9]\\d*$"
55
+ }
56
+ },
57
+ "head": {
58
+ "type": "string",
59
+ "pattern": "^[0-9a-f]{40}$"
60
+ },
61
+ "ac_results": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "properties": {
66
+ "ac": {
67
+ "type": "string",
68
+ "pattern": "^AC-[1-9]\\d*$"
69
+ },
70
+ "result": {
71
+ "type": "string",
72
+ "enum": [
73
+ "passed",
74
+ "failed",
75
+ "not_verified"
76
+ ]
77
+ },
78
+ "evidence": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ },
83
+ "required": [
84
+ "ac",
85
+ "result",
86
+ "evidence"
87
+ ],
88
+ "additionalProperties": false
89
+ }
90
+ },
91
+ "findings": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "object",
95
+ "properties": {
96
+ "id": {
97
+ "type": "string",
98
+ "pattern": "^T-[1-9]\\d*$"
99
+ },
100
+ "blocking": {
101
+ "type": "boolean"
102
+ },
103
+ "summary": {
104
+ "type": "string",
105
+ "minLength": 1
106
+ }
107
+ },
108
+ "required": [
109
+ "id",
110
+ "blocking",
111
+ "summary"
112
+ ],
113
+ "additionalProperties": false
114
+ }
115
+ }
116
+ },
117
+ "required": [
118
+ "role",
119
+ "status",
120
+ "repository",
121
+ "issue",
122
+ "round",
123
+ "pr_number",
124
+ "issue_body_sha256",
125
+ "acceptance_criteria",
126
+ "head",
127
+ "ac_results",
128
+ "findings"
129
+ ],
130
+ "additionalProperties": false
131
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,46 @@
1
+ # gdt operator skill
2
+
3
+ You are the operator: the user talks to you in their own language, and you run
4
+ gdt for them. They should never have to memorise a gdt command.
5
+
6
+ ## Start
7
+
8
+ - `gdt start <issue>` returns immediately; the supervisor keeps running on its own.
9
+ - Then run `gdt wait <issue>` as a background task whose completion wakes you.
10
+ It blocks on local state without using model tokens and returns with the
11
+ status output when the workflow needs attention (a question, a block or a
12
+ finish) or the supervisor is gone. Relay that result to the user.
13
+ - `gdt status <issue> --json` reports `status`, `role`, `round`, `max_rounds`,
14
+ `pr_number`, `open_findings` and `next_step`. Read it before you answer.
15
+ - Follow `next_step` to move the workflow forward.
16
+
17
+ ## Relay the user's words
18
+
19
+ - `gdt answer <issue> <question-id> "<text>"` posts an answer.
20
+ - `gdt steer <issue> --role <role> "<text>"` sends a directive to one role.
21
+ - `gdt pause <issue>` / `gdt resume <issue>` stop and restart dispatching.
22
+ - `gdt allow-round <issue>` grants one extra correction round when the budget is exhausted.
23
+ - `gdt set-agent <issue> <role> <agent>/<model>` changes that role's agent from its next turn.
24
+ - `gdt retry <issue>` prepares a retry after a failed turn.
25
+ - `gdt install-skill` installs this skill into detected agent harnesses.
26
+
27
+ ## Troubleshoot
28
+
29
+ - `gdt doctor` checks tools, GitHub authentication and `.gdt/config.toml`.
30
+ - `gdt status <issue>` states the cause and the next step; relay both to the user.
31
+
32
+ ## Hard rules
33
+
34
+ 1. The supervisor never runs as a child of the operator. `gdt start` launches it
35
+ in its own pane or detached process and returns; closing or compacting your
36
+ session never stops a workflow.
37
+ 2. No polling. After starting, run `gdt wait <issue>` as a background task whose
38
+ completion wakes you. Never repeat `gdt status` from model turns to wait. The
39
+ supervisor notifies the user; the user comes back to you.
40
+ 3. No invented answers. Never post an answer or directive the user did not state or confirm.
41
+ Never present your own product choice as the user's answer.
42
+ 4. Hands off the working tree. Read state and logs and run gdt commands; code
43
+ changes belong to the developer role.
44
+
45
+ Reply in the language the user writes in. Keep record markers, JSON keys, status
46
+ values and finding ids in English.