| name | go-dev-workflow |
| description | Flujo de desarrollo en GoFHIR. Usar al configurar ambiente, ejecutar comandos make, o trabajar con git hooks. |
| allowed-tools | Read, Grep, Glob, Bash(make:*, git:*, go:*) |
Skill: go-dev-workflow
Flujo completo de desarrollo en GoFHIR.
Cuándo usar este skill
- Al configurar ambiente de desarrollo
- Al ejecutar comandos make
- Al trabajar con git hooks
- Al preparar código para commit/push
Setup Inicial
make tools
make hooks-install
make deps
Comandos Make Principales
Desarrollo Diario
make fmt
make lint
make test
make test-short
make test-fhirpath
make test-validator
make coverage
make coverage-check
Benchmarks
make bench
make bench-fhirpath
make bench-validator
make bench-baseline
make bench-compare
Seguridad
make security
make gosec
make govulncheck
Documentación
make doc
CI Local
make ci
make ci-quick
Git Hooks
Instalación
make hooks-install
make hooks-uninstall
make hooks-run
Hook: pre-commit
Ejecuta automáticamente antes de cada commit:
go fmt - Verifica formato
go vet - Análisis estático
golangci-lint - Linting completo
- Detecta TODO/FIXME y prints de debug
Hook: commit-msg
Valida formato Conventional Commits:
type(scope): description
# Tipos válidos:
feat # Nueva funcionalidad
fix # Corrección de bug
docs # Documentación
style # Formato (no afecta lógica)
refactor # Refactorización
perf # Mejora de rendimiento
test # Tests
build # Sistema de build
ci # CI/CD
chore # Otros
revert # Revertir commit
Ejemplos:
git commit -m "feat(validator): add profile validation"
git commit -m "fix(fhirpath): handle null in where()"
git commit -m "docs: update README"
Hook: pre-push
Solo en push a main/master:
- Ejecuta tests con race detector
- Ejecuta govulncheck
Flujo de Trabajo Recomendado
git checkout -b feat/nueva-funcionalidad
make fmt
make lint
make test-short
git add .
git commit -m "feat(module): description"
make ci
git push -u origin feat/nueva-funcionalidad
DevContainer (VSCode)
Para desarrollo en contenedor:
- Abrir proyecto en VSCode
- Command Palette > "Dev Containers: Reopen in Container"
- Ambiente preconfigurado con todas las herramientas
Archivos de Configuración
| Archivo | Propósito |
|---|
Makefile | Comandos de desarrollo |
.golangci.yml | Configuración de linters |
.editorconfig | Estilo de código por editor |
scripts/hooks/* | Git hooks nativos |
.devcontainer/ | Configuración DevContainer |