Wink Pings

When AI Writes Code, Acceptance Criteria Matter More Than the Code

Declarative software factories turn “done” into a verifiable engineering artifact. Qodo CEO Itamar Friedman proposes a new framework, shared and recommended by Harrison Chase.

When AI Writes Code, Acceptance Criteria Matter More Than the Code

Imperative interfaces require you to describe every step:

Create three agents. Assign tasks. Implement the feature. Run tests. Fix failures. Open a PR.

Declarative interfaces only require you to describe behavior and boundaries:

Add this capability. Preserve the existing API contract. Enforce tenant isolation. Follow architectural standards. Provide evidence that acceptance passed.

The difference is where the specification lives. The system gets room to choose its execution strategy, while acceptance criteria remain explicit.

This is the framework proposed by Qodo CEO Itamar Friedman in a new article, “The Declarative Software Factory.” The article cites Harrison Chase’s “knowledge factory” perspective: all agents inside LangChain—GTM, content agents, LangSmith Engine—have similar learning loops. Harrison himself also shared this article.

“Done” Has to Be Stated Clearly

“Keep customer data secure” is too broad to serve as an acceptance criterion. Assessable requirements look like this:

  • Existing API clients keep the same documented behavior.
  • A user in one tenant cannot retrieve another tenant’s records.
  • Authorization changes require approval by a designated reviewer.

Each requirement maps to a check. Contract tests verify compatibility. Negative tests attempt to cross tenant boundaries. Security reviews cover paths that tests miss. Approval records capture who authorized sensitive changes.

Independent review is irreplaceable. When an agent misunderstands a requirement, it may write both the code and the tests based on the same wrong assumption. Independent review can catch this kind of mistake.

“Passing” is not the finish line. It is evidence for a release decision. The strength of that evidence depends on check coverage, validity, and whether checks were run against the version being released. Trust comes from evidence being auditable—including its limitations.

Standards can conflict, and some decisions require human judgment. The factory needs to surface these ambiguities and route them for handling. A curator agent can propose clarifications or updates, while engineering owners remain accountable for requirements and controls.

The typical structure of an imperative factory puts execution on the table: coordinating agents, checking work, handling failures, releasing, and improving the process. A declarative factory adds two layers to this loop: intent defines acceptance criteria, and guardrails constrain execution. Verification produces evidence, and evidence supports release decisions.

The Execution Layer Still Needs Engineering

Declarative interfaces depend on the execution process. Someone has to engineer planning, permissions, isolated environments, tools, retries, review, and release controls. The factory is declarative on the outside and imperative on the inside.

Friedman considers Mihail Eric’s architecture a practical combination of “declarative configuration + imperative execution.” Mihail’s core principle: agent readiness comes first—agents need tool access, isolated environments, and a repo that can be started and verified.

Defining “Done” Requires Iteration

Tenant isolation defects often escape because a background export job takes a different authorization path. Fixing the code solves the immediate problem. Adding regression tests and updating review standards is what carries the lesson into future changes.

“Define once” does not work. The correct loop is: define, execute, verify, observe, and revise. Changes to acceptance criteria should be made carefully, especially when they loosen controls.

The full operating model is closed-loop: production issues enter triage, and telemetry feeds back into review changes defined by the factory. Metrics cover both delivery and quality: cost per accepted change, cycle time, human intervention, escaped defects, and rework. Only by looking at these metrics together can you judge whether greater autonomy leads to better software.

Transition Step by Step

Start with bounded tasks and explicit workflows. After agents demonstrate reliable results, gradually open up autonomy in planning, implementation, and recovery.

Different parts of the factory can move at different speeds. Implementation may be highly autonomous, while sensitive changes retain required approval and release processes. The pace of transition depends both on AI capabilities and on our ability to verify results.

Engineering responsibility is shifting. More effort goes into specifying outcomes, maintaining standards, designing verification, and deciding where human judgment belongs.

Defining and verifying “done” is becoming the most important engineering object.

发布时间: 2026-11-23 17:14