@pmelab/gtd 9.9.0 → 9.10.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 +106 -69
- package/dist/gtd.bundle.mjs +307 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -141,10 +141,19 @@ itself — the prompt never inlines it; it finds the entry commit (the one
|
|
|
141
141
|
`unwind` reverted) and runs `git show` against it — and groups that diff into an
|
|
142
142
|
ORDERED list of **concerns**, each one able to leave the test suite green on its
|
|
143
143
|
own, classifying each as **product** (a user-facing/requirements decision) or
|
|
144
|
-
**technical** (an implementation decision).
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
**technical** (an implementation decision). A concern's open point clears a
|
|
145
|
+
three-part bar before it's ever raised as a question: the answer must be a
|
|
146
|
+
genuine fork with divergent outcomes, the sketch/entry diff/history must not
|
|
147
|
+
already settle it, and getting it wrong must survive all the way to human
|
|
148
|
+
review. Anything below that bar — product or technical alike — triage decides
|
|
149
|
+
itself, recording the decision and a one-line rationale under
|
|
150
|
+
`## Answered Questions`, the same section a human-answered question lands in;
|
|
151
|
+
only a product point that clears the bar is raised as an open question in
|
|
152
|
+
`.gtd/REQUIREMENTS.md` (a technical point that clears it waits for the
|
|
153
|
+
architecture phase to raise it), folding EVERYTHING the entry commit added into
|
|
154
|
+
those concerns — a scratch sketch and a hand-edited code change alike, since the
|
|
155
|
+
unwind already reverted both; nothing is left to delete. When every concern
|
|
156
|
+
turns out to be technical, triage writes no `## Open Questions` section at all.
|
|
148
157
|
A shared check+answer gate then probes `.gtd/REQUIREMENTS.md` for unanswered
|
|
149
158
|
questions: each open question offers a couple of candidate answers plus a
|
|
150
159
|
`- [ ] _your answer_` slot, and you tick exactly one per question (the gate
|
|
@@ -158,73 +167,84 @@ the plan as-is.
|
|
|
158
167
|
|
|
159
168
|
Once the product questions are settled, `architecture.author` picks up as a
|
|
160
169
|
**cold reader** — a separate machine with its own memory scope, so it does not
|
|
161
|
-
resume the triage conversation but reads `.gtd/REQUIREMENTS.md` in full
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
file
|
|
170
|
+
resume the triage conversation but reads `.gtd/REQUIREMENTS.md` in full (cold
|
|
171
|
+
means no memory of that conversation, never no git access — it finds and reads
|
|
172
|
+
the entry commit from history exactly as triage did) — and develops the _how_
|
|
173
|
+
for each settled concern. Because it is the first state that knows the _how_, it
|
|
174
|
+
is also the one state allowed to re-merge concerns whose file footprints
|
|
175
|
+
coincide (never split), recording every merge under a `## Merged Concerns`
|
|
176
|
+
heading. The same three-part bar applies to every technical point here too: only
|
|
177
|
+
one that clears it is raised as an open question in `.gtd/ARCHITECTURE.md`;
|
|
178
|
+
everything below the bar, author decides itself and records under
|
|
179
|
+
`## Answered Questions` right alongside triage's own settled points, all of
|
|
180
|
+
which author treats as SETTLED regardless of whether they're product or
|
|
181
|
+
technical. Open questions are routed through that same shared check+answer gate
|
|
182
|
+
shape, again skipping the human stop when nothing is open, and
|
|
183
|
+
`.gtd/REQUIREMENTS.md` is deleted once its content is folded in. A process where
|
|
184
|
+
nothing ever clears the bar runs both phases straight through with no human stop
|
|
185
|
+
at all — the existing review tail, which sees the whole diff anyway, is the
|
|
186
|
+
veto. Once those are settled, `architecture.decompose` is a purely mechanical
|
|
187
|
+
write-out — **one package file per concern**, in the settled order, with no
|
|
188
|
+
merge/split judgement of its own (triage grouped the concerns, and
|
|
189
|
+
`architecture.author` may already have re-merged some of them by file footprint)
|
|
190
|
+
— handing off to the per-package build queue: each package (a set of independent
|
|
191
|
+
tasks a single build turn fans out to parallel subagents) runs its own test loop
|
|
192
|
+
and a per-package **agentic review** that verifies it against its own spec. A
|
|
193
|
+
package whose work already landed (an earlier package's fix turn pulled it in)
|
|
194
|
+
is not a dead end: the build turn records per-criterion evidence in
|
|
195
|
+
`.gtd/SATISFIED.md` instead of implementing anything, and the package still goes
|
|
196
|
+
through the checks and the spec review before closing out. If a queue item ever
|
|
197
|
+
_does_ dead-end (a build turn that authors nothing stalls), the supported
|
|
198
|
+
recovery is to write that same file yourself and `gtd land` — no hand-authored
|
|
199
|
+
state commit.
|
|
179
200
|
|
|
180
201
|
The process converges on that same shared tail: an agent hands you a
|
|
181
202
|
`.gtd/REVIEW.md` checkbox review of the diff — the prompt never inlines the diff
|
|
182
203
|
itself; it names the commit the changes are based at and the agent runs
|
|
183
204
|
`git diff` to read the range before writing the review. Each hunk is a
|
|
184
|
-
`- [ ] ./path/to/file.ts#42` pointer
|
|
185
|
-
it
|
|
205
|
+
`- [ ] ./path/to/file.ts#42` pointer, and its explanation can either sit on the
|
|
206
|
+
line(s) below it or trail the pointer on the same line — both forms are equally
|
|
207
|
+
valid:
|
|
186
208
|
|
|
187
209
|
```
|
|
188
210
|
- [ ] ./path/to/file.ts#42
|
|
189
211
|
what this hunk does, with room to run to several lines
|
|
212
|
+
- [ ] ./path/to/file.ts#99 — a same-line note works too
|
|
190
213
|
```
|
|
191
214
|
|
|
192
|
-
|
|
193
|
-
`
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
which collapses the whole process into one commit (a **squash finale** whose
|
|
226
|
-
message an agent drafts). Deleting `.gtd/REVIEW.md` is refused — the guard only
|
|
227
|
-
asks whether the step's diff deletes the file.
|
|
215
|
+
The one rule an explanation must follow either way: it must never itself START
|
|
216
|
+
with a bare `./path` token, since that parses as a second hunk pointer rather
|
|
217
|
+
than a note. If a styled `.gtd/REVIEW.md` ever comes out malformed some other
|
|
218
|
+
way (a paragraph where a `- [ ] ./path#line` row belongs), `gtd check review`
|
|
219
|
+
refuses the step the same way: the file stays exactly as written in the working
|
|
220
|
+
tree, unlanded, and re-running the same prompt is the recovery — nothing is
|
|
221
|
+
lost. While the process rests at that gate, the landing script opens a **review
|
|
222
|
+
checkout window**: HEAD is rewound to the review base with the working tree
|
|
223
|
+
untouched, so the whole reviewable change shows up as ordinary uncommitted
|
|
224
|
+
changes in your editor's normal git integration (and files added during the
|
|
225
|
+
process show up as ordinary untracked files, so discarding one deletes it — an
|
|
226
|
+
untracked file you leave alone is not a pending change, and only actually
|
|
227
|
+
removing it from disk counts as a deletion). The next landing's own script
|
|
228
|
+
closes the window before it commits. Tick a box as you review each hunk (ticking
|
|
229
|
+
just records "I read this"), and leave a **comment** to request changes: a note
|
|
230
|
+
on a line, an inline `// TODO`-style comment in the code, or a direct code edit.
|
|
231
|
+
A comment sends a FULL development lap, not a quick fix-and-re-review: an agent
|
|
232
|
+
first judges whether your comment is actually actionable (a genuinely approving
|
|
233
|
+
remark with no code edit short-circuits straight to sign-off instead), and an
|
|
234
|
+
actionable round is re-planned from scratch through triage, architecture, and
|
|
235
|
+
the package queue again — a hand-edit you made during review is treated as a
|
|
236
|
+
**sketch**, the same as any other change that starts a process, not a fix the
|
|
237
|
+
agent builds on: it is reverted out of the tree first, and your intent survives
|
|
238
|
+
only in your own review-round commit for triage to read. There is no baseline
|
|
239
|
+
check on the way back into planning. Only the turn that drafts the final squash
|
|
240
|
+
message resumes the session that built the feature in the first place (the
|
|
241
|
+
review tail is nested inside that build identity rather than sitting beside it)
|
|
242
|
+
— an actionable round leaves that identity entirely, so it starts a fresh
|
|
243
|
+
session like any other process. A comment is what asks for changes; landing with
|
|
244
|
+
no comment signs off, whatever the boxes say, which collapses the whole process
|
|
245
|
+
into one commit (a **squash finale** whose message an agent drafts). Deleting
|
|
246
|
+
`.gtd/REVIEW.md` is refused — the guard only asks whether the step's diff
|
|
247
|
+
deletes the file.
|
|
228
248
|
|
|
229
249
|
A second entry, the same review tail's own direct entry point —
|
|
230
250
|
`gtd --entry review-gate.check --var reviewBase=<commitish>` starts a brand new
|
|
@@ -1009,15 +1029,32 @@ After an agent turn at a state that declares `file:`+`mode:`, run the script:
|
|
|
1009
1029
|
either `gtd next --json`'s own embedded `.validate` field (present at every
|
|
1010
1030
|
`prompt` beat that hands over a validatable file), or, standalone,
|
|
1011
1031
|
`gtd validate`'s own plain-text output — both resolve the exact same script from
|
|
1012
|
-
one shared resolver.
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1032
|
+
one shared resolver. This field is now populated even at a FIRST-WRITE beat,
|
|
1033
|
+
before the steering file exists at all: the script itself carries a leading
|
|
1034
|
+
`[ -f <file> ] || exit 0` guard rather than gtd checking existence ahead of
|
|
1035
|
+
time, so a driver's `while [ -n "$gtd_validate" ]` repair loop is armed from the
|
|
1036
|
+
very first turn at a state, not just the second and later ones. Exit 0 means the
|
|
1037
|
+
file is well-formed (or genuinely doesn't exist yet) — proceed to `gtd land`. A
|
|
1038
|
+
non-zero exit usually means the script's own captured output IS a complete,
|
|
1039
|
+
ready-to-send fix prompt (an instruction plus the findings, see `src/Emit.ts`'s
|
|
1040
|
+
`failurePromptWrapper`): send it back to the same agent session verbatim, and
|
|
1041
|
+
cap how many fix attempts you allow yourself — the driver owns that retry count,
|
|
1042
|
+
not gtd. Landing never TRUSTS that you validated, either: the emitted `land`
|
|
1043
|
+
script carries the same format/validate commands ahead of its own commit and
|
|
1044
|
+
fails without committing when they fail, so a malformed file is never captured
|
|
1045
|
+
whether or not you ran the validate script first.
|
|
1046
|
+
|
|
1047
|
+
A non-zero exit can ALSO mean something the fix loop cannot fix: a mode whose
|
|
1048
|
+
`format:` command breaks its own validator, a config bug gtd detects by
|
|
1049
|
+
formatting a canonical sample and re-checking it before the real file's own
|
|
1050
|
+
findings are ever reported. That message is unmistakably different — it says
|
|
1051
|
+
this is a CONFIGURATION BUG, not the steering file, and tells the agent to stop
|
|
1052
|
+
and end its turn rather than edit anything. gtd's exit-code contract stays
|
|
1053
|
+
closed at five numbers (below), so nothing distinguishes the two cases at the
|
|
1054
|
+
process level — a driver's fix loop is still the CORRECT thing to run in both
|
|
1055
|
+
cases, it just can never win a contradiction: its 3-attempt cap is what ends
|
|
1056
|
+
one, not a fix. Reading the message text before re-prompting is what keeps an
|
|
1057
|
+
agent from thrashing on a document it cannot fix.
|
|
1021
1058
|
|
|
1022
1059
|
### Failure taxonomy and recovery
|
|
1023
1060
|
|