Coding Standards
Project rules, patterns, and conventions.
Git Workflow
Conventional Commits: All commits must follow the Conventional Commits specification.
<type>(<scope>): <subject>
<body>
Allowed Types: feat, fix, docs, style,
refactor, test, chore.
Scopes: payment-service, account-service, api-gateway,
helm, ci.
Shell Commands
NO Chaining: The && operator is strictly forbidden due to PowerShell
compatibility issues in WSL.
Correct:
command1
command2
Incorrect:
command1 && command2
NO Filtering Tools: Do not use grep, awk, or sed
for checking command output. Use native tool formatting (e.g., kubectl -o json).
Go Code Style
Error Handling: Always wrap errors with context. Never panic.
if err != nil {
return fmt.Errorf("context: %w", err)
}
Logging: Use log/slog for structured logging over fmt.Println.
Include trace_id in every log entry.
File Structure:
handler.go: Request handlingrepository.go: Database accessservice.go: Business logictelemetry.go: OpenTelemetry setup
Security
Secrets: NO hardcoded secrets in code. Use Kubernetes Secrets or Environment Variables.
Identity: Use SPIFFE SVIDs for mTLS authentication. No static API keys between services.