@pmelab/gtd 21.1.0 → 23.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/.claude-plugin/plugin.json +1 -1
- package/README.md +24 -11
- package/claude/hooks/persona.ts +1 -1
- package/dist/gtd.bundle.mjs +709 -7775
- package/dist/workflows.mjs +19417 -49
- package/package.json +5 -5
- package/skills/authoring/SKILL.md +2 -2
- package/src/flows/config.test.ts +66 -0
- package/src/flows/config.ts +141 -0
- package/src/flows/factory.test.ts +94 -0
- package/src/flows/factory.ts +116 -0
- package/src/flows/index.ts +2 -0
- package/src/workflows/access.ts +1 -1
- package/src/workflows/bundled.ts +9 -4
- package/src/workflows/health.ts +1 -1
- package/src/workflows/options.test.ts +52 -0
- package/src/workflows/options.ts +38 -0
- package/src/workflows/skills.ts +1 -1
- package/src/workflows/text.fixture.ts +3 -3
- package/src/workflows/text.ts +1 -1
- package/src/workflows/vars.ts +1 -1
- package/schema.json +0 -136
|
@@ -20,9 +20,9 @@ export interface TextContext {
|
|
|
20
20
|
readonly read?: (path: string) => string | undefined
|
|
21
21
|
/** The scope the step runs in (`"build.review"`); the fixture pushes no scopes, so this stands in for the caller's. */
|
|
22
22
|
readonly scope?: string
|
|
23
|
-
/** Stands in for
|
|
23
|
+
/** Stands in for `config.skills`, keyed by scope full name. */
|
|
24
24
|
readonly skills?: Readonly<Record<string, readonly string[]>>
|
|
25
|
-
/** Stands in for
|
|
25
|
+
/** Stands in for `config.access`, keyed by scope full name. */
|
|
26
26
|
readonly access?: Readonly<Record<string, ScopeAccess>>
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ const unavailable = (): never => {
|
|
|
30
30
|
throw new Error("not available while rendering a text outside a replay")
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/** Mirrors `Replay.ts`'s scope walk: for each prefix of the step's memory scope, innermost first, a
|
|
33
|
+
/** Mirrors `Replay.ts`'s scope walk: for each prefix of the step's memory scope, innermost first, a `config` entry, then the bundled export. */
|
|
34
34
|
const skillsForOf =
|
|
35
35
|
(context: TextContext) =>
|
|
36
36
|
(localName: string): readonly string[] => {
|
package/src/workflows/text.ts
CHANGED
|
@@ -869,7 +869,7 @@ every commit is machine-authored.
|
|
|
869
869
|
load (a stricter validation, an escape a value must now spell differently)
|
|
870
870
|
— a public surface, not an internal one, either way — add a literal
|
|
871
871
|
\`BREAKING CHANGE:\` footer naming what breaks and, for the second case,
|
|
872
|
-
the exact escape or rewrite a committed
|
|
872
|
+
the exact escape or rewrite a committed config needs. A \`!\` on the
|
|
873
873
|
type prefix alone (\`feat!:\`/\`refactor!:\`) is NOT enough: this repo's
|
|
874
874
|
own commit-analyzer has missed that marker before, cutting no release
|
|
875
875
|
until a follow-up commit carried the literal footer instead
|
package/src/workflows/vars.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The bundled workflow's settings, in two kinds. A process setting changes
|
|
2
2
|
// which step comes next, so it is pinned for the whole process at its start;
|
|
3
3
|
// an environment setting only changes how a step runs on this machine, so it
|
|
4
|
-
// is read live on every invocation.
|
|
4
|
+
// is read live on every invocation. A factory option, `--var` (process
|
|
5
5
|
// settings only) and `GTD_<NAME>` override either.
|
|
6
6
|
|
|
7
7
|
/** Process settings. */
|
package/schema.json
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"required": [],
|
|
5
|
-
"properties": {
|
|
6
|
-
"vars": {
|
|
7
|
-
"type": "object",
|
|
8
|
-
"description": "Flat name -> scalar map merged into the workflow's process settings (defaults), pinned for the whole process at its start. Scalars are coerced to strings.",
|
|
9
|
-
"additionalProperties": {
|
|
10
|
-
"type": [
|
|
11
|
-
"string",
|
|
12
|
-
"number",
|
|
13
|
-
"boolean"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"env": {
|
|
18
|
-
"type": "object",
|
|
19
|
-
"description": "Flat name -> scalar map merged into the workflow's environment settings (envDefaults) — values that change how a step runs on this machine, like the test command or a model hint. Read fresh on every gtd call, never pinned to a process. GTD_<NAME> environment variables override these entries. Scalars are coerced to strings.",
|
|
20
|
-
"additionalProperties": {
|
|
21
|
-
"type": [
|
|
22
|
-
"string",
|
|
23
|
-
"number",
|
|
24
|
-
"boolean"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"judge": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"required": [],
|
|
31
|
-
"properties": {
|
|
32
|
-
"provider": {
|
|
33
|
-
"type": "string",
|
|
34
|
-
"enum": [
|
|
35
|
-
"fixed",
|
|
36
|
-
"jev",
|
|
37
|
-
"llm"
|
|
38
|
-
],
|
|
39
|
-
"description": "Judge provider `gtd judge run` uses when no --provider flag, no GTD_JUDGE_PROVIDER and no user-level judge.json says. Absent means auto: jev when TYPESAFE_API_KEY is set, otherwise llm."
|
|
40
|
-
},
|
|
41
|
-
"model": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"description": "Model for provider llm, used when no --model flag, no GTD_JUDGE_MODEL and no user-level judge.json says. Pairing it with another provider is an error."
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"additionalProperties": false,
|
|
47
|
-
"description": "Which judge `gtd judge run` uses, when no flag, GTD_JUDGE_* variable or user-level judge.json says."
|
|
48
|
-
},
|
|
49
|
-
"modes": {
|
|
50
|
-
"type": "object",
|
|
51
|
-
"description": "Steering-file modes a workflow step's mode: may name. Each entry declares at least one of format/validate: shell commands gtd runs via bash with $GTD_FILE set to the steering file's path. format rewrites the file in place; validate exits 0 when valid, non-zero with findings on stdout/stderr otherwise. The halves layer independently, so naming a built-in mode (qa/review) and declaring only format: adds formatting while keeping gtd's own validation. gtd ships no formatter — bring your own (prettier, dprint, a script).",
|
|
52
|
-
"additionalProperties": {
|
|
53
|
-
"type": "object",
|
|
54
|
-
"description": "One mode: at least one of format/validate.",
|
|
55
|
-
"additionalProperties": false,
|
|
56
|
-
"minProperties": 1,
|
|
57
|
-
"properties": {
|
|
58
|
-
"format": {
|
|
59
|
-
"type": "string",
|
|
60
|
-
"description": "Shell command that rewrites the steering file in place before validation ($GTD_FILE is the file path). A non-zero exit is a hard error."
|
|
61
|
-
},
|
|
62
|
-
"validate": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"description": "Shell command that validates the steering file ($GTD_FILE is the file path). Exit 0 = valid; non-zero = invalid, with its output reported as the findings."
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"ui": {
|
|
70
|
-
"type": "object",
|
|
71
|
-
"required": [],
|
|
72
|
-
"properties": {
|
|
73
|
-
"port": {
|
|
74
|
-
"type": "integer",
|
|
75
|
-
"description": "For ui, the tailscale serve port (default: the first free of 8443, 10000, 443), or the bind port when --host opts out of serve (default: a free port).",
|
|
76
|
-
"title": "int"
|
|
77
|
-
},
|
|
78
|
-
"host": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"description": "Host/interface `gtd ui` binds to."
|
|
81
|
-
},
|
|
82
|
-
"cert": {
|
|
83
|
-
"type": "string",
|
|
84
|
-
"description": "Path to a TLS certificate file, enabling HTTPS. Requires `key` too."
|
|
85
|
-
},
|
|
86
|
-
"key": {
|
|
87
|
-
"type": "string",
|
|
88
|
-
"description": "Path to a TLS private key file, enabling HTTPS. Requires `cert` too."
|
|
89
|
-
},
|
|
90
|
-
"format": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"description": "Shell command run after every UI write, before it resolves ($GTD_FILE is the written file's absolute path). A non-zero exit or missing binary never reverts the write or refuses it — it's reported to the client as a notice naming the command and its exit code. Absent means no command runs at all."
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"additionalProperties": false,
|
|
96
|
-
"description": "Settings for `gtd ui`: where it listens, and optional TLS."
|
|
97
|
-
},
|
|
98
|
-
"skills": {
|
|
99
|
-
"type": "object",
|
|
100
|
-
"description": "Flat scope full-name -> skill-name array map. Each entry REPLACES the named scope's skill list wholesale (never merges into it) and reaches every nested scope that sets no list of its own; [] means no skills at all for that scope, and no preamble. A key that is not a scope running a turn is a load error listing the known scopes — the schema itself cannot validate a key, only a value's shape.",
|
|
101
|
-
"additionalProperties": {
|
|
102
|
-
"type": "array",
|
|
103
|
-
"items": {
|
|
104
|
-
"type": "string"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"access": {
|
|
109
|
-
"type": "object",
|
|
110
|
-
"description": "Flat scope full-name -> { read?, write? } map of glob arrays. Each entry REPLACES the named scope's declared access wholesale (never merges into it) and reaches every nested scope that sets none of its own; a missing side is unrestricted, [] allows nothing, and {} lifts every restriction. read and write are independent: write grants no read. A key that is not a scope running a turn is a load error listing the known scopes — the schema itself cannot validate a key, only a value's shape.",
|
|
111
|
-
"additionalProperties": {
|
|
112
|
-
"type": "object",
|
|
113
|
-
"additionalProperties": false,
|
|
114
|
-
"properties": {
|
|
115
|
-
"read": {
|
|
116
|
-
"type": "array",
|
|
117
|
-
"items": {
|
|
118
|
-
"type": "string"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"write": {
|
|
122
|
-
"type": "array",
|
|
123
|
-
"items": {
|
|
124
|
-
"type": "string"
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"$schema": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"description": "Editor-only pointer at this schema. Stripped by gtd before validation."
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"additionalProperties": false
|
|
136
|
-
}
|