Overview of Communication Rules tripwire
mainThe Communication Rules tripwire is a system designed to enforce brevity and clarity in AI agent outputs (Claude Code, Codex, Pi, and OpenCode). It uses a shared Python core to scan agent outputs for banned patterns (like em/en dashes or specific banned words) and applies enforcement policies based on the 'blast radius' of the output.
Key Characteristics:
- Deterministic Detection: Uses a stdlib-only Python scanner with exact matches rather than probabilistic LLM judging.
- Two-Tier Enforcement: Differentiates between 'world-visible' output (which can be blocked) and 'prose' (which is corrected via silent re-issues).
- Single Source of Truth: Nix generates a single rules fragment used by both the model (in prompts) and the gate (in the scanner).
- Agent-Specific Wiring: Uses native mechanisms for each agent (e.g., command hooks for Claude Code/Codex, in-process plugins for Pi/OpenCode).