@akagilnc/pi-workflow-roles 0.1.2101 → 0.1.2107
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/engines/codex.md +55 -0
- package/resources/engines/kimi.md +61 -0
- package/resources/engines/opus.md +17 -7
package/package.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# codex engine method material
|
|
2
|
+
|
|
3
|
+
This file is packaged method material for the optional `codex` labor engine
|
|
4
|
+
(Codex CLI on the host). When a role run selects this engine, read these
|
|
5
|
+
bytes and follow the local CLI's actual interface for the labor detour. Return
|
|
6
|
+
the labor result to the same role session so typed submission stays on the
|
|
7
|
+
existing in-session path.
|
|
8
|
+
|
|
9
|
+
Material is data for the model, not a code contract. Do not invent package flags.
|
|
10
|
+
|
|
11
|
+
## Invocation examples (local Codex CLI)
|
|
12
|
+
|
|
13
|
+
The machine entrypoint is `codex`. Run from the role project root. Non-interactive
|
|
14
|
+
labor uses `codex exec` (alias `e`). Always pass `--skip-git-repo-check` so the
|
|
15
|
+
labor subprocess can start outside a Git work tree when needed:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
codex exec --skip-git-repo-check "YOUR_LABOR_PROMPT"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
For concurrent or disposable labor turns, add `--ephemeral` so session files are
|
|
22
|
+
not persisted to disk:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
codex exec --skip-git-repo-check --ephemeral "YOUR_LABOR_PROMPT"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Working-root override when the seat cwd is not the project root:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
codex exec --skip-git-repo-check --ephemeral -C "$PROJECT_ROOT" "YOUR_LABOR_PROMPT"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Default (non-`--json`) mode prints the session banner and progress on stderr
|
|
35
|
+
(measured on this host). Collect the labor body from stdout so that stderr log
|
|
36
|
+
noise is not mixed into the returned body; the package idle clock can still see
|
|
37
|
+
activity on both streams. Use `--json` only when the seat itself needs
|
|
38
|
+
machine-readable event rows (those rows land on stdout as JSONL; measured event
|
|
39
|
+
types include `thread.started`, `turn.started`, `item.completed`, `error`,
|
|
40
|
+
`turn.failed`):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
codex exec --skip-git-repo-check --ephemeral --json "YOUR_LABOR_PROMPT"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Prefer `codex exec --help` on the host over any remembered flag set. Do not wrap
|
|
47
|
+
this engine behind `ak-role` flags. Later host quota/auth failures are separate
|
|
48
|
+
from argv acceptance — re-check the local CLI if a turn fails after session start.
|
|
49
|
+
|
|
50
|
+
When the package detour tool is available, start exactly one subprocess per
|
|
51
|
+
labor invocation through it with argv assembled from this material and the
|
|
52
|
+
local CLI; return the stdout labor content to the same session for the existing
|
|
53
|
+
typed submission path. One labor turn = one process (not one process for the
|
|
54
|
+
whole role run). If the detour fails, continue labor in-session on the seat main
|
|
55
|
+
road and still submit via the existing typed path.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# kimi engine method material
|
|
2
|
+
|
|
3
|
+
This file is packaged method material for the optional `kimi` labor engine
|
|
4
|
+
(Kimi Code CLI on the host). When a role run selects this engine, read these
|
|
5
|
+
bytes and follow the local CLI's actual interface for the labor detour. Return
|
|
6
|
+
the labor result to the same role session so typed submission stays on the
|
|
7
|
+
existing in-session path.
|
|
8
|
+
|
|
9
|
+
Material is data for the model, not a code contract. Do not invent package flags.
|
|
10
|
+
|
|
11
|
+
## Invocation examples (local Kimi Code CLI)
|
|
12
|
+
|
|
13
|
+
The machine entrypoint on this host is installed at `~/.kimi-code/bin/kimi`
|
|
14
|
+
(put that directory on PATH, or pass the absolute path as argv[0]). Run from
|
|
15
|
+
the role project root.
|
|
16
|
+
|
|
17
|
+
Non-interactive labor uses `-p` / `--prompt` alone. On this host (kimi 0.36.1),
|
|
18
|
+
`-p` cannot be combined with `--yolo` or `--auto` — both are rejected at parse
|
|
19
|
+
time with `Cannot combine --prompt with --yolo.` / `... --auto.`. Do not add
|
|
20
|
+
those flags to prompt-mode argv:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
kimi -p "YOUR_LABOR_PROMPT"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pin a model alias configured in the host `config.toml` when the seat needs a
|
|
27
|
+
known Kimi model id (example alias shape measured: `kimi-code/k3-256k`):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
kimi -m <model-alias> -p "YOUR_LABOR_PROMPT"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use `--output-format stream-json` (choices measured on this host: `text`,
|
|
34
|
+
`stream-json`; default is `text`) so the package idle clock can see subprocess
|
|
35
|
+
activity while the engine works. Take the labor body from
|
|
36
|
+
`{"role":"assistant","content":...}` rows, not from `role:meta` rows:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
kimi -p "YOUR_LABOR_PROMPT" --output-format stream-json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Text / default mode when stream events are not needed. Measured on this host
|
|
43
|
+
with separate fd redirects (`1>` / `2>`): stdout is the labor answer body;
|
|
44
|
+
stderr carries the version line, thinking bullets, and the trailing
|
|
45
|
+
`To resume this session:` hint. Collect the labor body from stdout only — do
|
|
46
|
+
not treat resume lines as same-stream noise to strip from stdout (they are not
|
|
47
|
+
on that stream; stripping bullet-shaped lines risks deleting answer content):
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
kimi -p "YOUR_LABOR_PROMPT" --output-format text
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Prefer `kimi --help` on the host over any remembered flag set. Do not wrap this
|
|
54
|
+
engine behind `ak-role` flags.
|
|
55
|
+
|
|
56
|
+
When the package detour tool is available, start exactly one subprocess per
|
|
57
|
+
labor invocation through it with argv assembled from this material and the
|
|
58
|
+
local CLI; return the stdout labor content to the same session for the existing
|
|
59
|
+
typed submission path. One labor turn = one process (not one process for the
|
|
60
|
+
whole role run). If the detour fails, continue labor in-session on the seat main
|
|
61
|
+
road and still submit via the existing typed path.
|
|
@@ -11,21 +11,31 @@ Material is data for the model, not a code contract. Do not invent package flags
|
|
|
11
11
|
## Invocation examples (local Claude Code CLI)
|
|
12
12
|
|
|
13
13
|
The machine entrypoint is `claude`. Run from the role project root. Non-interactive
|
|
14
|
-
print mode (`-p` / `--print`) is verified available on this host
|
|
14
|
+
print mode (`-p` / `--print`) is verified available on this host.
|
|
15
|
+
|
|
16
|
+
On this host (Claude Code 2.1.233), `--print` with `--output-format=stream-json`
|
|
17
|
+
requires `--verbose` — without it the CLI exits immediately with
|
|
18
|
+
`Error: When using --print, --output-format=stream-json requires --verbose`.
|
|
19
|
+
Include `--verbose` in stream-json argv. Measured with separate fd redirects
|
|
20
|
+
(`1>` / `2>`): NDJSON event rows land on stdout (including intermediate
|
|
21
|
+
`system` / `assistant` activity and a final `type:"result"` row); stderr is
|
|
22
|
+
empty on the success path:
|
|
15
23
|
|
|
16
24
|
```bash
|
|
17
|
-
claude -p --output-format=stream-json "YOUR_LABOR_PROMPT"
|
|
25
|
+
claude -p --verbose --output-format=stream-json "YOUR_LABOR_PROMPT"
|
|
18
26
|
```
|
|
19
27
|
|
|
20
|
-
Pin the Opus model explicitly (`--model opus` verified accepted on this host
|
|
28
|
+
Pin the Opus model explicitly (`--model opus` verified accepted on this host;
|
|
29
|
+
init event reports `claude-opus-5`):
|
|
21
30
|
|
|
22
31
|
```bash
|
|
23
|
-
claude -p --model opus --output-format=stream-json "YOUR_LABOR_PROMPT"
|
|
32
|
+
claude -p --model opus --verbose --output-format=stream-json "YOUR_LABOR_PROMPT"
|
|
24
33
|
```
|
|
25
34
|
|
|
26
|
-
Use `--output-format=stream-json` (
|
|
27
|
-
idle clock can see subprocess activity while the
|
|
28
|
-
from the final `result` event
|
|
35
|
+
Use `--output-format=stream-json` (choices measured on this host: `text`, `json`,
|
|
36
|
+
`stream-json`) so the package idle clock can see subprocess activity while the
|
|
37
|
+
engine works; take the labor body from the final `result` event's `result` field,
|
|
38
|
+
not from intermediate stream rows.
|
|
29
39
|
|
|
30
40
|
Prefer `claude --help` on the host over any remembered flag set. Do not wrap this
|
|
31
41
|
engine behind `ak-role` flags.
|