@pmelab/gtd 13.0.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 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 note,
79
- anything at all. TODO.md is a good default place to start sketching.
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 `TODO.md` file with a detailed, well articulated
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
- echo "Make a billion dollar SaaS. Make no mistakes." > TODO.md
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
- Pending:
96
- A TODO.md -> * **
97
- Next: Start → unwind
103
+ Label: Idle
104
+ File: .gtd/TODO.md
98
105
  ```
99
106
 
100
- Your change matched the pattern `* **`, which routes to the `unwind` state. For
101
- the moment its not important what that is. Important is the fact that changes to
102
- the source tree control what is going to happen next.
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 revert --no-commit "$commit" 2> .gtd/.unwind-error
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. gtd never runs
156
- anything itself, so run it and land it exactly as before:
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
- Next: C → design.triage
185
+ Label: Checking the baseline
175
186
  ```
176
187
 
177
- `C` is the clean-tree pattern: the suite passed, nothing changed, so move on to
178
- triage. A red suite instead writes `.gtd/FEEDBACK.md`, which matches a different
179
- pattern and routes to `start-gate.blocked` — same two commands, different
180
- outcome, decided entirely by what the beat left in the tree.
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
 
@@ -374,9 +385,11 @@ gtd --entry review-gate.check --var reviewBase=<commitish>
374
385
  starts a pure review of everything from `<commitish>` to HEAD — straight to step
375
386
  4, no planning and no building.
376
387
 
377
- The workflow itself is data, not code: a `.gtdrc` `workflow:` key replaces it
378
- wholesale. See
379
- [Configuration](https://github.com/pmelab/gtd/blob/main/docs/configuration.md).
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.
380
393
 
381
394
  ## License
382
395