backend-change
Build or refine FastAPI use cases, endpoints, repositories, dependencies, jobs or operational scripts in backend/. Use when implementing, fixing or refactoring backend behavior after its scope is know
SKILL.md.claude/skills/backend-change/SKILL.md
GitHubbackend-change
Read backend/AGENTS.md (the backend constitution), the affected acceptance
criteria, a matching module exemplar and related tests. Use the project profile
when active capabilities or public contracts matter, and backend/README.md
for stack or entry-point questions. Commands run from the Git root; pytest
paths are relative to backend.
This workflow owns implementation order and refinement. Consult, without restarting the loop:
- backend-architecture and only its relevant reference for an architectural choice (ownership, interfaces, composition).
- fastapi only for a concrete framework API question;
project conventions in
backend/AGENTS.mdgovern the implementation. - The profile and installed exemplar for active capabilities and public contracts.
- operational-scripts.md for a backfill, bootstrapper or other operational script.
Build mode
- Pick one observable vertical slice.
- Write a test that fails for the intended reason (TDD). Use schema-change for persistence changes.
- Add the minimal implementation, including wiring and its consumer.
- Run the test to green. Test authorization and scopes when active.
- Coordinate API/BFF/DTO consumers on one acceptance contract, then repeat.
Refinement mode
- Take a concrete finding or objective and identify preserved invariants.
- Start from green; improve interface, responsibility, query or wiring in small steps, rerunning affected checks after each.
- Use codebase-design for a design seam, not a compulsory rewrite.
Verify and hand off
Run just backend check and focused just backend test unit <paths>. When the
HTTP contract changed (routes, parameters, models, tags, summaries), refresh the
API reference snapshot with openapi-sync. API,
persistence and effects follow the impact matrix in
docs/content/docs/equipo/verificacion.md. Hand the exact revision, commands and results,
unresolved findings and public contract evidence to
validate-change.
Gotchas
- Green checks alone do not close the change; validate-change does.
- Diagnose failures without weakening existing gates.
- Fix a known bug before unrelated refactoring.
- Performance claims need before/after measurement.
- A scope change returns to define-change instead of growing the slice.
- Preserve the persistence, blocking-call and rate-limit invariants in
backend/AGENTS.md; consult backend-architecturereferences/repositories.mdorreferences/endpoints.mdwhen the change needs their implementation detail.