@fifine/aim-studio 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +3 -26
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/index.d.ts +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +28 -3
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/opencode.d.ts +11 -0
- package/dist/configurators/opencode.d.ts.map +1 -0
- package/dist/configurators/opencode.js +64 -0
- package/dist/configurators/opencode.js.map +1 -0
- package/dist/constants/paths.d.ts +1 -1
- package/dist/constants/paths.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +4 -2
- package/dist/migrations/index.js.map +1 -1
- package/dist/templates/aim/scripts/common/cli_adapter.py +267 -435
- package/dist/templates/aim/scripts/create_bootstrap.py +290 -290
- package/dist/templates/aim/scripts/multi_agent/__init__.py +5 -0
- package/dist/templates/aim/scripts/multi_agent/cleanup.py +403 -0
- package/dist/templates/aim/scripts/multi_agent/create_pr.py +329 -0
- package/dist/templates/aim/scripts/multi_agent/plan.py +233 -0
- package/dist/templates/aim/scripts/multi_agent/start.py +461 -0
- package/dist/templates/aim/scripts/multi_agent/status.py +817 -0
- package/dist/templates/aim/worktree.yaml +1 -1
- package/dist/templates/claude/agents/director.md +66 -0
- package/dist/templates/claude/agents/prompt-engineer.md +96 -0
- package/dist/templates/claude/agents/storyboard-artist.md +62 -0
- package/dist/templates/claude/agents/writer.md +66 -0
- package/dist/templates/claude/commands/aim/onboard.md +360 -360
- package/dist/templates/claude/hooks/session-start.py +9 -12
- package/dist/templates/claude/index.d.ts +14 -1
- package/dist/templates/claude/index.d.ts.map +1 -1
- package/dist/templates/claude/index.js +21 -1
- package/dist/templates/claude/index.js.map +1 -1
- package/dist/templates/claude/skills/character-manager/SKILL.md +105 -0
- package/dist/templates/claude/skills/episode-manager/SKILL.md +89 -0
- package/dist/templates/claude/skills/image-prompt-optimizer/SKILL.md +103 -0
- package/dist/templates/claude/skills/script-parser/SKILL.md +115 -0
- package/dist/templates/claude/skills/storyboard-designer/SKILL.md +99 -0
- package/dist/templates/claude/skills/style-keeper/SKILL.md +77 -0
- package/dist/templates/claude/skills/video-prompt-optimizer/SKILL.md +109 -0
- package/dist/templates/extract.d.ts +6 -0
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +12 -0
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/markdown/gitignore.txt +1 -1
- package/dist/templates/markdown/index.d.ts +1 -23
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +2 -30
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/opencode/agents/director.md +71 -0
- package/dist/templates/opencode/agents/prompt-engineer.md +99 -0
- package/dist/templates/opencode/agents/start.md +91 -0
- package/dist/templates/opencode/agents/story.md +92 -0
- package/dist/templates/opencode/agents/storyboard-artist.md +65 -0
- package/dist/templates/opencode/agents/writer.md +71 -0
- package/dist/templates/opencode/commands/aim/check-story.md +54 -0
- package/dist/templates/opencode/commands/aim/export.md +332 -0
- package/dist/templates/opencode/commands/aim/finish-work.md +122 -0
- package/dist/templates/opencode/commands/aim/legitimize.md +263 -0
- package/dist/templates/opencode/commands/aim/onboard.md +360 -0
- package/dist/templates/opencode/commands/aim/portrait.md +165 -0
- package/dist/templates/opencode/commands/aim/record-session.md +87 -0
- package/dist/templates/opencode/commands/aim/start.md +79 -0
- package/dist/templates/opencode/commands/aim/story.md +393 -0
- package/dist/templates/opencode/commands/aim/visualize.md +177 -0
- package/dist/templates/opencode/index.d.ts +48 -0
- package/dist/templates/opencode/index.d.ts.map +1 -0
- package/dist/templates/opencode/index.js +84 -0
- package/dist/templates/opencode/index.js.map +1 -0
- package/dist/templates/opencode/lib/aim-context.js +148 -0
- package/dist/templates/opencode/plugin/session-start.js +170 -0
- package/dist/types/ai-tools.d.ts +4 -4
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +8 -0
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/types/migration.d.ts +1 -1
- package/dist/types/migration.js +1 -1
- package/dist/utils/project-detector.d.ts.map +1 -1
- package/dist/utils/project-detector.js +0 -1
- package/dist/utils/project-detector.js.map +1 -1
- package/dist/utils/template-hash.d.ts +1 -1
- package/dist/utils/template-hash.js +1 -1
- package/package.json +11 -8
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
# 漫剧创作
|
|
2
|
+
|
|
3
|
+
启动漫剧创作模式,开始你的故事创作。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 适用场景
|
|
8
|
+
|
|
9
|
+
- 创作全新的漫剧项目
|
|
10
|
+
- 开始新剧集的创作
|
|
11
|
+
- 为现有项目添加新角色或新情节
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 完整工作流程
|
|
16
|
+
|
|
17
|
+
### 流程概览
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
21
|
+
│ 漫剧创作完整流程 │
|
|
22
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
23
|
+
│ │
|
|
24
|
+
│ 1. 初始化 ──────────────────────────────────────────────────────→ │
|
|
25
|
+
│ aim init -u <你的名字> │
|
|
26
|
+
│ │
|
|
27
|
+
│ 2. 开始工作 ────────────────────────────────────────────────────→ │
|
|
28
|
+
│ /aim:start │
|
|
29
|
+
│ │
|
|
30
|
+
│ 3. 设置风格 ────────────────────────────────────────────────────→ │
|
|
31
|
+
│ cat .aim-studio/spec/story/style-guide.md │
|
|
32
|
+
│ │
|
|
33
|
+
│ 4. 创作阶段 ────────────────────────────────────────────────────→ │
|
|
34
|
+
│ │ │
|
|
35
|
+
│ ├─→ /aim:story 启动漫剧创作 │
|
|
36
|
+
│ │ │
|
|
37
|
+
│ ├─→ /aim:portrait <角色> 创建角色肖像(可选,可多次) │
|
|
38
|
+
│ │ │
|
|
39
|
+
│ ├─→ /aim:visualize 生成场景图片(可选,可多次) │
|
|
40
|
+
│ │ │
|
|
41
|
+
│ └─→ /aim:check-story 检查剧情一致性(可选,可多次) │
|
|
42
|
+
│ │ │
|
|
43
|
+
│ ├─→ /aim:legitimize 检查并修复违规内容(推荐) │
|
|
44
|
+
│ │
|
|
45
|
+
│ 5. 导出阶段 ────────────────────────────────────────────────────→ │
|
|
46
|
+
│ │ │
|
|
47
|
+
│ └─→ /aim:export 导出 Seedance 视频提示词 │
|
|
48
|
+
│ │
|
|
49
|
+
│ 6. 完成工作 ────────────────────────────────────────────────────→ │
|
|
50
|
+
│ /aim:finish-work │
|
|
51
|
+
│ │
|
|
52
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 详细步骤
|
|
58
|
+
|
|
59
|
+
### 步骤 1:初始化项目
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# 在你的项目目录中
|
|
63
|
+
aim init -u 你的名字
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
这会创建以下结构:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
项目目录/
|
|
70
|
+
├── .aim-studio/ # 系统配置
|
|
71
|
+
│ ├── spec/story/ # 创作规范
|
|
72
|
+
│ │ ├── script.md # 剧本规范
|
|
73
|
+
│ │ ├── character.md # 角色设定
|
|
74
|
+
│ │ └── world.md # 世界观设定
|
|
75
|
+
│ └── tasks/ # 任务存储
|
|
76
|
+
├── aim-workspace/ # 工作日志(你的创作记录)
|
|
77
|
+
└── ...
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 步骤 2:开始工作
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
/aim:start
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
AI 会:
|
|
87
|
+
1. 读取项目状态
|
|
88
|
+
2. 查看最近的工作日志
|
|
89
|
+
3. 询问你今天要做什么
|
|
90
|
+
|
|
91
|
+
### 步骤 3:设置视频风格(重要!)
|
|
92
|
+
|
|
93
|
+
在开始创作之前,先设置项目的视频风格:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
cat .aim-studio/spec/story/style-guide.md
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**五大风格选择**:
|
|
100
|
+
|
|
101
|
+
| 风格 | 特点 | 适用场景 |
|
|
102
|
+
|------|------|----------|
|
|
103
|
+
| **正常/写实** | 真实自然、无滤镜 | 现代剧、现实主义 |
|
|
104
|
+
| **邵氏/港新武侠** | 武侠传统、动作想象 | 古装武侠、江湖 |
|
|
105
|
+
| **好莱坞硬派** | 真实打斗、英雄主义 | 动作片、超级英雄 |
|
|
106
|
+
| **日本时代剧** | 暴力美学、文化深度 | 武士片、历史剧 |
|
|
107
|
+
| **韩国犯罪片** | 写实暴力、社会批判 | 犯罪、悬疑、社会剧 |
|
|
108
|
+
|
|
109
|
+
选择风格后,编辑 `style-guide.md` 文件顶部,设置为你的当前风格。
|
|
110
|
+
|
|
111
|
+
**创作时需考虑**:
|
|
112
|
+
- 场景描述使用对应风格的视觉语言
|
|
113
|
+
- 动作设计采用对应风格的动作特点
|
|
114
|
+
- 色调氛围参考对应风格的色彩方案
|
|
115
|
+
|
|
116
|
+
### 步骤 4:开始创作
|
|
117
|
+
|
|
118
|
+
#### 4.1 启动创作模式
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
/aim:story
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
AI 会询问你想要创作什么。
|
|
125
|
+
|
|
126
|
+
#### 4.2 创建角色(可选但推荐)
|
|
127
|
+
|
|
128
|
+
当你创作了新角色后,使用:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
/aim:portrait 角色名
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**示例**:
|
|
135
|
+
```
|
|
136
|
+
/aim:portrait 慕容天
|
|
137
|
+
/aim:portrait 沈安在
|
|
138
|
+
/aim:portrait 女主角
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
这会生成角色的 AI 绘画提示词,你可以保存下来用于后续生成角色图片。
|
|
142
|
+
|
|
143
|
+
#### 4.3 生成场景图片(可选)
|
|
144
|
+
|
|
145
|
+
当你写完一个场景后,想要生成对应的图片:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
/aim:visualize
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
这会将当前剧本段落转换为 Qwen-Image 优化的绘画提示词。
|
|
152
|
+
|
|
153
|
+
#### 4.4 检查剧情一致性(推荐)
|
|
154
|
+
|
|
155
|
+
完成一段创作后,检查是否有前后不一致:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
/aim:check-story
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
这会检查:
|
|
162
|
+
- 角色行为是否符合人设
|
|
163
|
+
- 剧情逻辑是否连贯
|
|
164
|
+
- 场景描述是否一致
|
|
165
|
+
|
|
166
|
+
#### 4.5 检查并修复违规内容(重要!)
|
|
167
|
+
|
|
168
|
+
在导出之前,检查并修复违规内容(真人素材、版权内容、敏感内容):
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
/aim:legitimize --check # 检查是否有违规
|
|
172
|
+
/aim:legitimize --fix # 自动修复违规内容
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**违规类型**:
|
|
176
|
+
- 真人素材:明星、网红、真实照片
|
|
177
|
+
- 版权内容:金庸小说、漫威、哈利波特
|
|
178
|
+
- 敏感内容:暴力、血腥、政治
|
|
179
|
+
|
|
180
|
+
**修复方式**:
|
|
181
|
+
- 将真人名称替换为虚构角色名
|
|
182
|
+
- 使用原创元素替代版权内容
|
|
183
|
+
- 移除敏感描述
|
|
184
|
+
|
|
185
|
+
### 步骤 5:导出视频提示词
|
|
186
|
+
|
|
187
|
+
当你完成一集或几集的创作后,准备生成视频:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
/aim:export
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
实际上是在终端执行:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
python3 .aim-studio/scripts/export.py --ep 1
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### 4.1 选择导出集数
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
# 导出第1集
|
|
203
|
+
python3 .aim-studio/scripts/export.py --ep 1
|
|
204
|
+
|
|
205
|
+
# 导出1-3集
|
|
206
|
+
python3 .aim-studio/scripts/export.py --ep 1-3
|
|
207
|
+
|
|
208
|
+
# 导出全部
|
|
209
|
+
python3 .aim-studio/scripts/export.py --all
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### 4.2 选择视频时长
|
|
213
|
+
|
|
214
|
+
根据场景复杂度选择:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# 5秒(简单对话)
|
|
218
|
+
python3 .aim-studio/scripts/export.py --ep 1 --duration 5
|
|
219
|
+
|
|
220
|
+
# 10秒(默认,通用)
|
|
221
|
+
python3 .aim-studio/scripts/export.py --ep 1 --duration 10
|
|
222
|
+
|
|
223
|
+
# 15秒(中等复杂度)
|
|
224
|
+
python3 .aim-studio/scripts/export.py --ep 1 --duration 15
|
|
225
|
+
|
|
226
|
+
# 30秒(复杂场景)
|
|
227
|
+
python3 .aim-studio/scripts/export.py --ep 1 --duration 30
|
|
228
|
+
|
|
229
|
+
# 45秒或60秒(长场景)
|
|
230
|
+
python3 .aim-studio/scripts/export.py --ep 1 --duration 45
|
|
231
|
+
python3 .aim-studio/scripts/export.py --ep 1 --duration 60
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
#### 4.3 违规检测
|
|
235
|
+
|
|
236
|
+
导出时会自动检查违规内容:
|
|
237
|
+
|
|
238
|
+
| 违规类型 | 检测内容 | 风险等级 |
|
|
239
|
+
|----------|----------|----------|
|
|
240
|
+
| 真人素材 | 明星、网红、真实照片 | ⚠️ 高风险 |
|
|
241
|
+
| 版权内容 | 金庸小说、漫威、哈利波特 | ⚠️ 中风险 |
|
|
242
|
+
| 敏感内容 | 暴力、血腥、政治 | ⚠️ 中风险 |
|
|
243
|
+
|
|
244
|
+
如果检测到违规,系统会提示你选择处理方式:
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
请选择处理方式(输入数字):
|
|
248
|
+
1. 修改角色设定 - 使用虚构角色替代真人
|
|
249
|
+
2. 替换版权内容 - 使用原创元素
|
|
250
|
+
3. 简化敏感描述 - 移除敏感描述
|
|
251
|
+
4. 强制导出 - 仍要导出(风险自负)
|
|
252
|
+
5. 退出 - 不导出
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
#### 4.4 完整导出示例
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# 最常用:导出第1集,10秒,自动打开文件夹
|
|
259
|
+
python3 .aim-studio/scripts/export.py --ep 1 --open
|
|
260
|
+
|
|
261
|
+
# 完整参数:导出第1集,30秒,seedance格式
|
|
262
|
+
python3 .aim-studio/scripts/export.py --ep 1 --duration 30 --format seedance
|
|
263
|
+
|
|
264
|
+
# 批量导出:1-3集,15秒
|
|
265
|
+
python3 .aim-studio/scripts/export.py --ep 1-3 --duration 15
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### 4.5 仅检查违规
|
|
269
|
+
|
|
270
|
+
如果你只想检查内容是否合规,不导出:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
python3 .aim-studio/scripts/export.py --check
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### 步骤 6:完成工作
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
/aim:finish-work
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
这会:
|
|
283
|
+
1. 检查内容完整性
|
|
284
|
+
2. 检查格式是否符合规范
|
|
285
|
+
3. 可选:运行剧情一致性检查
|
|
286
|
+
4. 记录工作内容
|
|
287
|
+
|
|
288
|
+
#### 5.1 记录会话(可选单独使用)
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# 记录本次工作
|
|
292
|
+
python3 ./.aim-studio/scripts/add_session.py \
|
|
293
|
+
--title "第1集创作" \
|
|
294
|
+
--summary "完成第1集前5场的创作"
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## 常见场景
|
|
300
|
+
|
|
301
|
+
### 场景 1:全新项目,从零开始
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
1. aim init -u 我的名字
|
|
305
|
+
2. /aim:start
|
|
306
|
+
3. /aim:story
|
|
307
|
+
→ 告诉 AI 要创作什么类型的故事
|
|
308
|
+
4. 创作角色和剧情...
|
|
309
|
+
5. /aim:portrait 角色1
|
|
310
|
+
6. /aim:portrait 角色2
|
|
311
|
+
7. 继续创作...
|
|
312
|
+
8. /aim:check-story
|
|
313
|
+
9. /aim:export --ep 1 --open
|
|
314
|
+
10. /aim:finish-work
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### 场景 2:继续之前的创作
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
1. /aim:start
|
|
321
|
+
→ AI 会读取之前的进度
|
|
322
|
+
2. 继续创作...
|
|
323
|
+
3. /aim:check-story
|
|
324
|
+
4. /aim:export --ep 2 --duration 15
|
|
325
|
+
5. /aim:finish-work
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### 场景 3:修改角色设定
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
1. /aim:portrait 角色名
|
|
332
|
+
→ 生成新的肖像提示词
|
|
333
|
+
2. 手动更新 character.md
|
|
334
|
+
3. /aim:check-story
|
|
335
|
+
→ 检查修改后是否一致
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### 场景 4:生成宣传图片
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
1. /aim:visualize
|
|
342
|
+
→ 将剧本场景转换为图片提示词
|
|
343
|
+
2. 复制提示词到 AI 绘画工具
|
|
344
|
+
3. 生成图片
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## 参数速查表
|
|
350
|
+
|
|
351
|
+
### export.py 完整参数
|
|
352
|
+
|
|
353
|
+
| 参数 | 必填 | 可选值 | 默认值 | 说明 |
|
|
354
|
+
|------|------|--------|--------|------|
|
|
355
|
+
| `--ep` | 是 | `1`, `1-3`, `all` | 无 | 导出集数 |
|
|
356
|
+
| `--format` | 否 | `seedance`, `simple` | `seedance` | 格式 |
|
|
357
|
+
| `--duration` | 否 | `5/10/15/30/45/60` | `10` | 时长(秒) |
|
|
358
|
+
| `--output` | 否 | 目录名 | `export` | 输出目录 |
|
|
359
|
+
| `--open` | 否 | 开关 | 关闭 | 导出后打开 |
|
|
360
|
+
| `--check` | 否 | 开关 | 关闭 | 仅检查违规 |
|
|
361
|
+
| `--force` | 否 | 开关 | 关闭 | 强制导出 |
|
|
362
|
+
|
|
363
|
+
### add_session.py 参数
|
|
364
|
+
|
|
365
|
+
| 参数 | 必填 | 说明 |
|
|
366
|
+
|------|------|------|
|
|
367
|
+
| `--title` | 是 | 会话标题 |
|
|
368
|
+
| `--summary` | 是 | 工作摘要 |
|
|
369
|
+
| `--commit` | 否 | Git 提交哈希 |
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## 注意事项
|
|
374
|
+
|
|
375
|
+
1. **先检查后导出**:建议先运行 `--check` 确认无违规
|
|
376
|
+
2. **选择合适时长**:复杂场景用 15-30 秒,简单对话用 5-10 秒
|
|
377
|
+
3. **保持角色一致**:每次创作前回顾 character.md
|
|
378
|
+
4. **记录工作进度**:完成后使用 finish-work 记录,便于后续继续
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## 相关命令
|
|
383
|
+
|
|
384
|
+
| 命令 | 用途 |
|
|
385
|
+
|------|------|
|
|
386
|
+
| `/aim:start` | 开始会话 |
|
|
387
|
+
| `/aim:story` | 开始创作 |
|
|
388
|
+
| `/aim:portrait` | 生成角色肖像 |
|
|
389
|
+
| `/aim:visualize` | 生成场景图片 |
|
|
390
|
+
| `/aim:legitimize` | 检查并修复违规内容 |
|
|
391
|
+
| `/aim:check-story` | 检查剧情一致性 |
|
|
392
|
+
| `/aim:export` | 导出视频提示词 |
|
|
393
|
+
| `/aim:finish-work` | 完成工作 |
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# 场景图片生成
|
|
2
|
+
|
|
3
|
+
将当前剧本段落转换为 AI 绘画提示词,针对 Qwen-Image 优化。
|
|
4
|
+
|
|
5
|
+
## Qwen-Image 核心优势
|
|
6
|
+
|
|
7
|
+
| 能力维度 | 技术特点 | 优势 |
|
|
8
|
+
|---------|---------|------|
|
|
9
|
+
| **复杂文本渲染** | 中英文多行文本、段落级语义 | 中文渲染 58.30%,远超竞品 |
|
|
10
|
+
| **精准图像编辑** | 语义一致性与视觉保真度 | 支持链式编辑 |
|
|
11
|
+
| **空间关系** | MSRoPE 位置编码 | 精确布局控制 |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Prompt 结构原则
|
|
16
|
+
|
|
17
|
+
Qwen-Image 使用 **Qwen2.5-VL 作为文本编码器**,最优 Prompt 应包含:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
【主体对象】+ 【属性细节(颜色/数量/形状/材质)】+ 【空间关系】+ 【文本内容(如需要)】+ 【环境背景】+ 【风格/光影】
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 执行步骤
|
|
26
|
+
|
|
27
|
+
### 1. 生成提示词
|
|
28
|
+
|
|
29
|
+
直接读取当前选中的剧本段落,将其转换为 Qwen-Image 优化的提示词。
|
|
30
|
+
|
|
31
|
+
### 2. 输出格式
|
|
32
|
+
|
|
33
|
+
每个场次生成以下格式的提示词:
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
## 场次 X 图片提示词
|
|
37
|
+
|
|
38
|
+
### 主体描述
|
|
39
|
+
[主体对象],[颜色],[数量],[形状],[材质]
|
|
40
|
+
|
|
41
|
+
### 属性细节
|
|
42
|
+
- 面部特征:[脸型、眼睛、眉毛、发型等]
|
|
43
|
+
- 服装:[颜色、材质、款式]
|
|
44
|
+
- 配饰:[如有]
|
|
45
|
+
|
|
46
|
+
### 空间关系
|
|
47
|
+
[主体在画面中的位置],[与其他物体的距离],[前景/背景关系]
|
|
48
|
+
|
|
49
|
+
### 文本内容(如需要)
|
|
50
|
+
- 文字内容:"需要渲染的文字"
|
|
51
|
+
- 文字位置:[左上角/中央/底部等]
|
|
52
|
+
- 字体样式:[手写体/宋体/霓虹灯管字体等]
|
|
53
|
+
|
|
54
|
+
### 环境背景
|
|
55
|
+
[场景描述],[时间],[天气],[氛围]
|
|
56
|
+
|
|
57
|
+
### 风格光影
|
|
58
|
+
[整体风格],[色调],[光源方向],[参考作品]
|
|
59
|
+
|
|
60
|
+
### 完整英文提示词
|
|
61
|
+
```
|
|
62
|
+
{Subject}, {Appearance details}, {Clothing}, {Position},
|
|
63
|
+
{Environment}, {Lighting}, {Style}, {Quality tags}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 负面提示词
|
|
67
|
+
```
|
|
68
|
+
ugly, deformed, bad anatomy, extra limbs, blurry, low quality,
|
|
69
|
+
western style (if Chinese style needed), modern clothing (if period piece)
|
|
70
|
+
```
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 中文场景特化技巧
|
|
76
|
+
|
|
77
|
+
### 1. 直接使用中文字符
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
✅ "招牌上写着'云计算'"
|
|
81
|
+
❌ "sign with Chinese characters meaning cloud computing"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 2. 利用成语、诗句、对联
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
一首古诗书法作品,内容为:
|
|
88
|
+
"毕竟西湖六月中,风光不与四时同。
|
|
89
|
+
接天莲叶无穷碧,映日荷花别样红。"
|
|
90
|
+
字体为楷书,背景是水墨画风格的西湖景色。
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 3. 复杂排版布局
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
一张信息图表,标题为"情绪健康习惯",周围环绕六个模块:
|
|
97
|
+
左上:"练习正念" - 莲花图标
|
|
98
|
+
右上:"持续学习" - 书本图标
|
|
99
|
+
左中:"培养感恩" - 双手图标
|
|
100
|
+
右中:"定期运动" - 跑步图标
|
|
101
|
+
左下:"保持联结" - 对话图标
|
|
102
|
+
右下:"优先睡眠" - 月亮图标
|
|
103
|
+
整体为优雅的信息图风格,对称布局。
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 避坑指南
|
|
109
|
+
|
|
110
|
+
| ❌ 避免 | ✅ 替代 |
|
|
111
|
+
|--------|--------|
|
|
112
|
+
| "高质量"、"精美" 等空泛词 | 具体描述材质、光影、分辨率要求 |
|
|
113
|
+
| 模糊的文本描述 | 用引号明确标注每个文字 |
|
|
114
|
+
| 忽略空间位置词 | 使用"左上角"、"中央"、"底部"等明确位置 |
|
|
115
|
+
| 过长的无结构句子 | 分段描述不同元素,使用分号或换行 |
|
|
116
|
+
| 假设模型懂特定IP或风格 | 详细描述视觉特征 |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 示例
|
|
121
|
+
|
|
122
|
+
### 输入剧本
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
场次 1:青云峰主殿内 - 清晨 - 萧条落寞
|
|
126
|
+
|
|
127
|
+
白衣中年沈安在瘫坐在太师椅上,神情苦涩。殿外,少年慕容天背着大包小包,站在门口。
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 输出提示词
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
## 场次 1 图片提示词
|
|
134
|
+
|
|
135
|
+
### 主体描述
|
|
136
|
+
- 人物1:沈安在,白衣中年男子,两鬓霜白,面容俊俏,神情苦涩
|
|
137
|
+
- 人物2:慕容天,少年身形,背着大包小包
|
|
138
|
+
|
|
139
|
+
### 属性细节
|
|
140
|
+
- 沈安在服装:白色道袍,材质为丝绸,款式宽松
|
|
141
|
+
- 慕容天服装:青色布衣,背着布包裹
|
|
142
|
+
- 场景道具:太师椅(深棕色木质)、残破窗棂
|
|
143
|
+
|
|
144
|
+
### 空间关系
|
|
145
|
+
沈安在位于画面中央偏左,瘫坐在太师椅上;慕容天位于画面右侧门口处,两人之间有一定距离
|
|
146
|
+
|
|
147
|
+
### 环境背景
|
|
148
|
+
青云峰主殿内部,破旧的大殿,阳光透过残破窗棂洒落,萧条冷清的氛围,清晨光线
|
|
149
|
+
|
|
150
|
+
### 风格光影
|
|
151
|
+
中国仙侠风格,水墨画质感,柔和晨光从左侧打入,产生柔和阴影,色调偏冷
|
|
152
|
+
|
|
153
|
+
### 完整英文提示词
|
|
154
|
+
```
|
|
155
|
+
A middle-aged Chinese man in white Taoist robe, sitting slumped on a wooden chair,
|
|
156
|
+
bitter expression, white hair at temples, handsome face.
|
|
157
|
+
In the background, a young man in blue clothes standing at the doorway, carrying large cloth bundles.
|
|
158
|
+
Dilapidated temple interior, morning sunlight through broken windows,
|
|
159
|
+
melancholic atmosphere, Chinese xianxia style, ink painting texture,
|
|
160
|
+
soft lighting from left, cool color tone, cinematic composition
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 负面提示词
|
|
164
|
+
```
|
|
165
|
+
ugly, deformed, bad anatomy, extra limbs, blurry, low quality,
|
|
166
|
+
modern clothing, western style, bright colors, happy expression
|
|
167
|
+
```
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## 注意事项
|
|
173
|
+
|
|
174
|
+
1. **文本渲染**:如需要在图片中渲染文字,必须用引号明确标注
|
|
175
|
+
2. **中文优化**:Qwen-Image 对中文渲染有独特优势,直接使用汉字
|
|
176
|
+
3. **空间布局**:使用明确的位置词(左上角、中央、底部等)
|
|
177
|
+
4. **结构化描述**:分段描述不同元素,避免过长的无结构句子
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode templates
|
|
3
|
+
*
|
|
4
|
+
* These are GENERIC templates for user projects.
|
|
5
|
+
*
|
|
6
|
+
* Directory structure:
|
|
7
|
+
* opencode/
|
|
8
|
+
* ├── commands/ # Slash commands
|
|
9
|
+
* ├── agents/ # Multi-agent pipeline agents
|
|
10
|
+
* ├── lib/ # Shared library code
|
|
11
|
+
* └── plugin/ # Plugin hooks
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Command template with name and content
|
|
15
|
+
*/
|
|
16
|
+
export interface CommandTemplate {
|
|
17
|
+
name: string;
|
|
18
|
+
content: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Agent template with name and content
|
|
22
|
+
*/
|
|
23
|
+
export interface AgentTemplate {
|
|
24
|
+
name: string;
|
|
25
|
+
content: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Plugin file template with target path and content
|
|
29
|
+
*/
|
|
30
|
+
export interface PluginTemplate {
|
|
31
|
+
targetPath: string;
|
|
32
|
+
content: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get all command templates
|
|
36
|
+
* Commands are stored in commands/aim/ subdirectory
|
|
37
|
+
* This creates commands like /aim:start, /aim:finish-work, etc.
|
|
38
|
+
*/
|
|
39
|
+
export declare function getAllCommands(): CommandTemplate[];
|
|
40
|
+
/**
|
|
41
|
+
* Get all agent templates
|
|
42
|
+
*/
|
|
43
|
+
export declare function getAllAgents(): AgentTemplate[];
|
|
44
|
+
/**
|
|
45
|
+
* Get all plugin files (lib + plugin directories)
|
|
46
|
+
*/
|
|
47
|
+
export declare function getAllPlugins(): PluginTemplate[];
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/opencode/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAqBH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,eAAe,EAAE,CAalD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,aAAa,EAAE,CAa9C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,cAAc,EAAE,CAsBhD"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode templates
|
|
3
|
+
*
|
|
4
|
+
* These are GENERIC templates for user projects.
|
|
5
|
+
*
|
|
6
|
+
* Directory structure:
|
|
7
|
+
* opencode/
|
|
8
|
+
* ├── commands/ # Slash commands
|
|
9
|
+
* ├── agents/ # Multi-agent pipeline agents
|
|
10
|
+
* ├── lib/ # Shared library code
|
|
11
|
+
* └── plugin/ # Plugin hooks
|
|
12
|
+
*/
|
|
13
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
14
|
+
import { dirname, join } from "node:path";
|
|
15
|
+
import { fileURLToPath } from "node:url";
|
|
16
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
+
const __dirname = dirname(__filename);
|
|
18
|
+
function readTemplate(relativePath) {
|
|
19
|
+
return readFileSync(join(__dirname, relativePath), "utf-8");
|
|
20
|
+
}
|
|
21
|
+
function listFiles(dir) {
|
|
22
|
+
try {
|
|
23
|
+
return readdirSync(join(__dirname, dir));
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get all command templates
|
|
31
|
+
* Commands are stored in commands/aim/ subdirectory
|
|
32
|
+
* This creates commands like /aim:start, /aim:finish-work, etc.
|
|
33
|
+
*/
|
|
34
|
+
export function getAllCommands() {
|
|
35
|
+
const commands = [];
|
|
36
|
+
const files = listFiles("commands/aim");
|
|
37
|
+
for (const file of files) {
|
|
38
|
+
if (file.endsWith(".md")) {
|
|
39
|
+
const name = file.replace(".md", "");
|
|
40
|
+
const content = readTemplate(`commands/aim/${file}`);
|
|
41
|
+
commands.push({ name, content });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return commands;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get all agent templates
|
|
48
|
+
*/
|
|
49
|
+
export function getAllAgents() {
|
|
50
|
+
const agents = [];
|
|
51
|
+
const files = listFiles("agents");
|
|
52
|
+
for (const file of files) {
|
|
53
|
+
if (file.endsWith(".md")) {
|
|
54
|
+
const name = file.replace(".md", "");
|
|
55
|
+
const content = readTemplate(`agents/${file}`);
|
|
56
|
+
agents.push({ name, content });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return agents;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get all plugin files (lib + plugin directories)
|
|
63
|
+
*/
|
|
64
|
+
export function getAllPlugins() {
|
|
65
|
+
const plugins = [];
|
|
66
|
+
// Read lib files
|
|
67
|
+
const libFiles = listFiles("lib");
|
|
68
|
+
for (const file of libFiles) {
|
|
69
|
+
if (file.endsWith(".js")) {
|
|
70
|
+
const content = readTemplate(`lib/${file}`);
|
|
71
|
+
plugins.push({ targetPath: `lib/${file}`, content });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Read plugin files
|
|
75
|
+
const pluginFiles = listFiles("plugin");
|
|
76
|
+
for (const file of pluginFiles) {
|
|
77
|
+
if (file.endsWith(".js")) {
|
|
78
|
+
const content = readTemplate(`plugin/${file}`);
|
|
79
|
+
plugins.push({ targetPath: `plugin/${file}`, content });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return plugins;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=index.js.map
|