This file defines the minimum rules for AI agents working on Tenderdash. It does not duplicate details from the style guide; instead, it references the source.
Follow the rules in STYLE_GUIDE.md. Do not duplicate them here or in other
agent configuration files.
- Ensure all changed code passes the linter.
- Ensure the code is thread-safe. Check memory leaks, deadlocks and race conditions.
- Review implementation to find any security issues. Identify and verify edge cases. Check known security issues.
- If unsure, explicitly report any potential security issues, gaps, missing features and TODO items.
Key directories:
abci/– Application BlockChain Interface (app ↔ consensus boundary)cmd/– CLI/binary entrypointsconfig/– configuration structs, defaults, and config testscrypto/– cryptographic primitives and key handlingdash/– Dash-specific components (quorums, validators, etc.)docs/– documentationinternal/– internal (unexported) packageslibs/– shared utility librariesnode/– node setup, lifecycle, and reactor wiringproto/– protobuf definitions (source of truth for wire types)rpc/– JSON-RPC server and clientspec/– protocol specificationtypes/– domain types (Block, Vote, Commit, etc.)test/– integration tests and test supporttools/,scripts/– helper tools and automation scripts
Do not edit generated files (e.g. *.pb.go). Edit the .proto source
and regenerate with make proto-gen.
# Build (includes BLS native dependency)
make build
# Run all unit tests with race detector (matches CI: CGO, BLS, -tags=deadlock, -p 1)
make test_race
# Run all unit tests without race detector (matches CI configuration)
make test
# Lint
make lint
# Format
make format- Go dependencies are managed via Go Modules. Only update required modules.
- To review newer versions:
go list -u -m all. - If build issues arise, use
go mod tidy. - Protobufs:
bufandgogoprotoare required.- Lint:
make proto-lint - Breaking changes:
make proto-check-breaking - Generation:
make proto-gen - Formatting:
make proto-format(requiresclang-format)
- Lint:
- Main development branch is the highest-versioned
vMAJOR.MINOR-devbranch. Find it with:git branch -r --list 'origin/v[0-9]*-dev' --sort=-version:refname | head -1 - Create feature branches from the development branch; open PRs back into it.
- Keep commits focused and well-described.
- Use conventional commit format for commit and PR titles.
- PR descriptions: read
.github/PULL_REQUEST_TEMPLATE.md, fill in every section, base content on the full diff against the target branch.
- Private keys and configuration files containing keys are secret: do not log them or commit them to the repo.
- Particularly sensitive files:
config/priv_validator_key.json,config/node_key.json, TLS keys (tls-key-filein config).
- BLS native dependency must be built before Go binaries (
make buildhandles this; standalonego buildmay fail). *.pb.gofiles are generated — never edit them by hand.gogoprotoextensions (e.g.,nullable,customtype) can produce unexpected Go types; always check the generated code after proto changes.- Some packages under
internal/importdash/types; be mindful of import cycles when moving code between packages.