@startuml branching-strategy-git !include _style.iuml title 2a. Estrategia de branches Git — Trunk-based start partition "Trabajo cotidiano (feature)" { :developer crea rama feature/- desde main al día; :commits locales pequeños, pre-commit hooks corren typecheck y lint; :push y abre Pull Request hacia main; :GitHub Actions ejecuta jobs quality/test/build; :Vercel publica preview; :Neon crea branch preview/pr-; if (¿checks verdes y review aprobada?) then (sí) :merge squash a main (un commit por PR); :Vercel despliega production; :neonctl branches delete preview/pr-; else (no) :autor corrige y vuelve a iterar el PR; stop endif } partition "Hotfix urgente" { :crear rama hotfix/ desde main exactamente igual que un feature común; :corrección mínima dirigida al bug, sin refactors; :PR con la etiqueta hotfix, review obligatoria de un segundo ingeniero; :merge a main, deploy Vercel inmediato; :anotar incidente en postmortem si aplica; } partition "Rollback de producción" { :Vercel ofrece "Promote previous deployment" desde el dashboard; if (¿el bug requiere revert de schema?) then (sí) :neonctl branches restore production --source 'production@' crea branch nuevo; :validar y redirigir DATABASE_URL al branch restaurado; else (no) :revertir solo el código via Vercel promote; endif :crear PR de revert documentado contra main para alinear historial; } stop footer Fuente: docs/architecture/neon-branching.md, .github/workflows/ci.yml @enduml