docs: CLAUDE.md actualizado con fn run, tipos Go en functions/, bash functions

Documentación de fn run para todos los lenguajes, nueva ubicación de tipos Go,
sección de uso por agentes. Añadidas funciones Bash del registry (shell, infra,
core, pipelines).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-28 23:23:30 +01:00
parent 72c572e1ea
commit 54be36dd63
11 changed files with 438 additions and 4 deletions
@@ -0,0 +1,38 @@
---
name: assert_file_exists
kind: function
lang: bash
domain: shell
version: "1.0.0"
purity: impure
signature: "assert_file_exists(file_path: string) -> string"
description: "Verifica que un archivo existe en el filesystem. Imprime su tamaño en bytes a stdout. Sale con exit code 1 si el archivo no existe."
tags: [assert, file, exists, validation, shell, bash]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: []
tested: false
tests: []
test_file_path: ""
file_path: "bash/functions/shell/assert_file_exists.sh"
---
## Ejemplo
```bash
source functions/shell/assert_file_exists.sh
size=$(assert_file_exists /home/lucas/fn_registry/registry.db)
echo "Tamaño: $size bytes"
```
## Notas
La función se sourcea, no se ejecuta directamente. Usa `stat -c%s` para obtener el tamaño en bytes (compatible con GNU coreutils / Linux).
Output limpio: solo el número de bytes a stdout. Los errores van a stderr.
No usa `set -e` internamente — el caller controla el flujo con el exit code de retorno.