Cloud Harness provides software infrastructure and tools for neuroscience data computing and analysis in a monorepo.
applications/— Cloud Harness custom server applicationsclient/— generated client APIdeployment/— deployment-related scripts and filesdeployment-configuration/— deployment customization filesinfrastructure/— infrastructure utilitieslibraries/— Cloud Harness shared librariesdocs/— developer documentationtools/— Cloud Harness CLI and other toolstest/— test utilities and test code
Before working on a task, identify which application/component is in scope and read any CLAUDE.md inside that subtree.
- Conda environment:
ch(Python 3.12+) — activate withconda activate ch - Frontend package manager: Yarn — never use npm
- Backend package manager: pip — only inside the conda environment
Always activate conda activate ch before any backend command.
- Configuration lives in
values.yamlfiles and is injected via Helm templates and Kubernetes manifests. Never hardcode configuration in application code or templates. - Structured configuration can be injected via resources processed by Helm templates and loaded as ConfigMaps automatically (e.g.
applications/accounts/deploy/resources/realm.json). - The Cloud Harness configuration API is defined as an OpenAPI spec. Run
harness-generate modelsafter changing the spec.
- Keep architecture lean — avoid unnecessary layers and abstractions.
- Use utils for stateless pure functions that don't touch external data sources or the ORM.
- Use helpers for pieces of business logic; keep them stateless when possible.
- Use services for business workflows and cross-model coordination.
- Keep model logic close to the model when it represents domain rules or invariants.
- Handle exceptions only at the highest level; let lower layers raise. Never catch in helpers or services unless adding context and re-raising.
- Cover critical logic with unit tests, especially helpers and services. Use mocks to isolate units.
- Prefer model classes for helpers and services. Use typed dicts for structured data not covered by schema classes. Use plain dicts only for genuinely unstructured data. Avoid returning tuples.
- Bubble exceptions up to where they can be handled. Avoid return-value error signalling. Wrap library and untyped exceptions in custom exceptions with clear meaning.
- Never create README or documentation files unless explicitly requested.
- Never start development servers — assume they are already running.
- Always ask before opening a browser.
- Frontend: Yarn only. Backend: pip inside the
chconda environment only.
- Activate
conda activate chbefore any backend command. - Run
sh install.shto install cli tools
harness-generate— generate codeharness-deployment— generate deployment files (Helm charts, CI/CD files, etc.)harness-application— generate application code (e.g. Django apps)harness-migrate— migration helperch_cli_tools— Python package for deployment and other toolstests/— unit test utilities