After AI Writes Code, Who Defines “Done”?
The stronger AI capabilities become, the more software development can be expressed declaratively: describe goals, constraints, and acceptance criteria, and let the system decide how to execute. But the prerequisite is that you must first write a clear definition of “done.” Itamar Friedman breaks this down in “The Declarative Software Factory.”
Itamar Friedman published a long article titled “The Declarative Software Factory”. A software factory can be understood as an engineering pipeline that combines AI agents, tools, checks, and release controls. He puts forward a judgment: the stronger AI capabilities become, the more software development can be expressed declaratively. As AI agents (systems that can plan, modify code, and run tests on their own) take on more development work, the definition of “done” will become the core of this system.
Imperative means you tell the system how to do every step: create three agents, assign tasks, implement features, run tests, fix failures, open PRs. Declarative means you tell the system what is wanted and where the boundaries are: add this capability, preserve the existing API contract, enforce tenant isolation, comply with architecture standards, and provide evidence that acceptance criteria pass. The place of the specification changes; the system chooses the execution strategy itself, and you write “done” clearly.
He cites Harrison Chase’s “knowledge factory” to frame this learning loop, and also mentions Mihail Eric’s software factory architecture, considering it a practical combination of declarative configuration and imperative execution.
But “done” is hard to define. He gives the example of a multi-tenant data service. Statements like “keep customer data secure” cannot serve as acceptance criteria. They must be broken down into verifiable requirements:
- Existing API clients retain the same documented behavior
- A user in one tenant must not be able to access another tenant’s data
- Authorization changes require approval from a designated reviewer
Each requirement corresponds to a type of check: contract tests check compatibility, negative tests check cross-tenant access, security review checks paths missed by tests, and approval records show who authorized sensitive changes. A check passing is evidence for a release decision. The strength of the evidence depends on what the check covers, how effective it is, and whether it has been run against the version to be released. Trust comes from evidence being inspectable, including its limitations.
Under the declarative interface, there still has to be an execution process. Planning, permissions, isolated environments, tools, retries, review, and release controls all have to be engineered by someone. Some steps must remain mandated: sensitive changes require independent review, credential access must be restricted, and approval is required before deployment. These controls define the agent’s boundaries.
The definition of “done” is not something you set once and forget. He gives the case of a tenant isolation defect escaping: a background export job took a different authorization path. Fixing the code only handles the incident; adding regression tests and updating review standards is what turns the lesson into part of future changes. So the loop is define, execute, verify, observe, revise. Relaxing controls requires particular caution.
Transition should be gradual. First give agents bounded tasks and explicit workflows; after they are reliable, give them autonomy in planning, implementation, and recovery, accompanied by checks, evidence, and human oversight. Different parts of the software factory can advance at different paces: implementation can be highly autonomous, while sensitive changes still go through mandated approval.
After the article was published, replies from several developers added detail. A user named MartinS highlighted the sentence “provide evidence that acceptance criteria pass,” saying evidence should point to lines of code and tests, not a summary saying “it passed.” The former you can inspect; the latter is just another thing that requires trust. Biscuit said they write down what “done” looks like before the bot runs. Itamar responded: this is a best practice for a single agent run; now the same thing needs to be done for the entire software factory. Daniel Lenton proposed a validation method: use the updated review standards to review old code that has caused incidents, but without adding new regression tests first, to see whether reviewers can actually find the bug.
Engineering responsibility is shifting. Itamar expects that more engineering effort will shift toward specifying outcomes, maintaining standards, designing verification, and deciding where human judgment is needed. Agents handle execution; the factory ensures that work is accountable to requirements and evidence. The stronger the autonomy, the more defining and verifying “done” becomes the core of software engineering.
发布时间: 2026-11-23 06:58