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.

These capabilities are raising all sorts of questions, especially: "What does software engineering look like when coding is free?"
- whenwords distributes a specification and test suite instead of executable code, relying on local LLMs to compile the logic.
- By enforcing pure functions and providing 125 language-agnostic test cases, the library guarantees deterministic output across any programming language.
- This 'prompt-install' model eliminates supply chain risks and dependency bloat, pointing toward a future where utility code is materialized on demand.
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.
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.
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.
| Feature | Traditional Library | Ghost Library (whenwords) |
|---|---|---|
| Distribution Unit | Compiled Binaries / Source Code | Markdown Spec + YAML Tests |
| Supply Chain Risk | High (third-party code execution) | Zero (local generation) |
| Language Portability | Single Language | Universal |
| Bug Fixes | Pull from upstream | Regenerate 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.
# 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"