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.
Files changed (237) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/README.md +94 -66
  3. package/dist/commands/init.d.ts.map +1 -1
  4. package/dist/commands/init.js +35 -33
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/commands/upgrade.d.ts.map +1 -1
  7. package/dist/commands/upgrade.js +63 -6
  8. package/dist/commands/upgrade.js.map +1 -1
  9. package/dist/core/config.d.ts +22 -15
  10. package/dist/core/config.d.ts.map +1 -1
  11. package/dist/core/config.js +28 -16
  12. package/dist/core/config.js.map +1 -1
  13. package/dist/core/errors.d.ts +16 -0
  14. package/dist/core/errors.d.ts.map +1 -1
  15. package/dist/core/errors.js +26 -0
  16. package/dist/core/errors.js.map +1 -1
  17. package/dist/utils/diagnostics.d.ts +64 -0
  18. package/dist/utils/diagnostics.d.ts.map +1 -0
  19. package/dist/utils/diagnostics.js +227 -0
  20. package/dist/utils/diagnostics.js.map +1 -0
  21. package/package.json +1 -1
  22. package/templates/commands/analyze.md +27 -110
  23. package/templates/commands/character.md +32 -180
  24. package/templates/commands/checklist.md +27 -27
  25. package/templates/commands/clarify.md +2 -2
  26. package/templates/commands/constitution.md +8 -8
  27. package/templates/commands/expert.md +3 -3
  28. package/templates/commands/facts.md +9 -9
  29. package/templates/commands/guide.md +129 -19
  30. package/templates/commands/help-me.md +221 -0
  31. package/templates/commands/plan.md +27 -26
  32. package/templates/commands/recap.md +16 -16
  33. package/templates/commands/relations.md +13 -13
  34. package/templates/commands/revise.md +16 -15
  35. package/templates/commands/search.md +11 -10
  36. package/templates/commands/specify.md +4 -4
  37. package/templates/commands/tasks.md +9 -9
  38. package/templates/commands/timeline.md +13 -13
  39. package/templates/commands/track-init.md +8 -8
  40. package/templates/commands/track.md +177 -552
  41. package/templates/commands/volume-summary.md +6 -6
  42. package/templates/commands/write.md +148 -38
  43. package/templates/dot-claude/CLAUDE.md +5 -5
  44. package/templates/{config → resources/config}/keyword-mappings.json +19 -19
  45. package/templates/resources/genres/horror.md +211 -0
  46. package/templates/resources/genres/military.md +209 -0
  47. package/templates/resources/genres/sports.md +216 -0
  48. package/templates/resources/genres/workplace.md +214 -0
  49. package/templates/resources/genres/youth.md +219 -0
  50. package/templates/{knowledge-base/requirements/anti-ai-v4.md → resources/requirements/anti-ai-v4-deprecated.md} +13 -1
  51. package/templates/resources/requirements/anti-ai-v5-balanced.md +203 -0
  52. package/templates/{scripts → resources/scripts}/README.md +8 -8
  53. package/templates/{scripts → resources/scripts}/bash/analyze-story.sh +1 -1
  54. package/templates/resources/scripts/bash/check-analyze-stage.sh +108 -0
  55. package/templates/{scripts → resources/scripts}/bash/check-consistency.sh +7 -7
  56. package/templates/{scripts → resources/scripts}/bash/check-facts.sh +1 -1
  57. package/templates/{scripts → resources/scripts}/bash/check-plot.sh +2 -2
  58. package/templates/{scripts → resources/scripts}/bash/check-timeline.sh +3 -3
  59. package/templates/{scripts → resources/scripts}/bash/check-world.sh +5 -5
  60. package/templates/{scripts → resources/scripts}/bash/check-writing-state.sh +26 -26
  61. package/templates/{scripts → resources/scripts}/bash/common.sh +3 -3
  62. package/templates/{scripts → resources/scripts}/bash/constitution.sh +1 -1
  63. package/templates/{scripts → resources/scripts}/bash/init-tracking.sh +13 -13
  64. package/templates/{scripts → resources/scripts}/bash/manage-relations.sh +10 -10
  65. package/templates/resources/scripts/bash/migrate-tracking.sh +183 -0
  66. package/templates/{scripts → resources/scripts}/bash/plan-story.sh +2 -2
  67. package/templates/{scripts → resources/scripts}/bash/specify-story.sh +1 -1
  68. package/templates/{scripts → resources/scripts}/bash/tasks-story.sh +2 -2
  69. package/templates/{scripts → resources/scripts}/bash/tests/bench-preload-cache.sh +3 -3
  70. package/templates/{scripts → resources/scripts}/bash/tests/test-cross-platform.sh +1 -1
  71. package/templates/{scripts → resources/scripts}/bash/tests/test-preload-cache.sh +1 -1
  72. package/templates/{scripts → resources/scripts}/bash/tests/test-regex-precompile.sh +4 -4
  73. package/templates/{scripts → resources/scripts}/bash/text-audit.sh +3 -3
  74. package/templates/{scripts → resources/scripts}/bash/track-progress.sh +5 -5
  75. package/templates/{scripts → resources/scripts}/powershell/analyze-story.ps1 +1 -1
  76. package/templates/{scripts → resources/scripts}/powershell/check-consistency.ps1 +8 -8
  77. package/templates/{scripts → resources/scripts}/powershell/check-plot.ps1 +2 -2
  78. package/templates/{scripts → resources/scripts}/powershell/check-timeline.ps1 +2 -2
  79. package/templates/{scripts → resources/scripts}/powershell/check-writing-state.ps1 +31 -31
  80. package/templates/{scripts → resources/scripts}/powershell/common.ps1 +2 -2
  81. package/templates/{scripts → resources/scripts}/powershell/constitution.ps1 +1 -1
  82. package/templates/{scripts → resources/scripts}/powershell/init-tracking.ps1 +5 -5
  83. package/templates/{scripts → resources/scripts}/powershell/manage-relations.ps1 +6 -6
  84. package/templates/{scripts → resources/scripts}/powershell/migrate-tracking.ps1 +1 -1
  85. package/templates/{scripts → resources/scripts}/powershell/plan-story.ps1 +2 -2
  86. package/templates/{scripts → resources/scripts}/powershell/specify-story.ps1 +1 -1
  87. package/templates/{scripts → resources/scripts}/powershell/tests/bench-ps-cache.ps1 +10 -10
  88. package/templates/{scripts → resources/scripts}/powershell/tests/test-ps-cache.ps1 +4 -4
  89. package/templates/{scripts → resources/scripts}/powershell/text-audit.ps1 +2 -2
  90. package/templates/{scripts → resources/scripts}/powershell/track-progress.ps1 +2 -2
  91. package/templates/skills/analysis/character-analysis/SKILL.md +1 -1
  92. package/templates/skills/analysis/foreshadow-analysis/SKILL.md +1 -1
  93. package/templates/skills/analysis/hook-analysis/SKILL.md +2 -2
  94. package/templates/skills/analysis/logic-analysis/SKILL.md +2 -2
  95. package/templates/skills/analysis/opening-analysis/SKILL.md +1 -1
  96. package/templates/skills/analysis/pacing-analysis/SKILL.md +1 -1
  97. package/templates/skills/analysis/power-analysis/SKILL.md +3 -3
  98. package/templates/skills/analysis/reader-analysis/SKILL.md +1 -1
  99. package/templates/skills/analysis/style-analysis/SKILL.md +1 -1
  100. package/templates/skills/analysis/voice-analysis/SKILL.md +1 -1
  101. package/templates/skills/auto-tracking/SKILL.md +1 -1
  102. package/templates/skills/quality-assurance/consistency-checker/SKILL.md +1 -1
  103. package/templates/skills/quality-assurance/facts-checker/SKILL.md +2 -2
  104. package/templates/skills/quality-assurance/hook-checker/SKILL.md +2 -2
  105. package/templates/skills/quality-assurance/long-series-continuity/SKILL.md +7 -7
  106. package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +22 -22
  107. package/templates/skills/quality-assurance/setting-detector/SKILL.md +15 -15
  108. package/templates/skills/quality-assurance/voice-consistency-checker/SKILL.md +1 -1
  109. package/templates/skills/writing-techniques/character-arc/SKILL.md +1 -1
  110. package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +1 -1
  111. package/templates/skills/writing-techniques/reader-expectation/SKILL.md +1 -1
  112. package/templates/skills/writing-techniques/revision-polish/SKILL.md +1 -1
  113. package/templates/skills/writing-techniques/style-learning/SKILL.md +2 -2
  114. package/templates/skills/writing-techniques/writing-balance/.gitkeep +0 -0
  115. package/templates/skills/writing-techniques/writing-balance/SKILL.md +460 -0
  116. package/templates/skills/writing-techniques/writing-techniques/SKILL.md +727 -0
  117. package/templates/knowledge-base/README.md +0 -285
  118. package/templates/scripts/powershell/check-writing-state.ps1.backup +0 -135
  119. /package/templates/{knowledge-base → resources}/character-archetypes/01-hero.md +0 -0
  120. /package/templates/{knowledge-base → resources}/character-archetypes/02-mentor.md +0 -0
  121. /package/templates/{knowledge-base → resources}/character-archetypes/03-shadow.md +0 -0
  122. /package/templates/{knowledge-base → resources}/character-archetypes/04-ally.md +0 -0
  123. /package/templates/{knowledge-base → resources}/character-archetypes/05-shapeshifter.md +0 -0
  124. /package/templates/{knowledge-base → resources}/character-archetypes/06-trickster.md +0 -0
  125. /package/templates/{knowledge-base → resources}/character-archetypes/07-threshold-guardian.md +0 -0
  126. /package/templates/{knowledge-base → resources}/character-archetypes/08-herald.md +0 -0
  127. /package/templates/{knowledge-base → resources}/character-archetypes/09-father.md +0 -0
  128. /package/templates/{knowledge-base → resources}/character-archetypes/10-mother.md +0 -0
  129. /package/templates/{knowledge-base → resources}/character-archetypes/11-child.md +0 -0
  130. /package/templates/{knowledge-base → resources}/character-archetypes/12-sage.md +0 -0
  131. /package/templates/{knowledge-base → resources}/character-archetypes/README.md +0 -0
  132. /package/templates/{knowledge-base → resources}/character-archetypes/application-guide.md +0 -0
  133. /package/templates/{knowledge-base → resources}/character-archetypes/archetype-combinations.md +0 -0
  134. /package/templates/{knowledge-base → resources}/character-archetypes/config.yaml +0 -0
  135. /package/templates/{knowledge-base → resources}/character-archetypes/examples-analysis.md +0 -0
  136. /package/templates/{specification-example.md → resources/config/specification-example.md} +0 -0
  137. /package/templates/{knowledge-base → resources}/craft/character-arc.md +0 -0
  138. /package/templates/{knowledge-base → resources}/craft/dialogue.md +0 -0
  139. /package/templates/{knowledge-base → resources}/craft/hook-design.md +0 -0
  140. /package/templates/{knowledge-base → resources}/craft/pacing.md +0 -0
  141. /package/templates/{knowledge-base → resources}/craft/power-system.md +0 -0
  142. /package/templates/{knowledge-base → resources}/craft/scene-structure.md +0 -0
  143. /package/templates/{knowledge-base → resources}/craft/show-not-tell.md +0 -0
  144. /package/templates/{knowledge-base → resources}/craft/story-structures.md +0 -0
  145. /package/templates/{knowledge-base → resources}/craft/tension-management.md +0 -0
  146. /package/templates/{knowledge-base → resources}/emotional-beats/01-first-meeting.md +0 -0
  147. /package/templates/{knowledge-base → resources}/emotional-beats/02-bonding-moment.md +0 -0
  148. /package/templates/{knowledge-base → resources}/emotional-beats/03-declaration.md +0 -0
  149. /package/templates/{knowledge-base → resources}/emotional-beats/04-triumph.md +0 -0
  150. /package/templates/{knowledge-base → resources}/emotional-beats/05-reunion.md +0 -0
  151. /package/templates/{knowledge-base → resources}/emotional-beats/06-forgiveness.md +0 -0
  152. /package/templates/{knowledge-base → resources}/emotional-beats/07-betrayal.md +0 -0
  153. /package/templates/{knowledge-base → resources}/emotional-beats/08-loss.md +0 -0
  154. /package/templates/{knowledge-base → resources}/emotional-beats/09-rejection.md +0 -0
  155. /package/templates/{knowledge-base → resources}/emotional-beats/10-failure.md +0 -0
  156. /package/templates/{knowledge-base → resources}/emotional-beats/11-misunderstanding.md +0 -0
  157. /package/templates/{knowledge-base → resources}/emotional-beats/12-farewell.md +0 -0
  158. /package/templates/{knowledge-base → resources}/emotional-beats/13-revelation.md +0 -0
  159. /package/templates/{knowledge-base → resources}/emotional-beats/14-point-of-no-return.md +0 -0
  160. /package/templates/{knowledge-base → resources}/emotional-beats/15-dark-night.md +0 -0
  161. /package/templates/{knowledge-base → resources}/emotional-beats/16-sacrifice.md +0 -0
  162. /package/templates/{knowledge-base → resources}/emotional-beats/17-awakening.md +0 -0
  163. /package/templates/{knowledge-base → resources}/emotional-beats/18-confrontation.md +0 -0
  164. /package/templates/{knowledge-base → resources}/emotional-beats/19-bittersweet-goodbye.md +0 -0
  165. /package/templates/{knowledge-base → resources}/emotional-beats/20-moral-dilemma.md +0 -0
  166. /package/templates/{knowledge-base → resources}/emotional-beats/21-temptation.md +0 -0
  167. /package/templates/{knowledge-base → resources}/emotional-beats/22-redemption.md +0 -0
  168. /package/templates/{knowledge-base → resources}/emotional-beats/README.md +0 -0
  169. /package/templates/{knowledge-base → resources}/emotional-beats/beat-sequences.md +0 -0
  170. /package/templates/{knowledge-base → resources}/emotional-beats/config.yaml +0 -0
  171. /package/templates/{knowledge-base → resources}/emotional-beats/pacing-guide.md +0 -0
  172. /package/templates/{knowledge-base → resources}/genres/game-lit.md +0 -0
  173. /package/templates/{knowledge-base → resources}/genres/historical.md +0 -0
  174. /package/templates/{knowledge-base → resources}/genres/mystery.md +0 -0
  175. /package/templates/{knowledge-base → resources}/genres/rebirth.md +0 -0
  176. /package/templates/{knowledge-base → resources}/genres/revenge.md +0 -0
  177. /package/templates/{knowledge-base → resources}/genres/romance.md +0 -0
  178. /package/templates/{knowledge-base → resources}/genres/sci-fi.md +0 -0
  179. /package/templates/{knowledge-base → resources}/genres/thriller.md +0 -0
  180. /package/templates/{knowledge-base → resources}/genres/urban.md +0 -0
  181. /package/templates/{knowledge-base → resources}/genres/wuxia.md +0 -0
  182. /package/templates/{knowledge-base → resources}/genres/xuanhuan.md +0 -0
  183. /package/templates/{memory → resources/memory}/constitution.md +0 -0
  184. /package/templates/{memory → resources/memory}/personal-voice.md +0 -0
  185. /package/templates/{knowledge-base → resources}/references/README.md +0 -0
  186. /package/templates/{knowledge-base → resources}/references/china-1920s/culture.md +0 -0
  187. /package/templates/{knowledge-base → resources}/references/china-1920s/daily-life.md +0 -0
  188. /package/templates/{knowledge-base → resources}/references/china-1920s/overview.md +0 -0
  189. /package/templates/{knowledge-base → resources}/references/china-1920s/society.md +0 -0
  190. /package/templates/{knowledge-base → resources}/references/china-1920s/warlords.md +0 -0
  191. /package/templates/{knowledge-base → resources}/references/cultivation-world/daily-life.md +0 -0
  192. /package/templates/{knowledge-base → resources}/references/cultivation-world/overview.md +0 -0
  193. /package/templates/{knowledge-base → resources}/references/cultivation-world/power-system.md +0 -0
  194. /package/templates/{knowledge-base → resources}/references/cultivation-world/sects.md +0 -0
  195. /package/templates/{knowledge-base → resources}/references/cultivation-world/world-setting.md +0 -0
  196. /package/templates/{knowledge-base → resources}/references/modern-workplace/corporate.md +0 -0
  197. /package/templates/{knowledge-base → resources}/references/modern-workplace/daily-life.md +0 -0
  198. /package/templates/{knowledge-base → resources}/references/modern-workplace/overview.md +0 -0
  199. /package/templates/{knowledge-base → resources}/references/modern-workplace/relationships.md +0 -0
  200. /package/templates/{knowledge-base → resources}/references/modern-workplace/tech-industry.md +0 -0
  201. /package/templates/{knowledge-base → resources}/references/tang-dynasty/culture.md +0 -0
  202. /package/templates/{knowledge-base → resources}/references/tang-dynasty/daily-life.md +0 -0
  203. /package/templates/{knowledge-base → resources}/references/tang-dynasty/overview.md +0 -0
  204. /package/templates/{knowledge-base → resources}/references/tang-dynasty/politics.md +0 -0
  205. /package/templates/{knowledge-base → resources}/references/tang-dynasty/society.md +0 -0
  206. /package/templates/{knowledge-base → resources}/requirements/README.md +0 -0
  207. /package/templates/{knowledge-base → resources}/requirements/anti-ai-v3.md +0 -0
  208. /package/templates/{knowledge-base → resources}/requirements/concretization.md +0 -0
  209. /package/templates/{knowledge-base → resources}/requirements/fast-paced.md +0 -0
  210. /package/templates/{knowledge-base → resources}/requirements/no-poison.md +0 -0
  211. /package/templates/{knowledge-base → resources}/requirements/romance-angst.md +0 -0
  212. /package/templates/{knowledge-base → resources}/requirements/romance-sweet.md +0 -0
  213. /package/templates/{knowledge-base → resources}/requirements/serious-literature.md +0 -0
  214. /package/templates/{knowledge-base → resources}/requirements/strong-emotion.md +0 -0
  215. /package/templates/{scripts → resources/scripts}/bash/clarify-story.sh +0 -0
  216. /package/templates/{scripts → resources/scripts}/bash/generate-tasks.sh +0 -0
  217. /package/templates/{scripts → resources/scripts}/bash/test-word-count.sh +0 -0
  218. /package/templates/{scripts → resources/scripts}/bash/tests/run-all-benchmarks.sh +0 -0
  219. /package/templates/{scripts → resources/scripts}/bash/tests/test-cache-semantics.sh +0 -0
  220. /package/templates/{scripts → resources/scripts}/bash/tests/test-edge-cases-bash.sh +0 -0
  221. /package/templates/{scripts → resources/scripts}/bash/tests/test-phase1-bash.sh +0 -0
  222. /package/templates/{scripts → resources/scripts}/bash/tests/test-regression-bash.sh +0 -0
  223. /package/templates/{scripts → resources/scripts}/bash/tests/test-task6-verification.sh +0 -0
  224. /package/templates/{scripts → resources/scripts}/powershell/check-analyze-stage.ps1 +0 -0
  225. /package/templates/{scripts → resources/scripts}/powershell/check-facts.ps1 +0 -0
  226. /package/templates/{scripts → resources/scripts}/powershell/clarify-story.ps1 +0 -0
  227. /package/templates/{scripts → resources/scripts}/powershell/generate-tasks.ps1 +0 -0
  228. /package/templates/{scripts → resources/scripts}/powershell/tests/test-cross-platform.ps1 +0 -0
  229. /package/templates/{scripts → resources/scripts}/powershell/tests/test-edge-cases-ps.ps1 +0 -0
  230. /package/templates/{scripts → resources/scripts}/powershell/tests/test-phase1-ps.ps1 +0 -0
  231. /package/templates/{scripts → resources/scripts}/powershell/tests/test-regression-ps.ps1 +0 -0
  232. /package/templates/{knowledge-base → resources}/styles/README.md +0 -0
  233. /package/templates/{knowledge-base → resources}/styles/ancient-style.md +0 -0
  234. /package/templates/{knowledge-base → resources}/styles/literary.md +0 -0
  235. /package/templates/{knowledge-base → resources}/styles/minimal.md +0 -0
  236. /package/templates/{knowledge-base → resources}/styles/natural-voice.md +0 -0
  237. /package/templates/{knowledge-base → resources}/styles/web-novel.md +0 -0
