mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-05 16:28:17 +00:00
* docs: add AI coding tools policy Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: remove symlinks Signed-off-by: Xe Iaso <me@xeiaso.net> * docs(AGENTS): make compatible with opencode Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: update spelling Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net>
2.4 KiB
2.4 KiB
Agent instructions
Primary agent documentation is in CONTRIBUTING.md. You MUST read this file before proceeding.
Useful Commands
npm ci # install node dependencies
npm run assets # build JS/CSS (required before any Go build/test)
npm run build # assets + go build -> ./var/anubis
npm run dev # assets + run locally with --use-remote-address
Testing
npm run test
Linting
go vet ./...
go tool staticcheck ./...
go tool govulncheck ./...
Commit Messages
Commit messages follow the Conventional Commits format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
- Add
!after type/scope for breaking changes or includeBREAKING CHANGE:in the footer. - Keep descriptions concise, imperative, lowercase, and without a trailing period.
- Reference issues/PRs in the footer when applicable.
- ALL git commits MUST be made with
--signoff. This is mandatory.
Attribution Requirements
AI agents must disclose what tool and model they are using in the "Assisted-by" commit footer:
Assisted-by: [Model Name] via [Tool Name]
Example:
Assisted-by: GLM 4.6 via Claude Code
PR Checklist
- Add description of changes to
[Unreleased]indocs/docs/CHANGELOG.md. - Add test cases for bug fixes and behavior changes.
- Run integration tests:
npm run test:integration. - All commits must have verified (signed) signatures.
Key Conventions
- Security-first: This is security software. Code reviews are strict. Always add tests for bug fixes. Consider adversarial inputs.
- Configuration: YAML-based policy files. Config structs validate via
Valid() errormethods returning sentinel errors. - Store interface:
lib/store.Interfaceabstracts key-value storage. - Environment variables: Parsed from flags via
flagenv. Use.envfiles locally (loaded bygodotenv/autoload). Never commit.envfiles. - Assets must be built first: JS/CSS assets are embedded into the Go binary. Always run
npm run assetsbeforego testorgo build. - CEL expressions: Policy rules support CEL (Common Expression Language) expressions for advanced matching. See
lib/policy/expressions/.