- Go 1.26+ (this inner module declares
go 1.26β it will not build on older toolchains) - PostgreSQL 15+
- Redis 7+
- Git
-
Clone the repository:
git clone <repository-url> cd HelixCode
-
Setup dependencies:
make setup-deps
-
Generate logo assets:
make logo-assets
-
Build the application:
make build
-
Run development server:
make dev
- database.go: PostgreSQL connection pool and schema management
- Features: Connection pooling, health checks, automatic schema creation
- auth.go: JWT-based authentication with session management
- Features: User registration, login, token refresh, password hashing
- manager.go: Distributed worker registration and health monitoring
- Features: Worker discovery, capability-based assignment, health checks
- manager.go: Distributed task management with work preservation
- Features: Task creation, assignment, checkpointing, rollback
- server.go: HTTP server with REST API endpoints
- Features: Gin framework, middleware, route management
- config.go: Configuration management with Viper
- Features: Environment variables, config file support, validation
- processor.go: Logo asset generation and color extraction
- Features: ASCII art generation, icon creation, theme generation
internal/
βββ auth/ # Authentication & authorization
βββ config/ # Configuration management
βββ database/ # Database layer
βββ logo/ # Logo processing
βββ server/ # HTTP server
βββ task/ # Task management
βββ theme/ # Color themes
βββ worker/ # Worker management
- Define the data model in the database schema
- Create repository interface for data access
- Implement business logic in the appropriate manager
- Add API endpoints in the server
- Write comprehensive tests
- Update documentation
# Run all tests
make test
# Run specific package tests
go test -v ./internal/auth
# Run tests with coverage
go test -cover ./...
# Run integration tests
go test -tags=integration ./...# Format code
make fmt
# Lint code
make lint
# Check dependencies
go mod tidy- Define route in
internal/server/server.go - Implement handler method
- Add request/response models
- Update OpenAPI documentation
- Add tests
// 1. Add route in setupRoutes()
users.GET("/profile", s.getUserProfile)
// 2. Implement handler
func (s *Server) getUserProfile(c *gin.Context) {
// Implementation
}- Update schema in
internal/database/database.go - Create migration if needed
- Update repository interfaces
- Update tests
-- Add to createSchemaSQL in database.go
CREATE TABLE new_table (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
-- columns
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);Colors are automatically extracted from the logo. To update:
- Replace logo.png in
assets/images/ - Run logo asset generation:
make logo-assets
- Update theme generation in
internal/logo/processor.go - Add theme constants in
internal/theme/theme.go - Regenerate assets:
make logo-assets
- Add provider configuration in config
- Implement provider interface
- Add to task capabilities
- Update worker registration
- Define task type in
internal/task/manager.go - Add required capabilities
- Implement task execution logic
- Update API endpoints
# Build for development
make build
# Run with development config
./bin/helixcode --config config/dev/config.yaml# Build for production
make prod
# Run with production config
./bin/helixcode --config config/prod/config.yamlPer Constitution Rule 4 (No Manual Container Commands) + Β§11.4.76, container
workflows go through the orchestrator β direct docker/docker-compose commands
are NOT a supported workflow (and the host uses podman, not docker). Run the
platform standalone via the repo-root ./helix facade script (it drives the
containerized stack, delegating to the containers submodule per Β§11.4.76):
./helix start # boot the containerized stack
./helix status # show stack status
./helix logs # tail logs
./helix restart # restart the stack
./helix stop # tear downThe host application binary itself is built with make build β ./bin/helixcode
(see Build Commands above); CI-style container builds/tests are driven by the
orchestrator, never by hand-run docker commands.
- Development: Set
logging.level: debugin config - Production: Set
logging.level: infoorwarn
# Connect to database
psql -h localhost -U helixcode -d helixcode
# Check connections
SELECT * FROM pg_stat_activity;# Test health endpoint
curl http://localhost:8080/health
# Test API endpoints
curl -H "Authorization: Bearer <token>" http://localhost:8080/api/v1/users/me- Database:
GET /health - Worker status: Monitor worker heartbeats
- Task progress: Track task completion rates
- Worker metrics: CPU, memory, disk usage
- Task metrics: Completion time, success rates
- System metrics: API response times, error rates
- Use JWT tokens for API access
- Implement session management
- Use environment variables for secrets
- Validate all user inputs
- Use prepared statements for database queries
- Implement rate limiting
- CORS configuration
- XSS protection
- Content security policy
- Use connection pooling
- Implement database indexes
- Monitor query performance
- Use Redis for session storage
- Implement response caching
- Cache frequently accessed data
- Load balancing across workers
- Resource monitoring
- Auto-scaling based on load
- Create feature branch from main
- Make changes with tests
- Submit pull request
- Address review comments
- Merge after approval
- Use conventional commit messages
- Include tests with new features
- Update documentation
- Ensure code passes CI checks
- Update version in main.go
- Update changelog
- Create release tag
- Build release binaries
- Deploy to production
Happy coding! π
Per constitution Β§11.4.99, these development instructions were cross-referenced against the latest official sources + the repository's actual state on 2026-05-29:
- Go version β corrected "Go 1.21+" β "Go 1.26+" to match
helix_code/go.mod(go 1.26; won't build below it). Verified against https://go.dev/doc/devel/release (Go 1.26.0 released 2026-02-10, latest 1.26.3; Go 1.21/1.24 are past support). - make targets β
setup-deps,logo-assets,build,dev,test,fmt,lint,prodall verified present inhelix_code/Makefile. - Container workflow β removed the
docker build/docker runinstructions (violate Constitution Rule 4 + the host uses podman, not docker) and replaced them with the real repo-root./helixfacade (subcommands verified: start/status/logs/restart/stop). Negative finding: themake container-*targets referenced in CLAUDE.md Β§3.4 do NOT exist in either Makefile β flagged for a separate CLAUDE.md correction (not cited here). - PostgreSQL 15+ / Redis 7+ β consistent with CLAUDE.md Β§3.1.
Sources verified 2026-05-29: https://go.dev/doc/devel/release ; repo cross-reference
(helix_code/go.mod, helix_code/Makefile, ./helix, CLAUDE.md Β§3.1/Β§3.4).