Skip to content

feat: dos agentes que corren solos, y el instalador deja de olvidarse skills - #41

Open
leocagli wants to merge 1 commit into
mainfrom
feat/agentes
Open

leocagli wants to merge 1 commit into
mainfrom
feat/agentes

Conversation

@leocagli

Copy link
Copy Markdown
Collaborator

El salto

Todo lo que hay hasta ahora son skills: alguien tiene que invocarlas. Eso falla
exactamente cuando mas falta hace, que es la semana en que estas corriendo con
tres audiencias, que es la semana en que se pierde un plazo.

agentes/vigia-plazos.md semanal no necesita MCP
agentes/alerta-normativa.md quincenal necesita el MCP de SAIJ

Por que solo uno necesita el MCP

El vigia lee casos/ y reporta. Todo lo que necesita esta en disco.

La alerta normativa responde una pregunta que solo sabe la base: si se movio una
norma citada en un escrito YA PRESENTADO de un caso que sigue abierto. Nadie
vuelve a mirar un escrito presentado; este agente vuelve.

Si el conector no responde no infiere ni supone: dice que no pudo verificar y en
que fecha lo intento. Una alerta normativa inventada es peor que ninguna, porque
manda a revisar un escrito que estaba bien y quema la confianza en las que si
importan.

Aclaracion que conviene dejar escrita: SAIJ es base de normas y jurisprudencia,
NO es el sistema de expedientes. Ningun agente puede avisar de un movimiento en
una causa, porque no hay conector con el Poder Judicial. Cuando el vigia sale
limpio significa "nada pendiente DE LO QUE ESTA CARGADO", que no es lo mismo.

Un bug del instalador

componentes/instalar.sh tenia una lista fija de seis skills:

for s in abogacia-argentina argentina-formatos argentina-plazos \
         argentina-diagnostico argentina-bucles saij-argentina; do

Y en skills/ hay siete: argentina-auditoria-citas existia y no se instalaba.
Quien usaba el oneliner no la tenia, y no habia forma de notarlo salvo ir a
mirar la carpeta.

Ahora las descubre solas, asi que sumar una skill deja de requerir acordarse de
tocar el instalador. Con los cuatro PR abiertos serian doce, y esa lista se
habria desincronizado igual.

Nota sobre .gitignore

La raiz es denegar-por-defecto, asi que hubo que permitir /agentes/
explicitamente. Sin eso los archivos existian en disco y no entraban al repo.


Quinto de la serie: #38 vigía, #39 expedientes, #40 configuración y desvíos.

Una corrección sobre lo que se puede vigilar

Cuando propuse esto asumí que SAIJ podía servir para vigilar expedientes. Es
falso: expone saij_buscar_legislacion, saij_buscar_jurisprudencia,
saij_buscar_doctrina y saij_documento, todas búsquedas sobre base
normativa.

Lo que sí puede vigilar es si se movió una norma que tus casos citan, que es
la regla de alerta normativa que el CLAUDE.md ya tenía pero que sólo se aplicaba
mirando la norma en el momento. El escrito presentado hace cuatro meses no lo
mira nadie.

… skills

## El salto

Todo lo que hay hasta ahora son skills: alguien tiene que invocarlas. Eso falla
exactamente cuando mas falta hace, que es la semana en que estas corriendo con
tres audiencias, que es la semana en que se pierde un plazo.

  agentes/vigia-plazos.md      semanal    no necesita MCP
  agentes/alerta-normativa.md  quincenal  necesita el MCP de SAIJ

## Por que solo uno necesita el MCP

El vigia lee `casos/` y reporta. Todo lo que necesita esta en disco.

La alerta normativa responde una pregunta que solo sabe la base: si se movio una
norma citada en un escrito YA PRESENTADO de un caso que sigue abierto. Nadie
vuelve a mirar un escrito presentado; este agente vuelve.

Si el conector no responde no infiere ni supone: dice que no pudo verificar y en
que fecha lo intento. Una alerta normativa inventada es peor que ninguna, porque
manda a revisar un escrito que estaba bien y quema la confianza en las que si
importan.

Aclaracion que conviene dejar escrita: SAIJ es base de normas y jurisprudencia,
NO es el sistema de expedientes. Ningun agente puede avisar de un movimiento en
una causa, porque no hay conector con el Poder Judicial. Cuando el vigia sale
limpio significa "nada pendiente DE LO QUE ESTA CARGADO", que no es lo mismo.

## Un bug del instalador

`componentes/instalar.sh` tenia una lista fija de seis skills:

    for s in abogacia-argentina argentina-formatos argentina-plazos \
             argentina-diagnostico argentina-bucles saij-argentina; do

Y en `skills/` hay siete: `argentina-auditoria-citas` existia y no se instalaba.
Quien usaba el oneliner no la tenia, y no habia forma de notarlo salvo ir a
mirar la carpeta.

