$npx -y skills add AI-Practical-Lab/novel-writer --skill novel-brainstorm版本: 2.0 功能: Step 1 & 3 - 需求澄清与头脑风暴(交互式)
| 1 | # novel-brainstorm |
| 2 | |
| 3 | **版本**: 2.0 |
| 4 | **功能**: Step 1 & 3 - 需求澄清与头脑风暴(交互式) |
| 5 | |
| 6 | --- |
| 7 | |
| 8 | ## 核心设计原则 |
| 9 | |
| 10 | **不直接面对用户**,所有交互通过主 Skill (orchestrator) 中转。 |
| 11 | |
| 12 | ``` |
| 13 | 用户 ←→ 主Skill ←→ novel-brainstorm |
| 14 | ↑ |
| 15 | 负责展示问题和收集答案 |
| 16 | ``` |
| 17 | |
| 18 | --- |
| 19 | |
| 20 | ## 输入接口 |
| 21 | |
| 22 | ```yaml |
| 23 | mode: "generate_question" | "process_answer" | "finalize" |
| 24 | |
| 25 | # mode = generate_question |
| 26 | context: |
| 27 | project_path: string |
| 28 | current_confirmed: object # 已确认的大纲要素 |
| 29 | pending_dimensions: array # 待讨论的维度列表 |
| 30 | last_answer: null # 无用户回答 |
| 31 | |
| 32 | # mode = process_answer |
| 33 | context: |
| 34 | project_path: string |
| 35 | current_confirmed: object |
| 36 | pending_dimensions: array |
| 37 | last_answer: # 用户的回答 |
| 38 | question_id: string |
| 39 | answer_text: string |
| 40 | selected_option: string # 如适用 |
| 41 | |
| 42 | # mode = finalize |
| 43 | context: |
| 44 | project_path: string |
| 45 | current_confirmed: object # 全部确认完成 |
| 46 | ``` |
| 47 | |
| 48 | --- |
| 49 | |
| 50 | ## 输出接口 |
| 51 | |
| 52 | ```yaml |
| 53 | # action = ask_user (需要继续交互) |
| 54 | status: "in_progress" |
| 55 | action: "ask_user" |
| 56 | question: |
| 57 | id: string # 问题唯一标识 |
| 58 | dimension: string # 所属维度 |
| 59 | text: string # 问题文本 |
| 60 | description: string # 为什么问这个问题 |
| 61 | options: # 选项(如适用) |
| 62 | - id: "A" |
| 63 | text: "选项A描述" |
| 64 | - id: "B" |
| 65 | text: "选项B描述" |
| 66 | - id: "C" |
| 67 | text: "其他:___" |
| 68 | allow_free_input: boolean # 是否允许自由输入 |
| 69 | |
| 70 | confirmed_update: object # 本次新增/更新的确认内容 |
| 71 | next_dimension: string # 建议下一个维度 |
| 72 | progress: # 进度 |
| 73 | current: number |
| 74 | total: number |
| 75 | |
| 76 | --- |
| 77 | |
| 78 | # action = continue (自动继续,无需用户输入) |
| 79 | status: "in_progress" |
| 80 | action: "continue" |
| 81 | message: string # 说明为什么要继续 |
| 82 | confirmed_update: object |
| 83 | next_dimension: string |
| 84 | |
| 85 | --- |
| 86 | |
| 87 | # action = complete (全部完成) |
| 88 | status: "completed" |
| 89 | action: "complete" |
| 90 | confirmed_elements: object # 完整的六维度大纲要素 |
| 91 | file_updates: |
| 92 | - path: "memory/brainstorm-result.yaml" |
| 93 | content: "..." |
| 94 | next_step: "proceed_to_setup" | "proceed_to_outline" |
| 95 | ``` |
| 96 | |
| 97 | --- |
| 98 | |
| 99 | ## 六维度清单 |
| 100 | |
| 101 | | 序号 | 维度 | 关键问题 | |
| 102 | |:---:|------|---------| |
| 103 | | 1 | protagonist_arc | 主角起点、终点、关键转折 | |
| 104 | | 2 | conflicts | 内在冲突、外在阻力 | |
| 105 | | 3 | key_events | 核心事件、爽点设计 | |
| 106 | | 4 | relationships | 重要关系演变 | |
| 107 | | 5 | milestones | 能力/地位节点 | |
| 108 | | 6 | plot_hooks | 伏笔埋设与回收 | |
| 109 | |
| 110 | --- |
| 111 | |
| 112 | ## 交互流程示例 |
| 113 | |
| 114 | ### Round 1: 生成第一个问题 |
| 115 | |
| 116 | **输入**: |
| 117 | ```yaml |
| 118 | mode: "generate_question" |
| 119 | current_confirmed: {} |
| 120 | pending_dimensions: ["protagonist_arc", "conflicts", ...] |
| 121 | ``` |
| 122 | |
| 123 | **输出**: |
| 124 | ```yaml |
| 125 | status: "in_progress" |
| 126 | action: "ask_user" |
| 127 | question: |
| 128 | id: "q1_protagonist_start" |
| 129 | dimension: "protagonist_arc" |
| 130 | text: "主角开场是什么状态?" |
| 131 | description: "这决定了故事的起点和读者的代入感" |
| 132 | options: |
| 133 | - id: "A" |
| 134 | text: "已经很惨(被退婚、被废、被追杀)" |
| 135 | - id: "B" |
| 136 | text: "一般惨(家境普通,怀才不遇)" |
| 137 | - id: "C" |
| 138 | text: "看似光鲜(实际有隐忧)" |
| 139 | allow_free_input: true |
| 140 | confirmed_update: {} |
| 141 | next_dimension: "protagonist_arc" |
| 142 | progress: |
| 143 | current: 1 |
| 144 | total: 6 |
| 145 | ``` |
| 146 | |
| 147 | ### Round 2: 处理用户回答 |
| 148 | |
| 149 | **输入**: |
| 150 | ```yaml |
| 151 | mode: "process_answer" |
| 152 | current_confirmed: {} |
| 153 | last_answer: |
| 154 | question_id: "q1_protagonist_start" |
| 155 | selected_option: "A" |
| 156 | answer_text: "被退婚的废材少年" |
| 157 | ``` |
| 158 | |
| 159 | **输出**: |
| 160 | ```yaml |
| 161 | status: "in_progress" |
| 162 | action: "ask_user" |
| 163 | question: |
| 164 | id: "q2_protagonist_end" |
| 165 | dimension: "protagonist_arc" |
| 166 | text: "那结尾你想让他变成什么样?" |
| 167 | options: |
| 168 | - id: "A" |
| 169 | text: "站在世界巅峰" |
| 170 | - id: "B" |
| 171 | text: "找到真爱归隐" |
| 172 | - id: "C" |
| 173 | text: "复仇成功但失去一切" |
| 174 | confirmed_update: |
| 175 | protagonist_arc: |
| 176 | start: "被退婚的废材少年" |
| 177 | next_dimension: "protagonist_arc" |
| 178 | progress: |
| 179 | current: 1 |
| 180 | total: 6 |
| 181 | ``` |
| 182 | |
| 183 | ### Final Round: 完成 |
| 184 | |
| 185 | **输入**: |
| 186 | ```yaml |
| 187 | mode: "finalize" |
| 188 | current_confirmed: |
| 189 | protagonist_arc: {...} |
| 190 | conflicts: {...} |
| 191 | ... |
| 192 | ``` |
| 193 | |
| 194 | **输出**: |
| 195 | ```yaml |
| 196 | status: "completed" |
| 197 | action: "complete" |
| 198 | confirmed_elements: |
| 199 | protagonist_arc: {...} |
| 200 | conflicts: {...} |
| 201 | key_events: {...} |
| 202 | relationships: {...} |
| 203 | milestones: {...} |
| 204 | plot_hooks: {...} |
| 205 | file_updates: |
| 206 | - path: "memory/brainstorm-result.yaml" |
| 207 | content: "..." |
| 208 | next_step: "proceed_to_setup" |
| 209 | ``` |
| 210 | |
| 211 | --- |
| 212 | |
| 213 | ## 使用方式 |
| 214 | |
| 215 | 由主 Skill (novel-writer) 调用: |
| 216 | |
| 217 | ```javascript |
| 218 | // 第一轮 |
| 219 | const result = await callSubSkill('novel-brainstorm', { |
| 220 | mode: 'generate_question', |
| 221 | context: { current_confirmed: {}, pending_dimensions: [...] } |
| 222 | }); |
| 223 | |
| 224 | // 展示给用户,收集回答 |
| 225 | const userAnswer = await presentToUser(result.question); |
| 226 | |
| 227 | // 下一轮 |
| 228 | const result2 = await callSubSkill('novel-brainstorm', { |
| 229 | mode: 'process_answer', |
| 230 | context: { |
| 231 | current_confirmed: result.confirmed_update, |
| 232 | last_answer: userAnswer |
| 233 | } |
| 234 | }); |
| 235 | |
| 236 | // 循环直到 result.action === 'complete' |
| 237 | ``` |
| 238 | |
| 239 | --- |
| 240 | |
| 241 | ## 注意事项 |
| 242 | |
| 243 | 1. **每轮只问1-2个问题**,不轰炸用户 |
| 244 | 2. **提供选项+开放输入**,降低决策成本 |
| 245 | 3. **解释为什么问**,让用户理解价值 |
| 246 | 4. **显示进度**,让用户知道还有多久 |
| 247 | 5. **允许回退**,用户可以修改之前的答案 |