Project Code Name: EDF

Stopping Agent Drift: From Modifying Existing Workflows To Native Agent Repo Systems

An experimental archive on human-machine collaboration, documenting how I rebuilt product development protocols through code.

From Efficiency to Chaos: Two Core Problems

Problem 1: Semantic Isolation in Files

Traditional canvas tools and prose documents are designed for 'human eyes'. Agents cannot directly read structured semantics, leading to massive interpretation costs.

Problem 2: Intent Drift in Long Contexts

Even when AI writes code directly, business rules and fallbacks are easily forgotten after 20 rounds of chatting. The faster the local generation, the worse the systemic drift.

To solve these issues, I conducted two phases of practical exploration through EDF:

Case 1

Experiment 1: Optimizing Single Workflows & Making Everything LLM-readable

The first step of AI intervention is transforming scattered visual/text assets into structured state trees that LLMs can understand.

Step 1: Visual Isolation
Pixels and canvas in human design tools
AI only sees flat pixels
Step 2: Semantic Tree Extraction
DOM Tree / JSON extracted via tools like Pencil.dev
Converted to LLM-readable formats
Step 3: Flawless Compilation
Precise React components derived from JSON semantics
Bidirectional sync of design and code
Case 2

Experiment 2: Fighting Drift with Systematic Constraints (Repo SSOT)

Optimizing single workflows is not enough. Product intent must be embedded directly into the code repository as a Single Source of Truth to act as strict cross-layer constraints.

1. Data / Schema Layer
Defines absolute types for core fields (e.g. user.id must be uuid).
2. Contract / API Layer
Imports Data and enforces preconditions (e.g. must handle 409 errors).
3. Interface / UI Layer
Frontend is forbidden from inventing states. All rendering must derive from the Contract.
The UI isn't allowed to think for itself; all states are derived from the contract.

What's Next

EDF 3: From Static Specs to Runtime Guardrails

Documentation is eventually forgotten; only code executes. The next phase of EDF isn't just writing specs in Markdown, but compiling them into actual runtime guardrails.