Each pattern below is standalone. Pick one, follow its quickstart, done.
How to configure AI agents for consistent, safe, high-quality assistance.
| Pattern | What It Does | Time |
|---|---|---|
| Codebase Agent (CBA) | Define AI behavior, capabilities, and guardrails | 30 min |
| Self-Review Reflection | Agent reviews own work before presenting | 5 min |
| Autonomous Quality Enforcement | Agent runs linters/tests automatically | 15 min |
| Multi-Agent Code Review | Multiple specialized agents review in parallel | 1 hour |
Start here if: AI gives inconsistent answers, misses obvious bugs, or ignores conventions.
GitHub Actions workflows that handle routine work automatically.
| Pattern | Trigger | Time |
|---|---|---|
| Issue-to-PR Automation | Issue labeled cba |
30 min |
| PR Auto-Review | Pull request opened | 15 min |
| Dependabot Auto-Merge | Dependabot PR (patch versions) | 10 min |
| Stale Issue Management | Weekly schedule | 10 min |
Start here if: PRs take forever, dependency updates pile up, or stale issues accumulate.
| Pattern | What It Does | Time |
|---|---|---|
| Security Patterns | Input validation at boundaries, sanitization | 30 min |
| Testing Patterns | Unit, integration, E2E test pyramid | 1 hour |
The best way to understand CBA value is the ADR before/after demo.
Without CBA (Vanilla AI):
- Implements immediately
- Ignores project decisions
- Creates technical debt
- Future AI interactions still confused
With CBA:
- Reads CLAUDE.md and ADRs
- Identifies conflict with existing decision
- Asks before proceeding
- Proposes ADR change for approval
- Updates all references (ADR index, CLAUDE.md)
- Only then implements
- Self-reviews before presenting
flowchart LR
A[Request] --> B[Load Context]
B --> C{Conflicts?}
C -->|Yes| D[Ask + Update ADR]
D --> E[Implement]
C -->|No| E
E --> F[Self-Review]
F --> G[PR]
See demo-fastapi for this pattern in action.
The .claude/ directory contains example configurations:
.claude/
├── agents/
│ └── codebase-agent.md # Example CBA definition
└── context/
├── architecture.md # Example architecture context
├── security-standards.md
└── testing-patterns.md
Read these to understand the format. Create your own based on your project.
- Working Demo: demo-fastapi
- Presentation: PRESENTATION-ambient-code-reference.md