lazycodex-ai 5.0.0-beta.63 → 5.0.0-beta.65
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/cli/index.js +28 -23
- package/dist/cli-node/index.js +28 -23
- package/package.json +1 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +8 -3
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -0
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-codex-validation.d.ts +7 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-codex-validation.js +7 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +364 -135
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +20 -12
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/driver-objective-ack.d.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/driver-objective-ack.js +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence-artifacts.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence-artifacts.js +37 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +8 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +6 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-goal-factory.d.ts +10 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-goal-factory.js +38 -31
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +8 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/factory.js +17 -8
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/manifest.d.ts +335 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/manifest.js +109 -10
- package/packages/omo-codex/plugin/components/ulw-loop/dist/sdk/types.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.d.ts +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.js +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +9 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.d.ts +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +6 -6
- package/packages/omo-codex/plugin/components/ulw-loop/dist/success-criteria-input.d.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/success-criteria-input.js +41 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-codex-validation.ts +15 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +26 -14
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/driver-objective-ack.ts +20 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/evidence-artifacts.ts +45 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/evidence.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +9 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-goal-factory.ts +63 -31
- package/packages/omo-codex/plugin/components/ulw-loop/src/review-blockers.ts +8 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/factory.ts +17 -7
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/manifest.ts +124 -10
- package/packages/omo-codex/plugin/components/ulw-loop/src/sdk/types.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-mutations.ts +5 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-types.ts +13 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +7 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/success-criteria-input.ts +56 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-snapshot.test.ts +37 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-driver-states.test.ts +33 -4
- package/packages/omo-codex/plugin/components/ulw-loop/test/sdk-dx.test.ts +219 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +10 -5
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -0
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -0
|
@@ -2,7 +2,12 @@ export declare const ULW_LOOP_OPERATIONS: readonly ["help", "create-goals", "sta
|
|
|
2
2
|
export type UlwLoopOperation = (typeof ULW_LOOP_OPERATIONS)[number];
|
|
3
3
|
export interface ToolkitOperationManifest {
|
|
4
4
|
readonly name: UlwLoopOperation;
|
|
5
|
+
/** The camelCase method that runs this operation on every SDK surface. */
|
|
6
|
+
readonly method: string;
|
|
5
7
|
readonly mutating: boolean;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
/** Argument field -> type notation; a trailing `?` marks an optional field. */
|
|
10
|
+
readonly args: Readonly<Record<string, string>>;
|
|
6
11
|
}
|
|
7
12
|
export interface ToolkitManifest {
|
|
8
13
|
readonly version: 1;
|
|
@@ -14,33 +19,363 @@ export declare const ULW_LOOP_MANIFEST: {
|
|
|
14
19
|
name: "ulw-loop";
|
|
15
20
|
operations: ({
|
|
16
21
|
name: "help";
|
|
22
|
+
method: string;
|
|
17
23
|
mutating: false;
|
|
24
|
+
description: string;
|
|
25
|
+
args: {
|
|
26
|
+
brief?: never;
|
|
27
|
+
codexGoalMode?: never;
|
|
28
|
+
force?: never;
|
|
29
|
+
validationBatchesJson?: never;
|
|
30
|
+
retryFailed?: never;
|
|
31
|
+
qualityGateJson?: never;
|
|
32
|
+
printTemplate?: never;
|
|
33
|
+
kind?: never;
|
|
34
|
+
source?: never;
|
|
35
|
+
rationale?: never;
|
|
36
|
+
scenario?: never;
|
|
37
|
+
expectedEvidence?: never;
|
|
38
|
+
userModel?: never;
|
|
39
|
+
childGoals?: never;
|
|
40
|
+
revisedTitle?: never;
|
|
41
|
+
revisedObjective?: never;
|
|
42
|
+
pendingOrder?: never;
|
|
43
|
+
blockedReason?: never;
|
|
44
|
+
idempotencyKey?: never;
|
|
45
|
+
successCriteria?: never;
|
|
46
|
+
criterionId?: never;
|
|
47
|
+
status?: never;
|
|
48
|
+
notes?: never;
|
|
49
|
+
artifacts?: never;
|
|
50
|
+
goalId?: never;
|
|
51
|
+
title?: never;
|
|
52
|
+
objective?: never;
|
|
53
|
+
evidence?: never;
|
|
54
|
+
codexGoalJson?: never;
|
|
55
|
+
};
|
|
18
56
|
} | {
|
|
19
57
|
name: "create-goals";
|
|
58
|
+
method: string;
|
|
20
59
|
mutating: true;
|
|
60
|
+
description: string;
|
|
61
|
+
args: {
|
|
62
|
+
brief: string;
|
|
63
|
+
codexGoalMode: string;
|
|
64
|
+
force: string;
|
|
65
|
+
validationBatchesJson: string;
|
|
66
|
+
retryFailed?: never;
|
|
67
|
+
qualityGateJson?: never;
|
|
68
|
+
printTemplate?: never;
|
|
69
|
+
kind?: never;
|
|
70
|
+
source?: never;
|
|
71
|
+
rationale?: never;
|
|
72
|
+
scenario?: never;
|
|
73
|
+
expectedEvidence?: never;
|
|
74
|
+
userModel?: never;
|
|
75
|
+
childGoals?: never;
|
|
76
|
+
revisedTitle?: never;
|
|
77
|
+
revisedObjective?: never;
|
|
78
|
+
pendingOrder?: never;
|
|
79
|
+
blockedReason?: never;
|
|
80
|
+
idempotencyKey?: never;
|
|
81
|
+
successCriteria?: never;
|
|
82
|
+
criterionId?: never;
|
|
83
|
+
status?: never;
|
|
84
|
+
notes?: never;
|
|
85
|
+
artifacts?: never;
|
|
86
|
+
goalId?: never;
|
|
87
|
+
title?: never;
|
|
88
|
+
objective?: never;
|
|
89
|
+
evidence?: never;
|
|
90
|
+
codexGoalJson?: never;
|
|
91
|
+
};
|
|
21
92
|
} | {
|
|
22
93
|
name: "status";
|
|
94
|
+
method: string;
|
|
23
95
|
mutating: false;
|
|
96
|
+
description: string;
|
|
97
|
+
args: {
|
|
98
|
+
brief?: never;
|
|
99
|
+
codexGoalMode?: never;
|
|
100
|
+
force?: never;
|
|
101
|
+
validationBatchesJson?: never;
|
|
102
|
+
retryFailed?: never;
|
|
103
|
+
qualityGateJson?: never;
|
|
104
|
+
printTemplate?: never;
|
|
105
|
+
kind?: never;
|
|
106
|
+
source?: never;
|
|
107
|
+
rationale?: never;
|
|
108
|
+
scenario?: never;
|
|
109
|
+
expectedEvidence?: never;
|
|
110
|
+
userModel?: never;
|
|
111
|
+
childGoals?: never;
|
|
112
|
+
revisedTitle?: never;
|
|
113
|
+
revisedObjective?: never;
|
|
114
|
+
pendingOrder?: never;
|
|
115
|
+
blockedReason?: never;
|
|
116
|
+
idempotencyKey?: never;
|
|
117
|
+
successCriteria?: never;
|
|
118
|
+
criterionId?: never;
|
|
119
|
+
status?: never;
|
|
120
|
+
notes?: never;
|
|
121
|
+
artifacts?: never;
|
|
122
|
+
goalId?: never;
|
|
123
|
+
title?: never;
|
|
124
|
+
objective?: never;
|
|
125
|
+
evidence?: never;
|
|
126
|
+
codexGoalJson?: never;
|
|
127
|
+
};
|
|
24
128
|
} | {
|
|
25
129
|
name: "complete-goals";
|
|
130
|
+
method: string;
|
|
26
131
|
mutating: true;
|
|
132
|
+
description: string;
|
|
133
|
+
args: {
|
|
134
|
+
brief?: never;
|
|
135
|
+
codexGoalMode?: never;
|
|
136
|
+
force?: never;
|
|
137
|
+
validationBatchesJson?: never;
|
|
138
|
+
retryFailed: string;
|
|
139
|
+
qualityGateJson?: never;
|
|
140
|
+
printTemplate?: never;
|
|
141
|
+
kind?: never;
|
|
142
|
+
source?: never;
|
|
143
|
+
rationale?: never;
|
|
144
|
+
scenario?: never;
|
|
145
|
+
expectedEvidence?: never;
|
|
146
|
+
userModel?: never;
|
|
147
|
+
childGoals?: never;
|
|
148
|
+
revisedTitle?: never;
|
|
149
|
+
revisedObjective?: never;
|
|
150
|
+
pendingOrder?: never;
|
|
151
|
+
blockedReason?: never;
|
|
152
|
+
idempotencyKey?: never;
|
|
153
|
+
successCriteria?: never;
|
|
154
|
+
criterionId?: never;
|
|
155
|
+
status?: never;
|
|
156
|
+
notes?: never;
|
|
157
|
+
artifacts?: never;
|
|
158
|
+
goalId?: never;
|
|
159
|
+
title?: never;
|
|
160
|
+
objective?: never;
|
|
161
|
+
evidence?: never;
|
|
162
|
+
codexGoalJson?: never;
|
|
163
|
+
};
|
|
27
164
|
} | {
|
|
28
165
|
name: "checkpoint";
|
|
166
|
+
method: string;
|
|
29
167
|
mutating: true;
|
|
168
|
+
description: string;
|
|
169
|
+
args: {
|
|
170
|
+
brief?: never;
|
|
171
|
+
codexGoalMode?: never;
|
|
172
|
+
force?: never;
|
|
173
|
+
validationBatchesJson?: never;
|
|
174
|
+
retryFailed?: never;
|
|
175
|
+
goalId: string;
|
|
176
|
+
status: string;
|
|
177
|
+
evidence: string;
|
|
178
|
+
codexGoalJson: string;
|
|
179
|
+
qualityGateJson: string;
|
|
180
|
+
printTemplate: string;
|
|
181
|
+
kind?: never;
|
|
182
|
+
source?: never;
|
|
183
|
+
rationale?: never;
|
|
184
|
+
scenario?: never;
|
|
185
|
+
expectedEvidence?: never;
|
|
186
|
+
userModel?: never;
|
|
187
|
+
childGoals?: never;
|
|
188
|
+
revisedTitle?: never;
|
|
189
|
+
revisedObjective?: never;
|
|
190
|
+
pendingOrder?: never;
|
|
191
|
+
blockedReason?: never;
|
|
192
|
+
idempotencyKey?: never;
|
|
193
|
+
successCriteria?: never;
|
|
194
|
+
criterionId?: never;
|
|
195
|
+
notes?: never;
|
|
196
|
+
artifacts?: never;
|
|
197
|
+
title?: never;
|
|
198
|
+
objective?: never;
|
|
199
|
+
};
|
|
30
200
|
} | {
|
|
31
201
|
name: "steer";
|
|
202
|
+
method: string;
|
|
32
203
|
mutating: true;
|
|
204
|
+
description: string;
|
|
205
|
+
args: {
|
|
206
|
+
brief?: never;
|
|
207
|
+
codexGoalMode?: never;
|
|
208
|
+
force?: never;
|
|
209
|
+
validationBatchesJson?: never;
|
|
210
|
+
retryFailed?: never;
|
|
211
|
+
qualityGateJson?: never;
|
|
212
|
+
printTemplate?: never;
|
|
213
|
+
kind: string;
|
|
214
|
+
source: string;
|
|
215
|
+
evidence: string;
|
|
216
|
+
rationale: string;
|
|
217
|
+
goalId: string;
|
|
218
|
+
criterionId: string;
|
|
219
|
+
scenario: string;
|
|
220
|
+
expectedEvidence: string;
|
|
221
|
+
userModel: string;
|
|
222
|
+
title: string;
|
|
223
|
+
objective: string;
|
|
224
|
+
childGoals: string;
|
|
225
|
+
revisedTitle: string;
|
|
226
|
+
revisedObjective: string;
|
|
227
|
+
pendingOrder: string;
|
|
228
|
+
blockedReason: string;
|
|
229
|
+
idempotencyKey: string;
|
|
230
|
+
successCriteria?: never;
|
|
231
|
+
status?: never;
|
|
232
|
+
notes?: never;
|
|
233
|
+
artifacts?: never;
|
|
234
|
+
codexGoalJson?: never;
|
|
235
|
+
};
|
|
33
236
|
} | {
|
|
34
237
|
name: "add-goal";
|
|
238
|
+
method: string;
|
|
35
239
|
mutating: true;
|
|
240
|
+
description: string;
|
|
241
|
+
args: {
|
|
242
|
+
brief?: never;
|
|
243
|
+
codexGoalMode?: never;
|
|
244
|
+
force?: never;
|
|
245
|
+
validationBatchesJson?: never;
|
|
246
|
+
retryFailed?: never;
|
|
247
|
+
qualityGateJson?: never;
|
|
248
|
+
printTemplate?: never;
|
|
249
|
+
kind?: never;
|
|
250
|
+
source?: never;
|
|
251
|
+
rationale?: never;
|
|
252
|
+
scenario?: never;
|
|
253
|
+
expectedEvidence?: never;
|
|
254
|
+
userModel?: never;
|
|
255
|
+
childGoals?: never;
|
|
256
|
+
revisedTitle?: never;
|
|
257
|
+
revisedObjective?: never;
|
|
258
|
+
pendingOrder?: never;
|
|
259
|
+
blockedReason?: never;
|
|
260
|
+
idempotencyKey?: never;
|
|
261
|
+
title: string;
|
|
262
|
+
objective: string;
|
|
263
|
+
successCriteria: string;
|
|
264
|
+
criterionId?: never;
|
|
265
|
+
status?: never;
|
|
266
|
+
notes?: never;
|
|
267
|
+
artifacts?: never;
|
|
268
|
+
goalId?: never;
|
|
269
|
+
evidence?: never;
|
|
270
|
+
codexGoalJson?: never;
|
|
271
|
+
};
|
|
36
272
|
} | {
|
|
37
273
|
name: "criteria";
|
|
274
|
+
method: string;
|
|
38
275
|
mutating: false;
|
|
276
|
+
description: string;
|
|
277
|
+
args: {
|
|
278
|
+
brief?: never;
|
|
279
|
+
codexGoalMode?: never;
|
|
280
|
+
force?: never;
|
|
281
|
+
validationBatchesJson?: never;
|
|
282
|
+
retryFailed?: never;
|
|
283
|
+
qualityGateJson?: never;
|
|
284
|
+
printTemplate?: never;
|
|
285
|
+
kind?: never;
|
|
286
|
+
source?: never;
|
|
287
|
+
rationale?: never;
|
|
288
|
+
scenario?: never;
|
|
289
|
+
expectedEvidence?: never;
|
|
290
|
+
userModel?: never;
|
|
291
|
+
childGoals?: never;
|
|
292
|
+
revisedTitle?: never;
|
|
293
|
+
revisedObjective?: never;
|
|
294
|
+
pendingOrder?: never;
|
|
295
|
+
blockedReason?: never;
|
|
296
|
+
idempotencyKey?: never;
|
|
297
|
+
successCriteria?: never;
|
|
298
|
+
goalId: string;
|
|
299
|
+
criterionId?: never;
|
|
300
|
+
status?: never;
|
|
301
|
+
notes?: never;
|
|
302
|
+
artifacts?: never;
|
|
303
|
+
title?: never;
|
|
304
|
+
objective?: never;
|
|
305
|
+
evidence?: never;
|
|
306
|
+
codexGoalJson?: never;
|
|
307
|
+
};
|
|
39
308
|
} | {
|
|
40
309
|
name: "record-evidence";
|
|
310
|
+
method: string;
|
|
41
311
|
mutating: true;
|
|
312
|
+
description: string;
|
|
313
|
+
args: {
|
|
314
|
+
brief?: never;
|
|
315
|
+
codexGoalMode?: never;
|
|
316
|
+
force?: never;
|
|
317
|
+
validationBatchesJson?: never;
|
|
318
|
+
retryFailed?: never;
|
|
319
|
+
qualityGateJson?: never;
|
|
320
|
+
printTemplate?: never;
|
|
321
|
+
kind?: never;
|
|
322
|
+
source?: never;
|
|
323
|
+
rationale?: never;
|
|
324
|
+
scenario?: never;
|
|
325
|
+
expectedEvidence?: never;
|
|
326
|
+
userModel?: never;
|
|
327
|
+
childGoals?: never;
|
|
328
|
+
revisedTitle?: never;
|
|
329
|
+
revisedObjective?: never;
|
|
330
|
+
pendingOrder?: never;
|
|
331
|
+
blockedReason?: never;
|
|
332
|
+
idempotencyKey?: never;
|
|
333
|
+
successCriteria?: never;
|
|
334
|
+
goalId: string;
|
|
335
|
+
criterionId: string;
|
|
336
|
+
status: string;
|
|
337
|
+
evidence: string;
|
|
338
|
+
notes: string;
|
|
339
|
+
artifacts: string;
|
|
340
|
+
title?: never;
|
|
341
|
+
objective?: never;
|
|
342
|
+
codexGoalJson?: never;
|
|
343
|
+
};
|
|
42
344
|
} | {
|
|
43
345
|
name: "record-review-blockers";
|
|
346
|
+
method: string;
|
|
44
347
|
mutating: true;
|
|
348
|
+
description: string;
|
|
349
|
+
args: {
|
|
350
|
+
brief?: never;
|
|
351
|
+
codexGoalMode?: never;
|
|
352
|
+
force?: never;
|
|
353
|
+
validationBatchesJson?: never;
|
|
354
|
+
retryFailed?: never;
|
|
355
|
+
qualityGateJson?: never;
|
|
356
|
+
printTemplate?: never;
|
|
357
|
+
kind?: never;
|
|
358
|
+
source?: never;
|
|
359
|
+
rationale?: never;
|
|
360
|
+
scenario?: never;
|
|
361
|
+
expectedEvidence?: never;
|
|
362
|
+
userModel?: never;
|
|
363
|
+
childGoals?: never;
|
|
364
|
+
revisedTitle?: never;
|
|
365
|
+
revisedObjective?: never;
|
|
366
|
+
pendingOrder?: never;
|
|
367
|
+
blockedReason?: never;
|
|
368
|
+
idempotencyKey?: never;
|
|
369
|
+
successCriteria?: never;
|
|
370
|
+
criterionId?: never;
|
|
371
|
+
status?: never;
|
|
372
|
+
notes?: never;
|
|
373
|
+
artifacts?: never;
|
|
374
|
+
goalId: string;
|
|
375
|
+
title: string;
|
|
376
|
+
objective: string;
|
|
377
|
+
evidence: string;
|
|
378
|
+
codexGoalJson: string;
|
|
379
|
+
};
|
|
45
380
|
})[];
|
|
46
381
|
};
|
|
@@ -10,19 +10,118 @@ export const ULW_LOOP_OPERATIONS = [
|
|
|
10
10
|
"record-evidence",
|
|
11
11
|
"record-review-blockers",
|
|
12
12
|
];
|
|
13
|
+
const CRITERION_INPUT = '{ scenario: string, expectedEvidence: string, userModel?: "happy" | "edge" | "regression" | "adversarial", essential?: boolean }';
|
|
14
|
+
const STEER_KINDS = '"add_subgoal" | "split_subgoal" | "reorder_pending" | "revise_pending_wording" | "revise_criterion" | "annotate_ledger" | "mark_blocked_superseded"';
|
|
13
15
|
export const ULW_LOOP_MANIFEST = {
|
|
14
16
|
version: 1,
|
|
15
17
|
name: "ulw-loop",
|
|
16
18
|
operations: [
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
{
|
|
20
|
+
name: "help",
|
|
21
|
+
method: "help",
|
|
22
|
+
mutating: false,
|
|
23
|
+
description: "Return this manifest: every operation with its method name, argument fields, and what it does.",
|
|
24
|
+
args: {},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "create-goals",
|
|
28
|
+
method: "createGoals",
|
|
29
|
+
mutating: true,
|
|
30
|
+
description: "Create the session plan from a brief; one goal per bullet, each seeded with placeholder criteria until revised.",
|
|
31
|
+
args: {
|
|
32
|
+
brief: "string",
|
|
33
|
+
codexGoalMode: '"aggregate" | "per_story"?',
|
|
34
|
+
force: "boolean?",
|
|
35
|
+
validationBatchesJson: "string?",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "status",
|
|
40
|
+
method: "status",
|
|
41
|
+
mutating: false,
|
|
42
|
+
description: "Read the plan, its summary, structured nextActions, the stable evidenceRoot, and the active goal's currentAttemptDir.",
|
|
43
|
+
args: {},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "complete-goals",
|
|
47
|
+
method: "completeGoals",
|
|
48
|
+
mutating: true,
|
|
49
|
+
description: "Acquire the next eligible goal or resume the in-progress one; returns { done: true } once the aggregate is complete.",
|
|
50
|
+
args: { retryFailed: "boolean?" },
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "checkpoint",
|
|
54
|
+
method: "checkpoint",
|
|
55
|
+
mutating: true,
|
|
56
|
+
description: "Close the goal as complete, failed, or blocked with evidence; the final goal also needs the quality gate. printTemplate returns that gate's template instead.",
|
|
57
|
+
args: {
|
|
58
|
+
goalId: "string",
|
|
59
|
+
status: '"complete" | "failed" | "blocked"',
|
|
60
|
+
evidence: "string",
|
|
61
|
+
codexGoalJson: "string?",
|
|
62
|
+
qualityGateJson: "string?",
|
|
63
|
+
printTemplate: "true? (with goalId? only)",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "steer",
|
|
68
|
+
method: "steer",
|
|
69
|
+
mutating: true,
|
|
70
|
+
description: "Propose an evidence-backed plan mutation; revise_criterion replaces a criterion's scenario, expectedEvidence, or userModel.",
|
|
71
|
+
args: {
|
|
72
|
+
kind: STEER_KINDS,
|
|
73
|
+
source: '"finding" | "user_prompt_submit" | "cli"',
|
|
74
|
+
evidence: "string",
|
|
75
|
+
rationale: "string",
|
|
76
|
+
goalId: "string?",
|
|
77
|
+
criterionId: "string? (revise_criterion)",
|
|
78
|
+
scenario: "string? (revise_criterion)",
|
|
79
|
+
expectedEvidence: "string? (revise_criterion)",
|
|
80
|
+
userModel: '"happy" | "edge" | "regression" | "adversarial"? (revise_criterion)',
|
|
81
|
+
title: "string? (add_subgoal)",
|
|
82
|
+
objective: "string? (add_subgoal)",
|
|
83
|
+
childGoals: "{ title: string, objective: string }[]? (split_subgoal)",
|
|
84
|
+
revisedTitle: "string? (revise_pending_wording)",
|
|
85
|
+
revisedObjective: "string? (revise_pending_wording)",
|
|
86
|
+
pendingOrder: "string[]? (reorder_pending)",
|
|
87
|
+
blockedReason: "string? (mark_blocked_superseded)",
|
|
88
|
+
idempotencyKey: "string?",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "add-goal",
|
|
93
|
+
method: "addGoal",
|
|
94
|
+
mutating: true,
|
|
95
|
+
description: "Append a goal; pass successCriteria to define its criteria in the same call, otherwise placeholders name the revise call.",
|
|
96
|
+
args: { title: "string", objective: "string", successCriteria: `${CRITERION_INPUT}[]?` },
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "criteria",
|
|
100
|
+
method: "criteria",
|
|
101
|
+
mutating: false,
|
|
102
|
+
description: "List one goal's success criteria with their status and captured evidence.",
|
|
103
|
+
args: { goalId: "string" },
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "record-evidence",
|
|
107
|
+
method: "recordEvidence",
|
|
108
|
+
mutating: true,
|
|
109
|
+
description: "Record a criterion's pass, fail, or blocked evidence; artifacts must exist (resolved against the session cwd) and are stored with the criterion and the ledger entry.",
|
|
110
|
+
args: {
|
|
111
|
+
goalId: "string",
|
|
112
|
+
criterionId: "string",
|
|
113
|
+
status: '"pass" | "fail" | "blocked"',
|
|
114
|
+
evidence: "string",
|
|
115
|
+
notes: "string?",
|
|
116
|
+
artifacts: "string[]?",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "record-review-blockers",
|
|
121
|
+
method: "recordReviewBlockers",
|
|
122
|
+
mutating: true,
|
|
123
|
+
description: "Mark the final goal review_blocked and append the blocker goal the reviewer verdict names.",
|
|
124
|
+
args: { goalId: "string", title: "string", objective: "string", evidence: "string", codexGoalJson: "string?" },
|
|
125
|
+
},
|
|
27
126
|
],
|
|
28
127
|
};
|
|
@@ -82,11 +82,14 @@ export interface ToolkitFailure<Operation extends string = string> {
|
|
|
82
82
|
readonly ok: false;
|
|
83
83
|
readonly operation: Operation;
|
|
84
84
|
readonly error: ToolkitError;
|
|
85
|
+
readonly warnings?: readonly string[];
|
|
85
86
|
}
|
|
86
87
|
type StatusResult = {
|
|
87
88
|
readonly plan: UlwLoopPlan;
|
|
88
89
|
readonly summary: ReturnType<typeof summarizeUlwLoopPlan>;
|
|
89
90
|
readonly nextActions: readonly string[];
|
|
91
|
+
/** Plan-level evidence directory, stable for the whole run (relative to the session cwd). */
|
|
92
|
+
readonly evidenceRoot: string;
|
|
90
93
|
readonly currentAttemptDir?: string;
|
|
91
94
|
};
|
|
92
95
|
type ResultFor<Operation extends UlwLoopOperation> = Operation extends "help" ? typeof ULW_LOOP_MANIFEST : Operation extends "create-goals" ? Awaited<ReturnType<typeof createUlwLoopPlan>> : Operation extends "status" ? StatusResult : Operation extends "complete-goals" ? Awaited<ReturnType<typeof startNextUlwLoop>> : Operation extends "checkpoint" ? CheckpointUlwLoopResult | CheckpointTemplate : Operation extends "steer" ? Awaited<ReturnType<typeof steerUlwLoop>> : Operation extends "add-goal" ? Awaited<ReturnType<typeof addUlwLoopGoal>> : Operation extends "criteria" ? {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { UlwLoopToolkitSurface } from "./surface.js";
|
|
1
2
|
import type { UlwLoopItem, UlwLoopPlan, UlwLoopSteeringChildGoal, UlwLoopSteeringProposal } from "./types.js";
|
|
2
|
-
export declare function makeGoal(plan: UlwLoopPlan, childGoal: UlwLoopSteeringChildGoal, evidence: string, now: string, offset: number): UlwLoopItem;
|
|
3
|
+
export declare function makeGoal(plan: UlwLoopPlan, childGoal: UlwLoopSteeringChildGoal, evidence: string, now: string, offset: number, surface?: UlwLoopToolkitSurface): UlwLoopItem;
|
|
3
4
|
export declare function reviseWording(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void;
|
|
4
|
-
export declare function splitOrBlock(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void;
|
|
5
|
+
export declare function splitOrBlock(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string, surface?: UlwLoopToolkitSurface): void;
|
|
5
6
|
export declare function reviseCriterion(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void;
|
|
@@ -29,11 +29,11 @@ function nextId(plan, offset) {
|
|
|
29
29
|
const max = plan.goals.reduce((current, item) => { const digits = /^G(\d+)(?:-|$)/u.exec(item.id)?.[1]; return digits === undefined ? current : Math.max(current, Number(digits)); }, 0);
|
|
30
30
|
return `G${String(max + offset).padStart(3, "0")}`;
|
|
31
31
|
}
|
|
32
|
-
export function makeGoal(plan, childGoal, evidence, now, offset) {
|
|
32
|
+
export function makeGoal(plan, childGoal, evidence, now, offset, surface = "lazycodex") {
|
|
33
33
|
const id = nextId(plan, offset);
|
|
34
34
|
const digits = /^G(\d+)/u.exec(id)?.[1];
|
|
35
35
|
const goalIndex = digits === undefined ? plan.goals.length + offset - 1 : Number(digits) - 1;
|
|
36
|
-
return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective), attempt: 0, createdAt: now, updatedAt: now, evidence };
|
|
36
|
+
return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective, { goalId: id, surface }), attempt: 0, createdAt: now, updatedAt: now, evidence };
|
|
37
37
|
}
|
|
38
38
|
export function reviseWording(plan, proposal, now) {
|
|
39
39
|
const target = goal(plan, targets(proposal)[0]);
|
|
@@ -45,11 +45,11 @@ export function reviseWording(plan, proposal, now) {
|
|
|
45
45
|
target.steeringRationale = proposal.rationale;
|
|
46
46
|
target.updatedAt = now;
|
|
47
47
|
}
|
|
48
|
-
export function splitOrBlock(plan, proposal, now) {
|
|
48
|
+
export function splitOrBlock(plan, proposal, now, surface = "lazycodex") {
|
|
49
49
|
const target = goal(plan, targets(proposal)[0]);
|
|
50
50
|
if (target === undefined)
|
|
51
51
|
return;
|
|
52
|
-
const replacements = children(proposal).map((item, index) => makeGoal(plan, item, proposal.evidence, now, index + 1));
|
|
52
|
+
const replacements = children(proposal).map((item, index) => makeGoal(plan, item, proposal.evidence, now, index + 1, surface));
|
|
53
53
|
target.steeringEvidence = proposal.evidence;
|
|
54
54
|
target.steeringRationale = proposal.rationale;
|
|
55
55
|
target.updatedAt = now;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UlwLoopSteeringMutationKind, UlwLoopSteeringSource } from "./constants.js";
|
|
1
|
+
import type { UlwLoopSteeringMutationKind, UlwLoopSteeringSource, UlwLoopSuccessCriterionUserModel } from "./constants.js";
|
|
2
2
|
import type { UlwLoopItem, UlwLoopPlan } from "./domain-types.js";
|
|
3
3
|
export interface UlwLoopSteeringInvariantResult {
|
|
4
4
|
accepted: boolean;
|
|
@@ -21,9 +21,17 @@ export interface UlwLoopSteeringAfterPayload {
|
|
|
21
21
|
export interface UlwLoopSteeringProposal {
|
|
22
22
|
kind: UlwLoopSteeringMutationKind;
|
|
23
23
|
source: UlwLoopSteeringSource;
|
|
24
|
+
/** Alias of `targetGoalId`; the SDK documentation uses `goalId` like every other operation. */
|
|
25
|
+
goalId?: string;
|
|
24
26
|
targetGoalId?: string;
|
|
25
27
|
targetGoalIds?: string[];
|
|
26
28
|
criterionId?: string;
|
|
29
|
+
/** `revise_criterion` payload: the replacement scenario text. */
|
|
30
|
+
scenario?: string;
|
|
31
|
+
/** `revise_criterion` payload: the replacement observable-proof text. */
|
|
32
|
+
expectedEvidence?: string;
|
|
33
|
+
/** `revise_criterion` payload: the replacement user model. */
|
|
34
|
+
userModel?: UlwLoopSuccessCriterionUserModel;
|
|
27
35
|
evidence: string;
|
|
28
36
|
rationale: string;
|
|
29
37
|
title?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { UlwLoopScope } from "./paths.js";
|
|
2
|
+
import type { UlwLoopToolkitSurface } from "./surface.js";
|
|
2
3
|
import type { SteerUlwLoopResult, UlwLoopPlan, UlwLoopSteeringAudit, UlwLoopSteeringProposal } from "./types.js";
|
|
3
4
|
export declare function validateUlwLoopSteeringProposal(plan: UlwLoopPlan, proposal: unknown): UlwLoopSteeringAudit;
|
|
4
|
-
export declare function applySteeringMutation(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, audit: UlwLoopSteeringAudit): UlwLoopPlan;
|
|
5
|
+
export declare function applySteeringMutation(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, audit: UlwLoopSteeringAudit, surface?: UlwLoopToolkitSurface): UlwLoopPlan;
|
|
5
6
|
export declare function parseUlwLoopSteeringDirective(text: string): UlwLoopSteeringProposal | null;
|
|
6
|
-
export declare function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringProposal, scope?: UlwLoopScope): Promise<SteerUlwLoopResult>;
|
|
7
|
+
export declare function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringProposal, scope?: UlwLoopScope, surface?: UlwLoopToolkitSurface): Promise<SteerUlwLoopResult>;
|
|
@@ -7,7 +7,7 @@ import { buildSteeringPlanSnapshot, changedGoalIdsBetween } from "./steering-sna
|
|
|
7
7
|
import { iso, ULW_LOOP_STEERING_MUTATION_KINDS, ULW_LOOP_SUCCESS_CRITERION_USER_MODELS } from "./types.js";
|
|
8
8
|
import { batchUpdateLedgerEntry } from "./validation-batch.js";
|
|
9
9
|
const SOURCES = ["user_prompt_submit", "finding", "cli"];
|
|
10
|
-
const PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);
|
|
10
|
+
const PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "acknowledgedDriverObjectives", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);
|
|
11
11
|
const isObject = (value) => typeof value === "object" && value !== null;
|
|
12
12
|
const isPlain = (value) => isObject(value) && !Array.isArray(value);
|
|
13
13
|
const read = (value, key) => Object.entries(value).find(([name]) => name === key)?.[1];
|
|
@@ -164,13 +164,13 @@ function validateCriterion(plan, proposal, reasons) {
|
|
|
164
164
|
if (model !== undefined && !isModel(model))
|
|
165
165
|
reasons.push("invalid userModel");
|
|
166
166
|
}
|
|
167
|
-
export function applySteeringMutation(plan, proposal, audit) {
|
|
167
|
+
export function applySteeringMutation(plan, proposal, audit, surface = "lazycodex") {
|
|
168
168
|
const next = structuredClone(plan);
|
|
169
169
|
if (!audit.invariant.accepted)
|
|
170
170
|
return next;
|
|
171
171
|
const now = proposal.now?.toISOString() ?? iso();
|
|
172
172
|
if (proposal.kind === "add_subgoal")
|
|
173
|
-
next.goals.push(makeGoal(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1));
|
|
173
|
+
next.goals.push(makeGoal(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1, surface));
|
|
174
174
|
if (proposal.kind === "reorder_pending") {
|
|
175
175
|
const order = pendingOrder(proposal);
|
|
176
176
|
next.goals = [...order.map((id) => goal(next, id)).filter((item) => item !== undefined), ...next.goals.filter((item) => !order.includes(item.id))];
|
|
@@ -178,7 +178,7 @@ export function applySteeringMutation(plan, proposal, audit) {
|
|
|
178
178
|
if (proposal.kind === "revise_pending_wording")
|
|
179
179
|
reviseWording(next, proposal, now);
|
|
180
180
|
if (proposal.kind === "split_subgoal" || proposal.kind === "mark_blocked_superseded")
|
|
181
|
-
splitOrBlock(next, proposal, now);
|
|
181
|
+
splitOrBlock(next, proposal, now, surface);
|
|
182
182
|
if (proposal.kind === "revise_criterion")
|
|
183
183
|
reviseCriterion(next, proposal, now);
|
|
184
184
|
if (proposal.kind !== "annotate_ledger")
|
|
@@ -202,7 +202,7 @@ export function parseUlwLoopSteeringDirective(text) {
|
|
|
202
202
|
throw error;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
export async function steerUlwLoop(repoRoot, proposal, scope) {
|
|
205
|
+
export async function steerUlwLoop(repoRoot, proposal, scope, surface = "lazycodex") {
|
|
206
206
|
return withUlwLoopMutationLock(repoRoot, scope, async () => {
|
|
207
207
|
const plan = await readUlwLoopPlan(repoRoot, scope);
|
|
208
208
|
const key = proposal.idempotencyKey ?? proposal.promptSignature;
|
|
@@ -215,7 +215,7 @@ export async function steerUlwLoop(repoRoot, proposal, scope) {
|
|
|
215
215
|
}
|
|
216
216
|
const audit = validateUlwLoopSteeringProposal(plan, proposal);
|
|
217
217
|
const accepted = audit.invariant.accepted;
|
|
218
|
-
const next = accepted ? applySteeringMutation(plan, proposal, audit) : plan;
|
|
218
|
+
const next = accepted ? applySteeringMutation(plan, proposal, audit, surface) : plan;
|
|
219
219
|
const finalAudit = { ...audit };
|
|
220
220
|
if (accepted) {
|
|
221
221
|
const changed = changedGoalIdsBetween(plan, next);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UlwLoopSuccessCriterion, UlwLoopSuccessCriterionUserModel } from "./types.js";
|
|
2
|
+
export interface SuccessCriterionInput {
|
|
3
|
+
readonly scenario: string;
|
|
4
|
+
readonly expectedEvidence: string;
|
|
5
|
+
readonly userModel?: UlwLoopSuccessCriterionUserModel;
|
|
6
|
+
readonly essential?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function criterionId(index: number): string;
|
|
9
|
+
export declare function criteriaFromInput(input: readonly unknown[]): UlwLoopSuccessCriterion[];
|