{"id":3780,"date":"2026-10-19T10:35:59","date_gmt":"2026-10-19T09:35:59","guid":{"rendered":"https:\/\/www.smharter.com\/blog\/?p=3780"},"modified":"2026-10-19T10:36:01","modified_gmt":"2026-10-19T09:36:01","slug":"engineering-the-ai-coding-workflow-key-trade-offs","status":"publish","type":"post","link":"https:\/\/www.smharter.com\/blog\/2026\/10\/19\/engineering-the-ai-coding-workflow-key-trade-offs\/","title":{"rendered":"Engineering the AI-Coding Workflow: Key Trade-offs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When using AI to complete a coding task, the goal is to deliver high-quality code with maximum productivity and minimal cognitive fatigue. Achieving this consistently across every task requires engineering a repeatable workflow.<br><br><strong>The scarce resources to trade off include human attention\/time\/cost, cognitive fatigue, review indigestion, knowledge erosion AKA cognitive debt, internal quality and consistency, AI-induced technical debt, speed, and token costs.<\/strong><br><br>If you are less familiar with common workflows and their variations, look below at <a href=\"#typical-workflow\" data-type=\"internal\" data-id=\"#typical-workflow\">Appendix 1: A typical workflow<\/a>.<br><br>If you are less familiar with engineering your workflow and designing your loops, look below at <a href=\"#engineering-th-workflow\" data-type=\"internal\" data-id=\"#engineering-th-workflow\">Appendix 2: Engineering the workflow<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Key trade-offs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Engineering an AI workflow is a mix of designing it, balancing the various steps, and improving with the harness what the model can do well. It requires navigating the tension between maximising productivity while minimising developer cognitive fatigue.<br><br>Because no two codebases are the same, off-the-shelf workflows and frameworks rarely fit; even within the same product codebase, simple and complex tasks demand slightly different workflows.<br>And then, as <em>Giorgio Sironi <\/em>suggests, there are variables like the status of the codebase (greenfield vs brownfield), the size of the team, and niche vs mainstream tech stack. So this takes us back to the previous suggestions of engineering a custom workflow fit for your own context, proven in the field and evolved iteratively.<br><br>At its core, the workflow alternates between two distinct interaction modes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pairing<\/strong> <strong>with the AI (Inception and Review)<\/strong>: It is continuous and conversational, and dynamically responds to the learning and findings as they emerge, while preserving granular control.<br><\/li>\n\n\n\n<li><strong>Delegating to the AI (Execution)<\/strong>: It is mainly autonomous and asynchronous; information, directives and execution privileges are handed off upfront, allowing the agent to complete the task independently.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Ineffective Vs effective Pairing with the AI<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ineffective Pairing<\/strong>: When the AI presents multiple questions and points to consider simultaneously, the developer is forced to understand and respond to multiple issues in parallel without sufficient context or explanation, creating cognitive fatigue.<br><\/li>\n\n\n\n<li><strong>Effective Pairing<\/strong>: When the AI communicates clearly, presenting one issue at a time with enough context and explanations, <strong>=&gt; <\/strong><span style=\"text-decoration: underline;\">it becomes easier for the developer to understand and respond correctly with less effort and fatigue<\/span>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Ineffective Vs effective Delegating to the AI<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ineffective Delegation<\/strong>: When autonomous execution is interrupted too often to ask for clarifications, decisions to resolve architectural\/design\/implementation edge cases, answers to fill specification gaps, or requests to obtain new permissions, it leads to excessive multi-tasking, task-switching and context-switching, creating more cognitive fatigue.<br><\/li>\n\n\n\n<li><strong>Effective Delegation<\/strong>: When given enough clear upfront info and directives, the agent completes longer tasks autonomously with no, or very limited, requests made to the developer, <strong>=&gt; <\/strong><span style=\"text-decoration: underline;\">allowing the developer uninterrupted time to work on other tasks for a sustained amount of time<\/span>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Let&#8217;s explore how these trade-offs play out in the different workflow steps<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>We look now at how a good harness, including effective delegation, allows for long-running autonomous execution, reducing the time the human has to spend in the workflow, therefore freeing the <strong>developer<\/strong><\/strong>&#8216;s <strong>time and focus. We also look at how effective pairing plays a role in all this.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EXECUTION: AGENTIC CODE GENERATION<\/strong><br>A long-running autonomous execution of 2+ hours can increase productivity by freeing the developer to focus uninterrupted on other work. However, longer tasks like these increase the probability of hand-offs to the developer to resolve specification gaps, obtain missing permissions, or address architectural, design, and implementation edge cases.<br><br>Effective delegation minimises these interruptions, but cannot eliminate them entirely. Indeed, in an evolving codebase, infrastructure, architectural, and design decisions emerge in ways that cannot always be anticipated. Human intervention therefore remains essential: making the right decision can require product vision, knowledge of the technical strategy, and a holistic understanding of the technology ecosystem and codebase. When these hand-offs occur, the AI&#8217;s interaction style has a direct impact on developer cognitive fatigue. Presenting one context-rich decision at a time reduces context switching and the cognitive load.<br><br>When the harness and model get this right for larger tasks, the workflow carries those larger tasks through to the Review step.<br><br><strong>REVIEW<\/strong><br>The effort required to complete the Review step grows super-linearly with task and PR (pull request) size.<br>This means that reviewing two small tasks or PRs separately requires less effort than reviewing one larger task or PR that combines them.<br><br>As the size of the task or PR being reviewed grows, the review risks becoming rushed and superficial (LGTM!), leading to the accumulation of <em>Gen-AI-induced technical debt<\/em>. When not rushed, cognitive fatigue tends to increase, assuming that pairing with the AI is ineffective, as described earlier.<br><br>Conversely, feeding the workflow small tasks can make it easier to lose sight of the bigger picture during Review. This compounds the tendency of agents to be locally consistent and globally inconsistent. It can lead to architectural and design drift and a so-called <em>Winchester Mystery House Architecture<\/em>, unless deliberate effort is made to maintain coherence across the product codebase.<br><br><span style=\"text-decoration: underline;\">The ability to handle bigger reviews and PRs from bigger tasks enables longer autonomous Executions that free developer time and focus<\/span>.<br><br><strong>INCEPTION<\/strong><br>Analysing the requirements, specifying the solution, and planning the implementation of small tasks makes it easier to incorporate learning, findings, and changes that emerge during Execution.<br><br>Conversely, superficial analysis, specification, and planning during Inception are more likely to cause interruptions during Execution, making it less effective. A good Inception is therefore essential, as is pairing with the AI effectively to avoid cognitive fatigue during this step.<br><br>An effective Inception requires a clear goal for the task or feature, together with measurable success criteria.<br>Here, the developer plays an essential role in maintaining the bigger-picture view of the product and safeguarding the codebase&#8217;s architectural coherence.<br><br><span style=\"text-decoration: underline;\">An effective Inception reduces interruptions during Execution, enabling longer autonomous Executions <span style=\"text-decoration: underline;\">that free developer time and focus<\/span>, and also improves the quality of the learning and findings generated by the agentic self-correction loops<\/span>. These insights can also inform the developer&#8217;s subsequent iterations.<br><br>This feedback loop reflects the evolutionary software development principles documented throughout Tom Gilb&#8217;s work on EVO and Planguage, particularly his treatment of Value Planning, quantified Value Objectives, and evolutionary feedback. See, for example, <em>Software Metrics<\/em> (1976), <em>Evolutionary Delivery versus the \u2018Waterfall Model<\/em> (1985), <em>Principles of Software Engineering Management<\/em> (1988), <em>Competitive Engineering<\/em> (2005), <em>Value Planning<\/em> (2016), and <em>EVO: Evolutionary Value Optimization<\/em> (2024).<br><br><strong>EFFECTIVE PAIRING AND <strong>EFFECTIVE <\/strong>DELEGATION GO HAND IN HAND<\/strong><br><br>Effective <strong>pairing<\/strong> during Inception enables autonomous Execution of larger tasks. <br>Effective <strong>delegation<\/strong> during Execution then minimises interruptions, allowing larger tasks to proceed to Review.<br>Review then requires continued, effective <strong>pairing<\/strong> with the AI to minimise cognitive fatigue.<br><br>In short, effective pairing raises the standard for delegation. As delegation improves, it in turn requires an even higher standard of pairing.<br><br>Achieving effective pairing with the AI and effective delegation with the AI are two important goals for the harness, and they influence the design of the workflow and its ability to achieve productivity gains without taxing the engineers with cognitive fatigue.<br><br><strong>Effective pairing and delegation are two important elements for the harness. They influence both workflow design and the ability to achieve productivity gains without imposing excessive cognitive fatigue.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><br><strong>OTHER TRADE-OFFS WORTH MENTIONING<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Model capability vs. model speed<\/strong><br>I have already hinted at the trade-off between using a heavyweight, more powerful model with planning mode and higher effort, and using a lightweight, faster model. The choice depends on the quality required and the activity being carried out.<br><br><strong>Uninterrupted Execution vs. cognitive debt and knowledge erosion<\/strong><br>As the ability to run longer autonomous Executions on bigger tasks grows, freeing more time for the developer, the reduced developer involvement tends to erode the developer&#8217;s knowledge of the codebase, the system and the domain, leading to cognitive debt.<br><br><strong>Token costs vs. human costs<\/strong><br>As developer interventions decrease during the Execution, the agents have more work to do. Less human oversight means no one is there to catch an agent when it veers off on a tangent or down a rabbit hole. While modern models can self-correct, doing so consumes substantial time and tokens, driving costs up super-linearly. The impact on costs is not irrelevant, given the current increase in the cost per token.<br><br><strong>Speed vs. quality according to risk and ROI<\/strong><br>Another trade-off is between speed and quality, depending on risk tolerance and potential ROI. For example, an established, mature product may have lower risk tolerance, especially when changes or evolutions have limited potential ROI. A new product may have higher risk tolerance and potentially higher ROI.<br><br><strong>Speed vs. internal quality<\/strong><br>A similar trade-off is between internal code quality, reliability, maintainability, and evolvability and code generation speed.<br><br>In these last two trade-offs, speed means reducing the amount of human time spent monitoring and reviewing the agents&#8217; work. This assumes that human oversight is the bottleneck. The choice can have a significant impact, and the product and codebase can strongly influence which trade-off makes sense.<br><br>In the first trade-off, speed refers to the agent itself: choosing a faster model reduces execution time and cost, but has a less dramatic impact than reducing human oversight.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is a quick summary of some of the points that emerged from examining and reflecting on the workflow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211; <strong>Better Inception =&gt; larger autonomous Execution =&gt; larger Review<\/strong><br>&#8211; <strong>Better pairing (during Inception) =&gt; need for better delegation (during Execution) =&gt; need for better pairing (during Review)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Inception:<\/strong> spend more human time upfront =&gt; fewer interruptions during execution. <\/li>\n\n\n\n<li><strong>Execution:<\/strong> delegate more to the agent =&gt; free human time, while potentially accumulating cognitive debt. <\/li>\n\n\n\n<li><strong><strong>Execution<\/strong>:<\/strong> more autonomous Execution time can be productive because they give humans uninterrupted time.<\/li>\n\n\n\n<li><strong>Task switching:<\/strong> interruptions during the Execution are expensive because they fragment human attention. <\/li>\n\n\n\n<li><strong>Review:<\/strong> larger tasks and PRs make review super-linearly more expensive for devs; the harness needs to help with this. <\/li>\n\n\n\n<li><strong>Architecture:<\/strong> smaller tasks\/PRs are easier to review but can increase architectural drift (<em>Winchester Mystery House<\/em> effect). <\/li>\n\n\n\n<li><strong>Cost:<\/strong> reducing developer involvement increases token\/compute costs super-linearly. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Final comments<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Workflow and harness improvement is continuous, fuelled by the learning coming from what works and what doesn&#8217;t, task after task. It occurs in a continuous cycle of deliberate practice, inspection, reflection and gradual improvement<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 id=\"typical-workflow\" class=\"wp-block-heading\">Appendix 1: <br><br>A typical workflow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">AI-Augmented Development is in flux, as is its terminology. The terms used here are defined in this post.<br><br>Let&#8217;s map out a baseline AI-Augmented coding workflow across three phases: Inception, Execution, and Review, to anchor our discussion of trade-offs.<br><br>Crucially, this is not a rigid linear pipeline. As new learning and findings emerge or technical decisions shift, earlier artefacts such as the spec or execution plan must be adapted dynamically.<br><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1358\" height=\"764\" src=\"https:\/\/www.smharter.com\/blog\/wp-content\/uploads\/AI-develoment-Workflowfeedback-1.png\" alt=\"\" class=\"wp-image-3789\" style=\"aspect-ratio:1.7775094339622641;width:611px;height:auto\" srcset=\"https:\/\/www.smharter.com\/blog\/wp-content\/uploads\/AI-develoment-Workflowfeedback-1.png 1358w, https:\/\/www.smharter.com\/blog\/wp-content\/uploads\/AI-develoment-Workflowfeedback-1-600x338.png 600w, https:\/\/www.smharter.com\/blog\/wp-content\/uploads\/AI-develoment-Workflowfeedback-1-768x432.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>The beginning: Inception<\/strong><br>Inception is human-led, focusing on domain and codebase exploration. Starting from the requirements for a target feature or slice, the engineer pairs conversationally with the AI to design the feature and establish the technical design.<br><br>The goal of Inception is to produce two core artefacts:<br>&#8211; the technical and feature specifications, and<br>&#8211; the execution plan for the implementation, detailed enough for the AI to reliably execute it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The middle: Agentic code generation or Execution<\/strong><br>Execution is AI-driven and autonomous. Taking the specs and execution plan from Inception, the AI operates within a test-and-validation harness that includes build commands, linter configs, automated test suites, and any relevant domain and codebase documentation and guardrails.<br><br>The primary agent orchestrates sub-agents and runs self-correction loops. It pauses for human intervention only when necessary, such as asking for permissions or clarifications, resolving architectural\/design\/implementation edge cases, or filling specification gaps. Completion criteria are:<br>&#8211; all planned execution steps are completed<br>&#8211; generated code and tests pass all harness validations<br>&#8211; the output satisfies the initial specification.<br><br><em>Note: While execution has recently shifted from human-driven to AI-driven with diminishing human involvement, the following core trade-offs remain <em>equally<\/em><\/em> <em>valid for both approaches.<\/em><br><br><strong>The end: Review<\/strong><br>Review begins with an AI-led adversarial audit to identify structural or edge-case defects, with the engineer deciding which solutions to apply. Next, the AI generates a semantic changelog to streamline human inspection, helping the developer verify implementation logic without cognitive overload. <br>Once all fixes are applied, the AI prepares a draft of the final pull request and the commit comment.<br><\/p>\n\n\n\n<h2 id=\"engineering-th-workflow\" class=\"wp-block-heading\">Appendix 2: <br><br>Engineering the workflow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Engineering an AI-augmented workflow means designing both the workflow steps and the entire surrounding execution environment, whether using Claude, Codex, Antigrafity, Copilot, or custom toolchains. It spans the lifecycle (start, middle, end) and the harness built to steer it, which includes:<br>&#8211; <strong>guidelines and guardrails<\/strong> with task-specific instructions and operational limits<br>&#8211; <strong>validation and feedback loops<\/strong> like the build and test pipeline and instructions to trigger agentic self-correcting loops<br>&#8211; <strong>product codebase context<\/strong> about the domain, the tech stack, infrastructure, architecture, testing\/coding style &amp; standards, etc.<br>&#8211; <strong>memory management<\/strong> of the state to be persisted across the workflow steps and sessions, for example, the plan and its progress<br>&#8211; <strong>models &amp; orchestration<\/strong> including selecting the model and its parameters like the mode\/effort, and subagent orchestration <br>&#8211; <strong>tooling integration<\/strong> with the selection of MCPs, reusable skills and automation hooks.<br><br>Both the workflow and the harness are context-dependent. What produces great results in one codebase may perform poorly in another. What is effective for more complex tasks may be slow and overcomplicated for a simpler one. <br><br>It is tempting to adopt &#8220;off-the-shelf&#8221; workflows and frameworks or hoard public prompt\/skills libraries. However:<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><strong>It is much, much more effective to engineer a custom workflow fit for your own context.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The competitive advantage and most important reusable assets are the experience and the skills to engineer the workflow!<br><br><br><strong>A FEW EXAMPLES<\/strong><br>Here are a few examples, from my direct experience, of how the optimal design of a workflow and harness varied based on the codebase and the task.<br><br>&#8211; In one product codebase, a large part of the harness was implemented as reusable prompts stored in Markdown files. In another, I created and improved the harness by instructing the agent to create one skill for each workflow step and gradually improve each skill based on its performance.<br><br>&#8211; In a product codebase, it was enough for me to let the Agent decide what model mode and effort to use and how to use subagents; in another, I achieved faster results by specifying both.<br><br>&#8211; In a product codebase, I adopted an Inception step similar to the one described here. In another product codebase, I added an initial Discovery step where I explored different possible ways to design a feature to balance the implementation and operation costs (based on the current status of the codebase and the feature&#8217;s use of the cloud infrastructure) with the scope of the feature.<br><br>&#8211; For simple tasks in one product codebase, the Review step was AI-driven with an adversarial audit. In another product codebase, it was Human-driven and mostly manual. In another one, I had more effective reviews starting with an AI-driven adversarial audit with fixes driven by a human, then followed by a human review informed by descriptions from the AI.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image is-resized\">\n<figure class=\"alignright size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"420\" height=\"532\" src=\"https:\/\/www.smharter.com\/blog\/wp-content\/uploads\/ai-develop.png\" alt=\"\" class=\"wp-image-2071\"\/><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"text-ads\">\n\t<h3>Ship Production-grade Software Faster with AI. No AI slop.<\/h3>\n<br>\n\t<h3>Drive Value Faster with AI. No AI bloat.<\/h3>\n\t<p>\n\t<br>\n\tSee how we can help across the full AI adoption lifecycle.\n\t<br>\n\t<br>\n\t<\/p>\n\n\t<div class=\"local-scroll\">\n\n\t\t<a href=\"\/ai-services.html\" target=\"_blank\" class=\"btn elastic-btn-mod btn-mod btn-dark btn-medium btn-round\" onclick=\"ga('send','event','Blog tech-ads','Click AI Services','AI Services');\" rel=\"noopener noreferrer\">\n\t\tAI Services\n\t\t<\/a>\n\t<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is an overview of the key trade-offs involved in engineering an AI-augmented development workflow that delivers high-quality code with maximum productivity and minimal cognitive fatigue<\/p>\n","protected":false},"author":2,"featured_media":3781,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-3780","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-assisted-coding"],"_links":{"self":[{"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/posts\/3780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/comments?post=3780"}],"version-history":[{"count":96,"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/posts\/3780\/revisions"}],"predecessor-version":[{"id":4044,"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/posts\/3780\/revisions\/4044"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/media\/3781"}],"wp:attachment":[{"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/media?parent=3780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/categories?post=3780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smharter.com\/blog\/wp-json\/wp\/v2\/tags?post=3780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}