diff --git a/.claude/agents/fn-analizador/SKILL.md b/.claude/agents/fn-analizador/SKILL.md index 7c12422f..e9ea3c47 100644 --- a/.claude/agents/fn-analizador/SKILL.md +++ b/.claude/agents/fn-analizador/SKILL.md @@ -42,10 +42,10 @@ Opcionalmente: ```bash # Por id -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE id = '';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE id = '';" # Por dir_path -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE dir_path = '';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, dir_path FROM apps WHERE dir_path = '';" ``` Si no hay match → reportar y abortar. @@ -78,8 +78,8 @@ APP_DB="$APP_DIR/operations.db" # Si no existe, inicializar (aplica migraciones, incluida 005_e2e_runs) if [ ! -f "$APP_DB" ]; then - cd /home/lucas/fn_registry - FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init "$APP_DIR" + cd $HOME/fn_registry + FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init "$APP_DIR" fi # Verificar tabla e2e_runs existe (migracion 005) @@ -97,7 +97,7 @@ Hay dos caminos: **Camino A — invocar funcion del registry (preferido):** ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry ./fn run e2e_run_checks_go_infra ... ``` @@ -139,15 +139,15 @@ func main() { Ejecutar con: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry CGO_ENABLED=1 go run -tags fts5 /tmp/run_e2e_.go /tmp/checks.yaml "$APP_DIR" ``` ### 5. Eval assertions activas (si la app las tiene) ```bash -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval --db "$APP_DB" +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval --db "$APP_DB" ``` Capturar fallos como warning checks adicionales. diff --git a/.claude/agents/fn-constructor/SKILL.md b/.claude/agents/fn-constructor/SKILL.md index df8ef54a..eed3de59 100644 --- a/.claude/agents/fn-constructor/SKILL.md +++ b/.claude/agents/fn-constructor/SKILL.md @@ -15,20 +15,20 @@ Eres el agente constructor del fn_registry. Tu rol es crear funciones, tests y t ```bash # Buscar si ya existe algo similar (OBLIGATORIO antes de crear) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" # Buscar tipos existentes -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" # Ver funciones de un dominio -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE domain = 'DOMINIO' ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE domain = 'DOMINIO' ORDER BY name;" # Ver tipos de un dominio -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO';" # Verificar que un ID referenciado existe -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = 'ID_AQUI';" -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM types WHERE id = 'ID_AQUI';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = 'ID_AQUI';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM types WHERE id = 'ID_AQUI';" ``` Si algo similar ya existe, informa al usuario y sugiere mejorarlo en vez de duplicarlo. @@ -39,13 +39,13 @@ Antes de implementar logica desde cero, busca funciones del registry que puedas ```bash # Buscar funciones reutilizables por lo que hacen (ampliar con OR y prefijos) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:filter* OR description:map* OR description:transform*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:filter* OR description:map* OR description:transform*') ORDER BY name;" # Ver que retorna y que tipos usa una funcion candidata -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, returns, uses_types FROM functions WHERE id = 'ID_CANDIDATO';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, returns, uses_types FROM functions WHERE id = 'ID_CANDIDATO';" # Buscar funciones puras del mismo dominio (las mas componibles) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature FROM functions WHERE domain = 'DOMINIO' AND purity = 'pure' ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature FROM functions WHERE domain = 'DOMINIO' AND purity = 'pure' ORDER BY name;" ``` **Criterios de reutilizacion:** @@ -78,38 +78,38 @@ Esto acelera la construccion y fortalece el grafo de dependencias del registry. | `bash` | `bash/functions/{domain}/{name}.sh` | `bash/functions/pipelines/{name}.sh` | *(no aplica)* | | `typescript` | `frontend/functions/{domain}/{name}.ts` | *(no aplica)* | `frontend/types/{domain}/{name}.ts` | -**Ruta absoluta donde crear el archivo** = `/home/lucas/fn_registry/` + `file_path` del .md. +**Ruta absoluta donde crear el archivo** = `$HOME/fn_registry/` + `file_path` del .md. Ejemplo: si `lang: bash` y `domain: infra`, el archivo va en: -- `/home/lucas/fn_registry/bash/functions/infra/{name}.sh` + `.md` -- **NUNCA** en `/home/lucas/fn_registry/functions/infra/{name}.sh` +- `$HOME/fn_registry/bash/functions/infra/{name}.sh` + `.md` +- **NUNCA** en `$HOME/fn_registry/functions/infra/{name}.sh` ### Estructura detallada **Go** (carpeta raiz: `functions/` y `types/`) -- Funciones: `/home/lucas/fn_registry/functions/{domain}/{name}.go` + `.md` -- Tests: `/home/lucas/fn_registry/functions/{domain}/{name}_test.go` -- Tipos: `/home/lucas/fn_registry/functions/{domain}/{name}.go` (codigo, mismo paquete Go) + `/home/lucas/fn_registry/types/{domain}/{name}.md` (metadata con file_path apuntando a functions/) -- Pipelines: `/home/lucas/fn_registry/functions/pipelines/{name}.go` + `.md` +- Funciones: `$HOME/fn_registry/functions/{domain}/{name}.go` + `.md` +- Tests: `$HOME/fn_registry/functions/{domain}/{name}_test.go` +- Tipos: `$HOME/fn_registry/functions/{domain}/{name}.go` (codigo, mismo paquete Go) + `$HOME/fn_registry/types/{domain}/{name}.md` (metadata con file_path apuntando a functions/) +- Pipelines: `$HOME/fn_registry/functions/pipelines/{name}.go` + `.md` - Paquete Go = nombre del directorio (core, finance, datascience, cybersecurity, infra, shell, tui, io) **Python** (carpeta raiz: `python/`) -- Funciones: `/home/lucas/fn_registry/python/functions/{domain}/{name}.py` + `.md` -- Tests: `/home/lucas/fn_registry/python/functions/{domain}/{name}_test.py` -- Tipos: `/home/lucas/fn_registry/python/types/{domain}/{name}.py` + `.md` -- Pipelines: `/home/lucas/fn_registry/python/functions/pipelines/{name}.py` + `.md` +- Funciones: `$HOME/fn_registry/python/functions/{domain}/{name}.py` + `.md` +- Tests: `$HOME/fn_registry/python/functions/{domain}/{name}_test.py` +- Tipos: `$HOME/fn_registry/python/types/{domain}/{name}.py` + `.md` +- Pipelines: `$HOME/fn_registry/python/functions/pipelines/{name}.py` + `.md` **Bash** (carpeta raiz: `bash/`) -- Funciones: `/home/lucas/fn_registry/bash/functions/{domain}/{name}.sh` + `.md` -- Tests: `/home/lucas/fn_registry/bash/functions/{domain}/{name}_test.sh` -- Pipelines: `/home/lucas/fn_registry/bash/functions/pipelines/{name}.sh` + `.md` +- Funciones: `$HOME/fn_registry/bash/functions/{domain}/{name}.sh` + `.md` +- Tests: `$HOME/fn_registry/bash/functions/{domain}/{name}_test.sh` +- Pipelines: `$HOME/fn_registry/bash/functions/pipelines/{name}.sh` + `.md` - Tipos: Bash no tiene tipos — usar solo `uses_types` para referenciar tipos de otros lenguajes **TypeScript** (carpeta raiz: `frontend/`) -- Funciones puras: `/home/lucas/fn_registry/frontend/functions/core/{name}.ts` + `.md` -- Componentes React: `/home/lucas/fn_registry/frontend/functions/ui/{name}.tsx` + `.md` +- Funciones puras: `$HOME/fn_registry/frontend/functions/core/{name}.ts` + `.md` +- Componentes React: `$HOME/fn_registry/frontend/functions/ui/{name}.tsx` + `.md` - Tests: junto al archivo, `{name}.test.ts` o `{name}.test.tsx` -- Tipos: `/home/lucas/fn_registry/frontend/types/{domain}/{name}.ts` + `.md` +- Tipos: `$HOME/fn_registry/frontend/types/{domain}/{name}.ts` + `.md` --- @@ -591,7 +591,7 @@ Documentar completamente el .md igualmente. 1. **BUSCAR** en registry.db con FTS5 si existe algo similar 2. **VALIDAR** que los IDs referenciados (uses_functions, uses_types, returns, error_type) existen en la BD 3. **CREAR** los archivos en la carpeta raiz correcta segun el lenguaje (ver tabla REGLA CRITICA): Go en `functions/`, Python en `python/functions/`, Bash en `bash/functions/`, TypeScript en `frontend/functions/` -4. **INDEXAR** ejecutando: `cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index` +4. **INDEXAR** ejecutando: `cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index` 5. **VERIFICAR** con: `./fn show {id}` que se indexo correctamente 6. Si hay errores de validacion, corregirlos y re-indexar @@ -600,10 +600,10 @@ Documentar completamente el .md igualmente. 1. **LEER** la funcion existente (codigo + .md) desde la BD: `sqlite3 registry.db "SELECT code, signature FROM functions WHERE id = '...'"` 2. **CREAR** el archivo de test 3. **EJECUTAR** los tests: - - Go: `cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 -run TestNombre ./functions/{domain}/` - - Python: `cd /home/lucas/fn_registry/python && python -m pytest functions/{domain}/{name}_test.py` + - Go: `cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 -run TestNombre ./functions/{domain}/` + - Python: `cd $HOME/fn_registry/python && python -m pytest functions/{domain}/{name}_test.py` - TypeScript: desde `frontend/`, ejecutar con el test runner configurado - - Bash: `cd /home/lucas/fn_registry && bash bash/functions/{domain}/{name}_test.sh` + - Bash: `cd $HOME/fn_registry && bash bash/functions/{domain}/{name}_test.sh` 4. **ACTUALIZAR** el .md con `tested: true`, `tests: [...]` y `test_file_path` 5. **RE-INDEXAR** y verificar @@ -620,19 +620,19 @@ Documentar completamente el .md igualmente. ```bash # Compilar CLI (necesario si se modifico codigo del CLI) -cd /home/lucas/fn_registry && CGO_ENABLED=1 go build -tags fts5 -o fn ./cmd/fn/ +cd $HOME/fn_registry && CGO_ENABLED=1 go build -tags fts5 -o fn ./cmd/fn/ # Indexar registry -cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index +cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index # Tests Go de un dominio -cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./functions/{domain}/ +cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./functions/{domain}/ # Tests Go de todo el registry -cd /home/lucas/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./... +cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 ./... # Mostrar funcion indexada -cd /home/lucas/fn_registry && ./fn show {id} +cd $HOME/fn_registry && ./fn show {id} ``` ### fn run — Ejecutar funciones y pipelines directamente @@ -640,7 +640,7 @@ cd /home/lucas/fn_registry && ./fn show {id} Despues de crear/indexar, puedes ejecutar directamente con `fn run`: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Go pipeline (go run . en su directorio) ./fn run init_metabase --project test @@ -729,7 +729,7 @@ Peticion: "Crea una funcion que calcule la media de un slice de float64" ### Paso 1: Buscar en BD ```bash -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:mean* OR name:average* OR description:media* OR description:average*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:mean* OR name:average* OR description:media* OR description:average*') ORDER BY name;" ``` ### Paso 2: Crear archivos @@ -823,6 +823,6 @@ func TestMean(t *testing.T) { ### Paso 3: Indexar y verificar ```bash -cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index +cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index ./fn show mean_go_core ``` diff --git a/.claude/agents/fn-executor/SKILL.md b/.claude/agents/fn-executor/SKILL.md index 00be89d2..7d20d463 100644 --- a/.claude/agents/fn-executor/SKILL.md +++ b/.claude/agents/fn-executor/SKILL.md @@ -35,22 +35,22 @@ Las apps estan indexadas en registry.db con toda la metadata necesaria para ejec ```bash # Ver todas las apps disponibles -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, domain, description, entry_point, dir_path FROM apps ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, domain, description, entry_point, dir_path FROM apps ORDER BY name;" # Ver app completa con dependencias y framework -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, entry_point, dir_path, uses_functions, uses_types, framework, tags FROM apps WHERE id = 'APP_ID';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, entry_point, dir_path, uses_functions, uses_types, framework, tags FROM apps WHERE id = 'APP_ID';" # Buscar apps por FTS (nombre, descripcion, tags, documentacion) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, description FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, description FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" # Apps de un dominio -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, description, entry_point FROM apps WHERE domain = 'DOMINIO';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, description, entry_point FROM apps WHERE domain = 'DOMINIO';" # Apps que usan una funcion especifica -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name FROM apps WHERE uses_functions LIKE '%funcion_id%';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name FROM apps WHERE uses_functions LIKE '%funcion_id%';" # Ver documentacion completa de una app -sqlite3 /home/lucas/fn_registry/registry.db "SELECT documentation, notes FROM apps WHERE id = 'APP_ID';" +sqlite3 $HOME/fn_registry/registry.db "SELECT documentation, notes FROM apps WHERE id = 'APP_ID';" ``` **Campos clave de apps para ejecucion:** @@ -65,19 +65,19 @@ sqlite3 /home/lucas/fn_registry/registry.db "SELECT documentation, notes FROM ap ```bash # Ver pipeline/funcion completa -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, signature, description, uses_functions, uses_types FROM functions WHERE id = 'ID_AQUI';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, signature, description, uses_functions, uses_types FROM functions WHERE id = 'ID_AQUI';" # Ver codigo de la funcion -sqlite3 /home/lucas/fn_registry/registry.db "SELECT code FROM functions WHERE id = 'ID_AQUI';" +sqlite3 $HOME/fn_registry/registry.db "SELECT code FROM functions WHERE id = 'ID_AQUI';" # Pipelines disponibles (con tag launcher para TUI) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE kind = 'pipeline' ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE kind = 'pipeline' ORDER BY name;" # Funciones impuras ejecutables directamente -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE purity = 'impure' AND kind = 'function' ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, signature, description FROM functions WHERE purity = 'impure' AND kind = 'function' ORDER BY name;" # Buscar por FTS -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" ``` ### Usar contexto de apps para ejecucion inteligente @@ -98,10 +98,10 @@ Cuando te pidan ejecutar una app, sigue este flujo: ```bash # Desde la raiz del registry -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Opcion A: Usar el CLI -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name} # Opcion B: Copiar template directamente cp fn_operations/project_template/operations.db apps/{app_name}/operations.db @@ -221,10 +221,10 @@ Las entities representan los datos concretos del proyecto. Las relations documen ### Crear entities (datos que el pipeline consume o produce) ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Entity de entrada -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \ +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity add \ --db apps/{app_name}/operations.db \ --name "btc_ticks" \ --type-ref "tick_go_finance" \ @@ -235,7 +235,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \ --metadata '{"pair":"BTCUSDT","exchange":"binance"}' # Entity de salida -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \ +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity add \ --db apps/{app_name}/operations.db \ --name "btc_ohlcv_5m" \ --type-ref "ohlcv_go_finance" \ @@ -249,7 +249,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity add \ ### Crear relations (como se conectan entities) ```bash -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation add \ +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops relation add \ --db apps/{app_name}/operations.db \ --name "ticks_to_ohlcv" \ --from-entity "{entity_id}" \ @@ -262,13 +262,13 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation add \ ```bash # Listar entities -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops entity list --db apps/{app_name}/operations.db +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops entity list --db apps/{app_name}/operations.db # Listar relations -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops relation list --db apps/{app_name}/operations.db +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops relation list --db apps/{app_name}/operations.db # Ver grafo ASCII -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/operations.db +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops graph --db apps/{app_name}/operations.db ``` --- @@ -280,7 +280,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/ope `fn run` despacha automaticamente segun el lenguaje y tipo: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Go pipeline (go run . en su directorio) ./fn run init_metabase --project test @@ -318,13 +318,13 @@ Para apps con su propio main.go/main.py/main.sh: ```bash # Go app -cd /home/lucas/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . [flags] +cd $HOME/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . [flags] # Python app -cd /home/lucas/fn_registry/apps/{app_name} && python3 main.py [args] +cd $HOME/fn_registry/apps/{app_name} && python3 main.py [args] # Bash app -cd /home/lucas/fn_registry/apps/{app_name} && bash main.sh [args] +cd $HOME/fn_registry/apps/{app_name} && bash main.sh [args] ``` ### Capturar metricas de ejecucion @@ -340,7 +340,7 @@ Al ejecutar, siempre captura: ```bash # Ejemplo: ejecutar con captura de tiempo START=$(date -u +%Y-%m-%dT%H:%M:%SZ) -OUTPUT=$(cd /home/lucas/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . 2>&1) +OUTPUT=$(cd $HOME/fn_registry/apps/{app_name} && CGO_ENABLED=1 go run -tags fts5 . 2>&1) EXIT_CODE=$? END=$(date -u +%Y-%m-%dT%H:%M:%SZ) @@ -362,7 +362,7 @@ echo "Status: $STATUS | Start: $START | End: $END" ### Via CLI ```bash -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \ +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \ --db apps/{app_name}/operations.db \ --pipeline-id "tick_to_ohlcv_go_finance" \ --relation-id "{relation_id}" \ @@ -396,16 +396,16 @@ sqlite3 apps/{app_name}/operations.db "INSERT INTO executions (id, pipeline_id, ```bash # Listar todas -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db # Por pipeline -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --pipeline-id "ID" +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --pipeline-id "ID" # Por status -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --status failure +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list --db apps/{app_name}/operations.db --status failure # Detalle de una ejecucion -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution show --db apps/{app_name}/operations.db --id "EXEC_ID" +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution show --db apps/{app_name}/operations.db --id "EXEC_ID" ``` --- @@ -441,12 +441,12 @@ Si hay assertions definidas sobre las entities afectadas, evaluarlas para verifi ```bash # Evaluar assertions de una entity -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval \ +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval \ --db apps/{app_name}/operations.db \ --entity-id "ENTITY_ID" # Evaluar Y reaccionar (actualiza status de entities, crea proposals si hay fallos criticos) -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval \ +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval \ --db apps/{app_name}/operations.db \ --entity-id "ENTITY_ID" \ --react @@ -467,10 +467,10 @@ Cuando el usuario pide ejecutar algo que aun no tiene app: ```bash # 1. Crear directorio -mkdir -p /home/lucas/fn_registry/apps/{app_name} +mkdir -p $HOME/fn_registry/apps/{app_name} # 2. Crear app.md (OBLIGATORIO) -cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF' +cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF' --- name: {app_name} lang: go @@ -490,7 +490,7 @@ dir_path: "apps/{app_name}" MDEOF # 3. Crear .gitignore -cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF' +cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF' operations.db operations.db-wal operations.db-shm @@ -499,7 +499,7 @@ build/ GIEOF # 4. Inicializar modulo Go -cd /home/lucas/fn_registry/apps/{app_name} +cd $HOME/fn_registry/apps/{app_name} go mod init fn_registry/apps/{app_name} # 5. Crear main.go minimo @@ -523,8 +523,8 @@ func main() { GOEOF # 6. Inicializar operations.db -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name} # 7. Indexar en registry.db ./fn index @@ -534,10 +534,10 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} ```bash # 1. Crear directorio -mkdir -p /home/lucas/fn_registry/apps/{app_name} +mkdir -p $HOME/fn_registry/apps/{app_name} # 2. Crear app.md (OBLIGATORIO) -cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF' +cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF' --- name: {app_name} lang: py @@ -557,7 +557,7 @@ dir_path: "apps/{app_name}" MDEOF # 3. Crear .gitignore -cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF' +cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF' operations.db operations.db-wal operations.db-shm @@ -565,7 +565,7 @@ __pycache__/ GIEOF # 4. Crear main.py -cat > /home/lucas/fn_registry/apps/{app_name}/main.py << 'PYEOF' +cat > $HOME/fn_registry/apps/{app_name}/main.py << 'PYEOF' """Pipeline executor.""" import sys import time @@ -584,8 +584,8 @@ if __name__ == "__main__": PYEOF # 5. Inicializar operations.db -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name} # 6. Indexar en registry.db ./fn index @@ -595,10 +595,10 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} ```bash # 1. Crear directorio -mkdir -p /home/lucas/fn_registry/apps/{app_name} +mkdir -p $HOME/fn_registry/apps/{app_name} # 2. Crear app.md (OBLIGATORIO) -cat > /home/lucas/fn_registry/apps/{app_name}/app.md << 'MDEOF' +cat > $HOME/fn_registry/apps/{app_name}/app.md << 'MDEOF' --- name: {app_name} lang: bash @@ -618,14 +618,14 @@ dir_path: "apps/{app_name}" MDEOF # 3. Crear .gitignore -cat > /home/lucas/fn_registry/apps/{app_name}/.gitignore << 'GIEOF' +cat > $HOME/fn_registry/apps/{app_name}/.gitignore << 'GIEOF' operations.db operations.db-wal operations.db-shm GIEOF # 4. Crear main.sh -cat > /home/lucas/fn_registry/apps/{app_name}/main.sh << 'SHEOF' +cat > $HOME/fn_registry/apps/{app_name}/main.sh << 'SHEOF' #!/usr/bin/env bash # Pipeline executor: {app_name} set -euo pipefail @@ -650,11 +650,11 @@ main() { main "$@" SHEOF -chmod +x /home/lucas/fn_registry/apps/{app_name}/main.sh +chmod +x $HOME/fn_registry/apps/{app_name}/main.sh # 5. Inicializar operations.db -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name} # 6. Indexar en registry.db ./fn index @@ -669,7 +669,7 @@ Este patron captura todo lo necesario para registrar la ejecucion: ### Go ```bash -APP_DIR="/home/lucas/fn_registry/apps/{app_name}" +APP_DIR="$HOME/fn_registry/apps/{app_name}" OPS_DB="$APP_DIR/operations.db" PIPELINE_ID="{pipeline_id}" RELATION_ID="{relation_id}" # vacio si no aplica @@ -689,8 +689,8 @@ else fi # Registrar ejecucion -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \ +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \ --db "$OPS_DB" \ --pipeline-id "$PIPELINE_ID" \ --status "$STATUS" \ @@ -704,7 +704,7 @@ rm -f "$STDOUT_FILE" "$STDERR_FILE" ### Python ```bash -APP_DIR="/home/lucas/fn_registry/apps/{app_name}" +APP_DIR="$HOME/fn_registry/apps/{app_name}" OPS_DB="$APP_DIR/operations.db" START=$(date -u +%Y-%m-%dT%H:%M:%SZ) @@ -716,8 +716,8 @@ END=$(date -u +%Y-%m-%dT%H:%M:%SZ) STATUS="success" [ $EXIT_CODE -ne 0 ] && STATUS="failure" -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \ +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \ --db "$OPS_DB" \ --pipeline-id "{pipeline_id}" \ --status "$STATUS" \ @@ -728,7 +728,7 @@ FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \ ### Bash ```bash -APP_DIR="/home/lucas/fn_registry/apps/{app_name}" +APP_DIR="$HOME/fn_registry/apps/{app_name}" OPS_DB="$APP_DIR/operations.db" PIPELINE_ID="{pipeline_id}" @@ -741,8 +741,8 @@ END=$(date -u +%Y-%m-%dT%H:%M:%SZ) STATUS="success" [ $EXIT_CODE -ne 0 ] && STATUS="failure" -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution add \ +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution add \ --db "$OPS_DB" \ --pipeline-id "$PIPELINE_ID" \ --status "$STATUS" \ @@ -758,10 +758,10 @@ Antes de ejecutar, verifica que los snapshots de tipos en operations.db estan al ```bash # Verificar snapshots -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db # Actualizar si estan desactualizados -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID" +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID" ``` --- @@ -800,7 +800,7 @@ Crea una proposal cuando detectes: ### Como crear proposals ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Proposal para nueva funcion ./fn proposal add \ @@ -840,7 +840,7 @@ Cuando la proposal viene de un fallo o anomalia en una ejecucion, incluye la evi ```bash # Obtener el ID de la ejecucion que evidencia el problema -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops execution list \ +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops execution list \ --db apps/{app_name}/operations.db --status failure # Incluir evidencia en la descripcion @@ -858,19 +858,19 @@ Usa el contexto de la tabla apps para comparar y detectar patrones: ```bash # Ver que funciones usan las apps — detectar patrones comunes -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, uses_functions FROM apps WHERE uses_functions != '[]';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, uses_functions FROM apps WHERE uses_functions != '[]';" # Ver funciones mas usadas por apps (candidatas a mejora) -sqlite3 /home/lucas/fn_registry/registry.db " +sqlite3 $HOME/fn_registry/registry.db " SELECT f.value as func_id, COUNT(*) as uso FROM apps, json_each(apps.uses_functions) f GROUP BY f.value ORDER BY uso DESC;" # Ver apps que NO tienen funciones del registry (candidatas a extraccion) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, description FROM apps WHERE uses_functions = '[]';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, description FROM apps WHERE uses_functions = '[]';" # Ver si ya existe una proposal para algo similar -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, status, title FROM proposals WHERE status = 'pending' ORDER BY created_at DESC;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, status, title FROM proposals WHERE status = 'pending' ORDER BY created_at DESC;" ``` ### Flujo de deteccion al ejecutar diff --git a/.claude/agents/fn-mejorador/SKILL.md b/.claude/agents/fn-mejorador/SKILL.md index 99392f7d..ccf13dd1 100644 --- a/.claude/agents/fn-mejorador/SKILL.md +++ b/.claude/agents/fn-mejorador/SKILL.md @@ -43,12 +43,12 @@ APP_ID="" RUN_ID="" # dir_path desde registry -DIR_PATH=$(sqlite3 /home/lucas/fn_registry/registry.db \ +DIR_PATH=$(sqlite3 $HOME/fn_registry/registry.db \ "SELECT dir_path FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;") -APP_ID=$(sqlite3 /home/lucas/fn_registry/registry.db \ +APP_ID=$(sqlite3 $HOME/fn_registry/registry.db \ "SELECT id FROM apps WHERE id = '$APP_ID' OR dir_path = '$APP_ID' LIMIT 1;") -APP_DB="/home/lucas/fn_registry/$DIR_PATH/operations.db" +APP_DB="$HOME/fn_registry/$DIR_PATH/operations.db" [ ! -f "$APP_DB" ] && APP_DB="/tmp/$(basename $DIR_PATH)_e2e_runs.db" # Sanity check @@ -93,7 +93,7 @@ Por cada fallo: Antes de crear proposal, verificar que no haya una identica abierta: ```bash -sqlite3 /home/lucas/fn_registry/registry.db " +sqlite3 $HOME/fn_registry/registry.db " SELECT id FROM proposals WHERE status = 'pending' AND target_id = '$APP_ID' @@ -139,7 +139,7 @@ Sugerencia generica en `description` (NO codigo concreto, solo direccion): Si la misma assertion/check ha disparado proposal mas de 3 veces en los ultimos 30 dias, marcar `priority` (campo extendido si existe, si no, anotar en `description: '[REINCIDENTE x4]'`). ```bash -sqlite3 /home/lucas/fn_registry/registry.db " +sqlite3 $HOME/fn_registry/registry.db " SELECT COUNT(*) FROM proposals WHERE target_id = '$APP_ID' AND title LIKE '%::$CHECK_ID%' diff --git a/.claude/agents/fn-orquestador/SKILL.md b/.claude/agents/fn-orquestador/SKILL.md index 91d88317..4b2560c2 100644 --- a/.claude/agents/fn-orquestador/SKILL.md +++ b/.claude/agents/fn-orquestador/SKILL.md @@ -30,14 +30,14 @@ Referencia completa: `dev/issues/0069-autonomous-agent-loop-self-iterating-tasks 6. **Auditoria total**. Cada decision se loggea en `task_runs.progress_json` con razonamiento + fase + run_id. 7. **No self-modify**. NO modificas tu propio SKILL.md ni el de otros subagentes en la misma run. 8. **Cero produccion**. NO deploys, NO llamadas a APIs externas con auth, NO tocar BDs productivas. -9. **NUNCA paths absolutos fuera del worktree**. SIEMPRE rutas relativas o absolutas que apunten dentro de `/tmp/fn_orq__/`. Si necesitas leer algo del repo principal (ej. plantillas docs), copialo al worktree primero. Refuerzo del piloto 1 (2026-05-15): orquestador modifico hooks bash del repo principal usando paths absolutos `/home/lucas/fn_registry/bash/functions/...` para destrancar pre-commit. Solucion correcta: el fix vive en el worktree, NO en main. -10. **Pre-commit hook compartido**. Worktrees comparten `.git/hooks/` con main repo. Si el hook llama scripts via path absoluto a main (ej. `/home/lucas/fn_registry/bash/functions/cybersecurity/scan_secrets_in_dirty.sh`), el hook ejecutara la version de MAIN, no la del worktree. Opciones legitimas: +9. **NUNCA paths absolutos fuera del worktree**. SIEMPRE rutas relativas o absolutas que apunten dentro de `/tmp/fn_orq__/`. Si necesitas leer algo del repo principal (ej. plantillas docs), copialo al worktree primero. Refuerzo del piloto 1 (2026-05-15): orquestador modifico hooks bash del repo principal usando paths absolutos `$HOME/fn_registry/bash/functions/...` para destrancar pre-commit. Solucion correcta: el fix vive en el worktree, NO en main. +10. **Pre-commit hook compartido**. Worktrees comparten `.git/hooks/` con main repo. Si el hook llama scripts via path absoluto a main (ej. `$HOME/fn_registry/bash/functions/cybersecurity/scan_secrets_in_dirty.sh`), el hook ejecutara la version de MAIN, no la del worktree. Opciones legitimas: a. Aplicar el fix del hook EN EL WORKTREE y commitearlo en `auto/*` — al mergear el PR, main heredara el fix. b. Si el hook bloquea progreso y el fix del hook excede tu scope, `git commit --no-verify` para ESE commit SOLO, documentando excepcion en `task_runs.events_json[].decision="skip_hook"` con razon. NO modificar archivos en main directamente. 11. **Post-iteracion sanity check**. Tras cada commit en `auto/*`, verificar: ```bash - git -C /home/lucas/fn_registry status --short + git -C $HOME/fn_registry status --short ``` Si la salida cambia respecto al baseline (capturado al inicio del piloto), HAS contaminado el repo principal. ABORT con `status=sandbox_breach` y reporta los archivos afectados en el output al humano. @@ -49,24 +49,24 @@ Antes de arrancar el bucle, comprobar: ```bash # 1. Migration 006_task_runs.sql existe -ls /home/lucas/fn_registry/fn_operations/migrations/006_task_runs.sql 2>/dev/null \ +ls $HOME/fn_registry/fn_operations/migrations/006_task_runs.sql 2>/dev/null \ || { echo "ABORT: migration 006_task_runs.sql ausente. Aplicar issue 0069 paso 1 antes."; exit 2; } # 2. Subagentes fn-* presentes for a in fn-constructor fn-executor fn-recopilador fn-analizador fn-mejorador; do - test -f /home/lucas/fn_registry/.claude/agents/$a/SKILL.md \ + test -f $HOME/fn_registry/.claude/agents/$a/SKILL.md \ || { echo "ABORT: subagente $a ausente"; exit 2; } done # 3. master local up-to-date con origin (worktree se creara desde master) -git -C /home/lucas/fn_registry fetch origin master --quiet -LOCAL=$(git -C /home/lucas/fn_registry rev-parse master) -REMOTE=$(git -C /home/lucas/fn_registry rev-parse origin/master) +git -C $HOME/fn_registry fetch origin master --quiet +LOCAL=$(git -C $HOME/fn_registry rev-parse master) +REMOTE=$(git -C $HOME/fn_registry rev-parse origin/master) test "$LOCAL" = "$REMOTE" \ || { echo "ABORT: master local desincronizado con origin. git pull antes."; exit 2; } # 4. Branch auto/ NO existe ya (ni local ni en worktrees) -git -C /home/lucas/fn_registry rev-parse --verify "auto/${ISSUE_ID}" >/dev/null 2>&1 \ +git -C $HOME/fn_registry rev-parse --verify "auto/${ISSUE_ID}" >/dev/null 2>&1 \ && { echo "ABORT: branch auto/${ISSUE_ID} ya existe. Limpiar antes (git branch -D + worktree remove)."; exit 2; } # 5. gh CLI autenticado (necesario para PR draft al converger) @@ -116,7 +116,7 @@ BRANCH="auto/${ISSUE_ID}" TASK_RUN_ID="task_$(openssl rand -hex 8)" STARTED_AT=$(date +%s) WT_ROOT="/tmp/fn_orq_${ISSUE_ID}_${STARTED_AT}" -REPO="/home/lucas/fn_registry" +REPO="$HOME/fn_registry" # Crear worktree aislado desde master (no toca el principal) git -C "$REPO" worktree add -b "$BRANCH" "$WT_ROOT" master \ @@ -187,13 +187,13 @@ while iter < max_iterations and elapsed < max_minutes: Usar `Agent` tool con `subagent_type` correcto. Prompt **autocontenido** (paths absolutos, IDs, criterio exito). -**CRITICO**: pasar `WT_ROOT` (worktree path) en cada prompt y exigir al subagente trabajar dentro de el. Subagentes NO deben tocar el repo principal `/home/lucas/fn_registry/`. +**CRITICO**: pasar `WT_ROOT` (worktree path) en cada prompt y exigir al subagente trabajar dentro de el. Subagentes NO deben tocar el repo principal `$HOME/fn_registry/`. Patron prompt: ``` -Working dir: # NO /home/lucas/fn_registry +Working dir: # NO $HOME/fn_registry Branch: auto/ -Repo principal (solo lectura para registry.db): /home/lucas/fn_registry +Repo principal (solo lectura para registry.db): $HOME/fn_registry ... ``` @@ -346,7 +346,7 @@ Cada `progress_json` entry: |---|---|---| | `task_runs` no existe | migration 006 no aplicada | abortar pre-condicion 1 | | `worktree add` falla con "already exists" | branch o dir previo no limpiado | `git worktree prune` + `git branch -D auto/`, reintentar | -| Subagente toca `/home/lucas/fn_registry/` en vez de worktree | prompt sin `WT_ROOT` explicito | rebriefing con working dir explicito | +| Subagente toca `$HOME/fn_registry/` en vez de worktree | prompt sin `WT_ROOT` explicito | rebriefing con working dir explicito | | `master` desincronizado con origin | falta `git pull` | abortar pre-condicion 3 | | Loop infinito (mismo fail siempre) | watchdog ausente o desactivado | watchdog OBLIGATORIO, no skipear | | Subagente devuelve output ambiguo | prompt insuficiente | rebriefing con paths/IDs explicitos | diff --git a/.claude/agents/fn-recopilador/SKILL.md b/.claude/agents/fn-recopilador/SKILL.md index 21639fc6..34e238cd 100644 --- a/.claude/agents/fn-recopilador/SKILL.md +++ b/.claude/agents/fn-recopilador/SKILL.md @@ -40,10 +40,10 @@ apps/{app_name}/ ```bash # Listar todas las apps -ls -d /home/lucas/fn_registry/apps/*/ +ls -d $HOME/fn_registry/apps/*/ # Verificar que cada app tiene app.md -for app in /home/lucas/fn_registry/apps/*/; do +for app in $HOME/fn_registry/apps/*/; do name=$(basename "$app") echo "=== $name ===" [ -f "$app/app.md" ] && echo " app.md: OK" || echo " app.md: FALTA" @@ -82,8 +82,8 @@ sqlite3 "$APP_DB" "SELECT * FROM schema_migrations ORDER BY version;" 2>/dev/nul **Si faltan tablas**, aplicar migraciones: ```bash -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name} ``` ### 3. Integridad de Entities @@ -96,7 +96,7 @@ sqlite3 "$APP_DB" "SELECT id, name, type_ref, status, domain, source FROM entiti # Validar que type_ref existe en registry.db sqlite3 "$APP_DB" "SELECT DISTINCT type_ref FROM entities;" | while read ref; do - EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM types WHERE id = '$ref';") + EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM types WHERE id = '$ref';") if [ -z "$EXISTS" ]; then echo "ERROR: type_ref '$ref' no existe en registry.db" fi @@ -129,7 +129,7 @@ sqlite3 "$APP_DB" "SELECT r.id, r.name, r.to_entity FROM relations r WHERE r.to_ # Validar que 'via' referencia una funcion/pipeline del registry sqlite3 "$APP_DB" "SELECT DISTINCT via FROM relations WHERE via != '';" | while read via; do - EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$via';") + EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$via';") if [ -z "$EXISTS" ]; then echo "ERROR: relation.via '$via' no existe en registry.db" fi @@ -156,7 +156,7 @@ sqlite3 "$APP_DB" "SELECT id, pipeline_id, status, started_at, duration_ms, reco # Validar que pipeline_id existe en registry.db sqlite3 "$APP_DB" "SELECT DISTINCT pipeline_id FROM executions;" | while read pid; do - EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$pid';") + EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$pid';") if [ -z "$EXISTS" ]; then echo "ERROR: pipeline_id '$pid' no existe en registry.db" fi @@ -230,7 +230,7 @@ sqlite3 "$APP_DB" "SELECT id, version, lang, algebraic, snapped_at FROM types_sn # Comparar con registry.db — detectar snapshots desactualizados sqlite3 "$APP_DB" "SELECT id, version FROM types_snapshot;" | while IFS='|' read id ver; do - REG_VER=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT version FROM types WHERE id = '$id';") + REG_VER=$(sqlite3 $HOME/fn_registry/registry.db "SELECT version FROM types WHERE id = '$id';") if [ -z "$REG_VER" ]; then echo "WARN: snapshot '$id' ya no existe en registry.db" elif [ "$ver" != "$REG_VER" ]; then @@ -252,14 +252,14 @@ done ```bash # Verificar que la app esta en registry.db -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, domain, entry_point, dir_path FROM apps WHERE name = '{app_name}';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, domain, entry_point, dir_path FROM apps WHERE name = '{app_name}';" # Verificar que uses_functions del app.md coincide con lo indexado -sqlite3 /home/lucas/fn_registry/registry.db "SELECT uses_functions FROM apps WHERE name = '{app_name}';" +sqlite3 $HOME/fn_registry/registry.db "SELECT uses_functions FROM apps WHERE name = '{app_name}';" # Verificar que todas las funciones referenciadas existen -sqlite3 /home/lucas/fn_registry/registry.db "SELECT f.value FROM apps, json_each(apps.uses_functions) f WHERE apps.name = '{app_name}';" | while read fid; do - EXISTS=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$fid';") +sqlite3 $HOME/fn_registry/registry.db "SELECT f.value FROM apps, json_each(apps.uses_functions) f WHERE apps.name = '{app_name}';" | while read fid; do + EXISTS=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM functions WHERE id = '$fid';") if [ -z "$EXISTS" ]; then echo "ERROR: app usa funcion '$fid' que no existe en registry" fi @@ -273,7 +273,7 @@ done Patron para auditar TODAS las apps de una vez: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry echo "=========================================" echo "AUDITORIA DE APPS — fn-recopilador" @@ -327,7 +327,7 @@ for app_dir in apps/*/; do [ "$ERROR_LOGS" -gt 0 ] 2>/dev/null && echo " [WARN] $ERROR_LOGS logs de error" # 9. App indexada en registry.db - INDEXED=$(sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM apps WHERE name = '$APP_NAME';" 2>/dev/null) + INDEXED=$(sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM apps WHERE name = '$APP_NAME';" 2>/dev/null) [ -n "$INDEXED" ] && echo " [OK] Indexada en registry.db" || echo " [WARN] NO indexada en registry.db" done @@ -393,25 +393,25 @@ echo "=========================================" El recopilador puede sugerir o ejecutar estas reparaciones: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Aplicar migraciones faltantes -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name} # Actualizar snapshot desactualizado -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID" +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot update --db apps/{app_name}/operations.db --id "TYPE_ID" # Verificar snapshots -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops snapshot check --db apps/{app_name}/operations.db # Evaluar assertions pendientes -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops assertion eval --db apps/{app_name}/operations.db --entity-id "ENTITY_ID" +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops assertion eval --db apps/{app_name}/operations.db --entity-id "ENTITY_ID" # Re-indexar para que la app aparezca en registry.db ./fn index # Ver grafo de la app (util para diagnostico visual) -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops graph --db apps/{app_name}/operations.db +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops graph --db apps/{app_name}/operations.db ``` --- diff --git a/.claude/commands/app.md b/.claude/commands/app.md index 4a301246..6b0bceb1 100644 --- a/.claude/commands/app.md +++ b/.claude/commands/app.md @@ -38,13 +38,13 @@ Antes de crear nada, recopilar contexto: ```bash # Buscar funciones relevantes por descripcion -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:TERMINO* OR name:TERMINO*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'description:TERMINO* OR name:TERMINO*') ORDER BY name;" # Buscar apps similares -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, name, lang, description, uses_functions FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, name, lang, description, uses_functions FROM apps WHERE id IN (SELECT id FROM apps_fts WHERE apps_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" # Verificar que el nombre no esta tomado -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id FROM apps WHERE name = 'NOMBRE';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id FROM apps WHERE name = 'NOMBRE';" ``` 4. **Presentar plan al usuario** antes de ejecutar: @@ -79,7 +79,7 @@ Usar el Agent tool con `subagent_type: "fn-constructor"` pasando: Despues de que fn-constructor termine, verificar que todo se indexo: ```bash -cd /home/lucas/fn_registry && ./fn index +cd $HOME/fn_registry && ./fn index # Verificar cada funcion creada ./fn show {id_de_cada_funcion} ``` @@ -91,7 +91,7 @@ cd /home/lucas/fn_registry && ./fn index ### Estructura base (todos los lenguajes) ```bash -mkdir -p /home/lucas/fn_registry/apps/{app_name} +mkdir -p $HOME/fn_registry/apps/{app_name} ``` ### app.md (OBLIGATORIO — siempre primero) @@ -143,7 +143,7 @@ build/ **Go (CLI/TUI):** ```bash -cd /home/lucas/fn_registry/apps/{app_name} +cd $HOME/fn_registry/apps/{app_name} go mod init fn_registry/apps/{app_name} # Crear main.go, app/, config/, views/ segun necesidad ``` @@ -151,7 +151,7 @@ go mod init fn_registry/apps/{app_name} **Go (Wails — desktop con UI):** ```bash # Usar scaffold del registry -cd /home/lucas/fn_registry +cd $HOME/fn_registry ./fn run scaffold_wails_app -- --name {app_name} --dir apps/{app_name} ``` @@ -165,20 +165,20 @@ cd /home/lucas/fn_registry ```bash # Crear main.sh con source a funciones del registry # Pattern: source "$REGISTRY_ROOT/bash/functions/{domain}/{func}.sh" -chmod +x /home/lucas/fn_registry/apps/{app_name}/main.sh +chmod +x $HOME/fn_registry/apps/{app_name}/main.sh ``` ### Inicializar operations.db ```bash -cd /home/lucas/fn_registry -FN_REGISTRY_ROOT=/home/lucas/fn_registry ./fn ops init apps/{app_name} +cd $HOME/fn_registry +FN_REGISTRY_ROOT=$HOME/fn_registry ./fn ops init apps/{app_name} ``` ### Indexar en registry.db ```bash -cd /home/lucas/fn_registry && ./fn index +cd $HOME/fn_registry && ./fn index # Verificar sqlite3 registry.db "SELECT id, name, lang, domain FROM apps WHERE name = '{app_name}';" ``` @@ -241,7 +241,7 @@ Usar el Agent tool con `subagent_type: "gitea"` pasando: ```bash # 1. Crear repo en Gitea (via API) # 2. Inicializar git en la app -cd /home/lucas/fn_registry/apps/{app_name} +cd $HOME/fn_registry/apps/{app_name} git init git add -A git commit -m "Initial commit: {app_name} — {descripcion}" @@ -256,7 +256,7 @@ git push -u origin master **Despues de publicar**, actualizar el `repo_url` en app.md y re-indexar: ```bash -cd /home/lucas/fn_registry && ./fn index +cd $HOME/fn_registry && ./fn index ``` --- diff --git a/.claude/commands/compile.md b/.claude/commands/compile.md index b3f10b90..3784f2ae 100644 --- a/.claude/commands/compile.md +++ b/.claude/commands/compile.md @@ -14,7 +14,7 @@ Toda la logica vive en el registry (resolver app desde CWD/arg, build, deploy co ## Dispatch ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Detecta framework via wails.json o CMakeLists.txt en el dir del app APP="$ARGUMENTS" diff --git a/.claude/commands/cpp-app.md b/.claude/commands/cpp-app.md index 4d440a03..e1af15d5 100644 --- a/.claude/commands/cpp-app.md +++ b/.claude/commands/cpp-app.md @@ -23,8 +23,8 @@ Si `$ARGUMENTS` no empieza por `modify`, es create. Si trae ``, lo usas co ### Paso 0 — verificar que no existe ```bash -test -d "/home/lucas/fn_registry/apps/" \ - || ls /home/lucas/fn_registry/projects/*/apps/ 2>/dev/null +test -d "$HOME/fn_registry/apps/" \ + || ls $HOME/fn_registry/projects/*/apps/ 2>/dev/null ``` Si existe en cualquier ubicacion: **abortar** y sugerir `/cpp-app modify `. NO sobreescribir. @@ -42,7 +42,7 @@ Regla dura `cpp_apps.md`: description + icon.phosphor + icon.accent SIEMPRE junt 5. **icon.phosphor** glyph name. Antes de preguntar, ofrece busqueda: ```bash - ls /home/lucas/fn_registry/sources/phosphor-core/assets/fill/ | grep -i "" + ls $HOME/fn_registry/sources/phosphor-core/assets/fill/ | grep -i "" ``` Sugiere 3-5 candidatos basados en `description`. Default segun domain: `gfx`->`palette`, `tui`->`terminal`, `tools`->`wrench`, `infra`->`gear`, `finance`->`chart-line-up`, `datascience`->`graph`, `cybersecurity`->`shield`. 6. **icon.accent** hex `#rrggbb` (palette select): @@ -122,7 +122,7 @@ Mostrar bloque YAML completo del `app.md` que se va a generar + flags del scaffo Una vez confirmado: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # 1. Scaffolder ./fn run init_cpp_app \ @@ -178,7 +178,7 @@ cd /home/lucas/fn_registry ```bash # Buscar apps// o projects/*/apps// -sqlite3 /home/lucas/fn_registry/registry.db \ +sqlite3 $HOME/fn_registry/registry.db \ "SELECT id, dir_path FROM apps WHERE name='' AND lang='cpp';" ``` @@ -211,7 +211,7 @@ Para cada cambio: usa `Edit` sobre los archivos correspondientes. NUNCA `Write` ```bash # Siempre -cd /home/lucas/fn_registry && ./fn index +cd $HOME/fn_registry && ./fn index # Si toco icon.* -> regenerar appicon ./fn run generate_app_icon "" "" "/appicon.ico" diff --git a/.claude/commands/create_functions.md b/.claude/commands/create_functions.md index 37044f59..bc77d28c 100644 --- a/.claude/commands/create_functions.md +++ b/.claude/commands/create_functions.md @@ -38,19 +38,19 @@ Consultar `registry.db` para encontrar funciones existentes relevantes y evitar ```bash # Buscar funciones similares por nombre y descripcion (OBLIGATORIO — usar multiples terminos) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO1* OR description:TERMINO1* OR name:TERMINO2* OR description:TERMINO2*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, lang, description FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:TERMINO1* OR description:TERMINO1* OR name:TERMINO2* OR description:TERMINO2*') ORDER BY name;" # Buscar tipos relacionados -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, lang, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, lang, description FROM types WHERE id IN (SELECT id FROM types_fts WHERE types_fts MATCH 'name:TERMINO* OR description:TERMINO*') ORDER BY name;" # Funciones del dominio objetivo -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, signature, description FROM functions WHERE domain = 'DOMINIO' AND lang = 'LANG' ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, signature, description FROM functions WHERE domain = 'DOMINIO' AND lang = 'LANG' ORDER BY name;" # Tipos del dominio objetivo -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO' ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, algebraic, description FROM types WHERE domain = 'DOMINIO' ORDER BY name;" # Funciones que podrian componerse (misma firma de retorno) -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE returns LIKE '%TIPO%' OR signature LIKE '%TIPO%' ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, purity, signature FROM functions WHERE returns LIKE '%TIPO%' OR signature LIKE '%TIPO%' ORDER BY name;" ``` **Clasificar resultados en:** @@ -103,7 +103,7 @@ Para cada batch del plan, lanzar agentes `fn-constructor` **en paralelo** (un ag Usar el Agent tool con `subagent_type: "fn-constructor"` pasando un prompt completo con: ``` -Crea la siguiente funcion para el registry fn_registry en /home/lucas/fn_registry: +Crea la siguiente funcion para el registry fn_registry en $HOME/fn_registry: Funcion: {nombre} Kind: {kind} @@ -149,7 +149,7 @@ Despues de que TODOS los fn-constructor terminen: ```bash # Indexar todo de una vez -cd /home/lucas/fn_registry && ./fn index +cd $HOME/fn_registry && ./fn index ``` Si el indexer reporta errores, corregirlos antes de continuar. Errores comunes: @@ -166,7 +166,7 @@ Si el indexer reporta errores, corregirlos antes de continuar. Errores comunes: ```bash # Verificar cada funcion creada -cd /home/lucas/fn_registry +cd $HOME/fn_registry ./fn show {id_de_cada_funcion} # Verificar que no hay funciones sin params_schema @@ -178,7 +178,7 @@ cd /home/lucas/fn_registry Para cada funcion con tests, ejecutar: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Go CGO_ENABLED=1 go test -tags fts5 -v -run TestNombreDelTest ./functions/{domain}/ @@ -197,13 +197,13 @@ bash bash/functions/{domain}/{nombre}_test.sh ```bash # Verificar que todas las funciones nuevas estan en la BD -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, kind, purity, tested FROM functions WHERE id IN ('id1','id2','id3') ORDER BY name;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, kind, purity, tested FROM functions WHERE id IN ('id1','id2','id3') ORDER BY name;" # Verificar que los tests estan indexados -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, function_id, name FROM unit_tests WHERE function_id IN ('id1','id2','id3') ORDER BY function_id;" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, function_id, name FROM unit_tests WHERE function_id IN ('id1','id2','id3') ORDER BY function_id;" # Verificar dependencias -sqlite3 /home/lucas/fn_registry/registry.db "SELECT id, uses_functions, uses_types FROM functions WHERE id IN ('id1','id2','id3') AND uses_functions != '[]';" +sqlite3 $HOME/fn_registry/registry.db "SELECT id, uses_functions, uses_types FROM functions WHERE id IN ('id1','id2','id3') AND uses_functions != '[]';" ``` ### 6.4 Si algo fallo diff --git a/.claude/commands/documentar.md b/.claude/commands/documentar.md index f4894e66..6fe74b78 100644 --- a/.claude/commands/documentar.md +++ b/.claude/commands/documentar.md @@ -45,7 +45,7 @@ Antes de escribir nada, repasar la conversacion y juntar: 2. **Cambios concretos** desde git: ```bash - cd /home/lucas/fn_registry + cd $HOME/fn_registry git status --short git diff --stat git log --since="6 hours ago" --oneline @@ -70,7 +70,7 @@ Si el material es solo conversacion exploratoria sin artefactos tocados, ir dire Para cada artefacto identificado, localizar su `.md` consultando `registry.db`: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry # Funcion / tipo sqlite3 registry.db "SELECT id, file_path FROM functions WHERE id IN (SELECT id FROM functions_fts WHERE functions_fts MATCH 'name:NAME* OR description:NAME*');" @@ -180,7 +180,7 @@ Para cada `.md` identificado: Si los cambios de la sesion incluyen creacion de funciones/tipos/apps/projects/analysis/vaults o modificacion de frontmatter: ```bash -cd /home/lucas/fn_registry && ./fn index +cd $HOME/fn_registry && ./fn index ``` Y verificar: diff --git a/.claude/commands/e2e-cpp.md b/.claude/commands/e2e-cpp.md index a7b0e5eb..db7c21e7 100644 --- a/.claude/commands/e2e-cpp.md +++ b/.claude/commands/e2e-cpp.md @@ -17,7 +17,7 @@ Suite ya instalada en `cpp/vendor/imgui_test_engine/`. Integracion en framework: ### 1. Resolver app y directorio ```bash -ROOT=/home/lucas/fn_registry +ROOT=$HOME/fn_registry ARGS="$ARGUMENTS" APP_ARG="${ARGS%% *}" # primera palabra FLOW_DESC="${ARGS#* }" # resto (puede coincidir con APP_ARG si solo hay una palabra) diff --git a/.claude/commands/entrada_diario.md b/.claude/commands/entrada_diario.md index 41a216ed..a325da0f 100644 --- a/.claude/commands/entrada_diario.md +++ b/.claude/commands/entrada_diario.md @@ -17,7 +17,7 @@ Wrapper sobre `append_diary_entry_bash_infra`. La función del registry maneja t 2. **Llamar la función del registry**: ```bash - cd /home/lucas/fn_registry + cd $HOME/fn_registry source bash/functions/infra/append_diary_entry.sh append_diary_entry "" "$(cat <<'EOF' diff --git a/.claude/commands/fn_claude.md b/.claude/commands/fn_claude.md index e752f2ee..1715ede8 100644 --- a/.claude/commands/fn_claude.md +++ b/.claude/commands/fn_claude.md @@ -50,7 +50,7 @@ Issue 0085 fase autocompleta. Reemplaza el flujo manual de "veo un patron, decid ### 1. AUDIT — ¿estoy siendo registrado? ```bash -ROOT="/home/lucas/fn_registry" +ROOT="$HOME/fn_registry" MON="$ROOT/projects/fn_monitoring/apps/call_monitor/operations.db" # Pre-condiciones diff --git a/.claude/commands/full-git-pull.md b/.claude/commands/full-git-pull.md index 9fd8ad48..b44f88b2 100644 --- a/.claude/commands/full-git-pull.md +++ b/.claude/commands/full-git-pull.md @@ -3,7 +3,7 @@ Wrapper sobre el pipeline `full_git_pull_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta: ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry ./fn run full_git_pull_bash_pipelines ``` diff --git a/.claude/commands/full-git-push.md b/.claude/commands/full-git-push.md index d59cccb7..dcb63e8c 100644 --- a/.claude/commands/full-git-push.md +++ b/.claude/commands/full-git-push.md @@ -3,7 +3,7 @@ Wrapper sobre el pipeline `full_git_push_bash_pipelines`. Toda la lógica vive en el registry. Este comando solo ejecuta: ```bash -cd /home/lucas/fn_registry +cd "${FN_REGISTRY_ROOT:-$HOME/fn_registry}" ./fn run full_git_push_bash_pipelines "$ARGUMENTS" ``` diff --git a/.claude/commands/new-cpp-app.md b/.claude/commands/new-cpp-app.md index 74abbb01..7eebac95 100644 --- a/.claude/commands/new-cpp-app.md +++ b/.claude/commands/new-cpp-app.md @@ -3,7 +3,7 @@ Wrapper sobre el pipeline `init_cpp_app_bash_pipelines`. Genera la estructura canonica que cumple `cpp/PATTERNS.md` y `.claude/rules/cpp_apps.md` (main.cpp con `cfg.about/log/panels`, sin `app_menubar` manual, dockspace via framework), registra la app en `cpp/CMakeLists.txt`, crea repo Gitea `dataforge/` y ejecuta `fn index`. ```bash -cd /home/lucas/fn_registry +cd $HOME/fn_registry ./fn run init_cpp_app $ARGUMENTS ``` diff --git a/.claude/commands/validate-app.md b/.claude/commands/validate-app.md index 3a952f08..f430648a 100644 --- a/.claude/commands/validate-app.md +++ b/.claude/commands/validate-app.md @@ -17,7 +17,7 @@ Si vacio: detectar app desde `pwd` (si estas dentro de `apps//` o `projects/* ### 1. Resolver app objetivo ```bash -ROOT=/home/lucas/fn_registry +ROOT=$HOME/fn_registry ARG="$ARGUMENTS" if [ -z "$ARG" ]; then diff --git a/.claude/rules/apps_subrepo.md b/.claude/rules/apps_subrepo.md index a7c26362..481a1277 100644 --- a/.claude/rules/apps_subrepo.md +++ b/.claude/rules/apps_subrepo.md @@ -16,7 +16,7 @@ ```bash # 1. Agente trabaja en worktree del repo padre -cd /home/lucas/fn_registry/worktrees/ +cd $HOME/fn_registry/worktrees/ # 2. Scaffold la app via pipeline canonico ./fn run init_cpp_app # apps C++ diff --git a/bash/functions/cybersecurity/scan_secrets_in_dirty.md b/bash/functions/cybersecurity/scan_secrets_in_dirty.md index ea773f9b..3fc47073 100644 --- a/bash/functions/cybersecurity/scan_secrets_in_dirty.md +++ b/bash/functions/cybersecurity/scan_secrets_in_dirty.md @@ -38,7 +38,7 @@ if [[ -n "$matches" ]]; then fi # Escanear repo especifico -scan_secrets_in_dirty /home/lucas/fn_registry +scan_secrets_in_dirty $HOME/fn_registry ``` ## Patrones detectados diff --git a/bash/functions/infra/deploy_cpp_exe_to_windows.md b/bash/functions/infra/deploy_cpp_exe_to_windows.md index 4254fe86..594be551 100644 --- a/bash/functions/infra/deploy_cpp_exe_to_windows.md +++ b/bash/functions/infra/deploy_cpp_exe_to_windows.md @@ -22,14 +22,14 @@ params: - name: app_name desc: "Nombre de la app (ej: chart_demo). Se usa para localizar cpp/build/windows/apps//.exe y el directorio destino Desktop/apps//." - name: app_dir - desc: "Ruta absoluta al directorio fuente de la app (ej: /home/lucas/fn_registry/cpp/apps/chart_demo). Se usa para localizar enrichers/, runtime/ y app.md." + desc: "Ruta absoluta al directorio fuente de la app (ej: $HOME/fn_registry/cpp/apps/chart_demo). Se usa para localizar enrichers/, runtime/ y app.md." output: "Copia archivos al escritorio de Windows. Imprime 'OK: -> ' en stdout. Si local_files/ existe, imprime su tamanio. Errores fatales a stderr con exit 1." --- ## Ejemplo ```bash -deploy_cpp_exe_to_windows "chart_demo" "/home/lucas/fn_registry/cpp/apps/chart_demo" +deploy_cpp_exe_to_windows "chart_demo" "$HOME/fn_registry/cpp/apps/chart_demo" # OK: chart_demo -> /mnt/c/Users/lucas/Desktop/apps/chart_demo # Con rutas custom via env vars @@ -55,7 +55,7 @@ Desktop/apps// - `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows` - `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps` -- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry` +- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry` ## Notas diff --git a/bash/functions/infra/deploy_cpp_exe_to_windows.sh b/bash/functions/infra/deploy_cpp_exe_to_windows.sh index b0bace02..ab667461 100644 --- a/bash/functions/infra/deploy_cpp_exe_to_windows.sh +++ b/bash/functions/infra/deploy_cpp_exe_to_windows.sh @@ -12,7 +12,7 @@ deploy_cpp_exe_to_windows() { return 1 fi - local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}" + local root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}" local build_win="${BUILD_WIN:-$root/cpp/build/windows}" local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}" diff --git a/bash/functions/infra/deploy_wails_exe_to_windows.md b/bash/functions/infra/deploy_wails_exe_to_windows.md index 63f641e5..5d4d9315 100644 --- a/bash/functions/infra/deploy_wails_exe_to_windows.md +++ b/bash/functions/infra/deploy_wails_exe_to_windows.md @@ -36,7 +36,7 @@ source bash/functions/infra/deploy_wails_exe_to_windows.sh # Desplegar matrix_client_pc tras wails build -platform windows/amd64 deploy_wails_exe_to_windows matrix_client_pc \ - /home/lucas/fn_registry/projects/element_agents/apps/matrix_client_pc + $HOME/fn_registry/projects/element_agents/apps/matrix_client_pc ``` Con override de destino: @@ -44,7 +44,7 @@ Con override de destino: ```bash WIN_DESKTOP_APPS=/mnt/c/Users/lucas/Desktop/apps \ deploy_wails_exe_to_windows matrix_admin_panel \ - /home/lucas/fn_registry/projects/element_agents/apps/matrix_admin_panel + $HOME/fn_registry/projects/element_agents/apps/matrix_admin_panel ``` ## Cuando usarla diff --git a/bash/functions/infra/discover_git_repos.md b/bash/functions/infra/discover_git_repos.md index b5b1f390..68e25ef6 100644 --- a/bash/functions/infra/discover_git_repos.md +++ b/bash/functions/infra/discover_git_repos.md @@ -30,15 +30,15 @@ file_path: "bash/functions/infra/discover_git_repos.sh" source bash/functions/infra/discover_git_repos.sh # Listar todos los repos bajo fn_registry -discover_git_repos /home/lucas/fn_registry +discover_git_repos $HOME/fn_registry # Contar repos -discover_git_repos /home/lucas/fn_registry | wc -l +discover_git_repos $HOME/fn_registry | wc -l # Iterar while IFS= read -r repo; do echo "Repo: $repo" -done < <(discover_git_repos /home/lucas/fn_registry) +done < <(discover_git_repos $HOME/fn_registry) ``` ## Notas diff --git a/bash/functions/infra/docker_cp_file.md b/bash/functions/infra/docker_cp_file.md index 858a0fe4..f5b6d062 100644 --- a/bash/functions/infra/docker_cp_file.md +++ b/bash/functions/infra/docker_cp_file.md @@ -33,7 +33,7 @@ file_path: "bash/functions/infra/docker_cp_file.sh" ```bash source functions/infra/docker_cp_file.sh -result=$(docker_cp_file /home/lucas/fn_registry/registry.db metabase /registry.db) +result=$(docker_cp_file $HOME/fn_registry/registry.db metabase /registry.db) echo "$result" # {"local_size":524288,"remote_size":524288} diff --git a/bash/functions/infra/git_auto_commit_dirty.md b/bash/functions/infra/git_auto_commit_dirty.md index 3b3bbabc..53812ea8 100644 --- a/bash/functions/infra/git_auto_commit_dirty.md +++ b/bash/functions/infra/git_auto_commit_dirty.md @@ -32,7 +32,7 @@ file_path: "bash/functions/infra/git_auto_commit_dirty.sh" source bash/functions/infra/git_auto_commit_dirty.sh # Commitear con mensaje automatico -subject=$(git_auto_commit_dirty /home/lucas/fn_registry) +subject=$(git_auto_commit_dirty $HOME/fn_registry) echo "Commit: $subject" # Commitear con mensaje fijo diff --git a/bash/functions/infra/git_hook_audit_app_drift.md b/bash/functions/infra/git_hook_audit_app_drift.md index fcee4932..c94262a1 100644 --- a/bash/functions/infra/git_hook_audit_app_drift.md +++ b/bash/functions/infra/git_hook_audit_app_drift.md @@ -17,7 +17,7 @@ error_type: "error_go_core" imports: [] example: | # Manual check - bash bash/functions/infra/git_hook_audit_app_drift.sh /home/lucas/fn_registry/apps/kanban + bash bash/functions/infra/git_hook_audit_app_drift.sh $HOME/fn_registry/apps/kanban # Used by pre_commit_hook_install_bash_infra (v2 hook chain) file_path: bash/functions/infra/git_hook_audit_app_drift.sh diff --git a/bash/functions/infra/git_pull_with_stash.md b/bash/functions/infra/git_pull_with_stash.md index 1c6f831b..1bf3d78f 100644 --- a/bash/functions/infra/git_pull_with_stash.md +++ b/bash/functions/infra/git_pull_with_stash.md @@ -30,7 +30,7 @@ file_path: "bash/functions/infra/git_pull_with_stash.sh" source bash/functions/infra/git_pull_with_stash.sh # Pullear repo con auto-stash -status=$(git_pull_with_stash /home/lucas/fn_registry) +status=$(git_pull_with_stash $HOME/fn_registry) echo "$status" # [pulled] fn_registry # o: @@ -46,7 +46,7 @@ while IFS= read -r repo; do if [[ "$result" == "[diverged]"* || "$result" == "[stash-conflict]"* ]]; then diverged+=("$result") fi -done < <(discover_git_repos /home/lucas/fn_registry) +done < <(discover_git_repos $HOME/fn_registry) if [[ ${#diverged[@]} -gt 0 ]]; then echo "ATENCION: repos que requieren intervencion manual:" diff --git a/bash/functions/infra/git_push_if_ahead.md b/bash/functions/infra/git_push_if_ahead.md index 5cec3b17..a1ca73a5 100644 --- a/bash/functions/infra/git_push_if_ahead.md +++ b/bash/functions/infra/git_push_if_ahead.md @@ -30,7 +30,7 @@ file_path: "bash/functions/infra/git_push_if_ahead.sh" source bash/functions/infra/git_push_if_ahead.sh # Pushear si hay commits locales -status=$(git_push_if_ahead /home/lucas/fn_registry) +status=$(git_push_if_ahead $HOME/fn_registry) echo "$status" # [push] fn_registry (master, 3 commits ahead) # o: @@ -39,7 +39,7 @@ echo "$status" # Iterar sobre multiples repos while IFS= read -r repo; do git_push_if_ahead "$repo" -done < <(discover_git_repos /home/lucas/fn_registry) +done < <(discover_git_repos $HOME/fn_registry) ``` ## Estados de salida diff --git a/bash/functions/infra/launch_cpp_app_windows.md b/bash/functions/infra/launch_cpp_app_windows.md index 742ce4f7..04cce28f 100644 --- a/bash/functions/infra/launch_cpp_app_windows.md +++ b/bash/functions/infra/launch_cpp_app_windows.md @@ -61,7 +61,7 @@ Mitad complementaria de `deploy_cpp_exe_to_windows_bash_infra`. El flujo complet build_cpp_windows "registry_dashboard" # 2. Copiar al escritorio (mata proceso si corre, copia DLLs+assets) -deploy_cpp_exe_to_windows "registry_dashboard" "/home/lucas/fn_registry/apps/registry_dashboard" +deploy_cpp_exe_to_windows "registry_dashboard" "$HOME/fn_registry/apps/registry_dashboard" # 3. Lanzar launch_cpp_app_windows "registry_dashboard" diff --git a/bash/functions/infra/pre_commit_hook_install.md b/bash/functions/infra/pre_commit_hook_install.md index 4a7ae607..7b4aceec 100644 --- a/bash/functions/infra/pre_commit_hook_install.md +++ b/bash/functions/infra/pre_commit_hook_install.md @@ -32,16 +32,16 @@ file_path: "bash/functions/infra/pre_commit_hook_install.sh" source bash/functions/infra/pre_commit_hook_install.sh # Instalar en el repo actual -pre_commit_hook_install /home/lucas/fn_registry -# INSTALLED /home/lucas/fn_registry/.git/hooks/pre-commit +pre_commit_hook_install $HOME/fn_registry +# INSTALLED $HOME/fn_registry/.git/hooks/pre-commit # Idempotente: segunda llamada no sobreescribe -pre_commit_hook_install /home/lucas/fn_registry -# SKIP /home/lucas/fn_registry/.git/hooks/pre-commit (already installed) +pre_commit_hook_install $HOME/fn_registry +# SKIP $HOME/fn_registry/.git/hooks/pre-commit (already installed) # Forzar reinstalacion (hace backup del hook anterior) -pre_commit_hook_install /home/lucas/fn_registry --force -# INSTALLED /home/lucas/fn_registry/.git/hooks/pre-commit +pre_commit_hook_install $HOME/fn_registry --force +# INSTALLED $HOME/fn_registry/.git/hooks/pre-commit ``` ## Notas @@ -58,5 +58,5 @@ Si no puede localizar `fn_registry`, el hook imprime un aviso y sale con exit 0 Configurar `FN_REGISTRY_ROOT` en el perfil del shell para garantizar que el hook siempre encuentre el registry: ```bash -export FN_REGISTRY_ROOT=/home/lucas/fn_registry +export FN_REGISTRY_ROOT=$HOME/fn_registry ``` diff --git a/bash/functions/infra/resolve_cpp_app_dir.md b/bash/functions/infra/resolve_cpp_app_dir.md index b98846ea..94113dee 100644 --- a/bash/functions/infra/resolve_cpp_app_dir.md +++ b/bash/functions/infra/resolve_cpp_app_dir.md @@ -28,13 +28,13 @@ output: "Una linea TAB-separada '\\t' en stdout. En ```bash # Desde dentro de cpp/apps/chart_demo/ -cd /home/lucas/fn_registry/cpp/apps/chart_demo +cd $HOME/fn_registry/cpp/apps/chart_demo resolve_cpp_app_dir -# -> chart_demo\t/home/lucas/fn_registry/cpp/apps/chart_demo +# -> chart_demo\t$HOME/fn_registry/cpp/apps/chart_demo # Con argumento explicito resolve_cpp_app_dir registry_dashboard -# -> registry_dashboard\t/home/lucas/fn_registry/cpp/apps/registry_dashboard +# -> registry_dashboard\t$HOME/fn_registry/cpp/apps/registry_dashboard # Capturar los dos campos resolved=$(resolve_cpp_app_dir graph_explorer) diff --git a/bash/functions/infra/resolve_cpp_app_dir.sh b/bash/functions/infra/resolve_cpp_app_dir.sh index 5c9d39a5..497248e1 100644 --- a/bash/functions/infra/resolve_cpp_app_dir.sh +++ b/bash/functions/infra/resolve_cpp_app_dir.sh @@ -7,7 +7,7 @@ resolve_cpp_app_dir() { local app_arg="${1:-}" - local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}" + local root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}" _list_cpp_apps() { ls "$root/apps/" 2>/dev/null | sed 's/^/ apps\//' diff --git a/bash/functions/infra/rsync_deploy.md b/bash/functions/infra/rsync_deploy.md index 6d88fa46..2b37db11 100644 --- a/bash/functions/infra/rsync_deploy.md +++ b/bash/functions/infra/rsync_deploy.md @@ -39,7 +39,7 @@ echo "$result" # {"files_transferred": 12, "total_size": "1.23 MB", "ssh_alias": "prod-server", "remote_dir": "/opt/apps/dag_engine"} # Deploy con ruta absoluta local -rsync_deploy "/home/lucas/fn_registry/apps/myapp/" "myserver" "/opt/myapp" +rsync_deploy "$HOME/fn_registry/apps/myapp/" "myserver" "/opt/myapp" ``` ## Notas diff --git a/bash/functions/infra/write_mcp_jupyter_config.md b/bash/functions/infra/write_mcp_jupyter_config.md index 88ed5c08..a7d5f5a7 100644 --- a/bash/functions/infra/write_mcp_jupyter_config.md +++ b/bash/functions/infra/write_mcp_jupyter_config.md @@ -30,7 +30,7 @@ file_path: "bash/functions/infra/write_mcp_jupyter_config.sh" ```bash source write_mcp_jupyter_config.sh -path=$(write_mcp_jupyter_config /home/lucas/fn_registry/analysis/finanzas 8890) +path=$(write_mcp_jupyter_config $HOME/fn_registry/analysis/finanzas 8890) echo "Config MCP en: $path" # Genera .mcp.json con: # "command": ".../.venv/bin/jupyter-mcp-server" diff --git a/bash/functions/pipelines/agent_scaffold.md b/bash/functions/pipelines/agent_scaffold.md index e65fde90..f150b8ae 100644 --- a/bash/functions/pipelines/agent_scaffold.md +++ b/bash/functions/pipelines/agent_scaffold.md @@ -47,7 +47,7 @@ file_path: "bash/functions/pipelines/agent_scaffold.sh" ```bash # Crear agente basico con openai -export FN_REGISTRY_ROOT=/home/lucas/fn_registry +export FN_REGISTRY_ROOT=$HOME/fn_registry bash bash/functions/pipelines/agent_scaffold.sh monitor-bot \ --display-name "Monitor Agent" \ --description "Monitorea servicios y reporta estado" \ diff --git a/bash/functions/pipelines/backup_all.md b/bash/functions/pipelines/backup_all.md index 394f8ea6..a8ab34cc 100644 --- a/bash/functions/pipelines/backup_all.md +++ b/bash/functions/pipelines/backup_all.md @@ -30,14 +30,14 @@ file_path: "bash/functions/pipelines/backup_all.sh" ```bash # Backup manual a ~/backups/fn_registry -export FN_REGISTRY_ROOT=/home/lucas/fn_registry +export FN_REGISTRY_ROOT=$HOME/fn_registry backup_all ~/backups/fn_registry # Salida esperada: # 2026-05-07T10:30:00+02:00 registry=4194304B ops=3 vaults=2 partial_errors=0 elapsed=12s # Entrada en crontab (diario a las 02:00) -# 0 2 * * * FN_REGISTRY_ROOT=/home/lucas/fn_registry bash /home/lucas/fn_registry/bash/functions/pipelines/backup_all.sh ~/backups/fn_registry +# 0 2 * * * FN_REGISTRY_ROOT=$HOME/fn_registry bash $HOME/fn_registry/bash/functions/pipelines/backup_all.sh ~/backups/fn_registry ``` ## Estructura de backup_root/ diff --git a/bash/functions/pipelines/clone_project_subrepos.md b/bash/functions/pipelines/clone_project_subrepos.md index d978571b..075a4326 100644 --- a/bash/functions/pipelines/clone_project_subrepos.md +++ b/bash/functions/pipelines/clone_project_subrepos.md @@ -43,7 +43,7 @@ file_path: "bash/functions/pipelines/clone_project_subrepos.sh" # analysis domain_coverage_gaps [cloned] # # Siguiente paso sugerido: -# cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync +# cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync # Con owner alternativo ./fn run clone_project_subrepos aurgi --owner miorg @@ -65,7 +65,7 @@ Cuando llegas a un PC nuevo con solo fn_registry clonado y quieres trabajar en u ## Variables de entorno -- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry` +- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry` - `GITEA_URL` — URL base de Gitea; default `https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com` - Auth git/ssh: el pipeline confía en la config local del usuario (SSH key, credential helper) diff --git a/bash/functions/pipelines/clone_project_subrepos.sh b/bash/functions/pipelines/clone_project_subrepos.sh index ced7996c..2d60a9d8 100644 --- a/bash/functions/pipelines/clone_project_subrepos.sh +++ b/bash/functions/pipelines/clone_project_subrepos.sh @@ -38,7 +38,7 @@ clone_project_subrepos() { fi # --- Resolver paths --- - local registry_root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}" + local registry_root="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}" local db="$registry_root/registry.db" local gitea_url="${GITEA_URL:-https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com}" diff --git a/bash/functions/pipelines/compile_cpp_app.md b/bash/functions/pipelines/compile_cpp_app.md index a9583ccb..5b1e2042 100644 --- a/bash/functions/pipelines/compile_cpp_app.md +++ b/bash/functions/pipelines/compile_cpp_app.md @@ -31,7 +31,7 @@ output: "Compila el .exe y lo despliega al escritorio de Windows. Imprime progre ```bash # Desde dentro del directorio de la app (sin arg) -cd /home/lucas/fn_registry/cpp/apps/chart_demo +cd $HOME/fn_registry/cpp/apps/chart_demo fn run compile_cpp_app # Con nombre explicito desde cualquier directorio @@ -51,7 +51,7 @@ bash bash/functions/pipelines/compile_cpp_app.sh graph_explorer ## Variables de entorno -- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry` +- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry` - `BUILD_WIN` — directorio de build Windows; default `$FN_REGISTRY_ROOT/cpp/build/windows` - `WIN_DESKTOP_APPS` — directorio destino; default `/mnt/c/Users/lucas/Desktop/apps` diff --git a/bash/functions/pipelines/compile_cpp_app.sh b/bash/functions/pipelines/compile_cpp_app.sh index 85366fb6..a5ab89da 100644 --- a/bash/functions/pipelines/compile_cpp_app.sh +++ b/bash/functions/pipelines/compile_cpp_app.sh @@ -40,7 +40,7 @@ compile_cpp_app() { deploy_cpp_exe_to_windows "$APP" "$APP_DIR" # --- Resumen final --- - local root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}" + local root="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../../.." && pwd)}" local build_win="${BUILD_WIN:-$root/cpp/build/windows}" local win_desktop_apps="${WIN_DESKTOP_APPS:-/mnt/c/Users/lucas/Desktop/apps}" local final_exe="$win_desktop_apps/$APP/$APP.exe" diff --git a/bash/functions/pipelines/compile_wails_app.md b/bash/functions/pipelines/compile_wails_app.md index 7a177e08..4f6714a7 100644 --- a/bash/functions/pipelines/compile_wails_app.md +++ b/bash/functions/pipelines/compile_wails_app.md @@ -34,7 +34,7 @@ cd projects/element_agents/apps/matrix_client_pc ./fn run compile_wails_app # Desde la raiz del registry, con nombre explicito -cd /home/lucas/fn_registry +cd $HOME/fn_registry ./fn run compile_wails_app matrix_admin_panel # Directo sin fn run diff --git a/bash/functions/pipelines/dockerize_app.md b/bash/functions/pipelines/dockerize_app.md index de41ae72..3048b597 100644 --- a/bash/functions/pipelines/dockerize_app.md +++ b/bash/functions/pipelines/dockerize_app.md @@ -63,7 +63,7 @@ file_path: "bash/functions/pipelines/dockerize_app.sh" ```bash # Deploy completo con basicAuth -cd /home/lucas/fn_registry +cd $HOME/fn_registry bash bash/functions/pipelines/dockerize_app.sh kanban \ --domain kanban.organic-machine.com \ --port 8421 \ diff --git a/bash/functions/pipelines/full_git_pull.md b/bash/functions/pipelines/full_git_pull.md index cf142bbd..4144cb83 100644 --- a/bash/functions/pipelines/full_git_pull.md +++ b/bash/functions/pipelines/full_git_pull.md @@ -46,7 +46,7 @@ bash bash/functions/pipelines/full_git_pull.sh ## Variables de entorno -- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry` +- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry` - `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*` ## Notas diff --git a/bash/functions/pipelines/full_git_pull.sh b/bash/functions/pipelines/full_git_pull.sh index 38a943de..382a0d04 100644 --- a/bash/functions/pipelines/full_git_pull.sh +++ b/bash/functions/pipelines/full_git_pull.sh @@ -12,8 +12,9 @@ source "$INFRA_DIR/git_pull_with_stash.sh" source "$INFRA_DIR/pass_get.sh" full_git_pull() { - # Resolver raiz del registry - local registry_root="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}" + # Resolver raiz del registry. Deriva de SCRIPT_DIR (bash/functions/pipelines/) + # para funcionar en cualquier PC sin path hardcodeado. + local registry_root="${FN_REGISTRY_ROOT:-$(cd "$SCRIPT_DIR/../../.." && pwd)}" cd "$registry_root" echo "=== full_git_pull: inicio ===" >&2 diff --git a/bash/functions/pipelines/full_git_push.md b/bash/functions/pipelines/full_git_push.md index 2cdbecca..d975ba5c 100644 --- a/bash/functions/pipelines/full_git_push.md +++ b/bash/functions/pipelines/full_git_push.md @@ -55,7 +55,7 @@ bash bash/functions/pipelines/full_git_push.sh "feat: nueva funcion" ## Variables de entorno -- `FN_REGISTRY_ROOT` — raiz del registry; default `/home/lucas/fn_registry` +- `FN_REGISTRY_ROOT` — raiz del registry; default `$HOME/fn_registry` - `GITEA_URL`, `GITEA_TOKEN` — se cargan de `pass agentes/gitea-url` y `pass gitea/dataforge-git-token` - `FN_REGISTRY_API`, `REGISTRY_API_TOKEN` — se cargan de `pass registry/*` diff --git a/bash/functions/pipelines/generate_capability_doc.md b/bash/functions/pipelines/generate_capability_doc.md index 6fad4554..d5c0a148 100644 --- a/bash/functions/pipelines/generate_capability_doc.md +++ b/bash/functions/pipelines/generate_capability_doc.md @@ -34,11 +34,11 @@ file_path: "bash/functions/pipelines/generate_capability_doc.sh" ```bash # Regenerar tabla de notebook (ya existe, preserva Ejemplo canonico / Fronteras) ./bash/functions/pipelines/generate_capability_doc.sh notebook -# → /home/lucas/fn_registry/docs/capabilities/notebook.md updated (5 functions) +# → $HOME/fn_registry/docs/capabilities/notebook.md updated (5 functions) # Crear pagina nueva para un grupo sin pagina todavia ./bash/functions/pipelines/generate_capability_doc.sh metabase -# → /home/lucas/fn_registry/docs/capabilities/metabase.md created (12 functions) +# → $HOME/fn_registry/docs/capabilities/metabase.md created (12 functions) # Especificar registry y destino custom ./bash/functions/pipelines/generate_capability_doc.sh android \ @@ -49,7 +49,7 @@ file_path: "bash/functions/pipelines/generate_capability_doc.sh" # Grupo sin funciones todavia (avisa pero no falla) ./bash/functions/pipelines/generate_capability_doc.sh nuevo_grupo # WARN: El grupo 'nuevo_grupo' no tiene funciones con ese tag en registry.db. -# → /home/lucas/fn_registry/docs/capabilities/nuevo_grupo.md created (0 functions) +# → $HOME/fn_registry/docs/capabilities/nuevo_grupo.md created (0 functions) ``` ## Comportamiento detallado diff --git a/bash/functions/pipelines/keepass_to_pass.sh b/bash/functions/pipelines/keepass_to_pass.sh index 681be4f3..d60dacc0 100644 --- a/bash/functions/pipelines/keepass_to_pass.sh +++ b/bash/functions/pipelines/keepass_to_pass.sh @@ -26,7 +26,7 @@ set -euo pipefail -REGISTRY_ROOT="${FN_REGISTRY_ROOT:-/home/lucas/fn_registry}" +REGISTRY_ROOT="${FN_REGISTRY_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}" # shellcheck disable=SC1091 source "$REGISTRY_ROOT/bash/functions/infra/keepass_dump.sh" diff --git a/bash/functions/pipelines/redeploy_cpp_app_windows.md b/bash/functions/pipelines/redeploy_cpp_app_windows.md index 377ec012..0cf17097 100644 --- a/bash/functions/pipelines/redeploy_cpp_app_windows.md +++ b/bash/functions/pipelines/redeploy_cpp_app_windows.md @@ -27,7 +27,7 @@ params: - name: app_name desc: "Nombre de la app C++ (ej: chart_demo, registry_dashboard). Se usa para localizar el .exe en cpp/build/windows/apps// y el destino Desktop/apps//." - name: app_dir - desc: "Ruta absoluta al directorio fuente de la app (ej: /home/lucas/fn_registry/cpp/apps/chart_demo). Requerido para localizar enrichers/, runtime/ y app.md." + desc: "Ruta absoluta al directorio fuente de la app (ej: $HOME/fn_registry/cpp/apps/chart_demo). Requerido para localizar enrichers/, runtime/ y app.md." - name: "--build" desc: "Flag opcional. Si presente, compila la app para Windows antes del deploy. Por defecto off (asume .exe ya compilado)." output: "Imprime 'OK: redeployed (build=yes/no, PID=N)' en stdout. Exit 1 en cualquier paso fallido con mensaje de error indicando el paso." @@ -37,10 +37,10 @@ output: "Imprime 'OK: redeployed (build=yes/no, PID=N)' en stdout. Ex ```bash # Solo redeploy (asume build ya hecho) -redeploy_cpp_app_windows "registry_dashboard" "/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard" +redeploy_cpp_app_windows "registry_dashboard" "$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard" # Con build previo -redeploy_cpp_app_windows "chart_demo" "/home/lucas/fn_registry/cpp/apps/chart_demo" --build +redeploy_cpp_app_windows "chart_demo" "$HOME/fn_registry/cpp/apps/chart_demo" --build ``` ## Comportamiento diff --git a/bash/functions/pipelines/setup_metabase_volume.md b/bash/functions/pipelines/setup_metabase_volume.md index c4063295..03764feb 100644 --- a/bash/functions/pipelines/setup_metabase_volume.md +++ b/bash/functions/pipelines/setup_metabase_volume.md @@ -20,7 +20,7 @@ error_type: "error_go_core" imports: [] params: - name: registry_db_path - desc: "ruta a registry.db local (default: /home/lucas/fn_registry/registry.db)" + desc: "ruta a registry.db local (default: $HOME/fn_registry/registry.db)" - name: container_name desc: "nombre del contenedor Metabase (default: metabase)" - name: dest_path @@ -40,7 +40,7 @@ file_path: "bash/functions/pipelines/setup_metabase_volume.sh" # Con argumentos explícitos ./functions/pipelines/setup_metabase_volume.sh \ - /home/lucas/fn_registry/registry.db \ + $HOME/fn_registry/registry.db \ metabase \ /registry.db ``` @@ -59,7 +59,7 @@ El pipeline usa `set -euo pipefail` — cualquier fallo en una función individu Las funciones individuales se sourcean desde sus rutas en el registry, relativas a `REGISTRY_ROOT` detectado automáticamente desde la ubicación del script. Defaults: -- `REGISTRY_DB_PATH`: `/home/lucas/fn_registry/registry.db` +- `REGISTRY_DB_PATH`: `$HOME/fn_registry/registry.db` - `CONTAINER_NAME`: `metabase` - `DEST_PATH`: `/registry.db` @@ -67,7 +67,7 @@ Nota de persistencia: `docker cp` copia al contenedor en ejecución. Si el conte ```yaml volumes: - - /home/lucas/fn_registry:/fn_registry:ro + - $HOME/fn_registry:/fn_registry:ro ``` Y usar `--registry-db-path /fn_registry/registry.db`. diff --git a/bash/functions/pipelines/setup_metabase_volume.sh b/bash/functions/pipelines/setup_metabase_volume.sh index 8468458b..3ba66df0 100755 --- a/bash/functions/pipelines/setup_metabase_volume.sh +++ b/bash/functions/pipelines/setup_metabase_volume.sh @@ -10,7 +10,7 @@ # # ARGUMENTOS (opcionales, con defaults): # REGISTRY_DB_PATH Ruta local al registry.db -# Default: /home/lucas/fn_registry/registry.db +# Default: /registry.db # CONTAINER_NAME Nombre del contenedor Docker de Metabase # Default: metabase # DEST_PATH Ruta destino dentro del contenedor @@ -26,7 +26,7 @@ source "$REGISTRY_ROOT/bash/functions/shell/assert_command_exists.sh" source "$REGISTRY_ROOT/bash/functions/infra/assert_docker_container_running.sh" source "$REGISTRY_ROOT/bash/functions/infra/docker_cp_file.sh" -REGISTRY_DB_PATH="${1:-/home/lucas/fn_registry/registry.db}" +REGISTRY_DB_PATH="${1:-$REGISTRY_ROOT/registry.db}" CONTAINER_NAME="${2:-metabase}" DEST_PATH="${3:-/registry.db}" diff --git a/bash/functions/pipelines/vault_audit.md b/bash/functions/pipelines/vault_audit.md index 6acf9405..c8d0afa9 100644 --- a/bash/functions/pipelines/vault_audit.md +++ b/bash/functions/pipelines/vault_audit.md @@ -44,11 +44,11 @@ file_path: "bash/functions/pipelines/vault_audit.sh" ```bash # Auditar un vault especifico -FN_REGISTRY_ROOT=/home/lucas/fn_registry \ +FN_REGISTRY_ROOT=$HOME/fn_registry \ bash bash/functions/pipelines/vault_audit.sh turismo_spain # Auditar todos los vaults -FN_REGISTRY_ROOT=/home/lucas/fn_registry \ +FN_REGISTRY_ROOT=$HOME/fn_registry \ bash bash/functions/pipelines/vault_audit.sh --all # Solo layout + index + aggregate (sin profilers, mas rapido) diff --git a/bash/functions/shell/assert_file_exists.md b/bash/functions/shell/assert_file_exists.md index 6a303f39..648a77d0 100644 --- a/bash/functions/shell/assert_file_exists.md +++ b/bash/functions/shell/assert_file_exists.md @@ -29,7 +29,7 @@ file_path: "bash/functions/shell/assert_file_exists.sh" ```bash source functions/shell/assert_file_exists.sh -size=$(assert_file_exists /home/lucas/fn_registry/registry.db) +size=$(assert_file_exists $HOME/fn_registry/registry.db) echo "Tamaño: $size bytes" ``` diff --git a/bash/functions/shell/validate_registry_paths.md b/bash/functions/shell/validate_registry_paths.md index 7e3d1109..ffc45095 100644 --- a/bash/functions/shell/validate_registry_paths.md +++ b/bash/functions/shell/validate_registry_paths.md @@ -32,7 +32,7 @@ file_path: "bash/functions/shell/validate_registry_paths.sh" ```bash source validate_registry_paths.sh -validate_registry_paths /home/lucas/fn_registry/registry.db functions /home/lucas/fn_registry +validate_registry_paths $HOME/fn_registry/registry.db functions $HOME/fn_registry # Output (TSV): # cdp_click_go_browser functions/infra/cdp_click.go browser functions diff --git a/cpp/functions/core/parse_md_frontmatter.md b/cpp/functions/core/parse_md_frontmatter.md index 41668bc5..a568dd27 100644 --- a/cpp/functions/core/parse_md_frontmatter.md +++ b/cpp/functions/core/parse_md_frontmatter.md @@ -19,7 +19,7 @@ example: | #include #include - std::ifstream f("/home/lucas/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md"); + std::ifstream f("$HOME/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md"); std::stringstream ss; ss << f.rdbuf(); auto fm = fn_md::parse_md_frontmatter(ss.str()); auto title = std::get(fm.fields["title"]); @@ -65,7 +65,7 @@ Cuando una app C++ necesita leer metadata de archivos Markdown del registry (iss #include #include -std::ifstream f("/home/lucas/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md"); +std::ifstream f("$HOME/fn_registry/dev/issues/0109-skill-tree-app-roadmap.md"); std::stringstream ss; ss << f.rdbuf(); auto fm = fn_md::parse_md_frontmatter(ss.str()); diff --git a/dev/issues/0051-extraction-pipeline-followups.md b/dev/issues/0051-extraction-pipeline-followups.md index e093a286..d0fc03be 100644 --- a/dev/issues/0051-extraction-pipeline-followups.md +++ b/dev/issues/0051-extraction-pipeline-followups.md @@ -239,7 +239,7 @@ def extract_triples_spacy_es_v2(text: str, nlp: Any, resolve_pronouns: bool = Tr `.ipython/profile_default/startup/00_fn_registry.py` añade cada subdir de `python/functions/` al sys.path top-level. Como hay un `bigquery/datasets.py` en el registry, **shadows** el paquete `datasets` de HuggingFace que `transformers` necesita. Resultado: en cada notebook hay que aplicar un workaround: ```python -_pf = '/home/lucas/fn_registry/python/functions' +_pf = '$HOME/fn_registry/python/functions' sys.path = [p for p in sys.path if not p.startswith(_pf + '/')] if _pf not in sys.path: sys.path.insert(0, _pf) ``` diff --git a/dev/issues/0144-agent-per-machine-llm.md b/dev/issues/0144-agent-per-machine-llm.md index cbf9a511..a6d824fa 100644 --- a/dev/issues/0144-agent-per-machine-llm.md +++ b/dev/issues/0144-agent-per-machine-llm.md @@ -693,7 +693,7 @@ Eres `agent-home-wsl`, un agente operativo conectado al PC `home-wsl` del operad por que. El operador vera la respuesta en `#home-wsl` cuando el sudo agent termine. 4. **Proyectos**: para crear un proyecto nuevo, prefiere `project.create` antes que componer `exec mkdir + fs.write + ...`. Es mas rapido y deja entrada en `memory.projects`. -5. **Registry**: el operador mantiene un registry de funciones en /home/lucas/fn_registry. Si la tarea +5. **Registry**: el operador mantiene un registry de funciones en $HOME/fn_registry. Si la tarea parece composicion de funciones (ETL, scraping, parsing), pregunta al operador si ya hay algo en el registry antes de codear desde cero. (No tienes herramienta para consultar el registry directamente; pidele al operador que ejecute `mcp__registry__fn_search` por ti). @@ -818,7 +818,7 @@ Flujo: 3. Si operador → "delega": - `delegate_sudo task="registrar /home/lucas/projects/scraper-precios como app en fn_registry"`. 4. sudo agent ejecuta: - - `cd /home/lucas/fn_registry && ./fn run init_some_pipeline scraper-precios ...` (o similar — depende del scaffolder). + - `cd $HOME/fn_registry && ./fn run init_some_pipeline scraper-precios ...` (o similar — depende del scaffolder). - Cada paso = approval individual o pre-approved si operator activo `!preapprove fn-* 10m`. Esto evita que el user agent toque `fn_registry` directamente — el registry es del operador, no del agent. El agent solo orquesta cuando le piden. diff --git a/dev/issues/completed/002_jupyter_discover_root_dir.md b/dev/issues/completed/002_jupyter_discover_root_dir.md index 0c097ae2..11b32b3c 100644 --- a/dev/issues/completed/002_jupyter_discover_root_dir.md +++ b/dev/issues/completed/002_jupyter_discover_root_dir.md @@ -21,7 +21,7 @@ tags: [] `jupyter_discover.py` reporta el campo `analysis` incorrecto. Con Jupyter corriendo desde `analysis/estudio_mercados/`, el discover devolvió `"analysis": "estudio_embeddings"`. -El proceso real tenía `--ServerApp.root_dir=/home/lucas/fn_registry/analysis/estudio_mercados` en su cmdline, pero el discover no lo parsea. +El proceso real tenía `--ServerApp.root_dir=$HOME/fn_registry/analysis/estudio_mercados` en su cmdline, pero el discover no lo parsea. ## Solución propuesta diff --git a/dev/issues/completed/0119-kanban-cpp-issues-flows-sync.md b/dev/issues/completed/0119-kanban-cpp-issues-flows-sync.md index dd4975a6..ce58c9ba 100644 --- a/dev/issues/completed/0119-kanban-cpp-issues-flows-sync.md +++ b/dev/issues/completed/0119-kanban-cpp-issues-flows-sync.md @@ -89,7 +89,7 @@ deferred -> Deferred - Frontmatter mal formado (yaml invalid): card aparece con badge `parse-error` + tooltip detalle. NO crashea backend. - Cambios concurrentes: humano edita `.md` con vim mientras agente lo PATCHea via API. Usar lock file `.md.lock` corto + retry. -- `fsnotify` no funciona bien en WSL para `/mnt/c/` paths. Backend corre en WSL, lee paths nativos (`/home/lucas/fn_registry/dev/...`). Verificar. +- `fsnotify` no funciona bien en WSL para `/mnt/c/` paths. Backend corre en WSL, lee paths nativos (`$HOME/fn_registry/dev/...`). Verificar. - Issue / flow grandes (>500 lineas body): NO mandar full body en `/cards` (lento). Devolver solo frontmatter + primeras 5 lineas. Body completo via `/cards/` on demand. - Cards sin `status` (frontmatter incompleto): default `pendiente`. - Reordenamiento manual: drag-and-drop en UI cambia status (cruzar columna) PERO no orden vertical persistente — no hay campo `order` en frontmatter. Decision: orden por `updated` desc dentro de cada columna. diff --git a/dev/issues/completed/0120-orquestador-piloto-verde.md b/dev/issues/completed/0120-orquestador-piloto-verde.md index 3273c8b1..1b47d099 100644 --- a/dev/issues/completed/0120-orquestador-piloto-verde.md +++ b/dev/issues/completed/0120-orquestador-piloto-verde.md @@ -55,7 +55,7 @@ e2e_checks: 2. Lanzar `/autonomous-task 0120 --dry-run` para audit. 3. Lanzar `/autonomous-task 0120 --max-iterations 5 --max-minutes 30`. 4. Recoger output: `task_run_id`, branch `auto/0120-*`, log de iteraciones, proposals aplicadas/skipped, URL del PR draft. -5. Verificar `git -C /home/lucas/fn_registry status --short` igual a baseline (regla 11 sandbox breach). +5. Verificar `git -C $HOME/fn_registry status --short` igual a baseline (regla 11 sandbox breach). 6. Post-mortem: si fallo en alguna iteracion, anotar en seccion `## Hallazgos` y refinar `fn-orquestador/SKILL.md` o `autonomous_loop.md` si corresponde. ## Acceptance @@ -64,7 +64,7 @@ e2e_checks: - [ ] `apps/chart_demo/app.md` contiene bloque `e2e_checks:` con al menos `build` + `binary_exists`. - [ ] `fn-analizador` corrida sobre `chart_demo` reporta `checks_pass=checks_total` (todo verde). - [ ] PR draft existe en Gitea con branch `auto/0120-*` apuntando a `master`. -- [ ] `git -C /home/lucas/fn_registry status --short` antes/despues del piloto identico (excluyendo solo este `.md` cerrado). +- [ ] `git -C $HOME/fn_registry status --short` antes/despues del piloto identico (excluyendo solo este `.md` cerrado). - [ ] Documento de post-mortem en `## Hallazgos` con: iteraciones totales, tiempo total, proposals creadas, decisiones del orquestador. ## DoD diff --git a/dev/issues/completed/0126-pipeline-launcher-migration-003.md b/dev/issues/completed/0126-pipeline-launcher-migration-003.md index 6a495ce0..a71b0f64 100644 --- a/dev/issues/completed/0126-pipeline-launcher-migration-003.md +++ b/dev/issues/completed/0126-pipeline-launcher-migration-003.md @@ -69,7 +69,7 @@ Acciones tomadas: - Clonado `apps/pipeline_launcher` desde Gitea en aurgi-pc para la investigacion; `pc_locations` pasa de `missing` a `active` tras `fn sync` futuro. Pendiente fuera de scope: -- `apps/pipeline_launcher/go.mod` tiene `replace fn-registry => /home/lucas/fn_registry` hardcoded — el build solo funciona en home-wsl. Issue aparte si se quiere cross-PC build. +- `apps/pipeline_launcher/go.mod` tiene `replace fn-registry => $HOME/fn_registry` hardcoded — el build solo funciona en home-wsl. Issue aparte si se quiere cross-PC build. - `fn_operations/project_template/operations.db` tiene migraciones aplicadas hasta v5, falta v6. Stale template — issue aparte. Acceptance: diff --git a/dev/proposals_e2e_checks_0121/altsnap_jitter_test.yaml b/dev/proposals_e2e_checks_0121/altsnap_jitter_test.yaml index 751ed3de..2e6188fb 100644 --- a/dev/proposals_e2e_checks_0121/altsnap_jitter_test.yaml +++ b/dev/proposals_e2e_checks_0121/altsnap_jitter_test.yaml @@ -65,9 +65,9 @@ e2e_checks: # reconfiguracion). - id: cmake_configure_linux cmd: > - test -f /home/lucas/fn_registry/cpp/build/linux/build.ninja || - cmake -S /home/lucas/fn_registry/cpp - -B /home/lucas/fn_registry/cpp/build/linux + test -f $HOME/fn_registry/cpp/build/linux/build.ninja || + cmake -S $HOME/fn_registry/cpp + -B $HOME/fn_registry/cpp/build/linux -DFN_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo timeout_s: 60 @@ -77,13 +77,13 @@ e2e_checks: # y el linkado con fn_framework (app_base.cpp, GLFW, OpenGL) tiene exito. # Este es el check de compilacion base que corre en cualquier entorno. - id: build_linux - cmd: "cmake --build /home/lucas/fn_registry/cpp/build/linux --target altsnap_jitter_test -j4" + cmd: "cmake --build $HOME/fn_registry/cpp/build/linux --target altsnap_jitter_test -j4" timeout_s: 300 severity: critical # Verifica que el binario Linux existe tras el build. - id: binary_exists_linux - cmd: "test -f /home/lucas/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test" + cmd: "test -f $HOME/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test" timeout_s: 5 severity: critical @@ -95,7 +95,7 @@ e2e_checks: cmd: > xvfb-run -a -s "-screen 0 1280x800x24" env LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe - /home/lucas/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test + $HOME/fn_registry/cpp/build/linux/apps/altsnap_jitter_test/altsnap_jitter_test timeout_s: 60 severity: critical @@ -103,7 +103,7 @@ e2e_checks: # add_imgui_app genera altsnap_jitter_test_appicon.rc; si el .ico falta el build # mingw pasa pero el .exe Windows queda sin icono embebido. - id: icon_exists - cmd: "test -f /home/lucas/fn_registry/apps/altsnap_jitter_test/appicon.ico" + cmd: "test -f $HOME/fn_registry/apps/altsnap_jitter_test/appicon.ico" timeout_s: 5 severity: warning @@ -124,9 +124,9 @@ e2e_checks: # real bajo Win32 que xvfb no puede cubrir. - id: windows_run cmd: > - FN_REGISTRY_ROOT=/home/lucas/fn_registry + FN_REGISTRY_ROOT=$HOME/fn_registry bash -c ' - source /home/lucas/fn_registry/bash/functions/infra/e2e_run_cpp_windows.sh + source $HOME/fn_registry/bash/functions/infra/e2e_run_cpp_windows.sh e2e_run_cpp_windows altsnap_jitter_test ' timeout_s: 300 diff --git a/dev/proposals_e2e_checks_0121/app_hub_launcher.yaml b/dev/proposals_e2e_checks_0121/app_hub_launcher.yaml index 06d74e6f..5673c394 100644 --- a/dev/proposals_e2e_checks_0121/app_hub_launcher.yaml +++ b/dev/proposals_e2e_checks_0121/app_hub_launcher.yaml @@ -35,7 +35,7 @@ e2e_checks: # Por que: gate esencial — si el target no compila, nada mas tiene sentido. # Corre sobre el build de Windows via mingw toolchain (cross-compile desde WSL). - id: build - cmd: "cd /home/lucas/fn_registry/cpp && cmake --build build/windows --target app_hub_launcher -j" + cmd: "cd $HOME/fn_registry/cpp && cmake --build build/windows --target app_hub_launcher -j" timeout_s: 300 severity: critical @@ -44,7 +44,7 @@ e2e_checks: # Este check verifica que el binario existe y es un archivo regular. # Si el build cross no produjo el .exe o el cp falló, este check lo detecta. - id: binary_exists - cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/app_hub_launcher/app_hub_launcher.exe" + cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/app_hub_launcher/app_hub_launcher.exe" timeout_s: 5 severity: critical @@ -53,7 +53,7 @@ e2e_checks: # Si se borra el ico, el .exe no tiene icono embebido (no falla el build, pero rompe el # contrato visual de la suite). El .ico es artefacto versionado en el sub-repo. - id: appicon_exists - cmd: "test -f /home/lucas/fn_registry/apps/app_hub_launcher/appicon.ico" + cmd: "test -f $HOME/fn_registry/apps/app_hub_launcher/appicon.ico" timeout_s: 5 severity: critical diff --git a/dev/proposals_e2e_checks_0121/dag_engine.yaml b/dev/proposals_e2e_checks_0121/dag_engine.yaml index 86c6d2d2..739197e9 100644 --- a/dev/proposals_e2e_checks_0121/dag_engine.yaml +++ b/dev/proposals_e2e_checks_0121/dag_engine.yaml @@ -36,7 +36,7 @@ e2e_checks: # 2026-05-16 en app.md). Arreglar antes de promover a critical. # ----------------------------------------------------------------------- - id: build_frontend - cmd: "cd /home/lucas/fn_registry/apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build" + cmd: "cd $HOME/fn_registry/apps/dag_engine/frontend && pnpm install --frozen-lockfile && pnpm build" timeout_s: 180 severity: warning # NOTA: severity warning porque pnpm build falla por API drift conocido. @@ -51,7 +51,7 @@ e2e_checks: # de trabajo (idempotente, no afecta al binario productivo). # ----------------------------------------------------------------------- - id: build_backend - cmd: "cd /home/lucas/fn_registry/apps/dag_engine && CGO_ENABLED=1 go build -tags fts5 -o /tmp/dag_engine_e2e_bin ." + cmd: "cd $HOME/fn_registry/apps/dag_engine && CGO_ENABLED=1 go build -tags fts5 -o /tmp/dag_engine_e2e_bin ." timeout_s: 120 # ----------------------------------------------------------------------- @@ -64,7 +64,7 @@ e2e_checks: # NO hay flag --migrate-only en el binario actual. # ----------------------------------------------------------------------- - id: migrations_apply - cmd: "rm -f /tmp/dag_engine_e2e.db /tmp/dag_engine_e2e.db-shm /tmp/dag_engine_e2e.db-wal && /tmp/dag_engine_e2e_bin list --db /tmp/dag_engine_e2e.db /home/lucas/fn_registry/apps/dag_engine/dags_migrated/" + cmd: "rm -f /tmp/dag_engine_e2e.db /tmp/dag_engine_e2e.db-shm /tmp/dag_engine_e2e.db-wal && /tmp/dag_engine_e2e_bin list --db /tmp/dag_engine_e2e.db $HOME/fn_registry/apps/dag_engine/dags_migrated/" timeout_s: 15 expect_exit: 0 # NOTA: depende de check build_backend (usa /tmp/dag_engine_e2e_bin). @@ -80,7 +80,7 @@ e2e_checks: # mal referenciados, etc.). # ----------------------------------------------------------------------- - id: dag_parse_fn_backup - cmd: "/tmp/dag_engine_e2e_bin validate /home/lucas/fn_registry/apps/dag_engine/dags_migrated/fn_backup.yaml" + cmd: "/tmp/dag_engine_e2e_bin validate $HOME/fn_registry/apps/dag_engine/dags_migrated/fn_backup.yaml" timeout_s: 10 expect_exit: 0 expect_stdout_contains: "Validation: PASS" @@ -93,7 +93,7 @@ e2e_checks: # topo_sort sobre un grafo no trivial. # ----------------------------------------------------------------------- - id: dag_parse_daily_audit - cmd: "/tmp/dag_engine_e2e_bin validate /home/lucas/fn_registry/apps/dag_engine/dags_migrated/daily-registry-audit.yaml" + cmd: "/tmp/dag_engine_e2e_bin validate $HOME/fn_registry/apps/dag_engine/dags_migrated/daily-registry-audit.yaml" timeout_s: 10 expect_exit: 0 expect_stdout_contains: "Validation: PASS" @@ -108,7 +108,7 @@ e2e_checks: # health endpoint /api/dags declarado en service.health_endpoint. # ----------------------------------------------------------------------- - id: smoke_server - cmd: "/tmp/dag_engine_e2e_bin server --port 8195 --db /tmp/dag_engine_e2e.db --dags-dir /home/lucas/fn_registry/apps/dag_engine/dags_migrated/ &" + cmd: "/tmp/dag_engine_e2e_bin server --port 8195 --db /tmp/dag_engine_e2e.db --dags-dir $HOME/fn_registry/apps/dag_engine/dags_migrated/ &" health: "http://127.0.0.1:8195/api/dags" timeout_s: 10 # NOTA: sin flag --scheduler para no disparar jobs reales. @@ -132,6 +132,6 @@ e2e_checks: # Cuando se añadan tests: descomentar y ajustar. # ----------------------------------------------------------------------- # - id: tests - # cmd: "cd /home/lucas/fn_registry/apps/dag_engine && go test -tags fts5 -count=1 ./..." + # cmd: "cd $HOME/fn_registry/apps/dag_engine && go test -tags fts5 -count=1 ./..." # timeout_s: 120 # OMITIDO: sin *_test.go diff --git a/dev/proposals_e2e_checks_0121/deploy_server.yaml b/dev/proposals_e2e_checks_0121/deploy_server.yaml index e2250e42..9415fbd9 100644 --- a/dev/proposals_e2e_checks_0121/deploy_server.yaml +++ b/dev/proposals_e2e_checks_0121/deploy_server.yaml @@ -15,7 +15,7 @@ e2e_checks: # build: compila el binario con CGO habilitado. Sin -tags fts5 (no lo usa el modulo). # Valida que el modulo go-sqlite3 linkea correctamente en el entorno local. - id: build - cmd: "cd /home/lucas/fn_registry/apps/deploy_server && CGO_ENABLED=1 go build -o /tmp/deploy_server_e2e_bin ." + cmd: "cd $HOME/fn_registry/apps/deploy_server && CGO_ENABLED=1 go build -o /tmp/deploy_server_e2e_bin ." timeout_s: 180 # cli_help: verifica que el binario arranca y responde sin crashear ni pedir args obligatorios. diff --git a/dev/proposals_e2e_checks_0121/metabase_registry.yaml b/dev/proposals_e2e_checks_0121/metabase_registry.yaml index bffd152e..845e0fd9 100644 --- a/dev/proposals_e2e_checks_0121/metabase_registry.yaml +++ b/dev/proposals_e2e_checks_0121/metabase_registry.yaml @@ -30,8 +30,8 @@ e2e_checks_suggested: # No conecta a Metabase — solo resuelve imports. - id: import cmd: > - cd /home/lucas/fn_registry/apps/metabase_registry && - /home/lucas/fn_registry/python/.venv/bin/python3 -c + cd $HOME/fn_registry/apps/metabase_registry && + $HOME/fn_registry/python/.venv/bin/python3 -c "import sys, os; sys.path.insert(0, os.path.join(os.getcwd(), '..', '..', 'python', 'functions')); from metabase import MetabaseClient, metabase_create_card, metabase_create_dashboard, metabase_update_dashboard; @@ -49,8 +49,8 @@ e2e_checks_suggested: # argparse imprime usage sin necesitar credenciales ni conexion. - id: cli_help cmd: > - cd /home/lucas/fn_registry/apps/metabase_registry && - /home/lucas/fn_registry/python/.venv/bin/python3 main.py --help + cd $HOME/fn_registry/apps/metabase_registry && + $HOME/fn_registry/python/.venv/bin/python3 main.py --help expect_stdout_contains: "metabase_registry" expect_exit: 0 timeout_s: 10 @@ -62,8 +62,8 @@ e2e_checks_suggested: # Detecta SyntaxError y NameError de nivel modulo antes de cualquier deploy. - id: syntax_check cmd: > - cd /home/lucas/fn_registry/apps/metabase_registry && - /home/lucas/fn_registry/python/.venv/bin/python3 -m py_compile + cd $HOME/fn_registry/apps/metabase_registry && + $HOME/fn_registry/python/.venv/bin/python3 -m py_compile main.py create_registry_dashboard.py create_apps_dashboard.py create_script_navegador_dashboard.py && echo "syntax OK" @@ -82,11 +82,11 @@ e2e_checks_suggested: # severity: warning porque el fallo esperado viene de red, no del codigo. - id: dry_run_parser cmd: > - cd /home/lucas/fn_registry/apps/metabase_registry && + cd $HOME/fn_registry/apps/metabase_registry && METABASE_URL=http://127.0.0.1:19999 METABASE_ADMIN_EMAIL=test@example.com METABASE_ADMIN_PASSWORD=fake_password_for_e2e - /home/lucas/fn_registry/python/.venv/bin/python3 main.py + $HOME/fn_registry/python/.venv/bin/python3 main.py --url http://127.0.0.1:19999 --admin-email test@example.com --admin-password fake_password_for_e2e diff --git a/dev/proposals_e2e_checks_0121/pipeline_launcher.yaml b/dev/proposals_e2e_checks_0121/pipeline_launcher.yaml index 79de179a..d115ddff 100644 --- a/dev/proposals_e2e_checks_0121/pipeline_launcher.yaml +++ b/dev/proposals_e2e_checks_0121/pipeline_launcher.yaml @@ -48,7 +48,7 @@ e2e_checks: # y hacer el check idempotente. # ----------------------------------------------------------------------- - id: build - cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go build -tags fts5 -o /tmp/pipeline_launcher_e2e_bin ." + cmd: "cd $HOME/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go build -tags fts5 -o /tmp/pipeline_launcher_e2e_bin ." timeout_s: 120 # ----------------------------------------------------------------------- @@ -61,7 +61,7 @@ e2e_checks: # config/ y views/ que el build check no ejercita separadamente. # ----------------------------------------------------------------------- - id: vet - cmd: "cd /home/lucas/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go vet -tags fts5 ./..." + cmd: "cd $HOME/fn_registry/apps/pipeline_launcher && CGO_ENABLED=1 go vet -tags fts5 ./..." timeout_s: 60 # ----------------------------------------------------------------------- @@ -78,7 +78,7 @@ e2e_checks: # ----------------------------------------------------------------------- - id: pipelines_list_loads cmd: > - COUNT=$(sqlite3 /home/lucas/fn_registry/registry.db + COUNT=$(sqlite3 $HOME/fn_registry/registry.db "SELECT COUNT(*) FROM functions WHERE kind='pipeline' AND tags LIKE '%launcher%';"); [ "$COUNT" -ge 1 ] && echo "launcher_pipelines=$COUNT OK" || { echo "FAIL: no launcher pipelines found in registry.db"; exit 1; } timeout_s: 10 diff --git a/dev/proposals_e2e_checks_0121/primitives_gallery.yaml b/dev/proposals_e2e_checks_0121/primitives_gallery.yaml index d58a72fd..34c3b228 100644 --- a/dev/proposals_e2e_checks_0121/primitives_gallery.yaml +++ b/dev/proposals_e2e_checks_0121/primitives_gallery.yaml @@ -48,7 +48,7 @@ e2e_checks: # rompe su API de compilacion, este check lo detecta antes de que otro app falle. # Actua como build gate del registry de funciones C++. - id: build - cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target primitives_gallery -j" + cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target primitives_gallery -j" timeout_s: 300 severity: critical @@ -56,7 +56,7 @@ e2e_checks: # El build puede reportar exit 0 con -j en builds parciales sin producir binario. # Sin este check, capture_mode fallaria con un mensaje de error menos claro. - id: binary_exists - cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe" + cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe" timeout_s: 5 severity: critical @@ -78,7 +78,7 @@ e2e_checks: - id: capture_mode cmd: > mkdir -p /tmp/primitives_gallery_e2e && - /home/lucas/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe + $HOME/fn_registry/cpp/build/windows/apps/primitives_gallery/primitives_gallery.exe --capture /tmp/primitives_gallery_e2e timeout_s: 120 severity: warning @@ -108,7 +108,7 @@ e2e_checks: # como recurso (.rsrc) en el .exe. Si appicon.ico falta, el build pasa # pero el .exe queda sin icono embebido (visible en Explorer + taskbar). - id: icon_exists - cmd: "test -f /home/lucas/fn_registry/apps/primitives_gallery/appicon.ico" + cmd: "test -f $HOME/fn_registry/apps/primitives_gallery/appicon.ico" timeout_s: 5 severity: warning @@ -121,7 +121,7 @@ e2e_checks: # Referencia esperada: 43 entradas (conteo manual de k_demos[] en main.cpp L37-84). - id: demos_count_static cmd: > - count=$(grep -c '^\s*{"' /home/lucas/fn_registry/apps/primitives_gallery/main.cpp); + count=$(grep -c '^\s*{"' $HOME/fn_registry/apps/primitives_gallery/main.cpp); echo "DemoEntry count in source: $count"; test "$count" -ge 43 timeout_s: 5 diff --git a/dev/proposals_e2e_checks_0121/registry_api.yaml b/dev/proposals_e2e_checks_0121/registry_api.yaml index 870d1a6f..7d9cef8f 100644 --- a/dev/proposals_e2e_checks_0121/registry_api.yaml +++ b/dev/proposals_e2e_checks_0121/registry_api.yaml @@ -32,7 +32,7 @@ e2e_checks: # apunta a ../../ (raiz del registry), por lo que el build debe lanzarse # desde dentro del directorio de la app. - id: build - cmd: "cd /home/lucas/fn_registry/apps/registry_api && CGO_ENABLED=1 go build -tags fts5 -o registry_api ." + cmd: "cd $HOME/fn_registry/apps/registry_api && CGO_ENABLED=1 go build -tags fts5 -o registry_api ." timeout_s: 120 severity: critical # por que: sin binario el resto de checks no tiene sentido; fallo de build @@ -43,7 +43,7 @@ e2e_checks: # /api/status. Puerto 8521 (!=8420 prod, !=8420 dev) para no colisionar. # El proceso en background se mata al terminar la suite por fn-analizador. - id: smoke - cmd: "/home/lucas/fn_registry/apps/registry_api/registry_api -port 8521 -db /tmp/registry_api_e2e.db &" + cmd: "$HOME/fn_registry/apps/registry_api/registry_api -port 8521 -db /tmp/registry_api_e2e.db &" health: "http://127.0.0.1:8521/api/status" timeout_s: 10 severity: critical @@ -91,7 +91,7 @@ e2e_checks: - id: auth_check cmd: > REGISTRY_API_TOKEN=real-secret - /home/lucas/fn_registry/apps/registry_api/registry_api -port 8522 -db /tmp/registry_api_e2e_auth.db & + $HOME/fn_registry/apps/registry_api/registry_api -port 8522 -db /tmp/registry_api_e2e_auth.db & sleep 1 && STATUS=$(curl -s -o /dev/null -w '%{http_code}' -X POST http://127.0.0.1:8522/api/sync diff --git a/dev/proposals_e2e_checks_0121/registry_dashboard.yaml b/dev/proposals_e2e_checks_0121/registry_dashboard.yaml index c3bf85e0..2ccda5a0 100644 --- a/dev/proposals_e2e_checks_0121/registry_dashboard.yaml +++ b/dev/proposals_e2e_checks_0121/registry_dashboard.yaml @@ -44,7 +44,7 @@ # (antes del primer "##" de prosa). # 2. El check 'build' asume que el directorio cpp/build/linux existe y cmake # fue configurado previamente. Si no: anteponer -# "cmake -B /home/lucas/fn_registry/cpp/build/linux -S /home/lucas/fn_registry/cpp &&" +# "cmake -B $HOME/fn_registry/cpp/build/linux -S $HOME/fn_registry/cpp &&" # al cmd o usar el check 'build_configure' (opcional, ver abajo). # 3. El check 'integration_sqlite_direct' requiere que registry.db exista en # la raiz del repo. En CI, puede copiarse de un fixture o generarse con @@ -62,7 +62,7 @@ e2e_checks: # CGO no aplica (es C++, no Go). FTS5 se compila via SQLITE_ENABLE_FTS5 # en la amalgamation vendoreada (CMakeLists.txt lo setea). - id: build - cmd: "cmake --build /home/lucas/fn_registry/cpp/build/linux --target registry_dashboard -j$(nproc)" + cmd: "cmake --build $HOME/fn_registry/cpp/build/linux --target registry_dashboard -j$(nproc)" timeout_s: 300 severity: critical # por que: la app enlaza ~20 funciones del registry C++ + sqlite + ws_client. @@ -74,7 +74,7 @@ e2e_checks: # Confirma que el binario existe y es ejecutable tras el build. # Tambien verifica la version de symbols minimos esperados (sin linkage roto). - id: verify_binary - cmd: "test -x /home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard && /home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard --help 2>&1 || true" + cmd: "test -x $HOME/fn_registry/cpp/build/linux/apps/registry_dashboard && $HOME/fn_registry/cpp/build/linux/apps/registry_dashboard --help 2>&1 || true" expect_exit: 0 timeout_s: 5 severity: critical @@ -93,8 +93,8 @@ e2e_checks: - id: integration_sqlite_direct cmd: > DISPLAY="" timeout 3 - /home/lucas/fn_registry/cpp/build/linux/apps/registry_dashboard - /home/lucas/fn_registry/registry.db + $HOME/fn_registry/cpp/build/linux/apps/registry_dashboard + $HOME/fn_registry/registry.db 2>&1 | head -5 expect_exit: 1 timeout_s: 10 @@ -116,7 +116,7 @@ e2e_checks: # Actua como pre-condicion para integration_sqlite_direct. - id: data_schema_check cmd: > - sqlite3 /home/lucas/fn_registry/registry.db + sqlite3 $HOME/fn_registry/registry.db "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name IN ('functions','types','apps','analysis','proposals','unit_tests');" expect_stdout_contains: "6" @@ -133,7 +133,7 @@ e2e_checks: # via HTTP, pero aqui queremos detectar schema drift independientemente. - id: call_monitor_schema_check cmd: > - sqlite3 /home/lucas/fn_registry/projects/fn_monitoring/apps/call_monitor/operations.db + sqlite3 $HOME/fn_registry/projects/fn_monitoring/apps/call_monitor/operations.db "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name IN ('calls','violations','sessions');" expect_stdout_contains: "3" @@ -151,7 +151,7 @@ e2e_checks: # WsClient sin actualizar todos los call sites. - id: ws_client_compile_check cmd: > - cmake --build /home/lucas/fn_registry/cpp/build/linux + cmake --build $HOME/fn_registry/cpp/build/linux --target registry_dashboard -j$(nproc) -- --warn-undefined-functions 2>&1 | grep -i "ws_client" | grep -i "error" || true expect_stdout_contains: "" diff --git a/dev/proposals_e2e_checks_0121/registry_mcp.yaml b/dev/proposals_e2e_checks_0121/registry_mcp.yaml index f61d0315..8f9d2cca 100644 --- a/dev/proposals_e2e_checks_0121/registry_mcp.yaml +++ b/dev/proposals_e2e_checks_0121/registry_mcp.yaml @@ -50,7 +50,7 @@ e2e_checks: # ------------------------------------------------------------------- - id: build cmd: > - cd /home/lucas/fn_registry/apps/registry_mcp && + cd $HOME/fn_registry/apps/registry_mcp && CGO_ENABLED=1 go build -tags fts5 -o registry_mcp . timeout_s: 120 severity: critical @@ -64,7 +64,7 @@ e2e_checks: # ------------------------------------------------------------------- - id: tests cmd: > - cd /home/lucas/fn_registry/apps/registry_mcp && + cd $HOME/fn_registry/apps/registry_mcp && CGO_ENABLED=1 go test -tags fts5 -count=1 -timeout 60s ./... timeout_s: 90 severity: critical @@ -80,7 +80,7 @@ e2e_checks: # ------------------------------------------------------------------- - id: naming_reject cmd: > - cd /home/lucas/fn_registry/apps/registry_mcp && + cd $HOME/fn_registry/apps/registry_mcp && CGO_ENABLED=1 go test -tags fts5 -count=1 -run TestValidateName -v 2>&1 | grep -q "PASS" timeout_s: 30 @@ -98,10 +98,10 @@ e2e_checks: # ------------------------------------------------------------------- - id: mcp_handshake_stdio cmd: | - BINARY=/home/lucas/fn_registry/apps/registry_mcp/registry_mcp + BINARY=$HOME/fn_registry/apps/registry_mcp/registry_mcp PAYLOAD='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"e2e_probe","version":"0"}}}' RESPONSE=$(echo "$PAYLOAD" | timeout 5 "$BINARY" \ - --registry-root /home/lucas/fn_registry \ + --registry-root $HOME/fn_registry \ --log-level error \ 2>/dev/null | head -n1) echo "response: $RESPONSE" diff --git a/dev/proposals_e2e_checks_0121/script_navegador.yaml b/dev/proposals_e2e_checks_0121/script_navegador.yaml index 94010198..f7d0448e 100644 --- a/dev/proposals_e2e_checks_0121/script_navegador.yaml +++ b/dev/proposals_e2e_checks_0121/script_navegador.yaml @@ -21,12 +21,12 @@ e2e_checks: # ----------------------------------------------------------------------- # CHECK 1: build # Por que: verifica que el modulo Go compila con CGO (go-sqlite3) y las - # dependencias del registry (replace fn-registry => /home/lucas/fn_registry). + # dependencias del registry (replace fn-registry => $HOME/fn_registry). # Sin esto nada funciona. El binario se deja en /tmp para no contaminar el dir. # ----------------------------------------------------------------------- - id: build cmd: > - cd /home/lucas/fn_registry/apps/script_navegador && + cd $HOME/fn_registry/apps/script_navegador && CGO_ENABLED=1 go build -tags fts5 -o /tmp/script_navegador_e2e . timeout_s: 120 @@ -52,7 +52,7 @@ e2e_checks: - id: syntax_yaml cmd: > /tmp/script_navegador_e2e - --script /home/lucas/fn_registry/apps/script_navegador/examples/busqueda_google.yaml + --script $HOME/fn_registry/apps/script_navegador/examples/busqueda_google.yaml --port 19222 2>&1 || true expect_stdout_contains: "busqueda_google" @@ -84,7 +84,7 @@ e2e_checks: # ----------------------------------------------------------------------- - id: ops_schema cmd: > - sqlite3 /home/lucas/fn_registry/apps/script_navegador/operations.db + sqlite3 $HOME/fn_registry/apps/script_navegador/operations.db "SELECT name FROM sqlite_master WHERE type='table' AND name IN ('entities','relations','executions','logs','assertions','assertion_results') ORDER BY name;" 2>/dev/null @@ -116,6 +116,6 @@ e2e_checks: # No hay archivos *_test.go en el directorio. Si se anaden en el futuro, # agregar: # - id: tests -# cmd: "cd /home/lucas/fn_registry/apps/script_navegador && go test -count=1 ./..." +# cmd: "cd $HOME/fn_registry/apps/script_navegador && go test -count=1 ./..." # timeout_s: 60 # ----------------------------------------------------------------------- diff --git a/dev/proposals_e2e_checks_0121/services_api.yaml b/dev/proposals_e2e_checks_0121/services_api.yaml index 1f8a7eac..64317720 100644 --- a/dev/proposals_e2e_checks_0121/services_api.yaml +++ b/dev/proposals_e2e_checks_0121/services_api.yaml @@ -33,7 +33,7 @@ e2e_checks: # pero el flag no rompe nada y evita confusion futura si se añade FTS). # ----------------------------------------------------------------------- - id: build - cmd: "cd /home/lucas/fn_registry/apps/services_api && CGO_ENABLED=1 go build -o services_api ." + cmd: "cd $HOME/fn_registry/apps/services_api && CGO_ENABLED=1 go build -o services_api ." timeout_s: 120 severity: critical # por que: si no compila no hay nada que probar @@ -47,11 +47,11 @@ e2e_checks: # ----------------------------------------------------------------------- - id: smoke_once cmd: > - cd /home/lucas/fn_registry/apps/services_api && - FN_REGISTRY_ROOT=/home/lucas/fn_registry + cd $HOME/fn_registry/apps/services_api && + FN_REGISTRY_ROOT=$HOME/fn_registry ./services_api --once - --registry /home/lucas/fn_registry + --registry $HOME/fn_registry --db /tmp/services_api_e2e.db --bind 127.0.0.1:8585 timeout_s: 45 @@ -67,10 +67,10 @@ e2e_checks: # ----------------------------------------------------------------------- - id: smoke_health cmd: > - cd /home/lucas/fn_registry/apps/services_api && + cd $HOME/fn_registry/apps/services_api && ./services_api --bind 127.0.0.1:8585 - --registry /home/lucas/fn_registry + --registry $HOME/fn_registry --db /tmp/services_api_e2e_http.db --interval 300s & health: "http://127.0.0.1:8585/api/health" @@ -124,7 +124,7 @@ e2e_checks: # No existen *_test.go en apps/services_api. Activar cuando se añadan. # # - id: tests - # cmd: "cd /home/lucas/fn_registry/apps/services_api && CGO_ENABLED=1 go test -count=1 ./..." + # cmd: "cd $HOME/fn_registry/apps/services_api && CGO_ENABLED=1 go test -count=1 ./..." # timeout_s: 120 # severity: critical # ----------------------------------------------------------------------- diff --git a/dev/proposals_e2e_checks_0121/services_monitor.yaml b/dev/proposals_e2e_checks_0121/services_monitor.yaml index 5067cf93..f87133c3 100644 --- a/dev/proposals_e2e_checks_0121/services_monitor.yaml +++ b/dev/proposals_e2e_checks_0121/services_monitor.yaml @@ -30,7 +30,7 @@ e2e_checks: # (data_table::render, issue 0097) y ws2_32 en WIN32. # Detecta regresiones de API en data_table o cambios de firma en http_client.h. - id: build - cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target services_monitor -j" + cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target services_monitor -j" timeout_s: 300 severity: critical @@ -39,7 +39,7 @@ e2e_checks: # (ha ocurrido con fn_module_data_table cuando el target es condicional via # if(TARGET fn_module_data_table) sin hacer REQUIRED). - id: binary_exists - cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/services_monitor/services_monitor.exe" + cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/services_monitor/services_monitor.exe" timeout_s: 5 severity: critical @@ -48,7 +48,7 @@ e2e_checks: # si el .ico falta el build pasa pero el .exe queda sin icono (phosphor=pulse # accent=#10b981 segun app.md). Visible al copiar a Desktop/apps/. - id: icon_exists - cmd: "test -f /home/lucas/fn_registry/apps/services_monitor/appicon.ico" + cmd: "test -f $HOME/fn_registry/apps/services_monitor/appicon.ico" timeout_s: 5 severity: warning diff --git a/dev/proposals_e2e_checks_0121/shaders_lab.yaml b/dev/proposals_e2e_checks_0121/shaders_lab.yaml index f0a4a679..a8dfa9d3 100644 --- a/dev/proposals_e2e_checks_0121/shaders_lab.yaml +++ b/dev/proposals_e2e_checks_0121/shaders_lab.yaml @@ -25,7 +25,7 @@ e2e_checks: # Es el check mas valioso: detecta regresiones de API en cualquiera de las # 19 funciones del registry que usa la app. - id: build - cmd: "cmake --build /home/lucas/fn_registry/cpp/build/windows --target shaders_lab -j" + cmd: "cmake --build $HOME/fn_registry/cpp/build/windows --target shaders_lab -j" timeout_s: 300 severity: critical @@ -33,7 +33,7 @@ e2e_checks: # Detecta casos donde cmake reporta exit 0 pero el linker no produjo binario # (muy raro con mingw-w64 pero ha ocurrido en builds parciales con -j). - id: binary_exists - cmd: "test -f /home/lucas/fn_registry/cpp/build/windows/apps/shaders_lab/shaders_lab.exe" + cmd: "test -f $HOME/fn_registry/cpp/build/windows/apps/shaders_lab/shaders_lab.exe" timeout_s: 5 severity: critical @@ -42,6 +42,6 @@ e2e_checks: # si el .ico falta el build pasa pero el .exe queda sin icono embebido # (visible al deploy a /mnt/c/.../Desktop/apps/). - id: icon_exists - cmd: "test -f /home/lucas/fn_registry/apps/shaders_lab/appicon.ico" + cmd: "test -f $HOME/fn_registry/apps/shaders_lab/appicon.ico" timeout_s: 5 severity: warning diff --git a/dev/proposals_e2e_checks_0121/sqlite_api.yaml b/dev/proposals_e2e_checks_0121/sqlite_api.yaml index 8e176f95..1618a565 100644 --- a/dev/proposals_e2e_checks_0121/sqlite_api.yaml +++ b/dev/proposals_e2e_checks_0121/sqlite_api.yaml @@ -20,7 +20,7 @@ e2e_checks: # El binario resultante es el mismo que usa el systemd unit. # Correr desde la raiz del repo porque go.mod vive ahi. cmd: > - cd /home/lucas/fn_registry && + cd $HOME/fn_registry && CGO_ENABLED=1 go build -tags fts5 -o projects/fn_monitoring/apps/sqlite_api/sqlite_api ./projects/fn_monitoring/apps/sqlite_api/ @@ -35,7 +35,7 @@ e2e_checks: # DiscoverDatabases, /tables, /schema, 404 para DB inexistente. # Usan DB en t.TempDir() — totalmente efimeros. cmd: > - cd /home/lucas/fn_registry && + cd $HOME/fn_registry && CGO_ENABLED=1 go test -tags fts5 -count=1 -v ./projects/fn_monitoring/apps/sqlite_api/ timeout_s: 60 @@ -48,8 +48,8 @@ e2e_checks: # encuentre registry.db real (necesario para /api/databases). # El proceso queda en background; fn-analizador lo mata al terminar. cmd: > - FN_REGISTRY_ROOT=/home/lucas/fn_registry - /home/lucas/fn_registry/projects/fn_monitoring/apps/sqlite_api/sqlite_api + FN_REGISTRY_ROOT=$HOME/fn_registry + $HOME/fn_registry/projects/fn_monitoring/apps/sqlite_api/sqlite_api --bind 127.0.0.1:8684 --data-factory-db /tmp/sqlite_api_e2e_df.db & health: "http://127.0.0.1:8684/api/databases" diff --git a/dev/proposals_e2e_checks_0121/tables_qa.yaml b/dev/proposals_e2e_checks_0121/tables_qa.yaml index fbbb46e2..c8683690 100644 --- a/dev/proposals_e2e_checks_0121/tables_qa.yaml +++ b/dev/proposals_e2e_checks_0121/tables_qa.yaml @@ -57,7 +57,7 @@ e2e_checks: # los tabs, (c) ninguna TU del modulo rompe ODR. # Es el build gate de data_table v2.0+ para issue 0081 BeginTable migration. - id: build - cmd: "cmake --build /home/lucas/fn_registry/cpp/build --target tables_qa -j" + cmd: "cmake --build $HOME/fn_registry/cpp/build --target tables_qa -j" timeout_s: 300 severity: critical # Nota: si fn_module_data_table aun no esta buildado, cmake lo buildara como @@ -67,7 +67,7 @@ e2e_checks: # cmake --build puede retornar exit 0 en rebuilds parciales sin producir binario # si el target ya esta up-to-date pero el archivo fue borrado manualmente. - id: binary_exists - cmd: "test -f /home/lucas/fn_registry/cpp/build/apps/tables_qa/tables_qa" + cmd: "test -f $HOME/fn_registry/cpp/build/apps/tables_qa/tables_qa" timeout_s: 5 severity: critical @@ -80,7 +80,7 @@ e2e_checks: # implemente --self-test real con imgui_test_engine, ascender a critical y # añadir expect_stdout_contains para verificar resultados concretos. - id: self_test_stub - cmd: "/home/lucas/fn_registry/cpp/build/apps/tables_qa/tables_qa --self-test" + cmd: "$HOME/fn_registry/cpp/build/apps/tables_qa/tables_qa --self-test" timeout_s: 15 expect_exit: 0 expect_stdout_contains: "SKIPPED" @@ -94,7 +94,7 @@ e2e_checks: # Windows queda sin icono embebido. Fallo aqui detecta borrado accidental # del .ico antes de cross-compile. - id: icon_exists - cmd: "test -f /home/lucas/fn_registry/apps/tables_qa/appicon.ico" + cmd: "test -f $HOME/fn_registry/apps/tables_qa/appicon.ico" timeout_s: 5 severity: warning @@ -107,7 +107,7 @@ e2e_checks: # Cuenta "render_" en tabs.h como proxy del numero de tabs declarados. - id: tabs_declared cmd: > - count=$(grep -c 'render_' /home/lucas/fn_registry/apps/tables_qa/tabs.h 2>/dev/null); + count=$(grep -c 'render_' $HOME/fn_registry/apps/tables_qa/tabs.h 2>/dev/null); echo "render_ declarations in tabs.h: $count"; test "$count" -ge 10 timeout_s: 5 @@ -121,7 +121,7 @@ e2e_checks: # Este check estático es mas rapido que el build completo y da feedback antes. - id: cmakelists_tab_srcs cmd: > - count=$(grep -c '^ tab_' /home/lucas/fn_registry/apps/tables_qa/CMakeLists.txt 2>/dev/null); + count=$(grep -c '^ tab_' $HOME/fn_registry/apps/tables_qa/CMakeLists.txt 2>/dev/null); echo "tab_*.cpp in CMakeLists: $count"; test "$count" -ge 10 timeout_s: 5 diff --git a/docs/capabilities/agents.md b/docs/capabilities/agents.md index 1673c9b6..7789164d 100644 --- a/docs/capabilities/agents.md +++ b/docs/capabilities/agents.md @@ -26,9 +26,9 @@ import ( func main() { cfg := infra.WorktreeLaunchConfig{ - RepoRoot: "/home/lucas/fn_registry", + RepoRoot: "$HOME/fn_registry", Branch: "auto/0115-worktree-launcher-fn", - WorktreePath: "/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn", + WorktreePath: "$HOME/fn_registry/worktrees/0115-worktree-launcher-fn", Prompt: "Implement issue 0115 — worktree launcher Go function", LogPath: "/tmp/claude-0115.log", SkipPerms: true, @@ -49,7 +49,7 @@ func main() { } // Validar DoD del issue antes de cerrarlo - report, _ := infra.AuditDodSchema("/home/lucas/fn_registry/dev/issues", "") + report, _ := infra.AuditDodSchema("$HOME/fn_registry/dev/issues", "") fmt.Printf("dod: %d items, %d invalid\n", report.TotalItems, report.InvalidItems) } ``` diff --git a/docs/capabilities/cpp-windows.md b/docs/capabilities/cpp-windows.md index 35941228..d6a3c744 100644 --- a/docs/capabilities/cpp-windows.md +++ b/docs/capabilities/cpp-windows.md @@ -26,7 +26,7 @@ source bash/functions/infra/launch_cpp_app_windows.sh source bash/functions/infra/is_cpp_app_running_windows.sh deploy_cpp_exe_to_windows "registry_dashboard" \ - "/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard" + "$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard" launch_cpp_app_windows "registry_dashboard" sleep 1 if is_cpp_app_running_windows "registry_dashboard"; then @@ -43,11 +43,11 @@ source bash/functions/pipelines/redeploy_cpp_app_windows.sh # Sin recompilar redeploy_cpp_app_windows "registry_dashboard" \ - "/home/lucas/fn_registry/projects/fn_monitoring/apps/registry_dashboard" + "$HOME/fn_registry/projects/fn_monitoring/apps/registry_dashboard" # Con recompilacion previa redeploy_cpp_app_windows "chart_demo" \ - "/home/lucas/fn_registry/cpp/apps/chart_demo" --build + "$HOME/fn_registry/cpp/apps/chart_demo" --build ``` ### Comprobar si esta vivo antes de decidir diff --git a/docs/capabilities/doctor.md b/docs/capabilities/doctor.md index a214465c..49c69199 100644 --- a/docs/capabilities/doctor.md +++ b/docs/capabilities/doctor.md @@ -25,7 +25,7 @@ Funciones de diagnostico read-only del registry y sus artefactos. Componen `fn d // reciben registryRoot (raiz del repo) y retornan slice de resultados + error. import "fn-registry/functions/infra" -audits, err := infra.AuditCapabilityGroups("/home/lucas/fn_registry") +audits, err := infra.AuditCapabilityGroups("$HOME/fn_registry") if err != nil { log.Fatal(err) } for _, a := range audits { if !a.OK { fmt.Printf("%s: %v\n", a.Group, a.Issues) } diff --git a/docs/capabilities/git.md b/docs/capabilities/git.md index ccebc59d..1d5be9e8 100644 --- a/docs/capabilities/git.md +++ b/docs/capabilities/git.md @@ -41,7 +41,7 @@ Operaciones git y Gitea: descubrir repos, clonar, commit, push/pull, hooks, gest # analysis domain_coverage_gaps [cloned] # # Siguiente paso sugerido: -# cd /home/lucas/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync +# cd $HOME/fn_registry && CGO_ENABLED=1 ./fn index && ./fn sync CGO_ENABLED=1 ./fn index && ./fn sync diff --git a/docs/capabilities/kanban.md b/docs/capabilities/kanban.md index 462591f3..fb05e6d9 100644 --- a/docs/capabilities/kanban.md +++ b/docs/capabilities/kanban.md @@ -26,8 +26,8 @@ Cluster de funciones para leer, escribir y vigilar los archivos `dev/issues/*.md import "fn-registry/functions/infra" const ( - issuesDir = "/home/lucas/fn_registry/dev/issues" - flowsDir = "/home/lucas/fn_registry/dev/flows" + issuesDir = "$HOME/fn_registry/dev/issues" + flowsDir = "$HOME/fn_registry/dev/flows" ) // 1. Carga inicial diff --git a/docs/execution_standard.md b/docs/execution_standard.md index 5bd082d0..eb5ec7cf 100644 --- a/docs/execution_standard.md +++ b/docs/execution_standard.md @@ -337,7 +337,7 @@ hooks: ```yaml name: backup_diario schedule: "0 2 * * *" -working_dir: /home/lucas/fn_registry/apps/mi_app +working_dir: $HOME/fn_registry/apps/mi_app steps: - name: backup function: backup_db_bash_pipelines diff --git a/functions/infra/agent_cleanup_worktree.md b/functions/infra/agent_cleanup_worktree.md index 8c614475..d8948b95 100644 --- a/functions/infra/agent_cleanup_worktree.md +++ b/functions/infra/agent_cleanup_worktree.md @@ -36,9 +36,9 @@ file_path: "functions/infra/agent_cleanup_worktree.go" ```go err := infra.AgentCleanupWorktree( - "/home/lucas/fn_registry", + "$HOME/fn_registry", "auto/0115-worktree-launcher-fn", - "/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn", + "$HOME/fn_registry/worktrees/0115-worktree-launcher-fn", 12345, // PID devuelto por AgentLaunchWorktree ) if err != nil { diff --git a/functions/infra/agent_launch_worktree.md b/functions/infra/agent_launch_worktree.md index 751dc48a..41c545e1 100644 --- a/functions/infra/agent_launch_worktree.md +++ b/functions/infra/agent_launch_worktree.md @@ -31,9 +31,9 @@ file_path: "functions/infra/agent_launch_worktree.go" ```go res := infra.AgentLaunchWorktree(infra.WorktreeLaunchConfig{ - RepoRoot: "/home/lucas/fn_registry", + RepoRoot: "$HOME/fn_registry", Branch: "auto/0115-worktree-launcher-fn", - WorktreePath: "/home/lucas/fn_registry/worktrees/0115-worktree-launcher-fn", + WorktreePath: "$HOME/fn_registry/worktrees/0115-worktree-launcher-fn", Prompt: "Implement issue 0115 — worktree launcher Go function", LogPath: "/tmp/claude-0115.log", SkipPerms: true, @@ -44,7 +44,7 @@ if res.Error != "" { } fmt.Printf("claude PID=%d branch=%s log=%s\n", res.PID, res.Branch, res.LogPath) // ... agente trabaja ... -infra.AgentCleanupWorktree(res.WorktreePath, res.Branch, "/home/lucas/fn_registry", res.PID) +infra.AgentCleanupWorktree(res.WorktreePath, res.Branch, "$HOME/fn_registry", res.PID) ``` ## Cuando usarla diff --git a/functions/infra/artefact_doctor.md b/functions/infra/artefact_doctor.md index f32ca77a..e266e4df 100644 --- a/functions/infra/artefact_doctor.md +++ b/functions/infra/artefact_doctor.md @@ -29,7 +29,7 @@ file_path: "functions/infra/artefact_doctor.go" ## Ejemplo ```go -checks, err := ArtefactDoctor("/home/lucas/fn_registry") +checks, err := ArtefactDoctor("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/audit_app_drift.md b/functions/infra/audit_app_drift.md index d3b3491a..6aaf643b 100644 --- a/functions/infra/audit_app_drift.md +++ b/functions/infra/audit_app_drift.md @@ -26,7 +26,7 @@ test_file_path: "" file_path: "functions/infra/audit_app_drift.go" params: - name: registryRoot - desc: "Ruta absoluta a la raiz del fn_registry (ej. /home/lucas/fn_registry). Se buscan modules/*/module.md, apps/*/app.md, projects/*/apps/*/app.md y cpp/build/{linux,windows}/apps//." + desc: "Ruta absoluta a la raiz del fn_registry (ej. $HOME/fn_registry). Se buscan modules/*/module.md, apps/*/app.md, projects/*/apps/*/app.md y cpp/build/{linux,windows}/apps//." - name: windowsDeployRoot desc: "Ruta absoluta donde se despliegan los .exe de Windows (ej. /mnt/c/Users/lucas/Desktop/apps). Si vacio, se omite la inspeccion del binario desplegado y solo se usan los artefactos bajo cpp/build." output: "Slice de AppDriftEntry, uno por app C++ encontrada. Status: 'ok' (todas las versiones coinciden), 'drift' (al menos un modulo tiene version distinta), 'no-build' (no se encontro ningun artefacto compilado). Campo Stale lista los nombres de modulos con drift." @@ -45,7 +45,7 @@ Detecta apps C++ cuyos binarios/artefactos enlazan una version de modulo inferio ## Ejemplo ```go -entries, err := infra.AuditAppDrift("/home/lucas/fn_registry", "/mnt/c/Users/lucas/Desktop/apps") +entries, err := infra.AuditAppDrift("$HOME/fn_registry", "/mnt/c/Users/lucas/Desktop/apps") if err != nil { log.Fatal(err) } diff --git a/functions/infra/audit_app_location.md b/functions/infra/audit_app_location.md index 5cf57027..cf179f84 100644 --- a/functions/infra/audit_app_location.md +++ b/functions/infra/audit_app_location.md @@ -30,7 +30,7 @@ file_path: "functions/infra/audit_app_location.go" ## Ejemplo ```go -violations, err := AuditAppLocation("/home/lucas/fn_registry") +violations, err := AuditAppLocation("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/audit_capability_groups.md b/functions/infra/audit_capability_groups.md index 10a4bbbc..609aad40 100644 --- a/functions/infra/audit_capability_groups.md +++ b/functions/infra/audit_capability_groups.md @@ -59,7 +59,7 @@ type CapabilityGroupAudit struct { ## Ejemplo ```go -audits, err := AuditCapabilityGroups("/home/lucas/fn_registry") +audits, err := AuditCapabilityGroups("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/audit_copied_code.md b/functions/infra/audit_copied_code.md index d878b873..1c73d546 100644 --- a/functions/infra/audit_copied_code.md +++ b/functions/infra/audit_copied_code.md @@ -28,7 +28,7 @@ imports: example: | import "fn-registry/functions/infra" - entries, err := infra.AuditCopiedCode("/home/lucas/fn_registry") + entries, err := infra.AuditCopiedCode("$HOME/fn_registry") if err != nil { ... } for _, e := range entries { fmt.Printf("%s:%s ~ %s (%s, %.2f)\n", diff --git a/functions/infra/audit_cpp_apps.md b/functions/infra/audit_cpp_apps.md index 36d26562..a8388e5e 100644 --- a/functions/infra/audit_cpp_apps.md +++ b/functions/infra/audit_cpp_apps.md @@ -27,7 +27,7 @@ file_path: "functions/infra/audit_cpp_apps.go" ## Ejemplo ```go -audits, err := infra.AuditCppApps("/home/lucas/fn_registry") +audits, err := infra.AuditCppApps("$HOME/fn_registry") if err != nil { log.Fatal(err) } for _, a := range audits { if !a.OK { diff --git a/functions/infra/audit_data_table_usage.md b/functions/infra/audit_data_table_usage.md index bc8db876..d1d03b9b 100644 --- a/functions/infra/audit_data_table_usage.md +++ b/functions/infra/audit_data_table_usage.md @@ -29,7 +29,7 @@ output: "Slice de DataTableUsageEntry, uno por app C++ con uses_modules: [data_t ```go import "fn-registry/functions/infra" -entries, err := infra.AuditDataTableUsage("/home/lucas/fn_registry") +entries, err := infra.AuditDataTableUsage("$HOME/fn_registry") if err != nil { panic(err) } diff --git a/functions/infra/audit_dod_schema.md b/functions/infra/audit_dod_schema.md index e29f4a32..7b12a025 100644 --- a/functions/infra/audit_dod_schema.md +++ b/functions/infra/audit_dod_schema.md @@ -36,8 +36,8 @@ file_path: "functions/infra/audit_dod_schema.go" ```go report, err := infra.AuditDodSchema( - "/home/lucas/fn_registry/dev/issues", - "/home/lucas/fn_registry/dev/flows", + "$HOME/fn_registry/dev/issues", + "$HOME/fn_registry/dev/flows", ) if err != nil { log.Fatal(err) diff --git a/functions/infra/audit_ml_env.md b/functions/infra/audit_ml_env.md index 9cd52b0c..aa2d2031 100644 --- a/functions/infra/audit_ml_env.md +++ b/functions/infra/audit_ml_env.md @@ -47,7 +47,7 @@ output: "MlEnvReport con Gpus (puede estar vacio si no hay NVIDIA), Checks con e ## Ejemplo ```go -root := "/home/lucas/fn_registry" +root := "$HOME/fn_registry" report, err := AuditMlEnv(root) if err != nil { log.Fatal(err) diff --git a/functions/infra/audit_modules_drift.md b/functions/infra/audit_modules_drift.md index 33078155..f6f1a410 100644 --- a/functions/infra/audit_modules_drift.md +++ b/functions/infra/audit_modules_drift.md @@ -27,7 +27,7 @@ output: "Slice de ModuleDriftCheck (uno por app C++ con CMakeLists.txt). Apps si ```go import "fn-registry/functions/infra" -checks, err := infra.AuditModulesDrift("/home/lucas/fn_registry") +checks, err := infra.AuditModulesDrift("$HOME/fn_registry") if err != nil { panic(err) } for _, c := range checks { if !c.OK { diff --git a/functions/infra/audit_services_spec.md b/functions/infra/audit_services_spec.md index 03095ba6..dc176f74 100644 --- a/functions/infra/audit_services_spec.md +++ b/functions/infra/audit_services_spec.md @@ -37,7 +37,7 @@ Reporta apps con tag `service` cuya `service:` block esta incompleta. ## Ejemplo ```go -audits, err := infra.AuditServicesSpec("/home/lucas/fn_registry") +audits, err := infra.AuditServicesSpec("$HOME/fn_registry") for _, a := range audits { if !a.OK { fmt.Println(a.AppID, "issues:", a.Issues) diff --git a/functions/infra/audit_uses_functions.md b/functions/infra/audit_uses_functions.md index e272a17e..a08b8a02 100644 --- a/functions/infra/audit_uses_functions.md +++ b/functions/infra/audit_uses_functions.md @@ -30,7 +30,7 @@ file_path: "functions/infra/audit_uses_functions.go" ## Ejemplo ```go -results, err := AuditUsesFunctions("/home/lucas/fn_registry") +results, err := AuditUsesFunctions("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/find_unused_functions.md b/functions/infra/find_unused_functions.md index 35cca752..79b84ef9 100644 --- a/functions/infra/find_unused_functions.md +++ b/functions/infra/find_unused_functions.md @@ -36,7 +36,7 @@ file_path: "functions/infra/find_unused_functions.go" ## Ejemplo ```go -unused, err := FindUnusedFunctions("/home/lucas/fn_registry") +unused, err := FindUnusedFunctions("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/generate_proposals_from_telemetry.md b/functions/infra/generate_proposals_from_telemetry.md index b7f764ce..55266d11 100644 --- a/functions/infra/generate_proposals_from_telemetry.md +++ b/functions/infra/generate_proposals_from_telemetry.md @@ -28,9 +28,9 @@ imports: example: | import "fn-registry/functions/infra" - drafts, err := infra.GenerateProposalsFromTelemetry("/home/lucas/fn_registry") + drafts, err := infra.GenerateProposalsFromTelemetry("$HOME/fn_registry") if err != nil { ... } - inserted, total, err := infra.PersistProposalDrafts("/home/lucas/fn_registry", drafts) + inserted, total, err := infra.PersistProposalDrafts("$HOME/fn_registry", drafts) fmt.Printf("%d/%d proposals nuevas\n", inserted, total) file_path: "functions/infra/generate_proposals_from_telemetry.go" tested: false diff --git a/functions/infra/pc_locations_drift.md b/functions/infra/pc_locations_drift.md index e06d0dd3..2d83bef7 100644 --- a/functions/infra/pc_locations_drift.md +++ b/functions/infra/pc_locations_drift.md @@ -40,7 +40,7 @@ output: "Slice de LocationDrift con todos los discrepancias encontradas. Vacio s ## Ejemplo ```go -drifts, err := PcLocationsDrift("/home/lucas/fn_registry", "") +drifts, err := PcLocationsDrift("$HOME/fn_registry", "") if err != nil { log.Fatal(err) } diff --git a/functions/infra/proposal_from_failure.md b/functions/infra/proposal_from_failure.md index a41f1141..c49f3d9b 100644 --- a/functions/infra/proposal_from_failure.md +++ b/functions/infra/proposal_from_failure.md @@ -40,7 +40,7 @@ output: "Lista de IDs de proposals creados (formato 'prop_<16hexchars>'). Error ```go results, _ := infra.E2ERunChecks(checks, "/opt/apps/myapp") propIDs, err := infra.ProposalFromFailure( - "/home/lucas/fn_registry/registry.db", + "$HOME/fn_registry/registry.db", "my_app", results, "exec_20260509_001", diff --git a/functions/infra/scan_flows_dir.md b/functions/infra/scan_flows_dir.md index 4abba8a9..de1b7f9b 100644 --- a/functions/infra/scan_flows_dir.md +++ b/functions/infra/scan_flows_dir.md @@ -31,7 +31,7 @@ file_path: "functions/infra/scan_flows_dir.go" ## Ejemplo ```go -flows, err := infra.ScanFlowsDir("/home/lucas/fn_registry/dev/flows") +flows, err := infra.ScanFlowsDir("$HOME/fn_registry/dev/flows") if err != nil { log.Fatal(err) } diff --git a/functions/infra/scan_issues_dir.md b/functions/infra/scan_issues_dir.md index a7e14021..c04c67ae 100644 --- a/functions/infra/scan_issues_dir.md +++ b/functions/infra/scan_issues_dir.md @@ -32,7 +32,7 @@ file_path: "functions/infra/scan_issues_dir.go" ## Ejemplo ```go -issues, err := infra.ScanIssuesDir("/home/lucas/fn_registry/dev/issues") +issues, err := infra.ScanIssuesDir("$HOME/fn_registry/dev/issues") if err != nil { log.Fatal(err) } diff --git a/functions/infra/services_status.md b/functions/infra/services_status.md index cc40c774..41671a67 100644 --- a/functions/infra/services_status.md +++ b/functions/infra/services_status.md @@ -38,7 +38,7 @@ output: "Slice de ServiceStatus con estado systemd, puerto y pc_id por cada app ## Ejemplo ```go -statuses, err := ServicesStatus("/home/lucas/fn_registry") +statuses, err := ServicesStatus("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/vault_aggregate_index.md b/functions/infra/vault_aggregate_index.md index 37c1ed67..f41691be 100644 --- a/functions/infra/vault_aggregate_index.md +++ b/functions/infra/vault_aggregate_index.md @@ -40,7 +40,7 @@ output: "AggregateReport con VaultsProcessed, VaultsSkipped (sin vault_index.db) ## Ejemplo ```go -report, err := infra.VaultAggregateIndex("/home/lucas/fn_registry") +report, err := infra.VaultAggregateIndex("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/vault_doctor.md b/functions/infra/vault_doctor.md index 71df58f2..b4ec500b 100644 --- a/functions/infra/vault_doctor.md +++ b/functions/infra/vault_doctor.md @@ -51,7 +51,7 @@ output: "Slice de VaultDoctorEntry con Status (ok/warning/error), Issues, DiskFi ## Ejemplo ```go -entries, err := infra.VaultDoctor("/home/lucas/fn_registry") +entries, err := infra.VaultDoctor("$HOME/fn_registry") for _, e := range entries { fmt.Printf("%-30s %-8s files=%d issues=%v\n", e.VaultName, e.Status, e.DiskFiles, e.Issues) diff --git a/functions/infra/vault_manifest_read.md b/functions/infra/vault_manifest_read.md index 9dacb33f..09e423fa 100644 --- a/functions/infra/vault_manifest_read.md +++ b/functions/infra/vault_manifest_read.md @@ -35,7 +35,7 @@ file_path: "functions/infra/vault_manifest_read.go" ## Ejemplo ```go -entries, err := VaultManifestRead("/home/lucas/fn_registry") +entries, err := VaultManifestRead("$HOME/fn_registry") if err != nil { log.Fatal(err) } diff --git a/functions/infra/watch_dir_fsnotify.md b/functions/infra/watch_dir_fsnotify.md index 26b90206..11faa2af 100644 --- a/functions/infra/watch_dir_fsnotify.md +++ b/functions/infra/watch_dir_fsnotify.md @@ -36,7 +36,7 @@ file_path: "functions/infra/watch_dir_fsnotify.go" ctx, cancel := context.WithCancel(context.Background()) defer cancel() -ch, err := infra.WatchDirFsnotify(ctx, "/home/lucas/fn_registry/dev/issues") +ch, err := infra.WatchDirFsnotify(ctx, "$HOME/fn_registry/dev/issues") if err != nil { log.Fatal(err) } diff --git a/functions/pipelines/init_metabase.md b/functions/pipelines/init_metabase.md index ccabc2bc..002bc739 100644 --- a/functions/pipelines/init_metabase.md +++ b/functions/pipelines/init_metabase.md @@ -42,7 +42,7 @@ go run functions/pipelines/init_metabase/main.go \ # Con volume para registry.db (detecta cambios en vivo) go run functions/pipelines/init_metabase/main.go \ --project fn_registry \ - --mb-volumes "/home/lucas/fn_registry/registry.db:/data/registry.db" + --mb-volumes "$HOME/fn_registry/registry.db:/data/registry.db" ``` Salida JSON: diff --git a/functions/pipelines/pipeline_launcher.md b/functions/pipelines/pipeline_launcher.md index fc30f4a2..8eca7778 100644 --- a/functions/pipelines/pipeline_launcher.md +++ b/functions/pipelines/pipeline_launcher.md @@ -34,7 +34,7 @@ file_path: "apps/pipeline_launcher/main.go" ## Ejemplo ```bash -FN_REGISTRY_ROOT=/home/lucas/fn_registry go run apps/pipeline_launcher/main.go +FN_REGISTRY_ROOT=$HOME/fn_registry go run apps/pipeline_launcher/main.go ``` ## Notas diff --git a/python/functions/embedding/embedding_save_model.md b/python/functions/embedding/embedding_save_model.md index 7a724a2d..7c2b6058 100644 --- a/python/functions/embedding/embedding_save_model.md +++ b/python/functions/embedding/embedding_save_model.md @@ -30,7 +30,7 @@ file_path: "python/functions/embedding/model.py" ```python path = embedding_save_model("intfloat/multilingual-e5-small", ".local/models/e5-small") -# path = "/home/lucas/fn_registry/.local/models/e5-small" +# path = "$HOME/fn_registry/.local/models/e5-small" ``` ## Notas diff --git a/python/functions/infra/export_hub_icons.md b/python/functions/infra/export_hub_icons.md index f04c493b..d94457e0 100644 --- a/python/functions/infra/export_hub_icons.md +++ b/python/functions/infra/export_hub_icons.md @@ -14,7 +14,7 @@ params: - name: size desc: "Lado del cuadrado del PNG en pixels. Default 64. El hub launcher usa 64 para las tarjetas." - name: registry_root - desc: "Ruta a la raiz del fn_registry. Si es None usa FN_REGISTRY_ROOT env o /home/lucas/fn_registry." + desc: "Ruta a la raiz del fn_registry. Si es None usa FN_REGISTRY_ROOT env o $HOME/fn_registry." - name: style desc: "Estilo del icono igual que generate_app_icon: 'fill_white' (default), 'adaptive_duotone' o 'white_duotone'. CLI: `--style `." output: "dict con ok=True, count=N (PNGs escritos), out_dir (ruta absoluta), skipped (lista de {name, reason} para apps omitidas)." @@ -54,7 +54,7 @@ print(json.dumps(export_hub_icons('/tmp/hub_icons_test'), indent=2)) " # Via CLI directo con tamaño personalizado -cd /home/lucas/fn_registry +cd $HOME/fn_registry python/.venv/bin/python3 python/functions/infra/export_hub_icons.py /tmp/hub_icons --size 128 ``` diff --git a/python/functions/infra/export_hub_icons.py b/python/functions/infra/export_hub_icons.py index 0ff3e8fd..5a2a1fc5 100644 --- a/python/functions/infra/export_hub_icons.py +++ b/python/functions/infra/export_hub_icons.py @@ -72,7 +72,7 @@ def export_hub_icons( se sobreescriben. size: Lado del cuadrado del PNG en pixels. Default 64. registry_root: Ruta a la raiz del fn_registry. Si es None, usa la variable - de entorno FN_REGISTRY_ROOT o /home/lucas/fn_registry como fallback. + de entorno FN_REGISTRY_ROOT o la raiz del repo derivada de la ubicacion del archivo. Returns: { @@ -198,7 +198,7 @@ if __name__ == "__main__": parser.add_argument( "--registry-root", default=None, - help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or /home/lucas/fn_registry)", + help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or repo root derived from file location)", ) parser.add_argument( "--style", diff --git a/python/functions/infra/export_hub_manifest.md b/python/functions/infra/export_hub_manifest.md index 237645a9..801fb2fd 100644 --- a/python/functions/infra/export_hub_manifest.md +++ b/python/functions/infra/export_hub_manifest.md @@ -18,7 +18,7 @@ params: - name: out_path desc: "Ruta de destino del archivo TSV. Puede ser absoluta o relativa al cwd. El directorio padre se crea si no existe." - name: registry_root - desc: "Raiz del fn_registry. Si None, usa la variable de entorno FN_REGISTRY_ROOT o /home/lucas/fn_registry como fallback." + desc: "Raiz del fn_registry. Si None, usa la variable de entorno FN_REGISTRY_ROOT o $HOME/fn_registry como fallback." output: "Dict {ok: True, count: N, out_path: str} con la ruta absoluta del TSV escrito y el numero de apps incluidas." tested: false tests: [] diff --git a/python/functions/infra/export_hub_manifest.py b/python/functions/infra/export_hub_manifest.py index dd9b13e4..f71d36b2 100644 --- a/python/functions/infra/export_hub_manifest.py +++ b/python/functions/infra/export_hub_manifest.py @@ -50,14 +50,15 @@ def export_hub_manifest(out_path: str, *, registry_root: str | None = None) -> d Args: out_path: Destination path for the TSV manifest file. registry_root: Path to the fn_registry root directory. - Defaults to FN_REGISTRY_ROOT env var or /home/lucas/fn_registry. + Defaults to FN_REGISTRY_ROOT env var or repo root derived from file location. Returns: {"ok": True, "count": N, "out_path": ""} """ root = Path( registry_root - or os.environ.get("FN_REGISTRY_ROOT", "/home/lucas/fn_registry") + or os.environ.get("FN_REGISTRY_ROOT") + or Path(__file__).resolve().parents[3] ).resolve() db_path = root / "registry.db" @@ -134,7 +135,7 @@ if __name__ == "__main__": parser.add_argument( "--registry-root", default=None, - help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or /home/lucas/fn_registry)", + help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or repo root derived from file location)", ) args = parser.parse_args() diff --git a/python/functions/infra/generate_app_icon.md b/python/functions/infra/generate_app_icon.md index 001dfdd6..58fb45f8 100644 --- a/python/functions/infra/generate_app_icon.md +++ b/python/functions/infra/generate_app_icon.md @@ -47,7 +47,7 @@ ico_path = generate_app_icon( accent_hex="#0ea5e9", out_ico_path="apps/chart_demo/appicon.ico", ) -print(ico_path) # /home/lucas/fn_registry/apps/chart_demo/appicon.ico +print(ico_path) # $HOME/fn_registry/apps/chart_demo/appicon.ico ``` ```python diff --git a/python/functions/infra/http_download_file_test.py b/python/functions/infra/http_download_file_test.py index e8ecf284..79ad102a 100644 --- a/python/functions/infra/http_download_file_test.py +++ b/python/functions/infra/http_download_file_test.py @@ -6,7 +6,7 @@ import os import unittest from unittest.mock import MagicMock, patch -sys.path.insert(0, "/home/lucas/fn_registry/python/functions") +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from infra.http_download_file import http_download_file diff --git a/python/functions/infra/http_get_json_test.py b/python/functions/infra/http_get_json_test.py index ddfbd089..a86b539a 100644 --- a/python/functions/infra/http_get_json_test.py +++ b/python/functions/infra/http_get_json_test.py @@ -2,13 +2,14 @@ import json import sys +import os import unittest import urllib.error import urllib.request from io import BytesIO from unittest.mock import MagicMock, patch -sys.path.insert(0, "/home/lucas/fn_registry/python/functions") +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from infra.http_get_json import http_get_json diff --git a/python/functions/infra/http_post_json_test.py b/python/functions/infra/http_post_json_test.py index 9cf22143..adca4ffe 100644 --- a/python/functions/infra/http_post_json_test.py +++ b/python/functions/infra/http_post_json_test.py @@ -2,12 +2,13 @@ import json import sys +import os import unittest import urllib.error from io import BytesIO from unittest.mock import MagicMock, patch -sys.path.insert(0, "/home/lucas/fn_registry/python/functions") +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from infra.http_post_json import http_post_json diff --git a/python/functions/metabase/metabase_mbql_validate.md b/python/functions/metabase/metabase_mbql_validate.md index f41e1329..0f964c8f 100644 --- a/python/functions/metabase/metabase_mbql_validate.md +++ b/python/functions/metabase/metabase_mbql_validate.md @@ -52,7 +52,7 @@ Dos `expressions` con el mismo `lib/expression-name` en la misma stage generan c ```python import sys -sys.path.insert(0, '/home/lucas/fn_registry/python/functions') +sys.path.insert(0, '$HOME/fn_registry/python/functions') from metabase import MetabaseClient from metabase.metabase_mbql_validate import metabase_mbql_validate diff --git a/python/functions/metabase/validation_test.py b/python/functions/metabase/validation_test.py index 7d9b2927..14db75b5 100644 --- a/python/functions/metabase/validation_test.py +++ b/python/functions/metabase/validation_test.py @@ -1,8 +1,9 @@ """Tests para metabase_validate_card_payload y metabase_validate_dashboard_payload.""" import sys +import os -sys.path.insert(0, "/home/lucas/fn_registry/python/functions") +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from metabase.validation import ( metabase_validate_card_payload, diff --git a/python/functions/ml/hf_snapshot_download.md b/python/functions/ml/hf_snapshot_download.md index cddba9f9..c56b5aed 100644 --- a/python/functions/ml/hf_snapshot_download.md +++ b/python/functions/ml/hf_snapshot_download.md @@ -52,7 +52,7 @@ path = hf_snapshot_download( ignore_patterns=["*.bin"], local_dir=".local/models/sd-v1-5", ) -# path = "/home/lucas/fn_registry/.local/models/sd-v1-5" +# path = "$HOME/fn_registry/.local/models/sd-v1-5" # Descargar un modelo gated (Llama) con token path = hf_snapshot_download( diff --git a/python/functions/notebook/jupyter_discover.md b/python/functions/notebook/jupyter_discover.md index aced8ee7..0f1d7766 100644 --- a/python/functions/notebook/jupyter_discover.md +++ b/python/functions/notebook/jupyter_discover.md @@ -32,14 +32,14 @@ file_path: "python/functions/notebook/jupyter_discover.py" from notebook.jupyter_discover import jupyter_discover # Descubrir con deteccion automatica de puertos -instances = jupyter_discover(registry_root="/home/lucas/fn_registry") +instances = jupyter_discover(registry_root="$HOME/fn_registry") # Escanear puertos especificos instances = jupyter_discover(ports=[8888, 8900]) for inst in instances: print(inst["url"], inst["analysis"], inst["root_dir"], inst["collaborative"]) -# http://localhost:8888 estudio_mercados /home/lucas/fn_registry/analysis/estudio_mercados True +# http://localhost:8888 estudio_mercados $HOME/fn_registry/analysis/estudio_mercados True ``` ## Estructura del dict retornado @@ -51,7 +51,7 @@ Cada elemento de la lista tiene la siguiente forma: "url": "http://localhost:8888", "port": 8888, "analysis": "estudio_mercados", # nombre del subdirectorio en analysis/, detectado via /proc - "root_dir": "/home/lucas/fn_registry/analysis/estudio_mercados", # path absoluto real del proceso + "root_dir": "$HOME/fn_registry/analysis/estudio_mercados", # path absoluto real del proceso "collaborative": True, # True si YDocExtension esta activo "kernels": [ { @@ -75,13 +75,13 @@ Cada elemento de la lista tiene la siguiente forma: ```bash # Descubrir con deteccion automatica -python python/functions/notebook/jupyter_discover.py --registry-root /home/lucas/fn_registry +python python/functions/notebook/jupyter_discover.py --registry-root $HOME/fn_registry # Puertos especificos, salida JSON python python/functions/notebook/jupyter_discover.py --port 8888 --port 8889 --json # Usando variable de entorno -FN_REGISTRY_ROOT=/home/lucas/fn_registry python python/functions/notebook/jupyter_discover.py +FN_REGISTRY_ROOT=$HOME/fn_registry python python/functions/notebook/jupyter_discover.py ``` Ejemplo de salida en modo texto con multi-instancia: @@ -90,7 +90,7 @@ Ejemplo de salida en modo texto con multi-instancia: Puerto 8888 [colaborativo] url: http://localhost:8888 analysis: estudio_mercados - root_dir: /home/lucas/fn_registry/analysis/estudio_mercados + root_dir: $HOME/fn_registry/analysis/estudio_mercados kernels (1): - python3 estado=idle id=abc12345... sesiones (1): @@ -99,7 +99,7 @@ Puerto 8888 [colaborativo] Puerto 8889 [estandar] url: http://localhost:8889 analysis: estudio_embeddings - root_dir: /home/lucas/fn_registry/analysis/estudio_embeddings + root_dir: $HOME/fn_registry/analysis/estudio_embeddings kernels: ninguno sesiones: ninguna ``` diff --git a/python/functions/notebook/tests/test_jupyter_exec.py b/python/functions/notebook/tests/test_jupyter_exec.py index dfc50bb6..c5754788 100644 --- a/python/functions/notebook/tests/test_jupyter_exec.py +++ b/python/functions/notebook/tests/test_jupyter_exec.py @@ -93,7 +93,7 @@ def test_extract_outputs_handles_streams_and_results(): # --------------------------------------------------------------------------- -JUPYTER_VENV_BIN = Path("/home/lucas/fn_registry/analysis/pruebas_jupyter/.venv/bin") +JUPYTER_VENV_BIN = Path(__file__).resolve().parents[4] / "analysis" / "pruebas_jupyter" / ".venv" / "bin" def _free_port() -> int: diff --git a/python/functions/notebook/tests/test_jupyter_run_cells.py b/python/functions/notebook/tests/test_jupyter_run_cells.py index fb00b349..782589f7 100644 --- a/python/functions/notebook/tests/test_jupyter_run_cells.py +++ b/python/functions/notebook/tests/test_jupyter_run_cells.py @@ -210,7 +210,7 @@ def test_run_cells_non_code_cell_raises(): # --------------------------------------------------------------------------- -JUPYTER_VENV_BIN = Path("/home/lucas/fn_registry/analysis/pruebas_jupyter/.venv/bin") +JUPYTER_VENV_BIN = Path(__file__).resolve().parents[4] / "analysis" / "pruebas_jupyter" / ".venv" / "bin" def _free_port() -> int: diff --git a/python/functions/pipelines/dedup_duckdb_table_by_hash.md b/python/functions/pipelines/dedup_duckdb_table_by_hash.md index ca9ee540..f368ed79 100644 --- a/python/functions/pipelines/dedup_duckdb_table_by_hash.md +++ b/python/functions/pipelines/dedup_duckdb_table_by_hash.md @@ -42,7 +42,7 @@ print(r) CLI directo: ```bash -/home/lucas/fn_registry/python/.venv/bin/python3 \ +$HOME/fn_registry/python/.venv/bin/python3 \ python/functions/pipelines/dedup_duckdb_table_by_hash.py \ apps/data_factory/data/hn_top_stories.duckdb hn_stories ``` diff --git a/python/functions/pipelines/metabase_add_ops_db.md b/python/functions/pipelines/metabase_add_ops_db.md index 173e0692..df86f7be 100644 --- a/python/functions/pipelines/metabase_add_ops_db.md +++ b/python/functions/pipelines/metabase_add_ops_db.md @@ -48,7 +48,7 @@ python python/functions/pipelines/metabase_add_ops_db.py --list El contenedor Metabase debe tener montado el directorio de la app como volumen RW: ``` --v /home/lucas/fn_registry/apps/:/data/ops- +-v $HOME/fn_registry/apps/:/data/ops- ``` Ademas, el directorio debe tener permisos para el usuario metabase (UID 2000): diff --git a/python/functions/pipelines/migrate_issues_frontmatter.md b/python/functions/pipelines/migrate_issues_frontmatter.md index b40b0e55..35ef89f5 100644 --- a/python/functions/pipelines/migrate_issues_frontmatter.md +++ b/python/functions/pipelines/migrate_issues_frontmatter.md @@ -82,7 +82,7 @@ notes: | ```bash # Siempre hacer dry-run primero para revisar -cd /home/lucas/fn_registry +cd $HOME/fn_registry python/.venv/bin/python3 python/functions/pipelines/migrate_issues_frontmatter.py dev/issues --dry-run # Aplicar migracion real diff --git a/types/infra/fs_event_go_infra.md b/types/infra/fs_event_go_infra.md index eb4c7efb..87502742 100644 --- a/types/infra/fs_event_go_infra.md +++ b/types/infra/fs_event_go_infra.md @@ -20,7 +20,7 @@ file_path: "functions/infra/fs_event_type.go" ```go // Recibido desde el canal de watch_dir_fsnotify_go_infra: ev := infra.FsEvent{ - Path: "/home/lucas/fn_registry/dev/issues/0130a-kanban-cpp-v2-parser.md", + Path: "$HOME/fn_registry/dev/issues/0130a-kanban-cpp-v2-parser.md", Op: "write", } ```