zenstory-ai/oh-story-claudecode / skills/story-import
story-import
Verified逆向导入已有小说。将已写好的小说(半成品或完本)反向解析为标准项目目录结构,兼容 story-long-write / story-short-write 后续写作流程;内部复用 story-long-analyze / story-short-analyze 的拆解管道,按篇幅自动分流。触发方式:/story-import、「导入小说」「反向解析」「导入」「把我的书导进来」。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.9 KB |
| references/benchmark-sync.md | markdown | 4.0 KB |
| references/character-state-reverse.md | markdown | 4.2 KB |
| references/deep-analysis.md | markdown | 4.3 KB |
| references/import-report.md | markdown | 4.4 KB |
| references/import-special-cases.md | markdown | 2.5 KB |
| references/import-tracking.md | markdown | 6.8 KB |
| references/length-routing.md | markdown | 1.5 KB |
| references/outline-reverse-rules.md | markdown | 6.0 KB |
| references/outline-reverse.md | markdown | 2.8 KB |
| references/structure-mapping-long.md | markdown | 20.2 KB |
| references/structure-mapping-short.md | markdown | 10.2 KB |
| references/tracking-initialization.md | markdown | 1.6 KB |
| scripts/build_outline_brief.py | script | 16.2 KB |
| scripts/check-outline-contract.js | script | 28.3 KB |
| scripts/outline_view.py | script | 18.2 KB |
| scripts/tracking_commit.py | script | 89.6 KB |
| scripts/wordcount_core.pyexecutable | script | 18.9 KB |
references/character-state-reverse.md
View on GitHub# 核心角色当前快照反推规则(长篇导入)
> 长篇导入时,将核心角色截至最后完整章的状态写入初始化事务 `character_snapshots`,由 `tracking_commit.py init` 生成 `追踪/角色状态/{角色名}.md`。
## 一、输入来源
从已保存的拆文产物反推,不重读 `原文/`:
| 输入 | 用途 |
|---|---|
| `拆文库/{书名}/角色/{角色名}.md` | 身份、能力、目标、成长弧线、出场记录 |
| `拆文库/{书名}/角色/角色关系.md` | 截至最后完整章的关键关系 |
| `拆文库/{书名}/章节/第N章_摘要.md` | 从 `涉及` 锁定相关章,从 `状态变化`、`信息变化`、`局面结果` 和 `章尾钩子` 提取最后位置、最新状态、已知信息与未结事项;旧摘要缺字段时回退其关键事件与情节点 |
| `拆文库/{书名}/剧情/*.md` | 阵营/身份转折、阶段目标和长期冲突 |
| 初始化事务中的伏笔与时间线候选 | 核对角色未结事项及其可知范围 |
## 二、追踪对象
只为主角、反派、核心配角建立独立快照。临时路人和只承担一次功能的角色不建文件。边界不清时优先不建,后续角色真正进入复用状态时再由逐章事务创建。
## 三、反推方法
对每个核心角色,以最后完整导入章 N 为截面,分别确定:
1. `identity`:截至 N 章实际成立的身份/职业,不写未来晋升计划。
2. `location`:最后落点或下一章开始前可确定的位置。
3. `goal`:角色当前正在追求的具体目标。
4. `state`:身体、情绪、名望、立场中会影响续写的当前状态;只写必要信息。
5. `abilities_resources`:当前确实掌握的能力、物品、权限、作品或人脉。
6. `relationships`:与后续会复用角色的当前关系。
7. `knowledge`:角色本人已经知道、且会影响其行为的信息,不混入作者真相。
8. `open_threads`:有已写正文证据的未结事项;纯未来设计留在大纲。
同一属性或同一段关系多次变化时,归并为截至 N 章仍有效的当前值(历史弧线保存在 `设定/角色/{角色名}.md`,导入旧章不补造逐章记录,续写后的变化由 `逐章记录/第NNN章.md` 承担);仍持续生效的多项能力资源、关系、已知信息与未结事项完整保留,四个列表不设条数上限(单项 ≤600 字节)。
## 四、初始化 JSON 形状
以下示例来自 demo《让你管账号,你高燃混剪炸全网》第 10 章:
```json
{
"江晨": {
"identity": "火箭军文工团宣传兵;军宣爆款创作者",
"location": "火箭军文工团高层看片会",
"goal": "完成五天百万粉任务,继续做出真正能打的军宣内容",
"state": "专业团队重拍版反向坐实手机原版的价值,军内认可继续抬升",
"abilities_resources": [
"前世 MCN 爆款运营经验",
"《中国军魂》伴奏",
"大师级导演能力"
],
"relationships": [
"钟嘉嘉持续提供军报资源",
"周薄森和张耀祖已明确认可其创作能力"
],
"knowledge": [
"《军报》采访稿已经过审",
"高层决定继续采用《诸君,且听龙吟》手机原版"
],
"open_threads": [
"五天百万粉任务尚未结算",
"钟嘉嘉所谓只猜对一半仍未解释"
]
}
}
```
工具据此生成的文件固定包含:截至章节、身份、位置、当前目标、身心状态、能力与资源、关键关系、已知信息、未结事项。模型不得另写一套 Markdown 模板。
## 五、残稿与重复初始化
- 最后一章是残稿:所有快照截至残稿之前的最后完整章;残稿中的动作、获得物、关系变化不得提前生效。
- 已有 `_tracking-state.json` 时不能再次 `init`;快照只在初始化时写一次,不追加历史。
## 六、质量检查
- [ ] 每个文件对应一个核心角色,无功能角色堆积
- [ ] 所有字段都是截至最后完整章的当前值
- [ ] 角色已知信息没有混入作者真相
- [ ] 未结事项都有正文证据,未来设计仍在大纲
- [ ] 单角色快照目标不超过 16384 字节(超目标仅提醒,不阻断);单文件硬上限 65536 字节
- [ ] `tracking_commit.py check` 通过
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |