Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

docs(rules): add the language rule and translate the rules written in Chinese

hugohe3229235334020
diff --git a/AGENTS.md b/AGENTS.md
index 5fcc6b4d..5805b8dd 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -32,7 +32,7 @@ PPT Master turns source material into natively editable DrawingML PPTX. Generate
- **Repo-wide style rules** — when editing prompt files under [`skills/ppt-master/references/`](skills/ppt-master/references/), Python under [`skills/ppt-master/scripts/`](skills/ppt-master/scripts/), or any other code/prose in the repo, follow the matching style rule in [`docs/rules/`](docs/rules/).
- **Prompt decision ownership** — follow [`docs/rules/prompt-style.md`](docs/rules/prompt-style.md) §4.1. Default Strategist prepares project-local resources and Executor realizes them; Quick's current agent decides and prepares before SVG authoring. This is not downstream acquisition. Every project icon is prepared material; `icons.inventory` indexes the default plan's curated bundled pool, not page usage or an execution whitelist. Sounds follow [`animations.md`](skills/ppt-master/references/animations.md) §2.2.
-- **Markdown language consistency** — Markdown files under `skills/ppt-master/workflows/`, `skills/ppt-master/references/`, and `docs/` are currently single-language per directory. New files mirror the language of their siblings; do not mix English scaffolding with Chinese paragraphs (or vice versa) inside one file. Chat replies are unaffected.
+- **Markdown language consistency** — follow [`docs/rules/language.md`](docs/rules/language.md): one language per file, mirroring the siblings in that directory; a non-English string may appear in an English file only as quoted content (user trigger text, sample values, rendered labels, proper nouns), never as the wording of a rule; never hard-code which language the model replies in. Chat replies are unaffected.
## Compatibility Boundary
diff --git a/docs/rules/README.md b/docs/rules/README.md
index 10086d46..7d6d94f3 100644
--- a/docs/rules/README.md
+++ b/docs/rules/README.md
@@ -6,6 +6,7 @@ Conventions and style guides for contributors and AI agents working in this repo
|---|---|
| [`prompt-style.md`](./prompt-style.md) | Style guide for files under `skills/ppt-master/references/` — voice, sectioning, table-first, forbidden patterns |
| [`code-style.md`](./code-style.md) | Style guide for Python under `skills/ppt-master/scripts/` — file headers, imports, CLI entry points, error handling, no-tests rule |
+| [`language.md`](./language.md) | Language rule for agent-facing Markdown and `docs/` — one language per file, non-English as content but never as a rule, no hard-coded output language |
When adding a new rule file:
diff --git a/docs/rules/language.md b/docs/rules/language.md
new file mode 100644
index 00000000..b4df59e6
--- /dev/null
+++ b/docs/rules/language.md
@@ -0,0 +1,34 @@
+# Language Rule
+
+> Applies to every agent-facing file in the package — `skills/ppt-master/SKILL.md`, `references/*.md`, `workflows/**/*.md` — and to repository documentation under `docs/`.
+
+## 1. One Language Per File
+
+Each Markdown file is single-language. New files mirror the language of their siblings in the same directory. Never mix English scaffolding with Chinese paragraphs (or the reverse) inside one file.
+
+`docs/zh/`, `README_CN.md`, `SPONSORS_CN.md`, and other wholly Chinese files are complete translations, not exceptions to this rule — they are single-language too.
+
+## 2. A Non-English Language May Be Content, Never a Rule
+
+Inside an English file, a non-English string is allowed only when it *is* the subject matter. It is never the wording of an instruction to the model.
+
+| Allowed — the string is content | Forbidden — the string is the rule |
+|---|---|
+| A trigger phrase the user literally types (`继续生成 projects/<name>`) | A decision rule written in Chinese (`语速:edge 默认 +0%…`) |
+| A sample field value in an example JSON / notes block | A selection criterion phrased in Chinese (`财报 → 稳重男声`) |
+| A label the deck renders on the page (`情景数据`) | An English sentence with a Chinese word standing in for its own term |
+| A pronunciation or typography example (`百分之六十八` for TTS) | A section heading or table header in Chinese |
+| A proper noun with English context (`印章`, `新中式`) | A prose paragraph of instructions in Chinese |
+| A directory or brand name that is genuinely Chinese | |
+
+**Hard rule**: an instruction the model must follow is written in the file's own language. A rule written in one language biases the model's output toward that language and silently overrides [`SKILL.md`](../../skills/ppt-master/SKILL.md)'s "match the user's language" discipline.
+
+## 3. Never Hard-Code the Output Language
+
+Do not write a rule that fixes which language the model replies in — `write a one-line Chinese description` is a defect. Say "in the user's chat language" instead.
+
+A user-facing message template written in one concrete language is content under §2, so it stays; but it must carry an explicit "translate to the user's chat language if different" note.
+
+## 4. Trigger Text Stays Language-Neutral
+
+`SKILL.md`'s `description` is English prose. Do not append per-language keyword lists to it, and do not name a specific agent host or harness in it. When a request intent triggers unreliably, widen the English intent vocabulary (nouns and verbs users actually type, including language-neutral tokens such as `PPT` / `PPTX`) rather than adding another language's keywords — the language list has no natural end, and every entry costs budget on a file loaded on every run.
diff --git a/skills/ppt-master/references/visual-review.md b/skills/ppt-master/references/visual-review.md
index eb94077e..450d1f7f 100644
--- a/skills/ppt-master/references/visual-review.md
+++ b/skills/ppt-master/references/visual-review.md
@@ -67,7 +67,7 @@ The aggregated brand review is the responsibility of the orchestrator at the end
## §2 Soft rules (act only when clearly bad)
-Subagents must apply the **明显** ("clearly bad") threshold — when in doubt, leave it. Better to under-fix than to oscillate.
+Subagents must apply the **clearly bad** threshold — when in doubt, leave it. Better to under-fix than to oscillate.
| # | Category | Trigger | Fix direction |
|---|----------|---------|---------------|
diff --git a/skills/ppt-master/workflows/stages/generate-audio.md b/skills/ppt-master/workflows/stages/generate-audio.md
index 75554136..a749e7cb 100644
--- a/skills/ppt-master/workflows/stages/generate-audio.md
+++ b/skills/ppt-master/workflows/stages/generate-audio.md
@@ -102,13 +102,13 @@ The output is a flat list of all available voices for the selected provider. Fro
- **For MiniMax / Qwen / CosyVoice**: if the user provides a cloned `voice_id`, use it directly. Do not attempt voice cloning inside this narration stage.
- **For CosyVoice subtitles**: use a cloned voice from a supported v3.5/v3/v2 model or a system voice marked timestamp-supported. Model and voice families must match. Use `--cosyvoice-audio-only` only when the user accepts no page-local SRT.
- **Match the deck's tone** — pick the strongest recommendation based on style:
- - Consultant / data-driven / 财报 → 稳重男声(如 `zh-CN-YunjianNeural`)or 清晰女声(如 `zh-CN-XiaoxiaoNeural`)
- - General / 教学 / 产品介绍 → 明亮女声 / 年轻男声(如 `zh-CN-XiaoyiNeural` / `zh-CN-YunxiNeural`)
- - 发布会 / 播报 → 播报感男声(如 `zh-CN-YunyangNeural`)
+ - Chinese consultant / data-driven / financial-report deck → a steady male voice (e.g. `zh-CN-YunjianNeural`) or a clear female voice (e.g. `zh-CN-XiaoxiaoNeural`)
+ - Chinese general / teaching / product-introduction deck → a bright female or young male voice (e.g. `zh-CN-XiaoyiNeural` / `zh-CN-YunxiNeural`)
+ - Chinese launch event / broadcast deck → a broadcast-toned male voice (e.g. `zh-CN-YunyangNeural`)
- English consultant deck → `en-US-GuyNeural` (steady) or `en-US-JennyNeural` (clear)
- Japanese / Korean → pick from `ja-JP-*` / `ko-KR-*` neural voices, mark gender + tone
-For each candidate, write a **one-line Chinese description** covering: 性别 · 调性 · 适用场景。For cloud providers, include the voice name/ID exactly as it must be passed to `--voice-id`.
+For each candidate, write a **one-line description in the user's chat language** covering: gender · tone · best-fit scenario. For cloud providers, include the voice name/ID exactly as it must be passed to `--voice-id`.
---
@@ -158,11 +158,11 @@ uses the manual Windows playback handoff below.
> 直接回"好"用全部推荐值,或告诉我想改的部分(如"音色 2,语速 -5%"或"用 MiniMax 的 voice_id xxx")。
**Recommended-value rules**:
-- 生成模式:默认 `edge`;用户指定 cloud provider / voice ID 时按其选择。需要逐页 SRT、字幕动画或视频字幕时不推荐 Qwen;用户坚持时,说明仅交付音频并跳过 SRT 步骤。
-- 音色:从 Step 2 候选里挑最贴合 deck 调性的那一个。
-- 语速:edge 默认 `+0%`;notes 字数密集(页均 >4 句长句)建议 `-5%`;notes 简短紧凑建议 `+5%`;超出此范围需说明理由。Cloud providers 默认用 provider defaults,除非用户明确要调速或改风格。
-- 嵌入:默认推荐"是";除非用户已有定制 PPTX 不希望覆盖。
-- 视频:`powerpoint_video.py --check` 成功时默认推荐"原生编码";只有用户明确选择时才使用"实时放映录制"。自动化不可用时交付带音频 PPTX;不得静默改用录屏或第三方渲染器。
+- **Generation mode**: default `edge`; follow the user's choice when they name a cloud provider / voice ID. Do not recommend Qwen when page-local SRT, subtitle animation, or video subtitles are needed; if the user insists, state that only audio is delivered and skip the SRT step.
+- **Voice**: pick the Step 2 candidate that fits the deck's tone best.
+- **Rate**: edge defaults to `+0%`; recommend `-5%` for dense notes (>4 long sentences per page) and `+5%` for short, tight notes; going outside this range needs a stated reason. Cloud providers keep provider defaults unless the user explicitly asks to change speed or style.
+- **Embed**: recommend yes by default, unless the user already has a customized PPTX they do not want overwritten.
+- **Video**: recommend native encoding when `powerpoint_video.py --check` succeeds; use slideshow capture only on an explicit user choice. When automation is unavailable, deliver the narrated PPTX; never silently switch to screen recording or a third-party renderer.
---