Code Large Models and Coding Agents: Five Working Rules and Their Boundaries

    This article breaks down five practical rules for coding agents—act when you have enough information, choose the simplest solution, report only evidence-backed work, pause only when necessary, and lead with the conclusion—and examines a common objection: in real engineering, "enough information" almost never holds, so does "act directly" still work? The article explains why information sufficiency is relative to the task and its acceptance criteria, why confirmed facts must be separated from assumptions, and how iterative refinement fits real software work. It proposes a two-phase approach: an alignment phase that uses clarifying questions and explicit facts, followed by an execution phase where the five rules apply. It also covers layered prompt templates, engineering safeguards such as least-privilege permissions and quality gates, and common pitfalls to avoid.

    Introduction: Why Coding Agents Need a “Code of Conduct”

    When large language models (LLMs) are used to generate code, write tests, refactor modules, or draft documentation, output quality depends not only on model capability but also on how well people constrain the model’s default tendencies. General-purpose LLMs are typically trained to give complete, comprehensive, polite answers, while engineering practice demands the opposite: focused changes, reliable conclusions, and controlled pacing. This mismatch causes developers to repeatedly run into the following problems in daily use:

    • The model keeps restating its thinking and listing alternatives, but delays making actual changes.
    • It declares work “done” after making unverified edits.
    • It expands scope on its own, refactors unrelated code, and adds “provisional design” for requirements that have not been raised.
    • It asks for confirmation on trivial things like variable naming, but gives no warning for genuinely risky operations.
    • It leads with a long narrative of its process and buries the conclusion at the end.

    An official prompt guide from an AI research organization groups these issues into five working rules: act directly when information is sufficient; adopt the simplest workable solution; report only evidence-backed work; pause for confirmation only when necessary; and state the conclusion first. The guide also advises against asking models to reveal their internal reasoning.

    Below, we first break down each rule, then address a representative objection: in real engineering, “information is sufficient” almost never holds—does “act directly” therefore fail?

    1. The Five Working Rules, One by One

    Rule 1: Act Directly When Information Is Sufficient; Give a Recommendation When Judgment Is Needed

    Models commonly exhibit two problems: first, they plan repeatedly and hesitate to start; second, when facing choices, they list “Option A / Option B / Option C” and shift the decision cost onto humans.

    This rule involves two actions:

    • When the task goal, input/output boundaries, and acceptance criteria are clear, deliver the implementation directly;
    • When multiple reasonable approaches exist, give a recommended approach with reasons first, and briefly explain the alternatives.

    This shortens the idle time between “planning” and “executing,” and shifts the model from a “requester” to a “decision-maker.”

    Note that “information is sufficient” should be understood as “sufficient to complete the task goal and verify the result,” not “the model thinks it already understands.” This is the core of the discussion below.

    Rule 2: Adopt the Simplest Solution That Solves the Problem

    LLM training data contains a large amount of “best practices,” “scalable architecture,” and “future-proof design” content, which makes models prone to over-engineering on that basis:

    • Introducing abstraction layers and configuration options for a single scenario;
    • Refactoring surrounding code along the way, expanding the scope of changes;
    • Reserving interfaces for extension points that may never appear.

    The result is that a small change turns into a large-scale refactor: review difficulty rises, regression risk increases, and task boundaries blur.

    Two classic engineering principles apply here: first, Occam’s razor—do not multiply entities without necessity; second, the “You Aren’t Gonna Need It” (YAGNI) principle—do not design for future requirements before they are actually needed. This rule essentially translates these two principles into an executable instruction.

    At the same time, beware of overcorrection. The simplest solution must still meet three conditions:

    • It covers all acceptance conditions of the task;
    • It does not introduce obvious security or performance issues;
    • It stays consistent with the project’s existing style and dependencies.

    “Simple” refers to restraint in structure, not a compromise on quality.

    Rule 3: Verify Before Reporting; Report Only Evidence-Backed Work

    “False progress” is the most hidden risk in human–coding-agent collaboration. Models tend to narrate results according to the logic of what “should be done,” without necessarily having actually performed verification, producing untraceable conclusions such as “I’ve fixed this bug” or “All tests pass.”

    The rule requires three things:

    • Before reporting, check whether each conclusion is backed by a run result or tool return from this round;
    • Clearly state failures, unverified items, and uncertainties;
    • Do not phrase “theoretically feasible” as “already completed.”

    A unified reporting convention can be agreed upon:

    • Completed: modified X, ran Y, result was Z;
    • Not completed: a certain part is still unaddressed because…;
    • Uncertain: a change involves a certain scenario and has not been verified.

    The key point is that the status of a statement must match the strength of the evidence supporting it.

    Rule 4: Pause Only When Human Intervention Is Truly Needed

    Frequent “Should I continue?” or “Please confirm whether to use a certain approach” interrupts developers’ train of thought; never confirming, on the other hand, may cause losses on irreversible operations. A reasonable approach is to narrow the pause conditions to three categories:

    • Destructive operations, such as deleting data, overwriting files in bulk, changing permissions, or modifying production environment configurations;
    • Scope changes, such as needing to modify an agreed interface, adjust the data model, introduce a new dependency, or clearly exceed the original task;
    • Information only the user possesses, such as business rules, internal constraints, or preference settings.

    These three categories share one thing in common: the model either cannot judge the consequences or lacks necessary information, so the expected payoff of proceeding is negative. In all other cases, it should make decisions autonomously and continue executing.

    Note that Rule 1 and Rule 4 are in inherent tension: “information is sufficient” and “a pause is needed” are two sides of the same coin. The former defines when execution is allowed; the latter defines when it is not.

    Rule 5: Lead With the Conclusion

    Many models tend to first explain “how I plan to do it and what possibilities I considered,” and only then give the result. For developers who need quick judgments, this adds reading cost.

    Leading with the conclusion means the first sentence directly answers “what happened,” for example: “Completed X, verified via Y, with Z risk remaining.” Specific changes, evidence, and follow-up suggestions are then presented in layers. This allows developers to decide within the first few seconds whether to keep reading, and makes it easier to reuse the model’s output (e.g., writing review comments, commit messages, or project documentation).

    2. The Key Divergence in Practice: Is “Enough Information” a False Proposition?

    2.1 The Core of the Objection

    There is a representative counterargument:

    • These rules look more like user preferences than universal system-level constraints;
    • “Enough information” is often a false proposition for an agent: an agent starting from scratch and reading a fully documented project might be said to have sufficient information; but in real projects, what it understands as “sufficient” is usually local and one-sided;
    • “Acting directly” amplifies this one-sidedness, resulting in either the developer constantly interrupting to correct it, or commits and reverts alternating repeatedly;
    • Solutions themselves are iteratively refined: there is a goal first, then a framework is designed, and only after several rounds of correction, Q&A, and attempts does it get finalized. Therefore, “think it through before acting” applies to agents as well, and methods based on asking clarifying questions can help both sides align their understanding before starting.

    These points hit the mark: the five rules are not wrong; the mistake is treating them as universally executable rules without conditions. Below, we analyze this divergence at three levels.

    2.2 Information Sufficiency Is a Relative Concept

    “Information is sufficient” is not an objective property of the model, but a judgment relative to a specific task goal and acceptance criteria. For the same task, conclusions can differ completely under different conditions:

    Task type Information sufficiency Recommended strategy
    Mechanical replacement, formatting, completing tests against an established interface High Act directly, report results only
    Clear bug fix with existing reproduction steps Fairly high Analyze the root cause, fix directly, and verify with regression tests
    New feature development with business rules not documented Medium Clarify key boundaries first, then execute
    Architecture adjustment involving multiple modules and compatibility requirements Low Produce a draft proposal first, then act after review

    One supporting point: even human engineers proactively supplement edge information, confirm details, and check personal preferences before starting. If humans do this, expecting an agent to have “enough information” based on a single task description is unrealistic.

    2.3 “Facts” and “Solutions” Have Different Kinds of Uncertainty

    “Do not re-derive facts that are already established” presupposes that the “established facts” have a clear source. In reality, the “facts” a model relies on often come from three sources:

    • A one-sentence description from the user;
    • The model’s own prior inferences;
    • General patterns learned during training.

    The first two may be one-sided, and the third may not apply to the current project. More often than not, the situation is not that the model is “stubborn,” but that its “facts” are themselves unconfirmed assumptions. When the user corrects it, the model may still look for reasons to justify the conclusion it gave in the current round, resulting in a standoff with the user.

    An effective way to defuse this is to explicitly list “confirmed facts” at the start of the task and distinguish their sources, for example:

    1. Confirmed facts (source: explicitly stated by the user in this conversation)
    2. - The service entry point is fixed at src/api/server.ts; switching frameworks is not allowed.
    3. - The target runtime is Node.js 20; do not use syntax features that are not yet stably supported in that version.
    4. - Authentication logic is handled uniformly by existing middleware; business code must not parse credentials itself.
    5. Assumptions to verify (inferred by the model, not yet confirmed)
    6. - The existing logging module supports structured output.
    7. - The test framework can simulate external API timeout scenarios.

    Once facts are written down and their sources are noted, subsequent reasoning has a unified baseline: when new information conflicts with the list, update the list first instead of continuing to build on old conclusions. Disagreements are also easier to bring back to “which fact is wrong,” rather than staying at opposing opinions.

    2.4 Iterative Refinement Is the Norm in Software Development

    Solutions in real projects are rarely formed in one go; the typical path is: clarify the goal → design a framework → correct and trial-and-error → finalize step by step. This is essentially consistent with agile development’s emphasis on iterative incremental delivery and responding to change with working software.

    For a coding agent, this process can be mapped to three execution granularities:

    • Probe-style execution: first complete a minimal runnable skeleton to quickly expose errors in assumptions;
    • Review-style execution: first produce a design draft (module division, interface signatures, data flow), then implement details after confirmation;
    • Direct-style execution: for tasks with clear goals and localized changes, do it in one step.

    “Acting directly” only applies to the third type. If direct execution is required for all tasks, the agent will keep layering changes on a wrong framework, and the developer can only keep interrupting to correct it, or commit and revert repeatedly in version control. The cost of rework is often higher than the cost of upfront clarification.

    3. Improvement: Clarification First, Then Converge on Execution

    Since the five rules need boundaries, a more reliable approach is to keep these rules but limit their scope to the execution phase, and add a preceding “alignment phase.”

    3.1 Introduce a Clarifying-Question Step

    You can first ask the agent to help the user clarify requirements through questions, for example: “Before we start, please ask me questions one at a time, one per turn, to help me refine my understanding of the requirement.” The order of questions can be:

    1. Goal and acceptance: What counts as done? How to verify?
    2. Boundaries and constraints: What cannot be changed? What are the runtime environment, dependencies, and performance baselines?
    3. Options: How many reasonable approaches are there? What are the costs of each?
    4. Risks and rollback: How to detect and recover if something goes wrong?

    The advantage of this method is that it exposes three kinds of information at once: what the user thought of but did not say, what the user thought of but is unsure about, and what the user did not think of at all (e.g., compatibility, exception paths, data migration).

    3.2 Set Clear Exit Conditions for the Clarification Phase

    Clarification itself can go out of control: questions become more and more detailed, and implementation is delayed. It is advisable to agree in advance on:

    • A total number of clarifying questions, or the maximum allowed number of clarification rounds;
    • Each question must correspond to a decision point that affects implementation or acceptance; do not ask questions unrelated to implementation;
    • Once all key decisions are clarified, output a one-page solution summary, and after confirmation, immediately move into execution.

    The solution summary should at least include: scope of changes, key design decisions, acceptance method, and risk points.

    3.3 Restore the Rules’ Binding Force After Clarification

    After the solution is confirmed, the applicable conditions for the five rules truly hold:

    • At this point, “information is sufficient” is well-founded, and direct execution is possible;
    • The solution itself has framed the boundaries, so “the simplest solution” has a clear reference;
    • Reporting still covers only evidence-backed content;
    • Only when something beyond the solution arises should clarification be re-entered.

    In other words, this does not negate “act directly,” but turns “information is sufficient” from a vague subjective judgment into a traceable prerequisite artifact produced by the alignment phase.

    4. Layered Prompt Template: Putting the Rules in the Right Place

    System prompts are typically treated by models as higher-priority global instructions; once they conflict with user intent, the model often tends to obey the system prompt. Therefore, a more reliable approach is to manage instructions by “stability” in layers:

    • The system prompt should only contain long-term, task-independent behavioral rules, such as evidence first, conclusion first, and confirmation required for destructive operations;
    • Project-level instructions should be written into convention documents in the repository (e.g., naming conventions, directory structure, how to run tests, dependency management rules) and read by the model at the start of a session;
    • The user message is responsible for the specific task, plus the clarification results and confirmed facts for that task.

    At the same time, judgments like “act directly” that depend on “whether information is sufficient” are better placed in the execution phase and given in combination with specific context, rather than as unconditional system instructions.

    1. 【Role】
    2. A senior software engineer responsible for implementing the user-specified task.
    3. 【Behavioral rules】
    4. 1. Act directly once the goal and acceptance criteria are clear; do not restate the requirement repeatedly, and do not list options that will not be adopted. When a decision is needed, give a recommended option with a brief reason.
    5. 2. Adopt the simplest solution that solves the problem: do not add features that were not requested, do not do refactoring unrelated to the task, and do not reserve design for hypothetical future needs.
    6. 3. Verify before reporting: only state conclusions backed by run results or tool output from this round; failures, unverified items, and uncertainties must be clearly marked, and "should work" must not be used as a substitute for verification.
    7. 4. Pause only in the following cases: destructive operations, changes beyond the agreed scope, and information only the user can provide.
    8. 5. Lead with the conclusion: the first sentence states "what happened," with evidence and details given afterward.
    9. 【Alignment phase】
    10. At the start of the task, if there is key unknown information that affects implementation, ask me questions one at a time to clarify goals, constraints, options, and risks. After all key decisions are clarified, output a solution summary (scope of changes, design decisions, acceptance method, risk points); after I confirm it, enter the execution phase.
    11. 【Confirmed facts】
    12. (Fill in before execution, and note the source)
    13. Task: (fill in the task description here)

    This template separates “behavioral rules” from “task content”: the former can be solidified into general team standards, while the latter changes with the task. For long-term projects, project-level instructions can also be placed separately in the code repository as context for the model in each session.

    5. Engineering Support to Make the Rules Truly Effective

    5.1 Extend Constraints From Prompts to the Engineering Process

    Prompts are soft constraints, and the model may still deviate. For irreversible operations or operations with a large impact, the process should provide hard constraints:

    • Least privilege: grant only the directory and tool permissions needed to complete the task; do not open write permissions for production environments and sensitive configurations;
    • Mandatory verification: automated tests, static code analysis, and other quality gates must pass before merging;
    • Auditable changes: advance changes in small commits, making it easier to review step by step and roll back quickly;
    • Small, revertible steps: advance only one independently verifiable small goal at a time, and withdraw promptly when a deviation occurs, rather than layering modifications all the way.

    5.2 Continuously Correct “Confirmed Facts” and Context

    As the task progresses, the model accumulates a large amount of context, mixing verified conclusions with unverified speculation. It is advisable to maintain a “Confirmed facts / Assumptions to verify” list in the project convention document and update it at key checkpoints. When the context approaches its limit, prioritize keeping this list, the solution summary, and recent change records, rather than the full original conversation.

    5.3 Use Observable Metrics to Evaluate Prompt Effectiveness

    To judge whether a set of rules is effective, you can track the following signals:

    • Clarification rounds: whether it converges within a reasonable range;
    • Interruption count: how often the user needs to correct the model per unit of time;
    • Rework rate: the proportion of changes that get reverted out of all changes;
    • First-pass rate: the proportion of first submissions that pass quality gates;
    • Reporting accuracy: the proportion of cases where the model claims “done” but actually fails verification.

    These data help a team judge whether the current task is suitable for direct execution or needs more thorough alignment.

    6. Common Pitfalls and How to Avoid Them

    1. Treating “act directly” as a universal default. It only holds when the goal is clear, constraints are clear, and changes are localized.
    2. Using “the simplest solution” to justify cutting corners. The simplest solution must still fully cover the acceptance conditions.
    3. Leaving the judgment of “information is sufficient” entirely to the model. Confirmed facts should be explicitly provided or confirmed by the user.
    4. Treating clarification as unlimited Q&A. Clarification should serve decision-making and have clear exit conditions.
    5. Asking the model to reveal its internal reasoning process. Such requests may be refused due to safety policies; in engineering, a more valuable output structure is “conclusion + evidence + risks,” which can be reviewed.
    6. Stuffing too many instructions at once. The value of instructions lies in whether they can change actual results; each one should correspond to a specific behavioral deviation, and length does not equal effectiveness.

    Conclusion

    The value of these five rules lies in turning the friction that repeatedly arises in human–coding-agent collaboration into describable rules: no idling, no over-engineering, no false reporting, fewer interruptions, and conclusions first. But the rules are not a universal formula—the premise of “information is sufficient” often does not hold in real engineering.

    A more reliable approach is to put it into a two-phase framework:

    • In the alignment phase, use clarifying questions and explicit facts to turn “information is sufficient” into a traceable prerequisite artifact;
    • In the execution phase, the five rules constrain the model to deliver with the simplest solution and report results with evidence.

    With engineering constraints such as least privilege and quality gates as support, you can strike a balance between efficiency and controllability. For prompt engineering, what truly works has never been longer instructions, but constraints that match specific scenarios and can be verified and iterated.