@jskit-ai/jskit-cli 0.2.81 → 0.2.82
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/package.json +6 -4
- package/src/server/appBlueprint.js +1 -1
- package/src/server/commandHandlers/helperMap.js +104 -0
- package/src/server/commandHandlers/session.js +110 -3
- package/src/server/commandHandlers/show.js +169 -34
- package/src/server/core/argParser.js +8 -0
- package/src/server/core/commandCatalog.js +58 -2
- package/src/server/core/createCommandHandlers.js +4 -1
- package/src/server/helperMap.js +463 -0
- package/src/server/helperMapPaths.js +7 -0
- package/src/server/sessionRuntime/appReadiness.js +55 -0
- package/src/server/sessionRuntime/constants.js +217 -78
- package/src/server/sessionRuntime/preconditions.js +382 -5
- package/src/server/sessionRuntime/promptRenderer.js +15 -2
- package/src/server/sessionRuntime/prompts/automated_checks.md +42 -0
- package/src/server/sessionRuntime/prompts/deep_ui_check.md +53 -0
- package/src/server/sessionRuntime/prompts/doctor_failure.md +11 -2
- package/src/server/sessionRuntime/prompts/execute_plan.md +32 -6
- package/src/server/sessionRuntime/prompts/final_comment.md +3 -1
- package/src/server/sessionRuntime/prompts/issue_details.md +52 -0
- package/src/server/sessionRuntime/prompts/new_issue.md +15 -2
- package/src/server/sessionRuntime/prompts/plan_issue.md +40 -9
- package/src/server/sessionRuntime/prompts/review_changes.md +46 -5
- package/src/server/sessionRuntime/prompts/update_blueprint.md +36 -0
- package/src/server/sessionRuntime/prompts/user_check.md +15 -1
- package/src/server/sessionRuntime/responses.js +776 -56
- package/src/server/sessionRuntime.js +1658 -123
|
@@ -13,7 +13,19 @@ const SESSION_STATUS = Object.freeze({
|
|
|
13
13
|
|
|
14
14
|
const SESSION_ID_PATTERN = /^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}(?:-[a-z0-9]{4})?$/u;
|
|
15
15
|
const SESSION_STATE_RELATIVE_PATH = ".jskit/sessions";
|
|
16
|
+
const SESSION_WORKFLOW_VERSION = "6";
|
|
17
|
+
const REVIEW_PASS_LIMIT = 0;
|
|
16
18
|
const PROMPT_DIRECTORY = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "prompts");
|
|
19
|
+
const JSKIT_CLI_SHELL_COMMAND = "npx --no-install jskit";
|
|
20
|
+
const JSKIT_CLI_SHELL_RULE = [
|
|
21
|
+
"Shell command rule:",
|
|
22
|
+
"",
|
|
23
|
+
`- When running JSKIT CLI commands from the shell, use \`${JSKIT_CLI_SHELL_COMMAND} ...\`.`,
|
|
24
|
+
"- Do not run bare `jskit ...` unless you are inside an npm script where `node_modules/.bin` is on PATH.",
|
|
25
|
+
"- Do not run `npx jskit ...` without `--no-install`; it may fetch packages instead of using this app's installed CLI.",
|
|
26
|
+
"- If `npx --no-install jskit ...` is unavailable, continue with filesystem inspection when possible and report that the local JSKIT CLI is missing."
|
|
27
|
+
].join("\n");
|
|
28
|
+
const DEFAULT_NEXT_COMMAND_TEMPLATE = `${JSKIT_CLI_SHELL_COMMAND} session {{session_id}} step`;
|
|
17
29
|
|
|
18
30
|
const INPUT_NONE = Object.freeze({ type: "none" });
|
|
19
31
|
const ISSUE_TITLE_INPUT = Object.freeze({
|
|
@@ -72,6 +84,50 @@ const PLAN_OUTPUT = Object.freeze({
|
|
|
72
84
|
multiline: true,
|
|
73
85
|
required: true
|
|
74
86
|
});
|
|
87
|
+
const ISSUE_DETAILS_INPUT = Object.freeze({
|
|
88
|
+
extract: "issue_details",
|
|
89
|
+
formatHint: "markdown",
|
|
90
|
+
label: "Confirmed issue details",
|
|
91
|
+
multiline: true,
|
|
92
|
+
name: "issueDetails",
|
|
93
|
+
required: true,
|
|
94
|
+
type: "text"
|
|
95
|
+
});
|
|
96
|
+
const ISSUE_DETAILS_OUTPUT = Object.freeze({
|
|
97
|
+
extract: "issue_details",
|
|
98
|
+
field: "issueDetails",
|
|
99
|
+
formatHint: "markdown",
|
|
100
|
+
label: "Issue details",
|
|
101
|
+
multiline: true,
|
|
102
|
+
required: true
|
|
103
|
+
});
|
|
104
|
+
const ISSUE_CATEGORY_OUTPUT = Object.freeze({
|
|
105
|
+
extract: "issue_category",
|
|
106
|
+
field: "issueCategory",
|
|
107
|
+
formatHint: "text",
|
|
108
|
+
label: "Issue category",
|
|
109
|
+
options: Object.freeze([
|
|
110
|
+
Object.freeze({ label: "Client", value: "client" }),
|
|
111
|
+
Object.freeze({ label: "Server", value: "server" }),
|
|
112
|
+
Object.freeze({ label: "Client and server", value: "client_server" }),
|
|
113
|
+
Object.freeze({ label: "Tooling", value: "tooling" }),
|
|
114
|
+
Object.freeze({ label: "Unknown", value: "unknown" })
|
|
115
|
+
]),
|
|
116
|
+
required: true
|
|
117
|
+
});
|
|
118
|
+
const UI_IMPACT_OUTPUT = Object.freeze({
|
|
119
|
+
extract: "ui_impact",
|
|
120
|
+
field: "uiImpact",
|
|
121
|
+
formatHint: "text",
|
|
122
|
+
label: "UI impact",
|
|
123
|
+
options: Object.freeze([
|
|
124
|
+
Object.freeze({ label: "No UI impact", value: "none" }),
|
|
125
|
+
Object.freeze({ label: "Possible UI impact", value: "possible" }),
|
|
126
|
+
Object.freeze({ label: "Definite UI impact", value: "definite" }),
|
|
127
|
+
Object.freeze({ label: "Unknown", value: "unknown" })
|
|
128
|
+
]),
|
|
129
|
+
required: true
|
|
130
|
+
});
|
|
75
131
|
const USER_CHECK_INPUT = Object.freeze({
|
|
76
132
|
label: "User check result",
|
|
77
133
|
name: "userCheck",
|
|
@@ -99,11 +155,31 @@ function codexHandoff(expectedOutput, {
|
|
|
99
155
|
|
|
100
156
|
const PLAN_EXECUTION_CODEX_HANDOFF = codexHandoff([], {
|
|
101
157
|
autoInject: true,
|
|
102
|
-
promptActionLabel: "
|
|
158
|
+
promptActionLabel: "Get Codex to execute plan"
|
|
159
|
+
});
|
|
160
|
+
const ISSUE_DETAILS_CODEX_HANDOFF = codexHandoff([
|
|
161
|
+
ISSUE_CATEGORY_OUTPUT,
|
|
162
|
+
UI_IMPACT_OUTPUT,
|
|
163
|
+
ISSUE_DETAILS_OUTPUT
|
|
164
|
+
], {
|
|
165
|
+
autoInject: true,
|
|
166
|
+
promptActionLabel: "Start details conversation"
|
|
103
167
|
});
|
|
104
168
|
const REVIEW_EXECUTION_CODEX_HANDOFF = codexHandoff([], {
|
|
105
169
|
autoInject: true,
|
|
106
|
-
promptActionLabel: "
|
|
170
|
+
promptActionLabel: "Run deslop"
|
|
171
|
+
});
|
|
172
|
+
const DEEP_UI_CHECK_CODEX_HANDOFF = codexHandoff([], {
|
|
173
|
+
autoInject: true,
|
|
174
|
+
promptActionLabel: "Run Deep UI check"
|
|
175
|
+
});
|
|
176
|
+
const AUTOMATED_CHECK_REPAIR_CODEX_HANDOFF = codexHandoff([], {
|
|
177
|
+
autoInject: true,
|
|
178
|
+
promptActionLabel: "Run automated checks"
|
|
179
|
+
});
|
|
180
|
+
const BLUEPRINT_CODEX_HANDOFF = codexHandoff([], {
|
|
181
|
+
autoInject: true,
|
|
182
|
+
promptActionLabel: "Update blueprint"
|
|
107
183
|
});
|
|
108
184
|
|
|
109
185
|
function defineStep({
|
|
@@ -114,20 +190,26 @@ function defineStep({
|
|
|
114
190
|
input = INPUT_NONE,
|
|
115
191
|
kind = "automatic",
|
|
116
192
|
label,
|
|
117
|
-
nextCommandTemplate =
|
|
193
|
+
nextCommandTemplate = DEFAULT_NEXT_COMMAND_TEMPLATE,
|
|
118
194
|
preconditions = [],
|
|
119
|
-
|
|
195
|
+
requiresExplicitRun = false,
|
|
196
|
+
utilityActions = [],
|
|
197
|
+
displayGroupId = "",
|
|
198
|
+
displayGroupLabel = ""
|
|
120
199
|
}) {
|
|
121
200
|
return Object.freeze({
|
|
122
201
|
buttonLabel,
|
|
123
202
|
codex,
|
|
124
203
|
description,
|
|
204
|
+
displayGroupId,
|
|
205
|
+
displayGroupLabel,
|
|
125
206
|
id,
|
|
126
207
|
input,
|
|
127
208
|
kind,
|
|
128
209
|
label,
|
|
129
210
|
nextCommandTemplate,
|
|
130
211
|
preconditions: Object.freeze([...preconditions]),
|
|
212
|
+
requiresExplicitRun,
|
|
131
213
|
utilityActions: Object.freeze([...utilityActions])
|
|
132
214
|
});
|
|
133
215
|
}
|
|
@@ -135,27 +217,27 @@ function defineStep({
|
|
|
135
217
|
const STEP_DEFINITIONS = Object.freeze([
|
|
136
218
|
defineStep({
|
|
137
219
|
buttonLabel: "Create session",
|
|
138
|
-
description: "
|
|
220
|
+
description: "JSKIT creates the filesystem-backed session record and initial receipt.",
|
|
139
221
|
id: "session_created",
|
|
140
222
|
label: "Session created"
|
|
141
223
|
}),
|
|
142
224
|
defineStep({
|
|
143
225
|
buttonLabel: "Create worktree",
|
|
144
|
-
description: "
|
|
226
|
+
description: "JSKIT creates the isolated Git branch and session worktree where Codex will work.",
|
|
145
227
|
id: "worktree_created",
|
|
146
228
|
label: "Worktree created",
|
|
147
229
|
preconditions: ["session_exists", "git_repository", "git_current_branch"]
|
|
148
230
|
}),
|
|
149
231
|
defineStep({
|
|
150
232
|
buttonLabel: "Install dependencies",
|
|
151
|
-
description: "
|
|
233
|
+
description: "JSKIT installs Node dependencies inside the session worktree before Codex starts.",
|
|
152
234
|
id: "dependencies_installed",
|
|
153
235
|
label: "Dependencies installed",
|
|
154
236
|
preconditions: ["session_exists", "worktree_exists"]
|
|
155
237
|
}),
|
|
156
238
|
defineStep({
|
|
157
|
-
buttonLabel: "
|
|
158
|
-
description: "
|
|
239
|
+
buttonLabel: "Set initial prompt",
|
|
240
|
+
description: "User describes the requested change; JSKIT records it and prepares the Codex issue-drafting prompt.",
|
|
159
241
|
id: "issue_prompt_rendered",
|
|
160
242
|
input: Object.freeze({
|
|
161
243
|
label: "What should change?",
|
|
@@ -167,129 +249,168 @@ const STEP_DEFINITIONS = Object.freeze([
|
|
|
167
249
|
}),
|
|
168
250
|
kind: "human_input",
|
|
169
251
|
label: "Initial issue prompt",
|
|
170
|
-
nextCommandTemplate:
|
|
171
|
-
preconditions: ["session_exists"]
|
|
252
|
+
nextCommandTemplate: `${JSKIT_CLI_SHELL_COMMAND} session {{session_id}} step --prompt "<what should change>"`,
|
|
253
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app"]
|
|
172
254
|
}),
|
|
173
255
|
defineStep({
|
|
174
|
-
buttonLabel: "
|
|
256
|
+
buttonLabel: "Finalise issue",
|
|
175
257
|
codex: codexHandoff([
|
|
176
258
|
ISSUE_TITLE_OUTPUT,
|
|
177
259
|
ISSUE_TEXT_OUTPUT
|
|
178
|
-
]
|
|
179
|
-
|
|
260
|
+
], {
|
|
261
|
+
autoInject: true,
|
|
262
|
+
promptActionLabel: "Get Codex to create issue text"
|
|
263
|
+
}),
|
|
264
|
+
description: "Codex drafts the issue title and body; user reviews or edits them; JSKIT saves the approved draft.",
|
|
180
265
|
id: "issue_drafted",
|
|
181
266
|
input: ISSUE_DRAFT_INPUT,
|
|
182
267
|
kind: "codex_output",
|
|
183
268
|
label: "Issue drafted",
|
|
184
|
-
nextCommandTemplate:
|
|
185
|
-
preconditions: ["session_exists"]
|
|
269
|
+
nextCommandTemplate: `${JSKIT_CLI_SHELL_COMMAND} session {{session_id}} step --issue -`,
|
|
270
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app"]
|
|
186
271
|
}),
|
|
187
272
|
defineStep({
|
|
188
|
-
buttonLabel: "Create
|
|
189
|
-
description: "
|
|
273
|
+
buttonLabel: "Create issue",
|
|
274
|
+
description: "JSKIT creates the GitHub issue from the approved draft and records the issue URL.",
|
|
190
275
|
id: "issue_created",
|
|
191
276
|
label: "Issue created",
|
|
192
|
-
preconditions: ["session_exists", "issue_text_exists", "github_auth", "github_origin"]
|
|
277
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_text_exists", "github_auth", "github_origin"],
|
|
278
|
+
requiresExplicitRun: false
|
|
193
279
|
}),
|
|
194
280
|
defineStep({
|
|
195
|
-
buttonLabel: "
|
|
196
|
-
codex:
|
|
197
|
-
description: "
|
|
281
|
+
buttonLabel: "Save issue details",
|
|
282
|
+
codex: ISSUE_DETAILS_CODEX_HANDOFF,
|
|
283
|
+
description: "Codex finalises with user issue details and classification; user reviews or edits final outcome; JSKIT saves the confirmed details.",
|
|
284
|
+
displayGroupId: "issue_details",
|
|
285
|
+
displayGroupLabel: "Get issue details",
|
|
286
|
+
id: "issue_details_gathered",
|
|
287
|
+
input: ISSUE_DETAILS_INPUT,
|
|
288
|
+
kind: "codex_output",
|
|
289
|
+
label: "Issue details gathered",
|
|
290
|
+
nextCommandTemplate: `${JSKIT_CLI_SHELL_COMMAND} session {{session_id}} step --issue-details -`,
|
|
291
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_text_exists", "issue_url_exists"]
|
|
292
|
+
}),
|
|
293
|
+
defineStep({
|
|
294
|
+
buttonLabel: "Save plan",
|
|
295
|
+
codex: codexHandoff(PLAN_OUTPUT, {
|
|
296
|
+
autoInject: true,
|
|
297
|
+
promptActionLabel: "Get Codex to create plan"
|
|
298
|
+
}),
|
|
299
|
+
description: "Codex writes an implementation plan for the active cycle; cycle 001 plans from the issue, later cycles plan from user rework notes.",
|
|
198
300
|
id: "plan_made",
|
|
199
301
|
input: PLAN_INPUT,
|
|
200
302
|
kind: "codex_output",
|
|
201
|
-
label: "Plan
|
|
202
|
-
nextCommandTemplate:
|
|
203
|
-
preconditions: ["session_exists", "issue_text_exists", "issue_url_exists", "
|
|
303
|
+
label: "Plan made",
|
|
304
|
+
nextCommandTemplate: `${JSKIT_CLI_SHELL_COMMAND} session {{session_id}} step --plan -`,
|
|
305
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_text_exists", "issue_url_exists", "issue_details_exists", "issue_metadata_exists", "active_cycle_exists"]
|
|
204
306
|
}),
|
|
205
307
|
defineStep({
|
|
206
|
-
buttonLabel: "
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
Object.freeze({
|
|
214
|
-
id: "session_diff",
|
|
215
|
-
kind: "diff",
|
|
216
|
-
label: "Review changes",
|
|
217
|
-
nextCommandTemplate: "jskit session {{session_id}} diff"
|
|
218
|
-
})
|
|
219
|
-
])
|
|
308
|
+
buttonLabel: "Get Codex to execute plan",
|
|
309
|
+
codex: PLAN_EXECUTION_CODEX_HANDOFF,
|
|
310
|
+
description: "JSKIT sends the active cycle plan to Codex; Codex implements it; Studio advances when Codex finishes.",
|
|
311
|
+
id: "plan_executed",
|
|
312
|
+
kind: "codex_prompt",
|
|
313
|
+
label: "Plan executed",
|
|
314
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_text_exists", "issue_url_exists", "issue_details_exists", "issue_metadata_exists", "active_cycle_exists", "plan_text_exists"]
|
|
220
315
|
}),
|
|
221
316
|
defineStep({
|
|
222
|
-
buttonLabel: "
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
317
|
+
buttonLabel: "Run Deep UI check",
|
|
318
|
+
codex: DEEP_UI_CHECK_CODEX_HANDOFF,
|
|
319
|
+
description: "JSKIT asks Codex for a focused UI quality pass when the issue affects UI, or records a skip receipt when it does not.",
|
|
320
|
+
id: "deep_ui_check_run",
|
|
321
|
+
kind: "codex_prompt",
|
|
322
|
+
label: "Deep UI check run",
|
|
323
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists"]
|
|
227
324
|
}),
|
|
228
325
|
defineStep({
|
|
229
|
-
buttonLabel: "
|
|
230
|
-
|
|
326
|
+
buttonLabel: "Run deslop",
|
|
327
|
+
codex: REVIEW_EXECUTION_CODEX_HANDOFF,
|
|
328
|
+
description: "JSKIT sends the current implementation to Codex for a review/deslop pass; Codex reports findings and applies the selected cleanup.",
|
|
329
|
+
displayGroupId: "review_deslop",
|
|
330
|
+
displayGroupLabel: "Review/deslop",
|
|
231
331
|
id: "review_prompt_rendered",
|
|
232
332
|
kind: "codex_prompt",
|
|
233
|
-
label: "Review
|
|
234
|
-
preconditions: ["session_exists", "worktree_exists"]
|
|
333
|
+
label: "Review/deslop",
|
|
334
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "deep_ui_check_satisfied"]
|
|
235
335
|
}),
|
|
236
336
|
defineStep({
|
|
237
|
-
buttonLabel: "
|
|
238
|
-
description: "
|
|
337
|
+
buttonLabel: "I am done",
|
|
338
|
+
description: "User confirms the review/deslop loop is done; JSKIT records the loop result without committing yet.",
|
|
339
|
+
displayGroupId: "review_deslop",
|
|
340
|
+
displayGroupLabel: "Review/deslop",
|
|
239
341
|
id: "review_changes_accepted",
|
|
240
342
|
kind: "user_check",
|
|
241
|
-
label: "Review
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
Object.freeze({
|
|
245
|
-
id: "session_diff",
|
|
246
|
-
kind: "diff",
|
|
247
|
-
label: "Review changes",
|
|
248
|
-
nextCommandTemplate: "jskit session {{session_id}} diff"
|
|
249
|
-
})
|
|
250
|
-
])
|
|
343
|
+
label: "Review/deslop",
|
|
344
|
+
nextCommandTemplate: `${JSKIT_CLI_SHELL_COMMAND} session {{session_id}} step --review-findings-remaining false`,
|
|
345
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "deep_ui_check_satisfied"]
|
|
251
346
|
}),
|
|
252
347
|
defineStep({
|
|
253
|
-
buttonLabel: "
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
348
|
+
buttonLabel: "Run automated checks",
|
|
349
|
+
codex: AUTOMATED_CHECK_REPAIR_CODEX_HANDOFF,
|
|
350
|
+
description: "JSKIT asks Codex to run automated checks in the worktree, fix failures, and report the final result.",
|
|
351
|
+
id: "automated_checks_run",
|
|
352
|
+
kind: "codex_prompt",
|
|
353
|
+
label: "Automated checks",
|
|
354
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "deep_ui_check_satisfied"]
|
|
258
355
|
}),
|
|
259
356
|
defineStep({
|
|
260
357
|
buttonLabel: "Save user check",
|
|
261
|
-
description: "
|
|
358
|
+
description: "User manually checks the result; JSKIT records pass or collects rework notes for another plan cycle.",
|
|
262
359
|
id: "user_check_completed",
|
|
263
360
|
input: USER_CHECK_INPUT,
|
|
264
361
|
kind: "user_check",
|
|
265
362
|
label: "User check",
|
|
266
|
-
nextCommandTemplate:
|
|
267
|
-
preconditions: ["session_exists"]
|
|
363
|
+
nextCommandTemplate: `${JSKIT_CLI_SHELL_COMMAND} session {{session_id}} step --user-check passed`,
|
|
364
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "automated_checks_passed", "deep_ui_check_satisfied"]
|
|
365
|
+
}),
|
|
366
|
+
defineStep({
|
|
367
|
+
buttonLabel: "Commit accepted changes",
|
|
368
|
+
description: "JSKIT commits the user-accepted session changes in the session worktree.",
|
|
369
|
+
id: "changes_committed",
|
|
370
|
+
label: "Changes committed",
|
|
371
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "issue_url_exists", "github_auth", "active_cycle_exists", "automated_checks_passed", "deep_ui_check_satisfied", "active_cycle_user_check_passed"]
|
|
372
|
+
}),
|
|
373
|
+
defineStep({
|
|
374
|
+
buttonLabel: "Update blueprint",
|
|
375
|
+
codex: BLUEPRINT_CODEX_HANDOFF,
|
|
376
|
+
description: "JSKIT asks Codex to update durable app memory from the accepted work; Codex edits .jskit/APP_BLUEPRINT.md; JSKIT records and commits the update.",
|
|
377
|
+
id: "blueprint_updated",
|
|
378
|
+
kind: "codex_prompt",
|
|
379
|
+
label: "Blueprint updated",
|
|
380
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "automated_checks_passed", "deep_ui_check_satisfied", "active_cycle_user_check_passed", "accepted_changes_committed"]
|
|
268
381
|
}),
|
|
269
382
|
defineStep({
|
|
270
383
|
buttonLabel: "Run verification",
|
|
271
|
-
description: "
|
|
384
|
+
description: "JSKIT runs the final project verification command in the session worktree and records the result.",
|
|
272
385
|
id: "doctor_run",
|
|
273
386
|
label: "Verification run",
|
|
274
|
-
preconditions: ["session_exists", "worktree_exists"]
|
|
387
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "automated_checks_passed", "deep_ui_check_satisfied", "active_cycle_user_check_passed", "accepted_changes_committed", "blueprint_update_satisfied"]
|
|
388
|
+
}),
|
|
389
|
+
defineStep({
|
|
390
|
+
buttonLabel: "Create final report",
|
|
391
|
+
description: "JSKIT creates the deterministic final session report and comments it on the GitHub issue.",
|
|
392
|
+
id: "final_report_created",
|
|
393
|
+
label: "Final report created",
|
|
394
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "automated_checks_passed", "deep_ui_check_satisfied", "active_cycle_user_check_passed", "accepted_changes_committed", "blueprint_update_satisfied"]
|
|
275
395
|
}),
|
|
276
396
|
defineStep({
|
|
277
397
|
buttonLabel: "Push branch and create PR",
|
|
278
|
-
description: "
|
|
398
|
+
description: "JSKIT pushes the session branch to origin, creates or reuses the GitHub pull request, and records the PR URL.",
|
|
279
399
|
id: "pr_created",
|
|
280
400
|
label: "Branch pushed, PR created",
|
|
281
|
-
preconditions: ["session_exists", "worktree_exists"]
|
|
401
|
+
preconditions: ["session_exists", "worktree_exists", "dependencies_installed", "ready_jskit_app", "issue_metadata_exists", "active_cycle_exists", "automated_checks_passed", "deep_ui_check_satisfied", "active_cycle_user_check_passed", "accepted_changes_committed", "blueprint_update_satisfied", "final_report_exists"]
|
|
282
402
|
}),
|
|
283
403
|
defineStep({
|
|
284
|
-
buttonLabel: "Merge PR
|
|
285
|
-
description: "
|
|
286
|
-
id: "
|
|
287
|
-
label: "PR
|
|
288
|
-
preconditions: ["session_exists", "pr_url_exists", "worktree_exists"]
|
|
404
|
+
buttonLabel: "Merge PR",
|
|
405
|
+
description: "User chooses whether JSKIT merges the pull request or finishes without merge; JSKIT then removes the session worktree.",
|
|
406
|
+
id: "pr_finalized",
|
|
407
|
+
label: "PR finalized, worktree removed",
|
|
408
|
+
preconditions: ["session_exists", "pr_url_exists", "worktree_exists"],
|
|
409
|
+
requiresExplicitRun: true
|
|
289
410
|
}),
|
|
290
411
|
defineStep({
|
|
291
412
|
buttonLabel: "Finish session",
|
|
292
|
-
description: "
|
|
413
|
+
description: "JSKIT writes the final receipt and archives the completed session.",
|
|
293
414
|
id: "session_finished",
|
|
294
415
|
label: "Session finished",
|
|
295
416
|
preconditions: ["session_exists"]
|
|
@@ -299,6 +420,15 @@ const STEP_DEFINITIONS = Object.freeze([
|
|
|
299
420
|
const STEP_IDS = Object.freeze(STEP_DEFINITIONS.map((step) => step.id));
|
|
300
421
|
const STEP_LABEL_BY_ID = Object.freeze(Object.fromEntries(STEP_DEFINITIONS.map((step) => [step.id, step.label])));
|
|
301
422
|
const STEP_DEFINITION_BY_ID = Object.freeze(Object.fromEntries(STEP_DEFINITIONS.map((step) => [step.id, step])));
|
|
423
|
+
const CYCLE_STEP_IDS = Object.freeze([
|
|
424
|
+
"plan_made",
|
|
425
|
+
"plan_executed",
|
|
426
|
+
"deep_ui_check_run",
|
|
427
|
+
"review_prompt_rendered",
|
|
428
|
+
"review_changes_accepted",
|
|
429
|
+
"automated_checks_run",
|
|
430
|
+
"user_check_completed"
|
|
431
|
+
]);
|
|
302
432
|
const STEP_PRECONDITION_NAMES = Object.freeze(Object.fromEntries(
|
|
303
433
|
STEP_DEFINITIONS
|
|
304
434
|
.filter((step) => step.id !== "session_created")
|
|
@@ -309,12 +439,21 @@ export {
|
|
|
309
439
|
PROMPT_DIRECTORY,
|
|
310
440
|
SESSION_ID_PATTERN,
|
|
311
441
|
SESSION_STATUS,
|
|
442
|
+
SESSION_WORKFLOW_VERSION,
|
|
443
|
+
REVIEW_PASS_LIMIT,
|
|
444
|
+
CYCLE_STEP_IDS,
|
|
312
445
|
STEP_DEFINITION_BY_ID,
|
|
313
446
|
STEP_DEFINITIONS,
|
|
314
447
|
STEP_IDS,
|
|
315
448
|
STEP_LABEL_BY_ID,
|
|
316
449
|
STEP_PRECONDITION_NAMES,
|
|
450
|
+
ISSUE_DETAILS_CODEX_HANDOFF,
|
|
317
451
|
PLAN_EXECUTION_CODEX_HANDOFF,
|
|
318
452
|
REVIEW_EXECUTION_CODEX_HANDOFF,
|
|
453
|
+
DEEP_UI_CHECK_CODEX_HANDOFF,
|
|
454
|
+
AUTOMATED_CHECK_REPAIR_CODEX_HANDOFF,
|
|
455
|
+
BLUEPRINT_CODEX_HANDOFF,
|
|
456
|
+
JSKIT_CLI_SHELL_COMMAND,
|
|
457
|
+
JSKIT_CLI_SHELL_RULE,
|
|
319
458
|
SESSION_STATE_RELATIVE_PATH
|
|
320
459
|
};
|