story-maintenance

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Story Maintenance

Story项目维护

Overview

概述

Run deterministic maintenance for Story Skills projects. Use the CLI for structure validation, registry rebuilds, word counts, link checks, continuity checks, project reports, next-action reports, schema migration, entity helpers, manuscript import, and manuscript export. The creative skills still own story decisions; this skill handles mechanical consistency.
为Story Skills项目执行确定性维护。使用CLI进行结构验证、注册表重建、字数统计、链接检查、连贯性检查、项目报告、下一步操作报告、架构迁移、实体辅助、手稿导入和手稿导出。创意技能仍负责故事决策;此技能处理机械一致性问题。

CLI Access

CLI 访问

Prefer the first available command:
  1. story <command>
    - when the package bin is installed
  2. bun run story -- <command>
    - when working from this repository
  3. node scripts/story.js <command>
    - bundled fallback, resolving
    scripts/story.js
    relative to this skill folder
If none of these are available, perform the requested maintenance manually using the conventions in
story-init
.
Run the installed or bundled CLI in place. Do not copy
scripts/story.js
into the user's story project, and do not create project-local build scripts, generator scripts, or bulk writer scripts to generate story content. Story projects should remain markdown-first, plus explicitly requested exports such as
manuscript.md
.
优先使用第一个可用的命令:
  1. story <command>
    - 当包的bin已安装时
  2. bun run story -- <command>
    - 当在此仓库中工作时
  3. node scripts/story.js <command>
    - 捆绑后的备选方案,相对于此技能文件夹解析
    scripts/story.js
如果以上命令都不可用,请使用
story-init
中的约定手动执行请求的维护操作。
在当前位置运行已安装或捆绑的CLI。不要将
scripts/story.js
复制到用户的故事项目中,也不要创建项目本地的构建脚本、生成器脚本或批量写入脚本来生成故事内容。故事项目应保持以markdown优先,加上明确要求的导出文件,如
manuscript.md

Commands

命令

Run commands from the story project root, or pass the story path explicitly.
shell
story validate .
story reindex .
story wordcount . --write
story links .
story continuity .
story import draft.md --title "Title"
story report .
story report . --actionable
story next .
story doctor .
story migrate .
story add character "Name"
story rename character old-id "New Name"
story remove promise old-promise
story export . --out manuscript.md
story build . --format markdown
story build . --format epub
story build . --format docx
Use:
  • validate
    after initialization and at the end of any multi-file edit
  • reindex
    after adding/removing/renaming characters, locations, systems, arcs, or chapters
  • wordcount --write
    after writing or revising chapters
  • links
    after changing character relationships, notable locations, arc participants, or chapter references
  • continuity
    after drafting or revising a chapter, and whenever the user asks about contradictions, dead characters appearing, unfired setups, or stale state; it deterministically checks
    died-in
    ordering, promise/question chapter ordering, Chekhov gaps, POV/cast consistency, and
    continuity/state.md
    references
  • import
    when the user has an existing manuscript or chapter drafts and wants a Story Skills project built from them; follow up by creating character and location files from the printed entity candidates
  • report
    when the user asks for project status, inventory, progress, or a quick health summary
  • next
    before a drafting session to identify the next deterministic action
  • doctor
    when the user asks what is stale, broken, or inconsistent
  • migrate
    when a project has an older schema version or missing v2 paths
  • add
    ,
    rename
    , and
    remove
    for deterministic entity file operations when they fit the requested change
  • export
    only when the user asks for a combined manuscript at a specific path
  • build
    when the user asks to build the book artifact; supports markdown, EPUB, and DOCX outputs in
    dist/
从故事项目根目录运行命令,或显式传递故事路径。
shell
story validate .
story reindex .
story wordcount . --write
story links .
story continuity .
story import draft.md --title "Title"
story report .
story report . --actionable
story next .
story doctor .
story migrate .
story add character "Name"
story rename character old-id "New Name"
story remove promise old-promise
story export . --out manuscript.md
story build . --format markdown
story build . --format epub
story build . --format docx
使用场景:
  • validate
    :初始化后以及任何多文件编辑完成后使用
  • reindex
    :添加/删除/重命名角色、地点、系统、故事线或章节后使用
  • wordcount --write
    :撰写或修改章节后使用
  • links
    :更改角色关系、重要地点、故事线参与者或章节引用后使用
  • continuity
    :起草或修改章节后,以及用户询问矛盾、已死亡角色出现、未兑现的铺垫或过时状态时使用;它会确定性地检查
    died-in
    顺序、承诺/问题章节顺序、契诃夫式伏笔间隔、视角/角色阵容一致性,以及
    continuity/state.md
    引用
  • import
    :当用户有现有手稿或章节草稿,并希望从中构建Story Skills项目时使用;后续从识别出的实体候选中创建角色和地点文件
  • report
    :当用户询问项目状态、清单、进度或快速健康总结时使用
  • next
    :开始起草会话前使用,以确定下一个确定性操作
  • doctor
    :当用户询问哪些内容过时、损坏或不一致时使用
  • migrate
    :当项目使用较旧的架构版本或缺少v2路径时使用
  • add
    rename
    remove
    :当符合请求的更改时,用于确定性的实体文件操作
  • export
    :仅当用户要求在特定路径生成合并手稿时使用
  • build
    :当用户要求生成书籍制品时使用;支持在
    dist/
    目录中输出markdown、EPUB和DOCX格式文件

Failure Handling

故障处理

  • Treat CLI errors as actionable maintenance findings.
  • Fix broken references, missing required files, stale registries, or incorrect word counts when the requested task implies doing so.
  • Do not overwrite creative prose or story content merely to satisfy a mechanical check.
  • If a validation warning reflects intentional user data, report it rather than silently changing it.
  • 将CLI错误视为可操作的维护发现。
  • 当请求的任务需要时,修复损坏的引用、缺失的必需文件、过时的注册表或不正确的字数统计。
  • 不要仅仅为了满足机械检查而覆盖创意性的散文或故事内容。
  • 如果验证警告反映了用户的有意数据,请报告该警告而非静默修改。