Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 3.14 KB

AGENTS.md

File metadata and controls

60 lines (41 loc) · 3.14 KB

Repository Instructions

Important

Read README.md for project overview.

Tech Stack

The list below covers the toolchain, the modules the binary links, and the release builder.

Repository Structure

Read from cmd/main.go – each package is named for what it owns.

  • cmd/ – entry point, exiting on what internal/cli returns
  • internal/cli/ – urfave command tree, flag definitions, exit codes, and the version string ldflags sets
  • internal/config/ – flag, environment and file resolution in that precedence, and the grammars it parses
  • internal/log/ – logrus setup and the *slog.Logger the SDK takes
  • internal/wnc/ – sole importer of the SDK, with one fetch_*.go per read and one file per action beside it
  • internal/show/ – per-command row building, the concurrent controller fan-out, and the enum display tables
  • internal/render/ – Column[T], shared by the table and the JSON writer so a column cannot exist in one only
  • docs/ – reference pages behind the README, indexed by docs/README.md
  • examples/ – a working configuration file whose note fields carry what JSON has no comment syntax for
  • scripts/ – helper scripts the pre-commit hooks run

Setup and Commands

Run make pre-commit-install first.

Code Style

Follow Effective Go conventions and the software development principles DRY/YAGNI/SRP.

  • Keep code simple and readable, avoiding clever tricks that obscure intent.
  • Keep every change minimal, in code, tests, comments and documentation.
  • Write simple comments that explain the reasoning behind the code, not just what it does.
  • A claim in docs/ cites the Go file and line, or the controller reading it came from.

Testing

Follow CONTRIBUTING.md.

  • Run make lint and make test-unit before creating a commit.
  • Take every fixture and sample identity from docs/testing.md, never a value read off a device.

Commits and PRs

Follow Conventional Commits (feat:, fix:, chore(deps):, etc.).

  • Sign off every commit with Signed-off-by: (DCO).
  • Open PRs against main. Create Draft PR as default.