spets 0.1.63 → 0.1.64
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/index.js +77 -110
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -251,46 +251,39 @@ async function listPlugins() {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
function getClaudeSkillContent() {
|
|
254
|
-
return `# Spets
|
|
254
|
+
return `# Spets Executor
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
You execute spets orchestrator commands. Parse JSON, follow instructions, repeat.
|
|
257
257
|
|
|
258
|
-
|
|
259
|
-
npx spets orchestrate init "$ARGUMENTS"
|
|
260
|
-
\`\`\`
|
|
258
|
+
## Execution
|
|
261
259
|
|
|
262
|
-
|
|
260
|
+
1. RUN \`npx spets orchestrate init "$ARGUMENTS"\`
|
|
261
|
+
2. PARSE JSON response
|
|
262
|
+
3. SWITCH on \`type\`:
|
|
263
263
|
|
|
264
|
-
|
|
264
|
+
type="phase":
|
|
265
|
+
- EXECUTE what \`prompt\` says
|
|
266
|
+
- RUN \`onComplete\` with your output as JSON argument
|
|
267
|
+
- GOTO step 2
|
|
265
268
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
269
|
+
type="checkpoint", checkpoint="clarify":
|
|
270
|
+
- ASK user each question in \`questions[]\` using AskUserQuestion
|
|
271
|
+
- RUN \`onComplete\` with \`[{questionId, answer}, ...]\`
|
|
272
|
+
- GOTO step 2
|
|
270
273
|
|
|
271
|
-
|
|
274
|
+
type="checkpoint", checkpoint="approve":
|
|
275
|
+
- READ \`specPath\`, summarize to user
|
|
276
|
+
- ASK user: approve / revise / reject / stop
|
|
277
|
+
- RUN matching \`onComplete\`
|
|
278
|
+
- GOTO step 2
|
|
272
279
|
|
|
273
|
-
|
|
280
|
+
type="complete" or "error":
|
|
281
|
+
- PRINT message
|
|
282
|
+
- STOP
|
|
274
283
|
|
|
275
|
-
|
|
276
|
-
|-------|--------|
|
|
277
|
-
| explore | Follow \`prompt\` \u2192 \`onComplete '<explore_json>'\` |
|
|
278
|
-
| clarify | Follow \`prompt\` \u2192 \`onComplete '<questions_json>'\` |
|
|
279
|
-
| execute | Follow \`prompt\`, write to \`context.output\` \u2192 run \`onComplete\` |
|
|
280
|
-
| verify | Follow \`prompt\` \u2192 \`onComplete '<verify_json>'\` |
|
|
284
|
+
## Forbidden
|
|
281
285
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
| checkpoint | Action |
|
|
285
|
-
|------------|--------|
|
|
286
|
-
| clarify | AskUserQuestion each \`questions[]\` \u2192 \`onComplete '<answers_json>'\` |
|
|
287
|
-
| approve | Read \`specPath\`, summarize, AskUserQuestion \u2192 run \`onComplete[choice]\` |
|
|
288
|
-
|
|
289
|
-
### type: "complete" / "error"
|
|
290
|
-
|
|
291
|
-
Print message and stop.
|
|
292
|
-
|
|
293
|
-
---
|
|
286
|
+
EnterPlanMode, TaskCreate, TaskUpdate
|
|
294
287
|
|
|
295
288
|
$ARGUMENTS
|
|
296
289
|
description: Task description for the workflow
|
|
@@ -302,54 +295,39 @@ name: spets
|
|
|
302
295
|
description: SDD workflow executor - orchestrator-controlled spec-driven development
|
|
303
296
|
---
|
|
304
297
|
|
|
305
|
-
# Spets
|
|
306
|
-
|
|
307
|
-
## Start
|
|
308
|
-
|
|
309
|
-
\`\`\`bash
|
|
310
|
-
npx spets orchestrate init "user's task description"
|
|
311
|
-
\`\`\`
|
|
312
|
-
|
|
313
|
-
## Loop
|
|
314
|
-
|
|
315
|
-
Repeat until \`type\` is \`"complete"\` or \`"error"\`:
|
|
316
|
-
|
|
317
|
-
1. Parse JSON response
|
|
318
|
-
2. Do the action for \`type\`
|
|
319
|
-
3. Run \`onComplete\` command with JSON (single line, single quotes)
|
|
320
|
-
4. Go to step 1
|
|
298
|
+
# Spets Executor
|
|
321
299
|
|
|
322
|
-
|
|
300
|
+
You execute spets orchestrator commands. Parse JSON, follow instructions, repeat.
|
|
323
301
|
|
|
324
|
-
|
|
302
|
+
## Execution
|
|
325
303
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
304
|
+
1. RUN \`npx spets orchestrate init "$ARGUMENTS"\`
|
|
305
|
+
2. PARSE JSON response
|
|
306
|
+
3. SWITCH on \`type\`:
|
|
329
307
|
|
|
330
|
-
|
|
308
|
+
type="phase":
|
|
309
|
+
- EXECUTE what \`prompt\` says
|
|
310
|
+
- RUN \`onComplete\` with your output as minified JSON argument
|
|
311
|
+
- GOTO step 2
|
|
331
312
|
|
|
332
|
-
|
|
313
|
+
type="checkpoint", checkpoint="clarify":
|
|
314
|
+
- ASK user each question in \`questions[]\`, wait for response
|
|
315
|
+
- RUN \`onComplete\` with \`[{questionId, answer}, ...]\`
|
|
316
|
+
- GOTO step 2
|
|
333
317
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
| verify | Follow \`prompt\` \u2192 \`onComplete '<minified_json>'\` |
|
|
318
|
+
type="checkpoint", checkpoint="approve":
|
|
319
|
+
- READ \`specPath\`, summarize to user
|
|
320
|
+
- ASK user: approve / revise / reject / stop
|
|
321
|
+
- RUN matching \`onComplete\`
|
|
322
|
+
- GOTO step 2
|
|
340
323
|
|
|
341
|
-
|
|
324
|
+
type="complete" or "error":
|
|
325
|
+
- PRINT message
|
|
326
|
+
- STOP
|
|
342
327
|
|
|
343
|
-
|
|
344
|
-
|------------|--------|
|
|
345
|
-
| clarify | Ask user each \`questions[]\` \u2192 \`onComplete '<minified_json>'\` |
|
|
346
|
-
| approve | Read \`specPath\`, summarize, ask user \u2192 run \`onComplete[choice]\` |
|
|
328
|
+
## Forbidden
|
|
347
329
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
Print message and stop.
|
|
351
|
-
|
|
352
|
-
---
|
|
330
|
+
Planning mode, task tracking tools
|
|
353
331
|
|
|
354
332
|
$ARGUMENTS
|
|
355
333
|
description: Task description for the workflow
|
|
@@ -360,52 +338,39 @@ function getOpenCodeCommandContent() {
|
|
|
360
338
|
description: SDD workflow executor - orchestrator-controlled spec-driven development
|
|
361
339
|
---
|
|
362
340
|
|
|
363
|
-
# Spets
|
|
364
|
-
|
|
365
|
-
## Start
|
|
366
|
-
|
|
367
|
-
\`\`\`bash
|
|
368
|
-
npx spets orchestrate init "$ARGUMENTS"
|
|
369
|
-
\`\`\`
|
|
341
|
+
# Spets Executor
|
|
370
342
|
|
|
371
|
-
|
|
343
|
+
You execute spets orchestrator commands. Parse JSON, follow instructions, repeat.
|
|
372
344
|
|
|
373
|
-
|
|
345
|
+
## Execution
|
|
374
346
|
|
|
375
|
-
1.
|
|
376
|
-
2.
|
|
377
|
-
3.
|
|
378
|
-
4. Go to step 1
|
|
347
|
+
1. RUN \`npx spets orchestrate init "$ARGUMENTS"\`
|
|
348
|
+
2. PARSE JSON response
|
|
349
|
+
3. SWITCH on \`type\`:
|
|
379
350
|
|
|
380
|
-
|
|
351
|
+
type="phase":
|
|
352
|
+
- EXECUTE what \`prompt\` says
|
|
353
|
+
- RUN \`onComplete\` with your output as minified JSON argument
|
|
354
|
+
- GOTO step 2
|
|
381
355
|
|
|
382
|
-
|
|
356
|
+
type="checkpoint", checkpoint="clarify":
|
|
357
|
+
- ASK user each question in \`questions[]\`, wait for response
|
|
358
|
+
- RUN \`onComplete\` with \`[{questionId, answer}, ...]\`
|
|
359
|
+
- GOTO step 2
|
|
383
360
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
361
|
+
type="checkpoint", checkpoint="approve":
|
|
362
|
+
- READ \`specPath\`, summarize to user
|
|
363
|
+
- ASK user: approve / revise / reject / stop
|
|
364
|
+
- RUN matching \`onComplete\`
|
|
365
|
+
- GOTO step 2
|
|
387
366
|
|
|
388
|
-
|
|
367
|
+
type="complete" or "error":
|
|
368
|
+
- PRINT message
|
|
369
|
+
- STOP
|
|
389
370
|
|
|
390
|
-
|
|
371
|
+
## Forbidden
|
|
391
372
|
|
|
392
|
-
|
|
393
|
-
|-------|--------|
|
|
394
|
-
| explore | Follow \`prompt\` \u2192 \`onComplete '<minified_json>'\` |
|
|
395
|
-
| clarify | Follow \`prompt\` \u2192 \`onComplete '<minified_json>'\` |
|
|
396
|
-
| execute | Follow \`prompt\`, write to \`context.output\` \u2192 run \`onComplete\` |
|
|
397
|
-
| verify | Follow \`prompt\` \u2192 \`onComplete '<minified_json>'\` |
|
|
398
|
-
|
|
399
|
-
### type: "checkpoint"
|
|
400
|
-
|
|
401
|
-
| checkpoint | Action |
|
|
402
|
-
|------------|--------|
|
|
403
|
-
| clarify | Ask user each \`questions[]\` \u2192 \`onComplete '<minified_json>'\` |
|
|
404
|
-
| approve | Read \`specPath\`, summarize, ask user \u2192 run \`onComplete[choice]\` |
|
|
405
|
-
|
|
406
|
-
### type: "complete" / "error"
|
|
407
|
-
|
|
408
|
-
Print message and stop.
|
|
373
|
+
Planning mode, task tracking tools
|
|
409
374
|
`;
|
|
410
375
|
}
|
|
411
376
|
|
|
@@ -1481,12 +1446,13 @@ var Orchestrator = class {
|
|
|
1481
1446
|
verifyFeedback = `Auto-fix attempt ${state.verifyAttempts}/3. Fix these issues:
|
|
1482
1447
|
${issues}`;
|
|
1483
1448
|
}
|
|
1484
|
-
const exploreOutput =
|
|
1449
|
+
const exploreOutput = {
|
|
1485
1450
|
summary: "",
|
|
1486
1451
|
relevantFiles: [],
|
|
1487
1452
|
patterns: [],
|
|
1488
1453
|
constraints: [],
|
|
1489
|
-
dependencies: []
|
|
1454
|
+
dependencies: [],
|
|
1455
|
+
...state.exploreOutput
|
|
1490
1456
|
};
|
|
1491
1457
|
const { prompt } = buildExecutePrompt({
|
|
1492
1458
|
taskId: state.taskId,
|
|
@@ -4225,7 +4191,8 @@ async function orchestrateCommand(action, args) {
|
|
|
4225
4191
|
let questions = [];
|
|
4226
4192
|
if (questionsJson) {
|
|
4227
4193
|
try {
|
|
4228
|
-
|
|
4194
|
+
const parsed = JSON.parse(questionsJson);
|
|
4195
|
+
questions = Array.isArray(parsed) ? parsed : parsed.questions || [];
|
|
4229
4196
|
} catch {
|
|
4230
4197
|
outputError("Invalid JSON for questions");
|
|
4231
4198
|
return;
|