@@ -0,0 +1,183 @@
1
+ #!/usr/bin/env bash
2
+ # migrate-tracking.sh
3
+ # 用法: migrate-tracking.sh [-m|--mode <auto|check|backup>] [-j|--json]
4
+
5
+ set -euo pipefail
6
+
7
+ # 默认参数
8
+ MODE="check"
9
+ JSON_OUTPUT=false
10
+
11
+ # 解析参数
12
+ while [[ $# -gt 0 ]]; do
13
+ case $1 in
14
+ -m|--mode)
15
+ MODE="$2"
16
+ if [[ ! "$MODE" =~ ^(auto|check|backup)$ ]]; then
17
+ echo "错误: Mode 必须是 auto, check 或 backup" >&2
18
+ exit 1
19
+ fi
20
+ shift 2
21
+ ;;
22
+ -j|--json)
23
+ JSON_OUTPUT=true
24
+ shift
25
+ ;;
26
+ *)
27
+ echo "未知参数: $1" >&2
28
+ exit 1
29
+ ;;
30
+ esac
31
+ done
32
+
33
+ # 目录路径
34
+ TRACKING_DIR="${PWD}/tracking"
35
+ BACKUP_DIR="${TRACKING_DIR}/backup"
36
+ SUMMARY_DIR="${TRACKING_DIR}/summary"
37
+ VOLUMES_DIR="${TRACKING_DIR}/volumes"
38
+
39
+ # 跟踪文件列表
40
+ TRACKING_FILES=(
41
+ "character-state.json"
42
+ "plot-tracker.json"
43
+ "timeline.json"
44
+ "relationships.json"
45
+ )
46
+
47
+ # 获取跟踪状态
48
+ get_tracking_status() {
49
+ local mode="single-file"
50
+ local total_size=0
51
+ local needs_migration=false
52
+ local files_json="[]"
53
+ local volumes=0
54
+
55
+ # 检查是否为分片模式
56
+ if [[ -d "$VOLUMES_DIR" ]]; then
57
+ mode="sharded"
58
+ volumes=$(find "$VOLUMES_DIR" -maxdepth 1 -type d -name "vol-*" 2>/dev/null | wc -l)
59
+
60
+ if [[ "$JSON_OUTPUT" == true ]]; then
61
+ echo "{\"mode\":\"${mode}\",\"volumes\":${volumes}}"
62
+ else
63
+ echo "Tracking mode: ${mode}"
64
+ echo "Volumes: ${volumes}"
65
+ fi
66
+ return
67
+ fi
68
+
69
+ # 单文件模式 - 检查文件大小
70
+ local file_list=""
71
+ for file in "${TRACKING_FILES[@]}"; do
72
+ local file_path="${TRACKING_DIR}/${file}"
73
+ if [[ -f "$file_path" ]]; then
74
+ local size=$(stat -f%z "$file_path" 2>/dev/null || stat -c%s "$file_path" 2>/dev/null || echo 0)
75
+ local size_kb=$(awk "BEGIN {printf \"%.1f\", $size / 1024}")
76
+ total_size=$((total_size + size))
77
+
78
+ if [[ -n "$file_list" ]]; then
79
+ file_list="${file_list},"
80
+ fi
81
+ file_list="${file_list}{\"name\":\"${file}\",\"size\":${size},\"sizeKB\":${size_kb}}"
82
+ fi
83
+ done
84
+
85
+ # 50KB 阈值
86
+ if [[ $total_size -gt $((50 * 1024)) ]]; then
87
+ needs_migration=true
88
+ fi
89
+
90
+ if [[ "$JSON_OUTPUT" == true ]]; then
91
+ local total_kb=$(awk "BEGIN {printf \"%.1f\", $total_size / 1024}")
92
+ echo "{\"mode\":\"${mode}\",\"files\":[${file_list}],\"totalSize\":${total_size},\"totalKB\":${total_kb},\"needsMigration\":${needs_migration}}"
93
+ else
94
+ echo "Tracking mode: ${mode}"
95
+ echo "Total size: $(awk "BEGIN {printf \"%.1f\", $total_size / 1024}") KB"
96
+ echo "Needs migration: ${needs_migration}"
97
+ for file in "${TRACKING_FILES[@]}"; do
98
+ local file_path="${TRACKING_DIR}/${file}"
99
+ if [[ -f "$file_path" ]]; then
100
+ local size=$(stat -f%z "$file_path" 2>/dev/null || stat -c%s "$file_path" 2>/dev/null || echo 0)
101
+ local size_kb=$(awk "BEGIN {printf \"%.1f\", $size / 1024}")
102
+ echo " ${file}: ${size_kb} KB"
103
+ fi
104
+ done
105
+ fi
106
+ }
107
+
108
+ # 备份跟踪文件
109
+ backup_tracking_files() {
110
+ local timestamp=$(date +"%Y%m%d-%H%M%S")
111
+ local backup_path="${BACKUP_DIR}/${timestamp}"
112
+
113
+ if [[ ! -d "$backup_path" ]]; then
114
+ mkdir -p "$backup_path"
115
+ fi
116
+
117
+ for file in "${TRACKING_FILES[@]}"; do
118
+ local src="${TRACKING_DIR}/${file}"
119
+ if [[ -f "$src" ]]; then
120
+ cp "$src" "${backup_path}/${file}"
121
+ fi
122
+ done
123
+
124
+ # 也备份 story-facts.json
125
+ local facts_file="${TRACKING_DIR}/story-facts.json"
126
+ if [[ -f "$facts_file" ]]; then
127
+ cp "$facts_file" "${backup_path}/story-facts.json"
128
+ fi
129
+
130
+ echo "$backup_path"
131
+ }
132
+
133
+ # 初始化分片结构
134
+ initialize_sharded_structure() {
135
+ if [[ ! -d "$SUMMARY_DIR" ]]; then
136
+ mkdir -p "$SUMMARY_DIR"
137
+ fi
138
+ if [[ ! -d "$VOLUMES_DIR" ]]; then
139
+ mkdir -p "$VOLUMES_DIR"
140
+ fi
141
+ }
142
+
143
+ # 主执行逻辑
144
+ case $MODE in
145
+ check)
146
+ get_tracking_status
147
+ ;;
148
+ backup)
149
+ backup_path=$(backup_tracking_files)
150
+ if [[ "$JSON_OUTPUT" == true ]]; then
151
+ echo "{\"backupPath\":\"${backup_path}\"}"
152
+ else
153
+ echo "Backup created at: ${backup_path}"
154
+ fi
155
+ ;;
156
+ auto)
157
+ # 检查是否已经是分片模式
158
+ if [[ -d "$VOLUMES_DIR" ]]; then
159
+ volumes=$(find "$VOLUMES_DIR" -maxdepth 1 -type d -name "vol-*" 2>/dev/null | wc -l)
160
+ if [[ "$JSON_OUTPUT" == true ]]; then
161
+ echo "{\"status\":\"already-sharded\",\"volumes\":${volumes}}"
162
+ else
163
+ echo "Already in sharded mode."
164
+ fi
165
+ exit 0
166
+ fi
167
+
168
+ # 先备份
169
+ backup_path=$(backup_tracking_files)
170
+
171
+ # 创建目录结构
172
+ initialize_sharded_structure
173
+
174
+ if [[ "$JSON_OUTPUT" == true ]]; then
175
+ cat <<EOF
176
+ {"status":"ready","backupPath":"${backup_path}","summaryDir":"${SUMMARY_DIR}","volumesDir":"${VOLUMES_DIR}","message":"Directory structure created. AI should now split data by volume boundaries."}
177
+ EOF
178
+ else
179
+ echo "Backup: ${backup_path}"
180
+ echo "Structure created. AI should now split data by volume boundaries."
181
+ fi
182
+ ;;
183
+ esac
@@ -37,7 +37,7 @@ echo ""
37
37
  # 检查前置文档
