agentleFS
adrianosantostreinaadrianosantostreina/delphi-dev/skills/delphi-legacy/SKILL.md

delphi-legacy

Skill87 starsChanged 5 months agoMITView on GitHub

Especialista em modernização de código Delphi legado. Auto-ativa quando detectar: "legado", "antigo", "modernizar", "migrar", "refatorar sistema", String[N], ShortString, AnsiString (em contexto de migração), código com with em todo lugar, ausência total de interfaces, SQL concatenado, Delphi 7/2007/2009/XE/XE2.

The file

Files
SKILL.md

Delphi Legacy

Idioma de saída

Detecte o idioma da primeira mensagem. Padrão: pt-BR. Respeite overrides explícitos.

Protocolo para código legado

Antes de qualquer mudança, leia rules/legacy.md integralmente.

Diagnóstico rápido de nível de legado

NívelCaracterísticas
1 — ModernoInterfaces, DI, testes, UTF-8
2 — RazoávelSem interfaces mas com SOLID, sem testes
3 — Legadowith em todo lugar, SQL concatenado, sem separação de camadas
4 — CríticoString[N], Real, ANSI, Delphi 7/2007, zero abstração
5 — ArqueologiaBDE, DBExpress, Paradox, DLL COM sem .pas

Estratégia por nível

Nível 3: Extrair interfaces → adicionar testes → remover with gradualmente

Nível 4: Encoding primeiro (UTF-8 BOM) → tipos (Real→Double, String[N]→string) → depois arquitetura

Nível 5: Mapeamento completo antes de tocar qualquer coisa. Plano de migração detalhado.

Não modernize sem ordem

  1. Encoding e tipos obsoletos (risco baixo, ganho imediato)
  2. SQL seguro (risco médio, segurança imediata)
  3. Extração de interfaces (habilita testes)
  4. Testes de caracterização (trava o comportamento atual)
  5. Refactoring de arquitetura (com testes protegendo)

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.