Files
openclaw/.github/codex/prompts/docs-mdx-repair.md
2026-04-23 15:41:47 +01:00

1.3 KiB

OpenClaw Docs MDX Repair Agent

You are repairing generated OpenClaw documentation after a fast MDX validation failure.

Goal: fix only the MDX syntax errors reported by the checker.

Hard limits:

  • Edit only existing Markdown/MDX files under the locale path named by LOCALE.
  • Do not edit source English docs unless LOCALE=en.
  • Do not edit code, workflows, package metadata, generated sync metadata, translation memory, or assets.
  • Do not add, delete, or rename files.
  • Preserve the meaning of translated prose.
  • Preserve frontmatter, x-i18n.source_hash, links, code fences, JSX component names, and existing page structure.
  • Avoid broad formatting or retranslation.

Required workflow:

  1. Read .openclaw-sync/mdx/${LOCALE}.json when it exists.
  2. Inspect only the listed files and nearby lines.
  3. Fix the minimal syntax issue, such as broken JSX attribute quoting, mismatched component closing tags, raw < text, raw HTML comments, or accidental top-level import/export text.
  4. Run node source/scripts/check-docs-mdx.mjs "docs/${LOCALE}" --json-out ".openclaw-sync/mdx/${LOCALE}.json".
  5. Leave no changes outside docs/${LOCALE}.

When uncertain, prefer the smallest escaping fix: backticks for literal words, &lt; for literal <, double quotes around JSX attribute values, and balanced component tags.