Cocobox

Flujos de trabajo

Empieza con un flujo de trabajo que ya funciona.

Un flujo de trabajo es una lista de pasos que sigue un agente: pasos de agente, comprobaciones que Cocobox ejecuta por sí mismo y aprobaciones que te esperan. Ábrelo en Cocobox, pon tus propios comandos y ejecútalo en cualquier pestaña de agente.

De ticket a pull request

Lee un ticket de Jira o Linear, acuerda un plan, constrúyelo en una rama con tests y abre un pull request.

  1. Agente
    Leer el ticket
  2. Aprobación
    Acordar el plan
    ¿Este plan se ajusta al ticket? Recházalo con una nota para corregirlo.
  3. Agente
    Construirlo en una rama
    {{fill: test command}}
  4. Comprobación
    Lint y tipos
    {{fill: lint or typecheck command}}
  5. Aprobación
    Subir y abrir el PR
    ¿Subir la rama y abrir un pull request?
  6. Agente
    Abre el pull request

Ejecuta 2 comandos como tú, que ves antes de la primera ejecución. Antes completas 2.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Leer el ticket
The ticket is in the run note: a Jira or Linear key, a URL, or the pasted text. Read it with what you have: the Jira or Linear MCP server, a CLI, or the pasted text. Do not guess a ticket you cannot open; fail the step and say so.
Write back, in at most 8 lines: the goal, each acceptance criterion, the files you expect to touch, and any open question. Do not change code in this step.
Construirlo en una rama
Create a branch named after the ticket key and a short title (proj-123-short-title) from the latest default branch.
Build the plan as agreed. Add or update tests for every acceptance criterion. Keep the diff to the ticket: no drive-by refactors.
Abre el pull request
Push the branch and open a pull request (gh pr create, or your forge's CLI). Title: the ticket key and a short summary. Body: what changed, how it was tested, which acceptance criteria are met, and a link to the ticket. Open it as a draft if any criterion is not met, and say which.

Para Cualquier agente que llegue a tu gestor de tickets: un servidor MCP de Jira o Linear, una CLI, o pega el ticket en la nota de la ejecución. Necesita gh (o la CLI de tu forja) para abrir el PR.

Abrir en Cocobox Descargar

Arreglar la CI que falla

Averigua por qué la CI está en rojo en esta rama, reprodúcelo en local, arregla la causa (no el test), sube y vigila la nueva ejecución.

  1. Agente
    Leer la ejecución fallida
  2. Agente
    Reproducirlo aquí
  3. Agente
    Arreglar la causa
    {{fill: the command CI failed on}}
  4. Comprobación
    Suite de tests completa
    {{fill: test command}}
  5. Aprobación
    Subir el arreglo
    ¿Subir el arreglo y volver a lanzar la CI?
  6. Agente
    Subir y vigilar

Ejecuta 2 comandos como tú, que ves antes de la primera ejecución. Antes completas 2.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Leer la ejecución fallida
Find the latest failed CI run for this branch: gh run list --branch "$(git branch --show-current)" --status failure --limit 1, then gh run view <id> --log-failed. Other CI systems: use their CLI or the URL in the run note.
Name the failing job, the step, and the first real error (not the last line). Say whether it looks flaky (network, timeout, rate limit) or like a fault in the code.
Reproducirlo aquí
Run the failing command locally. If it passes here, compare this machine with the CI job: runtime and tool versions, lockfile, environment variables, OS, test order. Say what differs.
Arreglar la causa
Fix the root cause. Do not skip, delete, retry-wrap or loosen a test or a lint rule to make it pass. If that is the only way, fail the step and explain why.
Subir y vigilar
Commit with a message naming the failing job and the cause. Push, then watch the new run (gh run watch) and report its result. If it fails again on something else, say what and stop.

Para Cualquier agente con shell y la CLI gh con sesión iniciada. Claude Code, Codex y Gemini CLI leen bien logs largos de CI.

Abrir en Cocobox Descargar

Actualizar dependencias con tests

Actualiza dependencias en lotes seguros, lee los cambios incompatibles, arregla lo que se rompa y demuéstralo con tests antes y después.

  1. Comprobación
    Los tests pasan antes
    {{fill: test command}}
  2. Agente
    Elegir qué actualizar
  3. Agente
    Actualizar y arreglar
    {{fill: test command}}
  4. Comprobación
    Compila
    {{fill: build command}}
  5. Agente
    Commit con resumen

Ejecuta 3 comandos como tú, que ves antes de la primera ejecución. Antes completas 2.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Elegir qué actualizar
List outdated dependencies with the ecosystem's own tool (npm outdated, cargo outdated, pip list --outdated, bundle outdated, go list -u -m all). If the run note names packages, upgrade only those.
Otherwise: patch and minor upgrades together, each major upgrade on its own. For every major upgrade, read its changelog or release notes and list the breaking changes that touch this code. Do not change files in this step.
Actualizar y arreglar
Upgrade the chosen packages and update the lockfile with the package manager (never by hand). Fix what the breaking changes break. Keep the diff to the upgrade: no unrelated refactors, no new dependencies.
Commit con resumen
Commit. The message lists each package as old -> new version, and one line per breaking change you handled and how.

Para Cualquier agente con shell. Sirve para npm, pnpm, Cargo, pip, Bundler y módulos de Go.

Abrir en Cocobox Descargar

Añadir tests a un módulo

Mapea el comportamiento y los casos límite de un módulo, escribe tests al estilo del proyecto y demuestra que detectan una línea rota.

  1. Agente
    Mapear el módulo
  2. Agente
    Escribir los tests
    {{fill: test command}}
  3. Agente
    Demostrar que los tests muerden
    {{fill: test command}}

Ejecuta 2 comandos como tú, que ves antes de la primera ejecución. Antes completas 1.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Mapear el módulo
The module is in the run note (a path or a name). Read it and its callers. List its public behaviour, its edge cases (empty, very large, invalid input, error paths, concurrency) and what is already tested.
Find the project's test framework and conventions from its existing tests. Do not add a new framework. Do not change files in this step.
Escribir los tests
Write tests for the untested behaviour, in the project's style. Test through the public interface, not private details. No large snapshot tests.
Do not change the module itself. If a test shows a bug, keep the test, mark it expected-to-fail the way this project does, and report the bug.
Demostrar que los tests muerden
Pick three of the new tests. For each, break the line of the module it guards, run it and see it fail, then restore the line exactly. Report which tests you checked. Leave the module unchanged: git diff on it must be empty.

Para Cualquier agente. Elige uno cuidadoso (Claude Code, Codex) para el paso de mutación.

Abrir en Cocobox Descargar

Notas de versión a partir de los PR fusionados

Reúne los pull requests fusionados desde la última versión y escribe notas de versión que los usuarios puedan leer, en CHANGELOG.md.

  1. Agente
    Reunir los PR fusionados
  2. Agente
    Escribir las notas
    git diff --name-only | grep -qx CHANGELOG.md
  3. Aprobación
    Leer las notas
    ¿Son correctas estas notas de versión? Recházalas con una nota para cambiarlas.
  4. Agente
    Commit

Ejecuta 1 comando como tú, que ves antes de la primera ejecución.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Reunir los PR fusionados
Find the last release tag (git describe --tags --abbrev=0) and its date. List the pull requests merged into the default branch since then: gh pr list --state merged --search "merged:>=<date>" --limit 200 --json number,title,author,labels,body. If the run note names a range or a version, use that instead. Do not change files in this step.
Escribir las notas
Add a section to CHANGELOG.md (create it if missing; follow its existing style) headed with the version in the run note, or Unreleased.
Group into New, Fixed, Changed and Breaking (with what users must do). One line per change, in users' words, with the PR number. Leave out CI, refactors and dependency bumps users never notice. Thank outside contributors by their GitHub handle.
Commit
Commit CHANGELOG.md alone. Do not tag, push or publish a release: that stays with the person.

Para Cualquier agente con la CLI gh con sesión iniciada. Barato y rápido: un modelo pequeño basta.

Abrir en Cocobox Descargar

Migración de base de datos, probada en una copia

Escribe una migración reversible, aplícala, revierte y aplica de nuevo en la copia de base de datos propia de la pestaña, revisa sus bloqueos y abre un PR.

  1. Agente
    Escribir la migración
  2. Agente
    Aplicarla en la copia de desarrollo
    {{fill: migrate command}}
  3. Comprobación
    Revertir y aplicar de nuevo
    {{fill: rollback command}} && {{fill: migrate command}}
  4. Comprobación
    Tests
    {{fill: test command}}
  5. Agente
    Revisar los bloqueos
  6. Aprobación
    Abrir el PR
    La migración se aplicó en la copia, se revirtió y se volvió a aplicar. ¿Abrir un pull request?
  7. Agente
    Abre el pull request

Ejecuta 3 comandos como tú, que ves antes de la primera ejecución. Antes completas 3.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Escribir la migración
The schema change is in the run note. Write it with the project's migration tool (Prisma, Rails, Alembic, Django, Flyway, sqlx, goose...). Write the down migration too.
Avoid long locks on big tables: add columns nullable or with a default the database adds without a rewrite, build indexes concurrently where supported, and backfill data in batches in a separate migration.
Aplicarla en la copia de desarrollo
Run the migration against this tab's own database copy (Cocobox gives each agent tab one when the space has database copies on). Never against a shared, staging or production database: if this tab has no copy of its own, fail the step and say so.
Report the row counts of the tables it touches.
Revisar los bloqueos
Read the migration as a reviewer: table locks and rewrites, data lost on down, defaults on big tables, missing indexes for new foreign keys. Fix what you find. Say how long it would lock and roughly how many rows it touches, from the copy's row counts.
Abre el pull request
Push the branch and open a pull request. In its body: what the migration does, the lock estimate and row counts, and how to roll it back.

Para Cualquier agente, en un espacio con copias de base de datos activadas (Postgres o SQLite), para que cada pestaña migre su propia copia.

Abrir en Cocobox Descargar

Revisión de código a fondo

Revisa una rama o un pull request en busca de bugs, agujeros de seguridad y cambios sin tests, comprueba cada hallazgo dos veces y arregla los que apruebes.

  1. Agente
    Encontrar lo que está mal
  2. Aprobación
    Elegir qué arreglar
    ¿Arreglar estos hallazgos? Aprueba con una nota que diga cuáles (o todos); rechaza para quedarte con el informe.
  3. Agente
    Arreglar con un test cada uno
    {{fill: test command}}

Ejecuta 1 comando como tú, que ves antes de la primera ejecución. Antes completas 1.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Encontrar lo que está mal
Review the pull request in the run note (gh pr diff <n>), or this branch against the default branch (git diff origin/HEAD...HEAD). Read the code around each change, not only the diff.
List findings, most severe first: bugs (wrong results, crashes, races, data loss), security (injection, missing auth checks, secrets, unchecked input), then changed behaviour with no test. For each: file:line, what breaks, and an input that breaks it. Skip what a formatter would fix. Do not edit code.
On a later pass, check each finding against the code again and drop any you cannot back with a concrete failing case.
Arreglar con un test cada uno
Fix the findings named in the approval note, or every bug and security finding if it named none. Each fix comes with a test that fails without it.

Para Mejor con un agente distinto del que escribió el código: un modelo revisando a otro.

Abrir en Cocobox Descargar

Documentación a partir del código

Descubre qué falta o está mal en la documentación leyendo el código, y escribe documentación breve con ejemplos sacados de ejecuciones reales.

  1. Agente
    Qué hace el código
  2. Agente
    Escribir la documentación
    {{fill: docs build or link check command}}
  3. Aprobación
    Leer la documentación
    ¿Se lee bien la documentación? Recházala con una nota para cambiarla.

Ejecuta 1 comando como tú, que ves antes de la primera ejecución. Antes completas 1.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Qué hace el código
From the code, not the existing docs, list the public API, CLI commands and flags, configuration keys and environment variables. If the run note names a module or a reader (new users, operators, contributors), keep to it.
Then list what is undocumented, and what the docs say that the code no longer does. Do not change files in this step.
Escribir la documentación
Update the docs where this project keeps them (README, docs/, doc comments). Every example comes from a real run or a test, never invented: run it and paste what it printed. Short pages with one working example beat long prose. Fix what the docs got wrong. Do not change code.

Para Cualquier agente. El contexto largo de Gemini CLI va bien para bases de código grandes.

Abrir en Cocobox Descargar

Del plano 2D a BIM

Programa de diseño a partir de un plano, texto o imágenes; modelado comprobado con el programa; una pestaña por disciplina (estructura, fontanería, electricidad, climatización); detección de interferencias y revisión federada.

  1. Agente
    Escribir el programa de diseño
  2. Comprobación
    El programa es una lista de verificación
    python3 -c "import re; t = open('bim/design-brief.md').read(); n = len(re.findall(r'^\s*- \[[ xX~]\]', t, re.M)); assert n >= 5, f'{n} checklist items'; assert re.search(r'must', t, re.I), 'must-haves'; print(n, 'items')"
  3. Aprobación
    Confirmar el programa
    El programa de diseño está en bim/design-brief.md. ¿Es lo que se pidió? Edítalo o apruébalo para empezar a modelar.
  4. Agente
    Modelar la arquitectura y compararla con el programa
  5. Comprobación
    El archivo de federación es coherente
    python3 -c "import json; m = json.load(open('bim/project.bim.json')); assert m['grid']['x'] and m['grid']['y'] and m['levels'], 'grid and levels'; assert {x['discipline'].lower() for x in m['models']} >= {'architecture', 'structure', 'plumbing', 'electrical', 'hvac'}, 'five disciplines'; print('ok')" && test -s bim/architecture.ifc
  6. Aprobación
    Abrir las pestañas de disciplina
    La arquitectura, los ejes y los niveles están en bim/, con la lista del programa y los renders. Revísalos; ¿abro una pestaña para estructura, fontanería, electricidad y climatización?
  7. Agente
    Una pestaña por disciplina
  8. Agente
    Detección de interferencias
  9. Aprobación
    Enviar las interferencias a las pestañas
    ¿Enviar cada interferencia a la pestaña responsable del elemento que hay que mover, y volver a comprobar cuando terminen?
  10. Agente
    Corregir y volver a comprobar

Ejecuta 2 comandos como tú, que ves antes de la primera ejecución.

Lo que se le dice a cada paso de agente (en inglés, como en el archivo)
Escribir el programa de diseño
Before any modelling, turn the request into bim/design-brief.md: the checklist this model is held to, and the review checks it. Read everything the person gave: the run note, their messages, a floor plan, attached reference images.
Sections, each item a checklist line ("- [ ] ..."), with sizes in metres where they matter:
1. Program: storeys, and every room with its rough size and what is in it (furnished rooms list their furniture).
2. Style and palette: the look in a few words, and named colours for walls, trim, roof, doors.
3. Key features: each one the person named or showed (say, a bay window, a round-topped door, a garage with its own gable, a chimney, a treehouse), with where it goes.
4. Must-haves and nice-to-haves: every key feature is a must-have unless the person said otherwise. Level of detail is a must-have too: if they asked for a richly detailed or lived-in model, say what that means here (furniture in every room, trim, fixtures).
5. Assumptions: what you had to decide yourself.
Reference images are for intent: layout, mood, level of detail. If the person asks to copy a copyrighted design (a show's house, a game's building, an architect's work), say so in one line in the brief and keep the design original unless they insist.
Restate the brief in your answer, short, so the person can confirm or change it.
Modelar la arquitectura y compararla con el programa
Model from bim/design-brief.md (read it again: the person may have edited it) and, if there is one, the floor plan. A DXF plan is best: read its layers (walls, doors, windows, grid) with ezdxf, and its scale from $INSUNITS. An image or a PDF page works too if the note gives one known dimension (say "the south wall is 15 m"): measure everything from that, and say how sure you are. Turn a PDF page into a PNG first (pdftoppm or sips).
Work in a bim/ folder in this tab. Use IfcOpenShell (in a venv if it is not installed). Call cad_kit first and build with its cocobox_bim.py blocks (walls with openings, roofs, bay windows, stairs, chimney, porch, furniture kits) rather than hand-made boxes. Write a script, not a one-off: a change is a rerun.
1. bim/architecture.ifc: the brief's must-haves first, then its nice-to-haves. One storey per level, GlobalIds derived from element names, so a rerun keeps them.
2. bim/project.bim.json, the federation file every discipline aligns to: name; units "m"; grid {x, y: [{name, at}]} from the plan's grid (or from the structural walls if it has none); levels [{name, elevation}] (ground floor, ceiling, beam soffit, roof structure, foundation); underlay {path, scale, origin, elevation} pointing at the plan if there is one (scale in metres per drawing unit or pixel); models: one entry per discipline (Architecture, Structure, Plumbing, Electrical, HVAC) with path architecture.ifc, structure.ifc and so on. Leave tab off Architecture: a comment on it then comes to the tab the person is in, normally this one.
3. Look at it: cad_render bim/architecture.ifc with views iso, front, back, left, right and a cutaway per storey (cutaway:<height>, 1.5 m over each floor; or render bim/project.bim.json with cutaway:<storey name>). Then go through bim/design-brief.md item by item and mark each met (- [x]), partial (- [~]) or missing (- [ ]), naming the image that shows it. Fix what is partial or missing and render again, up to two rounds. Anything you still leave out or simplify, say so and flag it: never drop a brief item silently.
4. Answer with the checklist and the rendered images embedded (![front](/full/path.png)), and bim/project.bim.json embedded so the person can orbit it and pin comments.
Una pestaña por disciplina
Open four tabs with open_tabs, one each for Structure, Plumbing, Electrical and HVAC, with permissions "bypass" if the person allows it. Each tab works only in its own worktree: it writes its file there, never in this folder. Give each, standing alone (they do not see this chat):
- the full path of bim/project.bim.json to read (never to change), and to use its grid and levels as they are, with one IfcBuildingStorey per level, the same names and elevations;
- to write bim/structure.ifc, bim/plumbing.ifc, bim/electrical.ifc or bim/hvac.ifc inside its own worktree, with an IfcOpenShell script kept there, GlobalIds derived from element names;
- its scope. Structure: pad footings, columns, beams and the ground slab on the grid. Plumbing: fixtures, cold and hot supply, drains. Electrical: panel, outlets, switches, lights and cable runs. HVAC: the unit(s) and ducts, with air terminals;
- to keep services in the ceiling zone between the Ceiling and Beam soffit levels where they fit, and say where they do not;
- to end its report with the absolute path of its file, and to say its model is a draft for a licensed professional to check;
- that a review comment may come later naming this project's copy of its file: it changes its own file and reports the path again;
- to render its file with cad_render (iso and a cutaway per storey) and check it before reporting, and to say plainly anything it left out or simplified;
- to end its turn after it reports, and never wait, sleep or poll for an answer: a message sent to a tab while its turn runs is queued until that turn ends, so waiting only delays it.
Write each tab's agent name into the federation file as that discipline's tab, so a comment pinned on its file goes to it. Answer their questions. End your turn while they work: their reports come back here. As each report arrives, copy the file it names into bim/ (overwrite). When all four are in, cad_render bim/project.bim.json (iso and a cutaway per storey), embed it and the images, and mark this step done.
Detección de interferencias
Write bim/clash.py with IfcOpenShell and run it: every element's bounding box in world coordinates (ifcopenshell.geom, use-world-coords), every pair from two different discipline files compared, Architecture against Structure skipped (columns sit in walls by design), overlaps under 10 mm ignored. An overlap that runs right through a wall's or slab's thickness is a penetration to sleeve, not a clash: count those apart. Write bim/clashes.json.
Report: how many clashes, each with the two elements (discipline, name, GlobalId), where (grid reference and level) and the likely fix; the penetrations as a count. Embed bim/project.bim.json so the person can pin a comment on a clash: a pin on a discipline's element goes to that discipline's tab. Say plainly that the structural, plumbing, electrical and HVAC models are drafts that a licensed professional must check before anything is built.
Corregir y volver a comprobar
Send each clash to the tab that should move its element (message_tab; ducts and pipes usually move, structure usually stays), with the two GlobalIds, the point and your suggested fix. As their reports come back, copy each file they name into bim/ again, then rerun bim/clash.py and report what is left.
End with the final report: bim/design-brief.md's checklist (each item met, partial or missing, with what is left to do), the cad_render images of the federated model (iso, front and a cutaway per storey) embedded, and bim/project.bim.json embedded again.

Para Arquitectos e ingenieros con un plano de planta (mejor DXF; una imagen o una página de PDF con una cota conocida). Cualquier agente con shell: instala IfcOpenShell en un venv. Necesita el complemento Revisión CAD y BIM para revisar el modelo. Lo que produce en estructura e instalaciones (MEP) es un borrador que deben revisar profesionales habilitados.

Abrir en Cocobox Descargar

¿No pasó nada al pulsar Abrir?

Abrir en Cocobox necesita Cocobox 0.13.13 o posterior. Si no, pulsa Descargar y, en la app, abre el panel de flujos de trabajo, pulsa Importar… y elige el archivo (o suéltalo en el panel). Descarga Cocobox, gratis.

Comparte los tuyos

En la app, abre un flujo de trabajo y pulsa Compartir…: Cocobox quita antes rutas, tokens, emails y nombres de host, y te muestra exactamente lo que sale. Copiar enlace te da un enlace como los de esta página; el flujo de trabajo viaja dentro del enlace, así que no se sube nada a ningún sitio.

Guías: cómo se ejecutan los flujos, la galería y los enlaces compartidos, y del plano 2D a BIM.