# Building an AI Agent That Debugs Your Tests

## The Series

1.[**Why I Built an AI Agent to Debug My Playwright Tests**](./part-1-why-i-built-an-ai-agent-to-debug-my-playwright-tests): The problem with manual trace debugging at scale, the first prototype, and the "200 ≠ success" breakthrough that changed everything.

2.[**Teaching an AI Agent to Reason — Skills, Phases & Dead-End Triggers**](./part-2-teaching-an-ai-agent-to-reason-skills-phases-dead-end-triggers): Why unconstrained LLMs give bad diagnoses, the 7-phase structured reasoning chain, and pre-programmed guardrails that prevent common misdiagnoses.

3.[**Securing an AI Agent Against Its Own Input**](./part-3-securing-an-ai-agent-against-its-own-input) The prompt injection threat model, defense-in-depth with four layers, and why boundary markers beat content deletion.

4.[**Building Evals**](./part-4-building-evals-how-do-you-know-your-agent-is-getting-smarter) — Measuring agent quality, regression detection, and the feedback loop
