Repository navigation
Development setup
-
Go at the version in the
goline ofgo.mod(currently Go 1.26.11) -
Node.js at the version in the
enginesfield ofpackage.json— brings npm, which runs the build/test scripts -
Python 3 for
npm run screens - git on your PATH
Install the lint and security tools once from the repository root:
npm run toolsgit clone https://github.com/djm56/kirsch.git
cd kirsch
go run ./cmd/kirschThis runs Kirsch directly from source inside the clone directory (which is itself a Git repository).
Run these from the repository root.
| Task | Command |
|---|---|
| Build the binary | npm run build |
| Run from source | npm start |
| Unit tests | npm test |
| Tests with the race detector | npm run test:race |
| Format, vet, lint, test and screens | npm run check |
| Security scans | npm run security |
| Fuzz targets | npm run fuzz |
| Every CI job, run locally | npm run ci:local |
npm run check is the minimum before opening a pull request. npm run ci:local mirrors exactly what the CI workflow runs. It downloads the pinned golangci-lint version into bin/ (git-ignored) and overwrites govulncheck and gosec in your Go bin with their latest releases.
The built binary is written to bin/kirsch inside the checkout.
The golden screens are character grids in plan/spec/kirsch-ui-screens.md. A test compares the renderer's output with each grid. To regenerate them:
-
Run the regen test:
KIRSCH_REGEN=1 go test ./internal/tui -run TestGenerateGridsThis writes the current render of every scenario to
/tmp/kirsch-grids.txt. It does not change the screens document. -
Reconcile each changed grid in
plan/spec/kirsch-ui-screens.mdby hand. -
Run
go test ./internal/tui, thennpm run screens. -
A reviewer must look at the screens diff before it merges. Automated tools do not accept golden changes.
The smoke test runs one real task against testdata/repo-go-module with a live model. It needs an API key and spends tokens:
bash scripts/smoke-test.shIt is not one of the npm scripts and is not run by CI. Set ANTHROPIC_API_KEY, OPENCODE_API_KEY, or their KIRSCH_ forms before running it.