@sublang/playbook 15.0.0 → 16.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/README.md +1 -1
- package/docs/embedding.md +9 -7
- package/package.json +3 -1
- package/reference/sdlc/branch.playbook/branch.fsm.d.ts +63 -33
- package/reference/sdlc/branch.playbook/branch.fsm.js +190 -108
- package/reference/sdlc/branch.playbook/branch.fsm.ts +269 -147
- package/reference/sdlc/branch.playbook/branch.gears.md +7 -17
- package/reference/sdlc/branch.playbook/branch.playbook.d.ts +12 -16
- package/reference/sdlc/branch.playbook/branch.playbook.js +112 -101
- package/reference/sdlc/branch.playbook/branch.playbook.ts +128 -171
- package/reference/sdlc/branch.playbook/branch.registry.d.ts +3 -2
- package/reference/sdlc/branch.playbook/branch.registry.ts +6 -2
- package/reference/sdlc/code.playbook/bin/repository-effects.js +54 -13
- package/reference/sdlc/code.playbook/code.fsm.d.ts +143 -90
- package/reference/sdlc/code.playbook/code.fsm.introspect.d.ts +8 -8
- package/reference/sdlc/code.playbook/code.fsm.introspect.ts +13 -13
- package/reference/sdlc/code.playbook/code.fsm.js +609 -649
- package/reference/sdlc/code.playbook/code.fsm.ts +890 -821
- package/reference/sdlc/code.playbook/code.gears.md +39 -29
- package/reference/sdlc/code.playbook/code.playbook.d.ts +13 -16
- package/reference/sdlc/code.playbook/code.playbook.js +166 -147
- package/reference/sdlc/code.playbook/code.playbook.ts +180 -229
- package/reference/sdlc/code.playbook/code.registry.d.ts +3 -2
- package/reference/sdlc/code.playbook/code.registry.ts +6 -2
- package/reference/sdlc/code.playbook/playbook-captain.d.ts +42 -0
- package/reference/sdlc/code.playbook/playbook-captain.js +829 -194
- package/reference/sdlc/code.playbook/playbook-captain.ts +1227 -220
- package/reference/sdlc/decide.md +1 -0
- package/reference/sdlc/decide.playbook/decide.fsm.d.ts +270 -154
- package/reference/sdlc/decide.playbook/decide.fsm.js +765 -732
- package/reference/sdlc/decide.playbook/decide.fsm.ts +1167 -945
- package/reference/sdlc/decide.playbook/decide.gears.md +28 -21
- package/reference/sdlc/decide.playbook/decide.playbook.d.ts +11 -67
- package/reference/sdlc/decide.playbook/decide.playbook.js +155 -3570
- package/reference/sdlc/decide.playbook/decide.playbook.ts +186 -5061
- package/reference/sdlc/decide.playbook/decide.registry.d.ts +8 -4
- package/reference/sdlc/decide.playbook/decide.registry.js +2 -2
- package/reference/sdlc/decide.playbook/decide.registry.ts +13 -6
- package/reference/sdlc/dev.playbook/dev.fsm.d.ts +113 -131
- package/reference/sdlc/dev.playbook/dev.fsm.js +517 -575
- package/reference/sdlc/dev.playbook/dev.fsm.ts +667 -787
- package/reference/sdlc/dev.playbook/dev.gears.md +52 -54
- package/reference/sdlc/dev.playbook/dev.playbook.d.ts +13 -10
- package/reference/sdlc/dev.playbook/dev.playbook.js +128 -120
- package/reference/sdlc/dev.playbook/dev.playbook.ts +143 -193
- package/reference/sdlc/dev.playbook/dev.registry.d.ts +3 -2
- package/reference/sdlc/dev.playbook/dev.registry.ts +6 -2
- package/reference/sdlc/pr.playbook/pr.fsm.d.ts +92 -85
- package/reference/sdlc/pr.playbook/pr.fsm.js +461 -518
- package/reference/sdlc/pr.playbook/pr.fsm.ts +533 -663
- package/reference/sdlc/pr.playbook/pr.gears.md +47 -63
- package/reference/sdlc/pr.playbook/pr.playbook.d.ts +13 -23
- package/reference/sdlc/pr.playbook/pr.playbook.js +118 -112
- package/reference/sdlc/pr.playbook/pr.playbook.ts +136 -190
- package/reference/sdlc/pr.playbook/pr.registry.d.ts +3 -2
- package/reference/sdlc/pr.playbook/pr.registry.ts +4 -2
- package/reference/sdlc/review.md +3 -3
- package/reference/sdlc/review.playbook/review.fsm.d.ts +150 -116
- package/reference/sdlc/review.playbook/review.fsm.js +479 -550
- package/reference/sdlc/review.playbook/review.fsm.ts +717 -662
- package/reference/sdlc/review.playbook/review.gears.md +32 -29
- package/reference/sdlc/review.playbook/review.playbook.d.ts +12 -12
- package/reference/sdlc/review.playbook/review.playbook.js +180 -155
- package/reference/sdlc/review.playbook/review.playbook.ts +190 -230
- package/reference/sdlc/review.playbook/review.registry.d.ts +6 -5
- package/reference/sdlc/review.playbook/review.registry.js +3 -3
- package/reference/sdlc/review.playbook/review.registry.ts +9 -5
- package/slc/gears2fsm.md +72 -3
- package/slc/link.md +50 -27
- package/slc/materialize-link.mjs +51 -13
- package/slc/optimize.md +4 -1
- package/slc/prefix-prompts.mjs +191 -0
- package/slc/prefix.md +203 -0
- package/slc/slc.pin-inputs.json +11 -1
- package/slc/text2gears.md +71 -11
- package/src/xstate-playbook-runtime.d.ts +82 -9
- package/src/xstate-playbook-runtime.js +1224 -283
- package/src/xstate-playbook-runtime.ts +1671 -338
- package/src/xstate-runtime.d.ts +3 -1
- package/src/xstate-runtime.js +9 -2
- package/src/xstate-runtime.ts +12 -2
|
@@ -1,236 +1,182 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// Boss event: deterministic START_PR entry; exact Boss text becomes
|
|
8
|
-
// callerInput; pending Coder questions retain BOSS_REPLY
|
|
9
|
-
// Adjudication: LLM judge for the one Coder state; coderOutput is carried
|
|
10
|
-
// verbatim; pullRequest and pullRequestUrl are judge-authored
|
|
11
|
-
// semantic fields; every arm is governed `unchanged`
|
|
12
|
-
// Scripts: five DR-016 script states run through the shared factory's
|
|
13
|
-
// `sh -c` actor in the optional `cwd` option
|
|
14
|
-
// Nested calls: literal code target through the shared bridge
|
|
15
|
-
// Compat: artifact schema 3 / runtime ABI 1
|
|
16
|
-
|
|
3
|
+
// Generated by slc/materialize-link.mjs; governed by the complete slc/link.md.
|
|
4
|
+
// FSM: "./pr.fsm.js"; export: prMachine; strategies: shared defaults with labelled string relays and nested actors.
|
|
5
|
+
import { prMachine as machine } from "./pr.fsm.js";
|
|
6
|
+
import type { PlayerInput as SourcePlayerInput } from "./pr.fsm.js";
|
|
17
7
|
import {
|
|
18
|
-
createXStatePlaybookRuntime,
|
|
19
|
-
composePlayerContinuation,
|
|
20
|
-
snapshotJsonValue,
|
|
8
|
+
createXStatePlaybookRuntime, snapshotJsonValue,
|
|
9
|
+
composePlayerContinuation, type XStatePromptIdentity,
|
|
21
10
|
type PlaybookPlayerInput,
|
|
22
|
-
type XStatePlaybookRuntimeFactory,
|
|
23
11
|
type XStatePlaybookRuntimeConstruction,
|
|
12
|
+
type XStatePlaybookRuntimeFactory,
|
|
24
13
|
type XStatePlaybookRuntimeSpecV3,
|
|
25
14
|
} from '@sublang/playbook/xstate-runtime';
|
|
26
|
-
|
|
27
|
-
prMachine,
|
|
28
|
-
type PlayerInput,
|
|
29
|
-
type PrInput,
|
|
30
|
-
} from './pr.fsm.js';
|
|
31
|
-
import type { PlaybookHostConstructionCapabilities } from '../code.playbook/playbook-captain.js';
|
|
32
|
-
import type {
|
|
33
|
-
CaptainCallOptions,
|
|
34
|
-
CaptainResult,
|
|
35
|
-
JsonValue,
|
|
36
|
-
NormalizedError,
|
|
37
|
-
PlayerCallOptions,
|
|
38
|
-
PlaybookCallRequest,
|
|
39
|
-
PlaybookCallResult,
|
|
40
|
-
PlaybookCallStart,
|
|
41
|
-
PlaybookControlReceipt,
|
|
42
|
-
PlaybookControlView,
|
|
43
|
-
PlaybookPendingCall,
|
|
44
|
-
PlaybookPorts,
|
|
45
|
-
PlaybookRunResult,
|
|
46
|
-
PlaybookRuntime,
|
|
47
|
-
PlaybookRuntimeFactory,
|
|
48
|
-
PlaybookRuntimeSnapshot,
|
|
49
|
-
PlaybookSession,
|
|
50
|
-
PlaybookState,
|
|
51
|
-
PlaybookStateValue,
|
|
52
|
-
PlaybookTraceEvent,
|
|
53
|
-
PlaybookTraceType,
|
|
15
|
+
export type {
|
|
54
16
|
PlayerResult,
|
|
17
|
+
PlayerCallOptions,
|
|
55
18
|
PlayerSessionStore,
|
|
56
|
-
} from '@sublang/playbook/runtime';
|
|
57
|
-
|
|
58
|
-
export type {
|
|
59
|
-
CaptainCallOptions,
|
|
60
19
|
CaptainResult,
|
|
20
|
+
CaptainCallOptions,
|
|
61
21
|
JsonValue,
|
|
62
22
|
NormalizedError,
|
|
63
|
-
PlayerCallOptions,
|
|
64
23
|
PlaybookCallRequest,
|
|
65
24
|
PlaybookCallResult,
|
|
66
25
|
PlaybookCallStart,
|
|
67
|
-
|
|
68
|
-
|
|
26
|
+
PlaybookStateValue,
|
|
27
|
+
PlaybookState,
|
|
69
28
|
PlaybookPendingCall,
|
|
70
|
-
PlaybookPorts,
|
|
71
29
|
PlaybookRunResult,
|
|
72
30
|
PlaybookRuntime,
|
|
73
31
|
PlaybookRuntimeFactory,
|
|
74
32
|
PlaybookRuntimeSnapshot,
|
|
75
33
|
PlaybookSession,
|
|
76
|
-
|
|
77
|
-
PlaybookStateValue,
|
|
34
|
+
PlaybookPorts,
|
|
78
35
|
PlaybookTraceEvent,
|
|
79
36
|
PlaybookTraceType,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* PR's per-run options. The machine reads no input of its own; the one
|
|
86
|
-
* linker-owned option is the working directory its five script states run
|
|
87
|
-
* in (slc/link.md §Script execution). Absent, the process working directory.
|
|
88
|
-
*/
|
|
89
|
-
export type PrPlaybookOptions = PrInput & {
|
|
90
|
-
readonly cwd?: string;
|
|
91
|
-
};
|
|
92
|
-
export type PrPlaybookHostCapabilities =
|
|
93
|
-
PlaybookHostConstructionCapabilities &
|
|
94
|
-
XStatePlaybookRuntimeConstruction<PrPlaybookOptions, object>['hostCapabilities'];
|
|
37
|
+
PlaybookControlReceipt,
|
|
38
|
+
PlaybookControlView,
|
|
39
|
+
} from '@sublang/playbook/runtime';
|
|
95
40
|
|
|
96
|
-
|
|
97
|
-
|
|
41
|
+
export interface PlaybookRuntimeOptions {
|
|
42
|
+
readonly "cwd"?: string;
|
|
43
|
+
}
|
|
44
|
+
export type PlaybookHostCapabilities = XStatePlaybookRuntimeConstruction<
|
|
45
|
+
PlaybookRuntimeOptions, { readonly authority: object }
|
|
46
|
+
>['hostCapabilities'];
|
|
98
47
|
|
|
99
|
-
const
|
|
100
|
-
|
|
48
|
+
const OPTION_SCHEMA = {
|
|
49
|
+
"cwd": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"required": false
|
|
52
|
+
}
|
|
53
|
+
} as const;
|
|
54
|
+
const INPUT_MAPPING = {} as const;
|
|
55
|
+
const RESUMABLE_STATE_IDS: ReadonlySet<string> = new Set([
|
|
56
|
+
"openPullRequest"
|
|
101
57
|
]);
|
|
102
|
-
// Every failure terminal leaves the delivery unfinished: no pull request is
|
|
103
|
-
// guaranteed to exist after notPublished, the three fix terminals leave it
|
|
104
|
-
// open, and mergeRefused leaves it in the state GitHub reports.
|
|
105
58
|
const UNFINISHED_FINAL_STATE_IDS: ReadonlySet<string> = new Set([
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
59
|
+
"notPublished",
|
|
60
|
+
"fixFailed",
|
|
61
|
+
"fixNotPublished",
|
|
62
|
+
"checksFailed",
|
|
63
|
+
"mergeUnconfirmed"
|
|
111
64
|
]);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
) {
|
|
120
|
-
throw new TypeError('PR runtime options must be an object');
|
|
65
|
+
const VERBATIM_PAYLOAD_FIELDS: ReadonlySet<string> = new Set([
|
|
66
|
+
"coderOutput"
|
|
67
|
+
]);
|
|
68
|
+
export function validateOptions(value: unknown): PlaybookRuntimeOptions {
|
|
69
|
+
const captured = snapshotJsonValue(value === undefined ? {} : value, "PR runtime options");
|
|
70
|
+
if (captured === null || typeof captured !== 'object' || Array.isArray(captured)) {
|
|
71
|
+
throw new TypeError("PR runtime options must be an object");
|
|
121
72
|
}
|
|
122
|
-
const
|
|
123
|
-
for (const
|
|
124
|
-
if (!
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if (
|
|
128
|
-
throw new TypeError(
|
|
73
|
+
const fields = captured as Readonly<Record<string, unknown>>;
|
|
74
|
+
for (const key of Object.keys(captured)) {
|
|
75
|
+
if (!Object.hasOwn(OPTION_SCHEMA, key)) throw new TypeError("PR runtime options." + key + ' is not declared');
|
|
76
|
+
}
|
|
77
|
+
for (const [key, schema] of Object.entries(OPTION_SCHEMA) as [string, { type: string; required: boolean }][]) {
|
|
78
|
+
if (!Object.hasOwn(captured, key)) {
|
|
79
|
+
if (schema.required) throw new TypeError("PR runtime options." + key + ' is required');
|
|
80
|
+
} else if (typeof fields[key] !== schema.type || (schema.type === 'number' && !Number.isFinite(fields[key]))) {
|
|
81
|
+
throw new TypeError("PR runtime options." + key + ' must be a ' + schema.type);
|
|
129
82
|
}
|
|
130
83
|
}
|
|
131
|
-
return captured as unknown as
|
|
84
|
+
return captured as unknown as PlaybookRuntimeOptions;
|
|
132
85
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*/
|
|
150
|
-
function composePlayerPrompt(input: PlayerInput, resuming = false): string {
|
|
151
|
-
const fields = input as unknown as Record<string, unknown>;
|
|
152
|
-
const body = input.prompt.replace(
|
|
153
|
-
PLACEHOLDER,
|
|
154
|
-
(match: string, token: string, offset: number, source: string) => {
|
|
155
|
-
const value = fields[placeholderField(token)];
|
|
86
|
+
function renderPlayerPrompt(input: SourcePlayerInput, promptIdentity: XStatePromptIdentity, resuming = false): string {
|
|
87
|
+
const fields = input as unknown as Readonly<Record<string, unknown>>;
|
|
88
|
+
const mapping: Readonly<Record<string, string>> = {};
|
|
89
|
+
const identities: Readonly<Record<string, string>> = {};
|
|
90
|
+
const omitted = new Set<string>([]);
|
|
91
|
+
const fieldFor = (token: string): string => Object.hasOwn(mapping, token) ? mapping[token]! : (token === '#' ? 'irNumber' : token.replace(/-([A-Za-z0-9_$])/g, (_match: string, next: string) => next.toUpperCase()));
|
|
92
|
+
const parts = input.prompt.split(/(\r?\n)/);
|
|
93
|
+
let body = '';
|
|
94
|
+
for (let index = 0; index < parts.length; index += 2) {
|
|
95
|
+
const line = parts[index]!;
|
|
96
|
+
if (omitted.has(line)) {
|
|
97
|
+
const token = /<(#|[A-Za-z_$][A-Za-z0-9_$-]*)>$/.exec(line)![1]!;
|
|
98
|
+
if (fields[fieldFor(token)] === '') continue;
|
|
99
|
+
}
|
|
100
|
+
body += line.replace(/<(#|[A-Za-z_$][A-Za-z0-9_$-]*)>/g, (match: string, token: string): string => {
|
|
101
|
+
const value = Object.hasOwn(identities, token) ? promptIdentity(identities[token]!) : fields[fieldFor(token)];
|
|
156
102
|
if (typeof value !== 'string') return match;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
: value;
|
|
161
|
-
},
|
|
162
|
-
);
|
|
103
|
+
return line.startsWith('> ') ? value.replace(/\r?\n/g, (ending: string) => ending + '> ') : value;
|
|
104
|
+
}) + (parts[index + 1] ?? '');
|
|
105
|
+
}
|
|
163
106
|
return composePlayerContinuation(input, body, resuming);
|
|
164
107
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
composePlayerPrompt,
|
|
168
|
-
VERBATIM_PAYLOAD_FIELDS,
|
|
169
|
-
UNFINISHED_FINAL_STATE_IDS,
|
|
170
|
-
};
|
|
171
|
-
|
|
108
|
+
const composePlayerPrompt = (input: PlaybookPlayerInput, promptIdentity: XStatePromptIdentity, resuming?: boolean): string =>
|
|
109
|
+
renderPlayerPrompt(input as SourcePlayerInput, promptIdentity, resuming);
|
|
172
110
|
const runtimeSpec = {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
snapshotOptions: snapshotPrOptions,
|
|
180
|
-
entryEvent: {
|
|
181
|
-
type: 'START_PR',
|
|
182
|
-
textField: 'callerInput',
|
|
183
|
-
// `startPr` copies the entry text here, so the failure-state retry reads
|
|
184
|
-
// it back from the persisted machine snapshot and survives a continued
|
|
185
|
-
// session (DR-034).
|
|
186
|
-
contextField: 'callerInput',
|
|
111
|
+
composePlayerPrompt,
|
|
112
|
+
...{
|
|
113
|
+
"label": "PR",
|
|
114
|
+
"compat": {
|
|
115
|
+
"artifactSchema": 3,
|
|
116
|
+
"runtimeAbi": 1
|
|
187
117
|
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
118
|
+
"entryEvent": {
|
|
119
|
+
"type": "START_PR",
|
|
120
|
+
"textField": "callerInput",
|
|
121
|
+
"contextField": "callerInput"
|
|
193
122
|
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
123
|
+
"bossEvents": [],
|
|
124
|
+
"roleStates": {
|
|
125
|
+
"openPullRequest": {
|
|
126
|
+
"role": "coder",
|
|
127
|
+
"label": "Coder is publishing the branch and opening its pull request without changing any file or making any commit."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"outcomeAuthority": {
|
|
131
|
+
"governedPlayerStates": {
|
|
132
|
+
"openPullRequest": {
|
|
133
|
+
"opened": {
|
|
134
|
+
"fields": {
|
|
135
|
+
"pullRequest": "semantic",
|
|
136
|
+
"pullRequestUrl": "semantic"
|
|
137
|
+
},
|
|
138
|
+
"repositoryDisposition": "unchanged"
|
|
209
139
|
},
|
|
210
|
-
|
|
211
|
-
fields: {
|
|
212
|
-
|
|
140
|
+
"notPublished": {
|
|
141
|
+
"fields": {
|
|
142
|
+
"coderOutput": "presentation"
|
|
143
|
+
},
|
|
144
|
+
"repositoryDisposition": "unchanged"
|
|
213
145
|
},
|
|
214
|
-
|
|
215
|
-
|
|
146
|
+
"needsBossReply": {
|
|
147
|
+
"fields": {
|
|
148
|
+
"question": "presentation"
|
|
149
|
+
},
|
|
150
|
+
"repositoryDisposition": "unchanged"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
216
154
|
},
|
|
217
|
-
|
|
218
|
-
|
|
155
|
+
"placeholderFields": {},
|
|
156
|
+
"transitionEventFields": [
|
|
157
|
+
"callerInput",
|
|
158
|
+
"answer",
|
|
159
|
+
"questionId"
|
|
160
|
+
],
|
|
161
|
+
"controlContextFields": []
|
|
162
|
+
},
|
|
163
|
+
snapshotOptions: validateOptions,
|
|
164
|
+
machineInput: (options: PlaybookRuntimeOptions) => Object.fromEntries(
|
|
165
|
+
Object.entries(INPUT_MAPPING).filter(([, key]) => options[key as keyof PlaybookRuntimeOptions] !== undefined)
|
|
166
|
+
.map(([field, key]) => [field, options[key as keyof PlaybookRuntimeOptions]]),
|
|
167
|
+
),
|
|
219
168
|
verbatimPayloadFields: VERBATIM_PAYLOAD_FIELDS,
|
|
220
|
-
|
|
169
|
+
resumableStateIds: RESUMABLE_STATE_IDS,
|
|
221
170
|
unfinishedFinalStateIds: UNFINISHED_FINAL_STATE_IDS,
|
|
222
|
-
|
|
223
|
-
} satisfies XStatePlaybookRuntimeSpecV3<PrPlaybookOptions>;
|
|
171
|
+
} satisfies XStatePlaybookRuntimeSpecV3<PlaybookRuntimeOptions>;
|
|
224
172
|
|
|
173
|
+
export const _internal = {
|
|
174
|
+
composePlayerPrompt,
|
|
175
|
+
RESUMABLE_STATE_IDS,
|
|
176
|
+
UNFINISHED_FINAL_STATE_IDS,
|
|
177
|
+
VERBATIM_PAYLOAD_FIELDS,
|
|
178
|
+
};
|
|
225
179
|
const createPlaybookRuntime: XStatePlaybookRuntimeFactory<
|
|
226
|
-
XStatePlaybookRuntimeConstruction<
|
|
227
|
-
|
|
228
|
-
PrPlaybookHostCapabilities
|
|
229
|
-
>,
|
|
230
|
-
3
|
|
231
|
-
> = createXStatePlaybookRuntime<
|
|
232
|
-
PrPlaybookOptions,
|
|
233
|
-
PrPlaybookHostCapabilities
|
|
234
|
-
>(prMachine, runtimeSpec);
|
|
235
|
-
|
|
180
|
+
XStatePlaybookRuntimeConstruction<PlaybookRuntimeOptions, PlaybookHostCapabilities>, 3
|
|
181
|
+
> = createXStatePlaybookRuntime<PlaybookRuntimeOptions, PlaybookHostCapabilities>(machine, runtimeSpec);
|
|
236
182
|
export default createPlaybookRuntime;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PlaybookHostConstructionCapabilities } from '../code.playbook/playbook-captain.js';
|
|
2
|
+
import { type PlaybookHostCapabilities, type PlaybookRuntime } from './pr.playbook.js';
|
|
2
3
|
export interface PlaybookSummaryPolicy {
|
|
3
4
|
stateCountLabels: Readonly<Record<string, string>>;
|
|
4
5
|
copyPasteGuardNames: readonly string[];
|
|
@@ -24,7 +25,7 @@ export interface PrPlaybookRegistryEntry {
|
|
|
24
25
|
concurrentRoleSets: readonly [];
|
|
25
26
|
summaryPolicy: PlaybookSummaryPolicy;
|
|
26
27
|
validateOptions(optionSlice: unknown): PrOptions;
|
|
27
|
-
createRuntime(options: PrOptions, hostCapabilities:
|
|
28
|
+
createRuntime(options: PrOptions, hostCapabilities: PlaybookHostConstructionCapabilities & PlaybookHostCapabilities): PlaybookRuntime;
|
|
28
29
|
}
|
|
29
30
|
export declare const prStateCountLabels: {
|
|
30
31
|
readonly openPullRequest: "publication round";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
|
|
3
3
|
|
|
4
|
+
import type { PlaybookHostConstructionCapabilities } from '../code.playbook/playbook-captain.js';
|
|
4
5
|
import createPlaybookRuntime, {
|
|
5
|
-
type
|
|
6
|
+
type PlaybookHostCapabilities,
|
|
6
7
|
type PlaybookRuntime,
|
|
7
8
|
} from './pr.playbook.js';
|
|
8
9
|
|
|
@@ -35,7 +36,8 @@ export interface PrPlaybookRegistryEntry {
|
|
|
35
36
|
validateOptions(optionSlice: unknown): PrOptions;
|
|
36
37
|
createRuntime(
|
|
37
38
|
options: PrOptions,
|
|
38
|
-
hostCapabilities:
|
|
39
|
+
hostCapabilities: PlaybookHostConstructionCapabilities &
|
|
40
|
+
PlaybookHostCapabilities,
|
|
39
41
|
): PlaybookRuntime;
|
|
40
42
|
}
|
|
41
43
|
|
package/reference/sdlc/review.md
CHANGED
|
@@ -57,7 +57,7 @@ Captain shall append the round’s context in quotes (`>`):
|
|
|
57
57
|
> Original request: <caller-input>
|
|
58
58
|
> Coder output: <coder-output>
|
|
59
59
|
|
|
60
|
-
At the start of *every* review round, Captain shall relay to Reviewer the original intent, the review scope and context,
|
|
60
|
+
At the start of *every* review round, Captain shall relay to Reviewer the original intent, the review scope and context, any Coder feedback from the preceding round, and any relevant run results, in quotes (`>`) after the instruction.
|
|
61
61
|
|
|
62
62
|
At the start of *every* review round, Captain shall append the following instruction to the end of the prompt:
|
|
63
63
|
|
|
@@ -83,7 +83,7 @@ Consult @specs/meta.md for spec requirements if needed; verify affected specs fo
|
|
|
83
83
|
Finding numbers are references within this review only.
|
|
84
84
|
No review transition shall depend on numbering or any fixed presentation format of either player's reply.
|
|
85
85
|
|
|
86
|
-
When Reviewer raises or keeps any finding, Captain shall relay the original intent, the review scope and context, the
|
|
86
|
+
When Reviewer raises or keeps any finding, Captain shall relay the original intent, the review scope and context, the Reviewer's findings, and any relevant run results to Coder, in quotes (`>`), along with the following prompt:
|
|
87
87
|
|
|
88
88
|
> Original request: <caller-input>
|
|
89
89
|
> Reviewer findings: <reviewer-output>
|
|
@@ -109,7 +109,7 @@ Report every disposition, all relevant run results, and every rebuttal.
|
|
|
109
109
|
|
|
110
110
|
Captain shall use the repository-effect receipt as the authoritative identity of any review-fix commit.
|
|
111
111
|
|
|
112
|
-
When Coder makes a new commit or decides to reject all findings, Captain shall relay the
|
|
112
|
+
When Coder makes a new commit or decides to reject all findings, Captain shall relay the round's context above to Reviewer and begin the next review round.
|
|
113
113
|
Reviewer shall read the context information and follow the corresponding instructions.
|
|
114
114
|
Rounds continue until Reviewer affirmatively reports that the requested review is complete and no unsettled findings remain.
|
|
115
115
|
A progress report, status update, or promise of a later result supports no review outcome.
|