feat(a2a): CEO can DM the Auditor and PR reviewers (#623)

* feat(a2a): CEO can DM the Auditor and PR reviewers

A mid-flight PR reviewer or Auditor that's stuck was unreachable — the CEO
had no way to DM them. Both roles now carry dm/read_a2a, so the CEO can open
a 1:1 and they can reply in-thread through the existing CEO-reply path.

Scoped deliberately: the Auditor stays a silent observer to its peers — it
gains no peer-initiation surface (can_a2a_direct routes it through
_check_auditor_a2a, which refuses every initiation target; it can only reply
inside a CEO-opened DM). PR reviewers keep their owning-PM scope. Intake and
Secretary stay excluded — they have their own dedicated chat pages.

NO_COMMS_ROLES drops to {prompter, secretary}; the panel's EXCLUDE_NON_DM_ROLES
matches. KB/docs updated so the 'auditor/pr_reviewer have no dm' claim isn't
left stale.

* test(a2a): smoke guard checks _NO_COMMS_ROLES, not a hardcoded 'auditor'

The dm() runtime guard no longer names the auditor (it now carries dm to
reply to the CEO); it refuses the canonical _NO_COMMS_ROLES set. Assert on
that set so the smoke test tracks the guard, not a stale role name.

* chore(foundation): regenerate verb tables for auditor/pr_reviewer dm+read_a2a

---------

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
Renzo F
2026-07-21 05:54:29 +02:00
committed by GitHub
co-authored by Renn F
parent 775872cac0
commit 73c05cfa5e
24 changed files with 295 additions and 146 deletions
+8 -4
View File
@@ -1,8 +1,9 @@
"""Playbook content verbs — role grants + ContentActions RBAC.
Delivery roles DRAFT playbooks; only the Auditor CURATES (approve/reject/archive).
The Auditor's no-say/no-dm restriction is preserved (these are KB curation
actions, not agent comms).
Curation is KB-curation, not agent comms, and stays separate from the
Auditor's dm/read_a2a surface (CEO-reachable, reply-only — see
agents_config.can_a2a_direct for the peer-initiation refusal).
"""
from __future__ import annotations
@@ -33,9 +34,12 @@ def test_auditor_curates_but_does_not_draft() -> None:
for verb in _CURATE_VERBS:
assert verb in do_tools
assert "draft_playbook" not in do_tools
# No-say/no-dm preserved.
# No "say" tool exists; dm/read_a2a ARE present (CEO-reachable, reply-only
# — the auditor still never initiates peer A2A, enforced in
# agents_config.can_a2a_direct, not by omitting the tool here).
assert "say" not in do_tools
assert "dm" not in do_tools
assert "dm" in do_tools
assert "read_a2a" in do_tools
def test_delivery_role_cannot_curate() -> None: