Skip to main content
888-685-3101, ext. 2

The Documentation Inversion: Why Code Should Be the Last Artifact

Derek Nerenberg · 2026-04-14

There is a persistent belief in software development that documentation is a tax. Something you do after the real work is done. A checkbox on a definition of done that everyone agrees to and nobody enforces.

This belief made some sense when documentation was truly separate from design. Writing a specification document, handing it to developers, and hoping the code matched was legitimately wasteful — the document was outdated before the first commit.

But the premise has changed. AI-assisted development creates a new possibility: documentation that drives implementation rather than describing it after the fact.

The Traditional Sequence

In most development workflows, the sequence looks like this:

  1. Receive a requirement (ticket, user story, verbal description)
  2. Think about the approach (in your head, maybe on a whiteboard)
  3. Write the code
  4. Write tests (if time permits)
  5. Write documentation (if anyone asks)

The design thinking happens — it always does — but it is captured in the most ephemeral form possible: a developer's working memory. When the code is done, the reasoning evaporates. What remains is the implementation, which shows what was built but not why.

The Inversion

Intent-First Development inverts steps 2 through 5:

  1. Receive a requirement
  2. Conduct a design session that produces documentation artifacts (explanations, DDDs)
  3. Distill conventions into Skills
  4. Implement with AI that has access to all captured intent
  5. Code is the last artifact, not the first

The design thinking still happens — but now it is captured in durable, structured artifacts rather than evaporating after the coding session ends.

Why This Works Now

This inversion was impractical before AI-assisted development. Writing documentation before code, when a human developer was going to write the code anyway, added effort without clear payoff. The developer's working memory was sufficient for the task at hand.

AI changes the equation in two ways:

AI tools need context to generate good code. A human developer can hold architectural context in working memory. An AI tool cannot — it operates on whatever context it is given. Documentation is not overhead for AI; it is the input that determines output quality.

AI tools make implementation cheaper. When code generation takes minutes instead of hours, the relative cost of design and documentation shifts. Spending 45 minutes on a design session that produces clear intent, followed by 15 minutes of AI-guided implementation, is faster than spending 90 minutes of trial-and-error prompting that produces code without architectural context.

What Changes in Practice

The inversion is not just a reordering of steps. It changes what gets produced and who benefits.

Documentation becomes a design artifact, not a record. When you write documentation before code, the act of writing forces clarity. Vague thinking produces vague documentation. The discipline of articulating intent in structured form surfaces gaps, contradictions, and unexamined assumptions before they become embedded in code.

The design conversation becomes inspectable. Design decisions captured in DDDs are reviewable, auditable, and revisitable. A future team member can trace any architectural choice back to its rationale, the alternatives considered, and the constraints that drove the decision.

Onboarding costs drop. Every new team member — human or AI — starts with the documentation corpus. There is no dependency on tribal knowledge, no "ask Sarah, she knows how that part works."

The Objection

The obvious objection: "We don't have time to write documentation before coding."

This objection confuses documentation-as-tax with documentation-as-design. Writing a 20-page specification is slow. Conducting a focused design session that produces a one-page DDD, a half-page explanation, and a Skill with three conventions takes less time than the debugging session you will need when undirected AI code does not fit your architecture.

The inversion does not add time. It moves time from debugging and rework to design and intent capture — and the time investment pays dividends on every subsequent modification, extension, and onboarding event.

The Takeaway

Code should be the last artifact, not the first. Not because code is unimportant, but because code without captured intent is code that no one can confidently maintain, extend, or explain.

The documentation inversion is the structural foundation of Intent-First Development. Everything else — Diataxis organization, Skills, altitude-gated design sessions — exists to make this inversion practical and sustainable at enterprise scale.