docs: update AGENTS.md with comprehensive agent instructions
Update AGENTS.md to give future agent sessions a compact, verified set of high-signal instructions for working in this repo.
What this MR does
Replaces the previous AGENTS.md with content focused on details that an agent could not infer from filenames or generic Go conventions.
High-signal content kept or added
- Project layout: command grammar, real entrypoints, and the
internal/cmdutilsimport boundary enforced bydepguard. - Lefthook flow:
make bootstrap+mise+.tool-versions, skip env vars, and the exactlefthook run pre-pushchecks. - Test gotchas:
make testclearsVISUAL/EDITOR/PAGER/GITLAB_TOKENand setsCI_PROJECT_PATH; integration tests use//go:build integration, the_Integrationsuffix,make integration-test-race, and requireGITLAB_TEST_HOST+GITLAB_TOKEN_TEST. - Generated artifacts:
docs/source/is generated; pre-commit and pre-push hooks fail on drift for bothmake gen-docsandmake generate. - Lint rules that actually bite:
PrintJSONoverjson.Marshal, thecmdutilsimport boundary, andgolangci-lint run --new-from-rev=origin/mainon pre-push. - Command conventions: unexported
optionsstruct, optionalnewOptions, partialcomplete/validate/runimplementation, Conventional Commits. - Skills validator command and the failure modes it catches.
- Environment variables that change behavior, with the
GITLAB_HOST/GITLAB_URI/GL_HOSTaliases andGLAB_ENABLE_CI_AUTOLOGIN+GITLAB_CIpairing.
Edited by Brendan Lynch