Planning, Scheduling, and Execution Layers in AI-Assisted Programming

    Complex software work is rarely finished in one generation pass. This article explains why matching reasoning depth, context width, and coding stability to planning, scheduling, and execution—rather than using one model and one reasoning strength for every step—keeps constraints intact, limits rework, and avoids paying to reread an entire repository on every turn.

    Complex software tasks are rarely finished in a single generation pass. Requirements must be broken down, boundaries confirmed, changes applied to the right files, and results tested and reviewed. If a team uses the same model and the same reasoning strength throughout, it tends to swing between two extremes. One extreme is letting a high-capability model reread a very long history and the whole repository on every turn: cost rises quickly with each round, and attention is diluted in a long context. The other is handing critical execution to a fast but less stable model. The upstream plan looks complete, but the implementation drifts from the constraints. A stronger model or a person then has to review the repository and the conversation again, and most of the earlier savings are spent.

    A more workable approach is to accept that projects have layers while model capability does not come with a natural hierarchy, and then to impose a division of labor. Layering does not assign models to fixed job titles. It matches reasoning depth, context width, and coding stability to the stage of the task.

    Separate three kinds of work

    Planning answers what to do, what not to do, and what to change first. It needs to understand the goal, dependencies, risks, and acceptance criteria, so a higher-capability tier—with fuller reasoning and more patience for long specifications—is a better fit. The output should be an executable task description, not a long, unverifiable vision. A sound plan includes at least the goal and non-goals, the scope of impact, the modules to change, constraints (API compatibility, data migration, permissions), how to verify the work, and a clear stop condition.

    Scheduling and acceptance answer whether this step is done and who should take the next one. This layer reads the plan summary and the artifacts from the current step, checks them against the acceptance items, and decides to continue, rework, or escalate. It does not need to reread the whole project every time, but it must be able to catch misses against a checklist. A model that is only average at implementation but adequate at checking fits the middle layer well: it does not invent architecture; it breaks work into smaller tasks and collects evidence.

    Execution answers how to write the change correctly inside a bounded context. Execution should use little or no history: only the current task description, the relevant file excerpts, the interface contract, and the test points. The execution model needs to follow constraints and stay locally consistent, not invent another design. Feeding it a long, expensive full history on every turn usually inverts the priority.

    Context is both a cost and a quality variable

    Reading more does not automatically make a model do better work. A very long conversation mixes stale conclusions, rejected designs, and unrelated files. The model can latch onto an early statement and ignore the latest constraints. The result looks like degraded reasoning in a long context: answers become vague, call sites are missed, and tests disagree with the implementation. At the same time, resending the whole-repository brief and the full history to a high-capability model on every turn lets input size dominate the bill, even when the output is only a few lines of code.

    A practical context policy can be summarized in four rules.

    First, planning may read widely, but its artifact should be short. After planning, compress the conclusion into a standalone task card: a few sentences of background, a file list, forbidden changes, and a definition of done. Later stages should receive the task card by default, not the full conversation.

    Second, feed execution in slices. Each step should touch one module or one vertical change (interface, implementation, tests). When work crosses modules, scheduling should split it into ordered subtasks and attach a diff summary from the previous step, not paste the entire history.

    Third, accept evidence, not narrative. Require the execution result to state which files changed, the key differences, how it was self-tested, and what remains unfinished. Scheduling checks these items against the task card. Missing evidence means the step goes back, not that it passes because it “looks done.”

    Fourth, prefer changing reasoning strength inside the same execution session instead of clearing and rebuilding the cache for no reason. If the platform can adjust reasoning strength in the same context, use a lower strength for simple edits and raise it when the task is ambiguous. That is usually cheaper than starting over and refilling a full cache. Strength means “think harder on this step,” not “reread all the old material.”

    The following task-card shape is independent of any specific product and can be passed between tools:

    1. Goal: Add status filtering to order queries while keeping old parameters compatible
    2. Non-goals: Do not change the write path or the permission model
    3. Scope: Query interface definition, service-layer filtering, corresponding unit tests
    4. Constraints: Unknown statuses return an explicit error; default behavior matches production
    5. Definition of done: Tests pass; the diff note lists every call site; no unrelated refactoring
    6. Inputs: Interface excerpt, existing test names, error-code conventions (do not attach the whole repository)

    When to raise the tier, and when to lower it

    Simple tasks with clear boundaries and local edits—renaming, adding one branch, or adding a test in the existing style—fit low-strength execution. Extra reasoning depth returns little, and rereading a long history only increases cost.

    When the task changes behavior, data compatibility, concurrency, or a security boundary, or when completeness matters, raise the strength of planning and review instead of blindly lengthening the execution context. Higher capability belongs on decomposition and judgment; the lower-cost tier belongs on landing the change to spec. If execution misses the same constraint twice in a row, stop patching inside that session. Send the failure evidence back to planning, revise the task card, and open a clean execution context. That is more stable than asking the same model to correct itself inside a polluted history.

    When a subtask needs to operate a UI, read a screenshot, or judge state from a running screen, give that subtask alone to a model with the required perception, and provide only the interface notes and expected behavior for that step. Do not attach the entire code history for one UI check. The output of a perception step should also be structured: what was seen, whether it matches the expectation, and which place to change next.

    Human review cannot be skipped, but it can be lighter. The middle layer first does mechanical acceptance: whether files stayed in scope, whether tests are mentioned, and whether forbidden items were touched. Only when acceptance fails, the requirement is ambiguous, or release risk is involved should the repository diff and a short conversation summary go to a stronger model or a senior developer. The reviewer then sees distilled evidence, not another full dump of tokens.

    A repeatable collaboration flow

    1. Use a high-capability tier to read the requirements and the necessary architecture notes, then produce a task card and ordered subtasks. Do not dump a large implementation.
    2. The scheduling tier chooses an execution strength for each subtask, attaches the minimum context, and writes the acceptance items.
    3. The execution tier edits code in a short context and returns the diff plus a self-test note. Default to low strength, and raise strength in the same session if the task is ambiguous.
    4. The scheduling tier checks the result against the task card. On pass, move to the next step. On failure, send back only the failed items and the relevant diff.
    5. After every subtask passes, planning or a person does one integration-level review: whether behavior is consistent, whether unrelated changes were introduced, and whether verification covers the risk points.
    6. If the whole task is simple enough, layering is optional. A stable execution tier with strength adjusted to difficulty is enough. Layering pays off when complexity and cost rise together.

    Permissions should default to the minimum. The execution environment should open only the read and write scope needed for the current step. Access to external systems or production data requires explicit human approval. Splitting work across models does not replace change review, testing, or release gates.

    Common anti-patterns

    High capability for everything: every simple edit rereads a long history. Cost is high, and attention is scattered across stale information.

    Low capability for everything: planning and execution are both careless. Apparent progress is fast, but rework hands the whole repository and conversation back upstream, and total cost is higher.

    Reversed roles: a tier that thinks less but writes steadily is asked to do open-ended design, while a tier that thinks more but lands changes poorly is asked to own the final code. The useful analogy is management, not job-title worship: planning should go deep, execution should be precise, and the middle layer should be willing to reject unqualified results.

    Unbounded context: failed attempts, side chat, and rejected designs stay in the execution session. Write the still-valid conclusions into the task card and discard the session.

    Acceptance by tone: a model saying “done” is not the same as done. A report with no diff, no verification, and no unfinished items should be treated as not delivered.

    How to tell whether the split is working

    Do not measure a single call price. Measure the full delivery: total rounds from requirement to a mergeable change, rework rate, time spent on human review, and whether out-of-scope edits appear. If execution quality rises, the high-capability model no longer rereads the project on every turn, and the middle layer only schedules and accepts, the cost structure is healthy. If the middle layer often misjudges, tighten the acceptance checklist or escalate disputed decisions. Do not drop the layers and force one model to carry everything.

    Teams can also keep task cards, diff summaries, and acceptance records in the change notes beside the repository, so the next round does not depend on one conversation’s memory. Models change and sessions break; specifications and evidence should live in engineering artifacts. Then, whichever platform the coding tools come from, they serve the same discipline: whoever thinks it through—person or model—owns the thinking; the coding step receives only enough context; and the checker signs only results that can be verified.