@pmelab/gtd 9.6.0 → 9.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmelab/gtd",
3
- "version": "9.6.0",
3
+ "version": "9.8.0",
4
4
  "private": false,
5
5
  "description": "Git-aware CLI that emits the next prompt for an autonomous coding agent based on the current repository state",
6
6
  "bin": {
@@ -32,13 +32,14 @@
32
32
  "build": "tsdown",
33
33
  "postbuild": "jiti scripts/generate-schema.ts && node scripts/assert-no-test-doubles.mjs",
34
34
  "watch": "tsdown --watch",
35
- "test": "turbo run format:check typecheck lint test:unit test:e2e:inmem test:e2e:live deadcode",
35
+ "test": "turbo run format:check typecheck lint lint:sh test:unit test:e2e:inmem test:e2e:live deadcode",
36
36
  "test:unit": "vitest run --project unit",
37
37
  "test:watch": "vitest",
38
38
  "test:changed": "vitest run --project unit --project e2e-inmem --changed HEAD",
39
39
  "test:e2e": "npm run test:e2e:inmem && npm run test:e2e:live",
40
40
  "typecheck": "tsc --noEmit",
41
41
  "lint": "oxlint .",
42
+ "lint:sh": "jiti scripts/generate-shell-corpus.ts --check && shellcheck -s sh tests/shell/corpus/*.sh",
42
43
  "format": "oxfmt --write .",
43
44
  "format:check": "oxfmt --check .",
44
45
  "test:mutation": "stryker run",
package/schema.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "properties": {
6
6
  "workflow": {
7
7
  "type": "object",
8
- "description": "The whole machine definition: a tree of named machines rooted at entry.default (plus the workflow's own vars: defaults, modes: steering-file modes, and stateDir: plumbing-directory declaration). Compiled and validated by gtd at load time; content strings starting with ./ or ../ are file references inlined from the config file's directory (a modes: command never is — it is a shell command).",
8
+ "description": "The whole machine definition: a tree of named machines rooted at entry.default (plus the workflow's own vars: defaults and modes: steering-file modes). Compiled and validated by gtd at load time; content strings starting with ./ or ../ are file references inlined from the config file's directory (a modes: command never is — it is a shell command).",
9
9
  "additionalProperties": false,
10
10
  "required": [
11
11
  "entry",
@@ -43,10 +43,6 @@
43
43
  }
44
44
  }
45
45
  },
46
- "stateDir": {
47
- "type": "string",
48
- "description": "An Eta template naming where this workflow keeps its own scratch/bookkeeping directory (the review window's revert pathspec, the step guards' code-vs-plumbing test). Defaults to \".gtd\" when absent. The rendered value must name a directory inside the repository: not the repo root, not an absolute path, not a path that escapes the repo via `..`. It must also be spelled canonically — no `.` and no empty path segments (e.g. `a/./state` or `a//state` are rejected, not rewritten) — though a leading `./` and a trailing `/` are accepted. Distinct from the ordinary `vars.stateDir` workflow var of the same name one level down — this is the definition-level declaration the engine reads; the var is the knob a user overrides, which the bundled template renders this declaration from."
49
- },
50
46
  "entry": {
51
47
  "type": "object",
52
48
  "description": "The workflow's root machine, resolved through the same resolver an `on`/`retry.otherwise` target uses (see src/Machines.ts) — accepts either a bare state path or an instance/reference-key path. Extra manual entry points are declared per-state instead, via a state's own `entry: true` (see `stateJsonSchema`'s `entry` property) — not here.",
@@ -89,6 +85,10 @@
89
85
  "type": "string",
90
86
  "description": "Opaque harness hint stamped onto every one of this machine's own `prompt` states (e.g. \"smart\"), passed through `gtd next --json`/`gtd status --json`. The ONLY place a model may be declared — a state carrying its own `model:` is a config error. Never interpreted by gtd. A machine declaring this with no `prompt` state is a config error."
91
87
  },
88
+ "system": {
89
+ "type": "string",
90
+ "description": "The agent harness system prompt stamped onto every one of this machine's own `prompt` states — emitted verbatim in `gtd next --json`/`--sh` for the driver to pass to its agent CLI, never interpreted by gtd. Machine-level only: a machine's `prompt` states share one resumed session, and a system prompt must be identical across every call of it. A `./` or `../` value is inlined from the declaring config file's directory. A machine declaring this with no `prompt` state is a config error."
91
+ },
92
92
  "states": {
93
93
  "type": "object",
94
94
  "description": "This machine's local states, each either an ordinary state or a `{ machine, with }` reference.",
@@ -179,7 +179,7 @@
179
179
  },
180
180
  "file": {
181
181
  "type": "string",
182
- "description": "The state's steering file: an Eta template naming the file a human/editor should look at while the machine rests here. Forbidden on a commit state."
182
+ "description": "The state's steering file: an Eta template naming the file a human/editor should look at while the machine rests here, RELATIVE to \".gtd/\" — the compiler prepends that directory automatically. A \"..\" segment, an absolute path, or an already-prefixed \".gtd/\" are rejected, not rewritten. Forbidden on a commit state."
183
183
  },
184
184
  "mode": {
185
185
  "type": "string",