resp→response, db→database pattern across mining, logging packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.6 KiB
1.6 KiB
Repository Guidelines
AX Standard
This repository is being upgraded toward the Core Agent Experience standard defined in /home/claude/Code/core/plans/rfc/core/RFC-CORE-008-AGENT-EXPERIENCE.md.
Apply these rules by default:
- Prefer explicit names over short names. Use
manager,service,config, andrequestinstead of repo-local abbreviations likemgr,svc, andcfg. - Write comments as concrete usage examples with realistic values.
- Keep paths and filenames descriptive so intent is obvious before opening a file.
- Preserve one-way dependency flow: foundational packages in
pkg/should not depend on CLI wrappers incmd/. - Make repeated shapes predictable. Reuse existing config structs, route patterns, and test helpers instead of inventing parallel forms.
Go Project Shape
cmd/mining/contains Cobra CLI entrypoints.pkg/mining/contains miner orchestration, REST API, profiles, auth, and service container logic.pkg/node/contains peer, protocol, transport, and worker logic.pkg/database/contains persistence and hashrate storage.cmd/desktop/mining-desktop/contains the Wails desktop app wrapper.
Working Rules
- Keep changes behavioral-safe unless the task explicitly asks for feature work.
- Prefer focused AX upgrades in high-traffic files such as
pkg/mining/service.go,pkg/mining/manager.go, andcmd/mining/cmd/*.go. - Run
gofmton edited Go files. - Validate targeted changes first with package-level tests before broader runs.
Verification
go test ./pkg/mining/...go test ./cmd/mining/...make test-go