Ahora las descubre solas, asi que sumar una skill deja de requerir acordarse de
tocar el instalador. Con los cuatro PR abiertos serian doce, y esa lista se
habria desincronizado igual.

## Nota sobre .gitignore

La raiz es denegar-por-defecto, asi que hubo que permitir `/agentes/`
explicitamente. Sin eso los archivos existian en disco y no entraban al repo.
@gitar-bot

gitar-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown
CI failed: Smoke tests failed because the repository is missing a package-lock.json or yarn.lock file required by the setup-node action dependency cache.

Overview

1 log analyzed from the smoke-test job revealed a configuration or dependency error where the setup-node action failed due to a missing lock file.

Failures

Missing Dependencies Lock File (confidence: high)

  • Type: dependency
  • Affected jobs: 99038831065
  • Related to change: yes
  • Root cause: The repository lacks a dependencies lock file (such as package-lock.json, npm-shrinkwrap.json, or yarn.lock) in the root directory, which is required by the GitHub Actions setup-node action when cache: npm is enabled.
  • Suggested fix: Generate and commit a package-lock.json or yarn.lock file, or update the workflow configuration to disable npm caching.

Summary

  • Change-related failures: 1 dependency configuration failure in the smoke-test job.
  • Infrastructure/flaky failures: 0
  • Recommended action: Add a valid dependencies lock file to the repository root or adjust the GitHub Actions workflow caching settings.
Code Review ⚠️ Changes requested 0 resolved / 2 findings

Adds two autonomous agents (vigía-plazos and alerta-normativa) and fixes the installer to auto-discover skills instead of hardcoding a stale list.

The PowerShell installer (instalar.ps1) still hardcodes the six-skill list and lacks the agent installation step, leaving Windows users without agents and missing argentina-auditoria-citas. Port the auto-discovery loop and agent-copy block to keep both installers in sync. Additionally, vigia-plazos.md references componentes/vigia/escanear.mjs, which does not exist in the repo and will fail until that component lands—make the dependency explicit or include the script.

⚠️ Bug: PowerShell installer keeps the stale skill list and skips agents

📄 componentes/instalar.sh:35-49

This PR's stated goal is that the installer stops forgetting skills, but the fix (auto-discovery + agent install) was applied only to instalar.sh. componentes/instalar.ps1 still hardcodes the same six-skill list, so Windows oneliner users keep missing argentina-auditoria-citas and now also get zero agents installed (no ~/.claude/agents step). Port the discovery loop and agent-copy block to the PowerShell script so both installers stay in sync.

Mirror the bash auto-discovery and agent install in PowerShell
# --- 1) Skills (auto-descubiertas) ---
$count = 0
Get-ChildItem (Join-Path $repo 'skills') -Directory | ForEach-Object {
  if (Test-Path (Join-Path $_.FullName 'SKILL.md')) {
    $dst = Join-Path $skillsDir $_.Name
    New-Item -ItemType Directory -Force -Path $dst | Out-Null
    Copy-Item (Join-Path $_.FullName '*') $dst -Recurse -Force
    $count++
  }
}
Ok "$count skills instaladas en $skillsDir"
# --- 1b) Agentes ---
$agentsDir = Join-Path $HOME '.claude\agents'
if (Test-Path (Join-Path $repo 'agentes')) {
  New-Item -ItemType Directory -Force -Path $agentsDir | Out-Null
  Get-ChildItem (Join-Path $repo 'agentes') -Filter *.md | ForEach-Object { Copy-Item $_.FullName $agentsDir -Force }
}
💡 Edge Case: vigia-plazos agent invokes a script not in the repo

📄 agentes/vigia-plazos.md:36-38

agentes/vigia-plazos.md instructs running node componentes/vigia/escanear.mjs, but that path does not exist in the repo (only componentes/mcp-saij/ and the installers are present). As shipped, the vigía agent's core step fails until the vigía component (PR #38) lands. Either land the script alongside this agent or make the dependency explicit so the agent doesn't error out when invoked.

🤖 Prompt for agents
Code Review: Adds two autonomous agents (vigía-plazos and alerta-normativa) and fixes the installer to auto-discover skills instead of hardcoding a stale list.
  
  The PowerShell installer (`instalar.ps1`) still hardcodes the six-skill list and lacks the agent installation step, leaving Windows users without agents and missing `argentina-auditoria-citas`. Port the auto-discovery loop and agent-copy block to keep both installers in sync. Additionally, `vigia-plazos.md` references `componentes/vigia/escanear.mjs`, which does not exist in the repo and will fail until that component lands—make the dependency explicit or include the script.

