Files
zk-data-agent/skills/product-data/README.md
T
2026-05-11 11:46:09 +08:00

54 lines
1.5 KiB
Markdown
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.
# product-data
`product-data` 是产品/标签定义到标准数据记录的可迁移 skill 包。
设计原则:
- `SKILL.md` 描述流程、review 门禁和 Agent 使用方式。
- `knowledge/` 保存数据格式、生成协议和可维护知识。
- `scripts/` 保存可独立执行的脚本能力。
- `tools.yaml` 描述脚本如何被平台注册成工具;没有注册能力的 Agent 也可以直接调用脚本。
## 可迁移工具约定
脚本能力是本体,平台注册是适配层。
每个脚本都支持两种输入:
```bash
python skills/product-data/scripts/<tool>.py --input input.json
```
或:
```bash
cat input.json | python skills/product-data/scripts/<tool>.py
```
脚本统一输出 JSON
```json
{"ok":true}
```
失败时输出:
```json
{"ok":false,"error":"..."}
```
## 当前脚本
| 脚本 | 用途 |
| --- | --- |
| `scripts/normalize_dataset_draft.py` | 把 dataset draft text v1 转成 canonical records |
| `scripts/validate_dataset_records.py` | 校验 canonical records |
| `scripts/export_dataset_records.py` | 导出紧凑 JSONL/JSON,并默认生成同目录 `records.csv` 表格 |
| `scripts/export_dataset_table.py` | 已有 canonical records 时,只补生成同事流转表格 |
## 平台内优先级
在 ZK Data Agent 里,仍优先使用已注册的 `data_agent_*` 工具,因为它们带有平台级 review 状态门禁和 session 输出路由。
当运行环境没有这些工具,或其他 Agent 迁移使用本 skill 时,再使用 `scripts/` 里的 portable scripts。