ai-setup
~/Dev/ai-setup · Claude Code · OpenCode · Codex

Tu equipo de agentes, en una carpetaYour agent team, in one folder

Escribes las reglas, los agentes y las skills una sola vez, en capas: core/ (genérico, viene en el repo) y las tuyas, opcionales, que puedes guardar en otro repo y cargar con --layers-dir. El instalador compone las que elijas y las traduce a cada herramienta que abras. core/ no contiene nada de ningún repo, empresa ni persona.

You write rules, agents and skills once, in layers: core/ (generic, ships in the repo) and your own optional ones, which you can keep in another repo and load with --layers-dir. The installer composes the ones you pick and translates them for every tool you open. core/ holds nothing from any repo, company or person.

Gasta menos tokensSpend fewer tokens

/coach te dice modelo, esfuerzo y prompt antes de empezar; un hook avisa cuando el contexto pasa de 100k; python3 -I adapters/claude/usage_report.py 30 audita tus sesiones en local (no envía nada)./coach gives you model, effort and prompt before you start; a hook warns when the context passes 100k; python3 -I adapters/claude/usage_report.py 30 audits your sessions locally (sends nothing).

1edita una capa o adapters/edit a layer or adapters/core/ es lo genérico, <tuya>/ lo tuyo; adapters/<herramienta>/, lo que hace ir mejor a cada herramienta.core/ is the generic part, <yours>/ is yours; adapters/<tool>/ makes each tool work best.
2./install.shCorre los tests y lo instala en todas tus herramientas, con las capas que elijas (sin flags, todas). Puedes repetirlo sin riesgo. Ver Instalar.Runs the tests, then installs it in all your tools, with the layers you pick (no flags: all). Safe to run again. See Install.
3./backup.shCopia offline opcional: zip en Downloads. El backup principal es git push al repo privado.Optional offline copy: zip in Downloads. The main backup is git push to the private repo.

InstalarInstall

Un solo comando. Lo único que eliges es qué capas lleva esta máquina.One command. The only choice is which layers this machine gets.

1elige las capaspick the layersBusca tu caso en la primera tabla. Si dudas, el comando sin flags instala todo.Find your case in the first table. If unsure, the command with no flags installs everything.
2./install.sh --dry-runOpcional: muestra qué cambiaría, sin tocar nada.Optional: shows what would change, touching nothing.
3./install.shCorre los tests, instala y recuerda tu elección. Después abre una sesión nueva.Runs the tests, installs and remembers your choice. Then open a new session.

¿Qué máquina es?Which machine is it?

CasoCaseComandoCommandCapas que instalaLayers installed
Todo lo que tengoEverything I have./install.shcore + tus capas guardadas en el perfil. La primera vez, solo core.core + the layers saved in your profile. The first run installs core only.
Solo lo genéricoOnly the generic part./install.sh --only coreSolo core: genérico, sin nada tuyoOnly core: generic, nothing of yours
Core + una capa míaCore + one of my layers./install.sh --layers-dir ~/Dev/ai-setup-private --only core,<layer>core + esa capacore + that layer
Compartir o probar en otra máquinaShare or try on another machine./install.sh --only coreSolo core: genérico, sin nada tuyoOnly core: generic, nothing of yours

core siempre se instala. Para ver qué tiene esta máquina: cat ~/.ai-setup-profile.core is always installed. To see what this machine has: cat ~/.ai-setup-profile.

Cambiar despuésChange later

Quiero…I want…ComandoCommandOjoCareful
Añadir una capaAdd a layer./install.sh --with <layer>Se suma a lo que ya tienes. Si nunca instalaste, instala todo: usa --only.Added to what you have. If you never installed, it installs everything: use --only.
Usar una capa que acabo de crearUse a layer I just created./install.sh --with phpNunca se instala sola. Cómo crearla: sección Capas.Never installed on its own. How to create it: Layers section.
Cargar capas de otra carpeta o repoLoad layers from another folder or repo./install.sh --layers-dir DIR --with <layer>Repetible. Se recuerda en ~/.ai-setup-profile; core siempre sale del repo.Repeatable. Remembered in ~/.ai-setup-profile; core always comes from the repo.
Escribir una capa fuera del repoWrite a layer outside the repo{{LAYER}}En su AGENTS.md y agentes, {{LAYER}} es la carpeta de la capa. Su policy.json pide OK al editarlo, y el instalador revisa la política compuesta antes de escribir.In its AGENTS.md and agents, {{LAYER}} is the layer's own folder. Editing its policy.json asks for OK, and the installer checks the composed policy before writing.
Quitar una capaRemove a layer./install.sh --uninstall <layer>Quita sus skills, agentes, notas y reglas, con backup. Core no se quita.Removes its skills, agents, notes and rules, with backup. Core stays.
Repetir lo últimoRepeat the last choice./install.shUsa el perfil guardado. Sin cambios, no toca nada.Uses the saved profile. If nothing changed, it touches nothing.
Lo que más confundeWhat confuses most

1. Elegir menos capas no quita nada: --only core después de instalar más capas las deja puestas. Para quitar una, --uninstall.1. Choosing fewer layers removes nothing: --only core after installing more layers leaves them in place. To remove one, --uninstall.

2. Dentro de Claude el sandbox no deja escribir en ~/.claude ni en build/. Corre el comando tú, con ! delante: ! ./install.sh.2. Inside Claude the sandbox cannot write to ~/.claude or build/. Run the command yourself with a ! prefix: ! ./install.sh.

3. Tras instalar, abre una sesión nueva: el guard lee build/policy.json al arrancar.3. After installing, open a new session: the guard reads build/policy.json at start.

4. Si los tests fallan, no instala nada. Detalle: python3 -m unittest discover -s tests.4. If the tests fail, nothing is installed. Details: python3 -m unittest discover -s tests.

AgentesAgents

Un agente es un rol: qué puede tocar, qué modelo usa y cómo trabaja.An agent is a role: what it may touch, which model it uses and how it works.

flow-ticketorquestaorchestrates

Lleva un ticket entero: un writer construye y los demás exploran, revisan y validan en paralelo.

Runs a whole ticket: one writer builds while the others explore, review and validate in parallel.

Escribe
solo planes en $DEV/handoffs
Modelo
medio
Úsalo
como sesión principal
Writes
only plans in $DEV/handoffs
Model
balanced
Use it
as the main session
sub-reviewrevisareviews

Review escéptico contra los requisitos, con evidencia archivo:línea.

