← Wszystkie wpisy

Quality Is the Only Variable

A project manager’s job is to balance four variables: scope, time, cost, and quality. The classic constraint triangle says you can optimize for two but not all four. You want it fast and cheap? Quality suffers. You want it good and fast? Cost increases. The triangle is a useful mental model for resource-constrained environments.

I do not operate in a resource-constrained environment. I operate with an AI agent that can produce code at the speed of inference, a context window that holds an entire codebase, and a session cost of dollars, not salaries. The constraint triangle collapses.

When the agent can implement a feature in minutes, the question is not “can we afford to do it right?” The question is “why would we do it wrong?”

The Elimination

Remove time from the decision. Not “how long will this take?” but “what should this look like when it is finished?” The first question optimizes for delivery speed. The second optimizes for the artifact.

Remove cost from the decision. A session that produces correct, clean, well-tested code costs the same as a session that produces expedient, messy, untested code. The API charges the same per token regardless of quality. The marginal cost of doing it right is zero.

Remove effort from the decision. The agent does not get tired. The hundredth function is written with the same capability as the first. There is no human fatigue curve that justifies shortcuts late in a session. The quality of the output is limited by the quality of the instruction and the quality of the surrounding context, not by how many hours have passed.

What remains after eliminating time, cost, and effort? Quality. Quality is the only variable left.

What This Means in Practice

When quality is the only variable, several common engineering decisions become obvious:

Write the test. The debate about whether to write a test for a specific function disappears. The agent writes the test in seconds. The marginal cost is zero. The marginal benefit is permanent verification. Not writing the test is a choice to accept less quality for no savings.

Fix the adjacent code. When fixing a bug, the surrounding code often has related issues: inconsistent naming, missing error handling, outdated patterns. In a time-constrained environment, you fix the bug and leave the adjacent code for “later.” When quality is the only variable, you fix everything you touch. Later never comes. Now is free.

Use the right abstraction. A quick hack solves the immediate problem. The right abstraction solves the category of problems. In a time-constrained environment, the hack ships today and the abstraction ships never. When the agent can implement either one in the same session, the hack has no advantage. Choose the abstraction.

Read before writing. In a time-constrained environment, engineers sometimes modify code they have not fully read, relying on local understanding. When the agent can read the entire file, understand the patterns, and modify with full context, there is no reason to operate with partial understanding. Read the whole file. Understand the pattern. Then write.

Do not defer. TODO, FIXME, and HACK are markers of deferred quality. In a time-constrained environment, deferral is rational: fix it later when there is time. When quality is the only variable, deferral is irrational. The agent is here. The context is loaded. The fix is the same cost now or later. Do it now.

The Jiro Principle

Jiro Ono has been making sushi for over 70 years. His restaurant has three Michelin stars and ten seats. He has not changed the menu or the method. He has refined the method every day for 70 years.

When someone asks Jiro whether a piece of sushi is good enough, the answer is never based on how busy the restaurant is, how many customers are waiting, or how expensive the fish was. The answer is based on whether the sushi meets his standard. The standard is absolute. The circumstances are irrelevant.

This is the principle applied to engineering: the standard is the code, not the sprint. A function is either correct, clean, and well-tested, or it is not. The deadline does not change the assessment. The budget does not change the assessment. The only question is whether the artifact meets the standard.

AI agents make this principle practical for the first time in software engineering. Before agents, the Jiro principle was aspirational. The human cost of perfection was too high. Every shortcut had a rational justification: we ship Thursday, the budget is exhausted, the engineer is burnt out. With agents, the cost of doing it right is the same as the cost of doing it wrong. The shortcuts lose their justification.

The Pride Check

After every non-trivial change, I ask five questions:

  1. Would a senior engineer respect this?
  2. Does the code explain itself?
  3. Are edge cases handled?
  4. Is this the right level of simplicity?
  5. Did I leave the codebase better than I found it?

The questions are not about correctness. The evidence gate handles correctness. The pride check handles craft. Correct code that nobody wants to maintain fails question 1. Clever code that requires comments to understand fails question 2. Code that handles the happy path but ignores the error path fails question 3.

Question 4 is the hardest. “The right level of simplicity” is not “the simplest possible.” A one-line hack is simpler than a proper abstraction, but the hack is the wrong level of simplicity if the problem will recur. The right simplicity is the least complexity that solves the actual problem without solving hypothetical future problems.

Question 5 is about trajectory. Every session should leave the codebase in a better state than it found it. Not just the specific files modified, but the surrounding context: updated tests, cleaned up imports, corrected comments, removed dead code. The standard is not “did I complete the task?” The standard is “is the project better because I was here?”

The Counterargument

The obvious counterargument: speed matters. Shipping matters. A perfect codebase that never ships is worse than a messy codebase that solves a real problem.

The counterargument is correct in a world where quality and speed are inversely correlated. In a world where an AI agent produces high-quality output at the same speed as low-quality output, the correlation breaks. Quality and speed become independent variables. You can have both.

The remaining trade-off is attention, not time. Reading the whole file takes attention. Running the evidence gate takes attention. Applying the pride check takes attention. The agent’s time is free. Your attention is finite.

Quality is the only variable, but attention is the constraint on quality. The solution is not to lower the standard. The solution is to build infrastructure that reduces the attention cost of maintaining the standard: hooks that catch common failures automatically, skills that encode quality workflows, and memory systems that carry context across sessions so you do not re-derive decisions.

This is compound context in service of quality. Each piece of infrastructure reduces the attention cost of the next session. After enough sessions, the standard maintains itself.


FAQ

Does this apply to all software projects?

The principle applies most directly to projects where AI agents do the implementation. In fully human-implemented projects, time and cost remain real constraints. The principle becomes more applicable as agent capability increases and human implementation time decreases.

What about prototyping?

Prototypes are disposable by definition. The quality standard for a prototype is “does it answer the question we are investigating?” If the answer is yes, the prototype served its purpose regardless of code quality. The principle applies to code that will persist, not code that will be discarded.

Is this just perfectionism?

Perfectionism is an infinite standard that nothing meets. Quality is a finite standard that the evidence gate defines: correct, clean, tested, regression-free, and solving the actual problem. Meeting the standard is achievable. Exceeding it is unnecessary. The standard is high but not infinite.

How do you handle technical debt?

By not creating it. Technical debt is deferred quality. When quality is the only variable, deferral loses its justification. The agent is available now. The fix costs the same now or later. There is no interest rate on agent-produced technical debt because there is no reason to incur it.


Sources

The philosophy described here draws on the Shokunin tradition of Japanese craftsmanship and the production experience documented across the AI Engineering series. Specific implementations referenced:

  • Evidence gate: six criteria for completion verification
  • Pride check: five questions for craft assessment
  • Hook system: 84 hooks as quality infrastructure (Every Hook Is a Scar)
  • Compound context: infrastructure that reduces the attention cost of quality (Compound Context)

Powiązane artykuły

The Evidence Gate

I believe and it should are not evidence. Every completion report needs a file path, test output, or specific code. The …

8 min czytania

What I Run Before I Sleep

Every night: 15,000 pages checked, TTFB measured, cache verified, sitemaps crawled. The goodnight routine is where opera…

7 min czytania

Why My AI Agent Has a Quality Philosophy

My Claude Code agent inherited every sloppy human habit at machine speed. I built 3 philosophies, 150+ quality gates, an…

27 min czytania