agentleFS
gabriel-codesampaiogabriel-codesampaio/explicai-workflow/skills/tdd/SKILL.md

tdd

Skill0 starsChanged 25 days agoMITView on GitHub

Constrói uma fatia com teste primeiro (vermelho, verde, refatorar), seguindo a arquitetura do projeto. Use ao implementar comportamento novo ou corrigir bug.

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use capture-learning-tools, design-frontend-dev and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • The-Vibe-CompanySkill

    capture-learning-tools

    Turn technical conversations, bugs, CI failures, review comments,

    Also in 5 projects that use this

  • The-Vibe-CompanySkill

    design-frontend-dev

    Clean Impeccable frontend design skill. Use when the user wants to

    Also in 5 projects that use this

  • jaydubya818Skill

    figure-it-out

    Use when novel or multi-phase work needs an auditable workflow and no narrower playbook fits.

    Also in 66 projects that use this

  • shiwenbin1617Skill

    ketchup-video

    Catch the user up like /ketchup, with a short subtitled video of slides for what happened and the waiting calls as text under it. Use for /ketchup-video.

    Also in 24 projects that use this

  • simo97Skill

    request-refactor-plan

    Use this skill when user wants to create a refactor plan.

    Also in 47 projects that use this

  • jaydubya818Skill

    principle-minimize-reader-load

    Apply when layers, wrappers, or hidden state make simple behavior hard to follow.

    Also in 57 projects that use this

  • +3 more from The-Vibe-Company
  • +2 more from jaydubya818

The file

Files
SKILL.md

Construir com teste primeiro

Ciclo

  1. Vermelho. Escreva o teste do comportamento que falta, no estilo dos testes que o projeto já tem. Rode e confirme que falha pelo motivo certo (não por erro de importação).
  2. Verde. Escreva o mínimo de código que faz o teste passar. Rode de novo.
  3. Refatorar. Com o teste verde, limpe: nomes, duplicação, arquivo grande demais. Rode de novo.
  4. Repita até cobrir os critérios de aceite da fatia.

Bug: o primeiro teste reproduz o bug e falha. A correção vai na causa, no código compartilhado, e não em cada lugar que chama.

Antes de escrever

  • Leia o código que a fatia toca e o que chama ele.
  • Procure no projeto o que já resolve parte do problema (função, componente, padrão). Reaproveite.
  • Siga as regras do projeto (CLAUDE.md, .claude/rules/): camadas, pastas, idioma dos comentários.

O que testar

  • Comportamento observável, não detalhe de implementação.
  • Casos de borda que importam: vazio, muito grande, dado vindo de fora estragado, caractere especial.
  • Ida e volta para tudo que é salvo e lido de novo: salvar e abrir não pode mudar o conteúdo.
  • Gravação: duas ao mesmo tempo não perdem mudança, e falha no meio não deixa arquivo pela metade.
  • Sem mock do que dá para usar de verdade barato (disco em pasta temporária, servidor numa porta livre).

Ao terminar a fatia

Devolva ao supervisor:

- Arquivos: caminho:linha, o que mudou
- Decisões: uma linha cada
- Vermelho: a linha do erro que o teste deu antes da correção
- Testes: criados/alterados e o comando que passou
- Pendente: o que ficou de fora e por quê

Não faça commit: o supervisor organiza os commits na entrega.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.