From 7d6a0b75dd699a1d053cac0950105293063c366e Mon Sep 17 00:00:00 2001 From: "fengzhihao.infeng" Date: Wed, 29 Apr 2026 17:57:13 +0800 Subject: [PATCH] docs(mail): add Non-goals + safety rules 9/10/11; empty-result blocks in 5 read refs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per tech-design §4.1-§4.5: harden lark-mail SKILL with two doc-only signals. mail.md template: - Add 3 new safety rules covering "empty result is a legal answer" (rule 9), "fuzzy match needs user adjudication" (rule 10), and "sensitive write ops require user confirmation" (rule 11) with the six API tokens enumerated verbatim (messages.trash / batch_trash / recall / labels.delete / folders.delete / mail_contacts.delete). - Add ## ⛔ Non-goals section (5-row table per §4.4) between safety rules and identity-selection. - Extend cap-line to mark Non-goals as same-priority as safety rules. 5 read-op references (triage / message / messages / thread / watch): - Insert ## ⛔ 空结果处理 block immediately before each file's trailing ## 相关命令 / ## 参考 heading. Each block distinguishes empty-array vs 404 vs network/permission errors per §4.2 and references back to Non-goals 第 1 条 + 安全规则 第 9 条. skills/lark-mail/SKILL.md: - Regenerated via registry's gen-skills.py (equivalent to `make all project=mail` for the gen-skills target). The regen also refreshed API-resource and permission-table descriptions from registry-conf/output/from_meta/mail.json — these are normal regen drift since the artifact was last hand-curated. The regen dropped the multi_entity / sent_messages / templates resource blocks because registry-config.yaml does not list them under mail.apis; this is a pre-existing gap between mail.md prose and registry-config and is out-of-scope for this sprint per §1.3 (do not touch registry-config). Deviation from spec wording: spec §4.1 names new rules "8/9/10" but rule 8 (草稿回链规则) already exists. Following the S1 contract's Option A, new rules land at slots 9/10/11 leaving rule 8 intact, and the read-op reference-back text cites "第 9 条" instead of the spec's "第 8 条". The substantive content of each rule is unchanged. NOT touched (per spec §4.5): 6 write-op references, shortcuts/mail/, internal/registry/meta_data.json, lark-shared, other domain templates, skill-template/skill-template.md. sprint: S2 --- skill-template/domains/mail.md | 17 ++- skills/lark-mail/SKILL.md | 117 ++++++++---------- .../lark-mail/references/lark-mail-message.md | 12 ++ .../references/lark-mail-messages.md | 12 ++ .../lark-mail/references/lark-mail-thread.md | 12 ++ .../lark-mail/references/lark-mail-triage.md | 12 ++ .../lark-mail/references/lark-mail-watch.md | 12 ++ 7 files changed, 126 insertions(+), 68 deletions(-) diff --git a/skill-template/domains/mail.md b/skill-template/domains/mail.md index 61a5e191c..30498817d 100644 --- a/skill-template/domains/mail.md +++ b/skill-template/domains/mail.md @@ -23,8 +23,23 @@ 6. **草稿不等于已发送** — 默认保存为草稿是安全兜底。将草稿转为实际发送(添加 `--confirm-send` 或调用 `drafts.send`)同样需要用户明确确认。 7. **注意邮件内容的安全风险** — 阅读和撰写邮件时,必须考虑安全风险防护,包括但不限于 XSS 注入攻击(恶意 `