references/config/first-time-setup.md
4.6 KB查看排版效果| 1 | --- |
| 2 | name: first-time-setup |
| 3 | description: First-time setup flow for baoyu-translate preferences |
| 4 | --- |
| 5 | |
| 6 | # First-Time Setup |
| 7 | |
| 8 | ## Overview |
| 9 | |
| 10 | When no EXTEND.md is found, guide user through preference setup. |
| 11 | |
| 12 | **BLOCKING OPERATION**: This setup MUST complete before ANY translation. Do NOT: |
| 13 | - Start translating content |
| 14 | - Ask about files or output paths |
| 15 | - Proceed to any workflow steps |
| 16 | |
| 17 | ONLY ask the questions in this setup flow, save EXTEND.md, then continue. |
| 18 | |
| 19 | ## Setup Flow |
| 20 | |
| 21 | ``` |
| 22 | No EXTEND.md found |
| 23 | | |
| 24 | v |
| 25 | +---------------------+ |
| 26 | | AskUserQuestion | |
| 27 | | (all questions) | |
| 28 | +---------------------+ |
| 29 | | |
| 30 | v |
| 31 | +---------------------+ |
| 32 | | Create EXTEND.md | |
| 33 | +---------------------+ |
| 34 | | |
| 35 | v |
| 36 | Continue translation |
| 37 | ``` |
| 38 | |
| 39 | ## Questions |
| 40 | |
| 41 | **Language**: Use user's input language or saved language preference. |
| 42 | |
| 43 | Use AskUserQuestion with ALL questions in ONE call: |
| 44 | |
| 45 | ### Question 1: Target Language |
| 46 | |
| 47 | ```yaml |
| 48 | header: "Target Language" |
| 49 | question: "Default target language?" |
| 50 | options: |
| 51 | - label: "简体中文 zh-CN (Recommended)" |
| 52 | description: "Translate to Simplified Chinese" |
| 53 | - label: "繁體中文 zh-TW" |
| 54 | description: "Translate to Traditional Chinese" |
| 55 | - label: "English en" |
| 56 | description: "Translate to English" |
| 57 | - label: "日本語 ja" |
| 58 | description: "Translate to Japanese" |
| 59 | ``` |
| 60 | |
| 61 | Note: User may type a custom language code. |
| 62 | |
| 63 | ### Question 2: Translation Mode |
| 64 | |
| 65 | ```yaml |
| 66 | header: "Mode" |
| 67 | question: "Default translation mode?" |
| 68 | options: |
| 69 | - label: "Normal (Recommended)" |
| 70 | description: "Analyze content first, then translate" |
| 71 | - label: "Quick" |
| 72 | description: "Direct translation, no analysis" |
| 73 | - label: "Refined" |
| 74 | description: "Full workflow: analyze → translate → review → polish" |
| 75 | ``` |
| 76 | |
| 77 | ### Question 3: Target Audience |
| 78 | |
| 79 | ```yaml |
| 80 | header: "Audience" |
| 81 | question: "Default target audience?" |
| 82 | options: |
| 83 | - label: "General readers (Recommended)" |
| 84 | description: "Plain language, more translator's notes for jargon" |
| 85 | - label: "Technical" |
| 86 | description: "Developers/engineers, less annotation on tech terms" |
| 87 | - label: "Academic" |
| 88 | description: "Formal register, precise terminology" |
| 89 | - label: "Business" |
| 90 | description: "Business-friendly tone, explain tech concepts" |
| 91 | ``` |
| 92 | |
| 93 | Note: User may type a custom audience description. |
| 94 | |
| 95 | ### Question 4: Translation Style |
| 96 | |
| 97 | ```yaml |
| 98 | header: "Style" |
| 99 | question: "Translation style?" |
| 100 | options: |
| 101 | - label: "Storytelling (Recommended)" |
| 102 | description: "Engaging narrative flow, smooth transitions" |
| 103 | - label: "Formal" |
| 104 | description: "Professional, structured, neutral tone" |
| 105 | - label: "Technical" |
| 106 | description: "Precise, documentation-style, concise" |
| 107 | - label: "Literal" |
| 108 | description: "Close to original structure" |
| 109 | - label: "Academic" |
| 110 | description: "Scholarly, rigorous, formal register" |
| 111 | - label: "Business" |
| 112 | description: "Concise, results-focused, action-oriented" |
| 113 | - label: "Humorous" |
| 114 | description: "Preserves humor, witty, playful" |
| 115 | - label: "Conversational" |
| 116 | description: "Casual, friendly, spoken-like" |
| 117 | - label: "Elegant" |
| 118 | description: "Literary, polished, aesthetically refined" |
| 119 | ``` |
| 120 | |
| 121 | Note: User may type a custom style description. |
| 122 | |
| 123 | ### Question 5: Save Location |
| 124 | |
| 125 | ```yaml |
| 126 | header: "Save" |
| 127 | question: "Where to save preferences?" |
| 128 | options: |
| 129 | - label: "User (Recommended)" |
| 130 | description: "$HOME/.baoyu-skills/ (all projects)" |
| 131 | - label: "Project" |
| 132 | description: ".baoyu-skills/ (this project only)" |
| 133 | ``` |
| 134 | |
| 135 | ## Save Locations |
| 136 | |
| 137 | | Choice | Path | Scope | |
| 138 | |--------|------|-------| |
| 139 | | User | `$HOME/.baoyu-skills/baoyu-translate/EXTEND.md` | All projects | |
| 140 | | Project | `.baoyu-skills/baoyu-translate/EXTEND.md` | Current project | |
| 141 | |
| 142 | ## After Setup |
| 143 | |
| 144 | 1. Create directory if needed |
| 145 | 2. Write EXTEND.md with selected values |
| 146 | 3. Confirm: "Preferences saved to [path]" |
| 147 | 4. Mention: "You can add custom glossary terms to EXTEND.md anytime. See the `glossary` section in the file for the format." |
| 148 | 5. Continue with translation using saved preferences |
| 149 | |
| 150 | ## EXTEND.md Template |
| 151 | |
| 152 | ```yaml |
| 153 | target_language: [zh-CN/zh-TW/en/ja/...] |
| 154 | default_mode: [quick/normal/refined] |
| 155 | audience: [general/technical/academic/business/custom] |
| 156 | style: [storytelling/formal/technical/literal/academic/business/humorous/conversational/elegant] |
| 157 | |
| 158 | # Custom glossary (optional) — add your own term translations here |
| 159 | # glossary: |
| 160 | # - from: "Term" |
| 161 | # to: "翻译" |
| 162 | # - from: "Another Term" |
| 163 | # to: "另一个翻译" |
| 164 | # note: "Usage context" |
| 165 | ``` |
| 166 | |
| 167 | ## Modifying Preferences Later |
| 168 | |
| 169 | Users can edit EXTEND.md directly or delete it to trigger setup again. |
文件内容是平台检查时读出的文本,只供查看。平台不会运行包里的任何脚本或程序。

