# Lada Kesseler: I Trust AI Tests Less Than AI Code

## Executive summary

Lada Kesseler discusses advanced agentic workflows, arguing that achieving quality with AI agents requires structured 'loop engineering' rather than expecting perfect first attempts. She emphasizes giving agents explicit missions to disagree with and recommends techniques like iterative refinement (the 'centrifuge') and using specialized skills (like TDD) via front matter activation. For build engineers, the core message is shifting from monolithic code generation to modular, verifiable processes that manage complexity through deterministic triggers and layered testing.

## Key takeaways

- The Centrifuge Principle: Quality requires iterative refinement; do not expect AI-generated output to be perfect on the first try. The process involves taking one step, committing it to a file, reading it back, identifying flaws, and repeating the loop until satisfactory (00:13:09).
- Agent Ground Rules are for Agents, Not Humans: The 'ground rules' or system prompts must give the model a mission to disagree with you (e.g., 'Don't try to please me') rather than just listing best practices. The description field in an agent skill is intended for machine activation, not human readability (00:10:02).
- Sketch Prototypes with Markdown: For early-stage architecture or complex problem spaces, replace code with a markdown file and an agent. This allows the user to experience the workflow's user experience without committing to production code, serving as a fast, low-fidelity prototype (00:20:43).
- Deterministic Verification is Key: Use 'verifiers' or deterministic triggers that check for specific standards (e.g., long methods, adherence to style guides) across various files, providing far better results than a single general code review prompt (00:35:29).

## Technical details

- Refinement Loops: The 'centrifuge' process involves iterative refinement where the agent drafts content/code, which is then read back and corrected multiple times by human input to achieve quality (00:13:09).
- Agent Skill Activation: Skills should be activated using specific front matter within the skill definition, allowing the agent to determine when to use them automatically, rather than relying on generic context stuffing (00:25:48).
- Testing Strategy (TDD/BDD): For agents, TDD tests serve as a cross-check against reality. For high-level system validation, BDD (Behavior Driven Development) level tests are preferred over highly detailed unit tests like Cucumber to maintain scannability and focus on domain language (00:38:21).
- Architecture Planning: When tackling complex systems, prioritize understanding the problem space before jumping into solutions. Consider using techniques like event sourcing or modeling processes via diagrams to manage complexity and prevent over-commitment to a single file structure (00:39:26).

## Practical implications

- Adopt an iterative, loop-based approach to AI development; view the process as refinement rather than a single output.
- Structure agent skills with explicit activation triggers (front matter) instead of relying on general context stuffing.
- For architectural planning, use markdown/agent prototypes to simulate user experience before writing production code.
- Implement layered testing: TDD for code quality and BDD for high-level domain validation.

## Topics

Agentic Workflow, Software Architecture, Testing (TDD/BDD), CI/CD Principles, Prompt Engineering, Tessl, Claude.md (Ground Rules)

Source: https://www.youtube.com/watch?v=luf6zSOCKH4
