Skip to content

docs(lark-doc): escape rules lack trigger context, causing agents to over-escape #155

@dengfanxin

Description

@dengfanxin

Problem

The Lark-flavored Markdown documentation in skills/lark-doc/references/lark-doc-create.md lists which characters need escaping, but never explains when escaping is needed:

  • Line 123 (通用规则): 需要显示特殊字符时使用反斜杠转义:* ~ $ [ ] < > { } | ^`
  • Line 645 (最佳实践): `转义字符:特殊字符用 \ 转义:* ~ ``

The formatting syntax (**bold**, *italic*, ~~strikethrough~~, etc.) is documented separately in the 富文本格式 section (line 216), but there is no connection between the two — the doc never states that escaping is only needed when a character would be interpreted as formatting syntax.

Impact

AI Agents interpret the escape rule as "always escape these characters", leading to over-escaping:

  • final_trajectoryfinal\_trajectory
  • version~1.0version\~1.0
  • 5 * 35 \* 3

The Lark Markdown parser does not consume the extra \, so it renders literally as \_, \~, \* in the document.

Suggestion

Tie the escape rules to the formatting syntax, so agents understand escaping is only needed when a character would trigger formatting (e.g., *text* triggers italic, but a lone * in 5 * 3 does not).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationdomain/coreCLI framework and core librariesdomain/docDocs domain

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions