Idea

An ontology extracted from existing code by reverse engineering provides candidates to check, not a validated business model

Info

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

Main idea

On a product with ten years of code and business rules scattered all over the place, you can start by extracting, through reverse engineering, the concepts and relationships the code seems to embody. That first ontology is then held up against the business experts.

That step is not a formality: the code presents intentional rules, historical constraints and accidental behaviours in exactly the same way. Only those who know the business can tell them apart. Then come consolidating the invariants, protecting them with tests and better separating responsibilities — starting on a controlled scope, then widening the agents' autonomy as the foundations become more solid.

Why it matters

It prevents you from taking what the code does for what the business wants, at the very moment you are writing the model that will be used to check the agents.

Nuances and limits

The upfront investment can be considerable. It does not only serve the agents: developers get a clearer view of the domain, and the team depends less on the memory of a few people.

There is no need to rewrite a product before entrusting the slightest development to an AI.

Open questions

  • What signs in existing code suggest that a behaviour is accidental rather than intentional?