CA
campusway-api-contract-regression
CampusWay API contract and regression workflow for Express TypeScript endpoints. Use when: API response changed, field mismatch, frontend integration broke, schema drift, endpoint refactor, release regression checks.
Install
mkdir -p .claude/skills/campusway-api-contract-regression && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15164" && unzip -o skill.zip -d .claude/skills/campusway-api-contract-regression && rm skill.zipInstalls to .claude/skills/campusway-api-contract-regression
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
CampusWay API contract and regression workflow for Express TypeScript endpoints. Use when: API response changed, field mismatch, frontend integration broke, schema drift, endpoint refactor, release regression checks.216 chars✓ has a “when” trigger
About this skill
CampusWay API Contract Regression
Outcome
Keep backend responses and frontend expectations aligned while reducing endpoint regressions.
When To Use
- API payload shape changes.
- Frontend breaks after backend refactor.
- New fields are added or renamed.
- Release candidate needs API safety validation.
Procedure
- Define contract scope:
- endpoint path and method
- request fields
- response fields and status codes
- Confirm current backend implementation for that endpoint.
- Compare frontend usage path and required fields.
- Apply minimal compatibility changes:
- preserve old fields when safe
- add additive fields before removing legacy fields
- Run verification:
cd backend && npm run build- targeted backend tests for affected module
cd frontend && npm run buildcd frontend && npm run e2e:smoke -- e2e/public-smoke.spec.ts
- Record explicit contract delta:
- added fields
- removed fields
- status code changes
Decision Points
- If breaking change is unavoidable, require staged rollout note and frontend update in same PR.
- If contract is used by multiple clients, keep backward-compatible fallback window.
Quality Checks
- No runtime undefined-field errors in frontend.
- Backend returns stable status codes and validation errors.
- Contract changes are documented in related API docs.
References In Workspace
API_CONTRACT_SUBSCRIPTION.mdHOME_API_CONTRACT.mdNEWS_API_CONTRACT.mdbackend/API_DOCUMENTATION.md