protocols-plugin
Agent behavioral protocols for Claude Code, Codex CLI, and Gemini CLI, with mechanical tool restriction enforcement via ward where supported.
What This Does
Provides 14 behavioral protocol skills that define operational modes for Claude Code, Codex CLI, and Gemini CLI agents. Each protocol constrains agent behavior — what tools are available, what workflow to follow, what the agent's role is.
Protocols that restrict tools (foreman, adversary, researcher, experiment) include ward gate rules that mechanically enforce those restrictions at the PreToolUse hook level, preventing accidental violations.
Codex uses its own native plugin installation and cache, while Gemini consumes
skill directories directly. This repository ships one installer that manages
the Claude and Codex native plugins and links skills into the Codex and Gemini
user skill roots.
Protocols
| Protocol | Description |
|---|
| foreman | Coordination only — dispatch subagents, do not execute code |
| subagent | How to write and launch subagent prompts (auto-invocable) |
| gauntlet | Scout -> Coder -> Analyst -> Verifier pipeline for high-risk changes |
| investigation | Structured debugging with competing hypotheses and escalation levels |
| experiment | Controlled benchmark experiments with baseline, gates, records, and promote/abandon decisions |
| phases | Parallel/sequential workflow phases with filesystem-based coordination |
| iterations | Tracked iteration cycles for reducing failures with regression detection |
| cleanup-refactor | Deletion-first fixed-point cleanup for refactors, migrations, helper removal, and ownership repair |
| adversary | Read-only design review against project principles |
| researcher | Pre-implementation research with web access |
| external-agents | Using Codex/Gemini CLIs as external reviewers |
| spec-updating | Spec update workflow with discovery, draft, and review gates |
| RE | Reverse engineering — documentation is the work product |
Agents
The plugin ships six Claude-native tool-scoped agents in
plugins/protocols/agents/. Dispatch them via the Task tool with
an explicit supported subagent_type. Their tool restriction is enforced by
agent frontmatter, while Ward keeps each Task actor's protocol phase and mutable
guard state independent from the main manager and sibling workers.
| Agent | subagent_type | Tools | Role |
|---|
| scout | protocols:scout | Read, Glob, Grep, Bash, Write (no Edit) | Survey the codebase, cite file:line, do not implement |
| coder | protocols:coder | Read, Glob, Grep, Bash, Edit, Write | Implement the plan with full TDD; commit own work |
| analyst | protocols:analyst | Read, Glob, Grep, Bash, Write (no Edit) | Find problems — edge cases, security, races; do not fix |
| verifier | protocols:verifier | Read, Glob, Grep, Bash, Write (no Edit) | Gate the merge; default NO-MERGE |
| researcher | protocols:researcher | Read, Glob, Grep, read-only Bash, WebSearch, WebFetch, report Write (no Edit) | Investigate one focused question and write cited findings |
| experiment worker | protocols:experiment-worker | Read, Glob, Grep, Bash, Edit, Write | Run one isolated experiment; never promote itself |
These agents are Claude-only. Codex and Gemini do not load Claude plugin agents — they
consume the equivalent doctrine from the gauntlet and subagent skills' prose.
The script-based installer (scripts/install_skills.py) installs the native
Claude and Codex plugins as well as platform skill links. Claude agents load
through Claude's native plugin system: the agents/ directory is
auto-discovered when the plugin is installed via claude plugin install, so no
manifest declaration is required.
Ward Integration
Protocols that restrict tools use ward for mechanical enforcement: