@sublang/playbook 0.8.0 → 0.9.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 +87 -69
- package/package.json +9 -14
- package/reference/sdlc/code.playbook/bin/playbook.js +438 -0
- package/reference/sdlc/code.playbook/code.fsm.ts +3 -2
- package/reference/sdlc/code.playbook/code.playbook.js +3 -2
- package/reference/sdlc/code.playbook/code.playbook.ts +3 -2
- package/reference/sdlc/code.playbook/code.registry.d.ts +18 -3
- package/reference/sdlc/code.playbook/code.registry.js +50 -32
- package/reference/sdlc/code.playbook/code.registry.ts +77 -37
- package/reference/sdlc/code.playbook/playbook-captain.d.ts +8 -5
- package/reference/sdlc/code.playbook/playbook-captain.js +141 -55
- package/reference/sdlc/code.playbook/playbook-captain.ts +203 -73
- package/reference/sdlc/code.playbook/playbook.config.template.yaml +58 -0
- package/reference/sdlc/code.playbook/bin/playbook-code.js +0 -487
- package/reference/sdlc/code.playbook/code.tmux-play.d.ts +0 -4
- package/reference/sdlc/code.playbook/code.tmux-play.js +0 -11
- package/reference/sdlc/code.playbook/code.tmux-play.ts +0 -29
- package/reference/sdlc/code.playbook/playbook-code.config.template.yaml +0 -72
- package/reference/sdlc/code.playbook/tmux-play.config.yaml +0 -55
- package/reference/sdlc/code.playbook/tmux-play.production.config.yaml +0 -38
package/README.md
CHANGED
|
@@ -55,86 +55,93 @@ npm install -g @sublang/playbook
|
|
|
55
55
|
Then launch the reference playbook in a `tmux-play` session:
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
|
-
playbook
|
|
58
|
+
playbook
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
For a one-shot run without a global install,
|
|
62
|
-
through npx:
|
|
61
|
+
For a one-shot run without a global install, invoke the scoped
|
|
62
|
+
package through npx (it runs the package's `playbook` bin):
|
|
63
63
|
|
|
64
64
|
```sh
|
|
65
|
-
npx playbook
|
|
65
|
+
npx @sublang/playbook
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
On first run, `playbook
|
|
69
|
-
`${XDG_CONFIG_HOME:-$HOME/.config}/playbook/playbook
|
|
70
|
-
from the bundled
|
|
71
|
-
declared adapters before launching.
|
|
72
|
-
not overwrite it.
|
|
68
|
+
On first run, `playbook` creates a commented user config at
|
|
69
|
+
`${XDG_CONFIG_HOME:-$HOME/.config}/playbook/playbook.config.yaml`
|
|
70
|
+
from the bundled starter, prints that path to stderr, then composes a
|
|
71
|
+
`tmux-play` config and checks the declared adapters before launching.
|
|
72
|
+
Later runs reuse that file and do not overwrite it.
|
|
73
73
|
|
|
74
74
|
Known adapter readiness is intentionally light: `claude` is ready when
|
|
75
75
|
local Claude Code auth exists or `ANTHROPIC_API_KEY` is set; `codex` is
|
|
76
76
|
ready when local Codex CLI auth exists or `OPENAI_API_KEY` is set. If a
|
|
77
|
-
known adapter is not ready, `playbook
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
known adapter is not ready, `playbook` prints its own help text with the
|
|
78
|
+
config path, auth pointers, and agent-swap recipe, then exits without
|
|
79
|
+
launching. You can view the same recovery text at any time:
|
|
80
80
|
|
|
81
81
|
```sh
|
|
82
|
-
playbook
|
|
82
|
+
playbook --help
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
bypass permissions.
|
|
85
|
+
`playbook --list` prints the configured playbooks with their slash
|
|
86
|
+
commands and intents. Every seeded agent — the Captain and both roles —
|
|
87
|
+
runs in cligent's protected auto mode (`permissions.mode: auto`), so
|
|
88
|
+
routine in-session approval prompts are suppressed without switching to
|
|
89
|
+
bypass permissions. The seeded Codex Reviewer additionally grants
|
|
90
|
+
`permissions.writablePaths: [.git]` so git metadata writes stay
|
|
91
|
+
available under the Codex sandbox; the Claude agents need no such grant
|
|
92
|
+
under their auto mode.
|
|
90
93
|
|
|
91
94
|
### Configure agents
|
|
92
95
|
|
|
93
96
|
Edit the seeded user config when you want different coding agents:
|
|
94
97
|
|
|
95
98
|
```sh
|
|
96
|
-
$EDITOR "${XDG_CONFIG_HOME:-$HOME/.config}/playbook/playbook
|
|
99
|
+
$EDITOR "${XDG_CONFIG_HOME:-$HOME/.config}/playbook/playbook.config.yaml"
|
|
97
100
|
```
|
|
98
101
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
`captain
|
|
103
|
-
`
|
|
104
|
-
`
|
|
105
|
-
|
|
106
|
-
the
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
The config is top-level (no `config:` wrapper): a `profiles` map of
|
|
103
|
+
reusable agent settings, a `captain` Judge agent, optional `layout` /
|
|
104
|
+
`notifications` / `theme`, and a `playbooks` map of enabled playbooks. Each
|
|
105
|
+
`captain` or `players.<role>` value is a profile id or an adapter
|
|
106
|
+
shorthand (`claude`, `codex`); other adapter ids are passed through to
|
|
107
|
+
`tmux-play` with a warning because `playbook` cannot preflight their
|
|
108
|
+
auth. Name profiles by their underlying agent/model (e.g. `claude-opus`,
|
|
109
|
+
`codex-gpt`) so the profile ids read distinctly from the `coder` /
|
|
110
|
+
`reviewer` player roles that reference them. Within a `playbooks.<id>` block, `from` (the registry module),
|
|
111
|
+
`command` (an optional slash-command override), and `players` are
|
|
112
|
+
launcher-owned; every other key (e.g. CODE's `committer`) is that
|
|
113
|
+
playbook's option slice. The launcher injects `captain.from` and the
|
|
114
|
+
namespaced `<id>-<role>` host players, so you do not write those by
|
|
115
|
+
hand.
|
|
116
|
+
|
|
117
|
+
CODE's per-run `<coder-llm>` / `<reviewer-llm>` prompt strings come from
|
|
118
|
+
each role's pinned `model`, else its `adapter`
|
|
119
|
+
([PBRT-4](specs/user/playbook-runtime.md#pbrt-4)) — so the Committer's
|
|
110
120
|
commit-message trailers can name the concrete model
|
|
111
|
-
(e.g. `claude-opus-4-8[1m]`) rather than the adapter family
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
or `reviewer` — runs the commit turn; the seeded overlay points it at
|
|
116
|
-
the Coder. Absent the alias the Committer falls back to the Coder
|
|
121
|
+
(e.g. `claude-opus-4-8[1m]`) rather than the adapter family (`claude`).
|
|
122
|
+
`committer` is an optional CODE alias naming which role — `coder` or
|
|
123
|
+
`reviewer` — runs the commit turn; the seeded config points it at the
|
|
124
|
+
Coder, and absent the alias the Committer falls back to the Coder
|
|
117
125
|
([PBRT-8](specs/user/playbook-runtime.md#pbrt-8)).
|
|
118
126
|
|
|
119
|
-
For example, the seeded
|
|
120
|
-
|
|
127
|
+
For example, the seeded config runs the Coder on Claude Opus 4.8 1m and
|
|
128
|
+
the Reviewer on GPT-5.5, with the Committer aliased to the Coder:
|
|
121
129
|
|
|
122
130
|
```yaml
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
coder: # role key must stay `coder` — see PBRT-4
|
|
131
|
+
profiles:
|
|
132
|
+
claude-opus:
|
|
133
|
+
adapter: claude
|
|
134
|
+
model: claude-opus-4-8
|
|
135
|
+
reasoningEffort: high
|
|
136
|
+
permissions:
|
|
137
|
+
mode: auto # protected auto mode for the Claude Captain
|
|
138
|
+
claude-opus-1m:
|
|
132
139
|
adapter: claude
|
|
133
140
|
model: claude-opus-4-8[1m]
|
|
134
141
|
reasoningEffort: xhigh
|
|
135
142
|
permissions:
|
|
136
|
-
mode: auto
|
|
137
|
-
|
|
143
|
+
mode: auto # protected auto mode for the Claude Coder
|
|
144
|
+
codex-gpt:
|
|
138
145
|
adapter: codex
|
|
139
146
|
model: gpt-5.5
|
|
140
147
|
reasoningEffort: xhigh
|
|
@@ -142,17 +149,25 @@ players:
|
|
|
142
149
|
mode: auto
|
|
143
150
|
writablePaths:
|
|
144
151
|
- .git # allow git metadata writes under Codex auto mode
|
|
145
|
-
|
|
152
|
+
|
|
153
|
+
captain: claude-opus
|
|
154
|
+
|
|
155
|
+
playbooks:
|
|
156
|
+
code:
|
|
157
|
+
from: "@sublang/playbook/code/registry"
|
|
158
|
+
players:
|
|
159
|
+
coder: claude-opus-1m
|
|
160
|
+
reviewer: codex-gpt
|
|
161
|
+
committer: coder # which role commits — `coder` or `reviewer`
|
|
146
162
|
```
|
|
147
163
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
[PBCODE-1](specs/user/playbook-code.md#pbcode-1):
|
|
164
|
+
If you need a separate config file for a one-off run, pass a raw
|
|
165
|
+
`tmux-play` config explicitly; this bypasses the seed, composition, and
|
|
166
|
+
readiness gate and forwards the arguments to `tmux-play` verbatim
|
|
167
|
+
([PBCLI-1](specs/user/playbook-cli.md#pbcli-1)):
|
|
153
168
|
|
|
154
169
|
```sh
|
|
155
|
-
playbook
|
|
170
|
+
playbook --config ./tmux-play.config.yaml
|
|
156
171
|
```
|
|
157
172
|
|
|
158
173
|
### Install (contributors / from source)
|
|
@@ -185,17 +200,19 @@ instead, copy
|
|
|
185
200
|
into place; the override is gitignored so it never leaks into a
|
|
186
201
|
production install.
|
|
187
202
|
|
|
188
|
-
Drive a Boss turn against the source tree
|
|
189
|
-
|
|
190
|
-
|
|
203
|
+
Drive a Boss turn against the source tree with the launcher, which
|
|
204
|
+
resolves `tmux-play`, the Playbook Captain shell, and the CODE registry
|
|
205
|
+
from the local package:
|
|
191
206
|
|
|
192
207
|
```sh
|
|
193
|
-
pnpm
|
|
208
|
+
pnpm playbook
|
|
194
209
|
```
|
|
195
210
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
211
|
+
On first run this seeds the generic config at
|
|
212
|
+
`${XDG_CONFIG_HOME:-$HOME/.config}/playbook/playbook.config.yaml`
|
|
213
|
+
(see [Configure agents](#configure-agents)) and launches the composed
|
|
214
|
+
session, so this works whether or not `@sublang/cligent` is installed
|
|
215
|
+
globally.
|
|
199
216
|
|
|
200
217
|
### Running a Boss turn
|
|
201
218
|
|
|
@@ -215,11 +232,12 @@ and streams the CODE state machine with the four-glyph vocabulary `◆ ▸ ⮕
|
|
|
215
232
|
[PBRT-3](specs/user/playbook-runtime.md#pbrt-3), while player prompts
|
|
216
233
|
ride their own panes.
|
|
217
234
|
|
|
218
|
-
Published configs
|
|
219
|
-
`@sublang/playbook/playbook-captain
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
235
|
+
Published configs import the shell adapter from
|
|
236
|
+
`@sublang/playbook/playbook-captain` and enable CODE through a
|
|
237
|
+
`captain.options.playbooks.code` block whose `from` is
|
|
238
|
+
`@sublang/playbook/code/registry`. The generic `playbook` launcher
|
|
239
|
+
composes this for you from the top-level `profiles` / `playbooks`
|
|
240
|
+
config above.
|
|
223
241
|
|
|
224
242
|
### Embedding the runtime in your own host
|
|
225
243
|
|
|
@@ -308,7 +326,7 @@ package.
|
|
|
308
326
|
|
|
309
327
|
## Requirements
|
|
310
328
|
|
|
311
|
-
- Node.js ≥ 20.6.0 (the `playbook
|
|
329
|
+
- Node.js ≥ 20.6.0 (the `playbook` launcher uses
|
|
312
330
|
`import.meta.resolve`, unflagged since this release)
|
|
313
331
|
- pnpm 9 (for the reference package)
|
|
314
332
|
- A configured `tmux-play` host (for live Boss turns) — requires
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sublang/playbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reference CODE playbook — XState v5 FSM, host-agnostic runtime, and Playbook Captain shell for a coder/reviewer/committer loop driven by GEARS spec items.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,17 +46,12 @@
|
|
|
46
46
|
"reference/sdlc/code.playbook/playbook-captain.ts",
|
|
47
47
|
"reference/sdlc/code.playbook/playbook-captain.js",
|
|
48
48
|
"reference/sdlc/code.playbook/playbook-captain.d.ts",
|
|
49
|
-
"reference/sdlc/code.playbook/code.tmux-play.ts",
|
|
50
|
-
"reference/sdlc/code.playbook/code.tmux-play.js",
|
|
51
|
-
"reference/sdlc/code.playbook/code.tmux-play.d.ts",
|
|
52
49
|
"reference/sdlc/code.playbook/code.gears.md",
|
|
53
|
-
"reference/sdlc/code.playbook/
|
|
54
|
-
"reference/sdlc/code.playbook/
|
|
55
|
-
"reference/sdlc/code.playbook/playbook-code.config.template.yaml",
|
|
56
|
-
"reference/sdlc/code.playbook/bin/playbook-code.js"
|
|
50
|
+
"reference/sdlc/code.playbook/playbook.config.template.yaml",
|
|
51
|
+
"reference/sdlc/code.playbook/bin/playbook.js"
|
|
57
52
|
],
|
|
58
53
|
"bin": {
|
|
59
|
-
"playbook
|
|
54
|
+
"playbook": "reference/sdlc/code.playbook/bin/playbook.js"
|
|
60
55
|
},
|
|
61
56
|
"exports": {
|
|
62
57
|
"./runtime": {
|
|
@@ -67,20 +62,20 @@
|
|
|
67
62
|
"types": "./reference/sdlc/code.playbook/code.playbook.d.ts",
|
|
68
63
|
"default": "./reference/sdlc/code.playbook/code.playbook.js"
|
|
69
64
|
},
|
|
65
|
+
"./code/registry": {
|
|
66
|
+
"types": "./reference/sdlc/code.playbook/code.registry.d.ts",
|
|
67
|
+
"default": "./reference/sdlc/code.playbook/code.registry.js"
|
|
68
|
+
},
|
|
70
69
|
"./playbook-captain": {
|
|
71
70
|
"types": "./reference/sdlc/code.playbook/playbook-captain.d.ts",
|
|
72
71
|
"default": "./reference/sdlc/code.playbook/playbook-captain.js"
|
|
73
72
|
},
|
|
74
|
-
"./code/tmux-play": {
|
|
75
|
-
"types": "./reference/sdlc/code.playbook/code.tmux-play.d.ts",
|
|
76
|
-
"default": "./reference/sdlc/code.playbook/code.tmux-play.js"
|
|
77
|
-
},
|
|
78
73
|
"./slc/*": "./slc/*"
|
|
79
74
|
},
|
|
80
75
|
"scripts": {
|
|
81
76
|
"build": "tsc",
|
|
82
77
|
"test": "vitest run",
|
|
83
|
-
"playbook
|
|
78
|
+
"playbook": "node reference/sdlc/code.playbook/bin/playbook.js"
|
|
84
79
|
},
|
|
85
80
|
"publishConfig": {
|
|
86
81
|
"access": "public",
|