Conventions¶
Go¶
Baseline: the kit's go-code-style skill. rig's own deltas:
- Dispatch is hand-rolled in
cmd/rig/main.go; no cobra or flag framework. mainparses, calls aninternal/<feature>package and prints; logic beyond parse, call, print belongs in that package.- Test doubles and conformance suites live in one
<pkg>testpackage per domain package, nofake/(task 64 brings the tree in line). - User-facing output goes to injected
io.Writers, never a logger. - All process execution goes through
internal/proc. - Only
internal/storeimports rig-eventlog. internal/workflowimports neitherinternal/gitnor a store backend.- rig stays agnostic to any LLM or agent harness.
- golangci-lint blocks new issues only (
new-from-merge-base: origin/main); task 68 clears the existing backlog.
Shared guards¶
Tests that sweep declarations; a new change must keep them in step.
cmd/rig/usage_test.gowithcmd/rig/testdata/usage.golden: asserts the usage text lists every command.cmd/rig/help_test.gowith the help goldens incmd/rig/testdata/*.golden: asserts each command's help output matches its golden.internal/workflow/imports_test.go: asserts the workflow engine imports neitherinternal/gitnor a store backend.internal/workflow/schema_test.go: assertsschema/workflow.schema.jsoncovers every workflow key.