advpr
Gera scripts de automação de testes ADVPR (Advanced Protheus Robot) - TestSuite, TestGroup, TestCase para rotinas MVC, ExecAuto, relatórios, processamento,…
Migrate ADVPL procedural code to TLPP object-oriented code with classes, namespaces, and modern patterns
> /plugin marketplace add thalysjuvenal/advpl-specialist > /plugin install advpl-specialist@advpl-specialist-marketplace
How it fires
How this command gets triggered: by you, by Claude, or both.
/migrateContext preview
What this command does when you run it.
Migrate ADVPL procedural code to TLPP object-oriented code with classes, namespaces, and modern patterns
description: Migrate ADVPL procedural code to TLPP object-oriented code with classes, namespaces, and modern patterns allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent, WebSearch, WebFetch argument-hint: "<file.prw> [--output file.tlpp] [--dry-run]"
**IMPORTANT:** Always respond in the same language the user is writing in. If the user writes in Portuguese, respond in Portuguese. If in English, respond in English. Adapt all explanations and suggestions to the user's language. Code comments may remain in English or match the user's language.
Convert ADVPL procedural code to TLPP with object-oriented patterns.
/advpl-specialist:migrate <file.prw> [options]
| Flag | Description | Default | |------|------------|---------| | `--output` | Output .tlpp file path | Same name with .tlpp extension | | `--dry-run` | Show migration plan without generating files | false | | `--keep-original` | Keep the original .prw file | true | | `--wrapper` | Generate backward compatibility wrapper | true | | `--namespace` | Override namespace | Auto-detect from module |
**MANDATORY: Always enter planning mode before migrating code. Never skip planning.**
1. **Read source file** - Read the .prw file completely 2. **Analyze structure** - Identify functions, dependencies, shared variables 3. **Search for callers** - Grep codebase for `u_FunctionName` references
4. **Load reference** - Read `skills/advpl-to-tlpp-migration/reference.md` for rules and checklist 5. **Enter plan mode** - Use `EnterPlanMode` to create a structured migration plan 6. **Design class structure** - Map functions to classes and methods 7. **Present plan** - Show the user a detailed migration plan including:
8. **Wait for approval** - The user must approve the plan before any code is written. If the user requests changes, revise the plan. 9. **If --dry-run** - Stop here after showing the plan 10. **Exit plan mode** - Use `ExitPlanMode` after approval
11. **Execute migration** - Generate .tlpp file(s) following the approved plan and `skills/advpl-to-tlpp-migration/reference.md` 12. **Generate wrapper** - Create backward compatibility .prw wrapper if --wrapper 13. **Run checklist** - Validate against migration-checklist.md 14. **Report** - Show summary of changes
# Migrate a file (shows plan first, then generates) /advpl-specialist:migrate src/FATA001.prw # Preview migration without generating files /advpl-specialist:migrate src/FATA001.prw --dry-run # Specify output path and namespace /advpl-specialist:migrate src/FATA001.prw --output src/tlpp/PedidoService.tlpp --namespace mycompany.faturamento # Migrate without backward compatibility wrapper /advpl-specialist:migrate src/FATA001.prw --wrapper false
Plugin para Claude Code especializado em ADVPL e TLPP para desenvolvimento no ecossistema TOTVS Protheus — para desenvolvedores e consultores funcionais. Documentacao completa:
Gera scripts de automação de testes ADVPR (Advanced Protheus Robot) - TestSuite, TestGroup, TestCase para rotinas MVC, ExecAuto, relatórios, processamento,…
Diagnose errors and problems in ADVPL/TLPP code - compilation errors, runtime errors, performance issues, and log analysis
Look up Protheus documentation - native functions, SX data dictionary, REST APIs, MV parameters, and framework reference
Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs
Explain ADVPL/TLPP code in plain language for developers and functional consultants
Generate ADVPL/TLPP code - functions, classes, MVC structures, REST APIs, Web Services, and entry points for TOTVS Protheus