Skip to content

docs: replace interface tables with sub-paragraph format; add module meta-info; expand param format#2

Merged
nevstop merged 4 commits intomainfrom
copilot/update-api-description-format
Mar 20, 2026
Merged

docs: replace interface tables with sub-paragraph format; add module meta-info; expand param format#2
nevstop merged 4 commits intomainfrom
copilot/update-api-description-format

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

Three doc convention changes to module-template.md and docs/csm-module-skill.md:

  1. API/status entries → ### sub-paragraphs — drop flat tables in favour of one sub-section per message, making individual entries easier to read and extend.
  2. Dependency section → 2-column table — replace the original 3-column table (name | type | link) with a 2-column table (linked name | type), eliminating the redundant separate link column.
  3. Module meta-info section added — a new ## 模块信息 table placed after ## 功能简述 captures LabVIEW version, supported OS, RT support, and 64-bit support.
  4. Parameter/response format expanded — each **参数** and **响应** entry now shows both the CSM serialization type (APIString, HexStr, MassData, …) and the actual LabVIEW data type + description. Cluster-type parameters enumerate fields as a sub-list.

New API entry format (module-template.md)

### `API: Initialize`

初始化内部资源。必须在其他 API 之前调用。

- **参数**`APIString``String`:配置文件路径
- **响应**:N/A

For compound data (Cluster):

- **参数**`HexStr``Cluster`- `Flag`:Boolean
  - `Level`:DBL

New status broadcast format

### `[状态名称 A]`

**广播类型**`Status`

[发生了什么 / 哪些数据已就绪]

- **参数**`HexStr``Cluster`- `[字段名]`[类型,例如 DBL]

Dependency table (2 columns)

| 依赖 | 类型 |
| --- | --- |
| [Communicable-State-Machine](https://github.com/NEVSTOP-LAB/Communicable-State-Machine) | 必须 |
| [CSM-API-String-Arguments-Support](https://github.com/NEVSTOP-LAB/CSM-API-String-Arguments-Support) | 可选 |

New module info section

## 模块信息

| 属性 ||
| --- | --- |
| LabVIEW 版本 |[版本号,例如 2019] |
| 支持的操作系统 | [Windows / Linux / macOS] |
| 支持 RT | [✅ 支持 / ❌ 不支持] |
| 支持 64-bit | [✅ 支持 / ❌ 不支持] |

docs/csm-module-skill.md updated accordingly: new sub-sections 3.1 and 3.2 document the module-info table and dependency table formats; section 4.2 specifies the CSM type — data type: description parameter pattern with Cluster sub-list example; section 4.3 updated with matching examples; the AI checklist (§10) and common-errors table (§11) updated to reflect all new conventions.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…r dependency links

Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Copilot AI changed the title [WIP] Update API documentation to use paragraphs for descriptions docs: replace interface tables with sub-paragraph format; use repo names for dependency links Mar 20, 2026
Copilot AI requested a review from nevstop March 20, 2026 07:37
| CSM INI Static Variable Support | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-INI-Static-Variable-Support) |
| CSM Mermaid Plugin | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin) |
| CSM TCP Router | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-TCP-Router-App) |
| Communicable State Machine (CSM) | 必须 | [Communicable-State-Machine](https://github.com/NEVSTOP-LAB/Communicable-State-Machine) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不就直接能简化了么

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已简化为分组项目列表,去掉冗余的表格列(链接文字本身就是仓库名,"依赖名"列完全多余):

**必须**
- [Communicable-State-Machine](https://github.com/NEVSTOP-LAB/Communicable-State-Machine)

**可选**(根据所用功能选择)
- [CSM-API-String-Arguments-Support](...)

提交:c8b6443

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也要增加一些 模块的 meta 信息,如支持的系统版本,labview版本, 是否支持 RT 等

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 功能简述 之后新增了 ## 模块信息 章节:

## 模块信息

| 属性 ||
| --- | --- |
| LabVIEW 版本 |[版本号,例如 2019] |
| 支持的操作系统 | [Windows / Linux / macOS] |
| 支持 RT | [✅ 支持 / ❌ 不支持] |
| 支持 64-bit | [✅ 支持 / ❌ 不支持] |

docs/csm-module-skill.md 中也同步更新了章节列表和 AI 检查清单。提交:c8b6443

…ndency list

Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Copilot AI changed the title docs: replace interface tables with sub-paragraph format; use repo names for dependency links docs: replace interface tables with sub-paragraph format; add module/interface meta-info; simplify dependency list Mar 20, 2026
Copilot AI requested a review from nevstop March 20, 2026 07:47
| CSM INI Static Variable Support | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-INI-Static-Variable-Support) |
| CSM Mermaid Plugin | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin) |
| CSM TCP Router | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-TCP-Router-App) |
**必须**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

