@wildo-ai/saas-models 1.1.8 → 1.1.9
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/dist/esm/companion/provider-discovery.shared.schemas.d.ts +13 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
- package/dist/esm/companion/provider-discovery.shared.schemas.js +13 -0
- package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +32 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +32 -0
- package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
- package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +15 -3
- package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
- package/dist/esm/compliance/risk-posture.shared.schemas.js +14 -2
- package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.d.ts +128 -0
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.d.ts.map +1 -0
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.js +136 -0
- package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.js.map +1 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +32 -0
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +66 -1
- package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
- package/dist/esm/meta-workflows.exports.d.ts +1 -0
- package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
- package/dist/esm/meta-workflows.exports.js +1 -0
- package/dist/esm/meta-workflows.exports.js.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts +70 -1
- package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
- package/dist/esm/queue/jobs.shared.schemas.js +85 -2
- package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +25 -0
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +47 -19
- package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
- package/package.json +4 -4
- package/dist/esm/__tests__/setup.d.ts +0 -2
- package/dist/esm/__tests__/setup.d.ts.map +0 -1
- package/dist/esm/__tests__/setup.js +0 -19
- package/dist/esm/__tests__/setup.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { HumanDecision_FieldKind } from '../flows-actors/human-decision.shared.schemas';
|
|
2
|
+
/**
|
|
3
|
+
* How deep an interview goes, and what happens when the creator does not know an answer (#2129).
|
|
4
|
+
*
|
|
5
|
+
* ## The problem these two vocabularies solve
|
|
6
|
+
*
|
|
7
|
+
* Every question a playbook declares used to be mandatory and the person's alone. The vision interview
|
|
8
|
+
* asks sixteen. A creator who answered "I don't know" — and most first-time creators will, about a
|
|
9
|
+
* mission statement or a "why now" — had no way forward: the run refused while any question was
|
|
10
|
+
* unanswered, and nothing could answer in their place without recording a guess as their decision.
|
|
11
|
+
*
|
|
12
|
+
* That is the defect `.claude/rules/application-creation-directive.md` names: a REQUIRED declaration
|
|
13
|
+
* whose absence stops the mechanism. Its remedy is to make the missing state REPRESENTABLE and keep going.
|
|
14
|
+
* So each question now says two things about itself:
|
|
15
|
+
*
|
|
16
|
+
* - its {@link MetaWorkflow_ElicitationQuestionDepth}: whether a SIMPLE interview asks it at all, or
|
|
17
|
+
* leaves it to be proposed;
|
|
18
|
+
* - its {@link MetaWorkflow_ElicitationUnknownPolicy}: whether the companion may propose an answer when
|
|
19
|
+
* the creator does not give one, or whether only the creator can answer it.
|
|
20
|
+
*
|
|
21
|
+
* A proposed answer is never recorded as the creator's decision: the dossier stores it as an ASSUMPTION
|
|
22
|
+
* (`ApplicationCreatorInputAnswerStanding.ASSUMED`), and the run is told it is one.
|
|
23
|
+
*
|
|
24
|
+
* ## Why both are optional on the question, with one resolver each
|
|
25
|
+
*
|
|
26
|
+
* Absence has one meaning per axis, stated in {@link resolveElicitationQuestionDepth} and
|
|
27
|
+
* {@link resolveElicitationUnknownPolicy}, and every reader goes through them. A `.default()` on the
|
|
28
|
+
* schema would change the inferred OUTPUT type of every elicitation spec, so every consumer that builds
|
|
29
|
+
* one by hand would need both fields; a resolver keeps the catalog terse and the meaning in one place.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Which interview depth asks a question.
|
|
33
|
+
*
|
|
34
|
+
* The APPLICATION chooses a depth once (`ApplicationInterviewDepth`, recorded in its dossier): a SIMPLE
|
|
35
|
+
* interview asks only the {@link ESSENTIAL} questions and proposes the rest, recorded as assumptions the creator
|
|
36
|
+
* reviews (when a surface is open) or revisits afterwards (when an unattended round recorded them); a DETAILED
|
|
37
|
+
* interview asks every question.
|
|
38
|
+
*/
|
|
39
|
+
export declare enum MetaWorkflow_ElicitationQuestionDepth {
|
|
40
|
+
/**
|
|
41
|
+
* Asked at every depth. The questions the rest of the playbook cannot reasonably be proposed without —
|
|
42
|
+
* what the product is, and the problem it solves. Also the default for a question that declares no
|
|
43
|
+
* depth: a question nobody classified is asked rather than silently proposed.
|
|
44
|
+
*/
|
|
45
|
+
ESSENTIAL = "essential",
|
|
46
|
+
/**
|
|
47
|
+
* Asked only by a DETAILED interview. A SIMPLE one proposes it from the essential answers instead of
|
|
48
|
+
* asking it: on an open surface the creator reviews the proposal with the others, and an unattended round
|
|
49
|
+
* records it as an assumption straight away, which the creator revisits afterwards (#2129) — except a
|
|
50
|
+
* regulated-domain question, which an unattended round never assumes: its playbook waits for the person.
|
|
51
|
+
*/
|
|
52
|
+
DETAIL = "detail"
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* What may answer a question the creator does not answer.
|
|
56
|
+
*/
|
|
57
|
+
export declare enum MetaWorkflow_ElicitationUnknownPolicy {
|
|
58
|
+
/**
|
|
59
|
+
* The companion may PROPOSE an answer from what the creator already said and what the application
|
|
60
|
+
* already holds. What is kept is recorded as an assumption, never as their decision: kept by the creator
|
|
61
|
+
* on review, or — in a quick interview — recorded by an unattended round with nobody present and listed for
|
|
62
|
+
* the creator to revisit. The default: an answer that is marked as assumed is strictly better than an
|
|
63
|
+
* interview that cannot finish.
|
|
64
|
+
*/
|
|
65
|
+
PROPOSE = "propose",
|
|
66
|
+
/**
|
|
67
|
+
* Only the creator can answer. For a decision that changes what the application IS rather than what it
|
|
68
|
+
* contains — the application's line, which decides which playbooks it runs. An answer recorded as
|
|
69
|
+
* assumed is refused for such a question.
|
|
70
|
+
*/
|
|
71
|
+
ASK = "ask"
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* How deep this application's interviews go (#2129). Chosen by the creator once, at the start of creation,
|
|
75
|
+
* and recorded in the dossier because it is a fact about how THIS application's decisions were made — not a
|
|
76
|
+
* preference of whoever is typing on this machine.
|
|
77
|
+
*/
|
|
78
|
+
export declare enum ApplicationInterviewDepth {
|
|
79
|
+
/**
|
|
80
|
+
* Ask only each interview's ESSENTIAL questions; propose the rest from those answers. A surface the
|
|
81
|
+
* creator is using shows the proposals for review; an unattended round records them as assumptions and
|
|
82
|
+
* goes on, and they are listed to revisit — unless a regulated-domain question (or one only the creator may
|
|
83
|
+
* answer) is still waiting, in which case it assumes nothing for that playbook, which waits for the person. What a creator who does not want to write a vision document chooses.
|
|
84
|
+
*/
|
|
85
|
+
SIMPLE = "simple",
|
|
86
|
+
/** Ask every question. Anything the creator does not know can still be proposed, one question at a time. */
|
|
87
|
+
DETAILED = "detailed"
|
|
88
|
+
}
|
|
89
|
+
/** The shape the resolvers read: the optional disposition fields of an elicitation question, and what it offers. */
|
|
90
|
+
export interface MetaWorkflow_ElicitationQuestionDisposition {
|
|
91
|
+
readonly depth?: MetaWorkflow_ElicitationQuestionDepth | undefined;
|
|
92
|
+
readonly whenUnknown?: MetaWorkflow_ElicitationUnknownPolicy | undefined;
|
|
93
|
+
readonly regulatedDomain?: boolean | undefined;
|
|
94
|
+
readonly kind?: HumanDecision_FieldKind | undefined;
|
|
95
|
+
readonly options?: readonly string[] | undefined;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Whether an answer to this question may be PROPOSED — and so recorded as an assumption (#2129): its policy
|
|
99
|
+
* allows it, and it offers something to propose from (a CHOICE whose options are computed and not offered yet
|
|
100
|
+
* offers nothing). The ONE place proposability is decided.
|
|
101
|
+
*/
|
|
102
|
+
export declare function isElicitationQuestionProposable(question: MetaWorkflow_ElicitationQuestionDisposition): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Whether a SIMPLE interview asks the question of the person (#2129): an ESSENTIAL question, or any question
|
|
105
|
+
* that cannot be proposed — one only the person may answer, or a choice with nothing to offer yet — since a
|
|
106
|
+
* short interview that skipped it could neither propose it nor finish. The ONE predicate every surface uses
|
|
107
|
+
* (console queue, workbench interview, conversation, plugin), so they cannot disagree about what is asked.
|
|
108
|
+
*/
|
|
109
|
+
export declare function isElicitationQuestionAskedInSimpleInterview(question: MetaWorkflow_ElicitationQuestionDisposition): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Whether the question concerns a REGULATED DOMAIN (#2129) — regulated or specially protected data, a regulated
|
|
112
|
+
* sector, the jurisdictions a regime turns on. Such a question may still be proposed (Paul, 2026-10-01), but
|
|
113
|
+
* every surface names a proposed answer to it explicitly before the person keeps it, because those answers
|
|
114
|
+
* decide which compliance work matters later — so an unattended round never assumes one, and its playbook waits
|
|
115
|
+
* for the person. Absent means no.
|
|
116
|
+
*/
|
|
117
|
+
export declare function isRegulatedDomainElicitationQuestion(question: MetaWorkflow_ElicitationQuestionDisposition): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* The question's depth — {@link MetaWorkflow_ElicitationQuestionDepth.ESSENTIAL} when it declares none.
|
|
120
|
+
* The ONE place absence is interpreted.
|
|
121
|
+
*/
|
|
122
|
+
export declare function resolveElicitationQuestionDepth(question: MetaWorkflow_ElicitationQuestionDisposition): MetaWorkflow_ElicitationQuestionDepth;
|
|
123
|
+
/**
|
|
124
|
+
* The question's unknown-answer policy — {@link MetaWorkflow_ElicitationUnknownPolicy.PROPOSE} when it
|
|
125
|
+
* declares none. The ONE place absence is interpreted.
|
|
126
|
+
*/
|
|
127
|
+
export declare function resolveElicitationUnknownPolicy(question: MetaWorkflow_ElicitationQuestionDisposition): MetaWorkflow_ElicitationUnknownPolicy;
|
|
128
|
+
//# sourceMappingURL=elicitation-depth.meta-workflows.shared.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicitation-depth.meta-workflows.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;GAOG;AACH,oBAAY,qCAAqC;IAC/C;;;;OAIG;IACH,SAAS,cAAc;IACvB;;;;;OAKG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,qCAAqC;IAC/C;;;;;;OAMG;IACH,OAAO,YAAY;IACnB;;;;OAIG;IACH,GAAG,QAAQ;CACZ;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACnC;;;;;OAKG;IACH,MAAM,WAAW;IACjB,4GAA4G;IAC5G,QAAQ,aAAa;CACtB;AAED,oHAAoH;AACpH,MAAM,WAAW,2CAA2C;IAC1D,QAAQ,CAAC,KAAK,CAAC,EAAE,qCAAqC,GAAG,SAAS,CAAC;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,qCAAqC,GAAG,SAAS,CAAC;IACzE,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,2CAA2C,GAAG,OAAO,CAG9G;AAED;;;;;GAKG;AACH,wBAAgB,2CAA2C,CAAC,QAAQ,EAAE,2CAA2C,GAAG,OAAO,CAG1H;AAED;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,2CAA2C,GAAG,OAAO,CAEnH;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,2CAA2C,GAAG,qCAAqC,CAE5I;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,2CAA2C,GAAG,qCAAqC,CAE5I"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { HumanDecision_FieldKind } from '../flows-actors/human-decision.shared.schemas.js';
|
|
2
|
+
/**
|
|
3
|
+
* How deep an interview goes, and what happens when the creator does not know an answer (#2129).
|
|
4
|
+
*
|
|
5
|
+
* ## The problem these two vocabularies solve
|
|
6
|
+
*
|
|
7
|
+
* Every question a playbook declares used to be mandatory and the person's alone. The vision interview
|
|
8
|
+
* asks sixteen. A creator who answered "I don't know" — and most first-time creators will, about a
|
|
9
|
+
* mission statement or a "why now" — had no way forward: the run refused while any question was
|
|
10
|
+
* unanswered, and nothing could answer in their place without recording a guess as their decision.
|
|
11
|
+
*
|
|
12
|
+
* That is the defect `.claude/rules/application-creation-directive.md` names: a REQUIRED declaration
|
|
13
|
+
* whose absence stops the mechanism. Its remedy is to make the missing state REPRESENTABLE and keep going.
|
|
14
|
+
* So each question now says two things about itself:
|
|
15
|
+
*
|
|
16
|
+
* - its {@link MetaWorkflow_ElicitationQuestionDepth}: whether a SIMPLE interview asks it at all, or
|
|
17
|
+
* leaves it to be proposed;
|
|
18
|
+
* - its {@link MetaWorkflow_ElicitationUnknownPolicy}: whether the companion may propose an answer when
|
|
19
|
+
* the creator does not give one, or whether only the creator can answer it.
|
|
20
|
+
*
|
|
21
|
+
* A proposed answer is never recorded as the creator's decision: the dossier stores it as an ASSUMPTION
|
|
22
|
+
* (`ApplicationCreatorInputAnswerStanding.ASSUMED`), and the run is told it is one.
|
|
23
|
+
*
|
|
24
|
+
* ## Why both are optional on the question, with one resolver each
|
|
25
|
+
*
|
|
26
|
+
* Absence has one meaning per axis, stated in {@link resolveElicitationQuestionDepth} and
|
|
27
|
+
* {@link resolveElicitationUnknownPolicy}, and every reader goes through them. A `.default()` on the
|
|
28
|
+
* schema would change the inferred OUTPUT type of every elicitation spec, so every consumer that builds
|
|
29
|
+
* one by hand would need both fields; a resolver keeps the catalog terse and the meaning in one place.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Which interview depth asks a question.
|
|
33
|
+
*
|
|
34
|
+
* The APPLICATION chooses a depth once (`ApplicationInterviewDepth`, recorded in its dossier): a SIMPLE
|
|
35
|
+
* interview asks only the {@link ESSENTIAL} questions and proposes the rest, recorded as assumptions the creator
|
|
36
|
+
* reviews (when a surface is open) or revisits afterwards (when an unattended round recorded them); a DETAILED
|
|
37
|
+
* interview asks every question.
|
|
38
|
+
*/
|
|
39
|
+
export var MetaWorkflow_ElicitationQuestionDepth;
|
|
40
|
+
(function (MetaWorkflow_ElicitationQuestionDepth) {
|
|
41
|
+
/**
|
|
42
|
+
* Asked at every depth. The questions the rest of the playbook cannot reasonably be proposed without —
|
|
43
|
+
* what the product is, and the problem it solves. Also the default for a question that declares no
|
|
44
|
+
* depth: a question nobody classified is asked rather than silently proposed.
|
|
45
|
+
*/
|
|
46
|
+
MetaWorkflow_ElicitationQuestionDepth["ESSENTIAL"] = "essential";
|
|
47
|
+
/**
|
|
48
|
+
* Asked only by a DETAILED interview. A SIMPLE one proposes it from the essential answers instead of
|
|
49
|
+
* asking it: on an open surface the creator reviews the proposal with the others, and an unattended round
|
|
50
|
+
* records it as an assumption straight away, which the creator revisits afterwards (#2129) — except a
|
|
51
|
+
* regulated-domain question, which an unattended round never assumes: its playbook waits for the person.
|
|
52
|
+
*/
|
|
53
|
+
MetaWorkflow_ElicitationQuestionDepth["DETAIL"] = "detail";
|
|
54
|
+
})(MetaWorkflow_ElicitationQuestionDepth || (MetaWorkflow_ElicitationQuestionDepth = {}));
|
|
55
|
+
/**
|
|
56
|
+
* What may answer a question the creator does not answer.
|
|
57
|
+
*/
|
|
58
|
+
export var MetaWorkflow_ElicitationUnknownPolicy;
|
|
59
|
+
(function (MetaWorkflow_ElicitationUnknownPolicy) {
|
|
60
|
+
/**
|
|
61
|
+
* The companion may PROPOSE an answer from what the creator already said and what the application
|
|
62
|
+
* already holds. What is kept is recorded as an assumption, never as their decision: kept by the creator
|
|
63
|
+
* on review, or — in a quick interview — recorded by an unattended round with nobody present and listed for
|
|
64
|
+
* the creator to revisit. The default: an answer that is marked as assumed is strictly better than an
|
|
65
|
+
* interview that cannot finish.
|
|
66
|
+
*/
|
|
67
|
+
MetaWorkflow_ElicitationUnknownPolicy["PROPOSE"] = "propose";
|
|
68
|
+
/**
|
|
69
|
+
* Only the creator can answer. For a decision that changes what the application IS rather than what it
|
|
70
|
+
* contains — the application's line, which decides which playbooks it runs. An answer recorded as
|
|
71
|
+
* assumed is refused for such a question.
|
|
72
|
+
*/
|
|
73
|
+
MetaWorkflow_ElicitationUnknownPolicy["ASK"] = "ask";
|
|
74
|
+
})(MetaWorkflow_ElicitationUnknownPolicy || (MetaWorkflow_ElicitationUnknownPolicy = {}));
|
|
75
|
+
/**
|
|
76
|
+
* How deep this application's interviews go (#2129). Chosen by the creator once, at the start of creation,
|
|
77
|
+
* and recorded in the dossier because it is a fact about how THIS application's decisions were made — not a
|
|
78
|
+
* preference of whoever is typing on this machine.
|
|
79
|
+
*/
|
|
80
|
+
export var ApplicationInterviewDepth;
|
|
81
|
+
(function (ApplicationInterviewDepth) {
|
|
82
|
+
/**
|
|
83
|
+
* Ask only each interview's ESSENTIAL questions; propose the rest from those answers. A surface the
|
|
84
|
+
* creator is using shows the proposals for review; an unattended round records them as assumptions and
|
|
85
|
+
* goes on, and they are listed to revisit — unless a regulated-domain question (or one only the creator may
|
|
86
|
+
* answer) is still waiting, in which case it assumes nothing for that playbook, which waits for the person. What a creator who does not want to write a vision document chooses.
|
|
87
|
+
*/
|
|
88
|
+
ApplicationInterviewDepth["SIMPLE"] = "simple";
|
|
89
|
+
/** Ask every question. Anything the creator does not know can still be proposed, one question at a time. */
|
|
90
|
+
ApplicationInterviewDepth["DETAILED"] = "detailed";
|
|
91
|
+
})(ApplicationInterviewDepth || (ApplicationInterviewDepth = {}));
|
|
92
|
+
/**
|
|
93
|
+
* Whether an answer to this question may be PROPOSED — and so recorded as an assumption (#2129): its policy
|
|
94
|
+
* allows it, and it offers something to propose from (a CHOICE whose options are computed and not offered yet
|
|
95
|
+
* offers nothing). The ONE place proposability is decided.
|
|
96
|
+
*/
|
|
97
|
+
export function isElicitationQuestionProposable(question) {
|
|
98
|
+
if (resolveElicitationUnknownPolicy(question) !== MetaWorkflow_ElicitationUnknownPolicy.PROPOSE)
|
|
99
|
+
return false;
|
|
100
|
+
return !(question.kind === HumanDecision_FieldKind.CHOICE && (question.options ?? []).length === 0);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Whether a SIMPLE interview asks the question of the person (#2129): an ESSENTIAL question, or any question
|
|
104
|
+
* that cannot be proposed — one only the person may answer, or a choice with nothing to offer yet — since a
|
|
105
|
+
* short interview that skipped it could neither propose it nor finish. The ONE predicate every surface uses
|
|
106
|
+
* (console queue, workbench interview, conversation, plugin), so they cannot disagree about what is asked.
|
|
107
|
+
*/
|
|
108
|
+
export function isElicitationQuestionAskedInSimpleInterview(question) {
|
|
109
|
+
return resolveElicitationQuestionDepth(question) === MetaWorkflow_ElicitationQuestionDepth.ESSENTIAL
|
|
110
|
+
|| !isElicitationQuestionProposable(question);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Whether the question concerns a REGULATED DOMAIN (#2129) — regulated or specially protected data, a regulated
|
|
114
|
+
* sector, the jurisdictions a regime turns on. Such a question may still be proposed (Paul, 2026-10-01), but
|
|
115
|
+
* every surface names a proposed answer to it explicitly before the person keeps it, because those answers
|
|
116
|
+
* decide which compliance work matters later — so an unattended round never assumes one, and its playbook waits
|
|
117
|
+
* for the person. Absent means no.
|
|
118
|
+
*/
|
|
119
|
+
export function isRegulatedDomainElicitationQuestion(question) {
|
|
120
|
+
return question.regulatedDomain === true;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The question's depth — {@link MetaWorkflow_ElicitationQuestionDepth.ESSENTIAL} when it declares none.
|
|
124
|
+
* The ONE place absence is interpreted.
|
|
125
|
+
*/
|
|
126
|
+
export function resolveElicitationQuestionDepth(question) {
|
|
127
|
+
return question.depth ?? MetaWorkflow_ElicitationQuestionDepth.ESSENTIAL;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The question's unknown-answer policy — {@link MetaWorkflow_ElicitationUnknownPolicy.PROPOSE} when it
|
|
131
|
+
* declares none. The ONE place absence is interpreted.
|
|
132
|
+
*/
|
|
133
|
+
export function resolveElicitationUnknownPolicy(question) {
|
|
134
|
+
return question.whenUnknown ?? MetaWorkflow_ElicitationUnknownPolicy.PROPOSE;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=elicitation-depth.meta-workflows.shared.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicitation-depth.meta-workflows.shared.schemas.js","sourceRoot":"","sources":["../../../../src/meta-workflows/elicitation-depth.meta-workflows.shared.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OAAO,QAAQ,CAAC,eAAe,KAAK,IAAI,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,QAAqD;IACnG,OAAO,QAAQ,CAAC,KAAK,IAAI,qCAAqC,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,QAAqD;IACnG,OAAO,QAAQ,CAAC,WAAW,IAAI,qCAAqC,CAAC,OAAO,CAAC;AAC/E,CAAC","sourcesContent":["import { HumanDecision_FieldKind } from '../flows-actors/human-decision.shared.schemas';\n\n/**\n * How deep an interview goes, and what happens when the creator does not know an answer (#2129).\n *\n * ## The problem these two vocabularies solve\n *\n * Every question a playbook declares used to be mandatory and the person's alone. The vision interview\n * asks sixteen. A creator who answered \"I don't know\" — and most first-time creators will, about a\n * mission statement or a \"why now\" — had no way forward: the run refused while any question was\n * unanswered, and nothing could answer in their place without recording a guess as their decision.\n *\n * That is the defect `.claude/rules/application-creation-directive.md` names: a REQUIRED declaration\n * whose absence stops the mechanism. Its remedy is to make the missing state REPRESENTABLE and keep going.\n * So each question now says two things about itself:\n *\n * - its {@link MetaWorkflow_ElicitationQuestionDepth}: whether a SIMPLE interview asks it at all, or\n * leaves it to be proposed;\n * - its {@link MetaWorkflow_ElicitationUnknownPolicy}: whether the companion may propose an answer when\n * the creator does not give one, or whether only the creator can answer it.\n *\n * A proposed answer is never recorded as the creator's decision: the dossier stores it as an ASSUMPTION\n * (`ApplicationCreatorInputAnswerStanding.ASSUMED`), and the run is told it is one.\n *\n * ## Why both are optional on the question, with one resolver each\n *\n * Absence has one meaning per axis, stated in {@link resolveElicitationQuestionDepth} and\n * {@link resolveElicitationUnknownPolicy}, and every reader goes through them. A `.default()` on the\n * schema would change the inferred OUTPUT type of every elicitation spec, so every consumer that builds\n * one by hand would need both fields; a resolver keeps the catalog terse and the meaning in one place.\n */\n\n/**\n * Which interview depth asks a question.\n *\n * The APPLICATION chooses a depth once (`ApplicationInterviewDepth`, recorded in its dossier): a SIMPLE\n * interview asks only the {@link ESSENTIAL} questions and proposes the rest, recorded as assumptions the creator\n * reviews (when a surface is open) or revisits afterwards (when an unattended round recorded them); a DETAILED\n * interview asks every question.\n */\nexport enum MetaWorkflow_ElicitationQuestionDepth {\n /**\n * Asked at every depth. The questions the rest of the playbook cannot reasonably be proposed without —\n * what the product is, and the problem it solves. Also the default for a question that declares no\n * depth: a question nobody classified is asked rather than silently proposed.\n */\n ESSENTIAL = 'essential',\n /**\n * Asked only by a DETAILED interview. A SIMPLE one proposes it from the essential answers instead of\n * asking it: on an open surface the creator reviews the proposal with the others, and an unattended round\n * records it as an assumption straight away, which the creator revisits afterwards (#2129) — except a\n * regulated-domain question, which an unattended round never assumes: its playbook waits for the person.\n */\n DETAIL = 'detail',\n}\n\n/**\n * What may answer a question the creator does not answer.\n */\nexport enum MetaWorkflow_ElicitationUnknownPolicy {\n /**\n * The companion may PROPOSE an answer from what the creator already said and what the application\n * already holds. What is kept is recorded as an assumption, never as their decision: kept by the creator\n * on review, or — in a quick interview — recorded by an unattended round with nobody present and listed for\n * the creator to revisit. The default: an answer that is marked as assumed is strictly better than an\n * interview that cannot finish.\n */\n PROPOSE = 'propose',\n /**\n * Only the creator can answer. For a decision that changes what the application IS rather than what it\n * contains — the application's line, which decides which playbooks it runs. An answer recorded as\n * assumed is refused for such a question.\n */\n ASK = 'ask',\n}\n\n/**\n * How deep this application's interviews go (#2129). Chosen by the creator once, at the start of creation,\n * and recorded in the dossier because it is a fact about how THIS application's decisions were made — not a\n * preference of whoever is typing on this machine.\n */\nexport enum ApplicationInterviewDepth {\n /**\n * Ask only each interview's ESSENTIAL questions; propose the rest from those answers. A surface the\n * creator is using shows the proposals for review; an unattended round records them as assumptions and\n * goes on, and they are listed to revisit — unless a regulated-domain question (or one only the creator may\n * answer) is still waiting, in which case it assumes nothing for that playbook, which waits for the person. What a creator who does not want to write a vision document chooses.\n */\n SIMPLE = 'simple',\n /** Ask every question. Anything the creator does not know can still be proposed, one question at a time. */\n DETAILED = 'detailed',\n}\n\n/** The shape the resolvers read: the optional disposition fields of an elicitation question, and what it offers. */\nexport interface MetaWorkflow_ElicitationQuestionDisposition {\n readonly depth?: MetaWorkflow_ElicitationQuestionDepth | undefined;\n readonly whenUnknown?: MetaWorkflow_ElicitationUnknownPolicy | undefined;\n readonly regulatedDomain?: boolean | undefined;\n readonly kind?: HumanDecision_FieldKind | undefined;\n readonly options?: readonly string[] | undefined;\n}\n\n/**\n * Whether an answer to this question may be PROPOSED — and so recorded as an assumption (#2129): its policy\n * allows it, and it offers something to propose from (a CHOICE whose options are computed and not offered yet\n * offers nothing). The ONE place proposability is decided.\n */\nexport function isElicitationQuestionProposable(question: MetaWorkflow_ElicitationQuestionDisposition): boolean {\n if (resolveElicitationUnknownPolicy(question) !== MetaWorkflow_ElicitationUnknownPolicy.PROPOSE) return false;\n return !(question.kind === HumanDecision_FieldKind.CHOICE && (question.options ?? []).length === 0);\n}\n\n/**\n * Whether a SIMPLE interview asks the question of the person (#2129): an ESSENTIAL question, or any question\n * that cannot be proposed — one only the person may answer, or a choice with nothing to offer yet — since a\n * short interview that skipped it could neither propose it nor finish. The ONE predicate every surface uses\n * (console queue, workbench interview, conversation, plugin), so they cannot disagree about what is asked.\n */\nexport function isElicitationQuestionAskedInSimpleInterview(question: MetaWorkflow_ElicitationQuestionDisposition): boolean {\n return resolveElicitationQuestionDepth(question) === MetaWorkflow_ElicitationQuestionDepth.ESSENTIAL\n || !isElicitationQuestionProposable(question);\n}\n\n/**\n * Whether the question concerns a REGULATED DOMAIN (#2129) — regulated or specially protected data, a regulated\n * sector, the jurisdictions a regime turns on. Such a question may still be proposed (Paul, 2026-10-01), but\n * every surface names a proposed answer to it explicitly before the person keeps it, because those answers\n * decide which compliance work matters later — so an unattended round never assumes one, and its playbook waits\n * for the person. Absent means no.\n */\nexport function isRegulatedDomainElicitationQuestion(question: MetaWorkflow_ElicitationQuestionDisposition): boolean {\n return question.regulatedDomain === true;\n}\n\n/**\n * The question's depth — {@link MetaWorkflow_ElicitationQuestionDepth.ESSENTIAL} when it declares none.\n * The ONE place absence is interpreted.\n */\nexport function resolveElicitationQuestionDepth(question: MetaWorkflow_ElicitationQuestionDisposition): MetaWorkflow_ElicitationQuestionDepth {\n return question.depth ?? MetaWorkflow_ElicitationQuestionDepth.ESSENTIAL;\n}\n\n/**\n * The question's unknown-answer policy — {@link MetaWorkflow_ElicitationUnknownPolicy.PROPOSE} when it\n * declares none. The ONE place absence is interpreted.\n */\nexport function resolveElicitationUnknownPolicy(question: MetaWorkflow_ElicitationQuestionDisposition): MetaWorkflow_ElicitationUnknownPolicy {\n return question.whenUnknown ?? MetaWorkflow_ElicitationUnknownPolicy.PROPOSE;\n}\n"]}
|
|
@@ -36,6 +36,7 @@ import { z } from "zod";
|
|
|
36
36
|
import { ExpertWorkDomain } from "../flows-actors/deliberation.shared.schemas";
|
|
37
37
|
import { HumanDecision_FieldKind } from "../flows-actors/human-decision.shared.schemas";
|
|
38
38
|
import { MetaWorkflow_EvaluationVerdict } from "./decisions.meta-workflows.shared.schemas";
|
|
39
|
+
import { MetaWorkflow_ElicitationQuestionDepth, MetaWorkflow_ElicitationUnknownPolicy } from "./elicitation-depth.meta-workflows.shared.schemas";
|
|
39
40
|
/**
|
|
40
41
|
* Which execution tier runs a playbook (design plan D4):
|
|
41
42
|
* - COMPANION_AGENT — API-transport LLM agent invoked by the companion
|
|
@@ -469,16 +470,46 @@ declare const _MetaWorkflow_JourneyPredicateSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
469
470
|
}, z.core.$strip>], "kind">;
|
|
470
471
|
export declare const MetaWorkflow_JourneyPredicateSchema: typeof _MetaWorkflow_JourneyPredicateSchema;
|
|
471
472
|
export type MetaWorkflow_JourneyPredicate = z.infer<typeof _MetaWorkflow_JourneyPredicateSchema>;
|
|
473
|
+
/**
|
|
474
|
+
* Where an interview CHOICE question's options come from, when they cannot be written into the catalog
|
|
475
|
+
* because they depend on what the application has already decided.
|
|
476
|
+
*
|
|
477
|
+
* ## Why a named source, and not a model-written question
|
|
478
|
+
*
|
|
479
|
+
* The brand name is the case that forced it. The creator should CHOOSE among names the companion proposed
|
|
480
|
+
* and screened, so the options are the landed screening's candidates — a different list for every
|
|
481
|
+
* application. A mid-run clarification could ask that, but its options are written by the model and its
|
|
482
|
+
* question call fails soft (no question, the run proceeds), which would let the model pick the name
|
|
483
|
+
* itself. A named source is computed by code from landed families, so the options are the same every time
|
|
484
|
+
* they are read, and a creator's answer is checked against exactly the list they were shown.
|
|
485
|
+
*
|
|
486
|
+
* One member per source, each resolved by ONE runtime function; the resolver map is total over this enum,
|
|
487
|
+
* so a member added without its resolver does not compile. A question declaring a source must be a CHOICE
|
|
488
|
+
* and must not ALSO declare `options` — the catalog test holds both.
|
|
489
|
+
*/
|
|
490
|
+
export declare enum MetaWorkflow_ElicitationOptionsSource {
|
|
491
|
+
/**
|
|
492
|
+
* The screened brand-name candidates the creator may choose — computed from the landed
|
|
493
|
+
* `brand-name-screening` and the market snapshot's competitors (`deriveOfferableBrandNameOptions`).
|
|
494
|
+
* A conflicting companion proposal is never offered; a conflicting creator-supplied name is offered only
|
|
495
|
+
* as an explicit "keep despite conflict" option.
|
|
496
|
+
*/
|
|
497
|
+
BRAND_NAME_SCREENING_CANDIDATES = "brand_name_screening_candidates"
|
|
498
|
+
}
|
|
472
499
|
export declare const MetaWorkflow_ElicitationSpecSchema: z.ZodObject<{
|
|
473
500
|
questions: z.ZodArray<z.ZodObject<{
|
|
474
501
|
ref: z.ZodString;
|
|
475
502
|
question: z.ZodString;
|
|
476
503
|
kind: z.ZodEnum<typeof HumanDecision_FieldKind>;
|
|
477
504
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
505
|
+
optionsFrom: z.ZodOptional<z.ZodEnum<typeof MetaWorkflow_ElicitationOptionsSource>>;
|
|
478
506
|
sameDecisionAs: z.ZodOptional<z.ZodObject<{
|
|
479
507
|
playbookRef: z.ZodString;
|
|
480
508
|
questionRef: z.ZodString;
|
|
481
509
|
}, z.core.$strip>>;
|
|
510
|
+
depth: z.ZodOptional<z.ZodEnum<typeof MetaWorkflow_ElicitationQuestionDepth>>;
|
|
511
|
+
whenUnknown: z.ZodOptional<z.ZodEnum<typeof MetaWorkflow_ElicitationUnknownPolicy>>;
|
|
512
|
+
regulatedDomain: z.ZodOptional<z.ZodBoolean>;
|
|
482
513
|
}, z.core.$strip>>;
|
|
483
514
|
}, z.core.$strip>;
|
|
484
515
|
export type MetaWorkflow_ElicitationSpec = z.infer<typeof MetaWorkflow_ElicitationSpecSchema>;
|
|
@@ -613,6 +644,7 @@ export declare const MetaWorkflow_ChoreographySchema: z.ZodObject<{
|
|
|
613
644
|
reopen: z.ZodArray<z.ZodString>;
|
|
614
645
|
}, z.core.$strict>>>;
|
|
615
646
|
actsOnApplication: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
647
|
+
closingMove: z.ZodOptional<z.ZodString>;
|
|
616
648
|
}, z.core.$strip>;
|
|
617
649
|
export type MetaWorkflow_Choreography = z.infer<typeof MetaWorkflow_ChoreographySchema>;
|
|
618
650
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration.meta-workflows.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/orchestration.meta-workflows.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestration.meta-workflows.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/orchestration.meta-workflows.shared.schemas.ts"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C,CAAC,CAAC;AAEjG;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,qCAAqC;IAC/C;;;;;OAKG;IACH,+BAA+B,oCAAoC;CACpE;AAED,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;iBAgD7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F;;;;;;;;;GASG;AACH,eAAO,MAAM,iCAAiC;;;;;;;iBAU5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,wCAAwC;IACnD,iHAAiH;;IAEjH,sGAAsG;;IAEtG,wHAAwH;;IAExH,mDAAmD;;IAEnD,8EAA8E;;kBAE9E,CAAC;AACH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,+BAA+B;;;;;;;QA5C1C,iHAAiH;;QAEjH,sGAAsG;;QAEtG,wHAAwH;;QAExH,mDAAmD;;QAEnD,8EAA8E;;;;;iBA4H9E,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;;;;;;GAQG;AACH,eAAO,MAAM,uCAAuC;;;;;;;;iBAoBlD,CAAC;AACH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
|
|
@@ -36,6 +36,7 @@ import { z } from "zod";
|
|
|
36
36
|
import { ExpertWorkDomain } from "../flows-actors/deliberation.shared.schemas.js";
|
|
37
37
|
import { HumanDecision_FieldKind } from "../flows-actors/human-decision.shared.schemas.js";
|
|
38
38
|
import { MetaWorkflow_EvaluationVerdict } from "./decisions.meta-workflows.shared.schemas.js";
|
|
39
|
+
import { MetaWorkflow_ElicitationQuestionDepth, MetaWorkflow_ElicitationUnknownPolicy } from "./elicitation-depth.meta-workflows.shared.schemas.js";
|
|
39
40
|
/**
|
|
40
41
|
* Which execution tier runs a playbook (design plan D4):
|
|
41
42
|
* - COMPANION_AGENT — API-transport LLM agent invoked by the companion
|
|
@@ -514,14 +515,47 @@ const _MetaWorkflow_JourneyPredicateSchema = z.discriminatedUnion("kind", [
|
|
|
514
515
|
}),
|
|
515
516
|
]);
|
|
516
517
|
export const MetaWorkflow_JourneyPredicateSchema = _MetaWorkflow_JourneyPredicateSchema;
|
|
518
|
+
/**
|
|
519
|
+
* Where an interview CHOICE question's options come from, when they cannot be written into the catalog
|
|
520
|
+
* because they depend on what the application has already decided.
|
|
521
|
+
*
|
|
522
|
+
* ## Why a named source, and not a model-written question
|
|
523
|
+
*
|
|
524
|
+
* The brand name is the case that forced it. The creator should CHOOSE among names the companion proposed
|
|
525
|
+
* and screened, so the options are the landed screening's candidates — a different list for every
|
|
526
|
+
* application. A mid-run clarification could ask that, but its options are written by the model and its
|
|
527
|
+
* question call fails soft (no question, the run proceeds), which would let the model pick the name
|
|
528
|
+
* itself. A named source is computed by code from landed families, so the options are the same every time
|
|
529
|
+
* they are read, and a creator's answer is checked against exactly the list they were shown.
|
|
530
|
+
*
|
|
531
|
+
* One member per source, each resolved by ONE runtime function; the resolver map is total over this enum,
|
|
532
|
+
* so a member added without its resolver does not compile. A question declaring a source must be a CHOICE
|
|
533
|
+
* and must not ALSO declare `options` — the catalog test holds both.
|
|
534
|
+
*/
|
|
535
|
+
export var MetaWorkflow_ElicitationOptionsSource;
|
|
536
|
+
(function (MetaWorkflow_ElicitationOptionsSource) {
|
|
537
|
+
/**
|
|
538
|
+
* The screened brand-name candidates the creator may choose — computed from the landed
|
|
539
|
+
* `brand-name-screening` and the market snapshot's competitors (`deriveOfferableBrandNameOptions`).
|
|
540
|
+
* A conflicting companion proposal is never offered; a conflicting creator-supplied name is offered only
|
|
541
|
+
* as an explicit "keep despite conflict" option.
|
|
542
|
+
*/
|
|
543
|
+
MetaWorkflow_ElicitationOptionsSource["BRAND_NAME_SCREENING_CANDIDATES"] = "brand_name_screening_candidates";
|
|
544
|
+
})(MetaWorkflow_ElicitationOptionsSource || (MetaWorkflow_ElicitationOptionsSource = {}));
|
|
517
545
|
export const MetaWorkflow_ElicitationSpecSchema = z.object({
|
|
518
546
|
questions: z
|
|
519
547
|
.array(z.object({
|
|
520
548
|
ref: z.string().min(1),
|
|
521
549
|
question: z.string().min(1),
|
|
522
550
|
kind: z.enum(HumanDecision_FieldKind),
|
|
523
|
-
/** Required when kind = CHOICE. */
|
|
551
|
+
/** Required when kind = CHOICE, unless `optionsFrom` computes them. */
|
|
524
552
|
options: z.array(z.string().min(1)).optional(),
|
|
553
|
+
/**
|
|
554
|
+
* Computed options for a CHOICE (see {@link MetaWorkflow_ElicitationOptionsSource}). Resolved at every
|
|
555
|
+
* door that shows or accepts an answer; an answer to a question whose options were never resolved is
|
|
556
|
+
* refused rather than accepted unchecked.
|
|
557
|
+
*/
|
|
558
|
+
optionsFrom: z.enum(MetaWorkflow_ElicitationOptionsSource).optional(),
|
|
525
559
|
/**
|
|
526
560
|
* The SAME DECISION another step already asks (#1454, gap 4): this question's answer IS that
|
|
527
561
|
* question's answer, so the creator is asked once. The dossier lists the decision at the step
|
|
@@ -537,6 +571,21 @@ export const MetaWorkflow_ElicitationSpecSchema = z.object({
|
|
|
537
571
|
playbookRef: z.string().min(1),
|
|
538
572
|
questionRef: z.string().min(1),
|
|
539
573
|
}).optional(),
|
|
574
|
+
/**
|
|
575
|
+
* Which interview depth asks it (#2129). Absent means ESSENTIAL — read it through
|
|
576
|
+
* `resolveElicitationQuestionDepth`, never directly.
|
|
577
|
+
*/
|
|
578
|
+
depth: z.enum(MetaWorkflow_ElicitationQuestionDepth).optional(),
|
|
579
|
+
/**
|
|
580
|
+
* Whether the companion may propose an answer the creator does not give (#2129). Absent means
|
|
581
|
+
* PROPOSE — read it through `resolveElicitationUnknownPolicy`, never directly.
|
|
582
|
+
*/
|
|
583
|
+
whenUnknown: z.enum(MetaWorkflow_ElicitationUnknownPolicy).optional(),
|
|
584
|
+
/**
|
|
585
|
+
* The question concerns a regulated domain (#2129): a proposed answer to it is named to the person
|
|
586
|
+
* explicitly before it is kept. Read it through `isRegulatedDomainElicitationQuestion`.
|
|
587
|
+
*/
|
|
588
|
+
regulatedDomain: z.boolean().optional(),
|
|
540
589
|
}))
|
|
541
590
|
.min(1),
|
|
542
591
|
});
|
|
@@ -711,8 +760,24 @@ export const MetaWorkflow_ChoreographySchema = z.object({
|
|
|
711
760
|
* single-value family" would let a market-segment instance rewrite the application's market snapshot.
|
|
712
761
|
*/
|
|
713
762
|
actsOnApplication: z.array(z.string().min(1)).optional(),
|
|
763
|
+
/**
|
|
764
|
+
* The admitted child this lane ENDS ON (#2236): a lane may not report itself finished before the closing move
|
|
765
|
+
* has run in that run. When the selector chooses to stop and the closing move has not run and is on offer, the
|
|
766
|
+
* runtime runs it instead of stopping; when it is not on offer, the lane ends anyway, the boundary records the
|
|
767
|
+
* closing move as UNRUN with the reason, and the lane no longer reads as concluded.
|
|
768
|
+
*
|
|
769
|
+
* It exists because a closing move that lands nothing — the definition lane's phase gate, whose output is a
|
|
770
|
+
* verdict — is never marked delivered, so "has it run?" was left to the selector reading the lane's intent text.
|
|
771
|
+
* Measured on app-creation-test-004 (2026-09-30): the definition lane's families landed, the run went on to
|
|
772
|
+
* conception, compliance and build, and the go/no-go decision never ran. Marking, not refusing: a closing move
|
|
773
|
+
* that cannot run never stops the lane (`.claude/rules/application-creation-directive.md`).
|
|
774
|
+
*/
|
|
775
|
+
closingMove: z.string().min(1).optional(),
|
|
714
776
|
}).superRefine((choreography, context) => {
|
|
715
777
|
const admitted = new Set(choreography.admits);
|
|
778
|
+
if (choreography.closingMove !== undefined && !admitted.has(choreography.closingMove)) {
|
|
779
|
+
context.addIssue({ code: 'custom', path: ['closingMove'], message: `"${choreography.closingMove}" is not admitted by this composite, so the lane could never end on it.` });
|
|
780
|
+
}
|
|
716
781
|
(choreography.actsOnApplication ?? []).forEach((ref, index) => {
|
|
717
782
|
if (!admitted.has(ref)) {
|
|
718
783
|
context.addIssue({ code: 'custom', path: ['actsOnApplication', index], message: `"${ref}" is not admitted by this composite, so it can never act for it.` });
|