Cocobox

Fluxos de trabalho

Comece com um fluxo de trabalho que já funciona.

Um fluxo de trabalho é uma lista de etapas que um agente segue: etapas de agente, verificações que o próprio Cocobox executa e aprovações que esperam por você. Abra um no Cocobox, coloque seus próprios comandos e execute em qualquer aba de agente.

De ticket a pull request

Leia um ticket do Jira ou do Linear, combine um plano, construa numa branch com testes e abra um pull request.

  1. Agente
    Ler o ticket
  2. Aprovação
    Combinar o plano
    Este plano corresponde ao ticket? Recuse com uma nota para corrigi-lo.
  3. Agente
    Construir numa branch
    {{fill: test command}}
  4. Verificação
    Lint e tipos
    {{fill: lint or typecheck command}}
  5. Aprovação
    Enviar e abrir o PR
    Enviar a branch e abrir um pull request?
  6. Agente
    Abra o pull request

Executa 2 comandos como você, mostrados antes da primeira execução. Antes você preenche 2.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Ler o 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.
Construir numa branch
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.
Abra o 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 Qualquer agente que alcance seu gerenciador de tickets: um servidor MCP do Jira ou do Linear, uma CLI, ou cole o ticket na nota da execução. Precisa do gh (ou da CLI da sua forja) para abrir o PR.

Abrir no Cocobox Baixar

Consertar a CI que falha

Descubra por que a CI está vermelha nesta branch, reproduza localmente, conserte a causa (não o teste), envie e acompanhe a nova execução.

  1. Agente
    Ler a execução que falhou
  2. Agente
    Reproduzir aqui
  3. Agente
    Consertar a causa
    {{fill: the command CI failed on}}
  4. Verificação
    Suíte de testes completa
    {{fill: test command}}
  5. Aprovação
    Enviar a correção
    Enviar a correção e rodar a CI de novo?
  6. Agente
    Enviar e acompanhar

Executa 2 comandos como você, mostrados antes da primeira execução. Antes você preenche 2.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Ler a execução que falhou
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.
Reproduzir aqui
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.
Consertar a 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.
Enviar e acompanhar
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 Qualquer agente com shell e a CLI gh autenticada. Claude Code, Codex e Gemini CLI leem bem logs longos de CI.

Abrir no Cocobox Baixar

Atualização de dependências com testes

Atualize dependências em lotes seguros, leia as mudanças incompatíveis, conserte o que quebrar e prove com testes antes e depois.

  1. Verificação
    Testes passam antes
    {{fill: test command}}
  2. Agente
    Escolher o que atualizar
  3. Agente
    Atualizar e consertar
    {{fill: test command}}
  4. Verificação
    Compila
    {{fill: build command}}
  5. Agente
    Commit com resumo

Executa 3 comandos como você, mostrados antes da primeira execução. Antes você preenche 2.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Escolher o que atualizar
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.
Atualizar e consertar
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 com resumo
Commit. The message lists each package as old -> new version, and one line per breaking change you handled and how.

Para Qualquer agente com shell. Funciona com npm, pnpm, Cargo, pip, Bundler e módulos Go.

Abrir no Cocobox Baixar

Adicionar testes a um módulo

Mapeie o comportamento e os casos extremos de um módulo, escreva testes no estilo do projeto e prove que pegam uma linha quebrada.

  1. Agente
    Mapear o módulo
  2. Agente
    Escrever os testes
    {{fill: test command}}
  3. Agente
    Provar que os testes mordem
    {{fill: test command}}

Executa 2 comandos como você, mostrados antes da primeira execução. Antes você preenche 1.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Mapear o 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.
Escrever os testes
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.
Provar que os testes mordem
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 Qualquer agente. Escolha um cuidadoso (Claude Code, Codex) para a etapa de mutação.

Abrir no Cocobox Baixar

Notas de versão a partir de PRs mesclados

Reúna os pull requests mesclados desde a última versão e escreva notas de versão que os usuários consigam ler, no CHANGELOG.md.

  1. Agente
    Reunir PRs mesclados
  2. Agente
    Escrever as notas
    git diff --name-only | grep -qx CHANGELOG.md
  3. Aprovação
    Ler as notas
    Estas notas de versão estão certas? Recuse com uma nota para mudá-las.
  4. Agente
    Commit

Executa 1 comando como você, mostrado antes da primeira execução.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Reunir PRs mesclados
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.
Escrever as 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 Qualquer agente com a CLI gh autenticada. Barato e rápido: um modelo pequeno serve.

Abrir no Cocobox Baixar

Migração de banco de dados, testada numa cópia

