references/config/first-time-setup.md
4.7 KB查看排版效果| 1 | --- |
| 2 | name: first-time-setup |
| 3 | description: First-time setup flow for baoyu-infographic preferences |
| 4 | --- |
| 5 | |
| 6 | # First-Time Setup |
| 7 | |
| 8 | ## Overview |
| 9 | |
| 10 | When no EXTEND.md is found, guide the user through preference setup before generating any infographic. Saved preferences shift Step-3 recommendations and Step-4 defaults only — they never bypass Step 4 confirmation (see the `## Confirmation Policy` section in SKILL.md). |
| 11 | |
| 12 | **⛔ BLOCKING OPERATION**: This setup MUST complete before ANY other workflow steps. Do NOT: |
| 13 | - Ask about source content or topic |
| 14 | - Ask about layout, style, or aspect |
| 15 | - Begin Step 1.2 content analysis |
| 16 | |
| 17 | ONLY ask the questions in this setup flow, save EXTEND.md, then continue to Step 1.2. |
| 18 | |
| 19 | ## Setup Flow |
| 20 | |
| 21 | ``` |
| 22 | No EXTEND.md found |
| 23 | │ |
| 24 | ▼ |
| 25 | ┌─────────────────────┐ |
| 26 | │ AskUserQuestion │ |
| 27 | │ (all questions) │ |
| 28 | └─────────────────────┘ |
| 29 | │ |
| 30 | ▼ |
| 31 | ┌─────────────────────┐ |
| 32 | │ Create EXTEND.md │ |
| 33 | └─────────────────────┘ |
| 34 | │ |
| 35 | ▼ |
| 36 | Continue to Step 1.2 |
| 37 | ``` |
| 38 | |
| 39 | ## Questions |
| 40 | |
| 41 | **Language**: Use the user's input language for question text. Do not always default to English. |
| 42 | |
| 43 | Use a single `AskUserQuestion` with multiple questions (the runtime auto-adds an "Other" option): |
| 44 | |
| 45 | ### Question 1: Preferred Layout |
| 46 | |
| 47 | ``` |
| 48 | header: "Layout" |
| 49 | question: "Default layout preference?" |
| 50 | options: |
| 51 | - label: "Auto-select (Recommended)" |
| 52 | description: "Pick layout per content in Step 3" |
| 53 | - label: "bento-grid" |
| 54 | description: "Multiple topics, overview (general default)" |
| 55 | - label: "linear-progression" |
| 56 | description: "Timelines, processes, tutorials" |
| 57 | - label: "dense-modules" |
| 58 | description: "High-density modules, data-rich guides" |
| 59 | ``` |
| 60 | |
| 61 | ### Question 2: Preferred Style |
| 62 | |
| 63 | ``` |
| 64 | header: "Style" |
| 65 | question: "Default visual style preference?" |
| 66 | options: |
| 67 | - label: "Auto-select (Recommended)" |
| 68 | description: "Pick style per tone in Step 3" |
| 69 | - label: "craft-handmade" |
| 70 | description: "Hand-drawn, paper craft (general default)" |
| 71 | - label: "corporate-memphis" |
| 72 | description: "Flat vector, vibrant" |
| 73 | - label: "morandi-journal" |
| 74 | description: "Hand-drawn doodle, warm Morandi tones" |
| 75 | ``` |
| 76 | |
| 77 | ### Question 3: Preferred Aspect |
| 78 | |
| 79 | ``` |
| 80 | header: "Aspect" |
| 81 | question: "Default aspect ratio?" |
| 82 | options: |
| 83 | - label: "Auto-select (Recommended)" |
| 84 | description: "Pick per layout in Step 4" |
| 85 | - label: "landscape" |
| 86 | description: "16:9 (slides, blogs, web)" |
| 87 | - label: "portrait" |
| 88 | description: "9:16 (mobile, social, dense modules)" |
| 89 | - label: "square" |
| 90 | description: "1:1 (social, thumbnails)" |
| 91 | ``` |
| 92 | |
| 93 | ### Question 4: Language |
| 94 | |
| 95 | ``` |
| 96 | header: "Language" |
| 97 | question: "Output language for infographic text?" |
| 98 | options: |
| 99 | - label: "Auto-detect (Recommended)" |
| 100 | description: "Match source content language" |
| 101 | - label: "zh" |
| 102 | description: "Chinese (中文)" |
| 103 | - label: "en" |
| 104 | description: "English" |
| 105 | ``` |
| 106 | |
| 107 | ### Question 5: Save Location |
| 108 | |
| 109 | ``` |
| 110 | header: "Save" |
| 111 | question: "Where to save preferences?" |
| 112 | options: |
| 113 | - label: "Project" |
| 114 | description: ".baoyu-skills/ (this project only)" |
| 115 | - label: "User" |
| 116 | description: "~/.baoyu-skills/ (all projects)" |
| 117 | ``` |
| 118 | |
| 119 | ## Save Locations |
| 120 | |
| 121 | | Choice | Path | Scope | |
| 122 | |--------|------|-------| |
| 123 | | Project | `.baoyu-skills/baoyu-infographic/EXTEND.md` | Current project | |
| 124 | | User | `~/.baoyu-skills/baoyu-infographic/EXTEND.md` | All projects | |
| 125 | |
| 126 | XDG path (`${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-infographic/EXTEND.md`) is also recognized at read time but not offered as a save target during first-time setup. |
| 127 | |
| 128 | ## After Setup |
| 129 | |
| 130 | 1. Create the directory if needed |
| 131 | 2. Write EXTEND.md with frontmatter (see template below) |
| 132 | 3. Confirm: "Preferences saved to [path]" |
| 133 | 4. Continue to Step 1.2 |
| 134 | |
| 135 | ## EXTEND.md Template |
| 136 | |
| 137 | ```yaml |
| 138 | --- |
| 139 | version: 1 |
| 140 | preferred_layout: [selected layout or null] |
| 141 | preferred_style: [selected style or null] |
| 142 | preferred_aspect: [landscape|portrait|square|null] |
| 143 | language: [selected language or null] |
| 144 | preferred_image_backend: auto |
| 145 | custom_styles: [] |
| 146 | --- |
| 147 | ``` |
| 148 | |
| 149 | `preferred_image_backend: auto` is the baked-in default — first-time setup never asks about it. The `## Image Generation Tools` rule in SKILL.md then picks the runtime-native tool (Codex `imagegen`, Hermes `image_generate`, etc.) when one is available, and falls back to installed backends like `baoyu-image-gen`. |
| 150 | |
| 151 | ## Modifying Preferences Later |
| 152 | |
| 153 | See the `## Changing Preferences` section in `SKILL.md` for the canonical list of common edits (pin backend, change layout/style defaults, retrigger setup). Full schema: `references/config/preferences-schema.md`. |
文件内容是平台检查时读出的文本,只供查看。平台不会运行包里的任何脚本或程序。

