This repository maintains production infrastructure and application code. Consistency and safety are mandatory.
main # Always deployable (dev environment auto-deploy)
release/* # Temporary branch for coordination if needed
feat/<area>-<desc>
fix/<area>-<issue-id>
hotfix/<prod-issue>
chore/<task>
- β All unit + integration tests pass
- β
npm run lint& type checks (where applicable) - β
Infrastructure changes include
terraform planoutput in PR description (redacted secrets) - β Updated docs if behavior/infrastructure changes
- β No secrets / credentials added
- β
Added/updated
.env.exampleif new variables
Format: <type>(<scope>): <short description>
Types: feat, fix, chore, docs, test, infra, refactor, perf, revert
Example: feat(billing): add subscription status polling hook
- Run plan:
terraform plan -out plan.out - Save summary:
terraform show -no-color plan.out > plan.txt - Attach/inline relevant diff sections in PR
- Tag resources with mandatory tags:
Environment, Project=ai-nexus, Owner, Confidentiality=internal/public, CostCenter
- Add new entries to
.env.example - Never commit real values
- Prefer SSM/Secrets Manager over plaintext
| Layer | Command | Min Coverage |
|---|---|---|
| Unit (lambda) | npm test (lambda pkg) |
Key paths touched |
| Integration API | npm run test:integration |
Critical endpoints |
| E2E (select) | npm run test:e2e |
Happy path |
- TypeScript strict mode enforced
- Prefer functional components + hooks
- Avoid ambient
any - Keep components <250 lines (split otherwise)
- All new AWS IAM policies must be least privilege & justified in PR
- No wildcard
*on sensitive actions unless documented rationale - Use parameterized table names with environment suffixes
Update or create domain docs under docs/ when:
- New subsystem added
- External integration added/modified
- Deployment procedure changes
- Merge to
main - Tag RC:
git tag vX.Y.Z-rc && git push --tags - Validate staging
- Promote:
git tag vX.Y.Z <rc-commit> - Close milestone & generate changelog
- Secret scan (trufflehog/gitleaks)
- Terraform static analysis (tfsec)
- Dependency audit (npm audit + custom severity gate)
config/ENVIRONMENTS.mdβ Environment contractSECURITY_README.mdβ Secret & security model
Open a discussion or tag @maintainers in PR.