@akagilnc/pi-workflow-roles 0.1.3525 → 0.1.3529
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/resources/engine-dispatch.md +6 -0
- package/resources/engines/codex.md +3 -8
- package/resources/engines/cursor.md +2 -1
- package/resources/engines/grok-4.6.md +5 -8
- package/resources/engines/kimi.md +4 -10
- package/resources/engines/opencode.md +3 -2
- package/resources/engines/opus.md +11 -18
- package/resources/engines/sonnet.md +3 -4
- package/resources/engines/zcode.md +2 -2
package/package.json
CHANGED
|
@@ -25,6 +25,12 @@ themselves. Stuffing large bodies into argv/prompt is the verified cause of
|
|
|
25
25
|
|
|
26
26
|
## Process shape
|
|
27
27
|
|
|
28
|
+
- The returned labor body is the final answer text only. Never return an
|
|
29
|
+
event stream, verbose log, or NDJSON deltas: the body is fed back into the
|
|
30
|
+
seat's context, and one 12-minute Opus labor returned as `stream-json` was
|
|
31
|
+
957k chars and killed the seat (712k-token request, #675, 2026-09-06).
|
|
32
|
+
Progress observability is the runner's job (process watch), not the body's.
|
|
33
|
+
|
|
28
34
|
- Once an engine is selected, start exactly one subprocess per labor
|
|
29
35
|
invocation by calling that engine's local CLI, with argv assembled from the
|
|
30
36
|
engine note plus these dispatch rules; return the stdout labor content to
|
|
@@ -32,14 +32,9 @@ codex exec --skip-git-repo-check --ephemeral -C "$PROJECT_ROOT" "YOUR_LABOR_PROM
|
|
|
32
32
|
|
|
33
33
|
Default (non-`--json`) mode prints the session banner and progress on stderr
|
|
34
34
|
(measured on this host). Collect the labor body from stdout so that stderr log
|
|
35
|
-
noise is not mixed into the returned body.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`turn.failed`):
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
codex exec --skip-git-repo-check --ephemeral --json "YOUR_LABOR_PROMPT"
|
|
42
|
-
```
|
|
35
|
+
noise is not mixed into the returned body. Never use `--json` for labor: its
|
|
36
|
+
JSONL event rows go back into the seat's context as noise (see `opus.md` for the
|
|
37
|
+
measured ratio).
|
|
43
38
|
|
|
44
39
|
Prefer `codex exec --help` on the host over any remembered flag set. Do not wrap
|
|
45
40
|
this engine behind `ak-role` flags.
|
|
@@ -30,7 +30,8 @@ cursor-agent -p -f --output-format text --model <MODEL_ID> "YOUR_LABOR_PROMPT"
|
|
|
30
30
|
bracket override form (`'claude-opus-4-8[context=1m,effort=high]'` — see
|
|
31
31
|
`cursor-agent --help`).
|
|
32
32
|
- Owner pool directive 2026-08-28: default labor model = `cursor-grok-4.6-low`.
|
|
33
|
-
-
|
|
33
|
+
- Always `--output-format text`; never `stream-json` (the event stream goes back
|
|
34
|
+
into the seat's context as noise — see `opus.md`).
|
|
34
35
|
|
|
35
36
|
Prefer `cursor-agent --help` on the host over any remembered flag set. Do not
|
|
36
37
|
wrap this engine behind `ak-role` flags.
|
|
@@ -27,14 +27,11 @@ grok --prompt-file /path/to/labor-prompt.md -m grok-4.6 --always-approve --outpu
|
|
|
27
27
|
- Official docs list `-p/--single` as the canonical headless prompt input;
|
|
28
28
|
`--prompt-file` exists in the installed CLI (`--help`) and is smoke-verified
|
|
29
29
|
on this host — prefer it for long prompts, fall back to `-p` if absent.
|
|
30
|
-
- `--output-format plain` keeps stdout clean for capture
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
concatenating each NDJSON object's `data` where `type == "text"`, in stream
|
|
36
|
-
order; `type == "end"` (stopReason end_turn) marks completion. Do not treat
|
|
37
|
-
`thought` events as the answer (live-verified stream shape 2026-08-21).
|
|
30
|
+
- `--output-format plain` keeps stdout clean for capture and is the only
|
|
31
|
+
format to use for labor. Do not use `streaming-json`: its NDJSON deltas go
|
|
32
|
+
back into the seat's context as noise (see `opus.md` for the measured ratio);
|
|
33
|
+
progress observability belongs to the runner's process watch, not to the
|
|
34
|
+
returned body.
|
|
38
35
|
- **Always pass `--reasoning-effort <low|medium|high>`** matching the effort
|
|
39
36
|
tier ordered in the labor mandate (verified live 2026-08-21: flag exists,
|
|
40
37
|
alias `--effort`; a low-tier run completed correctly). If the mandate names
|
|
@@ -29,16 +29,10 @@ known Kimi model id (example alias shape measured: `kimi-code/k3-256k`):
|
|
|
29
29
|
kimi -m <model-alias> -p "YOUR_LABOR_PROMPT"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Use `--output-format
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
kimi -p "YOUR_LABOR_PROMPT" --output-format stream-json
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Text / default mode when stream events are not needed. Measured on this host
|
|
32
|
+
Use `--output-format text` (the default). Do not use `stream-json` for labor:
|
|
33
|
+
the returned body goes back into the seat's context and the event stream is
|
|
34
|
+
noise (see `opus.md` for the measured ratio). Progress observability belongs to
|
|
35
|
+
the runner's process watch, not to the returned body. Measured on this host
|
|
42
36
|
with separate fd redirects (`1>` / `2>`): stdout is the labor answer body;
|
|
43
37
|
stderr carries the version line, thinking bullets, and the trailing
|
|
44
38
|
`To resume this session:` hint. Collect the labor body from stdout only — do
|
|
@@ -20,7 +20,8 @@ opencode run -m opencode-go/glm-5.2 "YOUR_LABOR_PROMPT"
|
|
|
20
20
|
`opencode models` first** — provider prefixes migrate (verified 2026-08-21:
|
|
21
21
|
GLM lives under `opencode-go/`, e.g. `opencode-go/glm-5.2`; the older
|
|
22
22
|
`zai/glm-5.2` id errors with "Unexpected server error").
|
|
23
|
-
- `--format json`
|
|
24
|
-
|
|
23
|
+
- Plain text output only (never `--format json` for labor — the returned body
|
|
24
|
+
goes back into the seat's context); `--auto` auto-approves non-denied
|
|
25
|
+
permissions for unattended runs (per official docs).
|
|
25
26
|
- Output goes to stdout; long prompts may be passed via shell heredoc or a
|
|
26
27
|
file read into the argument — follow the installed CLI's actual interface.
|
|
@@ -12,34 +12,27 @@ parameters.
|
|
|
12
12
|
The machine entrypoint is `claude`. Run from the role project root. Non-interactive
|
|
13
13
|
print mode (`-p` / `--print`) is verified available on this host.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`Error: When using --print, --output-format=stream-json requires --verbose`.
|
|
18
|
-
Include `--verbose` in stream-json argv. Measured with separate fd redirects
|
|
19
|
-
(`1>` / `2>`): NDJSON event rows land on stdout (including intermediate
|
|
20
|
-
`system` / `assistant` activity and a final `type:"result"` row); stderr is
|
|
21
|
-
empty on the success path — except when stdin is an open stream supplying no
|
|
22
|
-
data (e.g. a shell test without redirection): then a benign
|
|
23
|
-
`Warning: no stdin data received in 3s, proceeding without it` lands on stderr
|
|
24
|
-
after a 3-second wait (host-verified 2026-08-28); redirect `< /dev/null` in
|
|
25
|
-
shell tests. The packaged detour tool spawns engines with stdin ignored
|
|
26
|
-
(`/dev/null`), which avoids this path:
|
|
15
|
+
Print mode (`-p`) with `--output-format text` returns the labor body on stdout;
|
|
16
|
+
stderr carries banners only. Measured with separate fd redirects (`1>` / `2>`).
|
|
27
17
|
|
|
28
18
|
```bash
|
|
29
|
-
claude -p --
|
|
19
|
+
claude -p --output-format text "YOUR_LABOR_PROMPT"
|
|
30
20
|
```
|
|
31
21
|
|
|
32
22
|
Pin the Opus model explicitly (`--model opus` verified accepted on this host;
|
|
33
23
|
init event reports `claude-opus-5`):
|
|
34
24
|
|
|
35
25
|
```bash
|
|
36
|
-
claude -p --model opus --
|
|
26
|
+
claude -p --model opus --output-format text "YOUR_LABOR_PROMPT"
|
|
37
27
|
```
|
|
38
28
|
|
|
39
|
-
Use `--output-format
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
Use `--output-format text` (the default): stdout is the labor body and nothing
|
|
30
|
+
else. Never use `--output-format=stream-json` / `--verbose` for labor — the
|
|
31
|
+
returned body goes back into the seat's context, and the event stream is noise:
|
|
32
|
+
measured 2026-09-06 on this host, the same one-sentence task returned 382 bytes
|
|
33
|
+
as `text` and 45,028 bytes as `stream-json --verbose` (118×); a 12-minute labor
|
|
34
|
+
returned 957k chars and killed the seat with a 712k-token request (#675). Progress observability belongs to the runner's
|
|
35
|
+
process watch, not to the returned body.
|
|
43
36
|
|
|
44
37
|
## Headless permissions
|
|
45
38
|
|
|
@@ -10,18 +10,17 @@ parameters.
|
|
|
10
10
|
## Invocation
|
|
11
11
|
|
|
12
12
|
Same host CLI as the `opus` engine: the machine entrypoint is `claude`, and all
|
|
13
|
-
CLI mechanics (print mode, `--output-format
|
|
14
|
-
fd layout, result-row extraction) are documented in `../opus.md` — read that
|
|
13
|
+
CLI mechanics (print mode, `--output-format text`, fd layout) are documented in `../opus.md` — read that
|
|
15
14
|
note for them; they are not duplicated here.
|
|
16
15
|
|
|
17
16
|
The only difference is the model pin:
|
|
18
17
|
|
|
19
18
|
```bash
|
|
20
|
-
claude -p --model sonnet --
|
|
19
|
+
claude -p --model sonnet --output-format text "YOUR_LABOR_PROMPT"
|
|
21
20
|
```
|
|
22
21
|
|
|
23
22
|
`--model sonnet` is verified accepted on this host (Claude Code 2.1.233); the
|
|
24
|
-
|
|
23
|
+
`json` init metadata reports `claude-sonnet-5` (host-verified 2026-08-28).
|
|
25
24
|
|
|
26
25
|
Prefer `claude --help` on the host over any remembered flag set. Do not wrap
|
|
27
26
|
this engine behind `ak-role` flags.
|
|
@@ -18,8 +18,8 @@ zcode --prompt 'YOUR_LABOR_PROMPT' --cwd /path/to/worktree
|
|
|
18
18
|
|
|
19
19
|
`--prompt` defaults to permission mode `yolo` (no TTY permission stalls).
|
|
20
20
|
Useful extras measured from `zcode --help`: `--attach <path>` (repeatable),
|
|
21
|
-
`--mode build|edit|plan|yolo`, `--resume <sess_
|
|
22
|
-
|
|
21
|
+
`--mode build|edit|plan|yolo`, `--resume <sess_...>`. Never `--json` for
|
|
22
|
+
labor (the returned body goes back into the seat's context as plain text). Prefer `zcode --help` on the host over any remembered flag set.
|
|
23
23
|
|
|
24
24
|
## Realm and model traps (host-verified 2026-08-29, all three hit in sequence)
|
|
25
25
|
|