← Back to all posts

Practitioner Notes

Your Product Specification Contains Python Functions. That’s a Failure Mode.

Craig Hankins, Besserhealth

We found Python function definitions with typed return values inside product requirement documents. We found SQL queries with multi-table joins. TypeScript interface definitions. Algorithm pseudocode with specific function signatures.

These weren't engineering documents. They were product specification documents.

Every one of those items violated what I now call the Lane Test: if a coding agent, given the behavioral intent, would produce that element on its own, it doesn't belong in the specification. The specification's job is to define what the product must do. The engineering team's job — and the coding agent's job — is to determine how it gets done. When those two lanes collapse into each other, the specification fails.

How It Happens

The pattern is predictable once you know to look for it. A product team works with an AI tool to produce detailed specification output. The AI tool is capable of generating both behavioral intent (what the product must accomplish) and technical implementation (how to accomplish it). Without explicit governance, it generates both. The product leader reads the output, finds it thorough and impressive, and approves it.

What's actually happened: the specification has crossed from product intent into engineering territory. And the cost of that crossing compounds over time.

Specifications that contain implementation details go stale when the implementation changes. Engineers who receive them have to navigate around technical content to find the behavioral contracts they actually need. Coding agents loaded with those specifications treat implementation pseudocode as authoritative — which means they may implement the specified approach rather than a better one. And a product specification that requires a software engineer to evaluate isn't functioning as a product specification.

The Lane Test

The Lane Test is a single question applied to every element in a specification before it proceeds downstream: would a competent coding agent, given the behavioral intent, produce this element without being told to?

If yes — exclude it. Python return type dictionaries, SQL join logic, algorithm function signatures, interface definitions — a coding agent produces all of these from behavioral intent. They don't belong in the product specification.

If no — it belongs in the specification. User persona definitions, acceptance criteria, safety boundaries, negative constraints (what the product must not do), error state behaviors, handoff conditions — these require product judgment to specify. A coding agent won't produce them accurately from context alone.

The Lane Test isn't subjective. It's a binary check applied to every specification element.

What the Violations Actually Cost

On a recent healthcare AI engagement, a technical review found that implementation-level content had accumulated systematically across multiple specification workstreams. This wasn't isolated to a single document or a single session. It was a drift pattern — each session adding slightly more technical detail to what were intended to be behavioral specifications.

Lane boundary violations create three specific downstream problems.

First, rework surface area when the implementation changes. If a product specification describes a specific function call, and the engineering team implements the function differently — correctly, from their perspective — the specification is now wrong, even though the product intent hasn't changed.

Second, specifications that can't survive engineering iterations. A behavioral specification remains valid through multiple implementation cycles. An implementation specification becomes stale the moment the implementation diverges.

Third, blurred accountability. When the specification contains implementation content, the boundary between product decisions and engineering decisions becomes unclear. Both waste time resolving ambiguity that clean lane separation would have prevented.

What Belongs in a Product Specification

The standard is precise: a product specification should contain every behavioral contract that defines how the product must behave, and nothing that defines how the product is built.

Behavioral contracts include: what the user can do and what happens when they do it; what the system must accomplish and under what conditions; what the product must not do (negative constraints are often the most load-bearing content); how the product behaves under error conditions and edge cases; what the acceptance criteria are for each capability.

Behavioral contracts do not include function signatures, database schema, API response shapes, algorithm implementations, or any other technical decision that engineering is better positioned to make.

When in doubt, apply the Lane Test.

The Shorter Specification Is the Better Specification

The counterintuitive result of applying the Lane Test consistently: specifications get shorter. Significantly shorter. And shorter specifications are better specifications.

Shorter means the engineering team can find the behavioral contracts without navigating implementation noise. Shorter means coding agents can load the full specification without context degradation. Shorter means revisions require updating behavioral contracts, not untangling implementation detail that was never a product decision to begin with.

The specification a product leader is proud of because it's comprehensive may be the specification that engineering can't use because it's trying to do two jobs at once.

The principle: The specification's job is to define what the product must do. Apply the Lane Test to every element. If a coding agent would produce it from behavioral intent, it doesn't belong in the spec.

Frequently Asked Questions

What is the Lane Test in product specification?
The Lane Test is a check applied to every element in a product specification: "Would a competent coding agent, given the behavioral intent, produce this element without being told to?" If yes, it doesn't belong in the product specification. If no, it's load-bearing product content that belongs in the spec.

Why do product specifications drift into implementation territory?
AI tools capable of generating both behavioral intent and technical implementation will generate both unless explicitly constrained. Without active lane governance, specification sessions accumulate technical detail that feels thorough but crosses into engineering territory. The drift is usually gradual and only becomes visible when specifications go stale at the wrong moment.

What should a product specification actually contain?
Behavioral contracts: what the product must do, under what conditions, with what acceptance criteria, and with what negative constraints. It should not contain function signatures, database schema, algorithm implementations, or any technical decision that a capable engineering team and coding agent should be trusted to make.

What happens when product specifications contain implementation detail?
They go stale when implementations change, even when the product intent hasn't. They require software engineers to evaluate content that isn't their decision to make. They cause coding agents to treat prescribed implementation approaches as authoritative — sometimes at the cost of better implementations. And they blur the accountability boundary between product and engineering.

Written by Craig Hankins, Besserhealth LLC

← Back to all posts