--- name: init-go-module description: Inicializa un módulo Go funcional con bindings Python (CGO c-shared + ctypes) disable-model-invocation: true user-invocable: true allowed-tools: Bash, Read, Write, Edit --- # init-go-module Inicializa un módulo Go con arquitectura funcional (pure core / impure shell) y bindings Python automáticos via CGO c-shared + ctypes. Coherente con DevFactory y el stack del backend-lib agent. ## Sintaxis ```bash /init-go-module [nombre] [--path /ruta/destino] ``` - `nombre`: nombre del módulo (kebab-case). Si no se da, se pregunta. - `--path`: directorio destino. Default: directorio actual. ## Flujo ### 1. Ejecutar script de setup ```bash bash "${CLAUDE_SKILL_DIR}/setup-go-module.sh" [nombre] [path] ``` ### 2. Si el script reporta STATUS: CONFIGURED Informar al usuario que el módulo ya está configurado. ### 3. Si el script reporta STATUS: READY Mostrar resumen: - Estructura creada - Cómo compilar: `make build` - Cómo generar bindings Python: `make python` - Cómo testear: `make test` - Cómo usar desde Python: `from bindings.modulo import *` ### 4. Si el script reporta STATUS: ERROR Mostrar el error y sugerir corrección. ## Convenciones - Usa DevFactory como dependencia via `go.work` (igual que build-wails) - Patrón pure core / impure shell de DevFactory - `Result[T]` y `Option[T]` del core de DevFactory - Funciones exportadas a Python son thin wrappers en `export/` - El wrapper Python se auto-genera desde los `//export` comments