@sublang/playbook 11.0.0 → 12.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/docs/cli.md +9 -6
- package/docs/configuration.md +15 -1
- package/package.json +22 -3
- package/reference/sdlc/code.playbook/code.fsm.d.ts +22 -19
- package/reference/sdlc/code.playbook/code.fsm.js +116 -52
- package/reference/sdlc/code.playbook/code.fsm.ts +149 -64
- package/reference/sdlc/code.playbook/code.gears.md +40 -20
- package/reference/sdlc/code.playbook/code.playbook.js +23 -2
- package/reference/sdlc/code.playbook/code.playbook.ts +23 -2
- package/reference/sdlc/code.playbook/playbook.config.template.yaml +18 -2
- package/reference/sdlc/decide.playbook/decide.fsm.d.ts +13 -6
- package/reference/sdlc/decide.playbook/decide.fsm.js +54 -27
- package/reference/sdlc/decide.playbook/decide.fsm.ts +68 -29
- package/reference/sdlc/decide.playbook/decide.gears.md +25 -19
- package/reference/sdlc/decide.playbook/decide.playbook.js +11 -3
- package/reference/sdlc/decide.playbook/decide.playbook.ts +11 -3
- package/reference/sdlc/decide.playbook/decide.registry.js +1 -1
- package/reference/sdlc/decide.playbook/decide.registry.ts +1 -1
- package/reference/sdlc/dev.md +52 -0
- package/reference/sdlc/dev.playbook/dev.fsm.d.ts +261 -0
- package/reference/sdlc/dev.playbook/dev.fsm.js +723 -0
- package/reference/sdlc/dev.playbook/dev.fsm.ts +988 -0
- package/reference/sdlc/dev.playbook/dev.gears.md +91 -0
- package/reference/sdlc/dev.playbook/dev.playbook.d.ts +21 -0
- package/reference/sdlc/dev.playbook/dev.playbook.js +143 -0
- package/reference/sdlc/dev.playbook/dev.playbook.ts +246 -0
- package/reference/sdlc/dev.playbook/dev.registry.d.ts +40 -0
- package/reference/sdlc/dev.playbook/dev.registry.js +64 -0
- package/reference/sdlc/dev.playbook/dev.registry.ts +120 -0
- package/reference/sdlc/review.playbook/review.fsm.d.ts +15 -2
- package/reference/sdlc/review.playbook/review.fsm.js +77 -27
- package/reference/sdlc/review.playbook/review.fsm.ts +96 -30
- package/reference/sdlc/review.playbook/review.gears.md +52 -26
- package/reference/sdlc/review.playbook/review.playbook.js +17 -7
- package/reference/sdlc/review.playbook/review.playbook.ts +17 -7
- package/reference/sdlc/review.playbook/review.registry.js +1 -1
- package/reference/sdlc/review.playbook/review.registry.ts +1 -1
- package/slc/link.md +12 -5
- package/slc/text2gears.md +3 -0
- package/src/xstate-playbook-runtime.js +5 -2
- package/src/xstate-playbook-runtime.ts +5 -2
- package/src/xstate-runtime.js +13 -1
- package/src/xstate-runtime.ts +13 -1
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
The caller supplies a topic as `callerTopic`.
|
|
14
14
|
Coder and Reviewer receive the complete topic concurrently and independently.
|
|
15
|
-
Neither role's player receives the other role's proposal before both proposals
|
|
15
|
+
Neither role's player receives the other role's proposal before both proposals are complete.
|
|
16
|
+
A proposal is complete only when its player affirmatively provides a complete design proposal; a progress report, status update, or promise of a later proposal supports no proposal outcome.
|
|
16
17
|
A Boss interrupt during the parallel proposal pair restarts the complete pair with the new `callerTopic`.
|
|
17
18
|
|
|
18
19
|
### DECIDE-1
|
|
@@ -30,7 +31,7 @@ When the caller gives a topic, Captain shall relay the complete topic to Coder i
|
|
|
30
31
|
> Do not change any files.
|
|
31
32
|
|
|
32
33
|
Results:
|
|
33
|
-
- `proposed`: Coder
|
|
34
|
+
- `proposed`: Coder affirmatively provided a complete design proposal; a progress report, status update, or promise of a later proposal supports no proposal outcome. Output shall include `coderProposal: <verbatim final text>`.
|
|
34
35
|
|
|
35
36
|
### DECIDE-2
|
|
36
37
|
|
|
@@ -47,39 +48,44 @@ When the caller gives a topic, Captain shall relay the complete topic to Reviewe
|
|
|
47
48
|
> Do not change any files.
|
|
48
49
|
|
|
49
50
|
Results:
|
|
50
|
-
- `proposed`: Reviewer
|
|
51
|
+
- `proposed`: Reviewer affirmatively provided a complete design proposal; a progress report, status update, or promise of a later proposal supports no proposal outcome. Output shall include `reviewerProposal: <verbatim final text>`.
|
|
51
52
|
|
|
52
|
-
##
|
|
53
|
+
## Synthesize and commit
|
|
53
54
|
|
|
54
55
|
### DECIDE-3
|
|
55
56
|
|
|
56
|
-
When both independent proposals are complete, Captain shall prompt Coder:
|
|
57
|
+
When both independent proposals are complete, Captain shall relay the complete topic and Reviewer's complete proposal to Coder under their own labels in quotes and prompt Coder:
|
|
57
58
|
|
|
58
|
-
>
|
|
59
|
+
> Synthesize your independent proposal with Reviewer's proposal below.
|
|
60
|
+
> Keep to the original topic below and follow what it asks.
|
|
61
|
+
> Keep the best, essential parts of either proposal and reject any point that is unsound, unnecessary, or outside the topic.
|
|
62
|
+
> Turn the resulting design into the necessary DRs and/or spec items.
|
|
59
63
|
> Follow @specs/meta.md and update @specs/map.md when needed.
|
|
60
|
-
> Do not
|
|
61
|
-
> Do not change code or implement the proposal.
|
|
64
|
+
> Do not change code or implement the design.
|
|
62
65
|
>
|
|
63
66
|
> Commit the result as one new commit, following @specs/packages/git.md.
|
|
64
67
|
> Make the commit message explain concisely what changed and why.
|
|
65
|
-
>
|
|
68
|
+
> Identify every new commit you make.
|
|
69
|
+
> Coder is <coder-llm> and Reviewer is <reviewer-llm>.
|
|
70
|
+
>
|
|
71
|
+
> > Original topic: <caller-topic>
|
|
72
|
+
> > Reviewer's independent proposal: <reviewer-proposal>
|
|
66
73
|
|
|
67
74
|
Results:
|
|
68
|
-
- `committed`: Coder committed
|
|
75
|
+
- `committed`: Coder synthesized both proposals and committed the resulting design as one new commit. Output shall include `coderOutput: <verbatim final text>` and `latestCommit: <commit identity>`.
|
|
76
|
+
|
|
77
|
+
No transition depends on a fixed presentation format of either player's reply; the repository-effect receipt is the authoritative identity of Coder's new `decide`-owned commit.
|
|
69
78
|
|
|
70
79
|
## Review
|
|
71
80
|
|
|
72
81
|
### DECIDE-4
|
|
73
82
|
|
|
74
|
-
When Coder commits, Captain shall call playbook `review
|
|
83
|
+
When Coder commits, Captain shall call playbook `review` with the following input in quotes:
|
|
75
84
|
|
|
76
|
-
>
|
|
77
|
-
>
|
|
78
|
-
>
|
|
79
|
-
>
|
|
80
|
-
> Initial intent: <caller-topic>.
|
|
81
|
-
> Coder's independent proposal: <coder-proposal>.
|
|
85
|
+
> > Original intent: <caller-topic>
|
|
86
|
+
> > Review scope: the `decide`-owned commit <decide-commit> and its resulting repository state.
|
|
87
|
+
> > Coder output: <coder-output>
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
An authored
|
|
89
|
+
`decide` is complete only when `review` returns a result that applies to the supplied review scope, gives the exact evaluated repository revision, and affirmatively establishes that no unsettled findings remain; `decide` then returns the `decide`-owned commit and that evaluated revision to the caller.
|
|
90
|
+
An authored `review` abort or failure, or a terminal result that does not establish those facts, terminates with the failure and the last `decide`-owned commit reported to the caller.
|
|
85
91
|
Any other nested-call error parks `decide` as failed and retains the control-plane error.
|
|
@@ -123,7 +123,10 @@ const TRACE_TOPIC = 'playbook.trace';
|
|
|
123
123
|
const UNRESOLVED_EFFECT_RECONCILIATION_ACTION_ID = 'reconcile:unresolved-effect';
|
|
124
124
|
const UNRESOLVED_EFFECT_ABANDONMENT_ACTION_ID = 'abandon:unresolved-effect';
|
|
125
125
|
const CONTINUATION_PREAMBLE = 'You previously paused this task to ask Boss a question; Boss has now replied. Continue the same task using the reply below.';
|
|
126
|
-
const PLACEHOLDER_FIELDS = [
|
|
126
|
+
const PLACEHOLDER_FIELDS = [
|
|
127
|
+
['<caller-topic>', 'callerTopic'],
|
|
128
|
+
['<reviewer-proposal>', 'reviewerProposal'],
|
|
129
|
+
];
|
|
127
130
|
const VERBATIM_PAYLOAD_FIELDS = new Set([
|
|
128
131
|
'coderProposal',
|
|
129
132
|
'reviewerProposal',
|
|
@@ -151,12 +154,17 @@ function composePlayerPrompt(input, promptIdentity) {
|
|
|
151
154
|
if (input.prompt.includes('<coder-llm>')) {
|
|
152
155
|
replacements.set('<coder-llm>', promptIdentity('coder'));
|
|
153
156
|
}
|
|
154
|
-
|
|
157
|
+
if (input.prompt.includes('<reviewer-llm>')) {
|
|
158
|
+
replacements.set('<reviewer-llm>', promptIdentity('reviewer'));
|
|
159
|
+
}
|
|
160
|
+
const body = input.prompt.replace(/<caller-topic>|<reviewer-proposal>|<coder-llm>|<reviewer-llm>/g, (placeholder, offset, source) => {
|
|
155
161
|
const value = replacements.get(placeholder);
|
|
156
162
|
if (value === undefined)
|
|
157
163
|
return placeholder;
|
|
164
|
+
// A labelled quoted relay keeps a multiline value inside its authored
|
|
165
|
+
// blockquote, so continuation lines re-enter the quote marker.
|
|
158
166
|
const lineStart = source.lastIndexOf('\n', offset - 1) + 1;
|
|
159
|
-
return source.slice(lineStart, offset)
|
|
167
|
+
return source.slice(lineStart, offset).startsWith('> ')
|
|
160
168
|
? value.replaceAll('\n', '\n> ')
|
|
161
169
|
: value;
|
|
162
170
|
});
|
|
@@ -284,7 +284,10 @@ const CONTINUATION_PREAMBLE =
|
|
|
284
284
|
'You previously paused this task to ask Boss a question; Boss has now replied. Continue the same task using the reply below.';
|
|
285
285
|
|
|
286
286
|
const PLACEHOLDER_FIELDS: ReadonlyArray<readonly [string, keyof PlayerInput]> =
|
|
287
|
-
[
|
|
287
|
+
[
|
|
288
|
+
['<caller-topic>', 'callerTopic'],
|
|
289
|
+
['<reviewer-proposal>', 'reviewerProposal'],
|
|
290
|
+
];
|
|
288
291
|
|
|
289
292
|
const VERBATIM_PAYLOAD_FIELDS: ReadonlySet<string> = new Set([
|
|
290
293
|
'coderProposal',
|
|
@@ -322,13 +325,18 @@ function composePlayerPrompt(
|
|
|
322
325
|
if (input.prompt.includes('<coder-llm>')) {
|
|
323
326
|
replacements.set('<coder-llm>', promptIdentity('coder'));
|
|
324
327
|
}
|
|
328
|
+
if (input.prompt.includes('<reviewer-llm>')) {
|
|
329
|
+
replacements.set('<reviewer-llm>', promptIdentity('reviewer'));
|
|
330
|
+
}
|
|
325
331
|
const body = input.prompt.replace(
|
|
326
|
-
/<caller-topic>|<coder-llm>/g,
|
|
332
|
+
/<caller-topic>|<reviewer-proposal>|<coder-llm>|<reviewer-llm>/g,
|
|
327
333
|
(placeholder, offset: number, source: string) => {
|
|
328
334
|
const value = replacements.get(placeholder);
|
|
329
335
|
if (value === undefined) return placeholder;
|
|
336
|
+
// A labelled quoted relay keeps a multiline value inside its authored
|
|
337
|
+
// blockquote, so continuation lines re-enter the quote marker.
|
|
330
338
|
const lineStart = source.lastIndexOf('\n', offset - 1) + 1;
|
|
331
|
-
return source.slice(lineStart, offset)
|
|
339
|
+
return source.slice(lineStart, offset).startsWith('> ')
|
|
332
340
|
? value.replaceAll('\n', '\n> ')
|
|
333
341
|
: value;
|
|
334
342
|
},
|
|
@@ -41,7 +41,7 @@ export function validateDecideOptions(optionSlice) {
|
|
|
41
41
|
export const decidePlaybookRegistryEntry = {
|
|
42
42
|
id: 'decide',
|
|
43
43
|
command: 'decide',
|
|
44
|
-
intent: '
|
|
44
|
+
intent: 'synthesize independent Coder and Reviewer proposals into an approved spec-design commit',
|
|
45
45
|
artifactSchema: 3,
|
|
46
46
|
runtimeProfile: Object.freeze({
|
|
47
47
|
kind: 'bespoke',
|
|
@@ -95,7 +95,7 @@ export const decidePlaybookRegistryEntry: DecidePlaybookRegistryEntry = {
|
|
|
95
95
|
id: 'decide',
|
|
96
96
|
command: 'decide',
|
|
97
97
|
intent:
|
|
98
|
-
'
|
|
98
|
+
'synthesize independent Coder and Reviewer proposals into an approved spec-design commit',
|
|
99
99
|
artifactSchema: 3,
|
|
100
100
|
runtimeProfile: Object.freeze({
|
|
101
101
|
kind: 'bespoke',
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
<!-- SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai> -->
|
|
3
|
+
<!-- AI agents: do not edit this file without human approval. -->
|
|
4
|
+
|
|
5
|
+
# Dev
|
|
6
|
+
|
|
7
|
+
Roles:
|
|
8
|
+
|
|
9
|
+
- Analyst
|
|
10
|
+
|
|
11
|
+
The caller supplies a development request including any desired outcome, scope, and context.
|
|
12
|
+
|
|
13
|
+
`dev` is an optional repository-aware planner for a development request that needs more analysis before choosing a development path.
|
|
14
|
+
It coordinates existing playbooks and owns no repository commit itself.
|
|
15
|
+
|
|
16
|
+
At the start of `dev` and after each Boss reply, Captain shall relay the development request, relevant discussion context, and any relevant run results to Analyst in quotes (`>`), along with the following instruction:
|
|
17
|
+
|
|
18
|
+
```markdown
|
|
19
|
+
Inspect the request and the relevant repository and specs only as needed to determine the smallest sound next step.
|
|
20
|
+
Do not change files or commit while planning or discussing the request.
|
|
21
|
+
|
|
22
|
+
- If useful analysis or clarification should be discussed before any repository work, give Boss the useful response and ask one material question that advances the decision.
|
|
23
|
+
- If the discussion has concluded after a Boss reply and no repository work should follow, choose `discussion complete`.
|
|
24
|
+
- If implementation can proceed under the existing decisions, choose `code`.
|
|
25
|
+
- If implementation first requires a new or amended durable decision that the existing specs do not settle, choose `decide then code`.
|
|
26
|
+
|
|
27
|
+
A question or exploratory discussion is not by itself authorization to create a durable decision or implement changes.
|
|
28
|
+
Do not choose `decide then code` merely because the work is large.
|
|
29
|
+
Consult @specs/map.md for relevant context and @specs/meta.md for spec requirements, if needed.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The planning result has four semantic outcomes: needs Boss reply, discussion complete, code, and decide then code.
|
|
33
|
+
Each outcome requires affirmative support in Analyst's result; absence of a reason to choose another outcome is not support.
|
|
34
|
+
No outcome depends on a fixed presentation format of Analyst's reply.
|
|
35
|
+
`dev` shall act on the accepted outcome itself and shall not return to the session Captain for another routing decision.
|
|
36
|
+
|
|
37
|
+
For needs Boss reply, `dev` shall use the standard Boss-question suspension with Analyst's complete response.
|
|
38
|
+
The session Captain shall present that response to Boss and, after Boss replies, resume `dev` with the question and answer in the same Analyst conversation.
|
|
39
|
+
|
|
40
|
+
Discussion complete is available only after a Boss reply, when any useful analysis has already been presented through needs Boss reply.
|
|
41
|
+
It completes `dev` without a child call or repository change.
|
|
42
|
+
|
|
43
|
+
For code, `dev` shall directly call playbook `code` with the development request, relevant discussion context, and planning result in quotes (`>`).
|
|
44
|
+
|
|
45
|
+
For decide then code, `dev` shall call playbook `decide` with the development request, relevant discussion context, and planning result in quotes (`>`).
|
|
46
|
+
Only after `decide` succeeds shall `dev` call playbook `code` with the development request, relevant discussion context, planning result, `decide`-owned commit, and exact evaluated repository revision in quotes (`>`).
|
|
47
|
+
`dev` shall not separately call `review` for the design scope already reviewed by `decide`.
|
|
48
|
+
|
|
49
|
+
`dev` completes with the successful result of its final child call.
|
|
50
|
+
If a child returns an authored abort or failure, or a terminal result that does not prove the success required for the selected path, `dev` shall start no later child and shall relay that canonical result.
|
|
51
|
+
If a child call fails outside its authored result contract, `dev` shall park as failed and retain the control-plane error.
|
|
52
|
+
`dev` shall consume commit identities only from each child's canonical structured result, never from player prose.
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
|
|
2
|
+
readonly [key: string]: JsonValue;
|
|
3
|
+
};
|
|
4
|
+
export type DevStateId = 'planAnalysis' | 'callCode' | 'callDecide' | 'callCodeAfterDecide';
|
|
5
|
+
export type DevSourceItem = 'DEV-1' | 'DEV-2' | 'DEV-3' | 'DEV-4';
|
|
6
|
+
export type DevChildPlaybookId = 'code' | 'decide';
|
|
7
|
+
export type PendingBossQuestion = {
|
|
8
|
+
readonly questionId: 'planAnalysis';
|
|
9
|
+
readonly resumeStateId: 'planAnalysis';
|
|
10
|
+
readonly sourceItem: 'DEV-1';
|
|
11
|
+
readonly asker: {
|
|
12
|
+
readonly kind: 'role';
|
|
13
|
+
readonly roleId: 'analyst';
|
|
14
|
+
};
|
|
15
|
+
readonly question: string;
|
|
16
|
+
};
|
|
17
|
+
export type DiscussionExchange = {
|
|
18
|
+
readonly question: string;
|
|
19
|
+
readonly answer: string;
|
|
20
|
+
};
|
|
21
|
+
export type PlayerInput = {
|
|
22
|
+
readonly stateId: 'planAnalysis';
|
|
23
|
+
readonly role: 'analyst';
|
|
24
|
+
readonly sourceItem: 'DEV-1';
|
|
25
|
+
readonly prompt: string;
|
|
26
|
+
readonly result: Readonly<Record<string, string>>;
|
|
27
|
+
readonly developmentRequest: string;
|
|
28
|
+
readonly discussionContext: string;
|
|
29
|
+
readonly runResults: string;
|
|
30
|
+
readonly pendingBossQuestion?: PendingBossQuestion;
|
|
31
|
+
readonly bossReply?: string;
|
|
32
|
+
};
|
|
33
|
+
export type PlayerOutput = {
|
|
34
|
+
readonly guard: 'discussionComplete';
|
|
35
|
+
} | {
|
|
36
|
+
readonly guard: 'code';
|
|
37
|
+
readonly planningResult: string;
|
|
38
|
+
} | {
|
|
39
|
+
readonly guard: 'decideThenCode';
|
|
40
|
+
readonly planningResult: string;
|
|
41
|
+
} | {
|
|
42
|
+
readonly guard: 'needsBossReply';
|
|
43
|
+
readonly question: string;
|
|
44
|
+
};
|
|
45
|
+
export type PlaybookInput = {
|
|
46
|
+
readonly stateId: 'callCode' | 'callDecide' | 'callCodeAfterDecide';
|
|
47
|
+
readonly sourceItem: 'DEV-2' | 'DEV-3' | 'DEV-4';
|
|
48
|
+
readonly playbookId: DevChildPlaybookId;
|
|
49
|
+
readonly text: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The affirmative success proof DEV requires from `decide`'s canonical
|
|
53
|
+
* structured terminal output before starting the dependent `code` call:
|
|
54
|
+
* the `decide`-owned commit, the exact evaluated repository revision, and
|
|
55
|
+
* the affirmative no-unsettled-findings fact. Additional members belong to
|
|
56
|
+
* DECIDE's own contract and do not disprove success.
|
|
57
|
+
*/
|
|
58
|
+
export type DecideSuccessOutput = {
|
|
59
|
+
readonly decideCommit: string;
|
|
60
|
+
readonly evaluatedRevision: string;
|
|
61
|
+
readonly noUnsettledFindings: true;
|
|
62
|
+
};
|
|
63
|
+
export type CompactError = {
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly message: string;
|
|
66
|
+
};
|
|
67
|
+
/** Sanitized canonical child result relayed as DEV's own failure outcome. */
|
|
68
|
+
export type CompletedChildResult = {
|
|
69
|
+
readonly playbookId: DevChildPlaybookId;
|
|
70
|
+
readonly status: 'ok';
|
|
71
|
+
readonly output?: JsonValue;
|
|
72
|
+
} | {
|
|
73
|
+
readonly playbookId: DevChildPlaybookId;
|
|
74
|
+
readonly status: 'aborted' | 'error';
|
|
75
|
+
readonly error: CompactError;
|
|
76
|
+
};
|
|
77
|
+
export type DevPlaybookOutput = {
|
|
78
|
+
readonly status: 'discussion-complete';
|
|
79
|
+
} | {
|
|
80
|
+
readonly status: 'complete';
|
|
81
|
+
readonly childPlaybookId: 'code';
|
|
82
|
+
/** The successful result of DEV's final child call, when it has one. */
|
|
83
|
+
readonly childOutput?: JsonValue;
|
|
84
|
+
} | {
|
|
85
|
+
readonly status: 'child-failed';
|
|
86
|
+
/** The relayed canonical child result that ended the selected path. */
|
|
87
|
+
readonly childResult: CompletedChildResult;
|
|
88
|
+
};
|
|
89
|
+
export type DevInput = {
|
|
90
|
+
readonly runResults?: string;
|
|
91
|
+
};
|
|
92
|
+
export type DevContext = {
|
|
93
|
+
readonly runResults: string;
|
|
94
|
+
readonly developmentRequest?: string;
|
|
95
|
+
readonly discussionExchanges: readonly DiscussionExchange[];
|
|
96
|
+
readonly planningResult?: string;
|
|
97
|
+
readonly decideCommit?: string;
|
|
98
|
+
readonly evaluatedRevision?: string;
|
|
99
|
+
readonly completion?: 'discussion-complete' | 'complete' | 'child-failed';
|
|
100
|
+
readonly childOutput?: JsonValue;
|
|
101
|
+
readonly childFailure?: CompletedChildResult;
|
|
102
|
+
readonly lastError?: unknown;
|
|
103
|
+
readonly pendingBossQuestion?: PendingBossQuestion;
|
|
104
|
+
readonly bossReply?: string;
|
|
105
|
+
};
|
|
106
|
+
export type DevEvent = {
|
|
107
|
+
readonly type: 'START_DEV';
|
|
108
|
+
readonly developmentRequest: string;
|
|
109
|
+
} | {
|
|
110
|
+
readonly type: 'BOSS_REPLY';
|
|
111
|
+
readonly answer: string;
|
|
112
|
+
readonly questionId?: 'planAnalysis';
|
|
113
|
+
};
|
|
114
|
+
/** Consumed planning Q&A rendered for later relayed discussion context. */
|
|
115
|
+
export declare function renderDiscussionContext(exchanges: readonly DiscussionExchange[]): string;
|
|
116
|
+
export declare const devMachine: import("xstate").StateMachine<DevContext, {
|
|
117
|
+
readonly type: "START_DEV";
|
|
118
|
+
readonly developmentRequest: string;
|
|
119
|
+
} | {
|
|
120
|
+
readonly type: "BOSS_REPLY";
|
|
121
|
+
readonly answer: string;
|
|
122
|
+
readonly questionId?: "planAnalysis";
|
|
123
|
+
}, {
|
|
124
|
+
[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;
|
|
125
|
+
}, {
|
|
126
|
+
src: "playbook";
|
|
127
|
+
logic: import("xstate").PromiseActorLogic<JsonValue | undefined, PlaybookInput, import("xstate").EventObject>;
|
|
128
|
+
id: string | undefined;
|
|
129
|
+
} | {
|
|
130
|
+
src: "player";
|
|
131
|
+
logic: import("xstate").PromiseActorLogic<PlayerOutput, PlayerInput, import("xstate").EventObject>;
|
|
132
|
+
id: string | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
type: "playbook.acceptedOutcome";
|
|
135
|
+
params: {
|
|
136
|
+
readonly source: string;
|
|
137
|
+
readonly target: string;
|
|
138
|
+
readonly acceptedOutcome: string;
|
|
139
|
+
};
|
|
140
|
+
} | {
|
|
141
|
+
type: "rememberActorError";
|
|
142
|
+
params: import("xstate").NonReducibleUnknown;
|
|
143
|
+
} | {
|
|
144
|
+
type: "rememberPendingQuestion";
|
|
145
|
+
params: import("xstate").NonReducibleUnknown;
|
|
146
|
+
} | {
|
|
147
|
+
type: "rememberBossReply";
|
|
148
|
+
params: import("xstate").NonReducibleUnknown;
|
|
149
|
+
} | {
|
|
150
|
+
type: "rememberEmptyBossReplyError";
|
|
151
|
+
params: import("xstate").NonReducibleUnknown;
|
|
152
|
+
} | {
|
|
153
|
+
type: "rememberMalformedPlayerOutput";
|
|
154
|
+
params: import("xstate").NonReducibleUnknown;
|
|
155
|
+
} | {
|
|
156
|
+
type: "startDev";
|
|
157
|
+
params: import("xstate").NonReducibleUnknown;
|
|
158
|
+
} | {
|
|
159
|
+
type: "completeDiscussion";
|
|
160
|
+
params: import("xstate").NonReducibleUnknown;
|
|
161
|
+
} | {
|
|
162
|
+
type: "rememberCodePath";
|
|
163
|
+
params: import("xstate").NonReducibleUnknown;
|
|
164
|
+
} | {
|
|
165
|
+
type: "rememberDecidePath";
|
|
166
|
+
params: import("xstate").NonReducibleUnknown;
|
|
167
|
+
} | {
|
|
168
|
+
type: "rememberDecideResult";
|
|
169
|
+
params: import("xstate").NonReducibleUnknown;
|
|
170
|
+
} | {
|
|
171
|
+
type: "completeWithChildSuccess";
|
|
172
|
+
params: import("xstate").NonReducibleUnknown;
|
|
173
|
+
} | {
|
|
174
|
+
type: "completeWithInsufficientCodeResult";
|
|
175
|
+
params: import("xstate").NonReducibleUnknown;
|
|
176
|
+
} | {
|
|
177
|
+
type: "completeWithInsufficientDecideResult";
|
|
178
|
+
params: import("xstate").NonReducibleUnknown;
|
|
179
|
+
} | {
|
|
180
|
+
type: "completeWithCodeFailure";
|
|
181
|
+
params: import("xstate").NonReducibleUnknown;
|
|
182
|
+
} | {
|
|
183
|
+
type: "completeWithDecideFailure";
|
|
184
|
+
params: import("xstate").NonReducibleUnknown;
|
|
185
|
+
}, {
|
|
186
|
+
type: "needsBossReply";
|
|
187
|
+
params: unknown;
|
|
188
|
+
} | {
|
|
189
|
+
type: "emptyBossReply";
|
|
190
|
+
params: unknown;
|
|
191
|
+
} | {
|
|
192
|
+
type: "isDiscussionComplete";
|
|
193
|
+
params: unknown;
|
|
194
|
+
} | {
|
|
195
|
+
type: "isCodePath";
|
|
196
|
+
params: unknown;
|
|
197
|
+
} | {
|
|
198
|
+
type: "isDecideThenCode";
|
|
199
|
+
params: unknown;
|
|
200
|
+
} | {
|
|
201
|
+
type: "isCodeSuccess";
|
|
202
|
+
params: unknown;
|
|
203
|
+
} | {
|
|
204
|
+
type: "isDecideSuccess";
|
|
205
|
+
params: unknown;
|
|
206
|
+
} | {
|
|
207
|
+
type: "authoredCodeFailure";
|
|
208
|
+
params: unknown;
|
|
209
|
+
} | {
|
|
210
|
+
type: "authoredDecideFailure";
|
|
211
|
+
params: unknown;
|
|
212
|
+
} | {
|
|
213
|
+
type: "resumesPlanAnalysis";
|
|
214
|
+
params: unknown;
|
|
215
|
+
}, never, "done" | "failed" | "awaitBossReply" | "ready" | "planAnalysis" | "callCode" | "callDecide" | "callCodeAfterDecide" | "discussionComplete" | "reportedChildFailure", string, DevInput, {
|
|
216
|
+
readonly status: "discussion-complete";
|
|
217
|
+
} | {
|
|
218
|
+
readonly status: "complete";
|
|
219
|
+
readonly childPlaybookId: "code";
|
|
220
|
+
/** The successful result of DEV's final child call, when it has one. */
|
|
221
|
+
readonly childOutput?: JsonValue;
|
|
222
|
+
} | {
|
|
223
|
+
readonly status: "child-failed";
|
|
224
|
+
/** The relayed canonical child result that ended the selected path. */
|
|
225
|
+
readonly childResult: CompletedChildResult;
|
|
226
|
+
}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
227
|
+
id: "dev";
|
|
228
|
+
states: {
|
|
229
|
+
readonly ready: {
|
|
230
|
+
id: "ready";
|
|
231
|
+
};
|
|
232
|
+
readonly planAnalysis: {
|
|
233
|
+
id: "planAnalysis";
|
|
234
|
+
};
|
|
235
|
+
readonly callCode: {
|
|
236
|
+
id: "callCode";
|
|
237
|
+
};
|
|
238
|
+
readonly callDecide: {
|
|
239
|
+
id: "callDecide";
|
|
240
|
+
};
|
|
241
|
+
readonly callCodeAfterDecide: {
|
|
242
|
+
id: "callCodeAfterDecide";
|
|
243
|
+
};
|
|
244
|
+
readonly awaitBossReply: {
|
|
245
|
+
id: "awaitBossReply";
|
|
246
|
+
};
|
|
247
|
+
readonly failed: {
|
|
248
|
+
id: "failed";
|
|
249
|
+
};
|
|
250
|
+
readonly discussionComplete: {
|
|
251
|
+
id: "discussionComplete";
|
|
252
|
+
};
|
|
253
|
+
readonly done: {
|
|
254
|
+
id: "done";
|
|
255
|
+
};
|
|
256
|
+
readonly reportedChildFailure: {
|
|
257
|
+
id: "reportedChildFailure";
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
}>;
|
|
261
|
+
export default devMachine;
|