Escreva uma migração reversível, aplique, reverta e aplique de novo na cópia de banco de dados da própria aba, revise os bloqueios e abra um PR.

  1. Agente
    Escrever a migração
  2. Agente
    Aplicar na cópia de desenvolvimento
    {{fill: migrate command}}
  3. Verificação
    Reverter e aplicar de novo
    {{fill: rollback command}} && {{fill: migrate command}}
  4. Verificação
    Testes
    {{fill: test command}}
  5. Agente
    Revisar os bloqueios
  6. Aprovação
    Abrir o PR
    A migração foi aplicada na cópia, revertida e aplicada de novo. Abrir um pull request?
  7. Agente
    Abra o pull request

Executa 3 comandos como você, mostrados antes da primeira execução. Antes você preenche 3.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Escrever a migração
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.
Aplicar na cópia de desenvolvimento
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 os bloqueios
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.
Abra o 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 Qualquer agente, num espaço com cópias de banco de dados ativadas (Postgres ou SQLite), para cada aba migrar a própria cópia.

Abrir no Cocobox Baixar

Revisão de código completa

Revise uma branch ou um pull request atrás de bugs, falhas de segurança e mudanças sem testes, confira cada achado duas vezes e conserte os que você aprovar.

  1. Agente
    Achar o que está errado
  2. Aprovação
    Escolher o que consertar
    Consertar estes achados? Aprove com uma nota dizendo quais (ou todos); recuse para ficar só com o relatório.
  3. Agente
    Consertar com um teste cada
    {{fill: test command}}

Executa 1 comando como você, mostrado antes da primeira execução. Antes você preenche 1.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Achar o que está errado
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.
Consertar com um teste cada
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 Melhor com um agente diferente do que escreveu o código: um modelo revisando outro.

Abrir no Cocobox Baixar

Documentação a partir do código

Descubra o que falta ou está errado na documentação lendo o código, e escreva documentação curta com exemplos tirados de execuções reais.

  1. Agente
    O que o código faz
  2. Agente
    Escrever a documentação
    {{fill: docs build or link check command}}
  3. Aprovação
    Ler a documentação
    A documentação está boa de ler? Recuse com uma nota para mudá-la.

Executa 1 comando como você, mostrado antes da primeira execução. Antes você preenche 1.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
O que o código faz
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.
Escrever a documentação
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 Qualquer agente. O contexto longo do Gemini CLI combina com bases de código grandes.

Abrir no Cocobox Baixar

Da planta 2D ao BIM

Briefing a partir de uma planta, texto ou imagens; modelagem conferida com o briefing; uma aba por disciplina (estrutura, hidráulica, elétrica, climatização); verificação de interferências e revisão federada.

  1. Agente
    Escrever o briefing de projeto
  2. Verificação
    O briefing é uma checklist
    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. Aprovação
    Confirmar o briefing
    O briefing de projeto está em bim/design-brief.md. É o que foi pedido? Edite-o ou aprove para começar a modelar.
  4. Agente
    Modelar a arquitetura e conferi-la com o briefing
  5. Verificação
    O arquivo de federação está consistente
    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. Aprovação
    Abrir as abas de disciplina
    A arquitetura, os eixos e os níveis estão em bim/, com a checklist do briefing e os renders. Confira; abro uma aba para estrutura, hidráulica, elétrica e climatização?
  7. Agente
    Uma aba por disciplina
  8. Agente
    Verificação de interferências
  9. Aprovação
    Enviar as interferências para as abas
    Enviar cada interferência para a aba responsável pelo elemento a mover, e verificar de novo quando terminarem?
  10. Agente
    Corrigir e verificar de novo

Executa 2 comandos como você, mostrados antes da primeira execução.

O que cada etapa de agente recebe como instrução (em inglês, como no arquivo)
Escrever o briefing de projeto
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 a arquitetura e conferi-la com o briefing
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.
Uma aba 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.
Verificação de interferências
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.
Corrigir e verificar de novo
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 Arquitetos e engenheiros com uma planta baixa (DXF é o ideal; uma imagem ou página de PDF com uma medida conhecida). Qualquer agente com shell: ele instala o IfcOpenShell em um venv. Requer o complemento Revisão CAD e BIM para revisar o modelo. O que ele gera de estrutura e instalações (MEP) é um rascunho que profissionais habilitados devem revisar.

Abrir no Cocobox Baixar

Nada aconteceu ao clicar em Abrir?

Abrir no Cocobox precisa do Cocobox 0.13.13 ou mais recente. Senão, clique em Baixar e, no app, abra o painel de fluxos de trabalho, clique em Importar… e escolha o arquivo (ou solte-o no painel). Baixe o Cocobox, grátis.

Compartilhe os seus

No app, abra um fluxo de trabalho e clique em Compartilhar…: o Cocobox tira antes caminhos, tokens, emails e nomes de host, e mostra exatamente o que sai. Copiar link dá um link como os desta página; o fluxo de trabalho vai dentro do link, então nada é enviado a lugar nenhum.

Guias: como os fluxos rodam, a galeria e os links compartilhados e da planta 2D ao BIM.