Enforcement-first orchestration for Claude Code. Every agent tracked. Every decision logged. Nothing gets lost. Claude Code plans great. Without structure, nothing survives past one session. macOS and Linux.
$ npx -y skills add avivk5498/the-claude-protocol --agent claude-code
Repo: avivk5498/the-claude-protocol
What's inside
Enforcement-first orchestration for Claude Code. Every agent tracked. Every decision logged. Nothing gets lost.
Claude Code plans great. Without structure, nothing survives past one session.
npx skills add AvivK5498/The-Claude-Protocol
macOS and Linux.

Why This Exists Β· How It Works Β· Getting Started Β· Hooks
Claude Code is the best coding agent out there. But let it run unsupervised and you get agents editing main, commits without PRs, lost context every session, and zero traceability on what was done and why.
Plan mode helps β until you need to coordinate across files, track what was planned vs what shipped, or pick up a task three sessions later. Plans vanish. Context resets. Investigation gets redone from scratch.
The Claude Protocol is the enforcement layer. It wraps Claude Code with 13 hooks that physically block bad actions, isolates every task in its own git worktree, and documents everything automatically β dispatch prompts, agent knowledge, decisions, all of it. Beads (git-native tickets) track every unit of work from creation to merge.
The complexity is in the system. What you see: Claude plans with you, you approve, agents execute in isolation, PRs get merged. Done.
βββββββββββββββββββββββββββββββββββββββββββ
β ORCHESTRATOR (Co-Pilot) β
β Plans with you (Plan mode) β
β Investigates with Grep/Read/Glob β
β Delegates implementation via Task() β
ββββββββββββββββββββ¬βββββββββββββββββββββββ
β
βββββββββββββΌββββββββββββ
βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ
β react- β β python- β β nextjs- β
βsupervisorβ βsupervisorβ βsupervisorβ
ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ
β β β
.worktrees/ .worktrees/ .worktrees/
bd-BD-001 bd-BD-002 bd-BD-003
The orchestrator investigates, discusses with you, and plans. It never writes code. Dispatch prompts are auto-logged to the bead so nothing gets lost.
Supervisors are created automatically based on your tech stack. They read bead comments for full context, work in isolated worktrees, and push clean PRs.
Beads are git-native tickets. Every task, every epic, every dependency β tracked in your repo, not a third-party service. One bead = one unit of work = one worktree = one PR.
Standalone β Investigate β plan β approve β create bead β dispatch supervisor β worktree β PR β merge.
Epics β Cross-domain work (DB + API + frontend) becomes an epic with enforced child dependencies. Each child gets its own worktree. Dependencies prevent dispatching out of order.
Quick Fix β For trivial changes (<10 lines), the orchestrator can edit directly on a feature branch. The hook prompts the user for approval with file name and change size. Hard blocked on main β must use bead workflow there.
Every task goes through beads β unless the user explicitly approves a quick fix.
The Claude Protocol pairs with the Beads Kanban UI for visual task management and GitOps directly from the browser. Track epics, subtasks, dependencies, and PR status across columns β without leaving the board.
npx skills add AvivK5498/The-Claude-Protocol
Or via npm:
npm install -g beads-orchestration
Then in any Claude Code session:
/create-beads-orchestration
The skill walks you through setup, scans your tech stack, and creates supervisors with best practices injected.
13 hooks across 5 lifecycle events. They don't warn β they block. The orchestrator can't edit code on main. Supervisors can't skip beads. Epics can't close with open children. git commit --no-verify is blocked β pre-commit hooks always run.
The orchestrator must read the actual source file before delegating β no guessing. Constraints ("never dispatch without reading the source") outperform instructions ("remember to investigate"), inspired by Cursor's multi-agent research. The orchestrator also maintains persistent memory across sessions.
Every supervisor dispatch prompt is automatically captured as a bead comment. Agents voluntarily log conventions and gotchas into a persistent knowledge base. Session start surfaces recent knowledge so agents don't re-investigate solved problems.
# Agent captures an insight
bd comment BD-001 "LEARNED: TaskGroup requires @Sendable closures in strict concurrency mode."
# Search the knowledge base
.beads/memory/recall.sh "concurrency"
Closed beads are immutable. Bug fixes become new beads linked via bd dep relate β full history, no reopening. Merged branches don't get reused. Each fix gets its own worktree and PR.
.claude/
βββ agents/ # Supervisors (auto-created for your tech stack)
βββ hooks/ # Workflow enforcement (13 hooks)
βββ skills/ # subagents-discipline, react-best-practices
βββ settings.json
CLAUDE.md # Orchestrator instructions
.beads/ # Task database
memory/ # Knowledge base (knowledge.jsonl + recall.sh)
.worktrees/ # Isolated worktrees per task (created dynamically)
13 hooks enforce every workflow step. They block before bad actions happen, auto-log after good ones, and validate before supervisors exit.
PreToolUse (7 hooks) β Block orchestrator from writing code on main. Prompt for quick-fix approval on feature branches. Block --no-verify on commits. Allow memory file writes. Require beads for supervisor dispatch. Enforce worktree isolation. Block closing epics with open children. Enforce sequential dependency dispatch.
PostToolUse (3 hooks) β Auto-log dispatch prompts as bead comments. Capture knowledge base entries. Enforce concise supervisor responses.
SubagentStop (1 hook) β Verify worktree exists, code is pushed, bead status is updated.
SessionStart (1 hook) β Surface task status, recent knowledge, and cleanup suggestions.
UserPromptSubmit (1 hook) β Prompt for clarification on ambiguous requests.
By default, all agents run via Claude's Task(). To delegate read-only agents (scout, detective, etc.) to Codex/Gemini:
/create-beads-orchestration --external-providers
Requires Codex CLI (codex login), optionally Gemini CLI, and uv.
MIT
.beads/
issues.jsonl
.claude/
hooks/
block-branch-for-epic-child.sh
settings.json
skills/
create-beads-orchestration/
SKILL.md
.github/
workflows/
release.yml
.gitignore
bootstrap.py
docs/
memory-architecture.md
LICENSE
mcp-provider-delegator/
CLAUDE.md
pyproject.toml
README.md
src/
mcp_provider_delegator/
__init__.py
agent_loader.py
CLAUDE.md
provider_client.py
server.py
tests/
CLAUDE.md
fixtures/
CLAUDE.md
scout.md
test_agent_loader.py
test_integration.py
test_provider_client.py
test_server.py
uv.lock
package.json
README.md
screenshots/
kanbanui.png
scripts/
cli.js
postinstall.js
SKILL.md
skills/
create-beads-orchestration/
SKILL.md
subagents-discipline/
SKILL.md
templates/
agents/
architect.md
code-reviewer.md
detective.md
discovery.md
merge-supervisor.md
scout.md
scribe.md
beads-workflow-injection-api.md
beads-workflow-injection-git.md
beads-workflow-injection.md
CLAUDE.md
frontend-reviews-requirement.md
hooks/
block-orchestrator-tools.sh
clarify-vague-request.sh
enforce-bead-for-supervisor.sh
enforce-branch-before-edit.sh
enforce-concise-response.sh
enforce-sequential-dispatch.sh
inject-discipline-reminder.sh
log-dispatch-prompt.sh
memory-capture.sh
nudge-claude-md-update.sh
remind-inprogress.sh
session-start.sh
validate-completion.sh
validate-epic-close.sh
mcp.json.template
memory/
recall.sh
settings.json
skills/
react-best-practices/
SKILL.md
subagents-discipline/
SKILL.md
ui-constraints.md
tests/
test-validate-epic-close.shFAQ
the-claude-protocol is a Claude Code plugin with 5 hand-picked skills for agent orchestration work, indexed on Flowy. Install it with the command on its page. It includes create-beads-orchestration, create-beads-orchestration, subagents-discipline. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.