From defc1b4599ff07f50d563d870f2afaac7ee8d7c0 Mon Sep 17 00:00:00 2001 From: Prad N Date: Sun, 30 Mar 2025 22:53:36 -0400 Subject: [PATCH] feat: introduce contribution guidelines --- .gitignore | 1 - CONVENTIONS.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 CONVENTIONS.md diff --git a/.gitignore b/.gitignore index a046632..31bdda6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ dist # Aider related generated files .aider-context -CONVENTIONS.md .goreleaser.yaml Taskfile.yml dist diff --git a/CONVENTIONS.md b/CONVENTIONS.md new file mode 100644 index 0000000..420be6b --- /dev/null +++ b/CONVENTIONS.md @@ -0,0 +1,31 @@ +# CLAUDE.md - Agent Guidelines for Hway Codebase + +## Build Commands +- `make deps` - Install dependencies +- `make build` - Build all binaries +- `make test` - Run all tests +- `make image` - Build Docker image +- `go test -v ./path/to/package -run TestName` - Run single test + +## Linting & Formatting +- Use standard Go formatting (`go fmt`) +- Follow standard import ordering: stdlib first, then external packages +- Run `go vet ./...` before committing + +## Coding Conventions +- Use CamelCase for exported functions/variables, camelCase for private +- Create interfaces before implementations +- Type aliases should have clear documentation +- Use descriptive variable names that indicate purpose +- Constants should use PascalCase + +## Error Handling +- Always check errors and return them up the call stack +- Use `return nil, err` pattern consistently +- Only use panic for unrecoverable startup errors +- Include error descriptions in function documentation + +## Testing +- Write tests for new functionality +- Use table-driven tests where appropriate +- Mock external dependencies \ No newline at end of file