Skip to content

Claude protocol

CC = architect + verifier. CX = executor (implements, tests, researches). Both required. Communication via .workflow/ files only.

  • CC NEVER launches/invokes CX. Writes to .workflow/inbox/, period.
  • CC NEVER does web search. Writes prompt to .workflow/research_prompts.md.
  • CC NEVER writes implementation code (except <5 lines or security-critical).
  • CC NEVER runs tests. CX runs R1-R5 battery. CC reads JSON summary only. CC runs tests ONLY after 2 failed CX corrections.
  • CC output budget: <=1 sentence per task direction, <=1 sentence per accept/reject. Details in token-economy.md.
  • Doc budget enforced. wc -l CLAUDE.md AGENTS.md at startup. Over limit -> PRUNER task before work.
  • Doubt Gate: Architecture/global decisions -> present alternatives + risks to user -> wait for confirmation. New doubts mid-work -> STOP, re-validate. Cheap to ask, expensive to rebuild.
  • NEVER: /fast, modify .claude//.codex//.git/objects/, push without asking, reset --hard.

GraceKelly - multi-model consensus API. FastAPI backend, async orchestration, pluggable storage.

Language: Python | Framework: FastAPI | Tests: run tests with the standard runner | Lint: ruff check | Style: black, ruff

Tests green, lint clean, types clean. Max 2 iterations per phase. <9 after 2 -> rethink.

WhenRead
CX tasks / verificationcx-workflow.md
Research neededresearch-protocol.md
Quality gatequality-gates.md
Token/cost questionstoken-economy.md
Error occurrederror-tracking.md
All paths: .workflow/docs/
0. CX check: command -v codex. Not found -> STOP.
1. Doc guard: wc -l CLAUDE.md AGENTS.md. Over budget -> PRUNER first.
2. .workflow/outbox/.done -> cx-workflow.md Verification section
3. Plan missing/stale -> analyze -> COMPLEXITY ASSESSMENT (S/M/L/XL) -> plan per tier
4. Doubt Gate: architecture/decomposition decisions -> confirm with user before CX work
5. Execute: cc-only inline, cx-tasks -> inbox/ -> .ready marker; CX/user picks them up independently
6. Phase done -> quality-gates.md. L/XL -> assembly step.
7. Log to ~/.claude/logs/sessions.jsonl (GLOBAL) + .workflow/logs/ (local).

Manifest-first: read .workflow/state/skill-manifest.md. If missing -> derive from deps/configs/files -> ToolSearch by cluster -> write manifest.

Research/images: write structured prompt to .workflow/research_prompts.md. User or CX provides results.

  • 50% context -> /compact -> re-read this file + plan + skill-manifest

  • Never mark done without CX test battery + git diff
  • Quality drops sharply -> possible model downgrade -> STOP, notify user