38
38
  missing=()
39
39
 
40
- if [ ! -f ".specify/memory/constitution.md" ]; then
40
+ if [ ! -f "resources/memory/constitution.md" ]; then
41
41
  missing+=("宪法文件")
42
42
  fi
43
43
 
@@ -52,7 +52,7 @@ if [ ${#missing[@]} -gt 0 ]; then
52
52
  done
53
53
  echo ""
54
54
  echo "请先完成:"
55
- if [ ! -f ".specify/memory/constitution.md" ]; then
55
+ if [ ! -f "resources/memory/constitution.md" ]; then
56
56
  echo " 1. /constitution - 创建创作宪法"
57
57
  fi
58
58
  if [ ! -f "$SPEC_FILE" ]; then
@@ -86,7 +86,7 @@ else
86
86
  fi
87
87
 
88
88
  # 检查宪法
89
- if [ -f ".specify/memory/constitution.md" ]; then
89
+ if [ -f "resources/memory/constitution.md" ]; then
90
90
  echo ""
91
91
  echo "✅ 检测到创作宪法,规格将遵循宪法原则"
92
92
  fi
@@ -37,7 +37,7 @@ echo ""
37
37
  # 检查前置文档
38
38
  missing=()
39
39
 
40
- if [ ! -f ".specify/memory/constitution.md" ]; then
40
+ if [ ! -f "resources/memory/constitution.md" ]; then
41
41
  missing+=("宪法文件")
42
42
  fi
43
43
 
@@ -56,7 +56,7 @@ if [ ${#missing[@]} -gt 0 ]; then
56
56
  done
57
57
  echo ""
58
58
  echo "请先完成:"
59
- if [ ! -f ".specify/memory/constitution.md" ]; then
59
+ if [ ! -f "resources/memory/constitution.md" ]; then
60
60
  echo " 1. /constitution - 创建创作宪法"
61
61
  fi
62
62
  if [ ! -f "$SPEC_FILE" ]; then
@@ -7,11 +7,11 @@ echo ""
7
7
 
8
8
  # 测试文件列表
9
9
  files=(
10
- "templates/config/keyword-mappings.json"
10
+ "resources/config/keyword-mappings.json"
11
11
  "templates/scripts/bash/check-writing-state.sh"
12
12
  "templates/scripts/bash/common.sh"
13
- "templates/knowledge-base/craft/dialogue.md"
14
- "templates/knowledge-base/craft/scene-structure.md"
13
+ "resources/craft/dialogue.md"
14
+ "resources/craft/scene-structure.md"
15
15
  )
16
16
 
17
17
  echo "测试文件数: ${#files[@]}"
@@ -23,7 +23,7 @@ fi
23
23
  echo ""
24
24
  echo "【路径处理测试】"
25
25
  # 测试路径分隔符处理
26
- test_path="templates/config/keyword-mappings.json"
26
+ test_path="resources/config/keyword-mappings.json"
27
27
  if [[ -f "$test_path" ]]; then
28
28
  echo "✅ 路径处理正常: $test_path"
29
29
  else
@@ -76,7 +76,7 @@ is_file_cached() {
76
76
  echo ""
77
77
  echo "=== 测试 1: 预加载文件 ==="
78
78
  files=(
79
- "templates/config/keyword-mappings.json"
79
+ "resources/config/keyword-mappings.json"
80
80
  "templates/scripts/bash/check-writing-state.sh"
81
81
  "templates/scripts/bash/common.sh"
82
82
  )
@@ -7,7 +7,7 @@ echo ""
7
7
 
8
8
  # 测试 1.1: 验证 JSON 结构
9
9
  echo "测试 1.1: 验证 JSON 结构"
10
- version=$(jq -r '.version' templates/config/keyword-mappings.json)
10
+ version=$(jq -r '.version' resources/config/keyword-mappings.json)
11
11
  if [[ "$version" == "1.1.0" ]]; then
12
12
  echo "✅ 版本号正确: $version"
13
13
  else
@@ -35,8 +35,8 @@ for mapping in "${mappings[@]}"; do
35
35
  category=$(echo "$mapping" | cut -d. -f1)
36
36
  name=$(echo "$mapping" | cut -d. -f2)
37
37
 
38
- regex=$(jq -r ".mappings[\"$category\"][\"$name\"].regex" templates/config/keyword-mappings.json)
39
- regex_flags=$(jq -r ".mappings[\"$category\"][\"$name\"].regex_flags" templates/config/keyword-mappings.json)
38
+ regex=$(jq -r ".mappings[\"$category\"][\"$name\"].regex" resources/config/keyword-mappings.json)
39
+ regex_flags=$(jq -r ".mappings[\"$category\"][\"$name\"].regex_flags" resources/config/keyword-mappings.json)
40
40
 
41
41
  if [[ -n "$regex" && "$regex" != "null" ]]; then
42
42
  echo "✅ $mapping: regex='$regex', flags='$regex_flags'"
@@ -71,7 +71,7 @@ for test_case in "${!test_cases[@]}"; do
71
71
  category=$(echo "$mapping" | cut -d. -f1)
72
72
  name=$(echo "$mapping" | cut -d. -f2)
73
73
 
74
- regex=$(jq -r ".mappings[\"$category\"][\"$name\"].regex" templates/config/keyword-mappings.json)
74
+ regex=$(jq -r ".mappings[\"$category\"][\"$name\"].regex" resources/config/keyword-mappings.json)
75
75
 
76
76
  if echo "$keyword" | grep -iE "$regex" > /dev/null; then
77
77
  echo "✅ $mapping + '$keyword' → 匹配成功"
@@ -14,9 +14,9 @@ if [ -z "$FILE_PATH" ] || [ ! -f "$FILE_PATH" ]; then
14
14
  exit 1
15
15
  fi
16
16
 
17
- # 选择配置:优先项目 spec/knowledge,其次 .specify/templates/knowledge
18
- CFG_PROJECT="$PROJECT_ROOT/spec/knowledge/audit-config.json"
19
- CFG_TEMPLATE="$PROJECT_ROOT/.specify/templates/knowledge/audit-config.json"
17
+ # 选择配置:优先项目 resources/knowledge,其次 resources
18
+ CFG_PROJECT="$PROJECT_ROOT/resources/knowledge/audit-config.json"
19
+ CFG_TEMPLATE="$PROJECT_ROOT/resources/knowledge/audit-config.json"
20
20
  if [ -f "$CFG_PROJECT" ]; then
21
21
  CFG="$CFG_PROJECT"
22
22
  elif [ -f "$CFG_TEMPLATE" ]; then
@@ -38,7 +38,7 @@ check_files() {
38
38
  has_files=true
39
39
  fi
40
40
 
41
- if [[ -f "spec/tracking/plot-tracker.json" ]]; then
41
+ if [[ -f "tracking/plot-tracker.json" ]]; then
42
42
  has_files=true
43
43
  fi
44
44
 
@@ -61,7 +61,7 @@ show_basic_report() {
61
61
  fi
62
62
 
63
63
  # 读取情节追踪
64
- if [[ -f "spec/tracking/plot-tracker.json" ]]; then
64
+ if [[ -f "tracking/plot-tracker.json" ]]; then
65
65
  echo -e "${BLUE}📍 情节状态${NC}"
66
66
  echo " 主线进度等待分析..."
67
67
  fi
@@ -85,7 +85,7 @@ run_deep_check() {
85
85
  echo -e "${BLUE}Phase 2: 角色深度验证${NC}"
86
86
 
87
87
  # 检查验证规则文件
88
- if [[ -f "spec/tracking/validation-rules.json" ]]; then
88
+ if [[ -f "tracking/validation-rules.json" ]]; then
89
89
  echo " ✅ 加载验证规则"
90
90
  echo " 扫描章节中的角色名称..."
91
91
  echo " 对比character-state.json..."
@@ -117,7 +117,7 @@ EOF
117
117
  echo -e "${GREEN} ✅ 验证任务已生成${NC}"
118
118
  else
119
119
  echo -e "${YELLOW} ⚠️ 未找到验证规则文件${NC}"
120
- echo " 建议创建 spec/tracking/validation-rules.json"
120
+ echo " 建议创建 tracking/validation-rules.json"
121
121
  fi
122
122
 
123
123
  # Phase 3: 生成报告
@@ -135,7 +135,7 @@ run_auto_fix() {
135
135
  echo -e "${GREEN}🔧 执行自动修复...${NC}"
136
136
  echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
137
137
 
138
- if [[ ! -f "spec/tracking/validation-rules.json" ]]; then
138
+ if [[ ! -f "tracking/validation-rules.json" ]]; then
139
139
  echo -e "${RED}❌ 需要先运行 --check 生成验证报告${NC}"
140
140
  exit 1
141
141
  fi
@@ -28,7 +28,7 @@ function Test-StoryFiles {
28
28
  $missingFiles = @()
29
29
 
30
30
  # 检查基准文档
31
- if (-not (Test-Path ".specify\memory\constitution.md")) {
31
+ if (-not (Test-Path "resources\memory\constitution.md")) {
32
32
  $missingFiles += "宪法文件"
33
33
  }
34
34
  if (-not (Test-Path "$StoryDir\specification.md")) {
@@ -11,14 +11,14 @@ $storyDir = Get-CurrentStoryDir
11
11
  if (-not $storyDir) { throw "未找到故事项目(stories/*)" }
12
12
 
13
13
  $progress = Join-Path $storyDir "progress.json"
14
- $plot = Join-Path $storyDir "spec/tracking/plot-tracker.json"
15
- if (-not (Test-Path $plot)) { $plot = Join-Path $root "spec/tracking/plot-tracker.json" }
16
- $timeline = Join-Path $storyDir "spec/tracking/timeline.json"
17
- if (-not (Test-Path $timeline)) { $timeline = Join-Path $root "spec/tracking/timeline.json" }
18
- $rels = Join-Path $storyDir "spec/tracking/relationships.json"
19
- if (-not (Test-Path $rels)) { $rels = Join-Path $root "spec/tracking/relationships.json" }
20
- $charState = Join-Path $storyDir "spec/tracking/character-state.json"
21
- if (-not (Test-Path $charState)) { $charState = Join-Path $root "spec/tracking/character-state.json" }
14
+ $plot = Join-Path $storyDir "tracking/plot-tracker.json"
15
+ if (-not (Test-Path $plot)) { $plot = Join-Path $root "tracking/plot-tracker.json" }
16
+ $timeline = Join-Path $storyDir "tracking/timeline.json"
17
+ if (-not (Test-Path $timeline)) { $timeline = Join-Path $root "tracking/timeline.json" }
18
+ $rels = Join-Path $storyDir "tracking/relationships.json"
19
+ if (-not (Test-Path $rels)) { $rels = Join-Path $root "tracking/relationships.json" }
20
+ $charState = Join-Path $storyDir "tracking/character-state.json"
21
+ if (-not (Test-Path $charState)) { $charState = Join-Path $root "tracking/character-state.json" }
22
22
 
23
23
  $TOTAL=0; $PASS=0; $WARN=0; $ERR=0
24
24
  function Check([string]$name, [bool]$ok, [string]$msg) {
@@ -10,8 +10,8 @@ $root = Get-ProjectRoot
10
10
  $storyDir = Get-CurrentStoryDir
11
11
  if (-not $storyDir) { throw "未找到故事项目(stories/*)" }
12
12
 
13
- $plotPath = Join-Path $storyDir "spec/tracking/plot-tracker.json"
14
- if (-not (Test-Path $plotPath)) { $plotPath = Join-Path $root "spec/tracking/plot-tracker.json" }
13
+ $plotPath = Join-Path $storyDir "tracking/plot-tracker.json"
14
+ if (-not (Test-Path $plotPath)) { $plotPath = Join-Path $root "tracking/plot-tracker.json" }
15
15
  $outlinePath = Join-Path $storyDir "creative-plan.md"
16
16
  $progressPath = Join-Path $storyDir "progress.json"
17
17
 
@@ -17,8 +17,8 @@ $root = Get-ProjectRoot
17
17
  $storyDir = Get-CurrentStoryDir
18
18
  if (-not $storyDir) { throw "未找到故事项目(stories/*)" }
19
19
 
20
- $timelinePath = Join-Path $storyDir "spec/tracking/timeline.json"
21
- if (-not (Test-Path $timelinePath)) { $timelinePath = Join-Path $root "spec/tracking/timeline.json" }
20
+ $timelinePath = Join-Path $storyDir "tracking/timeline.json"
21
+ if (-not (Test-Path $timelinePath)) { $timelinePath = Join-Path $root "tracking/timeline.json" }
22
22
 
23
23
  function Init-Timeline {
24
24
  if (-not (Test-Path $timelinePath)) {
@@ -50,7 +50,7 @@ function Mark-ResourceLoaded {
50
50
  # 防御性设计:缓存目录不存在时直接返回
51
51
 
52
52
  function Cleanup-OldCache {
53
- $cacheDir = Join-Path $ProjectRoot ".specify" ".cache"
53
+ $cacheDir = Join-Path $ProjectRoot ".claude" ".cache"
54
54
 
55
55
  # 缓存目录不存在,无需清理
56
56
  if (-not (Test-Path $cacheDir)) {
@@ -145,17 +145,17 @@ $StoryDir = Join-Path "stories" $StoryName
145
145
  if (-not $script:PreloadCompleted) {
146
146
  $preloadFileList = @(
147
147
  # 知识库文件
148
- (Join-Path $ProjectRoot ".specify/templates/knowledge-base/craft/dialogue.md")
149
- (Join-Path $ProjectRoot ".specify/templates/knowledge-base/craft/scene-structure.md")
150
- (Join-Path $ProjectRoot ".specify/templates/knowledge-base/craft/character-arc.md")
151
- (Join-Path $ProjectRoot ".specify/templates/knowledge-base/craft/pacing.md")
152
- (Join-Path $ProjectRoot ".specify/templates/knowledge-base/craft/show-not-tell.md")
148
+ (Join-Path $ProjectRoot "resources/craft/dialogue.md")
149
+ (Join-Path $ProjectRoot "resources/craft/scene-structure.md")
150
+ (Join-Path $ProjectRoot "resources/craft/character-arc.md")
151
+ (Join-Path $ProjectRoot "resources/craft/pacing.md")
152
+ (Join-Path $ProjectRoot "resources/craft/show-not-tell.md")
153
153
  # Skill 文件
154
- (Join-Path $ProjectRoot ".specify/templates/skills/writing-techniques/dialogue-techniques/SKILL.md")
155
- (Join-Path $ProjectRoot ".specify/templates/skills/writing-techniques/scene-structure/SKILL.md")
156
- (Join-Path $ProjectRoot ".specify/templates/skills/writing-techniques/character-arc/SKILL.md")
157
- (Join-Path $ProjectRoot ".specify/templates/skills/writing-techniques/pacing-control/SKILL.md")
158
- (Join-Path $ProjectRoot ".specify/templates/skills/quality-assurance/consistency-checker/SKILL.md")
154
+ (Join-Path $ProjectRoot ".claude/skills/writing-techniques/dialogue-techniques/SKILL.md")
155
+ (Join-Path $ProjectRoot ".claude/skills/writing-techniques/scene-structure/SKILL.md")
156
+ (Join-Path $ProjectRoot ".claude/skills/writing-techniques/character-arc/SKILL.md")
157
+ (Join-Path $ProjectRoot ".claude/skills/writing-techniques/pacing-control/SKILL.md")
158
+ (Join-Path $ProjectRoot ".claude/skills/quality-assurance/consistency-checker/SKILL.md")
159
159
  # 规格文件
160
160
  (Join-Path $StoryDir "specification.md")
161
161
  )
@@ -182,19 +182,19 @@ function Generate-LoadReport {
182
182
 
183
183
  # 默认加载所有资源
184
184
  $knowledgeBaseFiles = @(
185
- ".specify/templates/knowledge-base/craft/dialogue.md",
186
- ".specify/templates/knowledge-base/craft/scene-structure.md",
187
- ".specify/templates/knowledge-base/craft/character-arc.md",
188
- ".specify/templates/knowledge-base/craft/pacing.md",
189
- ".specify/templates/knowledge-base/craft/show-not-tell.md"
185
+ "resources/craft/dialogue.md",
186
+ "resources/craft/scene-structure.md",
187
+ "resources/craft/character-arc.md",
188
+ "resources/craft/pacing.md",
189
+ "resources/craft/show-not-tell.md"
190
190
  )
191
191
 
192
192
  $skillsFiles = @(
193
- ".specify/templates/skills/writing-techniques/dialogue-techniques",
194
- ".specify/templates/skills/writing-techniques/scene-structure",
195
- ".specify/templates/skills/writing-techniques/character-arc",
196
- ".specify/templates/skills/writing-techniques/pacing-control",
197
- ".specify/templates/skills/quality-assurance/consistency-checker"
193
+ ".claude/skills/writing-techniques/dialogue-techniques",
194
+ ".claude/skills/writing-techniques/scene-structure",
195
+ ".claude/skills/writing-techniques/character-arc",
196
+ ".claude/skills/writing-techniques/pacing-control",
197
+ ".claude/skills/quality-assurance/consistency-checker"
198
198
  )
199
199
 
200
200
  $disabledResources = @()
@@ -301,7 +301,7 @@ Write-Host ""
301
301
  function Test-MethodologyDocs {
302
302
  $missing = @()
303
303
 
304
- if (-not (Test-Path ".specify\memory\constitution.md")) {
304
+ if (-not (Test-Path "resources\memory\constitution.md")) {
305
305
  $missing += "宪法"
306
306
  }
307
307
  if (-not (Test-Path "$StoryDir\specification.md")) {
@@ -410,11 +410,11 @@ function Check-KnowledgeBaseAvailable {
410
410
  $available = @()
411
411
 
412
412
  $craftFiles = @(
413
- ".specify/templates/knowledge-base/craft/dialogue.md",
414
- ".specify/templates/knowledge-base/craft/scene-structure.md",
415
- ".specify/templates/knowledge-base/craft/character-arc.md",
416
- ".specify/templates/knowledge-base/craft/pacing.md",
417
- ".specify/templates/knowledge-base/craft/show-not-tell.md"
413
+ "resources/craft/dialogue.md",
414
+ "resources/craft/scene-structure.md",
415
+ "resources/craft/character-arc.md",
416
+ "resources/craft/pacing.md",
417
+ "resources/craft/show-not-tell.md"
418
418
  )
419
419
 
420
420
  foreach ($file in $craftFiles) {
@@ -445,10 +445,10 @@ function Check-SkillsAvailable {
445
445
  $available = @()
446
446
 
447
447
  $skillDirs = @(
448
- ".specify/templates/skills/writing-techniques/dialogue-techniques",
449
- ".specify/templates/skills/writing-techniques/scene-structure",
450
- ".specify/templates/skills/writing-techniques/character-arc",
451
- ".specify/templates/skills/writing-techniques/pacing-control"
448
+ ".claude/skills/writing-techniques/dialogue-techniques",
449
+ ".claude/skills/writing-techniques/scene-structure",
450
+ ".claude/skills/writing-techniques/character-arc",
451
+ ".claude/skills/writing-techniques/pacing-control"
452
452
  )
453
453
 
454
454
  foreach ($dir in $skillDirs) {
@@ -7,13 +7,13 @@ $ErrorActionPreference = 'Stop'
7
7
  function Get-ProjectRoot {
8
8
  $current = (Get-Location).Path
9
9
  while ($true) {
10
- $cfg = Join-Path $current ".specify/config.json"
10
+ $cfg = Join-Path $current "resources/config/config.json"
11
11
  if (Test-Path $cfg) { return $current }
12
12
  $parent = Split-Path $current -Parent
13
13
  if (-not $parent -or $parent -eq $current) { break }
14
14
  $current = $parent
15
15
  }
16
- throw "未找到项目根目录(缺少 .specify/config.json)"
16
+ throw "未找到项目根目录(缺少 resources/config/config.json)"
17
17
  }
18
18
 
19
19
  function Get-CurrentStoryDir {
@@ -16,7 +16,7 @@ $ProjectRoot = Get-ProjectRoot
16
16
  Set-Location $ProjectRoot
17
17
 
18
18
  # 定义文件路径
19
- $ConstitutionFile = ".specify\memory\constitution.md"
19
+ $ConstitutionFile = "resources\memory\constitution.md"
20
20
 
21
21
  switch ($Command) {
22
22
  "check" {
@@ -13,7 +13,7 @@ $storyDir = Get-CurrentStoryDir
13
13
  if (-not $storyDir) { throw "请先完成 /specify 和 /plan,未找到 stories/*/ 目录" }
14
14
 
15
15
  $storyName = Split-Path $storyDir -Leaf
16
- $specTrack = Join-Path $root "spec/tracking"
16
+ $specTrack = Join-Path $root "tracking"
17
17
  New-Item -ItemType Directory -Path $specTrack -Force | Out-Null
18
18
 
19
19
  Write-Host "📖 为《$storyName》初始化追踪系统..."
@@ -86,10 +86,10 @@ Write-Host ""
86
86
  Write-Host "✅ 追踪系统初始化完成!"
87
87
  Write-Host ""
88
88
  Write-Host "📊 已创建以下追踪文件:"
89
- Write-Host " • spec/tracking/plot-tracker.json - 情节追踪"
90
- Write-Host " • spec/tracking/timeline.json - 时间线管理"
91
- Write-Host " • spec/tracking/relationships.json - 关系网络"
92
- Write-Host " • spec/tracking/character-state.json - 角色状态"
89
+ Write-Host " • tracking/plot-tracker.json - 情节追踪"
90
+ Write-Host " • tracking/timeline.json - 时间线管理"
91
+ Write-Host " • tracking/relationships.json - 关系网络"
92
+ Write-Host " • tracking/character-state.json - 角色状态"
93
93
  Write-Host ""
94
94
  Write-Host "💡 下一步:"
95
95
  Write-Host " 1. 使用 /write 开始创作(会自动更新追踪数据)"
@@ -20,14 +20,14 @@ $ErrorActionPreference = 'Stop'
20
20
  $root = Get-ProjectRoot
21
21
  $storyDir = Get-CurrentStoryDir
22
22
  $relPath = $null
23
- if ($storyDir -and (Test-Path (Join-Path $storyDir 'spec/tracking/relationships.json'))) {
24
- $relPath = Join-Path $storyDir 'spec/tracking/relationships.json'
25
- } elseif (Test-Path (Join-Path $root 'spec/tracking/relationships.json')) {
26
- $relPath = Join-Path $root 'spec/tracking/relationships.json'
23
+ if ($storyDir -and (Test-Path (Join-Path $storyDir 'tracking/relationships.json'))) {
24
+ $relPath = Join-Path $storyDir 'tracking/relationships.json'
25
+ } elseif (Test-Path (Join-Path $root 'tracking/relationships.json')) {
26
+ $relPath = Join-Path $root 'tracking/relationships.json'
27
27
  } else {
28
- $tpl1 = Join-Path $root '.specify/templates/tracking/relationships.json'
28
+ $tpl1 = Join-Path $root 'tracking/relationships.json'
29
29
  $tpl2 = Join-Path $root 'templates/tracking/relationships.json'
30
- $dest = Join-Path $root 'spec/tracking/relationships.json'
30
+ $dest = Join-Path $root 'tracking/relationships.json'
31
31
  New-Item -ItemType Directory -Path (Split-Path $dest -Parent) -Force | Out-Null
32
32
  if (Test-Path $tpl1) { Copy-Item $tpl1 $dest -Force; $relPath = $dest }
33
33
  elseif (Test-Path $tpl2) { Copy-Item $tpl2 $dest -Force; $relPath = $dest }
@@ -7,7 +7,7 @@ param(
7
7
  [switch]$Json
8
8
  )
9
9
 
10
- $trackingDir = Join-Path (Join-Path $PWD 'spec') 'tracking'
10
+ $trackingDir = Join-Path $PWD 'tracking'
11
11
  $backupDir = Join-Path $trackingDir 'backup'
12
12
  $summaryDir = Join-Path $trackingDir 'summary'
13
13
  $volumesDir = Join-Path $trackingDir 'volumes'
@@ -33,7 +33,7 @@ Write-Host ""
33
33
  # 检查前置文档
34
34
  $missing = @()
35
35
 
36
- if (-not (Test-Path ".specify\memory\constitution.md")) {
36
+ if (-not (Test-Path "resources\memory\constitution.md")) {
37
37
  $missing += "宪法文件"
38
38
  }
39
39
 
@@ -48,7 +48,7 @@ if ($missing.Count -gt 0) {
48
48
  }
49
49
  Write-Host ""
50
50
  Write-Host "请先完成:"
51
- if (-not (Test-Path ".specify\memory\constitution.md")) {
51
+ if (-not (Test-Path "resources\memory\constitution.md")) {
52
52
  Write-Host " 1. /constitution - 创建创作宪法"
53
53
  }
54
54
  if (-not (Test-Path $SpecFile)) {
@@ -78,7 +78,7 @@ else {
78
78
  }
79
79
 
80
80
  # 检查宪法
81
- if (Test-Path ".specify\memory\constitution.md") {
81
+ if (Test-Path "resources\memory\constitution.md") {
82
82
  Write-Host ""
83
83
  Write-Host "✅ 检测到创作宪法,规格将遵循宪法原则" -ForegroundColor Green
84
84
  }