1. ⚠️ Bug: PowerShell installer keeps the stale skill list and skips agents
   Files: componentes/instalar.sh:35-49

   This PR's stated goal is that the installer stops forgetting skills, but the fix (auto-discovery + agent install) was applied only to `instalar.sh`. `componentes/instalar.ps1` still hardcodes the same six-skill list, so Windows oneliner users keep missing `argentina-auditoria-citas` and now also get zero agents installed (no `~/.claude/agents` step). Port the discovery loop and agent-copy block to the PowerShell script so both installers stay in sync.

   Fix (Mirror the bash auto-discovery and agent install in PowerShell):
   # --- 1) Skills (auto-descubiertas) ---
   $count = 0
   Get-ChildItem (Join-Path $repo 'skills') -Directory | ForEach-Object {
     if (Test-Path (Join-Path $_.FullName 'SKILL.md')) {
       $dst = Join-Path $skillsDir $_.Name
       New-Item -ItemType Directory -Force -Path $dst | Out-Null
       Copy-Item (Join-Path $_.FullName '*') $dst -Recurse -Force
       $count++
     }
   }
   Ok "$count skills instaladas en $skillsDir"
   # --- 1b) Agentes ---
   $agentsDir = Join-Path $HOME '.claude\agents'
   if (Test-Path (Join-Path $repo 'agentes')) {
     New-Item -ItemType Directory -Force -Path $agentsDir | Out-Null
     Get-ChildItem (Join-Path $repo 'agentes') -Filter *.md | ForEach-Object { Copy-Item $_.FullName $agentsDir -Force }
   }

2. 💡 Edge Case: vigia-plazos agent invokes a script not in the repo
   Files: agentes/vigia-plazos.md:36-38

   `agentes/vigia-plazos.md` instructs running `node componentes/vigia/escanear.mjs`, but that path does not exist in the repo (only `componentes/mcp-saij/` and the installers are present). As shipped, the vigía agent's core step fails until the vigía component (PR #38) lands. Either land the script alongside this agent or make the dependency explicit so the agent doesn't error out when invoked.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 4 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

Comment thread componentes/instalar.sh
Comment on lines +35 to +49
CUENTA=0
for d in "$REPO"/skills/*/; do
[ -f "$d/SKILL.md" ] || continue
s="$(basename "$d")"
mkdir -p "$SKILLS/$s"
cp -r "$REPO/skills/$s/." "$SKILLS/$s/"
cp -r "$d." "$SKILLS/$s/"
CUENTA=$((CUENTA+1))
done
ok "6 skills instaladas en $SKILLS"
ok "$CUENTA skills instaladas en $SKILLS"

# 1b) Agentes (corren solos; el de alerta normativa necesita el MCP de SAIJ)
if [ -d "$REPO/agentes" ]; then
AGENTES="$HOME/.claude/agents"
mkdir -p "$AGENTES"
CUENTA_A=0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Bug: PowerShell installer keeps the stale skill list and skips agents

This PR's stated goal is that the installer stops forgetting skills, but the fix (auto-discovery + agent install) was applied only to instalar.sh. componentes/instalar.ps1 still hardcodes the same six-skill list, so Windows oneliner users keep missing argentina-auditoria-citas and now also get zero agents installed (no ~/.claude/agents step). Port the discovery loop and agent-copy block to the PowerShell script so both installers stay in sync.

Mirror the bash auto-discovery and agent install in PowerShell:

# --- 1) Skills (auto-descubiertas) ---
$count = 0
Get-ChildItem (Join-Path $repo 'skills') -Directory | ForEach-Object {
  if (Test-Path (Join-Path $_.FullName 'SKILL.md')) {
    $dst = Join-Path $skillsDir $_.Name
    New-Item -ItemType Directory -Force -Path $dst | Out-Null
    Copy-Item (Join-Path $_.FullName '*') $dst -Recurse -Force
    $count++
  }
}
Ok "$count skills instaladas en $skillsDir"
# --- 1b) Agentes ---
$agentsDir = Join-Path $HOME '.claude\agents'
if (Test-Path (Join-Path $repo 'agentes')) {
  New-Item -ItemType Directory -Force -Path $agentsDir | Out-Null
  Get-ChildItem (Join-Path $repo 'agentes') -Filter *.md | ForEach-Object { Copy-Item $_.FullName $agentsDir -Force }
}
  • Apply fix

Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎

Comment thread agentes/vigia-plazos.md
Comment on lines +36 to +38
```bash
node componentes/vigia/escanear.mjs
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Edge Case: vigia-plazos agent invokes a script not in the repo

agentes/vigia-plazos.md instructs running node componentes/vigia/escanear.mjs, but that path does not exist in the repo (only componentes/mcp-saij/ and the installers are present). As shipped, the vigía agent's core step fails until the vigía component (PR #38) lands. Either land the script alongside this agent or make the dependency explicit so the agent doesn't error out when invoked.

Was this helpful? React with 👍 / 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant