Tr tested Claude Sonnet 5.5 through Claude Code 2.1.302 with tools disabled. He built a small Python package called shoplite with strict internal conventions, then gave the model one one-line coding task five times in each of four context tiers, for 20 runs in total. Every run without the project’s conventions made the same assumptions: it used Decimal for money, raised ValueError on bad input, and added fields nobody asked for, such as status and created_at timestamps.
| Condition | What the prompt contained | Input tokens | Tests passed | Cost of 5 runs |
|---|---|---|---|---|
| missing | The one-line task only | ~650 | 0 / 8 | $0.08 |
| contract | Task, the data model file, and the input format | ~950 | 1 / 8 | $0.08 |
| sufficient | Task, six relevant files including the conventions, and acceptance criteria | ~2,200 | 8 / 8 | $0.05 |
| noisy | The sufficient content buried in unrelated Python modules | ~62,700 | 8 / 8 | $0.32 |
A Little Context Made Things Worse
The second tier is the surprising one. With the data model file in the prompt, the model understood that custom objects existed, but it still did not follow the project’s rules. It kept using Decimal and ValueError in all five runs, skipped the validation helpers, and invented its own exception class every single time. With the task alone, it never invented one.
Only the third tier fixed the output. Once the model received the 12-line conventions file and the helper modules, all five runs used the require helpers and normalize_sku, avoided Decimal and ValueError, and passed all eight hidden pytest tests. That tier was also the cheapest of the four, at $0.05 for five runs.
The fourth tier tested the opposite problem. Tr placed the same sufficient content in the middle of roughly 62,700 tokens of unrelated standard library code. Accuracy held at 100 percent, but the bill rose about six times.
What to Put in the Window
Tr frames each agent response as a plain function, where the output depends on frozen weights and the input in front of it:
output = f(weights, input)
Developers cannot change the weights, so the input is the only lever they hold. When a rule is missing from it, the model fills the gap with the most probable continuation from its training data, which is why the same wrong assumptions kept repeating. Tr’s argument is that prompt engineering should be treated as context engineering, and that recurring assumptions can be removed by documenting a repository properly:
- Keep an explicit
AGENTS.mdfile that lists project constraints and forbidden libraries. - Supply verification scripts the agent can run on its own.
- Paste exact stack traces and full error output instead of short summaries.
The conventions file that turned failing runs into passing ones was short and specific:
# shoplite conventions
- Money is always `shoplite.money.Money`, an integer number of cents.
Never use `float` or `Decimal` for amounts. Parse strings with `Money.from_str`.
- Bad input raises `shoplite.errors.ValidationError(field, reason)`.
Never raise `ValueError`, `KeyError` or your own exception classes.
- Read required keys with the helpers in `shoplite.validate`
(`require`, `require_positive_int`). Don't index `raw[...]` directly.
- SKUs always go through `shoplite.validate.normalize_sku`.
- A parser for a nested object is a private function named `_parse_<thing>`
in the same module (see `_parse_address` in customers.py).
- Standard library only. No pydantic, attrs or marshmallow.
When an agent writes code you did not expect, Tr says to check what it was given before blaming the model. The model is a function, and missing input will always get filled with the average.
Hashlytics Take
This is one task, one model, and one small codebase, so treat the numbers as a demonstration, not a benchmark. Even so, the contract tier deserves attention. Partial documentation did not just fail to help, it produced more invented code than no documentation at all. Teams that half-describe their repositories for agents may be getting the worst result of the four. The noise tier points the other way: a crowded window did not hurt accuracy here, it only multiplied the cost. The practical takeaway is curation. A short, complete set of rules beat both the thin prompt and the bloated one.
Follow Hashlytics on Bluesky, Facebook, LinkedIn , Telegram and X to Get Instant Updates

