scriptnow-cli 0.3.95__tar.gz → 0.3.96__tar.gz

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.
Files changed (46) hide show
  1. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/PKG-INFO +3 -3
  2. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/README.md +12 -2
  3. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/README.pypi.md +2 -2
  4. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/README.md +12 -2
  5. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/__init__.py +1 -1
  6. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/scriptnow_cli.py +16 -64
  7. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/SKILL.md +87 -0
  8. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/agents/openai.yaml +6 -0
  9. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/references/methods.md +117 -0
  10. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/references/operations.md +54 -0
  11. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/references/planning.md +134 -0
  12. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/references/review.md +60 -0
  13. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/references/setup.md +80 -0
  14. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/references/storyboard.md +21 -0
  15. scriptnow_cli-0.3.96/cli_anything/scriptnow/skills/references/writing.md +16 -0
  16. scriptnow_cli-0.3.96/cli_anything/scriptnow/utils/browser_login.py +85 -0
  17. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/utils/session.py +4 -26
  18. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/pyproject.toml +1 -1
  19. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/scriptnow_cli.egg-info/PKG-INFO +3 -3
  20. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/scriptnow_cli.egg-info/SOURCES.txt +11 -0
  21. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_append_commands.py +13 -52
  22. scriptnow_cli-0.3.96/tests/test_browser_login.py +50 -0
  23. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_guide_chain.py +1 -0
  24. scriptnow_cli-0.3.96/tests/test_skill_bundle.py +26 -0
  25. scriptnow_cli-0.3.95/cli_anything/scriptnow/skills/SKILL.md +0 -311
  26. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/LICENSE +0 -0
  27. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/__init__.py +0 -0
  28. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/__main__.py +0 -0
  29. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/ui.py +0 -0
  30. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/utils/__init__.py +0 -0
  31. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/utils/diag.py +0 -0
  32. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/cli_anything/scriptnow/utils/upgrade.py +0 -0
  33. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/scriptnow_cli.egg-info/dependency_links.txt +0 -0
  34. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/scriptnow_cli.egg-info/entry_points.txt +0 -0
  35. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/scriptnow_cli.egg-info/requires.txt +0 -0
  36. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/scriptnow_cli.egg-info/top_level.txt +0 -0
  37. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/setup.cfg +0 -0
  38. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/setup.py +0 -0
  39. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_document_revision_state.py +0 -0
  40. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_json_errors.py +0 -0
  41. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_outline_commands.py +0 -0
  42. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_review_commands.py +0 -0
  43. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_run_commands.py +0 -0
  44. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_session.py +0 -0
  45. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_storyboard_commands.py +0 -0
  46. {scriptnow_cli-0.3.95 → scriptnow_cli-0.3.96}/tests/test_upgrade.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scriptnow-cli
3
- Version: 0.3.95
3
+ Version: 0.3.96
4
4
  Summary: ScriptNow 创作 CLI —— 从灵感到成书交付的一站式命令行(CLI-Anything 模式)
5
5
  Author: ScriptNow
6
6
  License: MIT
@@ -46,13 +46,13 @@ The command is `scriptnow`; the distribution name is `scriptnow-cli`.
46
46
  scriptnow --version
47
47
  scriptnow agent-guide --json
48
48
  scriptnow doctor
49
- scriptnow login --host https://sn.igeewa.com --email you@example.com
49
+ scriptnow login --host https://sn.igeewa.com
50
50
  scriptnow guide --medium novel
51
51
  # For screenwriting:
52
52
  scriptnow guide --medium script
53
53
  ```
54
54
 
55
- Enter your password at the hidden terminal prompt. A ScriptNow account and
55
+ Sign in and approve CLI access in your system browser; never send your password to the Agent. A ScriptNow account and
56
56
  appropriate project access are required; installing this client does not create
57
57
  an account or grant service credits.
58
58
 
@@ -136,13 +136,13 @@ GitHub 镜像仓库与 release tag 仅作生产源之外的备用下载。`lates
136
136
  ## 登录
137
137
 
138
138
  ```bash
139
- scriptnow login --host https://sn.igeewa.com --email 你的账号 # 交互式隐藏输入密码(或 --password-stdin / SCRIPTNOW_PASSWORD)
139
+ scriptnow login --host https://sn.igeewa.com # 打开系统浏览器登录授权
140
140
  ```
141
141
 
142
142
  会话保存到 `~/.config/scriptnow-cli/session.json`(仅 Cookie,不含密码,权限 0600)。
143
143
  CLI 在 macOS/Linux/Windows 上会用跨进程锁协调共享会话的自动续期:不同项目可并发执行,避免 refresh token
144
144
  轮换互相覆盖;同一项目的创作写操作仍必须串行,以免产生候选或版本冲突。
145
- 也可用 `SCRIPTNOW_BASE_URL` / `SCRIPTNOW_EMAIL` / `SCRIPTNOW_PASSWORD` 环境变量。
145
+ 登录仅通过系统浏览器完成,不再接受密码参数、标准输入或密码环境变量。
146
146
 
147
147
  **会话自动续期**:access token 约 60 分钟过期,CLI 会**自动**用 refresh token 续期并写回本地文件
148
148
  (refresh 有效 30 天)——一次登录后 30 天内无需再登录,Agent 长会话也不会中途失效。
