content-refiner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseContent Refiner (The Fixer)
内容优化工具(修复器)
Purpose
用途
POST-GATE TOOL.
Transforms content that FAILED Gate 4 into passing content.
Focuses on trimming verbosity and fixing continuity.
POST-GATE工具
将未通过Gate 4的内容转化为合格内容。
重点在于精简冗余表述并修复内容连贯性。
When to Use
使用时机
- Trigger: Gate 4 (Acceptance Auditor) returned .
[FAIL] - Goal: Fix word count OR continuity issues (or both).
- Key: Diagnose what failed BEFORE applying fixes.
- 触发条件:Gate 4(验收审核器)返回。
[FAIL] - 目标:修复字数问题或连贯性问题(或两者皆有)。
- 关键:在应用修复前先诊断失败原因。
CRITICAL: Pre-Refinement Diagnosis
重要提示:优化前诊断
DO NOT apply fixes blindly. Gate 4 fails for different reasons requiring different strategies.
请勿盲目应用修复。Gate 4不通过的原因不同,需要采用不同的策略。
Step 0: Identify What Failed (Mandatory)
步骤0:确定失败原因(必填)
Ask the user OR examine the Gate 4 failure message:
| Failure Type | Question | Action |
|---|---|---|
| Word Count | "Is the lesson over the target (typically 1500 words)?" | Calculate exact % to cut |
| Continuity | "Does the opening reference the previous lesson?" | Rewrite opening only |
| Both | "Word count AND continuity broken?" | Two-phase approach |
DIAGNOSIS EXAMPLES:
Example 1: Word Count Only
Content: 1950 words, Target: 1500
Excess: 450 words
% to cut: (450 / 1950) × 100 = 23%
→ CUT EXACTLY 23%, not generic 15-20%Example 2: Continuity Only
Opening: "Let's explore this new topic..."
Problem: Doesn't reference Lesson N-1
→ Rewrite opening only; don't cut wordsExample 3: Both
Word count: 1950 (23% over)
Opening: Generic, missing prior lesson reference
→ Phase 1: Rewrite opening (identify anchor from Lesson N-1)
→ Phase 2: Cut words to 23% (context-aware)询问用户或查看Gate 4的失败提示:
| 失败类型 | 问题 | 操作 |
|---|---|---|
| 字数问题 | "课程是否超过目标字数(通常为1500词)?" | 计算精确的删减比例 |
| 连贯性问题 | "开篇是否提及上一课程?" | 仅重写开篇 |
| 两者皆有 | "字数和连贯性都有问题?" | 分两阶段处理 |
诊断示例:
示例1:仅字数问题
Content: 1950 words, Target: 1500
Excess: 450 words
% to cut: (450 / 1950) × 100 = 23%
→ CUT EXACTLY 23%, not generic 15-20%示例2:仅连贯性问题
Opening: "Let's explore this new topic..."
Problem: Doesn't reference Lesson N-1
→ Rewrite opening only; don't cut words示例3:两者皆有
Word count: 1950 (23% over)
Opening: Generic, missing prior lesson reference
→ Phase 1: Rewrite opening (identify anchor from Lesson N-1)
→ Phase 2: Cut words to 23% (context-aware)Step 1: Assess Content Layer (Context-Aware Cutting)
步骤1:评估内容层级(基于上下文的删减)
Read the lesson's frontmatter to determine layer:
| Layer | Cutting Strategy |
|---|---|
| L1 (Manual) | Keep foundational explanations; cut elaboration |
| L2 (AI-Collaboration) | Keep Try With AI sections (core); cut narrative padding |
| L3 (Intelligence) | Keep pattern insights; cut explanatory scaffolding |
| L4 (Spec-Driven) | Keep specification details; cut conceptual scaffolding |
查看课程的frontmatter以确定层级:
| 层级 | 删减策略 |
|---|---|
| L1(手动) | 保留基础解释;删减冗余阐述 |
| L2(AI协作) | 保留Try With AI板块(核心内容);删减叙事性铺垫 |
| L3(进阶) | 保留模式洞察;删减解释性框架内容 |
| L4(规范驱动) | 保留规范细节;删减概念性框架内容 |
The Refinement Procedure (Layer-Aware)
优化流程(基于层级)
Phase 1: The Connection Builder (Continuity Fix)
阶段1:关联性构建(修复连贯性)
Do this FIRST if opening is generic.
Formula:
markdown
In [Previous Lesson], you [SPECIFIC OUTCOME from Lesson N-1].
Now, we will [CONNECT outcome to new goal] by [STRATEGY].Validation:
- Opening references Lesson N-1 by name
- Specific outcome (not generic "learned about...")
- Clear connection shows why this lesson matters (builds on N-1)
After fixing: Proceed to Fluff Cutter if word count also fails.
如果开篇表述泛化,请先执行此步骤。
公式:
markdown
在[上一课程]中,你完成了[课程N-1的具体成果]。
现在,我们将[把该成果与新目标关联],通过[具体策略]实现。验证项:
- 开篇提及课程N-1的名称
- 包含具体成果(而非泛泛的"学习了...")
- 清晰说明本课程的重要性(基于课程N-1的延伸)
修复后:如果同时存在字数问题,继续执行冗余内容精简步骤。
Phase 2: The Fluff Cutter (Word Count Fix)
阶段2:冗余内容精简(修复字数问题)
Apply layer-specific cuts in this order:
FOR ALL LAYERS:
- Delete redundant "Why This Matters" sections
- Keep ONLY if it reveals non-obvious insight
- If same point made in text AND in "Why This Matters" → delete WTM
- Merge repeated examples
- Find duplicate explanations
- Keep first, delete second
- Tighten transitions between sections
- Replace "As we discussed earlier, X..." with direct reference
FOR L1-L2 ONLY (students still building foundation):
4. Reduce "Try With AI" sections to exactly 2 prompts
- Keep foundational + one advanced
- Delete exploratory extras
- Keep educational scaffolding (explanations, examples)
FOR L3-L4 ONLY (students ready for advanced patterns):
4. Trim narrative scaffolding
- Keep pattern insights and rules
- Delete "why this matters philosophically"
- Remove beginner-level explanations
- Assume students understand fundamentals
FOR ALL LAYERS:
6. One Analogy Rule: Keep the BEST analogy for the concept; delete redundant ones
7. Merge Tables/Text: Use ONE format (table OR prose), never both
8. Reduce Examples: Keep 2-3 best; delete "also consider..."
9. Tighten Lists: Convert 5-item lists to 3 core items
Verification:
- Word count after cuts: [TARGET ± 5%]
- No L1 content cut from L1 lessons
- No pattern insights lost from L3-L4 lessons
- Try With AI: 2 prompts if L1-L2, keep all if L3-L4
按以下顺序应用基于层级的删减策略:
所有层级通用:
- 删除冗余的"Why This Matters"板块
- 仅保留能揭示非显而易见见解的内容
- 如果正文和"Why This Matters"板块表述相同,删除该板块
- 合并重复示例
- 找出重复的解释内容
- 保留第一个,删除第二个
- 精简板块间的过渡语句
- 用直接指代替换"正如我们之前讨论的,X..."这类表述
仅适用于L1-L2层级(学员仍在构建基础):
4. 将"Try With AI"板块精简为恰好2个提示词
- 保留基础提示词+1个进阶提示词
- 删除探索性的额外提示词
- 保留教学框架内容(解释、示例)
仅适用于L3-L4层级(学员已准备好学习进阶模式):
4. 精简叙事性框架内容
- 保留模式洞察和规则
- 删除"从哲学角度看为何重要"这类内容
- 移除入门级解释内容
- 假设学员已掌握基础知识
所有层级通用:
6. 单一类比规则:保留针对概念的最佳类比;删除冗余类比
7. 合并表格/文本:仅使用一种格式(表格或 prose),切勿同时使用
8. 精简示例:保留2-3个最佳示例;删除"也可以考虑..."这类内容
9. 精简列表:将5项列表压缩为3项核心内容
验证项:
- 删减后的字数:[目标值±5%]
- 未删减L1层级的核心内容
- 未删减L3-L4层级的模式洞察内容
- Try With AI:L1-L2层级保留2个提示词,L3-L4层级保留全部
Phase 3: Post-Refinement Validation (CRITICAL)
阶段3:优化后验证(关键步骤)
After applying fixes, verify the content now PASSES Gate 4:
✓ Word Count Check:
Current: [X] words
Target: [target_from_spec]
Status: [PASS if ≤target ± 5%, FAIL if over]
✓ Continuity Check:
Opening references Lesson [N-1]? [YES/NO]
Specific outcome mentioned? [YES/NO]
Connection to new lesson clear? [YES/NO]
✓ Layer Appropriateness:
No foundational cuts from L1-L2? [YES/NO]
No pattern insight loss from L3-L4? [YES/NO]
✓ Content Integrity:
Removed examples still explained elsewhere? [YES/NO]
Cut sections non-essential? [YES/NO]NEXT STEP RECOMMENDATION:
"Refined content is ready.
Word count: [after] (target: ≤[target])
Continuity: Now references Lesson [N-1]
Recommend re-submitting to acceptance-auditor for Gate 4 re-validation.
Command: [provide re-validation instruction]"应用修复后,验证内容是否已通过Gate 4:
✓ 字数检查:
当前字数: [X]词
目标字数: [规范中的目标值]
状态: [如果≤目标值±5%则通过,否则不通过]
✓ 连贯性检查:
开篇提及课程[N-1]?[是/否]
提及具体成果?[是/否]
与新课程的关联是否清晰?[是/否]
✓ 层级适配性:
未删减L1-L2层级的基础内容?[是/否]
未删减L3-L4层级的模式洞察内容?[是/否]
✓ 内容完整性:
被删除的示例是否在其他地方有解释?[是/否]
被删减的板块是否非必要?[是/否]下一步建议:
"优化后的内容已准备就绪。
当前字数: [优化后]
连贯性: 已提及课程[N-1]
建议重新提交至acceptance-auditor进行Gate 4重新验证。
指令: [提供重新验证的具体说明]"Output Format
输出格式
markdown
undefinedmarkdown
undefinedRefinement Report: [Lesson Name]
优化报告: [课程名称]
Diagnosis
诊断结果
Issue Found: [Word count | Continuity | Both]
Layer: [L1/L2/L3/L4]
发现的问题: [字数问题 | 连贯性问题 | 两者皆有]
层级: [L1/L2/L3/L4]
Metrics
指标
| Metric | Before | After | Target | Status |
|---|---|---|---|---|
| Word Count | 1950 | 1485 | ≤1500 | ✅ PASS |
| Continuity | Generic opening | References Lesson 2 | Specific reference | ✅ PASS |
| 指标 | 优化前 | 优化后 | 目标值 | 状态 |
|---|---|---|---|---|
| 字数 | 1950 | 1485 | ≤1500 | ✅ 通过 |
| 连贯性 | 泛化开篇 | 提及课程2 | 具体关联 | ✅ 通过 |
Fixes Applied
应用的修复措施
- Phase 1: Rewrote opening to reference "booking-agent implementation" from Lesson 2
- Phase 2: Deleted 240 words using layer-aware cuts:
- Removed redundant "Why This Matters" section (line 45, 120 words)
- Merged duplicate example (lines 67-89, 85 words)
- Cut 1 extra "Try With AI" prompt (35 words)
- Phase 3: Validated word count and continuity
- 阶段1: 重写开篇,提及课程2中的"booking-agent实现"内容
- 阶段2: 基于层级删减了240词:
- 删除了冗余的"Why This Matters"板块(第45行,120词)
- 合并了重复示例(第67-89行,85词)
- 删减了1个额外的"Try With AI"提示词(35词)
- 阶段3: 验证了字数和连贯性
Ready for Re-validation
已准备好重新验证
✅ Word count: 1485 (≤1500)
✅ Continuity: Opening references Lesson 2
✅ Layer integrity: All L2 AI examples preserved
Next: Re-submit to acceptance-auditor for Gate 4 validation
✅ 字数: 1485(≤1500)
✅ 连贯性: 开篇提及课程2
✅ 层级完整性: 所有L2层级的AI示例均被保留
下一步: 重新提交至acceptance-auditor进行Gate 4验证
Refined Content
优化后的内容
[Full refined lesson content]
undefined[完整的优化后课程内容]
undefined