documentation-patterns
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseADVPL/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 Protheus.doc comment block for a single function/method, a markdown routine specification (objective, module, tables read/written, MV_* parameters, entry points, execution flow, dependencies, change history), and an REST endpoint document (authentication, path/query parameters, request body, response schemas).
headerfullapiActivate 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 ), looking up native function signatures to fill in documentation accurately (see ), or documenting the semantics of embedded SQL macros used inside a routine (see ).
code-explanationprotheus-referenceembedded-sql| Reference file | Read when |
|---|---|
| reference.md | Always -- the three documentation type templates (header/full/api) and the generation process |
本技能提供将ADVPL/TLPP源代码转换为Protheus标准技术文档的模板与生成流程。它涵盖三种输出类型:用于单个函数/方法的类型Protheus.doc注释块、类型的Markdown例程规范(目标、模块、读写表、MV_*参数、入口点、执行流程、依赖项、变更历史),以及类型的REST端点文档(身份验证、路径/查询参数、请求体、响应模式)。
headerfullapi当用户要求遵循TOTVS规范为现有代码生成或添加文档(头注释、完整例程规范或API文档)时,激活本技能。该流程会读取目标文件,从代码本身提取函数、参数、表、MV_*用法、入口点、依赖项,若可用则交叉核对git历史以获取作者和变更日志,然后填充对应的模板。
它不涵盖以下场景:面向受众用通俗对话语言解释代码(参见)、查找原生函数签名以准确填充文档(参见),或是记录例程中使用的嵌入式SQL宏的语义(参见)。
code-explanationprotheus-referenceembedded-sql| 参考文件 | 读取时机 |
|---|---|
| reference.md | 始终读取——包含三种文档类型模板(header/full/api)及生成流程 |