Vivek Jalondhara. All writing

AI / Agentic

Generated Code Moves Work into Reviewing Assumptions

By Vivek Jalondhara · 5 min read
Published

Review the decisions hidden inside a generated CRM title edit, from trimming and defaults to update semantics and error handling.

A generated patch can turn an underspecified request into concrete behaviour before anyone notices the missing decisions. The difficult review work is then to recover those decisions from defaults, transformations, and error branches. Fewer handwritten lines do not necessarily mean fewer questions to answer.

This observation uses an illustrative SmackDab CRM title-editing feature. The request is to let an authorised user rename a record. The proposed normalisation and update rules are examples for review, not descriptions of the CRM's actual behaviour.

Read a transformation as a product decision

Suppose the generated handler trims the submitted title and replaces an empty result with Untitled. Both operations look harmless in a short utility. Together they decide that a blank submission creates a default title rather than producing a validation error or preserving the previous value.

Write the alternatives in plain language. Is whitespace meaningful? Can the record be unnamed? Does an omitted title mean no change? A reviewer can assess those questions more easily than a dense expression combining optional access, trimming, and a fallback. The expression should follow a decision, not make it invisibly.

Separate syntax confidence from meaning

A string type says little about whether that string is an acceptable title. An interface can accurately describe a request while leaving its empty-value semantics unresolved. TypeScript's handbook explains that type annotations are erased, so a type assertion cannot validate a network value at runtime.

For this exercise, distinguish a missing field, an explicit null, an empty string, and a nonempty title. They need not share one result. Trace which layer interprets each case and whether the server and interface agree. A successful type check does not settle that interpretation.

Look for assumptions created by surrounding code

A handler may update the title correctly while returning an outdated record because it reuses a cached response. A form may submit the entire record and accidentally overwrite fields edited elsewhere. The title itself can be valid while the surrounding operation is wrong.

Read the request serializer, update method, and response consumer together. Determine whether the endpoint expresses a partial update or a complete replacement. If existing code already defines that behaviour, the new feature should follow it. If it does not, the uncertainty belongs in the task's decision record.

Ask for evidence at the point of consequence

A comment saying preserves other fields is weaker than a fixture where an unrelated field remains unchanged after renaming. A claim that empty titles are rejected needs an observed response and a check that the prior title survives. Review the consequences the application exposes.

Google's review guidance includes functionality, design, and edge cases. For a generated patch, apply those questions to the author's assumptions as well as the code. The useful discussion explains why the chosen behaviour fits the product, rather than whether the agent sounded confident when proposing it.

Keep an assumption ledger short and actionable

Record only uncertainties that can change the result. For each, note the current choice, its evidence, and what remains unresolved. The ledger might say trimming follows an existing server validator, while concurrent replacement behaviour still needs a focused check. That distinction directs review effort.

Avoid turning every variable name into a risk item. Once a question is resolved and encoded in the relevant contract or test, the temporary review note can disappear. The purpose is to expose hidden decisions during a change, not create a second specification that drifts beside the code.

Judge the whole change, including the work it creates

An agent may save effort on the input, mutation hook, and response types while introducing an unfamiliar abstraction that takes longer to review. It may also reveal a missing rule early enough to improve the feature. Neither outcome follows automatically from how much code was generated.

The tradeoff is between implementation assistance and the judgment required to accept its choices. Evaluate whether the final change is understandable, correctly integrated, and supported by relevant evidence. When an assumption remains unresolved, name it precisely and keep the affected behaviour out of an unqualified completion claim.

A small assumption ledger for a title edit

This review manifest records proposed requirements and the evidence to collect. It contains no claim that the checks have already passed. Replace each evidence request with the actual observation when reviewing a concrete change.

Illustrative example · JSON · Simplified for explanation

{
  "feature": "rename a CRM record",
  "decisions": [
    {"input": "title omitted", "expected": "leave title unchanged"},
    {"input": "blank after trimming", "expected": "reject without writing"},
    {"input": "nonempty title", "expected": "update title only"}
  ],
  "evidenceNeeded": [
    "server validation agrees with the interface",
    "unrelated fields survive the update",
    "rejected input preserves the previous title"
  ]
}
How the example fits together
  1. Identify hidden behaviour choices
  2. Compare them with existing contracts
  3. Collect evidence for consequential paths
  4. Resolve or disclose remaining assumptions

Conceptual flow for the example above.

Tradeoff to keep in mind

The manifest makes proposed semantics visible but does not establish that they are the right product rules. Keep it tied to the actual change, and rely on runtime validation and observed outcomes rather than the manifest alone.

Related project: SmackDab CRM →

References & further reading

Related posts