Skip to content

bot prompts: forbid LaTeX math delimiters in Tlon notes and messages - #6287

Open
patosullivan wants to merge 3 commits into
developfrom
patrick/tlon-6339-tell-bots-not-to-use-latex-math-delimiters-in-notebooks
Open

bot prompts: forbid LaTeX math delimiters in Tlon notes and messages#6287
patosullivan wants to merge 3 commits into
developfrom
patrick/tlon-6339-tell-bots-not-to-use-latex-math-delimiters-in-notebooks

Conversation

@patosullivan

@patosullivan patosullivan commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

Adds guidance telling bot agents never to use LaTeX math delimiters when writing %notes bodies or message text. No Tlon surface renders math (no KaTeX/MathJax, no math story type, no remark-math), so $...$ displays literally and Markdown emphasis/mentions inside it can corrupt the surrounding text, while in note bodies the backslashes in \( and \[ are eaten by CommonMark escaping so those delimiters vanish entirely (openclaw chat keeps the backslashes and can misparse bracket forms as links).

Fixes TLON-6339

Changes

  • packages/tlon-skill/SKILL.md: guidance on the message-text line plus a paragraph under Notes covering the failure modes and the plain text/Unicode and code-block alternatives
  • packages/tlon-skill/scripts/commands/notes.ts: same note in tlon notes CLI help
  • packages/openclaw/index.ts: one line added to the tlon tool description
  • packages/hermes-tlon-adapter/tlon_tool.py and adapter.py: same line in the hermes tool description and in the platform hint
  • packages/hermes-tlon-adapter/test_tlon_tool.py: test asserting both the tool description and the platform hint carry the guidance

How did I test?

  • Ran the hermes suite via dev/test.sh: 1038 tests pass, including the new test_tool_description_includes_latex_guidance
  • Verified the new test is non-vacuous by altering the guidance text and confirming it fails
  • openclaw: tsc --noEmit clean; eslint passes (0 errors; pre-existing warnings remain)
  • tlon-skill: 39 bun tests pass, tsc clean
  • Checked escaping at runtime: the emitted strings contain single backslashes (\(...\)) even though the TS and Python sources double them

Risks and impact

  • Safe to rollback without consulting PR author? Yes
  • Affects important code area:
    • Other: bot tool descriptions and skill docs (guidance text only, no behavior or code-path changes)

Rollout note: the tool-description and platform-hint lines ship on merge, but the deploy workflow auto-restarts only ships tagged tlon-internal; others need a manual dispatch. SKILL.md and the CLI help reach production only with the next tlon-skill npm release (version bump + tlon-skill-v* tag, done separately) plus a harness restart.

Rollback plan

Revert the commit. If the guidance has already gone out in a tlon-skill npm release, ship a follow-up patch release and restart harnesses (npm releases are immutable). No state, migrations, or data changes involved.

@linear-code

linear-code Bot commented Aug 14, 2026

Copy link
Copy Markdown

TLON-6339

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 709efbd7bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/openclaw/index.ts Outdated
@patosullivan patosullivan changed the title bot prompts: forbid LaTeX math delimiters in Tlon notes and messages (tlon-skill 0.5.1) bot prompts: forbid LaTeX math delimiters in Tlon notes and messages Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants