@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.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/docs/embedding.md +9 -7
  3. package/package.json +3 -1
  4. package/reference/sdlc/branch.playbook/branch.fsm.d.ts +63 -33
  5. package/reference/sdlc/branch.playbook/branch.fsm.js +190 -108
  6. package/reference/sdlc/branch.playbook/branch.fsm.ts +269 -147
  7. package/reference/sdlc/branch.playbook/branch.gears.md +7 -17
  8. package/reference/sdlc/branch.playbook/branch.playbook.d.ts +12 -16
  9. package/reference/sdlc/branch.playbook/branch.playbook.js +112 -101
  10. package/reference/sdlc/branch.playbook/branch.playbook.ts +128 -171
  11. package/reference/sdlc/branch.playbook/branch.registry.d.ts +3 -2
  12. package/reference/sdlc/branch.playbook/branch.registry.ts +6 -2
  13. package/reference/sdlc/code.playbook/bin/repository-effects.js +54 -13
  14. package/reference/sdlc/code.playbook/code.fsm.d.ts +143 -90
  15. package/reference/sdlc/code.playbook/code.fsm.introspect.d.ts +8 -8
  16. package/reference/sdlc/code.playbook/code.fsm.introspect.ts +13 -13
  17. package/reference/sdlc/code.playbook/code.fsm.js +609 -649
  18. package/reference/sdlc/code.playbook/code.fsm.ts +890 -821
  19. package/reference/sdlc/code.playbook/code.gears.md +39 -29
  20. package/reference/sdlc/code.playbook/code.playbook.d.ts +13 -16
  21. package/reference/sdlc/code.playbook/code.playbook.js +166 -147
  22. package/reference/sdlc/code.playbook/code.playbook.ts +180 -229
  23. package/reference/sdlc/code.playbook/code.registry.d.ts +3 -2
  24. package/reference/sdlc/code.playbook/code.registry.ts +6 -2
  25. package/reference/sdlc/code.playbook/playbook-captain.d.ts +42 -0
  26. package/reference/sdlc/code.playbook/playbook-captain.js +829 -194
  27. package/reference/sdlc/code.playbook/playbook-captain.ts +1227 -220
  28. package/reference/sdlc/decide.md +1 -0
  29. package/reference/sdlc/decide.playbook/decide.fsm.d.ts +270 -154
  30. package/reference/sdlc/decide.playbook/decide.fsm.js +765 -732
  31. package/reference/sdlc/decide.playbook/decide.fsm.ts +1167 -945
  32. package/reference/sdlc/decide.playbook/decide.gears.md +28 -21
  33. package/reference/sdlc/decide.playbook/decide.playbook.d.ts +11 -67
  34. package/reference/sdlc/decide.playbook/decide.playbook.js +155 -3570
  35. package/reference/sdlc/decide.playbook/decide.playbook.ts +186 -5061
  36. package/reference/sdlc/decide.playbook/decide.registry.d.ts +8 -4
  37. package/reference/sdlc/decide.playbook/decide.registry.js +2 -2
  38. package/reference/sdlc/decide.playbook/decide.registry.ts +13 -6
  39. package/reference/sdlc/dev.playbook/dev.fsm.d.ts +113 -131
  40. package/reference/sdlc/dev.playbook/dev.fsm.js +517 -575
  41. package/reference/sdlc/dev.playbook/dev.fsm.ts +667 -787
  42. package/reference/sdlc/dev.playbook/dev.gears.md +52 -54
  43. package/reference/sdlc/dev.playbook/dev.playbook.d.ts +13 -10
  44. package/reference/sdlc/dev.playbook/dev.playbook.js +128 -120
  45. package/reference/sdlc/dev.playbook/dev.playbook.ts +143 -193
  46. package/reference/sdlc/dev.playbook/dev.registry.d.ts +3 -2
  47. package/reference/sdlc/dev.playbook/dev.registry.ts +6 -2
  48. package/reference/sdlc/pr.playbook/pr.fsm.d.ts +92 -85
  49. package/reference/sdlc/pr.playbook/pr.fsm.js +461 -518
  50. package/reference/sdlc/pr.playbook/pr.fsm.ts +533 -663
  51. package/reference/sdlc/pr.playbook/pr.gears.md +47 -63
  52. package/reference/sdlc/pr.playbook/pr.playbook.d.ts +13 -23
  53. package/reference/sdlc/pr.playbook/pr.playbook.js +118 -112
  54. package/reference/sdlc/pr.playbook/pr.playbook.ts +136 -190
  55. package/reference/sdlc/pr.playbook/pr.registry.d.ts +3 -2
  56. package/reference/sdlc/pr.playbook/pr.registry.ts +4 -2
  57. package/reference/sdlc/review.md +3 -3
  58. package/reference/sdlc/review.playbook/review.fsm.d.ts +150 -116
  59. package/reference/sdlc/review.playbook/review.fsm.js +479 -550
  60. package/reference/sdlc/review.playbook/review.fsm.ts +717 -662
  61. package/reference/sdlc/review.playbook/review.gears.md +32 -29
  62. package/reference/sdlc/review.playbook/review.playbook.d.ts +12 -12
  63. package/reference/sdlc/review.playbook/review.playbook.js +180 -155
  64. package/reference/sdlc/review.playbook/review.playbook.ts +190 -230
  65. package/reference/sdlc/review.playbook/review.registry.d.ts +6 -5
  66. package/reference/sdlc/review.playbook/review.registry.js +3 -3
  67. package/reference/sdlc/review.playbook/review.registry.ts +9 -5
  68. package/slc/gears2fsm.md +72 -3
  69. package/slc/link.md +50 -27
  70. package/slc/materialize-link.mjs +51 -13
  71. package/slc/optimize.md +4 -1
  72. package/slc/prefix-prompts.mjs +191 -0
  73. package/slc/prefix.md +203 -0
  74. package/slc/slc.pin-inputs.json +11 -1
  75. package/slc/text2gears.md +71 -11
  76. package/src/xstate-playbook-runtime.d.ts +82 -9
  77. package/src/xstate-playbook-runtime.js +1224 -283
  78. package/src/xstate-playbook-runtime.ts +1671 -338
  79. package/src/xstate-runtime.d.ts +3 -1
  80. package/src/xstate-runtime.js +9 -2
  81. package/src/xstate-runtime.ts +12 -2
