diff --git a/internal/cli/schema_agent_metadata/doc.json b/internal/cli/schema_agent_metadata/doc.json index 27387e12..5702d4f0 100644 --- a/internal/cli/schema_agent_metadata/doc.json +++ b/internal/cli/schema_agent_metadata/doc.json @@ -783,7 +783,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ], "confirmation": "user_required", "effect": "write", @@ -797,14 +797,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": "复制文档/文件到指定文件夹或知识库", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -826,21 +826,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -883,7 +883,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": [ @@ -892,7 +892,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -979,7 +979,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -1006,7 +1006,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": [ @@ -1015,7 +1015,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] } @@ -1041,7 +1041,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ], "confirmation": "user_required", "effect": "write", @@ -1056,14 +1056,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "candidates": [ { "value": "在文档末尾追加一段文本(安全追加,不改动原有内容)", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。" } ] }, @@ -1085,21 +1085,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。" } ] }, @@ -1143,7 +1143,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "candidates": [ { "value": [ @@ -1153,7 +1153,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。" } ] }, @@ -1240,7 +1240,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。" } ] }, @@ -1267,7 +1267,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "candidates": [ { "value": [ @@ -1276,7 +1276,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。" } ] } @@ -1560,7 +1560,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ], "confirmation": "not_required", "effect": "read", @@ -1574,14 +1574,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "candidates": [ { "value": "提交在线文档导出任务 (docx/markdown/pdf),返回 jobId", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。" } ] }, @@ -1603,21 +1603,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。" } ] }, @@ -1660,7 +1660,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "candidates": [ { "value": [ @@ -1669,7 +1669,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。" } ] }, @@ -1756,7 +1756,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。" } ] }, @@ -1783,7 +1783,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "candidates": [ { "value": [ @@ -1792,7 +1792,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。" } ] } @@ -1818,7 +1818,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ], "confirmation": "not_required", "effect": "read", @@ -1833,14 +1833,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "candidates": [ { "value": "按关键词搜索云文档并投影关键字段(只读)", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。" } ] }, @@ -1862,21 +1862,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。" } ] }, @@ -1920,7 +1920,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "candidates": [ { "value": [ @@ -1930,7 +1930,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。" } ] }, @@ -2017,7 +2017,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。" } ] }, @@ -2044,7 +2044,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "candidates": [ { "value": [ @@ -2053,7 +2053,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。" } ] } @@ -2079,7 +2079,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ], "confirmation": "not_required", "effect": "read", @@ -2094,14 +2094,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "candidates": [ { "value": "列出文件夹或知识库下的直接子节点", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。" } ] }, @@ -2123,21 +2123,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。" } ] }, @@ -2181,7 +2181,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "candidates": [ { "value": [ @@ -2191,7 +2191,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。" } ] }, @@ -2278,7 +2278,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。" } ] }, @@ -2305,7 +2305,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "candidates": [ { "value": [ @@ -2314,7 +2314,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。" } ] } @@ -2340,7 +2340,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ], "confirmation": "user_required", "effect": "write", @@ -2354,14 +2354,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": "移动文档/文件到指定文件夹或知识库", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -2383,21 +2383,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -2440,7 +2440,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": [ @@ -2449,7 +2449,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -2536,7 +2536,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] }, @@ -2563,7 +2563,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "candidates": [ { "value": [ @@ -2572,7 +2572,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。" } ] } @@ -2598,7 +2598,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ], "confirmation": "not_required", "effect": "read", @@ -2613,14 +2613,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "candidates": [ { "value": "按关键词搜索有权限的文档 (不传则返回最近访问)", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。" } ] }, @@ -2642,21 +2642,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。" } ] }, @@ -2700,7 +2700,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "candidates": [ { "value": [ @@ -2710,7 +2710,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。" } ] }, @@ -2797,7 +2797,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。" } ] }, @@ -2824,7 +2824,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "candidates": [ { "value": [ @@ -2833,7 +2833,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。" } ] } @@ -2859,7 +2859,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ], "confirmation": "user_required", "effect": "write", @@ -2873,14 +2873,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "candidates": [ { "value": "按姓名把文档链接私信发给某人(自动解析 userId)", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。" } ] }, @@ -2902,21 +2902,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。" } ] }, @@ -2959,7 +2959,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "candidates": [ { "value": [ @@ -2968,7 +2968,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。" } ] }, @@ -3055,7 +3055,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。" } ] }, @@ -3082,7 +3082,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "candidates": [ { "value": [ @@ -3091,7 +3091,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。" } ] } @@ -3891,7 +3891,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ], "confirmation": "user_required", "effect": "destructive", @@ -3905,14 +3905,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "candidates": [ { "value": "回滚文档到指定历史版本", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。" } ] }, @@ -3934,21 +3934,21 @@ }, "avoid_when": { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "candidates": [ { "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。" } ] }, @@ -3991,7 +3991,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "candidates": [ { "value": [ @@ -4000,7 +4000,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。" } ] }, @@ -4087,7 +4087,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。" } ] }, @@ -4114,7 +4114,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "candidates": [ { "value": [ @@ -4123,7 +4123,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts." + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。" } ] } @@ -7495,35 +7495,35 @@ ] }, "doc create": { - "agent_summary": "创建一篇新的在线文档", + "agent_summary": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type \u003ctype\u003e(勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ], "confirmation": "not_required", "effect": "write", "effect_source": "command-verb", "examples": [ "dws doc create --name \"项目周报\" --format json", - "dws doc create --name \"Q1 总结\" --content \"# Q1 总结\" --folder \u003cFOLDER_ID\u003e --format json" + "dws doc create --name \"Q1 总结\" --content-file ./q1.md --workspace \u003cWORKSPACE_ID\u003e --format json" ], "field_provenance": { "agent_summary": { - "value": "创建一篇新的在线文档", + "value": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "candidates": [ { - "value": "创建一篇新的在线文档", + "value": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。" } ] }, @@ -7552,24 +7552,24 @@ "avoid_when": { "value": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type \u003ctype\u003e(勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "candidates": [ { "value": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type \u003ctype\u003e(勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。" } ] }, @@ -7604,22 +7604,22 @@ "examples": { "value": [ "dws doc create --name \"项目周报\" --format json", - "dws doc create --name \"Q1 总结\" --content \"# Q1 总结\" --folder \u003cFOLDER_ID\u003e --format json" + "dws doc create --name \"Q1 总结\" --content-file ./q1.md --workspace \u003cWORKSPACE_ID\u003e --format json" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "candidates": [ { "value": [ "dws doc create --name \"项目周报\" --format json", - "dws doc create --name \"Q1 总结\" --content \"# Q1 总结\" --folder \u003cFOLDER_ID\u003e --format json" + "dws doc create --name \"Q1 总结\" --content-file ./q1.md --workspace \u003cWORKSPACE_ID\u003e --format json" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。" } ] }, @@ -7698,7 +7698,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。" } ] }, @@ -7718,23 +7718,23 @@ }, "use_when": { "value": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "candidates": [ { "value": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。" } ] } @@ -7766,8 +7766,8 @@ "structured-hint:internal/cli/schema_hints/selection-review.json#doc.create_document" ], "use_when": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ] }, "doc delete": { @@ -9377,13 +9377,14 @@ ] }, "doc info": { - "agent_summary": "获取文档元信息(标题/类型/创建者/权限等)", + "agent_summary": "在已确认是 ALIDOC 后读取文档专属元信息", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ], "confirmation": "not_required", "effect": "read", @@ -9394,18 +9395,18 @@ ], "field_provenance": { "agent_summary": { - "value": "获取文档元信息(标题/类型/创建者/权限等)", + "value": "在已确认是 ALIDOC 后读取文档专属元信息", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "candidates": [ { - "value": "获取文档元信息(标题/类型/创建者/权限等)", + "value": "在已确认是 ALIDOC 后读取文档专属元信息", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。" } ] }, @@ -9433,25 +9434,27 @@ }, "avoid_when": { "value": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "candidates": [ { "value": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。" } ] }, @@ -9491,7 +9494,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "candidates": [ { "value": [ @@ -9501,7 +9504,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。" } ] }, @@ -9580,7 +9583,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。" } ] }, @@ -9600,23 +9603,23 @@ }, "use_when": { "value": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "candidates": [ { "value": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。" } ] } @@ -9647,8 +9650,8 @@ "structured-hint:internal/cli/schema_hints/selection-review.json#doc.get_document_info" ], "use_when": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ] }, "doc list": { @@ -11752,7 +11755,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ], @@ -11769,14 +11772,14 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "candidates": [ { "value": "读取完整文档内容,或按 outline/range/section/tags 获取 JSONML fragment", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。" } ] }, @@ -11804,25 +11807,25 @@ }, "avoid_when": { "value": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "candidates": [ { "value": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。" } ] }, @@ -11878,7 +11881,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "candidates": [ { "value": [ @@ -11888,7 +11891,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。" } ] }, @@ -11983,7 +11986,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。" } ] }, @@ -12011,25 +12014,25 @@ }, "use_when": { "value": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "candidates": [ { "value": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。" } ] } @@ -12060,8 +12063,8 @@ "structured-hint:internal/cli/schema_hints/selection-review.json#doc.get_document_content" ], "use_when": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ] }, @@ -14665,13 +14668,14 @@ ] }, "doc update": { - "agent_summary": "更新文档内容(追加 / 覆盖;覆盖需 --yes)", + "agent_summary": "用原生自动分片管道追加或整篇覆盖 adoc 内容", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ], "confirmation": "not_required", "effect": "write", @@ -14682,18 +14686,18 @@ ], "field_provenance": { "agent_summary": { - "value": "更新文档内容(追加 / 覆盖;覆盖需 --yes)", + "value": "用原生自动分片管道追加或整篇覆盖 adoc 内容", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "candidates": [ { - "value": "更新文档内容(追加 / 覆盖;覆盖需 --yes)", + "value": "用原生自动分片管道追加或整篇覆盖 adoc 内容", "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。" } ] }, @@ -14721,25 +14725,27 @@ }, "avoid_when": { "value": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "candidates": [ { "value": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。" } ] }, @@ -14795,7 +14801,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "candidates": [ { "value": [ @@ -14805,7 +14811,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。" } ] }, @@ -14884,7 +14890,7 @@ "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": false, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。" } ] }, @@ -14912,25 +14918,25 @@ }, "use_when": { "value": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "candidates": [ { "value": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ], "source": "internal/cli/schema_hints/selection/doc.json", "precedence": "reviewed_explicit", "selected": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。" + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。" } ] } @@ -14962,7 +14968,7 @@ "structured-hint:internal/cli/schema_hints/selection-review.json#doc.update_document" ], "use_when": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ] diff --git a/internal/cli/schema_agent_metadata/index.json b/internal/cli/schema_agent_metadata/index.json index fb72b4b4..e5c898ce 100644 --- a/internal/cli/schema_agent_metadata/index.json +++ b/internal/cli/schema_agent_metadata/index.json @@ -1,6 +1,6 @@ { "version": 1, - "source_hash": "sha256:add7be57e9ed6b69783be5df6d321c83ebe3b9c71a934e9991d91ee41fea23f4", + "source_hash": "sha256:709741e6cd06537bcf0c4bfb6a8930a14f9a43108128e1064b712bd9e2fbaa42", "surface_hash": "sha256:4897d582a472d9d3596f88fb4546e7795d6b9bc334d020712f5d895ce894f7a7", "coverage": { "surface_products": 26, diff --git a/internal/cli/schema_agent_metadata_audit.json b/internal/cli/schema_agent_metadata_audit.json index f265adaf..8baac4bc 100644 --- a/internal/cli/schema_agent_metadata_audit.json +++ b/internal/cli/schema_agent_metadata_audit.json @@ -1,6 +1,6 @@ { "version": 1, - "source_hash": "sha256:add7be57e9ed6b69783be5df6d321c83ebe3b9c71a934e9991d91ee41fea23f4", + "source_hash": "sha256:709741e6cd06537bcf0c4bfb6a8930a14f9a43108128e1064b712bd9e2fbaa42", "surface_hash": "sha256:4897d582a472d9d3596f88fb4546e7795d6b9bc334d020712f5d895ce894f7a7", "source_files": 160, "hint_files": 54, diff --git a/internal/cli/schema_catalog/catalog.json b/internal/cli/schema_catalog/catalog.json index b5bc81cf..9a0d8aea 100644 --- a/internal/cli/schema_catalog/catalog.json +++ b/internal/cli/schema_catalog/catalog.json @@ -1,12 +1,12 @@ { "version": 1, "surface_hash": "sha256:4897d582a472d9d3596f88fb4546e7795d6b9bc334d020712f5d895ce894f7a7", - "source_hash": "sha256:2bdcd3ac9d59f625cd4ed1e97938357b68ac483ef213a9e739baac67e3a1db3b", + "source_hash": "sha256:399dcd69d9f98e98ef9668edb6d965b59f5f61f9964f9546fb5796fee9b08865", "catalog": { "agent_metadata": { "products_with_metadata": 26, "source": "embedded-skill-metadata", - "source_hash": "sha256:add7be57e9ed6b69783be5df6d321c83ebe3b9c71a934e9991d91ee41fea23f4", + "source_hash": "sha256:709741e6cd06537bcf0c4bfb6a8930a14f9a43108128e1064b712bd9e2fbaa42", "surface_hash": "sha256:4897d582a472d9d3596f88fb4546e7795d6b9bc334d020712f5d895ce894f7a7", "surface_products": 26, "surface_tools": 875, @@ -15377,13 +15377,13 @@ }, { "agent_metadata_source": "embedded-skill-metadata", - "agent_summary": "创建一篇新的在线文档", + "agent_summary": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type \u003ctype\u003e(勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ], "canonical_path": "doc.create_document", "cli_name": "create", @@ -15404,8 +15404,8 @@ "risk": "medium", "title": "创建文档", "use_when": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ] }, { @@ -15665,7 +15665,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ], @@ -15688,20 +15688,21 @@ "risk": "low", "title": "读取文档内容 (Markdown)", "use_when": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ] }, { "agent_metadata_source": "embedded-skill-metadata", - "agent_summary": "获取文档元信息(标题/类型/创建者/权限等)", + "agent_summary": "在已确认是 ALIDOC 后读取文档专属元信息", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ], "canonical_path": "doc.get_document_info", "cli_name": "info", @@ -15722,8 +15723,8 @@ "risk": "low", "title": "获取文档元信息", "use_when": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ] }, { @@ -16244,7 +16245,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ], "canonical_path": "doc.shortcut_copy", "cli_name": "+copy", @@ -16270,7 +16271,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ], "canonical_path": "doc.shortcut_doc_append", "cli_name": "+doc-append", @@ -16322,7 +16323,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ], "canonical_path": "doc.shortcut_export_submit", "cli_name": "+export-submit", @@ -16348,7 +16349,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ], "canonical_path": "doc.shortcut_find_doc", "cli_name": "+find-doc", @@ -16374,7 +16375,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ], "canonical_path": "doc.shortcut_list", "cli_name": "+list", @@ -16400,7 +16401,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ], "canonical_path": "doc.shortcut_move", "cli_name": "+move", @@ -16426,7 +16427,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ], "canonical_path": "doc.shortcut_search", "cli_name": "+search", @@ -16452,7 +16453,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ], "canonical_path": "doc.shortcut_share_doc", "cli_name": "+share-doc", @@ -16556,7 +16557,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ], "canonical_path": "doc.shortcut_version_revert", "cli_name": "+version-revert", @@ -16820,13 +16821,14 @@ }, { "agent_metadata_source": "embedded-skill-metadata", - "agent_summary": "更新文档内容(追加 / 覆盖;覆盖需 --yes)", + "agent_summary": "用原生自动分片管道追加或整篇覆盖 adoc 内容", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ], "canonical_path": "doc.update_document", "cli_name": "update", @@ -16847,7 +16849,7 @@ "risk": "medium", "title": "更新文档内容", "use_when": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ] diff --git a/internal/cli/schema_catalog/tools/doc.json b/internal/cli/schema_catalog/tools/doc.json index 9397637f..7b9aef61 100644 --- a/internal/cli/schema_catalog/tools/doc.json +++ b/internal/cli/schema_catalog/tools/doc.json @@ -2316,13 +2316,13 @@ "structured-hint:internal/cli/schema_hints/products/doc.json", "structured-hint:internal/cli/schema_hints/selection-review.json#doc.create_document" ], - "agent_summary": "创建一篇新的在线文档", + "agent_summary": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type \u003ctype\u003e(勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ], "canonical_path": "doc.create_document", "cli_name": "create", @@ -2334,24 +2334,24 @@ "effect_source": "command-verb", "examples": [ "dws doc create --name \"项目周报\" --format json", - "dws doc create --name \"Q1 总结\" --content \"# Q1 总结\" --folder \u003cFOLDER_ID\u003e --format json" + "dws doc create --name \"Q1 总结\" --content-file ./q1.md --workspace \u003cWORKSPACE_ID\u003e --format json" ], "field_provenance": { "agent_summary": { "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", - "value": "创建一篇新的在线文档" + "value": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc" } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", - "value": "创建一篇新的在线文档" + "value": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc" }, "availability": { "candidates": [ @@ -2379,24 +2379,24 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type \u003ctype\u003e(勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type \u003ctype\u003e(勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ] }, "canonical_path": { @@ -2467,22 +2467,22 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc create --name \"项目周报\" --format json", - "dws doc create --name \"Q1 总结\" --content \"# Q1 总结\" --folder \u003cFOLDER_ID\u003e --format json" + "dws doc create --name \"Q1 总结\" --content-file ./q1.md --workspace \u003cWORKSPACE_ID\u003e --format json" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc create --name \"项目周报\" --format json", - "dws doc create --name \"Q1 总结\" --content \"# Q1 总结\" --folder \u003cFOLDER_ID\u003e --format json" + "dws doc create --name \"Q1 总结\" --content-file ./q1.md --workspace \u003cWORKSPACE_ID\u003e --format json" ] }, "idempotency": { @@ -2572,7 +2572,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -2622,22 +2622,22 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ] } }, @@ -3335,8 +3335,8 @@ "source": "reviewed_command_registry", "title": "创建文档", "use_when": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ] }, "doc.create_file": { @@ -8738,7 +8738,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ], @@ -8759,7 +8759,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "读取完整文档内容,或按 outline/range/section/tags 获取 JSONML fragment" @@ -8767,7 +8767,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "读取完整文档内容,或按 outline/range/section/tags 获取 JSONML fragment" }, @@ -8797,11 +8797,11 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ] @@ -8809,10 +8809,10 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ] @@ -8909,7 +8909,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -8920,7 +8920,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc read --node \u003cDOC_ID\u003e --format json", @@ -9030,7 +9030,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -9088,23 +9088,23 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ] } @@ -10022,8 +10022,8 @@ "source": "reviewed_command_registry", "title": "读取文档内容 (Markdown)", "use_when": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ] }, @@ -10046,13 +10046,14 @@ "structured-hint:internal/cli/schema_hints/products/doc.json", "structured-hint:internal/cli/schema_hints/selection-review.json#doc.get_document_info" ], - "agent_summary": "获取文档元信息(标题/类型/创建者/权限等)", + "agent_summary": "在已确认是 ALIDOC 后读取文档专属元信息", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ], "canonical_path": "doc.get_document_info", "cli_name": "info", @@ -10071,17 +10072,17 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", - "value": "获取文档元信息(标题/类型/创建者/权限等)" + "value": "在已确认是 ALIDOC 后读取文档专属元信息" } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "source": "internal/cli/schema_hints/selection/doc.json", - "value": "获取文档元信息(标题/类型/创建者/权限等)" + "value": "在已确认是 ALIDOC 后读取文档专属元信息" }, "availability": { "candidates": [ @@ -10109,24 +10110,26 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ] }, "canonical_path": { @@ -10197,7 +10200,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -10208,7 +10211,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc info --node \u003cDOC_ID\u003e --format json", @@ -10302,7 +10305,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -10352,22 +10355,22 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ] } }, @@ -10501,8 +10504,8 @@ "source": "reviewed_command_registry", "title": "获取文档元信息", "use_when": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ] }, "doc.get_document_style": { @@ -24544,7 +24547,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ], "canonical_path": "doc.shortcut_copy", "cli_name": "+copy", @@ -24562,7 +24565,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "复制文档/文件到指定文件夹或知识库" @@ -24570,7 +24573,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "复制文档/文件到指定文件夹或知识库" }, @@ -24594,20 +24597,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ] }, "canonical_path": { @@ -24676,7 +24679,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -24686,7 +24689,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +copy --node DOC_ID --folder TARGET_FOLDER_NODE_ID" @@ -24767,7 +24770,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -24813,7 +24816,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -24823,7 +24826,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你想保留原件、在另一个文件夹或知识库里生成一份文档/文件副本(例如以某篇文档为模板另存)时使用;输入源 node 与目标 folder/workspace,会实际创建一个副本。" @@ -25127,7 +25130,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ], "canonical_path": "doc.shortcut_doc_append", "cli_name": "+doc-append", @@ -25146,7 +25149,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "在文档末尾追加一段文本(安全追加,不改动原有内容)" @@ -25154,7 +25157,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "在文档末尾追加一段文本(安全追加,不改动原有内容)" }, @@ -25178,20 +25181,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ] }, "canonical_path": { @@ -25260,7 +25263,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -25271,7 +25274,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +doc-append --doc DOC_ID --text \"补充说明:本方案已评审通过。\"", @@ -25353,7 +25356,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -25399,7 +25402,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -25409,7 +25412,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你只想往一篇钉钉文档的最后面补一段文字、又不想动原有内容时使用;内部用文档更新的“追加(append)”模式,把你给的文本安全地拼到文档末尾,不需要你先去查文档块列表、算末尾位置或手工拼块结构。会真实写入文档内容。" @@ -26056,7 +26059,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ], "canonical_path": "doc.shortcut_export_submit", "cli_name": "+export-submit", @@ -26074,7 +26077,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "提交在线文档导出任务 (docx/markdown/pdf),返回 jobId" @@ -26082,7 +26085,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "提交在线文档导出任务 (docx/markdown/pdf),返回 jobId" }, @@ -26106,20 +26109,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ] }, "canonical_path": { @@ -26188,7 +26191,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -26198,7 +26201,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +export-submit --node DOC_ID --export-format markdown" @@ -26279,7 +26282,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -26325,7 +26328,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -26335,7 +26338,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你想把在线文档导出成 docx/markdown/pdf 文件(例如离线保存或外发)时使用;这是异步任务的第一步,输入 node 与 export-format 提交导出,返回 jobId,随后用 +export-get 轮询结果。" @@ -26595,7 +26598,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ], "canonical_path": "doc.shortcut_find_doc", "cli_name": "+find-doc", @@ -26614,7 +26617,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "按关键词搜索云文档并投影关键字段(只读)" @@ -26622,7 +26625,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "按关键词搜索云文档并投影关键字段(只读)" }, @@ -26646,20 +26649,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ] }, "canonical_path": { @@ -26728,7 +26731,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -26739,7 +26742,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +find-doc --query 季度汇报", @@ -26821,7 +26824,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -26867,7 +26870,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -26877,7 +26880,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你只记得云文档标题或内容里的某个关键词,想快速按关键词找到匹配的文档、拿到它的标题、URL、类型和 token 以便后续查看或编辑,却不想拿到一大坨原始字段时使用;内部调用云文档的 search_documents 工具,把 --query 作为搜索关键词(keyword),可选地用 --limit 限制返回条数(pageSize),再在本地把每条命中结果精简为「标题、URL、类型、token」四个字段后打印。这是纯只读操作,只做搜索与本地投影,不会创建、修改或删除任何文档;未命中时提示「没搜到文档」。" @@ -27097,7 +27100,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ], "canonical_path": "doc.shortcut_list", "cli_name": "+list", @@ -27116,7 +27119,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "列出文件夹或知识库下的直接子节点" @@ -27124,7 +27127,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "列出文件夹或知识库下的直接子节点" }, @@ -27148,20 +27151,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ] }, "canonical_path": { @@ -27230,7 +27233,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -27241,7 +27244,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +list --folder DOC_FOLDER_NODE_ID", @@ -27323,7 +27326,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -27369,7 +27372,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -27379,7 +27382,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你已知某个文档文件夹或知识库的 ID、想浏览它下面直接包含的文档与子文件夹(不递归深层)以便逐层导航时使用;输入 folder 或 workspace,返回该层级的子节点列表。" @@ -27761,7 +27764,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ], "canonical_path": "doc.shortcut_move", "cli_name": "+move", @@ -27779,7 +27782,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "移动文档/文件到指定文件夹或知识库" @@ -27787,7 +27790,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "移动文档/文件到指定文件夹或知识库" }, @@ -27811,20 +27814,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ] }, "canonical_path": { @@ -27893,7 +27896,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -27903,7 +27906,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +move --node DOC_ID --folder TARGET_FOLDER_NODE_ID" @@ -27984,7 +27987,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -28030,7 +28033,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -28040,7 +28043,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你要整理文档归属、把某篇文档/文件从当前位置挪到另一个文件夹或知识库(原位置不再保留)时使用;输入 node 与目标 folder/workspace,会实际改变文件的存放位置。" @@ -28344,7 +28347,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ], "canonical_path": "doc.shortcut_search", "cli_name": "+search", @@ -28363,7 +28366,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "按关键词搜索有权限的文档 (不传则返回最近访问)" @@ -28371,7 +28374,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "按关键词搜索有权限的文档 (不传则返回最近访问)" }, @@ -28395,20 +28398,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ] }, "canonical_path": { @@ -28477,7 +28480,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -28488,7 +28491,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +search --query \"会议纪要\"", @@ -28570,7 +28573,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -28616,7 +28619,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -28626,7 +28629,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你只记得文档的标题或主题词、需要先定位到某篇钉钉文档拿到它的 nodeId/URL 以便后续阅读或编辑时使用;可按关键词、扩展名、创建/访问时间、创建者等条件过滤,不传关键词则返回最近访问的文档,返回匹配的文档列表。" @@ -29680,7 +29683,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ], "canonical_path": "doc.shortcut_share_doc", "cli_name": "+share-doc", @@ -29698,7 +29701,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "按姓名把文档链接私信发给某人(自动解析 userId)" @@ -29706,7 +29709,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "按姓名把文档链接私信发给某人(自动解析 userId)" }, @@ -29730,20 +29733,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ] }, "canonical_path": { @@ -29812,7 +29815,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -29822,7 +29825,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +share-doc --to 张三 --url https://docs.dingtalk.com/xxx --note \"帮忙过一下\"" @@ -29903,7 +29906,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -29949,7 +29952,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -29959,7 +29962,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当你手上已经有一个文档链接、想直接私信发给某个人而不必先查 userId 时使用;内部先按姓名搜通讯录解析出唯一用户,再用 openDingTalkId 把链接拼成一条 Markdown 消息发出去,姓名匹配到多人时会列出候选让你区分。只发链接、不读取或改动文档本身,会真实发出消息。" @@ -32259,7 +32262,7 @@ "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ], "canonical_path": "doc.shortcut_version_revert", "cli_name": "+version-revert", @@ -32277,7 +32280,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": "回滚文档到指定历史版本" @@ -32285,7 +32288,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": "回滚文档到指定历史版本" }, @@ -32309,20 +32312,20 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ] }, "canonical_path": { @@ -32391,7 +32394,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -32401,7 +32404,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc +version-revert --node DOC_ID --version 3" @@ -32482,7 +32485,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -32528,7 +32531,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -32538,7 +32541,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "当文档被误改、你想把它整体恢复到某个历史版本时使用;先用 +version-list 找到目标版本号,再输入 node 与 version,会实际把文档内容覆盖回该版本,属于高风险写操作,需谨慎确认。" @@ -38098,13 +38101,14 @@ "structured-hint:internal/cli/schema_hints/products/doc.json", "structured-hint:internal/cli/schema_hints/selection-review.json#doc.update_document" ], - "agent_summary": "更新文档内容(追加 / 覆盖;覆盖需 --yes)", + "agent_summary": "用原生自动分片管道追加或整篇覆盖 adoc 内容", "agent_summary_source": "dws-agent-selection/doc", "availability": "available", "avoid_when": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ], "canonical_path": "doc.update_document", "cli_name": "update", @@ -38137,17 +38141,17 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", - "value": "更新文档内容(追加 / 覆盖;覆盖需 --yes)" + "value": "用原生自动分片管道追加或整篇覆盖 adoc 内容" } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", - "value": "更新文档内容(追加 / 覆盖;覆盖需 --yes)" + "value": "用原生自动分片管道追加或整篇覆盖 adoc 内容" }, "availability": { "candidates": [ @@ -38175,24 +38179,26 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ] } ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ] }, "canonical_path": { @@ -38279,7 +38285,7 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ @@ -38290,7 +38296,7 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ "dws doc update --node \u003cDOC_ID\u003e --content \"# 追加内容\" --mode append --format json", @@ -38384,7 +38390,7 @@ }, { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "selected": false, "source": "internal/cli/schema_hints/selection/doc.json", "value": true @@ -38442,11 +38448,11 @@ "candidates": [ { "precedence": "reviewed_explicit", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "selected": true, "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ] @@ -38454,10 +38460,10 @@ ], "precedence": "reviewed_explicit", "resolution": "highest_precedence", - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "source": "internal/cli/schema_hints/selection/doc.json", "value": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ] @@ -39518,7 +39524,7 @@ "source": "reviewed_command_registry", "title": "更新文档内容", "use_when": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ] diff --git a/internal/cli/schema_hints/selection/doc.json b/internal/cli/schema_hints/selection/doc.json index de160fe6..05068e13 100644 --- a/internal/cli/schema_hints/selection/doc.json +++ b/internal/cli/schema_hints/selection/doc.json @@ -82,22 +82,22 @@ ] }, "doc.create_document": { - "agent_summary": "创建一篇新的在线文档", + "agent_summary": "在默认根目录、文档文件夹或知识库根创建带可选初始内容的 adoc", "use_when": [ - "用户要新建一篇文字在线文档(adoc),可空文档或带初始 Markdown 时", - "创建到指定文件夹 --folder、知识库根 --workspace,或默认「我的文档」根目录时" + "用户要新建文字在线文档(adoc),可空文档或用 --content-file 写入 Markdown/JSONML 时", + "已知目标文档文件夹 --folder 或知识库 --workspace;长 Markdown 仍直接使用本命令,由原生写入管道自动分片" ], "avoid_when": [ "创建表格/脑图/白板/多维表/演示改用 dws wiki node create --type (勿用 doc create)", - "在知识库建空节点实体也可用 wiki node create;本命令侧重可写初始内容的 adoc", - "导入本地 Word/Markdown 为在线文档改用 dws doc import(若可用)或 upload --convert" + "只管理知识库空节点或层级时用 wiki node create;本命令侧重创建并写入 adoc", + "导入本地 Word/Markdown 并保留服务端转换语义时用 dws doc import;不要用自写分片脚本替代原生 create" ], "examples": [ "dws doc create --name \"项目周报\" --format json", - "dws doc create --name \"Q1 总结\" --content \"# Q1 总结\" --folder --format json" + "dws doc create --name \"Q1 总结\" --content-file ./q1.md --workspace --format json" ], "reviewed": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐当前 Cobra 原生内容写入管道、doc Skill 渐进路由与 workspace/folder 边界;强调长内容无需外部分片,不改变命令身份、参数或安全事实。", "source_refs": [ "CommandRegistry:canonical_path=doc.create_document", "cobra-help:dws doc create", @@ -295,12 +295,12 @@ "doc.get_document_content": { "agent_summary": "读取完整文档内容,或按 outline/range/section/tags 获取 JSONML fragment", "use_when": [ - "用户要读取钉钉在线文字文档(adoc)正文(Markdown)时", - "用户直接粘贴文档 URL 且无其他指令时(默认读内容)", + "已由 drive info 确认 extension=adoc,用户要读取正文(Markdown)时", + "用户提供已知 adoc nodeId/URL,且要读取内容或抽取指定章节时", "只需标题大纲、指定块区间/单块或特定 JSONML tags 时使用 --content-format jsonml 与 --scope" ], "avoid_when": [ - "非 adoc(表格/多维表/普通文件)不要用本命令;先 doc info 再路由", + "原始 alidocs URL 类型未知或目标不是 adoc 时先用 drive info 探测并路由;表格/多维表/普通文件不要用本命令", "要元信息用 doc info;要块结构用 doc block list", "Markdown 为有损投影:保形复制模板请用 doc copy,不要 read→create" ], @@ -309,7 +309,7 @@ "dws doc read --node --content-format jsonml --scope outline --max-depth 3" ], "reviewed": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 doc Skill 与 doc-info reference 的 extension 预检边界,并保留 Markdown/JSONML scope 的真实 Cobra 契约。", "source_refs": [ "CommandRegistry:canonical_path=doc.get_document_content", "cobra-help:dws doc read", @@ -321,22 +321,23 @@ ] }, "doc.get_document_info": { - "agent_summary": "获取文档元信息(标题/类型/创建者/权限等)", + "agent_summary": "在已确认是 ALIDOC 后读取文档专属元信息", "use_when": [ - "用户要查看文档/节点元信息(标题、类型、创建者、权限)时", - "准备读内容前必须先看 contentType/extension 以路由到 read/sheet/aitable/download 时" + "drive info 已确认是 ALIDOC,用户还要标题、创建者、权限或 docUrl 等文档专属元信息时", + "创建响应只有 nodeId、缺少 docUrl,需要补查文档链接时" ], "avoid_when": [ - "已确认是 adoc 且只要正文改用 dws doc read", + "原始 alidocs URL 的类型探测、extension 路由或可靠 fileSize 使用 dws drive info;不要先猜是文档", + "已确认是 adoc 且只要正文时改用 dws doc read", "只要目录列表改用 dws drive list / wiki node list", - "需要可靠文件大小 fileSize 时改用 dws drive info;文档元信息接口可能不返回大小" + "普通文件、电子表格或 AI 表格不使用本命令" ], "examples": [ "dws doc info --node --format json", "dws doc info --node \"https://alidocs.dingtalk.com/i/nodes/\" --format json" ], "reviewed": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 drive info 统一类型探测入口与 doc info 的文档专属补查职责;不改变 node 参数或接口绑定。", "source_refs": [ "CommandRegistry:canonical_path=doc.get_document_info", "cobra-help:dws doc info", @@ -739,23 +740,24 @@ ] }, "doc.update_document": { - "agent_summary": "更新文档内容(追加 / 覆盖;覆盖需 --yes)", + "agent_summary": "用原生自动分片管道追加或整篇覆盖 adoc 内容", "use_when": [ - "用户要向已有 adoc 追加内容时用 --mode append(更安全)", + "用户要向已有 adoc 追加长、多行或文件内容时用 --mode append + --content-file;CLI 自动分片", "用户明确要求整篇覆盖替换时用 --mode overwrite(破坏性)", "append 且要插到第 N 个 block 前时加 --index N(先 block list)" ], "avoid_when": [ - "目标不是 adoc 或只要改单个块时改用 doc block update", + "只在末尾补一小段纯文本优先 +doc-append;只改一个块用 doc block update", + "目标不是 adoc 时按 drive info 的 extension 切对应产品", "覆盖模式用户未确认前不要执行;可先 --dry-run 预览", - "创建新文档用 doc create,不要用 update 冒充创建" + "创建新文档用 doc create;不要预先手工分片或循环重试覆盖" ], "examples": [ "dws doc update --node --content \"# 追加内容\" --mode append --format json", "dws doc update --node --content-file ./body.md --mode overwrite --dry-run" ], "reviewed": true, - "review_reason": "人工审阅:结合本机 dws schema 实时 MCP description/parameters(经 interface_ref)、产品 Skill、Cobra Long 与 Runtime 确认门禁,按飞书风格重写选型文案;不改变命令身份、参数契约或接口绑定。", + "review_reason": "人工对齐 Runtime 的 10000 字符自动分片、append/overwrite 动态门禁与根 Skill 的写后回读流程;不改变参数和安全事实。", "source_refs": [ "CommandRegistry:canonical_path=doc.update_document", "cobra-help:dws doc update", @@ -905,14 +907,14 @@ "当你只记得文档的标题或主题词、需要先定位到某篇钉钉文档拿到它的 nodeId/URL 以便后续阅读或编辑时使用;可按关键词、扩展名、创建/访问时间、创建者等条件过滤,不传关键词则返回最近访问的文档,返回匹配的文档列表。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只有一个关键词且只要紧凑标题/URL/type/token 投影时优先 +find-doc;目标已给 nodeId/URL 时不要再搜索" ], "examples": [ "dws doc +search --query \"会议纪要\"", "dws doc +search --extensions pdf,docx" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工区分 +search 的丰富过滤/最近访问能力与 +find-doc 的单关键词紧凑投影,避免两个同源搜索 Shortcut 互相争抢。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_search", "cobra-help:dws doc +search", @@ -925,14 +927,14 @@ "当你已知某个文档文件夹或知识库的 ID、想浏览它下面直接包含的文档与子文件夹(不递归深层)以便逐层导航时使用;输入 folder 或 workspace,返回该层级的子节点列表。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "全局或钉盘目录浏览优先 drive list,知识库节点树优先 wiki node list;本 Shortcut 只列已知 doc folder/workspace 的直接子节点" ], "examples": [ "dws doc +list --folder DOC_FOLDER_NODE_ID", "dws doc +list --workspace WS_ID --limit 20" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 doc/drive/wiki 产品边界:保留已知文档文件夹/知识库的直接子节点投影,不替代常规目录管理。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_list", "cobra-help:dws doc +list", @@ -945,13 +947,13 @@ "当你想保留原件、在另一个文件夹或知识库里生成一份文档/文件副本(例如以某篇文档为模板另存)时使用;输入源 node 与目标 folder/workspace,会实际创建一个副本。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive copy;要搬走原件用 move;复制后必须从真实返回取副本 nodeId,禁止继续编辑源文档" ], "examples": [ "dws doc +copy --node DOC_ID --folder TARGET_FOLDER_NODE_ID" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐保形复制、真实副本 ID 与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_copy", "cobra-help:dws doc +copy", @@ -964,13 +966,13 @@ "当你要整理文档归属、把某篇文档/文件从当前位置挪到另一个文件夹或知识库(原位置不再保留)时使用;输入 node 与目标 folder/workspace,会实际改变文件的存放位置。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "常规文件管理优先 drive move;要保留原位置副本用 copy;目标位置不明确或未确认时不要移动" ], "examples": [ "dws doc +move --node DOC_ID --folder TARGET_FOLDER_NODE_ID" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 move 的原位置消失语义、目标位置确认与 drive 文件管理边界;保留 Runtime user_required 门禁。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_move", "cobra-help:dws doc +move", @@ -1041,13 +1043,13 @@ "当你想把在线文档导出成 docx/markdown/pdf 文件(例如离线保存或外发)时使用;这是异步任务的第一步,输入 node 与 export-format 提交导出,返回 jobId,随后用 +export-get 轮询结果。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "用户要直接拿到本地 docx/markdown/pdf 文件时使用一体化 dws doc export;不要默认手工编排 submit/get 轮询" ], "examples": [ "dws doc +export-submit --node DOC_ID --export-format markdown" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 atomic doc export 的一体化提交/轮询/下载路径,将 +export-submit 限定为明确异步控制场景。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_export_submit", "cobra-help:dws doc +export-submit", @@ -1117,13 +1119,13 @@ "当文档被误改、你想把它整体恢复到某个历史版本时使用;先用 +version-list 找到目标版本号,再输入 node 与 version,会实际把文档内容覆盖回该版本,属于高风险写操作,需谨慎确认。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "只查看历史用 +version-list,只保存当前快照用 +version-save;版本号未核实、用户未确认或只需改单块时不要回滚" ], "examples": [ "dws doc +version-revert --node DOC_ID --version 3" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐 version list → 明确确认 → revert → 回读的 ID 与高风险边界;不改变 typed_yes 安全门禁。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_version_revert", "cobra-help:dws doc +version-revert", @@ -1174,14 +1176,14 @@ "当你只想往一篇钉钉文档的最后面补一段文字、又不想动原有内容时使用;内部用文档更新的“追加(append)”模式,把你给的文本安全地拼到文档末尾,不需要你先去查文档块列表、算末尾位置或手工拼块结构。会真实写入文档内容。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "长、多行、表格或文件内容使用 doc update --mode append --content-file;指定位置或富结构使用 block insert;不要跳过 user_required 确认" ], "examples": [ "dws doc +doc-append --doc DOC_ID --text \"补充说明:本方案已评审通过。\"", "dws doc +doc-append --doc \"https://alidocs.dingtalk.com/i/nodes/\" --text \"追加一行备注\"" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 Shortcut 限定为短纯文本末尾追加,并对齐 user_required 与写后回读;长内容交给原生自动分片管道。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_doc_append", "cobra-help:dws doc +doc-append", @@ -1194,14 +1196,14 @@ "当你只记得云文档标题或内容里的某个关键词,想快速按关键词找到匹配的文档、拿到它的标题、URL、类型和 token 以便后续查看或编辑,却不想拿到一大坨原始字段时使用;内部调用云文档的 search_documents 工具,把 --query 作为搜索关键词(keyword),可选地用 --limit 限制返回条数(pageSize),再在本地把每条命中结果精简为「标题、URL、类型、token」四个字段后打印。这是纯只读操作,只做搜索与本地投影,不会创建、修改或删除任何文档;未命中时提示「没搜到文档」。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "需要最近访问、extension/时间/创建者等组合过滤时使用 +search;目标已给 nodeId/URL 时直接进入 info/read,不再搜索" ], "examples": [ "dws doc +find-doc --query 季度汇报", "dws doc +find-doc --query 合同 --limit 10" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工将 +find-doc 定位为高频单关键词紧凑投影,并与 +search 的丰富过滤能力做互斥路由。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_find_doc", "cobra-help:dws doc +find-doc", @@ -1214,13 +1216,13 @@ "当你手上已经有一个文档链接、想直接私信发给某个人而不必先查 userId 时使用;内部先按姓名搜通讯录解析出唯一用户,再用 openDingTalkId 把链接拼成一条 Markdown 消息发出去,姓名匹配到多人时会列出候选让你区分。只发链接、不读取或改动文档本身,会真实发出消息。" ], "avoid_when": [ - "需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令" + "同名人员未消歧、缺少真实文档 URL 或用户未确认时不要发送;本命令不授予文档权限,授权应走 drive permission" ], "examples": [ "dws doc +share-doc --to 张三 --url https://docs.dingtalk.com/xxx --note \"帮忙过一下\"" ], "reviewed": true, - "review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.", + "review_reason": "人工对齐人员消歧、真实 docUrl、user_required 消息发送门禁与文档权限边界。", "source_refs": [ "internal/cli/schema_command_registry.json#doc.shortcut_share_doc", "cobra-help:dws doc +share-doc", diff --git a/scripts/gen_skill_shortcut_sections.py b/scripts/gen_skill_shortcut_sections.py index fe174081..9df3e9e9 100644 --- a/scripts/gen_skill_shortcut_sections.py +++ b/scripts/gen_skill_shortcut_sections.py @@ -55,7 +55,12 @@ PRODUCT_END = "" # only after verifying that the product skill has its own reviewed routing # section and intent table; compacting a sparse skill without an alternative # route would make its shortcuts harder to discover. -COMPACT_PRODUCT_SERVICES = {"chat"} +COMPACT_PRODUCT_SERVICES = {"chat", "doc"} + +# These compact products have every public Shortcut curated into Runtime +# Schema. Keep this separate from COMPACT_PRODUCT_SERVICES because Chat still +# has reviewed exclusions pending curation. +FULLY_CURATED_COMPACT_PRODUCT_SERVICES = {"doc"} def md_escape(value: Any) -> str: text = str(value or "") @@ -135,10 +140,22 @@ def product_section(service: str, rows: list[dict[str, Any]]) -> str: def compact_product_section(service: str, rows: list[dict[str, Any]]) -> str: + if service in FULLY_CURATED_COMPACT_PRODUCT_SERVICES: + inventory = ( + f"`{md_escape(service)}` 当前有 {len(rows)} 条公开 Shortcut," + "已全部进入 Runtime Schema。完整清单保留在 Runtime Shortcut " + "Catalog,根 Skill 不重复展开;单条参数与安全契约按需查询 leaf Schema。" + ) + else: + inventory = ( + f"`{md_escape(service)}` 当前有 {len(rows)} 条公开 shortcut。" + "完整清单保留在 Runtime Shortcut Catalog;已完成 Schema curation " + "的子集可通过 leaf Schema 查询。高频产品根 Skill 不重复展开完整清单。" + ) return f"""{PRODUCT_START} ## Shortcut 发现(按需) -`{md_escape(service)}` 当前有 {len(rows)} 条公开 shortcut。完整清单保留在 Runtime Shortcut Catalog;已完成 Schema curation 的子集可通过 leaf Schema 查询。高频产品根 Skill 不重复展开完整清单。已知意图直接使用下方的优先路由、意图表或任务 reference;命令已选中时直接执行,只在参数/安全语义不确定时读取 leaf Schema,在当前 Cobra flags 不确定时读取 leaf Help。 +{inventory}已知意图直接使用下方的优先路由、意图表或任务 reference;命令已选中时直接执行,只在参数/安全语义不确定时读取 leaf Schema,在当前 Cobra flags 不确定时读取 leaf Help。 仅当现有路由和 reference 都无法定位低频能力时,才执行 `dws shortcut list --service {md_escape(service)} --compact --format json` 做最后回退;不要为已知高频意图加载完整 Shortcut Catalog 或产品级 Schema。 {PRODUCT_END}""" diff --git a/scripts/policy/check-skill-context-budget.sh b/scripts/policy/check-skill-context-budget.sh index 36c302e9..dfb1cc10 100755 --- a/scripts/policy/check-skill-context-budget.sh +++ b/scripts/policy/check-skill-context-budget.sh @@ -7,8 +7,10 @@ cd "$ROOT" python3 scripts/gen_skill_shortcut_sections.py --check chat_skill="skills/multi/dingtalk-chat/SKILL.md" +doc_skill="skills/multi/dingtalk-doc/SKILL.md" mono_skill="skills/mono/SKILL.md" chat_max_bytes=14000 +doc_max_bytes=9500 chat_bytes="$(wc -c < "$chat_skill" | tr -d ' ')" if [ "$chat_bytes" -gt "$chat_max_bytes" ]; then @@ -17,6 +19,13 @@ if [ "$chat_bytes" -gt "$chat_max_bytes" ]; then exit 1 fi +doc_bytes="$(wc -c < "$doc_skill" | tr -d ' ')" +if [ "$doc_bytes" -gt "$doc_max_bytes" ]; then + printf '%s\n' \ + "skill context budget exceeded: $doc_skill is ${doc_bytes} bytes (max ${doc_max_bytes})" >&2 + exit 1 +fi + shortcut_rows="$( awk ' // { in_block = 1; next } @@ -31,6 +40,20 @@ if [ "$shortcut_rows" -ne 0 ]; then exit 1 fi +doc_shortcut_rows="$( + awk ' + // { in_block = 1; next } + // { in_block = 0 } + in_block && /^\|[[:space:]]*`/ { count++ } + END { print count + 0 } + ' "$doc_skill" +)" +if [ "$doc_shortcut_rows" -ne 0 ]; then + printf '%s\n' \ + "skill context budget exceeded: $doc_skill re-expanded $doc_shortcut_rows shortcut rows" >&2 + exit 1 +fi + if grep -Fq "充分阅读产品参考文件" "$mono_skill"; then printf '%s\n' \ "skill context budget regression: $mono_skill requires full product-reference loading" >&2 @@ -38,4 +61,4 @@ if grep -Fq "充分阅读产品参考文件" "$mono_skill"; then fi printf '%s\n' \ - "skill context budget: ok (chat_bytes=$chat_bytes max=$chat_max_bytes shortcut_rows=$shortcut_rows)" + "skill context budget: ok (chat_bytes=$chat_bytes max=$chat_max_bytes shortcut_rows=$shortcut_rows; doc_bytes=$doc_bytes max=$doc_max_bytes shortcut_rows=$doc_shortcut_rows)" diff --git a/skills/multi/dingtalk-doc/SKILL.md b/skills/multi/dingtalk-doc/SKILL.md index a9bd7a99..19211b63 100644 --- a/skills/multi/dingtalk-doc/SKILL.md +++ b/skills/multi/dingtalk-doc/SKILL.md @@ -1,6 +1,6 @@ --- name: dingtalk-doc -description: 钉钉文档(adoc):创建、读取、编辑、块、评论、附件、导出、版本及Markdown/JSONML写入。原生 .md→dingtalk-misc;文件→dingtalk-drive;知识库→dingtalk-wiki;axls→dingtalk-misc,able→dingtalk-aitable。 +description: 钉钉在线文字文档(adoc):创建、读取、追加、覆盖、块级编辑、评论、附件、导入导出、版本、模板、封面/背景,以及 Markdown/JSONML 保真写入。Use when 用户要写文档、读文档、改正文、处理富文本块或文档评论。原生 .md 文件走 dingtalk-markdown;普通文件存储与上传下载走 dingtalk-drive;知识库空间/节点管理走 dingtalk-wiki;电子表格走 dingtalk-sheet,AI 表格走 dingtalk-aitable。命令前缀:dws doc。 metadata: cli_version: ">=0.2.14" category: product @@ -11,152 +11,93 @@ metadata: # 钉钉文档 Skill -## 前置条件 — 执行操作前必读 +## Preconditions -> **CRITICAL — 执行任何 `dws` 操作前,MUST 先用 Read 工具完整读取 [`dws-shared`](../dws-shared/SKILL.md)。**该轻量文件包含全局执行契约、安全底线及 shared references 的按需加载导航;不要预加载其全部 references。 +> **CRITICAL — Before any `dws` operation, MUST fully read [`dws-shared`](../dws-shared/SKILL.md).** It defines the global execution contract, safety floor, and on-demand shared-reference routing. Do not preload all references. -> 命令参考:[doc.md](references/doc.md);剧本:[04-document.md](references/04-document.md)。 - -## 参数硬约束 - -- 创建文档只用 `--name`,不要写 `--title`。 -- 目标文件夹只用 `--folder <文档文件夹nodeId或URL>`,不要写 `--parent` / `--parent-node` / `--parent-id`。 -- 目标知识库只用 `--workspace `,不要写 `--space-id` / `--spaceId`。 -- 文档内容只用 `--content` / `--content-file`,不要写 `--markdown`。 -- 复杂内容(换行、表格、代码块、长 Markdown)先写临时 `.md`,再用 `--content-file`,不要把大段 Markdown 塞进命令行。 -- 每次 `create` / `update` / `block insert` / `media insert` 后必须 `dws doc read` 或 `dws doc block list` 回读关键内容。 +> Atomic command router: [doc.md](references/doc.md); document workflows: [04-document.md](references/04-document.md). -## Shortcuts(无专用脚本/recipe 时优先) +## Shortcut 发现(按需) -以下 shortcut 同时进入公开 catalog 与 Runtime Schema。先按本 skill 的意图表、脚本和 recipe 路由:存在精确覆盖该场景的专用脚本/recipe 时按其执行;否则用户意图命中时,shortcut 优先于手写原子命令。命令已选中时直接执行;只在参数或安全语义不确定时读取 leaf Schema(例如 `dws schema --cli-path "doc +" --format json`),在当前 Cobra flags 不确定时读取 `dws doc --help`。仅当现有路由和 reference 都无法定位低频能力时,才用 `dws shortcut list --service doc --format json` 批量发现。 +`doc` 当前有 17 条公开 Shortcut,已全部进入 Runtime Schema。完整清单保留在 Runtime Shortcut Catalog,根 Skill 不重复展开;单条参数与安全契约按需查询 leaf Schema。已知意图直接使用下方的优先路由、意图表或任务 reference;命令已选中时直接执行,只在参数/安全语义不确定时读取 leaf Schema,在当前 Cobra flags 不确定时读取 leaf Help。 -| Shortcut | 风险 | 适用场景 | -|---|---|---| -| `dws doc +comment-create` | write | 在文档上创建一条评论 | -| `dws doc +comment-list` | read | 查询文档评论列表 | -| `dws doc +comment-reply` | write | 回复文档中的一条评论 | -| `dws doc +copy` | write | 复制文档/文件到指定文件夹或知识库 | -| `dws doc +doc-append` | write | 在文档末尾追加一段文本(安全追加,不改动原有内容) | -| `dws doc +export-get` | read | 根据 jobId 查询文档导出任务结果 | -| `dws doc +export-submit` | read | 提交在线文档导出任务 (docx/markdown/pdf),返回 jobId | -| `dws doc +find-doc` | read | 按关键词搜索云文档并投影关键字段(只读) | -| `dws doc +list` | read | 列出文件夹或知识库下的直接子节点 | -| `dws doc +move` | write | 移动文档/文件到指定文件夹或知识库 | -| `dws doc +search` | read | 按关键词搜索有权限的文档 (不传则返回最近访问) | -| `dws doc +share-doc` | write | 按姓名把文档链接私信发给某人(自动解析 userId) | -| `dws doc +template-list` | read | 获取文档模板列表 | -| `dws doc +template-search` | read | 根据关键词搜索文档模板 | -| `dws doc +version-list` | read | 查看文档历史版本列表 | -| `dws doc +version-revert` | high-risk-write | 回滚文档到指定历史版本 | -| `dws doc +version-save` | write | 手动保存文档版本快照 | +仅当现有路由和 reference 都无法定位低频能力时,才执行 `dws shortcut list --service doc --compact --format json` 做最后回退;不要为已知高频意图加载完整 Shortcut Catalog 或产品级 Schema。 -## 意图表 +## Atomic 回退与执行契约 -| 用户说 | 命令 | -|--------|------| -| "创建文档(短内容)" | `dws doc create --name "<标题>" --content "<内容>"` | -| "创建+写入(长内容自动分块)" | `python scripts/doc_create_and_write.py --name "<标题>" --content "<内容>" [--mode append\|overwrite]` | -| "搜在线文字文档 / 找在线文字文档" | `dws drive search --query "<关键词>" --format json` → `dws drive info --node --format json` → 仅 `extension=adoc` 使用 `dws doc read --node --format json` | -| "读在线文字文档(adoc)内容" | `dws doc read --node --format json` | -| "更新文档内容 / 分块追加" | `dws doc update --node --content "<分块>" --mode append` | -| "删除块" | `dws doc block delete`(需用户确认) | -| "导出 docx / markdown / pdf" | `dws doc export --node --export-format --output ` | -| "导入本地文件为在线文档" | `dws doc import --file --folder --name "<标题>" --format json`(详见 `references/doc/doc-import.md`) | -| "查模板 / 套用模板创建文档" | `dws doc template list|search|apply`(详见 `references/doc.md` 模板管理) | -| "保存 / 查看 / 回滚在线文字文档(adoc)版本" | `dws doc version save/list/revert` | +没有 Shortcut 时,才按需读取 [doc.md](references/doc.md) 指向的一个 atomic branch reference。路由优先级为 `已评审直接骨架/精确 recipe > 匹配的公开 Shortcut > atomic fallback`。`doc_create_and_write.py` 只在用户明确需要可复用本地包装器且 `python3` 可用时使用;普通创建直接调用 `dws doc create`。 -## 标准 SOP(必遵流程) +命令确定且参数清楚时直接执行,不重复发现。只使用真实 `cli_path`,不猜参数。`confirmation=user_required` 时先确认,再添加 `--yes`;来源冲突时采用更安全解释并报告契约漂移。 -> 命中以下意图**必须**按对应 SOP 顺序执行;**禁止**跳步、替换命令、编造 nodeId/blockId。结构化命令必须带 `--format json`,执行后必须按"验证"步回读真实字段。文件类操作(上传/下载/复制/移动)切 `dingtalk-drive`;知识库节点管理切 `dingtalk-wiki`。 +## 核心对象、位置与格式 -### SOP-1 查找并读取文档(query-doc) +| 对象 | 核心标识与边界 | +|---|---| +| 文档 | 使用真实 `nodeId` / `dentryUuid` 或完整 alidocs URL;纯数字 `dentryId`、单独 `dentryKey` 不能替代 | +| 目标位置 | `--folder` 只接文档文件夹 nodeId/URL;`--workspace` 只接知识库 ID/URL;不要猜 `--parent*` | +| 块 | `blockId` / JSONML `uuid` 必须来自 `block list`,更新节点的 uuid 必须与目标块一致 | +| 评论 | `commentKey` 来自评论 list/create;划词评论还需同一块的真实 `start/end` | +| 异步任务 | 导出 `jobId` 与导入 `taskId` 只查询对应任务,不能替代 nodeId | +| 内容格式 | Markdown 适合线性正文;已有富结构优先 JSONML/块级编辑,禁止用 Markdown overwrite 误称保真 | +| 普通文件 | adoc 才用 `doc read/export`;`.md`、axls、able 和普通文件按真实 `extension` 切对应 Skill | -**触发**:查文档/读文档/某文档在哪/搜文档内容。 +## 核心意图与执行骨架 -1. **定位(必须)**:用户已提供 URL / `nodeId` 时直接使用原值;未提供目标时才执行 `dws drive search --query "<关键词>" --format json`,再取候选结果的真实 `nodeId`。 -2. **探测(必须)**:对选中的候选执行 `dws drive info --node --format json`,从真实返回读取 `extension`;不得因为搜索结果标题像“文档”就跳过探测。 -3. **按类型读取(必须)**: - - `extension=adoc`:`dws doc read --node --format json`;大文档只抽取用户需要的章节。 - - `extension=md`:切到 `dingtalk-markdown` 用 `dws markdown fetch --node --format json` 读取原文;仅需文件实体下载时切 `dingtalk-drive` 用 `drive download`。 - - `extension=axls`:切到 `dingtalk-misc`,读取 `references/sheet.md` 后按电子表格意图执行。 - - `extension=able`:切到 `dingtalk-aitable`。 - - `extension=xlsx` / `xls` / `xlsm` / `csv` 或其他普通文件:切到 `dingtalk-drive`;不得执行 `dws doc read`。 +所有结构化命令加 `--format json`,下游 ID 只取真实输出。创建、更新、块、附件和样式写入后回读;返回成功但未回读,不能宣称内容完整。 -**禁止**:用户未提供目标时跳过搜索并猜 nodeId、未探测类型就执行 `doc read`、把整篇文档原样贴给用户。 +| 用户意图 | 精确骨架 | 必须保留的执行边界 | +|---|---|---| +| 按名称找文档 | `+find-doc --query <关键词>`;需最近访问/扩展名/创建者等过滤用 `+search` | 候选不唯一先消歧;随后 `drive info --node ` 判 `extension` | +| 读取 adoc | `drive info --node ` → `doc read --node ` | 用户已给 nodeId/URL 时不再搜索;非 adoc 不调用 `doc read` | +| 创建文档 | `doc create --name <标题> --content-file [--folder | --workspace ]` | 原生写入管道自动分片;取 `nodeId` 后 `doc read`,缺链接再 `doc info` | +| 末尾补短文本 | `+doc-append --doc --text <内容>` | 该 Shortcut 为 write/user_required;确认后执行并 `doc read` 核对 | +| 改写正文 | `doc read --content-format jsonml` → `block update` 或 `doc update --content-format jsonml --mode overwrite` | 单块优先块级编辑;整篇 overwrite 先预览/确认,Markdown overwrite 不保富结构 | +| 评论与回复 | `+comment-list --node ` → `+comment-create` / `+comment-reply` | `commentKey` 来自真实结果;写 Shortcut 先确认;划词评论走 atomic `comment create-inline` | +| 导入 / 导出 | `doc import --file ...` / `doc export --node --export-format --output ` | 一体化命令优先;仅超时/中断后用 `import get` / `export get` | +| 版本操作 | `+version-list --node ` → `+version-save` / `+version-revert --version ` | save/revert 先确认;revert 版本号必须来自 list,完成后回读 | +| 模板创建 | `+template-list` / `+template-search --query <词>` → atomic `template apply --template-id ` | templateId 来自真实列表;要复刻已有文档形态时用 drive copy + 副本块级更新 | +| 分享链接给某人 | `+share-doc --to <姓名> --url [--note <附言>]` | 会真实发消息,确认后执行;同名人员必须消歧,不改变文档权限 | -### SOP-2 创建文档并写入(create-doc) +## 写入与验证边界 -**触发**:新建文档/写一篇/建文字文档。 +- 创建只用 `--name`;内容只用 `--content` / `--content-file`。长、多行、表格或特殊字符必须用临时 UTF-8 文件和 `--content-file`。 +- 原生 Markdown 写入管道在内容超过 10,000 个 Unicode 字符时自动按结构分片;不要在 Skill 或脚本中预先复制分片循环。仅在 `CONTENT_TRUNCATED`、中断或回读缺失时按 [04-document.md](references/04-document.md) 恢复。 +- `doc update --mode append` 不清空原文;`--mode overwrite` 会清空后重写,先 `--dry-run`,得到确认后才加 `--yes`。 +- 已有 callout、分栏、样式、@人、图片或附件时,先读 JSONML;局部改动优先 `block update`,不要用 Markdown 整篇重写。 +- `block insert` 默认追加;只有明确相对位置时才传真实 `--ref-block` / `--parent-block`。`block delete` 和评论删除必须确认。 +- 写后按对象验证:正文用 `doc read`,块/附件用 `doc block list`,元信息/链接用 `doc info`,版本用 `version list`。 -1. **执行(必须)**:`dws doc create --name "<标题>" --content-file [--folder | --workspace ] --format json`(长/多行内容用 `--content-file`,不要用 `--content` 拼长串;用户未指定位置时省略两个位置参数,创建到“我的文档”根目录)。 -2. **验证(必须)**:从返回取 `nodeId`,立即 `dws doc info --node --format json` 回读确认。 +## 低频 atomic 路由 -**禁止**:创建后不回读就答复"已创建"、把 `--folder` 当成空间 ID 传入。 +```text +dws doc +├── info / read +├── create / update +├── block # list, insert, update, delete +├── comment # list, create, reply, update, delete, create-inline +├── media # insert, download +├── import / export +├── template / version / style +├── +shortcut +└── deprecated file operations → drive/wiki +``` -### SOP-3 覆盖/追加内容(write-content) +按需读取,不要预加载:定位与 URL 边界读 [doc-info.md](references/doc/doc-info.md);创建/改写读 [doc.md](references/doc.md) 的场景索引所列文件组;块、评论、附件、导入、导出分别读对应 branch reference。JSONML schema/cookbook 仅在实际选择 JSONML 写入后加载。 -**触发**:覆盖写/追加内容/改文档正文。 +## 错误恢复 -1. **执行(必须)**:覆盖先执行 `dws doc update --node --mode overwrite --content-file --dry-run --format json` 预览,用户确认后改用 `--yes` 实际覆盖;追加执行 `dws doc update --node --mode append --content-file --format json`。 -2. **验证(必须)**:写后 `dws doc read --node --format json` 抽取受影响段落核对。 - -**禁止**:不加 `--yes` 反复重试覆盖、跳过 `--dry-run` 直接覆盖未确认的长文档。 - -### SOP-4 导出 / 下载(export-doc) - -**触发**:导出文档/下载文档/转 PDF·Markdown。 - -1. **判类型(必须)**:先 `dws drive info --node --format json`;`extension=adoc` → `dws doc export --node --export-format --output --format json`;普通文件 → 切 `dingtalk-drive` 用 `dws drive download --node --output --format json`。 - -**禁止**:不分类型一律走 `doc export`(普通文件会失败)、跳过 `drive info` 判断。 - -### SOP-5 块级编辑(block-edit) - -**触发**:插引用块/代码块/表格/分栏/图片/附件,或删除某块。 - -1. **先列块(必须)**:`dws doc block list --node --format json`,当前响应的可操作块 ID 位于 `blocks[].element.id`(部分版本可能回显为 `blockId`);必须从目标内容对应项读取,不得编造。空文档的占位空段落可能不能作为 `--ref-block`。 -2. **按动作执行(必须)**: - - 插入:默认追加用 `dws doc block insert --node --text "<内容>" --format json`;只有明确要求相对位置时才加 `--ref-block <非空参照块ID> --where before|after`,容器内插入使用 `--parent-block <父块ID> --index <位置>`。插入命令**不接受** `--block-id`。 - - 更新:`dws doc block update --node --block-id <目标blockId> --text "<新内容>" --format json`。 - - 删除:用户确认后执行 `dws doc block delete --node --block-id <目标blockId> --yes --format json`。 -3. **验证(必须)**:再次执行 `dws doc block list --node --format json` 核对插入、更新或删除结果。 -4. **复杂块(必须)**:插入引用/代码/表格/分栏/附件/图片前,**必须**先读 [doc.md](references/doc.md) 对应小节,**禁止**只停在"准备查看 help"——说"我将插入..."后必须立即执行命令。 - -**禁止**:编造 blockId、未确认就删除、把完整 `--help` 输出当成最终结果答复用户。 -### SOP-6 导入本地文件为在线文档(import-file) - -**触发**:导入 Word / Excel / Markdown / 本地文件为在线文档。 - -1. **判类型(必须)**:确认用户意图是“导入为在线文档”,不是“上传到钉盘”。仅上传存储时切 `dingtalk-drive`。 -2. **执行(必须)**:`dws doc import --file --folder --name "<标题>" --format json`;复杂参数和限制见 [doc-import.md](references/doc/doc-import.md)。 -3. **验证(必须)**:拿到返回 `nodeId` 后执行 `dws doc info --node --format json`,必要时 `dws doc read --node --format json` 抽样核对内容。 - -**禁止**:把上传文件到钉盘误当成 doc import;不知道目标文件夹 nodeId 时先切 `dingtalk-drive`/`dingtalk-wiki` 查询。 - -## 多步文档短路径 - -- 在目标文件夹创建文字文档:`dws doc create --name "<标题>" --folder --content-file --format json`。拿到 `nodeId` 后立即回读。 -- 块级编辑固定顺序:`doc block list --node ` → 插入用 `--ref-block`/`--parent-block`,更新或删除用 `--block-id` → `doc block list` 验证。删除块必须已有用户明确删除意图或二次确认。 -- 插入引用块、代码块、表格、分栏、附件、图片时,优先读 [doc.md](references/doc.md) 对应小节,不要只停在"准备查看 help"。说出"我将插入..."后必须立即执行对应 terminal 调用。 -- 用户要求多个子文档/附件/块操作时,按 checklist 串行完成;最后一条 assistant 消息不能停在"接下来我要...",必须有实际工具调用或明确失败原因。 -- 用户说“读取并下载/导出”时,先 `drive info --node ... --format json` 按 - `extension` 判断类型:`adoc` 用 `doc export`,普通文件切到 - `dingtalk-drive` 用 `drive download`。 -- 所有结构化 dws 命令带 `--format json`。仅参数不确定时查 `--help`,不要把完整 help 当成最终结果。 - -## 危险操作 - -`block delete` 不可逆,必须确认再加 `--yes`。 +- 路径或参数错误:按既定顺序查 leaf Schema、再查 leaf Help,校正一次;不要连续尝试近似参数。 +- 始终从实际输出重新提取 `nodeId`、`blockId`、`commentKey`、`jobId` 或 `taskId`。 +- 部分写入或回读缺失:保留已创建的 nodeId,报告已完成范围与缺失位置;先读回,再只补缺失内容,禁止无条件重新创建副本。 +- 权限不足、候选未消歧、目标类型不符、没有可推进的任务 ID 或 Schema/Help 冲突时停止并报告。 ## 跨产品协作 -- 文件存储 / 上传下载 → 切到 `dingtalk-drive` -- 知识库空间管理 → 切到 `dingtalk-wiki` -- 数据表 → 切到 `dingtalk-aitable` -- 原生 `.md` 文件读取、创建、全量覆盖或局部替换 → 切到 `dingtalk-markdown` -- 长篇报告生成(多源采集 + 写文档)→ 此 skill 提供 `doc_create_and_write.py` 脚本 -## 局部意图与短流程 - -- [局部意图消歧](references/intent-guide.md);[短流程](references/lite-recipes.md)。 +- 原生 `.md` 文件内容 → `dingtalk-markdown`。 +- 普通文件存储、搜索、复制、移动、重命名、删除、上传下载与权限 → `dingtalk-drive`。 +- 知识库空间、节点和成员管理 → `dingtalk-wiki`;`doc create --workspace` 可直接在已知知识库根创建带内容的 adoc。 +- 在线电子表格 / AI 表格 → `dingtalk-sheet` / `dingtalk-aitable`。 +- 人名消歧 → `dingtalk-aisearch` 或 `dingtalk-contact`;文档评论 mention 使用真实 userId。 +- 局部意图边界见 [intent-guide.md](references/intent-guide.md),固定短流程见 [lite-recipes.md](references/lite-recipes.md)。 diff --git a/skills/multi/dingtalk-doc/references/04-document.md b/skills/multi/dingtalk-doc/references/04-document.md index 706567a9..306697c0 100644 --- a/skills/multi/dingtalk-doc/references/04-document.md +++ b/skills/multi/dingtalk-doc/references/04-document.md @@ -8,7 +8,7 @@ | write-doc | 0. 阅读 [doc-create-workflow.md](./doc/style/doc-create-workflow.md) 的 §前置必读 + §关键词速查表,锁定文档类型和起稿路径:**决策型/含对比的知识沉淀型/用户要求美观 → JSONML 起稿**(`.json`);执行型/说明型 → Markdown 起稿(`.md`)
1. 按选定路径执行 doc-create-workflow.md(JSONML 路径有骨架范例可直接复制修改)
2. `doc create --content-file /tmp/.json --content-format jsonml`(或 `.md` + `--content-format markdown`)
3. 大内容默认依赖 DWS 自动分片;只有 `CONTENT_TRUNCATED`、部分写入失败或回读发现缺失时,才按 workflow 的恢复流程手工补片
4. **回读校验(必须)**:所有写入完成后,执行 `doc read --node `,校验关键标题/段落/表格是否完整写入 | | search-docs-and-share | 1. `dws drive search --query "<关键词>" --format json` → 取候选 `nodeId` + 标题建索引(不读全文)
2. 对追问选中的候选执行 `dws drive info --node --format json`
3. 仅 `extension=adoc` 使用 `dws doc read --node --format json`(最多 2 篇);`md` / `axls` / `able` / 普通文件分别切到 markdown / sheet / aitable / drive,禁止固定执行 `doc read` | | create-knowledge-base | 1. 创建知识库空间取 `WS_ID`
2. `wiki node create --workspace --name "<文档名>"` → 取 `nodeId`
3. `wiki node list --workspace ` 确认 | -| migrate-doc | 1. `doc read --node <源nodeId>` → 取正文并写入临时文件 `.md`
2. `doc create --name "<文档名>" --folder --content-file .md` → 取新 `nodeId`(`--folder` 只传文档文件夹 nodeId / alidocs 文件夹 URL,不传数字 dentryId;正文 <200KB 单步到位)
2a. 若正文 >200KB:**必须先向用户提示截断风险**(详见下方「分块 append 截断风险提示」),用户确认后再执行:`doc create --name "<文档名>" --folder ` → `nodeId` → 按段落切片 → 每片 `doc update --node --content-file --mode append`
3. **回读校验**:`doc read --node ` 校验内容完整性 | +| migrate-doc | 1. `doc read --node <源nodeId>` → 取正文并写入临时文件 `.md`
2. `doc create --name "<文档名>" --folder --content-file .md` → 取新 `nodeId`;所有长度都先走这一条原生命令,由 CLI 自动分片(`--folder` 只传文档文件夹 nodeId / alidocs 文件夹 URL,不传数字 dentryId)
3. **回读校验**:`doc read --node ` 校验内容完整性;仅在 `CONTENT_TRUNCATED`、中断或回读缺失时,从真实断点补写缺失部分 | | update-doc-section | 1. `dws drive search --query "<关键词>" --format json` → 取 `nodeId`
2. `dws drive info --node --format json`,仅 `extension=adoc` 继续;其他类型切到对应 skill/reference
3. **形态选择(按 [doc-update-workflow.md §1.3](./doc/style/doc-update-workflow.md) 优先级)**:目标段落含 callout / 分栏 / 颜色 / @人 / 附件 / 嵌套结构 → 走 `jsonml-node-edit`;纯文本替换且确认无富结构 → 继续本 recipe
4. `dws doc read --node --format json` 定位目标章节
5. `dws doc update --node --content "<替换内容>" --mode overwrite --yes --format json`
6. **回读校验**:`dws doc read --node --format json` 确认 overwrite 未被降级为 append、内容完整无截断
**overwrite 须用户确认**;完整改写流程见 [doc-update-workflow.md](./doc/style/doc-update-workflow.md) | | rewrite-doc | 1. 阅读并执行 [doc-update-workflow.md](./doc/style/doc-update-workflow.md):先看 §1.3 编辑形态优先级(**JSONML 首选**),再按 §3 速查表选路径,跳 §4 对应小节执行
2. 单块改写 / 含富结构 → §4.4 路径 B;多处保真改写或改 root → §4.4 路径 A;纯文本骨架重写 → §4.5 markdown
3. 整篇 overwrite 前必须按 workflow §4.5 向用户提示风险并等待确认
4. **回读校验(必须)**:按 workflow §6 的校验要点逐项核查;@人、附件、图片等保真要素必须原样保留
**适用场景**:用户提供已有 nodeId/链接,需要改写、润色、章节补充、段落形态转换、整篇重写 | | doc-to-message | 1. `doc read --node ` → 取正文(大文档只摘要+链接)
2. `aisearch person --keyword "<姓名>" --dimension name` → 取 `openDingTalkId`(推荐);或 `chat search --query "<群名>"` → 取 `openConversationId`
3. `chat message send --open-dingtalk-id --text "<内容>"`(推荐)或 `--group --text "<内容>"` 发送。仅当无法获取 openDingTalkId 时才用 `--user `(备选) | @@ -29,28 +29,17 @@ --- -## 分块 append 截断风险提示 +## 自动分片失败恢复 -### 触发条件 +`doc create` / `doc update` 的 Markdown 写入管道会从 10,000 个 Unicode 字符开始自动分片,超时后降到 5,000 字符重试。不要在调用前手工复制分片逻辑。 -当内容总大小 **超过 200KB**,需要拆分为多片通过 `doc update --mode append` 分块写入时,**必须在执行前向用户发出截断风险提示**,等待用户确认后再继续。 +只有返回 `CONTENT_TRUNCATED`、写入被中断或回读发现缺失时,才执行恢复: -### 提示话术(参考模板) - -> 注意: 内容较长(约 {size}),需要分 {n} 片写入。分块 append 存在以下风险: -> - 部分片段可能写入失败但返回 success,导致文档**内容截断或缺失** -> - 片段之间的表格、代码块等跨块元素可能**被截断破坏** -> - 写入顺序异常可能导致**段落错乱** -> -> 建议:写入完成后我会回读校验文档完整性。是否继续? - -### 执行规范 - -1. **提示时机**:在执行第一片 append **之前**提示,而非写入过程中 -2. **分片原则**:按段落/标题边界切分,**禁止**在表格、代码块、列表内部截断 -3. **逐片校验**(推荐):每写入一片后记录已写入的最后一个标题/段落标记,供最终回读时比对 -4. **最终回读**(必须):所有片段写入完成后,执行 `doc read --node ` 回读全文,逐片比对关键标记是否完整(详见下方「doc update 回读校验规范」) -5. **失败处理**:若回读发现缺失片段,向用户报告具体缺失位置,建议针对缺失部分单独重试 append +1. 保存命令返回的真实 `nodeId` 和 `chunksWritten`,不要重新创建文档。 +2. `doc read --node ` 定位最后一个完整标题/段落。 +3. 从原始输入中只提取缺失后缀,写入一个新的 UTF-8 文件。 +4. 向用户报告已完成范围与待补范围;得到继续指示后,用一次 `doc update --mode append --content-file ` 补写。 +5. 再次回读并核对关键标题、表格、列表和代码块;仍缺失则停止,不循环追加。 --- diff --git a/skills/multi/dingtalk-doc/references/doc.md b/skills/multi/dingtalk-doc/references/doc.md index 805b6315..0583918f 100644 --- a/skills/multi/dingtalk-doc/references/doc.md +++ b/skills/multi/dingtalk-doc/references/doc.md @@ -26,29 +26,31 @@ **未读以上文件就改写已有文档会导致富结构丢失、参数错误或样式不达标。其他命令(阅读 / 评论 / 权限 / 附件 / 下载导出 / 文件操作)按需查下方 §命令索引表跳转对应子文件加载,不必提前加载。** -## 查询命令帮助 +## Atomic 命令加载契约 -当你不确定某个命令的具体参数、格式或可选项时,**优先执行 `--help` 查询**,不要猜测参数名或凭记忆编造。 +本文件只负责 atomic branch 路由;公开 Shortcut 的选择与发现只在根 +[`SKILL.md`](../SKILL.md) 维护,不在 references 重复列出。 + +命令已经选中且参数清楚时直接执行,不做重复发现。参数、约束或安全语义不确定时, +先查询精确 leaf Schema;只有当前 Cobra flag 不确定时才查询精确 leaf `--help`。 +不要加载产品级全量 Schema,也不要猜测参数名。 ```bash -# 查看 doc 下所有子命令 -dws doc --help +# 参数、约束或安全语义不确定 +dws schema --cli-path "doc update" --format json -# 查看具体命令的完整参数说明 +# 仅 Cobra flag 不确定 dws doc read --help dws doc create --help dws doc block insert --help - -# 查看子命令组下的所有命令 -dws doc block --help -dws doc media --help ``` 规则: -- 参数名不确定时 → 先 `--help`,再调用 -- 报错 "unknown flag" 时 → `--help` 确认正确的 flag 名称 -- 不确定某个功能是否存在时 → `dws doc --help` 查看命令列表 +- 参数、约束、安全不确定 → leaf Schema +- `unknown flag` 或当前 Cobra flag 不确定 → leaf `--help`,修正一次 +- 能力或分支未知 → 先用下方场景/命令索引;仍无法定位才回根 Skill 的 Runtime Shortcut Catalog +- Schema 与 Help 冲突 → 采用更安全解释并报告契约漂移 ## 命令索引表 diff --git a/skills/multi/dingtalk-doc/references/doc/doc-create.md b/skills/multi/dingtalk-doc/references/doc/doc-create.md index bf11a677..c07abd5d 100644 --- a/skills/multi/dingtalk-doc/references/doc/doc-create.md +++ b/skills/multi/dingtalk-doc/references/doc/doc-create.md @@ -44,7 +44,7 @@ Flags: - 不传 `--folder` 和 `--workspace` 时,默认创建在「我的文档」根目录。 - `--folder` 仅接受文档文件夹 `nodeId` / `dentryUuid` / alidocs 文件夹 URL;**禁止**传入 drive `dentryId`、`parentId`、`spaceId` 这类纯数字 ID。 - 输入方式选择见 [`./doc-update.md` §内容写入管道](./doc-update.md)(与 update 共用)。短文本字面量可 `--content`,多行/表格/特殊字符必须 `--content-file` 或 `--content -`。 -- 长内容(>30000 字符)CLI 自动分片:先创建空文档拿 `nodeId`,再按 markdown 标题边界切分后逐片 append;调用方无需手动编排。 +- Markdown 超过 10,000 个 Unicode 字符时,CLI 自动按结构分片:第一片随 `create` 写入并取得 `nodeId`,后续片自动 append;调用方不要手动预分片。 ## 上下文传递 @@ -70,7 +70,7 @@ dws doc create --name "<文档名>" --content-file /tmp/.md --folder " --content-file /tmp/.md --workspace --content-format markdown -# 创建空文档(仅取 nodeId 后再分步写入,适合 >200KB 兜底) +# 创建空文档(用户明确需要空文档时) dws doc create --name "<文档名>" [--folder | --workspace ] --content-format markdown # 短纯文本字面量(< 2KB 且无换行/表格才允许) diff --git a/skills/multi/dingtalk-doc/references/doc/doc-update.md b/skills/multi/dingtalk-doc/references/doc/doc-update.md index 026b33c4..964c92b3 100644 --- a/skills/multi/dingtalk-doc/references/doc/doc-update.md +++ b/skills/multi/dingtalk-doc/references/doc/doc-update.md @@ -75,7 +75,7 @@ Flags: ## 内容写入管道(create / update 共用) -> **关键原则**:CLI 内置自动分片。超长内容(>30000 字符)自动按 markdown 结构切分后逐片写入,对调用方透明。写入完成后由调用方自行决定是否回读确认。 +> **关键原则**:CLI 内置自动分片。Markdown 超过 10,000 个 Unicode 字符时自动按结构切分后逐片写入,对调用方透明。调用方必须在写入后回读确认。 ### 输入方式选择 @@ -88,9 +88,9 @@ Flags: ### 自动分片行为 -当内容超过 30000 字符时,CLI 自动执行: +当 Markdown 内容超过 10,000 个 Unicode 字符时,CLI 自动执行: -1. **create**: 先创建空文档拿 `nodeId`,再按 markdown 标题边界切分后逐片 append +1. **create**: 第一片随 create 写入并取得 `nodeId`,后续片 append 2. **update (overwrite)**: 第一片用 overwrite,后续片用 append 3. **update (append)**: 所有片段用 append @@ -124,13 +124,13 @@ CLI **不会**自动执行回读验证。**你必须在文档写入完成后主 ### 进度输出示例 ``` -[INFO] 内容较长 (45000 字符),自动分片写入... -[INFO] 已创建空文档 (nodeId=abc123),开始分片写入... -[INFO] 写入分片 (1/3),15000 字符... -[INFO] 写入分片 (2/3),15000 字符... -[INFO] 写入分片 (3/3),15000 字符... +[INFO] 内容较长 (25000 字符),自动分片写入... +[INFO] 写入分片 (1/3),10000 字符 (create)... +[INFO] 文档已创建 (nodeId=abc123) +[INFO] 写入分片 (2/3),10000 字符... +[INFO] 写入分片 (3/3),5000 字符... [INFO] 全部 3 个分片写入完成 -{"success": true, "nodeId": "abc123", "chunksWritten": 3} +{"success":true,"nodeId":"abc123","chunksWritten":3} ``` ### CONTENT_TRUNCATED 错误 @@ -153,24 +153,16 @@ CLI **不会**自动执行回读验证。**你必须在文档写入完成后主 | `--content -` | 从 stdin 读取(可配合 heredoc/pipe) | | `--content-file path` | 从文件读取(UTF-8),推荐 | -### 短/中等长度(< 200KB)— 单步写入 +### 单一原生命令(所有长度默认路径) ```bash # 1. 把内容写入 UTF-8 文本文件: # Linux/Mac: /tmp/.md;Windows: %TEMP%\.md -# 2. 一步写入: +# 2. 一次调用;CLI 按需自动分片: dws doc update --node --content-file --mode overwrite --content-format markdown ``` -### 超长(> 200KB 兜底)— 分片追加 - -```bash -# 1. 按 markdown 标题或段落边界切成 ≤200KB 的片段(不要切断表格) -# 2. 逐个追加: -dws doc update --node --content-file --mode append --content-format markdown -``` - -> **注意**:分块 append 存在静默失败风险(部分片段返回 success 但实际未写入),执行前**必须**向用户发出截断风险提示并等待确认。完整规范见 [`../../best_practices/04-document.md` «分块 append 截断风险提示»](../04-document.md)。 +只有命令返回 `CONTENT_TRUNCATED`、被中断或回读确认缺失时,才先读取已写入内容定位断点,再用一次 `doc update --mode append --content-file ` 补缺失部分。不要在调用原生命令前复制一套手工分片循环。 ### stdin 变体 diff --git a/skills/multi/dingtalk-doc/references/doc/style/doc-update-workflow.md b/skills/multi/dingtalk-doc/references/doc/style/doc-update-workflow.md index 88d8c68f..e94780ad 100644 --- a/skills/multi/dingtalk-doc/references/doc/style/doc-update-workflow.md +++ b/skills/multi/dingtalk-doc/references/doc/style/doc-update-workflow.md @@ -99,7 +99,7 @@ JSONML 模式下这些元素的节点结构见 [doc-jsonml-schema.md](../format/ | 整篇按新骨架重写 | overwrite 全文(优先 JSONML;纯文本可用 markdown) | §4.5 | | 段落转表格 / 表格转段落 | block update --content-format jsonml;或 markdown overwrite 单段 | §4.4 / §4.1 | | 插入附件 / 图片 | doc media insert | §4.3 | -| 一次追加 >200KB 内容 | 分块 append + 用户风险确认 + 逐片记录 | §4.6 | +| 长 Markdown 追加 | 单一 `doc update --content-file`,由 CLI 自动分片;失败时再按真实断点恢复 | §4.6 | | 兜底:纯文本快速替换某段 | doc update --content overwrite(markdown) | §4.1 | --- @@ -254,17 +254,11 @@ dws doc update --node --content-file /tmp/-full.md --mode overwri **写入后必须回读**(§6)。如果发现旧内容残留,按 §6 的修复路径处理。 -### 4.6 超长内容追加(分块 append) +### 4.6 长 Markdown 追加与失败恢复 -当一次性追加内容 **超过 200KB** 时,必须拆分为多片 `--mode append`,并在执行第一片**之前**向用户发出截断风险提示等待确认。 +默认只执行一条 `doc update --node --mode append --content-file `。CLI 在超过 10,000 个 Unicode 字符时自动按结构分片,并在超时后缩小分片重试;不要预先手工拆片。 -完整规范(提示话术模板、触发条件、失败处理)见 [04-document.md «分块 append 截断风险提示»](../../04-document.md)。 - -update 场景下的额外约束: - -1. 按段落/标题边界切分,**禁止**在表格、代码块、列表内部截断 -2. 每写一片记录已写入的最后一个标题/段落标记,供 §6 回读比对 -3. 与既有内容衔接位置不能产生悬空标题或断列表 +只有返回 `CONTENT_TRUNCATED`、中断或 §6 回读发现缺失时,才按 [04-document.md «自动分片失败恢复»](../../04-document.md) 从最后一个真实完整段落补写缺失后缀。补写前报告已完成范围,补写后再次回读;同一缺失后缀最多自动校正一次。 --- diff --git a/skills/multi/dingtalk-doc/references/intent-guide.md b/skills/multi/dingtalk-doc/references/intent-guide.md index 95684503..4559ce2d 100644 --- a/skills/multi/dingtalk-doc/references/intent-guide.md +++ b/skills/multi/dingtalk-doc/references/intent-guide.md @@ -10,10 +10,11 @@ | "参照这个生成同样的 / 按模板生成 / 复刻 X / 同样的模板 X 月份的" + 已有 alidocs URL | 模板保形生成同形态变体 | `drive copy + drive rename + doc block update` → 见 [best_practices/04-document.md `template-based-generation`](../../dingtalk-doc/references/04-document.md#template-based-generation) | `doc read + doc create`(重写链) | adoc → markdown 是有损投影,read+create 会丢行高/单元格背景色/字号;copy 在 adoc 层保形复制后只在副本上局部修改 | | "这个 alidocs 表格链接帮我看下"(粘贴原始 URL) | 先 probe 节点类型 | `dws drive info --node` → 按 `extension` 路由 | 直接调 `sheet` | `alidocs/i/nodes/{id}` 可能是文档/axls/able/xlsx 等,禁止凭 URL 猜类型 | | "帮我记一下明天要做的事" | 创建个人待办 | `todo` | `doc` | 个人待办提醒,非文档内容 | -| "在知识库里创建一个文档" | 创建空文件实体 | `wiki node create --type adoc` | `doc create` | 空间内创建节点归 wiki;doc create 是向已有文档写入内容,不是创建文件节点 | +| "在这个知识库里写一篇/创建带内容的文档" | 在已知知识库根创建 adoc 并写入正文 | `doc create --workspace --name ... --content-file ...` | 先建空 wiki 节点再重复写入 | `doc create` 的真实 Cobra/Schema 支持 `--workspace`,适合一步创建带内容 adoc | +| "只在知识库里建一个空文档节点/整理节点层级" | 创建或管理知识库节点实体 | `wiki node create --type adoc` | `doc create` | 空节点与目录层级归 wiki;正文创作归 doc | | "帮我看看收到的日报" | 收到的日志 | `report` | `doc` | 钉钉日志系统(日报/周报),不是文档 | | "整理一下XX项目的所有讨论" | 跨源主题归档 | #5 generate-topic-report | #4 write-doc | #4 侧重单篇文档创作;按主题跨听记/群消息汇总属于工作汇报 | | "搜一下智能化方案/最近 OKR 相关邮件/最近发版相关消息" | 搜企业知识内容 | `aisearch enterprise` | `doc search` / `mail search` / `chat message search` | 跨文档、消息、日程、听记、邮件等企业内容语义检索走 enterprise;具体 `queries/types/time-range` 抽槽见 `aisearch.md` | | "我发给某人的消息/邮件/文档/今天我干了什么" | 搜行为记录 | `aisearch behavior` | `chat` / `mail` / `doc` / `report` | 关注“谁对什么做过什么”,走 behavior;具体 `behavior-type/direction/chat-scope` 抽槽见 `aisearch.md` | | "把这段文字翻译成英文/translate this" | 通用文本翻译 | `chat text translate` | `doc` / `aisearch` | 纯文本翻译,不是文档编辑或语义搜索 | -| "帮我把这个文档翻译成日文" | 文档内容翻译 | 先 `doc get` 再 `chat text translate` | `chat text translate` 直接传文件 | translate 仅支持纯文本,需先提取文档内容 | +| "帮我把这个文档翻译成日文" | 文档内容翻译 | 先 `doc read --node ` 再 `chat text translate` | `chat text translate` 直接传文件 | translate 仅支持纯文本,需先读取 adoc 正文 | diff --git a/skills/multi/dingtalk-doc/scripts/doc_create_and_write.py b/skills/multi/dingtalk-doc/scripts/doc_create_and_write.py index fbf52f8d..a306b0e5 100644 --- a/skills/multi/dingtalk-doc/scripts/doc_create_and_write.py +++ b/skills/multi/dingtalk-doc/scripts/doc_create_and_write.py @@ -1,181 +1,179 @@ #!/usr/bin/env python3 -""" -在指定目录创建文档并写入 Markdown 内容(一键完成) +"""用原生 dws 写入管道创建文档,并回读验证。""" -用法: - python doc_create_and_write.py \ - --name "项目周报" \ - --content "# 本周总结\n\n## 完成事项\n- 任务A" +from __future__ import annotations - python doc_create_and_write.py \ - --name "会议纪要" \ - --content-file notes.md - - python doc_create_and_write.py \ - --name "知识库文档" --content "# 内容" --folder FOLDER_ID - - python doc_create_and_write.py --name "test" --content "hello" --dry-run -""" - -import sys -import json -import time -import subprocess import argparse +import json +import shlex +import subprocess +import sys +import tempfile from pathlib import Path -from typing import List, Any, Optional +from typing import Any, Optional, Sequence -def run_dws( - args: List[str], dry_run: bool = False, -) -> Optional[Any]: - cmd = ['dws'] + args +class ScriptError(RuntimeError): + """可预期的脚本执行错误。""" + + +def decode_json_output(output: str) -> Any: + """解析 JSON;兼容长内容写入前置的进度行。""" + text = output.strip() + if not text: + raise ScriptError("dws 未返回 JSON") + try: + return json.loads(text) + except json.JSONDecodeError: + decoder = json.JSONDecoder() + for offset, character in enumerate(text): + if character not in "[{": + continue + try: + value, end = decoder.raw_decode(text, offset) + except json.JSONDecodeError: + continue + if not text[end:].strip(): + return value + raise ScriptError("dws 返回的不是合法 JSON") + + +def run_dws(args: Sequence[str], dry_run: bool = False) -> Any: + """执行一条 dws 命令,并把命令/业务失败统一转成 ScriptError。""" + command = ["dws", *args] if dry_run: - print(f"[dry-run] {' '.join(cmd)}") - return {'dry_run': True} + print(f"[dry-run] {shlex.join(command)}") + return {"dry_run": True} try: result = subprocess.run( - cmd, capture_output=True, text=True, timeout=60 + command, + capture_output=True, + text=True, + timeout=120, + check=False, ) - if result.returncode != 0: - print(f" ✗ 错误:{result.stderr.strip()}") - return None - return json.loads(result.stdout) - except (subprocess.TimeoutExpired, json.JSONDecodeError, - FileNotFoundError) as e: - print(f" ✗ 错误:{e}") - return None + except (subprocess.TimeoutExpired, FileNotFoundError) as exc: + raise ScriptError(f"执行 dws 失败:{exc}") from exc + if result.returncode != 0: + detail = result.stderr.strip() or result.stdout.strip() + raise ScriptError( + f"dws 命令失败:{detail or f'退出码 {result.returncode}'}" + ) + data = decode_json_output(result.stdout) + if isinstance(data, dict) and data.get("success") is False: + detail = data.get("errorMsg") or data.get("message") or "未知错误" + raise ScriptError(f"dws 业务调用失败:{detail}") + return data -def run_dws_with_retry( - args: List[str], - dry_run: bool = False, - max_retries: int = 3, - retry_delay: float = 1.0, -) -> Optional[Any]: - """带重试机制的 dws 命令执行""" - last_error = None - for attempt in range(1, max_retries + 1): - result = run_dws(args, dry_run=dry_run) - if result is not None: - return result - if attempt < max_retries: - print(f" ⚠️ 第 {attempt} 次尝试失败,{retry_delay}秒后重试...") - time.sleep(retry_delay) - retry_delay *= 1.5 # 指数退避 - return None +def first_value(payload: Any, keys: Sequence[str]) -> str: + """从嵌套响应中提取第一个非空稳定字段。""" + if isinstance(payload, dict): + for key in keys: + value = payload.get(key) + if value is not None and str(value).strip(): + return str(value).strip() + for value in payload.values(): + found = first_value(value, keys) + if found: + return found + elif isinstance(payload, list): + for value in payload: + found = first_value(value, keys) + if found: + return found + return "" -def main(): +def run(argv: Optional[Sequence[str]] = None) -> int: parser = argparse.ArgumentParser( - description='创建文档并写入内容' + description="使用 dws doc create 创建文档并回读验证" ) - parser.add_argument('--name', required=True, help='文档名称') - parser.add_argument('--content', default='', help='Markdown 内容') - parser.add_argument('--content-file', default='', help='内容文件') - parser.add_argument('--folder', default='', help='目标文件夹 ID 或 URL') - parser.add_argument('--workspace', default='', help='目标知识库 ID') - parser.add_argument( - '--mode', default='append', choices=['overwrite', 'append'], - help='写入模式: overwrite=覆盖, append=追加 (默认 append)', + parser.add_argument("--name", required=True, help="文档名称") + content_group = parser.add_mutually_exclusive_group(required=True) + content_group.add_argument("--content", help="Markdown 内容") + content_group.add_argument("--content-file", help="UTF-8 Markdown 文件") + location_group = parser.add_mutually_exclusive_group() + location_group.add_argument( + "--folder", default="", help="目标文档文件夹 ID 或 URL" ) - parser.add_argument( - '--max-retries', type=int, default=3, - help='每块写入失败时的最大重试次数 (默认 3)', + location_group.add_argument( + "--workspace", default="", help="目标知识库 ID 或 URL" ) - parser.add_argument('--dry-run', action='store_true') - args = parser.parse_args() + parser.add_argument("--dry-run", action="store_true") + args = parser.parse_args(argv) - content = args.content + supplied_path: Optional[Path] = None + temporary_path: Optional[Path] = None if args.content_file: - p = Path(args.content_file) - if not p.exists(): - print(f"错误:文件不存在: {p}") - sys.exit(1) - content = p.read_text(encoding='utf-8') - if not content: - print('错误:需要 --content 或 --content-file') - sys.exit(1) - chunk_size = 10000 + supplied_path = Path(args.content_file) + if not supplied_path.is_file(): + raise ScriptError(f"内容文件不存在:{supplied_path}") + elif not args.content or not args.content.strip(): + raise ScriptError("--content 不能为空") - create_args = ['doc', 'create', '--name', args.name, '--format', 'json'] - if args.folder: - create_args.extend(['--folder', args.folder]) - if args.workspace: - create_args.extend(['--workspace', args.workspace]) + try: + if supplied_path is None and not args.dry_run: + with tempfile.NamedTemporaryFile( + mode="w", encoding="utf-8", suffix=".md", delete=False + ) as handle: + handle.write(args.content) + temporary_path = Path(handle.name) + supplied_path = temporary_path - print(f'\n📝 创建文档: {args.name}') - create_data = run_dws(create_args, dry_run=args.dry_run) + content_path = str(supplied_path) if supplied_path else "" + create_args = [ + "doc", "create", + "--name", args.name, + "--content-file", content_path, + "--content-format", "markdown", + "--format", "json", + ] + if args.folder: + create_args.extend(["--folder", args.folder]) + if args.workspace: + create_args.extend(["--workspace", args.workspace]) - node_id = None - if not args.dry_run: - if not create_data: - sys.exit(1) - node_id = (create_data.get('nodeId') - or create_data.get('dentryUuid') - or create_data.get('id', '')) - print(f" ✓ 文档已创建 (ID: {node_id})") + created = run_dws(create_args, dry_run=args.dry_run) + node_id = "" if args.dry_run else first_value( + created, ("nodeId", "dentryUuid") + ) + if not node_id: + raise ScriptError("文档创建响应缺少 nodeId,无法验证") - if len(content) <= chunk_size: - mode_label = '追加' if args.mode == 'append' else '覆盖' - print(f'\n✍️ 写入内容 (模式: {mode_label}, {len(content)} 字符)...') - write_data = run_dws([ - 'doc', 'update', - '--node', node_id or '', - '--content', content, - '--mode', args.mode, - '--format', 'json', - ], dry_run=args.dry_run) - if write_data: - print(f" ✓ 内容已写入 ({len(content)} 字符)") - else: - chunks = [] - pos = 0 - while pos < len(content): - end = min(pos + chunk_size, len(content)) - if end < len(content): - newline_pos = content.rfind('\n', pos, end) - if newline_pos > pos: - end = newline_pos + 1 - chunks.append(content[pos:end]) - pos = end + info = run_dws( + ["doc", "info", "--node", node_id, "--format", "json"], + dry_run=args.dry_run, + ) + run_dws( + ["doc", "read", "--node", node_id, "--format", "json"], + dry_run=args.dry_run, + ) + if args.dry_run: + return 0 - total_chunks = len(chunks) - print(f'\n✍️ 内容较长 ({len(content)} 字符), 分 {total_chunks} 块写入...') - - success_chunks = 0 - for idx, chunk in enumerate(chunks): - chunk_mode = args.mode if idx == 0 else 'append' - write_data = run_dws_with_retry( - [ - 'doc', 'update', - '--node', node_id or '', - '--content', chunk, - '--mode', chunk_mode, - '--format', 'json', - ], - dry_run=args.dry_run, - max_retries=args.max_retries, - ) - if write_data: - print(f" ✓ 块 {idx + 1}/{total_chunks} 已写入 ({len(chunk)} 字符)") - success_chunks += 1 - elif not args.dry_run: - # 写入失败,报告部分写入状态 - print(f"\n❌ 块 {idx + 1}/{total_chunks} 写入失败(已重试 {args.max_retries} 次)") - print(f"\n⚠️ 文档处于部分写入状态:") - print(f" - 文档 ID: {node_id}") - print(f" - 已写入: {success_chunks}/{total_chunks} 块") - print(f" - 失败位置: 第 {idx + 1} 块") - if args.mode == 'overwrite': - print(f" - 模式: 覆盖模式,文档可能包含不完整内容") - print(f" - 建议: 手动检查文档内容,或删除后重新创建") - else: - print(f" - 模式: 追加模式,已写入内容已保存") - print(f" - 建议: 可手动补充剩余内容,或重新运行脚本") - sys.exit(1) - print('\n✅ 完成!') + summary = { + "success": True, + "nodeId": node_id, + "docUrl": first_value(info, ("docUrl", "documentUrl", "url")) + or first_value(created, ("docUrl", "documentUrl", "url")), + "chunksWritten": first_value(created, ("chunksWritten",)), + "verified": True, + } + print(json.dumps(summary, ensure_ascii=False)) + return 0 + finally: + if temporary_path is not None: + temporary_path.unlink(missing_ok=True) -if __name__ == '__main__': +def main() -> None: + try: + raise SystemExit(run()) + except ScriptError as exc: + print(f"错误:{exc}", file=sys.stderr) + raise SystemExit(1) from exc + + +if __name__ == "__main__": main() diff --git a/test/scripts/doc_skill_scripts_test.py b/test/scripts/doc_skill_scripts_test.py new file mode 100644 index 00000000..7a68b873 --- /dev/null +++ b/test/scripts/doc_skill_scripts_test.py @@ -0,0 +1,161 @@ +#!/usr/bin/env python3 +"""Regression tests for the Doc Skill and its optional wrapper script.""" + +import contextlib +import importlib.util +import io +import json +import subprocess +import unittest +from pathlib import Path +from unittest import mock + + +ROOT = Path(__file__).resolve().parents[2] +SKILL_ROOT = ROOT / "skills" / "multi" / "dingtalk-doc" +SCRIPT_PATH = SKILL_ROOT / "scripts" / "doc_create_and_write.py" + + +def load_script(): + spec = importlib.util.spec_from_file_location("doc_create_and_write", SCRIPT_PATH) + if spec is None or spec.loader is None: + raise RuntimeError(f"cannot load {SCRIPT_PATH}") + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +class DocSkillAlignmentTest(unittest.TestCase): + def test_shortcuts_use_progressive_discovery(self): + skill = (SKILL_ROOT / "SKILL.md").read_text(encoding="utf-8") + catalog = json.loads( + (ROOT / "docs" / "shortcut-public-catalog.json").read_text( + encoding="utf-8" + ) + ) + runtime_shortcuts = [ + row for row in catalog["results"] if row.get("service") == "doc" + ] + schema = json.loads( + ( + ROOT + / "internal" + / "cli" + / "schema_catalog" + / "tools" + / "doc.json" + ).read_text(encoding="utf-8") + ) + schema_shortcuts = [ + path for path in schema["tools"] if path.startswith("doc.shortcut_") + ] + self.assertEqual(17, len(runtime_shortcuts)) + self.assertEqual(17, len(schema_shortcuts)) + self.assertIn("17 条公开 Shortcut,已全部进入 Runtime Schema", skill) + self.assertIn( + "dws shortcut list --service doc --compact --format json", skill + ) + self.assertNotIn("| `dws doc +", skill) + + def test_native_pipeline_is_the_only_default_chunker(self): + texts = [ + path.read_text(encoding="utf-8") + for path in [SKILL_ROOT / "SKILL.md", *SKILL_ROOT.rglob("*.md")] + ] + combined = "\n".join(texts) + self.assertNotIn(">30000", combined) + self.assertNotIn("超过 30000", combined) + self.assertNotIn(">200KB", combined) + self.assertNotIn("超过 200KB", combined) + self.assertNotIn("doc get", combined) + + +class DocCreateAndWriteTest(unittest.TestCase): + def setUp(self): + self.module = load_script() + + def test_decode_json_output_accepts_progress_lines(self): + data = self.module.decode_json_output( + '[INFO] 写入分片 (1/2)\n{\n "success": true,\n' + ' "nodeId": "doc-1"\n}\n' + ) + self.assertEqual("doc-1", data["nodeId"]) + + def test_folder_and_workspace_are_mutually_exclusive(self): + with self.assertRaises(SystemExit): + self.module.run( + [ + "--name", + "周报", + "--content", + "hello", + "--folder", + "folder-1", + "--workspace", + "workspace-1", + "--dry-run", + ] + ) + + def test_run_dws_rejects_nonzero_and_business_failure(self): + with mock.patch.object( + self.module.subprocess, + "run", + return_value=subprocess.CompletedProcess( + ["dws"], 2, stdout="", stderr="unknown flag" + ), + ): + with self.assertRaisesRegex(self.module.ScriptError, "unknown flag"): + self.module.run_dws(["doc", "create"]) + + with mock.patch.object( + self.module.subprocess, + "run", + return_value=subprocess.CompletedProcess( + ["dws"], + 0, + stdout='{"success":false,"message":"denied"}', + stderr="", + ), + ): + with self.assertRaisesRegex(self.module.ScriptError, "denied"): + self.module.run_dws(["doc", "create"]) + + def test_wrapper_uses_create_then_info_and_read_without_manual_update(self): + calls = [] + + def fake_run(args, dry_run=False): + calls.append(list(args)) + if args[:2] == ["doc", "create"]: + return {"success": True, "nodeId": "doc-1", "chunksWritten": 2} + if args[:2] == ["doc", "info"]: + return {"success": True, "docUrl": "https://example.test/doc-1"} + return {"success": True, "markdown": "hello"} + + stdout = io.StringIO() + with mock.patch.object(self.module, "run_dws", side_effect=fake_run): + with contextlib.redirect_stdout(stdout): + code = self.module.run(["--name", "周报", "--content", "hello"]) + + self.assertEqual(0, code) + self.assertEqual(["create", "info", "read"], [call[1] for call in calls]) + self.assertFalse(any(call[:2] == ["doc", "update"] for call in calls)) + summary = json.loads(stdout.getvalue().splitlines()[-1]) + self.assertEqual("doc-1", summary["nodeId"]) + self.assertTrue(summary["verified"]) + + def test_dry_run_shows_create_and_verification_commands(self): + stdout = io.StringIO() + with contextlib.redirect_stdout(stdout): + code = self.module.run( + ["--name", "周报", "--content", "hello", "--dry-run"] + ) + self.assertEqual(0, code) + output = stdout.getvalue() + self.assertIn("dws doc create", output) + self.assertIn("dws doc info", output) + self.assertIn("dws doc read", output) + + +if __name__ == "__main__": + unittest.main()