Skip to content

Commit ae15cd0

Browse files
authored
Update PRESENTATION-ambient-code-reference.md (#10)
1 parent 42f4056 commit ae15cd0

1 file changed

Lines changed: 40 additions & 52 deletions

File tree

PRESENTATION-ambient-code-reference.md

Lines changed: 40 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,20 @@
1-
# Ambient Code Reference Repository
1+
# AI-assisted Development Reference Repository
22

3-
## A Practical Guide for Principal Engineers Evaluating AI-Assisted Development
3+
## A Practical Guide for Engineers Evaluating AI-Assisted Development
44

55
---
66

77
## The Problem We're Solving
88

9-
Principal engineers face a difficult question: "My team wants to use Claude/AI coding assistants. How do we do this without creating chaos?"
9+
Engineers face a difficult question: "My team wants to use Claude/AI coding assistants. How do we do this without creating chaos?"
1010

1111
Current approaches often fail:
1212

1313
- **Ad-hoc adoption**: Every engineer uses AI differently, inconsistent results
1414
- **Heavy-handed policies**: Ban it or over-regulate, lose competitive advantage
1515
- **Vendor lock-in fears**: What if we invest in patterns that don't transfer?
1616

17-
This reference repository provides battle-tested patterns you can adopt incrementally.
18-
19-
---
20-
21-
## What This Repository Is
22-
23-
A **documentation-only GitHub template** demonstrating AI-assisted development patterns.
24-
25-
**Key Design Principle**: Standalone patterns approach - adopt what you need, skip what you don't. No prescribed sequence.
26-
27-
**This is NOT**:
28-
29-
- A working application (see demo-fastapi for that)
30-
- A vendor-specific solution
31-
- An all-or-nothing framework
32-
33-
**This IS**:
17+
This reference repository provides useful patterns you can review / adopt incrementally:
3418

3519
- Patterns extracted from production use
3620
- Copy-paste ready configurations
@@ -43,11 +27,15 @@ A **documentation-only GitHub template** demonstrating AI-assisted development p
4327
### What Is It?
4428

4529
A pre-configured AI agent definition that knows how to work with your codebase safely and consistently.
30+
The idea behind a CBA is to use an agent to eventually proxy 100% of the interaction with a codebase through this agent.
31+
32+
**cba = codebase system prompt**
4633

4734
### The Problem It Solves
4835

4936
Without guidance, AI assistants:
5037

38+
- Don't behave like a co-worker
5139
- Make inconsistent style choices
5240
- Don't know your testing conventions
5341
- Miss security requirements
@@ -64,14 +52,14 @@ The agent definition lives in `.claude/agents/codebase-agent.md` and includes:
6452

6553
### CBA Workflow Example
6654

67-
When CBA receives an issue to fix:
55+
When CBA receives an issue to fix (e.g. a github comment "@cba fix this":
6856

6957
1. Read issue description and acceptance criteria
7058
2. Review relevant code in context files
7159
3. Create implementation plan
7260
4. Show plan to user for approval
7361
5. Implement changes following project standards
74-
6. Run linters (black, isort, ruff)
62+
6. Run any other pre-flight checks, such as linters
7563
7. Run tests (pytest)
7664
8. Create commit with clear message
7765
9. Push and create PR with detailed description
@@ -83,7 +71,7 @@ When CBA receives an issue to fix:
8371

8472
Most teams start at Level 1 and graduate to Level 2 after building trust.
8573

86-
### Why This Matters for Principal Engineers
74+
### Why This Matters
8775

8876
- **Consistency**: Every AI-assisted change follows the same process
8977
- **Auditability**: Clear trail of what the agent did and why
@@ -114,15 +102,22 @@ Context is organized into focused modules in `.claude/context/`:
114102
**security-standards.md** - Input validation, sanitization, secrets management
115103
**testing-patterns.md** - Unit, integration, E2E test structures and conventions
116104

105+
Codebase owners generate these files programmatically. Things like ADRs or hand-tuned context could be used here.
106+
What's important is that your team has collected and agrees upon the context since the idea is it will be shared.
107+
117108
### Loading Context On-Demand
118109

119-
Instead of loading everything, you load what's relevant:
110+
Instead of loading everything, you load what's relevant.
120111

121112
"Load the security-standards context and help me review this authentication PR"
122113

123114
"Load the architecture context and help me add a new endpoint"
124115

125-
### Memory System Benefits for Principal Engineers
116+
For relation between elements, load these files into e.g. the local Anthropic Memory MCP server
117+
118+
"load .claude/context into my local mcp server and add this instruction to claude.md"
119+
120+
### Memory System Benefits
126121

127122
- **Token efficiency**: Only load relevant context
128123
- **Maintainability**: Update one context file, all sessions benefit
@@ -136,8 +131,9 @@ Instead of loading everything, you load what's relevant:
136131
### Issue-to-PR Overview
137132

138133
A pattern where well-defined GitHub issues can be automatically converted into pull requests by the CBA.
134+
Example: https://github.com/ambient-code/agentready/pull/242
139135

140-
### The Routine Fix Overhead Problem
136+
### Routine Fix Overhead
141137

142138
Routine fixes (linting, formatting, simple bugs) take disproportionate time:
143139

@@ -168,9 +164,9 @@ For a 2-minute fix, the overhead is 10+ minutes.
168164
- Tests pass
169165
```
170166

171-
2. Add label: `cba:auto-fix`
167+
2. Add label: `cba:auto-fix` or tag @cba on a comment (not the initial comment - github app restriction)
172168

173-
3. CBA picks up the issue, creates a PR
169+
3. CBA picks up the issue, self-review and reflection occurs, then creates a PR
174170

175171
4. Human reviews and merges
176172

@@ -195,11 +191,11 @@ For a 2-minute fix, the overhead is 10+ minutes.
195191
- Security-sensitive code
196192
- Architecture changes
197193

198-
### Issue-to-PR Benefits for Principal Engineers
194+
### Issue-to-PR Benefits
199195

200-
- **10x productivity** for routine tasks
196+
- **Automation** for routine tasks helps engineers scale
201197
- **Democratized automation**: Team members without Claude access can trigger fixes
202-
- **Consistent quality**: Every auto-fix follows the same process
198+
- **Consistent quality**: Every auto-fix follows the same process with self-review and reflection.
203199
- **Audit trail**: Every change is tracked via GitHub
204200

205201
**Note**: Issue-to-PR is one of four GHA automation patterns. See Feature 9 for the complete set including PR Auto-Review, Dependabot Auto-Merge, and Stale Issue Management.
@@ -212,6 +208,8 @@ For a 2-minute fix, the overhead is 10+ minutes.
212208

213209
Reference implementations for organizing code in a way that AI assistants can reason about effectively.
214210

211+
See [AgentReady](https://github.com/ambient-code/agentready) for tooling to check and validate your codebase's readiness for agentic development.
212+
215213
### The Spaghetti Code Problem
216214

217215
AI assistants struggle with:
@@ -220,7 +218,7 @@ AI assistants struggle with:
220218
- Mixed concerns (business logic in HTTP handlers)
221219
- Implicit dependencies (global state everywhere)
222220

223-
### The Four-Layer Pattern
221+
### The Four-Layer Pattern - used in the [FastAPI]([https://github.com/jeremyeder/fastapi-demo](https://github.com/jeremyeder/demo-fastapi) example
224222

225223
**API Layer** (app/api/)
226224

@@ -252,7 +250,7 @@ AI assistants struggle with:
252250
Higher layers depend on lower layers, never the reverse:
253251
API -> Service -> Model -> Core
254252

255-
### Architecture Benefits for Principal Engineers
253+
### Architecture Benefits
256254

257255
- **Predictable AI outputs**: When structure is clear, AI makes better decisions
258256
- **Easier testing**: Each layer is testable in isolation
@@ -261,7 +259,7 @@ API -> Service -> Model -> Core
261259

262260
---
263261

264-
## Feature 5: Security Patterns (Light Touch)
262+
## Feature 5: Security Patterns (Light Touch - not comprehensive)
265263

266264
### Security Patterns Overview
267265

@@ -302,7 +300,7 @@ Most security bugs come from:
302300
- No complex encryption for non-sensitive data
303301
- No authentication framework in the reference (separate concern)
304302

305-
### Security Benefits for Principal Engineers
303+
### Security Benefits
306304

307305
- **Practical security**: Focus on actual attack vectors
308306
- **Maintainable**: Simple patterns are followed consistently
@@ -344,7 +342,7 @@ A test pyramid approach with clear responsibilities for each level.
344342
- Focus on critical paths
345343
- Don't chase 100% (diminishing returns)
346344

347-
### Testing Benefits for Principal Engineers
345+
### Testing Benefits
348346

349347
- **Fast feedback**: Unit tests run in seconds
350348
- **Confidence**: Integration tests catch API contract issues
@@ -357,7 +355,7 @@ A test pyramid approach with clear responsibilities for each level.
357355

358356
### Documentation CI Overview
359357

360-
GitHub Actions workflows that validate documentation quality automatically.
358+
GitHub Actions workflows that validate documentation quality automatically. Not an AI specific capability - but it leverages AI now.
361359

362360
### Why Documentation CI?
363361

@@ -386,7 +384,7 @@ Documentation is code. Bad docs:
386384
- No broken internal links
387385
- No dead external references
388386

389-
### Documentation CI Benefits for Principal Engineers
387+
### Documentation CI Benefits
390388

391389
- **Docs stay current**: CI catches drift
392390
- **Quality floor**: No more "works on my machine" diagrams
@@ -474,9 +472,9 @@ If you found and fixed issues, briefly note: "Self-review: Fixed [issue]"
474472
| Simple lookups | ❌ No | Overhead not worth it |
475473
| Exploratory chat | ❌ No | Low stakes, fast iteration preferred |
476474

477-
**Rule of thumb**: Self-review when the output will be acted upon or when mistakes are costly.
475+
**Note**: Self-review has a monetary cost associated with it. Use your judgement. This is a common pattern though.
478476

479-
### Self-Review Benefits for Principal Engineers
477+
### Self-Review Benefits
480478

481479
- **Higher quality first attempts**: Users rarely say "you missed X"
482480
- **Reduced iteration cycles**: First submission is usually accepted
@@ -551,7 +549,7 @@ Each pattern has explicit safety gates:
551549
| Dependabot Auto-Merge | Patch versions only, CI must pass |
552550
| Stale Issues | Exempt labels, 7-day warning period |
553551

554-
### GHA Workflow Benefits for Principal Engineers
552+
### GHA Workflow Benefits
555553

556554
- **Reduced toil**: Routine work happens automatically
557555
- **Consistent process**: Every PR gets the same review treatment
@@ -643,7 +641,7 @@ cat .claude/context/architecture.md
643641
cat docs/quickstart.md
644642

645643
# Copy to your project
646-
cp -r .claude /path/to/your/project/
644+
#commented out on purpose cp -r .claude /path/to/your/project/
647645
cd /path/to/your/project/.claude/agents/
648646
# Edit codebase-agent.md for your stack
649647
```
@@ -670,20 +668,10 @@ The Ambient Code Reference Repository provides:
670668

671669
**Start small, adopt incrementally, measure results.**
672670

673-
The goal isn't to replace engineers - it's to amplify them.
674-
675671
---
676672

677673
## Resources
678674

679675
- Reference Repository: <https://github.com/jeremyeder/reference>
680676
- Working Demo: <https://github.com/jeremyeder/demo-fastapi>
681677
- Claude Documentation: <https://docs.anthropic.com/claude/docs>
682-
683-
---
684-
685-
## About
686-
687-
Created by Jeremy Eder, Distinguished Engineer at Red Hat AI Engineering.
688-
689-
"Stable, Secure, Performant and Boring" - the goal is to make AI assistance invisible through excellence.

0 commit comments

Comments
 (0)