novelws 3.1.0 → 5.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 +115 -564
- package/README.md +81 -598
- package/dist/cli.js +1 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +18 -103
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +18 -52
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/core/config.d.ts +7 -36
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +11 -38
- package/dist/core/config.js.map +1 -1
- package/dist/core/errors.d.ts +0 -31
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +0 -58
- package/dist/core/errors.js.map +1 -1
- package/dist/utils/diagnostics.d.ts +2 -16
- package/dist/utils/diagnostics.d.ts.map +1 -1
- package/dist/utils/diagnostics.js +7 -73
- package/dist/utils/diagnostics.js.map +1 -1
- package/dist/utils/project.d.ts +1 -1
- package/dist/utils/project.d.ts.map +1 -1
- package/dist/utils/project.js +3 -3
- package/dist/utils/project.js.map +1 -1
- package/package.json +1 -2
- package/templates/commands/analyze.md +65 -265
- package/templates/commands/expand.md +70 -0
- package/templates/commands/plan.md +47 -452
- package/templates/commands/specify.md +43 -869
- package/templates/commands/write.md +49 -556
- package/templates/dot-claude/CLAUDE.md +38 -202
- package/templates/resources/anti-ai.md +16 -0
- package/templates/resources/style-reference.md +19 -0
- package/templates/tracking/character-state.json +1 -76
- package/templates/tracking/plot-tracker.json +3 -60
- package/templates/tracking/relationships.json +1 -68
- package/templates/tracking/timeline.json +1 -47
- package/dist/commands/plugin.d.ts +0 -6
- package/dist/commands/plugin.d.ts.map +0 -1
- package/dist/commands/plugin.js +0 -135
- package/dist/commands/plugin.js.map +0 -1
- package/dist/plugins/identifier.d.ts +0 -13
- package/dist/plugins/identifier.d.ts.map +0 -1
- package/dist/plugins/identifier.js +0 -72
- package/dist/plugins/identifier.js.map +0 -1
- package/dist/plugins/installers/base.d.ts +0 -27
- package/dist/plugins/installers/base.d.ts.map +0 -1
- package/dist/plugins/installers/base.js +0 -30
- package/dist/plugins/installers/base.js.map +0 -1
- package/dist/plugins/installers/github.d.ts +0 -22
- package/dist/plugins/installers/github.d.ts.map +0 -1
- package/dist/plugins/installers/github.js +0 -133
- package/dist/plugins/installers/github.js.map +0 -1
- package/dist/plugins/installers/local.d.ts +0 -16
- package/dist/plugins/installers/local.d.ts.map +0 -1
- package/dist/plugins/installers/local.js +0 -69
- package/dist/plugins/installers/local.js.map +0 -1
- package/dist/plugins/installers/npm.d.ts +0 -20
- package/dist/plugins/installers/npm.d.ts.map +0 -1
- package/dist/plugins/installers/npm.js +0 -99
- package/dist/plugins/installers/npm.js.map +0 -1
- package/dist/plugins/manager.d.ts +0 -77
- package/dist/plugins/manager.d.ts.map +0 -1
- package/dist/plugins/manager.js +0 -349
- package/dist/plugins/manager.js.map +0 -1
- package/dist/plugins/registry.d.ts +0 -48
- package/dist/plugins/registry.d.ts.map +0 -1
- package/dist/plugins/registry.js +0 -111
- package/dist/plugins/registry.js.map +0 -1
- package/dist/plugins/types.d.ts +0 -66
- package/dist/plugins/types.d.ts.map +0 -1
- package/dist/plugins/types.js +0 -2
- package/dist/plugins/types.js.map +0 -1
- package/dist/plugins/validator.d.ts +0 -19
- package/dist/plugins/validator.d.ts.map +0 -1
- package/dist/plugins/validator.js +0 -164
- package/dist/plugins/validator.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -13
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -48
- package/dist/utils/logger.js.map +0 -1
- package/plugins/authentic-voice/README.md +0 -31
- package/plugins/authentic-voice/commands/authentic-voice.md +0 -73
- package/plugins/authentic-voice/commands/authenticity-audit.md +0 -37
- package/plugins/authentic-voice/config.yaml +0 -30
- package/plugins/authentic-voice/experts/authentic-editor.md +0 -27
- package/plugins/export/README.md +0 -319
- package/plugins/export/commands/export.md +0 -460
- package/plugins/export/commands/generate-cover.md +0 -256
- package/plugins/export/commands/metadata.md +0 -309
- package/plugins/export/config.yaml +0 -47
- package/plugins/export/experts/publishing-expert.md +0 -171
- package/plugins/export/templates/epub/chapter-template.html +0 -13
- package/plugins/export/templates/epub/cover-template.html +0 -14
- package/plugins/export/templates/epub/stylesheet.css +0 -200
- package/plugins/export/templates/pdf/ebook-style.css +0 -137
- package/plugins/export/templates/pdf/print-style.css +0 -179
- package/plugins/export/templates/platforms/jinjiang-format.md +0 -101
- package/plugins/export/templates/platforms/qidian-format.md +0 -108
- package/plugins/export/templates/platforms/tomato-format.md +0 -95
- package/plugins/translate/README.md +0 -265
- package/plugins/translate/commands/glossary.md +0 -731
- package/plugins/translate/commands/translate-preview.md +0 -543
- package/plugins/translate/commands/translate.md +0 -649
- package/plugins/translate/config.yaml +0 -43
- package/plugins/translate/experts/literary-translator.md +0 -605
- package/templates/commands/character.md +0 -287
- package/templates/commands/checklist.md +0 -744
- package/templates/commands/clarify.md +0 -269
- package/templates/commands/constitution.md +0 -269
- package/templates/commands/expert.md +0 -188
- package/templates/commands/facts.md +0 -552
- package/templates/commands/guide.md +0 -900
- package/templates/commands/help-me.md +0 -221
- package/templates/commands/recap.md +0 -748
- package/templates/commands/relations.md +0 -385
- package/templates/commands/revise.md +0 -450
- package/templates/commands/search.md +0 -531
- package/templates/commands/tasks.md +0 -396
- package/templates/commands/timeline.md +0 -309
- package/templates/commands/track-init.md +0 -149
- package/templates/commands/track.md +0 -704
- package/templates/commands/volume-summary.md +0 -471
- package/templates/config/keyword-mappings.json +0 -226
- package/templates/knowledge/audit-config.json +0 -26
- package/templates/knowledge/character-profiles.md +0 -152
- package/templates/knowledge/character-voices.md +0 -137
- package/templates/knowledge/locations.md +0 -184
- package/templates/knowledge/world-setting.md +0 -121
- package/templates/knowledge-base/README.md +0 -285
- package/templates/knowledge-base/character-archetypes/01-hero.md +0 -233
- package/templates/knowledge-base/character-archetypes/02-mentor.md +0 -177
- package/templates/knowledge-base/character-archetypes/03-shadow.md +0 -221
- package/templates/knowledge-base/character-archetypes/04-ally.md +0 -178
- package/templates/knowledge-base/character-archetypes/05-shapeshifter.md +0 -177
- package/templates/knowledge-base/character-archetypes/06-trickster.md +0 -181
- package/templates/knowledge-base/character-archetypes/07-threshold-guardian.md +0 -177
- package/templates/knowledge-base/character-archetypes/08-herald.md +0 -180
- package/templates/knowledge-base/character-archetypes/09-father.md +0 -249
- package/templates/knowledge-base/character-archetypes/10-mother.md +0 -202
- package/templates/knowledge-base/character-archetypes/11-child.md +0 -183
- package/templates/knowledge-base/character-archetypes/12-sage.md +0 -202
- package/templates/knowledge-base/character-archetypes/README.md +0 -60
- package/templates/knowledge-base/character-archetypes/application-guide.md +0 -222
- package/templates/knowledge-base/character-archetypes/archetype-combinations.md +0 -242
- package/templates/knowledge-base/character-archetypes/config.yaml +0 -28
- package/templates/knowledge-base/character-archetypes/examples-analysis.md +0 -223
- package/templates/knowledge-base/craft/character-arc.md +0 -1153
- package/templates/knowledge-base/craft/dialogue.md +0 -1170
- package/templates/knowledge-base/craft/hook-design.md +0 -345
- package/templates/knowledge-base/craft/pacing.md +0 -1200
- package/templates/knowledge-base/craft/power-system.md +0 -254
- package/templates/knowledge-base/craft/scene-structure.md +0 -1136
- package/templates/knowledge-base/craft/show-not-tell.md +0 -1012
- package/templates/knowledge-base/craft/story-structures.md +0 -134
- package/templates/knowledge-base/craft/tension-management.md +0 -168
- package/templates/knowledge-base/emotional-beats/01-first-meeting.md +0 -145
- package/templates/knowledge-base/emotional-beats/02-bonding-moment.md +0 -226
- package/templates/knowledge-base/emotional-beats/03-declaration.md +0 -284
- package/templates/knowledge-base/emotional-beats/04-triumph.md +0 -240
- package/templates/knowledge-base/emotional-beats/05-reunion.md +0 -396
- package/templates/knowledge-base/emotional-beats/06-forgiveness.md +0 -204
- package/templates/knowledge-base/emotional-beats/07-betrayal.md +0 -204
- package/templates/knowledge-base/emotional-beats/08-loss.md +0 -214
- package/templates/knowledge-base/emotional-beats/09-rejection.md +0 -254
- package/templates/knowledge-base/emotional-beats/10-failure.md +0 -244
- package/templates/knowledge-base/emotional-beats/11-misunderstanding.md +0 -205
- package/templates/knowledge-base/emotional-beats/12-farewell.md +0 -283
- package/templates/knowledge-base/emotional-beats/13-revelation.md +0 -242
- package/templates/knowledge-base/emotional-beats/14-point-of-no-return.md +0 -215
- package/templates/knowledge-base/emotional-beats/15-dark-night.md +0 -244
- package/templates/knowledge-base/emotional-beats/16-sacrifice.md +0 -246
- package/templates/knowledge-base/emotional-beats/17-awakening.md +0 -246
- package/templates/knowledge-base/emotional-beats/18-confrontation.md +0 -217
- package/templates/knowledge-base/emotional-beats/19-bittersweet-goodbye.md +0 -368
- package/templates/knowledge-base/emotional-beats/20-moral-dilemma.md +0 -248
- package/templates/knowledge-base/emotional-beats/21-temptation.md +0 -240
- package/templates/knowledge-base/emotional-beats/22-redemption.md +0 -210
- package/templates/knowledge-base/emotional-beats/README.md +0 -104
- package/templates/knowledge-base/emotional-beats/beat-sequences.md +0 -276
- package/templates/knowledge-base/emotional-beats/config.yaml +0 -30
- package/templates/knowledge-base/emotional-beats/pacing-guide.md +0 -390
- package/templates/knowledge-base/genres/game-lit.md +0 -174
- package/templates/knowledge-base/genres/historical.md +0 -1127
- package/templates/knowledge-base/genres/horror.md +0 -211
- package/templates/knowledge-base/genres/military.md +0 -209
- package/templates/knowledge-base/genres/mystery.md +0 -1123
- package/templates/knowledge-base/genres/rebirth.md +0 -177
- package/templates/knowledge-base/genres/revenge.md +0 -846
- package/templates/knowledge-base/genres/romance.md +0 -948
- package/templates/knowledge-base/genres/sci-fi.md +0 -156
- package/templates/knowledge-base/genres/sports.md +0 -216
- package/templates/knowledge-base/genres/thriller.md +0 -166
- package/templates/knowledge-base/genres/urban.md +0 -170
- package/templates/knowledge-base/genres/workplace.md +0 -214
- package/templates/knowledge-base/genres/wuxia.md +0 -143
- package/templates/knowledge-base/genres/xuanhuan.md +0 -234
- package/templates/knowledge-base/genres/youth.md +0 -219
- package/templates/knowledge-base/references/README.md +0 -96
- package/templates/knowledge-base/references/china-1920s/culture.md +0 -423
- package/templates/knowledge-base/references/china-1920s/daily-life.md +0 -616
- package/templates/knowledge-base/references/china-1920s/overview.md +0 -298
- package/templates/knowledge-base/references/china-1920s/society.md +0 -703
- package/templates/knowledge-base/references/china-1920s/warlords.md +0 -427
- package/templates/knowledge-base/references/cultivation-world/daily-life.md +0 -108
- package/templates/knowledge-base/references/cultivation-world/overview.md +0 -64
- package/templates/knowledge-base/references/cultivation-world/power-system.md +0 -108
- package/templates/knowledge-base/references/cultivation-world/sects.md +0 -104
- package/templates/knowledge-base/references/cultivation-world/world-setting.md +0 -108
- package/templates/knowledge-base/references/modern-workplace/corporate.md +0 -115
- package/templates/knowledge-base/references/modern-workplace/daily-life.md +0 -129
- package/templates/knowledge-base/references/modern-workplace/overview.md +0 -73
- package/templates/knowledge-base/references/modern-workplace/relationships.md +0 -107
- package/templates/knowledge-base/references/modern-workplace/tech-industry.md +0 -131
- package/templates/knowledge-base/references/tang-dynasty/culture.md +0 -135
- package/templates/knowledge-base/references/tang-dynasty/daily-life.md +0 -139
- package/templates/knowledge-base/references/tang-dynasty/overview.md +0 -76
- package/templates/knowledge-base/references/tang-dynasty/politics.md +0 -121
- package/templates/knowledge-base/references/tang-dynasty/society.md +0 -126
- package/templates/knowledge-base/requirements/README.md +0 -240
- package/templates/knowledge-base/requirements/anti-ai-v3.md +0 -46
- package/templates/knowledge-base/requirements/anti-ai-v4-deprecated.md +0 -442
- package/templates/knowledge-base/requirements/anti-ai-v5-balanced.md +0 -203
- package/templates/knowledge-base/requirements/concretization.md +0 -90
- package/templates/knowledge-base/requirements/fast-paced.md +0 -552
- package/templates/knowledge-base/requirements/no-poison.md +0 -60
- package/templates/knowledge-base/requirements/romance-angst.md +0 -102
- package/templates/knowledge-base/requirements/romance-sweet.md +0 -63
- package/templates/knowledge-base/requirements/serious-literature.md +0 -45
- package/templates/knowledge-base/requirements/strong-emotion.md +0 -60
- package/templates/knowledge-base/styles/README.md +0 -302
- package/templates/knowledge-base/styles/ancient-style.md +0 -579
- package/templates/knowledge-base/styles/literary.md +0 -439
- package/templates/knowledge-base/styles/minimal.md +0 -472
- package/templates/knowledge-base/styles/natural-voice.md +0 -930
- package/templates/knowledge-base/styles/web-novel.md +0 -525
- package/templates/memory/personal-voice.md +0 -113
- package/templates/scripts/README.md +0 -187
- package/templates/scripts/bash/analyze-story.sh +0 -170
- package/templates/scripts/bash/check-analyze-stage.sh +0 -108
- package/templates/scripts/bash/check-consistency.sh +0 -463
- package/templates/scripts/bash/check-facts.sh +0 -214
- package/templates/scripts/bash/check-plot.sh +0 -374
- package/templates/scripts/bash/check-timeline.sh +0 -346
- package/templates/scripts/bash/check-world.sh +0 -395
- package/templates/scripts/bash/check-writing-state.sh +0 -854
- package/templates/scripts/bash/clarify-story.sh +0 -117
- package/templates/scripts/bash/common.sh +0 -151
- package/templates/scripts/bash/constitution.sh +0 -114
- package/templates/scripts/bash/generate-tasks.sh +0 -65
- package/templates/scripts/bash/init-tracking.sh +0 -183
- package/templates/scripts/bash/manage-relations.sh +0 -174
- package/templates/scripts/bash/migrate-tracking.sh +0 -183
- package/templates/scripts/bash/plan-story.sh +0 -100
- package/templates/scripts/bash/specify-story.sh +0 -93
- package/templates/scripts/bash/tasks-story.sh +0 -96
- package/templates/scripts/bash/test-word-count.sh +0 -182
- package/templates/scripts/bash/tests/bench-preload-cache.sh +0 -100
- package/templates/scripts/bash/tests/run-all-benchmarks.sh +0 -16
- package/templates/scripts/bash/tests/test-cache-semantics.sh +0 -199
- package/templates/scripts/bash/tests/test-cross-platform.sh +0 -35
- package/templates/scripts/bash/tests/test-edge-cases-bash.sh +0 -60
- package/templates/scripts/bash/tests/test-phase1-bash.sh +0 -28
- package/templates/scripts/bash/tests/test-preload-cache.sh +0 -123
- package/templates/scripts/bash/tests/test-regex-precompile.sh +0 -89
- package/templates/scripts/bash/tests/test-regression-bash.sh +0 -42
- package/templates/scripts/bash/tests/test-task6-verification.sh +0 -200
- package/templates/scripts/bash/text-audit.sh +0 -144
- package/templates/scripts/bash/track-progress.sh +0 -194
- package/templates/scripts/powershell/analyze-story.ps1 +0 -174
- package/templates/scripts/powershell/check-analyze-stage.ps1 +0 -110
- package/templates/scripts/powershell/check-consistency.ps1 +0 -138
- package/templates/scripts/powershell/check-facts.ps1 +0 -195
- package/templates/scripts/powershell/check-plot.ps1 +0 -139
- package/templates/scripts/powershell/check-timeline.ps1 +0 -112
- package/templates/scripts/powershell/check-writing-state.ps1 +0 -486
- package/templates/scripts/powershell/clarify-story.ps1 +0 -107
- package/templates/scripts/powershell/common.ps1 +0 -36
- package/templates/scripts/powershell/constitution.ps1 +0 -145
- package/templates/scripts/powershell/generate-tasks.ps1 +0 -70
- package/templates/scripts/powershell/init-tracking.ps1 +0 -98
- package/templates/scripts/powershell/manage-relations.ps1 +0 -134
- package/templates/scripts/powershell/migrate-tracking.ps1 +0 -145
- package/templates/scripts/powershell/plan-story.ps1 +0 -99
- package/templates/scripts/powershell/specify-story.ps1 +0 -85
- package/templates/scripts/powershell/tests/bench-ps-cache.ps1 +0 -80
- package/templates/scripts/powershell/tests/test-cross-platform.ps1 +0 -27
- package/templates/scripts/powershell/tests/test-edge-cases-ps.ps1 +0 -29
- package/templates/scripts/powershell/tests/test-phase1-ps.ps1 +0 -28
- package/templates/scripts/powershell/tests/test-ps-cache.ps1 +0 -73
- package/templates/scripts/powershell/tests/test-regression-ps.ps1 +0 -40
- package/templates/scripts/powershell/text-audit.ps1 +0 -102
- package/templates/scripts/powershell/track-progress.ps1 +0 -105
- package/templates/skills/analysis/character-analysis/SKILL.md +0 -71
- package/templates/skills/analysis/foreshadow-analysis/SKILL.md +0 -45
- package/templates/skills/analysis/hook-analysis/SKILL.md +0 -111
- package/templates/skills/analysis/logic-analysis/SKILL.md +0 -58
- package/templates/skills/analysis/opening-analysis/SKILL.md +0 -59
- package/templates/skills/analysis/pacing-analysis/SKILL.md +0 -55
- package/templates/skills/analysis/power-analysis/SKILL.md +0 -148
- package/templates/skills/analysis/reader-analysis/SKILL.md +0 -117
- package/templates/skills/analysis/style-analysis/SKILL.md +0 -60
- package/templates/skills/analysis/voice-analysis/SKILL.md +0 -42
- package/templates/skills/auto-tracking/SKILL.md +0 -280
- package/templates/skills/genre-knowledge/fantasy/SKILL.md +0 -355
- package/templates/skills/genre-knowledge/mystery/SKILL.md +0 -337
- package/templates/skills/genre-knowledge/romance/SKILL.md +0 -228
- package/templates/skills/genre-knowledge/sci-fi/SKILL.md +0 -65
- package/templates/skills/genre-knowledge/thriller/SKILL.md +0 -95
- package/templates/skills/planning/volume-detail/SKILL.md +0 -219
- package/templates/skills/quality-assurance/consistency-checker/SKILL.md +0 -412
- package/templates/skills/quality-assurance/continuity-tracker/SKILL.md +0 -157
- package/templates/skills/quality-assurance/facts-checker/SKILL.md +0 -405
- package/templates/skills/quality-assurance/forgotten-elements/SKILL.md +0 -147
- package/templates/skills/quality-assurance/getting-started/SKILL.md +0 -224
- package/templates/skills/quality-assurance/hook-checker/SKILL.md +0 -164
- package/templates/skills/quality-assurance/hook-checker/experts/hook-analyst.md +0 -33
- package/templates/skills/quality-assurance/long-series-continuity/SKILL.md +0 -570
- package/templates/skills/quality-assurance/pacing-monitor/SKILL.md +0 -143
- package/templates/skills/quality-assurance/pov-validator/SKILL.md +0 -135
- package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +0 -583
- package/templates/skills/quality-assurance/requirement-detector/CONFLICT_RESOLUTION.md +0 -119
- package/templates/skills/quality-assurance/requirement-detector/EXAMPLES.md +0 -146
- package/templates/skills/quality-assurance/requirement-detector/KEYWORDS.md +0 -160
- package/templates/skills/quality-assurance/requirement-detector/SKILL.md +0 -149
- package/templates/skills/quality-assurance/setting-detector/SKILL.md +0 -611
- package/templates/skills/quality-assurance/style-detector/CONFLICT_RESOLUTION.md +0 -126
- package/templates/skills/quality-assurance/style-detector/EXAMPLES.md +0 -206
- package/templates/skills/quality-assurance/style-detector/KEYWORDS.md +0 -207
- package/templates/skills/quality-assurance/style-detector/SKILL.md +0 -264
- package/templates/skills/quality-assurance/voice-consistency-checker/SKILL.md +0 -103
- package/templates/skills/quality-assurance/voice-consistency-checker/experts/voice-analyst.md +0 -21
- package/templates/skills/quality-assurance/workflow-guide/SKILL.md +0 -381
- package/templates/skills/writing-techniques/character-arc/SKILL.md +0 -267
- package/templates/skills/writing-techniques/dialogue-techniques/SKILL.md +0 -366
- package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +0 -708
- package/templates/skills/writing-techniques/multi-thread-narrative/experts/thread-analyst.md +0 -226
- package/templates/skills/writing-techniques/pacing-control/SKILL.md +0 -480
- package/templates/skills/writing-techniques/reader-expectation/SKILL.md +0 -1026
- package/templates/skills/writing-techniques/reader-expectation/experts/expectation-analyst.md +0 -209
- package/templates/skills/writing-techniques/revision-polish/SKILL.md +0 -496
- package/templates/skills/writing-techniques/revision-polish/experts/revision-editor.md +0 -221
- package/templates/skills/writing-techniques/scene-structure/SKILL.md +0 -361
- package/templates/skills/writing-techniques/style-learning/SKILL.md +0 -436
- package/templates/skills/writing-techniques/writing-balance/.gitkeep +0 -0
- package/templates/skills/writing-techniques/writing-balance/SKILL.md +0 -460
- package/templates/skills/writing-techniques/writing-techniques/SKILL.md +0 -727
- package/templates/specification-example.md +0 -146
- package/templates/tracking/story-facts.json +0 -5
- package/templates/tracking/summary/characters-summary.json +0 -7
- package/templates/tracking/summary/plot-summary.json +0 -13
- package/templates/tracking/summary/timeline-summary.json +0 -8
- package/templates/tracking/summary/volume-summaries.json +0 -5
- package/templates/tracking/tracking-log.md +0 -110
- package/templates/tracking/validation-rules.json +0 -128
- /package/templates/{memory → resources}/constitution.md +0 -0
|
@@ -1,586 +1,79 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: [
|
|
4
|
-
recommended-model: claude-opus-4-6
|
|
5
|
-
allowed-tools: Read(
|
|
6
|
-
scripts:
|
|
7
|
-
sh: .specify/scripts/bash/check-writing-state.sh
|
|
8
|
-
ps: .specify/scripts/powershell/check-writing-state.ps1
|
|
2
|
+
description: 逐章生成剧情概要(200-500字),同步更新 tracking
|
|
3
|
+
argument-hint: [章节号] [--batch N]
|
|
4
|
+
recommended-model: claude-opus-4-6
|
|
5
|
+
allowed-tools: Read(//stories/**), Write(//stories/**/content/**), Read(//tracking/**), Write(//tracking/**), Bash(ls:*)
|
|
9
6
|
---
|
|
10
7
|
|
|
11
|
-
|
|
8
|
+
用户输入:$ARGUMENTS
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## 自动激活的Skills
|
|
16
|
-
|
|
17
|
-
本命令自动激活以下Skills:
|
|
18
|
-
|
|
19
|
-
1. **writing-balance** - 智能写作平衡监控
|
|
20
|
-
- 文件: @templates/skills/writing-techniques/writing-balance/SKILL.md
|
|
21
|
-
- 功能: 写作完成后自动评估6个维度平衡度
|
|
22
|
-
- 输出: 平衡度评估报告 + 改进建议
|
|
23
|
-
|
|
24
|
-
2. **writing-techniques** - 写作技巧教学
|
|
25
|
-
- 文件: @templates/skills/writing-techniques/writing-techniques/SKILL.md
|
|
26
|
-
- 功能: 应用8个模块的写作技巧
|
|
27
|
-
- 效果: 提升文字自然度、层次感、节奏变化
|
|
28
|
-
|
|
29
|
-
**说明**:
|
|
30
|
-
- 这两个Skills协同工作,替代了旧的 anti-ai-v4 禁止列表
|
|
31
|
-
- 用户无需手动激活,AI会自动应用
|
|
32
|
-
- 如需自定义配置,可在 specification.md 中添加 `writing_balance_config`
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## 写作前准备(推荐)
|
|
37
|
-
|
|
38
|
-
如果距离上次写作已超过 1 天,或已写超过 30 章:
|
|
39
|
-
- 执行 `/recap` 重建上下文
|
|
40
|
-
- 快速扫描简报中的关键信息和警告
|
|
41
|
-
|
|
42
|
-
**快速模式**:使用 `/recap --brief` 获取快速参考卡片。
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## 前置检查
|
|
47
|
-
|
|
48
|
-
1. **运行脚本** `{SCRIPT}` 检查创作状态
|
|
49
|
-
2. **解析资源加载报告**
|
|
50
|
-
|
|
51
|
-
运行脚本并获取 JSON 格式的资源加载报告:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# Bash 环境
|
|
55
|
-
bash {SCRIPT} --json
|
|
56
|
-
|
|
57
|
-
# PowerShell 环境
|
|
58
|
-
powershell -File {SCRIPT} -Json
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**报告格式**(JSON):
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"status": "ready",
|
|
65
|
-
"resources": {
|
|
66
|
-
"knowledge-base": ["craft/dialogue.md", "craft/pacing.md"],
|
|
67
|
-
"skills": ["writing-techniques/dialogue-techniques"],
|
|
68
|
-
"disabled": []
|
|
69
|
-
},
|
|
70
|
-
"warnings": []
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
**处理逻辑**:
|
|
75
|
-
1. `status` 不是 "ready" → 终止执行
|
|
76
|
-
2. `warnings` 非空 → 显示警告但继续
|
|
77
|
-
3. 按顺序加载 `resources.knowledge-base` 和 `resources.skills`
|
|
78
|
-
4. 跳过 `resources.disabled` 中的资源
|
|
79
|
-
|
|
80
|
-
### 查询协议(必读顺序 + 三层资源加载)
|
|
81
|
-
|
|
82
|
-
⚠️ **严格按以下顺序查询文档**:
|
|
83
|
-
|
|
84
|
-
1. **先查(最高优先级)**:
|
|
85
|
-
- `memory/constitution.md`(创作宪法)
|
|
86
|
-
- `memory/personal-voice.md`(个人风格指南 - 如有)
|
|
87
|
-
- `memory/style-reference.md`(风格参考 - 如有)
|
|
88
|
-
|
|
89
|
-
2. **再查(规格和计划)**:
|
|
90
|
-
- `stories/*/specification.md`(故事规格)
|
|
91
|
-
- `stories/*/creative-plan.md`(创作计划)
|
|
92
|
-
- `stories/*/tasks.md`(当前任务)
|
|
93
|
-
|
|
94
|
-
2.1. **风格学习前置检查**:
|
|
95
|
-
- 如果 `memory/personal-voice.md` 不存在且已写 ≥ 3 章,提示用户执行 `/style-learning`
|
|
96
|
-
|
|
97
|
-
2.5. **自动加载写作风格和规范(基于配置)**:
|
|
98
|
-
- 读取 `specification.md` 的 YAML frontmatter
|
|
99
|
-
- 如配置了 `writing-style`,加载 `.specify/templates/knowledge-base/styles/[name].md`
|
|
100
|
-
- 如配置了 `writing-requirements`,加载对应规范文档
|
|
101
|
-
|
|
102
|
-
2.6. **第三层智能资源加载(三层机制)**
|
|
103
|
-
|
|
104
|
-
**优先级顺序**: Layer 2 配置覆盖 > Layer 1 默认推断 > Layer 3 关键词触发
|
|
105
|
-
|
|
106
|
-
#### Layer 1: 默认智能推断
|
|
107
|
-
|
|
108
|
-
如果 specification.md 未配置 `resource-loading`,自动加载:
|
|
109
|
-
|
|
110
|
-
**Knowledge-base (craft)**:
|
|
111
|
-
- `templates/knowledge-base/craft/dialogue.md`
|
|
112
|
-
- `templates/knowledge-base/craft/scene-structure.md`
|
|
113
|
-
- `templates/knowledge-base/craft/character-arc.md`
|
|
114
|
-
- `templates/knowledge-base/craft/pacing.md`
|
|
115
|
-
- `templates/knowledge-base/craft/show-not-tell.md`
|
|
116
|
-
|
|
117
|
-
**Skills (writing-techniques)**:
|
|
118
|
-
- `templates/skills/writing-techniques/dialogue-techniques/SKILL.md`
|
|
119
|
-
- `templates/skills/writing-techniques/scene-structure/SKILL.md`
|
|
120
|
-
- `templates/skills/writing-techniques/character-arc/SKILL.md`
|
|
121
|
-
- `templates/skills/writing-techniques/pacing-control/SKILL.md`
|
|
122
|
-
|
|
123
|
-
#### Layer 2: 配置覆盖
|
|
124
|
-
|
|
125
|
-
如果 specification.md 配置了 `resource-loading`,使用配置覆盖默认推断:
|
|
126
|
-
|
|
127
|
-
```yaml
|
|
128
|
-
---
|
|
129
|
-
resource-loading:
|
|
130
|
-
auto-load: true
|
|
131
|
-
knowledge-base:
|
|
132
|
-
craft:
|
|
133
|
-
- dialogue
|
|
134
|
-
- pacing
|
|
135
|
-
- "!character-arc" # ! 前缀排除
|
|
136
|
-
skills:
|
|
137
|
-
writing-techniques:
|
|
138
|
-
- dialogue-techniques
|
|
139
|
-
keyword-triggers:
|
|
140
|
-
enabled: true
|
|
141
|
-
custom-mappings:
|
|
142
|
-
"情感节奏": "knowledge-base/craft/pacing.md"
|
|
143
|
-
---
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
#### Layer 3: 运行时关键词触发(动态加载)
|
|
10
|
+
## 目标
|
|
147
11
|
|
|
148
|
-
|
|
12
|
+
为指定章节生成 200-500 字的纯剧情概要,同步生成 tracking 骨架数据。
|
|
149
13
|
|
|
150
|
-
|
|
14
|
+
## 参数解析
|
|
151
15
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
2. 读取 `templates/config/keyword-mappings.json` 映射表
|
|
155
|
-
3. 合并 specification.md 中的自定义映射
|
|
156
|
-
4. 执行关键词匹配,跳过已加载资源
|
|
157
|
-
5. 如有匹配,提示用户确认加载:
|
|
16
|
+
- 章节号:从 $ARGUMENTS 提取,如 `1`、`42`
|
|
17
|
+
- `--batch N`:批量生成 N 章概要(最大 20),从指定章节号开始
|
|
158
18
|
|
|
159
|
-
|
|
160
|
-
🔍 **关键词触发检测**
|
|
19
|
+
## 资源加载(极简)
|
|
161
20
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
21
|
+
1. **specification.md 摘要**:读取 `stories/<story>/specification.md`,提取100字核心摘要(类型+主角+核心冲突)
|
|
22
|
+
2. **当前卷大纲**:读取 `stories/<story>/creative-plan.md`,只提取当前章节所属卷的段落
|
|
23
|
+
3. **前序概要标题列表**:扫描 `stories/<story>/content/chapter-*-synopsis.md`,只读取每个文件的第一行标题
|
|
24
|
+
4. **前一章概要全文**:读取前一章的 synopsis.md(200-500字)
|
|
166
25
|
|
|
167
|
-
|
|
168
|
-
```
|
|
26
|
+
**不加载**:resources 目录任何文件、tracking 文件(写入时直接追加)
|
|
169
27
|
|
|
170
|
-
|
|
28
|
+
## 执行步骤
|
|
171
29
|
|
|
172
|
-
|
|
30
|
+
### 1. 确定故事目录和章节号
|
|
173
31
|
|
|
174
|
-
|
|
32
|
+
从 $ARGUMENTS 和 `stories/` 目录确定当前故事和目标章节。
|
|
175
33
|
|
|
176
|
-
|
|
177
|
-
- `query_characters --status=active --limit=20` → 活跃角色
|
|
178
|
-
- `query_relationships --volume=[当前卷号]` → 当前卷关系
|
|
179
|
-
- `query_plot --status=active` → 活跃伏笔
|
|
180
|
-
- `query_facts` → 设定事实
|
|
181
|
-
- 如果指定了 `--volume vol-XX`,所有查询限定到该卷
|
|
34
|
+
### 2. 加载上下文
|
|
182
35
|
|
|
183
|
-
|
|
184
|
-
- 确定当前章节属于哪个卷(从 volume-summaries.json 的 chapters 范围判断)
|
|
185
|
-
- 读取该卷的分片文件:`spec/tracking/volumes/[currentVolume]/character-state.json` 等
|
|
186
|
-
- 读取全局摘要:`spec/tracking/summary/characters-summary.json`(活跃角色概览)
|
|
36
|
+
按上述「资源加载」规则加载最小上下文。
|
|
187
37
|
|
|
188
|
-
|
|
189
|
-
- `spec/tracking/character-state.json`(角色状态)
|
|
190
|
-
- `spec/tracking/relationships.json`(关系网络)
|
|
191
|
-
- `spec/tracking/plot-tracker.json`(情节追踪 - 如有)
|
|
192
|
-
- `spec/tracking/validation-rules.json`(验证规则 - 如有)
|
|
193
|
-
- `spec/tracking/story-facts.json`(设定事实 - 如有)
|
|
38
|
+
### 3. 生成概要
|
|
194
39
|
|
|
195
|
-
|
|
40
|
+
为当前章节生成 200-500 字纯剧情概要,包含:
|
|
196
41
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
42
|
+
- **本章标题**:简短的章节标题
|
|
43
|
+
- **核心事件**:本章发生的主要事件(1-3个)
|
|
44
|
+
- **出场角色**:本章出场的角色列表
|
|
45
|
+
- **情感走向**:本章的情感基调和变化
|
|
46
|
+
- **章末钩子**:本章结尾的悬念或引子
|
|
200
47
|
|
|
201
|
-
|
|
202
|
-
📋 本章引用的设定事实(来自 story-facts.json):
|
|
48
|
+
写入 `stories/<story>/content/chapter-XXX-synopsis.md`(XXX 为三位数补零)。
|
|
203
49
|
|
|
204
|
-
|
|
205
|
-
- finance-reserve: 灵石储备 = 5000灵石
|
|
206
|
-
- finance-runway: 储备可撑月数 = 5月
|
|
50
|
+
### 4. 更新 tracking 骨架
|
|
207
51
|
|
|
208
|
-
|
|
209
|
-
```
|
|
52
|
+
根据概要内容,更新 4 个 tracking 文件:
|
|
210
53
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
- `spec/knowledge/` 相关文件(世界观、角色档案等)
|
|
215
|
-
- `stories/*/content/`(前文内容 - 了解前情)
|
|
216
|
-
|
|
217
|
-
5. **再查(写作规范)**:
|
|
218
|
-
- `memory/personal-voice.md`(个人语料 - 如有)
|
|
219
|
-
- `spec/knowledge/natural-expression.md`(自然化表达 - 如有)
|
|
220
|
-
- **⚠️ 必须加载**:`templates/knowledge-base/requirements/anti-ai-v4.md`(禁用词与替换策略权威参考)
|
|
221
|
-
|
|
222
|
-
6. **条件查询(前三章专用)**:
|
|
223
|
-
- **如果章节编号 ≤ 3 或总字数 < 10000字**,额外查询 `spec/presets/golden-opening.md`
|
|
224
|
-
|
|
225
|
-
### ⚠️ 强制完成确认
|
|
226
|
-
|
|
227
|
-
**在开始写作前,必须列出已读取的核心文件**:
|
|
228
|
-
|
|
229
|
-
```markdown
|
|
230
|
-
📋 写作前检查清单(已完成):
|
|
231
|
-
|
|
232
|
-
✓ 1. memory/constitution.md - 创作宪法
|
|
233
|
-
✓ 2. stories/*/specification.md - 故事规格
|
|
234
|
-
✓ 3. stories/*/creative-plan.md - 创作计划
|
|
235
|
-
✓ 4. stories/*/tasks.md - 当前任务
|
|
236
|
-
✓ 5. spec/tracking/ - 角色状态、关系、情节
|
|
237
|
-
|
|
238
|
-
🆕 三层资源加载:
|
|
239
|
-
✓ Layer 1-3 加载完成
|
|
240
|
-
✓ 已加载资源清单:[列出]
|
|
241
|
-
|
|
242
|
-
📊 上下文加载状态:✅ 完成
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
⚠️ **禁止跳过此步骤**:这是防止AI在长篇创作中失焦的核心机制。
|
|
246
|
-
|
|
247
|
-
<!-- PLUGIN_HOOK: genre-knowledge-write -->
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## 🚀 快写模式(`--fast`)
|
|
252
|
-
|
|
253
|
-
**触发条件**:用户参数 `$ARGUMENTS` 包含 `--fast`
|
|
254
|
-
|
|
255
|
-
**快写模式流程**:
|
|
256
|
-
|
|
257
|
-
### Fast-1. 最小资源加载
|
|
258
|
-
|
|
259
|
-
**仅加载以下 3 项**(跳过三层资源加载):
|
|
260
|
-
1. **当前任务**:`stories/*/tasks.md` 中 `pending` 或 `in_progress` 的任务
|
|
261
|
-
2. **上一章内容**:最近完成的章节文件(最后 500 字)
|
|
262
|
-
3. **角色状态**:`spec/tracking/character-state.json`(仅当前活跃角色)
|
|
263
|
-
|
|
264
|
-
### Fast-2. 极简写作提醒
|
|
265
|
-
|
|
266
|
-
```
|
|
267
|
-
📍 快写模式
|
|
268
|
-
━━━━━━━━━━━━━━━━━━━━
|
|
269
|
-
📋 任务:[当前任务标题]
|
|
270
|
-
📖 上章结尾:[一句话概括]
|
|
271
|
-
👤 在场角色:[角色列表]
|
|
272
|
-
━━━━━━━━━━━━━━━━━━━━
|
|
273
|
-
⚡ 直接开始写作
|
|
274
|
-
💡 如需完整上下文,请使用 /write(不带 --fast)
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Fast-3. 直接进入写作
|
|
278
|
-
|
|
279
|
-
跳过详细提醒,但仍遵守段落结构规范、反 AI 规范。
|
|
280
|
-
|
|
281
|
-
### Fast-4. 完整后置处理
|
|
282
|
-
|
|
283
|
-
写作完成后仍执行完整的后置处理(与正常模式相同)。
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
> ⚠️ **以下为正常模式流程**(`--fast` 模式跳过以下内容)
|
|
288
|
-
|
|
289
|
-
## 断点续写机制
|
|
290
|
-
|
|
291
|
-
### 恢复检测
|
|
292
|
-
|
|
293
|
-
在开始写作前,检查 `spec/tracking/write-checkpoint.json`:
|
|
294
|
-
- 如存在且 `status` 为 `in_progress` 且未过期(24小时内)→ 提示恢复
|
|
295
|
-
- 用户选择「继续写作」→ 从断点恢复
|
|
296
|
-
- 用户选择「重新开始」→ 删除 checkpoint,正常流程
|
|
297
|
-
|
|
298
|
-
### 断点恢复流程
|
|
299
|
-
|
|
300
|
-
1. **跳过资源加载**:使用 checkpoint 中的 `loadedResources` 列表
|
|
301
|
-
2. **恢复上下文**:读取已写内容,验证 hash
|
|
302
|
-
3. **从断点继续**:从已写内容末尾继续创作
|
|
303
|
-
|
|
304
|
-
### 断点保存时机
|
|
305
|
-
|
|
306
|
-
- 每完成一个场景/段落组后(约 500-1000 字)
|
|
307
|
-
- 用户主动中断时
|
|
308
|
-
- 写作完成时:`status` 更新为 `completed`
|
|
309
|
-
|
|
310
|
-
### Checkpoint 数据结构
|
|
311
|
-
|
|
312
|
-
```json
|
|
313
|
-
{
|
|
314
|
-
"version": "1.0",
|
|
315
|
-
"storyDir": "[故事目录名]",
|
|
316
|
-
"chapter": { "number": "[章节编号]", "title": "[标题]", "taskId": "[任务ID]" },
|
|
317
|
-
"progress": { "status": "in_progress", "wordsWritten": 0, "targetWords": 3000 },
|
|
318
|
-
"context": { "loadedResources": [], "charactersFocused": [], "currentTask": "" },
|
|
319
|
-
"content": { "filePath": "", "contentHash": "" },
|
|
320
|
-
"timestamps": { "createdAt": "", "updatedAt": "", "expiresAt": "" }
|
|
321
|
-
}
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
---
|
|
54
|
+
**tracking/character-state.json**:
|
|
55
|
+
- 新出场角色:添加条目(role, status, location, state, lastAppearance)
|
|
56
|
+
- 已有角色:更新 status、location、state、lastAppearance
|
|
325
57
|
|
|
326
|
-
|
|
58
|
+
**tracking/relationships.json**:
|
|
59
|
+
- 新关系:添加条目(from, to, type, note, lastUpdate)
|
|
60
|
+
- 关系变化:更新 note 和 lastUpdate
|
|
327
61
|
|
|
328
|
-
|
|
62
|
+
**tracking/plot-tracker.json**:
|
|
63
|
+
- 更新 currentChapter
|
|
64
|
+
- 新情节线:添加到 plotlines(name, status, description, keyChapters)
|
|
65
|
+
- 伏笔埋设:添加到 foreshadowing(id, content, plantedAt, status=planted)
|
|
66
|
+
- 伏笔回收:更新 resolveAt 和 status=resolved
|
|
329
67
|
|
|
330
|
-
|
|
68
|
+
**tracking/timeline.json**:
|
|
69
|
+
- 添加本章事件到 events(chapter, time, event)
|
|
331
70
|
|
|
332
|
-
|
|
71
|
+
### 5. 批量模式
|
|
333
72
|
|
|
334
|
-
|
|
335
|
-
|---------|------|
|
|
336
|
-
| 章节关联 | 灵感的 `relatedChapters` 包含当前章节号 |
|
|
337
|
-
| 角色关联 | 灵感的 `relatedCharacters` 与本章出场角色重叠 |
|
|
338
|
-
| 标签关联 | 灵感的 `tags` 与本章计划关键词重叠 |
|
|
73
|
+
如果指定了 `--batch N`,重复步骤 2-4 共 N 次,每次递增章节号。每章完成后输出进度。
|
|
339
74
|
|
|
340
|
-
|
|
341
|
-
💡 相关灵感提醒
|
|
342
|
-
━━━━━━━━━━━━━━━━━━━━
|
|
343
|
-
|
|
344
|
-
与第 [N] 章相关的灵感([M] 条):
|
|
345
|
-
|
|
346
|
-
1. 💡 [灵感内容]
|
|
347
|
-
标签:#战斗 #师姐
|
|
348
|
-
状态:🆕 未使用
|
|
349
|
-
|
|
350
|
-
是否要在本章使用这些灵感?
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
### 1. 选择写作任务
|
|
356
|
-
从 `tasks.md` 中选择状态为 `pending` 的写作任务,标记为 `in_progress`。
|
|
357
|
-
|
|
358
|
-
### 2. 验证前置条件
|
|
359
|
-
- 检查相关依赖任务是否完成
|
|
360
|
-
- 验证必要的设定是否就绪
|
|
361
|
-
- 确认前序章节是否完成
|
|
362
|
-
|
|
363
|
-
### 3. 写作前提醒
|
|
364
|
-
|
|
365
|
-
**基于宪法原则提醒**:核心价值观、质量标准、风格一致性
|
|
366
|
-
|
|
367
|
-
**基于规格要求提醒**:P0 必须包含的元素、目标读者特征、内容红线
|
|
368
|
-
|
|
369
|
-
**分段格式规范(重要)**:
|
|
370
|
-
- ⛔ **禁止使用**:"一"、"二"、"三"等数字标记分段
|
|
371
|
-
- ✅ **使用方式**:场景转换时用两个空行(一个空白行)分隔
|
|
372
|
-
|
|
373
|
-
**反AI检测写作规范**:
|
|
374
|
-
|
|
375
|
-
⚠️ 核心原则(详见 CLAUDE.md 和 anti-ai-v4.md):
|
|
376
|
-
- 单句成段 30%-50%,每段 50-100 字
|
|
377
|
-
- 短句优先(15-25 字),白话优先
|
|
378
|
-
- 一个准确细节胜过三个堆砌
|
|
379
|
-
|
|
380
|
-
**📋 禁用词与替换策略**:
|
|
381
|
-
|
|
382
|
-
> **引用外部规范**:完整的禁用词黑名单(200+ 词)和替换策略表,请参阅:
|
|
383
|
-
> `templates/knowledge-base/requirements/anti-ai-v4.md`
|
|
384
|
-
>
|
|
385
|
-
> ⚠️ **写作时必须加载此文件**,作为禁用词和替换的权威参考。
|
|
386
|
-
|
|
387
|
-
### 4. 实时辅助模式(可选)
|
|
388
|
-
|
|
389
|
-
如果用户在写作过程中遇到困难(如"帮我想一下主角该怎么办"),可主动提供 2-3 个行动选项。
|
|
390
|
-
|
|
391
|
-
⚠️ 不要主动提供选项,除非用户明确请求帮助。
|
|
392
|
-
|
|
393
|
-
### 5. 根据计划创作内容:
|
|
394
|
-
- **开场**:吸引读者,承接前文
|
|
395
|
-
- **发展**:推进情节,深化人物
|
|
396
|
-
- **转折**:制造冲突或悬念
|
|
397
|
-
- **收尾**:适当收束,引出下文
|
|
398
|
-
|
|
399
|
-
### 6. 质量自检
|
|
400
|
-
|
|
401
|
-
**宪法合规检查**:是否符合核心价值观、质量标准、风格一致
|
|
402
|
-
|
|
403
|
-
**规格符合检查**:是否包含必要元素、符合目标定位、遵守约束条件
|
|
404
|
-
|
|
405
|
-
**格式规范检查**:确认未使用数字标记分段,场景转换使用空行分隔
|
|
406
|
-
|
|
407
|
-
**设定事实校验**(如 story-facts.json 存在且非空):
|
|
408
|
-
- 如果本章声明了 `<!-- story-facts: ... -->` 注释,调用 facts-checker skill
|
|
409
|
-
- 检查声明的事实值是否与 story-facts.json 一致
|
|
410
|
-
- 验证涉及本章 facts 的算术规则
|
|
411
|
-
- 如发现不一致,输出警告(不阻断写作流程)
|
|
412
|
-
- **快写模式(--fast)**: 仍执行校验,但简化报告
|
|
413
|
-
|
|
414
|
-
### 📊 具象化检查(去AI味关键)⭐
|
|
415
|
-
|
|
416
|
-
写完一段后,主动识别并替换抽象表达。
|
|
417
|
-
|
|
418
|
-
> **完整清单和示例**:首次写作时读取 `templates/knowledge-base/requirements/concretization.md`
|
|
419
|
-
>
|
|
420
|
-
> 核心要点:
|
|
421
|
-
> - 时间具体化(避免"最近"、"很久")
|
|
422
|
-
> - 人物具体化(避免"有人"、"大家")
|
|
423
|
-
> - 数量精确化(避免"很多"、"不少")
|
|
424
|
-
> - 场景可视化(避免"很xx"的形容)
|
|
425
|
-
> - 关键情节必须具象,次要信息可以概括
|
|
426
|
-
|
|
427
|
-
### 7. 保存和更新
|
|
428
|
-
- 将章节内容保存到 `stories/*/content/`
|
|
429
|
-
- 更新任务状态为 `completed`
|
|
430
|
-
- 记录完成时间和字数
|
|
431
|
-
|
|
432
|
-
---
|
|
433
|
-
|
|
434
|
-
## 完成后行动
|
|
435
|
-
|
|
436
|
-
### 8. 验证字数和更新进度
|
|
437
|
-
|
|
438
|
-
**字数统计**:使用项目提供的脚本验证:
|
|
439
|
-
```bash
|
|
440
|
-
source .specify/scripts/bash/common.sh
|
|
441
|
-
count_chinese_words "stories/*/content/第X章.md"
|
|
442
|
-
```
|
|
443
|
-
⚠️ 不要使用 `wc -w` 统计中文字数。
|
|
444
|
-
|
|
445
|
-
**完成报告**:
|
|
446
|
-
```
|
|
447
|
-
✅ 章节写作完成
|
|
448
|
-
- 已保存:stories/*/content/第X章.md
|
|
449
|
-
- 实际字数:[X]字
|
|
450
|
-
- 字数要求:2000-4000字
|
|
451
|
-
- 字数状态:✅ 符合要求 / ⚠️ 字数不足
|
|
452
|
-
- 任务状态:已更新
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
### 9. 建议下一步
|
|
456
|
-
- 继续下一个写作任务
|
|
457
|
-
- 每5章运行 `/analyze` 进行质量检查
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
## 🆕 后置处理:自动 Tracking 更新
|
|
462
|
-
|
|
463
|
-
**执行时机**: 章节写作完成后
|
|
464
|
-
|
|
465
|
-
**更新策略**: 核心命令(/write)自动更新,无需用户确认
|
|
466
|
-
|
|
467
|
-
### 执行步骤
|
|
468
|
-
|
|
469
|
-
1. **分析本章内容**:提取角色、关系变化、情节推进、时间线信息
|
|
470
|
-
2. **读取现有 tracking 文件**(按三层 Fallback 加载)
|
|
471
|
-
3. **合并更新**:将新内容增量合并到现有数据
|
|
472
|
-
4. **写入 tracking 数据**:
|
|
473
|
-
- **分片模式**:确定当前章节所属卷,更新该卷的分片文件,同步更新全局摘要
|
|
474
|
-
- **单文件模式**:直接更新 `spec/tracking/` 下的文件
|
|
475
|
-
5. **MCP 同步**(如果可用):
|
|
476
|
-
- `log_writing_session` — 记录本次写作的章节号、字数
|
|
477
|
-
- `sync_from_json` — 将更新后的 tracking 数据同步到 SQLite
|
|
478
|
-
- 更新 FTS 索引 — 将新章节内容索引到全文检索
|
|
479
|
-
6. **记录日志**:追加到 `spec/tracking/tracking-log.md`
|
|
480
|
-
|
|
481
|
-
> **详细格式和示例**:参见 `.claude/skills/auto-tracking/SKILL.md`
|
|
482
|
-
|
|
483
|
-
### 灵感状态更新
|
|
484
|
-
|
|
485
|
-
写作完成后,检查本章是否使用了推荐的灵感:
|
|
486
|
-
- 如果使用 → 更新灵感状态为 `used`,记录 `usedInChapter`
|
|
487
|
-
- 如果未使用 → 保持 `new` 状态
|
|
488
|
-
- 自动将更新写回 `notes/ideas.json`
|
|
489
|
-
|
|
490
|
-
### 灵感快速捕捉
|
|
491
|
-
|
|
492
|
-
用户可在写作过程中随时记录灵感(「记一下」「等等,我突然想到」),AI 识别后自动分类、打标签、写入 `notes/ideas.json`。
|
|
493
|
-
|
|
494
|
-
### Checkpoint 完成标记
|
|
495
|
-
|
|
496
|
-
写作正常完成后,更新 `write-checkpoint.json` 的 `status` 为 `completed`。
|
|
497
|
-
|
|
498
|
-
### 新事实注册提示
|
|
499
|
-
|
|
500
|
-
写作完成后,检查正文中是否出现新的可量化事实(具体数字 + 单位的组合):
|
|
501
|
-
|
|
502
|
-
**检测规则**:
|
|
503
|
-
- 数字 + 单位模式(如 `1000灵石`、`200人`、`5月`)
|
|
504
|
-
- 中文数字 + 单位(如 `五百灵石`,识别但提示用户确认)
|
|
505
|
-
- 专有名词首次出现(引号包围或首字母大写)
|
|
506
|
-
|
|
507
|
-
**去重逻辑**:
|
|
508
|
-
- 检查 `story-facts.json` 中是否已存在相同值
|
|
509
|
-
- 检查之前章节的 `<!-- story-facts: ... -->` 注释中是否已声明
|
|
510
|
-
|
|
511
|
-
**输出提示**:
|
|
512
|
-
|
|
513
|
-
```
|
|
514
|
-
💡 Story Facts 提示
|
|
515
|
-
|
|
516
|
-
检测到以下可能的新事实(未注册):
|
|
517
|
-
|
|
518
|
-
1. "外门弟子二百人"
|
|
519
|
-
建议 ID: sect-outer-disciples
|
|
520
|
-
类型: number
|
|
521
|
-
值: 200
|
|
522
|
-
单位: 人
|
|
523
|
-
|
|
524
|
-
2. "内门长老十二位"
|
|
525
|
-
建议 ID: sect-inner-elders
|
|
526
|
-
类型: number
|
|
527
|
-
值: 12
|
|
528
|
-
单位: 位
|
|
529
|
-
|
|
530
|
-
使用 /facts 命令添加这些事实以便后续追踪。
|
|
531
|
-
```
|
|
532
|
-
|
|
533
|
-
- **仅提示,不自动注册**:用户需手动使用 `/facts` 命令确认添加
|
|
534
|
-
- **快写模式(--fast)**: 仍执行检测和提示
|
|
535
|
-
|
|
536
|
-
### 智能推荐(后置)
|
|
537
|
-
|
|
538
|
-
检查 P0/P1 级别推荐(角色缺席、伏笔紧急度),在命令链式提示中展示。
|
|
539
|
-
|
|
540
|
-
## 🆕 批量写作模式(`--batch N`)
|
|
541
|
-
|
|
542
|
-
**触发条件**:用户参数 `$ARGUMENTS` 包含 `--batch N`(N 为章节数,1-5)
|
|
543
|
-
|
|
544
|
-
**执行模型**:Flow-Pipeline,逐章执行完整写作流程。
|
|
545
|
-
|
|
546
|
-
### 流程
|
|
547
|
-
|
|
548
|
-
```
|
|
549
|
-
for i in 1..N:
|
|
550
|
-
1. 加载上下文(首章完整加载,后续章增量更新)
|
|
551
|
-
2. 执行写作(正常模式或 --fast 模式)
|
|
552
|
-
3. 后置处理(tracking 更新、checkpoint 保存)
|
|
553
|
-
4. 将本章结果作为下一章的上下文输入
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
### 上下文传递
|
|
557
|
-
|
|
558
|
-
- **首章**:完整执行三层 Fallback 数据加载
|
|
559
|
-
- **后续章**:复用已加载的资源,仅增量更新:
|
|
560
|
-
- 上一章的结尾内容(续写衔接)
|
|
561
|
-
- 上一章更新后的角色状态
|
|
562
|
-
- 上一章更新后的伏笔状态
|
|
563
|
-
- tasks.md 中的下一个 pending 任务
|
|
564
|
-
|
|
565
|
-
### 中断与恢复
|
|
566
|
-
|
|
567
|
-
- 每章完成后保存 checkpoint(含 batch 进度:`batchIndex: 2/5`)
|
|
568
|
-
- 中断后可通过 `/write --batch` 恢复(检测 checkpoint 中的 batch 状态)
|
|
569
|
-
- 单章写作失败不影响已完成的章节
|
|
570
|
-
|
|
571
|
-
### 限制
|
|
572
|
-
|
|
573
|
-
- `--batch` 最大值为 5(避免上下文过长导致质量下降)
|
|
574
|
-
- 可与 `--fast` 组合使用:`/write --batch 3 --fast`
|
|
575
|
-
- 可与 `--volume` 组合使用:`/write --batch 3 --volume vol-02`
|
|
576
|
-
|
|
577
|
-
---
|
|
75
|
+
### 6. 后续建议
|
|
578
76
|
|
|
579
|
-
|
|
77
|
+
单章完成:「第X章概要已生成。继续 /write [X+1] 或 /write --batch 20 批量生成。概要全部完成后使用 /expand 开始扩写。」
|
|
580
78
|
|
|
581
|
-
|
|
582
|
-
💡 下一步建议:
|
|
583
|
-
1️⃣ `/write [下一章节号]` — 继续写作下一章
|
|
584
|
-
2️⃣ `/analyze` — 每5章执行一次质量分析(已写N章)
|
|
585
|
-
3️⃣ `/recap --brief` — 快速回顾上下文
|
|
586
|
-
```
|
|
79
|
+
批量完成:「第X-Y章概要已生成(共Z章)。继续 /write [Y+1] --batch 20 或开始 /expand [章节号] 扩写。」
|