novelws 3.0.0 → 4.0.0
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/CHANGELOG.md +131 -0
- package/README.md +94 -66
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +35 -33
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +63 -6
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/core/config.d.ts +22 -15
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +28 -16
- package/dist/core/config.js.map +1 -1
- package/dist/core/errors.d.ts +16 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +26 -0
- package/dist/core/errors.js.map +1 -1
- package/dist/utils/diagnostics.d.ts +64 -0
- package/dist/utils/diagnostics.d.ts.map +1 -0
- package/dist/utils/diagnostics.js +227 -0
- package/dist/utils/diagnostics.js.map +1 -0
- package/package.json +1 -1
- package/templates/commands/analyze.md +27 -110
- package/templates/commands/character.md +32 -180
- package/templates/commands/checklist.md +27 -27
- package/templates/commands/clarify.md +2 -2
- package/templates/commands/constitution.md +8 -8
- package/templates/commands/expert.md +3 -3
- package/templates/commands/facts.md +9 -9
- package/templates/commands/guide.md +129 -19
- package/templates/commands/help-me.md +221 -0
- package/templates/commands/plan.md +27 -26
- package/templates/commands/recap.md +16 -16
- package/templates/commands/relations.md +13 -13
- package/templates/commands/revise.md +16 -15
- package/templates/commands/search.md +11 -10
- package/templates/commands/specify.md +4 -4
- package/templates/commands/tasks.md +9 -9
- package/templates/commands/timeline.md +13 -13
- package/templates/commands/track-init.md +8 -8
- package/templates/commands/track.md +177 -552
- package/templates/commands/volume-summary.md +6 -6
- package/templates/commands/write.md +148 -38
- package/templates/dot-claude/CLAUDE.md +5 -5
- package/templates/{config → resources/config}/keyword-mappings.json +19 -19
- package/templates/resources/genres/horror.md +211 -0
- package/templates/resources/genres/military.md +209 -0
- package/templates/resources/genres/sports.md +216 -0
- package/templates/resources/genres/workplace.md +214 -0
- package/templates/resources/genres/youth.md +219 -0
- package/templates/{knowledge-base/requirements/anti-ai-v4.md → resources/requirements/anti-ai-v4-deprecated.md} +13 -1
- package/templates/resources/requirements/anti-ai-v5-balanced.md +203 -0
- package/templates/{scripts → resources/scripts}/README.md +8 -8
- package/templates/{scripts → resources/scripts}/bash/analyze-story.sh +1 -1
- package/templates/resources/scripts/bash/check-analyze-stage.sh +108 -0
- package/templates/{scripts → resources/scripts}/bash/check-consistency.sh +7 -7
- package/templates/{scripts → resources/scripts}/bash/check-facts.sh +1 -1
- package/templates/{scripts → resources/scripts}/bash/check-plot.sh +2 -2
- package/templates/{scripts → resources/scripts}/bash/check-timeline.sh +3 -3
- package/templates/{scripts → resources/scripts}/bash/check-world.sh +5 -5
- package/templates/{scripts → resources/scripts}/bash/check-writing-state.sh +26 -26
- package/templates/{scripts → resources/scripts}/bash/common.sh +3 -3
- package/templates/{scripts → resources/scripts}/bash/constitution.sh +1 -1
- package/templates/{scripts → resources/scripts}/bash/init-tracking.sh +13 -13
- package/templates/{scripts → resources/scripts}/bash/manage-relations.sh +10 -10
- package/templates/resources/scripts/bash/migrate-tracking.sh +183 -0
- package/templates/{scripts → resources/scripts}/bash/plan-story.sh +2 -2
- package/templates/{scripts → resources/scripts}/bash/specify-story.sh +1 -1
- package/templates/{scripts → resources/scripts}/bash/tasks-story.sh +2 -2
- package/templates/{scripts → resources/scripts}/bash/tests/bench-preload-cache.sh +3 -3
- package/templates/{scripts → resources/scripts}/bash/tests/test-cross-platform.sh +1 -1
- package/templates/{scripts → resources/scripts}/bash/tests/test-preload-cache.sh +1 -1
- package/templates/{scripts → resources/scripts}/bash/tests/test-regex-precompile.sh +4 -4
- package/templates/{scripts → resources/scripts}/bash/text-audit.sh +3 -3
- package/templates/{scripts → resources/scripts}/bash/track-progress.sh +5 -5
- package/templates/{scripts → resources/scripts}/powershell/analyze-story.ps1 +1 -1
- package/templates/{scripts → resources/scripts}/powershell/check-consistency.ps1 +8 -8
- package/templates/{scripts → resources/scripts}/powershell/check-plot.ps1 +2 -2
- package/templates/{scripts → resources/scripts}/powershell/check-timeline.ps1 +2 -2
- package/templates/{scripts → resources/scripts}/powershell/check-writing-state.ps1 +31 -31
- package/templates/{scripts → resources/scripts}/powershell/common.ps1 +2 -2
- package/templates/{scripts → resources/scripts}/powershell/constitution.ps1 +1 -1
- package/templates/{scripts → resources/scripts}/powershell/init-tracking.ps1 +5 -5
- package/templates/{scripts → resources/scripts}/powershell/manage-relations.ps1 +6 -6
- package/templates/{scripts → resources/scripts}/powershell/migrate-tracking.ps1 +1 -1
- package/templates/{scripts → resources/scripts}/powershell/plan-story.ps1 +2 -2
- package/templates/{scripts → resources/scripts}/powershell/specify-story.ps1 +1 -1
- package/templates/{scripts → resources/scripts}/powershell/tests/bench-ps-cache.ps1 +10 -10
- package/templates/{scripts → resources/scripts}/powershell/tests/test-ps-cache.ps1 +4 -4
- package/templates/{scripts → resources/scripts}/powershell/text-audit.ps1 +2 -2
- package/templates/{scripts → resources/scripts}/powershell/track-progress.ps1 +2 -2
- package/templates/skills/analysis/character-analysis/SKILL.md +1 -1
- package/templates/skills/analysis/foreshadow-analysis/SKILL.md +1 -1
- package/templates/skills/analysis/hook-analysis/SKILL.md +2 -2
- package/templates/skills/analysis/logic-analysis/SKILL.md +2 -2
- package/templates/skills/analysis/opening-analysis/SKILL.md +1 -1
- package/templates/skills/analysis/pacing-analysis/SKILL.md +1 -1
- package/templates/skills/analysis/power-analysis/SKILL.md +3 -3
- package/templates/skills/analysis/reader-analysis/SKILL.md +1 -1
- package/templates/skills/analysis/style-analysis/SKILL.md +1 -1
- package/templates/skills/analysis/voice-analysis/SKILL.md +1 -1
- package/templates/skills/auto-tracking/SKILL.md +1 -1
- package/templates/skills/quality-assurance/consistency-checker/SKILL.md +1 -1
- package/templates/skills/quality-assurance/facts-checker/SKILL.md +2 -2
- package/templates/skills/quality-assurance/hook-checker/SKILL.md +2 -2
- package/templates/skills/quality-assurance/long-series-continuity/SKILL.md +7 -7
- package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +22 -22
- package/templates/skills/quality-assurance/setting-detector/SKILL.md +15 -15
- package/templates/skills/quality-assurance/voice-consistency-checker/SKILL.md +1 -1
- package/templates/skills/writing-techniques/character-arc/SKILL.md +1 -1
- package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +1 -1
- package/templates/skills/writing-techniques/reader-expectation/SKILL.md +1 -1
- package/templates/skills/writing-techniques/revision-polish/SKILL.md +1 -1
- package/templates/skills/writing-techniques/style-learning/SKILL.md +2 -2
- package/templates/skills/writing-techniques/writing-balance/.gitkeep +0 -0
- package/templates/skills/writing-techniques/writing-balance/SKILL.md +460 -0
- package/templates/skills/writing-techniques/writing-techniques/SKILL.md +727 -0
- package/templates/knowledge-base/README.md +0 -285
- package/templates/scripts/powershell/check-writing-state.ps1.backup +0 -135
- /package/templates/{knowledge-base → resources}/character-archetypes/01-hero.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/02-mentor.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/03-shadow.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/04-ally.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/05-shapeshifter.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/06-trickster.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/07-threshold-guardian.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/08-herald.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/09-father.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/10-mother.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/11-child.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/12-sage.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/README.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/application-guide.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/archetype-combinations.md +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/config.yaml +0 -0
- /package/templates/{knowledge-base → resources}/character-archetypes/examples-analysis.md +0 -0
- /package/templates/{specification-example.md → resources/config/specification-example.md} +0 -0
- /package/templates/{knowledge-base → resources}/craft/character-arc.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/dialogue.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/hook-design.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/pacing.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/power-system.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/scene-structure.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/show-not-tell.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/story-structures.md +0 -0
- /package/templates/{knowledge-base → resources}/craft/tension-management.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/01-first-meeting.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/02-bonding-moment.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/03-declaration.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/04-triumph.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/05-reunion.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/06-forgiveness.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/07-betrayal.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/08-loss.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/09-rejection.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/10-failure.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/11-misunderstanding.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/12-farewell.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/13-revelation.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/14-point-of-no-return.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/15-dark-night.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/16-sacrifice.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/17-awakening.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/18-confrontation.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/19-bittersweet-goodbye.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/20-moral-dilemma.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/21-temptation.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/22-redemption.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/README.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/beat-sequences.md +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/config.yaml +0 -0
- /package/templates/{knowledge-base → resources}/emotional-beats/pacing-guide.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/game-lit.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/historical.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/mystery.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/rebirth.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/revenge.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/romance.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/sci-fi.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/thriller.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/urban.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/wuxia.md +0 -0
- /package/templates/{knowledge-base → resources}/genres/xuanhuan.md +0 -0
- /package/templates/{memory → resources/memory}/constitution.md +0 -0
- /package/templates/{memory → resources/memory}/personal-voice.md +0 -0
- /package/templates/{knowledge-base → resources}/references/README.md +0 -0
- /package/templates/{knowledge-base → resources}/references/china-1920s/culture.md +0 -0
- /package/templates/{knowledge-base → resources}/references/china-1920s/daily-life.md +0 -0
- /package/templates/{knowledge-base → resources}/references/china-1920s/overview.md +0 -0
- /package/templates/{knowledge-base → resources}/references/china-1920s/society.md +0 -0
- /package/templates/{knowledge-base → resources}/references/china-1920s/warlords.md +0 -0
- /package/templates/{knowledge-base → resources}/references/cultivation-world/daily-life.md +0 -0
- /package/templates/{knowledge-base → resources}/references/cultivation-world/overview.md +0 -0
- /package/templates/{knowledge-base → resources}/references/cultivation-world/power-system.md +0 -0
- /package/templates/{knowledge-base → resources}/references/cultivation-world/sects.md +0 -0
- /package/templates/{knowledge-base → resources}/references/cultivation-world/world-setting.md +0 -0
- /package/templates/{knowledge-base → resources}/references/modern-workplace/corporate.md +0 -0
- /package/templates/{knowledge-base → resources}/references/modern-workplace/daily-life.md +0 -0
- /package/templates/{knowledge-base → resources}/references/modern-workplace/overview.md +0 -0
- /package/templates/{knowledge-base → resources}/references/modern-workplace/relationships.md +0 -0
- /package/templates/{knowledge-base → resources}/references/modern-workplace/tech-industry.md +0 -0
- /package/templates/{knowledge-base → resources}/references/tang-dynasty/culture.md +0 -0
- /package/templates/{knowledge-base → resources}/references/tang-dynasty/daily-life.md +0 -0
- /package/templates/{knowledge-base → resources}/references/tang-dynasty/overview.md +0 -0
- /package/templates/{knowledge-base → resources}/references/tang-dynasty/politics.md +0 -0
- /package/templates/{knowledge-base → resources}/references/tang-dynasty/society.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/README.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/anti-ai-v3.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/concretization.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/fast-paced.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/no-poison.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/romance-angst.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/romance-sweet.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/serious-literature.md +0 -0
- /package/templates/{knowledge-base → resources}/requirements/strong-emotion.md +0 -0
- /package/templates/{scripts → resources/scripts}/bash/clarify-story.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/generate-tasks.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/test-word-count.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/tests/run-all-benchmarks.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/tests/test-cache-semantics.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/tests/test-edge-cases-bash.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/tests/test-phase1-bash.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/tests/test-regression-bash.sh +0 -0
- /package/templates/{scripts → resources/scripts}/bash/tests/test-task6-verification.sh +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/check-analyze-stage.ps1 +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/check-facts.ps1 +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/clarify-story.ps1 +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/generate-tasks.ps1 +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/tests/test-cross-platform.ps1 +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/tests/test-edge-cases-ps.ps1 +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/tests/test-phase1-ps.ps1 +0 -0
- /package/templates/{scripts → resources/scripts}/powershell/tests/test-regression-ps.ps1 +0 -0
- /package/templates/{knowledge-base → resources}/styles/README.md +0 -0
- /package/templates/{knowledge-base → resources}/styles/ancient-style.md +0 -0
- /package/templates/{knowledge-base → resources}/styles/literary.md +0 -0
- /package/templates/{knowledge-base → resources}/styles/minimal.md +0 -0
- /package/templates/{knowledge-base → resources}/styles/natural-voice.md +0 -0
- /package/templates/{knowledge-base → resources}/styles/web-novel.md +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
name: relations
|
|
3
3
|
description: 管理和追踪角色关系变化
|
|
4
4
|
argument-hint: [update | show | history | check] [角色] [关系] [目标角色] [--volume vol-XX | --character-focus 角色名]
|
|
5
|
-
allowed-tools: Read(//
|
|
5
|
+
allowed-tools: Read(//tracking/relationships.json), Read(//tracking/relationships.json), Write(//tracking/relationships.json), Write(//tracking/relationships.json), Bash(find:*), Bash(*)
|
|
6
6
|
scripts:
|
|
7
|
-
sh:
|
|
8
|
-
ps:
|
|
7
|
+
sh: resources/scripts/bash/manage-relations.sh
|
|
8
|
+
ps: resources/scripts/powershell/manage-relations.ps1
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# 角色关系管理
|
|
@@ -54,8 +54,8 @@ const relationships = await mcp.call('novelws-mcp/query_relationships', {
|
|
|
54
54
|
### Layer 2: 分片 JSON(次优)
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
# 当
|
|
58
|
-
relationships_data=$(cat
|
|
57
|
+
# 当 tracking/volumes/ 存在时
|
|
58
|
+
relationships_data=$(cat tracking/volumes/vol-03/relationships.json)
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
**适用场景**:
|
|
@@ -67,7 +67,7 @@ relationships_data=$(cat spec/tracking/volumes/vol-03/relationships.json)
|
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
# 传统模式,加载完整文件
|
|
70
|
-
relationships_data=$(cat
|
|
70
|
+
relationships_data=$(cat tracking/relationships.json)
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
**向下兼容**:小型项目(< 300 章)继续使用单文件模式
|
|
@@ -120,7 +120,7 @@ relationships_data=$(cat spec/tracking/relationships.json)
|
|
|
120
120
|
|
|
121
121
|
## 数据存储
|
|
122
122
|
|
|
123
|
-
关系数据存储在 `
|
|
123
|
+
关系数据存储在 `tracking/relationships.json`:
|
|
124
124
|
```json
|
|
125
125
|
{
|
|
126
126
|
"characters": {
|
|
@@ -163,7 +163,7 @@ relationships_data=$(cat spec/tracking/relationships.json)
|
|
|
163
163
|
|
|
164
164
|
关系数据更新遵循以下协议:
|
|
165
165
|
|
|
166
|
-
### 分片模式(
|
|
166
|
+
### 分片模式(tracking/volumes/ 存在)
|
|
167
167
|
|
|
168
168
|
1. **确定目标卷**:
|
|
169
169
|
- 如果命令指定 `--volume vol-XX`,写入对应卷
|
|
@@ -177,13 +177,13 @@ relationships_data=$(cat spec/tracking/relationships.json)
|
|
|
177
177
|
2. **写入分片文件**:
|
|
178
178
|
```bash
|
|
179
179
|
# 写入指定卷的 relationships.json
|
|
180
|
-
Write(
|
|
180
|
+
Write(tracking/volumes/${target_volume}/relationships.json)
|
|
181
181
|
```
|
|
182
182
|
|
|
183
183
|
3. **更新全局摘要**(如果关系变化影响角色摘要):
|
|
184
184
|
```bash
|
|
185
185
|
# 更新 characters-summary.json 的关系统计
|
|
186
|
-
Write(
|
|
186
|
+
Write(tracking/summary/characters-summary.json)
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
4. **触发 MCP 同步**(如果启用):
|
|
@@ -198,7 +198,7 @@ relationships_data=$(cat spec/tracking/relationships.json)
|
|
|
198
198
|
|
|
199
199
|
直接写入完整 `relationships.json`:
|
|
200
200
|
```bash
|
|
201
|
-
Write(
|
|
201
|
+
Write(tracking/relationships.json)
|
|
202
202
|
```
|
|
203
203
|
|
|
204
204
|
### 写入示例
|
|
@@ -211,8 +211,8 @@ const targetVolume = `vol-${String(volumeNum).padStart(2, '0')}`;
|
|
|
211
211
|
|
|
212
212
|
// 读取目标卷的 relationships 分片
|
|
213
213
|
const relPath = isSharded
|
|
214
|
-
? `
|
|
215
|
-
: '
|
|
214
|
+
? `tracking/volumes/${targetVolume}/relationships.json`
|
|
215
|
+
: 'tracking/relationships.json';
|
|
216
216
|
|
|
217
217
|
const relationships = JSON.parse(fs.readFileSync(relPath));
|
|
218
218
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 系统性修改润色:四层修改流程(结构→节奏→一致性→文字),支持分层修改、指定范围、快速模式
|
|
3
3
|
argument-hint: [--layer=structure|pacing|consistency|polish] [--chapters=1-10] [--chapter=5] [--volume vol-XX] [--quick]
|
|
4
|
+
recommended-model: claude-sonnet-4-5-20250929 # 修改任务;重大改写可用 opus
|
|
4
5
|
allowed-tools: Bash(find:*), Bash(wc:*), Bash(grep:*), Read(//**), Write(//stories/**), Bash(*)
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -69,14 +70,14 @@ const plotData = await mcp.call('novelws-mcp/query_plot', {
|
|
|
69
70
|
#### Layer 2: 分片 JSON(次优)
|
|
70
71
|
|
|
71
72
|
```bash
|
|
72
|
-
# 当
|
|
73
|
+
# 当 tracking/volumes/ 存在时
|
|
73
74
|
if [[ -n "$VOLUME_FILTER" ]]; then
|
|
74
75
|
# 仅加载指定卷的数据
|
|
75
|
-
cat
|
|
76
|
-
cat
|
|
76
|
+
cat tracking/volumes/${VOLUME_FILTER}/character-state.json
|
|
77
|
+
cat tracking/volumes/${VOLUME_FILTER}/relationships.json
|
|
77
78
|
else
|
|
78
79
|
# 加载所有卷的数据
|
|
79
|
-
for vol in
|
|
80
|
+
for vol in tracking/volumes/vol-*/; do
|
|
80
81
|
cat "$vol/character-state.json"
|
|
81
82
|
cat "$vol/relationships.json"
|
|
82
83
|
done
|
|
@@ -92,8 +93,8 @@ fi
|
|
|
92
93
|
|
|
93
94
|
```bash
|
|
94
95
|
# 传统模式,加载完整文件
|
|
95
|
-
cat
|
|
96
|
-
cat
|
|
96
|
+
cat tracking/character-state.json
|
|
97
|
+
cat tracking/relationships.json
|
|
97
98
|
```
|
|
98
99
|
|
|
99
100
|
**向下兼容**:小型项目(< 300 章)继续使用单文件模式
|
|
@@ -109,24 +110,24 @@ cat spec/tracking/relationships.json
|
|
|
109
110
|
- 创作计划:`stories/*/creative-plan.md`
|
|
110
111
|
- **角色状态**(三层回退):
|
|
111
112
|
- Layer 3: `mcp.call('novelws-mcp/query_characters', {volume})`
|
|
112
|
-
- Layer 2: `
|
|
113
|
-
- Layer 1: `
|
|
113
|
+
- Layer 2: `tracking/volumes/${volume}/character-state.json`
|
|
114
|
+
- Layer 1: `tracking/character-state.json`
|
|
114
115
|
- **关系网络**(三层回退):
|
|
115
116
|
- Layer 3: `mcp.call('novelws-mcp/query_relationships', {volume})`
|
|
116
|
-
- Layer 2: `
|
|
117
|
-
- Layer 1: `
|
|
117
|
+
- Layer 2: `tracking/volumes/${volume}/relationships.json`
|
|
118
|
+
- Layer 1: `tracking/relationships.json`
|
|
118
119
|
|
|
119
120
|
**如有则加载**:
|
|
120
121
|
- `/analyze` 报告:`stories/*/analysis-report.md`
|
|
121
|
-
-
|
|
122
|
-
-
|
|
122
|
+
- 风格参考:`resources/memory/style-reference.md`
|
|
123
|
+
- 个人风格:`resources/memory/personal-voice.md`
|
|
123
124
|
- **情节追踪**(三层回退):
|
|
124
125
|
- Layer 3: `mcp.call('novelws-mcp/query_plot', {volume})`
|
|
125
|
-
- Layer 2: `
|
|
126
|
-
- Layer 1: `
|
|
126
|
+
- Layer 2: `tracking/volumes/${volume}/plot-tracker.json`
|
|
127
|
+
- Layer 1: `tracking/plot-tracker.json`
|
|
127
128
|
|
|
128
129
|
**加载 Skill**:
|
|
129
|
-
- `.
|
|
130
|
+
- `.claude/skills/writing-techniques/revision-polish/SKILL.md`(核心修改流程)
|
|
130
131
|
|
|
131
132
|
### 4. 初稿评估
|
|
132
133
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: search
|
|
3
3
|
description: 全文搜索章节内容和 tracking 数据(支持中文分词、正则表达式、范围过滤)
|
|
4
4
|
argument-hint: <关键词> [--type=content|tracking|all] [--volume vol-XX] [--fuzzy] [--regex]
|
|
5
|
+
recommended-model: claude-haiku-4-5-20251001 # 简单查询,速度优先
|
|
5
6
|
allowed-tools: Read, Grep, Bash
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -45,15 +46,15 @@ const results = await mcp.call('novelws-mcp/search_content', {
|
|
|
45
46
|
### Layer 2: 分片 Grep(次优)
|
|
46
47
|
|
|
47
48
|
```bash
|
|
48
|
-
# 当
|
|
49
|
+
# 当 tracking/volumes/ 存在时
|
|
49
50
|
if [[ -n "$VOLUME_FILTER" ]]; then
|
|
50
51
|
# 仅搜索指定卷
|
|
51
52
|
grep -rn "$QUERY" "stories/*/content/" | grep "ch-$(volume_to_range $VOLUME_FILTER)"
|
|
52
|
-
grep -rn "$QUERY" "
|
|
53
|
+
grep -rn "$QUERY" "tracking/volumes/$VOLUME_FILTER/"
|
|
53
54
|
else
|
|
54
55
|
# 搜索所有内容
|
|
55
56
|
grep -rn "$QUERY" "stories/*/content/"
|
|
56
|
-
grep -rn "$QUERY" "
|
|
57
|
+
grep -rn "$QUERY" "tracking/volumes/"
|
|
57
58
|
fi
|
|
58
59
|
```
|
|
59
60
|
|
|
@@ -67,7 +68,7 @@ fi
|
|
|
67
68
|
```bash
|
|
68
69
|
# 传统模式,搜索所有文件
|
|
69
70
|
grep -rn "$QUERY" "stories/*/content/"
|
|
70
|
-
grep -rn "$QUERY" "
|
|
71
|
+
grep -rn "$QUERY" "tracking/"
|
|
71
72
|
```
|
|
72
73
|
|
|
73
74
|
**向下兼容**:小型项目(< 300 章)使用标准 Grep
|
|
@@ -101,7 +102,7 @@ const isRegex = args.regex || false; // 正则表达式
|
|
|
101
102
|
### Step 2: 检测数据模式
|
|
102
103
|
|
|
103
104
|
```javascript
|
|
104
|
-
const isSharded = fs.existsSync('
|
|
105
|
+
const isSharded = fs.existsSync('tracking/volumes/');
|
|
105
106
|
const hasMCP = fs.existsSync('mcp-servers.json');
|
|
106
107
|
|
|
107
108
|
// 选择搜索策略
|
|
@@ -178,11 +179,11 @@ if [[ -n "$VOLUME_FILTER" ]]; then
|
|
|
178
179
|
done
|
|
179
180
|
|
|
180
181
|
# 搜索 tracking 数据
|
|
181
|
-
grep -rn "$QUERY" "
|
|
182
|
+
grep -rn "$QUERY" "tracking/volumes/$VOLUME_FILTER/"
|
|
182
183
|
else
|
|
183
184
|
# 搜索所有内容
|
|
184
185
|
grep -rn "$QUERY" "stories/*/content/"
|
|
185
|
-
grep -rn "$QUERY" "
|
|
186
|
+
grep -rn "$QUERY" "tracking/volumes/"
|
|
186
187
|
fi
|
|
187
188
|
```
|
|
188
189
|
|
|
@@ -195,7 +196,7 @@ QUERY="$1"
|
|
|
195
196
|
grep -rn "$QUERY" "stories/*/content/"
|
|
196
197
|
|
|
197
198
|
# 搜索 tracking 数据
|
|
198
|
-
grep -rn "$QUERY" "
|
|
199
|
+
grep -rn "$QUERY" "tracking/" --exclude-dir=volumes
|
|
199
200
|
```
|
|
200
201
|
|
|
201
202
|
### Step 4: 处理搜索结果
|
|
@@ -261,7 +262,7 @@ const resultsWithContext = sortedResults.map(result => ({
|
|
|
261
262
|
|
|
262
263
|
### 角色数据
|
|
263
264
|
|
|
264
|
-
**文件**:
|
|
265
|
+
**文件**:tracking/volumes/vol-03/character-state.json
|
|
265
266
|
|
|
266
267
|
**匹配项**:
|
|
267
268
|
```json
|
|
@@ -276,7 +277,7 @@ const resultsWithContext = sortedResults.map(result => ({
|
|
|
276
277
|
|
|
277
278
|
### 情节数据
|
|
278
279
|
|
|
279
|
-
**文件**:
|
|
280
|
+
**文件**:tracking/volumes/vol-03/plot-tracker.json
|
|
280
281
|
|
|
281
282
|
**匹配项**:
|
|
282
283
|
```json
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 定义故事规格,明确要创造什么样的作品
|
|
3
3
|
argument-hint: [故事描述] [--world]
|
|
4
|
-
allowed-tools: Read(//stories/**/specification.md), Read(//stories/**/specification.md), Write(//stories/**/specification.md), Write(//stories/**/specification.md), Read(
|
|
4
|
+
allowed-tools: Read(//stories/**/specification.md), Read(//stories/**/specification.md), Write(//stories/**/specification.md), Write(//stories/**/specification.md), Read(//resources/memory/constitution.md), Read(//resources/memory/constitution.md), Bash(find:*), Bash(*)
|
|
5
5
|
scripts:
|
|
6
|
-
sh:
|
|
7
|
-
ps:
|
|
6
|
+
sh: resources/scripts/bash/specify-story.sh --json
|
|
7
|
+
ps: resources/scripts/powershell/specify-story.ps1 -Json
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
用户输入:$ARGUMENTS
|
|
@@ -99,7 +99,7 @@ else:
|
|
|
99
99
|
|
|
100
100
|
### 2. 检查宪法合规性
|
|
101
101
|
|
|
102
|
-
如果存在
|
|
102
|
+
如果存在 `resources/memory/constitution.md`:
|
|
103
103
|
- 加载宪法原则
|
|
104
104
|
- 确保规格符合宪法价值观
|
|
105
105
|
- 在规格中引用相关原则
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
description: 将创作计划分解为可执行的任务清单
|
|
3
3
|
allowed-tools: Read(//stories/**/creative-plan.md), Read(//stories/**/creative-plan.md), Read(//stories/**/specification.md), Read(//stories/**/specification.md), Write(//stories/**/tasks.md), Write(//stories/**/tasks.md), Bash(find:*), Bash(*)
|
|
4
4
|
scripts:
|
|
5
|
-
sh:
|
|
6
|
-
ps:
|
|
5
|
+
sh: resources/scripts/bash/tasks-story.sh
|
|
6
|
+
ps: resources/scripts/powershell/generate-tasks.ps1
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
基于创作计划生成具体的、可执行的任务列表。
|
|
@@ -63,16 +63,16 @@ const characters = await mcp.call('novelws-mcp/query_characters', {
|
|
|
63
63
|
### Layer 2: 分片 JSON(次优)
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
# 当
|
|
66
|
+
# 当 tracking/volumes/ 存在时
|
|
67
67
|
# 读取摘要数据
|
|
68
|
-
plot_summary=$(cat
|
|
68
|
+
plot_summary=$(cat tracking/summary/plot-summary.json)
|
|
69
69
|
|
|
70
70
|
# 提取未解决伏笔和紧急伏笔
|
|
71
71
|
unresolved_plots=$(echo "$plot_summary" | jq '.unresolved')
|
|
72
72
|
urgent_plots=$(echo "$plot_summary" | jq '.urgent')
|
|
73
73
|
|
|
74
74
|
# 读取角色摘要
|
|
75
|
-
character_summary=$(cat
|
|
75
|
+
character_summary=$(cat tracking/summary/characters-summary.json)
|
|
76
76
|
absent_characters=$(echo "$character_summary" | jq '.absent')
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -85,8 +85,8 @@ absent_characters=$(echo "$character_summary" | jq '.absent')
|
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
87
|
# 传统模式,加载完整文件并手动过滤
|
|
88
|
-
plot_tracker=$(cat
|
|
89
|
-
character_state=$(cat
|
|
88
|
+
plot_tracker=$(cat tracking/plot-tracker.json)
|
|
89
|
+
character_state=$(cat tracking/character-state.json)
|
|
90
90
|
|
|
91
91
|
# 手动计算紧急度、缺席章节等
|
|
92
92
|
```
|
|
@@ -313,8 +313,8 @@ character_state=$(cat spec/tracking/character-state.json)
|
|
|
313
313
|
4. 自动设置依赖关系(顺序依赖)
|
|
314
314
|
5. 按三层 Fallback 读取 tracking 数据生成修复/维护任务:
|
|
315
315
|
- **MCP 查询(优先)**:`query_plot --status=overdue` 获取延迟伏笔,`stats_volume` 获取进度
|
|
316
|
-
- **分片 JSON(次优)**:读取 `
|
|
317
|
-
- **单文件 JSON(兜底)**:读取 `
|
|
316
|
+
- **分片 JSON(次优)**:读取 `tracking/summary/plot-summary.json` 获取未解决伏笔
|
|
317
|
+
- **单文件 JSON(兜底)**:读取 `tracking/plot-tracker.json`
|
|
318
318
|
6. 从 `/analyze` 反馈中提取修复任务
|
|
319
319
|
7. 从 `/track --check` 中提取维护任务
|
|
320
320
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
name: timeline
|
|
3
3
|
description: 管理和验证故事时间线
|
|
4
4
|
argument-hint: [add | check | show | sync] [--volume vol-XX | --recent N]
|
|
5
|
-
allowed-tools: Read(//
|
|
5
|
+
allowed-tools: Read(//tracking/timeline.json), Read(//tracking/timeline.json), Write(//tracking/timeline.json), Write(//tracking/timeline.json), Read(//stories/**/content/**), Read(//stories/**/content/**), Bash(find:*), Bash(*)
|
|
6
6
|
scripts:
|
|
7
|
-
sh:
|
|
8
|
-
ps:
|
|
7
|
+
sh: resources/scripts/bash/check-timeline.sh
|
|
8
|
+
ps: resources/scripts/powershell/check-timeline.ps1
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# 时间线管理
|
|
@@ -53,8 +53,8 @@ const events = await mcp.call('novelws-mcp/query_timeline', {
|
|
|
53
53
|
### Layer 2: 分片 JSON(次优)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
# 当
|
|
57
|
-
timeline_data=$(cat
|
|
56
|
+
# 当 tracking/volumes/ 存在时
|
|
57
|
+
timeline_data=$(cat tracking/volumes/vol-03/timeline.json)
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
**适用场景**:
|
|
@@ -66,7 +66,7 @@ timeline_data=$(cat spec/tracking/volumes/vol-03/timeline.json)
|
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
68
|
# 传统模式,加载完整文件
|
|
69
|
-
timeline_data=$(cat
|
|
69
|
+
timeline_data=$(cat tracking/timeline.json)
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
**向下兼容**:小型项目(< 300 章)继续使用单文件模式
|
|
@@ -109,7 +109,7 @@ timeline_data=$(cat spec/tracking/timeline.json)
|
|
|
109
109
|
|
|
110
110
|
## 时间线数据
|
|
111
111
|
|
|
112
|
-
时间线信息存储在 `
|
|
112
|
+
时间线信息存储在 `tracking/timeline.json` 中:
|
|
113
113
|
- 故事内时间(年/月/日)
|
|
114
114
|
- 章节对应关系
|
|
115
115
|
- 重要事件标记
|
|
@@ -136,7 +136,7 @@ timeline_data=$(cat spec/tracking/timeline.json)
|
|
|
136
136
|
|
|
137
137
|
时间线数据更新遵循以下协议:
|
|
138
138
|
|
|
139
|
-
### 分片模式(
|
|
139
|
+
### 分片模式(tracking/volumes/ 存在)
|
|
140
140
|
|
|
141
141
|
1. **确定目标卷**:
|
|
142
142
|
- 如果命令指定 `--volume vol-XX`,写入对应卷
|
|
@@ -150,13 +150,13 @@ timeline_data=$(cat spec/tracking/timeline.json)
|
|
|
150
150
|
2. **写入分片文件**:
|
|
151
151
|
```bash
|
|
152
152
|
# 写入指定卷的 timeline.json
|
|
153
|
-
Write(
|
|
153
|
+
Write(tracking/volumes/${target_volume}/timeline.json)
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
3. **更新全局摘要**(如果事件跨度影响摘要统计):
|
|
157
157
|
```bash
|
|
158
158
|
# 更新 timeline-summary.json 的统计信息
|
|
159
|
-
Write(
|
|
159
|
+
Write(tracking/summary/timeline-summary.json)
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
4. **触发 MCP 同步**(如果启用):
|
|
@@ -171,7 +171,7 @@ timeline_data=$(cat spec/tracking/timeline.json)
|
|
|
171
171
|
|
|
172
172
|
直接写入完整 `timeline.json`:
|
|
173
173
|
```bash
|
|
174
|
-
Write(
|
|
174
|
+
Write(tracking/timeline.json)
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
### 写入示例
|
|
@@ -184,8 +184,8 @@ const targetVolume = `vol-${String(volumeNum).padStart(2, '0')}`;
|
|
|
184
184
|
|
|
185
185
|
// 读取目标卷的 timeline 分片
|
|
186
186
|
const timelinePath = isSharded
|
|
187
|
-
? `
|
|
188
|
-
: '
|
|
187
|
+
? `tracking/volumes/${targetVolume}/timeline.json`
|
|
188
|
+
: 'tracking/timeline.json';
|
|
189
189
|
|
|
190
190
|
const timeline = JSON.parse(fs.readFileSync(timelinePath));
|
|
191
191
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: track-init
|
|
3
3
|
description: 初始化追踪系统,基于故事大纲设置追踪数据
|
|
4
|
-
allowed-tools: Read(//stories/**/specification.md), Read(//stories/**/specification.md), Read(//stories/**/creative-plan.md), Read(//stories/**/creative-plan.md), Write(//
|
|
4
|
+
allowed-tools: Read(//stories/**/specification.md), Read(//stories/**/specification.md), Read(//stories/**/creative-plan.md), Read(//stories/**/creative-plan.md), Write(//tracking/**), Write(//tracking/**), Bash(find:*), Bash(grep:*), Bash(wc:*), Bash(*)
|
|
5
5
|
scripts:
|
|
6
|
-
sh:
|
|
7
|
-
ps:
|
|
6
|
+
sh: resources/scripts/bash/init-tracking.sh
|
|
7
|
+
ps: resources/scripts/powershell/init-tracking.ps1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# 初始化追踪系统
|
|
@@ -38,13 +38,13 @@ resource-loading:
|
|
|
38
38
|
1. **读取基础数据**
|
|
39
39
|
- 读取 `stories/*/specification.md` 获取故事设定
|
|
40
40
|
- 读取 `stories/*/creative-plan.md` 获取章节规划
|
|
41
|
-
- 读取
|
|
41
|
+
- 读取 `resources/config/config.json` 获取写作方法
|
|
42
42
|
|
|
43
43
|
2. **初始化追踪文件**
|
|
44
44
|
|
|
45
45
|
**重要**:优先从 `specification.md` 第五章读取线索管理规格,填充到追踪文件。
|
|
46
46
|
|
|
47
|
-
创建或更新 `
|
|
47
|
+
创建或更新 `tracking/plot-tracker.json`:
|
|
48
48
|
- 从 `specification.md 5.1节` 读取所有线索定义
|
|
49
49
|
- 从 `specification.md 5.3节` 读取所有交汇点
|
|
50
50
|
- 从 `specification.md 5.4节` 读取所有伏笔
|
|
@@ -111,15 +111,15 @@ resource-loading:
|
|
|
111
111
|
}
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
创建或更新 `
|
|
114
|
+
创建或更新 `tracking/timeline.json`:
|
|
115
115
|
- 根据章节规划设置时间节点
|
|
116
116
|
- 标记重要时间事件
|
|
117
117
|
|
|
118
|
-
创建或更新 `
|
|
118
|
+
创建或更新 `tracking/relationships.json`:
|
|
119
119
|
- 从角色设定提取初始关系
|
|
120
120
|
- 设置派系分组
|
|
121
121
|
|
|
122
|
-
创建或更新 `
|
|
122
|
+
创建或更新 `tracking/character-state.json`:
|
|
123
123
|
- 初始化角色状态
|
|
124
124
|
- 设置起始位置
|
|
125
125
|
|