@oh-story/dsh 0.1.16 → 0.1.18
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 +13 -13
- package/lib/client.js +173 -111
- package/lib/client.js.map +3 -3
- package/lib/drama/package.json +4 -0
- package/lib/index.js +58 -28
- 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/game-preview-state.d.ts +34 -0
- package/lib/types/client/game-preview-state.d.ts.map +1 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/video-studio.d.ts +24 -0
- package/lib/types/client/video-studio.d.ts.map +1 -1
- package/lib/types/host-python.d.ts +10 -3
- package/lib/types/host-python.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 +6 -0
- 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
|
@@ -1,109 +1,105 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 结构迁移(短篇)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
按本文件把 `拆文库/{导入书名}/` 迁成 `{导入书名}/`。书目录名与拆文目录名相同,写正文守卫据此放行正文迁移。
|
|
4
|
+
|
|
5
|
+
外部对标、目标平台、完本与否和作者交代取自导入记录。`设定.md` 和 `小节大纲.md` 按短篇写作的构思模板写,续写时直接过它的构思检查;原文证据不够、要等构思时定的项写 `[待补充]`,汇报时列给作者。
|
|
4
6
|
|
|
5
7
|
## 迁移步骤
|
|
6
8
|
|
|
7
|
-
目标工程只有 `{
|
|
9
|
+
目标工程只有 `{导入书名}/设定.md`、`小节大纲.md`、`正文.md` 三个单文件,外加可选的 `对标/{对标书名}/`(仅外部对标引用视图)。正文是单文件、不切章,**不产** `追踪/`、`大纲/`、`正文/` 等长篇目录,迁移时严禁误建。
|
|
8
10
|
|
|
9
|
-
1.
|
|
10
|
-
2. **设定生成**:从 `拆文报告.md`、`写作手法.md` 反推 `{
|
|
11
|
-
3. **小节大纲生成**:以 `拆文报告.md
|
|
12
|
-
4. **外部对标引用视图(可选)**:仅当导入记录已显式绑定外部 `{对标书名}`
|
|
11
|
+
1. **正文迁移**:把 `拆文库/{导入书名}/原文/` 的全文迁成单文件 `{导入书名}/正文.md`,只按下方「正文.md 外壳整理」改格式。原文是作者的成稿,分段、引号、措辞一律不改。
|
|
12
|
+
2. **设定生成**:从 `拆文报告.md`、`写作手法.md`、`情节节点.md` 反推 `{导入书名}/设定.md`,按下方「设定.md 模板」写。
|
|
13
|
+
3. **小节大纲生成**:以 `拆文报告.md`「结构划分」确定各段功能,再从 `情节节点.md` 提取事件,反推 `{导入书名}/小节大纲.md`,填法见下方「小节大纲.md 反推规则」。
|
|
14
|
+
4. **外部对标引用视图(可选)**:仅当导入记录已显式绑定外部 `{对标书名}` 时,按下方「外部对标引用视图」同步;没有绑定则跳过。不得把 `拆文库/{导入书名}/` 整体复制进 `对标/`。
|
|
13
15
|
|
|
14
16
|
迁完按文末质量检查清单自检,在导入记录勾「结构迁移」,直接进入 Phase 5 汇报。
|
|
15
17
|
|
|
16
18
|
---
|
|
17
19
|
|
|
18
|
-
## 与长篇的关键差异
|
|
19
|
-
|
|
20
|
-
| 维度 | 短篇 | 长篇 |
|
|
21
|
-
|------|------|------|
|
|
22
|
-
| 正文 | 单文件 `正文.md`,**不切章** | `正文/第XXX章_章名.md` 多文件 |
|
|
23
|
-
| 追踪目录 | **不产** `追踪/` | 产 `追踪/`(`_tracking-state.json`、续写状态卡、逐章记录、角色快照、伏笔视图、双视角时间线) |
|
|
24
|
-
| 角色状态 | **不产**角色追踪 | 核心角色各产 `追踪/角色状态/{角色名}.md`,由 `character-state-reverse.md` 反推 |
|
|
25
|
-
| 大纲体系 | **不产** 卷纲、细纲 | 产 `大纲/卷纲_第X卷.md` + `大纲/细纲_第N章.md` |
|
|
26
|
-
| 大纲目录 | **不产** `大纲/` 目录 | 产 |
|
|
27
|
-
| 续写衔接 | story-short-write Phase 3(逐场景写作) | story-long-write 日更循环 |
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
20
|
## 映射总览
|
|
32
21
|
|
|
33
22
|
| 拆书产物 | 短篇工程文件 | 转换方式 |
|
|
34
23
|
|---------|------------|---------|
|
|
35
|
-
| 原文全文(`拆文库/{导入书名}/原文/`) | `{
|
|
36
|
-
| `拆文报告.md
|
|
37
|
-
| `拆文报告.md
|
|
38
|
-
|
|
|
39
|
-
| `拆文库/{对标书名}/` | `{
|
|
24
|
+
| 原文全文(`拆文库/{导入书名}/原文/`) | `{导入书名}/正文.md` | 单文件迁移,只整理格式 |
|
|
25
|
+
| `拆文报告.md`「故事核」「题材」「人物分析」「情感曲线」「反转分析」 | `{导入书名}/设定.md` | 反推本书核心框架;不继承报告中可能存在的自对标登记 |
|
|
26
|
+
| `拆文报告.md`「结构划分」 + `情节节点.md` | `{导入书名}/小节大纲.md` | 按结构功能组织事件,无法确认的格子写 `[待补充]` |
|
|
27
|
+
| `写作手法.md` | `{导入书名}/设定.md`「文风约定」「本书续写基线」 | 记下原文已经在用的写法 |
|
|
28
|
+
| `拆文库/{对标书名}/` | `{导入书名}/对标/{对标书名}/` | 可选:仅同步用户显式绑定的外部参考作品 |
|
|
40
29
|
|
|
41
30
|
---
|
|
42
31
|
|
|
43
|
-
## 设定.md
|
|
32
|
+
## 设定.md 模板
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### 区块一:核心框架
|
|
48
|
-
|
|
49
|
-
从 `拆文报告.md` 的故事核、结构划分、人物分析等部分提取。目标平台优先采用导入记录;反转类型沿用拆文结果,无反转时不补造反转。情绪名称取自情感曲线,强度按 1-10 量表重新判断,不照抄曲线的 -9~+9 分值。
|
|
34
|
+
小节和字段名与短篇写作构思时的 `设定.md` 一致,续写构思只补缺项、不重写。目标平台优先采用导入记录;反转类型沿用拆文结果,无反转时不补造反转。情绪名称取自拆文报告「情感曲线」,强度按 1-10 量表重新判断,不照抄曲线的 -9~+9 分值。
|
|
50
35
|
|
|
51
36
|
```markdown
|
|
52
37
|
## 短篇核心框架
|
|
53
38
|
|
|
54
39
|
### 基本信息
|
|
55
|
-
-
|
|
56
|
-
- 目标字数:{
|
|
57
|
-
- 目标平台:{
|
|
58
|
-
-
|
|
40
|
+
- 标题(暂定):{导入书名}
|
|
41
|
+
- 目标字数:{完本:各节字数之和;半成品:作者定的全篇字数,没定写 [待补充]} 字
|
|
42
|
+
- 目标平台:{导入记录里的平台,知乎盐言 / 番茄 / 七猫 / 黑岩 / 红果 / 小程序 / 未定 选一}
|
|
43
|
+
- 平台基调:{原文实际用的小节标记、引号和分段习惯,原样记下,续写沿用;视角、节尾钩子、结局质感从原文归纳}
|
|
44
|
+
- 目标情绪:{从拆文报告「情感曲线」「爆点分析」提取读者读完的感受}
|
|
59
45
|
|
|
60
46
|
### 一句话梗概
|
|
61
|
-
{主角 + 困境 + 反转 +
|
|
47
|
+
{主角 + 困境 + 反转 + 情绪落点(从拆文报告「故事核」提取)}
|
|
62
48
|
|
|
63
|
-
###
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
49
|
+
### 核心支点
|
|
50
|
+
- 类型:{沿用拆文结果:身份/视角/动机/时间线/信息/认知反转,或无反转}
|
|
51
|
+
- 核心兑现:{一句话写主揭示;无反转时写报应或关系兑现}
|
|
52
|
+
- 铺垫/期待:{从拆文报告「反转分析」和情节节点回查,有几个写几个}
|
|
67
53
|
|
|
68
54
|
### 情绪设计
|
|
69
|
-
- 开头情绪:{
|
|
55
|
+
- 开头情绪:{情感曲线第一个节点}(强度 {1-10})
|
|
70
56
|
- 中段情绪:{中段情感节点}(强度 {1-10})
|
|
71
57
|
- 反转情绪:{反转节情感峰值}(强度 {1-10})
|
|
72
|
-
- 结尾情绪:{
|
|
58
|
+
- 结尾情绪:{结尾节情感;半成品还没写到写 [待补充]}(强度 {1-10})
|
|
73
59
|
|
|
74
60
|
### 人设速写
|
|
75
|
-
-
|
|
76
|
-
- 关键角色:{一句话人设}
|
|
61
|
+
- {角色}:{一句话人设};声线:{从对白归纳};口头禅:{原文原句,没有写 [待补充]};禁忌:{原文能看出的,没有写 [待补充]}(每人一行)
|
|
77
62
|
- 关系:{他们之间的关系}
|
|
78
|
-
```
|
|
79
63
|
|
|
80
|
-
|
|
64
|
+
### 题材招式
|
|
65
|
+
- {原文已经在用的招式:落在哪几节;构思时按题材包核对,补到 2-3 条}
|
|
81
66
|
|
|
82
|
-
###
|
|
67
|
+
### 文风约定
|
|
68
|
+
- {原文明显的句子、标点、用词习惯,从写作手法.md 提取;没有写「无」}
|
|
83
69
|
|
|
84
|
-
|
|
70
|
+
### 作者已定
|
|
71
|
+
- {导入记录「作者交代」里的偏好、红线、残稿决定,一条一行;没有写「无」}
|
|
85
72
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
### 故事结构
|
|
90
|
-
{从拆文报告「功能分段」字段提取,概述各段功能}
|
|
91
|
-
|
|
92
|
-
### 情绪节奏
|
|
93
|
-
{从情感曲线/爆点分析提取,描述情绪走势与峰值位置}
|
|
94
|
-
|
|
95
|
-
### 核心反转机制
|
|
96
|
-
{从反转机制分析提取,含铺垫路径}
|
|
73
|
+
### 反转与揭露
|
|
74
|
+
- 揭露方式:{证物/证人/偷听撞见/剥洋葱,原文怎么揭的;还没写到写 [待补充]}
|
|
75
|
+
- 真线索:第 {X} 节 {线索};假线索:第 {X} 节 {误导}(原文有几条写几条)
|
|
97
76
|
|
|
98
|
-
|
|
99
|
-
{
|
|
77
|
+
## 本书续写基线
|
|
78
|
+
- 已写到:第 {N} 节,{完本 | 半成品}
|
|
79
|
+
- 故事结构:{从拆文报告「结构划分」概述各段功能}
|
|
80
|
+
- 情绪节奏:{情绪走势与峰值在第几节}
|
|
81
|
+
|
|
82
|
+
## Phase 2 设计校验
|
|
83
|
+
- 题材参考:[待补充]
|
|
84
|
+
- 核心招式:[待补充]
|
|
85
|
+
- 反派设计:不适用({原因})
|
|
86
|
+
- 反转类型:{身份/视角/动机/时间线/信息/认知/无反转}
|
|
87
|
+
- 反转位置:第 {X} 节 ÷ 共 {Y} 节 = {Z}%
|
|
88
|
+
- 付费点:第 {N} 节末
|
|
100
89
|
```
|
|
101
90
|
|
|
91
|
+
- 「题材参考」「核心招式」导入一律写 `[待补充]`:题材包由续写构思时选,原文已用的招式先记在「题材招式」。
|
|
92
|
+
- 有反派时按拆文报告「人物分析」把「反派设计:不适用」换成身份、动机、作恶方式、致命弱点、报应五行(一字段一行);原文证据不够的字段写 `[待补充]`。
|
|
93
|
+
- 无反转篇写 `反转类型:无反转` 和 `反转位置:不适用({报应兑现/甜度递进等原因})`。有反转但半成品还没写到,写 `反转位置:[待补充]`。
|
|
94
|
+
- 付费点能从原文认出来(知乎盐言多在全文三到四成处的节末)时写节号,并在小节大纲同一节的「结尾承接/钩子」标「付费点」;认不出写 `付费点:[待补充]`。
|
|
95
|
+
- 绑定了外部对标时,在「作者已定」之后加一节 `### 对标摘要(有对标时)`,表头 `| 书名 | 主/副 | 相关性(同题材/弱相关) | 引用强度(辅/参考) | 可借鉴技法 |`。
|
|
96
|
+
- 证据不够的字段写 `[待补充]`,不留空、不留 `{}`。
|
|
97
|
+
|
|
102
98
|
---
|
|
103
99
|
|
|
104
100
|
## 小节大纲.md 反推规则
|
|
105
101
|
|
|
106
|
-
|
|
102
|
+
以拆文报告「结构划分」为依据,结合情节节点和原文分节映射到各小节;结构段可包含多个小节,不与自然段混同。行数等于原文小节数,一节一行;半成品只写已写的节,剩下的节由续写构思排。
|
|
107
103
|
|
|
108
104
|
### 段级映射
|
|
109
105
|
|
|
@@ -117,7 +113,7 @@ Phase 3-S 读取本文件和 [format-and-structure.md](format-and-structure.md)
|
|
|
117
113
|
|
|
118
114
|
### 小节大纲表格
|
|
119
115
|
|
|
120
|
-
|
|
116
|
+
用短篇写作的固定 12 列表格,列名和顺序不改:
|
|
121
117
|
|
|
122
118
|
```markdown
|
|
123
119
|
| 结构段/五段功能 | 主事件 | 情节推进 | 情绪 | 人物/关系变化 | 因果/逻辑链 | 读者新获知什么 | 结尾承接/钩子 | 伏笔/物件 | 场景形态 | 对白作用 | 目标字数 |
|
|
@@ -127,39 +123,33 @@ Phase 3-S 读取本文件和 [format-and-structure.md](format-and-structure.md)
|
|
|
127
123
|
|
|
128
124
|
- `结构段/五段功能` 填 开头/铺垫/升级/反转/结尾。
|
|
129
125
|
- `情节推进` 每个推进单元带 `{对话}` `{冲突}` `{伏笔}` `{回忆}` `{发现}` `{递进}` 之一,有先后用 `->` 连接,按原文实际发生的写,不为凑数拆分。
|
|
130
|
-
- 从原文判断不出的格子写 `[待补充]
|
|
131
|
-
- `目标字数`
|
|
132
|
-
- 付费点在哪一节末能从原文认出来时,在该行 `结尾承接/钩子` 标「付费点」;认不出写 `[待补充]`。
|
|
133
|
-
|
|
134
|
-
### 小节数量推算
|
|
135
|
-
|
|
136
|
-
以原文分节标记和转场为准;没有显式分节时,按情节阶段和转场划分。大纲行数须与迁移后正文的小节数一致,不按自然段数或平均字数推算。
|
|
126
|
+
- 从原文判断不出的格子写 `[待补充]`;不写 `{}` 模板占位。
|
|
127
|
+
- `目标字数` 写原文该节的字数(阿拉伯数字);完本时各节之和就是 `设定.md` 的目标字数。
|
|
137
128
|
|
|
138
129
|
---
|
|
139
130
|
|
|
140
|
-
## 正文.md
|
|
131
|
+
## 正文.md 外壳整理
|
|
141
132
|
|
|
142
|
-
|
|
133
|
+
导入的是作者自己的成稿,只整理下表所列格式,供后续交付检查识别小节:
|
|
143
134
|
|
|
144
|
-
|
|
|
145
|
-
|
|
146
|
-
| 小节标记 | `###1
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
| Markdown | 正文段落中不使用 `**` `*` `#` `---` 等 Markdown 语法(仅小节标记除外) |
|
|
135
|
+
| 项 | 怎么处理 |
|
|
136
|
+
|----|---------|
|
|
137
|
+
| 小节标记 | 原文已用 `###1.`、`###第N章` 或 `1.` 之一,原样保留;用别的分节写法(如「一、」「(1)」「* * *」)时,全文换成目标平台的标记:知乎盐言 `1.`,番茄、七猫 `###第N章`,其余 `###1.`;原文没有分节时按转场补标记 |
|
|
138
|
+
| 段间空行 | 相邻段落之间只留一个换行,删掉空行;段落边界不动 |
|
|
139
|
+
| 缩进 | 去掉段首的全角/半角空格 |
|
|
140
|
+
| Markdown | 去掉正文里的 `**`、`*`、`---` 等标记(小节标记除外) |
|
|
141
|
+
| 分段、引号、标点、措辞 | 原样保留,不合并、不拆分、不统一引号 |
|
|
152
142
|
|
|
153
|
-
|
|
143
|
+
原文用的标记、引号和分段习惯记进 `设定.md`「平台基调」,续写照这个写。
|
|
154
144
|
|
|
155
145
|
---
|
|
156
146
|
|
|
157
147
|
## 外部对标引用视图(可选)
|
|
158
148
|
|
|
159
|
-
仅当用户显式绑定独立外部 `{对标书名}` 时,将 `拆文库/{对标书名}/` 复制为 `{
|
|
149
|
+
仅当用户显式绑定独立外部 `{对标书名}` 时,将 `拆文库/{对标书名}/` 复制为 `{导入书名}/对标/{对标书名}/`(跳过 `_archive_*/`,归档快照不进对标视图),供续写阶段加载:
|
|
160
150
|
|
|
161
151
|
```
|
|
162
|
-
{
|
|
152
|
+
{导入书名}/对标/{对标书名}/
|
|
163
153
|
├── 原文/
|
|
164
154
|
├── 拆文报告.md
|
|
165
155
|
├── 情节节点.md
|
|
@@ -173,11 +163,10 @@ Phase 3-S 读取本文件和 [format-and-structure.md](format-and-structure.md)
|
|
|
173
163
|
|
|
174
164
|
## 质量检查清单
|
|
175
165
|
|
|
176
|
-
|
|
166
|
+
迁移完成后执行(不念给作者,没通过先修):
|
|
177
167
|
|
|
178
|
-
- [ ] `正文.md`
|
|
179
|
-
- [ ] `设定.md`
|
|
180
|
-
- [ ] `小节大纲.md` 数据行数与 `正文.md`
|
|
181
|
-
- [ ] 所有 `[待补充]` 标记已添加(不确定字段不留空)
|
|
168
|
+
- [ ] `正文.md` 单文件存在;小节标记是 `###1.`、`###第N章`、`1.` 之一且全文统一;段间没有空行;分段和引号与原文一致
|
|
169
|
+
- [ ] `设定.md` 含上方模板全部小节;`[待补充]` 只出现在证据不够或要等构思时定的项,没有 `{}` 占位
|
|
170
|
+
- [ ] `小节大纲.md` 数据行数与 `正文.md` 的小节数一致;完本时各节目标字数之和等于设定的目标字数
|
|
182
171
|
- [ ] 未误建 `追踪/`、`大纲/`、`正文/` 等长篇专属目录
|
|
183
172
|
- [ ] `拆文库/{导入书名}/` 未被复制到本篇 `对标/`;若绑定外部对标,来源与 `对标/{对标书名}/` 目录名一致
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
- 本批每章:正文路径、按 visible_chars_v1 测好的历史长度(与写作时章节检查同一口径,
|
|
14
14
|
story-architect 不能自己跑测量),以及从拆文库摘要里抽出的、写细纲真正要用的字段
|
|
15
15
|
(关键事件、因果、局面结果、涉及、信息变化、状态变化、章尾钩子,情节点只取「标题|类型|基调」);
|
|
16
|
-
|
|
17
|
-
-
|
|
16
|
+
- 本批第一章另带上一章摘要里的章尾钩子(写章首钩子用);
|
|
17
|
+
- 卷纲里章节范围与本批重叠的剧情单元卡。单元卡用 outline_view.py 的解析识别(写正文时
|
|
18
|
+
`outline_view.py --unit` 也用它),任务包取得到的单元,写正文时也取得到。
|
|
18
19
|
本书设定与作者已定的事不进包,执行者按规则定点读项目文件与 `.story/work/导入记录.md`。
|
|
19
20
|
|
|
20
21
|
批大小按总量定:请求 10–20 章(全书最后一批可以更少);执行者要读的总量(任务包 + 没有摘要、
|
|
@@ -34,11 +35,11 @@ import sys
|
|
|
34
35
|
from pathlib import Path
|
|
35
36
|
|
|
36
37
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
38
|
+
from outline_view import parse as parse_volume, unit_chapter_range # noqa: E402
|
|
37
39
|
from wordcount_core import METRIC, WordcountError, find_chapter_file, measure_wordcount # noqa: E402
|
|
38
40
|
|
|
39
41
|
RULES = Path(__file__).resolve().parent.parent / "references" / "outline-reverse-rules.md"
|
|
40
42
|
WORK_DIR = (".story", "work", "排纲")
|
|
41
|
-
BRIEF_SUMMARY_DIR = (".story", "work", "简化摘要")
|
|
42
43
|
MIN_BATCH, MAX_BATCH = 10, 20
|
|
43
44
|
LOAD_LIMIT = 25000 # 执行者一次要读的量(去空白字数);再加上 agent 模板或 SKILL 入口仍在 35K 内
|
|
44
45
|
# 摘要里写细纲要用的字段(与 story-long-analyze 摘要投影同名);旧版摘要的同义标签放在别名里。
|
|
@@ -56,10 +57,6 @@ FIELD_NAMES = "|".join(name for field in SUMMARY_FIELDS for name in (field[0], *
|
|
|
56
57
|
LABEL_RE = re.compile(r"^\s*(?:[-*+]\s*)?(?:\*\*([^*]+?)\*\*|(%s))\s*[::((]" % FIELD_NAMES)
|
|
57
58
|
POINT_HEADER_RE = re.compile(r"^P(\d+)\s+\*\*(.+?)\*\*\s*[::]\s*(.+)$")
|
|
58
59
|
POINT_TAG_RE = re.compile(r"^主题标签\s*[::]?\s*[^||]*?\s*[||]\s*基调\s*[::]?\s*(.*?)\s*$")
|
|
59
|
-
# 「章节范围」单元格的一段:第X章—第Y章 / 第X-Y章 / 第X章 / 章X-Y / X-Y。
|
|
60
|
-
SPAN_CELL_RE = re.compile(
|
|
61
|
-
r"^\s*(?:第|章)?\s*(\d+)\s*章?\s*(?:(?:-|~|~|—|–|-|至|到)+\s*第?\s*(\d+)\s*章?)?\s*$"
|
|
62
|
-
)
|
|
63
60
|
|
|
64
61
|
|
|
65
62
|
def emit(text: str, stream) -> None:
|
|
@@ -181,76 +178,56 @@ def summary_lines(text: str) -> list[str]:
|
|
|
181
178
|
return out
|
|
182
179
|
|
|
183
180
|
|
|
184
|
-
def
|
|
181
|
+
def previous_hook(analysis: Path, chapter: int) -> str | None:
|
|
182
|
+
"""上一章摘要里的章尾钩子:本批第一章写「章首钩子」用,上一章不在本包里。"""
|
|
183
|
+
summary = analysis / "章节" / f"第{chapter - 1}章_摘要.md"
|
|
184
|
+
if chapter <= 1 or not summary.is_file():
|
|
185
|
+
return None
|
|
186
|
+
blocks = label_blocks(summary.read_text(encoding="utf-8-sig"))
|
|
187
|
+
keys = ("章尾钩子", *dict(SUMMARY_FIELDS)["章尾钩子"])
|
|
188
|
+
return next((flatten(blocks[key]) for key in keys if blocks.get(key)), None)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def chapter_block(project: Path, analysis: Path, chapter: int, first: int) -> tuple[str, int, int, bool]:
|
|
185
192
|
"""返回(本章块、历史长度、执行者还需另读的正文量、是否缺摘要)。"""
|
|
186
193
|
body, body_text, actual = measure(project, chapter)
|
|
187
194
|
head = [f"### 第{chapter}章", "",
|
|
188
195
|
f"- 正文:`{shown_path(body, project.parent)}`;字数目标 {actual}({METRIC})"]
|
|
196
|
+
hook = previous_hook(analysis, chapter) if chapter == first else None
|
|
197
|
+
if hook:
|
|
198
|
+
head.append(f"- 上一章(第{chapter - 1}章)章尾钩子:{hook}")
|
|
189
199
|
summary = analysis / "章节" / f"第{chapter}章_摘要.md"
|
|
190
|
-
brief = project.joinpath(*BRIEF_SUMMARY_DIR) / f"第{chapter:03d}章.md"
|
|
191
200
|
if summary.is_file():
|
|
192
201
|
lines = [f"- 摘要要点(抽自 `{shown_path(summary, project.parent)}`):"] + [
|
|
193
202
|
" " + line for line in summary_lines(summary.read_text(encoding="utf-8").lstrip(""))]
|
|
194
203
|
return "\n".join(head + lines), actual, 0, False
|
|
195
|
-
if brief.is_file():
|
|
196
|
-
text = brief.read_text(encoding="utf-8").lstrip("").strip()
|
|
197
|
-
return "\n".join(head + ["- 简化摘要(未深拆章节):", "", text]), actual, 0, False
|
|
198
204
|
note = "- 摘要:未找到,读该章正文反推,证据不足处写 [待补充]"
|
|
199
205
|
return "\n".join(head + [note]), actual, weight(body_text), True
|
|
200
206
|
|
|
201
207
|
|
|
202
208
|
# ---------- 卷纲剧情单元 ----------
|
|
203
209
|
|
|
204
|
-
def
|
|
205
|
-
"""
|
|
206
|
-
spans = []
|
|
207
|
-
for part in re.split(r"[、,,;;/]", cell):
|
|
208
|
-
match = SPAN_CELL_RE.match(part)
|
|
209
|
-
if not match:
|
|
210
|
-
continue
|
|
211
|
-
start = int(match.group(1))
|
|
212
|
-
end = int(match.group(2) or start)
|
|
213
|
-
if start <= end:
|
|
214
|
-
spans.append((start, end))
|
|
215
|
-
return spans
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
def split_row(row: str) -> list[str]:
|
|
219
|
-
return [cell.strip() for cell in row.strip().strip("|").split("|")]
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
def unit_rows(project: Path, first: int, last: int) -> list[str]:
|
|
223
|
-
"""从各卷纲的「剧情单元」表里取与本批章节重叠的行,连同表头。"""
|
|
210
|
+
def unit_cards(project: Path, first: int, last: int) -> list[str]:
|
|
211
|
+
"""从各卷纲取章节范围与本批重叠的剧情单元卡(连同卡下的子段)。"""
|
|
224
212
|
volumes = sorted((project / "大纲").glob("卷纲_第*卷.md"))
|
|
225
213
|
if not volumes:
|
|
226
214
|
raise SystemExit("ERROR: 大纲/ 下没有卷纲,先在结构迁移时刻写定卷纲")
|
|
227
215
|
out: list[str] = []
|
|
228
216
|
for volume in volumes:
|
|
229
|
-
lines = volume.read_text(encoding="utf-8")
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if len(table) < 3:
|
|
240
|
-
continue
|
|
241
|
-
column = next((i for i, cell in enumerate(split_row(table[0])) if "章节范围" in cell), None)
|
|
242
|
-
if column is None:
|
|
243
|
-
continue
|
|
244
|
-
hits = []
|
|
245
|
-
for row in table[2:]:
|
|
246
|
-
cells = split_row(row)
|
|
247
|
-
spans = parse_span_cell(cells[column]) if column < len(cells) else []
|
|
248
|
-
if any(a <= last and b >= first for a, b in spans):
|
|
249
|
-
hits.append(row)
|
|
250
|
-
if hits:
|
|
251
|
-
out += [f"来源:`{project.name}/大纲/{volume.name}`", "", *table[:2], *hits, ""]
|
|
217
|
+
lines, sections = parse_volume(volume.read_text(encoding="utf-8-sig"))
|
|
218
|
+
for section in sections:
|
|
219
|
+
if section.kind != "单元级" or "剧情单元" not in section.title or section.status == "已退役":
|
|
220
|
+
continue
|
|
221
|
+
span = unit_chapter_range([section], section.unit)
|
|
222
|
+
if span is None or span[0] > last or span[1] < first:
|
|
223
|
+
continue
|
|
224
|
+
end = next((other.start for other in sections
|
|
225
|
+
if other.start > section.start and other.level <= section.level), len(lines))
|
|
226
|
+
out += [f"来源:`{project.name}/大纲/{volume.name}`", "", *lines[section.start:end], ""]
|
|
252
227
|
if not out:
|
|
253
|
-
raise SystemExit(f"ERROR:
|
|
228
|
+
raise SystemExit(f"ERROR: 卷纲里找不到章节范围覆盖第{first}-{last}章的剧情单元卡(卡标题下一行写"
|
|
229
|
+
"「> 作用域:单元级 {单元ID}」,卡里写「- 章节范围:第A-B章」),先补卷纲,"
|
|
230
|
+
"再用 outline_view.py --check --strict 核对")
|
|
254
231
|
return out
|
|
255
232
|
|
|
256
233
|
|
|
@@ -265,7 +242,7 @@ def render(project: Path, first: int, last: int, blocks: list[str]) -> str:
|
|
|
265
242
|
"证据不足标了 [待补充] 的要点(没有写「无」)。\n\n"
|
|
266
243
|
"包里提到的检查由主会话在你交付后跑,你不执行命令;需要的测量结果已放进包里。")
|
|
267
244
|
parts = [head, f"\n## 本批章节\n\n路径相对项目根(`{project.parent}`)。\n\n" + "\n\n".join(blocks),
|
|
268
|
-
"\n## 卷纲剧情单元(覆盖本批)\n\n" + "\n".join(
|
|
245
|
+
"\n## 卷纲剧情单元(覆盖本批)\n\n" + "\n".join(unit_cards(project, first, last)).rstrip(),
|
|
269
246
|
"\n---\n\n<!-- 资料:outline-reverse-rules.md -->\n\n" + RULES.read_text(encoding="utf-8").lstrip("").strip()]
|
|
270
247
|
return "\n".join(parts) + "\n"
|
|
271
248
|
|
|
@@ -273,13 +250,13 @@ def render(project: Path, first: int, last: int, blocks: list[str]) -> str:
|
|
|
273
250
|
def build(project: Path, analysis: Path, first: int, last: int) -> dict:
|
|
274
251
|
if not RULES.is_file():
|
|
275
252
|
raise SystemExit(f"ERROR: 缺少 reference:{RULES}")
|
|
276
|
-
fixed = weight(render(project, first, last, [])) #
|
|
253
|
+
fixed = weight(render(project, first, last, [])) # 包头、剧情单元卡与规则:章数减少只会更少
|
|
277
254
|
blocks: list[str] = []
|
|
278
255
|
lengths: dict[int, int] = {}
|
|
279
256
|
missing: list[int] = []
|
|
280
257
|
load, extra_reading = fixed, 0
|
|
281
258
|
for chapter in range(first, last + 1):
|
|
282
|
-
block, actual, extra, absent = chapter_block(project, analysis, chapter)
|
|
259
|
+
block, actual, extra, absent = chapter_block(project, analysis, chapter, first)
|
|
283
260
|
cost = weight(block) + extra
|
|
284
261
|
if blocks and load + cost > LOAD_LIMIT:
|
|
285
262
|
break # 包已够大:本章留给下一批
|
|
@@ -111,6 +111,10 @@ function readUtf8(file) {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
// 回报里的模板出处只列本 skill 带着的文件:导入的副本没有 workflow-outline.md,细纲写法在 outline-reverse-rules.md
|
|
115
|
+
const TEMPLATE_REFERENCES = ['references/workflow-outline.md', 'references/outline-reverse-rules.md']
|
|
116
|
+
.filter((rel) => fs.existsSync(path.join(__dirname, '..', rel)))
|
|
117
|
+
|
|
114
118
|
function makeCheck(id, ok, file, evidence, expected, repair, severity = 'blocking') {
|
|
115
119
|
return {
|
|
116
120
|
id,
|
|
@@ -119,7 +123,7 @@ function makeCheck(id, ok, file, evidence, expected, repair, severity = 'blockin
|
|
|
119
123
|
file,
|
|
120
124
|
evidence,
|
|
121
125
|
expected,
|
|
122
|
-
references:
|
|
126
|
+
references: TEMPLATE_REFERENCES,
|
|
123
127
|
repair,
|
|
124
128
|
}
|
|
125
129
|
}
|