@oh-story/dsh 0.1.16 → 0.1.17
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/README.md +11 -11
- package/lib/client.js +26 -15
- package/lib/client.js.map +2 -2
- package/lib/drama/package.json +4 -0
- package/lib/index.js +42 -16
- package/lib/index.js.map +2 -2
- package/lib/novel-to-game/README.md +3 -3
- package/lib/novel-to-game/README_ZH.md +4 -4
- package/lib/novel-to-game/VERSION +1 -1
- package/lib/novel-to-game/manifest.json +25 -20
- package/lib/novel-to-game/package.json +4 -0
- package/lib/novel-to-game/skills/game-art-direction/references/art-direction-method.md +4 -0
- package/lib/novel-to-game/skills/game-build/SKILL.md +7 -1
- package/lib/novel-to-game/skills/game-build/references/baked-sprite-workflow.md +19 -0
- package/lib/novel-to-game/skills/game-concept/references/concept-method.md +4 -1
- package/lib/novel-to-game/skills/novel-to-game/SKILL.md +6 -3
- package/lib/novel-to-game/skills/novel-to-game/references/intake-method.md +1 -0
- package/lib/novel-to-game/skills/novel-to-game/references/pipeline-contract.md +13 -2
- package/lib/oh-story/manifest.json +417 -592
- package/lib/oh-story/package.json +4 -0
- package/lib/oh-story/roles/chapter-extractor.md +4 -3
- package/lib/oh-story/roles/character-designer.md +20 -85
- package/lib/oh-story/roles/consistency-checker.md +5 -5
- package/lib/oh-story/roles/narrative-writer.md +9 -9
- package/lib/oh-story/roles/story-architect.md +19 -26
- package/lib/oh-story/roles/story-explorer.md +4 -5
- package/lib/oh-story/roles/story-researcher.md +6 -7
- package/lib/oh-story/skills/browser-cdp/SKILL.md +26 -15
- package/lib/oh-story/skills/story/SKILL.md +94 -54
- package/lib/oh-story/skills/story/VERSION +1 -1
- package/lib/oh-story/skills/story-cover/SKILL.md +41 -220
- package/lib/oh-story/skills/story-cover/references/api-fallback.md +128 -0
- package/lib/oh-story/skills/story-cover/references/cover-styles.md +61 -95
- package/lib/oh-story/skills/story-deslop/SKILL.md +32 -27
- package/lib/oh-story/skills/story-deslop/references/agent-calls.md +4 -4
- package/lib/oh-story/skills/story-deslop/references/banned-words.md +7 -9
- package/lib/oh-story/skills/story-deslop/references/deslop-gates.md +12 -12
- package/lib/oh-story/skills/story-deslop/references/expression.md +10 -3
- package/lib/oh-story/skills/story-deslop/references/story-logic.md +1 -1
- package/lib/oh-story/skills/story-deslop/references/style-resolution.md +1 -1
- package/lib/oh-story/skills/story-import/SKILL.md +12 -11
- package/lib/oh-story/skills/story-import/references/benchmark-sync.md +50 -0
- package/lib/oh-story/skills/story-import/references/character-state-reverse.md +3 -4
- package/lib/oh-story/skills/story-import/references/deep-analysis.md +2 -3
- package/lib/oh-story/skills/story-import/references/import-report.md +5 -4
- package/lib/oh-story/skills/story-import/references/import-special-cases.md +6 -16
- package/lib/oh-story/skills/story-import/references/import-tracking.md +2 -2
- package/lib/oh-story/skills/story-import/references/length-routing.md +1 -43
- package/lib/oh-story/skills/story-import/references/outline-reverse-rules.md +8 -8
- package/lib/oh-story/skills/story-import/references/outline-reverse.md +2 -2
- package/lib/oh-story/skills/story-import/references/structure-mapping-long.md +113 -125
- package/lib/oh-story/skills/story-import/references/structure-mapping-short.md +77 -88
- package/lib/oh-story/skills/story-import/scripts/build_outline_brief.py +36 -59
- package/lib/oh-story/skills/story-import/scripts/check-outline-contract.js +5 -1
- package/lib/oh-story/skills/story-import/scripts/outline_view.py +286 -0
- package/lib/oh-story/skills/story-long-analyze/SKILL.md +38 -75
- package/lib/oh-story/skills/story-long-analyze/references/author-facing.md +21 -23
- package/lib/oh-story/skills/story-long-analyze/references/final-checks.md +8 -17
- package/lib/oh-story/skills/story-long-analyze/references/inspiration-library.md +18 -5
- package/lib/oh-story/skills/story-long-analyze/references/pipeline-ops.md +8 -14
- package/lib/oh-story/skills/story-long-analyze/references/stage1-golden-chapters.md +26 -27
- package/lib/oh-story/skills/story-long-analyze/references/stage2-extraction.md +74 -162
- package/lib/oh-story/skills/story-long-analyze/references/stage3-plot-rhythm.md +124 -309
- package/lib/oh-story/skills/story-long-analyze/references/stage4-characters-settings.md +49 -166
- package/lib/oh-story/skills/story-long-analyze/references/stage5-report.md +12 -15
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-generator.md +110 -34
- package/lib/oh-story/skills/story-long-analyze/references/synthesis-inputs.md +12 -2
- package/lib/oh-story/skills/story-long-analyze/scripts/inspect_existing_assets.py +3 -1
- package/lib/oh-story/skills/story-long-analyze/scripts/manage_analysis_run.py +5 -1
- package/lib/oh-story/skills/story-long-scan/SKILL.md +49 -72
- package/lib/oh-story/skills/story-long-scan/references/genre-trends.md +47 -167
- package/lib/oh-story/skills/story-long-scan/references/platform-ciweimao.md +23 -8
- package/lib/oh-story/skills/story-long-scan/references/platform-fanqie.md +24 -22
- package/lib/oh-story/skills/story-long-scan/references/platform-jjwxc.md +25 -13
- package/lib/oh-story/skills/story-long-scan/references/platform-qidian.md +41 -27
- package/lib/oh-story/skills/story-long-scan/references/platform-qimao.md +24 -16
- package/lib/oh-story/skills/story-long-scan/references/topic-decision.md +31 -33
- package/lib/oh-story/skills/story-long-write/SKILL.md +5 -5
- package/lib/oh-story/skills/story-long-write/references/agent-calls.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/artifact-protocols.md +51 -24
- package/lib/oh-story/skills/story-long-write/references/banned-words.md +7 -9
- package/lib/oh-story/skills/story-long-write/references/benchmark-recall.md +3 -3
- package/lib/oh-story/skills/story-long-write/references/character-basics.md +57 -95
- package/lib/oh-story/skills/story-long-write/references/character-relations.md +119 -269
- package/lib/oh-story/skills/story-long-write/references/cross-book-recall.md +2 -2
- package/lib/oh-story/skills/story-long-write/references/dialogue-mastery.md +8 -8
- package/lib/oh-story/skills/story-long-write/references/emotion-on-page.md +7 -7
- package/lib/oh-story/skills/story-long-write/references/emotional-arc-design.md +38 -298
- package/lib/oh-story/skills/story-long-write/references/emotional-methods.md +12 -53
- package/lib/oh-story/skills/story-long-write/references/female-audience-writing.md +39 -85
- package/lib/oh-story/skills/story-long-write/references/genre-readers.md +97 -163
- package/lib/oh-story/skills/story-long-write/references/long-chapter-hooks.md +39 -119
- package/lib/oh-story/skills/story-long-write/references/long-chapter-quality.md +39 -91
- package/lib/oh-story/skills/story-long-write/references/long-genre-catalog.md +81 -310
- package/lib/oh-story/skills/story-long-write/references/long-genre-mechanics.md +115 -326
- package/lib/oh-story/skills/story-long-write/references/long-reversal.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/long-suspense.md +8 -8
- package/lib/oh-story/skills/story-long-write/references/opening-design.md +38 -334
- package/lib/oh-story/skills/story-long-write/references/outline-methods.md +128 -281
- package/lib/oh-story/skills/story-long-write/references/plot-core-methods.md +58 -499
- package/lib/oh-story/skills/story-long-write/references/project-files.md +10 -14
- package/lib/oh-story/skills/story-long-write/references/reference-index.md +29 -82
- package/lib/oh-story/skills/story-long-write/references/revision-diagnosis.md +31 -0
- package/lib/oh-story/skills/story-long-write/references/stop-and-fix.md +2 -2
- package/lib/oh-story/skills/story-long-write/references/style-combat-face.md +12 -19
- package/lib/oh-story/skills/story-long-write/references/style-genre-modules.md +3 -171
- package/lib/oh-story/skills/story-long-write/references/style-resolution.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/workflow-chapter.md +8 -6
- package/lib/oh-story/skills/story-long-write/references/workflow-daily.md +2 -2
- package/lib/oh-story/skills/story-long-write/references/workflow-outline.md +47 -47
- package/lib/oh-story/skills/story-long-write/references/workflow-revision.md +7 -7
- package/lib/oh-story/skills/story-long-write/references/workflow-setup.md +4 -9
- package/lib/oh-story/skills/story-long-write/references/workflow-volume.md +72 -98
- package/lib/oh-story/skills/story-long-write/references/writing-craft.md +59 -115
- package/lib/oh-story/skills/story-long-write/scripts/build_architect_brief.py +38 -18
- package/lib/oh-story/skills/story-long-write/scripts/build_writer_prompt.py +23 -11
- package/lib/oh-story/skills/story-long-write/scripts/check-outline-contract.js +5 -1
- package/lib/oh-story/skills/story-long-write/scripts/outline_view.py +1 -1
- package/lib/oh-story/skills/story-review/SKILL.md +26 -24
- package/lib/oh-story/skills/story-review/references/agent-prompts.md +13 -9
- package/lib/oh-story/skills/story-review/references/banned-words.md +7 -9
- package/lib/oh-story/skills/story-review/references/expression.md +10 -3
- package/lib/oh-story/skills/story-review/references/quality-rubric.md +7 -7
- package/lib/oh-story/skills/story-review/references/review-tracking.md +2 -1
- package/lib/oh-story/skills/story-review/references/rubrics/fanqie.md +8 -9
- package/lib/oh-story/skills/story-review/references/rubrics/qidian.md +9 -11
- package/lib/oh-story/skills/story-review/references/rubrics/zhihu.md +9 -8
- package/lib/oh-story/skills/story-review/references/solo.md +6 -5
- package/lib/oh-story/skills/story-review/references/story-logic.md +1 -1
- package/lib/oh-story/skills/story-review/references/style-resolution.md +1 -1
- package/lib/oh-story/skills/story-setup/SKILL.md +24 -31
- package/lib/oh-story/skills/story-setup/references/agent-references/agent-reference-profiles.md +12 -13
- package/lib/oh-story/skills/story-setup/references/agent-references/banned-words.md +7 -9
- package/lib/oh-story/skills/story-setup/references/agent-references/benchmark-style-load.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/character-basics.md +57 -95
- package/lib/oh-story/skills/story-setup/references/agent-references/character-relations.md +119 -269
- package/lib/oh-story/skills/story-setup/references/agent-references/deslop-gates.md +12 -12
- package/lib/oh-story/skills/story-setup/references/agent-references/dialogue-mastery.md +8 -8
- package/lib/oh-story/skills/story-setup/references/agent-references/emotion-on-page.md +7 -7
- package/lib/oh-story/skills/story-setup/references/agent-references/emotional-arc-design.md +38 -298
- package/lib/oh-story/skills/story-setup/references/agent-references/expression.md +10 -3
- package/lib/oh-story/skills/story-setup/references/agent-references/female-audience-writing.md +141 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/genre-readers.md +96 -161
- package/lib/oh-story/skills/story-setup/references/agent-references/long-chapter-hooks.md +39 -119
- package/lib/oh-story/skills/story-setup/references/agent-references/long-emotional-methods.md +13 -54
- package/lib/oh-story/skills/story-setup/references/agent-references/long-genre-catalog.md +81 -310
- package/lib/oh-story/skills/story-setup/references/agent-references/long-genre-mechanics.md +115 -326
- package/lib/oh-story/skills/story-setup/references/agent-references/long-reversal.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/long-suspense.md +8 -8
- package/lib/oh-story/skills/story-setup/references/agent-references/opening-design.md +38 -334
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-methods.md +128 -281
- package/lib/oh-story/skills/story-setup/references/agent-references/plot-core-methods.md +58 -499
- package/lib/oh-story/skills/story-setup/references/agent-references/short-chapter-hooks.md +63 -171
- package/lib/oh-story/skills/story-setup/references/agent-references/short-emotional-methods.md +11 -63
- package/lib/oh-story/skills/story-setup/references/agent-references/short-genre-formulas.md +40 -50
- package/lib/oh-story/skills/story-setup/references/agent-references/short-reversal.md +14 -39
- package/lib/oh-story/skills/story-setup/references/agent-references/story-logic.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/style-combat-face.md +12 -19
- package/lib/oh-story/skills/story-setup/references/agent-references/style-genre-modules.md +3 -171
- package/lib/oh-story/skills/story-setup/references/agent-references/style-resolution.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/writing-craft.md +59 -115
- package/lib/oh-story/skills/story-short-analyze/SKILL.md +41 -90
- package/lib/oh-story/skills/story-short-analyze/references/analysis-characters.md +66 -0
- package/lib/oh-story/skills/story-short-analyze/references/analysis-short-genres.md +21 -20
- package/lib/oh-story/skills/story-short-analyze/references/analysis-short-hooks.md +4 -3
- package/lib/oh-story/skills/story-short-analyze/references/analysis-short-mechanics.md +4 -4
- package/lib/oh-story/skills/story-short-analyze/references/analysis-short-suspense.md +5 -5
- package/lib/oh-story/skills/story-short-analyze/references/analysis-submission.md +52 -0
- package/lib/oh-story/skills/story-short-analyze/references/optional-modules.md +23 -73
- package/lib/oh-story/skills/story-short-analyze/references/output-contract.md +25 -26
- package/lib/oh-story/skills/story-short-analyze/references/quality-checklist.md +20 -38
- package/lib/oh-story/skills/story-short-analyze/references/source-story-quality.md +9 -158
- package/lib/oh-story/skills/story-short-analyze/references/stage2-3-structure-emotion.md +39 -26
- package/lib/oh-story/skills/story-short-analyze/references/stage4-6-reversal-summary.md +42 -71
- package/lib/oh-story/skills/story-short-scan/SKILL.md +52 -62
- package/lib/oh-story/skills/story-short-scan/references/manual-rank-input.md +16 -12
- package/lib/oh-story/skills/story-short-scan/references/platform-dianzhong.md +10 -4
- package/lib/oh-story/skills/story-short-scan/references/platform-heiyan.md +15 -6
- package/lib/oh-story/skills/story-short-scan/references/real-market-data.md +34 -72
- package/lib/oh-story/skills/story-short-scan/references/topic-match.md +33 -13
- package/lib/oh-story/skills/story-short-write/SKILL.md +5 -5
- package/lib/oh-story/skills/story-short-write/references/agent-calls.md +3 -3
- package/lib/oh-story/skills/story-short-write/references/banned-words.md +7 -9
- package/lib/oh-story/skills/story-short-write/references/benchmark-recall.md +17 -22
- package/lib/oh-story/skills/story-short-write/references/cross-book-recall.md +22 -37
- package/lib/oh-story/skills/story-short-write/references/deslop-gates.md +12 -12
- package/lib/oh-story/skills/story-short-write/references/dialogue-mastery.md +8 -8
- package/lib/oh-story/skills/story-short-write/references/emotional-methods.md +11 -63
- package/lib/oh-story/skills/story-short-write/references/expression.md +10 -3
- package/lib/oh-story/skills/story-short-write/references/genre-styles//344/270/226/346/203/205/346/211/223/350/204/270.md +3 -3
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/217/214/347/224/267/344/270/273.md +6 -6
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/244/215/344/273/207/346/211/223/350/204/270.md +8 -8
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/256/205/346/226/227/345/256/253/346/226/227.md +4 -4
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/200/273/350/243/201/350/261/252/351/227/250.md +9 -9
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/202/254/347/226/221.md +10 -10
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/260/221/344/277/227/346/200/252/350/260/210.md +7 -7
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/262/231/351/233/225/350/204/221/346/264/236.md +6 -6
- package/lib/oh-story/skills/story-short-write/references/genre-styles//347/224/234/345/256/240.md +6 -6
- package/lib/oh-story/skills/story-short-write/references/genre-styles//350/277/275/345/246/273/347/201/253/350/221/254/345/234/272.md +12 -12
- package/lib/oh-story/skills/story-short-write/references/genre-writing-formulas.md +40 -50
- package/lib/oh-story/skills/story-short-write/references/hooks-chapter.md +63 -171
- package/lib/oh-story/skills/story-short-write/references/reference-index.md +13 -14
- package/lib/oh-story/skills/story-short-write/references/short-craft.md +10 -29
- package/lib/oh-story/skills/story-short-write/references/short-deslop.md +2 -2
- package/lib/oh-story/skills/story-short-write/references/short-format.md +12 -32
- package/lib/oh-story/skills/story-short-write/references/short-reversal.md +14 -39
- package/lib/oh-story/skills/story-short-write/references/story-logic.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/style-resolution.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/submission-craft.md +29 -19
- package/lib/oh-story/skills/story-short-write/references/villain-and-reveal.md +14 -19
- package/lib/oh-story/skills/story-short-write/references/workflow-design.md +67 -26
- package/lib/oh-story/skills/story-short-write/references/workflow-draft.md +10 -11
- package/lib/oh-story/skills/story-short-write/references/workflow-revision.md +50 -69
- package/lib/oh-story/skills/story-short-write/scripts/check-phase2-contract.js +21 -16
- package/lib/types/client/file-activity.d.ts +10 -0
- package/lib/types/client/file-activity.d.ts.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/native-hooks.d.ts.map +1 -1
- package/lib/types/skill-provider.d.ts.map +1 -1
- package/lib/types/workspace-route.d.ts.map +1 -1
- package/lib/video-recap/package.json +4 -0
- package/package.json +23 -23
- package/lib/oh-story/skills/story-import/references/format-and-structure.md +0 -168
- package/lib/oh-story/skills/story-import/references/state-tracking.md +0 -45
- package/lib/oh-story/skills/story-import/references/tracking-transaction.md +0 -146
- package/lib/oh-story/skills/story-long-analyze/references/deconstruction-notes.md +0 -270
- package/lib/oh-story/skills/story-long-analyze/references/semantic-acceptance-fixtures.md +0 -84
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-protocol.md +0 -133
- package/lib/oh-story/skills/story-long-scan/references/publishing-guide.md +0 -101
- package/lib/oh-story/skills/story-long-scan/references/reader-profiling.md +0 -92
- package/lib/oh-story/skills/story-long-write/references/character-design-methods.md +0 -428
- package/lib/oh-story/skills/story-long-write/references/commercial-core-methods.md +0 -503
- package/lib/oh-story/skills/story-long-write/references/deslop-gates.md +0 -34
- package/lib/oh-story/skills/story-long-write/references/expression.md +0 -76
- package/lib/oh-story/skills/story-long-write/references/narrative-focus.md +0 -63
- package/lib/oh-story/skills/story-long-write/references/outline-conflict.md +0 -457
- package/lib/oh-story/skills/story-long-write/references/outline-rhythm.md +0 -389
- package/lib/oh-story/skills/story-long-write/references/outline-structure-theory.md +0 -272
- package/lib/oh-story/skills/story-long-write/references/plot-emotion-system.md +0 -354
- package/lib/oh-story/skills/story-long-write/references/plot-frameworks.md +0 -710
- package/lib/oh-story/skills/story-long-write/references/plot-special-topics.md +0 -624
- package/lib/oh-story/skills/story-long-write/references/story-logic.md +0 -65
- package/lib/oh-story/skills/story-long-write/references/style-craft.md +0 -306
- package/lib/oh-story/skills/story-review/references/character-relations.md +0 -433
- package/lib/oh-story/skills/story-review/references/dialogue-mastery.md +0 -285
- package/lib/oh-story/skills/story-review/references/plot-core-methods.md +0 -522
- package/lib/oh-story/skills/story-review/references/review-quality.md +0 -243
- package/lib/oh-story/skills/story-setup/references/agent-references/character-design-methods.md +0 -428
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-conflict.md +0 -457
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-rhythm.md +0 -389
- package/lib/oh-story/skills/story-setup/references/agent-references/short-paragraph-hooks.md +0 -145
- package/lib/oh-story/skills/story-short-analyze/references/analysis-character-basics.md +0 -433
- package/lib/oh-story/skills/story-short-analyze/references/analysis-character-design.md +0 -426
- package/lib/oh-story/skills/story-short-analyze/references/analysis-character-relations.md +0 -384
- package/lib/oh-story/skills/story-short-analyze/references/analysis-paragraph-hooks.md +0 -144
- package/lib/oh-story/skills/story-short-analyze/references/analysis-reader-profile.md +0 -238
- package/lib/oh-story/skills/story-short-analyze/references/analysis-writing-techniques.md +0 -464
- package/lib/oh-story/skills/story-short-analyze/references/deconstruction-examples.md +0 -79
- package/lib/oh-story/skills/story-short-analyze/references/real-market-data.md +0 -89
- package/lib/oh-story/skills/story-short-analyze/references/zhihu-style.md +0 -54
- package/lib/oh-story/skills/story-short-write/references/hooks-paragraph.md +0 -145
- package/lib/oh-story/skills/story-short-write/references/output-contract.md +0 -116
- package/lib/oh-story/skills/story-short-write/references/short-prose-quality.md +0 -207
- package/lib/oh-story/skills/story-short-write/references/writing-workflow.md +0 -50
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""卷纲取段器 —— 让「不整读卷纲」成立。
|
|
3
|
+
|
|
4
|
+
按声明作用域选取卷级、单元级和批次材料;未声明的旧段保守纳入并告警。
|
|
5
|
+
|
|
6
|
+
段头约定(每个 ## / ### / #### 标题的**下一行非空行**):
|
|
7
|
+
|
|
8
|
+
> 作用域:卷级常任
|
|
9
|
+
> 作用域:单元级 D1-03
|
|
10
|
+
> 作用域:批次底稿 D1-03|状态:在用
|
|
11
|
+
> 作用域:批次底稿 D1-02|状态:已退役
|
|
12
|
+
|
|
13
|
+
退役行(行内覆盖):以 `⊘` 起头的列表行 / 表格行,默认过滤。
|
|
14
|
+
|
|
15
|
+
用法:
|
|
16
|
+
outline_view.py --toc 卷纲.md
|
|
17
|
+
outline_view.py --unit D1-03 卷纲.md
|
|
18
|
+
outline_view.py --contract 卷纲.md
|
|
19
|
+
outline_view.py --check 卷纲.md
|
|
20
|
+
任意子命令加 --history 连退役行一起输出
|
|
21
|
+
"""
|
|
22
|
+
import argparse
|
|
23
|
+
import io
|
|
24
|
+
import re
|
|
25
|
+
import sys
|
|
26
|
+
|
|
27
|
+
HEADING = re.compile(r"^(#{2,4})\s+(.*\S)\s*$")
|
|
28
|
+
SCOPE = re.compile(r"^>\s*作用域[::]\s*(.+?)\s*$")
|
|
29
|
+
RETIRED_LINE = re.compile(r"^\s*(?:[-*]\s*)?⊘|^\s*\|\s*⊘")
|
|
30
|
+
# 单元块内不该出现的全卷字样——出现即说明这条常任规则放错了地方
|
|
31
|
+
LEAK = re.compile(r"全卷常任|全程生效|全卷生效|本单元起常任|自 ?[LD]\d+-\d+ ?起生效")
|
|
32
|
+
# 指向卷级的指针行不算泄漏:单元块可以引用常任规则,不可以复述它
|
|
33
|
+
POINTER = re.compile(r"全卷常任裁定|已提为卷级|不复读|规则本身见|见「全卷")
|
|
34
|
+
UNIT_IN_TITLE = re.compile(r"(?<![\w-])([LD]\d+-\d+|U\d+)(?![\w-])")
|
|
35
|
+
# 批次底稿里出现跨章祈使=这条约束在写作期还有效,而写作档不给底稿 → 必须下沉
|
|
36
|
+
IMPERATIVE = re.compile(r"全程不许|一律不许|往后任何章|此后不再|往后每|从此不|终局前不")
|
|
37
|
+
CH_RANGE = re.compile(r"章节范围[::]\s*第\s*(\d+)\s*[-–—~至]\s*(\d+)\s*章")
|
|
38
|
+
# 情绪弧线逐章行:首列写「12」或模板里的「第12章」都认
|
|
39
|
+
ARC_ROW = re.compile(r"^\|\s*第?\s*(\d+)\s*章?\s*\|")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def read(path):
|
|
43
|
+
with io.open(path, encoding="utf-8-sig") as handle:
|
|
44
|
+
return handle.read()
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Section:
|
|
48
|
+
__slots__ = ("level", "title", "start", "end", "scope", "kind",
|
|
49
|
+
"unit", "status", "lines")
|
|
50
|
+
|
|
51
|
+
def __init__(self, level, title, start):
|
|
52
|
+
self.level = level
|
|
53
|
+
self.title = title
|
|
54
|
+
self.start = start # 标题行号(0 基)
|
|
55
|
+
self.end = None
|
|
56
|
+
self.scope = None # 原始作用域串,None = 未声明
|
|
57
|
+
self.kind = None # 卷级常任 / 单元级 / 批次底稿
|
|
58
|
+
self.unit = None
|
|
59
|
+
self.status = "在用"
|
|
60
|
+
self.lines = []
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def parse(text):
|
|
64
|
+
lines = text.split("\n")
|
|
65
|
+
sections = []
|
|
66
|
+
fence = None
|
|
67
|
+
for index, line in enumerate(lines):
|
|
68
|
+
marker = re.match(r"^\s{0,3}(`{3,}|~{3,})", line)
|
|
69
|
+
if marker:
|
|
70
|
+
value = marker.group(1)
|
|
71
|
+
if fence is None:
|
|
72
|
+
fence = value
|
|
73
|
+
elif value[0] == fence[0] and len(value) >= len(fence):
|
|
74
|
+
fence = None
|
|
75
|
+
continue
|
|
76
|
+
if fence:
|
|
77
|
+
continue
|
|
78
|
+
match = HEADING.match(line)
|
|
79
|
+
if match:
|
|
80
|
+
if sections:
|
|
81
|
+
sections[-1].end = index
|
|
82
|
+
sections.append(Section(len(match.group(1)), match.group(2), index))
|
|
83
|
+
if sections:
|
|
84
|
+
sections[-1].end = len(lines)
|
|
85
|
+
for section in sections:
|
|
86
|
+
section.lines = lines[section.start:section.end]
|
|
87
|
+
for candidate in section.lines[1:]:
|
|
88
|
+
if not candidate.strip():
|
|
89
|
+
continue
|
|
90
|
+
scope_match = SCOPE.match(candidate)
|
|
91
|
+
if scope_match:
|
|
92
|
+
section.scope = scope_match.group(1)
|
|
93
|
+
break
|
|
94
|
+
if section.scope:
|
|
95
|
+
head = section.scope.split("|")[0].strip()
|
|
96
|
+
if head == "卷级常任":
|
|
97
|
+
section.kind = "卷级常任"
|
|
98
|
+
elif re.fullmatch(r"单元级(?:\s+[A-Za-z][\w-]*)?", head):
|
|
99
|
+
section.kind = "单元级"
|
|
100
|
+
elif re.fullmatch(r"批次底稿(?:\s+[A-Za-z][\w-]*)?", head):
|
|
101
|
+
section.kind = "批次底稿"
|
|
102
|
+
found = re.search(r"^(?:单元级|批次底稿)\s+([A-Za-z][\w-]*)$", head)
|
|
103
|
+
if found:
|
|
104
|
+
section.unit = found.group(1)
|
|
105
|
+
if "已退役" in section.scope:
|
|
106
|
+
section.status = "已退役"
|
|
107
|
+
if section.unit is None:
|
|
108
|
+
found = re.search(r"剧情单元\s+([A-Za-z][\w-]*)", section.title) or UNIT_IN_TITLE.search(section.title)
|
|
109
|
+
if found:
|
|
110
|
+
section.unit = found.group(1)
|
|
111
|
+
if section.unit is None and section.scope is None:
|
|
112
|
+
for line in section.lines[1:]:
|
|
113
|
+
field = re.match(r"^\s*[-*+]\s*单元ID\s*[::]\s*([A-Za-z][\w-]*)\s*$", line.replace("**", ""))
|
|
114
|
+
if field:
|
|
115
|
+
section.unit = field.group(1)
|
|
116
|
+
break
|
|
117
|
+
return lines, sections
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def strip_retired(block_lines, keep_history):
|
|
121
|
+
if keep_history:
|
|
122
|
+
return block_lines
|
|
123
|
+
return [line for line in block_lines if not RETIRED_LINE.match(line)]
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def unit_chapter_range(sections, unit):
|
|
127
|
+
for section in sections:
|
|
128
|
+
if section.unit == unit and section.kind == "单元级" and "剧情单元" in section.title:
|
|
129
|
+
for line in section.lines:
|
|
130
|
+
found = CH_RANGE.search(line)
|
|
131
|
+
if found:
|
|
132
|
+
return int(found.group(1)), int(found.group(2))
|
|
133
|
+
return None
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def slice_arc(section, span):
|
|
137
|
+
"""情绪弧线这类逐章表:只留本单元章区间的行,表头与说明照留。"""
|
|
138
|
+
if span is None:
|
|
139
|
+
return section.lines
|
|
140
|
+
low, high = span
|
|
141
|
+
kept = []
|
|
142
|
+
for line in section.lines:
|
|
143
|
+
row = ARC_ROW.match(line)
|
|
144
|
+
if row and not (low <= int(row.group(1)) <= high):
|
|
145
|
+
continue
|
|
146
|
+
kept.append(line)
|
|
147
|
+
return kept
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def emit(sections, chosen, span, keep_history, note, preamble):
|
|
151
|
+
out = ["\n".join(strip_retired(preamble, keep_history)).rstrip()] if preamble else []
|
|
152
|
+
for section in sections:
|
|
153
|
+
if section not in chosen:
|
|
154
|
+
continue
|
|
155
|
+
body = section.lines
|
|
156
|
+
if "情绪弧线" in section.title or "排班" in section.title:
|
|
157
|
+
body = slice_arc(section, span)
|
|
158
|
+
body = strip_retired(body, keep_history)
|
|
159
|
+
out.append("\n".join(body).rstrip())
|
|
160
|
+
text = "\n\n".join(out)
|
|
161
|
+
sys.stdout.write(text + "\n")
|
|
162
|
+
if note:
|
|
163
|
+
sys.stderr.write(note + "\n")
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def cmd_toc(sections):
|
|
167
|
+
print("%-3s %-6s %-9s %-8s %-46s %s" %
|
|
168
|
+
("#", "行", "作用域", "单元", "段", "字符"))
|
|
169
|
+
for number, section in enumerate(sections, 1):
|
|
170
|
+
size = sum(len(line) + 1 for line in section.lines)
|
|
171
|
+
print("%-3d %-6d %-9s %-8s %-46s %d" %
|
|
172
|
+
(number, section.start + 1, section.kind or "**未声明**",
|
|
173
|
+
(section.unit or "-") + ("(退)" if section.status == "已退役" else ""),
|
|
174
|
+
section.title[:44], size))
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def cmd_check(sections, strict=False):
|
|
178
|
+
problems = []
|
|
179
|
+
warnings = []
|
|
180
|
+
for section in sections:
|
|
181
|
+
if section.kind == "批次底稿":
|
|
182
|
+
for offset, line in enumerate(section.lines):
|
|
183
|
+
if IMPERATIVE.search(line):
|
|
184
|
+
warnings.append(
|
|
185
|
+
("W1", "第%d行" % (section.start + offset + 1),
|
|
186
|
+
"批次底稿里有跨章祈使,写作档不给底稿——确认已下沉到单元级段或细纲:%s"
|
|
187
|
+
% line.strip()[:52]))
|
|
188
|
+
for section in sections:
|
|
189
|
+
where = "第%d行「%s」" % (section.start + 1, section.title[:36])
|
|
190
|
+
if section.scope is None:
|
|
191
|
+
(problems if strict else warnings).append(("E1" if strict else "W2", where, "缺「> 作用域:」声明行;旧段保守纳入"))
|
|
192
|
+
continue
|
|
193
|
+
if section.kind is None:
|
|
194
|
+
problems.append(("E2", where, "作用域值不认识:%s" % section.scope))
|
|
195
|
+
if section.kind in ("单元级", "批次底稿") and section.unit is None:
|
|
196
|
+
problems.append(("E3", where, "单元级/批次底稿段未标单元ID"))
|
|
197
|
+
if section.kind in ("单元级", "批次底稿"):
|
|
198
|
+
for offset, line in enumerate(section.lines):
|
|
199
|
+
if LEAK.search(line) and not POINTER.search(line):
|
|
200
|
+
problems.append(
|
|
201
|
+
("E4", "第%d行" % (section.start + offset + 1),
|
|
202
|
+
"单元块内出现全卷字样,常任规则放错了位置:%s"
|
|
203
|
+
% line.strip()[:56]))
|
|
204
|
+
for code, where, message in problems + warnings:
|
|
205
|
+
print("%s %s %s" % (code, where, message))
|
|
206
|
+
print("---")
|
|
207
|
+
print("段 %d / 问题 %d / 告警 %d(告警不阻断,逐条人工判断)"
|
|
208
|
+
% (len(sections), len(problems), len(warnings)))
|
|
209
|
+
return 1 if problems else 0
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def main():
|
|
213
|
+
parser = argparse.ArgumentParser(add_help=True)
|
|
214
|
+
parser.add_argument("path")
|
|
215
|
+
parser.add_argument("--toc", action="store_true")
|
|
216
|
+
parser.add_argument("--unit")
|
|
217
|
+
parser.add_argument("--contract", action="store_true")
|
|
218
|
+
parser.add_argument("--check", action="store_true")
|
|
219
|
+
parser.add_argument("--history", action="store_true")
|
|
220
|
+
parser.add_argument("--strict", action="store_true", help="新建卷纲校验:缺作用域也视为错误")
|
|
221
|
+
# 排纲底稿现在放在卷纲外的 大纲/排纲底稿_{单元ID}.md,默认输出就是写作要的闭包。
|
|
222
|
+
# --stage outline 只为老卷纲保留:它们的供给自查等底稿还写在卷纲里(作用域:批次底稿)。
|
|
223
|
+
parser.add_argument("--stage", choices=["outline", "write"], default="write",
|
|
224
|
+
help="write(默认)=卷级常任+单元级;"
|
|
225
|
+
"outline=另带老卷纲里仍在用的批次底稿段")
|
|
226
|
+
args = parser.parse_args()
|
|
227
|
+
|
|
228
|
+
if hasattr(sys.stdout, "reconfigure"):
|
|
229
|
+
sys.stdout.reconfigure(encoding="utf-8")
|
|
230
|
+
sys.stderr.reconfigure(encoding="utf-8")
|
|
231
|
+
|
|
232
|
+
try:
|
|
233
|
+
lines, sections = parse(read(args.path))
|
|
234
|
+
except (OSError, UnicodeError) as error:
|
|
235
|
+
sys.stderr.write(f"无法读取卷纲:{error}\n")
|
|
236
|
+
return 2
|
|
237
|
+
if not sections:
|
|
238
|
+
sys.stderr.write("卷纲里没有 ## 段,路径对不对?\n")
|
|
239
|
+
return 2
|
|
240
|
+
|
|
241
|
+
if args.toc:
|
|
242
|
+
cmd_toc(sections)
|
|
243
|
+
return 0
|
|
244
|
+
if args.check:
|
|
245
|
+
return cmd_check(sections, args.strict)
|
|
246
|
+
|
|
247
|
+
invalid = [s for s in sections if s.scope and
|
|
248
|
+
(s.kind is None or (s.kind != "卷级常任" and s.unit is None))]
|
|
249
|
+
if invalid:
|
|
250
|
+
sys.stderr.write("作用域声明无效,先运行 --check 修正\n")
|
|
251
|
+
return 1
|
|
252
|
+
active = [s for s in sections if args.history or s.status != "已退役"]
|
|
253
|
+
permanent = [s for s in active if s.kind == "卷级常任"]
|
|
254
|
+
undeclared = [s for s in active if s.scope is None]
|
|
255
|
+
note = ("%d 段未声明作用域,已保守纳入;用 --check 查看" % len(undeclared)) if undeclared else None
|
|
256
|
+
preamble = lines[:sections[0].start]
|
|
257
|
+
if args.contract:
|
|
258
|
+
emit(sections, set(permanent + undeclared), None, args.history, note, preamble)
|
|
259
|
+
return 0
|
|
260
|
+
|
|
261
|
+
if args.unit:
|
|
262
|
+
unit = args.unit
|
|
263
|
+
owned = [s for s in active if s.unit == unit]
|
|
264
|
+
if not owned:
|
|
265
|
+
sys.stderr.write(
|
|
266
|
+
"找不到单元 %s —— 不静默降级。核对单元ID,或先补卷纲。\n" % unit)
|
|
267
|
+
return 1
|
|
268
|
+
if args.stage == "write":
|
|
269
|
+
# 写作档不给批次底稿:它是排纲期的工作底稿,其中有写作期约束力的条目
|
|
270
|
+
# 必须已经下沉到单元级段或细纲(见 artifact-protocols.md 段位契约「排纲底稿不进卷纲」)
|
|
271
|
+
live = [s for s in owned if s.kind == "单元级"]
|
|
272
|
+
else:
|
|
273
|
+
live = [s for s in owned
|
|
274
|
+
if s.kind == "单元级"
|
|
275
|
+
or s.kind == "批次底稿"]
|
|
276
|
+
chosen = set(permanent + live + undeclared)
|
|
277
|
+
span = unit_chapter_range(active, unit)
|
|
278
|
+
emit(sections, chosen, span, args.history, note, preamble)
|
|
279
|
+
return 0
|
|
280
|
+
|
|
281
|
+
parser.print_help()
|
|
282
|
+
return 2
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
if __name__ == "__main__":
|
|
286
|
+
sys.exit(main())
|
|
@@ -10,14 +10,14 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
10
10
|
|
|
11
11
|
**核心原则:机械索引建立后复用;正常提取时每个原文块只读一次,同次产生逐章事实和跨章观察;失败重试按计划回看,聚合阶段复用落盘结果。**
|
|
12
12
|
|
|
13
|
-
> Agent
|
|
13
|
+
> Agent 兼容性:只检查当前运行时自己的 agent 目录。运行时不支持项目 agent 或找不到文件时降级 solo/direct,并报告 `Fallback: project custom agents unavailable -> solo`。ZCode 3.3.4 不提供项目 custom agents,直接按此规则降级,不扫描其他 CLI 的 agent 目录。
|
|
14
14
|
>
|
|
15
|
-
> Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version:
|
|
15
|
+
> Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 36` 不一致时(标记缺失、字段缺失/非整数、小于或大于 36)照常按文件存在性检查并 spawn,同时报告 `Notice: agents bundle 版本不匹配(项目 {N},本版 36)` 并提示重新运行 `/story-setup` 后新开会话;大于 36 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct。
|
|
16
16
|
|
|
17
17
|
## 分析边界
|
|
18
18
|
|
|
19
19
|
1. 只根据可读原文和已有资料下结论;缺失写“未知”或“文本未明确”。
|
|
20
|
-
2. 硬事实附章节、`source_locator` 或 5–15
|
|
20
|
+
2. 硬事实附章节、`source_locator` 或 5–15 字定位词;推断标证据等级。
|
|
21
21
|
3. 区分客观发生顺序、文本披露顺序、读者所知和角色所知。
|
|
22
22
|
4. 分开分析事件推进、读者情绪和篇幅安排,分数不能代替解释。
|
|
23
23
|
5. 只迁移抽象机制,不复刻专有设定、角色组合、关键事件链、标志性场面或原句。
|
|
@@ -27,6 +27,12 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
27
27
|
|
|
28
28
|
对话回复、`快速预览.md`、`拆文报告.md` 和人物关系图按 [references/author-facing.md](references/author-facing.md) 写,讲清书中情节、阅读感受和可借鉴写法。内部字段、命令与质量指标留在运行资料中;编号带名称。脚本返回 `author_message` 时转述说明与选项。
|
|
29
29
|
|
|
30
|
+
## 运行约定
|
|
31
|
+
|
|
32
|
+
- `{PYTHON}`:依次试 `python3`、`python`、`py -3`,用第一个能运行的。`{story-long-analyze skill 根}` 是本文件所在目录,`{拆文目录}` 是 `拆文库/{书名}/`。
|
|
33
|
+
- 首次拆一本书时,把作者给的 TXT 存为 `{拆文目录}/原文/原文.txt`;若编码不是 UTF-8(常见为 GBK),先转成 UTF-8,否则子代理按行号读取时会乱码。
|
|
34
|
+
- 全文不足 2 万字或认不出章节标题时多半是短篇,建议作者改用 `/story-short-analyze`;作者坚持或由导入调用(篇幅已在导入时定好)时照常按长篇拆。
|
|
35
|
+
|
|
30
36
|
## 按时刻读
|
|
31
37
|
|
|
32
38
|
进入各阶段时只加载下表对应的说明,续跑或新会话通过落盘产物和 `_progress.md` 的阶段状态衔接。[references/author-facing.md](references/author-facing.md) 每个时刻都按需用。
|
|
@@ -35,11 +41,13 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
35
41
|
|---|---|---|
|
|
36
42
|
| Phase 1–2、Stage 0–1 开头三章 | 本文件 + [stage1-golden-chapters.md](references/stage1-golden-chapters.md);原文变了或章号对不上时加 [index-rebuild.md](references/index-rebuild.md) | 黄金三章与快速预览落盘,标 `stage1` |
|
|
37
43
|
| Stage 2 逐批提取 | [pipeline-ops.md](references/pipeline-ops.md);子代理不可用、自己写批次时加 [stage2-extraction.md](references/stage2-extraction.md) | 全部摘要落盘,标 `stage2` |
|
|
38
|
-
|
|
|
44
|
+
| 补缺 / 增强(检查器给出 `repair_stages`、`enhance_existing`,或写作端请作者来补拆) | 本文件「Phase 2」两张表,再按缺的那个 Stage 读下面对应一行 | 只补缺的产物,各自标阶段 |
|
|
45
|
+
| Stage 3 剧情与节奏 | [synthesis-inputs.md](references/synthesis-inputs.md) + [stage3-plot-rhythm.md](references/stage3-plot-rhythm.md) | 节奏与情绪模块落盘,标 `stage3` |
|
|
39
46
|
| Stage 4 角色与设定 | [synthesis-inputs.md](references/synthesis-inputs.md) + [stage4-characters-settings.md](references/stage4-characters-settings.md) | 角色与设定落盘,标 `stage4` |
|
|
40
47
|
| Stage 5 主报告 | [synthesis-inputs.md](references/synthesis-inputs.md) + [stage5-report.md](references/stage5-report.md) | 报告落盘,标 `stage5` |
|
|
41
|
-
| Stage 6 文风 | [style-profile-generator.md](references/style-profile-generator.md)
|
|
48
|
+
| Stage 6 文风 | [style-profile-generator.md](references/style-profile-generator.md) | `文风.md` 落盘,标 `stage6` |
|
|
42
49
|
| 全部拆完 | [final-checks.md](references/final-checks.md) | 按 author-facing「全部拆完」汇报 |
|
|
50
|
+
| 灵感库(作者提出「灵感库 / 提炼灵感 / 跨书灵感聚合 / 更新灵感库」时) | [references/inspiration-library.md](references/inspiration-library.md) | 只写 `灵感库/`,不改拆文产物 |
|
|
43
51
|
|
|
44
52
|
## Phase 1:确认对象并检查目录
|
|
45
53
|
|
|
@@ -49,92 +57,47 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
49
57
|
"{PYTHON}" "{story-long-analyze skill 根}/scripts/inspect_existing_assets.py" --root "拆文库/{书名}" --compact
|
|
50
58
|
```
|
|
51
59
|
|
|
52
|
-
|
|
60
|
+
路径错误必须停止。已有摘要一律不覆盖:要重拆某章就删掉它的 `章节/第N章_摘要.md` 和覆盖它的 `_analysis_cache/批次-*.md`(只删摘要会从缓存原样补回),整本重拆就换一个新目录。`schema_version` 只报告,不作为新旧门禁,也不得在复用时改写。新旧投影混存要报告来源,但不要求重拆。
|
|
53
61
|
|
|
54
|
-
## Phase 2
|
|
62
|
+
## Phase 2:按检查结果走哪条路
|
|
63
|
+
|
|
64
|
+
| `recommended_path` | 做什么 |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `new_analysis` | 全新小说:Stage 0 建索引 → Stage 1 → 停下来问 → Stage 2–6 |
|
|
67
|
+
| `continue_partial` | 部分完成:缺索引时补建;Stage 1 产物(前三章深度拆解、`快速预览.md`)缺哪份补哪份,已有的不覆盖,齐了标 `stage1`;再 `plan --intent continue` 只补缺章,按 Stage 3–6 补齐 |
|
|
68
|
+
| `direct_use` | 完整旧成果:直接使用,不建索引、不读原文;作者明确要求增强时才 `plan --intent enhance` |
|
|
69
|
+
| `repair_stages` | 逐章成果已齐,只缺后面的产物:按下表逐项补 |
|
|
70
|
+
| `enhance_existing` | 有逐章成果但不成套:总章数不明时先建索引再检查;缺摘要时 `plan --intent continue` 从旧成果补(不读原文);作者要求增强时用 `--intent enhance` |
|
|
55
71
|
|
|
56
|
-
|
|
|
72
|
+
| `stage_repairs` 代码 | 补哪一步 |
|
|
57
73
|
|---|---|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
74
|
+
| `stage3_emotion`、`stage3_rhythm` | Stage 3:补缺的那份(情绪模块或节奏) |
|
|
75
|
+
| `stage6_style` | Stage 6:文风 |
|
|
76
|
+
| `stage3`、`stage4`、`stage5`、`stage6` | 没标完成:产物都在且合格就只 `mark-stage`,不重写;缺了才重做 |
|
|
61
77
|
|
|
62
|
-
|
|
78
|
+
有多项时按 Stage 顺序逐项补完并标记。情绪模块卡字段不全(灵感库登记报错)时,检查器不会报缺:作者同意后把旧 `剧情/情绪模块.md` 复制到 `_analysis_cache/legacy/`,按 Stage 3 只改出错的卡,再标 `stage3`。Stage 3–5 只用已有成果和批次缓存,不读原文;没有批次缓存的旧项目用 `digest` 取逐章字段,再加上已有剧情、关系资料。写作端「对标书还缺情绪/节奏分析」「缺文风」分别对应这里的 Stage 3、Stage 6。
|
|
63
79
|
|
|
64
80
|
### 固定交付接口
|
|
65
81
|
|
|
66
82
|
- `拆文报告.md`、`概要.md`、`快速预览.md`;
|
|
67
|
-
- `章节/第1
|
|
68
|
-
-
|
|
83
|
+
- `章节/第1章_深度拆解.md`、`章节/第2章_深度拆解.md`、`章节/第3章_深度拆解.md`,`章节/第N章_摘要.md`;
|
|
84
|
+
- `剧情/README.md`、`剧情/故事线.md`、剧情单元、`剧情/节奏.md`、`剧情/情绪模块.md`、`剧情/散落情节.md`;
|
|
69
85
|
- `角色/`、`设定/`、`人物关系图/`、`文风.md`;
|
|
70
86
|
- `chapter_index.csv`、`_progress.md`、`_analysis_cache/`。
|
|
71
87
|
|
|
72
88
|
`拆文报告.md` 是阅读入口。剧情单元管因果事实,`剧情/节奏.md` 管信息推进与三维节奏,`剧情/情绪模块.md` 管读者需求和复现机制,`角色/角色关系.md` 管关系事实,`文风.md` 管表达层。
|
|
73
89
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
| 阶段 | 输入 | 主要输出 | 完成判断 |
|
|
77
|
-
|---|---|---|---|
|
|
78
|
-
| 0 机械索引 | 原文 | `chapter_index.csv`、`概要.md` 初稿(Stage 5 覆盖) | 章界、逐章 hash 和全源 hash 有效 |
|
|
79
|
-
| 1 黄金三章 | 前三章原文 | 深度拆解、快速预览、可选 `_style-sample.txt` | 深度拆解与快速预览完整;同次阅读可保存文风样本 |
|
|
80
|
-
| 2 连续块提取 | 只读计划列出的旧成果或原文块 | 批次缓存;缺失逐章摘要投影 | 缓存完整、摘要存在、状态范围 hash 有效 |
|
|
81
|
-
| 3 剧情与机制 | 批次缓存和可信旧成果 | 剧情单元、故事线、节奏、情绪模块 | 文件存在、阶段状态完成 |
|
|
82
|
-
| 4 角色与设定 | 批次涉及人物、状态变化、关系观察 | 角色、设定、关系图 | 文件存在、阶段状态完成 |
|
|
83
|
-
| 5 主报告 | 权威底层结果 | 拆文报告、完整概要 | 文件存在、阶段状态完成 |
|
|
84
|
-
| 6 文风 | 既有资料、样本或索引定点原文 | `文风.md` | 文件存在、阶段状态完成 |
|
|
85
|
-
|
|
86
|
-
用户未要求一次跑完时,Stage 1 后按 author-facing.md「开头三章拆完、停下来问」询问是否继续;要求一次跑完、多本书一起拆或由导入自动续跑时不停下询问。Stage 2 默认有限并行(每轮 3 批),不请作者选派发方式;作者问起或明确要求时再按 author-facing「作者问起怎么拆」解释并切换(见 pipeline-ops「执行与提交一个批次」)。续跑不重复 Stage 0/1。Stage 3–5 不重读原文。Stage 6 可按索引定点读取 4–6 段原文锚点,但不重扫全书。
|
|
87
|
-
|
|
88
|
-
## Stage 0:机械章节索引
|
|
89
|
-
|
|
90
|
-
全新和部分完成运行:
|
|
91
|
-
|
|
92
|
-
```text
|
|
93
|
-
"{PYTHON}" "{story-long-analyze skill 根}/scripts/build_chapter_index.py" --source "{拆文目录}/原文/原文.txt" --output "{拆文目录}/chapter_index.csv" --locator-path "原文/原文.txt"
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
完整旧成果直接使用或纯增强时不建索引。索引只含机械事实:
|
|
97
|
-
|
|
98
|
-
```csv
|
|
99
|
-
chapter,source_chapter,volume,title,start_line,end_line,char_count,source_locator,status,chapter_sha256,source_sha256,parser_version
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
只按 LF 计物理行。支持楔子、序章、第0章、任意正文起始章、番外、后记、中文大数、英文章号、多卷重置和卷章组合。目录与正文标题重复时先剔掉目录块;落表前校验章号连续、无重复和边界有效,其中特殊章独立编号,正文允许从任意首章开始。原文变化先拒绝;脚本因原文变化、章号对不上而停下并返回 `author_message` 时,读 [references/index-rebuild.md](references/index-rebuild.md),把说明和选项转告作者(默认推荐按旧章号继续)。
|
|
103
|
-
|
|
104
|
-
`概要.md` 初稿只按章节标题、卷段结构和抽样开头/结尾写,模板见 [references/stage1-golden-chapters.md](references/stage1-golden-chapters.md)。
|
|
105
|
-
|
|
106
|
-
## Stage 1:黄金三章
|
|
107
|
-
|
|
108
|
-
按索引读前三章原文,同一次阅读写三份单章深度拆解、可选 `_style-sample.txt`,再写 `快速预览.md`(模板在 author-facing.md「快速预览.md」);深度拆解与文风样本模板见 [references/stage1-golden-chapters.md](references/stage1-golden-chapters.md)。黄金三章与快速预览落盘后运行 `manage_analysis_run.py mark-stage --stage stage1`,再按上方规则停下来问或继续。
|
|
109
|
-
|
|
110
|
-
## Stage 2:计划、提取、提交
|
|
111
|
-
|
|
112
|
-
按 [references/pipeline-ops.md](references/pipeline-ops.md) 执行:`manage_analysis_run.py plan` 出只读计划(用户明确增强用 `--intent enhance`,逐批加 `--next`,只拆一段加 `--chapters 起-止`),每批派一个 `chapter-extractor`,只照抄计划里这一批的字段;子代理自己读原文、把结果写进 `_analysis_cache/输入-{批次ID}.md`、只回一行回执,主会话不转贴原文、不读这份输入,直接 `commit`。批次过大或连续失败用 `split`,中断用 `repair-progress`。计划不再有批次、全部摘要落盘后运行 `manage_analysis_run.py mark-stage --stage stage2`。
|
|
113
|
-
|
|
114
|
-
## Stage 3:剧情、双时间线与三维节奏
|
|
115
|
-
|
|
116
|
-
按 [references/stage3-plot-rhythm.md](references/stage3-plot-rhythm.md) 生成剧情单元、故事线、`剧情/节奏.md` 与 `剧情/情绪模块.md`,取料用 `digest`(见 synthesis-inputs.md)。两份权威文件都落盘后运行 `manage_analysis_run.py mark-stage --stage stage3 --output "剧情/节奏.md"`。
|
|
117
|
-
|
|
118
|
-
## Stage 4:角色、设定与关系
|
|
119
|
-
|
|
120
|
-
按 [references/stage4-characters-settings.md](references/stage4-characters-settings.md) 生成角色档案、设定和 `角色/角色关系.md`,关系图只从该文件用 `render_relation_chart.py` 生成。至少一份角色档案和一份设定文件落盘后运行 `manage_analysis_run.py mark-stage --stage stage4`;缺任一类文件时不得标完成。
|
|
121
|
-
|
|
122
|
-
## Stage 5:主报告
|
|
123
|
-
|
|
124
|
-
报告按 author-facing.md「拆文报告.md」写:拆到哪、核心发现、读者在追什么、故事怎么推进、人物与关系、读者与角色的信息差、节奏、核心机制、可借鉴套路、不建议模仿、文风一句话、还不确定的地方。生成新报告前运行 `manage_analysis_run.py mark-stage --stage stage5 --prepare`,新报告与完整概要落盘后再运行 `manage_analysis_run.py mark-stage --stage stage5`(细则见 [references/stage5-report.md](references/stage5-report.md))。报告只综合底层结果,不再次阅读全文。
|
|
125
|
-
|
|
126
|
-
如项目存在 `选题决策.md`,只回填仍标记“待拆文验证”且题材匹配的项。没有「推荐选题」一节(只扫了榜)就跳过回填,不算无效;有推荐选题但缺少当前契约必需的“能爆的原因”等字段时返回 `invalid_topic_decision_contract`,提示重跑 `story-long-scan` Phase 5;文件不存在不影响拆文。
|
|
127
|
-
|
|
128
|
-
## Stage 6:文风与单独重建
|
|
129
|
-
|
|
130
|
-
加载 [references/style-profile-generator.md](references/style-profile-generator.md)。优先使用已有 `文风.md` 和有效 `_style-sample.txt`;样本不足时允许依据索引选择 4–6 章、定点读取原文行段。只缺文风时直接运行 Stage 6,不重跑 Stage 1–5。没有有效样本,且无法通过索引取得原文片段时明确失败,不生成锚点全空的可用档案。
|
|
131
|
-
|
|
132
|
-
## 三层灵感库管道(可选后置)
|
|
90
|
+
## 各阶段要点
|
|
133
91
|
|
|
134
|
-
|
|
92
|
+
- **Stage 0 机械索引**:全新和部分完成且要读原文时建 `chapter_index.csv`(命令见 stage1-golden-chapters.md)。只按 LF 计物理行,目录与正文标题重复时先剔掉目录块;落表前校验章号连续、无重复和边界有效。脚本因原文变化或章号对不上停下时读 index-rebuild.md,把说明和选项转告作者(默认推荐按旧章号继续)。
|
|
93
|
+
- **Stage 1 黄金三章**:按索引读前三章,同一次阅读写三份单章深度拆解、可选 `_style-sample.txt` 和 `快速预览.md`,再运行 `manage_analysis_run.py mark-stage --stage stage1`。作者没要求一次跑完时按 author-facing「开头三章拆完、停下来问」询问;要求一次跑完、多本书一起拆或由导入自动续跑时不停。
|
|
94
|
+
- **Stage 2 逐批提取**:`plan` 出只读计划,每批派一个 `chapter-extractor`,默认有限并行(每轮 3 批),作者问起才解释并切换拆法;子代理自己读原文并写批次输入,主会话不转贴、不读它,直接 `commit`。细则见 pipeline-ops.md。
|
|
95
|
+
- **Stage 3–5**:用 `digest` 取料,不重读原文;怎么标阶段见 synthesis-inputs.md「阶段标记」;Stage 5 写新报告前先 `mark-stage --stage stage5 --prepare` 备份旧报告。
|
|
96
|
+
- **选题回填**:Stage 5 报告落盘后找 `选题决策.md`,只回填仍标记“待拆文验证”且题材匹配的项(查找位置与写法见 stage5-report.md)。没有「推荐选题」一节(只扫了榜)就跳过,不算无效;有推荐选题但缺少当前契约必需的“能爆的原因”等字段时返回 `invalid_topic_decision_contract`,提示重跑 `story-long-scan` Phase 5;文件不存在不影响拆文。
|
|
97
|
+
- **Stage 6 文风**:优先用已有 `文风.md` 和有效 `_style-sample.txt`,样本不足时按索引定点读 4–6 段原文,不重扫全书;只缺文风时直接运行,不重跑 Stage 1–5。取不到可核验原句时明确失败。
|
|
135
98
|
|
|
136
99
|
## 状态与旧项目
|
|
137
100
|
|
|
138
|
-
运行状态只有 `_progress.md` 受管区;既有 `schema_version: 2` 原值保留;`chapter_index.csv`
|
|
101
|
+
运行状态只有 `_progress.md` 受管区;既有 `schema_version: 2` 原值保留;`chapter_index.csv` 是机械索引;缓存是恢复证据。有阶段记录后 `最终状态` 由脚本写:Stage 3–6 都完成为 `completed`,否则新项目写 `pending`、旧项目保留原值(只改原有那一行);会话 hooks 靠它判断拆文是否完成,不要手改。
|
|
139
102
|
|
|
140
103
|
全部完成后按 [references/final-checks.md](references/final-checks.md) 做收尾检查,再按 author-facing.md「全部拆完」向作者汇报。
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
一句话判断:{开篇靠什么抓人、主角怎么立住,一两句}。
|
|
23
23
|
最值得学的一点:{最有借鉴价值的写法,一句}。
|
|
24
24
|
|
|
25
|
-
要继续把后面 {剩余章数} 章也拆完吗?我建议{继续 / 只拆第 X–Y 章这一段 / 到此为止},因为{理由}。
|
|
26
|
-
|
|
25
|
+
要继续把后面 {剩余章数} 章也拆完吗?我建议{继续 / 先拆到第一卷末 / 只拆第 X–Y 章这一段 / 到此为止},因为{理由}。
|
|
26
|
+
继续的话我每次同时拆三段(每段最多三章),全部拆完大约要 {轮数} 轮;段和段之间的人物称呼、没收尾的剧情在最后汇总时对齐。
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
是否继续,等你决定。
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
### 作者问起怎么拆
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
```text
|
|
62
62
|
《{书名}》拆完了:共 {总章数} 章、约 {总字数} 万字,{全部拆完 / 第 {x}–{y} 章没拆成:{原因}}。
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
这本书最值得学的{一到三}点:
|
|
65
65
|
1. {开篇怎么钩住读者——在第几章、用了什么手法}
|
|
66
66
|
2. {读者追着看的核心情绪或爽点,怎样一次次兑现}
|
|
67
67
|
3. {节奏上的特点:哪里快、哪里慢、为什么这样安排}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
去哪看:
|
|
76
76
|
- 先看总报告:拆文报告.md
|
|
77
|
-
- 开头三章逐章怎么写的:章节/第1
|
|
77
|
+
- 开头三章逐章怎么写的:章节/第1章_深度拆解.md 到 第3章_深度拆解.md
|
|
78
78
|
- 节奏和信息怎么一步步放出来:剧情/节奏.md
|
|
79
79
|
- 读者爱看的情绪套路(可以拿去用的模块):剧情/情绪模块.md
|
|
80
80
|
- 故事主线和每段剧情:剧情/故事线.md 和 剧情/ 下的各段
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
{需要你定的:一个问题 + 推荐选项;没有就不写这一段}
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
只拆了一部分或只补了几个文件时,「去哪看」只列这次新增或更新的文件,并说清哪些是上次就有的。
|
|
90
90
|
|
|
91
91
|
### 停下来或出错时
|
|
92
92
|
|
|
@@ -128,7 +128,11 @@
|
|
|
128
128
|
|
|
129
129
|
## 基本信息
|
|
130
130
|
|
|
131
|
-
书名
|
|
131
|
+
书名:{书名}
|
|
132
|
+
题材:{题材}
|
|
133
|
+
总章数:{总章数}
|
|
134
|
+
总字数:{总字数} 万
|
|
135
|
+
目标平台:{原书所在平台,看不出来就留空}
|
|
132
136
|
|
|
133
137
|
## 黄金三章评分
|
|
134
138
|
|
|
@@ -162,7 +166,7 @@
|
|
|
162
166
|
|
|
163
167
|
## 拆文报告.md
|
|
164
168
|
|
|
165
|
-
|
|
169
|
+
这是全书的阅读入口,只综合落盘的剧情、节奏、情绪模块、角色、设定和文风结果,不为写报告重读全文,也不复制逐章摘要;细节写一句结论再指向对应文件。这几个小节名有下游在读,保留原名:「基本信息」(写作端读题材,导入读题材与目标平台)、「核心发现」「读者在追什么」「伏笔与冲突」(导入;核心发现也用于选题回填)、「不建议模仿」(写作排卷纲)、「写法技巧」「可借鉴套路」「文风一句话」(文风)。
|
|
166
170
|
|
|
167
171
|
```markdown
|
|
168
172
|
# 拆文报告:{书名}
|
|
@@ -172,7 +176,11 @@
|
|
|
172
176
|
|
|
173
177
|
## 基本信息
|
|
174
178
|
|
|
175
|
-
书名
|
|
179
|
+
书名:{书名}
|
|
180
|
+
题材:{题材}
|
|
181
|
+
总章数:{总章数}
|
|
182
|
+
总字数:{总字数} 万
|
|
183
|
+
目标平台:{原书所在平台,看不出来就留空}
|
|
176
184
|
|
|
177
185
|
## 核心发现
|
|
178
186
|
|
|
@@ -192,7 +200,7 @@
|
|
|
192
200
|
|
|
193
201
|
## 人物与关系
|
|
194
202
|
|
|
195
|
-
|
|
203
|
+
主角、主要对手、核心配角各一两句:是谁、想要什么、在故事里起什么作用;功能角色只列名字和戏份。
|
|
196
204
|
关系图见 人物关系图/人物关系图.md(有图片版时在这里嵌入 人物关系图/核心人物关系.png)。
|
|
197
205
|
关键关系的变化逐条写成「甲 → 乙:由……到……(第几章,因为……)」;甲保护乙、乙依赖甲这类方向不同的关系分开写。
|
|
198
206
|
|
|
@@ -214,22 +222,12 @@
|
|
|
214
222
|
|
|
215
223
|
跨章较远或影响主线的伏笔:在第几章埋下、第几章揭开、揭开时读者是什么感受。冲突怎么一级级升级,最后落到哪里。
|
|
216
224
|
|
|
217
|
-
## 核心机制
|
|
218
|
-
|
|
219
|
-
这本书反复使用的爽点类型、节奏套路和更新上的做法,各一两句。
|
|
220
|
-
|
|
221
|
-
## 角色体系
|
|
222
|
-
|
|
223
|
-
主角 / 对手 / 核心配角 / 功能性角色各有哪些人、分别承担什么戏份。
|
|
224
|
-
|
|
225
225
|
## 可借鉴套路
|
|
226
226
|
|
|
227
|
-
|
|
228
|
-
2. ……
|
|
229
|
-
|
|
230
|
-
## 可复现模块
|
|
227
|
+
先用一两句说这本书反复使用的爽点类型和节奏套路,再列最值得复用的几条(最多三条):
|
|
231
228
|
|
|
232
|
-
|
|
229
|
+
1. {套路名}:读者想看什么、情绪怎么一步步推上去、在什么场景用、第几章能看到、换书时哪些要换掉、哪些不能照搬(原书专名、事件顺序、标志性台词)(对应情绪模块卡「{模块名}」(EM-{编号}))
|
|
230
|
+
2. ……
|
|
233
231
|
|
|
234
232
|
## 写法技巧
|
|
235
233
|
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 收尾检查
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
全书或本次指定范围拆完后执行。检查全部通过后,按 [author-facing.md](author-facing.md)「全部拆完」给作者汇报;下面这些检查结果不写进汇报。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
检查全部通过后,按 [author-facing.md](author-facing.md)「全部拆完」给作者汇报;下面这些检查结果不写进汇报。
|
|
8
|
-
|
|
9
|
-
- 再运行检查器和计划器;完整项目应 `direct_use`;`continue` 应在本次指定范围内无待处理批次;
|
|
5
|
+
- 再运行检查器和计划器:完整项目应 `direct_use`;`continue` 在本次指定范围内无待处理批次;
|
|
10
6
|
- 完整管道及其续跑确认「文风一句话」已根据 `文风.md` 补齐;单独补旧项目文风时保留已有报告;
|
|
11
|
-
-
|
|
12
|
-
- 常规增强与恢复只补缺失产物、新证据和 `_progress.md`
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
## 维护者回归
|
|
17
|
-
|
|
18
|
-
改动本 skill 后必须回归:黄金三章、逐章摘要、情绪模块、节奏、角色、设定、文风、导入、对标和写作仍可用;旧完整项目直接使用;部分项目只补精确缺章;混存项目报告来源但不重拆;增强/恢复不改旧产物与原 schema。报告未执行的真实模型或跨平台检查,不得用静态 fixture 冒充。
|
|
19
|
-
|
|
20
|
-
联合验收用 [semantic-acceptance-fixtures.md](semantic-acceptance-fixtures.md) 的六项 0–2 分表,真实模型结果至少 10/12 且无硬失败才算语义通过。
|
|
7
|
+
- 检查受保护路径:旧 `章节/`、`剧情/`、`角色/`、`设定/`、`文风.md` 不得被常规增强或恢复流程改写;明确请求重建文风、主报告或修情绪模块卡时,按各自的说明处理;
|
|
8
|
+
- 常规增强与恢复只补缺失产物、新证据和 `_progress.md` 受管状态区;
|
|
9
|
+
- 旧 `schema_version` 原值未变;
|
|
10
|
+
- 新投影的情节点序列、主题、基调、类型和“涉及”字段能被导入与写作流程读取;
|
|
11
|
+
- 找到过 `选题决策.md` 时,确认回填只改了题材匹配的选题那一行。
|