@sublang/playbook 9.0.0 → 11.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/cli.md +109 -21
- package/docs/configuration.md +89 -40
- package/docs/embedding.md +126 -12
- package/package.json +14 -3
- package/reference/sdlc/captain.md +14 -10
- package/reference/sdlc/captain.playbook/captain.fsm.d.ts +33 -13
- package/reference/sdlc/captain.playbook/captain.fsm.js +80 -9
- package/reference/sdlc/captain.playbook/captain.fsm.ts +137 -18
- package/reference/sdlc/captain.playbook/captain.gears.md +10 -6
- package/reference/sdlc/captain.playbook/captain.playbook.d.ts +5 -1
- package/reference/sdlc/captain.playbook/captain.playbook.js +140 -10
- package/reference/sdlc/captain.playbook/captain.playbook.ts +188 -16
- package/reference/sdlc/code.md +35 -16
- package/reference/sdlc/code.playbook/bin/interactive-session.js +228 -23
- package/reference/sdlc/code.playbook/bin/launch-config.js +611 -221
- package/reference/sdlc/code.playbook/bin/playbook.js +304 -178
- package/reference/sdlc/code.playbook/bin/replay-observer.js +221 -0
- package/reference/sdlc/code.playbook/bin/repository-effects.js +2930 -0
- package/reference/sdlc/code.playbook/bin/run.js +669 -215
- package/reference/sdlc/code.playbook/bin/session-store.js +4546 -502
- package/reference/sdlc/code.playbook/code.fsm.d.ts +7 -0
- package/reference/sdlc/code.playbook/code.fsm.js +74 -25
- package/reference/sdlc/code.playbook/code.fsm.ts +83 -29
- package/reference/sdlc/code.playbook/code.gears.md +0 -2
- package/reference/sdlc/code.playbook/code.playbook.d.ts +5 -2
- package/reference/sdlc/code.playbook/code.playbook.js +54 -2
- package/reference/sdlc/code.playbook/code.playbook.ts +75 -6
- package/reference/sdlc/code.playbook/code.registry.d.ts +10 -3
- package/reference/sdlc/code.playbook/code.registry.js +10 -3
- package/reference/sdlc/code.playbook/code.registry.ts +23 -5
- package/reference/sdlc/code.playbook/playbook-captain.d.ts +103 -8
- package/reference/sdlc/code.playbook/playbook-captain.js +1871 -75
- package/reference/sdlc/code.playbook/playbook-captain.ts +2801 -102
- package/reference/sdlc/code.playbook/playbook.config.template.yaml +14 -10
- package/reference/sdlc/code.playbook/session-store.d.ts +82 -0
- package/reference/sdlc/code.playbook/session-store.js +113 -0
- package/reference/sdlc/decide.md +24 -16
- package/reference/sdlc/decide.playbook/decide.fsm.d.ts +7 -0
- package/reference/sdlc/decide.playbook/decide.fsm.js +80 -29
- package/reference/sdlc/decide.playbook/decide.fsm.ts +89 -31
- package/reference/sdlc/decide.playbook/decide.gears.md +0 -1
- package/reference/sdlc/decide.playbook/decide.playbook.d.ts +13 -5
- package/reference/sdlc/decide.playbook/decide.playbook.js +1712 -91
- package/reference/sdlc/decide.playbook/decide.playbook.ts +2677 -136
- package/reference/sdlc/decide.playbook/decide.registry.d.ts +7 -3
- package/reference/sdlc/decide.playbook/decide.registry.js +10 -3
- package/reference/sdlc/decide.playbook/decide.registry.ts +20 -5
- package/reference/sdlc/review.md +36 -18
- package/reference/sdlc/review.playbook/review.fsm.d.ts +7 -0
- package/reference/sdlc/review.playbook/review.fsm.js +133 -12
- package/reference/sdlc/review.playbook/review.fsm.ts +140 -12
- package/reference/sdlc/review.playbook/review.playbook.d.ts +5 -2
- package/reference/sdlc/review.playbook/review.playbook.js +65 -2
- package/reference/sdlc/review.playbook/review.playbook.ts +83 -6
- package/reference/sdlc/review.playbook/review.registry.d.ts +10 -3
- package/reference/sdlc/review.playbook/review.registry.js +10 -3
- package/reference/sdlc/review.playbook/review.registry.ts +23 -5
- package/slc/gears2fsm.md +6 -5
- package/slc/link.md +544 -41
- package/src/accepted-outcome.d.ts +18 -0
- package/src/accepted-outcome.js +94 -0
- package/src/accepted-outcome.ts +140 -0
- package/src/runtime.d.ts +164 -3
- package/src/runtime.ts +213 -2
- package/src/xstate-playbook-runtime.d.ts +149 -10
- package/src/xstate-playbook-runtime.js +2569 -270
- package/src/xstate-playbook-runtime.ts +4133 -490
- package/src/xstate-runtime.d.ts +59 -1
- package/src/xstate-runtime.js +866 -7
- package/src/xstate-runtime.ts +1397 -7
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { type XStatePromptIdentity } from '@sublang/playbook/xstate-runtime';
|
|
1
|
+
import { type XStatePlaybookRuntimeFactory, type XStatePlaybookRuntimeConstruction, type XStatePromptIdentity } from '@sublang/playbook/xstate-runtime';
|
|
2
2
|
import { type PlayerInput, type ReviewInput } from './review.fsm.js';
|
|
3
|
+
import type { PlaybookHostConstructionCapabilities } from '../code.playbook/playbook-captain.js';
|
|
3
4
|
import type { CaptainCallOptions, CaptainResult, JsonValue, NormalizedError, PlayerCallOptions, PlaybookCallRequest, PlaybookCallResult, PlaybookCallStart, PlaybookControlReceipt, PlaybookControlView, PlaybookPendingCall, PlaybookPorts, PlaybookRunResult, PlaybookRuntime, PlaybookRuntimeFactory, PlaybookRuntimeSnapshot, PlaybookSession, PlaybookState, PlaybookStateValue, PlaybookTraceEvent, PlaybookTraceType, PlayerResult, PlayerSessionStore } from '@sublang/playbook/runtime';
|
|
4
5
|
export type { CaptainCallOptions, CaptainResult, JsonValue, NormalizedError, PlayerCallOptions, PlaybookCallRequest, PlaybookCallResult, PlaybookCallStart, PlaybookControlReceipt, PlaybookControlView, PlaybookPendingCall, PlaybookPorts, PlaybookRunResult, PlaybookRuntime, PlaybookRuntimeFactory, PlaybookRuntimeSnapshot, PlaybookSession, PlaybookState, PlaybookStateValue, PlaybookTraceEvent, PlaybookTraceType, PlayerResult, PlayerSessionStore, };
|
|
5
6
|
export type ReviewPlaybookOptions = ReviewInput;
|
|
7
|
+
export type ReviewPlaybookHostCapabilities = PlaybookHostConstructionCapabilities & XStatePlaybookRuntimeConstruction<ReviewPlaybookOptions, object>['hostCapabilities'];
|
|
6
8
|
/** Keep every line of a relayed runtime value inside its authored quote. */
|
|
7
9
|
declare function composePlayerPrompt(input: PlayerInput, promptIdentity: XStatePromptIdentity): string;
|
|
8
10
|
export declare const _internal: {
|
|
9
11
|
composePlayerPrompt: typeof composePlayerPrompt;
|
|
10
12
|
VERBATIM_PAYLOAD_FIELDS: ReadonlySet<string>;
|
|
13
|
+
UNFINISHED_FINAL_STATE_IDS: ReadonlySet<string>;
|
|
11
14
|
};
|
|
12
|
-
declare const createPlaybookRuntime:
|
|
15
|
+
declare const createPlaybookRuntime: XStatePlaybookRuntimeFactory<XStatePlaybookRuntimeConstruction<ReviewPlaybookOptions, ReviewPlaybookHostCapabilities>, 3>;
|
|
13
16
|
export default createPlaybookRuntime;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// callerInput; pending player questions retain BOSS_REPLY
|
|
9
9
|
// Adjudication: LLM judge per state; coderOutput and reviewerOutput are
|
|
10
10
|
// carried verbatim
|
|
11
|
-
// Compat: artifact schema
|
|
11
|
+
// Compat: artifact schema 3 / runtime ABI 1
|
|
12
12
|
import { createXStatePlaybookRuntime, snapshotJsonValue, } from '@sublang/playbook/xstate-runtime';
|
|
13
13
|
import { reviewMachine, } from './review.fsm.js';
|
|
14
14
|
const PLACEHOLDER = /<(#|[A-Za-z_$][A-Za-z0-9_$-]*)>/g;
|
|
@@ -17,6 +17,7 @@ const VERBATIM_PAYLOAD_FIELDS = new Set([
|
|
|
17
17
|
'reviewerOutput',
|
|
18
18
|
'coderOutput',
|
|
19
19
|
]);
|
|
20
|
+
const UNFINISHED_FINAL_STATE_IDS = new Set();
|
|
20
21
|
function snapshotReviewOptions(value) {
|
|
21
22
|
const captured = snapshotJsonValue(value, 'REVIEW runtime options');
|
|
22
23
|
if (captured === null ||
|
|
@@ -68,6 +69,7 @@ function composePlayerPrompt(input, promptIdentity) {
|
|
|
68
69
|
export const _internal = {
|
|
69
70
|
composePlayerPrompt,
|
|
70
71
|
VERBATIM_PAYLOAD_FIELDS,
|
|
72
|
+
UNFINISHED_FINAL_STATE_IDS,
|
|
71
73
|
};
|
|
72
74
|
const runtimeSpec = {
|
|
73
75
|
label: 'REVIEW',
|
|
@@ -75,7 +77,7 @@ const runtimeSpec = {
|
|
|
75
77
|
// time — a literal, never the loading engine's RUNTIME_ABI self-report,
|
|
76
78
|
// which would follow whatever engine loads the module and make the
|
|
77
79
|
// factory's skew check compare that engine with itself.
|
|
78
|
-
compat: { artifactSchema:
|
|
80
|
+
compat: { artifactSchema: 3, runtimeAbi: 1 },
|
|
79
81
|
snapshotOptions: snapshotReviewOptions,
|
|
80
82
|
entryEvent: {
|
|
81
83
|
type: 'START_REVIEW',
|
|
@@ -103,9 +105,70 @@ const runtimeSpec = {
|
|
|
103
105
|
label: 'REVIEW-4: Reviewer adjudicates an all-rejected Coder disposition.',
|
|
104
106
|
},
|
|
105
107
|
},
|
|
108
|
+
outcomeAuthority: {
|
|
109
|
+
governedPlayerStates: {
|
|
110
|
+
reviewInitial: {
|
|
111
|
+
hasFindings: {
|
|
112
|
+
fields: { reviewerOutput: 'presentation' },
|
|
113
|
+
repositoryDisposition: 'unchanged',
|
|
114
|
+
},
|
|
115
|
+
noFindings: {
|
|
116
|
+
fields: {},
|
|
117
|
+
repositoryDisposition: 'unchanged',
|
|
118
|
+
},
|
|
119
|
+
needsBossReply: {
|
|
120
|
+
fields: { question: 'presentation' },
|
|
121
|
+
repositoryDisposition: 'unchanged',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
addressFindings: {
|
|
125
|
+
committed: {
|
|
126
|
+
fields: { coderOutput: 'presentation' },
|
|
127
|
+
repositoryDisposition: 'one-descendant-commit',
|
|
128
|
+
},
|
|
129
|
+
rejectedAll: {
|
|
130
|
+
fields: { coderOutput: 'presentation' },
|
|
131
|
+
repositoryDisposition: 'unchanged',
|
|
132
|
+
},
|
|
133
|
+
needsBossReply: {
|
|
134
|
+
fields: { question: 'presentation' },
|
|
135
|
+
repositoryDisposition: 'deferred',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
reviewAfterCommit: {
|
|
139
|
+
hasFindings: {
|
|
140
|
+
fields: { reviewerOutput: 'presentation' },
|
|
141
|
+
repositoryDisposition: 'unchanged',
|
|
142
|
+
},
|
|
143
|
+
noFindings: {
|
|
144
|
+
fields: {},
|
|
145
|
+
repositoryDisposition: 'unchanged',
|
|
146
|
+
},
|
|
147
|
+
needsBossReply: {
|
|
148
|
+
fields: { question: 'presentation' },
|
|
149
|
+
repositoryDisposition: 'unchanged',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
reviewAfterRebuttal: {
|
|
153
|
+
hasFindings: {
|
|
154
|
+
fields: { reviewerOutput: 'presentation' },
|
|
155
|
+
repositoryDisposition: 'unchanged',
|
|
156
|
+
},
|
|
157
|
+
noFindings: {
|
|
158
|
+
fields: {},
|
|
159
|
+
repositoryDisposition: 'unchanged',
|
|
160
|
+
},
|
|
161
|
+
needsBossReply: {
|
|
162
|
+
fields: { question: 'presentation' },
|
|
163
|
+
repositoryDisposition: 'unchanged',
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
106
168
|
composePlayerPrompt: (input, promptIdentity) => composePlayerPrompt(input, promptIdentity),
|
|
107
169
|
verbatimPayloadFields: VERBATIM_PAYLOAD_FIELDS,
|
|
108
170
|
controlContextFields: [],
|
|
171
|
+
unfinishedFinalStateIds: UNFINISHED_FINAL_STATE_IDS,
|
|
109
172
|
transitionEventFields: [
|
|
110
173
|
'callerInput',
|
|
111
174
|
'bossIntent',
|
|
@@ -8,20 +8,23 @@
|
|
|
8
8
|
// callerInput; pending player questions retain BOSS_REPLY
|
|
9
9
|
// Adjudication: LLM judge per state; coderOutput and reviewerOutput are
|
|
10
10
|
// carried verbatim
|
|
11
|
-
// Compat: artifact schema
|
|
11
|
+
// Compat: artifact schema 3 / runtime ABI 1
|
|
12
12
|
|
|
13
13
|
import {
|
|
14
14
|
createXStatePlaybookRuntime,
|
|
15
15
|
snapshotJsonValue,
|
|
16
16
|
type PlaybookPlayerInput,
|
|
17
|
+
type XStatePlaybookRuntimeFactory,
|
|
18
|
+
type XStatePlaybookRuntimeConstruction,
|
|
17
19
|
type XStatePromptIdentity,
|
|
18
|
-
type
|
|
20
|
+
type XStatePlaybookRuntimeSpecV3,
|
|
19
21
|
} from '@sublang/playbook/xstate-runtime';
|
|
20
22
|
import {
|
|
21
23
|
reviewMachine,
|
|
22
24
|
type PlayerInput,
|
|
23
25
|
type ReviewInput,
|
|
24
26
|
} from './review.fsm.js';
|
|
27
|
+
import type { PlaybookHostConstructionCapabilities } from '../code.playbook/playbook-captain.js';
|
|
25
28
|
import type {
|
|
26
29
|
CaptainCallOptions,
|
|
27
30
|
CaptainResult,
|
|
@@ -75,6 +78,9 @@ export type {
|
|
|
75
78
|
};
|
|
76
79
|
|
|
77
80
|
export type ReviewPlaybookOptions = ReviewInput;
|
|
81
|
+
export type ReviewPlaybookHostCapabilities =
|
|
82
|
+
PlaybookHostConstructionCapabilities &
|
|
83
|
+
XStatePlaybookRuntimeConstruction<ReviewPlaybookOptions, object>['hostCapabilities'];
|
|
78
84
|
|
|
79
85
|
const PLACEHOLDER = /<(#|[A-Za-z_$][A-Za-z0-9_$-]*)>/g;
|
|
80
86
|
const CONTINUATION_PREAMBLE =
|
|
@@ -84,6 +90,7 @@ const VERBATIM_PAYLOAD_FIELDS: ReadonlySet<string> = new Set([
|
|
|
84
90
|
'reviewerOutput',
|
|
85
91
|
'coderOutput',
|
|
86
92
|
]);
|
|
93
|
+
const UNFINISHED_FINAL_STATE_IDS: ReadonlySet<string> = new Set();
|
|
87
94
|
|
|
88
95
|
function snapshotReviewOptions(value: unknown): ReviewPlaybookOptions {
|
|
89
96
|
const captured = snapshotJsonValue(value, 'REVIEW runtime options');
|
|
@@ -151,6 +158,7 @@ function composePlayerPrompt(
|
|
|
151
158
|
export const _internal = {
|
|
152
159
|
composePlayerPrompt,
|
|
153
160
|
VERBATIM_PAYLOAD_FIELDS,
|
|
161
|
+
UNFINISHED_FINAL_STATE_IDS,
|
|
154
162
|
};
|
|
155
163
|
|
|
156
164
|
const runtimeSpec = {
|
|
@@ -159,7 +167,7 @@ const runtimeSpec = {
|
|
|
159
167
|
// time — a literal, never the loading engine's RUNTIME_ABI self-report,
|
|
160
168
|
// which would follow whatever engine loads the module and make the
|
|
161
169
|
// factory's skew check compare that engine with itself.
|
|
162
|
-
compat: { artifactSchema:
|
|
170
|
+
compat: { artifactSchema: 3, runtimeAbi: 1 },
|
|
163
171
|
snapshotOptions: snapshotReviewOptions,
|
|
164
172
|
entryEvent: {
|
|
165
173
|
type: 'START_REVIEW',
|
|
@@ -190,12 +198,73 @@ const runtimeSpec = {
|
|
|
190
198
|
'REVIEW-4: Reviewer adjudicates an all-rejected Coder disposition.',
|
|
191
199
|
},
|
|
192
200
|
},
|
|
201
|
+
outcomeAuthority: {
|
|
202
|
+
governedPlayerStates: {
|
|
203
|
+
reviewInitial: {
|
|
204
|
+
hasFindings: {
|
|
205
|
+
fields: { reviewerOutput: 'presentation' },
|
|
206
|
+
repositoryDisposition: 'unchanged',
|
|
207
|
+
},
|
|
208
|
+
noFindings: {
|
|
209
|
+
fields: {},
|
|
210
|
+
repositoryDisposition: 'unchanged',
|
|
211
|
+
},
|
|
212
|
+
needsBossReply: {
|
|
213
|
+
fields: { question: 'presentation' },
|
|
214
|
+
repositoryDisposition: 'unchanged',
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
addressFindings: {
|
|
218
|
+
committed: {
|
|
219
|
+
fields: { coderOutput: 'presentation' },
|
|
220
|
+
repositoryDisposition: 'one-descendant-commit',
|
|
221
|
+
},
|
|
222
|
+
rejectedAll: {
|
|
223
|
+
fields: { coderOutput: 'presentation' },
|
|
224
|
+
repositoryDisposition: 'unchanged',
|
|
225
|
+
},
|
|
226
|
+
needsBossReply: {
|
|
227
|
+
fields: { question: 'presentation' },
|
|
228
|
+
repositoryDisposition: 'deferred',
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
reviewAfterCommit: {
|
|
232
|
+
hasFindings: {
|
|
233
|
+
fields: { reviewerOutput: 'presentation' },
|
|
234
|
+
repositoryDisposition: 'unchanged',
|
|
235
|
+
},
|
|
236
|
+
noFindings: {
|
|
237
|
+
fields: {},
|
|
238
|
+
repositoryDisposition: 'unchanged',
|
|
239
|
+
},
|
|
240
|
+
needsBossReply: {
|
|
241
|
+
fields: { question: 'presentation' },
|
|
242
|
+
repositoryDisposition: 'unchanged',
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
reviewAfterRebuttal: {
|
|
246
|
+
hasFindings: {
|
|
247
|
+
fields: { reviewerOutput: 'presentation' },
|
|
248
|
+
repositoryDisposition: 'unchanged',
|
|
249
|
+
},
|
|
250
|
+
noFindings: {
|
|
251
|
+
fields: {},
|
|
252
|
+
repositoryDisposition: 'unchanged',
|
|
253
|
+
},
|
|
254
|
+
needsBossReply: {
|
|
255
|
+
fields: { question: 'presentation' },
|
|
256
|
+
repositoryDisposition: 'unchanged',
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
},
|
|
193
261
|
composePlayerPrompt: (
|
|
194
262
|
input: PlaybookPlayerInput,
|
|
195
263
|
promptIdentity: XStatePromptIdentity,
|
|
196
264
|
) => composePlayerPrompt(input as PlayerInput, promptIdentity),
|
|
197
265
|
verbatimPayloadFields: VERBATIM_PAYLOAD_FIELDS,
|
|
198
266
|
controlContextFields: [],
|
|
267
|
+
unfinishedFinalStateIds: UNFINISHED_FINAL_STATE_IDS,
|
|
199
268
|
transitionEventFields: [
|
|
200
269
|
'callerInput',
|
|
201
270
|
'bossIntent',
|
|
@@ -203,9 +272,17 @@ const runtimeSpec = {
|
|
|
203
272
|
'answer',
|
|
204
273
|
'questionId',
|
|
205
274
|
],
|
|
206
|
-
} satisfies
|
|
275
|
+
} satisfies XStatePlaybookRuntimeSpecV3<ReviewPlaybookOptions>;
|
|
207
276
|
|
|
208
|
-
const createPlaybookRuntime:
|
|
209
|
-
|
|
277
|
+
const createPlaybookRuntime: XStatePlaybookRuntimeFactory<
|
|
278
|
+
XStatePlaybookRuntimeConstruction<
|
|
279
|
+
ReviewPlaybookOptions,
|
|
280
|
+
ReviewPlaybookHostCapabilities
|
|
281
|
+
>,
|
|
282
|
+
3
|
|
283
|
+
> = createXStatePlaybookRuntime<
|
|
284
|
+
ReviewPlaybookOptions,
|
|
285
|
+
ReviewPlaybookHostCapabilities
|
|
286
|
+
>(reviewMachine, runtimeSpec);
|
|
210
287
|
|
|
211
288
|
export default createPlaybookRuntime;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PlaybookRuntime } from './review.playbook.js';
|
|
1
|
+
import { type ReviewPlaybookHostCapabilities, type PlaybookRuntime } from './review.playbook.js';
|
|
2
2
|
export interface PlaybookSummaryPolicy {
|
|
3
3
|
stateCountLabels: Readonly<Record<string, string>>;
|
|
4
4
|
copyPasteGuardNames: readonly string[];
|
|
@@ -12,12 +12,19 @@ export interface ReviewPlaybookRegistryEntry {
|
|
|
12
12
|
id: 'review';
|
|
13
13
|
command: 'review';
|
|
14
14
|
intent: string;
|
|
15
|
-
artifactSchema:
|
|
15
|
+
artifactSchema: 3;
|
|
16
|
+
runtimeProfile: {
|
|
17
|
+
readonly kind: 'shared-factory';
|
|
18
|
+
readonly compat: {
|
|
19
|
+
readonly artifactSchema: 3;
|
|
20
|
+
readonly runtimeAbi: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
16
23
|
requiredRoleIds: readonly ['coder', 'reviewer'];
|
|
17
24
|
concurrentRoleSets: readonly [];
|
|
18
25
|
summaryPolicy: PlaybookSummaryPolicy;
|
|
19
26
|
validateOptions(optionSlice: unknown): ReviewOptions;
|
|
20
|
-
createRuntime(options: ReviewOptions): PlaybookRuntime;
|
|
27
|
+
createRuntime(options: ReviewOptions, hostCapabilities: ReviewPlaybookHostCapabilities): PlaybookRuntime;
|
|
21
28
|
}
|
|
22
29
|
export declare const reviewStateCountLabels: {
|
|
23
30
|
readonly reviewInitial: "review round";
|
|
@@ -48,13 +48,20 @@ export const reviewPlaybookRegistryEntry = {
|
|
|
48
48
|
id: 'review',
|
|
49
49
|
command: 'review',
|
|
50
50
|
intent: 'review the latest commit until no material correctness or spec findings remain',
|
|
51
|
-
artifactSchema:
|
|
51
|
+
artifactSchema: 3,
|
|
52
|
+
runtimeProfile: Object.freeze({
|
|
53
|
+
kind: 'shared-factory',
|
|
54
|
+
compat: createPlaybookRuntime.compat,
|
|
55
|
+
}),
|
|
52
56
|
requiredRoleIds: ['coder', 'reviewer'],
|
|
53
57
|
concurrentRoleSets: [],
|
|
54
58
|
summaryPolicy: reviewSummaryPolicy,
|
|
55
59
|
validateOptions: validateReviewOptions,
|
|
56
|
-
createRuntime(options) {
|
|
57
|
-
return createPlaybookRuntime(
|
|
60
|
+
createRuntime(options, hostCapabilities) {
|
|
61
|
+
return createPlaybookRuntime({
|
|
62
|
+
configuredOptions: options,
|
|
63
|
+
hostCapabilities,
|
|
64
|
+
});
|
|
58
65
|
},
|
|
59
66
|
};
|
|
60
67
|
export default reviewPlaybookRegistryEntry;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
|
|
3
3
|
|
|
4
4
|
import createPlaybookRuntime, {
|
|
5
|
+
type ReviewPlaybookHostCapabilities,
|
|
5
6
|
type PlaybookRuntime,
|
|
6
7
|
} from './review.playbook.js';
|
|
7
8
|
|
|
@@ -20,12 +21,22 @@ export interface ReviewPlaybookRegistryEntry {
|
|
|
20
21
|
id: 'review';
|
|
21
22
|
command: 'review';
|
|
22
23
|
intent: string;
|
|
23
|
-
artifactSchema:
|
|
24
|
+
artifactSchema: 3;
|
|
25
|
+
runtimeProfile: {
|
|
26
|
+
readonly kind: 'shared-factory';
|
|
27
|
+
readonly compat: {
|
|
28
|
+
readonly artifactSchema: 3;
|
|
29
|
+
readonly runtimeAbi: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
24
32
|
requiredRoleIds: readonly ['coder', 'reviewer'];
|
|
25
33
|
concurrentRoleSets: readonly [];
|
|
26
34
|
summaryPolicy: PlaybookSummaryPolicy;
|
|
27
35
|
validateOptions(optionSlice: unknown): ReviewOptions;
|
|
28
|
-
createRuntime(
|
|
36
|
+
createRuntime(
|
|
37
|
+
options: ReviewOptions,
|
|
38
|
+
hostCapabilities: ReviewPlaybookHostCapabilities,
|
|
39
|
+
): PlaybookRuntime;
|
|
29
40
|
}
|
|
30
41
|
|
|
31
42
|
export const reviewStateCountLabels = {
|
|
@@ -94,13 +105,20 @@ export const reviewPlaybookRegistryEntry: ReviewPlaybookRegistryEntry = {
|
|
|
94
105
|
command: 'review',
|
|
95
106
|
intent:
|
|
96
107
|
'review the latest commit until no material correctness or spec findings remain',
|
|
97
|
-
artifactSchema:
|
|
108
|
+
artifactSchema: 3,
|
|
109
|
+
runtimeProfile: Object.freeze({
|
|
110
|
+
kind: 'shared-factory',
|
|
111
|
+
compat: createPlaybookRuntime.compat,
|
|
112
|
+
}),
|
|
98
113
|
requiredRoleIds: ['coder', 'reviewer'],
|
|
99
114
|
concurrentRoleSets: [],
|
|
100
115
|
summaryPolicy: reviewSummaryPolicy,
|
|
101
116
|
validateOptions: validateReviewOptions,
|
|
102
|
-
createRuntime(options) {
|
|
103
|
-
return createPlaybookRuntime(
|
|
117
|
+
createRuntime(options, hostCapabilities) {
|
|
118
|
+
return createPlaybookRuntime({
|
|
119
|
+
configuredOptions: options,
|
|
120
|
+
hostCapabilities,
|
|
121
|
+
});
|
|
104
122
|
},
|
|
105
123
|
};
|
|
106
124
|
|
package/slc/gears2fsm.md
CHANGED
|
@@ -222,12 +222,13 @@ teardown event. The completion rule of
|
|
|
222
222
|
output clause binds only where Source declares a terminal result, which a
|
|
223
223
|
controller Source does not.
|
|
224
224
|
The controller decision state's direct-Captain result contract discriminates
|
|
225
|
-
the closed action set of DR-029. Its guard discriminants
|
|
226
|
-
compiler contract, not names the compiler may invent — `respond`, `
|
|
227
|
-
`switch`, `dismiss`, `deliver`, and `runtime` — with each guard's
|
|
228
|
-
payload fields:
|
|
225
|
+
the closed action set of DR-029 as extended by DR-038. Its guard discriminants
|
|
226
|
+
are a stable compiler contract, not names the compiler may invent — `respond`, `resume`,
|
|
227
|
+
`start`, `switch`, `dismiss`, `deliver`, and `runtime` — with each guard's
|
|
228
|
+
required payload fields:
|
|
229
229
|
|
|
230
230
|
- `respond` requires `text`;
|
|
231
|
+
- `resume` requires `playbookId` and carries no `input`;
|
|
231
232
|
- `start` and `switch` each require `playbookId` and `input`;
|
|
232
233
|
- `runtime` requires `actionId`;
|
|
233
234
|
- `dismiss` and `deliver` require none — a `deliver` result in particular
|
|
@@ -653,7 +654,7 @@ Boss-reply suspension, because its hub already receives every Boss turn and a
|
|
|
653
654
|
clarifying question to Boss is a `respond` selection over the closed action
|
|
654
655
|
set. The rule below is therefore universal over workflow states and silent
|
|
655
656
|
about that class; in particular, adding `needsBossReply` to the controller
|
|
656
|
-
decision state would add
|
|
657
|
+
decision state would add an eighth outcome to a closed seven-action contract
|
|
657
658
|
whose guard discriminants [Setup](#setup) fixes, and is nonconformant.
|
|
658
659
|
There is no source-level opt-in annotation and no `needsBossReply` result metadata in GEARS output.
|
|
659
660
|
The FSM compiler shall preserve the GEARS blockquote as the state's domain `prompt` body and shall not inject any Boss-question instruction into `invoke.input.prompt`.
|