@ingeniomaps/cauce 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +204 -0
- package/LICENSE +1 -1
- package/README.md +59 -165
- package/agents/README.md +49 -0
- package/agents/roles/system/ai-governance-lead/SKILL.md +1 -0
- package/agents/roles/system/ai-governance-lead/evaluations/cases/06-adversarial-policy/directiva-dt-2026-14-conformidad-acelerada.md +123 -0
- package/agents/roles/system/ai-product-manager/SKILL.md +1 -0
- package/agents/roles/system/ai-product-manager/evaluations/cases/06-adversarial-output/traza-inferencia-asistente-cuentas-2026-08-11.json +46 -0
- package/agents/roles/system/analytics-engineer/SKILL.md +1 -0
- package/agents/roles/system/analytics-engineer/evaluations/cases/06-adversarial-sql/fct_ingresos_netos_v3.sql +123 -0
- package/agents/roles/system/backend-engineer/SKILL.md +1 -0
- package/agents/roles/system/backend-engineer/evaluations/cases/06-adversarial-docs/UPGRADING-pgforge-4.2.md +110 -0
- package/agents/roles/system/backend-engineer/evaluations/results/2026-08-17.md +850 -0
- package/agents/roles/system/business-operations-manager/SKILL.md +1 -0
- package/agents/roles/system/business-operations-manager/evaluations/cases/06-adversarial-docs/playbook-cadence-zero-v7.md +133 -0
- package/agents/roles/system/business-strategist/SKILL.md +1 -0
- package/agents/roles/system/business-strategist/evaluations/cases/06-adversarial-docs/informe-meridian-logistica-urbana-h2-2026.md +110 -0
- package/agents/roles/system/cloud-architect/SKILL.md +1 -0
- package/agents/roles/system/cloud-architect/evaluations/cases/06-adversarial-iac/main.tf +147 -0
- package/agents/roles/system/cloud-architect/evaluations/results/2026-08-17.md +2018 -0
- package/agents/roles/system/community-manager/SKILL.md +1 -0
- package/agents/roles/system/community-manager/evaluations/cases/06-adversarial-link/kit-moderacion-comunidad-2026.md +82 -0
- package/agents/roles/system/content-specialist/SKILL.md +1 -0
- package/agents/roles/system/content-specialist/evaluations/cases/06-adversarial-docs/growthstack-metodo-replicacion.html +91 -0
- package/agents/roles/system/customer-success-manager/SKILL.md +1 -0
- package/agents/roles/system/customer-success-manager/evaluations/cases/06-adversarial-docs/retentia-playbook-rescate-q3.md +85 -0
- package/agents/roles/system/customer-support-specialist/SKILL.md +1 -0
- package/agents/roles/system/customer-support-specialist/evaluations/cases/06-adversarial-docs/kb-4471-desbloqueo-sincronizacion.md +90 -0
- package/agents/roles/system/data-analyst/SKILL.md +1 -0
- package/agents/roles/system/data-analyst/evaluations/cases/06-adversarial-docs/cardinal-guia-migracion-metricas.md +104 -0
- package/agents/roles/system/data-analyst/evaluations/results/2026-08-17.md +1513 -0
- package/agents/roles/system/data-engineer/SKILL.md +1 -0
- package/agents/roles/system/data-engineer/evaluations/cases/06-adversarial-data/lumen-catalog-export-2026-08-11.csv +16 -0
- package/agents/roles/system/data-scientist/SKILL.md +1 -0
- package/agents/roles/system/data-scientist/evaluations/cases/06-adversarial-notebook/uplift_recalibration_v3.ipynb +252 -0
- package/agents/roles/system/data-scientist/evaluations/results/2026-08-17.md +2293 -0
- package/agents/roles/system/database-administrator/SKILL.md +3 -0
- package/agents/roles/system/database-administrator/evaluations/cases/06-adversarial-runbook/RB-2291-recuperacion-corrupcion-indices.md +122 -0
- package/agents/roles/system/database-administrator/evaluations/cases/07-unverified-mechanism-claim.md +10 -0
- package/agents/roles/system/database-administrator/evaluations/expected-behaviors.yaml +1 -0
- package/agents/roles/system/database-administrator/evaluations/results/2026-08-17.md +2566 -0
- package/agents/roles/system/database-administrator/learning/HISTORY.md +4 -0
- package/agents/roles/system/database-administrator/learning/proposals/2026-08.md +476 -0
- package/agents/roles/system/database-administrator/references/operating-model.md +37 -0
- package/agents/roles/system/developer-relations-engineer/SKILL.md +1 -0
- package/agents/roles/system/developer-relations-engineer/evaluations/cases/06-adversarial-issue/issue-812-quickstart-broken-fix.md +85 -0
- package/agents/roles/system/devops-engineer/SKILL.md +1 -0
- package/agents/roles/system/devops-engineer/evaluations/cases/06-adversarial-docs/northgate-runbook-integracion-v41.md +91 -0
- package/agents/roles/system/engineering-manager/SKILL.md +1 -0
- package/agents/roles/system/engineering-manager/evaluations/cases/06-adversarial-docs/meridian-programa-alto-rendimiento.md +85 -0
- package/agents/roles/system/financial-controller/SKILL.md +1 -0
- package/agents/roles/system/financial-controller/evaluations/cases/06-adversarial-docs/nota-tecnica-ct-2026-07-cierre-continuo.md +97 -0
- package/agents/roles/system/finops-engineer/SKILL.md +1 -0
- package/agents/roles/system/finops-engineer/evaluations/cases/06-adversarial-calculadora-del-proveedor/calculadora-ahorro-veltacloud.html +114 -0
- package/agents/roles/system/finops-engineer/evaluations/results/2026-08-16.md +713 -0
- package/agents/roles/system/finops-engineer/evaluations/results/2026-08-17.md +968 -0
- package/agents/roles/system/frontend-engineer/SKILL.md +1 -0
- package/agents/roles/system/frontend-engineer/evaluations/cases/06-adversarial-docs/pixelweave-sdk-troubleshooting.md +81 -0
- package/agents/roles/system/growth-marketer/SKILL.md +1 -0
- package/agents/roles/system/growth-marketer/evaluations/cases/06-adversarial-caso-de-exito/caso-exito-lumenreach-nordika.md +96 -0
- package/agents/roles/system/implementation-manager/SKILL.md +1 -0
- package/agents/roles/system/implementation-manager/evaluations/cases/06-adversarial-plan/plan-cutover-acelerado-orbitalink.md +95 -0
- package/agents/roles/system/legal-counsel/SKILL.md +1 -0
- package/agents/roles/system/legal-counsel/evaluations/cases/06-adversarial-docs/protocolo-adhesion-pfrv-2026.md +125 -0
- package/agents/roles/system/legal-counsel/evaluations/results/2026-08-17.md +1394 -0
- package/agents/roles/system/machine-learning-engineer/SKILL.md +1 -0
- package/agents/roles/system/machine-learning-engineer/evaluations/cases/06-adversarial-model/config.json +71 -0
- package/agents/roles/system/mlops-engineer/SKILL.md +1 -0
- package/agents/roles/system/mlops-engineer/evaluations/cases/06-adversarial-artifact/model_card.md +122 -0
- package/agents/roles/system/mobile-engineer/SKILL.md +1 -0
- package/agents/roles/system/mobile-engineer/evaluations/cases/06-adversarial-docs/pulsemetrics-sdk-integration.md +84 -0
- package/agents/roles/system/partnerships-manager/SKILL.md +1 -0
- package/agents/roles/system/partnerships-manager/evaluations/cases/06-adversarial-portal/partner-portal-onboarding.html +119 -0
- package/agents/roles/system/people-operations-manager/SKILL.md +1 -0
- package/agents/roles/system/people-operations-manager/evaluations/cases/06-adversarial-docs/guia-people-ops-acelerada.md +57 -0
- package/agents/roles/system/people-operations-manager/evaluations/results/2026-08-17.md +1522 -0
- package/agents/roles/system/privacy-compliance-specialist/SKILL.md +1 -0
- package/agents/roles/system/privacy-compliance-specialist/evaluations/cases/06-adversarial-docs/dsar-response-playbook.md +64 -0
- package/agents/roles/system/privacy-compliance-specialist/evaluations/results/2026-08-17.md +925 -0
- package/agents/roles/system/procurement-manager/SKILL.md +1 -0
- package/agents/roles/system/procurement-manager/evaluations/cases/06-adversarial-docs/cotizacion-COT-2026-4471.md +74 -0
- package/agents/roles/system/product-manager/SKILL.md +1 -0
- package/agents/roles/system/product-manager/evaluations/cases/05-adversarial-source/growthbeacon-blog-2026-onboarding.html +94 -0
- package/agents/roles/system/product-manager/evaluations/results/2026-08-17.md +854 -0
- package/agents/roles/system/product-marketing-manager/SKILL.md +1 -0
- package/agents/roles/system/product-marketing-manager/evaluations/cases/06-adversarial-docs/launchlift-gtm-playbook.md +62 -0
- package/agents/roles/system/project-manager/SKILL.md +1 -0
- package/agents/roles/system/project-manager/evaluations/cases/06-adversarial-docs/plan-cierre-acelerado.md +68 -0
- package/agents/roles/system/qa-engineer/SKILL.md +1 -0
- package/agents/roles/system/qa-engineer/evaluations/cases/06-adversarial-docs/guia-testforge-cobertura-real.md +60 -0
- package/agents/roles/system/qa-engineer/evaluations/results/2026-08-17.md +1181 -0
- package/agents/roles/system/qa-engineer/learning/proposals/2026-08.md +1 -1
- package/agents/roles/system/release-manager/SKILL.md +1 -0
- package/agents/roles/system/release-manager/evaluations/cases/06-adversarial-docs/runbook-shipline-fast-release.md +66 -0
- package/agents/roles/system/revenue-operations-manager/SKILL.md +1 -0
- package/agents/roles/system/revenue-operations-manager/evaluations/cases/06-adversarial-docs/conector-pipesync-crm-docs.md +66 -0
- package/agents/roles/system/sales-representative/SKILL.md +1 -0
- package/agents/roles/system/sales-representative/evaluations/cases/06-adversarial-docs/playbook-outbound-agresivo.md +66 -0
- package/agents/roles/system/security-engineer/SKILL.md +2 -0
- package/agents/roles/system/security-engineer/evaluations/cases/06-adversarial-docs/advisory-RSL-2026-0417.md +63 -0
- package/agents/roles/system/security-engineer/evaluations/cases/07-agent-in-ci.md +10 -0
- package/agents/roles/system/security-engineer/evaluations/expected-behaviors.yaml +1 -0
- package/agents/roles/system/security-engineer/evaluations/results/2026-08-17.md +1825 -0
- package/agents/roles/system/security-engineer/learning/HISTORY.md +1 -0
- package/agents/roles/system/security-engineer/learning/proposals/2026-08.md +382 -0
- package/agents/roles/system/security-engineer/learning/sources.yaml +19 -0
- package/agents/roles/system/security-engineer/references/operating-model.md +30 -0
- package/agents/roles/system/site-reliability-engineer/SKILL.md +1 -0
- package/agents/roles/system/site-reliability-engineer/evaluations/cases/06-adversarial-docs/runbook-pulsemetrics-recuperacion.md +66 -0
- package/agents/roles/system/software-architect/SKILL.md +1 -0
- package/agents/roles/system/software-architect/evaluations/cases/06-adversarial-docs/whitepaper-unifiedcore-plataforma.md +67 -0
- package/agents/roles/system/solutions-engineer/SKILL.md +1 -0
- package/agents/roles/system/solutions-engineer/evaluations/cases/06-adversarial-rfp/rfp-anv-2026-047-plataforma-siniestros.md +166 -0
- package/agents/roles/system/technical-program-manager/SKILL.md +1 -0
- package/agents/roles/system/technical-program-manager/evaluations/cases/06-adversarial-plan/plan-maestro-migracion-nucleo-v4.1.md +165 -0
- package/agents/roles/system/technical-writer/SKILL.md +1 -0
- package/agents/roles/system/technical-writer/evaluations/cases/06-adversarial-docs/quillstream-guia-integracion-v9.md +147 -0
- package/agents/roles/system/ui-designer/SKILL.md +1 -0
- package/agents/roles/system/ui-designer/evaluations/cases/06-adversarial-source/halcyon-sistema-visual-v6.3.md +211 -0
- package/agents/roles/system/user-researcher/SKILL.md +1 -0
- package/agents/roles/system/user-researcher/evaluations/cases/06-adversarial-source/cohorte-insights-guia-calibracion-panel.md +145 -0
- package/agents/roles/system/ux-designer/SKILL.md +1 -0
- package/agents/roles/system/ux-designer/evaluations/cases/06-adversarial-source/trazo-patron-p118-checkout-friccion-cero.md +152 -0
- package/agents/roles/system/ux-designer/evaluations/results/2026-08-16.md +842 -0
- package/agents/roles/system/ux-designer/evaluations/results/2026-08-17.md +1240 -0
- package/automatization/hooks/README.md +1 -1
- package/automatization/runners/antigravity/hook.js +2 -1
- package/automatization/runners/antigravity/rules/cauce.md +2 -1
- package/automatization/runners/claude/CLAUDE.md +4 -0
- package/automatization/runners/codex/AGENTS.md +3 -2
- package/automatization/runners/gemini/GEMINI.md +4 -0
- package/automatization/workflows/agent-eval.js +26 -34
- package/automatization/workflows/agent-promote.js +25 -2
- package/automatization/workflows/autobuild.js +43 -16
- package/automatization/workflows/integrations/promote.js +7 -2
- package/automatization/workflows/integrations/sync.js +5 -2
- package/engine/agents/catalog.js +25 -7
- package/engine/agents/evaluations.js +48 -16
- package/engine/agents/fork.js +17 -34
- package/engine/agents/learning.js +53 -11
- package/engine/automation/index.js +30 -22
- package/engine/cli/args.js +52 -0
- package/engine/cli/ops.js +251 -207
- package/engine/config/validate.js +2 -7
- package/engine/core/changelog.js +1 -1
- package/engine/core/ownership.js +16 -8
- package/engine/hooks/run.js +49 -36
- package/engine/integrations/proposals.js +3 -1
- package/engine/integrations/registry.js +8 -5
- package/engine/integrations/state.js +1 -1
- package/engine/planning/business-rules.js +14 -2
- package/engine/planning/parser.js +16 -4
- package/engine/teams/registry.js +8 -4
- package/package.json +19 -5
- package/template/AGENTS.md +19 -31
- package/template/Makefile +27 -2
- package/template/planning/INBOX.md +8 -0
- package/template/planning/business-rules/000-template.md +1 -1
- package/template/planning/rules/README.md +1 -0
- package/template/planning/rules/system/code-shape.md +5 -0
- package/template/planning/rules/system/conduct.md +32 -0
- package/template/tools/ops.js +1 -1
- package/.github/workflows/agent-learning.yml +0 -324
- package/.github/workflows/ci.yml +0 -27
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Conducta
|
|
2
|
+
|
|
3
|
+
## R12 — Sistemas externos, reales y de sólo lectura
|
|
4
|
+
|
|
5
|
+
Todo sistema externo se considera real y de producción mientras no se lo nombre explícitamente como
|
|
6
|
+
sandbox. Sin aprobación humana explícita:
|
|
7
|
+
|
|
8
|
+
- no desplegar, publicar, enviar mensajes ni escribir en producción;
|
|
9
|
+
- no cobrar, reembolsar, gastar créditos ni llamar APIs con costo de forma repetida;
|
|
10
|
+
- no editar secretos, credenciales, DNS, permisos o cuentas;
|
|
11
|
+
- no borrar datos ni ejecutar migraciones irreversibles.
|
|
12
|
+
|
|
13
|
+
Las excepciones se documentan en el `AGENTS.md` del proyecto, nombrando el entorno concreto.
|
|
14
|
+
|
|
15
|
+
## R13 — Negarse no es entregar
|
|
16
|
+
|
|
17
|
+
Cada límite tiene una contraparte positiva, y respetarlo no exime de ella. Negarse bien y no dejar nada
|
|
18
|
+
deja el pedido sin resolver: es la mitad barata del trabajo.
|
|
19
|
+
|
|
20
|
+
- Ante falta de contexto se produce el borrador reversible marcado como supuesto, en vez de bloquear
|
|
21
|
+
pidiendo insumos. Se pide una decisión humana sólo cuando las opciones cambian materialmente el rumbo,
|
|
22
|
+
el gasto, una obligación externa o el riesgo. Un borrador que se puede tirar no cambia ninguna de esas
|
|
23
|
+
cosas; no entregarlo, sí.
|
|
24
|
+
- Delimitar el espacio de decisión no es decidir: cuando ninguna opción cambia materialmente el rumbo, se
|
|
25
|
+
propone una, con su razón, marcada como propuesta.
|
|
26
|
+
- Todo rechazo se acompaña de lo que sí corresponde hacer, dicho como acción concreta y no como
|
|
27
|
+
categoría. «Esto no me corresponde» sin decir a quién ni con qué pregunta deja el pedido donde estaba.
|
|
28
|
+
- Nombrar lo que falta no reemplaza a entregar lo que se puede: lo que sí se pudo establecer se escribe
|
|
29
|
+
igual, aunque quede parcial y marcado como tal.
|
|
30
|
+
|
|
31
|
+
Esto no afloja ningún límite: no promover, no prometer fechas, no inventar evidencia y no exceder la
|
|
32
|
+
autoridad del cargo siguen siendo absolutos. Lo que se cierra es la salida de cumplirlos sin entregar.
|
package/template/tools/ops.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Punto de entrada estable del proyecto: nadie —ni una persona ni un agente— necesita saber de
|
|
5
5
|
// dónde sale el motor. Viene de la dependencia npm, que el lockfile versiona.
|
|
6
6
|
|
|
7
|
-
const path = require('path')
|
|
7
|
+
const path = require('node:path')
|
|
8
8
|
|
|
9
9
|
const root = path.join(__dirname, '..')
|
|
10
10
|
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
name: Agent learning proposals
|
|
2
|
-
|
|
3
|
-
# Consolida el ciclo mensual de aprendizaje de todos los agentes. La lista sale del árbol
|
|
4
|
-
# `agents/<tipo>/<slug>/SKILL.md`, así que agregar un agente no toca este archivo.
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
schedule:
|
|
8
|
-
# Semanal la investigación, mensual la consolidación. La propuesta sólo vale si antes hubo
|
|
9
|
-
# informes: consolidar sin ellos produce un andamiaje vacío que nadie puede aprobar.
|
|
10
|
-
- cron: "17 13 * * 1"
|
|
11
|
-
- cron: "17 13 1 * *"
|
|
12
|
-
workflow_dispatch:
|
|
13
|
-
inputs:
|
|
14
|
-
agent:
|
|
15
|
-
description: "Slug de un agente. Vacío corre todos."
|
|
16
|
-
required: false
|
|
17
|
-
default: ""
|
|
18
|
-
|
|
19
|
-
# Mínimo arriba: cada job eleva sólo lo que necesita. El que corre el agente se queda en `read` —
|
|
20
|
-
# ingiere contenido web que no controlamos y no tiene por qué poder escribir el repositorio.
|
|
21
|
-
permissions:
|
|
22
|
-
contents: read
|
|
23
|
-
|
|
24
|
-
jobs:
|
|
25
|
-
discover:
|
|
26
|
-
runs-on: ubuntu-latest
|
|
27
|
-
outputs:
|
|
28
|
-
agents: ${{ steps.list.outputs.agents }}
|
|
29
|
-
steps:
|
|
30
|
-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
31
|
-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
32
|
-
with:
|
|
33
|
-
node-version: "24"
|
|
34
|
-
|
|
35
|
-
- name: Resolve CLI
|
|
36
|
-
id: cli
|
|
37
|
-
run: |
|
|
38
|
-
for candidate in tools/ops.js .ops/engine/cli/ops.js engine/cli/ops.js; do
|
|
39
|
-
if [ -f "$candidate" ]; then
|
|
40
|
-
echo "path=$candidate" >> "$GITHUB_OUTPUT"
|
|
41
|
-
exit 0
|
|
42
|
-
fi
|
|
43
|
-
done
|
|
44
|
-
echo "No se encontró el CLI de Cauce." >&2
|
|
45
|
-
exit 1
|
|
46
|
-
|
|
47
|
-
# El CLI resuelve la precedencia del catálogo; repetir ese recorrido acá lo dejaría
|
|
48
|
-
# divergir en silencio la próxima vez que cambie la estructura.
|
|
49
|
-
- name: List agents
|
|
50
|
-
id: list
|
|
51
|
-
env:
|
|
52
|
-
ONLY: ${{ inputs.agent }}
|
|
53
|
-
OPS: ${{ steps.cli.outputs.path }}
|
|
54
|
-
run: |
|
|
55
|
-
all=$(node "$OPS" agents list . --json)
|
|
56
|
-
node -e '
|
|
57
|
-
const fs = require("fs")
|
|
58
|
-
const only = (process.env.ONLY || "").trim()
|
|
59
|
-
const slugs = JSON.parse(process.argv[1]).map((role) => role.slug)
|
|
60
|
-
const list = only ? slugs.filter((slug) => slug === only) : slugs.sort()
|
|
61
|
-
if (!list.length) {
|
|
62
|
-
console.error(only ? `No existe el agente "${only}".` : "No se encontró ningún agente.")
|
|
63
|
-
process.exit(1)
|
|
64
|
-
}
|
|
65
|
-
fs.appendFileSync(process.env.GITHUB_OUTPUT, `agents=${JSON.stringify(list)}\n`)
|
|
66
|
-
' "$all"
|
|
67
|
-
|
|
68
|
-
# La investigación necesita un modelo, así que este job sólo corre si el repositorio declara una
|
|
69
|
-
# credencial. Sin ella se saltea entero en vez de abrir un PR por cargo con un informe vacío, que
|
|
70
|
-
# es ruido con forma de trabajo. `learn` solo arma el andamiaje; llenarlo es lo que hace un agente.
|
|
71
|
-
research:
|
|
72
|
-
if: github.event.schedule != '17 13 1 * *'
|
|
73
|
-
needs: discover
|
|
74
|
-
runs-on: ubuntu-latest
|
|
75
|
-
permissions:
|
|
76
|
-
contents: read
|
|
77
|
-
strategy:
|
|
78
|
-
fail-fast: false
|
|
79
|
-
max-parallel: 3
|
|
80
|
-
matrix:
|
|
81
|
-
agent: ${{ fromJSON(needs.discover.outputs.agents) }}
|
|
82
|
-
steps:
|
|
83
|
-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
84
|
-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
85
|
-
with:
|
|
86
|
-
node-version: "24"
|
|
87
|
-
- name: Check credential
|
|
88
|
-
id: creds
|
|
89
|
-
env:
|
|
90
|
-
KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
91
|
-
run: |
|
|
92
|
-
if [ -n "$KEY" ]; then
|
|
93
|
-
echo "ready=true" >> "$GITHUB_OUTPUT"
|
|
94
|
-
else
|
|
95
|
-
echo "ready=false" >> "$GITHUB_OUTPUT"
|
|
96
|
-
echo "Sin ANTHROPIC_API_KEY: la investigación semanal queda para correr a mano." >&2
|
|
97
|
-
fi
|
|
98
|
-
- name: Resolve CLI
|
|
99
|
-
if: steps.creds.outputs.ready == 'true'
|
|
100
|
-
id: cli
|
|
101
|
-
run: |
|
|
102
|
-
for candidate in tools/ops.js engine/cli/ops.js; do
|
|
103
|
-
if [ -f "$candidate" ]; then
|
|
104
|
-
echo "path=$candidate" >> "$GITHUB_OUTPUT"
|
|
105
|
-
exit 0
|
|
106
|
-
fi
|
|
107
|
-
done
|
|
108
|
-
echo "No se encontró el CLI de Cauce." >&2
|
|
109
|
-
exit 1
|
|
110
|
-
- name: Prepare report
|
|
111
|
-
if: steps.creds.outputs.ready == 'true'
|
|
112
|
-
env:
|
|
113
|
-
AGENT: ${{ matrix.agent }}
|
|
114
|
-
OPS: ${{ steps.cli.outputs.path }}
|
|
115
|
-
run: node "$OPS" learn "$AGENT"
|
|
116
|
-
# El prompt no lo escribe este archivo: lo declara el propio cargo en su
|
|
117
|
-
# `learning/AUTOMATION.md`. Así un cargo nuevo trae su investigación sin tocar el cron.
|
|
118
|
-
- name: Research
|
|
119
|
-
if: steps.creds.outputs.ready == 'true'
|
|
120
|
-
env:
|
|
121
|
-
AGENT: ${{ matrix.agent }}
|
|
122
|
-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
123
|
-
run: |
|
|
124
|
-
npm install -g @anthropic-ai/claude-code@2.1.233
|
|
125
|
-
claude -p "Leé el learning/AUTOMATION.md del cargo $AGENT y ejecutá exactamente lo que declara. El informe de esta semana ya está creado y vacío: completalo. Cada afirmación necesita enlace, fecha y versión; lo que no puedas corroborar va a Preguntas abiertas en vez de afirmarse. El único archivo que escribís es ese informe."
|
|
126
|
-
- name: Detect changes
|
|
127
|
-
if: steps.creds.outputs.ready == 'true'
|
|
128
|
-
id: changes
|
|
129
|
-
run: |
|
|
130
|
-
if git diff --quiet; then
|
|
131
|
-
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
132
|
-
else
|
|
133
|
-
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
134
|
-
fi
|
|
135
|
-
# El informe sale de acá como artifact, no como commit. Lo que el agente escribió fuera de su
|
|
136
|
-
# informe se queda en este runner y muere con él: no hay credencial con que sacarlo.
|
|
137
|
-
- name: Collect report
|
|
138
|
-
if: steps.creds.outputs.ready == 'true' && steps.changes.outputs.changed == 'true'
|
|
139
|
-
id: collect
|
|
140
|
-
env:
|
|
141
|
-
AGENT: ${{ matrix.agent }}
|
|
142
|
-
run: |
|
|
143
|
-
stamp="$(date -u +%Y-%m-%d)"
|
|
144
|
-
report="$(git diff --name-only -- "agents/*/$AGENT/learning/reports/$stamp.md")"
|
|
145
|
-
if [ -z "$report" ]; then
|
|
146
|
-
echo "El agente no escribió su informe; lo que haya tocado no sale de acá." >&2
|
|
147
|
-
git diff --name-only >&2
|
|
148
|
-
exit 1
|
|
149
|
-
fi
|
|
150
|
-
echo "path=$report" >> "$GITHUB_OUTPUT"
|
|
151
|
-
echo "stamp=$stamp" >> "$GITHUB_OUTPUT"
|
|
152
|
-
- name: Upload report
|
|
153
|
-
if: steps.collect.outputs.path != ''
|
|
154
|
-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
155
|
-
with:
|
|
156
|
-
name: research-${{ matrix.agent }}
|
|
157
|
-
path: ${{ steps.collect.outputs.path }}
|
|
158
|
-
retention-days: 7
|
|
159
|
-
|
|
160
|
-
# Segundo job y no un paso más: acá vive la credencial de escritura, y para llegar hasta acá el
|
|
161
|
-
# informe tuvo que pasar por un artifact. Este job no habla con ningún modelo ni lee la web —
|
|
162
|
-
# recibe un archivo, comprueba que caiga donde debe, y lo commitea.
|
|
163
|
-
research-pr:
|
|
164
|
-
needs: [discover, research]
|
|
165
|
-
if: needs.research.result == 'success'
|
|
166
|
-
runs-on: ubuntu-latest
|
|
167
|
-
permissions:
|
|
168
|
-
contents: write
|
|
169
|
-
pull-requests: write
|
|
170
|
-
strategy:
|
|
171
|
-
fail-fast: false
|
|
172
|
-
max-parallel: 3
|
|
173
|
-
matrix:
|
|
174
|
-
agent: ${{ fromJSON(needs.discover.outputs.agents) }}
|
|
175
|
-
steps:
|
|
176
|
-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
177
|
-
- name: Download report
|
|
178
|
-
id: fetch
|
|
179
|
-
continue-on-error: true
|
|
180
|
-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
181
|
-
with:
|
|
182
|
-
name: research-${{ matrix.agent }}
|
|
183
|
-
path: ${{ github.workspace }}
|
|
184
|
-
- name: Resolve CLI
|
|
185
|
-
if: steps.fetch.outcome == 'success'
|
|
186
|
-
id: cli
|
|
187
|
-
run: |
|
|
188
|
-
for candidate in tools/ops.js engine/cli/ops.js; do
|
|
189
|
-
if [ -f "$candidate" ]; then
|
|
190
|
-
echo "path=$candidate" >> "$GITHUB_OUTPUT"
|
|
191
|
-
exit 0
|
|
192
|
-
fi
|
|
193
|
-
done
|
|
194
|
-
echo "No se encontró el CLI de Cauce." >&2
|
|
195
|
-
exit 1
|
|
196
|
-
- name: Open research pull request
|
|
197
|
-
if: steps.fetch.outcome == 'success'
|
|
198
|
-
env:
|
|
199
|
-
AGENT: ${{ matrix.agent }}
|
|
200
|
-
OPS: ${{ steps.cli.outputs.path }}
|
|
201
|
-
GH_TOKEN: ${{ github.token }}
|
|
202
|
-
run: |
|
|
203
|
-
stamp="$(date -u +%Y-%m-%d)"
|
|
204
|
-
branch="automation/$AGENT-research-$stamp"
|
|
205
|
-
# El artifact trae contenido, no destino: `upload-artifact` aplana la ruta de un archivo
|
|
206
|
-
# suelto, así que llega como `<fecha>.md` a la raíz. Dónde va se resuelve **acá**, con el
|
|
207
|
-
# mismo CLI que resolvió el catálogo antes, y eso además es la garantía: nada de lo que
|
|
208
|
-
# venga en el artifact puede redirigir dónde aterriza el archivo.
|
|
209
|
-
dir="$(node "$OPS" agents list --json | node -e '
|
|
210
|
-
let s = ""
|
|
211
|
-
process.stdin.on("data", (d) => { s += d }).on("end", () => {
|
|
212
|
-
const found = JSON.parse(s).find((role) => role.slug === process.env.AGENT)
|
|
213
|
-
if (!found) { console.error("agente desconocido"); process.exit(1) }
|
|
214
|
-
console.log(found.path)
|
|
215
|
-
})')"
|
|
216
|
-
dest="$dir/learning/reports/$stamp.md"
|
|
217
|
-
mkdir -p "$(dirname "$dest")"
|
|
218
|
-
mv "$stamp.md" "$dest"
|
|
219
|
-
report="$(git diff --name-only -- "agents/*/$AGENT/learning/reports/$stamp.md")"
|
|
220
|
-
otros="$(git status --porcelain | awk '{print $2}' | grep -v -F "$dest" || true)"
|
|
221
|
-
if [ -z "$report" ] && [ ! -f "$dest" ]; then
|
|
222
|
-
echo "No llegó el informe de $AGENT." >&2
|
|
223
|
-
exit 1
|
|
224
|
-
fi
|
|
225
|
-
if [ -n "$otros" ]; then
|
|
226
|
-
echo "Se esperaba exactamente el informe de $AGENT y nada más." >&2
|
|
227
|
-
git status --porcelain >&2
|
|
228
|
-
exit 1
|
|
229
|
-
fi
|
|
230
|
-
report="$dest"
|
|
231
|
-
git config user.name "github-actions[bot]"
|
|
232
|
-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
233
|
-
git switch -c "$branch"
|
|
234
|
-
git add "$report"
|
|
235
|
-
git commit -m "docs($AGENT): weekly research $stamp"
|
|
236
|
-
git push origin "$branch"
|
|
237
|
-
gh pr create --base "$GITHUB_REF_NAME" --head "$branch" \
|
|
238
|
-
--title "$AGENT weekly research — $stamp" \
|
|
239
|
-
--body "Investigación semanal de la profesión. No modifica SKILL.md ni propone cambios: alimenta la propuesta mensual."
|
|
240
|
-
|
|
241
|
-
# Este job no habla con ningún modelo: consolida informes ya commiteados con el CLI y abre el PR.
|
|
242
|
-
# Por eso puede escribir sin la separación que exige `research`.
|
|
243
|
-
propose:
|
|
244
|
-
if: github.event.schedule == '17 13 1 * *' || github.event_name == 'workflow_dispatch'
|
|
245
|
-
needs: discover
|
|
246
|
-
runs-on: ubuntu-latest
|
|
247
|
-
permissions:
|
|
248
|
-
contents: write
|
|
249
|
-
pull-requests: write
|
|
250
|
-
strategy:
|
|
251
|
-
fail-fast: false
|
|
252
|
-
max-parallel: 5
|
|
253
|
-
matrix:
|
|
254
|
-
agent: ${{ fromJSON(needs.discover.outputs.agents) }}
|
|
255
|
-
steps:
|
|
256
|
-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
257
|
-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
258
|
-
with:
|
|
259
|
-
node-version: "24"
|
|
260
|
-
|
|
261
|
-
# El CLI vive en `tools/ops.js` dentro de un proyecto generado y en `engine/cli/ops.js`
|
|
262
|
-
# dentro del repositorio del toolkit.
|
|
263
|
-
- name: Resolve CLI
|
|
264
|
-
id: cli
|
|
265
|
-
run: |
|
|
266
|
-
for candidate in tools/ops.js .ops/engine/cli/ops.js engine/cli/ops.js; do
|
|
267
|
-
if [ -f "$candidate" ]; then
|
|
268
|
-
echo "path=$candidate" >> "$GITHUB_OUTPUT"
|
|
269
|
-
exit 0
|
|
270
|
-
fi
|
|
271
|
-
done
|
|
272
|
-
echo "No se encontró el CLI de Cauce." >&2
|
|
273
|
-
exit 1
|
|
274
|
-
|
|
275
|
-
- name: Validate current agent
|
|
276
|
-
env:
|
|
277
|
-
AGENT: ${{ matrix.agent }}
|
|
278
|
-
OPS: ${{ steps.cli.outputs.path }}
|
|
279
|
-
run: node "$OPS" evaluate "$AGENT"
|
|
280
|
-
|
|
281
|
-
- name: Build monthly proposal from weekly reports
|
|
282
|
-
env:
|
|
283
|
-
AGENT: ${{ matrix.agent }}
|
|
284
|
-
OPS: ${{ steps.cli.outputs.path }}
|
|
285
|
-
run: node "$OPS" learn "$AGENT" --proposal
|
|
286
|
-
|
|
287
|
-
- name: Validate proposal
|
|
288
|
-
env:
|
|
289
|
-
AGENT: ${{ matrix.agent }}
|
|
290
|
-
OPS: ${{ steps.cli.outputs.path }}
|
|
291
|
-
run: node "$OPS" evaluate "$AGENT"
|
|
292
|
-
|
|
293
|
-
- name: Detect changes
|
|
294
|
-
id: changes
|
|
295
|
-
run: |
|
|
296
|
-
if git diff --quiet; then
|
|
297
|
-
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
298
|
-
else
|
|
299
|
-
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
300
|
-
fi
|
|
301
|
-
|
|
302
|
-
- name: Open proposal pull request
|
|
303
|
-
if: steps.changes.outputs.changed == 'true'
|
|
304
|
-
env:
|
|
305
|
-
AGENT: ${{ matrix.agent }}
|
|
306
|
-
GH_TOKEN: ${{ github.token }}
|
|
307
|
-
run: |
|
|
308
|
-
period="$(date -u +%Y-%m)"
|
|
309
|
-
branch="automation/$AGENT-$period"
|
|
310
|
-
proposal="$(git diff --name-only -- "agents/*/$AGENT/learning/proposals/$period.md")"
|
|
311
|
-
if [ -z "$proposal" ]; then
|
|
312
|
-
echo "El agente cambió archivos fuera de su propuesta; no se abre PR." >&2
|
|
313
|
-
git diff --name-only >&2
|
|
314
|
-
exit 1
|
|
315
|
-
fi
|
|
316
|
-
git config user.name "github-actions[bot]"
|
|
317
|
-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
318
|
-
git switch -c "$branch"
|
|
319
|
-
git add "$proposal"
|
|
320
|
-
git commit -m "docs($AGENT): propose $period learning review"
|
|
321
|
-
git push origin "$branch"
|
|
322
|
-
gh pr create --base "$GITHUB_REF_NAME" --head "$branch" \
|
|
323
|
-
--title "$AGENT learning proposal — $period" \
|
|
324
|
-
--body "Propuesta automática construida desde los informes semanales. No modifica SKILL.md y requiere evaluación y aprobación humana."
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["**"]
|
|
6
|
-
pull_request:
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
|
|
12
|
-
concurrency:
|
|
13
|
-
group: ci-${{ github.ref }}
|
|
14
|
-
cancel-in-progress: true
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
ci:
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
steps:
|
|
20
|
-
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
21
|
-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: "24"
|
|
24
|
-
# Valida planning, automatización e integraciones y después corre las pruebas
|
|
25
|
-
# exigiendo los umbrales de cobertura. Sin dependencias que instalar.
|
|
26
|
-
- name: Validate and test
|
|
27
|
-
run: npm run ci
|