< Back to articles

AI agent output quality is not a given: five layers and the workflows that hold it

AI agent output quality is not a given: five layers and the workflows that hold it

The model determines the quality of an AI agent's output less than you'd think. Rostislav Babáček showed which layers a team builds itself and how to turn every frustration with the agent into a lasting improvement of the system instead of another manual code fix. This article is based on his talk at AI pivko in September 2026, an internal meetup where Ackee developers share how they actually work with AI agents.

📋 TL;DR

  • The quality of an AI agent's output comes from five layers: the model, the built-in harness, project setup, the assignment and the developer's skills. The tool supplies the first two, and the team builds the other three.
  • Based on what the community reports, the model and harness make up at most roughly 20% of the result. The rest is the team's work, which is why this is agentic engineering, not vibe coding.
  • Small components have a big effect: the Tell, Don't Ask principle in the rules cleaned business logic out of the view, a glossary unified naming, and an ADR explained to the agent why an odd condition in the code is there on purpose.
  • Components alone aren't enough. Workflows (orchestration skills) keep the steps in the right order, and with them the agent's discipline, and one prompt replaces five.
  • The analysis phase is the most important: the grill-me step makes the agent ask questions and confront the assignment with the codebase, and grill-with-docs adds the glossary, ADRs and API specifications.
  • A multi-phase plan split into vertical slices deals with context rot and guarantees the app builds after every phase. A commit per phase then means a cheap revert.
  • The implementation loop TDD → deslop → adversarial review → verify → commit runs AFK, and every failed step returns feedback to the orchestrator.
  • The main lesson: don't fix the output, fix the system. What you find in code review belongs in the rules.

😤 What developers kept saying: frustration as a starting point

When Ackee started rolling out AI in development, there was a lot of swearing at Claude in the offices. It didn't understand the assignment, so the whole implementation was useless. It stuffed business logic into the view. It behaved nondeterministically: in the morning it forgot to run the tests, and in the afternoon it ran the tests but forgot the lint.

Quotes of developers' frustrations with the AI agent, such as a misunderstood assignment or a forgotten lint

Rostislav Babáček, who is in charge of agentic development at Ackee, wrote these remarks down and looked for a systemic fix for each one: a rule, a skill or a step in a workflow. That gives the main idea of the whole approach: output quality and efficiency aren't a given, but you can raise them deliberately.

🧱 Five layers of output quality: the model and harness are only the start

Babáček splits the factors that determine the quality of an AI agent's output into five layers:

  1. Model / LLM: reasoning, coding ability, instruction following, working with long context.
  2. Built-in harness / runtime: the system prompt, the agent loop, tool execution, built-in skills, context and session management, the permission system.
  3. Project setup: CLAUDE.md, custom skills, MCP servers, hooks, subagents, project tools and knowledge, an agent-friendly codebase and above all a feedback loop.
  4. Assignment / specification: intent, scope, constraints, acceptance criteria, examples, a PRD or spec, a plan.
  5. Developer skills: context engineering, task decomposition, orchestration, steering the agent, decision-making in human-in-the-loop steps, understanding how the model behaves.
Five layers that shape the quality of AI agent output: model, harness, project setup, assignment and operator skills

The tool supplies the first two layers, whether it's Claude Code, Codex, Cursor or Copilot. They're hard to modify. You'd have to reach for an open-source harness or build your own solution on the Agent SDK. That takes expertise in LLMs and harness building, and for developers who mainly want to build apps, Babáček says it makes no sense.

The other three layers, though, the team builds itself, and it can lean on the hard skills developers already used before. At developer meetups, Babáček says, people repeatedly say the model and harness make up at most roughly 20% of the quality of the result, and the other layers do most of it. That's his observation from the community, not a measured number, but the direction matches what Ackee sees on its own projects. That's why Ackee talks about agentic engineering rather than vibe coding: it builds a repeatable system, not one-off prompts.

💡
Quality first, speed comes later