保留表格,删除最后一列即可

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 修改这个

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已恢复为 2 列表格,链接嵌入依赖名称列,移除单独的链接列(提交:70174d6):

| 依赖 | 类型 |
| --- | --- |
| [Communicable-State-Machine](https://github.com/NEVSTOP-LAB/Communicable-State-Machine) | 必须 |
| [CSM-API-String-Arguments-Support](...) | 可选 |

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the CSM module documentation conventions and aligns both the canonical template and the AI skill guide to a more extensible, per-entry sub-paragraph structure.

Changes:

  • Replaces API/status interface tables with ### sub-paragraph entries (per message) and standardizes fields (调用方式 / 参数 / 响应).
  • Simplifies the dependency section into grouped bullet lists (必须 / 可选) using repository names as link text.
  • Adds a required ## 模块信息 metadata table (LabVIEW version, OS, RT, 64-bit).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
module-template.md Updates the module doc template to include 模块信息, grouped dependencies, and ###-based API/status entry formatting.
docs/csm-module-skill.md Updates the AI skill guide to specify and enforce the new 模块信息/依赖项 formats and the new per-entry API/status documentation structure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| **API** | **描述** | **参数数据类型** | **参数描述** | **响应数据类型** | **响应描述** |
| --- | --- | --- | --- | --- | --- |
| 完整消息字符串,包含前缀,例如 `` `API: Start` `` | 一句话说明该 API 的作用 | 参数的数据类型(例如 `APIString`、`MassData`、`${FilePath}` 等)。无参数时写 `N/A`。 | `>>` 之后传递的数据含义。无参数时写 `N/A`。 | 响应的数据类型。无响应或异步调用时写 `N/A`。 | 模块返回内容的含义。无响应或异步调用时写 `N/A`。 |
- **调用方式**:异步 (`->`) / 同步 (`-@`) / 无应答 (`->|`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要调用方式,因为任何消息都可以被当作同步和异步调用

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已从所有 API 段落和 skill 文档规范中移除 **调用方式** 字段(提交:70174d6)。

| CSM INI Static Variable Support | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-INI-Static-Variable-Support) |
| CSM Mermaid Plugin | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin) |
| CSM TCP Router | 可选 | [GitHub](https://github.com/NEVSTOP-LAB/CSM-TCP-Router-App) |
**必须**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 修改这个

初始化内部资源。必须在其他 API 之前调用。

- **调用方式**:异步 (`->`)
- **参数**:`APIString` — 配置文件路径
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数/响应都应该要有 CSM参数类型(APIString/MassData/HexStr等)和数据描述。

CSM参数类型:APIString
数据类型:Cluster
数据描述:
Flag:Boolean
Level:DBL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已更新参数/响应格式,同时标注 CSM 参数类型和数据类型+描述(提交:70174d6)。简单值:

- **参数**`APIString``String`:配置文件路径

复合数据(Cluster)展开字段:

- **参数**`HexStr``Cluster`- `Flag`:Boolean
  - `Level`:DBL

@nevstop
Copy link
Contributor

nevstop commented Mar 20, 2026

@copilot 修改以上的 comments

…ram format

Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Copilot AI changed the title docs: replace interface tables with sub-paragraph format; add module/interface meta-info; simplify dependency list docs: replace interface tables with sub-paragraph format; add module meta-info; expand param format Mar 20, 2026
Copilot AI requested a review from nevstop March 20, 2026 08:15
Copy link
Contributor Author

Copilot AI commented Mar 20, 2026

@copilot 修改以上的 comments

所有上方的 comments 均已在提交 70174d6 中处理完毕:

  1. 依赖项恢复为 2 列表格(依赖名含链接 | 类型),移除独立链接列
  2. 移除所有 API 段落中的 **调用方式** 字段
  3. 参数/响应格式扩展为 CSM参数类型数据类型:描述,复合数据(Cluster)用子列表展开字段

@nevstop nevstop marked this pull request as ready for review March 20, 2026 08:41
@nevstop nevstop merged commit 52aada8 into main Mar 20, 2026
1 check passed
@nevstop nevstop deleted the copilot/update-api-description-format branch March 20, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants