Mastering Agentic Engineering: A Practical Guide to AI-Assisted Code Development
Overview
In the rapidly evolving landscape of software development, using AI to write code has shifted from experimental to essential. Chris Parsons, a seasoned engineer, has updated his guide on this topic, providing concrete insights that resonate with best practices. This tutorial distills those insights into a practical guide for developers who want to move beyond "vibe coding"—where you ignore the code—to agentic engineering, where you harness AI as a collaborator while maintaining control through verification and guardrails.

The core philosophy is simple: the game is no longer about how fast you can build, but how fast you can tell whether the code is right. This guide will walk you through setting up your environment, writing better prompts, building verification harnesses, and training AI to produce correct code consistently. By the end, you'll have a repeatable system for AI-assisted development that scales with your team.
Prerequisites
Before diving into the step-by-step process, ensure you have:
- Basic proficiency in at least one programming language (e.g., Python, JavaScript, TypeScript)
- Familiarity with version control (Git) and continuous integration (CI) pipelines
- Access to an AI coding tool such as Claude Code or Codex CLI (both recommended by Parsons)
- A project repository with a test suite (unit tests, integration tests) or willingness to set one up
- Understanding of static analysis tools (linters, type checkers like mypy or TypeScript compiler)
Step-by-Step Instructions
Step 1: Choose Your AI Coding Agent
Parsons highlights two tools: Claude Code and Codex CLI. They differ in their internal harnesses—the scaffolding that manages prompts, context, and verification. Both allow you to define a "inner harness" that enforces constraints before the AI acts.
Installation example (for Claude Code):
npm install -g @anthropic/claude-code
claude code init --project my-project
Key configuration: Set up a .claude directory with a rules.yaml file to define project-specific guidelines, such as code style, common libraries, and forbidden patterns.
Step 2: Define Your Verification Strategy
Verification is the heart of agentic engineering. Instead of manually reading every line, you build automated gates: tests, type checks, linters, and integration tests. Start by writing a CI pipeline:
- Static analysis: Lint and type check on every commit.
- Unit tests: Cover individual functions.
- Integration tests: Validate that changes work with real systems.
- End-to-end tests (optional): For critical paths.
Example GitHub Actions workflow fragment:
name: Verify
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install
- run: npm run lint
- run: npm run type-check
- run: npm test
Step 3: Write Prompts That Train the AI
Rather than generic requests like "add a login feature," craft prompts that include:
- Context: the specific file, function, or module to modify.
- Constraints: use existing patterns, stay under a complexity limit, avoid deprecated APIs.
- Verification criteria: what tests must pass after the change.
Example prompt:
In file src/auth/login.ts, add a function that validates email format before calling the existing authenticateUser function. Use the validator utility already imported. After writing, update the tests in tests/auth/login.test.ts and ensure all existing tests still pass. Do not introduce new dependencies.
Step 4: Build an Inner Harness
The inner harness is a set of local tools that run before the AI sends code to you. Use hooks or scripts that execute automatically:
- Pre-commit hook: runs linter and type checker.
- Agent hook: before the AI outputs a diff, it runs a validation script (e.g., a sandboxed test).
- Review surface: a dashboard showing diff, test results, and coverage change.
Example hook configuration (using lefthook):
pre-commit:
commands:
lint:
run: npx eslint {staged_files}
type-check:
run: npx tsc --noEmit
Step 5: Keep Changes Small and Atomic
Parsons emphasizes: keep changes small. Each AI interaction should modify a single concern. Use feature flags or small diffs that are easy to reverse. This lowers the cost of verification and speeds up feedback loops.
Workflow:
- Describe the change in one sentence.
- Ask the AI to produce a diff for that change only.
- Run your verification gates locally.
- If gates pass, commit; if not, iterate with the AI.
Step 6: Train the AI Incrementally
The programmer’s role is to train the AI to write correct code the first time. Over time, feed it with:
- Examples of good diffs from past sessions.
- Explicit rejections when it makes mistakes, along with reasoning.
- Documented patterns from your codebase.
This compounds: the more you shape the harness, the fewer manual reviews you need.
Common Mistakes
Mistake 1: Falling into Vibe Coding
Vibe coding is when you accept AI output without understanding or verifying it. This leads to subtle bugs and technical debt. Always verify, even if it's an automated check.
Mistake 2: Over-Reliance on Manual Review
Reading every line of AI-generated code doesn't scale. Instead, invest in automated verification gates. As Parsons says, "build better review surfaces, not better prompts."
Mistake 3: Ignoring the Harness
The inner harness is not optional. Without it, the AI can introduce regressions or violate architectural constraints. Configure lint rules, type checks, and integration tests.
Mistake 4: Not Training the AI
If you treat the AI as a black box, it will repeat mistakes. Provide feedback, update your prompts, and curate a knowledge base of effective patterns.
Mistake 5: Large, Unitary Prompts
Asking the AI to "build the entire module" leads to monolithic changes that are hard to verify. Break work into small, testable increments.
Summary
Agentic engineering transforms AI from a novelty into a reliable coding partner. The key is shifting focus from speed of generation to speed of verification. Choose tools like Claude Code or Codex CLI, build automated checks into your workflow, keep changes small, and actively train the AI through structured prompts and feedback. By investing in your harness, you turn approval of diffs into a compounding skill that elevates your entire team. Remember: the goal is not just to produce code, but to know it's right—fast.
For further exploration, see the concept of Harness Engineering discussed by Birgitta Böckeler (original article and video discussion with Chris Ford). The role of computational sensors (static analysis, tests) is critical in ensuring AI outputs are safe and correct.