AI-Assisted Programming: Division of Labor and Why Architecture Must Come First

    This article explains why the real bottleneck in AI-assisted development is abstraction quality rather than tool choice, and how to split work across three layers based on cognitive load: low-constraint exploration, structural decision-making, and execution with verification. It argues that core frameworks must be designed by humans, shows how to turn a vague mechanism into testable computational structures with code examples, and outlines a four-step human-AI workflow with quantitative acceptance metrics. Readers will learn a practical routing strategy for deciding which tasks to delegate and which to keep.

    1. The Real Bottleneck Is Abstraction Quality, Not Tool Choice

    After intelligent coding tools became widespread, the efficiency bottleneck for many teams shifted from “we can’t write the code” to “we can’t change the code.” Given the same requirement, different people get outputs of very different quality. The reason is usually not the strength of the tool, but whether the person requesting the work has a clear abstraction in mind. When the flow, states, and boundaries are well defined, code generation is almost mechanical labor. When the abstraction is vague, the tool fills the gaps in the way it does best—stacking implementations based on the most common patterns. This runs in the short term but creates hard-to-untangle coupling over time.

    For this reason, debating “which kind of AI coding assistant do you prefer” has limited value. The more useful question is: which kinds of tasks suit which capability shape, and which steps must be handled by a human.

    2. A Three-Layer Division Based on Cognitive Load

    Development tasks can be roughly divided into three layers, each with different success conditions.

    The first layer is low-constraint exploration. When facing a completely unfamiliar domain, interface layout, visual presentation, or chart drawing, a person lacks judgment criteria. Here you should prefer a capability shape with broad knowledge and diverse output styles, treating it as a “well-traveled peer.” Use a large number of parallel questions to obtain candidate solutions, then let the human filter them for aesthetics and feasibility.

    The second layer is structural decision-making. Once the abstraction has taken shape, what you need is strict reasoning under long context and code consistency. A reasoning-oriented, long-chain capability is more suitable here. Its value lies not in creativity but in “not drifting off course”: it can hold to the established interfaces and naming, and spread repetitive patterns consistently.

    The third layer is execution and verification. Deterministic work—builds, batch refactoring, test completion, logging and monitoring integration—suits a tool-shaped capability that can directly operate the repository, run commands, and read back results. The human only performs acceptance.

    An illustrative task routing can be written as a lightweight rule table rather than relying on in-the-moment intuition:

    1. TASK_ROUTING = [
    2. # (condition, preferred capability shape, human involvement level)
    3. ("unfamiliar domain with no clear acceptance criteria", "broad-conversation capability", "high: human filters candidates"),
    4. ("interfaces and data flow already defined", "long-chain reasoning capability", "medium: review contract consistency"),
    5. ("deterministic steps that can be auto-verified", "tool-execution capability", "low: acceptance only"),
    6. ]

    3. Why the Core Framework Must Be Designed by Humans

    Take the information propagation mechanism in a “historical simulation” as an example. On the surface it is a feature; in essence it is a modeling problem: when a message circulates through a crowd, it is distorted by subjective positions, then fixed into text or oral accounts by the recorder, forming the input for the next round of propagation.

    This kind of mechanism cannot be obtained from generic advice, for three reasons.

    First, the constraints come from domain common sense, not code common sense. How kinship relations, occupational bias, and family opinions in marriage negotiations influence individual judgment—these rules exist only in the designer’s intent. No model can decide for you “whether suspicion triggers an investigation.”

    Second, the cost of a wrong abstraction is amplified by later features. If “information” is modeled as a single string, adding credibility, stance, and source chains later will inevitably require repeated signature changes, and the changes will spread along the call chain.

    Third, the acceptance criteria are defined by humans. There is no objective answer to what “propagates realistically” means; only the designer can provide observable metrics.

    4. Breaking a Vague Mechanism into Computable Structures

    A workable path is to define entities and relationships first, then define state transitions, and only then write code. A social network naturally fits a graph structure: nodes are people, edges are relationships carrying weights such as intimacy and trust; information is not a string but an object with a source chain and distortion.

    1. from dataclasses import dataclass, field
    2. @dataclass
    3. class Person:
    4. id: str
    5. kin: dict[str, float] = field(default_factory=dict) # kinship/intimacy weights
    6. trust: dict[str, float] = field(default_factory=dict) # trust in information sources
    7. bias: dict[str, float] = field(default_factory=dict) # stance filter
    8. @dataclass
    9. class Rumor:
    10. origin: str
    11. text: str
    12. chain: list[str] = field(default_factory=list) # propagation path, traceable
    13. distortion: float = 0.0 # cumulative distortion

    The propagation process is split into three testable pure functions: on receipt, compute the acceptance probability from the relationship and trust; on retelling, apply an offset based on stance; on recording, decide whether to fix it based on the recorder’s habits.

    1. def receive(p: Person, r: Rumor, src: str) -> float:
    2. return p.trust.get(src, 0.5) * p.kin.get(src, 0.5)
    3. def retell(p: Person, r: Rumor) -> Rumor:
    4. skew = sum(p.bias.values()) / max(len(p.bias), 1)
    5. return Rumor(r.origin, r.text, r.chain + [p.id],
    6. min(1.0, r.distortion + abs(skew) * 0.1))
    7. def record(p: Person, r: Rumor, style: str) -> str | None:
    8. if style == "chronicle" and r.distortion > 0.6:
    9. return None # a rigorous recorder doubts it and does not write it down
    10. return r.text

    Once the structure is clear, node scheduling, concurrent propagation, persistence, and visualization all become independent, replaceable modules.

    5. Putting Human-AI Collaboration into Practice and Acceptance

    A recommended four-step loop: a human writes a one-page “mechanism specification” that clarifies entities, states, and failure paths; AI generates the contracts and skeleton, including interfaces, types, and test placeholders; a tool-shaped capability fills in implementations and engineering support in bulk, such as logging, monitoring alerts, and object storage archiving; finally, a human performs a consistency review and metric-based acceptance.

    Acceptance should be quantified—for example, tallying the distortion distribution, the average source chain length, and the proportion of discarded records—using data to judge whether the mechanism behaves as expected. General-purpose capabilities such as container platforms, log services, and monitoring alerts on Baidu AI Cloud can carry the runtime and observability, making the simulation reproducible and regression-testable.

    The conclusion is straightforward: delegate exploration to breadth, keep structure for yourself, and delegate filling-in to reasoning and execution. Abstraction quality determines the project’s ceiling; tools only determine how fast you reach that ceiling.