This is a repository full of code written in Go. Use the table driven testing skill when possible.
| Command | Description |
|---|---|
npm test |
Runs tests with go test ./.... |
go build ./... |
Compiles all Go packages. |
go test ./... |
Runs all tests. |
npm run format |
Formats Go (goimports) and JS/HTML (prettier). |
- Go – use
go fmt/go tool goimports; tabs for indentation,camelCasefor variables,PascalCasefor exported identifiers - JavaScript/JSON/YAML – formatted with Prettier (2-space tabs, trailing commas, double quotes)
- Files are
snake_case; packages use lower-case module names - Run
npm run formatbefore committing
- Tests are written in Go using the standard
testingpackage (*_test.go) - Keep test files next to the code they cover
- Run the full suite with
npm testorgo test ./... - Package examples are in
example_test.gofor Godoc
When writing example code in *_example_test.go files, follow this pattern for error handling:
result, err := client.SomeOperation(ctx)
if err != nil {
log.Fatal(err) // handle the error here
}The // handle the error here comment indicates to users that they should replace log.Fatal(err) with appropriate error handling for their use case (logging, retry, cleanup, etc.).
When writing test code that may use environment variables for configuration, import the godotenv autoload package:
import (
_ "github.com/joho/godotenv/autoload"
// ... other imports
)This automatically loads environment variables from a .env file in the project root, which is useful for integration tests that require credentials or other configuration.
Commit messages follow Conventional Commits format:
[optional scope]: <description>
[optional body]
[optional footer(s)]
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
- Add
!after type/scope for breaking changes or includeBREAKING CHANGE:in the footer. - Keep descriptions concise, imperative, lowercase, and without a trailing period.
- Reference issues/PRs in the footer when applicable.
- ALL git commits MUST be made with
--signoff. This is enforced by DCO checks.
AI agents must disclose what tool and model they are using in the "Assisted-by" commit footer:
Assisted-by: [Model Name] via [Tool Name]
Example:
Assisted-by: GLM 4.7 via Claude Code
When asked about various services or tools, use these resources to help you:
- Tigris or Tigris Data: https://www.tigrisdata.com/docs/llms.txt
- Conductor: https://docs.conductor.build/llms.txt
- ALL pull requests MUST use the template in
.github/pull_request_template.md - Include a clear description of changes
- Reference any related issues
- Pass CI (
npm test) - PR titles must follow Conventional Commits format (enforced by linting)
- Secrets never belong in the repo; use environment variables
- Run
npm auditperiodically for JS tooling vulnerabilities
When undertaking a task, pause and ask the user for intent before writing code.
- Go – follow the standard library style; prefer table-driven tests
- JSON/YAML – double quotes, two-space indentation
- Run
npm run formatto apply Prettier and goimports formatting
This file is consulted by the repository's tooling. Keep it up-to-date as the project evolves.