Markdown Converter
Agent skill for markdown-converter
When working with the LeanSpec documentation site:
Sign in to like and favorite skills
When working with the LeanSpec documentation site:
npm run build before committingDocumentation folder structure must exactly match the sidebar hierarchy in
sidebars.ts.
Example:
Usage → CLI Usage → Creating & Managing Specs./docs/guide/usage/cli/creating-managing.mdx ✅Every English
.mdx file needs a Chinese translation in i18n/zh-Hans/docusaurus-plugin-content-docs/current/ with identical folder structure.
CRITICAL: Translations must be professional, natural, and technically accurate. Avoid literal word-by-word translation.
1. Keep English Terms for Core Concepts
Never translate these terms - they are technical concepts with established English usage:
lean-spec create, lean-spec update, lean-spec board, etc.planned, in-progress, complete, archived.md, .mdx, .json, .yamlExamples:
✅ "使用 `lean-spec create` 创建新 Spec" ❌ "使用 `精益规范创建` 创建新规格说明" ✅ "Spec 文件使用 Markdown 格式" ❌ "规格说明文件使用 Markdown 格式" ✅ "状态从 `planned` 变为 `in-progress`" ❌ "状态从"已计划"变为"进行中""
2. Add English References for Technical Concepts
When translating technical terms that don't have established Chinese equivalents, include the English term in parentheses on first use:
✅ "上下文经济 (Context Economy)" ✅ "信噪比 (Signal-to-Noise Ratio)" ✅ "渐进式披露 (Progressive Disclosure)" ✅ "依赖图 (Dependency Graph)" ✅ "工作记忆 (Working Memory)" ❌ "上下文经济" (without English reference)
After first use with English reference, you can use Chinese only in the same document.
3. Use Natural Chinese Expression
Avoid word-by-word literal translation. Use idiomatic Chinese that reads naturally:
❌ "为什么这个很重要" (literal: why this is important) ✅ "重要性" or "为什么重要" (natural) ❌ "规格文件" (literal: specification file) ✅ "Spec 文件" (natural, keeps technical term) ❌ "它是什么" (literal: what it is) ✅ "功能介绍" or "简介" (natural) ❌ "怎么做" (literal: how to do) ✅ "操作步骤" or "使用方法" (natural)
4. Maintain Technical Accuracy
Balance readability with precision:
5. Follow Chinese Typography Standards
Always Keep in English:
| English | Chinese (Don't Use) | Usage |
|---|---|---|
| Spec | ❌ 规格/规范 | "创建新 Spec" ✅ |
| LeanSpec | ❌ 精益规范 | "LeanSpec 方法论" ✅ |
| CLI | ❌ 命令行界面 | "使用 CLI 命令" ✅ |
| Token | ❌ 令牌/标记 | "Token 数量" ✅ |
| README | ❌ 说明文件 | "README.md 文件" ✅ |
| frontmatter | ❌ 前置元数据 | "frontmatter 配置" ✅ |
| MCP | ❌ 模型上下文协议 | "MCP 服务器" ✅ |
Translate with English Reference (First Use):
| English | Chinese Translation | First Use Example |
|---|---|---|
| Context Economy | 上下文经济 | "上下文经济 (Context Economy) 原则" |
| Signal-to-Noise | 信噪比 | "信噪比 (Signal-to-Noise) 最大化" |
| Progressive Disclosure | 渐进式披露 | "渐进式披露 (Progressive Disclosure)" |
| Dependency Graph | 依赖图 | "查看依赖图 (Dependency Graph)" |
| Working Memory | 工作记忆 | "适应工作记忆 (Working Memory)" |
| Intent Over Implementation | 意图优于实现 | "意图优于实现 (Intent Over Implementation)" |
| Bridge the Gap | 弥合差距 | "弥合差距 (Bridge the Gap)" |
| Spec-Driven Development | 规格驱动开发 | "规格驱动开发 (Spec-Driven Development, SDD)" |
Pure Chinese Translation (Common Terms):
| English | Chinese | Notes |
|---|---|---|
| Overview | 概述 | Common, no English needed |
| Getting Started | 快速开始 | Standard phrase |
| Tutorial | 教程 | Common term |
| Examples | 示例 | Common term |
| Installation | 安装 | Common action |
| Configuration | 配置 | Common term |
| Usage | 使用 | Common term |
| Reference | 参考 | Common term |
| FAQ | 常见问题 | Common term |
| Best Practices | 最佳实践 | Common phrase |
Section Headers:
✅ "## 什么是 LeanSpec?" ✅ "## 快速开始" ✅ "## 核心概念" ✅ "## 为什么使用 LeanSpec" ❌ "## What is LeanSpec?" (in Chinese docs) ❌ "## Getting Started" (in Chinese docs)
Feature Descriptions:
✅ "LeanSpec 是一种轻量级的规格驱动开发 (SDD) 方法论" ❌ "LeanSpec 是一个轻量级规范驱动的开发方法" ✅ "使用 `lean-spec board` 查看 Spec 看板" ❌ "使用 `lean-spec board` 查看规格说明看板"
Technical Explanations:
✅ "Spec 文件使用 Markdown 格式,包含 frontmatter 元数据" ❌ "规格说明文件使用 Markdown 格式,包含前置元数据" ✅ "Token 数量影响上下文经济 (Context Economy)" ❌ "令牌数量影响上下文经济"
Before committing Chinese translations, verify:
lean-spec create)pnpm validate:mdx)See:
specs/115-chinese-translation-quality/ for detailed guidelines and examples.
Chinese text with multiple bolds:
这与 **语法属性(Syntactic Properties)** 形成对比 ✅ (space before second **)
Bold with quotes:
** "quoted text" ** ✅ (spaces inside bold markers)
CRITICAL: Mermaid diagrams MUST have custom styling for dark theme contrast. Default colors are unreadable in dark mode.
Always apply styles to Mermaid nodes:
```mermaid graph LR A[Node] --> B[Node] style A fill:#e1f5ff,stroke:#1e3a8a,stroke-width:2px,color:#1e3a8a style B fill:#fff4e1,stroke:#92400e,stroke-width:2px,color:#92400e
**Use color palette:** Light background + dark text for contrast in both themes. See `agents/documentation-quality-standards.md` section 6 for full color palette and examples. ### Build Validation Before committing: ```bash cd docs-site && npm run build
Must pass with no broken links, MDX errors, or missing translations.
Validate source MDX files for syntax issues that cause build failures:
cd docs-site && pnpm validate:mdx
This checks Chinese docs and blogs for:
< > { })Run before committing Chinese content changes.
sidebars.ts, docusaurus.config.ts)npm run build - must succeedFor comprehensive documentation quality standards, see agents/documentation-quality-standards.md.
Formula: Documentation Quality = Content × Structure × Translation Completeness