These rules apply to every AI agent (hive agents, Copilot CLI, Claude Code, Codex, …) working in this repository. Human contributor guidance lives in CONTRIBUTING.md; where the two differ for agents, this file wins.
- Do not run
go test,go build ./...,go vet,golangci-lint, or the docs/citation guards locally. Commit, push, open the PR, and read the CI results (gh pr checks <n>, then the failing job log). CI runs the full matrix with the right toolchain, caches and coverage gates; a local run duplicates it and burns tokens and pod CPU/disk. Inside the hive pod,go testandgo vetare blocked for agents by the Go shim; use CI for the verdict. - If CI fails, fix from the job log and push again. Do not "reproduce locally first". The hive opens requested PRs; CI is the sole verdict and records failures for agents to iterate on.
- The only local check worth running is
gofmt -lon files you changed. src/is a two-module Go workspace (src/go.work): the root module and the Crux agent runtime atsrc/crux/(github.com/hivecommons/hive/crux, packagescrux,crux/agent,crux/inference, …). Fromsrc/,./...is the root module only; the Crux module is./crux/.... CI covers both; see src/docs/design/crux.md.- Never run this repository's test suite from inside an agent pane. Parts of
crux/agentandpkg/dashboardexercise real process management (tmux,/procsweeps, SIGKILL by uid). Run as an agent user they can kill the agent's own tmux server, CLI and terminal — this is how the scanner lost its session repeatedly (#9416).
- Keep changes surgical and PR-sized; one concern per PR.
- Every PR with a user-visible
src/code change needs achangelog.d/<category>-<slug>.mdfragment (added|changed|deprecated|fixed|security) whose body is a single-bullet. Changes outsidesrc/(root-level docs,changelog.d/,.github/), plussrc/docs/,*_test.gofiles, andsrc/{deploy,scripts}/test[-_]*.shscripts, are exempt automatically (src/scripts/check-changelog-fragment.shis the source of truth for the exact set); other test-adjacent changes (e.g.,testdata/fixtures, non-_test.gotest helpers) and non-user-visiblesrc/code changes (refactors, dependency bumps) need theno-changeloglabel instead.changelog.d/is at the repository root, not undersrc/—src/changelog.d/is never compiled and the guard rejects it. - Sign commits (
git commit -s); PR titles start with an emoji (✨feature,🐛fix,📖docs,📝proposal,🌱chore,⚠️breaking) —📝is for proposals only; a docs PR is📖 docs: …. - Do not hand-edit
src/docsfile:line citations (includingsrc/docs/api-reference.mdandsrc/docs/api-reference/*.md); when CI's citation guard reports drift, runpython3 src/scripts/check-docs-citations.py --fixfirst — it runscheck-api-reference-citations.sh --fixforapi-reference.mdand re-anchors other.gocitations by their backticked Go declaration anchor. Only fall back to a manual edit for citations it still reports asDRIFT/UNRESOLVED, and run it only when CI tells you citations drifted. The requiredchangelog-fragment-guardcheck runs it (non-fix) when a PR edits a hub or dashboardserver.goor theirstatic/pages, so the PR that causes drift goes red.