mirror of
https://github.com/cf-sonr/motr.git
synced 2026-01-12 02:59:13 +00:00
docs: add coding conventions for agentic coding
This commit is contained in:
21
CONVENTIONS.md
Normal file
21
CONVENTIONS.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# CLAUDE.md - Guidelines for Agentic Coding
|
||||
|
||||
## Build/Run/Test Commands
|
||||
- **Build WASM binary**: `task build` or `make build`
|
||||
- **Generate code**: `task gen` or `make generate`
|
||||
- **Run tests**: `task test`
|
||||
- **Run single test**: `go test -v ./path/to/package -run TestName`
|
||||
- **Development workflow**: `task` (runs test, generate, build sequence)
|
||||
|
||||
## Code Style Guidelines
|
||||
- **Formatting**: Standard Go formatting with `gofmt`
|
||||
- **Imports**: Group standard library, third-party, and project imports
|
||||
- **Types**: Use descriptive type names; alias complex types (e.g., `type Vault = *echo.Echo`)
|
||||
- **Error Handling**: Always check errors; wrap with context when propagating
|
||||
- **Naming**:
|
||||
- Packages: lowercase, concise nouns (e.g., `handlers`, `models`)
|
||||
- Interfaces: action+er (e.g., `Querier`)
|
||||
- Variables: camelCase for local, PascalCase for exported
|
||||
- **Structure**: Follow Go's standard project layout
|
||||
- **Comments**: Add godoc comments for all exported functions/types
|
||||
- **WASM Context**: Use internal/context package for WASM-specific context
|
||||
Reference in New Issue
Block a user