novelws 4.0.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 +100 -623
- package/README.md +79 -594
- 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 +12 -99
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +17 -108
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/core/config.d.ts +1 -37
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +6 -45
- 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 +5 -72
- 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 -643
- 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/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/resources/character-archetypes/01-hero.md +0 -233
- package/templates/resources/character-archetypes/02-mentor.md +0 -177
- package/templates/resources/character-archetypes/03-shadow.md +0 -221
- package/templates/resources/character-archetypes/04-ally.md +0 -178
- package/templates/resources/character-archetypes/05-shapeshifter.md +0 -177
- package/templates/resources/character-archetypes/06-trickster.md +0 -181
- package/templates/resources/character-archetypes/07-threshold-guardian.md +0 -177
- package/templates/resources/character-archetypes/08-herald.md +0 -180
- package/templates/resources/character-archetypes/09-father.md +0 -249
- package/templates/resources/character-archetypes/10-mother.md +0 -202
- package/templates/resources/character-archetypes/11-child.md +0 -183
- package/templates/resources/character-archetypes/12-sage.md +0 -202
- package/templates/resources/character-archetypes/README.md +0 -60
- package/templates/resources/character-archetypes/application-guide.md +0 -222
- package/templates/resources/character-archetypes/archetype-combinations.md +0 -242
- package/templates/resources/character-archetypes/config.yaml +0 -28
- package/templates/resources/character-archetypes/examples-analysis.md +0 -223
- package/templates/resources/config/keyword-mappings.json +0 -226
- package/templates/resources/config/specification-example.md +0 -146
- package/templates/resources/craft/character-arc.md +0 -1153
- package/templates/resources/craft/dialogue.md +0 -1170
- package/templates/resources/craft/hook-design.md +0 -345
- package/templates/resources/craft/pacing.md +0 -1200
- package/templates/resources/craft/power-system.md +0 -254
- package/templates/resources/craft/scene-structure.md +0 -1136
- package/templates/resources/craft/show-not-tell.md +0 -1012
- package/templates/resources/craft/story-structures.md +0 -134
- package/templates/resources/craft/tension-management.md +0 -168
- package/templates/resources/emotional-beats/01-first-meeting.md +0 -145
- package/templates/resources/emotional-beats/02-bonding-moment.md +0 -226
- package/templates/resources/emotional-beats/03-declaration.md +0 -284
- package/templates/resources/emotional-beats/04-triumph.md +0 -240
- package/templates/resources/emotional-beats/05-reunion.md +0 -396
- package/templates/resources/emotional-beats/06-forgiveness.md +0 -204
- package/templates/resources/emotional-beats/07-betrayal.md +0 -204
- package/templates/resources/emotional-beats/08-loss.md +0 -214
- package/templates/resources/emotional-beats/09-rejection.md +0 -254
- package/templates/resources/emotional-beats/10-failure.md +0 -244
- package/templates/resources/emotional-beats/11-misunderstanding.md +0 -205
- package/templates/resources/emotional-beats/12-farewell.md +0 -283
- package/templates/resources/emotional-beats/13-revelation.md +0 -242
- package/templates/resources/emotional-beats/14-point-of-no-return.md +0 -215
- package/templates/resources/emotional-beats/15-dark-night.md +0 -244
- package/templates/resources/emotional-beats/16-sacrifice.md +0 -246
- package/templates/resources/emotional-beats/17-awakening.md +0 -246
- package/templates/resources/emotional-beats/18-confrontation.md +0 -217
- package/templates/resources/emotional-beats/19-bittersweet-goodbye.md +0 -368
- package/templates/resources/emotional-beats/20-moral-dilemma.md +0 -248
- package/templates/resources/emotional-beats/21-temptation.md +0 -240
- package/templates/resources/emotional-beats/22-redemption.md +0 -210
- package/templates/resources/emotional-beats/README.md +0 -104
- package/templates/resources/emotional-beats/beat-sequences.md +0 -276
- package/templates/resources/emotional-beats/config.yaml +0 -30
- package/templates/resources/emotional-beats/pacing-guide.md +0 -390
- package/templates/resources/genres/game-lit.md +0 -174
- package/templates/resources/genres/historical.md +0 -1127
- package/templates/resources/genres/horror.md +0 -211
- package/templates/resources/genres/military.md +0 -209
- package/templates/resources/genres/mystery.md +0 -1123
- package/templates/resources/genres/rebirth.md +0 -177
- package/templates/resources/genres/revenge.md +0 -846
- package/templates/resources/genres/romance.md +0 -948
- package/templates/resources/genres/sci-fi.md +0 -156
- package/templates/resources/genres/sports.md +0 -216
- package/templates/resources/genres/thriller.md +0 -166
- package/templates/resources/genres/urban.md +0 -170
- package/templates/resources/genres/workplace.md +0 -214
- package/templates/resources/genres/wuxia.md +0 -143
- package/templates/resources/genres/xuanhuan.md +0 -234
- package/templates/resources/genres/youth.md +0 -219
- package/templates/resources/memory/personal-voice.md +0 -113
- package/templates/resources/references/README.md +0 -96
- package/templates/resources/references/china-1920s/culture.md +0 -423
- package/templates/resources/references/china-1920s/daily-life.md +0 -616
- package/templates/resources/references/china-1920s/overview.md +0 -298
- package/templates/resources/references/china-1920s/society.md +0 -703
- package/templates/resources/references/china-1920s/warlords.md +0 -427
- package/templates/resources/references/cultivation-world/daily-life.md +0 -108
- package/templates/resources/references/cultivation-world/overview.md +0 -64
- package/templates/resources/references/cultivation-world/power-system.md +0 -108
- package/templates/resources/references/cultivation-world/sects.md +0 -104
- package/templates/resources/references/cultivation-world/world-setting.md +0 -108
- package/templates/resources/references/modern-workplace/corporate.md +0 -115
- package/templates/resources/references/modern-workplace/daily-life.md +0 -129
- package/templates/resources/references/modern-workplace/overview.md +0 -73
- package/templates/resources/references/modern-workplace/relationships.md +0 -107
- package/templates/resources/references/modern-workplace/tech-industry.md +0 -131
- package/templates/resources/references/tang-dynasty/culture.md +0 -135
- package/templates/resources/references/tang-dynasty/daily-life.md +0 -139
- package/templates/resources/references/tang-dynasty/overview.md +0 -76
- package/templates/resources/references/tang-dynasty/politics.md +0 -121
- package/templates/resources/references/tang-dynasty/society.md +0 -126
- package/templates/resources/requirements/README.md +0 -240
- package/templates/resources/requirements/anti-ai-v3.md +0 -46
- package/templates/resources/requirements/anti-ai-v4-deprecated.md +0 -442
- package/templates/resources/requirements/anti-ai-v5-balanced.md +0 -203
- package/templates/resources/requirements/concretization.md +0 -90
- package/templates/resources/requirements/fast-paced.md +0 -552
- package/templates/resources/requirements/no-poison.md +0 -60
- package/templates/resources/requirements/romance-angst.md +0 -102
- package/templates/resources/requirements/romance-sweet.md +0 -63
- package/templates/resources/requirements/serious-literature.md +0 -45
- package/templates/resources/requirements/strong-emotion.md +0 -60
- package/templates/resources/scripts/README.md +0 -187
- package/templates/resources/scripts/bash/analyze-story.sh +0 -170
- package/templates/resources/scripts/bash/check-analyze-stage.sh +0 -108
- package/templates/resources/scripts/bash/check-consistency.sh +0 -463
- package/templates/resources/scripts/bash/check-facts.sh +0 -214
- package/templates/resources/scripts/bash/check-plot.sh +0 -374
- package/templates/resources/scripts/bash/check-timeline.sh +0 -346
- package/templates/resources/scripts/bash/check-world.sh +0 -395
- package/templates/resources/scripts/bash/check-writing-state.sh +0 -854
- package/templates/resources/scripts/bash/clarify-story.sh +0 -117
- package/templates/resources/scripts/bash/common.sh +0 -151
- package/templates/resources/scripts/bash/constitution.sh +0 -114
- package/templates/resources/scripts/bash/generate-tasks.sh +0 -65
- package/templates/resources/scripts/bash/init-tracking.sh +0 -183
- package/templates/resources/scripts/bash/manage-relations.sh +0 -174
- package/templates/resources/scripts/bash/migrate-tracking.sh +0 -183
- package/templates/resources/scripts/bash/plan-story.sh +0 -100
- package/templates/resources/scripts/bash/specify-story.sh +0 -93
- package/templates/resources/scripts/bash/tasks-story.sh +0 -96
- package/templates/resources/scripts/bash/test-word-count.sh +0 -182
- package/templates/resources/scripts/bash/tests/bench-preload-cache.sh +0 -100
- package/templates/resources/scripts/bash/tests/run-all-benchmarks.sh +0 -16
- package/templates/resources/scripts/bash/tests/test-cache-semantics.sh +0 -199
- package/templates/resources/scripts/bash/tests/test-cross-platform.sh +0 -35
- package/templates/resources/scripts/bash/tests/test-edge-cases-bash.sh +0 -60
- package/templates/resources/scripts/bash/tests/test-phase1-bash.sh +0 -28
- package/templates/resources/scripts/bash/tests/test-preload-cache.sh +0 -123
- package/templates/resources/scripts/bash/tests/test-regex-precompile.sh +0 -89
- package/templates/resources/scripts/bash/tests/test-regression-bash.sh +0 -42
- package/templates/resources/scripts/bash/tests/test-task6-verification.sh +0 -200
- package/templates/resources/scripts/bash/text-audit.sh +0 -144
- package/templates/resources/scripts/bash/track-progress.sh +0 -194
- package/templates/resources/scripts/powershell/analyze-story.ps1 +0 -174
- package/templates/resources/scripts/powershell/check-analyze-stage.ps1 +0 -110
- package/templates/resources/scripts/powershell/check-consistency.ps1 +0 -138
- package/templates/resources/scripts/powershell/check-facts.ps1 +0 -195
- package/templates/resources/scripts/powershell/check-plot.ps1 +0 -139
- package/templates/resources/scripts/powershell/check-timeline.ps1 +0 -112
- package/templates/resources/scripts/powershell/check-writing-state.ps1 +0 -486
- package/templates/resources/scripts/powershell/clarify-story.ps1 +0 -107
- package/templates/resources/scripts/powershell/common.ps1 +0 -36
- package/templates/resources/scripts/powershell/constitution.ps1 +0 -145
- package/templates/resources/scripts/powershell/generate-tasks.ps1 +0 -70
- package/templates/resources/scripts/powershell/init-tracking.ps1 +0 -98
- package/templates/resources/scripts/powershell/manage-relations.ps1 +0 -134
- package/templates/resources/scripts/powershell/migrate-tracking.ps1 +0 -145
- package/templates/resources/scripts/powershell/plan-story.ps1 +0 -99
- package/templates/resources/scripts/powershell/specify-story.ps1 +0 -85
- package/templates/resources/scripts/powershell/tests/bench-ps-cache.ps1 +0 -80
- package/templates/resources/scripts/powershell/tests/test-cross-platform.ps1 +0 -27
- package/templates/resources/scripts/powershell/tests/test-edge-cases-ps.ps1 +0 -29
- package/templates/resources/scripts/powershell/tests/test-phase1-ps.ps1 +0 -28
- package/templates/resources/scripts/powershell/tests/test-ps-cache.ps1 +0 -73
- package/templates/resources/scripts/powershell/tests/test-regression-ps.ps1 +0 -40
- package/templates/resources/scripts/powershell/text-audit.ps1 +0 -102
- package/templates/resources/scripts/powershell/track-progress.ps1 +0 -105
- package/templates/resources/styles/README.md +0 -302
- package/templates/resources/styles/ancient-style.md +0 -579
- package/templates/resources/styles/literary.md +0 -439
- package/templates/resources/styles/minimal.md +0 -472
- package/templates/resources/styles/natural-voice.md +0 -930
- package/templates/resources/styles/web-novel.md +0 -525
- 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/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/resources/{memory/constitution.md → constitution.md} +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# 澄清故事大纲的支撑脚本
|
|
4
|
-
# 用于 /clarify 命令,扫描并返回当前故事路径
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
# Source common functions
|
|
9
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
10
|
-
source "$SCRIPT_DIR/common.sh"
|
|
11
|
-
|
|
12
|
-
# Parse arguments
|
|
13
|
-
JSON_MODE=false
|
|
14
|
-
PATHS_ONLY=false
|
|
15
|
-
|
|
16
|
-
while [[ $# -gt 0 ]]; do
|
|
17
|
-
case $1 in
|
|
18
|
-
--json)
|
|
19
|
-
JSON_MODE=true
|
|
20
|
-
shift
|
|
21
|
-
;;
|
|
22
|
-
--paths-only)
|
|
23
|
-
PATHS_ONLY=true
|
|
24
|
-
shift
|
|
25
|
-
;;
|
|
26
|
-
*)
|
|
27
|
-
shift
|
|
28
|
-
;;
|
|
29
|
-
esac
|
|
30
|
-
done
|
|
31
|
-
|
|
32
|
-
# Get project root
|
|
33
|
-
PROJECT_ROOT=$(get_project_root)
|
|
34
|
-
cd "$PROJECT_ROOT"
|
|
35
|
-
|
|
36
|
-
# Find the current story directory
|
|
37
|
-
STORIES_DIR="stories"
|
|
38
|
-
if [ ! -d "$STORIES_DIR" ]; then
|
|
39
|
-
if [ "$JSON_MODE" = true ]; then
|
|
40
|
-
echo '{"error": "No stories directory found"}'
|
|
41
|
-
else
|
|
42
|
-
echo "错误:未找到 stories 目录,请先运行 /specify 创建故事规格"
|
|
43
|
-
fi
|
|
44
|
-
exit 1
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
# Get the latest story (assuming single story for now, can be enhanced)
|
|
48
|
-
STORY_DIR=$(find "$STORIES_DIR" -maxdepth 1 -type d ! -name "stories" | sort -r | head -n 1)
|
|
49
|
-
|
|
50
|
-
if [ -z "$STORY_DIR" ]; then
|
|
51
|
-
if [ "$JSON_MODE" = true ]; then
|
|
52
|
-
echo '{"error": "No story found"}'
|
|
53
|
-
else
|
|
54
|
-
echo "错误:未找到故事,请先运行 /specify 创建故事规格"
|
|
55
|
-
fi
|
|
56
|
-
exit 1
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Extract story name from directory
|
|
60
|
-
STORY_NAME=$(basename "$STORY_DIR")
|
|
61
|
-
|
|
62
|
-
# Find story file (新格式 specification.md)
|
|
63
|
-
STORY_FILE="$STORY_DIR/specification.md"
|
|
64
|
-
if [ ! -f "$STORY_FILE" ]; then
|
|
65
|
-
if [ "$JSON_MODE" = true ]; then
|
|
66
|
-
echo '{"error": "Story file not found (specification.md required)"}'
|
|
67
|
-
else
|
|
68
|
-
echo "错误:未找到故事文件 specification.md"
|
|
69
|
-
fi
|
|
70
|
-
exit 1
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
# Check if clarification already exists
|
|
74
|
-
CLARIFICATION_EXISTS=false
|
|
75
|
-
if grep -q "## 澄清记录" "$STORY_FILE" 2>/dev/null; then
|
|
76
|
-
CLARIFICATION_EXISTS=true
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
# Count existing clarification sessions
|
|
80
|
-
CLARIFICATION_COUNT=0
|
|
81
|
-
if [ "$CLARIFICATION_EXISTS" = true ]; then
|
|
82
|
-
CLARIFICATION_COUNT=$(grep -c "### 澄清会话" "$STORY_FILE" 2>/dev/null || echo "0")
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# Output in JSON format if requested
|
|
86
|
-
if [ "$JSON_MODE" = true ]; then
|
|
87
|
-
if [ "$PATHS_ONLY" = true ]; then
|
|
88
|
-
# Minimal output for command template
|
|
89
|
-
cat <<EOF
|
|
90
|
-
{
|
|
91
|
-
"STORY_PATH": "$STORY_FILE",
|
|
92
|
-
"STORY_NAME": "$STORY_NAME",
|
|
93
|
-
"STORY_DIR": "$STORY_DIR"
|
|
94
|
-
}
|
|
95
|
-
EOF
|
|
96
|
-
else
|
|
97
|
-
# Full output for analysis
|
|
98
|
-
cat <<EOF
|
|
99
|
-
{
|
|
100
|
-
"STORY_PATH": "$STORY_FILE",
|
|
101
|
-
"STORY_NAME": "$STORY_NAME",
|
|
102
|
-
"STORY_DIR": "$STORY_DIR",
|
|
103
|
-
"CLARIFICATION_EXISTS": $CLARIFICATION_EXISTS,
|
|
104
|
-
"CLARIFICATION_COUNT": $CLARIFICATION_COUNT,
|
|
105
|
-
"PROJECT_ROOT": "$PROJECT_ROOT"
|
|
106
|
-
}
|
|
107
|
-
EOF
|
|
108
|
-
fi
|
|
109
|
-
else
|
|
110
|
-
echo "找到故事:$STORY_NAME"
|
|
111
|
-
echo "文件路径:$STORY_FILE"
|
|
112
|
-
if [ "$CLARIFICATION_EXISTS" = true ]; then
|
|
113
|
-
echo "已有澄清会话:$CLARIFICATION_COUNT 次"
|
|
114
|
-
else
|
|
115
|
-
echo "尚未进行过澄清"
|
|
116
|
-
fi
|
|
117
|
-
fi
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# 通用函数库
|
|
3
|
-
|
|
4
|
-
# 获取项目根目录
|
|
5
|
-
get_project_root() {
|
|
6
|
-
if [ -f "resources/config/config.json" ]; then
|
|
7
|
-
pwd
|
|
8
|
-
else
|
|
9
|
-
# 向上查找包含 resources 的目录
|
|
10
|
-
current=$(pwd)
|
|
11
|
-
while [ "$current" != "/" ]; do
|
|
12
|
-
if [ -f "$current/resources/config/config.json" ]; then
|
|
13
|
-
echo "$current"
|
|
14
|
-
return 0
|
|
15
|
-
fi
|
|
16
|
-
current=$(dirname "$current")
|
|
17
|
-
done
|
|
18
|
-
echo "错误: 未找到小说项目根目录" >&2
|
|
19
|
-
exit 1
|
|
20
|
-
fi
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
# 获取当前故事目录
|
|
24
|
-
get_current_story() {
|
|
25
|
-
PROJECT_ROOT=$(get_project_root)
|
|
26
|
-
STORIES_DIR="$PROJECT_ROOT/stories"
|
|
27
|
-
|
|
28
|
-
# 找到最新的故事目录
|
|
29
|
-
if [ -d "$STORIES_DIR" ]; then
|
|
30
|
-
latest=$(ls -t "$STORIES_DIR" 2>/dev/null | head -1)
|
|
31
|
-
if [ -n "$latest" ]; then
|
|
32
|
-
echo "$STORIES_DIR/$latest"
|
|
33
|
-
fi
|
|
34
|
-
fi
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
# 获取活跃故事名称(只返回名称,不返回路径)
|
|
38
|
-
get_active_story() {
|
|
39
|
-
story_dir=$(get_current_story)
|
|
40
|
-
if [ -n "$story_dir" ]; then
|
|
41
|
-
basename "$story_dir"
|
|
42
|
-
else
|
|
43
|
-
# 如果没有故事,返回默认名称
|
|
44
|
-
echo "story-$(date +%Y%m%d)"
|
|
45
|
-
fi
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
# 创建带编号的目录
|
|
49
|
-
create_numbered_dir() {
|
|
50
|
-
base_dir="$1"
|
|
51
|
-
prefix="$2"
|
|
52
|
-
|
|
53
|
-
mkdir -p "$base_dir"
|
|
54
|
-
|
|
55
|
-
# 找到最高编号
|
|
56
|
-
highest=0
|
|
57
|
-
for dir in "$base_dir"/*; do
|
|
58
|
-
[ -d "$dir" ] || continue
|
|
59
|
-
dirname=$(basename "$dir")
|
|
60
|
-
number=$(echo "$dirname" | grep -o '^[0-9]\+' || echo "0")
|
|
61
|
-
number=$((10#$number))
|
|
62
|
-
if [ "$number" -gt "$highest" ]; then
|
|
63
|
-
highest=$number
|
|
64
|
-
fi
|
|
65
|
-
done
|
|
66
|
-
|
|
67
|
-
# 返回下一个编号
|
|
68
|
-
next=$((highest + 1))
|
|
69
|
-
printf "%03d" "$next"
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
# 输出 JSON(用于与 AI 助手通信)
|
|
73
|
-
output_json() {
|
|
74
|
-
echo "$1"
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
# 确保文件存在
|
|
78
|
-
ensure_file() {
|
|
79
|
-
file="$1"
|
|
80
|
-
template="$2"
|
|
81
|
-
|
|
82
|
-
if [ ! -f "$file" ]; then
|
|
83
|
-
if [ -f "$template" ]; then
|
|
84
|
-
cp "$template" "$file"
|
|
85
|
-
else
|
|
86
|
-
touch "$file"
|
|
87
|
-
fi
|
|
88
|
-
fi
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
# 准确的中文字数统计
|
|
92
|
-
# 排除Markdown标记、空格、换行符,只统计实际内容
|
|
93
|
-
count_chinese_words() {
|
|
94
|
-
local file="$1"
|
|
95
|
-
|
|
96
|
-
if [ ! -f "$file" ]; then
|
|
97
|
-
echo "0"
|
|
98
|
-
return
|
|
99
|
-
fi
|
|
100
|
-
|
|
101
|
-
# 移除Markdown标记和格式符号,然后统计字符
|
|
102
|
-
# 1. 移除代码块
|
|
103
|
-
# 2. 移除标题标记 (#)
|
|
104
|
-
# 3. 移除强调标记 (* 和 _)
|
|
105
|
-
# 4. 移除链接标记 ([ ] ( ))
|
|
106
|
-
# 5. 移除引用标记 (>)
|
|
107
|
-
# 6. 移除列表标记 (- *)
|
|
108
|
-
# 7. 移除空格、换行、制表符
|
|
109
|
-
# 8. 统计剩余字符数
|
|
110
|
-
local word_count=$(cat "$file" | \
|
|
111
|
-
sed '/^```/,/^```/d' | \
|
|
112
|
-
sed 's/^#\+[[:space:]]*//' | \
|
|
113
|
-
sed 's/\*\*//g' | \
|
|
114
|
-
sed 's/__//g' | \
|
|
115
|
-
sed 's/\*//g' | \
|
|
116
|
-
sed 's/_//g' | \
|
|
117
|
-
sed 's/\[//g' | \
|
|
118
|
-
sed 's/\]//g' | \
|
|
119
|
-
sed 's/(http[^)]*)//g' | \
|
|
120
|
-
sed 's/^>[[:space:]]*//' | \
|
|
121
|
-
sed 's/^[[:space:]]*[-*][[:space:]]*//' | \
|
|
122
|
-
sed 's/^[[:space:]]*[0-9]\+\.[[:space:]]*//' | \
|
|
123
|
-
tr -d '[:space:]' | \
|
|
124
|
-
tr -d '[:punct:]' | \
|
|
125
|
-
grep -o . | \
|
|
126
|
-
wc -l | \
|
|
127
|
-
tr -d ' ')
|
|
128
|
-
|
|
129
|
-
echo "$word_count"
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
# 显示友好的字数信息
|
|
133
|
-
# 参数: 文件路径, 最小字数(可选), 最大字数(可选)
|
|
134
|
-
show_word_count_info() {
|
|
135
|
-
local file="$1"
|
|
136
|
-
local min_words="${2:-0}"
|
|
137
|
-
local max_words="${3:-999999}"
|
|
138
|
-
local actual_words=$(count_chinese_words "$file")
|
|
139
|
-
|
|
140
|
-
echo "字数:$actual_words"
|
|
141
|
-
|
|
142
|
-
if [ "$min_words" -gt 0 ]; then
|
|
143
|
-
if [ "$actual_words" -lt "$min_words" ]; then
|
|
144
|
-
echo "⚠️ 未达到最低字数要求(最小:${min_words})"
|
|
145
|
-
elif [ "$actual_words" -gt "$max_words" ]; then
|
|
146
|
-
echo "⚠️ 超过最大字数限制(最大:${max_words})"
|
|
147
|
-
else
|
|
148
|
-
echo "✅ 符合字数要求(${min_words}-${max_words})"
|
|
149
|
-
fi
|
|
150
|
-
fi
|
|
151
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# 小说创作宪法管理脚本
|
|
4
|
-
# 用于 /constitution 命令
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
# Source common functions
|
|
9
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
10
|
-
source "$SCRIPT_DIR/common.sh"
|
|
11
|
-
|
|
12
|
-
# 获取命令参数
|
|
13
|
-
COMMAND="${1:-check}"
|
|
14
|
-
|
|
15
|
-
# Get project root
|
|
16
|
-
PROJECT_ROOT=$(get_project_root)
|
|
17
|
-
cd "$PROJECT_ROOT"
|
|
18
|
-
|
|
19
|
-
# 定义文件路径
|
|
20
|
-
CONSTITUTION_FILE="resources/memory/constitution.md"
|
|
21
|
-
|
|
22
|
-
case "$COMMAND" in
|
|
23
|
-
check)
|
|
24
|
-
# 检查宪法文件是否存在
|
|
25
|
-
if [ -f "$CONSTITUTION_FILE" ]; then
|
|
26
|
-
echo "✅ 宪法文件已存在:$CONSTITUTION_FILE"
|
|
27
|
-
# 提取版本信息
|
|
28
|
-
VERSION=$(grep -E "^- 版本:" "$CONSTITUTION_FILE" 2>/dev/null | cut -d':' -f2 | tr -d ' ' || echo "未知")
|
|
29
|
-
UPDATED=$(grep -E "^- 最后修订:" "$CONSTITUTION_FILE" 2>/dev/null | cut -d':' -f2 | tr -d ' ' || echo "未知")
|
|
30
|
-
echo " 版本:$VERSION"
|
|
31
|
-
echo " 最后修订:$UPDATED"
|
|
32
|
-
exit 0
|
|
33
|
-
else
|
|
34
|
-
echo "❌ 尚未创建宪法文件"
|
|
35
|
-
echo " 建议:运行 /constitution 创建创作宪法"
|
|
36
|
-
exit 1
|
|
37
|
-
fi
|
|
38
|
-
;;
|
|
39
|
-
|
|
40
|
-
init)
|
|
41
|
-
# 初始化宪法文件
|
|
42
|
-
mkdir -p "$(dirname "$CONSTITUTION_FILE")"
|
|
43
|
-
|
|
44
|
-
if [ -f "$CONSTITUTION_FILE" ]; then
|
|
45
|
-
echo "宪法文件已存在,准备更新"
|
|
46
|
-
else
|
|
47
|
-
echo "准备创建新的宪法文件"
|
|
48
|
-
fi
|
|
49
|
-
;;
|
|
50
|
-
|
|
51
|
-
validate)
|
|
52
|
-
# 验证宪法文件格式
|
|
53
|
-
if [ ! -f "$CONSTITUTION_FILE" ]; then
|
|
54
|
-
echo "错误:宪法文件不存在"
|
|
55
|
-
exit 1
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
echo "验证宪法文件..."
|
|
59
|
-
|
|
60
|
-
# 检查必要章节
|
|
61
|
-
REQUIRED_SECTIONS=("核心价值观" "质量标准" "创作风格" "内容规范" "读者契约")
|
|
62
|
-
MISSING_SECTIONS=()
|
|
63
|
-
|
|
64
|
-
for section in "${REQUIRED_SECTIONS[@]}"; do
|
|
65
|
-
if ! grep -q "## .* $section" "$CONSTITUTION_FILE"; then
|
|
66
|
-
MISSING_SECTIONS+=("$section")
|
|
67
|
-
fi
|
|
68
|
-
done
|
|
69
|
-
|
|
70
|
-
if [ ${#MISSING_SECTIONS[@]} -gt 0 ]; then
|
|
71
|
-
echo "⚠️ 缺少以下章节:"
|
|
72
|
-
for section in "${MISSING_SECTIONS[@]}"; do
|
|
73
|
-
echo " - $section"
|
|
74
|
-
done
|
|
75
|
-
else
|
|
76
|
-
echo "✅ 所有必要章节都存在"
|
|
77
|
-
fi
|
|
78
|
-
|
|
79
|
-
# 检查版本信息
|
|
80
|
-
if grep -q "^- 版本:" "$CONSTITUTION_FILE"; then
|
|
81
|
-
echo "✅ 版本信息完整"
|
|
82
|
-
else
|
|
83
|
-
echo "⚠️ 缺少版本信息"
|
|
84
|
-
fi
|
|
85
|
-
;;
|
|
86
|
-
|
|
87
|
-
export)
|
|
88
|
-
# 导出宪法摘要
|
|
89
|
-
if [ ! -f "$CONSTITUTION_FILE" ]; then
|
|
90
|
-
echo "错误:宪法文件不存在"
|
|
91
|
-
exit 1
|
|
92
|
-
fi
|
|
93
|
-
|
|
94
|
-
echo "# 创作宪法摘要"
|
|
95
|
-
echo ""
|
|
96
|
-
|
|
97
|
-
# 提取核心原则
|
|
98
|
-
echo "## 核心原则"
|
|
99
|
-
grep -A 1 "^### 原则" "$CONSTITUTION_FILE" | grep "^**声明**" | cut -d':' -f2- || echo "(未找到原则声明)"
|
|
100
|
-
|
|
101
|
-
echo ""
|
|
102
|
-
echo "## 质量底线"
|
|
103
|
-
grep -A 1 "^### 标准" "$CONSTITUTION_FILE" | grep "^**要求**" | cut -d':' -f2- || echo "(未找到质量标准)"
|
|
104
|
-
|
|
105
|
-
echo ""
|
|
106
|
-
echo "详细内容请查看:$CONSTITUTION_FILE"
|
|
107
|
-
;;
|
|
108
|
-
|
|
109
|
-
*)
|
|
110
|
-
echo "未知命令:$COMMAND"
|
|
111
|
-
echo "支持的命令:check, init, validate, export"
|
|
112
|
-
exit 1
|
|
113
|
-
;;
|
|
114
|
-
esac
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# 生成写作任务
|
|
3
|
-
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
# 加载通用函数
|
|
7
|
-
SCRIPT_DIR=$(dirname "$0")
|
|
8
|
-
source "$SCRIPT_DIR/common.sh"
|
|
9
|
-
|
|
10
|
-
# 获取当前故事目录
|
|
11
|
-
STORY_DIR=$(get_current_story)
|
|
12
|
-
|
|
13
|
-
if [ -z "$STORY_DIR" ]; then
|
|
14
|
-
echo "错误: 未找到故事项目" >&2
|
|
15
|
-
exit 1
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
# 检查前置条件
|
|
19
|
-
if [ ! -f "$STORY_DIR/specification.md" ]; then
|
|
20
|
-
echo "错误: 未找到故事规格,请先使用 /specify 命令" >&2
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
if [ ! -f "$STORY_DIR/creative-plan.md" ]; then
|
|
25
|
-
echo "错误: 未找到创作计划,请先使用 /plan 命令" >&2
|
|
26
|
-
exit 1
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
# 获取当前日期
|
|
30
|
-
CURRENT_DATE=$(date '+%Y-%m-%d')
|
|
31
|
-
CURRENT_DATETIME=$(date '+%Y-%m-%d %H:%M:%S')
|
|
32
|
-
|
|
33
|
-
# 创建任务文件,预先填充基础信息
|
|
34
|
-
TASKS_FILE="$STORY_DIR/tasks.md"
|
|
35
|
-
cat > "$TASKS_FILE" << EOF
|
|
36
|
-
# 写作任务清单
|
|
37
|
-
|
|
38
|
-
## 任务概览
|
|
39
|
-
- **创建日期**:${CURRENT_DATE}
|
|
40
|
-
- **最后更新**:${CURRENT_DATE}
|
|
41
|
-
- **任务状态**:待生成
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
EOF
|
|
45
|
-
|
|
46
|
-
# 创建进度追踪文件
|
|
47
|
-
PROGRESS_FILE="$STORY_DIR/progress.json"
|
|
48
|
-
if [ ! -f "$PROGRESS_FILE" ]; then
|
|
49
|
-
cat > "$PROGRESS_FILE" << EOF
|
|
50
|
-
{
|
|
51
|
-
"created_at": "${CURRENT_DATETIME}",
|
|
52
|
-
"updated_at": "${CURRENT_DATETIME}",
|
|
53
|
-
"total_chapters": 0,
|
|
54
|
-
"completed": 0,
|
|
55
|
-
"in_progress": 0,
|
|
56
|
-
"word_count": 0
|
|
57
|
-
}
|
|
58
|
-
EOF
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
# 输出结果
|
|
62
|
-
echo "TASKS_FILE: $TASKS_FILE"
|
|
63
|
-
echo "PROGRESS_FILE: $PROGRESS_FILE"
|
|
64
|
-
echo "CURRENT_DATE: $CURRENT_DATE"
|
|
65
|
-
echo "STATUS: ready"
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
echo "🚀 初始化追踪系统..."
|
|
4
|
-
|
|
5
|
-
# 检查前置条件
|
|
6
|
-
story_exists=false
|
|
7
|
-
outline_exists=false
|
|
8
|
-
|
|
9
|
-
# 查找 specification 文件
|
|
10
|
-
if ls stories/*/specification.md 1> /dev/null 2>&1; then
|
|
11
|
-
story_exists=true
|
|
12
|
-
story_file=$(ls stories/*/specification.md | head -1)
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
# 查找 creative-plan 文件
|
|
16
|
-
if ls stories/*/creative-plan.md 1> /dev/null 2>&1; then
|
|
17
|
-
outline_exists=true
|
|
18
|
-
outline_file=$(ls stories/*/creative-plan.md | head -1)
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
if [ "$story_exists" = false ] || [ "$outline_exists" = false ]; then
|
|
22
|
-
echo "❌ 请先完成 /specify 和 /plan 命令"
|
|
23
|
-
echo " 缺少: ${story_exists:+}${story_exists:-specification.md} ${outline_exists:+}${outline_exists:-creative-plan.md}"
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# 创建追踪目录
|
|
28
|
-
mkdir -p tracking
|
|
29
|
-
|
|
30
|
-
# 获取故事名称
|
|
31
|
-
story_dir=$(dirname "$story_file")
|
|
32
|
-
story_name=$(basename "$story_dir")
|
|
33
|
-
|
|
34
|
-
echo "📖 为《${story_name}》初始化追踪系统..."
|
|
35
|
-
|
|
36
|
-
# 初始化 plot-tracker.json
|
|
37
|
-
if [ ! -f "tracking/plot-tracker.json" ]; then
|
|
38
|
-
echo "📝 创建 plot-tracker.json..."
|
|
39
|
-
cat > tracking/plot-tracker.json <<EOF
|
|
40
|
-
{
|
|
41
|
-
"novel": "${story_name}",
|
|
42
|
-
"lastUpdated": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")",
|
|
43
|
-
"currentState": {
|
|
44
|
-
"chapter": 0,
|
|
45
|
-
"volume": 1,
|
|
46
|
-
"mainPlotStage": "准备阶段",
|
|
47
|
-
"location": "待定",
|
|
48
|
-
"timepoint": "故事开始前"
|
|
49
|
-
},
|
|
50
|
-
"plotlines": {
|
|
51
|
-
"main": {
|
|
52
|
-
"name": "主线剧情",
|
|
53
|
-
"description": "待从大纲提取",
|
|
54
|
-
"status": "待开始",
|
|
55
|
-
"currentNode": "起点",
|
|
56
|
-
"completedNodes": [],
|
|
57
|
-
"upcomingNodes": [],
|
|
58
|
-
"plannedClimax": {
|
|
59
|
-
"chapter": null,
|
|
60
|
-
"description": "待规划"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"subplots": []
|
|
64
|
-
},
|
|
65
|
-
"foreshadowing": [],
|
|
66
|
-
"conflicts": {
|
|
67
|
-
"active": [],
|
|
68
|
-
"resolved": [],
|
|
69
|
-
"upcoming": []
|
|
70
|
-
},
|
|
71
|
-
"checkpoints": {
|
|
72
|
-
"volumeEnd": [],
|
|
73
|
-
"majorEvents": []
|
|
74
|
-
},
|
|
75
|
-
"notes": {
|
|
76
|
-
"plotHoles": [],
|
|
77
|
-
"inconsistencies": [],
|
|
78
|
-
"reminders": ["请根据实际故事内容更新追踪数据"]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
EOF
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
# 初始化 timeline.json
|
|
85
|
-
if [ ! -f "tracking/timeline.json" ]; then
|
|
86
|
-
echo "⏰ 创建 timeline.json..."
|
|
87
|
-
cat > tracking/timeline.json <<EOF
|
|
88
|
-
{
|
|
89
|
-
"novel": "${story_name}",
|
|
90
|
-
"lastUpdated": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")",
|
|
91
|
-
"storyTimeUnit": "天",
|
|
92
|
-
"realWorldReference": null,
|
|
93
|
-
"timeline": [
|
|
94
|
-
{
|
|
95
|
-
"chapter": 0,
|
|
96
|
-
"storyTime": "第0天",
|
|
97
|
-
"description": "故事开始前",
|
|
98
|
-
"events": ["待添加"],
|
|
99
|
-
"location": "待定"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"parallelEvents": [],
|
|
103
|
-
"timeSpan": {
|
|
104
|
-
"start": "第0天",
|
|
105
|
-
"current": "第0天",
|
|
106
|
-
"elapsed": "0天"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
EOF
|
|
110
|
-
fi
|
|
111
|
-
|
|
112
|
-
# 初始化 relationships.json
|
|
113
|
-
if [ ! -f "tracking/relationships.json" ]; then
|
|
114
|
-
echo "👥 创建 relationships.json..."
|
|
115
|
-
cat > tracking/relationships.json <<EOF
|
|
116
|
-
{
|
|
117
|
-
"novel": "${story_name}",
|
|
118
|
-
"lastUpdated": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")",
|
|
119
|
-
"characters": {
|
|
120
|
-
"主角": {
|
|
121
|
-
"name": "待设定",
|
|
122
|
-
"relationships": {
|
|
123
|
-
"allies": [],
|
|
124
|
-
"enemies": [],
|
|
125
|
-
"romantic": [],
|
|
126
|
-
"neutral": []
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"factions": {},
|
|
131
|
-
"relationshipChanges": [],
|
|
132
|
-
"currentTensions": []
|
|
133
|
-
}
|
|
134
|
-
EOF
|
|
135
|
-
fi
|
|
136
|
-
|
|
137
|
-
# 初始化 character-state.json
|
|
138
|
-
if [ ! -f "tracking/character-state.json" ]; then
|
|
139
|
-
echo "📍 创建 character-state.json..."
|
|
140
|
-
cat > tracking/character-state.json <<EOF
|
|
141
|
-
{
|
|
142
|
-
"novel": "${story_name}",
|
|
143
|
-
"lastUpdated": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")",
|
|
144
|
-
"characters": {
|
|
145
|
-
"主角": {
|
|
146
|
-
"name": "待设定",
|
|
147
|
-
"status": "健康",
|
|
148
|
-
"location": "待定",
|
|
149
|
-
"possessions": [],
|
|
150
|
-
"skills": [],
|
|
151
|
-
"lastSeen": {
|
|
152
|
-
"chapter": 0,
|
|
153
|
-
"description": "尚未出场"
|
|
154
|
-
},
|
|
155
|
-
"development": {
|
|
156
|
-
"physical": 0,
|
|
157
|
-
"mental": 0,
|
|
158
|
-
"emotional": 0,
|
|
159
|
-
"power": 0
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"groupPositions": {},
|
|
164
|
-
"importantItems": {}
|
|
165
|
-
}
|
|
166
|
-
EOF
|
|
167
|
-
fi
|
|
168
|
-
|
|
169
|
-
echo ""
|
|
170
|
-
echo "✅ 追踪系统初始化完成!"
|
|
171
|
-
echo ""
|
|
172
|
-
echo "📊 已创建以下追踪文件:"
|
|
173
|
-
echo " • tracking/plot-tracker.json - 情节追踪"
|
|
174
|
-
echo " • tracking/timeline.json - 时间线管理"
|
|
175
|
-
echo " • tracking/relationships.json - 关系网络"
|
|
176
|
-
echo " • tracking/character-state.json - 角色状态"
|
|
177
|
-
echo ""
|
|
178
|
-
echo "💡 下一步:"
|
|
179
|
-
echo " 1. 使用 /write 开始创作(会自动更新追踪数据)"
|
|
180
|
-
echo " 2. 定期使用 /track 查看综合报告"
|
|
181
|
-
echo " 3. 使用 /checklist 等命令进行一致性检查"
|
|
182
|
-
echo ""
|
|
183
|
-
echo "📝 提示:追踪文件已预填充基础结构,会在写作过程中自动更新"
|