@lingjingai/scriptctl 0.49.15 → 0.49.16
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.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 0.49.16
|
|
2
|
+
|
|
3
|
+
## Added
|
|
4
|
+
- None.
|
|
5
|
+
|
|
6
|
+
## Changed
|
|
7
|
+
- The bundled `scriptctl` skill routes full-script, episode, scene,
|
|
8
|
+
continuation, and continuous-body authoring through `.scriptctl` files and
|
|
9
|
+
`write`; `do` is reserved for small heterogeneous edits.
|
|
10
|
+
|
|
11
|
+
## Fixed
|
|
12
|
+
- None.
|
|
13
|
+
|
|
14
|
+
## Breaking
|
|
15
|
+
- None.
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
name: scriptctl
|
|
3
3
|
description: "剧本 script.json 的本地读写 + 入库 CLI。远端剧本先 checkout 成工作副本;完整剧集/场/正文区间用 export + 文件化 authoring + write plan/apply 批量创作或替换,细小精修用原子 verb/do;完成后 publish 严格按 revision 入库。也覆盖 ingest、查询、资产/state、校验。剧本阶段做任何剧本相关读写、以及操作两个 script.json 之前都应加载。"
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.25.
|
|
6
|
-
scriptctl_version: "0.49.
|
|
5
|
+
version: "0.25.2"
|
|
6
|
+
scriptctl_version: "0.49.16"
|
|
7
7
|
author: "official"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
三条主线:
|
|
15
15
|
- **转剧本入库**:`ingest`(抽取,产出 `workspace/script.json`)→ 标准化复核 → `view`(自查)→ `publish`(入库)。见 [references/ingest-workflow.md](references/ingest-workflow.md)。
|
|
16
|
-
-
|
|
16
|
+
- **完整块创作/替换**:从零时直接分配 canonical ID 并写完整 `.scriptctl`;修改本地既有剧本时用 `ids` 取新 ID、用 `export` 取既有完整块 → `write` plan → `write --apply --plan <digest>`。
|
|
17
17
|
- **精修既有剧本**:查询 + 原子写 + 选择器批量 + `do`。
|
|
18
18
|
|
|
19
19
|
## 标准剧本通用流程:先把可引用世界建完整
|
|
@@ -21,10 +21,10 @@ metadata:
|
|
|
21
21
|
从零创作、视频提取、小说或非标准剧本解析、洗稿/对标/转绘的目标稿统一执行以下流程;“正文”指 scene 下的 `action / dialogue / inner_thought / transition`。完整生产写作规范见 [references/production-writing-standard.md](references/production-writing-standard.md)。
|
|
22
22
|
|
|
23
23
|
1. **忠实理解输入**:创作时落实题材、集纲和人物关系;提取与解析时保留源素材可验证的对白、动作、顺序、场界和状态变化。把不确定信息标为待复核,不补写源素材未表达的事实。
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
27
|
-
5.
|
|
24
|
+
2. **注册资产**:先读现有人物、地点、道具;正文将出现的资产必须先注册。批量创作在 authoring `<create>` 中声明,ingest 由抽取流程建立。人物保留一个稳定的 `actor_name` 作为真名,称呼、绰号、职位放 `aliases[]`,同一人物共用一个 actor。
|
|
25
|
+
3. **建好资产状态**:每个新资产必须有唯一的 `default` state;批量创作在 `<create>` 中随资产声明,持久、可复用、需要独立生成视觉资产的变体再声明独立 state。
|
|
26
|
+
4. **建立真实场并绑定资产**:完整 scene 显式声明本场地点、全部人物、全部道具及其实际 state。同一人物需要多份场景引用时,写多条 cast 并保留顺序;正文中出现的资产属于本场引用集合。
|
|
27
|
+
5. **写入或标准化正文**:从零、续写和连续正文修改使用 `.scriptctl` authoring 文件;已有目标先 `export`,再执行 `write` plan/apply。ingest 先完成抽取,大块标准化修改同样走 export/write。发现新资产或新 state 时,先补入 `<create>` 和 scene 引用,再继续正文。
|
|
28
28
|
6. **逐场复核**:每批正文落盘后读回 `scenes / actions`;一集完成后运行 `validate`。`validate` 通过只代表结构与引用合法,仍需完成内容标准和源素材一致性复核。
|
|
29
29
|
|
|
30
30
|
### 动作描述必须可唯一解析
|
|
@@ -44,7 +44,7 @@ location 表示可独立布置、可独立生成参考图、可重复引用的
|
|
|
44
44
|
|
|
45
45
|
跨地点蒙太奇按剪辑顺序建立多个短 scene,每个 scene 绑定自己的地点、实际人物、道具和 state,并用 transition 明确蒙太奇开始、切换和结束。纯空镜 scene 绑定实际 location 与关键道具即可,不创建虚假人物。
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
人物在同一连续场内需要多份视觉参考时,在完整 scene 中按画面需要写多条 cast 引用并保留顺序。地点切换、跳时或叙事线切换仍建立新 scene。收尾时用 `scenes --in <ep>` 复核相邻场界。少量既有内容精修见 [references/atomic-edit-workflow.md](references/atomic-edit-workflow.md)。
|
|
48
48
|
|
|
49
49
|
## 先定本地文件
|
|
50
50
|
|
|
@@ -69,9 +69,11 @@ scriptctl summary --script-path "$ORIG"
|
|
|
69
69
|
scriptctl actions --in ep_001 --script-path "$ORIG" # 带 timestamp 列,看节奏
|
|
70
70
|
scriptctl states act_001 --script-path "$ORIG" # 看人物状态弧线
|
|
71
71
|
|
|
72
|
-
#
|
|
73
|
-
scriptctl
|
|
74
|
-
|
|
72
|
+
# 建/写新剧:直接分配 canonical ID,用 authoring 文件一次表达资产、状态、集、场和正文
|
|
73
|
+
scriptctl write new-story.scriptctl --create \
|
|
74
|
+
--script-path "$NEW" # plan
|
|
75
|
+
scriptctl write new-story.scriptctl --create --apply --plan sha256:... \
|
|
76
|
+
--script-path "$NEW" # apply
|
|
75
77
|
|
|
76
78
|
# 逐场对照:同一集在两份里并排看
|
|
77
79
|
scriptctl scenes --in ep_003 --script-path "$ORIG"
|
|
@@ -154,10 +156,10 @@ scriptctl emotion --in ep_003..ep_007 --actor act_001 "紧张" --apply
|
|
|
154
156
|
|
|
155
157
|
### 完整块批量创作与替换(`export` → authoring 文件 → `write`)
|
|
156
158
|
|
|
157
|
-
|
|
159
|
+
从零写、向后续写、大量正文变更,以及写一整本、整集、整场或替换中间连续几集/几场/几条 action 时,使用 `.scriptctl` authoring 文件。完整语法与约束见 [references/bulk-authoring.md](references/bulk-authoring.md)。
|
|
158
160
|
|
|
159
161
|
```bash
|
|
160
|
-
#
|
|
162
|
+
# 修改既有剧本时先取候选 ID;只读、不预留
|
|
161
163
|
scriptctl ids --kind actor --count 2 --script-path workspace/script.json
|
|
162
164
|
scriptctl ids --kind scene --count 4 --script-path workspace/script.json
|
|
163
165
|
|
|
@@ -177,17 +179,18 @@ scriptctl write rewrite.scriptctl --replace --apply --plan sha256:... \
|
|
|
177
179
|
|
|
178
180
|
| 需求 | 导出/authoring target | mode |
|
|
179
181
|
|---|---|---|
|
|
180
|
-
| 从零创建整本 |
|
|
182
|
+
| 从零创建整本 | 直接分配 canonical ID,写完整 `<script>` | `--create` |
|
|
181
183
|
| 追加完整集/场 | `<episode>` / `<scene parent=...>` | `--create` |
|
|
184
|
+
| 向既有场末尾续写大量 action | `export scenes`,在完整 `<body>` 末尾续写 | `--replace` |
|
|
182
185
|
| 一对一替换多集/多场 | `export episodes` / `export scenes` | `--replace` |
|
|
183
186
|
| 用不同数量节点替换连续几集/几场 | `export episode-spans` / `export scene-spans` | `--replace` |
|
|
184
187
|
| 替换某场中间连续 action | `export action-spans` | `--replace` |
|
|
185
188
|
|
|
186
189
|
一个 authoring 文件只有一种 target kind。完整 episode/scene 可以是待填充空骨架,计划会报告 empty/cleared warning;单条空 content 也会提示。scene span 的每个区间只能在同一 episode;action span 只能在同一 scene。区间端点按当前数组顺序判断,不按 ID 数字判断;新 ID 可以放在 replacement 内容中,但不能当旧区间端点。所有 span 都必须有非空 replacement。`write` 每次都持有本地独占锁,应用时还校验计划绑定的语义基线并用临时文件原子替换。
|
|
187
190
|
|
|
188
|
-
###
|
|
191
|
+
### 少量异构精修 `do`(一组各不相同的改动 = 一个事务)
|
|
189
192
|
|
|
190
|
-
|
|
193
|
+
`do` 用于对既有剧本执行少量、离散、彼此不同的精修。每行是一条去掉 `scriptctl` 的命令,整段全成或全不成。完整场、集、整本和连续正文的创作或替换使用 authoring `write`。
|
|
191
194
|
|
|
192
195
|
```bash
|
|
193
196
|
scriptctl do edits.txt # 默认 dry-run(预演 + 校验,不写)
|
|
@@ -201,9 +204,9 @@ insert ep_001/scn_006 --type action --content "暗夜,街道空无一人。
|
|
|
201
204
|
EOF
|
|
202
205
|
```
|
|
203
206
|
|
|
204
|
-
`do` 也读 stdin(`scriptctl do
|
|
207
|
+
`do` 也读 stdin(`scriptctl do -`)。少量结构性精修中的 insert/delete/move/split/merge 走单点或 `do`,不进选择器批量(索引会漂移)。目标 flag(如 `--script-path`)加在 `do` 命令本身上,整段脚本共用同一目标。
|
|
205
208
|
|
|
206
|
-
###
|
|
209
|
+
### 原子建模命令(少量补充资产或骨架)
|
|
207
210
|
|
|
208
211
|
| 想做什么 | 命令 |
|
|
209
212
|
|---|---|
|
|
@@ -213,7 +216,7 @@ EOF
|
|
|
213
216
|
| 加道具 | `scriptctl add-prop "怀表" [--description X]` |
|
|
214
217
|
| 加分集 | `scriptctl add-episode [--title X]` |
|
|
215
218
|
|
|
216
|
-
|
|
219
|
+
这些命令适合给既有剧本少量补充资产、集或空场。完整新剧及完整场/集创作使用 `.scriptctl` authoring 文件;全新剧本直接分配 canonical ID,既有本地剧本用 `ids` 取得未占用候选 ID,再执行 `write --create` plan/apply。
|
|
217
220
|
|
|
218
221
|
### Address 格式(决定 verb 作用对象,自动分发)
|
|
219
222
|
|
|
@@ -287,7 +290,7 @@ scriptctl do fixes.txt --apply # 异
|
|
|
287
290
|
|
|
288
291
|
| 项目状态 | 走 |
|
|
289
292
|
|---|---|
|
|
290
|
-
| 没剧本文本,从零写(题材/灵感/集纲在手) |
|
|
293
|
+
| 没剧本文本,从零写(题材/灵感/集纲在手) | 直接分配 canonical ID → 生成完整 `.scriptctl` → `write --create` plan/apply → `validate` → `publish` |
|
|
291
294
|
| 已有剧本/分镜/小说文本(txt/md/docx) | `scriptctl ingest --source-path <file>` → `view` 自查 → `publish` |
|
|
292
295
|
| 有视频(正片文件或分集目录) | `scriptctl ingest --source-path <file\|dir>` → `view` 点击定位复核 → `publish` |
|
|
293
296
|
|
|
@@ -340,7 +343,7 @@ scriptctl ingest status --json # 机器:.status = {kind,state,phase,passes
|
|
|
340
343
|
|
|
341
344
|
**默认状态(default)**:每个有 `states[]` 的资产必须有且仅有一个 `state_id: "default"`(最常见常态外观,保留可读 state_name)。`ingest` 会自动把「默认/最常见」那档 canonical 成 `default`;手动 `state-add` 给原先无状态的资产加第一个 state 后,若校验报 `DEFAULT_STATE_MISSING`,把最常见那档的 state_id 设成 `default`。
|
|
342
345
|
|
|
343
|
-
`add-actor / add-location / add-prop` 会自动建立 `default
|
|
346
|
+
原子 `add-actor / add-location / add-prop` 会自动建立 `default`;少量增补资产时,用 `state-rename` 和 `describe` 定义常态,再将实际 state 绑定到 scene-ref。文件化创作在 `<create>` 中直接声明每个新资产唯一的 `default` state,并在完整 scene 中绑定实际 state。
|
|
344
347
|
|
|
345
348
|
合并/删除 state 时,必须确认引用它的场景 `scene-ref --state` 已被正确修复;操作见 [references/state-reference-repair.md](references/state-reference-repair.md)。
|
|
346
349
|
|
|
@@ -348,7 +351,7 @@ scriptctl ingest status --json # 机器:.status = {kind,state,phase,passes
|
|
|
348
351
|
|
|
349
352
|
- 🔴 **不要加 `--json`**。默认列表/查询输出是给 agent 读的 TSV/行式文本(地址单独成列),比 JSON 更省 token、更好决策。除非真要 parse 字段喂给下一步程序(`actions --json` 有结构化 `rows[]`,`ingest status --json` 有 `.status`,或 `--format addr` 取裸地址流)。
|
|
350
353
|
- 🔴 **多点写默认 dry-run**:`replace/type/actor/emotion/transition` 一旦带 `--in`/谓词就是预演(回显命中数,不落盘),确认后加 `--apply` 才真写。单点(给 address)直写。
|
|
351
|
-
- 🔴
|
|
354
|
+
- 🔴 **少量异构精修走 `do`**;完整场、集、整本和连续正文写作走 `.scriptctl` authoring + `write`。`scriptctl patch <file|->` 只用于机器/jq 管道(`… --json | jq '[…]' | scriptctl patch -`);需要 op schema 用 `scriptctl patch --schema [<op>]`。
|
|
352
355
|
- 🔴 **本地用记得带 `--script-path <file>`**;洗稿/对标/转绘里两份剧本就是两个不同的 `--script-path`,一次只碰一份。
|
|
353
356
|
- 🔴 **沙箱里转完剧本要 `publish`**:`ingest` 只产 `workspace/script.json`,不 publish 后端/前端看不到。
|
|
354
357
|
- 只有 `ingest` 会请求大模型;`ingest status`、`view`、`publish`、`summary/actions` 等查询、`synopsis/replace/patch/do` 等读写命令**不打模型**。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# 原子精修
|
|
2
|
+
|
|
3
|
+
适用:对既有剧本做少量、明确、离散的修改。完整场、集、整本和连续正文的创作或替换见 [bulk-authoring.md](bulk-authoring.md)。
|
|
4
|
+
|
|
5
|
+
## 路由
|
|
6
|
+
|
|
7
|
+
| 修改形态 | 使用方式 |
|
|
8
|
+
|---|---|
|
|
9
|
+
| 一个明确地址 | 单个原子 verb |
|
|
10
|
+
| 同一种变换命中多个 action | 选择器批量 verb |
|
|
11
|
+
| 少量、不同类型、需要同事务落盘的修改 | `do` |
|
|
12
|
+
|
|
13
|
+
## 单点精修
|
|
14
|
+
|
|
15
|
+
先查询得到稳定地址,再执行对应 verb:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
scriptctl actions --grep "台下掌声雷动" --script-path workspace/script.json
|
|
19
|
+
scriptctl replace ep_001/scn_001#3 \
|
|
20
|
+
--from "台下掌声雷动" --to "掌声骤然停下" \
|
|
21
|
+
--script-path workspace/script.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
资产、state 和场景引用也先查询再修改:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
scriptctl states act_001 --script-path workspace/script.json
|
|
28
|
+
scriptctl scene-ref ep_001/scn_003 actor:act_001 \
|
|
29
|
+
--state st_injured --script-path workspace/script.json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 同构批量精修
|
|
33
|
+
|
|
34
|
+
查询和写入共用选择条件。多点写默认只生成计划,加 `--apply` 才落盘:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
scriptctl actions --in ep_003..ep_007 --actor act_001 \
|
|
38
|
+
--script-path workspace/script.json
|
|
39
|
+
scriptctl emotion --in ep_003..ep_007 --actor act_001 "紧张" \
|
|
40
|
+
--script-path workspace/script.json
|
|
41
|
+
scriptctl emotion --in ep_003..ep_007 --actor act_001 "紧张" --apply \
|
|
42
|
+
--script-path workspace/script.json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## 少量异构精修
|
|
46
|
+
|
|
47
|
+
`do` 文件每行是一条去掉 `scriptctl` 的原子命令。先 dry-run,再原子应用:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
replace ep_001/scn_001#3 --from "台下掌声雷动" --to "掌声骤停"
|
|
51
|
+
dialogue ep_001/scn_002#1 --actor act_001
|
|
52
|
+
scene-ref ep_001/scn_001 actor:act_001 --state st_calm
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
scriptctl do fixes.txt --script-path workspace/script.json
|
|
57
|
+
scriptctl do fixes.txt --apply --script-path workspace/script.json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
精修后读回受影响的 scenes/actions,并运行 `validate`。
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## 固定工作流
|
|
6
6
|
|
|
7
7
|
1. 既有远端剧本先 `checkout` 到 `--script-path`。
|
|
8
|
-
2.
|
|
8
|
+
2. 修改本地既有剧本时,新 ID 用 `ids --kind ... --count ...` 查询候选值;它不预留 ID。全新剧本没有可供 `ids` 读取的本地文件,直接从各 kind 的 `_001` 开始分配 canonical ID。
|
|
9
9
|
3. 修改既有内容先用 typed `export` 导出完整目标;从零写时直接生成完整 `.scriptctl` 文件。
|
|
10
10
|
4. `write FILE --create|--replace` 只做计划。
|
|
11
11
|
5. 从计划读取完整 `plan_digest`。
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
# 从零原子写 — 资产先行,按真实场界写正文
|
|
2
|
-
|
|
3
|
-
适用:**没有现成剧本文本**,从零写(手里只有题材 / 灵感 / 集纲)。
|
|
4
|
-
|
|
5
|
-
核心理念:**写手是你**。你自己想好每一句正文,用原子能力把它灌进结构化剧本里。scriptctl 负责「合法的骨架 + 引用完整性 + 校验」,不负责「写得好不好」。
|
|
6
|
-
|
|
7
|
-
人物、路人群体、地点粒度、门口跨空间、蒙太奇、对白、Action 和场内状态变化统一执行 [production-writing-standard.md](production-writing-standard.md)。
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## 端到端流程
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
create(空白剧本,既有剧本略过)
|
|
15
|
-
→ worldview 设世界观
|
|
16
|
-
→ 资产批次
|
|
17
|
-
add-actor / add-location / add-prop 注册或完善资产
|
|
18
|
-
state-rename / state-add / describe 定义默认与持久视觉状态
|
|
19
|
-
do assets.txt --apply → 读回资产与 states
|
|
20
|
-
→ 正文批次
|
|
21
|
-
add-episode / synopsis 建分集与梗概
|
|
22
|
-
insert <ep> --location 仅在真实场界处建 scene
|
|
23
|
-
scene-ref --state 绑定本场全部资产与实际 state
|
|
24
|
-
insert <ep/scn> --type ... 按 action 批次连续写正文
|
|
25
|
-
→ scenes / actions / validate 收尾自查
|
|
26
|
-
→ publish 入库(沙箱必做)
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
> 发声源写在**对白行内联**(`dialogue <at> --actor/--kind`,或 `insert --actor/--kind`);造型挂在**场景 cast 引用**上(`scene-ref <ep/scn> <kind:id> --state`)。同一人物需要多份引用时用 `--append` 追加,用 `--occurrence <n>` 定位第 n 份。正文插入前,本场必须已有地点,并且本场全部地点/人物/道具引用都绑定已建立的 state。空镜、环境动作或非角色发声场可以没有人物引用。
|
|
30
|
-
|
|
31
|
-
资产/分集/场景的 id **自动按序分配**:第一个 actor 是 `act_001`、location 是 `loc_001`、prop 是 `prp_001`、episode 是 `ep_001`、它下面第一场是 `scn_001`……所以你能在后续命令里直接引用这些可预测的 id(也可以 `--id` 显式指定)。
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## 两种写法
|
|
36
|
-
|
|
37
|
-
### A. 增量(少量、边想边写):逐条原子 verb
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
scriptctl create --title "夏夜便利店"
|
|
41
|
-
scriptctl worldview 现代
|
|
42
|
-
scriptctl add-actor 林夏 --role 主角 --description "高三女生,沉默寡言"
|
|
43
|
-
scriptctl add-actor 陈默 --role 配角 --description "便利店夜班店员"
|
|
44
|
-
scriptctl add-location 便利店 --description "24h 便利店,冷白光"
|
|
45
|
-
scriptctl state-rename actor:act_001/default "平日造型"
|
|
46
|
-
scriptctl describe actor:act_001/default "整洁校服,黑色长发"
|
|
47
|
-
scriptctl state-rename actor:act_002/default "夜班造型"
|
|
48
|
-
scriptctl describe actor:act_002/default "便利店制服,胸前佩戴工牌"
|
|
49
|
-
scriptctl state-rename location:loc_001/default "常态"
|
|
50
|
-
scriptctl describe location:loc_001/default "冷白灯全部亮起"
|
|
51
|
-
scriptctl add-episode --title "第一集:相遇"
|
|
52
|
-
scriptctl synopsis "雨夜便利店里,林夏与夜班店员陈默因一场意外相遇。"
|
|
53
|
-
scriptctl synopsis ep_001 "林夏雨夜进入便利店,发现陈默似乎认识她。"
|
|
54
|
-
scriptctl insert ep_001 --location loc_001 --time night --space interior # → scn_001
|
|
55
|
-
scriptctl scene-ref ep_001/scn_001 location:loc_001 --state default
|
|
56
|
-
scriptctl scene-ref ep_001/scn_001 actor:act_001 --state default
|
|
57
|
-
scriptctl scene-ref ep_001/scn_001 actor:act_002 --state default
|
|
58
|
-
scriptctl insert ep_001/scn_001 --type action --content "雨夜,林夏推门进店,浑身湿透。" --emotion "狼狈"
|
|
59
|
-
scriptctl insert ep_001/scn_001 --type dialogue --content "欢迎光临。" --actor act_002
|
|
60
|
-
scriptctl insert ep_001/scn_001 --type inner_thought --content "陈默又出现了。" --actor act_001
|
|
61
|
-
scriptctl validate
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
同一人物在本场需要第二份参考时,继续追加而不是新建 actor:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
scriptctl scene-ref ep_001/scn_001 actor:act_001 --state st_rain --append
|
|
68
|
-
scriptctl scene-ref ep_001/scn_001 actor:act_001 --state default --occurrence 2
|
|
69
|
-
scriptctl scene-ref ep_001/scn_001 actor:act_001 --remove --occurrence 2
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### B. 整集 / 整本(推荐):资产与正文分两段 `do`
|
|
73
|
-
|
|
74
|
-
一集几十个 action 用 `do` 批量写入。先独立落盘资产批次,读回自动分配的 id;再用正文批次建集、按真实场界建 scene、绑定 state 并写 action。这两次落盘让宿主先展示人物、地点、道具及状态,再展示正文。
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
scriptctl create --title "夏夜便利店" # 先有空白剧本
|
|
78
|
-
scriptctl do assets.txt # 资产批次 dry-run
|
|
79
|
-
scriptctl do assets.txt --apply # 先落盘资产与 states
|
|
80
|
-
scriptctl actors # 读回资产 id
|
|
81
|
-
scriptctl locations
|
|
82
|
-
scriptctl props
|
|
83
|
-
scriptctl states act_001 # 逐个确认 state id / 名称 / 描述
|
|
84
|
-
scriptctl states loc_001
|
|
85
|
-
scriptctl states prp_001
|
|
86
|
-
scriptctl do ep01.txt # 正文批次 dry-run
|
|
87
|
-
scriptctl do ep01.txt --apply # 再落盘场景与正文
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
`assets.txt` 先注册资产与持久视觉状态:
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
worldview 现代
|
|
94
|
-
add-actor 林夏 --role 主角 --description "高三女生,沉默寡言"
|
|
95
|
-
add-actor 陈默 --role 配角 --description "便利店夜班店员"
|
|
96
|
-
add-location 便利店 --description "24h 便利店,冷白光"
|
|
97
|
-
add-prop 黑伞 --description "林夏随身携带的旧黑伞"
|
|
98
|
-
state-rename actor:act_001/default "平日造型"
|
|
99
|
-
describe actor:act_001/default "整洁校服,黑色长发"
|
|
100
|
-
state-add actor:act_001 "雨天造型" --state-id st_rain --description "校服湿透,发梢滴水"
|
|
101
|
-
state-rename actor:act_002/default "夜班造型"
|
|
102
|
-
describe actor:act_002/default "便利店制服,胸前佩戴工牌"
|
|
103
|
-
state-rename location:loc_001/default "常态"
|
|
104
|
-
describe location:loc_001/default "冷白灯全部亮起"
|
|
105
|
-
state-add location:loc_001 "停电" --state-id st_outage --description "冷白灯熄灭,应急灯发绿"
|
|
106
|
-
state-rename prop:prp_001/default "常态"
|
|
107
|
-
describe prop:prp_001/default "伞面完整,伞骨可正常开合"
|
|
108
|
-
state-add prop:prp_001 "破损" --state-id st_torn --description "伞面裂开,一根伞骨外翻"
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
`ep01.txt` 再建分集和真实 scene,然后写正文:
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
add-episode --title "第一集:相遇"
|
|
115
|
-
synopsis "雨夜便利店里,林夏与夜班店员陈默因一场意外相遇。"
|
|
116
|
-
synopsis ep_001 "林夏雨夜进入便利店,发现陈默似乎认识她。"
|
|
117
|
-
insert ep_001 --location loc_001 --time night --space interior
|
|
118
|
-
scene-ref ep_001/scn_001 actor:act_001 --state st_rain
|
|
119
|
-
scene-ref ep_001/scn_001 actor:act_002 --state default
|
|
120
|
-
scene-ref ep_001/scn_001 location:loc_001 --state default
|
|
121
|
-
scene-ref ep_001/scn_001 prop:prp_001 --state default
|
|
122
|
-
insert ep_001/scn_001 --type action --content "雨夜,林夏推门进店。" --emotion "狼狈"
|
|
123
|
-
insert ep_001/scn_001 --type dialogue --content "欢迎光临。" --actor act_002
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
地点、时段和叙事线连续时,后续节拍继续向 `ep_001/scn_001` 追加 action。同场人物需要多个造型或多份画面引用时,对同一 actor 追加 scene-ref,并在 Action 中写清变化顺序。互动式写作可把长场拆成多个 action 批次依次 `do --apply`,每批都指向同一 scene。场界规则以 SKILL.md「标准剧本通用流程」为准。
|
|
127
|
-
|
|
128
|
-
动词与单条命令完全一致(参数见 `scriptctl <verb> --help`)。`do` 也读 stdin:`… | scriptctl do -`。
|
|
129
|
-
|
|
130
|
-
> 机器/程序化生成的批量(如 jq 变换查询结果)才用 JSON:`scriptctl actions … --json | jq '[…ops…]' | scriptctl patch -`。手写一律 `do`。
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## 写到哪里去(落库)
|
|
135
|
-
|
|
136
|
-
`create` 和所有编辑 verb 只写本地 `--script-path <file>`;省略时是
|
|
137
|
-
`<cwd>/workspace/script.json`。远端剧本必须遵循:
|
|
138
|
-
|
|
139
|
-
```text
|
|
140
|
-
checkout → 本地查询/原子编辑/do/patch → validate → publish
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
- 已有远端剧本先 `scriptctl checkout --script-path draft.json`。
|
|
144
|
-
- 全程对同一个 `draft.json` 编辑。新增原子能力只需实现本地操作,不增加远端业务 API。
|
|
145
|
-
- `scriptctl status --script-path draft.json` 查看是否 dirty。
|
|
146
|
-
- `scriptctl publish --script-path draft.json` 拉最新 snapshot 后以本地稿为准生成 patch;CAS/网络失败会重拉重试,最终远端内容与本地稿一致。
|
|
147
|
-
- 本地新剧可直接 create/ingest 后首次 publish;没有 working-copy metadata 时只尝试从 revision 0 创建。
|
|
148
|
-
|
|
149
|
-
### 两份 script.json(洗稿 / 对标 / 转绘)
|
|
150
|
-
|
|
151
|
-
同时开着原剧与新剧时,一次只作用于 `--script-path` 指的那份:从原剧读(`summary`/`actions`(带 timestamp)/`states`(带弧线)/`scenes`(带时段)),往新剧写(`create` → `do --apply`)。换文件 = 换 `--script-path` 的值。详见 SKILL.md「两个 script.json」。
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## 校验语义(重要)
|
|
156
|
-
|
|
157
|
-
空骨架可以逐步搭建,但正文入口有更严格的前置门:
|
|
158
|
-
|
|
159
|
-
- **骨架阶段**:可以先建空剧本、空集和空场,再逐项补资产引用。
|
|
160
|
-
- **正文插入门**:`insert <ep/scn>` 要求本场已有地点,且本场全部地点/人物/道具引用都带已物化 state;对白/心声使用 actor 时,该 actor 必须已在本场 cast。空镜、环境动作或非角色发声场可以没有人物引用。
|
|
161
|
-
- **全局硬错误**:悬挂引用、重复 id、人物真名重复、说话人物不在本场、非法枚举、缺 id/name、非人类注册成 actor。
|
|
162
|
-
|
|
163
|
-
随时 `scriptctl validate` 看整体,`scriptctl issues --severity warning` 专看「还没填」的清单。
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## 提醒
|
|
168
|
-
|
|
169
|
-
- 资产 state 判定(哪些进 `states[]`)见 SKILL.md「资产 state 判定」。
|
|
170
|
-
- 非角色发声源(系统/广播/画外/群体)用 `dialogue <at> --kind system|broadcast|offscreen|group [--label ...]`(对白行内联),**不要**注册成 actor。
|
|
171
|
-
- 人物真名全剧唯一且稳定:动作中只用 `actor_name`;称呼、绰号、职位放 aliases,只能出现在自然对白等不要求资产解析的文本里。别在名字里塞状态注解(`林夏(受伤)`会被拒),外观档位用 `state-add`。
|
|
172
|
-
- action 禁止“他 / 她 / 对方 / 其中一人 / 另一个人”等指代;逐个写明行动者真名。对白内容允许自然使用人称代词。
|
|
173
|
-
- action 写明具体动作、作用对象、空间方向和可见结果;对白的短促伴随动作放 `emotion`,影响走位、道具或连续性的动作单独写 action。
|
|
174
|
-
- 一个 scene 只绑定一个地点和每项资产的一个 state;多地点或多状态参考需求按 [production-writing-standard.md](production-writing-standard.md) 处理并报告结构限制。
|
|
175
|
-
- action 情绪放 `emotion` 字段:插入时用 `insert ... --emotion "紧张"`,修改时用 `emotion <ep/scn#idx> "紧张"` / `emotion <ep/scn#idx> --clear`,不要把 `[紧张]` 这类标记塞进 content。
|
|
176
|
-
- 参数 / 退出码以 `scriptctl <cmd> --help` 为准。
|