Dev loop
A change, start to finish
-
Branch from
main:git checkout main && git pull && git checkout -b feat/<short-name>. -
Make the change, and update the page on this site that describes it (
AGENTS.md, "Docs move with the code"). -
Run the checks for what you touched:
(cd api && go test ./...) # needs Docker for DynamoDB Local(cd shared/go-common && go test ./...)pnpm --filter @caregiver/infra testpnpm --filter @caregiver/docs build && python3 scripts/check-docs.pypnpm exec prettier --check "**/*.{ts,tsx,json,md,yaml,yml}" -
Commit with a Conventional Commit message (
feat:,fix:,docs:…), lowercase after the colon. A hook checks it. -
Push and open a PR. CI deploys it to dev, and the
cdk diffcomment shows any infra changes. -
Merge when it's green. Merging deploys to prod.
Adding a feature flag
- Add it to
infra/lib/appconfig-schema.json(an object with a booleanenabled). - Add it to
infra/lib/appconfig-content.tswithenabled: false. - Read it in Go through the flags client
(
shared/go-common/flags), or in the app throughGET /flags. - After the deploy, change it in the AWS AppConfig console. Note when it can be removed.
Recording a decision
Copy docs/decisions/_template.md to the next number, fill it
in, and add a row to the Decisions index.
Useful commands
aws logs tail /aws/lambda/caregiver-dev-api --follow # dev API logs
make -C api smoke-dev # acceptance scenarios against dev
aws ce get-cost-and-usage --granularity DAILY --metrics UnblendedCost \
--time-period Start=$(date -v-30d +%Y-%m-%d),End=$(date +%Y-%m-%d) # last 30 days' cost