protocols · overview

On your terms with AI.

One engine. As many protocols as you need.

A protocol is a JSON config that drives a multi-step lifecycle. Each step declares a DAIC mode, a block of engine functions that run automatically, and the prompt the agent follows. Protocols are the only sanctioned way to do implementation work — they manage mode transitions, task files, git branches, and completion so the agent never has to flip modes by hand.

  1. 01Investigationread-only

    Read-only. Explore the code and agree the plan before a single edit.

    OpusAntigravityCodexyour call — answer to go on
  2. 02Implementationedit tools unlocked

    Edit tools unlock. Tests first, on the task branch.

  3. 03Code-reviewspec gate

    The spec-compliance gate — multi-model review until it’s clean.

    OpusAntigravityCodex
  4. 04Documentationdocs only

    Docs-only. Service docs and the work log sync.

    writes back to the shared LLM wiki
  5. 05Completionsquash & push

    Squash, merge, push — the task is archived.

task
5 steps
The standard implementation lifecycle.
brainstorm
5 steps
Parallel-specialist ideation → planned tasks. No code.
research
4 steps
Spikes, PoCs, evaluations. No branch, no code.
refactoring
6 steps
Test-baseline-gated restructuring.
optimize
7 steps
Metric-driven optimization, interactive batched.
optimize-unattended
7 steps
Autonomous twin of optimize. For overnight runs.
hotfix
example
Triage → patch → verify → ship. Skips planning for urgent fixes.
spike
example
Timeboxed exploration. Throwaway code, captured learnings, no review gate.
release
example
Changelog → version bump → tag → publish. Your shipping ritual, codified.
vendor-onboarding
example
Intake → due diligence → security review → sign-off before go-live.
employee-onboarding
example
Provision access → agent runs the training → first task → manager sign-off.
incident
example
Detect → triage → mitigate → post-mortem — each step in order.
shared shape

Every protocol, the same skeleton.

Steps as JSON, prompts as markdown. Step orchestration — the DAIC mode, which functions run, what arguments advance requires — lives in compact JSON. The verbose human-facing instructions live in separate sub-protocol markdown, so the long prompts can be edited or forked without touching engine logic.

Functions, not hardcoded steps. All side effects — branch creation, issue sync, archiving, squashing — are named functions in a step’s pre_funcs / post_funcs, all catalogued in the engine functions reference. Adding behaviour is a JSON edit, not an engine change.

Gates that can’t be talked past. A post-function marked stop-on-failure becomes a hard precondition for advancing — that’s how spec-compliance, completion-evidence, and the optional test gate become structural walls rather than advisory reminders.

customization

Your workflows, in the same engine.

You don’t hand-author JSON to start — ask Claude to fork any shipped protocol:

/team-management:custom-protocol-create task

This runs protocol_customize("task"), copies the system config into team-management/protocol-configs/custom/task.json, and opens it for editing — then you describe the change in plain language and Claude edits it with you. The custom copy takes precedence on name match and is never overwritten on upgrade.

To create a net-new protocol, drop any uniquely-named JSON into custom/ — it appears in protocol_list() immediately. The engine functions you can wire into steps (branch setup, issue sync, archiving, frozen paths) are discoverable via protocol_available_funcs(). After an upgrade, run /team-management:custom-protocol-update-after-reinstall to diff your copies against the new system ones and decide what to merge. See customization for the full story.

the strongest gate

Two-stage code review.

The task protocol and the optimize pair share a structurally-gated review step — the framework’s strongest quality gate.

Stage 1 — spec compliance

A read-only reviewer audits the diff against your Success Criteria. On pass, the engine records a SPEC_REVIEW: PASSED sentinel. Advance is impossible without it — it’s checked both on entry and as a hard block on exit.

Stage 2 — code quality

One message dispatches the Claude code-review agent plus one Task per configured AI provider, all in parallel. Findings are aggregated with equal weight; provider output is advisory and never blocks.

Forward is earned; backward is always open. A step advances only when its completion criteria are met — but it can always step back. If review surfaces a real problem, the protocol returns to investigation, re-plans, fixes, and re-earns the path forward.