Quality Controls

Under the Hood: Canonical QC Objects, APIs, and Why Boring Integration Is the Goal

#api#architecture#aimqc#domain-model#integration#ai#compliance

David OlssonDavid Olsson

The best AI integration story is a boring one. An agent reads a well-typed object, proposes an action, and the system either accepts or rejects it at the same gate a human would hit. No special cases. No prompt engineering to compensate for missing structure. Just a clear domain model doing its job.

That is the design philosophy behind AIMQC's data layer.


Start with the objects

Construction QC has a natural domain model. Inspection plans. Inspection records. Non-conformance reports. Turnover packages. These objects exist on every project — in some form, in some combination of spreadsheets and PDFs and site apps. The problem is not that they are unknown. It is that they are almost never formally typed and linked in a system that enforces relationships between them.

When they are, the system gains properties that matter: an inspection record cannot be orphaned from the plan that required it. A non-conformance cannot be dismissed without a disposition. A turnover package cannot be marked complete while upstream items are outstanding.

This is compliance encoded as software. Not a checklist that someone fills out. Not a PDF that gets filed. A set of structural rules built into the system itself — rules that cannot be bypassed because there is no path around them. The regulations and standards that govern oil and gas construction QC describe what must happen. A well-designed domain model translates that obligation into code: if the condition is not met, the state does not advance.

Humans stay in the loop — by design

Encoding compliance structurally does not remove people from the process. It changes where their judgment is required.

A coordinator does not need to manually verify that every inspection record is linked to an ITP line item — the system guarantees it. What the coordinator brings is context, experience, and accountability that no domain model can replicate: recognizing when a technically valid record reflects something that does not look right on site, deciding whether a non-conformance disposition is adequate given the circumstances, signing off on a turnover package with full awareness of what it contains.

The goal is not automation for its own sake. It is to ensure that human attention lands where human judgment is actually needed — and that the structural burden of compliance is not something a person has to carry alone through a spreadsheet.

APIs as the contract

Once the domain model is clean, the API surface becomes the contract — not just for human-built integrations, but for anything that reads or writes to the system. Stable identifiers, typed requests and responses, explicit state transitions, event streams for downstream subscribers. Predictable interfaces built on known conventions are what make integration tractable over time — and what allow the system to grow without accumulating undocumented states and integration debt.

What this unlocks for AI

An agent working with a well-typed domain model does not need special handling. It can read an object, understand its relationships, identify what is missing or inconsistent, and propose an action — through the same interface a human-built client uses. The system's invariants apply equally regardless of who or what is making the request.

That bounded behavior matters. AI that operates within the same structural constraints as humans is auditable and correctable. Its actions leave the same kind of trace. Its proposals go through the same gates. The compliance guarantees that apply to a human coordinator apply to an agent as well — because the guarantees live in the domain model, not in the interface.

That is the point of encoding compliance as software. It does not just protect against human error. It creates a foundation that any future layer — reporting, analytics, AI assistance — can build on without compromising the integrity of what sits beneath it.


David Olsson is CTO at AIMQC. Contact: dolsson@aimqc.com

Powered by scsiwyg