datpaq/blog

#documentation

Posts tagged documentation from the Datpaq team.

Blog/July 21, 2026/By James Fletcher

Undocumented Code = Unemployed Agents

AI agents don't just need your code—they need your documentation. As software shifts from human-driven to agent-driven, undocumented systems become systems that can't be safely operated. Meet Phil, the documentation strategy we built from day one.

We Named Our Documentation. It's Phil.

Not something we added later because someone asked for it.

From day one, we designed DATPAQ with the intention of eventually handing this kind of work off to Phil. That meant doing the hard part early, back when it would've been easier to skip it and just ship.

Two years in, that's the decision that's paying off.

Here's why it mattered enough to name.

The Reader Isn't Always Human Anymore

You hired the agent. You gave it the tools, the access, the job.

It shows up ready to work, opens your codebase, and hits a wall on step one: nobody wrote down what any of this does.

So it sits there.

Guessing—or worse, doing something wrong with total confidence.

Not because the agent is bad at its job.

Because you never actually gave it the job.

You gave it code a human was supposed to translate for it, and the human isn't in the loop anymore.

Documentation Used to Be Optional

A year ago, if you skipped documenting a function, the worst case was someone rolling their eyes during code review.

Annoying, not fatal.

The person reading your code was another human. Humans fill in gaps. They read get_user(id), shrug, and either figure it out from the implementation or walk over and ask you.

That assumption is gone now.

The next reader of your code might not be a person at all.

Same Function. Completely Different Outcome.

# fetches a user
def get_user(user_id):
    ...
def get_user(user_id: str) -> UserResponse:
    """
    Params:
        user_id (UUID string, required)

    Returns:
        UserResponse | ErrorResponse

    Errors:
        404 not found
        429 rate limited
        401 unauthorized

    Idempotent:
        Yes. No side effects.
    """

Same logic.

Same function.

But the first version only works if the reader can infer.

The second works even if the reader can't infer anything at all—and that's exactly the position an AI agent is in.

No hallway conversation.

No Slack DM.

No "Hey, what's this supposed to do?"

If it isn't written down, as far as the agent is concerned, it doesn't exist.

Phil Is No Longer a Nice-to-Have

That's the whole shift.

Phil used to be something that made onboarding faster.

Now he's the interface an AI agent uses to operate on your codebase.

Skip him, and you're not just creating technical debt.

You're building something an agent literally cannot operate.

It's More Than Function Signatures

Types and error codes describe the shape of a function.

They don't explain why it exists.

Two more layers have to be documented, or the agent is still guessing.

How to Run It

Environment.

Setup.

Dependencies.

What "working" actually looks like.

A function signature tells you what comes back.

It doesn't tell you how to get the system into a state where calling that function means anything.

Why It Works This Way

This is the part almost nobody documents.

What tradeoff does this implementation encode?

What breaks if someone "cleans it up"?

Human teams absorb this knowledge through code reviews, conversations, and institutional memory.

An AI agent gets none of that unless someone intentionally writes it down.

The "why" is the hardest part.

Almost no company documents it consistently—even for their own engineers.

The New Production Requirement

More on how Phil actually works later.

For now, here's the takeaway:

If Phil can't survive an AI agent trying to operate from documentation alone—with zero human in the loop—that isn't a documentation gap anymore.

It's a production stop waiting to happen.

Undocumented Code = Unemployed Agents | DATPAQ