THE SHAN LENS Systems Over Syntax

PART 4 · CHAPTER 17

Requirements in the AI Era

Better prompts are useful, but clear domain specifications are more reusable than clever phrasing.

12 min readSystems Over Syntax

Central idea: Better prompts are useful, but clear domain specifications are more reusable than clever phrasing.

Why this chapter matters

When AI can draft a seemingly complete implementation within minutes, the important question is no longer only whether the program can be written. It is whether someone can explain its behaviour, judge the trade-offs, verify real-world assumptions and operate it responsibly. This chapter of Systems Over Syntax develops that distinction with a concrete software engineering situation.

A requirement is not merely a sentence to turn into code; it is a constraint on acceptable observable behaviour.

It is helpful to separate a demonstration from a production commitment. Demonstrations show that a workflow can be expressed and executed. A production commitment adds obligations: correct behaviour under retry and failure, understandable ownership, measurable reliability, secure data handling, controlled change and a plan for recovery. AI can assist with all of them, but it cannot make an undefined business rule unambiguous by generating more code.

A practical engineering story

Situation. A product owner asks AI to add ‘fast checkout’ to an e-commerce site.

What can go wrong. The phrase omits timeouts, promotions, accessibility, retries and acceptable payment failure behaviour.

This is the important moment in the engineering story. A team can look at the running application, see successful output and reasonably feel optimistic. But the missing case is often not visible in the demonstration. It appears when a user retries an operation, two events arrive in the wrong order, a dependency times out, an administrator changes permissions, or real traffic behaves differently from development traffic.

Good specifications declare actors, preconditions, authorised transitions, failure responses and measurable acceptance conditions.

Before selecting a design, ask five questions:

  1. What outcome matters to the user? Define it without referring to a programming language or framework.
  2. What must always be true? Identify the invariants that protect business and technical correctness.
  3. What can fail? Consider duplicate requests, partial failures, invalid input, unavailable dependencies and conflicting updates.
  4. Who may decide or act? Make authorisation and accountability explicit.
  5. What evidence is sufficient? Decide how tests, logs, metrics or reviews will establish confidence.

These questions are useful whether the implementation is handwritten, AI-generated, assembled from managed services or built by a mixed human–agent team.

Designing the solution

Recommended approach. Express outcomes, actors, constraints, invariants and measurable acceptance tests in machine-readable form.

Concrete contract or example. Given a duplicate payment command, when the same idempotency key repeats, then no second debit occurs.

A useful design review should connect the business decision to executable evidence. Start by stating the expected behaviour in plain English. Then express the rule in a form a developer or an agent can implement, such as a state transition, contract, test case or access-control policy. Finally, determine which component enforces the rule and what happens if enforcement fails.

Natural language can remain the entry point, but authoritative rules must be precise.

A lightweight engineering decision record

Review itemQuestion to answer before release
Business goalWhat measurable outcome makes the change worthwhile?
Data and ownershipWhich system is authoritative, and who can modify the state?
PreconditionsWhat must be true before the operation is accepted?
Failure handlingWhat happens on timeout, duplicate submission or partial completion?
VerificationWhich independent evidence proves the rule works?
OperationsWhat will alert us to a failure, and how will we recover?

The table is intentionally short. A good engineering record does not have to be a lengthy document. It must preserve the decisions that someone else—human or AI—would otherwise have to rediscover.

Where AI helps, and where judgment remains important

AI is valuable for producing a first implementation, comparing alternative patterns, drafting tests, describing an unfamiliar library and identifying possible edge cases. The practical benefit is that engineers can examine more possibilities without manually writing each draft from scratch.

However, a generated solution can be internally consistent and still be wrong for the organisation. It may assume a different business policy, invent a missing constraint or select a design too complicated for the team to support. Even generated tests can merely confirm the same faulty assumption used in the implementation.

A disciplined workflow therefore uses AI as an accelerator inside the engineering process, not as a replacement for it. The person or team accountable for the result should be able to defend the design without pointing to the model’s confidence as evidence.

Failure analysis: test beyond the happy path

Suppose the initial version passes a basic demonstration. Before declaring the chapter’s example complete, challenge it from four angles:

  • Correctness: Try an input or event sequence that violates an unstated assumption. What exactly happens?
  • Security and permissions: Attempt the operation as an actor with insufficient authority. Does the trusted server reject it?
  • Recovery: Interrupt the workflow halfway through. Can it resume safely or roll back without corrupting state?
  • Maintenance: Imagine a second engineer changing this feature in six months. Can they discover the rationale and the acceptance tests?

A resilient system need not eliminate every possible failure. It must make important failures understandable, bounded and recoverable. The level of assurance should match the consequences: a hobby prototype and a financial transaction system should not have identical controls.

A focused exercise

Try this: Rewrite three ambiguous user stories as observable acceptance conditions.

Write down the expected result before asking AI to implement it. Then ask an assistant for two alternative solutions and a list of assumptions. Check those assumptions against your own requirements. Choose an approach and add at least one negative test—one that should prove an unsafe or incorrect behaviour is blocked.

Finally, explain the result in a short design note: what changed, why this option was chosen, which risks remain and what evidence would justify deployment. This is a better test of engineering understanding than measuring how quickly a complete file appears.

Key takeaways

  • Better prompts are useful, but clear domain specifications are more reusable than clever phrasing.
  • AI can reduce the effort of creating an initial solution, while integration, verification and operational ownership remain real work.
  • Domain rules, failure behaviour and access decisions should be explicit and enforced by trusted components.
  • Evaluate time to verified value, not just code-generation speed.
  • A good human–AI workflow makes assumptions visible and creates reusable evidence for the next change.

Questions for reflection

  1. Which assumption in this example would be most costly if it were wrong?
  2. How would you measure the difference between a fast implementation and a safe release?
  3. What additional context would allow another engineer—or an AI agent—to make a better decision?
  4. Which part of this workflow could be delegated, and which requires an accountable decision-maker?
END OF CHAPTER 17◉ THE SHAN LENS