- Split dr-chief-editor (Phase 3 read-only) vs new dr-editor-in-chief (Opus, Phase 4 lead) - New dr-translator (en->zh) and new humanizer-cn / output-hygiene / en-zh-translation skills - Switch to English working language (Phase 2-3), final Chinese translation (Phase 4) - /dr-init: add report title proposals + word budget mode - /dr-frame: bilingual framework - /dr-finalize: new chain editor->translator->polisher->reporter - report-template.py: widows/orphans/keepWithNext, 3-color hierarchy, confidentiality banner - dr-reporter: mandatory citations backfill + output hygiene check - dr-pm: batch-level context compression via manifest.batches_summary - mckinsey-method: SCQA only for Executive Summary + chapter intros (no explicit labels) - length-budget: 4 word-budget modes + en/zh 1:1.4 ratio
173 lines
5.3 KiB
Markdown
173 lines
5.3 KiB
Markdown
---
|
||
name: length-budget
|
||
description: 报告字数预算分配与执行校验。支持 4 种字数模式(自动/简明/详细/深度),英中互换规则(英文词数 ≈ 中文字数 × 0.7),章节配额算法与补写策略。Phase 1 用于设定预算,Phase 2/4 用于自检。
|
||
---
|
||
|
||
# 字数预算系统
|
||
|
||
## 一、四种字数模式(Phase 1 访谈时选择)
|
||
|
||
用户在 /dr-init 访谈时选定其中一种,写入 manifest.word_budget_mode:
|
||
|
||
| 模式 | 中文字数目标 | 英文词数目标 | 章节数 | 适用场景 |
|
||
|---|---|---|---|---|
|
||
| `auto` | 按类型默认 | 按类型默认 | 8-12 | 不明确时默认 |
|
||
| `concise` | 8,000-12,000 | 5,600-8,400 | 6-8 | 高管一阅即过 |
|
||
| `detailed` | 20,000-35,000 | 14,000-24,500 | 10-12 | 标准专业报告 |
|
||
| `deep` | 50,000-80,000 | 35,000-56,000 | 12-15 | 深度研究/行业专著 |
|
||
|
||
**auto 模式的默认字数**(按报告类型):
|
||
|
||
| 报告类型 | 中文字数 | 英文词数 | 章节数 |
|
||
|---|---|---|---|
|
||
| 综述 | 12,000 | 8,400 | 8-10 |
|
||
| 研究 | 35,000 | 24,500 | 10-12 |
|
||
| 投资 | 22,000 | 15,400 | 10-12 |
|
||
| 管理/工艺 | 18,000 | 12,600 | 9-11 |
|
||
|
||
**字数只是参考,以把问题讲清楚为第一优先**。过少则内容单薄,过多则注水。目标区间±20% 内都可接受。
|
||
|
||
---
|
||
|
||
## 二、英文-中文字数换算
|
||
|
||
**核心换算率**:1 个英文词 ≈ 1.4-1.5 个中文字
|
||
|
||
Phase 2 产出英文,Phase 4 翻译为中文后字数会自然膨胀约 40%。预算时:
|
||
- Phase 2 英文稿:按英文词数目标 × 1.0 写
|
||
- Phase 4 中文稿:英文词数 × 1.4 应落在中文字数目标的 ±15% 内
|
||
|
||
自动换算工具:
|
||
|
||
```python
|
||
def en_words_to_zh_chars(en_words: int) -> int:
|
||
return int(en_words * 1.4)
|
||
|
||
def zh_chars_to_en_words(zh_chars: int) -> int:
|
||
return int(zh_chars / 1.4)
|
||
```
|
||
|
||
---
|
||
|
||
## 三、章节配额分配(dr-plan 在 Phase 1 用)
|
||
|
||
### 三层优先级
|
||
|
||
```
|
||
P0(核心章,2-3 章):每章 = 总字数 × 13-16%
|
||
P1(主干章,3-5 章):每章 = 总字数 × 8-11%
|
||
P2(辅助章,2-3 章):每章 = 总字数 × 5-7%
|
||
引言 / 结论章:各 = 总字数 × 6-8%
|
||
```
|
||
|
||
### 约束
|
||
|
||
- 章节字数差距 ≤ ±30%(防止头重脚轻)
|
||
- 结论章 ≥ 总字数 × 10%
|
||
- 每节 ≥ 600 字(英文 ≥ 420 词),不足则合并节
|
||
|
||
### 示例:30,000 字研究报告分配
|
||
|
||
| 章 | 定位 | 中文配额 | 英文配额 |
|
||
|---|---|---|---|
|
||
| 第 1 章 引言 | intro | 1,800 | 1,260 |
|
||
| 第 2 章 核心论点 | P0 | 4,500 | 3,150 |
|
||
| 第 3 章 机制剖析 | P0 | 4,500 | 3,150 |
|
||
| 第 4 章 临床证据 | P1 | 3,300 | 2,310 |
|
||
| 第 5 章 竞争格局 | P1 | 3,000 | 2,100 |
|
||
| 第 6 章 产业链 | P1 | 2,700 | 1,890 |
|
||
| 第 7 章 政策监管 | P1 | 2,400 | 1,680 |
|
||
| 第 8 章 风险 | P2 | 1,800 | 1,260 |
|
||
| 第 9 章 国际对比 | P2 | 1,500 | 1,050 |
|
||
| 第 10 章 趋势判断 | P1 | 2,100 | 1,470 |
|
||
| 第 11 章 结论与建议 | conclusion | 2,400 | 1,680 |
|
||
| **合计** | | **30,000** | **21,000** |
|
||
|
||
---
|
||
|
||
## 四、Phase 2 执行校验
|
||
|
||
dr-analyst 每章交稿前自检,dr-pm 每批校验。
|
||
|
||
### 英文字数统计
|
||
|
||
```bash
|
||
# 英文词数
|
||
wc -w projects/<slug>/phase2/drafts/chXX.md
|
||
```
|
||
|
||
### 中文字数统计(未来用)
|
||
|
||
```python
|
||
def count_chinese_words(text: str) -> int:
|
||
import re
|
||
cn = sum(1 for c in text if '\u4e00' <= c <= '\u9fff')
|
||
text_no_cn = re.sub(r'[\u4e00-\u9fff]', ' ', text)
|
||
en = len(re.findall(r"[A-Za-z]+(?:[-'][A-Za-z]+)*", text_no_cn))
|
||
return cn + en
|
||
```
|
||
|
||
### 校验逻辑
|
||
|
||
```
|
||
1. 读 chXX.md 统计英文词数
|
||
2. 对照 framework 中该章配额
|
||
3. 判断:
|
||
实际/配额 < 0.7 → 不合格,继续挖掘证据补写
|
||
0.7 ≤ 比值 < 0.85 → 警告,建议补足
|
||
0.85 ≤ 比值 ≤ 1.3 → 合格
|
||
比值 > 1.3 → 超纲,考虑精简或拆分
|
||
```
|
||
|
||
---
|
||
|
||
## 五、字数不足的正确补救路径
|
||
|
||
**绝对禁止为凑数注水**("在此背景下"、"随着...的不断发展"等空话)。字数不足的应对顺序:
|
||
|
||
1. **检查证据覆盖**:该章观点是否有 ≥2 独立 Tier 1-2 信源?若无 → 检索补证据
|
||
2. **展开数据细节**:把表格里的数字展开成文字分析(趋势、拐点、对比)
|
||
3. **增加案例**:用 1-2 个具体公司/产品案例佐证抽象观点
|
||
4. **补反方证据**:把反方证据段落写详细(500-800 字)
|
||
5. **延伸推论**:对核心判断做"若成立则..."和"若不成立则..."分支
|
||
6. **国际对比**:若原文只讲中国,加一段国际对比
|
||
|
||
---
|
||
|
||
## 六、manifest 字段规范
|
||
|
||
```json
|
||
{
|
||
"word_budget_mode": "detailed",
|
||
"target_words_zh": 30000,
|
||
"target_words_en": 21000,
|
||
"min_words_zh": 24000,
|
||
"chapter_quotas_en": [
|
||
{"index": 1, "title": "...", "en_words": 1260, "priority": "intro"},
|
||
{"index": 2, "title": "...", "en_words": 3150, "priority": "P0"}
|
||
]
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
## 七、Phase 4 翻译后中文字数校验
|
||
|
||
翻译完成后:
|
||
1. 读 final_zh.md,按中英混排规则统计字数
|
||
2. 对照 manifest.target_words_zh
|
||
3. 落在 ±15% 区间内 → 合格
|
||
4. 不合格 → dr-polisher 在润色时适度扩展/压缩
|
||
|
||
---
|
||
|
||
## 八、硬规则
|
||
|
||
1. ✅ auto 模式按类型默认,其他模式按用户选择
|
||
2. ✅ 章节字数差距 ≤ ±30%
|
||
3. ✅ 结论章 ≥ 全文 10%
|
||
4. ✅ Phase 2 英文稿每章自检,不足 70% 配额必须补
|
||
5. ✅ Phase 4 中文稿整体字数校验在 ±15% 内
|
||
6. ❌ 禁止为凑数注水(AI 套话、重复表述)
|
||
7. ❌ 禁止对字数"打折"交稿
|