Cupel
English specs to Go tests, via Claude
Cupel turns an English-language specification into Go tests by calling Claude, and writes them into a goforge component. For one spec it produces three styles of test:
The current release is v0.2.1. Cupel now has a model-agnostic backend boundary with both Anthropic API and local Claude CLI implementations, while its own semantic core is authored in Go+ and shipped as generated Go.
- Example tests — concrete, readable cases (plus testable
Examplefuncs). - Parameterized / data-driven tests — table-driven
t.Runcases. - Property-based tests — invariants checked with the standard library’s
testing/quick.
The output is not a loose file. Cupel enforces the goforge architecture on it:
the model reply is de-fenced, parsed, required to declare the external
<iface>_test package, gofmt-formatted, written into components/<name>/
alongside a valid interface / internal/ / component.yaml scaffold, and then
validated by running goforge check.
A cupel is the porous vessel an assayer uses to refine raw metal — here it refines raw prose into tests.
Cupel is itself a goforge workspace, so its own structure obeys the same
worker-type discipline it enforces on its output: the pure spec/prompt/
architecture components stay pure, while the Claude-backed claude/gen
components carry their input/output effects up to the cli base.
Install
go install goforge.dev/cupel/projects/cupel@latest # the cupel CLI
go install goforge.dev/goforge@latest # needed for the check step