refactor(baoyu-translate): simplify translation prompts and workflow
Condense 15+ verbose translation principles to 7 concise ones. Consolidate analysis from 8 sections to 4, review from 8 to 3. Simplify subagent prompt template accordingly.
This commit is contained in:
parent
9137c5ab8c
commit
31994be0e1
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: baoyu-translate
|
||||
description: Translates articles and documents between languages with three modes - quick (direct), normal (analyze then translate), and refined (analyze, translate, review, polish). Supports custom glossaries and terminology consistency via EXTEND.md. Use when user asks to "translate", "翻译", "精翻", "translate article", "translate to Chinese/English", "改成中文", "改成英文", "convert to Chinese", "localize", "本地化", or needs any document translation. Also triggers for "refined translation", "精细翻译", "proofread translation", "快速翻译", "快翻", "这篇文章翻译一下", or when a URL or file is provided with translation intent.
|
||||
version: 1.57.0
|
||||
version: 1.59.0
|
||||
metadata:
|
||||
openclaw:
|
||||
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-translate
|
||||
|
|
@ -189,7 +189,7 @@ Before translating chunks:
|
|||
- Splits at markdown block boundaries to preserve structure
|
||||
- If a single block exceeds the threshold, falls back to line splitting, then word splitting
|
||||
4. **Assemble translation prompt**:
|
||||
- Main agent reads `01-analysis.md` (if exists) and assembles shared context using Part 1 of [references/subagent-prompt-template.md](references/subagent-prompt-template.md) — inlining: target style + source voice assessment, content background, merged glossary, figurative language mapping (structured table), comprehension challenges (with reasoning), and translation challenges (structural/creative)
|
||||
- Main agent reads `01-analysis.md` (if exists) and assembles shared context using Part 1 of [references/subagent-prompt-template.md](references/subagent-prompt-template.md) — inlining: target style, content background, merged glossary, and translation challenges
|
||||
- Save as `02-prompt.md` in the output directory (shared context only, no task instructions)
|
||||
5. **Draft translation via subagents** (if Agent tool available):
|
||||
- Spawn one subagent **per chunk**, all in parallel (Part 2 of the template)
|
||||
|
|
@ -206,26 +206,22 @@ Before translating chunks:
|
|||
|
||||
**Translation principles** (apply to all modes):
|
||||
|
||||
- **Rewrite, not translate**: Rewrite content into natural, engaging target language as if a skilled native writer composed it from scratch. Quality test: "Does this read like it was originally written in the target language?"
|
||||
- **Accuracy first**: Facts, data, and logic must match the original exactly
|
||||
- **Meaning over words**: Translate what the author means, not just what the words say. When a literal translation sounds unnatural or fails to convey the intended effect, restructure freely to express the same meaning in idiomatic target language
|
||||
- **Figurative language**: Interpret metaphors, idioms, and figurative expressions by their intended meaning rather than translating them word-for-word. When a source-language image does not carry the same connotation in the target language, replace it with a natural expression that conveys the same idea and emotional effect
|
||||
- **Emotional fidelity**: Preserve the emotional connotations of word choices, not just their dictionary meanings. Words that carry subjective feelings (e.g., "alarming", "haunting") should be rendered to evoke the same response in target-language readers
|
||||
- **Natural flow**: Use idiomatic target language word order and sentence patterns; break or restructure sentences freely when the source structure doesn't work naturally in the target language
|
||||
- **Terminology**: Use standard translations; annotate with original term in parentheses on first occurrence
|
||||
- **Natural flow**: Use idiomatic target language word order. Break long source sentences into shorter, natural ones. Interpret metaphors and idioms by intended meaning, not word-for-word
|
||||
- **Terminology**: Use standard translations consistently. First occurrence of specialized terms: annotate with original in parentheses
|
||||
- **Preserve format**: Keep all markdown formatting (headings, bold, italic, images, links, code blocks)
|
||||
- **Image-language awareness**: Preserve image references exactly during translation, but after the translation is complete, review referenced images and check whether their likely main text language still matches the translated article language
|
||||
- **Frontmatter transformation**: If the source has YAML frontmatter, preserve it in the translation with these changes: (1) Rename metadata fields that describe the *source* article — `url`→`sourceUrl`, `title`→`sourceTitle`, `description`→`sourceDescription`, `author`→`sourceAuthor`, `date`→`sourceDate`, and any similar origin-metadata fields — by adding a `source` prefix (camelCase). (2) Translate the values of text fields (title, description, etc.) and add them as new top-level fields. (3) Keep other fields (tags, categories, custom fields) as-is, translating their values where appropriate
|
||||
- **Respect original**: Maintain original meaning and intent; do not add, remove, or editorialize — but sentence structure and imagery may be adapted freely to serve the meaning
|
||||
- **Translator's notes**: For terms, concepts, or cultural references that target readers may not understand — due to jargon, cultural gaps, or domain-specific knowledge — add a concise explanatory note in parentheses immediately after the term. The note should explain *what it means* in plain language, not just provide the English original. Format: `译文(English original,通俗解释)`. Calibrate annotation depth to the target audience: general readers need more notes than technical readers. For short texts (< 5 sentences), further reduce annotations — only annotate non-common terms that the target audience is unlikely to know; skip terms that are widely recognized or self-explanatory in context. Only add notes where genuinely needed; do not over-annotate obvious terms.
|
||||
- **Proactive interpretation**: For jargon or concepts the target audience may lack context for, add concise explanations in **bold parentheses** `(**解释**)`. Keep annotations few — only where genuinely needed for comprehension
|
||||
- **Frontmatter**: If source has YAML frontmatter, rename source-metadata fields with `source` prefix (camelCase: `url`→`sourceUrl`, `title`→`sourceTitle`, etc.), add translated values as new top-level fields (skip `title` if body has H1), keep other fields as-is
|
||||
|
||||
#### Quick Mode
|
||||
|
||||
Translate directly → save to `translation.md`. No analysis file, but still apply all translation principles above — especially: interpret figurative language by meaning (not word-for-word), preserve emotional connotations, and restructure sentences for natural target-language flow.
|
||||
Translate directly → save to `translation.md`. Apply all translation principles above.
|
||||
|
||||
#### Normal Mode
|
||||
|
||||
1. **Analyze** → `01-analysis.md` (domain, tone, audience, terminology, reader comprehension challenges, figurative language & metaphor mapping)
|
||||
2. **Assemble prompt** → `02-prompt.md` (translation instructions with inlined style preset, content background, glossary, and comprehension challenges)
|
||||
1. **Analyze** → `01-analysis.md` (domain, tone, terminology, translation challenges)
|
||||
2. **Assemble prompt** → `02-prompt.md` (translation instructions with context, glossary, challenges)
|
||||
3. **Translate** (following `02-prompt.md`) → `translation.md`
|
||||
|
||||
After completion, prompt user: "Translation saved. To further review and polish, reply **继续润色** or **refine**."
|
||||
|
|
@ -239,7 +235,7 @@ Full workflow for publication quality. See [references/refined-workflow.md](refe
|
|||
The subagent (if used in Step 3.1) only handles the initial draft. All subsequent steps (critical review, revision, polish) are handled by the main agent, which may delegate to subagents at its discretion.
|
||||
|
||||
Steps and saved files (all in output directory):
|
||||
1. **Analyze** → `01-analysis.md` (domain, tone, terminology, reader comprehension challenges, figurative language & metaphor mapping)
|
||||
1. **Analyze** → `01-analysis.md` (domain, tone, terminology, translation challenges)
|
||||
2. **Assemble prompt** → `02-prompt.md` (translation instructions with inlined context)
|
||||
3. **Draft** → `03-draft.md` (initial translation with translator's notes; from subagent if chunked)
|
||||
4. **Critical review** → `04-critique.md` (diagnosis only: accuracy, Europeanized language, strategy execution, expression issues)
|
||||
|
|
|
|||
|
|
@ -11,95 +11,38 @@ All intermediate results are saved as files in the output directory.
|
|||
|
||||
## Step 1: Content Analysis
|
||||
|
||||
Before translating, deeply analyze the source material. Save analysis to `01-analysis.md` in the output directory. Focus on dimensions that directly inform translation quality.
|
||||
Before translating, analyze the source material. Save analysis to `01-analysis.md` in the output directory.
|
||||
|
||||
### 1.1 Quick Summary
|
||||
### 1.1 Content Summary
|
||||
|
||||
3-5 sentences capturing:
|
||||
- What is this content about?
|
||||
- What is the core argument?
|
||||
- What is the most valuable point?
|
||||
- What is this content about? What is the core argument?
|
||||
- Author background, stance, and writing context
|
||||
- Purpose and intended audience of the original
|
||||
|
||||
### 1.2 Core Content
|
||||
### 1.2 Terminology
|
||||
|
||||
- **Core argument**: One sentence summary
|
||||
- **Key concepts**: What key concepts does the author use? How are they defined?
|
||||
- **Structure**: How is the argument developed? How do sections connect?
|
||||
- **Evidence**: What specific examples, data, or authoritative citations are used?
|
||||
|
||||
### 1.3 Background Context
|
||||
|
||||
- **Author**: Who is the author? What is their background and stance?
|
||||
- **Writing context**: What phenomenon, trend, or debate is this responding to?
|
||||
- **Purpose**: What problem is the author trying to solve? Who are they trying to influence?
|
||||
- **Implicit assumptions**: What unstated premises underlie the argument?
|
||||
|
||||
### 1.4 Terminology Extraction
|
||||
|
||||
- List all technical terms, proper nouns, brand names, acronyms
|
||||
- List technical terms, proper nouns, brand names, acronyms
|
||||
- Cross-reference with loaded glossaries
|
||||
- For terms not in glossary, research standard translations
|
||||
- Record decisions in a working terminology table
|
||||
- For terms not in glossary, determine standard translations
|
||||
- Record in a terminology table
|
||||
|
||||
### 1.5 Tone & Style
|
||||
### 1.3 Tone & Style
|
||||
|
||||
- Is the original formal or conversational?
|
||||
- Does it use humor, metaphor, or cultural references?
|
||||
- Formal or conversational? Humor, metaphor, cultural references?
|
||||
- What register is appropriate for the translation given the target audience?
|
||||
|
||||
### 1.6 Reader Comprehension Challenges
|
||||
### 1.4 Translation Challenges
|
||||
|
||||
Identify points where target readers may struggle, calibrated to the target audience:
|
||||
Identify what may cause difficulty in translation:
|
||||
|
||||
- **Domain jargon**: Technical terms that lack widely-known translations or are meaningless when translated literally
|
||||
- **Cultural references**: Idioms, historical events, pop culture, social norms specific to the source culture
|
||||
- **Implicit knowledge**: Background context the original author assumes but target readers may lack
|
||||
- **Wordplay & metaphors**: Figurative language that doesn't carry over across languages
|
||||
- **Named concepts**: Theories, effects, or phenomena with coined names (e.g., "comb-over effect", "Dunning-Kruger effect")
|
||||
- **Cognitive gaps**: Counterintuitive claims or expectations vs. reality that need framing for target readers
|
||||
|
||||
For each identified challenge, note:
|
||||
1. The original term/passage
|
||||
2. Why it may confuse target readers
|
||||
3. A concise plain-language explanation to use as a translator's note
|
||||
|
||||
### 1.7 Figurative Language & Metaphor Mapping
|
||||
|
||||
Identify all metaphors, similes, idioms, and figurative expressions in the source. For each:
|
||||
|
||||
1. **Original expression**: The exact phrase
|
||||
2. **Intended meaning**: What the author is actually communicating (the idea behind the image)
|
||||
3. **Literal translation risk**: Would a word-for-word translation sound unnatural, lose the connotation, or confuse target readers?
|
||||
4. **Target-language approach**: One of:
|
||||
- **Interpret**: Discard the source image entirely, express the intended meaning directly in natural target language
|
||||
- **Substitute**: Replace with a target-language idiom or image that conveys the same idea and emotional effect
|
||||
- **Retain**: Keep the original image if it works equally well in the target language
|
||||
|
||||
Also flag:
|
||||
- **Emotional connotations carried by word choice**: Words like "alarming" that convey subjective feeling, not just objective description — note the emotional effect to preserve
|
||||
- **Implied meanings**: Sentences where the surface meaning is simple but the implication is richer — note what the author really means so the translator can convey the full intent
|
||||
|
||||
### 1.8 Structural & Creative Challenges
|
||||
|
||||
- Complex sentence patterns (long subordinate clauses, nested modifiers, participial phrases) that need restructuring for natural target-language flow
|
||||
- Structural challenges (wordplay, ambiguity, puns that don't translate)
|
||||
- Content where the author's voice or humor requires creative adaptation
|
||||
- **Comprehension gaps**: Terms or references that target readers may not understand — note what explanation is needed
|
||||
- **Figurative language**: Metaphors, idioms, expressions that don't translate literally — note intended meaning and target-language approach (interpret / substitute / retain)
|
||||
- **Structural challenges**: Long complex sentences, wordplay, puns, or humor that needs creative adaptation
|
||||
|
||||
**Save `01-analysis.md`** with:
|
||||
```
|
||||
## Quick Summary
|
||||
[3-5 sentences]
|
||||
|
||||
## Core Content
|
||||
Core argument: [one sentence]
|
||||
Key concepts: [list]
|
||||
Structure: [outline]
|
||||
|
||||
## Background Context
|
||||
Author: [who, background, stance]
|
||||
Writing context: [what this responds to]
|
||||
Purpose: [goal and target audience]
|
||||
Implicit assumptions: [unstated premises]
|
||||
## Content Summary
|
||||
[Core argument, author, context, purpose]
|
||||
|
||||
## Terminology
|
||||
[term → translation, ...]
|
||||
|
|
@ -107,28 +50,19 @@ Implicit assumptions: [unstated premises]
|
|||
## Tone & Style
|
||||
[assessment]
|
||||
|
||||
## Comprehension Challenges
|
||||
- [term/passage] → [why confusing] → [proposed note]
|
||||
## Translation Challenges
|
||||
- [term/passage] → [challenge type] → [suggested approach]
|
||||
- ...
|
||||
|
||||
## Figurative Language & Metaphor Mapping
|
||||
- [original expression] → [intended meaning] → [approach: interpret/substitute/retain] → [suggested rendering]
|
||||
- ...
|
||||
|
||||
## Structural & Creative Challenges
|
||||
[sentence restructuring needs, wordplay, creative adaptation needs]
|
||||
```
|
||||
|
||||
## Step 2: Assemble Translation Prompt
|
||||
|
||||
Main agent reads `01-analysis.md` and assembles a complete translation prompt using [references/subagent-prompt-template.md](subagent-prompt-template.md). Inline the following from analysis into the prompt:
|
||||
Main agent reads `01-analysis.md` and assembles a complete translation prompt using [references/subagent-prompt-template.md](subagent-prompt-template.md). Inline the following from analysis:
|
||||
|
||||
- **Target style + Source voice**: Resolved style preset (from `--style` flag, EXTEND.md `style` setting, or default `storytelling`) AND the source voice assessment from analysis §1.5 (formal/conversational, humor, register, sentence rhythm)
|
||||
- **Content background**: Quick summary, core argument, author background, writing context, purpose, implicit assumptions (from §1.1–1.3)
|
||||
- **Glossary**: Merged glossary with analysis-extracted terms (from §1.4)
|
||||
- **Figurative Language Mapping**: Structured table from analysis §1.7 — each metaphor/idiom with intended meaning, approach (interpret/substitute/retain), and suggested rendering
|
||||
- **Comprehension Challenges**: Each challenge with reasoning (why it confuses readers) and proposed note (from §1.6)
|
||||
- **Translation Challenges**: Structural and creative challenges from analysis §1.8 — specific passages with suggested approaches
|
||||
- **Target style**: Resolved style preset + source voice assessment from §1.3
|
||||
- **Content background**: Summary from §1.1
|
||||
- **Glossary**: Merged glossary with analysis-extracted terms from §1.2
|
||||
- **Translation challenges**: All challenges from §1.4
|
||||
|
||||
Save to `02-prompt.md`. This prompt is used by the subagent (chunked) or by the main agent itself (non-chunked).
|
||||
|
||||
|
|
@ -138,111 +72,54 @@ Save to `03-draft.md` in the output directory.
|
|||
|
||||
For chunked content, the subagent produces this draft (merged from chunk translations). For non-chunked content, the main agent produces it directly.
|
||||
|
||||
Translate the full content following `02-prompt.md`. Apply all **Translation principles** from SKILL.md Step 4, plus these step-specific guidelines:
|
||||
|
||||
- Use the terminology decisions from Step 1 consistently
|
||||
- Match the identified tone and register
|
||||
- Follow the metaphor mapping from Step 1 for figurative language handling
|
||||
- Add translator's notes for comprehension challenges identified in Step 1
|
||||
Translate the full content following `02-prompt.md`. Apply all **Translation principles** from SKILL.md.
|
||||
|
||||
## Step 4: Critical Review
|
||||
|
||||
The main agent critically reviews the draft against the source. Save review findings to `04-critique.md`. This step produces **diagnosis only** — no rewriting yet.
|
||||
|
||||
### 4.1 Accuracy & Completeness
|
||||
- Compare each paragraph against the original, sentence by sentence
|
||||
- Verify all facts, numbers, dates, and proper nouns
|
||||
- Flag any content accidentally added, removed, or altered
|
||||
- Check that technical terms match glossary consistently throughout
|
||||
- Verify no paragraphs or sections were skipped
|
||||
### 4.1 Accuracy
|
||||
|
||||
### 4.2 Europeanized Language Diagnosis (for CJK targets)
|
||||
- **Unnecessary connectives**: Overuse of 因此/然而/此外/另外 where context already implies the relationship
|
||||
- **Passive voice abuse**: Excessive 被/由/受到 where active voice is more natural
|
||||
- **Noun pile-up**: Long modifier chains that should be broken into shorter clauses
|
||||
- **Cleft sentences**: Unnatural "是...的" structures calqued from English "It is...that"
|
||||
- **Over-nominalization**: Abstract nouns where verbs or adjectives would be more natural (e.g., "进行了讨论" → "讨论了")
|
||||
- **Awkward pronouns**: Overuse of 他/她/它/我们/你 where they can be omitted
|
||||
- Compare each paragraph against the original
|
||||
- Verify facts, numbers, dates, proper nouns
|
||||
- Flag content accidentally added, removed, or altered
|
||||
- Check terminology consistency with glossary
|
||||
|
||||
### 4.3 Figurative Language & Emotional Fidelity
|
||||
- Cross-check against the metaphor mapping in `01-analysis.md`: were all flagged metaphors/idioms handled per the recommended approach (interpret/substitute/retain)?
|
||||
- Flag any metaphors or figurative expressions that were translated literally and sound unnatural or lose the intended meaning in the target language
|
||||
- Check emotional connotations: do words that carry subjective feelings in the source (e.g., "alarming", "haunting", "striking") evoke the same response in the translation, or were they flattened into neutral/objective descriptions?
|
||||
- Flag implied meanings that were lost: sentences where the author's deeper intent was not conveyed because the translator stayed too close to the surface meaning
|
||||
### 4.2 Native Voice
|
||||
|
||||
### 4.4 Strategy Execution
|
||||
- Were the translation strategies from `02-prompt.md` actually followed?
|
||||
- Did the translator apply the tone and register identified in analysis?
|
||||
- Were comprehension challenges from `01-analysis.md` addressed with appropriate notes?
|
||||
- Were glossary terms used consistently?
|
||||
- Flag sentences that read as "translated" rather than "written" — unnatural word order, calques, stiff phrasing
|
||||
- For CJK targets: check for unnecessary connectives (因此/然而/此外), passive voice abuse (被/由/受到), noun pile-ups, over-nominalization
|
||||
- Flag metaphors translated literally that sound unnatural in the target language
|
||||
- Check emotional connotations are preserved, not flattened
|
||||
- Note where sentence restructuring would improve readability
|
||||
|
||||
### 4.5 Expression & Logic
|
||||
- Flag sentences that read like "translationese" — unnatural word order, calques, stiff phrasing
|
||||
- Check logical flow between sentences and paragraphs
|
||||
- Identify where sentence restructuring would improve readability
|
||||
- Note where the target language idiom was missed
|
||||
### 4.3 Notes & Adaptation
|
||||
|
||||
### 4.6 Translator's Notes Quality
|
||||
- Are notes accurate, concise, and genuinely helpful?
|
||||
- Identify missed comprehension challenges that need notes
|
||||
- Flag over-annotations on terms obvious to the target audience
|
||||
- Check that cultural references are explained where needed
|
||||
|
||||
### 4.7 Cultural Adaptation
|
||||
- Do metaphors and idioms work in the target language?
|
||||
- Are any references potentially confusing or offensive in the target culture?
|
||||
- Could any passage be misinterpreted due to cultural context differences?
|
||||
- Are translator's notes accurate, concise, and genuinely helpful?
|
||||
- Flag missed comprehension challenges that need notes, and over-annotations on obvious terms
|
||||
- Were translation strategies from `02-prompt.md` followed?
|
||||
- Do cultural references work in the target language?
|
||||
|
||||
**Save `04-critique.md`** with:
|
||||
```
|
||||
## Accuracy & Completeness
|
||||
## Accuracy
|
||||
- [issue]: [location] — [description]
|
||||
- ...
|
||||
|
||||
## Europeanized Language Issues
|
||||
- [issue type]: [example from draft] → [suggested fix]
|
||||
- ...
|
||||
## Native Voice
|
||||
- [issue]: [example] → [suggested fix]
|
||||
|
||||
## Figurative Language & Emotional Fidelity
|
||||
- [literal metaphor]: [original] → [draft rendering] → [suggested interpretation]
|
||||
- [flattened emotion]: [original word/phrase] → [draft rendering] → [how to restore emotional effect]
|
||||
- ...
|
||||
|
||||
## Strategy Execution
|
||||
- [strategy]: [followed/missed] — [details]
|
||||
- ...
|
||||
|
||||
## Expression & Logic
|
||||
- [location]: [problem] → [suggestion]
|
||||
- ...
|
||||
|
||||
## Translator's Notes
|
||||
- [add/remove/revise]: [term] — [reason]
|
||||
- ...
|
||||
|
||||
## Cultural Adaptation
|
||||
- [issue]: [description] — [suggestion]
|
||||
- ...
|
||||
## Notes & Adaptation
|
||||
- [add/remove/revise]: [term/passage] — [reason]
|
||||
|
||||
## Summary
|
||||
[Overall assessment: X critical issues, Y improvements, Z minor suggestions]
|
||||
[Overall assessment: X critical issues, Y improvements]
|
||||
```
|
||||
|
||||
## Step 5: Revision
|
||||
|
||||
Apply all findings from `04-critique.md` to produce a revised translation. Save to `05-revision.md`.
|
||||
|
||||
The revision reads `03-draft.md` (the original draft) and `04-critique.md` (the review findings), and may also refer back to the source text and `01-analysis.md`:
|
||||
|
||||
- Fix all accuracy issues identified in the critique
|
||||
- Rewrite Europeanized expressions into natural target-language patterns
|
||||
- Re-interpret literally translated metaphors and figurative expressions per the metaphor mapping; replace with natural target-language renderings that convey the intended meaning and emotional effect
|
||||
- Restore flattened emotional connotations: ensure words carrying subjective feelings evoke the same response as the source
|
||||
- Apply missed translation strategies
|
||||
- Restructure stiff or awkward sentences for fluency
|
||||
- Add, remove, or revise translator's notes per critique recommendations
|
||||
- Improve transitions between paragraphs
|
||||
- Adapt cultural references as suggested
|
||||
Read `03-draft.md` and `04-critique.md`, fix all accuracy issues, rewrite unnatural expressions, adjust notes, and improve flow.
|
||||
|
||||
## Step 6: Polish
|
||||
|
||||
|
|
@ -251,21 +128,18 @@ Save final version to `translation.md`.
|
|||
Final pass on `05-revision.md` for publication quality:
|
||||
|
||||
- Read the entire translation as a standalone piece — does it flow as native content?
|
||||
- Smooth any remaining rough transitions between paragraphs
|
||||
- Ensure the narrative voice is consistent throughout
|
||||
- Apply the selected translation style consistently: storytelling should flow like a narrative, formal should maintain neutral professionalism, humorous should land jokes naturally in the target language, etc.
|
||||
- Final scan for surviving literal metaphors or flattened emotions: any figurative expression that still reads as "translated" rather than "written" should be recast into natural target-language expression
|
||||
- Final consistency check on terminology across the full text
|
||||
- Verify formatting is preserved correctly (headings, bold, links, code blocks)
|
||||
- Remove any remaining traces of translationese
|
||||
- Smooth remaining rough transitions
|
||||
- Ensure consistent narrative voice and style throughout
|
||||
- Final terminology consistency check
|
||||
- Verify formatting is preserved correctly
|
||||
|
||||
## Subagent Responsibility
|
||||
|
||||
Each subagent (one per chunk) is responsible **only** for producing the initial draft of its chunk (Step 3). The main agent assembles the shared prompt (Step 2), spawns all subagents in parallel, then takes over for critical review (Step 4), revision (Step 5), and polish (Step 6). The main agent may delegate revision or polish to subagents at its own discretion.
|
||||
Each subagent (one per chunk) is responsible **only** for producing the initial draft of its chunk (Step 3). The main agent assembles the shared prompt (Step 2), spawns all subagents in parallel, then takes over for critical review (Step 4), revision (Step 5), and polish (Step 6).
|
||||
|
||||
## Chunked Refined Translation
|
||||
|
||||
When content exceeds the chunk threshold (see Defaults in SKILL.md) and uses refined mode:
|
||||
When content exceeds the chunk threshold and uses refined mode:
|
||||
|
||||
1. Main agent runs analysis (Step 1) on the **entire** document first → `01-analysis.md`
|
||||
2. Main agent assembles translation prompt → `02-prompt.md`
|
||||
|
|
@ -274,7 +148,4 @@ When content exceeds the chunk threshold (see Defaults in SKILL.md) and uses ref
|
|||
5. Main agent critically reviews the merged draft → `04-critique.md`
|
||||
6. Main agent revises based on critique → `05-revision.md`
|
||||
7. Main agent polishes → `translation.md`
|
||||
7. Final cross-chunk consistency check:
|
||||
- Check terminology consistency across chunk boundaries
|
||||
- Verify narrative flow between chunks
|
||||
- Fix any transition issues at chunk boundaries
|
||||
8. Final cross-chunk consistency check: terminology, narrative flow, transitions at chunk boundaries
|
||||
|
|
|
|||
|
|
@ -15,65 +15,39 @@ Replace `{placeholders}` with actual values. Omit sections marked "if analysis e
|
|||
```markdown
|
||||
You are a professional translator. Your task is to translate markdown content from {source_lang} to {target_lang}.
|
||||
|
||||
## Target Audience
|
||||
## Target Audience & Style
|
||||
|
||||
{audience description}
|
||||
|
||||
## Translation Style
|
||||
**Audience**: {audience description}
|
||||
|
||||
**Target style**: {style description — e.g., "storytelling: engaging narrative flow, smooth transitions, vivid phrasing" or custom style from user}
|
||||
|
||||
**Source voice** (from analysis, if exists): {Describe the original author's voice — e.g., "Self-deprecating, conversational tone with frequent tech-industry humor. Sarcasm used to critique trends. Short punchy sentences alternate with longer analytical passages." Include: formal/conversational, humor type, cultural register, sentence rhythm, any distinctive patterns.}
|
||||
|
||||
Apply the target style consistently while respecting the source voice. The translator should understand what the original sounds like in order to produce a translation that captures the same feel in the target style. Style is independent of audience — a technical audience can still get a storytelling-style translation, or a general audience can get a formal one.
|
||||
**Source voice** (from analysis, if exists): {Brief description of the original author's voice — formal/conversational, humor, register, sentence rhythm.}
|
||||
|
||||
## Content Background
|
||||
|
||||
{Inlined from 01-analysis.md if analysis exists: quick summary, core argument, author background, writing context, purpose, implicit assumptions.}
|
||||
{Inlined from 01-analysis.md if analysis exists: content summary, core argument, author background, context.}
|
||||
|
||||
## Glossary
|
||||
|
||||
Apply these term translations consistently throughout. First occurrence of each term: include the original in parentheses after the translation.
|
||||
Apply these term translations consistently. First occurrence: include original in parentheses.
|
||||
|
||||
{Merged glossary — combine built-in glossary + EXTEND.md glossary + terms extracted in analysis. One per line: English → Translation}
|
||||
|
||||
## Figurative Language Mapping
|
||||
|
||||
{Inlined from 01-analysis.md section 1.7 if analysis exists. Structured table — one row per metaphor, idiom, or figurative expression identified in the source:}
|
||||
|
||||
| Original Expression | Intended Meaning | Approach | Suggested Rendering |
|
||||
|--------------------|--------------------|----------|---------------------|
|
||||
| {source metaphor} | {what the author actually means} | {Interpret / Substitute / Retain} | {target-language rendering or guidance} |
|
||||
|
||||
Also note any emotional connotations (words carrying subjective feeling beyond dictionary meaning) and implied meanings (sentences where surface meaning is simpler than the author's full intent) identified in the analysis — preserve these in translation.
|
||||
|
||||
## Comprehension Challenges
|
||||
|
||||
The following terms or references may confuse target readers. Add translator's notes in parentheses where they appear: `译文(English original,通俗解释)`
|
||||
|
||||
{Inlined from 01-analysis.md comprehension challenges section if analysis exists. Each entry includes the reasoning so the translator can calibrate annotation depth:}
|
||||
|
||||
- **{term/passage}**: {why this may confuse target readers} → Note: {concise explanation to use as translator's note}
|
||||
{Merged glossary — one per line: English → Translation}
|
||||
|
||||
## Translation Challenges
|
||||
|
||||
{Inlined from 01-analysis.md section 1.8 if analysis exists. Specific passages requiring structural or creative adaptation:}
|
||||
{Inlined from 01-analysis.md §1.4 if analysis exists. Comprehension gaps, figurative language, structural challenges with suggested approaches:}
|
||||
|
||||
- {location/passage}: {what makes it challenging — e.g., 60-word participial chain, wordplay, pun, author's signature humor} → {suggested approach — e.g., break into 2-3 shorter sentences, adapt the joke for target culture, preserve the ambiguity}
|
||||
|
||||
If this section is empty, omit it.
|
||||
- **{term/passage}**: {challenge type} → {suggested approach}
|
||||
|
||||
## Translation Principles
|
||||
|
||||
Rewrite the content into natural, engaging {target_lang} — not merely translate it. Every sentence should read as if a skilled native writer composed it from scratch.
|
||||
|
||||
- **Accuracy first**: Facts, data, and logic must match the original exactly
|
||||
- **Meaning over words**: Translate what the author means, not just what the words say. When a literal translation sounds unnatural or fails to convey the intended effect, restructure freely to express the same meaning in idiomatic {target_lang}
|
||||
- **Figurative language**: Interpret metaphors, idioms, and figurative expressions by their intended meaning. When a source-language image does not carry the same connotation in {target_lang}, replace it with a natural expression that conveys the same idea and emotional effect. Follow the Figurative Language Mapping table above for pre-analyzed decisions
|
||||
- **Emotional fidelity**: Preserve the emotional connotations of word choices, not just their dictionary meanings
|
||||
- **Natural flow**: Use idiomatic {target_lang} word order and sentence patterns; break or restructure sentences freely when the source structure doesn't work naturally
|
||||
- **Terminology**: Use glossary translations consistently; annotate with original term in parentheses on first occurrence
|
||||
- **Natural flow**: Use idiomatic {target_lang} word order. Break long source sentences into shorter, natural ones. Interpret metaphors and idioms by intended meaning, not word-for-word
|
||||
- **Terminology**: Use glossary translations consistently. Annotate with original in parentheses on first occurrence of specialized terms
|
||||
- **Preserve format**: Keep all markdown formatting (headings, bold, italic, images, links, code blocks)
|
||||
- **Respect original**: Maintain original meaning and intent; do not add, remove, or editorialize — but sentence structure and imagery may be adapted freely to serve the meaning
|
||||
- **Translator's notes**: For terms or cultural references listed in Comprehension Challenges above, add a concise explanatory note in parentheses. Use the provided reasoning to judge annotation depth — explain more for genuinely obscure references, less for terms that are merely unfamiliar. Only annotate where genuinely needed for the target audience.
|
||||
- **Proactive interpretation**: For jargon or concepts the target audience may lack context for, add concise explanations in **bold parentheses** `(**解释**)`. Keep annotations few — only where genuinely needed
|
||||
```
|
||||
|
||||
---
|
||||
|
|
@ -86,7 +60,7 @@ If this section is empty, omit it.
|
|||
Read the translation instructions from: {output_dir}/02-prompt.md
|
||||
|
||||
You are translating chunk {NN} of {total_chunks}.
|
||||
Context: {brief description of what this chunk covers and where it sits in the overall argument — e.g., "This chunk covers the author's critique of current approaches, following the introduction of the problem and leading into the proposed solution."}
|
||||
Context: {brief description of what this chunk covers and where it sits in the overall argument}
|
||||
|
||||
Translate this chunk:
|
||||
1. Read `{output_dir}/chunks/chunk-{NN}.md`
|
||||
|
|
|
|||
Loading…
Reference in New Issue