/document
Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs
> /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.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/document
Context preview
What this command does when you run it.
Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs
Command definition
document.mddescription: Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs
allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent, WebSearch, WebFetch
argument-hint: "<file> [--type header|full|api] [--output path]"
**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.
/advpl-specialist:document
Generate technical documentation from existing ADVPL/TLPP source code.
Usage
/advpl-specialist:document <target> [options]
Options
| Flag | Description | Default | |------|------------|---------| | `--type` | Documentation type: `header`, `full`, `api` | `full` | | `--output` | Output file path for the documentation | Display in chat |
Documentation Types
| Type | What it generates | |------|-------------------| | `header` | Protheus.doc comment block (can be inserted into source) | | `full` | Complete routine doc: objective, tables, MV_*, entry points, flow, dependencies | | `api` | REST API doc: endpoint, parameters, request/response, auth |
Process
1. **Parse arguments** — Identify target file and options 2. **Load documentation reference** — Read `skills/documentation-patterns/reference.md` 3. **Delegate to doc-generator agent** — Pass target and type 4. **Analyze code** — Read source, detect tables, parameters, functions, dependencies 5. **Enrich** — Cross-reference with `skills/protheus-reference/reference.md` and `skills/protheus-business/reference.md` 6. **Generate** — Apply the correct template with extracted data 7. **Deliver** — Display or save to output file
Examples
# Generate complete routine documentation
/advpl-specialist:document src/MATA461.prw
# Generate just the Protheus.doc header
/advpl-specialist:document src/MATA461.prw --type header
# Document a REST API endpoint
/advpl-specialist:document src/ApiClientes.tlpp --type api
# Save documentation to a file
/advpl-specialist:document src/MATA461.prw --output docs/MATA461.md
# Document all files in a directory
/advpl-specialist:document src/
Output
- **header:** Protheus.doc comment block ready to insert
- **full:** Markdown document with objective, tables, MV_*, entry points, flow, dependencies, history
- **api:** Markdown document with endpoint, HTTP method, parameters, request/response examples, auth
Read more
description: Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent, WebSearch, WebFetch argument-hint: "<file> [--type header|full|api] [--output path]"
**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.
/advpl-specialist:document
Generate technical documentation from existing ADVPL/TLPP source code.
Usage
/advpl-specialist:document <target> [options]
Options
| Flag | Description | Default | |------|------------|---------| | `--type` | Documentation type: `header`, `full`, `api` | `full` | | `--output` | Output file path for the documentation | Display in chat |
Documentation Types
| Type | What it generates | |------|-------------------| | `header` | Protheus.doc comment block (can be inserted into source) | | `full` | Complete routine doc: objective, tables, MV_*, entry points, flow, dependencies | | `api` | REST API doc: endpoint, parameters, request/response, auth |
Process
1. **Parse arguments** — Identify target file and options 2. **Load documentation reference** — Read `skills/documentation-patterns/reference.md` 3. **Delegate to doc-generator agent** — Pass target and type 4. **Analyze code** — Read source, detect tables, parameters, functions, dependencies 5. **Enrich** — Cross-reference with `skills/protheus-reference/reference.md` and `skills/protheus-business/reference.md` 6. **Generate** — Apply the correct template with extracted data 7. **Deliver** — Display or save to output file
Examples
# Generate complete routine documentation /advpl-specialist:document src/MATA461.prw # Generate just the Protheus.doc header /advpl-specialist:document src/MATA461.prw --type header # Document a REST API endpoint /advpl-specialist:document src/ApiClientes.tlpp --type api # Save documentation to a file /advpl-specialist:document src/MATA461.prw --output docs/MATA461.md # Document all files in a directory /advpl-specialist:document src/
Output
- **header:** Protheus.doc comment block ready to insert
- **full:** Markdown document with objective, tables, MV_*, entry points, flow, dependencies, history
- **api:** Markdown document with endpoint, HTTP method, parameters, request/response examples, auth
Plugin para Claude Code especializado em ADVPL e TLPP para desenvolvimento no ecossistema TOTVS Protheus — para desenvolvedores e consultores funcionais. Documentacao completa:
Other commands on advpl-specialist.
- /advpr
Gera scripts de automação de testes ADVPR (Advanced Protheus Robot) - TestSuite, TestGroup, TestCase para rotinas MVC, ExecAuto, relatórios, processamento, webservice, Smart View, TOTVS Message e SmartLink
Open command - /diagnose
Diagnose errors and problems in ADVPL/TLPP code - compilation errors, runtime errors, performance issues, and log analysis
Open command - /docs
Look up Protheus documentation - native functions, SX data dictionary, REST APIs, MV parameters, and framework reference
Open command - /explain
Explain ADVPL/TLPP code in plain language for developers and functional consultants
Open command - /generate
Generate ADVPL/TLPP code - functions, classes, MVC structures, REST APIs, Web Services, and entry points for TOTVS Protheus
Open command - /migrate
Migrate ADVPL procedural code to TLPP object-oriented code with classes, namespaces, and modern patterns
Open command

