What is NAPL
The prompt is the source of truth. A coding agent generates per-target code, attributed sentence by sentence and locked read-only.
NAPL asks one question: what if the prompt was the source code?
You don't write code. You write what you mean, in English, in a .napl file:
The example above is live. The prompt on the left is editable, with the CLI's own
validator squiggling errors as you type; the code on the right is what
napl gen typescript actually produced from it. Try deleting the module: line and
watch the validator object before any CLI ever runs.
What the toolchain does that a chat window doesn't
Anyone can ask a model for code. The problem is everything after: the chat scrolls
away, the code stays, and nobody remembers why any line exists. NAPL inverts that. When
you run napl gen <target>, a coding agent:
- writes a real project and iterates until the tests you declared pass: the tests are data in the prompt's frontmatter, not an afterthought;
- maps every sentence to the exact lines that implement it. Hover a sentence in the example above to see them. If the agent can't prove that mapping, the build fails: attribution is a hard gate, not a nicety;
- locks the result read-only. Edit the generated code by hand and
napl statusreports drift and exits non-zero, so your CI catches it.
The English stays the source of truth. The code becomes a build artifact: inspectable, tested, traceable, never hand-edited. To change behavior, you change the prompt.
The compile is a dialogue
Gen doesn't only emit code. The model writes back into the margin of your prompt (a
.mapl file per module) flagging where your words were unclear (ambiguity, a red
squiggle), what it decided that you left open (assumption), and why the code came
out as it did (note). A prompt change that produces no code change must say why, or
the gen fails: silence is forbidden. Ambiguity becomes a first-class compile diagnostic,
the way a type error is.
Quickstart
Install, write a prompt, generate tested code: five commands.
Writing prompts that hold
Spec vs prose, tests as a gate, and which sentences are load-bearing.
Source
The napl toolchain's own Rust source, generated from prompts all the way to a fixed point.
Status: wild experiment, a bet that English can be a real programming language if the toolchain enforces the discipline compilers used to. The voice here is honest and experimental; expect sharp edges, and see Running it for real for what the coding agent actually needs on your machine.