Skeptical review against the requirements, with file:line evidence.

Escribe
nada
Modelo
medio
Úsalo
antes de aceptar o mergear
Writes
nothing
Model
balanced
Use it
before accepting or merging
sub-builderescribewrites

El único que escribe código y docs del ticket, en su worktree, siguiendo el plan aprobado.

The only one who writes the ticket's code and docs, in its worktree, following the approved plan.

Escribe
solo la allowlist
Modelo
medio
Úsalo
lo lanza flow-ticket tras el Gate 1
Writes
only the allowlist
Model
balanced
Use it
launched by flow-ticket after Gate 1
sub-testertests

En un bug, el test que falla. En una feature, los casos borde.

For a bug, the failing test. For a feature, the edge cases.

Escribe
solo tests
Modelo
medio
Úsalo
antes del fix (bug) o después de implementar (feature)
Writes
only tests
Model
balanced
Use it
before the fix (bug) or after implementing (feature)
leaf-verifyvalidavalidates

Corre format, build, tests y checks, y te da un recibo. No arregla nada.

Runs format, build, tests and checks, and gives you a receipt. Fixes nothing.

Escribe
nada
Modelo
rápido
Úsalo
/validate, antes del PR
Writes
nothing
Model
fast
Use it
/validate, before the PR
meta-setupmantienemaintains

Cuida esta carpeta: crea skills, añade reglas y reinstala.

Looks after this folder: creates skills, adds rules and reinstalls.

Escribe
solo ai-setup
Modelo
medio
Úsalo
"guarda esto", "conviértelo en skill"
Writes
only ai-setup
Model
balanced
Use it
"save this", "turn it into a skill"

El código y sus docs los escribe un solo agente general (general / build) por ticket, en su worktree.Code and its docs are written by one general agent (general / build) per ticket, in its own worktree.

PrefijosPrefixes

flow-* coordina etapascoordinates stages sub-* especialista delegadodelegated specialist leaf-* tarea estrecha, no deleganarrow task, never delegates meta-* mantiene el setupmaintains the setup

¿Agente nuevo o skill?New agent or skill?

¿Necesita otros permisos (solo tests, solo docs, nada)?Does it need different permissions (tests only, docs only, nothing)?→ agente→ agent
¿Necesita otro modelo (barato o más fuerte)?Does it need another model (cheaper or stronger)?→ agente→ agent
¿Es un procedimiento que repites (pasos, formato, checklist)?Is it a procedure you repeat (steps, format, checklist)?→ skill
¿Es una regla que vale siempre?Is it a rule that always applies?→ AGENTS.md
Regla YodaYoda rule

Añade un agente solo si el trabajo necesita una forma realmente distinta de operar. Si cambiar de agente pesa más que el trabajo, sobran agentes.Add an agent only when the work needs a truly different way of operating. If switching agents costs more than the work, you have too many agents.

Agregar un agenteAdding an agent

  1. Pídelo: "crea un agente sub-security que audite seguridad, solo lectura". Lo hace meta-setup.Ask for it: "create a sub-security agent that audits security, read-only". meta-setup does it.
  2. O a mano: crea core/agents/<prefijo>-<nombre>.md con la plantilla.Or by hand: create core/agents/<prefix>-<name>.md from the template.
  3. Ejecuta ./install.sh. Genera el agente para Claude y para OpenCode.Run ./install.sh. It builds the agent for Claude and for OpenCode.
  4. Para usarlo, menciónalo: "usa sub-security sobre esta rama".To use it, name it: "use sub-security on this branch".
core/agents/sub-security.md
---
name: sub-security
description: Auditoría de seguridad de un diff. Usar
  para "revisa seguridad", "¿es seguro?". Solo lectura.
mode: subagent        # subagent | primary | all
edit: none            # none | all | globs: */docs/*, *.md
bash: read-only       # read-only | checks | all
claude_tools: Read, Grep, Glob, Bash   # * = todas
tier: strong          # strong | balanced | fast
color: red
---

Eres auditor de seguridad. Asumes que hay fallos...
## Output
- Veredicto · tabla de hallazgos · qué no verificaste
---
name: sub-security
description: Security audit of a diff. Use for
  "check security", "is this safe?". Read-only.
mode: subagent        # subagent | primary | all
edit: none            # none | all | globs: */docs/*, *.md
bash: read-only       # read-only | checks | all
claude_tools: Read, Grep, Glob, Bash   # * = all
tier: strong          # strong | balanced | fast
color: red
---

You are a security auditor. Assume there are flaws...
## Output
- Verdict · findings table · what you did not verify
CampoFieldQué controlaWhat it controlsValoresValues
descriptionCuándo se elige solo. Pon tus frases realesWhen it gets picked on its own. Use your real phrasestextotext
editQué archivos puede escribir (OpenCode lo hace cumplir; en Claude lo dice el prompt)Which files it may write (OpenCode enforces it; in Claude the prompt says it)none · all · globs
bashQué comandos puede correrWhich commands it may runread-only (git diff/log, ls, grep) · checks (todo menos cambiar git) · allread-only (git diff/log, ls, grep) · checks (everything except changing git) · all
tierModelo. Claude: opus / sonnet / haiku (la sesión principal usa opusplan: Opus planea, Sonnet ejecuta; los subagentes sin tier, como general-purpose, usan Sonnet). OpenCode: adapters/opencode/tiers.jsonModel. Claude: opus / sonnet / haiku (the main session uses opusplan: Opus plans, Sonnet executes; subagents without a tier, like general-purpose, use Sonnet). OpenCode: adapters/opencode/tiers.jsonstrong · balanced · fast
effortCuánto razona (Claude lo aplica; OpenCode todavía no). Sube el esfuerzo antes que el modeloHow hard it reasons (Claude applies it; OpenCode not yet). Raise effort before the modellow · medium · high
modeSi es sesión principal o subagenteMain session or subagentprimary · subagent · all

Skills

Una skill es una receta: pasos, formato y checklist para un tipo de tarea.A skill is a recipe: steps, format and checklist for one kind of task.

¿Cuál uso? Por tipo de tareaWhich one do I use? By kind of task

