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
|
@@ -10,8 +10,8 @@ Write-Host "----------------------------------------" -ForegroundColor Gray
|
|
|
10
10
|
Write-Host "无缓存版本:"
|
|
11
11
|
$sw1 = [Diagnostics.Stopwatch]::StartNew()
|
|
12
12
|
for ($i = 1; $i -le 100; $i++) {
|
|
13
|
-
$null = Test-Path "
|
|
14
|
-
$null = Get-Item "
|
|
13
|
+
$null = Test-Path "resources/config/keyword-mappings.json" -PathType Leaf
|
|
14
|
+
$null = Get-Item "resources/config/keyword-mappings.json" -ErrorAction SilentlyContinue
|
|
15
15
|
}
|
|
16
16
|
$sw1.Stop()
|
|
17
17
|
Write-Host " 总时间: $($sw1.ElapsedMilliseconds) ms"
|
|
@@ -19,9 +19,9 @@ Write-Host " 总时间: $($sw1.ElapsedMilliseconds) ms"
|
|
|
19
19
|
. .\templates\scripts\powershell\check-writing-state.ps1
|
|
20
20
|
Write-Host "有缓存版本:"
|
|
21
21
|
$sw2 = [Diagnostics.Stopwatch]::StartNew()
|
|
22
|
-
Preload-FileMTimes -FilePathList @("
|
|
22
|
+
Preload-FileMTimes -FilePathList @("resources/config/keyword-mappings.json")
|
|
23
23
|
for ($i = 1; $i -le 100; $i++) {
|
|
24
|
-
$null = Test-FileExistsCached "
|
|
24
|
+
$null = Test-FileExistsCached "resources/config/keyword-mappings.json"
|
|
25
25
|
}
|
|
26
26
|
$sw2.Stop()
|
|
27
27
|
Write-Host " 总时间: $($sw2.ElapsedMilliseconds) ms"
|
|
@@ -36,17 +36,17 @@ Write-Host "----------------------------------------" -ForegroundColor Gray
|
|
|
36
36
|
# 构造文件列表(与实际脚本一致)
|
|
37
37
|
$ProjectRoot = Get-Location
|
|
38
38
|
$testFileList = @(
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
39
|
+
"resources/craft/dialogue.md"
|
|
40
|
+
"resources/craft/scene-structure.md"
|
|
41
|
+
"resources/craft/character-arc.md"
|
|
42
|
+
"resources/craft/pacing.md"
|
|
43
|
+
"resources/craft/show-not-tell.md"
|
|
44
44
|
"templates/skills/writing-techniques/dialogue-techniques/SKILL.md"
|
|
45
45
|
"templates/skills/writing-techniques/scene-structure/SKILL.md"
|
|
46
46
|
"templates/skills/writing-techniques/character-arc/SKILL.md"
|
|
47
47
|
"templates/skills/writing-techniques/pacing-control/SKILL.md"
|
|
48
48
|
"templates/skills/quality-assurance/consistency-checker/SKILL.md"
|
|
49
|
-
"
|
|
49
|
+
"resources/config/keyword-mappings.json" # 替代 specification.md(测试文件)
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
# 无缓存版本
|
|
@@ -8,8 +8,8 @@ Write-Host ""
|
|
|
8
8
|
|
|
9
9
|
# 测试 1: 存在的文件
|
|
10
10
|
Write-Host "测试 1: 存在的文件" -ForegroundColor Yellow
|
|
11
|
-
Preload-FileMTimes -FilePathList @("
|
|
12
|
-
if (Test-FileExistsCached "
|
|
11
|
+
Preload-FileMTimes -FilePathList @("resources/config/keyword-mappings.json")
|
|
12
|
+
if (Test-FileExistsCached "resources/config/keyword-mappings.json") {
|
|
13
13
|
Write-Host "✅ 存在的文件检测正确" -ForegroundColor Green
|
|
14
14
|
} else {
|
|
15
15
|
Write-Host "❌ 存在的文件检测错误" -ForegroundColor Red
|
|
@@ -28,7 +28,7 @@ if (Test-FileExistsCached "templates/nonexistent-file.md") {
|
|
|
28
28
|
# 测试 3: 检查缓存值
|
|
29
29
|
Write-Host ""
|
|
30
30
|
Write-Host "测试 3: 检查缓存值" -ForegroundColor Yellow
|
|
31
|
-
$mtimeExisting = Get-FileMTimeFromCache "
|
|
31
|
+
$mtimeExisting = Get-FileMTimeFromCache "resources/config/keyword-mappings.json"
|
|
32
32
|
$mtimeMissing = Get-FileMTimeFromCache "templates/nonexistent-file.md"
|
|
33
33
|
|
|
34
34
|
Write-Host "存在文件的 mtime: $mtimeExisting"
|
|
@@ -44,7 +44,7 @@ if ($null -ne $mtimeExisting -and $null -eq $mtimeMissing) {
|
|
|
44
44
|
Write-Host ""
|
|
45
45
|
Write-Host "测试 4: 批量预加载混合文件" -ForegroundColor Yellow
|
|
46
46
|
$mixedFiles = @(
|
|
47
|
-
"
|
|
47
|
+
"resources/config/keyword-mappings.json" # 存在
|
|
48
48
|
"templates/nonexistent1.md" # 不存在
|
|
49
49
|
"templates/nonexistent2.md" # 不存在
|
|
50
50
|
)
|
|
@@ -11,8 +11,8 @@ $ErrorActionPreference = 'Stop'
|
|
|
11
11
|
. "$PSScriptRoot/common.ps1"
|
|
12
12
|
|
|
13
13
|
$root = Get-ProjectRoot
|
|
14
|
-
$cfgProject = Join-Path $root "
|
|
15
|
-
$cfgTemplate = Join-Path $root "
|
|
14
|
+
$cfgProject = Join-Path $root "resources/knowledge/audit-config.json"
|
|
15
|
+
$cfgTemplate = Join-Path $root "resources/knowledge/audit-config.json"
|
|
16
16
|
$cfg = if (Test-Path $cfgProject) { $cfgProject } elseif (Test-Path $cfgTemplate) { $cfgTemplate } else { '' }
|
|
17
17
|
|
|
18
18
|
if (-not (Test-Path $File)) { throw "用法: text-audit.ps1 -File <路径>" }
|
|
@@ -17,7 +17,7 @@ $ErrorActionPreference = 'Stop'
|
|
|
17
17
|
$root = Get-ProjectRoot
|
|
18
18
|
$storyDir = Get-CurrentStoryDir
|
|
19
19
|
$progress = if ($storyDir) { Join-Path $storyDir "progress.json" } else { "" }
|
|
20
|
-
$plotPath = Join-Path $root "
|
|
20
|
+
$plotPath = Join-Path $root "tracking/plot-tracker.json"
|
|
21
21
|
|
|
22
22
|
function Show-BasicReport {
|
|
23
23
|
Write-Host "📊 小说创作综合报告"
|
|
@@ -41,7 +41,7 @@ function Run-DeepCheck {
|
|
|
41
41
|
Write-Host " [P] 执行关系验证..."
|
|
42
42
|
Write-Host " [P] 执行世界观验证..."
|
|
43
43
|
Write-Host "Phase 2: 角色深度验证"
|
|
44
|
-
$rules = Join-Path $root "
|
|
44
|
+
$rules = Join-Path $root "tracking/validation-rules.json"
|
|
45
45
|
if (Test-Path $rules) {
|
|
46
46
|
Write-Host " ✅ 加载验证规则"
|
|
47
47
|
Set-Content -LiteralPath "$env:TEMP/validation-tasks.md" -Encoding UTF8 -Value @"
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**前置加载**:
|
|
6
6
|
- 加载 Skill:`templates/skills/quality-assurance/hook-checker/SKILL.md`
|
|
7
7
|
- 加载 Expert:`templates/skills/quality-assurance/hook-checker/experts/hook-analyst.md`
|
|
8
|
-
- 加载知识库:`
|
|
8
|
+
- 加载知识库:`resources/craft/hook-design.md`
|
|
9
9
|
- 读取所有已写章节内容
|
|
10
10
|
|
|
11
11
|
**分析流程**:
|
|
@@ -106,6 +106,6 @@
|
|
|
106
106
|
4. 卷末钩子(第 [N] 章)建议提升至 ⭐⭐⭐⭐ 以上
|
|
107
107
|
|
|
108
108
|
📚 参考资源:
|
|
109
|
-
- 钩子设计指南:
|
|
109
|
+
- 钩子设计指南:resources/craft/hook-design.md
|
|
110
110
|
- 六种钩子类型详解和示例
|
|
111
111
|
```
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
**前置加载**:
|
|
6
6
|
- 读取 `specification.md` 中的世界观和角色设定
|
|
7
|
-
- 读取 `
|
|
8
|
-
- 读取 `
|
|
7
|
+
- 读取 `tracking/timeline.json` 中的时间线数据
|
|
8
|
+
- 读取 `tracking/character-state.json` 中的角色能力数据
|
|
9
9
|
- 读取所有已写章节内容
|
|
10
10
|
|
|
11
11
|
**分析维度**:
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
**触发条件**:`$ARGUMENTS` 包含 `--focus=power`
|
|
4
4
|
|
|
5
5
|
**前置加载**:
|
|
6
|
-
- 加载知识库:`
|
|
6
|
+
- 加载知识库:`resources/craft/power-system.md`
|
|
7
7
|
- 读取 `specification.md` 中的力量体系设定(5.x 节或 worldbuilding 相关章节)
|
|
8
8
|
- 读取 `creative-plan.md` 中的升级节奏规划
|
|
9
|
-
- 读取 `
|
|
9
|
+
- 读取 `tracking/character-state.json` 中的角色能力数据
|
|
10
10
|
- 读取所有已写章节内容
|
|
11
11
|
|
|
12
12
|
**分析流程**:
|
|
@@ -143,6 +143,6 @@
|
|
|
143
143
|
💡 首要改进建议:[具体建议]
|
|
144
144
|
|
|
145
145
|
📚 参考资源:
|
|
146
|
-
- 力量体系设计指南:
|
|
146
|
+
- 力量体系设计指南:resources/craft/power-system.md
|
|
147
147
|
- 等级设计、战力平衡、升级节奏详解
|
|
148
148
|
```
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**前置加载**:
|
|
6
6
|
- 加载 Skill:`templates/skills/writing-techniques/reader-expectation/SKILL.md`
|
|
7
7
|
- 加载 Expert:`templates/skills/writing-techniques/reader-expectation/experts/expectation-analyst.md`
|
|
8
|
-
- 加载知识库:`
|
|
8
|
+
- 加载知识库:`resources/craft/hook-design.md`(如存在)
|
|
9
9
|
- 加载 tracking 数据:`plot-tracker.json`、`character-state.json`
|
|
10
10
|
|
|
11
11
|
**分析维度**:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
**前置加载**:
|
|
6
6
|
- 加载 Skill:`templates/skills/quality-assurance/voice-consistency-checker/SKILL.md`
|
|
7
7
|
- 加载 Expert:`templates/skills/quality-assurance/voice-consistency-checker/experts/voice-analyst.md`
|
|
8
|
-
- 读取 `
|
|
8
|
+
- 读取 `tracking/character-state.json` 中所有角色的 `voice` 字段
|
|
9
9
|
- 读取所有已写章节内容
|
|
10
10
|
|
|
11
11
|
**分析流程**:
|
|
@@ -8,7 +8,7 @@ allowed-tools: Read, Grep
|
|
|
8
8
|
|
|
9
9
|
## 职责范围
|
|
10
10
|
|
|
11
|
-
本 skill 负责校验故事中**可量化的设定事实**(数字、名称、枚举值)与单一数据源 `
|
|
11
|
+
本 skill 负责校验故事中**可量化的设定事实**(数字、名称、枚举值)与单一数据源 `tracking/story-facts.json` 的一致性。
|
|
12
12
|
|
|
13
13
|
### 与 consistency-checker 的分工
|
|
14
14
|
|
|
@@ -41,7 +41,7 @@ allowed-tools: Read, Grep
|
|
|
41
41
|
- 如果未找到注释,跳过校验(不报错)
|
|
42
42
|
|
|
43
43
|
2. **加载事实数据源**
|
|
44
|
-
- 读取 `
|
|
44
|
+
- 读取 `tracking/story-facts.json`
|
|
45
45
|
- 提取声明的 fact ID 对应的当前值
|
|
46
46
|
|
|
47
47
|
3. **扫描正文内容**
|
|
@@ -18,7 +18,7 @@ allowed-tools: Read, Grep
|
|
|
18
18
|
|
|
19
19
|
## 前置加载
|
|
20
20
|
|
|
21
|
-
- 加载知识库:`
|
|
21
|
+
- 加载知识库:`resources/craft/hook-design.md`(钩子设计参考)
|
|
22
22
|
- 读取当前章节内容(重点关注最后 500 字)
|
|
23
23
|
- 读取上一章结尾(检查钩子兑现)
|
|
24
24
|
- 读取 `plot-tracker.json`(检查伏笔关联)
|
|
@@ -133,7 +133,7 @@ allowed-tools: Read, Grep
|
|
|
133
133
|
💡 改进建议:
|
|
134
134
|
1. [基于章节内容的具体钩子建议]
|
|
135
135
|
2. [可选的钩子类型和示例]
|
|
136
|
-
3. 参考:
|
|
136
|
+
3. 参考:resources/craft/hook-design.md
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
---
|
|
@@ -347,13 +347,13 @@ const mentions = await mcp.call('novelws-mcp/search_content', {
|
|
|
347
347
|
|
|
348
348
|
```bash
|
|
349
349
|
# 读取摘要
|
|
350
|
-
character_summary=$(cat
|
|
351
|
-
plot_summary=$(cat
|
|
350
|
+
character_summary=$(cat tracking/summary/characters-summary.json)
|
|
351
|
+
plot_summary=$(cat tracking/summary/plot-summary.json)
|
|
352
352
|
|
|
353
353
|
# 读取特定卷
|
|
354
354
|
if [[ -n "$VOLUME" ]]; then
|
|
355
|
-
character_state=$(cat "
|
|
356
|
-
plot_tracker=$(cat "
|
|
355
|
+
character_state=$(cat "tracking/volumes/$VOLUME/character-state.json")
|
|
356
|
+
plot_tracker=$(cat "tracking/volumes/$VOLUME/plot-tracker.json")
|
|
357
357
|
fi
|
|
358
358
|
|
|
359
359
|
# Grep 搜索
|
|
@@ -371,9 +371,9 @@ grep -rn "青云宗" stories/*/content/
|
|
|
371
371
|
|
|
372
372
|
```bash
|
|
373
373
|
# 读取完整 tracking 数据
|
|
374
|
-
character_state=$(cat
|
|
375
|
-
plot_tracker=$(cat
|
|
376
|
-
story_facts=$(cat
|
|
374
|
+
character_state=$(cat tracking/character-state.json)
|
|
375
|
+
plot_tracker=$(cat tracking/plot-tracker.json)
|
|
376
|
+
story_facts=$(cat tracking/story-facts.json)
|
|
377
377
|
|
|
378
378
|
# Grep 搜索
|
|
379
379
|
grep -rn "天魂珠" stories/*/content/
|
|
@@ -38,10 +38,10 @@ allowed-tools: Read, Grep
|
|
|
38
38
|
✓ 3. stories/*/specification.md - 故事规格
|
|
39
39
|
✓ 4. stories/*/creative-plan.md - 创作计划
|
|
40
40
|
✓ 5. stories/*/tasks.md - 当前任务
|
|
41
|
-
✓ 6.
|
|
42
|
-
✓ 7.
|
|
43
|
-
✓ 8.
|
|
44
|
-
✓ 9.
|
|
41
|
+
✓ 6. tracking/character-state.json - 角色状态
|
|
42
|
+
✓ 7. tracking/relationships.json - 关系网络
|
|
43
|
+
✓ 8. tracking/plot-tracker.json - 情节追踪(如有)
|
|
44
|
+
✓ 9. tracking/validation-rules.json - 验证规则(如有)
|
|
45
45
|
|
|
46
46
|
📊 上下文加载状态:✅ 完成
|
|
47
47
|
```
|
|
@@ -74,10 +74,10 @@ allowed-tools: Read, Grep
|
|
|
74
74
|
步骤3:读取 stories/*/specification.md
|
|
75
75
|
步骤4:读取 stories/*/creative-plan.md
|
|
76
76
|
步骤5:读取 stories/*/tasks.md
|
|
77
|
-
步骤6:读取
|
|
78
|
-
步骤7:读取
|
|
79
|
-
步骤8:读取
|
|
80
|
-
步骤9:读取
|
|
77
|
+
步骤6:读取 tracking/character-state.json
|
|
78
|
+
步骤7:读取 tracking/relationships.json
|
|
79
|
+
步骤8:读取 tracking/plot-tracker.json(如有)
|
|
80
|
+
步骤9:读取 tracking/validation-rules.json(如有)
|
|
81
81
|
|
|
82
82
|
↓
|
|
83
83
|
|
|
@@ -124,16 +124,16 @@ allowed-tools: Read, Grep
|
|
|
124
124
|
→ 待写章节:[第X章]
|
|
125
125
|
→ 任务状态:[pending/in_progress]
|
|
126
126
|
|
|
127
|
-
✓ 6.
|
|
127
|
+
✓ 6. tracking/character-state.json - 角色状态
|
|
128
128
|
→ 主要角色:[列出角色名和当前状态]
|
|
129
129
|
|
|
130
|
-
✓ 7.
|
|
130
|
+
✓ 7. tracking/relationships.json - 关系网络
|
|
131
131
|
→ 核心关系:[主角与谁的关系变化]
|
|
132
132
|
|
|
133
|
-
✓ 8.
|
|
133
|
+
✓ 8. tracking/plot-tracker.json - 情节追踪
|
|
134
134
|
→ 活跃线索:[当前进行中的情节线]
|
|
135
135
|
|
|
136
|
-
✓ 9.
|
|
136
|
+
✓ 9. tracking/validation-rules.json - 验证规则
|
|
137
137
|
→ 自动修复:[启用/禁用]
|
|
138
138
|
|
|
139
139
|
📊 上下文加载状态:✅ 完成(加载9个文件,约XXXX tokens)
|
|
@@ -151,10 +151,10 @@ allowed-tools: Read, Grep
|
|
|
151
151
|
✓ 3. stories/xxx/specification.md - 故事规格
|
|
152
152
|
✓ 4. stories/xxx/creative-plan.md - 创作计划
|
|
153
153
|
✓ 5. stories/xxx/tasks.md - 当前任务
|
|
154
|
-
✓ 6.
|
|
155
|
-
✓ 7.
|
|
156
|
-
✓ 8. ⚠️
|
|
157
|
-
✓ 9. ⚠️
|
|
154
|
+
✓ 6. tracking/character-state.json - 角色状态
|
|
155
|
+
✓ 7. tracking/relationships.json - 关系网络
|
|
156
|
+
✓ 8. ⚠️ tracking/plot-tracker.json - 不存在(可选文件,跳过)
|
|
157
|
+
✓ 9. ⚠️ tracking/validation-rules.json - 不存在(可选文件,跳过)
|
|
158
158
|
|
|
159
159
|
📊 上下文加载状态:✅ 完成(加载6个必须文件 + 0个可选文件)
|
|
160
160
|
|
|
@@ -275,8 +275,8 @@ allowed-tools: Read, Grep
|
|
|
275
275
|
3. stories/*/specification.md - 故事规格
|
|
276
276
|
4. stories/*/creative-plan.md - 创作计划
|
|
277
277
|
5. stories/*/tasks.md - 当前任务
|
|
278
|
-
6.
|
|
279
|
-
7.
|
|
278
|
+
6. tracking/character-state.json - 角色状态
|
|
279
|
+
7. tracking/relationships.json - 关系网络
|
|
280
280
|
```
|
|
281
281
|
|
|
282
282
|
**逻辑**:没有这些文件,AI不知道:
|
|
@@ -289,8 +289,8 @@ allowed-tools: Read, Grep
|
|
|
289
289
|
|
|
290
290
|
```
|
|
291
291
|
2. memory/style-reference.md - 风格参考
|
|
292
|
-
8.
|
|
293
|
-
9.
|
|
292
|
+
8. tracking/plot-tracker.json - 情节追踪
|
|
293
|
+
9. tracking/validation-rules.json - 验证规则
|
|
294
294
|
```
|
|
295
295
|
|
|
296
296
|
**逻辑**:这些文件增强质量,但不是最低要求:
|
|
@@ -366,8 +366,8 @@ allowed-tools: Read, Grep
|
|
|
366
366
|
|
|
367
367
|
```
|
|
368
368
|
"检查清单请额外包含:
|
|
369
|
-
-
|
|
370
|
-
-
|
|
369
|
+
- resources/knowledge/worldbuilding/magic-system.md
|
|
370
|
+
- resources/knowledge/characters/protagonist-profile.md"
|
|
371
371
|
```
|
|
372
372
|
|
|
373
373
|
---
|
|
@@ -32,7 +32,7 @@ allowed-tools: Read
|
|
|
32
32
|
触发词:言情、爱情、恋爱、浪漫、感情线、关系弧、CP、甜文、虐文、
|
|
33
33
|
HE、BE、双洁、破镜重圆、先婚后爱、契约关系
|
|
34
34
|
|
|
35
|
-
激活:
|
|
35
|
+
激活:resources/genres/romance.md
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
**悬疑推理**(mystery):
|
|
@@ -40,7 +40,7 @@ allowed-tools: Read
|
|
|
40
40
|
触发词:悬疑、推理、侦探、破案、谜团、线索、真相、凶手、犯罪、
|
|
41
41
|
密室、诡计、不在场证明、推理小说
|
|
42
42
|
|
|
43
|
-
激活:
|
|
43
|
+
激活:resources/genres/mystery.md
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
**历史小说**(historical):
|
|
@@ -48,7 +48,7 @@ allowed-tools: Read
|
|
|
48
48
|
触发词:历史、古代、朝代、考据、时代背景、历史小说、古言、
|
|
49
49
|
穿越、重生古代、架空历史、宫斗、宅斗
|
|
50
50
|
|
|
51
|
-
激活:
|
|
51
|
+
激活:resources/genres/historical.md
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
**复仇爽文**(revenge):
|
|
@@ -56,7 +56,7 @@ allowed-tools: Read
|
|
|
56
56
|
触发词:复仇、报仇、打脸、爽文、逆袭、反击、重生复仇、
|
|
57
57
|
穿越复仇、系统、金手指、女主爽文、男主爽文
|
|
58
58
|
|
|
59
|
-
激活:
|
|
59
|
+
激活:resources/genres/revenge.md
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
**武侠小说**(wuxia):
|
|
@@ -64,7 +64,7 @@ allowed-tools: Read
|
|
|
64
64
|
触发词:武侠、江湖、武功、侠客、门派、武学、剑客、
|
|
65
65
|
轻功、内功、武林、江湖恩仇、侠义
|
|
66
66
|
|
|
67
|
-
激活:
|
|
67
|
+
激活:resources/genres/wuxia.md
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
**科幻小说**(sci-fi):
|
|
@@ -72,7 +72,7 @@ allowed-tools: Read
|
|
|
72
72
|
触发词:科幻、sci-fi、未来、太空、宇宙、星际、赛博朋克、
|
|
73
73
|
人工智能、AI、机器人、末日、后末日、时间旅行
|
|
74
74
|
|
|
75
|
-
激活:
|
|
75
|
+
激活:resources/genres/sci-fi.md
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
**惊悚小说**(thriller):
|
|
@@ -80,7 +80,7 @@ allowed-tools: Read
|
|
|
80
80
|
触发词:惊悚、thriller、紧张、追杀、逃亡、绑架、暗杀、
|
|
81
81
|
阴谋、倒计时、生存、威胁、危机
|
|
82
82
|
|
|
83
|
-
激活:
|
|
83
|
+
激活:resources/genres/thriller.md
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
#### 参考资料库(References)
|
|
@@ -90,7 +90,7 @@ allowed-tools: Read
|
|
|
90
90
|
触发词:1920、民国、军阀、北洋、穿越民国、二十年代、
|
|
91
91
|
民国时期、军阀混战
|
|
92
92
|
|
|
93
|
-
激活:
|
|
93
|
+
激活:resources/references/china-1920s/
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
**唐朝**(tang-dynasty):
|
|
@@ -98,7 +98,7 @@ allowed-tools: Read
|
|
|
98
98
|
触发词:唐朝、唐代、长安、大唐、贞观、开元、安史之乱、
|
|
99
99
|
科举、盛唐、李世民、武则天、唐诗
|
|
100
100
|
|
|
101
|
-
激活:
|
|
101
|
+
激活:resources/references/tang-dynasty/
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
**现代职场**(modern-workplace):
|
|
@@ -106,7 +106,7 @@ allowed-tools: Read
|
|
|
106
106
|
触发词:职场、公司、互联网、大厂、996、办公室、同事、
|
|
107
107
|
上班、KPI、OKR、跳槽、内卷
|
|
108
108
|
|
|
109
|
-
激活:
|
|
109
|
+
激活:resources/references/modern-workplace/
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
**修仙世界**(cultivation-world):
|
|
@@ -114,7 +114,7 @@ allowed-tools: Read
|
|
|
114
114
|
触发词:修仙、修真、炼气、筑基、金丹、元婴、宗门、
|
|
115
115
|
灵根、渡劫、飞升、法宝、灵石
|
|
116
116
|
|
|
117
|
-
激活:
|
|
117
|
+
激活:resources/references/cultivation-world/
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
---
|
|
@@ -394,15 +394,15 @@ Token消耗:约1650 tokens
|
|
|
394
394
|
|
|
395
395
|
### 添加新知识库
|
|
396
396
|
|
|
397
|
-
1. 在`
|
|
398
|
-
2. 更新`
|
|
397
|
+
1. 在`resources/`对应目录创建文件
|
|
398
|
+
2. 更新`resources/README.md`的关键词映射表
|
|
399
399
|
3. setting-detector会自动识别(无需修改本文件)
|
|
400
400
|
|
|
401
401
|
**示例**:添加奇幻知识库
|
|
402
402
|
|
|
403
403
|
```bash
|
|
404
404
|
# 1. 创建文件
|
|
405
|
-
touch
|
|
405
|
+
touch resources/genres/fantasy.md
|
|
406
406
|
|
|
407
407
|
# 2. 更新README.md关键词映射
|
|
408
408
|
fantasy:
|
|
@@ -607,5 +607,5 @@ setting-detector是Novel Writer Skills的**大脑**:
|
|
|
607
607
|
|
|
608
608
|
**本Skill版本**: v1.0
|
|
609
609
|
**最后更新**: 2025-10-18
|
|
610
|
-
**依赖**:
|
|
610
|
+
**依赖**: resources/ 系统
|
|
611
611
|
**协作**: consistency-checker, workflow-guide, genre-specific skills
|
|
@@ -554,7 +554,7 @@ multi-thread-narrative Skill → 建议线程分配和交织模式
|
|
|
554
554
|
|
|
555
555
|
### narrative-threads.json 数据结构
|
|
556
556
|
|
|
557
|
-
多线叙事的追踪数据存储在 `
|
|
557
|
+
多线叙事的追踪数据存储在 `tracking/narrative-threads.json` 中,由 `/track` 运行时生成和更新:
|
|
558
558
|
|
|
559
559
|
```json
|
|
560
560
|
{
|
|
@@ -150,13 +150,13 @@ AI:"好的,我会模仿"
|
|
|
150
150
|
**Step 5: 写入 personal-voice.md**
|
|
151
151
|
```
|
|
152
152
|
生成完整的风格指南文件
|
|
153
|
-
|
|
153
|
+
保存到:resources/memory/personal-voice.md
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
**Step 6: 确认和调整**
|
|
157
157
|
```
|
|
158
158
|
询问用户:
|
|
159
|
-
"已生成风格指南,请查看
|
|
159
|
+
"已生成风格指南,请查看 resources/memory/personal-voice.md
|
|
160
160
|
是否需要调整?"
|
|
161
161
|
|
|
162
162
|
用户可以手动微调:
|
|
File without changes
|