@@ -1,4 +1,5 @@
1
- import { type DecidePlaybookHostCapabilities, type PlaybookRuntime } from './decide.playbook.js';
1
+ import { type PlaybookHostCapabilities, type PlaybookRuntime } from './decide.playbook.js';
2
+ import type { PlaybookHostConstructionCapabilities } from '../code.playbook/playbook-captain.js';
2
3
  export interface PlaybookSummaryPolicy {
3
4
  stateCountLabels: Readonly<Record<string, string>>;
4
5
  copyPasteGuardNames: readonly string[];
@@ -14,14 +15,17 @@ export interface DecidePlaybookRegistryEntry {
14
15
  intent: string;
15
16
  artifactSchema: 3;
16
17
  runtimeProfile: {
17
- readonly kind: 'bespoke';
18
- readonly artifactSchema: 3;
18
+ readonly kind: 'shared-factory';
19
+ readonly compat: {
20
+ readonly artifactSchema: 3;
21
+ readonly runtimeAbi: number;
22
+ };
19
23
  };
20
24
  requiredRoleIds: readonly ['coder', 'reviewer'];
21
25
  concurrentRoleSets: readonly [readonly ['coder', 'reviewer']];
22
26
  summaryPolicy: PlaybookSummaryPolicy;
23
27
  validateOptions(optionSlice: unknown): DecideOptions;
24
- createRuntime(options: DecideOptions, hostCapabilities: DecidePlaybookHostCapabilities): PlaybookRuntime;
28
+ createRuntime(options: DecideOptions, hostCapabilities: PlaybookHostConstructionCapabilities & PlaybookHostCapabilities): PlaybookRuntime;
25
29
  }
26
30
  export declare const decideStateCountLabels: {
27
31
  readonly independentProposals: "proposal round";
@@ -44,8 +44,8 @@ export const decidePlaybookRegistryEntry = {
44
44
  intent: 'synthesize independent Coder and Reviewer proposals into an approved spec-design commit',
45
45
  artifactSchema: 3,
46
46
  runtimeProfile: Object.freeze({
47
- kind: 'bespoke',
48
- artifactSchema: 3,
47
+ kind: 'shared-factory',
48
+ compat: createPlaybookRuntime.compat,
49
49
  }),
50
50
  requiredRoleIds: ['coder', 'reviewer'],
51
51
  concurrentRoleSets: [['coder', 'reviewer']],
@@ -2,9 +2,10 @@
2
2
  // SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
3
3
 
4
4
  import createPlaybookRuntime, {
5
- type DecidePlaybookHostCapabilities,
5
+ type PlaybookHostCapabilities,
6
6
  type PlaybookRuntime,
7
7
  } from './decide.playbook.js';
8
+ import type { PlaybookHostConstructionCapabilities } from '../code.playbook/playbook-captain.js';
8
9
 
9
10
  export interface PlaybookSummaryPolicy {
10
11
  stateCountLabels: Readonly<Record<string, string>>;
@@ -23,16 +24,22 @@ export interface DecidePlaybookRegistryEntry {
23
24
  intent: string;
24
25
  artifactSchema: 3;
25
26
  runtimeProfile: {
26
- readonly kind: 'bespoke';
27
- readonly artifactSchema: 3;
27
+ readonly kind: 'shared-factory';
28
+ readonly compat: {
29
+ readonly artifactSchema: 3;
30
+ readonly runtimeAbi: number;
31
+ };
28
32
  };
29
33
  requiredRoleIds: readonly ['coder', 'reviewer'];
30
34
  concurrentRoleSets: readonly [readonly ['coder', 'reviewer']];
31
35
  summaryPolicy: PlaybookSummaryPolicy;
32
36
  validateOptions(optionSlice: unknown): DecideOptions;
37
+ // The linked module types live authority as opaque (link-materialization);
38
+ // the Captain entry binds its own construction capabilities here.
33
39
  createRuntime(
34
40
  options: DecideOptions,
35
- hostCapabilities: DecidePlaybookHostCapabilities,
41
+ hostCapabilities: PlaybookHostConstructionCapabilities &
42
+ PlaybookHostCapabilities,
36
43
  ): PlaybookRuntime;
37
44
  }
38
45
 
@@ -98,8 +105,8 @@ export const decidePlaybookRegistryEntry: DecidePlaybookRegistryEntry = {
98
105
  'synthesize independent Coder and Reviewer proposals into an approved spec-design commit',
99
106
  artifactSchema: 3,
100
107
  runtimeProfile: Object.freeze({
101
- kind: 'bespoke',
102
- artifactSchema: 3,
108
+ kind: 'shared-factory',
109
+ compat: createPlaybookRuntime.compat,
103
110
  }),
104
111
  requiredRoleIds: ['coder', 'reviewer'],
105
112
  concurrentRoleSets: [['coder', 'reviewer']],
@@ -1,41 +1,46 @@
1
+ import type { PlaybookCallResult } from '@sublang/playbook/runtime';
1
2
  export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
2
3
  readonly [key: string]: JsonValue;
3
4
  };
4
- export type DevStateId = 'planAnalysis' | 'createBranch' | 'callCode' | 'callDecide' | 'callCodeAfterDecide' | 'openPullRequest';
5
- export type DevSourceItem = 'DEV-1' | 'DEV-2' | 'DEV-3' | 'DEV-4' | 'DEV-5' | 'DEV-6';
5
+ /** DEV declares no parallel group. */
6
+ export declare const concurrentRoleSets: readonly (readonly string[])[];
7
+ export type DevRole = 'analyst';
6
8
  export type DevChildPlaybookId = 'code' | 'decide' | 'branch' | 'pr';
9
+ export type DevCallStateId = 'callCode' | 'callDecide' | 'callCodeAfterDecide' | 'createBranch' | 'openPullRequest';
10
+ export type DevCallSourceItem = 'DEV-2' | 'DEV-3' | 'DEV-4' | 'DEV-5' | 'DEV-6';
11
+ type ResumableStateId = 'planAnalysis';
7
12
  /**
8
- * DR-050: the development path a pull-request planning outcome selected. It
9
- * routes the `branch` success into `callCode` or `callDecide`, so the plain
10
- * `code` and `decide then code` paths keep their items, prompts, and edges.
13
+ * The development path a pull-request planning outcome selected. It routes
14
+ * the `branch` success into the `code` call (DEV-2) or the `decide` call
15
+ * (DEV-3); its absence means a plain path that calls neither `branch` nor `pr`.
11
16
  */
12
17
  export type DevPullRequestPath = 'code' | 'decide-then-code';
13
- export type PendingBossQuestion = {
14
- readonly questionId: 'planAnalysis';
15
- readonly resumeStateId: 'planAnalysis';
18
+ export interface PendingBossQuestion {
19
+ readonly questionId: ResumableStateId;
20
+ readonly resumeStateId: ResumableStateId;
16
21
  readonly sourceItem: 'DEV-1';
17
22
  readonly asker: {
18
23
  readonly kind: 'role';
19
- readonly roleId: 'analyst';
24
+ readonly roleId: DevRole;
20
25
  };
21
26
  readonly question: string;
22
- };
23
- export type DiscussionExchange = {
24
- readonly question: string;
25
- readonly answer: string;
26
- };
27
- export type PlayerInput = {
28
- readonly stateId: 'planAnalysis';
29
- readonly role: 'analyst';
27
+ }
28
+ type PendingBossQuestionParams = Omit<PendingBossQuestion, 'questionId' | 'question'>;
29
+ export interface PlayerInput {
30
+ readonly stateId: ResumableStateId;
31
+ readonly role: DevRole;
30
32
  readonly sourceItem: 'DEV-1';
31
33
  readonly prompt: string;
32
34
  readonly result: Readonly<Record<string, string>>;
35
+ /** Substitutes `<development-request>`. */
33
36
  readonly developmentRequest: string;
37
+ /** Substitutes `<discussion-context>`. */
34
38
  readonly discussionContext: string;
39
+ /** Substitutes `<run-results>`. */
35
40
  readonly runResults: string;
36
41
  readonly pendingBossQuestion?: PendingBossQuestion;
37
42
  readonly bossReply?: string;
38
- };
43
+ }
39
44
  export type PlayerOutput = {
40
45
  readonly guard: 'discussionComplete';
41
46
  } | {
@@ -54,50 +59,25 @@ export type PlayerOutput = {
54
59
  readonly guard: 'needsBossReply';
55
60
  readonly question: string;
56
61
  };
57
- export type PlaybookInput = {
58
- readonly stateId: 'createBranch' | 'callCode' | 'callDecide' | 'callCodeAfterDecide' | 'openPullRequest';
59
- readonly sourceItem: 'DEV-2' | 'DEV-3' | 'DEV-4' | 'DEV-5' | 'DEV-6';
62
+ export interface PlaybookInput {
63
+ readonly stateId: DevCallStateId;
64
+ readonly sourceItem: DevCallSourceItem;
60
65
  readonly playbookId: DevChildPlaybookId;
61
66
  readonly text: string;
62
- };
63
- /**
64
- * The affirmative success proof DEV requires from `decide`'s canonical
65
- * structured terminal output before starting the dependent `code` call:
66
- * the `decide`-owned commit, the exact evaluated repository revision, and
67
- * the affirmative no-unsettled-findings fact. Additional members belong to
68
- * DECIDE's own contract and do not disprove success.
69
- */
70
- export type DecideSuccessOutput = {
71
- readonly decideCommit: string;
72
- readonly evaluatedRevision: string;
73
- readonly noUnsettledFindings: true;
74
- };
75
- /**
76
- * The fields DEV consumes from `branch`'s canonical structured terminal
77
- * output before continuing a pull-request path: the exact branch name, the
78
- * exact base revision, and the issue summary. Additional members belong to
79
- * BRANCH's own contract and do not disprove success; a missing member is an
80
- * insufficient result, never an empty default.
81
- */
82
- export type BranchSuccessOutput = {
83
- readonly branch: string;
84
- readonly baseRevision: string;
85
- readonly issueSummary: string;
86
- };
87
- /**
88
- * The fields DEV consumes from `code`'s canonical structured terminal output
89
- * before starting the dependent `pr` call: the exact last `code`-owned commit
90
- * and the exact final evaluated repository revision.
91
- */
92
- export type CodeSuccessOutput = {
93
- readonly lastCodeCommit: string;
94
- readonly finalEvaluatedRevision: string;
95
- };
96
- export type CompactError = {
67
+ }
68
+ /** The child's JSON-safe machine output itself, delivered on `onDone`. */
69
+ export type PlaybookOutput = JsonValue | undefined;
70
+ export interface CompactError {
97
71
  readonly name: string;
98
72
  readonly message: string;
99
- };
100
- /** Sanitized canonical child result relayed as DEV's own failure outcome. */
73
+ }
74
+ /** A control-plane error retained for inspection while DEV is parked. */
75
+ export interface ControlError {
76
+ readonly name: string;
77
+ readonly message: string;
78
+ readonly stack?: string;
79
+ }
80
+ /** Sanitized canonical child result that DEV relays as its own outcome. */
101
81
  export type CompletedChildResult = {
102
82
  readonly playbookId: DevChildPlaybookId;
103
83
  readonly status: 'ok';
@@ -113,60 +93,69 @@ export type DevPlaybookOutput = {
113
93
  readonly status: 'complete';
114
94
  /** The final child of the selected path: `pr` on a pull-request path. */
115
95
  readonly childPlaybookId: 'code' | 'pr';
116
- /** The successful result of DEV's final child call, when it has one. */
96
+ /** The successful result of that final child call, when it has one. */
117
97
  readonly childOutput?: JsonValue;
118
98
  } | {
119
99
  readonly status: 'child-failed';
120
100
  /** The relayed canonical child result that ended the selected path. */
121
101
  readonly childResult: CompletedChildResult;
122
102
  };
123
- export type DevInput = {
124
- readonly runResults?: string;
103
+ type DevCompletion = {
104
+ readonly kind: 'discussion-complete';
105
+ } | {
106
+ readonly kind: 'complete';
107
+ readonly childPlaybookId: 'code' | 'pr';
108
+ readonly childOutput?: JsonValue;
109
+ } | {
110
+ readonly kind: 'child-failed';
111
+ readonly childResult: CompletedChildResult;
125
112
  };
126
- export type DevContext = {
113
+ export interface DevInput {
114
+ /** Optional seed for `<run-results>`; absent means no relevant run results. */
115
+ readonly runResults?: string;
116
+ }
117
+ export interface DevContext {
127
118
  readonly runResults: string;
128
119
  readonly developmentRequest?: string;
129
- readonly discussionExchanges: readonly DiscussionExchange[];
120
+ /** Consumed Analyst Q&A for `<discussion-context>`; empty before any reply. */
121
+ readonly discussionContext: string;
130
122
  readonly planningResult?: string;
123
+ readonly pullRequestPath?: DevPullRequestPath;
131
124
  readonly decideCommit?: string;
132
125
  readonly evaluatedRevision?: string;
133
- /** DR-050: whether the accepted planning outcome selected a pull-request path. */
134
- readonly deliveryViaPullRequest: boolean;
135
- readonly pullRequestPath?: DevPullRequestPath;
136
126
  readonly branch?: string;
137
127
  readonly baseRevision?: string;
138
128
  readonly issueSummary?: string;
139
129
  readonly lastCodeCommit?: string;
140
130
  readonly finalEvaluatedRevision?: string;
141
- readonly completion?: 'discussion-complete' | 'complete' | 'child-failed';
142
- readonly childOutput?: JsonValue;
143
- readonly childFailure?: CompletedChildResult;
144
- readonly lastError?: unknown;
131
+ readonly completion?: DevCompletion;
132
+ readonly lastError?: ControlError;
145
133
  readonly pendingBossQuestion?: PendingBossQuestion;
146
134
  readonly bossReply?: string;
147
- };
135
+ }
148
136
  export type DevEvent = {
149
137
  readonly type: 'START_DEV';
150
138
  readonly developmentRequest: string;
151
139
  } | {
152
140
  readonly type: 'BOSS_REPLY';
153
141
  readonly answer: string;
154
- readonly questionId?: 'planAnalysis';
142
+ readonly questionId?: string;
155
143
  };
156
- /** Consumed planning Q&A rendered for later relayed discussion context. */
157
- export declare function renderDiscussionContext(exchanges: readonly DiscussionExchange[]): string;
144
+ export declare function authoredChildResult(error: unknown, expectedPlaybookId: string): PlaybookCallResult | undefined;
145
+ /** One consumed Analyst question and Boss reply, as relayed discussion. */
146
+ export declare function renderDiscussionExchange(question: string, answer: string): string;
158
147
  export declare const devMachine: import("xstate").StateMachine<DevContext, {
159
148
  readonly type: "START_DEV";
160
149
  readonly developmentRequest: string;
161
150
  } | {
162
151
  readonly type: "BOSS_REPLY";
163
152
  readonly answer: string;
164
- readonly questionId?: "planAnalysis";
153
+ readonly questionId?: string;
165
154
  }, {
166
- [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<JsonValue | undefined, PlaybookInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<PlayerOutput, PlayerInput, import("xstate").EventObject>> | undefined;
155
+ [x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<PlaybookOutput, PlaybookInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<PlayerOutput, PlayerInput, import("xstate").EventObject>> | undefined;
167
156
  }, {
168
157
  src: "playbook";
169
- logic: import("xstate").PromiseActorLogic<JsonValue | undefined, PlaybookInput, import("xstate").EventObject>;
158
+ logic: import("xstate").PromiseActorLogic<PlaybookOutput, PlaybookInput, import("xstate").EventObject>;
170
159
  id: string | undefined;
171
160
  } | {
172
161
  src: "player";
@@ -182,36 +171,35 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
182
171
  } | {
183
172
  type: "rememberActorError";
184
173
  params: import("xstate").NonReducibleUnknown;
185
- } | {
186
- type: "rememberPendingQuestion";
187
- params: import("xstate").NonReducibleUnknown;
188
174
  } | {
189
175
  type: "rememberBossReply";
190
176
  params: import("xstate").NonReducibleUnknown;
191
- } | {
192
- type: "rememberEmptyBossReplyError";
193
- params: import("xstate").NonReducibleUnknown;
194
177
  } | {
195
178
  type: "rememberMalformedPlayerOutput";
196
179
  params: import("xstate").NonReducibleUnknown;
197
180
  } | {
198
- type: "startDev";
181
+ type: "clearBossReplyContext";
199
182
  params: import("xstate").NonReducibleUnknown;
200
183
  } | {
201
- type: "completeDiscussion";
202
- params: import("xstate").NonReducibleUnknown;
184
+ type: "setPendingBossQuestion";
185
+ params: PendingBossQuestionParams;
203
186
  } | {
204
- type: "rememberCodePath";
187
+ type: "rememberMalformedBossReply";
205
188
  params: import("xstate").NonReducibleUnknown;
206
189
  } | {
207
- type: "rememberDecidePath";
190
+ type: "startDev";
208
191
  params: import("xstate").NonReducibleUnknown;
209
192
  } | {
210
- type: "rememberCodeViaPullRequestPath";
193
+ type: "completeDiscussion";
211
194
  params: import("xstate").NonReducibleUnknown;
212
195
  } | {
213
- type: "rememberDecideThenCodeViaPullRequestPath";
196
+ type: "acceptPlainPlan";
214
197
  params: import("xstate").NonReducibleUnknown;
198
+ } | {
199
+ type: "acceptPullRequestPlan";
200
+ params: {
201
+ readonly path: DevPullRequestPath;
202
+ };
215
203
  } | {
216
204
  type: "rememberBranchResult";
217
205
  params: import("xstate").NonReducibleUnknown;
@@ -223,86 +211,80 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
223
211
  params: import("xstate").NonReducibleUnknown;
224
212
  } | {
225
213
  type: "completeWithChildSuccess";
226
- params: import("xstate").NonReducibleUnknown;
227
- } | {
228
- type: "completeWithInsufficientBranchResult";
229
- params: import("xstate").NonReducibleUnknown;
230
- } | {
231
- type: "completeWithInsufficientCodeResult";
232
- params: import("xstate").NonReducibleUnknown;
233
- } | {
234
- type: "completeWithInsufficientDecideResult";
235
- params: import("xstate").NonReducibleUnknown;
236
- } | {
237
- type: "completeWithBranchFailure";
238
- params: import("xstate").NonReducibleUnknown;
239
- } | {
240
- type: "completeWithCodeFailure";
241
- params: import("xstate").NonReducibleUnknown;
214
+ params: {
215
+ readonly childPlaybookId: "code" | "pr";
216
+ };
242
217
  } | {
243
- type: "completeWithDecideFailure";
244
- params: import("xstate").NonReducibleUnknown;
218
+ type: "completeWithInsufficientResult";
219
+ params: {
220
+ readonly playbookId: DevChildPlaybookId;
221
+ };
245
222
  } | {
246
- type: "completeWithPrFailure";
247
- params: import("xstate").NonReducibleUnknown;
223
+ type: "completeWithAuthoredChildResult";
224
+ params: {
225
+ readonly playbookId: DevChildPlaybookId;
226
+ };
248
227
  }, {
249
- type: "needsBossReply";
228
+ type: "needsBossReplyWithQuestion";
250
229
  params: unknown;
251
230
  } | {
252
231
  type: "emptyBossReply";
253
232
  params: unknown;
254
233
  } | {
255
- type: "isDiscussionComplete";
234
+ type: "startsDev";
256
235
  params: unknown;
257
236
  } | {
258
- type: "isCodePath";
237
+ type: "discussionCompleteAfterBossReply";
259
238
  params: unknown;
260
239
  } | {
261
- type: "isDecideThenCode";
240
+ type: "needsBossReplyWithoutQuestion";
262
241
  params: unknown;
263
242
  } | {
264
- type: "isCodeViaPullRequest";
243
+ type: "decideSucceeded";
265
244
  params: unknown;
266
245
  } | {
267
- type: "isDecideThenCodeViaPullRequest";
246
+ type: "codeSucceededOnPullRequestPath";
268
247
  params: unknown;
269
248
  } | {
270
- type: "isBranchSuccessForCode";
249
+ type: "codeSucceededOnPlainPath";
271
250
  params: unknown;
272
251
  } | {
273
- type: "isBranchSuccessForDecide";
252
+ type: "codePlanned";
274
253
  params: unknown;
275
254
  } | {
276
- type: "isCodeSuccessViaPullRequest";
255
+ type: "decideThenCodePlanned";
277
256
  params: unknown;
278
257
  } | {
279
- type: "isPlainCodeSuccess";
258
+ type: "codeViaPullRequestPlanned";
280
259
  params: unknown;
281
260
  } | {
282
- type: "isDecideSuccess";
261
+ type: "decideThenCodeViaPullRequestPlanned";
283
262
  params: unknown;
284
263
  } | {
285
- type: "authoredBranchFailure";
264
+ type: "branchSucceededForCode";
286
265
  params: unknown;
287
266
  } | {
288
- type: "authoredCodeFailure";
267
+ type: "branchSucceededForDecide";
289
268
  params: unknown;
290
269
  } | {
291
- type: "authoredDecideFailure";
270
+ type: "authoredBranchResult";
292
271
  params: unknown;
293
272
  } | {
294
- type: "authoredPrFailure";
273
+ type: "authoredDecideResult";
295
274
  params: unknown;
296
275
  } | {
297
- type: "resumesPlanAnalysis";
276
+ type: "authoredCodeResult";
298
277
  params: unknown;
299
- }, never, "done" | "failed" | "ready" | "awaitBossReply" | "planAnalysis" | "createBranch" | "callCode" | "callDecide" | "callCodeAfterDecide" | "openPullRequest" | "discussionComplete" | "reportedChildFailure", string, DevInput, {
278
+ } | {
279
+ type: "authoredPrResult";
280
+ params: unknown;
281
+ }, never, "done" | "failed" | "ready" | "awaitBossReply" | "callCode" | "callDecide" | "callCodeAfterDecide" | "createBranch" | "openPullRequest" | "planAnalysis" | "discussionComplete" | "reportedChildFailure", string, DevInput, {
300
282
  readonly status: "discussion-complete";
301
283
  } | {
302
284
  readonly status: "complete";
303
285
  /** The final child of the selected path: `pr` on a pull-request path. */
304
286
  readonly childPlaybookId: "code" | "pr";
305
- /** The successful result of DEV's final child call, when it has one. */
287
+ /** The successful result of that final child call, when it has one. */
306
288
  readonly childOutput?: JsonValue;
307
289
  } | {
308
290
  readonly status: "child-failed";
@@ -317,6 +299,9 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
317
299
  readonly planAnalysis: {
318
300
  id: "planAnalysis";
319
301
  };
302
+ readonly awaitBossReply: {
303
+ id: "awaitBossReply";
304
+ };
320
305
  readonly createBranch: {
321
306
  id: "createBranch";
322
307
  };
@@ -332,9 +317,6 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
332
317
  readonly openPullRequest: {
333
318
  id: "openPullRequest";
334
319
  };
335
- readonly awaitBossReply: {
336
- id: "awaitBossReply";
337
- };
338
320
  readonly failed: {
339
321
  id: "failed";
340
322
  };