AI-Assisted Development
AI won't replace developers. Developers who use AI will replace those who don't." — Satya Nadella (paraphrased)
The AI Developer Landscape (2024–2025)
Mental Models for AI-Assisted Development
1. The "Intern" Model — AI as Junior Developer
| Human Does | AI Does |
|---|---|
| Architecture decisions | Boilerplate, scaffolding |
| Business logic design | Test generation, refactoring |
| Code review & verification | Documentation, comments |
| Security/performance analysis | Exploratory coding, spikes |
Rule: Treat AI output like a PR from a junior dev — review, test, verify.
2. The "Exoskeleton" Model — AI as Force Multiplier
Human intent ──▶ AI expands ──▶ Human verifies ──▶ AI refines ──▶ Done
│ │ │ │
High-level Boilerplate "Does this Edge cases,
intent + tests look right?" docs, cleanup
3. The "Dialogue" Model — Iterative Collaboration
You: "Create a REST API for user management"
AI: *Generates full FastAPI app with CRUD, Pydantic models, tests*
You: "Add pagination and filtering to list endpoint"
AI: *Updates route, adds query params, updates tests*
You: "Switch to async SQLAlchemy with PostgreSQL"
AI: *Rewrites models, adds lifespan, updates deps*
You: "Add authentication with JWT"
AI: *Adds OAuth2, password hashing, dependency injection*
Effective Prompting Patterns
1. Context-Rich Prompts
❌ Bad: "Write a function to parse CSV"
✅ Good: "Write a Python function parse_csv(file_path: Path) -> list[User]
that reads a CSV with columns: id, email, name, created_at.
Handle: malformed rows (skip + log), empty files, encoding issues.
Use csv module (not pandas). Return list of User dataclasses.
Include type hints and docstring. Write pytest tests."
2. Structured Prompting Framework
| Component | Example |
|---|---|
| Role | "You are a senior Python engineer" |
| Task | "Refactor this function to use async/await" |
| Constraints | "Keep public API unchanged; max 50 lines; no external deps" |
| Context | "This runs in a high-throughput path (10k req/s)" |
| Output format | "Return only the refactored code + brief explanation" |
| Verification | "Include pytest tests for the new async behaviour" |
3. Chain-of-Thought for Complex Tasks
You: "Design a caching layer for this user service. Think step by step:
1. What are the access patterns?
2. What invalidation strategy?
3. What cache topology (local, distributed, hybrid)?
4. How to handle cache stamps/stampedes?
5. What metrics to expose?
Then implement the chosen design with tests."
Verification — The Critical Step
Never commit AI code you haven't verified.
| Verification Level | When | How |
|---|---|---|
| Syntax/Type | Always | mypy, ruff, go vet, cargo check |
| Unit Tests | Always | Run existing + AI-generated tests |
| Integration | New features | Testcontainers, contract tests |
| Security | Auth, input handling | SAST, manual review |
| Performance | Hot paths | Benchmarks, profiling |
| Edge Cases | Error handling | Fuzzing, property-based tests |
Verification Checklist
A review checklist is a plain document, not code in any particular language — it applies exactly the same whichever language the AI-generated code happens to be in:
# AI Code Review Checklist
- [ ] Code compiles/passes type check
- [ ] All tests pass (existing + new)
- [ ] No hardcoded secrets/credentials
- [ ] Proper error handling (not bare except)
- [ ] Logging appropriate (not PII)
- [ ] No SQL injection / XSS vectors
- [ ] Resource cleanup (connections, files, threads)
- [ ] Timeouts on external calls
- [ ] Pagination on list endpoints
- [ ] Idempotency where needed
- [ ] Observability (logs, metrics, traces)
- [ ] Documentation updated
Common AI Failure Modes
| Failure Mode | Symptom | Mitigation |
|---|---|---|
| Hallucinated APIs | Imports that don't exist | Verify imports; run type checker |
| Outdated Patterns | Uses deprecated APIs | Specify version in prompt: "FastAPI 0.110+" |
| Security Blind Spots | Missing auth, SQL injection | Explicit security requirements in prompt |
| Over-Engineering | 200 lines for 10-line task | Constrain: "minimal, <50 lines" |
| Inconsistent Style | Mixed patterns in codebase | Provide style guide / .editorconfig |
| Missing Error Handling | Bare try/except, no logging | Require explicit error handling in prompt |
| Test Gaps | Tests pass but miss edge cases | Mutation testing; property-based tests |
Human-AI Workflow Patterns
Pattern 1: Spec → Scaffold → Implement → Verify
1. You write SPEC.md (requirements, API contracts, data models)
2. AI generates project structure + interfaces + test stubs
3. You implement core logic (AI assists per function)
4. AI generates comprehensive tests
5. You run mutation testing → fill gaps
6. AI writes documentation from code
Pattern 2: Refactor with Safety Net
1. Ensure test coverage >90% + mutation score >80%
2. Ask AI: "Refactor this to use strategy pattern"
3. Run tests → they pass
4. Run mutation tests → score maintained
5. Commit with confidence
Pattern 3: Legacy Migration
1. AI analyzes legacy codebase → produces ADR + migration plan
2. AI creates strangler fig adapter + characterization tests
3. Incrementally rewrite modules with AI pair programming
4. AI generates migration scripts + rollback procedures
5. Verify parity with production traffic shadowing
Tool-Specific Tips
GitHub Copilot (in VS Code)
| Feature | How to Use |
|---|---|
| Inline suggestions | Tab to accept, Esc to dismiss |
Chat (Ctrl+I) |
"Explain this", "Add tests", "Fix bug" |
@workspace |
Context from entire codebase |
@terminal |
Run commands, explain errors |
| Custom instructions | .github/copilot-instructions.md |
# .github/copilot-instructions.md
- Use type hints everywhere
- Prefer pytest over unittest
- Use async/await for I/O
- Follow Google-style docstrings
- No bare except clauses
- Log with structlog
// .github/copilot-instructions.md
- Use modern C++ (C++20/23)
- Prefer std::format over iostreams
- Use RAII for resource management
- Prefer std::expected over exceptions for errors
- Use clang-format with LLVM style
- Enable -Weverything -Wno-c++98-compat
// .github/copilot-instructions.md
- Use Java 21+ features (records, patterns, virtual threads)
- Prefer immutable data (records, sealed interfaces)
- Use Project Lombok sparingly
- Prefer Streams over loops
- Use JUnit 5 + AssertJ for tests
- Follow Google Java Style Guide
// .github/copilot-instructions.md
- Use C# 12+ features (primary ctors, collection expressions)
- Prefer readonly/immutable types
- Use File-scoped namespaces
- Use pattern matching extensively
- Use nullable reference types
- Follow Microsoft C# Coding Conventions
Team Adoption Guidelines
| Phase | Focus | Guardrails |
|---|---|---|
| 1. Pilot | 2–3 volunteers, low-risk code | No production AI code without review |
| 2. Expand | Team-wide, standardise prompts | Shared prompt library; approved tools list |
| 3. Integrate | CI gates for AI code | Mutation test gate; security scan |
| 4. Govern | Metrics, cost, policy | Token budgets; data privacy; model approval |
Team Prompt Library
A team's shared prompt templates are plain text, not code — the same template applies whichever language the team happens to be prompting the AI to write:
# team-prompts.md
## New Feature
> You are a senior {language} engineer. Implement {feature}
> following our conventions: {link-to-conventions}.
> Requirements: {requirements}.
> Output: implementation + tests + brief explanation.
## Refactor
> Refactor {file/function} to {pattern/goal}.
> Constraints: {preserve API, <50 lines, no new deps}.
> Run tests after each step.
## Debug
> This test fails: {error}.
> Context: {code snippet}.
> Hypothesize root cause and fix.
References
The mental models, verification levels, and workflow patterns above are treated at book length in Barbini's Process Over Magic, whose central argument is the one this page assumes throughout: an AI assistant speeds up the parts of development that were always mechanical, but the process that makes software trustworthy — specification, verification, review — has to stay the developer's, not be delegated along with the typing [1].
- Barbini, U. (2026). Process Over Magic: Beyond Vibe Coding — Faster, Smarter, and Safer Coding with AI Assistants. The Pragmatic Bookshelf.