This article explores an architectural challenge at the threshold of the MCP (Model Context Protocol) era: "How can AI agents grasp and handle our data without misunderstanding its intent?"
In the past, merely using formats like Protobuf or JSON to exchange data between clients and servers was sufficient. Human developers could read the code and infer the context. However, the entity reading code and suggesting business logic is rapidly shifting to AI agents like GitHub Copilot and Cursor.
This introduces a critical problem.
"I told the AI agent to write the shop purchase logic (Request: Use this data model to write the shop purchase logic), but the agent indiscriminately mixed client-only UI data with backend-only database tables."
1. The Cause of Failure: Data Lacks 'Identity'
In most traditional IDL (Interface Definition Language) environments, all objects are treated as equal structs or messages.
- Fixed design data managed by designers in Excel (e.g., item specs)
- Transactional data exchanged between server and DB (e.g., current gold balance)
- Temporary rendering data for the client UI
Under the old paradigm, these three types of data show no visual distinction in code. Human engineers rely on names or documentation to understand the context, but to an AI agent, they are all just "identical byte blobs containing a few fields." Naturally, because their structures are identical, the AI mixes them up and ruins the logic.
2. The Solution: Structures Capable of 'Meta-cognition'
Traditional keywords like struct or message are faithful in defining the technical form of data (arrays, integers, strings), but they fail to capture the intent behind how that data is used within the system.
Instead of just introducing new keywords, a "meta-cognitive" approach is needed—one where, even if the underlying data structure remains identical, semantic encapsulation minimizes cognitive errors for both humans and AI. For example, redefining a standard struct as a record or table based on its nature implies its "principles of use" at the syntax level.
// record: Technically a struct, but informs humans and AI that it is an 'immutable value state' shared across the system.
record Vector3 {
1> float x
2> float y
3> float z
}
// entity: Specifies that it's not just a data clump, but a 'living actor' with a unique ID flowing through system swarms.
entity PlayerContext {
1> string session_id = ""
2> int32 level = 1
}
// table: Defines 'design data' that serves as an external reference and must not be modified at runtime.
table<ItemSpec> = { key: "item_id" }
When such a structure is introduced, the system pipeline automatically provides the AI with a powerful metadata guide: "This data is defined as a table, so do not generate logic that modifies its values at runtime." This moves beyond technical type checking; it is the process of communicating the designer's Intent to the machine.
3. Structural Evolution: From "Code Generator" to "AI Control Plane"
The era of simply parsing bytes is over. With semantic declaration structures applied, the infrastructure no longer acts as a simple 'data pump' but serves as the Control Plane for the entire architecture.
-
Imbuing Context to Agents: When an AI bot connects to the server via MCP, the context that "this object is an
entityand must only be manipulated via state-change APIs" is injected in zero milliseconds. -
Defending Against Hallucination: When the AI attempts to write code modifying fields of design data (
table), the IDE or compiler blocks the malfunction at the source, stating, "This object is read-only reference data."
Conclusion: Let the Data Speak Its Intent
In the era of AI-driven development, a data communication framework must not remain a mere delivery courier moving data from A to B. It must forcibly require, from the Syntax Layer upwards, that the data itself clearly declares: "For what purpose was I created, and how must I be handled?"
Only when this Identity is guaranteed can human engineers and AI agents accept each other's intents without misunderstanding, expanding the system at destructive speeds.
Continues in the next article:
In [AI Lost in the Fragmented IDL Pile: Building a Single Context Hub with 'Unified AST'], we examine the technical sleight-of-hand needed to gather highly fragmented legacy systems (Protobuf, Thrift, Excel) into one place and deliver them to the AI before issuing these identity cards.
Project DeukPack
This article series is based on the design notes of DeukPack, an open-source infrastructure created to block data fragmentation and guarantee AI agent reliability.
- GitHub: DeukPack OSS
Top comments (0)