Skip to content
Development
Command

/document

Generate technical documentation from ADVPL/TLPP source code - Protheus.doc headers, routine docs, API docs

From plugin
advpl-specialist
19514 skills10 agents14 commands2 hooks
> /plugin marketplace add thalysjuvenal/advpl-specialist
> /plugin install advpl-specialist@advpl-specialist-marketplace

Command definition

document.md
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
Read more
@thalysjuvenal
Ships withadvpl-specialist

Plugin para Claude Code especializado em ADVPL e TLPP para desenvolvimento no ecossistema TOTVS Protheus — para desenvolvedores e consultores funcionais. Documentacao completa:

19519 skills10 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
195
Star history of thalysjuvenal/advpl-specialist on GitHub, a chart by star-history.com

Other commands on advpl-specialist.

advpr

advpr

Command

Gera scripts de automação de testes ADVPR (Advanced Protheus Robot) - TestSuite, TestGroup, TestCase para rotinas MVC, ExecAuto,…

diagnose

diagnose

Command

Diagnose errors and problems in ADVPL/TLPP code - compilation errors, runtime errors, performance issues, and log analysis

docs

docs

Command

Look up Protheus documentation - native functions, SX data dictionary, REST APIs, MV parameters, and framework reference

generate

generate

Command

Generate ADVPL/TLPP code - functions, classes, MVC structures, REST APIs, Web Services, and entry points for TOTVS Protheus

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command