@sublang/playbook 0.7.0 → 0.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/README.md +16 -15
- package/package.json +2 -2
- package/reference/sdlc/code.playbook/bin/playbook-code.js +36 -2
- package/reference/sdlc/code.playbook/playbook-code.config.template.yaml +9 -9
- package/reference/sdlc/code.playbook/tmux-play.config.yaml +7 -2
- package/reference/sdlc/code.playbook/tmux-play.production.config.yaml +7 -2
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ playbook-code --help
|
|
|
84
84
|
|
|
85
85
|
The seed template runs each agent in cligent's protected auto mode
|
|
86
86
|
(`permissions.mode: auto`), suppressing routine approval prompts. Its
|
|
87
|
-
Codex
|
|
87
|
+
Codex Reviewer also grants `permissions.writablePaths: [.git]` so git
|
|
88
88
|
metadata writes stay available under auto mode without switching to
|
|
89
89
|
bypass permissions.
|
|
90
90
|
|
|
@@ -108,40 +108,41 @@ the runtime binds to those host-configuration invariants per
|
|
|
108
108
|
`<coder-llm>` / `<reviewer-llm>` substitution strings from each role's
|
|
109
109
|
`model` when pinned and `adapter` otherwise — so the Committer's
|
|
110
110
|
commit-message trailers can name the concrete model
|
|
111
|
-
(e.g. `claude-opus-4-8`) rather than the adapter family
|
|
111
|
+
(e.g. `claude-opus-4-8[1m]`) rather than the adapter family
|
|
112
|
+
(`claude`).
|
|
112
113
|
|
|
113
114
|
`players.committer` is an optional alias naming which role — `coder`
|
|
114
115
|
or `reviewer` — runs the commit turn; the seeded overlay points it at
|
|
115
|
-
the
|
|
116
|
+
the Coder. Absent the alias the Committer falls back to the Coder
|
|
116
117
|
([PBRT-8](specs/user/playbook-runtime.md#pbrt-8)).
|
|
117
118
|
|
|
118
|
-
For example, the seeded overlay runs the Coder on
|
|
119
|
-
Reviewer on
|
|
119
|
+
For example, the seeded overlay runs the Coder on Claude Opus 4.8 1m
|
|
120
|
+
and the Reviewer on GPT-5.5, with the Committer aliased to the Coder:
|
|
120
121
|
|
|
121
122
|
```yaml
|
|
122
123
|
captain:
|
|
123
124
|
adapter: claude
|
|
124
|
-
model: claude-
|
|
125
|
+
model: claude-opus-4-8
|
|
125
126
|
reasoningEffort: high
|
|
126
127
|
permissions:
|
|
127
128
|
mode: auto
|
|
128
129
|
|
|
129
130
|
players:
|
|
130
131
|
coder: # role key must stay `coder` — see PBRT-4
|
|
131
|
-
adapter:
|
|
132
|
-
model:
|
|
132
|
+
adapter: claude
|
|
133
|
+
model: claude-opus-4-8[1m]
|
|
133
134
|
reasoningEffort: xhigh
|
|
134
135
|
permissions:
|
|
135
136
|
mode: auto
|
|
136
|
-
writablePaths:
|
|
137
|
-
- .git # allow git metadata writes under Codex auto mode
|
|
138
137
|
reviewer: # role key must stay `reviewer` — see PBRT-4
|
|
139
|
-
adapter:
|
|
140
|
-
model:
|
|
138
|
+
adapter: codex
|
|
139
|
+
model: gpt-5.5
|
|
141
140
|
reasoningEffort: xhigh
|
|
142
141
|
permissions:
|
|
143
142
|
mode: auto
|
|
144
|
-
|
|
143
|
+
writablePaths:
|
|
144
|
+
- .git # allow git metadata writes under Codex auto mode
|
|
145
|
+
committer: coder # which role commits — `coder` or `reviewer`
|
|
145
146
|
```
|
|
146
147
|
|
|
147
148
|
Normal `playbook-code` runs use the seeded path above. If you need a
|
|
@@ -170,8 +171,8 @@ pnpm test
|
|
|
170
171
|
in the checked-in `pnpm-lock.yaml` — the same version CI installs
|
|
171
172
|
via `--frozen-lockfile`, so contributor checkouts and CI agree.
|
|
172
173
|
The published `package.json` declares `@sublang/cligent` as
|
|
173
|
-
`^0.
|
|
174
|
-
install -g @sublang/playbook`) resolves a compatible cligent 0.
|
|
174
|
+
`^0.13.0`, so an end-user install with no lockfile (e.g., `npm
|
|
175
|
+
install -g @sublang/playbook`) resolves a compatible cligent 0.13.x
|
|
175
176
|
release (see [RELEASE-14](specs/dev/release.md#release-14)). To
|
|
176
177
|
refresh the contributor pin within that range, run
|
|
177
178
|
`pnpm update @sublang/cligent` and commit the resulting
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sublang/playbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@anthropic-ai/claude-agent-sdk": "^0.3.143",
|
|
91
91
|
"@openai/codex-sdk": "^0.139.0",
|
|
92
|
-
"@sublang/cligent": "^0.
|
|
92
|
+
"@sublang/cligent": "^0.13.0",
|
|
93
93
|
"xstate": "^5.19.4",
|
|
94
94
|
"yaml": "^2.9.0"
|
|
95
95
|
},
|
|
@@ -264,8 +264,15 @@ export function composeRuntimeConfig(
|
|
|
264
264
|
const composed = {};
|
|
265
265
|
const theme = overlayConfig.theme ?? base?.theme;
|
|
266
266
|
if (theme !== undefined) composed.theme = theme;
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
// PBCODE-16/17: an overlay `layout` is the user's own tmux-play layout
|
|
268
|
+
// and is carried through verbatim; a base-inherited `layout` is
|
|
269
|
+
// reconciled so it round-trips onto the composed coder + reviewer roster
|
|
270
|
+
// (cligent normalizes the base layout to the base config's own roster).
|
|
271
|
+
if (overlayConfig.layout !== undefined) {
|
|
272
|
+
composed.layout = overlayConfig.layout;
|
|
273
|
+
} else if (base?.layout !== undefined) {
|
|
274
|
+
composed.layout = composeInheritedLayout(base.layout);
|
|
275
|
+
}
|
|
269
276
|
const notifications = overlayConfig.notifications ?? base?.notifications;
|
|
270
277
|
if (notifications !== undefined) composed.notifications = notifications;
|
|
271
278
|
composed.captain = captain;
|
|
@@ -273,6 +280,33 @@ export function composeRuntimeConfig(
|
|
|
273
280
|
return composed;
|
|
274
281
|
}
|
|
275
282
|
|
|
283
|
+
// PBCODE-17: reconcile a base-inherited `layout` so it round-trips onto
|
|
284
|
+
// the composed `coder` + `reviewer` roster. cligent's loaded base `layout`
|
|
285
|
+
// is normalized to the base config's own roster and shape: `initialVisible`
|
|
286
|
+
// names the base config's players (cligent rejects ids outside the composed
|
|
287
|
+
// roster) and the normalized output carries both the `columnWeights` alias
|
|
288
|
+
// and the canonical `singlePlayerColumnWeights` / `multiPlayerColumnWeights`
|
|
289
|
+
// (cligent emits the pair on load but rejects it on reload). Drop
|
|
290
|
+
// `initialVisible` — CODE shows its full composed roster, which cligent
|
|
291
|
+
// restores when the field is omitted — and drop the `columnWeights` alias
|
|
292
|
+
// whenever the canonical field for the alias's shape is present, carrying
|
|
293
|
+
// window and weights through otherwise. An overlay `layout` is the user's
|
|
294
|
+
// own and is not reconciled.
|
|
295
|
+
function composeInheritedLayout(layout) {
|
|
296
|
+
if (!isObject(layout)) return layout;
|
|
297
|
+
const result = { ...layout };
|
|
298
|
+
delete result.initialVisible;
|
|
299
|
+
const alias = result.columnWeights;
|
|
300
|
+
if (Array.isArray(alias)) {
|
|
301
|
+
const conflictsSingle =
|
|
302
|
+
alias.length === 2 && result.singlePlayerColumnWeights !== undefined;
|
|
303
|
+
const conflictsMulti =
|
|
304
|
+
alias.length === 3 && result.multiPlayerColumnWeights !== undefined;
|
|
305
|
+
if (conflictsSingle || conflictsMulti) delete result.columnWeights;
|
|
306
|
+
}
|
|
307
|
+
return result;
|
|
308
|
+
}
|
|
309
|
+
|
|
276
310
|
export function adaptersFromComposedConfig(config) {
|
|
277
311
|
const adapters = new Set();
|
|
278
312
|
const captainAdapter = config?.captain?.adapter;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
# instead of requiring bypass permissions.
|
|
28
28
|
# - players.committer optionally aliases the Committer to a role
|
|
29
29
|
# (coder or reviewer); that role's pane runs the commit turn. The
|
|
30
|
-
# seeded value is
|
|
30
|
+
# seeded value is coder; omitting it uses the same Coder fallback.
|
|
31
31
|
# - layout sizes the tmux window (layout.window: columns × rows) and
|
|
32
32
|
# sets the relative column widths (layout.columnWeights) for the
|
|
33
33
|
# Boss/Captain, Coder, and Reviewer columns.
|
|
@@ -49,24 +49,24 @@ notifications:
|
|
|
49
49
|
|
|
50
50
|
captain:
|
|
51
51
|
adapter: claude
|
|
52
|
-
model: claude-
|
|
52
|
+
model: claude-opus-4-8
|
|
53
53
|
reasoningEffort: high
|
|
54
54
|
permissions:
|
|
55
55
|
mode: auto
|
|
56
56
|
|
|
57
57
|
players:
|
|
58
58
|
coder:
|
|
59
|
-
adapter:
|
|
60
|
-
model:
|
|
59
|
+
adapter: claude
|
|
60
|
+
model: claude-opus-4-8[1m]
|
|
61
61
|
reasoningEffort: xhigh
|
|
62
62
|
permissions:
|
|
63
63
|
mode: auto
|
|
64
|
-
writablePaths:
|
|
65
|
-
- .git
|
|
66
64
|
reviewer:
|
|
67
|
-
adapter:
|
|
68
|
-
model:
|
|
65
|
+
adapter: codex
|
|
66
|
+
model: gpt-5.5
|
|
69
67
|
reasoningEffort: xhigh
|
|
70
68
|
permissions:
|
|
71
69
|
mode: auto
|
|
72
|
-
|
|
70
|
+
writablePaths:
|
|
71
|
+
- .git
|
|
72
|
+
committer: coder
|
|
@@ -19,12 +19,15 @@ captain:
|
|
|
19
19
|
# shim that delegates to the same shell with CODE registered.
|
|
20
20
|
from: ./playbook-captain.js
|
|
21
21
|
adapter: claude
|
|
22
|
-
model: claude-
|
|
22
|
+
model: claude-opus-4-8
|
|
23
23
|
reasoningEffort: high
|
|
24
24
|
# Agents run in cligent's classifier/reviewer-protected auto mode
|
|
25
25
|
# (cligent DR-005): claude → permissionMode auto, codex → auto_review.
|
|
26
26
|
permissions:
|
|
27
27
|
mode: auto
|
|
28
|
+
options:
|
|
29
|
+
code:
|
|
30
|
+
committer: coder
|
|
28
31
|
|
|
29
32
|
# `players[].id` shall match the baked playerId strings the adapter
|
|
30
33
|
# routes to. The CODE playbook bakes Coder→'coder' and
|
|
@@ -38,7 +41,7 @@ captain:
|
|
|
38
41
|
players:
|
|
39
42
|
- id: coder
|
|
40
43
|
adapter: claude
|
|
41
|
-
model: claude-opus-4-
|
|
44
|
+
model: claude-opus-4-8[1m]
|
|
42
45
|
reasoningEffort: xhigh
|
|
43
46
|
permissions:
|
|
44
47
|
mode: auto
|
|
@@ -48,3 +51,5 @@ players:
|
|
|
48
51
|
reasoningEffort: xhigh
|
|
49
52
|
permissions:
|
|
50
53
|
mode: auto
|
|
54
|
+
writablePaths:
|
|
55
|
+
- .git
|
|
@@ -13,15 +13,18 @@ notifications:
|
|
|
13
13
|
captain:
|
|
14
14
|
from: "@sublang/playbook/playbook-captain"
|
|
15
15
|
adapter: claude
|
|
16
|
-
model: claude-
|
|
16
|
+
model: claude-opus-4-8
|
|
17
17
|
reasoningEffort: high
|
|
18
18
|
permissions:
|
|
19
19
|
mode: auto
|
|
20
|
+
options:
|
|
21
|
+
code:
|
|
22
|
+
committer: coder
|
|
20
23
|
|
|
21
24
|
players:
|
|
22
25
|
- id: coder
|
|
23
26
|
adapter: claude
|
|
24
|
-
model: claude-opus-4-
|
|
27
|
+
model: claude-opus-4-8[1m]
|
|
25
28
|
reasoningEffort: xhigh
|
|
26
29
|
permissions:
|
|
27
30
|
mode: auto
|
|
@@ -31,3 +34,5 @@ players:
|
|
|
31
34
|
reasoningEffort: xhigh
|
|
32
35
|
permissions:
|
|
33
36
|
mode: auto
|
|
37
|
+
writablePaths:
|
|
38
|
+
- .git
|