feat: introduce contribution guidelines

This commit is contained in:
Prad N
2025-03-30 22:53:36 -04:00
parent 121fa00454
commit defc1b4599
2 changed files with 31 additions and 1 deletions

1
.gitignore vendored
View File

@@ -8,7 +8,6 @@ dist
# Aider related generated files # Aider related generated files
.aider-context .aider-context
CONVENTIONS.md
.goreleaser.yaml .goreleaser.yaml
Taskfile.yml Taskfile.yml
dist dist

31
CONVENTIONS.md Normal file
View File

@@ -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