February 2026 edition
Naming Conventions Specification
Disclaimer: This document is non-normative and describes recommended practices for the OKHAM ecosystem.
Version 1.0.0
Status: DRAFT
This document specifies the naming conventions for all OKHAM artifacts.
Quick Reference
| Type | Format | Example |
|---|---|---|
| Capability ID | kebab-case | camera-mgmt, dji-gateway |
| Go package | lowercase | cameramgmt, djigateway |
| Go file | snake_case | handlers_http.go, service.go |
| Go function | PascalCase | HandleListCameras, ValidateInput |
| Go variable | camelCase | cameraID, maxRetries |
| Go constant | PascalCase | DefaultTimeout, MaxConnections |
| Stream name | SCREAMING_SNAKE | ASSETS_STREAM, COMMANDS_STREAM |
| KV bucket | SCREAMING_SNAKE | CAMERA_REGISTRY_KV, SESSION_KV |
| Subject detail | dot.separated | asset.registered, drone.takeoff |
| Environment var | SCREAMING_SNAKE | NATS_URL, DATABASE_URL |
Capability ID
MUST use kebab-case (lowercase with hyphens).
camera-mgmt ✓
camera_mgmt ✗
CameraMgmt ✗
CameraManagement ✗
NATS Subject Naming
Subject detail field MUST use dot-separated lowercase format:
env.dev.t.default.s.camera-mgmt.cap.camera.evt.registered
└─────────────────┘
subject detail
Examples:
| Event | Subject Detail |
|---|---|
| Camera registered | camera.registered |
| Camera deleted | camera.deleted |
| Asset uploaded | asset.uploaded |
| Alert triggered | alert.triggered |
KV Bucket Naming
MUST use SCREAMING_SNAKE format with _KV suffix:
CAMERA_REGISTRY_KV ✓
cameraRegistryKv ✗
camera_registry_kv ✗
CAMERAREGISTRYKV ✗
Go Naming
| Element | Convention | Example |
|---|---|---|
| Package | lowercase, no underscores | cameramgmt |
| File | snake_case | service.go, handlers_http.go |
| Type/Struct | PascalCase | CameraService, ListRequest |
| Function | PascalCase | HandleListCameras |
| Variable | camelCase | cameraID, maxRetries |
| Constant | PascalCase | DefaultTimeout |
| Interface | PascalCase, may omit "I" prefix | CameraStore (not ICameraStore) |
Directory Naming
| Element | Format | Example |
|---|---|---|
| Capability directory | kebab-case | internal/capabilities/camera-mgmt/ |
| Component directory | kebab-case | pkg/ui/components/card/ |
| Test data | snake_case | testdata/camera_valid.json |
Related Specifications
- Naming Specification — Standards and acronyms naming conventions
- Capability Contract — Capability ID in contract