pi-tandem 0.4.6 → 0.4.7
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 +1 -1
- package/prompt.md +4 -4
- package/runtime/spawn-paseo.sh +18 -11
- package/runtime/spawn-tmux.sh +18 -11
- package/skills/research/SKILL.md +3 -3
package/package.json
CHANGED
package/prompt.md
CHANGED
|
@@ -68,7 +68,7 @@ Important:
|
|
|
68
68
|
- Commands with side effects, like push, create/modify/delete of repos, issues, PRs, releases, triggering workflows, submitting forms, posting or purchasing require an explicit go-ahead, like any other side-effect, as stated in the collaboration style section
|
|
69
69
|
|
|
70
70
|
<!--cli:tmux-->
|
|
71
|
-
When explicitly instructed to run a task in a separate or fresh agent session ("do it in a fresh session", "use a subagent"), spawn a worker in a new tmux window with the bundled script. Pass the
|
|
71
|
+
When explicitly instructed to run a task in a separate or fresh agent session ("do it in a fresh session", "use a subagent"), spawn a worker in a new tmux window with the bundled script. Pass the task on stdin, self-contained - the worker never sees this session's history. However, keep it minimal and pass only what this session knows that the worker can't get elsewhere: the task itself, its requirements, constraints and leads from the discussion. Don't invent more, and don't try to do the job of the system prompt, available skills, AGENTS.md or the repo itself - the worker is still a normal interactive session, with the same system prompt as the current session and the same skills available:
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
74
|
<spawn-script> <task-name> <<'EOF'
|
|
@@ -77,11 +77,11 @@ EOF
|
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
- If asked for a specific model, pass it after the task name: `<spawn-script> <task-name> <model>`
|
|
80
|
-
- The script opens a tmux window named `<task-name>` running `pi --no-session`, sends the task
|
|
80
|
+
- The script opens a tmux window named `<task-name>` running `pi --no-session`, and sends it the task prepended with complete rules of its own - collaboration mode, skills to load, the result file (always `/tmp/<task-name>-result.md`), user review and approval, notifying this session when done - so the brief needs task content and context only, never process, delivery or tooling rules; it also prints how to terminate the worker
|
|
81
81
|
- After spawning, stop and wait: do not poll the worker pane and do not read the result file early. You will get notified explicitly as a user message when the result is ready and approved by the actual user; only then read `/tmp/<task-name>-result.md` and clean up the window
|
|
82
82
|
<!--/cli-->
|
|
83
83
|
<!--cli:paseo-->
|
|
84
|
-
When explicitly instructed to run a task in a separate or fresh agent session ("do it in a fresh session", "use a subagent"), spawn a
|
|
84
|
+
When explicitly instructed to run a task in a separate or fresh agent session ("do it in a fresh session", "use a subagent"), spawn a paseo worker with the bundled script. Pass the task on stdin, self-contained - the worker never sees this session's history. However, keep it minimal and pass only what this session knows that the worker can't get elsewhere: the task itself, its requirements, constraints and leads from the discussion. Don't invent more, and don't try to do the job of the system prompt, available skills, AGENTS.md or the repo itself - the worker is still a normal interactive session, with the same system prompt as the current session and the same skills available:
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
87
|
<spawn-script> <task-name> <<'EOF'
|
|
@@ -90,7 +90,7 @@ EOF
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
- If asked for a specific model, pass it after the task name: `<spawn-script> <task-name> <model>`
|
|
93
|
-
- The script starts a
|
|
93
|
+
- The script starts a paseo agent titled `<task-name>`, and sends it the task prepended with complete rules of its own - collaboration mode, skills to load, the result file (always `/tmp/<task-name>-result.md`), user review and approval, notifying this session when done - so the brief needs task content and context only, never process, delivery or tooling rules; it also prints how to terminate the worker
|
|
94
94
|
- After spawning, stop and wait: do not poll the worker and do not read the result file early. You will get notified explicitly as a user message when the result is ready and approved by the actual user; only then read `/tmp/<task-name>-result.md` and clean up (`paseo archive --force <agent-id>`)
|
|
95
95
|
<!--/cli-->
|
|
96
96
|
|
package/runtime/spawn-paseo.sh
CHANGED
|
@@ -15,20 +15,27 @@ task="$(cat)"
|
|
|
15
15
|
# the name keys the result file: keep it unique among live workers
|
|
16
16
|
result="/tmp/${name}-result.md"
|
|
17
17
|
|
|
18
|
-
prompt="
|
|
18
|
+
prompt="You are a worker session, spawned from a parent agent session, but you are not an
|
|
19
|
+
autonomous batch job: this is a normal interactive session the user actively watches
|
|
20
|
+
and can freely interact with. Don't drop the collaboration instructions from your system
|
|
21
|
+
prompt and skills - keep following them; if a system prompt or a skill tells you to stop
|
|
22
|
+
and ask the user - stop and ask. Check whether some of your skills apply to the task
|
|
23
|
+
below and load them before starting.
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
When done, write the full result to:
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
them before starting working. This is a normal interactive session:
|
|
24
|
-
the user can interact with you here, so ask anything blocking directly
|
|
25
|
-
in this chat - don't defer unresolved decisions into the result file.
|
|
26
|
-
When done, write the full result to
|
|
27
|
-
$result, tell the user it is ready for review and wait for further
|
|
28
|
-
instructions. Only after the user explicitly approves, notify the
|
|
29
|
-
parent with a one-line pointer (never result content):
|
|
27
|
+
$result
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
Then tell the user it is ready for review and wait for further instructions. Only after
|
|
30
|
+
the user explicitly approves, notify the parent with a one-line pointer (never result
|
|
31
|
+
content):
|
|
32
|
+
|
|
33
|
+
paseo send --no-wait '$PASEO_AGENT_ID' 'Result ready: $result'
|
|
34
|
+
|
|
35
|
+
IMPORTANT! Even if the task below reads like a spec handed to an autonomous worker - it
|
|
36
|
+
is not; it is a user's brief for this interactive session.
|
|
37
|
+
|
|
38
|
+
$task"
|
|
32
39
|
|
|
33
40
|
# a crashed run may have left a stale result for this name
|
|
34
41
|
rm -f "$result"
|
package/runtime/spawn-tmux.sh
CHANGED
|
@@ -19,20 +19,27 @@ parent="$(tmux display-message -p -t "$TMUX_PANE" '#{session_name}:#{window_name
|
|
|
19
19
|
# live workers
|
|
20
20
|
result="/tmp/${name}-result.md"
|
|
21
21
|
|
|
22
|
-
prompt="
|
|
22
|
+
prompt="You are a worker session, spawned from a parent agent session, but you are not an
|
|
23
|
+
autonomous batch job: this is a normal interactive session the user actively watches
|
|
24
|
+
and can freely interact with. Don't drop the collaboration instructions from your system
|
|
25
|
+
prompt and skills - keep following them; if a system prompt or a skill tells you to stop
|
|
26
|
+
and ask the user - stop and ask. Check whether some of your skills apply to the task
|
|
27
|
+
below and load them before starting.
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
When done, write the full result to:
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
them before starting working. This is a normal interactive session:
|
|
28
|
-
the user can interact with you here, so ask anything blocking directly
|
|
29
|
-
in this chat - don't defer unresolved decisions into the result file.
|
|
30
|
-
When done, write the full result to
|
|
31
|
-
$result, tell the user it is ready for review and wait for further
|
|
32
|
-
instructions. Only after the user explicitly approves, notify the
|
|
33
|
-
parent with a one-line pointer (never result content):
|
|
31
|
+
$result
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
Then tell the user it is ready for review and wait for further instructions. Only after
|
|
34
|
+
the user explicitly approves, notify the parent with a one-line pointer (never result
|
|
35
|
+
content):
|
|
36
|
+
|
|
37
|
+
tmux send-keys -t '$parent' 'Result ready: $result' Enter
|
|
38
|
+
|
|
39
|
+
IMPORTANT! Even if the task below reads like a spec handed to an autonomous worker - it
|
|
40
|
+
is not; it is a user's brief for this interactive session.
|
|
41
|
+
|
|
42
|
+
$task"
|
|
36
43
|
|
|
37
44
|
# make the prompt safe for the sh -c string tmux runs in the new window
|
|
38
45
|
# (must stay unquoted: inside double quotes bash mangles the \' escaping)
|
package/skills/research/SKILL.md
CHANGED
|
@@ -17,12 +17,12 @@ Workflow:
|
|
|
17
17
|
- verified: move it over; queue the new claims it suggests;
|
|
18
18
|
- refuted: its opposite is verified; queue what that opens up;
|
|
19
19
|
- not directly checkable: swap it for intermediate claims that would settle it.
|
|
20
|
-
3. Verify by tracing the real thing end to end; a plausible story is not verification. "No such thing" counts only when you looked everywhere it could be - and when the answer hangs on a "no", check it again from another angle. When a probe would settle a claim more cheaply or more reliably than reading - a throwaway script, a query, a client call - probe; keep probes in a scratch directory, never the repo.
|
|
20
|
+
3. Verify by tracing the real thing end to end; a plausible story is not verification. "No such thing" counts only when you looked everywhere it could be - and when the answer hangs on a "no", check it again from another angle. When a probe would settle a claim more cheaply or more reliably than reading - a throwaway script, a query, a client call - probe; keep probes in a scratch directory, never the repo. Settle each claim with the cheapest sufficient evidence and move on; stop mining a lead once it has answered the question asked of it.
|
|
21
21
|
4. Report once every part of the question is answered by verified claims.
|
|
22
|
-
5.
|
|
22
|
+
5. Never continue past these without asking the user:
|
|
23
23
|
- a new verification contradicts a verified claim: lay both out; resolving contradictions is their call, not yours;
|
|
24
24
|
- a lead of yours is clearly better than the user's: propose the swap, but if they still press their lead, follow their lead, don't switch silently;
|
|
25
|
-
-
|
|
25
|
+
- you are about to go deeper - start checking another repo, do another set of probes - on top of significant context already spent; the user may rather settle for what's verified so far, or point to a shortcut;
|
|
26
26
|
- the list is empty and the question is still open: ask what else to check.
|
|
27
27
|
|
|
28
28
|
Report rules, whether it lands in chat or a file:
|