Contributing to Riven
Development workflow, coding standards, proto conventions, testing requirements, and PR process for contributing to the Riven AI platform.
Repository Structure
The Riven AI platform is split across 14 repositories in the riven-private GitHub organization. Each repo owns a specific domain:
| Repository | Domain |
|---|---|
dev-center | Platform backend — proto-first microservices (TS, Connect RPC) |
riven-platform | Unified frontend dashboard (Next.js 16, React 19) |
auth-platform | Identity + authorization (Better Auth, OpenFGA) |
ai-platform | AI/ML platform — model training, serving, inference (FastAPI, vLLM) |
agents-manager | Agent orchestration — runtime, memory, skills, tool use |
agent-skills | Agent skill registry — MCP, HTTP, and built-in skills |
python-platforms | Core Python SDK monorepo |
node-platforms | Shared Node.js infrastructure (ESLint configs, testkits, platform-auth) |
riven-cli | Unified developer CLI |
helm-charts | Production Helm charts |
riven-site | Public website and docs |
riven-github-bot | CI/CD GitHub bot |
riven-infra | Cloud IaC (Terraform) |
proto-registry | Proto registry service (Go) |
Each repo may have its own CLAUDE.md with repo-specific instructions. Always check for and follow the repo-level instructions first.
Development Workflow
Clone and set up
Clone the repository into your workspace:
cd ~/Desktop/riven-private
git clone [email protected]:riven-private/<repo-name>.git
cd <repo-name>Install dependencies:
yarn installCreate a branch
Create a feature branch from main:
git checkout -b feat/my-featureBranch naming conventions:
feat/— New featuresfix/— Bug fixesrefactor/— Code restructuringdocs/— Documentation changestest/— Test additions or fixeschore/— Tooling, CI, dependency updates
Implement your changes
Follow the coding standards below. Write tests alongside your implementation — tests should come first (TDD) when practical.
Run tests and lint
Verify everything passes locally before pushing:
yarn lint
yarn test
yarn buildPush and create a PR
Push your branch and open a pull request:
git push -u origin feat/my-featureCreate the PR via the GitHub UI or CLI. CI runs automatically on push.
Coding Standards
TypeScript
- Strict mode — All TypeScript projects use strict compiler settings.
- ESLint v9 — Flat config (
eslint.config.jsoreslint.config.mjs). Runyarn lintbefore committing. - Package manager — Yarn 4 (Berry) with workspaces. Never use npm or pnpm.
- Generated code — Code in
src/__generated__/is excluded from lint and test coverage. Never edit generated files. - Path aliases —
@/*maps to the project root in Next.js apps. - UI components — Always use shadcn/ui as the base. Customize via
classNameand Tailwind — never modify shadcn source files.
Python
- Python 3.13+ — All Python projects target 3.13 or later.
- UV — Use UV for dependency management and virtual environments.
- Linting — Ruff for linting and formatting.
- Type hints — Required for all function signatures.
General
- ESM only — All Node.js packages use ECMAScript modules.
- No
any— Avoidanytypes. Useunknownand narrow with type guards. - Error handling — Use
ConnectErrorwith appropriate gRPC status codes for RPC errors.
Proto Conventions
Protocol Buffers are the source of truth for all service APIs. Follow these conventions:
Package Naming
// Pattern: riven.<domain>.v1
package riven.billing.v1;
package riven.pages.v1;
package riven.agents.v1;Service Naming
// Service name matches the domain
service BillingService { ... }
service PagesService { ... }Field Naming
message CreateItemRequest {
string item_name = 1; // snake_case for fields
int32 max_retry_count = 2; // descriptive names
string org_id = 3; // standard abbreviations OK
}Workflow
- Edit
.protofiles — Make your API changes in the proto definitions first. - Lint — Run
riven proto lintto validate. - Check for breaking changes — Run
riven proto breakingbefore publishing. - Generate — Run
riven proto generateto update TypeScript/Python stubs. - Implement — Update the service implementation to match the new API.
- Publish — Run
riven proto publishto push to the registry.
Never change the field numbers of existing proto fields. This is a wire-incompatible breaking change that will cause production failures.
Testing
TypeScript
- Unit tests — Jest with TypeScript. Place test files adjacent to source:
service.test.tsnext toservice.ts. - Integration tests — TestContainers for database tests (PostgreSQL, MongoDB). Configure in
jest.globalSetup.ts. - Frontend tests — Jest + jsdom + Testing Library + MSW for RPC mocking.
- Coverage — Aim for meaningful coverage of business logic. Generated code is excluded.
# Run all tests
yarn test
# Run tests in watch mode
yarn test --watch
# Run a specific test file
yarn test service.test.tsPython
- Unit tests — pytest with Python 3.13+.
- Integration tests — TestContainers for database and service tests.
uv run pytest
uv run pytest tests/test_service.py -vWrite tests first (TDD) when practical. All new code should include corresponding tests.
PR Process
Requirements
- CI must pass (lint, test, build)
- At least 1 code review approval
- No unresolved review comments
- Squash merge into
main
CI Pipeline
When you push a branch, the CI pipeline automatically:
- Installs dependencies
- Runs lint checks
- Runs the full test suite
- Builds the project
- Checks for proto breaking changes (if proto files changed)
Review Guidelines
When reviewing PRs:
- Verify the proto API design follows conventions (if applicable)
- Check for test coverage of new business logic
- Ensure no secrets or credentials are committed
- Verify error handling uses appropriate status codes
- Check that generated code has been regenerated if protos changed
Local Development
CLI Development
For working on the Riven CLI itself:
cd ~/Desktop/riven-private/riven-cli
yarn install
yarn devThis starts the CLI in development mode with hot reloading.
Frontend Development
For the platform UI, use the dev overlay mode which runs locally against production data:
cd ~/Desktop/riven-private/riven-platform/apps/riven-platform-app
riven dev --port 3000This sets a cookie on app.riven-ai.dev so the production app loads your local JS/CSS via a Service Worker, giving you HMR with real auth and APIs.
Backend Services
For backend service development:
cd ~/Desktop/riven-private/dev-center/services/<service-name>
yarn install
yarn devServices typically start on their configured port with hot reloading via tsx watch.
Next Steps
- Migrating Services — Full guide for onboarding a service to the platform.
- Troubleshooting — Common issues and solutions.
- CLI Reference — Full CLI command reference.