mirror of
https://github.com/cf-sonr/hway.git
synced 2026-01-12 03:09:14 +00:00
feat: introduce contribution guidelines
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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
31
CONVENTIONS.md
Normal 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
|
||||||
Reference in New Issue
Block a user