The Ghost Library: Unpacking dbreunig/whenwords

How a repository with zero lines of executable code became a bulletproof, language-agnostic time formatter for the AI era.

6 min read • View on GitHub • More from dbreunig

These capabilities are raising all sorts of questions, especially: "What does software engineering look like when coding is free?"

Drew Breunig, Creator · A Software Library with No Code
Key Takeaways
A transparent glass book with glowing blueprints inside, sitting next to solid black books.
The ghost library: structural rules without physical substance.

The Repository Without Code

You clone the repository. You open your editor, expecting to find JavaScript, Python, or Rust. Instead, you find Markdown and YAML. There is no executable code in dbreunig/whenwords. It is a "ghost library"—a set of functional requirements for relative time formatting (like "3 hours ago") that relies entirely on a local LLM to materialize the actual implementation.

Rather than distributing a pre-compiled binary or a script, the repository treats the specification as the distributable asset. The developer provides the repo's files to an AI coding assistant, which then generates a native, zero-dependency implementation in whatever language the project requires.

The prompt-install pipeline: turning a single specification into N native implementations.

When Coding Becomes Free

The concept originated as a thought experiment by creator Drew Breunig. If large language models can write boilerplate code flawlessly, the value of a utility library shifts. The implementation becomes a commodity; the true value lies in the edge-case definitions and the test suite.

Portrait of Drew Breunig, creator of whenwords.

By defining a single, tightly constrained set of rules, Breunig ensures that a Python backend and a Swift iOS app will format "22 hours ago" identically, without sharing a single line of code.

Bypassing the Package Manager

The traditional dependency model (npm, pip, cargo) requires downloading third-party code, managing version conflicts, and accepting supply chain risks. whenwords bypasses this entirely. You don't install it; you "prompt-install" it.

A massive industrial crane dropping a tiny gear into a warehouse, contrasted with a sleek 3D printer instantly creating the same gear on a clean desk.
Downloading a massive dependency tree for a tiny utility vs. generating exactly what you need locally.
FeatureTraditional LibraryGhost Library (whenwords)
Distribution UnitCompiled Binaries / Source CodeMarkdown Spec + YAML Tests
Supply Chain RiskHigh (third-party code execution)Zero (local generation)
Language PortabilitySingle LanguageUniversal
Bug FixesPull from upstreamRegenerate via prompt

The 125-Lock Vault

The obvious skeptical question is: "What if the AI hallucinates?" The repository solves this through strict architectural purity and rigorous validation. The SPEC.md file mandates that all functions must be pure—no side effects, no system clock access. The reference time must always be passed as an argument.

The true compiler is the tests.yaml file. It contains 125 test cases covering tricky boundary conditions (e.g., distinguishing between 44 seconds and 45 seconds). The AI is instructed to generate the test suite first, then write the implementation to pass those tests. This Test-Driven Generation (TDG) ensures the output is functionally bulletproof before it ever reaches production.

A mechanical caliper measuring a newly cut gear against a perfect metal mold inside a sealed glass box.
The tests.yaml validation layer ensures the generated code perfectly matches the specification.
# Excerpt from tests.yaml
- function: timeago
  input: { timestamp: 1735689600, reference: 1735689644 }
  expected: "just now"
- function: timeago
  input: { timestamp: 1735689600, reference: 1735689645 }
  expected: "1 minute ago"