@@ -461,3 +461,13 @@ SKILL.md 位于 [`cli_anything/scriptnow/skills/SKILL.md`](cli_anything/scriptno
461
461
  ## 统一创作 Skill 方案
462
462
 
463
463
  CLI、Creator 与创作运行共用服务端 creative-skill-plan。逐章/逐场前使用 ready-check --unit-id <单元ID> 查看已采纳叙事阶段、本单元功能、个人与内置方法及执行准备;缺少阶段不按集数比例推定。阶段 narrative_stage 与功能 unit_function 随集纲/章纲候选提交,采纳后生效。节奏建议不构成一票否决;已选中、已读取、已应用分别留证。
464
+
465
+ ## ScriptNow 创作搭档 Skill
466
+
467
+ 作者可以说“启动 ScriptNow 新手模式”或“继续我的作品”。`scriptnow` Skill 负责对话引导,CLI 负责执行,平台负责权限、审阅与保存。入口按当前任务读取安装、规划、审阅、写作方法、正文、运行恢复或分镜说明,不一次加载全部规则。安装 CLI 包会携带完整 Skill,但不会自动向所有 Agent 客户端注册;注册时须包含整个 skills 目录及其 references、agents 文件。Skill 与 CLI 同步发布,实时 `agent-guide --json` 为操作规则依据。
468
+
469
+ 开始或继续 ScriptNow 创作时,Skill 默认自检;缺少 CLI 即自动安装必要依赖并验证,无需作者另行提出安装要求,已有可用版本直接复用。先检查 Agent 实际执行环境,Windows 优先调用官方 `install-agent.ps1`,完成后用绝对路径验证并继续登录。现有自动 Python 安装分支针对 amd64;其他架构、组织策略和网络限制按具体检查处理,不承诺所有机器均可无人值守安装。
470
+
471
+ 作品写作方法共建:Skill 从灵感和规划对话中积累作者的理念、人物思路、节奏、钩子与表达要求,围绕真实创作决定,正文前整理成核心追求、条件性原则、适用边界和取舍顺序;正反例不是共建主流程,craft 必需的 examples 从已确认的具体取舍中提取。通过现有 skill setup / craft 接口,经作者确认、平台保存和挂载核验后生效;单次修改不自动升级为长期规则。
472
+
473
+ 浏览器授权登录:运行 `scriptnow login` 后由系统浏览器登录并确认,临时授权凭证自动传递,作者无需复制。CLI 不接收密码参数、标准输入或密码环境变量。登录会话复用并自动刷新;默认访问凭据 60 分钟,成功刷新后重新计算 30 天闲置有效期,实际值由服务端设置决定。退出、改密或撤销后仍须重新授权。此变更需后端与 Creator 授权页配套部署后发布 CLI。
@@ -23,13 +23,13 @@ The command is `scriptnow`; the distribution name is `scriptnow-cli`.
23
23
  scriptnow --version
24
24
  scriptnow agent-guide --json
25
25
  scriptnow doctor
26
- scriptnow login --host https://sn.igeewa.com --email you@example.com
26
+ scriptnow login --host https://sn.igeewa.com
27
27
  scriptnow guide --medium novel
28
28
  # For screenwriting:
29
29
  scriptnow guide --medium script
30
30
  ```
31
31
 
32
- Enter your password at the hidden terminal prompt. A ScriptNow account and
32
+ Sign in and approve CLI access in your system browser; never send your password to the Agent. A ScriptNow account and
33
33
  appropriate project access are required; installing this client does not create
34
34
  an account or grant service credits.
35
35
 
@@ -63,7 +63,7 @@ Windows PowerShell 使用 `py -3 -m venv .venv` 创建 Python 3.10+ 环境,通
63
63
  ## 登录
64
64
 
65
65
  ```bash
66
- scriptnow login --host https://sn.igeewa.com --email 你的账号 # 交互式隐藏输入密码(或 --password-stdin / SCRIPTNOW_PASSWORD)
66
+ scriptnow login --host https://sn.igeewa.com # 打开系统浏览器登录授权
67
67
  ```
68
68
 
69
69
  会话保存到 `~/.config/scriptnow-cli/session.json`(仅 Cookie,不含密码,权限 0600)。
@@ -74,7 +74,7 @@ macOS/Linux 上 CLI 会用跨进程锁协调共享会话的自动续期:不同
74
74
  是否登录、账号、平台地址与连通性。任何「登录失败 / 找不到配置 / 409 / No such option」
75
75
  先 `scriptnow doctor` 定位,不要猜配置位置。`SCRIPTNOW_CLI_CONFIG` 可覆盖会话路径;
76
76
  多环境共用同一会话文件时登录一次全部生效。
77
- 也可用 `SCRIPTNOW_BASE_URL` / `SCRIPTNOW_EMAIL` / `SCRIPTNOW_PASSWORD` 环境变量。
77
+ 登录仅通过系统浏览器完成,不再接受密码参数、标准输入或密码环境变量。
78
78
 
79
79
  ## 快速开始(双域)
80
80
 
@@ -348,3 +348,13 @@ CLI、Creator 与创作运行共用服务端 creative-skill-plan。逐章/逐场
348
348
  ## CLI release synchronization
349
349
 
350
350
  Maintainers run monorepo `scripts/sync-cli-release.sh` to synchronize GitHub, the production distribution and PyPI. PyPI environment review remains required; exit 3 means pending, with an exact resume command. See [publishing instructions](https://github.com/quchenchen/scriptnow-cli/blob/main/PUBLISHING.md).
351
+
352
+ ## ScriptNow 创作搭档 Skill
353
+
354
+ 作者可以说“启动 ScriptNow 新手模式”或“继续我的作品”。`scriptnow` Skill 负责对话引导,CLI 负责执行,平台负责权限、审阅与保存。入口按当前任务读取安装、规划、审阅、写作方法、正文、运行恢复或分镜说明,不一次加载全部规则。安装 CLI 包会携带完整 Skill,但不会自动向所有 Agent 客户端注册;注册时须包含整个 skills 目录及其 references、agents 文件。Skill 与 CLI 同步发布,实时 `agent-guide --json` 为操作规则依据。
355
+
356
+ 开始或继续 ScriptNow 创作时,Skill 默认自检;缺少 CLI 即自动安装必要依赖并验证,无需作者另行提出安装要求,已有可用版本直接复用。先检查 Agent 实际执行环境,Windows 优先调用官方 `install-agent.ps1`,完成后用绝对路径验证并继续登录。现有自动 Python 安装分支针对 amd64;其他架构、组织策略和网络限制按具体检查处理,不承诺所有机器均可无人值守安装。
357
+
358
+ 作品写作方法共建:Skill 从灵感和规划对话中积累作者的理念、人物思路、节奏、钩子与表达要求,围绕真实创作决定,正文前整理成核心追求、条件性原则、适用边界和取舍顺序;正反例不是共建主流程,craft 必需的 examples 从已确认的具体取舍中提取。通过现有 skill setup / craft 接口,经作者确认、平台保存和挂载核验后生效;单次修改不自动升级为长期规则。
359
+
360
+ 浏览器授权登录:运行 `scriptnow login` 后由系统浏览器登录并确认,临时授权凭证自动传递,作者无需复制。CLI 不接收密码参数、标准输入或密码环境变量。登录会话复用并自动刷新;默认访问凭据 60 分钟,成功刷新后重新计算 30 天闲置有效期,实际值由服务端设置决定。退出、改密或撤销后仍须重新授权。此变更需后端与 Creator 授权页配套部署后发布 CLI。
@@ -1,3 +1,3 @@
1
1
  """scriptnow-cli — agent-native CLI for the ScriptNow creative platform."""
2
2
 
3
- __version__ = "0.3.95"
3
+ __version__ = "0.3.96"
@@ -25,7 +25,6 @@ from cli_anything.scriptnow.utils.session import (
25
25
  ScriptNowError,
26
26
  Session,
27
27
  load,
28
- login,
29
28
  write_json,
30
29
  )
31
30
  from cli_anything.scriptnow.utils.upgrade import (
@@ -83,12 +82,7 @@ class AgentJsonGroup(click.Group):
83
82
 
84
83
 
85
84
  def _session(ctx: click.Context) -> Session:
86
- """Resolve a Session, logging in when --base-url/--email/--password are given."""
87
- base = ctx.obj.get("base_url")
88
- email = ctx.obj.get("email")
89
- password = ctx.obj.get("password")
90
- if base and email and password:
91
- return login(base, email, password)
85
+ """Load only the previously browser-authorized session."""
92
86
  return load()
93
87
 
94
88
 
@@ -294,7 +288,7 @@ _MAIN_HELP = (
294
288
  + """ScriptNow 创作 CLI —— 从灵感到成书交付的一站式命令行。
295
289
 
296
290
  典型流程(Agent 或创作者,固定 12 步引导顺序):
297
- 1. scriptnow login --host https://sn.igeewa.com --email <邮箱> # 登录平台
291
+ 1. scriptnow login --host https://sn.igeewa.com # 登录平台
298
292
  2. scriptnow project create --name 新作 --medium novel # 建项目
299
293
  3. scriptnow project direction --apply @direction.json # 补齐创作方向
300
294
  4. novel propose cores/blueprint → adopt-core / adopt-blueprint # 故事核心与蓝图(回填优先,planning-quality 门禁)
@@ -320,8 +314,6 @@ _MAIN_HELP = (
320
314
  invoke_without_command=True,
321
315
  )
322
316
  @click.option("--base-url", envvar="SCRIPTNOW_BASE_URL", help="Platform base URL (e.g. https://sn.igeewa.com)")
323
- @click.option("--email", envvar="SCRIPTNOW_EMAIL", help="Login email")
324
- @click.option("--password", envvar="SCRIPTNOW_PASSWORD", help="Login password")
325
317
  @click.option("--json", "json_output", is_flag=True, help="Emit machine-readable JSON")
326
318
  @click.option("--no-color", "no_color", is_flag=True, help="Disable ANSI colors (also: NO_COLOR / SCRIPTNOW_NO_COLOR env)")
327
319
  @click.version_option(
@@ -333,8 +325,6 @@ _MAIN_HELP = (
333
325
  def main(
334
326
  ctx: click.Context,
335
327
  base_url: str | None,
336
- email: str | None,
337
- password: str | None,
338
328
  json_output: bool,
339
329
  no_color: bool,
340
330
  ) -> None:
@@ -342,8 +332,6 @@ def main(
342
332
  ui.init(no_color)
343
333
  ctx.ensure_object(dict)
344
334
  ctx.obj["base_url"] = base_url
345
- ctx.obj["email"] = email
346
- ctx.obj["password"] = password
347
335
  ctx.obj["json"] = json_output
348
336
  ctx.obj["no_color"] = no_color
349
337
  # 强制版本检查:后台低频(24h 缓存)查询 GitHub 发布镜像,有新版时提示
@@ -978,7 +966,7 @@ def doctor_cmd(
978
966
  click.echo(ui.dim(f"平台:{report.get('base_url')}"), err=True)
979
967
  else:
980
968
  click.echo(ui.warn(f"未登录:{report.get('login_error')}"), err=True)
981
- click.echo(ui.dim("修复:scriptnow login --host <平台地址> --email <账号>(交互输入密码)"), err=True)
969
+ click.echo(ui.dim("修复:scriptnow login --host <平台地址>(系统浏览器授权)"), err=True)
982
970
  click.echo(ui.dim("配置目录:~/.config/scriptnow-cli/(session.json + version-check.json + errors.jsonl)"), err=True)
983
971
  click.echo(ui.dim("可用环境变量 SCRIPTNOW_CLI_CONFIG 覆盖会话文件位置"), err=True)
984
972
  if report["diagnostics_enabled_until"]:
@@ -1068,6 +1056,7 @@ _AGENT_CONTRACT = {
1068
1056
  "title": "ScriptNow Agent 操作契约 —— 连接平台前必读",
1069
1057
  "audience": "在 ScriptNow 平台上创作小说/剧本的 AI Agent。以本契约为唯一操作准则;本契约与平台后端返回为准,优先于任何对平台的猜测。",
1070
1058
  "rules": [
1059
+ "登录只用 scriptnow login 打开系统浏览器,由用户在网页输入账号密码并确认授权。禁止向 Agent 提供密码、读取密码框或以参数、stdin、环境变量代传密码;授权失败不得回退旧密码登录。",
1071
1060
  "创作顺序铁律(12 步 guide 顺序):故事核心与蓝图(cores/blueprint)→ 故事梗概(outline)→ 全剧统筹与粗纲(rough-outline)→ StoryMap 与集纲/章纲一体交付 → 正文。粗纲依赖已采纳的核心/蓝图锚点与梗概;禁止先排 StoryMap 或先写正文再补粗纲。",
1072
1061
  "authorize 命令与旧版 decision-token 通道已弃用:所有采纳授权统一走 `scriptnow review confirm <packet_id> --decision retain --evidence \"<用户明确决定原话>\" --json` → `scriptnow review claim <packet_id> --json` → 目标采纳命令的 `--review-token <凭证>`;CLI authorize 仅保留兼容输出并标记 deprecated,新流程不再引导使用。",
1073
1062
  "创作对话优先于技术操作:新手模式按 scriptnow guide --step <n> --medium novel|script --json 一幕一幕推进。每轮只问一个主问题;用户卡住时才选择一个 lenses 角度启发。先用自然语言复述创作意图,再给一个具体候选,让用户只做『保留 / 调整 / 换方向』的决定。命令、JSON、id、质量术语默认留在幕后。多轮发散后可将最近对话的轻量摘要传给 guide --pulse @pulse.json --step <当前幕>:只含 rounds_without_progress / decision_advanced / captured_material / unresolved / conflicts / next_stage_requested,不传正文。仅当返回 drifting/conflict 才按 recovery 协议先收拢成果、再邀请回归;useful_detour 必须保留素材并允许继续探索。也可直接用 --resume 温和接回。所有机制都不得改变平台状态、强制跳转、倾倒整套流程、连续盘问,或用『作为 AI』『根据算法』等措辞破坏共创感。",
@@ -1086,7 +1075,7 @@ _AGENT_CONTRACT = {
1086
1075
  "错误或不适用的项目 Skill 不要归档全局 Skill 或重建项目:在用户明确授权后执行 `skill unmount <project_id> <skill_id> --confirm --json`,CLI 会回读 mounts 确认该项目已解除;其他项目和版本不受影响。解除最后一个已启用写作 Skill 后,ready-check 必须显示不就绪,需挂载通过门禁的方法论后再生成。",
1087
1076
  "Skill 健壮性参照:craft / voice / continuity / evaluation / examples 五个维度必须有实质内容并含正反例;script 还必须覆盖四类质量锚点——场次功能与可观察转折、可见可听可表演、对白/VO/OS 发声时序、台词量与目标时长。skill craft 自动补系统锚点,不增加用户问卷;绕过 craft 直接创建也会由后端 robustness v2 检查。制作信息由系统派生,编剧不维护机器字段。",
1088
1077
  "回传被平台拒绝时,按 CLI 返回的可行动 detail 修正格式后重传;Agent/--json 场景统一返回 {ok:false,error:{type,status,detail}},其中 detail 保留经脱敏的原始领域提示,不得把中文通用兜底当成修复指令;不要自建替代结构,也不要删除平台已有项目自行重建。",
1089
- "会话由 CLI 自动续期(refresh token 30 天)。同一项目的创作写操作仍须串行,避免版本/候选冲突;不同项目可并发执行,CLI 会安全协调共享登录会话的 refresh。若提示『登录状态已失效』,用已知凭据重新运行 scriptnow login,不要伪造凭据或绕开 CLI。",
1078
+ "会话由 CLI 自动续期(refresh token 30 天)。同一项目的创作写操作仍须串行,避免版本/候选冲突;不同项目可并发执行,CLI 会安全协调共享登录会话的 refresh。若提示『登录状态已失效』,重新运行 scriptnow login 并由用户在系统浏览器授权,不要伪造凭据或绕开 CLI。",
1090
1079
  "命令与参数以 scriptnow --help / scriptnow <命令> --help 为准;不确定时先查帮助,不要臆造参数或输出格式。",
1091
1080
  "需要保存的标识(project_id / chapter_id / revision_id / run_id)来自命令的 --json 输出;后续命令一律引用这些 id,不要自造 id 或猜测路径。",
1092
1081
  "CLI 版本与 /cli 页面一致;发现行为异常先检查 scriptnow --version 是否最新。",
@@ -1101,7 +1090,7 @@ _AGENT_CONTRACT = {
1101
1090
  ],
1102
1091
  "quickstart": [
1103
1092
  "scriptnow guide --step 1 --medium novel|script --json(每步完成后按 next_step 衔接,不一次展示命令墙)",
1104
- "scriptnow login --host https://sn.igeewa.com --email <邮箱>(随后安全输入密码)",
1093
+ "scriptnow login --host https://sn.igeewa.com",
1105
1094
  "scriptnow project create --name <作品名> --medium novel|script --premise <前提> --genre <类型> --tone <文风> --point-of-view <视角> --chapter-target-words 1200;script 项目另设 --volume-one 总集数 --volume-two 每集场数 --volume-three 单集目标分钟(默认 3)(创建后立即 scriptnow project list 回读核对项目存在)",
1106
1095
  "规划链逐层(故事核心与蓝图 → 梗概 → 粗纲 → storymap):对 cores/blueprint 先用 review preview 审阅本地文件,再 propose 回填、candidate-preview 审阅平台候选、confirm/claim。小说故事核心执行 `scriptnow novel adopt-core <作品号> <候选号> --review-token <凭证>`,剧本故事核心执行 `scriptnow script adopt-core <作品号> <候选号> --review-token <凭证>`;蓝图分别执行 `scriptnow novel adopt-blueprint <作品号> <候选号> --review-token <凭证>` 或 `scriptnow script adopt-blueprint <作品号> <候选号> --review-token <凭证>`。再采纳 outline、粗纲和集纲/章纲一体的 StoryMap;每个写入都以平台返回的 ID 和回读为准。",
1107
1096
  "集纲/章纲随 storymap 一体交付(novel 参照 script 合并模型):剧本每个 episode 提供平铺 logline/active_goal/conflict/turn/state_changes/anchor_ids;小说每个 chapter 的 outline 提供 summary 或 logline、active_goal/conflict/turn/state_changes,锚点可来自 outline.anchor_ids 或 beat。storymap JSON 本地生成 → novel/script planning-quality 预检 → 每阶段先 review preview → propose → review candidate-preview 展示平台候选;人明确保留后分别 adopt,禁止 --adopt 隐式连跳。旧项目可用 episode-outline/chapter outline 补纲;新增卷/章也只形成候选。",
@@ -1201,8 +1190,8 @@ _GUIDE_STEPS = [
1201
1190
  "scene": "推开工作室的门。这里存放着你所有的作品与灵感,先落下你的名字。",
1202
1191
  "why": "登录一次,之后所有创作命令都会自动带上你的身份,不用反复输入。",
1203
1192
  "downstream": "登录后所有写操作自动带身份,是后续一切创作命令的身份基础。",
1204
- "command": "scriptnow login --host https://sn.igeewa.com --email <邮箱>(随后安全输入密码)",
1205
- "verify": "输出 登录成功:https://sn.igeewa.com(<邮箱>)",
1193
+ "command": "scriptnow login --host https://sn.igeewa.com",
1194
+ "verify": "浏览器确认后输出授权成功;doctor 核对已保存会话与当前账号,不输出凭据。",
1206
1195
  "prompt": "此刻你想创作什么?不必完整,先说出那个让你心动的念头。",
1207
1196
  "masters": [
1208
1197
  {
@@ -1779,56 +1768,19 @@ def _echo_guide(payload: dict[str, object]) -> None:
1779
1768
 
1780
1769
 
1781
1770
  @main.command()
1782
- @click.option("--host", required=True, help="Platform base URL, e.g. https://sn.igeewa.com")
1783
- @click.option("--email", required=True)
1784
- @click.option(
1785
- "--password",
1786
- default=None,
1787
- hide_input=True,
1788
- help="密码。为安全起见不建议在命令行传明文:可省略后交互式隐藏输入,或用 --password-stdin / 环境变量 SCRIPTNOW_PASSWORD 传入",
1789
- )
1790
- @click.option(
1791
- "--password-stdin",
1792
- is_flag=True,
1793
- help="从标准输入读取密码(管道/agent 安全传入,不落 shell history 与进程列表)",
1794
- )
1771
+ @click.option("--host", default="https://sn.igeewa.com", help="平台地址")
1772
+ @click.option("--timeout", type=click.IntRange(30, 600), default=180, help="浏览器授权等待秒数")
1795
1773
  @click.option("--json", "json_output", is_flag=True)
1796
- def login_cmd(host: str, email: str, password: str | None, password_stdin: bool, json_output: bool) -> None:
1797
- """Authenticate and persist a session (cookie + CSRF).
1798
-
1799
- 密码安全传递(按优先级):
1800
- 1. --password-stdin:从标准输入读取(推荐给 agent/脚本,不落历史与进程表)
1801
- 2. 环境变量 SCRIPTNOW_PASSWORD(agent 场景)
1802
- 3. 省略 --password:交互式隐藏输入(getpass,屏幕上不显示、不落历史)
1803
- 4. --password <明文>:仅兼容旧脚本;明文会出现在 shell history,尽量不用
1804
- """
1805
- import getpass as _getpass
1806
- import os as _os
1807
-
1808
- if password is None:
1809
- if password_stdin:
1810
- password = click.get_text_stream("stdin").readline().rstrip("\n")
1811
- else:
1812
- env_password = _os.environ.get("SCRIPTNOW_PASSWORD")
1813
- if env_password:
1814
- password = env_password
1815
- else:
1816
- password = _getpass.getpass("密码(输入时不显示): ")
1817
- if not password:
1818
- raise click.ClickException("密码不能为空——请重新运行 scriptnow login")
1774
+ def login_cmd(host: str, timeout: int, json_output: bool) -> None:
1775
+ """打开系统浏览器登录授权;CLI 和 Agent 不接收账号密码。"""
1776
+ from cli_anything.scriptnow.utils.browser_login import browser_login
1819
1777
  try:
1820
- session = login(host, email, password)
1778
+ session = browser_login(host, timeout=timeout, notify=lambda message: click.echo(message, err=True))
1821
1779
  except ScriptNowError as error:
1822
1780
  raise click.ClickException(str(error)) from error
1823
- password = None # 用完即弃,避免残留在栈上
1781
+ _emit({"ok": True, "base_url": session.base_url}, json_output)
1824
1782
  if not json_output:
1825
- click.echo(ui.ok(f"登录成功:{host}({email})"))
1826
- if not _onboarding_done():
1827
- click.echo(
1828
- ui.warn("第一次来?小说运行 scriptnow guide --medium novel;剧本运行 --medium script。我们从一个念头开始。"),
1829
- err=True,
1830
- )
1831
- _emit({"ok": True, "base_url": session.base_url, "user": email}, json_output)
1783
+ click.echo(ui.ok("浏览器授权成功,登录会话已保存。"))
1832
1784
 
1833
1785
 
1834
1786
  # ------------------------------------------------------------------------ projects
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: scriptnow
3
+ description: 使用 ScriptNow CLI 陪伴作者和编剧从灵感、设定、规划到逐章逐场创作、修订与导出。用户说“帮我安装并启动 ScriptNow”、“启动 ScriptNow 新手模式”、继续 ScriptNow 作品、管理候选或交付分镜时使用。普通离线写作不自动创建平台项目。
4
+ ---
5
+
6
+ # ScriptNow 创作搭档
7
+
8
+ 让作者用自然语言决定作品怎样生长,由你通过 CLI 执行并核对平台结果。
9
+ CLI 是执行工具;本 Skill 是协作入口;平台是项目事实源。
10
+ 本 Skill 不替代服务端规则,也不自动获得采纳、删除、发布或跨租户访问权限。
11
+
12
+ ## 启动与继续
13
+
14
+ 1. 任何开始或继续 ScriptNow 创作的请求,都先自动检查 `scriptnow --version` 及已知安装路径。
15
+ 若缺少可用 CLI,直接读取 [安装与连接](references/setup.md),在当前 Agent 实际执行环境中
16
+ 安装并验证,然后继续原创作任务;不要求作者另说“安装”,不重复询问是否安装必要依赖。
17
+ 已有可用版本则复用,不自动升级。用户明确禁止安装时遵从其要求。
18
+ 2. 首次操作运行 `scriptnow agent-guide --json` 与 `scriptnow guide --status --json`,
19
+ 读取当前规则;版本变化、规则冲突或恢复失去上下文的会话时重新读取。
20
+ 命令参数不确定时使用准确子命令的 `--help`,不猜测接口或 JSON 结构。
21
+ 3. 新用户按 `scriptnow guide --step 1 --medium novel --json` 开始;剧本使用
22
+ `--medium script`。依据返回的下一步和实际状态推进,不把完整向导倾倒给作者。
23
+ 未确定写小说还是剧本时,先从用户表达判断,必要时只问这一个问题。
24
+ 4. 继续作品时,先读取当前登录身份、有权访问的项目及已采纳内容、待审候选和未结束任务。
25
+ 只有多个项目无法辨别时才请作者选择。不得根据旧聊天猜项目编号、章节位置或完成状态。
26
+ 向导状态不代表作品进度;不能因为向导完成就跳过缺失的创作准备。
27
+ 5. 浏览器登录需要用户输入密码或操作验证时,说明当前具体一步。失败就解释原因;
28
+ 未确认连接成功,不声称已登录、已保存或已创建作品。
29
+
30
+ ## 对话方式
31
+
32
+ - 用户说“启动 ScriptNow 新手模式”即可进入上述流程,不要求用户背诵技术提示词。
33
+ - 每轮先接住作者的想法,再提出一个最影响当前故事的决定。已有明确答案时直接继续,
34
+ 不机械重复询问,不把每次读取或常规执行都变成审批。
35
+ - 用人物的行动、阻力、选择和后果解释建议。作者提出修改时,说明它影响哪些人物、
36
+ 情节或后续安排,再按决定调整;不要只替换标题或堆叠写作术语。
37
+ - 候选应让作者看到完整可读内容。命令、JSON、ID 和内部凭据留在后台。
38
+ - 有价值的发散可以保留;要返回主线时先收拢已经形成的素材,再提出下一步。
39
+ 使用 guide 的 `--resume` 或 `--pulse` 前读当前帮助,不能借此改变项目状态。
40
+ - 教学例子只是文中提供的例子。只能读取当前账号有权访问的项目;不得把作品名称
41
+ 当作跨租户检索或复制材料的授权,也不把例子的集数、时长或格式设成所有项目默认值。
42
+
43
+ ## 连续创作主线
44
+
45
+ 安装与登录后,从灵感讨论开始,明确作者自己的方向,再创建并读回平台项目。
46
+ 随后 adopt story cores and blueprint → synopsis outline → rough outline → StoryMap
47
+ 及完整章纲/集纲 → 保存并挂载写作方法 → 逐章/逐场正文 → 审读与修订 → 采纳并继续
48
+ → 全篇审读 → 导出。实际命令和门禁以实时契约为准。
49
+
50
+ 先完成当前层的讨论、候选与采纳,再依赖它推进下一层。既有项目从平台证明的当前状态
51
+ 继续,不要求重做已完成内容。作品篇幅和完成目标由作者决定,不能自行缩成“最小流程”。
52
+
53
+ 规划默认由当前 Agent 本地准备并经 propose 回填;正文默认由平台主笔生成候选。
54
+ 只有作者明确选择本地正文创作,才走本地正文回填。两条路径都必须经过平台校验和人工采纳。
55
+ 从灵感与规划阶段持续收集作者的核心理念、人物思路、节奏、钩子和表达偏好;正文前读取
56
+ [作品写作方法](references/methods.md),围绕真实创作决定提炼核心追求、条件性原则、取舍顺序与适用边界,
57
+ 经作者确认、平台保存与挂载核验后用于创作,不只选择标签或套通用模板。
58
+ 本 Skill 与作品内挂载的写作方法是两个概念:本 Skill 管理操作,作品方法约束具体写法。
59
+
60
+ ## 按当前任务读取
61
+
62
+ 不要一次加载所有参考文件;进入对应操作前再读取。
63
+
64
+ | 当前任务 | 必读说明 |
65
+ |---|---|
66
+ | 安装、升级、连接检查 | [setup](references/setup.md) |
67
+ | 首次读写项目、串行执行、后台任务或失败恢复 | [operations](references/operations.md) |
68
+ | 故事核心、蓝图、梗概、粗纲、章纲与集纲;结构追加或重建 | [planning](references/planning.md) |
69
+ | 展示并提交候选、记录人工决定、采纳正式版本 | [review](references/review.md) |
70
+ | 选择写作方法、挂载 Skill、剧本格式与 Method DNA | [methods](references/methods.md) |
71
+ | 逐章或逐场正文、本地正文回填 | [writing](references/writing.md) |
72
+ | 用户明确要求分镜与制作交付 | [storyboard](references/storyboard.md) |
73
+
74
+ ## 每次执行都要守住
75
+
76
+ - 写前读平台状态;同一项目创作写入串行;写后读回,只报告服务器确认的结果。
77
+ - 提交候选与采纳是不同决定。执行前读取 review 说明,展示准确版本,记录作者原话,
78
+ 使用平台发放的一次性凭据;内容改变则重新展示,不伪造决定,不让作者复制 token。
79
+ - 新增结构走 `storymap append-volume` / `append-chapters` 或当前合法追加通道。
80
+ 重排、删除、替换属于不同操作,先解释影响并取得明确授权,保留归档恢复路径。
81
+ - 生成返回 run_id 后跟踪同一任务;失败先查状态和错误,不重复启动,不把失败说成完成。
82
+ - 缺少权限、规则或前置材料时,说明实际缺口。不能改用体外项目、猜造数据或绕过门禁。
83
+ - 导出前核对范围与正式版本;导出后检查文件是否实际下载、可打开、内容完整。
84
+ 离线修改不会自动同步回平台。
85
+
86
+ 结束一轮时交代:刚刚确认了什么、平台保存了什么、下一步由作者决定什么。
87
+ 暂停时保留可用于恢复的项目链接、当前单元和待办;不在记录中保存登录凭据。
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "ScriptNow 创作搭档"
3
+ short_description: "用自然语言从灵感开始,持续完成小说或剧本的设定、写作、修订与交付"
4
+ default_prompt: "使用 $scriptnow 启动新手模式,陪我从灵感开始完成自己的作品。"
5
+ policy:
6
+ allow_implicit_invocation: true
@@ -0,0 +1,117 @@
1
+ # 作品写作方法
2
+
3
+ ## 以创作决定形成方法
4
+
5
+ 作品 Skill 是作者持续完善的创作主张与决策依据。先理解作者希望作品带来什么体验、愿意为此作何取舍,再提炼方法。正反例只用于必要的局部澄清或接口所需的证据,不作为共建的主流程,不让作者反复选范文或填写标签问卷。
6
+
7
+ 从灵感、核心、蓝图、规划和审读对话中持续收集作者已经明确的判断。正文前汇总确认;已有项目从当前方法和已采纳事实继续,不重新盘问。项目事实始终从平台读取,不复制成一份平行人物设定或剧情库。
8
+
9
+ ## 共建循环
10
+
11
+ 1. **创作追求**:从作者的话中提炼作品要表达什么、读者应经历什么、最不能牺牲什么。信息不足才问当前最关键的问题,不要求作者先提出完整理论。
12
+ 2. **真实决定**:选取当前规划或候选中确实需要判断的一处,例如何时揭示真相、是否让人物承担代价、结尾该收束还是留下行动。说明不同处理会得到什么、失去什么,让作者决定;不为凑教学材料额外制造剧情。
13
+ 3. **条件性原则**:复述作者选择背后的理由,提议它是否可以指导后续类似情境。区分本处选择与长期原则,不能未经确认把一次决定推广到全书。
14
+ 4. **边界与取舍**:明确何时适用、何时不适用,以及它和其他追求冲突时先保住什么。不默认“更快”“更多冲突”“更强反转”就是更好。
15
+ 5. **实际检验**:在作者已要求的后续候选与审读中观察效果,再讨论保留、缩小适用范围或修订。检验是作品推进的一部分,不额外启动未经请求的测试创作或自动采纳。
16
+
17
+ 每轮只处理当前最重要的判断;作者已经给出充分理由时直接整理,不机械走完五轮追问。
18
+
19
+ ## Agent 的观察维度,不是作者的问卷
20
+
21
+ - **核心追求**:主题与情感落点如何通过人物选择、关系变化和代价体现。
22
+ - **人物与因果**:什么驱动人物行动,选择怎样产生后果;哪些推进方式会损害可信度。
23
+ - **信息与视角**:读者、人物各自知道什么;揭示或保留信息如何影响行动与体验。
24
+ - **节奏**:当前叙事阶段和单元功能需要蓄势、推进、停留还是释放;为什么。
25
+ - **钩子与兑现**:未完成的行动或问题是否值得继续,是否来自已建立的因果,如何承接与兑现。允许有意义的收束,不强迫每章悬崖结尾。
26
+ - **表达**:叙述声音、对白、内心与动作怎样服务人物和体验,而不是只规定长短句。
27
+ - **取舍**:刺激性、可信度、情感完整性等发生冲突时,作者的优先顺序是什么。
28
+
29
+ 小说侧重阅读经验、视角与叙述声音;剧本侧重视听信息、可表演行动、场次功能及时间容量。两域方法分别整理,遵守项目已选格式。
30
+
31
+ ## 一个决定怎样变成原则
32
+
33
+ 当前情节中,主角即将发现真相。Agent 可以说明:“此刻揭示,会让下一段转向他怎样承担后果;延后揭示,可以让他在误判下作一次有代价的选择。你更想写哪一种经历?”仅在这些处理确实符合当前作品时使用这种讨论。
34
+
35
+ 若作者选择后者并说明理由,不提炼成“真相一律晚揭示”,而提出待确认的原则:“保留信息应促成人物选择与代价;如果只是延长等待,没有新的行动,就应揭示。”适用边界来自作者决定,不自定揭示章数或强制悬念密度。
36
+
37
+ ## 汇总为可读的创作主张
38
+
39
+ 在需要保存时,向作者展示简洁草案:核心追求、已确认的原则、适用边界、冲突时的优先级、实际决定依据,以及仍待验证的问题。重要原则连接到相关单元或决定,便于审读时回看,不把未经确认的建议写成定论。
40
+
41
+ 未解决的想法保留为待讨论材料,不混入生效指令。若它影响当前必需的写作准备,先讨论清楚再提交;否则继续按已确认方法推进。节奏和钩子的要求应说明服务什么体验,而非堆叠数量指标。
42
+
43
+ ## 与现有 CLI 契约兼容
44
+
45
+ 主流程使用 `scriptnow skill setup <project_id> --json` 获取推荐选项和 answer_schema。把作者已确认的选择对应到实际支持的字段,将创作主张、条件性原则和边界放入 `custom_instructions`。推荐值不是作者决定;没有对应意见时不能静默替作者接受全部预设。
46
+
47
+ 剧本的 `source_candidate` 及 Method DNA 选项仅按实时 schema 使用,由服务端编译、评估和绑定。不得自行新增 decision_log、principles 等 API 字段,不在 CLI 或本 Skill 内编译 Method DNA、判断规则启停或拼接创作 prompt。
48
+
49
+ 深度通道 `skill craft` 当前仍要求六个非空字段。先运行 `scriptnow skill craft --domain novel --json`(剧本使用 `--domain script`)读取实际契约,再把自然对话所得映射进去:
50
+
51
+ | 现有字段 | 从已确认讨论整理的内容 |
52
+ |---|---|
53
+ | work | 作品方向与核心追求 |
54
+ | craft | 条件性创作原则、节奏与钩子策略、取舍顺序 |
55
+ | voice | 已确认的叙述与表达判断 |
56
+ | continuity | 因果、人物、信息边界和衔接要求 |
57
+ | evaluation | 如何观察原则是否有效、何时需要调整 |
58
+ | examples | 对已讨论的具体处理,归纳作者认可的做法与明确排除的做法,并说明理由和适用情境 |
59
+
60
+ `examples` 是兼容现有深度接口的必填字段,不代表必须组织“正反例选秀”。优先从真实已确认的创作取舍提取;不得编造作者认可、不认可的例子,不能塞“无”“同上”绕过校验。缺少必要证据时,仅针对当前作品的一处未明判断补充讨论;如果无法得到完整答案,暂不提交 craft,可按 setup 的实际能力继续。任何通道都不得绕过服务端质量检查。
61
+
62
+ 作者确认完整草案后,才使用相应提交命令与确认参数。核对回执中的质量检查、实际挂载、精确版本;剧本核对 Method DNA 绑定。保存本地笔记、创建成功、挂载成功与本单元实际启用是不同状态,不混为一谈。
63
+
64
+ ## 随作品生长,保持版本可追溯
65
+
66
+ 写前通过 `ready-check --unit-id` 读取当前单元的已采纳阶段、功能和方法准备;剧本必要时用 `method-resolve --unit-id` 查看服务端启用/停用规则与原因。不能从章节百分比推测阶段,不能只凭已挂载就声称规则已应用。
67
+
68
+ 审读时依据正文观察:人物选择是否体现创作追求、快慢是否服务单元功能、钩子是否有因果与承接。方法效果不等同于关键词命中或机械计数。
69
+
70
+ 作者提出修改时,先区分局部修改与长期方法调整。长期调整须展示变更、理由和影响范围,由作者确认后经现有平台版本机制更新。先查看当前方法和支持的更新接口,不重复新建或叠加矛盾挂载;不自动重写此前已采纳正文。已确认的原则也可修订,但需要保留其来由和版本依据。
71
+
72
+ - Skill delivery is progressive: use `skill mounts` and normal `skill detail`
73
+ summaries first. Full personal instructions require an explicit user request
74
+ and `skill detail --include-instructions`; never fetch them speculatively.
75
+
76
+ - If a mounted Skill is wrong or blocks generation, do not archive the global
77
+ Skill or rebuild the project. Only after explicit user approval run `skill
78
+ unmount <project_id> <skill_id> --confirm --json`; it disables that one
79
+ project mount, reads mounts back for verification, and leaves other projects
80
+ and versions untouched. A project with no enabled methodology Skill is not
81
+ ready for writing.
82
+
83
+ - `skill setup <project_id>` is the default pre-writing co-creation path: fetch
84
+ `skill setup <project_id> --json` for server-recommended presets (dialogue
85
+ styles, pacing, forbidden words; script domain also carries Method DNA axes),
86
+ walk the author through the choices in editor language, then submit
87
+ `--answers @answers.json --confirm --json`; the server compiles and mounts and
88
+ the receipt must show `gate_passed`/`mounted` (script: `method_dna` binding).
89
+ `skill craft` remains the deep six-question channel; old personal Skills keep
90
+ working.
91
+
92
+ - `skill craft` preflight, its creation receipt, the mount gate, and runtime
93
+ must resolve the same complete methodology reference; never replace it with a
94
+ summary or leak a cross-tenant detail.
95
+
96
+ - For Script writing, read the project-locked `script_format` before loading a
97
+ personal Skill. Vertical short-form, Chinese screenplay, and Hollywood each
98
+ have distinct generation, frontend, and export contracts. A personal Skill
99
+ extends the selected contract; it never overrides it or merges dialogue
100
+ across an intervening action block.
101
+
102
+ - Creating a script project (`project create --medium script`) defaults to
103
+ `script_format=chinese-short` (vertical short-drama storyboard format) unless
104
+ `--script-format chinese|hollywood` is passed explicitly. In an interactive
105
+ terminal with no `--script-format`, the author is prompted to choose the
106
+ format before creation (never silently locked); pass a value from the three
107
+ supported formats and read it back from project state before writing.
108
+
109
+ ## Unified creative Skill plan
110
+
111
+ CLI, Creator and creative runs use the server creative-skill-plan. Before writing, use ready-check --unit-id <unit-id> to inspect the adopted narrative stage, unit function, personal and built-in methods, and execution readiness. Submit narrative_stage and unit_function with episode/chapter outline candidates; adoption activates them. Never infer stages from episode percentages. Pacing advice is not a veto; selection, reading and application are distinct evidence.
112
+
113
+ For Script Method DNA, use only the server-backed `skill method-current`,
114
+ `method-compile`, `method-compare`, `method-bind`, and `method-resolve` commands.
115
+ The CLI must not compile rules, infer activation, or build prompt fragments. Before
116
+ writing a unit, inspect `ready-check --unit-id` or `skill method-resolve --unit-id`
117
+ for active and inactive rules, reasons, required reads, and the verification plan.
@@ -0,0 +1,54 @@
1
+ # 执行、恢复与故障处理
2
+
3
+
4
+ - The platform is the only project fact source. Do not invent project IDs,
5
+ paths, status, JSON schemas, or completion states.
6
+
7
+ - State aggregation is authoritative: `adopted` and `adopted_human` both mean
8
+ finalized content, with `adopted_human` preferred when both exist.
9
+ `chapter list`/`book` and `scene list`/`scene show` report that revision as
10
+ `adopted_revision`, expose `adopted_human`, and list only `candidate`/
11
+ `active` revisions as pending candidates. Use `--revision` to inspect a
12
+ pending candidate explicitly.
13
+
14
+ - Keep creative writes for one project serial to avoid candidate/version
15
+ conflicts. Different projects may run concurrently; the CLI safely
16
+ coordinates automatic refresh for a shared login session on macOS/Linux.
17
+
18
+ - Use CLI commands for every platform action; local files are temporary drafts
19
+ only. Return creative drafts through `propose` so the platform validates them.
20
+ An author's delegation to an external Agent covers guidance, reading,
21
+ orchestration, presentation, and the specifically requested generate/propose
22
+ work only. It never expands to adoption, StoryMap replacement, deletion, or
23
+ publishing.
24
+
25
+ - Character bibles must be substantive at creation: profile with at least
26
+ desire/fear/weakness/goal/inner_need, plus background/traits/arc/key_relationship/
27
+ secret/wound where possible. planning-quality REVISEs profiles <200 chars or
28
+ missing required keys; `script bible-example` shows the structure.
29
+
30
+ - Never adopt a chapter, scene, or StoryMap without the user's explicit current
31
+ decision. StoryMap replacement also needs its CLI confirmation path.
32
+
33
+ - Background generation returns a `run_id`; poll `scriptnow run status` instead
34
+ of long blocking waits. On failure, repair from `status.error/detail`, then
35
+ inspect `scriptnow run events <run_id> --json` (`events=[]` means no events).
36
+ Run status also exposes persisted operation stage/progress. Fallback platform
37
+ StoryMap generation checkpoints at most three Script episodes or five Novel
38
+ chapters per batch and resumes tracking the same run after a service restart.
39
+
40
+ - Follow each command's returned actionable error detail exactly. Agent CLI
41
+ requests preserve the sanitized original domain detail when the public
42
+ Chinese fallback is generic; `--json` failures use
43
+ `{ok:false,error:{type,status,detail}}` without a traceback. Do not substitute
44
+ an unvalidated structure or silently retry with invented data.
45
+
46
+ - For rough and episode planning, treat unknown causal dependencies as sequential. Concurrency settings are ceilings for proven-independent work, never proof of independence. Reuse a checkpoint only when frozen execution identity, input signature, and predecessor chain match; unsigned or incompatible history regenerates the suffix without changing adopted content.
47
+
48
+ - CLI quality diagnostics are human opt-in only. An Agent must never run
49
+ `doctor --enable-diagnostics`, `feedback --send`, or `feedback --send --yes`
50
+ on its own. Only after the user explicitly requests diagnostics may the Agent
51
+ enable a short window; sending still requires the user's separate confirmation.
52
+ `doctor --disable-diagnostics` stops collection and `doctor --clear-errors`
53
+ deletes local v2 events. v2 never contains arguments, details, notes, paths,
54
+ identifiers, or creative content; legacy v1 files are never uploaded.