@sublang/playbook 0.5.0 → 0.6.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 +20 -9
- package/package.json +13 -3
- package/reference/sdlc/code.playbook/bin/playbook-code.js +50 -20
- package/reference/sdlc/code.playbook/code.fsm.js +16 -8
- package/reference/sdlc/code.playbook/code.fsm.ts +16 -8
- package/reference/sdlc/code.playbook/code.gears.md +16 -8
- package/reference/sdlc/code.playbook/code.registry.d.ts +43 -0
- package/reference/sdlc/code.playbook/code.registry.js +109 -0
- package/reference/sdlc/code.playbook/code.registry.ts +159 -0
- package/reference/sdlc/code.playbook/code.tmux-play.d.ts +2 -4
- package/reference/sdlc/code.playbook/code.tmux-play.js +7 -156
- package/reference/sdlc/code.playbook/code.tmux-play.ts +22 -196
- package/reference/sdlc/code.playbook/playbook-captain.d.ts +21 -0
- package/reference/sdlc/code.playbook/playbook-captain.js +491 -0
- package/reference/sdlc/code.playbook/playbook-captain.ts +701 -0
- package/reference/sdlc/code.playbook/playbook-code.config.template.yaml +13 -4
- package/reference/sdlc/code.playbook/tmux-play.config.yaml +13 -8
- package/reference/sdlc/code.playbook/tmux-play.production.config.yaml +8 -4
package/README.md
CHANGED
|
@@ -36,7 +36,8 @@ The reference is the canonical worked example —
|
|
|
36
36
|
[CODE source](reference/sdlc/code.md) →
|
|
37
37
|
[gears](reference/sdlc/code.playbook/code.gears.md) →
|
|
38
38
|
[FSM](reference/sdlc/code.playbook/code.fsm.ts) → runtime — with
|
|
39
|
-
the runtime
|
|
39
|
+
the runtime registered behind the built-in Playbook Captain shell for
|
|
40
|
+
cligent's `tmux-play` host out of the box.
|
|
40
41
|
The compiled artifacts live under
|
|
41
42
|
[`reference/sdlc/code.playbook/`](reference/sdlc/code.playbook),
|
|
42
43
|
the slc pipeline's `<basename>.<pipeline>/` output directory.
|
|
@@ -100,9 +101,10 @@ passed through to `tmux-play` with a warning because `playbook-code`
|
|
|
100
101
|
does not know how to preflight their auth. The safe tuning points are
|
|
101
102
|
`captain.adapter`, `captain.model`, and each role's `adapter` and
|
|
102
103
|
`model` under `players.coder` / `players.reviewer`. The composer owns
|
|
103
|
-
`captain.from` and
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
`captain.from` and points it at the Playbook Captain shell adapter, and
|
|
105
|
+
it owns the `coder` / `reviewer` role keys, so leave those keys as-is;
|
|
106
|
+
the runtime binds to those host-configuration invariants per
|
|
107
|
+
[PBRT-4](specs/user/playbook-runtime.md#pbrt-4) and derives the
|
|
106
108
|
`<coder-llm>` / `<reviewer-llm>` substitution strings from each role's
|
|
107
109
|
`model` when pinned and `adapter` otherwise — so the Committer's
|
|
108
110
|
commit-message trailers can name the concrete model
|
|
@@ -186,7 +188,7 @@ production install.
|
|
|
186
188
|
|
|
187
189
|
Drive a Boss turn against the source tree (uses the developer
|
|
188
190
|
[`tmux-play.config.yaml`](reference/sdlc/code.playbook/tmux-play.config.yaml)
|
|
189
|
-
that imports the compiled
|
|
191
|
+
that imports the compiled Playbook Captain shell via relative path):
|
|
190
192
|
|
|
191
193
|
```sh
|
|
192
194
|
pnpm exec tmux-play --config reference/sdlc/code.playbook/tmux-play.config.yaml
|
|
@@ -198,7 +200,9 @@ installed globally.
|
|
|
198
200
|
|
|
199
201
|
### Running a Boss turn
|
|
200
202
|
|
|
201
|
-
The Boss pane
|
|
203
|
+
The Boss pane starts at the Playbook Captain shell. Use `/code <task>`
|
|
204
|
+
to explicitly select the CODE playbook, or use ordinary text and let the
|
|
205
|
+
shell route it. Once a turn reaches CODE, the CODE judge classifies it
|
|
202
206
|
into an FSM event (start a coding turn, continue or summarize an IR,
|
|
203
207
|
interrupt to a named state, or nothing) per
|
|
204
208
|
[PBRT-1](specs/user/playbook-runtime.md#pbrt-1).
|
|
@@ -207,9 +211,16 @@ the FSM parks at `awaitBossReply` and the pane shows the question; your
|
|
|
207
211
|
next turn is normally classified as the reply, or a fresh directive
|
|
208
212
|
abandons it ([PBRT-2](specs/user/playbook-runtime.md#pbrt-2)).
|
|
209
213
|
|
|
210
|
-
The Captain pane
|
|
211
|
-
`◆ ▸ ⮕ ⤷` per
|
|
212
|
-
player prompts
|
|
214
|
+
The Captain pane shows `/code` start/stop/finished status with `◇` lines
|
|
215
|
+
and streams the CODE state machine with the four-glyph vocabulary `◆ ▸ ⮕ ⤷` per
|
|
216
|
+
[PBRT-3](specs/user/playbook-runtime.md#pbrt-3), while player prompts
|
|
217
|
+
ride their own panes.
|
|
218
|
+
|
|
219
|
+
Published configs should import the shell adapter from
|
|
220
|
+
`@sublang/playbook/playbook-captain`. Existing explicit configs that
|
|
221
|
+
still import `@sublang/playbook/code/tmux-play` keep resolving through
|
|
222
|
+
a compatibility shim that delegates to the same shell with CODE
|
|
223
|
+
registered.
|
|
213
224
|
|
|
214
225
|
### Embedding the runtime in your own host
|
|
215
226
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sublang/playbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Reference CODE playbook — XState v5 FSM, host-agnostic runtime, and
|
|
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",
|
|
7
7
|
"homepage": "https://github.com/sublang-ai/playbook#readme",
|
|
8
8
|
"repository": {
|
|
@@ -34,6 +34,12 @@
|
|
|
34
34
|
"reference/sdlc/code.playbook/code.playbook.ts",
|
|
35
35
|
"reference/sdlc/code.playbook/code.playbook.js",
|
|
36
36
|
"reference/sdlc/code.playbook/code.playbook.d.ts",
|
|
37
|
+
"reference/sdlc/code.playbook/code.registry.ts",
|
|
38
|
+
"reference/sdlc/code.playbook/code.registry.js",
|
|
39
|
+
"reference/sdlc/code.playbook/code.registry.d.ts",
|
|
40
|
+
"reference/sdlc/code.playbook/playbook-captain.ts",
|
|
41
|
+
"reference/sdlc/code.playbook/playbook-captain.js",
|
|
42
|
+
"reference/sdlc/code.playbook/playbook-captain.d.ts",
|
|
37
43
|
"reference/sdlc/code.playbook/code.tmux-play.ts",
|
|
38
44
|
"reference/sdlc/code.playbook/code.tmux-play.js",
|
|
39
45
|
"reference/sdlc/code.playbook/code.tmux-play.d.ts",
|
|
@@ -51,6 +57,10 @@
|
|
|
51
57
|
"types": "./reference/sdlc/code.playbook/code.playbook.d.ts",
|
|
52
58
|
"default": "./reference/sdlc/code.playbook/code.playbook.js"
|
|
53
59
|
},
|
|
60
|
+
"./playbook-captain": {
|
|
61
|
+
"types": "./reference/sdlc/code.playbook/playbook-captain.d.ts",
|
|
62
|
+
"default": "./reference/sdlc/code.playbook/playbook-captain.js"
|
|
63
|
+
},
|
|
54
64
|
"./code/tmux-play": {
|
|
55
65
|
"types": "./reference/sdlc/code.playbook/code.tmux-play.d.ts",
|
|
56
66
|
"default": "./reference/sdlc/code.playbook/code.tmux-play.js"
|
|
@@ -67,7 +77,7 @@
|
|
|
67
77
|
},
|
|
68
78
|
"dependencies": {
|
|
69
79
|
"@anthropic-ai/claude-agent-sdk": "^0.3.143",
|
|
70
|
-
"@openai/codex-sdk": "^0.
|
|
80
|
+
"@openai/codex-sdk": "^0.139.0",
|
|
71
81
|
"@sublang/cligent": "latest",
|
|
72
82
|
"xstate": "^5.19.4",
|
|
73
83
|
"yaml": "^2.9.0"
|
|
@@ -21,17 +21,30 @@ import {
|
|
|
21
21
|
findTmuxPlayConfig,
|
|
22
22
|
loadTmuxPlayConfig,
|
|
23
23
|
} from '@sublang/cligent/tmux-play';
|
|
24
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
parse as parseYaml,
|
|
26
|
+
parseDocument as parseYamlDocument,
|
|
27
|
+
stringify as stringifyYaml,
|
|
28
|
+
} from 'yaml';
|
|
25
29
|
|
|
26
30
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
27
31
|
const templatePath = resolve(here, '..', 'playbook-code.config.template.yaml');
|
|
28
32
|
const READINESS_FAILURE_EXIT_CODE = 2;
|
|
29
33
|
const COMPOSITION_FAILURE_EXIT_CODE = 1;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
const DEFAULT_NOTIFICATION_BLOCK = [
|
|
35
|
+
'',
|
|
36
|
+
'# tmux-play host notifications. Omitted turn_aborted resolves to off.',
|
|
37
|
+
'notifications:',
|
|
38
|
+
' player_finished: bell',
|
|
39
|
+
' turn_finished: desktop',
|
|
40
|
+
'',
|
|
41
|
+
].join('\n');
|
|
42
|
+
|
|
43
|
+
// PBCODE-16: the composer injects `captain.from` (the Playbook
|
|
44
|
+
// Captain shell adapter module) and the `coder` / `reviewer` player
|
|
45
|
+
// ids, so the user-edited overlay carries neither.
|
|
46
|
+
export const PLAYBOOK_CAPTAIN_MODULE = '@sublang/playbook/playbook-captain';
|
|
47
|
+
export const CODE_ADAPTER_MODULE = PLAYBOOK_CAPTAIN_MODULE;
|
|
35
48
|
const CODE_ROLES = ['coder', 'reviewer'];
|
|
36
49
|
// Accepted `players` keys: the two fixed CODE roles plus the optional
|
|
37
50
|
// `committer` alias (a string naming one of the roles); PBCODE-17.
|
|
@@ -66,6 +79,7 @@ export async function runPlaybookCodeCli(options = {}) {
|
|
|
66
79
|
}
|
|
67
80
|
|
|
68
81
|
seedUserConfigIfMissing(userConfigPath, stderr);
|
|
82
|
+
migrateUserConfigNotificationsIfMissing(userConfigPath, stderr);
|
|
69
83
|
|
|
70
84
|
// PBCODE-16/17: compose the launched config from the overlay plus an
|
|
71
85
|
// optional base tmux-play config. Composition failures (missing role,
|
|
@@ -139,17 +153,6 @@ async function composeLaunchConfig({ overlayPath, cwd, configHome }) {
|
|
|
139
153
|
let base;
|
|
140
154
|
if (basePath) {
|
|
141
155
|
base = (await loadTmuxPlayConfig({ configPath: basePath })).config;
|
|
142
|
-
// cligent's loader normalizes a discovered base to captain / players
|
|
143
|
-
// / theme and drops host fields it does not model yet — notably
|
|
144
|
-
// `layout`. Recover a base `layout` from the raw base YAML so base
|
|
145
|
-
// inheritance (PBCODE-16/17) holds; the `=== undefined` guard makes
|
|
146
|
-
// this inert once a future loader preserves `layout` itself.
|
|
147
|
-
if (base && base.layout === undefined) {
|
|
148
|
-
const rawBase = parseYaml(readFileSync(basePath, 'utf8'));
|
|
149
|
-
if (isObject(rawBase) && rawBase.layout !== undefined) {
|
|
150
|
-
base.layout = rawBase.layout;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
156
|
}
|
|
154
157
|
return composeRuntimeConfig(overlay, base);
|
|
155
158
|
}
|
|
@@ -163,7 +166,7 @@ async function composeLaunchConfig({ overlayPath, cwd, configHome }) {
|
|
|
163
166
|
export function composeRuntimeConfig(
|
|
164
167
|
overlay,
|
|
165
168
|
base,
|
|
166
|
-
adapterModule =
|
|
169
|
+
adapterModule = PLAYBOOK_CAPTAIN_MODULE,
|
|
167
170
|
) {
|
|
168
171
|
const overlayConfig = requireObject(overlay, 'config');
|
|
169
172
|
const overlayPlayers = requireObject(overlayConfig.players, 'players');
|
|
@@ -256,13 +259,15 @@ export function composeRuntimeConfig(
|
|
|
256
259
|
captain.options = { code };
|
|
257
260
|
}
|
|
258
261
|
|
|
259
|
-
// Inherit
|
|
260
|
-
// them; never the base `players[]` roster.
|
|
262
|
+
// Inherit host-owned top-level fields from the base when the overlay
|
|
263
|
+
// omits them; never the base `players[]` roster.
|
|
261
264
|
const composed = {};
|
|
262
265
|
const theme = overlayConfig.theme ?? base?.theme;
|
|
263
266
|
if (theme !== undefined) composed.theme = theme;
|
|
264
267
|
const layout = overlayConfig.layout ?? base?.layout;
|
|
265
268
|
if (layout !== undefined) composed.layout = layout;
|
|
269
|
+
const notifications = overlayConfig.notifications ?? base?.notifications;
|
|
270
|
+
if (notifications !== undefined) composed.notifications = notifications;
|
|
266
271
|
composed.captain = captain;
|
|
267
272
|
composed.players = players;
|
|
268
273
|
return composed;
|
|
@@ -317,6 +322,27 @@ function seedUserConfigIfMissing(userConfigPath, stderr) {
|
|
|
317
322
|
stderr.write(`playbook-code: created config at ${userConfigPath}\n`);
|
|
318
323
|
}
|
|
319
324
|
|
|
325
|
+
function migrateUserConfigNotificationsIfMissing(userConfigPath, stderr) {
|
|
326
|
+
const source = readFileSync(userConfigPath, 'utf8');
|
|
327
|
+
let parsed;
|
|
328
|
+
try {
|
|
329
|
+
const document = parseYamlDocument(source);
|
|
330
|
+
if (document.errors.length > 0) return;
|
|
331
|
+
parsed = document.contents === null ? {} : document.toJS();
|
|
332
|
+
} catch {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
if (!isObject(parsed) || hasOwn(parsed, 'notifications')) return;
|
|
336
|
+
const separator = source.endsWith('\n') ? '' : '\n';
|
|
337
|
+
writeFileSync(
|
|
338
|
+
userConfigPath,
|
|
339
|
+
`${source}${separator}${DEFAULT_NOTIFICATION_BLOCK}`,
|
|
340
|
+
);
|
|
341
|
+
stderr.write(
|
|
342
|
+
`playbook-code: added notifications defaults to config at ${userConfigPath}\n`,
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
320
346
|
function hasExplicitConfig(argv) {
|
|
321
347
|
return argv.some((arg) => arg === '--config' || arg.startsWith('--config='));
|
|
322
348
|
}
|
|
@@ -393,6 +419,10 @@ function isObject(value) {
|
|
|
393
419
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
394
420
|
}
|
|
395
421
|
|
|
422
|
+
function hasOwn(value, key) {
|
|
423
|
+
return Object.prototype.hasOwnProperty.call(value, key);
|
|
424
|
+
}
|
|
425
|
+
|
|
396
426
|
function requireObject(value, path) {
|
|
397
427
|
if (!isObject(value)) {
|
|
398
428
|
throw new Error(`${path} must be an object`);
|
|
@@ -498,8 +498,9 @@ export const codingMachine = setup({
|
|
|
498
498
|
'Verify any affected spec items are:',
|
|
499
499
|
'',
|
|
500
500
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
501
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
501
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
502
502
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
503
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
503
504
|
'',
|
|
504
505
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
505
506
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -581,8 +582,9 @@ export const codingMachine = setup({
|
|
|
581
582
|
'Verify any affected spec items are:',
|
|
582
583
|
'',
|
|
583
584
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
584
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
585
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
585
586
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
587
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
586
588
|
'',
|
|
587
589
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
588
590
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -628,8 +630,9 @@ export const codingMachine = setup({
|
|
|
628
630
|
'Verify any affected spec items are:',
|
|
629
631
|
'',
|
|
630
632
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
631
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
633
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
632
634
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
635
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
633
636
|
'',
|
|
634
637
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
635
638
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -713,8 +716,9 @@ export const codingMachine = setup({
|
|
|
713
716
|
'Verify any affected spec items are:',
|
|
714
717
|
'',
|
|
715
718
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
716
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
719
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
717
720
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
721
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
718
722
|
'',
|
|
719
723
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
720
724
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -758,8 +762,9 @@ export const codingMachine = setup({
|
|
|
758
762
|
'Verify any affected spec items are:',
|
|
759
763
|
'',
|
|
760
764
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
761
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
765
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
762
766
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
767
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
763
768
|
'',
|
|
764
769
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
765
770
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -843,8 +848,9 @@ export const codingMachine = setup({
|
|
|
843
848
|
'Verify any affected spec items are:',
|
|
844
849
|
'',
|
|
845
850
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
846
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
851
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
847
852
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
853
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
848
854
|
'',
|
|
849
855
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
850
856
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -892,8 +898,9 @@ export const codingMachine = setup({
|
|
|
892
898
|
'Verify any affected spec items are:',
|
|
893
899
|
'',
|
|
894
900
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
895
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
901
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
896
902
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
903
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
897
904
|
'',
|
|
898
905
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
899
906
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -983,8 +990,9 @@ export const codingMachine = setup({
|
|
|
983
990
|
'Verify any affected spec items are:',
|
|
984
991
|
'',
|
|
985
992
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
986
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
993
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
987
994
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
995
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
988
996
|
'',
|
|
989
997
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
990
998
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -712,8 +712,9 @@ export const codingMachine = setup({
|
|
|
712
712
|
'Verify any affected spec items are:',
|
|
713
713
|
'',
|
|
714
714
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
715
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
715
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
716
716
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
717
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
717
718
|
'',
|
|
718
719
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
719
720
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -801,8 +802,9 @@ export const codingMachine = setup({
|
|
|
801
802
|
'Verify any affected spec items are:',
|
|
802
803
|
'',
|
|
803
804
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
804
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
805
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
805
806
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
807
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
806
808
|
'',
|
|
807
809
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
808
810
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -851,8 +853,9 @@ export const codingMachine = setup({
|
|
|
851
853
|
'Verify any affected spec items are:',
|
|
852
854
|
'',
|
|
853
855
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
854
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
856
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
855
857
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
858
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
856
859
|
'',
|
|
857
860
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
858
861
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -942,8 +945,9 @@ export const codingMachine = setup({
|
|
|
942
945
|
'Verify any affected spec items are:',
|
|
943
946
|
'',
|
|
944
947
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
945
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
948
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
946
949
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
950
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
947
951
|
'',
|
|
948
952
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
949
953
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -990,8 +994,9 @@ export const codingMachine = setup({
|
|
|
990
994
|
'Verify any affected spec items are:',
|
|
991
995
|
'',
|
|
992
996
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
993
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
997
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
994
998
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
999
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
995
1000
|
'',
|
|
996
1001
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
997
1002
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -1081,8 +1086,9 @@ export const codingMachine = setup({
|
|
|
1081
1086
|
'Verify any affected spec items are:',
|
|
1082
1087
|
'',
|
|
1083
1088
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
1084
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1089
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1085
1090
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
1091
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
1086
1092
|
'',
|
|
1087
1093
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
1088
1094
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -1133,8 +1139,9 @@ export const codingMachine = setup({
|
|
|
1133
1139
|
'Verify any affected spec items are:',
|
|
1134
1140
|
'',
|
|
1135
1141
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
1136
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1142
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1137
1143
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
1144
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
1138
1145
|
'',
|
|
1139
1146
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
1140
1147
|
'For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.',
|
|
@@ -1232,8 +1239,9 @@ export const codingMachine = setup({
|
|
|
1232
1239
|
'Verify any affected spec items are:',
|
|
1233
1240
|
'',
|
|
1234
1241
|
'- Complete & coherent: sufficient for you to reimplement code.',
|
|
1235
|
-
'- Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1242
|
+
'- Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.',
|
|
1236
1243
|
'- Minimal: essential and concise; every item earns its place; also check with other items.',
|
|
1244
|
+
'- Well organized: spec packages are finely scoped, with high cohesion and low coupling.',
|
|
1237
1245
|
'',
|
|
1238
1246
|
'Flag anything missing, redundant, over-specified, or under-specified.',
|
|
1239
1247
|
'Flag any issues or improvements (numbered; no duplication).',
|
|
@@ -65,8 +65,9 @@ When Committer commits Initial Changes from a Boss coding intent involving chang
|
|
|
65
65
|
> Verify any affected spec items are:
|
|
66
66
|
>
|
|
67
67
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
68
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
68
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
69
69
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
70
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
70
71
|
>
|
|
71
72
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
72
73
|
> For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.
|
|
@@ -94,8 +95,9 @@ When Committer commits Initial Changes from a Boss coding intent involving chang
|
|
|
94
95
|
> Verify any affected spec items are:
|
|
95
96
|
>
|
|
96
97
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
97
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
98
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
98
99
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
100
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
99
101
|
>
|
|
100
102
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
101
103
|
> Flag any issues or improvements (numbered; no duplication).
|
|
@@ -113,8 +115,9 @@ When Committer commits Initial Changes from an IR task involving changes only in
|
|
|
113
115
|
> Verify any affected spec items are:
|
|
114
116
|
>
|
|
115
117
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
116
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
118
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
117
119
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
120
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
118
121
|
>
|
|
119
122
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
120
123
|
> For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.
|
|
@@ -142,8 +145,9 @@ When Committer commits Initial Changes from an IR task involving changes both in
|
|
|
142
145
|
> Verify any affected spec items are:
|
|
143
146
|
>
|
|
144
147
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
145
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
148
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
146
149
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
150
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
147
151
|
>
|
|
148
152
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
149
153
|
> Flag any issues or improvements (numbered; no duplication).
|
|
@@ -161,8 +165,9 @@ When Coder makes unreviewed changes (outside of any Initial Changes) involving c
|
|
|
161
165
|
> Verify any affected spec items are:
|
|
162
166
|
>
|
|
163
167
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
164
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
168
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
165
169
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
170
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
166
171
|
>
|
|
167
172
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
168
173
|
> For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.
|
|
@@ -190,8 +195,9 @@ When Coder makes unreviewed changes (outside of any Initial Changes) involving c
|
|
|
190
195
|
> Verify any affected spec items are:
|
|
191
196
|
>
|
|
192
197
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
193
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
198
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
194
199
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
200
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
195
201
|
>
|
|
196
202
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
197
203
|
> Flag any issues or improvements (numbered; no duplication).
|
|
@@ -215,8 +221,9 @@ When Coder makes unreviewed changes (outside of any Initial Changes) involving c
|
|
|
215
221
|
> Verify any affected spec items are:
|
|
216
222
|
>
|
|
217
223
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
218
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
224
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
219
225
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
226
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
220
227
|
>
|
|
221
228
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
222
229
|
> For context discovery, @specs/map.md indexes all spec files and @specs/meta.md describes the spec format.
|
|
@@ -246,8 +253,9 @@ When Coder makes unreviewed changes (outside of any Initial Changes) involving c
|
|
|
246
253
|
> Verify any affected spec items are:
|
|
247
254
|
>
|
|
248
255
|
> - Complete & coherent: sufficient for you to reimplement code.
|
|
249
|
-
> - Right level: user requirements (in @specs/user) or behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
256
|
+
> - Right level: user requirements (in @specs/user) or system behavior (in @specs/dev), not implementation specifics; integration/system testing (in @specs/test), not unit testing.
|
|
250
257
|
> - Minimal: essential and concise; every item earns its place; also check with other items.
|
|
258
|
+
> - Well organized: spec packages are finely scoped, with high cohesion and low coupling.
|
|
251
259
|
>
|
|
252
260
|
> Flag anything missing, redundant, over-specified, or under-specified.
|
|
253
261
|
> Flag any issues or improvements (numbered; no duplication).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type CodePlaybookOptions, type PlaybookRuntime } from './code.playbook.js';
|
|
2
|
+
export declare const codeCopyPasteGuardNames: readonly ["accepted", "approved", "challengeAccepted", "challengeRejected", "challengesRaised", "changesMadeCode", "changesMadeCodeAndChallenged", "changesMadeMixed", "changesMadeMixedAndChallenged", "changesMadeSpecs", "changesMadeSpecsAndChallenged", "hasFindings", "needsRevision", "noFindings", "noOpenItems"];
|
|
3
|
+
export declare const codeStateCountLabels: {
|
|
4
|
+
readonly adjudicateChallenges: "rebuttal";
|
|
5
|
+
readonly reviewBossCommitSpecs: "review round";
|
|
6
|
+
readonly reviewBossCommitCode: "review round";
|
|
7
|
+
readonly reviewBossCommitMixed: "review round";
|
|
8
|
+
readonly reviewIrTaskCommitSpecs: "review round";
|
|
9
|
+
readonly reviewIrTaskCommitCode: "review round";
|
|
10
|
+
readonly reviewIrTaskCommitMixed: "review round";
|
|
11
|
+
readonly reviewChangesSpecs: "review round";
|
|
12
|
+
readonly reviewChangesCode: "review round";
|
|
13
|
+
readonly reviewChangesMixed: "review round";
|
|
14
|
+
readonly reviewChangesAndChallengesSpecs: "review round";
|
|
15
|
+
readonly reviewChangesAndChallengesCode: "review round";
|
|
16
|
+
readonly reviewChangesAndChallengesMixed: "review round";
|
|
17
|
+
};
|
|
18
|
+
export interface CodeOptions {
|
|
19
|
+
committer?: 'coder' | 'reviewer';
|
|
20
|
+
}
|
|
21
|
+
export interface RegistryPlayer {
|
|
22
|
+
id: string;
|
|
23
|
+
adapter?: string;
|
|
24
|
+
model?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateCodeRuntimeOptions {
|
|
27
|
+
captainOptions: unknown;
|
|
28
|
+
players: readonly RegistryPlayer[];
|
|
29
|
+
}
|
|
30
|
+
export interface CodePlaybookRegistryEntry {
|
|
31
|
+
id: 'code';
|
|
32
|
+
command: 'code';
|
|
33
|
+
intent: string;
|
|
34
|
+
idleStateId: 'ready';
|
|
35
|
+
finalStateId: 'done';
|
|
36
|
+
copyPasteGuardNames: readonly string[];
|
|
37
|
+
stateCountLabels: typeof codeStateCountLabels;
|
|
38
|
+
validateOptions(captainOptions: unknown): CodeOptions;
|
|
39
|
+
createRuntime(options: CreateCodeRuntimeOptions): PlaybookRuntime;
|
|
40
|
+
}
|
|
41
|
+
export declare function validateCodeOptions(captainOptions: unknown): CodeOptions;
|
|
42
|
+
export declare function createCodeRuntimeOptions({ captainOptions, players, }: CreateCodeRuntimeOptions): CodePlaybookOptions;
|
|
43
|
+
export declare const codePlaybookRegistryEntry: CodePlaybookRegistryEntry;
|