Ackee delivers client apps, so it can't afford to "vibe code" and wreck a project. Output quality therefore takes priority over a speed multiplier. Speed arrives on its own once the agent stops generating code that then takes a week to fix.

The fifth layer, developer skills, is the reason Ackee introduced proficiency levels, which everyone went through from zero. They answer questions like "do I have to clear the context window in a session?" (yes, you do) or "can I replace the linter with a skill?" (no: deterministic code-checking tools should stay deterministic).


🧩 Project setup: three small things that improved the output

At Ackee, project setup consists of several components: CLAUDE.md as the project's entry context, .claude/rules with hard rules for code, project context (glossary, ADRs, API specifications, the DB schema, Figma), skills, hooks and MCP servers, established workflows, and GitLab review rules as the single source of truth for CI.

Project setup components: CLAUDE.md, rules with the Tell Don't Ask principle, and project context with a glossary and ADRs

Babáček showed three concrete cases where a small change to the setup noticeably improved the result:

  • Tell, Don't Ask against business logic in the view. On one project, a lot of business logic ended up in the view. A colleague added the Tell, Don't Ask principle to the rules (associated with Andy Hunt and Dave Thomas, the authors of The Pragmatic Programmer, and described among others by Martin Fowler), together with an example. The problem disappeared.
  • A glossary against invented naming. Claude used to name functions and classes however it came to mind. The project glossary now tells it, for each term, which of several synonyms is the main one, and the agent sticks to it.
  • An ADR against deleting "unnecessary" logic. On the streaming app, BI came up with a specific metric. Claude repeatedly claimed that the condition that calculates it was unnecessary and should go. What helped was adding an architecture decision record (ADR), which the agent loads when working with the given module. Now it knows the condition is there on purpose.

These are small things, but that's exactly what agentic engineering is about: for each frustration, find the component that fixes it systemically.

🔁 Workflows: how to get the agent to keep discipline

Components alone aren't enough, they have to fit into a process. Babáček often heard questions like "in what order should I run these skills?" or "when do I call build and when commit?" Running skills by hand also slowed people down: a commit skill takes, say, a minute, and when a developer calls it manually between chunks of implementation, that's inefficient.

The answer is workflows: a plugin with an orchestration skill that runs the other skills in the right order. It brings two things:

  • Discipline. The agent doesn't skip a step or swap it with another, because the workflow sets the order.
  • Efficiency. One prompt instead of five. The agent runs 20–30 minutes AFK, and the developer doesn't have to nudge it every five minutes.
The feature flow and bug fix flow as workflows that run skills in the right order

Ackee now works with two main flows: the feature flow (analysis, implementation and finalization phases) and the bug fix flow (capturing the issue, triage, fix). What the analysis phase can look like on a concrete project is shown in the article on the PRD flow. The bug fix flow is covered in the article on autonomous bug fixing.

⚠️
The same skill on two projects is a warning sign

It happens that project A gets a build and test skill and someone on project B writes it again. Before you create a new plugin in a project marketplace, consider whether it belongs in the shared marketplace. Otherwise the team does duplicate work and moves slower.

Book a consultation


🔍 The analysis phase: grill-me makes the agent ask questions

Babáček considers the analysis phase the most important of the whole process. In his view, the assignment for the agent should have the quality you would need yourself if you came to an unfamiliar project with no context and had to deliver a task without mistakes. The agent won't have that context on its own, so you have to supply it, along with the acceptance criteria.

The analysis phase is started by the /start-feature command with a link to the ticket, and it has four steps: fetch-ticket (runs AFK), interview-me, meaning the grilling (human in the loop), to-tech-spec (AFK) and to-plan. The output is the files spec.md and plan.md.

Ackee first used plan mode: Claude did an exploration and created a plan. But it often turned out that it hadn't understood the assignment. It loaded the ticket but didn't see all the connections and had no chance to ask questions or confront the assignment with the codebase. So a step inspired by Matt Pocock's grill-me skill was added to the process. The agent asks questions and keeps comparing the assignment with the code, so holes in the assignment are gradually exposed and the resulting solution is of much higher quality. This step always runs with a human, and Ackee doesn't want to automate it.

