documentation-patterns

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ADVPL/TLPP Documentation Patterns

ADVPL/TLPP 文档生成模式

This skill provides templates and a generation process for turning ADVPL/TLPP source code into Protheus-standard technical documentation. It covers three output types: a
header
Protheus.doc comment block for a single function/method, a
full
markdown routine specification (objective, module, tables read/written, MV_* parameters, entry points, execution flow, dependencies, change history), and an
api
REST endpoint document (authentication, path/query parameters, request body, response schemas).
Activate this skill when the user asks to generate or add documentation for existing code -- headers, full routine specs, or API docs -- following TOTVS conventions. The process reads the target file, extracts functions/parameters/tables/MV_* usage/entry points/dependencies from the code itself, cross-checks git history for author and change log when available, then fills the appropriate template.
It does not cover explaining code in plain conversational language for an audience (see
code-explanation
), looking up native function signatures to fill in documentation accurately (see
protheus-reference
), or documenting the semantics of embedded SQL macros used inside a routine (see
embedded-sql
).
Reference fileRead when
reference.mdAlways -- the three documentation type templates (header/full/api) and the generation process
本技能提供将ADVPL/TLPP源代码转换为Protheus标准技术文档的模板与生成流程。它涵盖三种输出类型:用于单个函数/方法的
header
类型Protheus.doc注释块、
full
类型的Markdown例程规范(目标、模块、读写表、MV_*参数、入口点、执行流程、依赖项、变更历史),以及
api
类型的REST端点文档(身份验证、路径/查询参数、请求体、响应模式)。
当用户要求遵循TOTVS规范为现有代码生成或添加文档(头注释、完整例程规范或API文档)时,激活本技能。该流程会读取目标文件,从代码本身提取函数、参数、表、MV_*用法、入口点、依赖项,若可用则交叉核对git历史以获取作者和变更日志,然后填充对应的模板。
它不涵盖以下场景:面向受众用通俗对话语言解释代码(参见
code-explanation
)、查找原生函数签名以准确填充文档(参见
protheus-reference
),或是记录例程中使用的嵌入式SQL宏的语义(参见
embedded-sql
)。
参考文件读取时机
reference.md始终读取——包含三种文档类型模板(header/full/api)及生成流程