The repo uses a flake.nix that provides all build dependencies. With direnv,
enter the dev shell via:
direnv allowThis drops you into a shell with:
- Go 1.25+
- Go tools (goimports, etc.)
- GNU Make
make buildThis produces a static binary at ./build/agentd (CGO disabled).
The --config flag controls which jcard.toml is loaded:
./build/agentd --config /path/to/jcard.tomlAll tests use the Ginkgo and Gomega testing frameworks. To run tests:
make testThe pkg/tmux/ tests require tmux to be installed. They create real tmux
sessions using isolated server sockets in temp directories. If tmux is not
available, these tests are automatically skipped.
The pkg/stereosd/ tests spin up a mock HTTP server on a temporary Unix socket
to simulate the stereosd API. No actual stereosd instance is needed.
make lint
make formatTo add support for a new agent harness:
- Create a new file in
pkg/harness/(e.g.,myharness.go) - Implement the
Harnessinterface:
type MyHarness struct{}
func (m *MyHarness) Name() string { return "my-harness" }
func (m *MyHarness) BuildCommand(prompt string) (string, []string) {
if prompt == "" {
return "mybin", nil
}
return "mybin", []string{"--prompt", prompt}
}- Register it in the
registrymap inpkg/harness/harness.go:
var registry = map[string]func() Harness{
// ...existing entries...
"my-harness": func() Harness { return &MyHarness{} },
}- Add
"my-harness"tovalidHarnessesinpkg/config/config.go - Add tests in
pkg/harness/harness_test.go