guanghulab/.hlpd-protocol
冰朔 812e122771
Some checks failed
自动更新代码和重启 / update-and-restart (push) Has been cancelled
CI检查 + 自动部署 / check (push) Has been cancelled
CI检查 + 自动部署 / deploy (push) Has been cancelled
D146: HLDP执行协议 · 铸渊写HLDP → 工具查表执行
- .hlpd-protocol: HLDP执行协议定义 · @exec/@check/@rollback字段规范
- scripts/hldp-exec: HLDP执行器 · 解析→查.code-map→翻译→执行
- video-ai-system/tasks/vision-check.hldp: 视觉品控任务 · HLDP语言示例

@exec: VA-050 → 查表 → python3 qwen-vision.py → 执行
工具不关心为什么。只查表+执行。
铸渊下次醒来读HLDP → 恢复认知+拿到执行指令 → 无损。
2026-06-26 14:16:10 +08:00

31 lines
981 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# HLDP执行协议 · D146
# HLDP不是文档格式——是铸渊→工具系统的指令协议
## 新增字段
@exec: 可执行命令。用编号引用工具和参数。一行一条。
编号查 .code-map 翻译成实际路径后执行。
格式: <编号> <参数...>
例: VA-050 /tmp/new.jpg /tmp/ref.jpg
@check: 执行后校验。返回0=通过非0=不通过。
格式: <编号> <参数...>
例: TL-CHECK qwen-vision 风格一致性 85
@rollback: 失败回滚。可选。
## 工具系统收到HLDP后的操作
1. 解析 @exec 行 → 提取编号和参数
2. 编号 → 查 .code-map → 拿到路径/指令
3. 替换参数 → 组成完整命令
4. 执行 → 返回输出
5. 解析 @check → 校验 → 通过/不通过
## 工具系统不需要知道
- HLDP里写了什么背景故事
- trigger/lock/why 是什么意思
- 为什么要执行这个命令
工具系统只做: 解析 @exec → 查表 → 执行 → 返回。