@pmelab/gtd 12.5.0 → 14.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.md +49 -38
- package/dist/gtd.bundle.mjs +3572 -11508
- package/package.json +8 -3
- package/schema.json +5 -287
- package/src/flows/helpers.ts +93 -0
- package/src/flows/index.ts +3 -0
- package/src/flows/runtime.ts +295 -0
- package/src/flows/scripts.ts +116 -0
- package/src/workflows/health.ts +126 -0
- package/src/workflows/index.ts +1 -0
- package/src/workflows/packages.ts +93 -0
- package/src/workflows/planning.ts +99 -0
- package/src/workflows/prose.ts +200 -0
- package/src/workflows/review.ts +169 -0
- package/src/workflows/steps.ts +200 -0
- package/src/workflows/text.fixture.ts +38 -0
- package/src/workflows/text.test.ts +37 -0
- package/src/workflows/text.ts +682 -0
- package/src/workflows/unified.ts +128 -0
- package/src/workflows/vars.ts +23 -0
package/README.md
CHANGED
|
@@ -29,6 +29,12 @@ bundled workflow names skills from it at several states instead of spelling out
|
|
|
29
29
|
technique in the prompt itself; see
|
|
30
30
|
[Setup](https://github.com/pmelab/gtd/blob/main/docs/setup.md) for the details.
|
|
31
31
|
|
|
32
|
+
> **A repository's `gtd.config.ts` is code, and gtd runs it.** A custom workflow
|
|
33
|
+
> is a TypeScript module, and every gtd command that looks at workflow state —
|
|
34
|
+
> `gtd next` and `gtd lsp` included, not just `gtd land` — evaluates it. Treat
|
|
35
|
+
> it like a Makefile or a `package.json` script: don't run gtd in a checkout you
|
|
36
|
+
> don't trust.
|
|
37
|
+
|
|
32
38
|
## Quick start
|
|
33
39
|
|
|
34
40
|
Pipe the output of `gtd install` into your coding agent and answer its
|
|
@@ -75,15 +81,17 @@ gtd next
|
|
|
75
81
|
```
|
|
76
82
|
No active gtd process.
|
|
77
83
|
|
|
78
|
-
To start one, make ANY change — a hand-edit to real code, a scratch
|
|
79
|
-
anything at all. TODO.md is a good default
|
|
84
|
+
To start one, make ANY change — a hand-edit to real code, a scratch
|
|
85
|
+
note, anything at all. .gtd/TODO.md is a good default
|
|
86
|
+
place to start sketching.
|
|
80
87
|
```
|
|
81
88
|
|
|
82
|
-
This means its your turn. Add a
|
|
83
|
-
idea:
|
|
89
|
+
This means its your turn. Add a `.gtd/TODO.md` file with a detailed, well
|
|
90
|
+
articulated idea:
|
|
84
91
|
|
|
85
92
|
```bash
|
|
86
|
-
|
|
93
|
+
mkdir -p .gtd
|
|
94
|
+
echo "Make a billion dollar SaaS. Make no mistakes." > .gtd/TODO.md
|
|
87
95
|
```
|
|
88
96
|
|
|
89
97
|
Ask again, and gtd leads with what to do, then reports what it sees:
|
|
@@ -92,14 +100,13 @@ Ask again, and gtd leads with what to do, then reports what it sees:
|
|
|
92
100
|
The edit is already made — run `gtd land` to land it.
|
|
93
101
|
State: idle
|
|
94
102
|
Awaits: human
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
Next: Start → unwind
|
|
103
|
+
Label: Idle
|
|
104
|
+
File: .gtd/TODO.md
|
|
98
105
|
```
|
|
99
106
|
|
|
100
|
-
|
|
101
|
-
the moment its not important what that is. Important is the fact that
|
|
102
|
-
the
|
|
107
|
+
At `idle`, any change at all starts a process, and the next step is `unwind`.
|
|
108
|
+
For the moment its not important what that is. Important is the fact that what
|
|
109
|
+
you leave in the tree controls what is going to happen next.
|
|
103
110
|
|
|
104
111
|
### Beat 2 — `gtd land` records it as a commit
|
|
105
112
|
|
|
@@ -123,7 +130,6 @@ gtd land --json=script | sh
|
|
|
123
130
|
|
|
124
131
|
```
|
|
125
132
|
-> idle → unwind
|
|
126
|
-
TODO.md
|
|
127
133
|
```
|
|
128
134
|
|
|
129
135
|
```bash
|
|
@@ -148,12 +154,17 @@ Awaits: check
|
|
|
148
154
|
Label: Unwinding your input
|
|
149
155
|
|
|
150
156
|
#!/usr/bin/env sh
|
|
151
|
-
|
|
152
|
-
git
|
|
157
|
+
set +e
|
|
158
|
+
if ! git diff --quiet '<sketch commit>^' '<sketch commit>' --; then
|
|
159
|
+
mkdir -p "$(dirname '.gtd/FEEDBACK.md')"
|
|
160
|
+
git diff --binary '<sketch commit>^' '<sketch commit>' -- | git apply -R 2> …
|
|
161
|
+
…
|
|
153
162
|
```
|
|
154
163
|
|
|
155
|
-
`Awaits: check` means this beat is not yours: it is a script
|
|
156
|
-
|
|
164
|
+
`Awaits: check` means this beat is not yours: it is a script, here one that
|
|
165
|
+
reverts your sketch out of the working tree. gtd never runs anything itself,
|
|
166
|
+
never commits and never touches the index, so run it and land it exactly as
|
|
167
|
+
before:
|
|
157
168
|
|
|
158
169
|
```bash
|
|
159
170
|
sh -c "$(gtd next --json=content)"
|
|
@@ -171,13 +182,13 @@ baseline is green:
|
|
|
171
182
|
```
|
|
172
183
|
State: start-gate.check
|
|
173
184
|
Awaits: check
|
|
174
|
-
|
|
185
|
+
Label: Checking the baseline
|
|
175
186
|
```
|
|
176
187
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
188
|
+
A green suite leaves the tree clean, so the process moves on to triage. A red
|
|
189
|
+
suite instead writes `.gtd/FEEDBACK.md`, and the process goes to
|
|
190
|
+
`start-gate.blocked` — same two commands, different outcome, decided entirely by
|
|
191
|
+
what the beat left in the tree.
|
|
181
192
|
|
|
182
193
|
Land the green one, and the beat after it belongs to an agent.
|
|
183
194
|
|
|
@@ -306,9 +317,9 @@ noted in steps 2, 3, and 4 below.
|
|
|
306
317
|
|
|
307
318
|
3. **You wait.** The work is split into packages and built one at a time, each
|
|
308
319
|
one checked against your test suite and fixed until it passes, then reviewed
|
|
309
|
-
against its own spec before moving on.
|
|
310
|
-
rather than always asking you outright — each stops and hands you a
|
|
311
|
-
to make (`gtd judge answer`, or land with a clean tree to accept the
|
|
320
|
+
against its own spec before moving on. Three points along that loop are
|
|
321
|
+
judged rather than always asking you outright — each stops and hands you a
|
|
322
|
+
verdict to make (`gtd judge answer`, or land with a clean tree to accept the
|
|
312
323
|
conservative default, which never skips work):
|
|
313
324
|
- Every red round after the first: was the failure identical, new, or
|
|
314
325
|
progress?
|
|
@@ -316,22 +327,20 @@ noted in steps 2, 3, and 4 below.
|
|
|
316
327
|
each of its requirements?
|
|
317
328
|
- After a review turn raises concerns: would each one actually violate the
|
|
318
329
|
spec if left unaddressed, or is it a nit?
|
|
319
|
-
- Before showing you the review document: is this round mechanical, touches
|
|
320
|
-
no public surface, and changes no behavior? Confident on all three skips
|
|
321
|
-
the agent's own review turn — step 4 still shows you a (machine-written)
|
|
322
|
-
summary of what changed.
|
|
323
330
|
|
|
324
331
|
A driver built only to run this loop (not to answer judgments) still handles
|
|
325
332
|
every one of these correctly: it shows you the message and stops, same as any
|
|
326
333
|
other question.
|
|
327
334
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
it.
|
|
335
|
+
Once the last package is built, the whole change goes through a qualitative
|
|
336
|
+
review lap before you see anything: one configured skill per turn, each
|
|
337
|
+
looking at the change from its own angle (a security checklist, a
|
|
338
|
+
simplification pass) and fixing what it finds once, with no re-review after
|
|
339
|
+
the fix. The per-package review above only judges that package against its
|
|
340
|
+
own spec; this lap is where code quality is looked at, and every round pays
|
|
341
|
+
for it. It never replaces step 4 — your review stays the final gate, and
|
|
342
|
+
nothing here skips it. The `gtd --entry fix-precheck` side door (below)
|
|
343
|
+
repairs a red baseline through this same lap.
|
|
335
344
|
|
|
336
345
|
A red suite that keeps failing past a few fix attempts escalates instead of
|
|
337
346
|
retrying forever: an agent turn reads the failing output and writes
|
|
@@ -376,9 +385,11 @@ gtd --entry review-gate.check --var reviewBase=<commitish>
|
|
|
376
385
|
starts a pure review of everything from `<commitish>` to HEAD — straight to step
|
|
377
386
|
4, no planning and no building.
|
|
378
387
|
|
|
379
|
-
The workflow itself is
|
|
380
|
-
|
|
381
|
-
|
|
388
|
+
The workflow itself is a plain async TypeScript function: a `gtd.config.ts` at
|
|
389
|
+
the repository root replaces it, and the pieces the bundled one is built from
|
|
390
|
+
are exported for yours to reuse. See
|
|
391
|
+
[Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md) —
|
|
392
|
+
and remember gtd evaluates that file on every command.
|
|
382
393
|
|
|
383
394
|
## License
|
|
384
395
|
|