Give agents team rules and verify that the rules work
Repository instructions, skills, and hooks are a starting point. Approved implementation plans, session verification, and configuration evals make agent execution reviewable.
Jonathan
Founder
An accepted design does not guarantee correct implementation. Teams also rely on conventions absent from the spec: frozen modules, controlled dependencies, and commands that prove a change works. Once those conventions guide an agent, their effect needs verification.
Build and Test form a connected mechanism in the playbook: approve an implementation plan, provide team rules, then verify both task outcomes and the configuration steering the agent.
Approve an implementable plan.md
The source begins Build with plan mode. An engineer asks Claude to read the spec and codebase and propose changed files, order of work, risks, and proof of completion. Iterate until another engineer could implement the plan without reading the conversation, then approve execution.
For claims-status self-service, the plan adds an endpoint behind existing authentication, builds the portal panel, then connects navigation. The backend’s rate limit creates a caching requirement. Tests covering four claim states and a screenshot compared with the approved mock provide evidence.
Commit the accepted plan as plan.md. When implementation departs from it, update plan and code together so PR review can compare the intended and actual changes. Higher-risk plans go to a technical lead or architect under organizational policy.
Put repository knowledge and policy in the right place
CLAUDE.md holds what a new engineer needs on day one: build, test, and lint commands, important conventions, and architectural boundaries. The playbook suggests using /init for a draft, trimming it, and recording corrections when mistakes recur.
Keep it short. Move specialized knowledge to skills or subagents. Updates still need review; observing an error does not automatically produce a reliable rule.
Skills turn policy into operational instructions. An API security skill can specify authentication, the /health exception, required audit-event fields, and a check command. Policies need named owners, sources, reviewed changes, and an organizational distribution mechanism for new versions.
These instructions guide the model. They do not guarantee correct execution.
Enforce action boundaries with fast hooks
Hooks and permission settings enforce controls such as blocking edits to generated or frozen paths, running formatters and linters after edits, and keeping credentials out of changes.
Build hooks should be fast and scoped. Full suites and security scans can run at commit or PR time rather than blocking every edit in every session. Production approval belongs at the release gate.
Execution also needs isolation and access controls. A skill saying not to read credentials cannot substitute for actual filesystem and network restrictions.
Produce evidence before declaring a task complete
Acceptance needs tool-checkable targets: a specified test suite passes, an endpoint returns the expected field, or the build succeeds. Record commands and healthy output in CLAUDE.md, and require results before completion is reported.
UI work needs visual feedback: implement, capture a screenshot, compare with the mock, and adjust. Logs and screenshots should become reviewable records.
Protect the feedback loop itself. During a bug fix, the agent should not weaken or delete the failing test to manufacture success. A task-scoped hook can restrict edits to that test. Legitimate test additions and updates remain development work and require review in context.
Run real-task evals when configuration changes
Task verification asks whether this output meets acceptance criteria. Configuration evals ask whether a changed rule, prompt, or model still performs to the same standard.
The source recommends collecting 20 to 50 representative tasks, each with its prompt and acceptance checks. Run evals on changes to CLAUDE.md and .claude/**, and on a schedule; use results to gate configuration merges. Depending on cost and use case, a fixed offline cadence is also possible.
Eval runs need model-call budget. Passing cases cannot guarantee all future behavior, so keep adding discriminating examples. Convert production incidents into permanent regression evals. They are evaluation material here, rather than model-training data.
Expand parallel execution as review keeps up
With accepted plans, shared rules, and verification in place, begin with two or three sessions in separate worktrees. The number an engineer can review carefully sets the practical limit. Repeated, bounded tasks can become subagents with scoped tools and context.
Track first-pass CI success, PR review time, configuration eval pass rates, and time from incident to permanent eval. If queues or production regressions keep growing, reconsider task boundaries, rules, or verification.
Recording team knowledge makes it reusable. Evaluating it on real tasks establishes whether it deserves to be reused.
Part 3 of 4, based on Anthropic’s AI-Native SDLC Playbook by Louis Claxton, principally pages 19–35.