Mining/AGENTS.md
Claude 1f9624279a
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
ax(batch): rename abbreviated variables to predictable names
resp→response, db→database pattern across mining, logging packages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 04:47:58 +01:00

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, and request instead of repo-local abbreviations like mgr, svc, and cfg.
  • 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 in cmd/.
  • 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, and cmd/mining/cmd/*.go.
  • Run gofmt on 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