Idea

A gap between the code and the domain model can only be judged by relating it to the intent behind the request

Info

Originally written in French. Translated by AI — the meaning has been preserved, not the prose.

Main idea

Comparing the code with the business ontology lets you see a gap, not say what it is. To judge it, you need a third element: the intent, that is, what the developer asked the agent to do.

In an ERP whose ontology says an order must always originate from a quote, Claude Code introduces the ability to create an order directly. The code and the ontology now contradict each other. If the developer had explicitly asked for the quote to be made optional, the code respects the intent: it is the model that has to change, and you have to look for the other places in the software that still assume the quote is mandatory. If nobody had asked for it, the same gap is suspicious, and it is the code that has to be fixed.

The gap is identical in both cases. Only the intent tells them apart.

Why it matters

It rules out the two symmetrical wrong answers: rejecting any change that contradicts the model, which freezes the product; and accepting whatever the code does, which turns the model into an accommodating description. An inconsistency is not always a bug: it can signal a deliberate transformation of the business, which the system should make explicit and traceable rather than prevent.

Nuances and limits

The intent is not always clear. An ambiguous request settles nothing, and the right behaviour is then to ask for a decision rather than invent a rule.

The setup also assumes that the intent is kept somewhere — the request made to the agent, the task's directives — and is readable at the time of the check.

Open questions

  • Where should a request's intent be kept so that it is still readable when the gap is discovered, sometimes weeks later?