Estoy…I am…Ejemplo: lo que le digoExample: what I saySkillSkill
Empezando con una idea vaga o una decisión difícilStarting with a vague idea or a hard decisiongrill me: quiero cambiar cómo pedimos OK en los commitsgrill me: I want to change how commits ask for OKgrillme
Construyendo un ticket completo, de punta a puntaBuilding a whole ticket, end to endtrabaja el ticket DC-1103work ticket DC-1103
Si el ticket es vago, te entrevista primero con grillme. Si es una feature chica, no hace falta: pídela directo.If the ticket is vague, it interviews you first with grillme. For a small feature you do not need it: just ask.
ticket-flow
Arreglando un bug o un test que fallaFixing a bug or a failing testel login devuelve 500 con teléfonos con +; encuentra la causalogin returns 500 for phones with +; find the cause
Después, para blindarlo: "test primero" (tdd).Then, to lock it in: "test first" (tdd).
systematic-debugging
Escribiendo código nuevo con tests que lo protejanWriting new code with tests that protect ithazlo con TDD: validar el IBAN antes de enviardo it with TDD: validate the IBAN before sendingtdd
Revisando si algo está listo para PRChecking whether something is ready for a PR/validate · ¿cumple el PR con lo pedido en el ticket?does the PR cover what the ticket asks?validate · pr-review-ticket
Cerrando o traspasando: commit de un cambio, o seguir en otra sesiónWrapping up: commit a change, or continue in another sessioncierra el cambio de ai-setupwrap up the ai-setup change · genera el prompt para la otra sesiónwrite the prompt for the other sessionsetup-commit · session-handoff
Regla rápidaRule of thumb

¿No sabes qué pedir? grillme. ¿Sabes qué pedir pero es grande? ticket-flow. ¿Algo se rompió? systematic-debugging. ¿Terminaste? validate, y luego escribir y cerrar. No tienes que nombrar la skill: con las palabras de los ejemplos se activa sola.Not sure what to ask? grillme. Know what to ask but it is big? ticket-flow. Something broke? systematic-debugging. Done? validate, then write and close. You do not have to name the skill: the words in the examples trigger it on their own.

Referencia completaFull reference

