@gevezex/gdt 0.4.0 → 0.4.1
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 +124 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ evidence too.
|
|
|
122
122
|
| `git` | the shared checkout the roles work in |
|
|
123
123
|
| `gh`, logged in (`gh auth login`) | issues, pull requests, comments, checks |
|
|
124
124
|
| at least one agent CLI | `claude`, `codex`, `opencode`, `mcode`, `pi` or `omp` (see below) |
|
|
125
|
+
| CI on pull requests | the target repository needs at least one CI check (for example a GitHub Actions job); `workflow.required_checks` lists its name as shown on the pull request and `gdt init` detects the names. Set `workflow.allow_no_required_checks = true` only as the explicit opt-out |
|
|
125
126
|
| [herdr](https://herdr.dev) 0.9.1+ | the default way to watch the roles live, one tab per role; on machines without herdr set `workflow.terminal = "headless"` |
|
|
126
127
|
|
|
127
128
|
### Agent prerequisites
|
|
@@ -159,6 +160,12 @@ npm run build
|
|
|
159
160
|
npm link # puts `gdt` on your PATH
|
|
160
161
|
```
|
|
161
162
|
|
|
163
|
+
A linked install runs `dist/` of that checkout, so gdt runs the code you built
|
|
164
|
+
there. A workflow that runs gdt on that same checkout (for example on gdt's own
|
|
165
|
+
repository) can rebuild `dist/` and change the running gdt mid-workflow. Use a
|
|
166
|
+
linked install only to develop gdt; to run workflows, install the published
|
|
167
|
+
package with `npm i -g @gevezex/gdt`.
|
|
168
|
+
|
|
162
169
|
Then install the operator skill, so your coding agent knows how to drive gdt:
|
|
163
170
|
|
|
164
171
|
```bash
|
|
@@ -168,13 +175,34 @@ gdt install-skill
|
|
|
168
175
|
It copies `skill/SKILL.md` into the skill directory of every agent CLI it finds
|
|
169
176
|
(for example `~/.claude/skills/gdt`) and is safe to run again.
|
|
170
177
|
|
|
178
|
+
## Security
|
|
179
|
+
|
|
180
|
+
Before the first `gdt start`, know what a role turn can do:
|
|
181
|
+
|
|
182
|
+
- Every role turn runs its agent CLI **without permission prompts** and with
|
|
183
|
+
shell access to the machine. The adapters pass, for example,
|
|
184
|
+
`--permission-mode bypassPermissions` for Claude Code and
|
|
185
|
+
`--dangerously-bypass-approvals-and-sandbox` for Codex, because nobody is
|
|
186
|
+
there to answer a prompt. Run gdt only where you accept that.
|
|
187
|
+
- Issue and comment text is **task data** for the roles, never instructions to
|
|
188
|
+
the supervisor. Treat an issue body or a comment as untrusted input.
|
|
189
|
+
- The tester and reviewer are **checked mechanically**: after their turn the
|
|
190
|
+
supervisor verifies that HEAD, branch and the tracked files are unchanged, and
|
|
191
|
+
blocks the workflow otherwise.
|
|
192
|
+
- Roles act with **your own `gh` login**. An agent-written comment is
|
|
193
|
+
indistinguishable from one you wrote; gdt never merges, deploys or closes
|
|
194
|
+
issues.
|
|
195
|
+
|
|
196
|
+
The full invocation for each agent is in [docs/agents.md](docs/agents.md); the
|
|
197
|
+
trust boundaries are in
|
|
198
|
+
[section 10 of docs/design.md](docs/design.md#10-security-and-trust-boundaries).
|
|
199
|
+
|
|
171
200
|
## Quick start
|
|
172
201
|
|
|
173
|
-
### 1.
|
|
202
|
+
### 1. Set up the user config once per machine
|
|
174
203
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
yourself:
|
|
204
|
+
Roles belong to you, not to a repository, so they live in your user config. Ask
|
|
205
|
+
your coding agent, or run `gdt init` yourself:
|
|
178
206
|
|
|
179
207
|
```bash
|
|
180
208
|
gdt init --developer opencode/deepseek/deepseek-v4-flash \
|
|
@@ -182,27 +210,35 @@ gdt init --developer opencode/deepseek/deepseek-v4-flash \
|
|
|
182
210
|
--reviewer codex/gpt-5.6-luna
|
|
183
211
|
```
|
|
184
212
|
|
|
185
|
-
`gdt init` writes the roles to
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
213
|
+
`gdt init` writes the roles to the user config (`~/.config/gdt/config.toml`, or
|
|
214
|
+
`$XDG_CONFIG_HOME/gdt/config.toml`) and installs the operator skill. Run it from
|
|
215
|
+
one of your checkouts: it also creates that repository's `.gdt/config.toml`, so
|
|
216
|
+
that first repository is configured too. Without the three role options, it
|
|
217
|
+
reuses the roles from your user config when they are all there; otherwise it
|
|
218
|
+
only reports what it found (agents on `PATH`, the terminal, the detected CI
|
|
219
|
+
checks) so your agent can discuss the roles with you first. It never overwrites
|
|
220
|
+
an existing config without `--force`.
|
|
221
|
+
|
|
222
|
+
### 2. Configure each target repository
|
|
223
|
+
|
|
224
|
+
For every other repository you want gdt to work on, create `.gdt/config.toml`
|
|
225
|
+
with `gdt init` (no role options: it reuses the roles from your user config), or
|
|
226
|
+
commit a file based on [`examples/config.toml`](examples/config.toml). `gdt init`
|
|
227
|
+
requires at least one required check unless you pass
|
|
228
|
+
`--allow-no-required-checks`.
|
|
193
229
|
|
|
194
|
-
Then check your setup:
|
|
230
|
+
Then check your setup in that repository:
|
|
195
231
|
|
|
196
232
|
```bash
|
|
197
233
|
gdt doctor
|
|
198
234
|
```
|
|
199
235
|
|
|
200
|
-
`doctor` checks `git`, `gh` and its login, the agent CLIs, herdr (when used)
|
|
201
|
-
and
|
|
202
|
-
developer and tester use the same model vendor,
|
|
203
|
-
independent then.
|
|
236
|
+
`doctor` checks `git`, `gh` and its login, the agent CLIs, herdr (when used) and
|
|
237
|
+
the user, repository and local config, and prints a `fix:` line for every
|
|
238
|
+
problem. It also warns when developer and tester use the same model vendor,
|
|
239
|
+
because the tester is less independent then.
|
|
204
240
|
|
|
205
|
-
###
|
|
241
|
+
### 3. Write the issue as a contract
|
|
206
242
|
|
|
207
243
|
The issue body is the only specification. It needs fixed sections and numbered
|
|
208
244
|
acceptance criteria, each with Given, When, Then and a concrete Example:
|
|
@@ -251,7 +287,7 @@ gdt check-issue --body-file body.md # a draft, without calling GitHub
|
|
|
251
287
|
Your agent can help write the body with the issue-writer instructions in
|
|
252
288
|
[`roles/issue-writer.md`](roles/issue-writer.md).
|
|
253
289
|
|
|
254
|
-
###
|
|
290
|
+
### 4. Start it from your agent
|
|
255
291
|
|
|
256
292
|
Just ask your coding agent, in your own language:
|
|
257
293
|
|
|
@@ -269,7 +305,7 @@ gdt wait 251 # blocks until the workflow needs attention
|
|
|
269
305
|
gdt status 251 # one line plus the next step
|
|
270
306
|
```
|
|
271
307
|
|
|
272
|
-
###
|
|
308
|
+
### 5. Answer, steer, merge
|
|
273
309
|
|
|
274
310
|
| Situation | What you (or your agent) run |
|
|
275
311
|
|---|---|
|
|
@@ -295,7 +331,7 @@ changes product behaviour makes the role ask for the issue body to be updated.
|
|
|
295
331
|
| `awaiting_human` | a role asked a question | `gdt answer <n> <question-id> "<text>"` |
|
|
296
332
|
| `blocked` | a gate failed or a role reported blocked; the reason says why | follow the hint, e.g. `gdt allow-round <n>` |
|
|
297
333
|
| `contract_changed` | the issue body changed; evidence is reset | wait |
|
|
298
|
-
| `failed` | an agent turn exited non-zero | `gdt retry <n>` |
|
|
334
|
+
| `failed` | an agent turn exited non-zero | `gdt retry <n>`, then `gdt start <n>` |
|
|
299
335
|
| `paused` / `stopped` | you paused or stopped it | `gdt resume <n>` / `gdt start <n>` |
|
|
300
336
|
| `ready_to_merge` | all gates passed | review and merge the PR |
|
|
301
337
|
|
|
@@ -306,7 +342,7 @@ Every command supports `--help`; `status` and `wait` also support `--json`.
|
|
|
306
342
|
| Command | Effect |
|
|
307
343
|
|---|---|
|
|
308
344
|
| `gdt init` | Write the roles to the user config and `.gdt/config.toml`, install the operator skill |
|
|
309
|
-
| `gdt doctor` | Check tools, GitHub login, agents, herdr and
|
|
345
|
+
| `gdt doctor` | Check tools, GitHub login, agents, herdr and the user, repository and local config |
|
|
310
346
|
| `gdt check-issue <n>` | Validate an issue body against the contract |
|
|
311
347
|
| `gdt start <n>` | Preflight, start the supervisor and workers, return |
|
|
312
348
|
| `gdt status <n>` | Status, role, round, open findings and next step |
|
|
@@ -374,6 +410,26 @@ the three files empty so you can see where your rules go; commit them like
|
|
|
374
410
|
|
|
375
411
|
How each agent CLI is invoked is documented in [docs/agents.md](docs/agents.md).
|
|
376
412
|
|
|
413
|
+
## Upgrading
|
|
414
|
+
|
|
415
|
+
### From 0.3 to 0.4
|
|
416
|
+
|
|
417
|
+
Since 0.4.0, `[roles.*]` in `.gdt/config.toml` is an error and `gdt start`
|
|
418
|
+
refuses to run. Roles now live in the user config. To upgrade:
|
|
419
|
+
|
|
420
|
+
1. Move the three `[roles.*]` tables from `.gdt/config.toml` to the user config
|
|
421
|
+
at `~/.config/gdt/config.toml`, or `$XDG_CONFIG_HOME/gdt/config.toml` when
|
|
422
|
+
`XDG_CONFIG_HOME` is set.
|
|
423
|
+
2. Remove the `[roles.*]` tables from `.gdt/config.toml`, so only the repository
|
|
424
|
+
settings (`[workflow]`, `[contract]`) remain.
|
|
425
|
+
3. Run `gdt doctor` to check that the configuration is valid again.
|
|
426
|
+
|
|
427
|
+
Instead of steps 1 and 2 you can run `gdt init --force` with the three role
|
|
428
|
+
options (see [Quick start](#quick-start)). It writes the roles to the user
|
|
429
|
+
config, but it also replaces `.gdt/config.toml` in the current checkout with
|
|
430
|
+
freshly detected defaults, so any custom repository settings there are lost.
|
|
431
|
+
Use the manual move when you have changed `[workflow]` or `[contract]`.
|
|
432
|
+
|
|
377
433
|
## Watching it: herdr or headless
|
|
378
434
|
|
|
379
435
|
```text
|
|
@@ -391,6 +447,51 @@ Everything gdt keeps for an issue lives under `.git/gdt/issue-<n>/`: `state.json
|
|
|
391
447
|
(the workflow state), `logs/` (one log per process) and `runs/` (the prompt and
|
|
392
448
|
result of every turn). It is never committed.
|
|
393
449
|
|
|
450
|
+
### Notifications
|
|
451
|
+
|
|
452
|
+
When a workflow needs you, gdt notifies you through the first of
|
|
453
|
+
`terminal-notifier`, `osascript` (macOS) or `notify-send` (Linux) that is on
|
|
454
|
+
`PATH` and works. If none of them is available, the notification is only
|
|
455
|
+
written to `.git/gdt/issue-<n>/logs/supervisor.log`, and `gdt wait` is the way
|
|
456
|
+
to be told: it blocks until the workflow needs attention.
|
|
457
|
+
|
|
458
|
+
## The checkout during and after a workflow
|
|
459
|
+
|
|
460
|
+
The roles work in the checkout where you run `gdt start`: the developer checks
|
|
461
|
+
out the feature branch there, and the tester and reviewer read that same working
|
|
462
|
+
tree. `gdt start` needs a **clean working tree** and refuses to run otherwise
|
|
463
|
+
("Commit or stash before starting."), so commit or stash first. Do not edit that
|
|
464
|
+
checkout while a workflow runs; if you want to keep working, use a separate
|
|
465
|
+
clone for gdt.
|
|
466
|
+
|
|
467
|
+
After `ready_to_merge`, or after `gdt stop`, two things stay behind:
|
|
468
|
+
|
|
469
|
+
- the herdr workspace `gdt-<n>`, which you can close yourself in herdr;
|
|
470
|
+
- the state directory `.git/gdt/issue-<n>/`, which you may delete once the pull
|
|
471
|
+
request is merged and no gdt process for that issue is running.
|
|
472
|
+
|
|
473
|
+
## Troubleshooting
|
|
474
|
+
|
|
475
|
+
When a turn fails or a workflow stops unexpectedly, start with:
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
gdt status <n>
|
|
479
|
+
gdt doctor
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
`gdt status <n>` shows the status, role, round and next step; `gdt doctor`
|
|
483
|
+
reports a `fix:` line for every configuration or tool problem.
|
|
484
|
+
|
|
485
|
+
Everything gdt keeps for an issue is under the state directory: one log per
|
|
486
|
+
process in `.git/gdt/issue-<n>/logs/`, and the prompt and result of every turn
|
|
487
|
+
in `.git/gdt/issue-<n>/runs/`.
|
|
488
|
+
|
|
489
|
+
- **exit code 78** means the configuration was invalid or the turn's prompt
|
|
490
|
+
could not be built. Run `gdt doctor`, fix what it reports, then
|
|
491
|
+
`gdt retry <n>` and `gdt start <n>`.
|
|
492
|
+
- **any other non-zero exit code** means the agent CLI itself failed; its log
|
|
493
|
+
under `.git/gdt/issue-<n>/logs/` shows why.
|
|
494
|
+
|
|
394
495
|
## Principles
|
|
395
496
|
|
|
396
497
|
- **The issue body is the contract.** Work starts only when there are no open questions.
|
|
@@ -413,7 +514,7 @@ npm ci
|
|
|
413
514
|
npm run build
|
|
414
515
|
npm run lint
|
|
415
516
|
npm test
|
|
416
|
-
node dist/cli.js doctor # run
|
|
517
|
+
node dist/cli.js doctor # run in a repository configured for gdt (user + repository + local config)
|
|
417
518
|
```
|
|
418
519
|
|
|
419
520
|
Rules for agents working on this repository: [AGENTS.md](AGENTS.md).
|