A book by Lucas Albuquerque, published by DEVSMAFIA
Se você não é o modelo, você é o harness
If you are not the model, you are the harness. AI engineering in 2026, explained by building an AI Interviewer.
One project from start to finish: a site where an AI interviews a candidate by voice and gives a score at the end. Each discipline in the book becomes a real document of that project, written along with you.
The book is written in Brazilian Portuguese.
One-time payment. The PDF and the examples are ready to download right after you buy.

Intelligence lives in the model. Reliability lives in everything around it.
A language model gives different answers to the same question, is wrong in the same tone it uses when it is right, and can be manipulated by the text it receives. That is why so many AI agents work in the demo and never reach production.
The whole book comes from one rule: a requirement lives in code, never in a request to the AI. If a guarantee depends on the model obeying a prompt, it is a hope.
The chapters do not teach you to write the app's code. In 2026, the agent writes the code. You learn to write what makes that code reliable: the specification, the harness contract, the eval suite and the decision record. Every tool shown in the Na prática boxes was actually run, and the examples ship with the book, with tests.
Seven steps, read from the bottom up
Each step exists because the one below was not enough on its own. On each one, you write a piece of the AI interviewer.
- 1
Prompt engineering
The sentence you give the model. It guides behavior, but a request is not a guarantee.
In the interviewer: what the prompt asks of the interviewer, and what it can never guarantee.
- 2
Context engineering
What goes into the model's window at each step. Too much context makes answers worse, so the window has a budget.
In the interviewer: the context budget for each turn of the interview.
- 3
Spec-driven development
The specification as the source of truth, because the agent writes code well and guesses intent badly.
In the interviewer: the interview spec, with acceptance criteria in EARS.
- 4
Harness engineering
The deterministic code around the model that decides, enforces and records. Agent = Model + Harness.
In the interviewer: the harness contract, with the question count, the stop gate and the score.
- 5
Eval-driven development
Proof, with numbers, that the system works and that a change did not break it.
In the interviewer: the eval suite, with a golden set and the test of an AI that lies on every turn.
- 6
Loop engineering
The system that runs the agent without you in the middle: goal, action, check and stop.
In the interviewer: the loop spec for one turn, with the cap that ends the interview even against the AI's will.
- 7
Graph engineering
The 2026 frontier: the structure that connects many agents.
In the interviewer: what is already known about this frontier, and what is still too early to adopt.
Outside the ladder, two more documents complete the project: the threat model against prompt injection and the ADR that records the API choice.
The interview spec, in EARS
This is an excerpt from chapter 4, kept in the book's Portuguese. Each criterion has a trigger and a behavior you can test.
In the following chapters, each line becomes a harness rule and an eval case. That is how the whole book works: a concept, then the document it produces.
# VERIFICATION CRITERIA (em EARS)
- O sistema NÃO DEVE aceitar um pedido de encerramento da IA antes de registrar pelo menos 6 perguntas e 2 follow-ups VERIFICADOS.
- QUANDO a IA propõe encerrar E o mínimo de perguntas e follow-ups foi atingido, o sistema DEVE encerrar a entrevista e registrar o motivo "gate".
- ENQUANTO o mínimo não foi atingido, o sistema NÃO DEVE encerrar por pedido da IA.
- SE a entrevista atingir o número máximo de perguntas, ENTÃO o sistema DEVE encerrar (trava contra loop infinito) e registrar o motivo "max"; se o mínimo não foi atingido, a entrevista fica marcada como incompleta.
- O sistema DEVE calcular a nota final por uma função determinística sobre notas por dimensão fornecidas pela IA (cada dimensão de 1 a 5, pesos fixos que somam 1, nota final de 0 a 100), nunca aceitar uma nota final vinda da IA.
In practice, with the tools you already use
At the end of the chapters, a Na prática box takes the concept to a real tool. The commands and files it mentions are in the examples zip.
- Context
How Claude Code and Cursor decide what goes into the context window.
- Spec
GitHub Spec Kit on an interviewer task, with plan, build and validation in separate sessions.
- Harness
A Claude Code hook that blocks reading .env, and an MCP server called during the work.
- Evals
A golden set: interviews scored by a person, to measure whether the judge agrees.
- Security
An agent with read-only permission, and ids that come from the route, never from the model.
15 interview questions, answered
The last chapter is a fluency script. You read the question, answer out loud and compare with the book's answer. Chapters also end with A FRASE, a concept explained the way you would say it in an interview.
- 1
“Walk me through your system's architecture.”
- 2
“What changed in AI engineering in 2026?”
- 3
“Why is the final score computed in code and not by the AI?”
- 4
“What is a verifiable reward versus an LLM judge, and when do you use each?”
- 5
“How do you know you can trust your judge?”
- 6
“The candidate types text that goes into the judge's prompt. What prevents abuse?”
- 7
“The model calls tools in your system. What stops it from reading another candidate's interview?”
- 8
“Do you trust the isFollowUp field the model returns?”
- 9
“Explain the gate.”
- 10
“What is loop engineering and where does it show up in your app?”
- 11
“Do you know the Ralph loop?”
- 12
“How do you guarantee reproducibility?”
- 13
“Why did you pick this API and not the newer one the docs recommend?”
- 14
“Where did you start building, and why?”
- 15
“Where does your system break, and what would you do with more time?”
The book, the examples and the interview script
- The book as a PDF, in Brazilian Portuguese: 13 chapters and an appendix
- A zip with the book's examples, ready to run
- A pocket glossary, each term in one line with its origin
- A fluency script with 15 interview questions

One-time payment
R$ 97
Secure Stripe checkout, charged in BRL. Downloads appear right after payment and the link arrives by e-mail.
Questions
Is the book in English?
No. The book is written in Brazilian Portuguese. Only this page is in English.
Do I need to know how to code?
It helps, but you do not need to write code to follow the chapters. Each term is explained the first time it appears, and the glossary collects them all at the end.
What format is it in?
A PDF, plus a zip file with the examples. Both are ready to download right after payment, and the link to the download page arrives by e-mail.
Is it a subscription?
No. You pay R$ 97 once and the book is yours.
I lost the download link. What now?
Look for the purchase e-mail, which has the link. If you cannot find it, write to hi@devsmafia.com with the e-mail you used to pay.