Haiku

Go

Plain-English Go tests. Experimental — generation works, runner ergonomics are still evolving.

Status: experimental

.go.haiku files describe what a Go package or function should do. Haiku compiles them to <base>_test.go files and runs them through go test.

Generation works today; treat the output like any other generated test — read it before trusting it, and pin your coder model (-m <shorthand>) if you want repeatable results.

Filename

<base>.go.haiku — e.g. auth.go.haiku. The generated file is <base>_test.go, written next to the spec inside the same Go package.

Frontmatter

---
intent: Verifies the auth handler correctly issues and validates tokens
sources:
  - ./auth.go
tags: [auth]
---

Running

haiku recite auth.go.haiku

Runs go test against the package containing the generated file.

Requirements

  • go on PATH
  • A go.mod somewhere up the directory tree from the spec

On this page