$ claude --playbook
The agentic engineering playbook_
You orchestrate; the agent executes. Engineer the setup so it follows your standards as closely as it can, and add deterministic checks as the safety net. Six questions, in the order teams meet them: each answer is a standard, the configuration that carries it, the check that enforces it, and the files to wire it into your own setup.
by Paul Grycuk
What does the agent need to see to do this work well?
context-engineering/
- the standard
- Always-on context is high-signal and under budget: CLAUDE.md holds only what is true every session.
- configure
- CLAUDE.md architecture: the memory hierarchy, @imports, and path-scoped rules.
- safety net
- Mechanically-checkable rules live in linters, not prose, so they never cost tokens or drift.
- measure by
- Always-on tokens loaded every turn by standing context.
- without it
- Long sessions end with an agent that has forgotten its own decisions: context rot.
❯ wire it into your setup: the patterns and copy-paste artifacts
How do we stop the agent skipping the rule when it matters?
deterministic-policy/
- the standard
- If a rule must always hold, enforce it in code, not prose: hook > check > prompt.
- configure
- Permission-policy design across the four enforcement surfaces: hook, permission, sandbox, CI.
- safety net
- A PreToolUse hook that exits 2 blocks the action before it runs.
- measure by
- Rule-compliance under session pressure, code-graded: prose ~70–90% vs hooks 100%.
- without it
- A model under pressure eventually skips the step you asked it nicely to remember.
❯ wire it into your setup: the patterns and copy-paste artifacts
Which layer does this capability belong in, and what does it cost?
tooling-foundation/
- the standard
- Every extension lands in the right layer with a known token and attack-surface cost.
- configure
- Skills over prompts on the open standard, plus a committed MCP baseline.
- safety net
- The adoption rubric (maintenance, auth, token cost, injection surface) applied before anything is added.
- measure by
- Startup token cost per extension: skill listings and deferred MCP schemas.
- without it
- A 2,000-line CLAUDE.md and a dozen MCP servers nobody audited.
❯ wire it into your setup: the patterns and copy-paste artifacts
How do we turn agent throughput into stable delivery, not more rework?
quality-cd/
- the standard
- One CI quality gate, identical for agent and human PRs, with no bypass actors.
- configure
- TDD with agents, and two-stage agent code review.
- safety net
- The CI quality gate (build, test, coverage, static analysis) as a required status check on every PR.
- measure by
- Change failure rate and deployment rework rate, per DORA.
- without it
- PR volume rises and the change failure rate rises with it.
❯ wire it into your setup: the patterns and copy-paste artifacts
Where is your p99 for spend, and what does a merged PR cost?
cost-engineering/
- the standard
- Every cost figure is traceable to its layer and attributed to an owner.
- configure
- Session hygiene and context budgeting; prompt-cache economics measured, not assumed.
- safety net
- Cost telemetry instrumented at source: OTel cost and token events, IAM-principal attribution on Bedrock.
- measure by
- Cost per merged PR: cost per outcome, not per token.
- without it
- Spend is a number someone discovers in the finance report.
❯ wire it into your setup: the patterns and copy-paste artifacts
When does splitting work across agents pay, and which topology fits?
multi-agent-orchestration/
- the standard
- Fan out only when subtasks are genuinely independent: no shared files, no ordering.
- configure
- Orchestrator-worker dispatch, with context isolation and explicit handoff.
- safety net
- Fresh-context verification: the reviewer is never the context that wrote the code.
- measure by
- Coordination-token overhead against wall-clock gain.
- without it
- Two agents silently overwriting each other's edits; tokens burned on false parallelism.
❯ wire it into your setup: the patterns and copy-paste artifacts