feat(rails): agents can read their own rails and refusal next steps (#1873) #1915

Merged
jason.woltje merged 2 commits from org-ti into refactor 2026-11-11 01:44:22 +00:00
Owner

Roles round 2, slice TI (#1873): each agent can read its own rails.

  • A generated "Your rails" prompt section built from the resolved definition. It lists each held action and where it goes (alone, to which arbiter, or to a person), each decision.resolve.* right with its autonomy level, the network setting, credential service and scope names (never values) and messaging targets. One shared projection, ownRails in packages/organization/src/rails.mjs, feeds both the prompt and the broker. decisionAutonomy(decisionClass) is the hook AU will extend; today it reports the fixed levels.
  • my_rails, a read-only bus verb with no parameters. It reads the authenticated caller's own rails from live broker state, so a narrowing shows on the next call. It writes no event or decision and refuses any role selector.
  • packages/bus/src/refusals.mjs, one static table that maps each broker refusal code to the rail it enforces and a next step. The socket envelope carries rail and nextStep. Codes, reasons and outcomes are unchanged, and the guidance text never quotes caller input, config values or file bytes. A test fails when a forwarded code has no entry.
  • Six role contracts (coder, cto, merge-gate, pm, reviewer, security-reviewer) drop the reference to a launch record no session receives and point at the rails section and my_rails. Their hashes are pinned. No role JSON, contract, right, route or arbiter changed.

Lane: Sol. Gate on the rebased tree (54bf239e3): 371 files, 4146/0, two existing skips. Review: Opus build review (changes 5, all P3, wording and coverage, all fixed) and daybreak-blue security review (approve).

Roles round 2, slice TI (#1873): each agent can read its own rails. - A generated "Your rails" prompt section built from the resolved definition. It lists each held action and where it goes (alone, to which arbiter, or to a person), each `decision.resolve.*` right with its autonomy level, the network setting, credential service and scope names (never values) and messaging targets. One shared projection, `ownRails` in `packages/organization/src/rails.mjs`, feeds both the prompt and the broker. `decisionAutonomy(decisionClass)` is the hook AU will extend; today it reports the fixed levels. - `my_rails`, a read-only bus verb with no parameters. It reads the authenticated caller's own rails from live broker state, so a narrowing shows on the next call. It writes no event or decision and refuses any role selector. - `packages/bus/src/refusals.mjs`, one static table that maps each broker refusal code to the rail it enforces and a next step. The socket envelope carries `rail` and `nextStep`. Codes, reasons and outcomes are unchanged, and the guidance text never quotes caller input, config values or file bytes. A test fails when a forwarded code has no entry. - Six role contracts (coder, cto, merge-gate, pm, reviewer, security-reviewer) drop the reference to a launch record no session receives and point at the rails section and `my_rails`. Their hashes are pinned. No role JSON, contract, right, route or arbiter changed. Lane: Sol. Gate on the rebased tree (54bf239e3): 371 files, 4146/0, two existing skips. Review: Opus build review (changes 5, all P3, wording and coverage, all fixed) and daybreak-blue security review (approve).
jason.woltje added 2 commits 2026-11-11 01:44:14 +00:00
jason.woltje merged commit ddf4f895cd into refactor 2026-11-11 01:44:22 +00:00
Sign in to join this conversation.