SkillSe activa con…Triggered by…HaceDoes
ticket-flow"trabaja el ticket PROJ-123", "orquestá""work ticket PROJ-123", "orchestrate"Ticket de punta a punta: contrato de alcance (allowlist + OK) primero, un writer, lecturas en paralelo, 2 gates; el Gate 1 exige criteria.md (si falta, ofrece grillme); el Gate 1 trae una línea de veredicto (un PR o dividir en N); riesgo bajo = ruta corta (sin explorar ni planear, con review); tras el PR, re-review del commit contra criteria.md (un hallazgo te frena; comentario en el PR solo con tu OK)Ticket end to end: scope contract (allowlist + OK) first, one writer, reads in parallel, 2 gates; Gate 1 needs criteria.md (offers grillme if missing); Gate 1 carries a verdict line (single PR or split into N); low risk = short route (no explore or plan, still reviewed); after the PR, a re-review of the commit against criteria.md (a finding stops for you; PR comment only with your OK)
validate/validate, "pasa los checks"/validate, "run the checks"Lanza leaf-verify y te da el reciboRuns leaf-verify and gives you the receipt
pr-review-ticket"review escéptico del PR contra el ticket""skeptical review of the PR against the ticket"Requisitos ✅🟡❌, fuera de alcance, veredicto. Bugs genéricos: /code-reviewRequirements ✅🟡❌, out of scope, verdict. Generic bugs: /code-review
session-handoff"genera el prompt para la otra sesión""write the prompt for the other session"Archivo de traspaso completo en $DEV/handoffsFull handoff file in ~/handoffs
repo-guardrails"prepara este repo para agentes", "que la IA respete la arquitectura""set up AGENTS.md", "guardrails for this repo"AGENTS.md corto (reglas E o con fecha until, niveles de riesgo) + CLAUDE.md + tests de arquitectura (rojo primero) + plantillas de decisiones y de PR + CI mínimo que avisa si el PR pasa de 400 líneas. Solo se ofrece, nunca por sí soloShort AGENTS.md (rules E or dated until, risk tiers) + CLAUDE.md + architecture tests (red first) + decision and PR templates + minimal CI that warns on PRs over 400 lines. Offered only, never unasked
tdd"TDD", "test primero", "red-green""TDD", "test first", "red-green"Un test → el mínimo código → repetir. Tests en las seams acordadas en el planOne test → minimal code → repeat. Tests at the seams agreed in the plan
systematic-debuggingCualquier bug o test que fallaAny bug or failing testCausa raíz antes del fix. Tras 3 arreglos fallidos, para y revisa la arquitecturaRoot cause before the fix. After 3 failed fixes, stop and question the architecture
setup-commit"commitea esto", "cierra el cambio de ai-setup""commit this", "wrap up the ai-setup change"Cheatsheet + tests + git add solo de tus rutas; mensaje en inglés con tu OK; nunca pushCheatsheet + tests + git add of your paths only; English message with your OK; never push
grillme"grill me", "hazme preguntas""grill me", "ask me questions"Entrevista de a una pregunta antes de planear (también si el alcance es poco claro o admite 2+ lecturas); cierra escribiendo criteria.md (objetivo · fuera de alcance · criterios Given/When/Then · hecho · ## Slices si conviene dividir en PRs chicos)One-question-at-a-time interview before planning (also when scope is unclear or reads 2+ ways); closes by writing criteria.md (goal · out of scope · Given/When/Then criteria · done · ## Slices when it should be small PRs)
ai-audit"audita este repo", "reglas vencidas""audit this repo", "which rules expired"Tabla de 8 prácticas con nota 1-5 y evidencia (--today, --projects-dir, --dev-root); lista las reglas until vencidas y las fechas inválidas; "Cambios chicos" mide por PR mergeado (por commit si no hay merges). Solo lee; las notas son heurísticasTable of 8 practices with a 1-5 score and evidence (--today, --projects-dir, --dev-root); lists expired until rules and invalid dates; "Small changes" measures per merged PR (per commit when there are no merges). Read-only; scores are heuristics
coach/coach, "qué modelo uso"/coach, "which model should I use"Antes de empezar: modelo, esfuerzo y prompt mejorado en bloques cortos estilo recibo. Al cerrar, el recibo trae un bloque EfficiencyBefore starting: model, effort and improved prompt in short receipt-style blocks. On close, the receipt carries an Efficiency block
tune-setup"tune-setup", "ajusta el coach con mis datos""tune-setup", "re-tune coach with my data"Cada ~30 días o ~20 sesiones, un aviso al abrir sesión te lo ofrece. Lee tus datos de /insights (tune_stats.py) y propone un diff para coach, aviso de contexto, ticket-flow y grillme. No edita sin tu OKEvery ~30 days or ~20 sessions a session-start notice offers it. Reads your /insights data (tune_stats.py) and proposes a diff for coach, context notice, ticket-flow and grillme. Edits nothing without your OK
convert-to-markdown"convertí esto a markdown", vas a leer un PDF/docx/pptx/xlsx grande"convert this to markdown", about to read a large PDF/docx/pptx/xlsxLo pasa a Markdown con la CLI markitdown antes de leerlo, para gastar muchos menos tokens que con el archivo originalConverts it to Markdown with the markitdown CLI before reading it, to spend far fewer tokens than the original file
Idioma y tonoLanguage and tone

Core no fija idioma ni tono. Pon tus reglas de idioma, formato y estilo de escritura en el AGENTS.md de tu propia capa.Core sets no language or tone. Put your language, format and writing-style rules in your own layer's AGENTS.md.

Instalar una de GitHubInstall one from GitHub

Igual que siempre: pásale el link a Claude.Same as always: give Claude the link.

instala https://github.com/owner/una-skill
install https://github.com/owner/some-skill
  1. Claude ejecuta ./add-skill.sh <url>.Claude runs ./add-skill.sh <url>.
  2. La copia en core/skills/ y anota URL y commit en sources.json.Copies it into core/skills/ and records URL and commit in sources.json.
  3. La instala en todas tus herramientas.Installs it in all your tools.
  4. Te resume qué hace y si trae scripts o algo raro.Tells you what it does and whether it ships scripts or anything odd.

Crear una propiaCreate your own

Cuando pides lo mismo por segunda vez, di: "conviértelo en skill". O a mano:When you ask for the same thing a second time, say: "turn it into a skill". Or by hand:

core/skills/merge-pr/SKILL.md
---
name: merge-pr
description: Actualiza un PR con develop y lo
  mergea por API. Usar con "mergear por API",
  "actualizar con develop", "quedó desactualizado".
---

# Mergear un PR
1. Comprueba que el CI pasó...
2. ...
---
name: merge-pr
description: Updates a PR with develop and
  merges it via API. Use for "merge via API",
  "update with develop", "branch is out of date".
---

# Merge a PR
1. Check that CI passed...
2. ...

Después:Then: ./install.sh

ClaveKey

La description decide cuándo se activa sola. Escríbela con las palabras que tú usas, en español y en inglés.The description decides when it triggers on its own. Write it with the words you actually use, in Spanish and English.

./add-skill.sh <url> skills/fooEl repo trae varias skills: indica la carpetaThe repo has several skills: pick the folder
./add-skill.sh --update <skill>Actualizar desde su origen (guarda backup)Update from its source (keeps a backup)
./add-skill.sh <url> --layer <layer>Añadir la skill a esa capa (por defecto, core)Add the skill to that layer (default: core)
./add-skill.sh --listDe dónde viene cada skillWhere each skill comes from
./install.sh --adoptTraer a ai-setup (--layer elige la capa) una skill instalada directo en ~/.claude/skillsBring into ai-setup (--layer picks the layer) a skill installed straight into ~/.claude/skills

CapasLayers

Carpetas con la misma forma. core/ viene en el repo; las tuyas son opcionales y pueden vivir en otro repo (--layers-dir). Una capa solo añade, nunca quita una regla de otra.Folders with the same shape. core/ ships in the repo; yours are optional and can live in another repo (--layers-dir). A layer only adds, it never removes another layer's rule.

core/Genérico: sirve para cualquier persona y trabajo.Generic: fits any person and job.Guard, agentes, skills de proceso (ticket-flow, validate, tdd…), límites de git/gh y secretos, sandbox base. Siempre se instala.Guard, agents, process skills (ticket-flow, validate, tdd…), git/gh and secret limits, base sandbox. Always installed.
<yours>/Opcional: lo tuyo.Optional: yours.Tu idioma y tono en AGENTS.md, permisos de tus herramientas de trabajo en policy.json, skills y notas propias. Se carga con --layers-dir y --with.Your language and tone in AGENTS.md, permissions for your work tools in policy.json, your own skills and notes. Loaded with --layers-dir and --with.
./install.sh
core/    ─┐
<yours>/ ─┼─ install.py ─▶ build/AGENTS.md  ─▶ ~/.claude/CLAUDE.md, ~/.codex/AGENTS.md
        ─┘      │       └▶ build/policy.json ─▶ guard + permisos + sandbox de cada herramienta
                 └▶ skills/agentes enlazados · notas ▶ $DEV/ai-notes/ · perfil ▶ ~/.ai-setup-profile

Cómo instalar cada combinación: sección Instalar.How to install each combination: Install section.

Crear una capa nuevaCreate a new layer

  1. Crea una carpeta en ~/Dev/ai-setup/ con el nombre de la capa: php/, acme/… (minúsculas, números, - y _).Create a folder in ~/Dev/ai-setup/ named after the layer: php/, acme/… (lowercase, digits, - and _).
  2. Mete dentro solo lo que necesites: policy.json (permisos), AGENTS.md (reglas), skills/, agents/ o notes/. La carpeta ya es una capa; no hay que registrarla en ningún sitio.Put in only what you need: policy.json (permissions), AGENTS.md (rules), skills/, agents/ or notes/. The folder is already a layer; nothing to register.
  3. ./install.sh --with php. Una capa nueva nunca se instala sola: tienes que pedirla. Para quitarla: --uninstall php../install.sh --with php. A new layer is never installed on its own: you have to ask for it. To remove it: --uninstall php.

Una capa por contexto (empleador, cliente), no por lenguaje, salvo que el lenguaje traiga permisos o skills propias. Nombres reservados: adapters, docs, tests, build. Si dos capas tienen una skill con el mismo nombre, el instalador para.One layer per context (employer, client), not per language, unless the language brings its own permissions or skills. Reserved names: adapters, docs, tests, build. If two layers have a skill with the same name, the installer stops.

Extender: permisos, agentes y modelosExtend: permissions, agents and models

Todo va en tu capa; core/ no se toca. Después: ./install.sh --with <capa> y sesión nueva.All of it goes in your layer; core/ stays untouched. Then ./install.sh --with <layer> and a new session.

Quiero…I want…DóndeWhereEjemploExample
Pedir OK para un comandoAsk OK for a command<capa>/policy.json → ask_commands{"ask_commands": ["gh api *"]}
Dejar correr un comando de lecturaLet a read-only command runallow_commands"terraform plan*"
Vetar un secreto o proteger un archivoForbid a secret or protect a filedeny_files · deny_home_dirs · protected_paths"~/.ssh"
Pedir OK a una herramienta MCPAsk OK for an MCP toolask_mcp_tools"jira.*"
Dominios o carpetas del sandbox (Claude)Sandbox domains or folders (Claude)sandbox.allowed_domains · allow_write"registry.npmjs.org"
Un agente propioAn agent of my own<capa>/agents/<n>.mdcampos abajofields below
Cambiar el modelo de un agenteChange an agent's modeltier: en el agente; OpenCode: adapters/opencode/tiers.jsonin the agent; OpenCode: adapters/opencode/tiers.jsonstrong = opus · balanced = sonnet · fast = haiku

Reglas de permisos: son globs (*); ask y deny siempre ganan a allow; el instalador revisa la política y para con la regla que falla. Una regla para todos va en core/policy.json con un test en tests/test_guard.py.Permission rules: globs (*); ask and deny always win over allow; the installer checks the policy and stops at the offending rule. A rule for everyone goes in core/policy.json with a test in tests/test_guard.py.

Campos de un agente (frontmatter): name, description (obligatorios) · mode: subagent | primary | all · tier: strong | balanced | fast · effort: low | medium | high | xhigh (OpenCode lo ignora) · edit: none | all | globs · bash: read-only | checks | all · claude_tools: lista o * · color: yellow green blue purple red orange cyan gray. Un nombre de core no se puede reusar.Agent fields (frontmatter): name, description (required) · mode: subagent | primary | all · tier: strong | balanced | fast · effort: low | medium | high | xhigh (OpenCode ignores it) · edit: none | all | globs · bash: read-only | checks | all · claude_tools: list or * · color: yellow green blue purple red orange cyan gray. A core name cannot be reused.

Dónde va cada cosaWhere things go

Si lo corriges dos veces, guárdalo. Dile "guarda esto" a meta-setup.If you correct it twice, save it. Tell meta-setup "save this".

Quiero…I want…ArchivoFileEjemploExample
Una regla para todo y todas las herramientasA rule for everything and every toolcore/AGENTS.md (tuyo: <tuya>/AGENTS.md)(yours: <yours>/AGENTS.md)"nunca commit sin mi OK" en core; "conmigo en español" en tu capa"never commit without my OK" in core; "reply in Spanish" in your layer
Un procedimiento repetibleA repeatable procedure<capa>/skills/<n>/SKILL.mdreview de PR, traspasoPR review, handoff
Otro rol, permisos o modeloAnother role, permissions or model<capa>/agents/<n>.mdauditor de seguridad de solo lecturaread-only security auditor
Permitir, pedir OK o prohibir algoAllow, ask for OK, or forbid something<capa>/policy.json (editarlo pide tu OK; las capas se suman)(editing it asks for your OK; layers add up)pedir OK en git mergeask for OK on git merge
Dejar que un comando pida salir del sandboxLet a command ask to leave the sandbox<capa>/policy.json → sandbox.allow_unsandboxed_commands: trueApagado por defecto. Encendido, la salida corre sola y queda en Acciones del recibo; pregunta si además escribe fuera de $DEV/tmp, si es el instalador del setup o si ya pedía OK.Off by default. When on, an exit runs alone and is listed under Actions in the receipt; it asks if it also writes outside $DEV/tmp, is the setup installer, or already needed an OK.
Algo que solo una herramienta hace, o hace mejorSomething only one tool can do, or does betteradapters/<tool>/hook de Claude, plugin o modelo por agente en OpenCode. Añade, no reemplaza a corea Claude hook, an OpenCode plugin or per-agent model. It adds to core, never replaces it
Una regla mía para un repoMy own rule for one repo$DEV/ai-notes/<repo>.md (fuera del setup)(outside the setup)"en este repo los pendientes van al tracker del equipo""in this repo, follow-ups go to the team tracker"
Una regla del equipoA team ruleel AGENTS.md / CLAUDE.md del repothe repo's AGENTS.md / CLAUDE.mdse acuerda con el equipo, no aquíagreed with the team, not here

Cómo encarar una tareaHow to tackle a task

La herramienta puede ser la misma; el primer paso cambia según el tipo de tarea.The tool can stay the same; the first step depends on the kind of task.

Nueva featureNew featureDiseño primeroDesign first
  1. Problema y versión mínima útil
  2. Qué queda fuera de alcance
  3. Criterios de aceptación, cada uno con su check
  4. Construir lo más fino posible, con tdd
  1. Problem and smallest useful version
  2. What is out of scope
  3. Acceptance criteria, each with its check
  4. Build the thinnest slice, with tdd
Editar featureChange a featureContexto primeroContext first
  1. Mapear el flujo actual de punta a punta
  2. Extender, no duplicar
  3. Quitar código viejo y fallbacks
  4. Actualizar tests, no solo añadir
  1. Map the current flow end to end
  2. Extend, don't duplicate
  3. Remove old code and fallbacks
  4. Update tests, don't just add
BugReproducción primeroReproduce first
  1. Qué pasa y qué debería pasar
  2. systematic-debugging: causa raíz
  3. sub-tester: test que falla por la razón correcta
  4. Recién entonces, el fix
  5. El test pasa y nada más se rompe
  1. What happens and what should happen
  2. systematic-debugging: root cause
  3. sub-tester: a test that fails for the right reason
  4. Only then, the fix
  5. The test passes and nothing else breaks

Un ticket entero:A whole ticket: ticket-flow

Arrancarlo desde un workspaceStarting it from a workspace

Claude (recomendado)(recommended)Ábrelo normal y escribe el prompt de abajoOpen it as usual and type the prompt below
Claude con el agentewith the agentclaude --agent flow-ticket en la terminal del workspaceclaude --agent flow-ticket in the workspace terminal
OpenCodeTab hasta llegar a flow-ticketTab until you reach flow-ticket
Trabaja PROJ-123 con la skill ticket-flow
Work PROJ-123 with the ticket-flow skill

Un workspace ya es un worktree (git-dir ≠ git-common-dir): ahí escribe el writer. Dentro de un workspace no uses -w ni --bg.A workspace is already a worktree (git-dir ≠ git-common-dir): the writer works there. Inside a workspace, don't use -w or --bg.

Reglas de paraleloParallel rules

PasoStep¿Worktree?Worktree?
Explorar, revisar, validarExplore, review, validate❌ solo leen, todos a la vez❌ read-only, all at once
Writer + sub-testerWriter + sub-tester✅ uno solo, compartido y en secuencia✅ a single one, shared, in sequence
  • Un solo writer por ticket. Si el ticket pide más, se parte en tickets.
  • Entre gates no te pregunta nada, si lo que hace es local, reversible y verificable.
  • Para si: hace falta un permiso nuevo, cambia el alcance o hay un efecto externo.
  • One writer per ticket. If it needs more, split the ticket.
  • Between gates it asks you nothing, as long as the work is local, reversible and verifiable.
  • It stops if: a new permission is needed, the scope changes, or there is an external effect.

Tareas sueltasOne-off tasks

/validateChecks + recibo antes del PRChecks + receipt before the PR
review escéptico de esta rama contra PROJ-123skeptical review of this branch against PROJ-123pr-review-ticket + sub-review
genera el handoff para la otra sesiónwrite the handoff for the other sessionsession-handoff → archivo en $DEV/handoffssession-handoff → file in ~/handoffs
redacta la descripción del PRdraft the PR descriptionformato de PRs anteriores, en inglésformat of previous PRs, in English
grill me este ticketgrill me on this ticketEntender a fondo antes de planificarUnderstand it fully before planning
guarda esto como regla / skillsave this as a rule / skillmeta-setup lo pone en su sitiometa-setup puts it in the right place
Al cerrarWhen done

Cada tarea termina con un recibo: qué cambió · qué se ejecutó · qué pasó · qué falló · qué queda incierto (el hook genérico action_trace anota en un log los comandos que coincidan con una regla trace de la policy.json de una capa), una tabla Acciones (lo que corrió fuera del sandbox, commits, instalaciones y cada pregunta, con su riesgo; el guard lo anota en ~/Dev/logs/actions.log), más los cambios de riesgo medio o alto (tests, hooks, política) con su impacto. Después: /rename + /clear (y si corregiste lo mismo dos veces, /clear con un prompt mejor).Every task ends with a receipt: changes made · commands run · their outcome · failures · open doubts (the generic action_trace hook logs the commands that match a trace rule in a layer's policy.json), an Actions table (what ran outside the sandbox, commits, installs and every ask, with its risk; the guard logs it to ~/Dev/logs/actions.log), plus medium or high risk changes (tests, hooks, policy) with their impact. Then: /rename + /clear (and if you corrected the same thing twice, /clear with a better prompt).

PermisosPermissions

Todo sale de la policy.json de cada capa; el instalador las suma en build/policy.json y lo traduce a cada herramienta. Una capa solo añade reglas.Everything comes from each layer's policy.json; the installer adds them up into build/policy.json and translates it for each tool. A layer only adds rules.

librefree
  • Leer, buscar, editar en tu tarea
  • git status · diff · log
  • Build, tests, git checkout <rama>
  • Read, search, edit within your task
  • git status · diff · log
  • Build, tests, git checkout <branch>
pide tu OKasks for your OK
  • git push · merge · tag (el commit local corre solo y sale en el recibo)
  • reset --hard · clean · rebase · restore
  • checkout -- · branch -D · stash drop · stash clear
  • commit-tree · update-ref
  • push --force, rm · rmdir · find -delete fuera de tmp (un rm -rf "$P" con P=$(mktemp -d) también pregunta: usa una ruta fija en $TMPDIR y no la borres)
  • gh pr create · merge, gh api con -X/-f/-F/--input, gh repo create · edit · delete…, gh release · workflow · secret, gh auth login · token… (leer con gh es libre), git worktree remove
  • Escrituras en tus trackers y herramientas de trabajo, si una capa añade esas reglas
  • Editar las reglas del setup (policy, guard, hooks, plugins, instalador, tests)
  • Cada aviso empieza con 🔴 high risk o 🟡 medium risk; en un comando compuesto sale el más alto. El instalador no deja reglas nativas de Bash (taparían la etiqueta) y comprueba que el hook funciona antes de instalar
  • Un comando fuera del sandbox que escribe fuera de $DEV/tmp (🔴 high risk) o corre el instalador del setup; el resto corre solo y sale en Acciones
  • git push · merge · tag (a local commit runs alone and is listed in the receipt)
  • reset --hard · clean · rebase · restore
  • checkout -- · branch -D · stash drop · stash clear
  • commit-tree · update-ref
  • push --force, rm · rmdir · find -delete outside tmp (an rm -rf "$P" with P=$(mktemp -d) also asks: use a fixed path under $TMPDIR and do not delete it)
  • gh pr create · merge, gh api with -X/-f/-F/--input, gh repo create · edit · delete…, gh release · workflow · secret, gh auth login · token… (reading with gh is free), git worktree remove
  • Writes to your trackers and work tools, if a layer adds those rules
  • Editing the setup's own rules (policy, guard, hooks, plugins, installer, tests)
  • Every prompt starts with 🔴 high risk or 🟡 medium risk; a compound command shows its highest. The installer leaves no native Bash rules (they would hide the label) and checks the hook works before installing
  • A command outside the sandbox that writes outside $DEV/tmp (🔴 high risk) or runs the setup installer; the rest runs alone and is listed under Actions
prohibidoforbidden
  • .env.local, *.env.local
  • ~/.ssh, ~/.aws
  • También por la shell (cat, cp…)Also through the shell (cat, cp…)
HerramientaToolCómo se cumpleHow it is enforcedEstadoStatus
Claude CodePermisos + guard común (hook) + sandbox del sistema (secretos, red con certificados del sistema, reglas del setup) + modo auto + aviso informativo cuando el contexto pasa de 100k, que te dice "di handoff y /clear" (se ajusta con CLAUDE_CONTEXT_NOTICE_START / _STEP; python3 adapters/claude/usage_report.py resume tu uso). El guard ve sudo, bash -c / eval (evalúa lo de dentro), curl … | sh, código inline que lanza comandos o escribe las reglas del setup (leerlas con python3 -c no pregunta), cd ~ && cat .ssh/…, git -C, git --no-pager… y anota cada decisión (sin el comando) en ~/.ai-setup/guard.log; usage_report.py la resume. AI_SETUP_GUARD_LOG=off lo apaga.Permissions + shared guard (hook) + OS sandbox (secrets, network with system certificates, the setup's rules) + auto mode + an informational notice when context passes 100k that tells you to say handoff then /clear (tune with CLAUDE_CONTEXT_NOTICE_START / _STEP; python3 adapters/claude/usage_report.py summarizes your usage). The guard sees sudo, bash -c / eval (it judges the inside), curl … | sh, inline code that starts commands or writes the setup's rules (reading them with python3 -c does not ask), cd ~ && cat .ssh/…, git -C, git --no-pager… and logs each decision (never the command) to ~/.ai-setup/guard.log; usage_report.py summarizes it. AI_SETUP_GUARD_LOG=off turns it off.✅ bloqueo real + muro del SO✅ enforced + OS wall
OpenCodeReglas en opencode.json + el mismo guard (plugin). Sin sandbox: evita --auto. Tras actualizar OpenCode, comprueba que git push preguntaRules in opencode.json + the same guard (plugin). No sandbox: avoid --auto. After updating OpenCode, check that git push asks✅ bloqueo real · ⚠️ sin muro del SO✅ enforced · ⚠️ no OS wall
CodexSolo como instrucción en AGENTS.mdOnly as an instruction in AGENTS.md⚠️ depende de la IA⚠️ relies on the AI

Carpetas de trabajo permitidas fuera del repo: las que una capa lista en work_dirs. $DEV es el dev_root que una capa fija en su policy.json (~ si ninguna): ahí van $DEV/handoffs (planes y traspasos), $DEV/ai-notes y $DEV/worktrees. Un host que no está en la lista del sandbox pregunta la primera vez. Lo que el guard no ve (base64, comandos armados en un script) está en tests/test_guard.py.Work folders allowed outside the repo: the ones a layer lists in work_dirs. $DEV is the dev_root a layer sets in its policy.json (~ if none): $DEV/handoffs (plans and handoffs), $DEV/ai-notes and $DEV/worktrees live there. A host missing from the sandbox list asks the first time. What the guard cannot see (base64, commands built in a script) is listed in tests/test_guard.py.

Merge gate

Nada llega a la rama principal sin una revisión de alguien que no escribió el código. El guard lo exige al fusionar, no al pedirte permiso.Nothing reaches the default branch without a review by someone who did not write the code. The guard checks it when merging, not when asking for your OK.

ComandoCommandQué hace el guardWhat the guard does
git merge <rama>, git pull <remote|.> <rama> estando en la rama principalwhile on the default branch, gh pr merge de un PR contra ellaof a PR into itDeniega si no existe $DEV/reviews/<repo>/<rama>.md, o si revisó otro commit (report is stale). Con informe al día pregunta como siempre, muestra el veredicto (un FAIL no deniega) y el log de acciones anota el informe.Denies if $DEV/reviews/<repo>/<branch>.md does not exist, or reviewed another commit (report is stale). With a fresh report it asks as before, shows the verdict (a FAIL does not deny) and the action log names the report.
git merge main en una rama de trabajoon a feature branch, --abort · --continue, git merge origin/mainSin puerta: pregunta como antes.No gate: asks as before.
git pull, git pull origin main en main, y los pulls en una rama de trabajoon main, and pulls on a feature branchSin puerta: se permite como antes.No gate: allowed as before.

Cómo se arregla: pide a sub-review (o /code-review) que revise la rama; escribe el informe con el commit y el árbol que vio. Un informe vale si su commit es la cabeza de la rama o su árbol es el de esa cabeza (revisado antes de commitear). Salida de emergencia: AI_SETUP_NO_REVIEW=1 git merge x pasa a pedirte OK (🔴 high risk, "WITHOUT a review report") y queda en el log. Escribir en $DEV/reviews/ desde Bash también pregunta (🔴). Huecos conocidos: los comandos ! que escribes tú, falsificar el informe con la herramienta Write, y otras opciones con valor tras un wrapper (sudo -h host git merge; -u -g -U -C ya se entienden), GIT_DIR puesto con export/env, escrituras en reviews/ que no ve (mv de un informe fuera, cp -r sin barra final, dd of=, rutas relativas), y otras formas de aterrizar en main (/usr/bin/git merge, git fetch . x:main, git branch -f main x, cherry-pick, git push origin x:main), y la referencia remota local puede ser más vieja que lo que git pull origin x descarga (el guard juzga la que ve). Un git pull a secas en la rama por defecto cuando branch.<default>.merge apunta a otra rama la fusiona sin el gate (requiere un cambio previo de config). El Write de sub-review se limita a $DEV/reviews/ solo por instrucción (a los agentes de Claude no se les puede restringir la ruta), y una escritura relativa en reviews/ tras un cd no se ve.How to fix it: ask sub-review (or /code-review) to review the branch; it writes the report with the commit and tree it saw. A report counts when its commit is the branch head or its tree is that head's tree (reviewed before committing). Escape hatch: AI_SETUP_NO_REVIEW=1 git merge x turns the deny into an ask (🔴 high risk, "WITHOUT a review report") and is logged. Writing into $DEV/reviews/ from Bash also asks (🔴). Known gaps: ! commands you type yourself, forging the report with the Write tool, and other options with values after a wrapper (sudo -h host git merge; -u -g -U -C are understood), GIT_DIR set via export/env, writes into reviews/ it misses (mv of a report out, cp -r without a trailing slash, dd of=, relative paths), and other ways to land on main (/usr/bin/git merge, git fetch . x:main, git branch -f main x, cherry-pick, git push origin x:main), and the local remote-tracking ref may be older than what git pull origin x fetches (the guard judges the one it sees). A bare git pull on the default branch when branch.<default>.merge points to another branch merges it without the gate (needs a prior config change). The Write of sub-review is limited to $DEV/reviews/ by instruction only (Claude agents cannot be path-restricted), and a relative write into reviews/ after a cd is not seen.

El cicloThe cycle

Seis pasos, y qué skill o puerta cubre cada uno. Es el ciclo que vende el README.Six steps, and which skill or gate covers each. This is the cycle the README sells.

#PasoStepLo cubreCovered by
1DecidirDecidegrillme te entrevista y escribe criteria.md (objetivo, fuera de alcance, criterios, hecho, y ## Slices si son varios PRs chicos)grillme interviews you and writes criteria.md (goal, out of scope, criteria, done, and ## Slices when it should be small PRs)
2GuardrailsGuardrailsrepo-guardrails: plantillas de AGENTS.md (reglas E: o con fecha), niveles de riesgo, CIrepo-guardrails: AGENTS.md templates (E: or dated rules), risk tiers, CI
3ConstruirBuildticket-flow orquesta; sub-builder escribe; sub-tester escribe un test por criterioticket-flow orchestrates; sub-builder writes; sub-tester writes one test per criterion
4Revisión independienteIndependent reviewsub-review revisa contra criteria.md; el merge gate exige su informesub-review checks against criteria.md; the merge gate requires its report
5Puerta humanaHuman gateGate 2 de ticket-flow y los avisos del guard (commit, push, merge): decides túticket-flow Gate 2 and the guard's asks (commit, push, merge): you decide
6AprenderLearnmeta-setup convierte un error repetido en regla E: o cambio de plantilla; ai-audit es el chequeo periódicometa-setup turns a repeated mistake into an E: rule or a template change; ai-audit is the periodic check

Auditar un repo: python3 -I $AI_SETUP/core/skills/ai-audit/audit.py <repo>. Solo lee e imprime; las notas son heurísticas, no una calificación.Audit a repo: python3 -I $AI_SETUP/core/skills/ai-audit/audit.py <repo>. It only reads and prints; scores are heuristics, not a grade.

ComandosCommands

DesdeFrom ~/Dev/ai-setup.

./install.shInstalar o actualizar en todas las herramientas. Borra las reglas de permisos que ya ningún policy.json genera (las que añadiste a mano se quedan)Install or update in every tool. Drops permission rules no policy.json generates any more (hand-added ones stay)
./install.sh --only coreSolo la capa genérica (sin flag repite el último perfil)Only the generic layer (no flag repeats the last profile)
./install.sh --layers-dir DIR --with <layer>Añade una capa guardada en otra carpeta o repo (--layers-dir es repetible y se recuerda)Add a layer kept in another folder or repo (--layers-dir is repeatable and remembered)
./install.sh --uninstall <layer>Quita esa capa de las herramientas (con backup). Elegir menos capas no quita nadaRemove that layer from the tools (with backup). Choosing fewer layers removes nothing
./install.sh --dry-runVer qué cambiaría, sin tocar nadaSee what would change, touch nothing
python3 -m unittest discover -s testsTests del setup (guard e instalador). install.sh los corre soloSetup tests (guard and installer). install.sh runs them itself
./install.sh --tools claude,opencodeSolo en estas herramientasOnly in these tools
./backup.sh [--without <layer>]Zip en ~/Downloads (con .git), verificado. --without <layer> deja fuera esa capa y el .gitZip in ~/Downloads (with .git), verified. --without <layer> leaves that layer and .git out
./backup.sh --full DEST [--dry-run]Copia cifrada con age (passphrase) de lo tuyo que no está en repos: handoffs, ai-notes, memory de Claude, dotfiles, Brewfile y las carpetas que una capa liste en backup de su policy.json. --dry-run lista qué entra y qué copiar a manoage-encrypted (passphrase) copy of your files that are not in repos: handoffs, ai-notes, Claude memory, dotfiles, Brewfile and the folders a layer lists in backup of its policy.json. --dry-run lists what goes in and what to copy by hand
./backup.sh --restore FILE.age [--home DIR] [--force]Restaura sin pisar (lista conflictos); --force deja .bak. Prueba antes con --home DIRRestores without overwriting (lists conflicts); --force keeps a .bak. Try it first with --home DIR
./bootstrap.py [--check | --dry-run] [--layers-dir DIR] [--only core]Mac limpia: instala brew, gh, Claude, OpenCode, LSP (y lo que pida el bootstrap.json de cada capa) y luego install.sh. --check compara esta Mac con los bootstrap.jsonClean Mac: installs brew, gh, Claude, OpenCode, LSP (and whatever each layer's bootstrap.json asks for), then install.sh. --check compares this Mac with the bootstrap.json files
git diff · git checkout -- <archivo>Ver y deshacer cambios del setup. Para publicar: git push con tu OK, desde una terminal normalSee and undo setup changes. To publish: git push with your OK, from a normal terminal
./add-skill.sh <url>Añadir una skill desde GitHubAdd a skill from GitHub
claude --bg --agent flow-ticket -w PROJ-123 "…"Ticket en segundo plano, en un worktree propioTicket in the background, in its own worktree
claude agents · claude attach <nombrename>Ver las sesiones en segundo plano · entrar en un gateList background sessions · step into a gate

Máquina nuevaNew machine

  1. git clone https://github.com/sebabottero/ai-setup.git ~/Dev/ai-setup (repo público, sin token). Si tus capas viven en otro repo, clónalo aparte (p. ej. ~/Dev/ai-setup-private) y pásalo con --layers-dir. No lo muevas después: los enlaces apuntan a esa ruta.git clone https://github.com/sebabottero/ai-setup.git ~/Dev/ai-setup (public repo, no token). If your layers live in another repo, clone it separately (e.g. ~/Dev/ai-setup-private) and pass it with --layers-dir. Don't move it afterwards: the links point to that path.
  2. xcode-select --install e instala Homebrew (brew.sh). En Linux no hace falta brew: bootstrap.py lista los paquetes para tu gestor (apt, dnf…) y sigue con el resto. Después ./bootstrap.py --dry-run y ./bootstrap.py (con tus capas: --layers-dir ~/Dev/ai-setup-private --only core,<layer>): instala brew, Claude, OpenCode, LSP y corre install.sh. Al final imprime los logins que faltan.xcode-select --install and install Homebrew (brew.sh). On Linux brew is not needed: bootstrap.py lists the packages for your package manager (apt, dnf…) and goes on with the rest. Then ./bootstrap.py --dry-run and ./bootstrap.py (with your layers: --layers-dir ~/Dev/ai-setup-private --only core,<layer>): installs brew, Claude, OpenCode, LSP and runs install.sh. It ends by printing the logins still missing.
  3. Vuelve a conectar los MCP de cada proyecto (claude mcp add … y después /mcp para el login). El instalador enlaza las notas de tus capas (<layer>/notes/) a $DEV/ai-notes/.Reconnect each project's MCPs (claude mcp add …, then /mcp to log in). The installer links your layers' notes (<layer>/notes/) to ~/ai-notes/.
Si algo sale malIf something breaks

Todo lo que el instalador reemplaza queda antes en ~/.ai-setup-backups/<fecha>/.Everything the installer replaces is first saved in ~/.ai-setup-backups/<date>/.