@akagilnc/pi-workflow-roles 0.1.2444 → 0.1.2456

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.
@@ -59,7 +59,12 @@ export function loadMainRoleSessionMaterials(role) {
59
59
  }
60
60
  /** Gatekeeper province + Inspector/Notary officer sessions. */
61
61
  export const GATEKEEPER_SESSION_MATERIALS = {
62
- gatekeeper: ["CLAUDE.md", "souls/gatekeeper.md", "souls/gate-output-guide.md"],
62
+ gatekeeper: [
63
+ "CLAUDE.md",
64
+ "souls/gatekeeper.md",
65
+ "souls/quality-law.md",
66
+ "souls/gate-output-guide.md",
67
+ ],
63
68
  inspector: [
64
69
  "CLAUDE.md",
65
70
  "souls/inspector.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.2444",
3
+ "version": "0.1.2456",
4
4
  "description": "Soul-bound workflow roles for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -0,0 +1,62 @@
1
+ # hermes engine method material
2
+
3
+ This file is packaged technical material for the optional `hermes` labor
4
+ engine (Hermes Agent CLI on the host; current owner directive routes the
5
+ free-tier labor leg through it). Sourced from the official CLI reference
6
+ (hermes-agent.nousresearch.com/docs/reference/cli-commands, read 2026-08-28)
7
+ plus a live smoke on this host.
8
+
9
+ Before invoking the engine, read `../engine-dispatch.md`, resolving that path
10
+ relative to this note. This note only covers this engine's CLI technical
11
+ parameters.
12
+
13
+ ## Invocation (official one-shot scripting mode)
14
+
15
+ The machine entrypoint is `hermes`. `-z` is the official pure-scripting mode:
16
+ "single prompt in, final response text out, nothing else on stdout or stderr"
17
+ — no banner, no spinner, no tool previews. Exit codes: `0` success,
18
+ `1` backend/delivery failure, `2` usage errors.
19
+
20
+ Factory labor line:
21
+
22
+ ```bash
23
+ hermes -z "YOUR_LABOR_PROMPT" --in /path/to/project --no-restore-cwd \
24
+ --ignore-rules --usage-file /tmp/hermes-usage.json
25
+ ```
26
+
27
+ - `--in DIR` changes directory before start and scopes workspace lookups.
28
+ - `--no-restore-cwd` keeps the run from touching the interactive session's
29
+ working-directory state.
30
+ - `--ignore-rules` skips the host's personal AGENTS.md/SOUL.md/.cursorrules
31
+ and memory injection — required for factory legs so the owner's personal
32
+ agent identity does not leak into labor output.
33
+ - `--usage-file PATH` (works with `-z` only) writes a JSON spend report
34
+ (`estimated_cost_usd`, token counts, model, provider, `completed`/`failed`)
35
+ **even when the run fails** — attach it to the leg's receipt for accounting.
36
+ - Long or untrusted prompts: `--query-file PATH` reads the prompt from a file
37
+ verbatim ("nothing is shell-interpreted"); mutually exclusive with `-q`.
38
+ - Model/provider default comes from host `~/.hermes/config.yaml`
39
+ (owner-selected; verified 2026-08-28: `poolside/laguna-s-2.1:free` on Nous
40
+ Portal). Override with `-m provider/model` + `--provider` only when the
41
+ dispatch order says so.
42
+ - Isolation stronger than `--ignore-rules` exists but has trade-offs:
43
+ `--ignore-user-config` also drops the config-file model default and switches
44
+ credential loading to `.env`; `--safe-mode` additionally disables plugins,
45
+ hooks and MCP. Do not use them for routine labor unless the order says so —
46
+ they can sever the owner-configured model/auth path.
47
+ - Do NOT pass `--yolo` (blanket approval bypass) for factory labor;
48
+ permissions stay at the CLI's defaults.
49
+ - Debug variant: `hermes chat -q "..."` runs one-shot **with** tool output and
50
+ intermediate steps on stdout (unlike `-z`) — use when a labor run needs its
51
+ steps inspected.
52
+
53
+ ## Smoke test (run before first labor leg of a session)
54
+
55
+ ```bash
56
+ hermes -z "Reply with exactly one word: OK" --no-restore-cwd
57
+ ```
58
+
59
+ Expected: stdout is exactly `OK`, exit code 0. Verified 2026-08-28 on this
60
+ host (model `poolside/laguna-s-2.1:free`, Nous Portal). If it fails, check
61
+ `hermes status` (model/provider block) and `~/.hermes/provider_models_cache.json`
62
+ for the current catalog; the interactive picker is `hermes model`.
@@ -71,7 +71,12 @@ export function loadMainRoleSessionMaterials(
71
71
 
72
72
  /** Gatekeeper province + Inspector/Notary officer sessions. */
73
73
  export const GATEKEEPER_SESSION_MATERIALS = {
74
- gatekeeper: ["CLAUDE.md", "souls/gatekeeper.md", "souls/gate-output-guide.md"],
74
+ gatekeeper: [
75
+ "CLAUDE.md",
76
+ "souls/gatekeeper.md",
77
+ "souls/quality-law.md",
78
+ "souls/gate-output-guide.md",
79
+ ],
75
80
  inspector: [
76
81
  "CLAUDE.md",
77
82
  "souls/inspector.md",
@@ -284,15 +284,13 @@ export function createFixerRoleRuntime(
284
284
  ctx,
285
285
  toolCallId,
286
286
  );
287
- if (output.status === "completed" || output.status === "partially_completed") {
288
- await requireGatekeeperPass({
289
- context: ctx,
290
- subject: { kind: "worker_completion", material: JSON.stringify(output) },
291
- ...(_signal === undefined ? {} : { signal: _signal }),
292
- hostActions,
293
- toolCallId,
294
- });
295
- }
287
+ await requireGatekeeperPass({
288
+ context: ctx,
289
+ subject: { kind: "worker_completion", material: JSON.stringify(output) },
290
+ ...(_signal === undefined ? {} : { signal: _signal }),
291
+ hostActions,
292
+ toolCallId,
293
+ });
296
294
  const acceptedDetails = output;
297
295
  return {
298
296
  content: [{ type: "text" as const, text: FIXER_ACCEPTED_TEXT }],
@@ -425,15 +423,13 @@ export function createCoderRoleRuntime(
425
423
  ctx,
426
424
  toolCallId,
427
425
  );
428
- if (output.status === "completed") {
429
- await requireGatekeeperPass({
430
- context: ctx,
431
- subject: { kind: "worker_completion", material: JSON.stringify(output) },
432
- ...(_signal === undefined ? {} : { signal: _signal }),
433
- hostActions,
434
- toolCallId,
435
- });
436
- }
426
+ await requireGatekeeperPass({
427
+ context: ctx,
428
+ subject: { kind: "worker_completion", material: JSON.stringify(output) },
429
+ ...(_signal === undefined ? {} : { signal: _signal }),
430
+ hostActions,
431
+ toolCallId,
432
+ });
437
433
  const acceptedDetails = output;
438
434
  return {
439
435
  content: [{ type: "text" as const, text: CODER_ACCEPTED_TEXT }],