CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.Project Overview
Flashduty official documentation site, built with Mintlify. Bilingual (Chinesezh/ and English en/) with mirrored directory structures.
Three product modules: On-call (incident management), RUM (real user monitoring), Monitors (alert rules).
Commands
npm i -g mint
Architecture
docs.json— Central Mintlify config: navigation structure, tabs, theme. All new pages must be registered here under the correct language → tab → group.zh/anden/— Mirror each other. Chinese is the source of truth; English is translated from it.glossary.md— Chinese-English terminology glossary for translation consistency.api-reference/— OpenAPI 3.1 spec files (per-module, per-language) powering the API Reference tab..cursor/skills/— AI agent skills for translation (translate-zh-to-en) and polishing (polish-document).
Documentation Workflow
- Create/edit Chinese docs in
zh/as.mdxfiles - Add the page path to
docs.jsonnavigation (bothzhandenlanguage sections) - Translate to English using the glossary at
glossary.md - Run
mint broken-linksto validate
Key Terminology (zh → en)
These are non-obvious translations that must stay consistent:
Full glossary:
glossary.md
Writing Conventions
- Use second person (“you” / “您”)
- Active voice, present tense
- Every
.mdxfile needs frontmatter withtitleanddescription - Sentence case for English titles (capitalize only first word)
- Use Mintlify components:
<Steps>,<Tabs>,<Note>,<Tip>,<Warning>,<Frame>,<CodeGroup>,<Accordion> - Component reference:
.cursor/skills/polish-document/components.md
Translation Rules
- Translate frontmatter
titleanddescription - Keep MDX component tags unchanged, translate inner text only
- Keep code unchanged, translate comments only
- Update internal link paths from
zh/toen/ - Keep image paths unchanged
Link Validation Notes
mint broken-links may report parsing errors from .cursor/ directory — these are safe to ignore (excluded from publishing via .mintignore). Only fix broken links in actual doc files.