Skip to content
atif.hossain
Toggle menu
← All work

AI-agent infrastructure

Signature work

Documentation-as-runtime for AI coding agents

Sudoblock · 2025

Every
session context-loaded
4
context artifacts (model, invariants, ERD, contracts)
Deterministic
context routing

The problem

AI coding agents hallucinate and drift when they lack a precise model of the system they're changing. Pointing an agent at a large codebase and trusting the result usually doesn't work — the specification gaps are where it goes wrong.

The approach

  • Structured the domain model, system invariants, ERD, and API contracts as machine-readable context, loaded at the start of every agent session.
  • Built a multi-agent governance layer: intent-driven directory hierarchies with trust levels, and AGENTS.md routing contracts that form deterministic context chains.
  • Cross-linked the documentation so agents navigate it autonomously and load only the context relevant to the task at hand.

The outcome

  • Agents reason about the platform's architecture on their own, instead of guessing.
  • The specification gaps that cause hallucinations are closed at the source.
  • Production-grade code ships from agent sessions, with humans reviewing rather than rewriting.

Stack

AI coding agentsAGENTS.mdDomain modelingTypeScript

Have a problem like this?

Let’s scope it on a free 20-minute call.