Pull Requests
Version: 0.1.0
Guidelines for contributing code to DecisionBox.
Before You Start
- Check existing issues — Someone may already be working on it
- Open an issue first — For new features, discuss the approach before coding
- Small PRs are better — One feature or fix per PR
Development Workflow
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR-USERNAME/decisionbox-platform.git
cd decisionbox-platform
git remote add upstream https://github.com/decisionbox-io/decisionbox-platform.git
# Create a branch
git checkout -b feature/my-feature
# Make changes, test, commit
make test-go
git add .
git commit -m "feat: add snowflake warehouse provider"
# Push and create PR
git push origin feature/my-feature
Commit Messages
Follow Conventional Commits:
<type>(<scope>): <subject>
<body>
Types:
feat— New featurefix— Bug fixdocs— Documentation onlytest— Adding or updating testsrefactor— Code restructuring (no behavior change)chore— Build, CI, config changes
Scopes (optional):
agent— Agent serviceapi— API serviceui— Dashboardllm— LLM providerswarehouse— Warehouse providerssecrets— Secret providersdomain-packs— Domain packs
Examples:
feat(warehouse): add Snowflake provider
fix(agent): handle LLM timeout during analysis phase
docs: add Snowflake configuration guide
test(llm): add Claude integration tests with error paths
PR Requirements
Must Have
- Tests — Unit tests for new logic. Integration tests for external services.
- Builds —
make buildsucceeds.make test-gopasses. - Lint —
make lintpasses (golangci-lint + ESLint). - No hardcoded values — Use config, env vars, or domain pack files.
- Documentation — Update docs if the change affects user-facing behavior.
For Provider PRs
- Provider registered via
init()withRegisterWithMeta() - ConfigFields defined for dashboard form rendering
- DefaultPricing set (LLM/warehouse)
- Imported in both
services/agent/main.goandservices/api/main.go -
replacedirective in both service go.mod files - Dockerfile COPY line for go.mod/go.sum
- Added to Makefile test targets
- Unit tests (registration, config validation)
- Integration tests (skip without credentials)
For Domain Pack PRs
- areas.json with proper field structure
- All prompt files referenced in areas.json exist
- base_context.md includes
{{PROFILE}}and{{PREVIOUS_CONTEXT}} - Analysis prompts include
{{QUERY_RESULTS}} - Recommendations prompt includes
related_insight_idsinstruction - Profile schema is valid JSON Schema (draft 2020-12)
- Go implementation with tests
- Registered in both services
PR Template
## Summary
Brief description of what this PR does.
## Changes
- Added X
- Fixed Y
- Updated Z
## Testing
How this was tested:
- [ ] Unit tests added/updated
- [ ] Integration tests pass
- [ ] Manual testing done
## Documentation
- [ ] Docs updated (if user-facing change)
- [ ] README updated (if applicable)
Code Style
Go
- Standard
gofmtformatting - No unused imports or variables
- Error messages: lowercase, no period (e.g.,
"failed to create provider") - Structured logging with
apilogorapplog(neverfmt.Println) - Context passed as first argument
TypeScript
- ESLint rules from Next.js config
- Functional components with hooks
- Types in
lib/api.ts
Markdown (docs)
- One sentence per line (for better diffs)
- Code blocks with language tag (
go,bash, ```json) - Headers in title case
Review Process
- CI must pass (build, tests, and lint)
- At least one maintainer review
- No merge conflicts with main
- Squash merge (clean history)
Next Steps
- Development Setup — Local environment
- Testing — Running and writing tests