diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-09 17:16:08 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-09 17:16:08 -0500 |
| commit | c91bd0b1e8183814f248b0751d88a8e422a905e8 (patch) | |
| tree | f70abe516c47162f8e6538c2d9fa639aa9349d13 /.ai/scripts | |
| parent | 1f0900281b8262539137bc1aff3f01cc05745139 (diff) | |
| download | rulesets-c91bd0b1e8183814f248b0751d88a8e422a905e8.tar.gz rulesets-c91bd0b1e8183814f248b0751d88a8e422a905e8.zip | |
feat(workflows): generalize broadcast into announcement + situational modes
cross-project-broadcast handled tooling and rule announcements but had no shape for the situational case: a life or work event I want every project's agent to know, said once so none is missing context when I next talk to them. I renamed it to broadcast (helper and test alongside) and split it into two modes over the same fan-out plumbing. Announcement keeps the rigid capability template. Situational carries a general-not-comprehensive summary plus a fixed receiving-agent contract: record it in notes.org, hold it time-boxed or standing, apply on the project's own judgment, ask follow-ups at startup. The broadcasting agent does no per-project relevance analysis. Each receiving agent decides what the event means for its own work.
Diffstat (limited to '.ai/scripts')
| -rwxr-xr-x | .ai/scripts/broadcast.py (renamed from .ai/scripts/cross-project-broadcast.py) | 8 | ||||
| -rw-r--r-- | .ai/scripts/tests/test_broadcast.py (renamed from .ai/scripts/tests/test_cross_project_broadcast.py) | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/.ai/scripts/cross-project-broadcast.py b/.ai/scripts/broadcast.py index 2c4c690..ba5c786 100755 --- a/.ai/scripts/cross-project-broadcast.py +++ b/.ai/scripts/broadcast.py @@ -6,8 +6,8 @@ whose .ai/protocols.org exists. Uses the existing inbox-send.py helper to deliver per-target. Usage: - cross-project-broadcast.py --list - cross-project-broadcast.py --file <path> [--exclude <name> ...] [--dry-run] + broadcast.py --list + broadcast.py --file <path> [--exclude <name> ...] [--dry-run] """ from __future__ import annotations @@ -67,7 +67,7 @@ def inbox_send_path() -> Path: candidate = ancestor / ".ai" / "scripts" / "inbox-send.py" if candidate.is_file(): return candidate - raise SystemExit("cross-project-broadcast: inbox-send.py not found in current project") + raise SystemExit("broadcast: inbox-send.py not found in current project") def main() -> int: @@ -115,7 +115,7 @@ def main() -> int: msg_path = Path(args.file).resolve() if not msg_path.is_file(): - print(f"cross-project-broadcast: file not found: {msg_path}", file=sys.stderr) + print(f"broadcast: file not found: {msg_path}", file=sys.stderr) return 2 inbox_send = inbox_send_path() diff --git a/.ai/scripts/tests/test_cross_project_broadcast.py b/.ai/scripts/tests/test_broadcast.py index 5919fbf..a0decf5 100644 --- a/.ai/scripts/tests/test_cross_project_broadcast.py +++ b/.ai/scripts/tests/test_broadcast.py @@ -1,4 +1,4 @@ -"""Tests for cross-project-broadcast.py: project fingerprinting + discovery. +"""Tests for broadcast.py: project fingerprinting + discovery. Plain python3 script. The pure-ish helpers are driven against tmp project trees; discovery is exercised with SEARCH_ROOTS monkeypatched to the tree, and @@ -11,12 +11,12 @@ from pathlib import Path import pytest -SCRIPT = Path(__file__).resolve().parents[1] / "cross-project-broadcast.py" +SCRIPT = Path(__file__).resolve().parents[1] / "broadcast.py" @pytest.fixture(scope="module") def bcast(): - spec = importlib.util.spec_from_file_location("cross_project_broadcast", SCRIPT) + spec = importlib.util.spec_from_file_location("broadcast", SCRIPT) assert spec and spec.loader module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) |
