Developer Guide & Beads Workflow
This guide outlines standards and procedures for contributing to homectl.
Tooling & Quality Gates
Section titled “Tooling & Quality Gates”Before submitting changes, all code must pass repository quality gates:
# 1. Format Go codegofmt -s -w .
# 2. Run static analysisgo vet ./...
# 3. Execute unit and integration testsgo test -v ./...
# 4. Verify TypeScript and Web UI buildnpm --prefix ui run build
# 5. Verify Documentation site buildnpm --prefix docs run buildBeads (bd) Issue Tracker
Section titled “Beads (bd) Issue Tracker”homectl uses Beads (bd) for decentralized issue tracking directly inside the repository.
Quick Reference
Section titled “Quick Reference”# View all available tasks ready for workbd ready
# View details for a specific taskbd show <id>
# Claim a taskbd update <id> --status in_progress
# Close a completed taskbd close <id>Issues are stored in Dolt version-controlled database tables under .beads/ and passively exported to .beads/issues.jsonl.
Coding Standards
Section titled “Coding Standards”- Go Readability:
- Adhere strictly to the Google Go Style Guide.
- Use
RunE: func(cmd *cobra.Command, args []string) errorfor all Cobra commands. Return wrapped errors (%w) instead of callinglog.Fatalf. - Never use
Getprefixes for network/expensive operations; useFetchor descriptive verbs. - Capitalize acronyms (
AppID,DeviceID,RinconID). - Add package doc comments (
// Package <name> provides ...) to all packages.
- Web UI Standards:
- Keep Lit components atomic and isolated in
ui/src/components/. - Use
import typewhen importing TypeScript interfaces underverbatimModuleSyntax. - All network calls must pass through
ui/src/api.ts.
- Keep Lit components atomic and isolated in
- Commit Messages:
- Follow Conventional Commits:
feat: add lifx device discoveryfix: prevent camera mDNS context cancellation racedocs: update network topology reference
- Follow Conventional Commits: