Contents
Giving Claude Code feature implementation tasks without clear constraints or sufficient review can produce code that is hard to change. Even when delegating implementation, assign responsibility for design decisions, validation, and the final merge.
Key Points#
- Features that work in isolation may still conflict with the application's API contracts, permissions, and data model.
- Before asking Claude Code to make changes, provide concrete reference implementations and clear constraints.
- Consistent design alone does not guarantee correct or secure code, so review both structure and behavior.
- Treat the original article's “one to two months” warning as anecdotal, not a measured deadline.
How Inconsistencies Accumulate#
The supplied article by Yuki describes a common failure pattern. Developers request individual features and accept working results, only to discover later that the implementations do not fit together. One endpoint uses a different response structure, while another handles errors differently. Each task adds its own implementation, and similar helper functions proliferate.
These differences increase the work needed for the next change. Developers must first determine which conventions apply, whether duplicate functions behave identically, and which callers depend on existing responses. Individual successes become maintenance problems.
The article says this deterioration occurs within one to two months, but provides no supporting data. Its claims about the proportion of teams experiencing this problem also need verification. Use the warning as a prompt to examine your workflow, without treating that timeframe as a prediction.
Decide Before Delegating#
Write a short task brief before requesting implementation. For a small change, start by setting aside five minutes. Allow more time for work affecting authentication, payments, database migrations, or public interfaces.
Include these four points.
1. Expected behavior: Describe what users will be able to do and what should happen when an operation fails. 2. Reference files: Identify existing implementations that follow the intended pattern. 3. Constraints: Specify requirements for permissions, response formats, dependencies, and compatibility. 4. Acceptance checks: Describe observable results that demonstrate the change works correctly.
For example: “Add order search using the product search endpoint as a reference. Preserve the existing pagination format. Users may search only for orders belonging to their own organization. Verify both empty search results and attempted access to another organization's orders.”
This gives Claude Code a concrete target. It also makes the output easier to evaluate.
Make the Reasoning Behind Decisions Traceable#
The original article argues that humans should make decisions and AI should do the work. This is useful as a rule for assigning responsibility, but too rigid as a boundary between capabilities. Claude Code can inspect repository files, propose designs, and explain trade-offs. Those proposals still need to be checked against the project's actual constraints.
Ask it to list the files it examined, explain existing patterns, and justify any proposed departures. “This follows the architecture” is insufficient evidence. Comparisons grounded in specific filenames and interface contracts are more useful.
Record important decisions in the repository. Even a short note explaining why an endpoint uses a particular error format can prevent repeated debates. Be specific enough for reviewers to check whether the implementation follows that decision.
Review Behavior as Well as Structure#
The original article suggests that implementation details can generally be trusted if the structure is correct. That advice goes too far. Even a well-organized function can omit authorization checks, mishandle transactions, or leak sensitive information.
Review proposed changes from these two perspectives.
- Design: Does this belong in this module, reuse appropriate abstractions, and preserve existing contracts?
- Behavior: Does it enforce permissions properly, handle failures correctly, and produce the expected results at relevant boundaries?
Use tests as evidence, not as a substitute for judgment. AI-generated tests can repeat the same assumptions as the implementation. Define expected behavior independently and check whether the tests can detect plausible defects. For order search, a useful check is whether one organization can retrieve another organization's records.
Fix Inconsistencies Before Adding More#
If conventions already vary, examine one frequently changed area before requesting the next feature. Compare response formats, error handling, and duplicate helper functions. Verify that an implementation works correctly before choosing it as a reference.
Then make a narrowly scoped fix. Standardize one contract or consolidate one piece of duplicated logic, validate the callers, and merge that change on its own. Avoid broad cleanups whose effects are difficult to review.
Over the next few changes, track maintenance indicators such as regressions, review rework, time spent identifying the correct pattern, and the number of modules changed for a small feature. These observations reveal more than generated line counts or confident completion reports.
Next Step#
Before your next request to Claude Code, write a task brief covering expected behavior, reference files, constraints, and acceptance checks, then use it to review the generated diff.
Source: https://note.com/yukiedu/n/n4d25f5e1d590
Contents
