@selesai/code 0.5.18 → 0.5.19
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.
|
@@ -33,27 +33,20 @@ const prompts: Partial<Record<Phase, (ctx: PromptContext) => string>> = {
|
|
|
33
33
|
User request:
|
|
34
34
|
${userPrompt}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Map requirements as a design tree: every decision branches into dependent decisions. Work the tree in rounds. The frontier contains every decision whose prerequisites are settled; do not ask questions that depend on answers still open in the current round.
|
|
37
|
+
|
|
38
|
+
For each round, use one question tool call to ask the ENTIRE frontier. Number every question, give a recommended answer, and wait for the user's answers before the next round. Recompute the frontier after every response. Cover scope, constraints, success criteria, and edge cases; leave no branch silently assumed.
|
|
39
|
+
|
|
40
|
+
Facts are yours to find, never the user's. When a frontier question needs a fact from the workspace or available tools, dispatch a sub-agent to investigate rather than asking the user. Do not block on it: ask other frontier decisions now; defer only decisions that depend on the pending finding.
|
|
37
41
|
|
|
38
42
|
For each question tool call:
|
|
39
|
-
-
|
|
43
|
+
- State all numbered frontier questions concisely, including a recommendation for each.
|
|
40
44
|
- Pass a short context summary when it depends on prior findings.
|
|
41
|
-
- Prefer options when
|
|
42
|
-
- Always set allowFreeform=true so the user can
|
|
45
|
+
- Prefer options when one shared option set fits the whole round. Give each option a clear label and brief description.
|
|
46
|
+
- Always set allowFreeform=true so the user can answer each numbered decision or provide a custom answer.
|
|
43
47
|
- Keep allowMultiple=false unless multiple selections genuinely apply.
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
question({
|
|
47
|
-
question: "What should the output format be?",
|
|
48
|
-
context: "The user wants a report generator. We need to pick the default export format.",
|
|
49
|
-
options: [
|
|
50
|
-
{ label: "Markdown", description: "Simple, version-control friendly" },
|
|
51
|
-
{ label: "PDF", description: "Polished, shareable document" },
|
|
52
|
-
],
|
|
53
|
-
allowFreeform: true,
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
When shared understanding is reached, do NOT write the file yet. Show a concise requirements summary draft and ask exactly: "Approve writing this requirements summary to ${artifactDir}/requirements.md?" Allow "keep grilling" or added details.
|
|
49
|
+
Only when the frontier is empty, show a concise requirements summary draft and ask exactly: "Approve writing this requirements summary to ${artifactDir}/requirements.md?" This approval confirms shared understanding. Allow "keep grilling" or added details; do not write or otherwise act on the requirements before explicit approval.
|
|
57
50
|
|
|
58
51
|
Artifact target: ${artifactDir}/requirements.md
|
|
59
52
|
- Name that exact full path in the approval question.
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
reviewValidator,
|
|
12
12
|
} from "../validators.ts";
|
|
13
13
|
|
|
14
|
-
// ponytail: quick workflow — same tool-driven loop as prototype,
|
|
15
|
-
// grill
|
|
14
|
+
// ponytail: quick workflow — same tool-driven loop as prototype, without research:
|
|
15
|
+
// grill → plan → reuse → handoff → loop → audit.
|
|
16
16
|
// No research phase. skipRules + closeArtifacts wired by the adapter.
|
|
17
17
|
|
|
18
18
|
const phases: Phase[] = [
|
|
@@ -31,27 +31,20 @@ const prompts: Partial<Record<Phase, (ctx: PromptContext) => string>> = {
|
|
|
31
31
|
User request:
|
|
32
32
|
${userPrompt}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Map requirements as a design tree: every decision branches into dependent decisions. Work the tree in rounds. The frontier contains every decision whose prerequisites are settled; do not ask questions that depend on answers still open in the current round.
|
|
35
|
+
|
|
36
|
+
For each round, use one question tool call to ask the ENTIRE frontier. Number every question, give a recommended answer, and wait for the user's answers before the next round. Recompute the frontier after every response. Cover scope, constraints, success criteria, and edge cases; leave no branch silently assumed.
|
|
37
|
+
|
|
38
|
+
Facts are yours to find, never the user's. When a frontier question needs a fact from the workspace or available tools, dispatch a sub-agent to investigate rather than asking the user. Do not block on it: ask other frontier decisions now; defer only decisions that depend on the pending finding.
|
|
35
39
|
|
|
36
40
|
For each question tool call:
|
|
37
|
-
-
|
|
41
|
+
- State all numbered frontier questions concisely, including a recommendation for each.
|
|
38
42
|
- Pass a short context summary when it depends on prior findings.
|
|
39
|
-
- Prefer options when
|
|
40
|
-
- Always set allowFreeform=true so the user can
|
|
43
|
+
- Prefer options when one shared option set fits the whole round. Give each option a clear label and brief description.
|
|
44
|
+
- Always set allowFreeform=true so the user can answer each numbered decision or provide a custom answer.
|
|
41
45
|
- Keep allowMultiple=false unless multiple selections genuinely apply.
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
question({
|
|
45
|
-
question: "What should the output format be?",
|
|
46
|
-
context: "The user wants a report generator. We need to pick the default export format.",
|
|
47
|
-
options: [
|
|
48
|
-
{ label: "Markdown", description: "Simple, version-control friendly" },
|
|
49
|
-
{ label: "PDF", description: "Polished, shareable document" },
|
|
50
|
-
],
|
|
51
|
-
allowFreeform: true,
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
When you have enough clarity OR up to 10 questions max (less is better) have been asked, stop grilling. Show a concise requirements summary, then ask exactly: "Approve writing this requirements summary to ${artifactDir}/requirements.md?"
|
|
47
|
+
Only when the frontier is empty, show a concise requirements summary draft and ask exactly: "Approve writing this requirements summary to ${artifactDir}/requirements.md?" This approval confirms shared understanding. Allow "keep grilling" or added details; do not write or otherwise act on the requirements before explicit approval.
|
|
55
48
|
|
|
56
49
|
Artifact target: ${artifactDir}/requirements.md
|
|
57
50
|
- Name that exact full path in the approval question.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: batch-grill-me
|
|
3
|
+
description: A relentless interview that asks every frontier question at once, round by round.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Interview the user relentlessly until you reach a shared understanding. Map this as a **design tree**: every decision branches into the decisions that hang off it.
|
|
8
|
+
|
|
9
|
+
Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are already settled — the questions you can ask *now* without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the user's answers before the next round.
|
|
10
|
+
|
|
11
|
+
Each round the user answers reshapes the tree — settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a *later* round, not this one.
|
|
12
|
+
|
|
13
|
+
Finding *facts* is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it — don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report — ask the rest of the frontier now. The *decisions* are the user's — put each to them and wait.
|
|
14
|
+
|
|
15
|
+
The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: selesai-handoff
|
|
3
|
+
description: Hand the current conversation off to a fresh background agent that picks up the work immediately.
|
|
4
|
+
argument-hint: "What will the next session be used for?"
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Write a handoff summary of the current conversation so a fresh agent can continue the work. Instead of saving it, launch a background agent seeded with the summary as its prompt: `selesai --name "<descriptive name>" -p "<handoff summary>"`. It starts in the current working directory and returns immediately; the user manages it with `selesai agents`.
|
|
9
|
+
|
|
10
|
+
Always pass `-n`/`--name` with a descriptive name (e.g. `--name "Fix login bug"`) — it sets the display name shown in the job list, session picker, and terminal title.
|
|
11
|
+
|
|
12
|
+
You might want to use something like `nohup` or `Start-Process` or `start /b` or etc. before the selesai command to spawn background command.
|
|
13
|
+
|
|
14
|
+
Include a "suggested skills" section in the summary, which suggests skills that the agent should invoke.
|
|
15
|
+
|
|
16
|
+
Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
|
|
17
|
+
|
|
18
|
+
Redact any sensitive information, such as API keys, passwords, or personally identifiable information — the summary becomes the agent's prompt.
|
|
19
|
+
|
|
20
|
+
If the user passed arguments, treat them as a description of what the next session will focus on and tailor the summary accordingly.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selesai/code",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
4
4
|
"description": "Maintained, extension-first Pi coding agent with built-in workflows, subagents, web research, questions, skills, and an enhanced terminal UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|