Automatic Attestation Patterns
Learn when and how to automatically create attestations to build a verifiable audit trail of agent work.When to Attest
High-Value Triggers
These events should always trigger an attestation:| Trigger | Why It Matters |
|---|---|
| Git push | Permanent record of code changes |
| Deployment | Proof of what was deployed and when |
| Database migrations | Critical operations that affect data |
| Security changes | Auth, permissions, encryption modifications |
| API changes | Breaking changes, new endpoints |
Threshold-Based Triggers
Create attestations when work crosses these thresholds:- 3+ files modified - Significant change scope
- 100+ lines changed - Substantial code modification
- New dependencies added - Supply chain changes
- Configuration changes - Environment, secrets, settings
Session Milestones
Attest at natural breakpoints:- Feature complete - When a requested feature is done
- Bug fixed - After resolving an issue
- Refactor complete - After code restructuring
- Review complete - After code review analysis
CLAUDE.md Integration
Add this to your project’sCLAUDE.md:
Pattern: Git Hook Attestation
Automatically attest after every push by tracking git operations:Pattern: Deploy Attestation
Create deployment receipts:Pattern: Code Review Attestation
Document review findings:Pattern: Multi-Agent Handoff
When work transfers between agents:Conditional Attestation Logic
Add smart triggers to CLAUDE.md:Verification Workflow
Always verify before trusting previous work:Next Steps
- Subagent Integration - Attestations with Claude Code subagents
- CI/CD Integration - Attestations in automated pipelines
- API Reference - Full attestation API documentation