Then a client used two different terms for one thing in an assignment, and Claude got confused again. So the grilling was extended into grill-with-docs, which loads the project context during the questioning: the glossary, architecture decisions, API specifications and other documentation.

🍰 A multi-phase plan and vertical slices against context rot

With a good assignment, another problem appeared. The agent started coding and suddenly veered off the plan: it rummaged through files that weren't in the plan at all, or did completely different tasks. The cause was an overloaded context and context rot: as the context grows, the model stops following instructions reliably.

The answer is a custom to-plan skill that creates a multi-phase plan. It chops the implementation into smaller phases, so the agent doesn't end up in an overloaded context where it stops keeping discipline.

The to-plan step: a multi-phase plan where one phase corresponds to one vertical slice

Then came another lesson. On the streaming app, Babáček had three of five phases done and wanted to manually try content downloading, which the agent can't test for him. But the app wouldn't build, because the first phase had started on networking and the code couldn't run. So the plan now works with vertical slices (a related concept, tracer bullets, is described by Hunt and Thomas in The Pragmatic Programmer): one phase corresponds to one implementation cycle and one vertical slice of functionality, so the app can be built and tested after every phase.

💡
Vertical slices aren't right for everything

For a migration within a single architecture layer, vertical slices aren't ideal. For mobile apps, though, they're great: you don't end up with an app that won't run at some phase.

The plan and spec are now also reviewed automatically: after the plan is created, a subagent runs a review, and any feedback is worked into the plan right away.


⚙️ Implementation: TDD, deslop and adversarial review in a feedback loop

Even a multi-phase plan didn't stop the agent from sometimes forgetting to run lint or snapshot tests. CLAUDE.md said it should run the build and test skill, but the process for it was missing. That's why an implementation orchestrator for Claude Code was created (originally /do-work, then /do-work-with-subagents, internally /ack-implement). It works with the multi-phase plan and delegates work to subagents. For each phase of the plan, one cycle runs:

  1. TDD. Test-driven development is a method popularized by Kent Beck. Developers often lacked the patience for it before, but with an agent it pays off, because it steers the agent well.
  2. Deslop: cleaning up the agent's leftovers.
  3. Adversarial review: an unbiased check by subagents.
  4. Verify: build, tests, lint, snapshots. The app must always build.
  5. Commit: after every phase.
The implementation orchestrator: TDD, verify and a commit after every phase in a feedback loop

The most important part is the feedback loops. When a step fails, the result goes back to the orchestrator or the implementer, which fixes the problem, and the cycle runs again. The steps guarantee that all the validations the team defined are always used. The whole phase can run AFK, and the developer steps in only when needed.

A commit after every phase

Once, Claude worked on a big plan for an hour and then spat out a huge change all at once, without a single commit. When something looked off to Babáček, all he could do was revert everything. Now the workflow commits after every phase. Thanks to vertical slices, the app builds after every commit, so commits work as cheap reverts. The developer sees how the code accumulates and can step in early. Commit messages also record which phase is done, and the agent knows from them where to continue.

Deslop: fewer comments, fewer abstractions

The implementation was correct, but the agent left a lot of pointless comments in it. Newer models are more restrained about this, but the problem hasn't gone away. Other times it wrote 50 lines where 10 would do, created needless abstractions, or duplicated code that could have been pulled into one function.

That's why the deslop skill was created (Cursor, for example, has a similarly named skill). It goes through the diff and removes pointless comments. On a feature branch, simplify is added to it to deal with needless nesting, abstractions and duplication. The advantage is that the skill can be adjusted continuously as models and their bad habits change.

Adversarial review: two subagents without bias

One last problem: in some cases the agent didn't follow .claude/rules. The rules are loaded at the start of implementation, but during it the agent may, for various reasons, not treat them as a priority. A review step helped, in which subagents don't get the implementer's context, only the git diff. So they don't have its bias.

