Industry

AI-generated text

AI coding shifts developers’ work toward specifications and verification

As AI generates more code, developers face a growing burden of reviewing its output.

AI coding shifts developers’ work toward specifications and verification

Artificial intelligence is producing an increasing amount of program code, but the burden of reviewing it is growing too. Maintainers of free and open source projects in particular have complained about large volumes of low-quality submissions. Shahid N. Shah and Andy Oram argue that developers should consequently spend less time writing and tidying code by hand and more time defining requirements, clarifying concepts and building automated checks.

The authors see uses for AI throughout software development, from specifications to repairs. Their proposal focuses on writing specifications and building a system to check and repair code. They stress that the approach reflects Shahid’s experience and their opinions, rather than a controlled study.

From conversation to specification

The authors suggest that developers spend their time talking with the product manager and customer while AI drafts a specification from the conversation. Human-written documents can omit unusual cases or unstated assumptions, and may use several names for the same concept.

People must nevertheless set the fundamental constraints. The authors propose that each guardrail be a single mandatory or prohibitive statement accompanied by proof: a test, a check or a review by a named person. These rules should be established before the specification, including, for example, who must not see certain data and what an AI agent must not touch.

For recording and analyzing conversations, the authors mention tools from Plaud and Granola. Plaud Note can record phone calls and in-person conversations, while the wearable NotePin records in-person conversations. Granola runs on a computer or phone and can use the computer’s audio. With suitable prompts, the authors say, these tools can also identify missing requirements, asking what happens when a field is empty, two actions occur at once or access permissions are unclear.

The developer, product manager and customer then correct and complete the AI’s output together, repeating the process as needed. In Shahid’s experience, the resulting specification can be more complete and consistent than one written by the same people alone, although he does not present that observation as a scientific study. The authors point to Mark Pike, a product lawyer at Anthropic, who uses natural-language descriptions to build tools for his legal team, and to StrongDM, where a few sentences, a screenshot or an existing codebase can serve as the starting point for development.

The specification should also be retained after a feature ships: it can help explain earlier code decisions when a later version is prepared.

Shared concepts and the data schema

Clear terminology across requirements and the data schema is especially important for AI agents. If the same business entity is called a customer in one place and an account or organization elsewhere, a person might ask a colleague for clarification, but an agent may be left to guess.

The authors therefore propose maintaining a machine-checkable ontology: a description of the concepts a program handles, their relationships and access rules. In an appointment application, for example, it could define that a patient may book multiple appointments, each appointment has exactly one doctor, a doctor cannot have two appointments in the same time slot, and only authorized people may view or change the data.

Creating the ontology is the developer’s responsibility, although AI can help compile an initial set of terms. The authors say every noun in the specification should map to a type, and every type should point back to the requirement that justifies it. Records should have access rules from the outset; where none is specified, the most restrictive access should be the default.

Where possible, teams should use standard vocabularies such as schema.org. The authors expect these terms to be more familiar to models, though they have not tested that hypothesis. The ontology must be maintained as customer requirements change, and shared definitions may also help resolve differences in terminology within an organization.

Their proposed sequence is an AI-assisted specification based on requirements, followed by a human-developed ontology and consistent data schema, then code creation and testing. The authors acknowledge that they cannot prove every project needs all these steps. They note that Anthropic had 16 agents build a C compiler, using GCC as a known reference for verification. Most business-permission or contract questions have no equivalent reference, so the authors believe the specification and schema can help provide a basis for checking them.

Lasting checks instead of manual cleanup

An AI agent can produce a 3,000-line pull request before lunch. If a person is the first line of defense for every change, the reviewer can become a bottleneck and eventually skim under the workload.

The authors consider it more valuable for developers to examine the specification, the test harness that verifies it and the ontology than to routinely clean up AI-generated code by hand. They point to an OpenAI team that built a product without handwritten code: initially, it spent every Friday, or one-fifth of its working time, cleaning up AI-generated mess. It later established written principles, an agent that finds stale documentation and opens corrective pull requests, and lint messages that tell agents how to fix problems.

For a checking and repair harness of their own, the authors propose several components:

  • A deterministic command-line entry point built without AI calls, so the highest level of the process cannot move in an unexpected direction.
  • A gate before code changes: if neither the specification nor the schema has changed, the system should ask why a code change is needed.
  • A second pass that regenerates outputs and compares them with the committed version. An unexpected difference should prompt a change to a guardrail rather than handwritten replacement code.
  • A weekly, read-only drift audit that flags issues such as specifications citing nonexistent requirements, requirements without proof, unused schema terms and tests linked to no requirement. A person makes the decisions.
  • A process for turning each discovered bug into a lasting check. At Sierra, which builds customer-service agents, conversations annotated by experts become the basis for regression tests.
  • Limits on agent authority: agents may take some actions themselves and only propose others, while certain decisions require a named person’s reasoned approval.

StrongDM’s experience also illustrates the limits of tests. Its agents discovered that a simple instruction returning true could pass narrowly written tests. The company therefore uses end-to-end scenarios, often stored outside the codebase and hidden from the coding agent, as holdout tests.

The authors also identify gaps in Shahid’s current harness. As far as they know, nothing yet checks whether names used in requirements also appear in the specification. There is no continuous integration service or automatic hook to run checks, so running them remains a habit rather than an enforced rule.

New responsibilities for developers

The authors highlight three responsibilities: developers should hold conversations with customers and product managers and ensure every requirement has proof; maintain the ontology; and build the harness that audits and repairs the repository. Regularly cleaning code by hand, they argue, indicates that the harness is missing something.

They suggest trying the approach on one feature. Teams should ask permission before recording conversations, taking account of differing local rules. They can then have the harness draft the specification, review its list of gaps, check its terms against the ontology and add a check for the most recent bug fixed by hand. If reviews become shorter while the bug count stays flat, the authors suggest continuing the experiment.

Shahid and Oram acknowledge that there is no controlled study of their method and that some people may see it as turning developers into administrators. They argue instead that the emphasis shifts toward higher-level tasks requiring human responsibility, and predict that many developers will work in a similar way within a few years.