Contributing to PRMS follows a Spec-Driven Development (SDD) process. Before writing code, a spec must exist underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AllianceBioversityCIAT/onecgiar_pr/llms.txt
Use this file to discover all available pages before exploring further.
docs/specs/<module>/. Commits follow a strict format, branches target staging, and several automated gates must pass before a merge is allowed.
Commit format
Every commit message follows this structure:| Emoji | Type | When to use |
|---|---|---|
| ✨ | feat | New features or functionality |
| ♻️ | refactor | Refactor without behaviour change |
| 🔧 | fix | Bug fixes |
| 🎨 | style | UI, formatting, or styling changes |
bilateral.serviceresult-review-drawerphase-management-tablesubmissions.service
P2-2498). Include it when the commit addresses a tracked issue.
Examples
Branch strategy
| Branch | Role |
|---|---|
master | Production-tracking. Receives merges from staging via PR. |
staging | Integration branch. Open PRs here for feature work. |
staging (or master directly, per the team’s release cadence for hotfixes). Do not push directly to master.
Contribution workflow
Read the operating guides
Read the root
CLAUDE.md and the relevant package guide before touching code:- Backend:
onecgiar-pr-server/CLAUDE.md→onecgiar-pr-server/src/CLAUDE.md - Frontend:
onecgiar-pr-client/CLAUDE.md→onecgiar-pr-client/src/CLAUDE.md
Find or create the module spec
Every feature or fix must be grounded in a spec. Look for an existing spec under
docs/specs/<module>/. If it does not exist, create one from the templates in docs/specs/general-setup/:requirements.md— what the feature must do (referencesdocs/prd.mdgoals and acceptance criteria)design.md— how it looks and behaves (referencesdocs/system-design/design.md)task.md— the implementation checklist
G#, US-*, AC-*) from docs/prd.md and workflow IDs (W1..W8) from docs/detailed-design/detailed-design.md.Implement per the conventions
Follow the patterns in the package guides:
- Backend: module-per-feature under
src/api/<feature>/, DTOs withclass-validator, responses viaResponseInterceptor, schema changes only via migrations. - Frontend: page-module-per-feature under
src/app/pages/<feature>/, HTTP methods namedHTTP_METHOD_descriptiveName, state with Angular signals, strings viasrc/app/internationalization/, tokens fromsrc/styles/colors.scss.
Run lint and tests
All of the following must pass locally before you push:Coverage must remain above the enforced thresholds. Do not lower them.
Update documentation
- If the change modifies
/api/bilateral/*or/api/platform-report/*— add a change-log row inonecgiar-pr-server/docs/bilateral-result-summaries.en.md(see below). - If the change introduces a new UX pattern — update
docs/system-design/design.md. - If the change adds a new module or integration — update
docs/detailed-design/detailed-design.md.
Pre-commit hooks
Husky is installed at the repo root vianpm run prepare. It runs lint-staged on every commit, which executes ESLint on all staged .ts files.
Security rule
PRMS enforces a hard, project-wide rule: never print, log, or echo tokens, webhook URLs, API keys, passwords, AD/Cognito credentials, database credentials, or any other sensitive environment variable anywhere — code, scripts, CI workflows, documentation, debug output, or error messages. This applies equally to:- Backend services, repositories, scripts, and CI pipelines
- Frontend components, services, and telemetry
- Documentation and example commands
.cursorrules at the repo root. Secrets must live in environment variables, AWS Secrets Manager, or GitHub Secrets. PRs must not add .env content.
Bilateral and platform-report API changes
The/api/bilateral/* and /api/platform-report/* surfaces are the most externally visible APIs in PRMS. Downstream consumers depend on stable, typed payload shapes.
If your change modifies any response field on these surfaces, you must:
- Keep changes additive — do not rename or remove existing fields without a
v2rollout. - Update the change log in
onecgiar-pr-server/docs/bilateral-result-summaries.en.md. - Update the payload-fixture tests co-located with the controller or service.
Migration check requirement
If your branch adds or changes TypeORM entities, you must include the corresponding migration and verify it locally:migration:check:ci, which will fail the build if any pending migration is detected. There are no exceptions to this requirement.