Adversarial review slide: two subagents without the implementer's context check the rules and the plan phase

One subagent checks compliance with the rules, and the other verifies that the implementer did everything the plan prescribed for the given phase. Since this step was introduced, no violation of the codebase rules has made it into a merge request for Babáček.

⚠️
Aren't we paying for tokens twice?

An objection comes up: couldn't verbosity be handled already in the planning phase, or enforced through the rules? With deslop and simplify you do pay for tokens twice: once to add the code and again to remove it. Babáček tried it in the rules, in CLAUDE.md and in the assignment, and the agent didn't follow it reliably. Post-processing is so far the only option you can rely on. For normally sized implementations, he says, the cost of tokens doesn't play a big role anyway. It may improve with future models, so it's worth continuing to try.


🔧 Don't fix the output, fix the system

So what does it take to get better output:

  • don't rely only on the model and the built-in agent harness,
  • be part of building the harness and workflows,
  • give feedback on the prepared harness (at Ackee, a feedback skill is used for that),
  • share your experience,
  • keep learning: without knowing how context, plugins or progressive disclosure in skills work, the system won't move anywhere.
Talk summary: don't rely only on the model, share experience, fix the system instead of the output

The most important thing, though, is what you do with your own frustration with the agent.

“Your anger is the most valuable knowledge. The agent doesn't know it's doing something wrong and that it should improve. So let's always turn that anger into an improvement of the workflow, not into cursing in the office.”

Rostislav Babáček, Team Leader and Lead Implementer of Agentic Development at Ackee

A practical rule follows: when code review finds a mistake, fixing it isn't enough. It has to make it into the rules, otherwise the agent makes it again and the team keeps fixing the output instead of the system forever. Good ideas should also be shared. One colleague, for example, had a step at the end of his own version of the implementation skill that writes a report, and it is now making its way into the shared workflow.

It also pays to unify the naming of workflows across projects. When the implementation flow is called the same everywhere (for example /ack-implement), a developer on a new project immediately knows what each command does.

Frequently asked questions

Vibe coding relies on the model generating something usable from a one-off prompt. Agentic engineering builds a repeatable system around the agent: project setup, rules, workflows, a good assignment and feedback loops. It relies on the team's engineering knowledge.
Yes. As the context grows, the model stops following instructions reliably (context rot). That's why Ackee splits implementation into smaller phases and delegates heavy work to subagents with a clean context.
No. Lint and other deterministic checks should stay deterministic. A skill can run them and react to their result, but it shouldn't replace them.
It's a step where, instead of planning right away, the agent asks questions about the assignment and confronts it with the codebase until all branches of the problem are clear. The idea was popularized by Matt Pocock with his open-source skill. Ackee extended it with loading the glossary, ADRs and API specifications.
A commit per phase works as a cheap revert. Thanks to vertical slices, the app builds after every commit, so you can step back at any time and keep track of what the agent is doing. Commit messages also record which phases are done.

🎯 Key takeaways

The model and harness that come with the tool are only the foundation. The quality of an AI agent's output depends mainly on what the team builds on top of them: a setup with rules and context, a good assignment, workflows with feedback loops, and developers who know how to steer the agent.

Most of the improvements aren't big projects but small things: one principle in the rules, a glossary, an ADR, a commit per phase, a review subagent without bias. Each came from a concrete frustration, and each brought a lasting improvement instead of a one-off fix.

And finally: AI is a multiplier of knowledge, not a replacement for it. You can read more about how Ackee approaches agentic development as a whole in the article on the Agentic Development Lifecycle.

AI pivko mini-series: PRD flow: one spec for iOS and Android · Autonomous bug fixing: from ticket to merge request

Subscribe to the newsletter

More notes like this from Ackee are in our newsletter. Subscribe and the next one lands straight in your inbox.

Rostislav Babáček
Rostislav Babáček
Team Leader, Indigo Mobile Development team

Are you interested in working together? Let’s discuss it in person!