@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
|
@@ -9,7 +9,7 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
9
9
|
|
|
10
10
|
## 路由表
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
各宿主的调用写法:Claude Code、OpenCode 用 `/story-*`(Claude 插件安装时为 `/oh-story:story-*`),也可 `Skill("story-*")`;Codex、ZCode 用 `$story-*`(Codex 也可 `/skills`);OpenClaw 用 `/skill story-*`;Antigravity、Reasonix 在 skill 入口选择或用自然语言点名。下表按 `/story-*` 写,其他宿主照此替换,本文件其余地方同理。
|
|
13
13
|
|
|
14
14
|
| 用户意图 | 关键词示例 | 路由到 |
|
|
15
15
|
|---|---|---|
|
|
@@ -18,8 +18,8 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
18
18
|
| 长篇拆文 | 拆文、分析这本书、黄金三章、灵感库、跨书灵感聚合 | `/story-long-analyze` |
|
|
19
19
|
| 短篇拆文 | 拆短篇、分析这个故事 | `/story-short-analyze` |
|
|
20
20
|
| 长篇扫榜 | 长篇排行、什么火、新书在冒什么、起点/番茄/晋江/七猫长篇 | `/story-long-scan` |
|
|
21
|
-
| 选题决策 | 写什么能爆、帮我选题、选题方向 | `/story-long-scan` |
|
|
22
21
|
| 短篇扫榜 | 短篇排行、知乎盐言排行 | `/story-short-scan` |
|
|
22
|
+
| 选题决策 | 写什么能爆、帮我选题、选题方向 | 长篇 `/story-long-scan`,短篇 `/story-short-scan`;没说篇幅先问一句 |
|
|
23
23
|
| 去 AI 味 | 去 AI 味、太 AI、去味 | `/story-deslop` |
|
|
24
24
|
| 审查稿件 | 审查、审稿、帮我审一下、一致性检查、看看有没有问题 | `/story-review` |
|
|
25
25
|
| 封面 | 封面、封面图 | `/story-cover` |
|
|
@@ -29,25 +29,98 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
29
29
|
| 工作台 | dashboard、工作台、看拆文库、浏览项目文件、打开项目面板 | 见下方「Dashboard 工作台」 |
|
|
30
30
|
| 检查/更新版本 | 检查更新、有新版本吗、升级、更新工具箱 | 见下方「版本更新检查」 |
|
|
31
31
|
| 切换/列出书目 | 切书、换书、列出我的书、我在写哪几本、切换项目 | 见下方「多书切换」 |
|
|
32
|
-
| 管理作者习惯 | 记住我的写作习惯、作者画像、待确认偏好、忘掉这个偏好 |
|
|
33
|
-
| 查故事资料 | 查角色、查伏笔、查进度、查设定、什么状态、写到哪了 |
|
|
34
|
-
| 查资料 | 查资料、帮我查资料、调研、搜索一下、搜一下 |
|
|
32
|
+
| 管理作者习惯 | 记住我的写作习惯、作者画像、待确认偏好、忘掉这个偏好 | 见下方「作者习惯管理」 |
|
|
33
|
+
| 查故事资料 | 查角色、查伏笔、查进度、查设定、什么状态、写到哪了 | 见下方「查询」 |
|
|
34
|
+
| 查资料 | 查资料、帮我查资料、调研、搜索一下、搜一下 | 见下方「查询」 |
|
|
35
|
+
|
|
36
|
+
能明确匹配就直接调用对应 skill;匹配不上时只问缺的那一项。用户说"我想写小说"但没说长篇还是短篇,先问篇幅再路由。
|
|
35
37
|
|
|
36
38
|
### 裸调用与新手
|
|
37
39
|
|
|
38
|
-
只说 `/story`、看不出意图时,不贴路由表,给四个白话选项:「开一本长篇或接着写」→ `/story-long-write`;「写一篇短篇」→ `/story-short-write`;「把一章改得不那么 AI」→ `/story-deslop`;「更多(拆书、扫榜、导入旧稿、审稿、封面)」→ 再列进阶项。还没部署过(项目根没有 `.story-deployed`)时先建议 `/story-setup
|
|
40
|
+
只说 `/story`、看不出意图时,不贴路由表,给四个白话选项:「开一本长篇或接着写」→ `/story-long-write`;「写一篇短篇」→ `/story-short-write`;「把一章改得不那么 AI」→ `/story-deslop`;「更多(拆书、扫榜、导入旧稿、审稿、封面)」→ 再列进阶项。还没部署过(项目根没有 `.story-deployed`)时先建议 `/story-setup`,并说明部署完要新开一个会话再开始,写作助手才会生效。
|
|
39
41
|
|
|
40
42
|
### 导入续写顺序
|
|
41
43
|
|
|
42
|
-
用户问"导入续写先 setup 还是 import"时,直接回答:**推荐先 `/story-setup
|
|
44
|
+
用户问"导入续写先 setup 还是 import"时,直接回答:**推荐先 `/story-setup`,新开会话后 `/story-import`;导完长篇说 `/story-long-write 写第N章`(N 是导入后的下一章),短篇用 `/story-short-write` 先补完构思**。如果用户已经直接触发 `/story-import`,按 story-import 自带环境检测继续:未 setup 时让用户选择先去 setup 或继续串行导入。
|
|
45
|
+
|
|
46
|
+
## 书目录判定
|
|
47
|
+
|
|
48
|
+
本文件的"书目录""当前书"均按此查找:
|
|
49
|
+
|
|
50
|
+
1. 项目根有 `.active-book` 且指向项目内一个存在的目录 → 就是它。
|
|
51
|
+
2. 否则在项目根往下最多 4 层找,跳过以 `.` 开头的目录、`node_modules`、`拆文库/`、`对标/`:
|
|
52
|
+
- 含 `追踪/`、`正文/` 子目录或 `正文.md` 文件的目录(与写作 hook 同一口径);
|
|
53
|
+
- 刚定完方向、还没有正文的长篇:含 `设定/题材定位.md` 的目录;
|
|
54
|
+
- 构思中、还没有正文的短篇:同时有 `设定.md` 与 `小节大纲.md` 的目录。
|
|
55
|
+
找到多本又没有 `.active-book` 时,需要"当前书"就问作者是哪本(做法同「多书切换」)。
|
|
56
|
+
3. 篇幅:有 `正文/` 或 `设定/` 子目录的是长篇,有 `正文.md` 或 `设定.md` 文件的是短篇。
|
|
57
|
+
|
|
58
|
+
没找到任何书目录:创建写作项目时先运行 `/story-setup`;只讨论结构、选题,或要扫榜、拆文时直接路由。找到了:按目标 skill 自己的环境检查继续,需要初始化或补部署时运行 `/story-setup`。
|
|
59
|
+
|
|
60
|
+
## 作者习惯管理
|
|
61
|
+
|
|
62
|
+
按用户明确指定的长篇/短篇选写作 skill;没指定时按当前书的篇幅。没有当前书的通用习惯交 `/story-long-write` 管理;只针对某本书却定位不到时问是哪本,不要求先建书。路由层只转交,不读写作者记忆文件。
|
|
63
|
+
|
|
64
|
+
## 查询
|
|
65
|
+
|
|
66
|
+
### 交给哪个助手、传什么
|
|
67
|
+
|
|
68
|
+
「查故事资料」交 `story-explorer`,prompt 三行:
|
|
43
69
|
|
|
44
|
-
|
|
70
|
+
```text
|
|
71
|
+
项目目录:{书目录的绝对路径}
|
|
72
|
+
查询类型:{按下表选}
|
|
73
|
+
查询参数:{用户问到的角色名、伏笔、设定关键词或章节范围}
|
|
74
|
+
```
|
|
45
75
|
|
|
46
|
-
|
|
76
|
+
| 用户在问 | 查询类型 |
|
|
77
|
+
|---|---|
|
|
78
|
+
| 某角色现在什么状态 | `character_status` |
|
|
79
|
+
| 某角色在哪几章出场 | `character_appearances` |
|
|
80
|
+
| 某条伏笔的情况 | `foreshadow_status` |
|
|
81
|
+
| 还有哪些伏笔、哪些没收 | `foreshadow_list` |
|
|
82
|
+
| 某个设定怎么定的 | `setting_detail` |
|
|
83
|
+
| 某个设定在哪些章出现过 | `setting_appearances` |
|
|
84
|
+
| 第 X 到 Y 章发生了什么 | `timeline`(查询参数默认带 `perspective: reader`;作者明确问幕后真相时用 `author`) |
|
|
85
|
+
| 写到哪了 | `progress` |
|
|
86
|
+
| 两个角色现在什么关系 | `relationship` |
|
|
87
|
+
|
|
88
|
+
一句话含多类查询时,分次调用或只选最主要的一类;问的是创作建议而不是查已有内容时,不交给它,主会话直接答。
|
|
89
|
+
|
|
90
|
+
「查资料」交 `story-researcher`,prompt 按下面写,没有的可选项整行省略:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
query:{要查的主题}
|
|
94
|
+
type:{可选:历史考证、地理/环境、职业知识、文化习俗、器物/服饰、描写参考、命名参考、体系构建、诗词典故、视觉参考、真实案例、读者偏好}
|
|
95
|
+
context:{可选:为什么要查,如正在写哪一段}
|
|
96
|
+
project_dir:{书目录的绝对路径;没有书目录时用项目根}
|
|
97
|
+
cdp_port:{可选:Chrome 调试端口不是 9222 时写}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 能不能用助手
|
|
101
|
+
|
|
102
|
+
> Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 36` 不一致时(标记缺失、字段缺失/非整数、小于或大于 36)**照常按文件存在性检查并 spawn**,但只检查当前运行时的 canonical 目录;同时用一句白话提示作者「查资料助手是旧版,运行 /story-setup 后新开会话」,`Notice: agents bundle 版本不匹配(项目 {N},本版 36)` 原文写进回答最末一行「技术备注:」;大于 36 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct,`Fallback: ... -> solo` 同样只进技术备注行。
|
|
103
|
+
|
|
104
|
+
走助手前先做轻量可用性检查(路由只做这一层,不承担全局部署策略):当前不在子代理上下文、当前运行时的 Agent/Task 或 `invoke_subagent` 工具可用,且对应部署文件存在(Claude `.claude/agents/*.md`、OpenCode `.opencode/agents/*.md`、Codex `.codex/agents/*.toml`、Antigravity `.agents/agents/agent-name/agent.md`,其中 `agent-name` 为目标 agent 名)→ 可尝试 spawn。Antigravity 用 `invoke_subagent` + 同名 `TypeName`,不得因其他端文件存在而误判。任一不满足,或运行时返回 unknown agent / 未暴露 custom-agent registry,则降级处理:
|
|
105
|
+
|
|
106
|
+
- `story-explorer` 不可用 → 主会话直接用 Read/Grep 从书目录检索(角色状态、伏笔、进度、设定),回答前说一句「查资料助手没启用,这次我直接翻项目文件」;项目尚未部署时提示先 `/story-setup`。
|
|
107
|
+
- `story-researcher` 不可用 → 主会话用当前可用的搜索能力回答,回答前说一句「查资料助手没启用,这次我直接搜」;搜不到就如实说明。
|
|
108
|
+
|
|
109
|
+
### 怎么回答作者
|
|
110
|
+
|
|
111
|
+
讲故事里的事(谁、在哪章、发生了什么);文件字段名、伏笔/事件编号不单独出现,编号必须跟着故事描述。助手返回的英文字段和缺口说明由主会话翻成白话再说。
|
|
112
|
+
|
|
113
|
+
## 多书切换
|
|
114
|
+
|
|
115
|
+
用户想切换或查看在写的书时(一个项目可同时有多本):
|
|
116
|
+
|
|
117
|
+
1. 按「书目录判定」第 2 条列出所有书目录,标出当前 `.active-book` 指向的那本。
|
|
118
|
+
2. 让用户选择,把所选书的相对路径写入项目根 `.active-book`(覆盖原内容)。
|
|
119
|
+
3. 只发现一本时直接确认为活跃书,无需询问。
|
|
47
120
|
|
|
48
121
|
## Dashboard 工作台
|
|
49
122
|
|
|
50
|
-
用户执行 `/story dashboard
|
|
123
|
+
用户执行 `/story dashboard`,或明确要求打开工作台、查看项目文件时,启动本 skill 的本地 Dashboard:
|
|
51
124
|
|
|
52
125
|
1. 把**当前工作目录**作为默认工作区;用户明确给出目录时改用该目录。目录必须存在。
|
|
53
126
|
2. 从当前已加载的 `story` skill 目录定位 `scripts/dashboard-server.mjs`,不要硬编码仓库路径、
|
|
@@ -63,62 +136,29 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
|
|
|
63
136
|
5. Dashboard 默认只监听 `127.0.0.1`。不要主动增加 `--allow-network`,不要把工作区暴露到
|
|
64
137
|
局域网或公网。
|
|
65
138
|
|
|
66
|
-
|
|
139
|
+
工作台按自己的规则识别目录,与上方「书目录判定」不同:识别标准 `拆文库/{书名}/`,兼容存量 `拆文库-{书名}/`;写作项目识别同时支持:
|
|
67
140
|
|
|
68
141
|
- 长篇目录结构:目录内含 `正文/`、`大纲/`、`设定/` 或 `追踪/` 任一普通子目录。
|
|
69
142
|
- 短篇单文件结构:目录内含普通文件 `正文.md`,并同时含 `小节大纲.md` 或 `设定.md`。
|
|
70
143
|
|
|
71
144
|
符号链接不作为项目标记,只有单个 `正文.md` 的资料目录不识别为写作项目。浏览器可编辑 `.md`、`.txt`、`.json`、`.yaml`、`.yml`、`.toml`;保存或确认删除时核对文件内容版本,避免覆盖外部修改。
|
|
72
145
|
|
|
73
|
-
停止服务时终止对应的 Node
|
|
74
|
-
`/story dashboard` / `$story dashboard` 两种平台对应入口。
|
|
75
|
-
|
|
76
|
-
## 路由流程
|
|
77
|
-
|
|
78
|
-
1. 分析用户请求,提取意图关键词
|
|
79
|
-
2. 匹配上表,找到对应的 skill
|
|
80
|
-
3. 如果能明确匹配,直接调用对应 skill(Claude/OpenCode 可用 `Skill("skill-name")` 或 slash command;Codex 用 `$skill-name` / `/skills`;Antigravity 用 `/skills` 或自然语言点名;OpenClaw 用 `/skill skill-name` 或自然语言点名)
|
|
81
|
-
4. 无法匹配时只问缺失信息;写作篇幅按下一条处理
|
|
82
|
-
5. 如果用户说"我想写小说"但未指定长篇/短篇,询问篇幅类型后再路由
|
|
83
|
-
|
|
84
|
-
## 查询降级
|
|
85
|
-
|
|
86
|
-
> Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 35` 不一致时(标记缺失、字段缺失/非整数、小于或大于 35)**照常按文件存在性检查并 spawn**,但只检查当前运行时的 canonical 目录;同时报告 `Notice: agents bundle 版本不匹配(项目 {N},本版 35)` 并提示重新运行 `/story-setup` 后新开会话;大于 35 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct,报告 `Fallback: ... -> solo`。
|
|
87
|
-
|
|
88
|
-
「查故事资料」「查资料」走 agent 前先做轻量可用性检查(路由只做这一层,不承担全局部署策略):当前不在子代理上下文、当前运行时的 Agent/Task 或 `invoke_subagent` 工具可用,且对应部署文件存在(Claude `.claude/agents/*.md`、OpenCode `.opencode/agents/*.md`、Codex `.codex/agents/*.toml`、Antigravity `.agents/agents/agent-name/agent.md`,其中 `agent-name` 为目标 agent 名)→ 可尝试 spawn。Antigravity 用 `invoke_subagent` + 同名 `TypeName`,不得因其他端文件存在而误判。任一不满足,或运行时返回 unknown agent / 未暴露 custom-agent registry,则降级,不硬失败:
|
|
89
|
-
|
|
90
|
-
- `story-explorer` 不可用 → 主会话直接用 Read/Grep 从项目文件检索(角色状态/伏笔/进度/设定),回答前说一句「查资料助手没启用,这次我直接翻项目文件」;项目尚未部署时提示先 `/story-setup`(Codex 中用 `$story-setup`)。
|
|
91
|
-
- `story-researcher` 不可用 → 主会话用现有检索/回答能力完成,或提示用户改用 `/browser-cdp` 采集,同样用一句白话说明。
|
|
92
|
-
|
|
93
|
-
回答作者时讲故事里的事(谁、在哪章、发生了什么);文件字段名、伏笔/事件编号不单独出现,编号必须跟着故事描述。
|
|
94
|
-
|
|
95
|
-
## 项目状态感知
|
|
96
|
-
|
|
97
|
-
路由前先检查当前项目状态:
|
|
98
|
-
|
|
99
|
-
- **无项目目录**(没有包含 `追踪/` 或 `设定/` 的书名目录,也没有同时有 `正文.md` 与 `小节大纲.md`(或 `设定.md`)的短篇目录):
|
|
100
|
-
- 创建写作项目时先运行 `/story-setup` 初始化环境(Codex 中用 `$story-setup`);只讨论结构或选题时直接路由
|
|
101
|
-
- 如果用户要扫榜/拆文,直接路由
|
|
102
|
-
- **已有项目**:读取 `.story-deployed`,按目标 skill 的环境检查继续;查询沿用上方降级,导入保留串行选项。需要初始化或补部署时运行 `/story-setup`(Codex 中用 `$story-setup`)。
|
|
103
|
-
|
|
104
|
-
## 多书切换
|
|
105
|
-
|
|
106
|
-
用户想切换或查看在写的书时(一个项目可同时有多本):
|
|
107
|
-
|
|
108
|
-
1. 在项目根查找所有书目录:包含 `追踪/` 或 `设定/` 子目录的目录,或同时有 `正文.md` 与 `小节大纲.md`(或 `设定.md`)的目录(含 `长篇/`、`短篇/` 下的子目录)。
|
|
109
|
-
2. 列出书名,并标出当前 `.active-book` 指向的那本。
|
|
110
|
-
3. 让用户选择,把所选书的相对路径写入项目根 `.active-book`(覆盖原内容)。
|
|
111
|
-
4. 只发现一本时直接确认为活跃书,无需询问。
|
|
146
|
+
停止服务时终止对应的 Node 长运行进程即可。若用户只问用法,不要替他启动;告诉用户用 `/story dashboard`(按上方宿主写法替换)。
|
|
112
147
|
|
|
113
148
|
## 版本更新检查
|
|
114
149
|
|
|
115
150
|
用户问“有没有新版本”“检查更新”“升级”时执行。**先报告版本,是否安装由用户决定。**
|
|
116
151
|
|
|
117
|
-
1. **当前版本**:读本 skill 同目录的 `VERSION`
|
|
152
|
+
1. **当前版本**:读本 skill 同目录的 `VERSION` 文件;缺失则视为未知。本 skill 在写作项目里(如项目下的 `skills/`、`.agents/skills/`、`.zcode/skills/`)时,读到的是项目副本的版本。
|
|
118
153
|
2. **最新版本**:优先 `gh release view --json tagName,name,url -R zenstory-ai/oh-story-claudecode` 取 `tagName`;无 gh 用 `curl -fsS --max-time 5 https://api.github.com/repos/zenstory-ai/oh-story-claudecode/releases/latest` 取 `.tag_name`(jq 或 grep)。查不到 → 告知"暂时拉不到最新版本,可手动看 [Releases](https://github.com/zenstory-ai/oh-story-claudecode/releases)",不报错。
|
|
119
154
|
3. **比较**:当前版本已知时,去掉 `v` 前缀按语义版本比较(major.minor.patch);未知时只展示最新稳定版,不判定是否已最新。`gh release` 默认取 latest 稳定版,不含 pre-release。
|
|
120
155
|
4. **告知**:
|
|
121
156
|
- 已最新 → 「已是最新版 vX.Y.Z」。
|
|
122
|
-
- 有新版或当前版本未知 → 展示已知版本与 [Releases](https://github.com/zenstory-ai/oh-story-claudecode/releases)/[CHANGELOG](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/CHANGELOG.md),有 release notes
|
|
123
|
-
|
|
124
|
-
|
|
157
|
+
- 有新版或当前版本未知 → 展示已知版本与 [Releases](https://github.com/zenstory-ai/oh-story-claudecode/releases)/[CHANGELOG](https://github.com/zenstory-ai/oh-story-claudecode/blob/main/CHANGELOG.md),有 release notes 时附更新要点,再用宿主可用的提问方式问「现在更新吗?」。选先不 → 不动,告知随时可再来。
|
|
158
|
+
5. **更新**(用户同意后):按本 skill 目录的位置判断安装方式。
|
|
159
|
+
- 在插件目录里(路径含 `plugins/`):Claude Code 跑 `claude plugin marketplace update oh-story-skills` 再跑 `claude plugin update oh-story@oh-story-skills`,重启后生效;ZCode 在 Plugin Management 里刷新市场后更新 `oh-story`。
|
|
160
|
+
- 用 `npx skills` 装在全局或当前目录:重跑 `npx skills add zenstory-ai/oh-story-claudecode -y -g`(原来装在当前目录的去掉 `-g`)。
|
|
161
|
+
- 其他安装方式(如 ClawHub):按原来的方式重装最新版。
|
|
162
|
+
- 本 skill 在写作项目里:先用上面对应的方式更新安装包,再用新装的包在项目根运行 `/story-setup`,项目里的副本才会换成新版;OpenClaw、Reasonix 和通用文件模式下项目里跑的就是这份旧副本,要用新包手动覆盖项目 `skills/` 下的 13 个 skill 目录。
|
|
163
|
+
|
|
164
|
+
更新完提示:已部署过的项目在项目根重跑 `/story-setup` 同步 hooks、agents 和参考资料,然后**新开一个会话**,写作助手才会重新加载。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.9.0
|
|
@@ -13,259 +13,79 @@ metadata: {"openclaw":{"requires":{"env":["GPT_IMAGE_API_KEY"],"bins":["curl","j
|
|
|
13
13
|
## 生成通路
|
|
14
14
|
|
|
15
15
|
- **Codex 内置(优先)**:当前 Codex CLI 会话可调用 `$imagegen` / `image_gen` 时,直接调用工具生成并保存,无需 `OPENAI_API_KEY` 或 `GPT_IMAGE_API_KEY`,不运行 `curl`。
|
|
16
|
-
- **API 回退**:仅在会话没有内置工具或用户明确指定 API 时使用,需要 `GPT_IMAGE_API_KEY
|
|
17
|
-
|
|
18
|
-
## 输出参数与 API 回退环境变量
|
|
19
|
-
|
|
20
|
-
| 变量 | 必填 | 默认 | 说明 |
|
|
21
|
-
|:-----|:----:|:-----|:-----|
|
|
22
|
-
| `GPT_IMAGE_API_KEY` | API 回退必填 | — | OpenAI 或兼容代理的 API Key;Codex 内置通路不用 |
|
|
23
|
-
| `GPT_IMAGE_BASE_URL` | | `https://api.openai.com/v1` | 兼容代理时改这个 |
|
|
24
|
-
| `GPT_IMAGE_MODEL` | | `gpt-image-2` | 仅在测试新模型时覆盖 |
|
|
25
|
-
| `GPT_IMAGE_SIZE` | | `1024x1536` | API 回退的请求尺寸:番茄 3:4→`768x1024`,默认 2:3→`1024x1536`。实际尺寸以出图结果为准,固定上传像素由「导出平台上传尺寸」步骤保证 |
|
|
26
|
-
| `UPLOAD_SIZE` | | — | 平台固定上传像素(番茄 `600x800`);设置后由「导出平台上传尺寸」步骤居中裁剪+缩放出上传版(不变形、不依赖出图尺寸) |
|
|
27
|
-
| `BOOK_DIR` | ✅ | — | 输出目录,建议 `./covers/<书名>` |
|
|
28
|
-
| `REF_IMAGE` | | — | 参考图本地路径或 URL;内置通路先把图片载入会话,API 回退走 `images/edits` 图生图 |
|
|
29
|
-
|
|
30
|
-
---
|
|
16
|
+
- **API 回退**:仅在会话没有内置工具或用户明确指定 API 时使用,需要 `GPT_IMAGE_API_KEY`;环境变量和命令在 [references/api-fallback.md](references/api-fallback.md),走这条通路时再读。工具缺失不等于 Codex 订阅不支持生图;内置调用失败时先报告错误,不静默切换到可能收费的 API。
|
|
31
17
|
|
|
32
18
|
## 生成流程
|
|
33
19
|
|
|
34
20
|
### Step 1:收集信息
|
|
35
21
|
|
|
36
|
-
|
|
37
|
-
选填:参考图 `REF_IMAGE`(本地路径或 URL)、风格偏好、尺寸;参考图的用法见 Step 4 对应通路。
|
|
38
|
-
|
|
39
|
-
> **书名和笔名是封面必需信息**:缺任一时,先用宿主可用的提问方式请作者补全,不得编造或留空。
|
|
22
|
+
先找当前书:项目根 `.active-book` 指向项目内现有目录时就是当前书;否则从项目根往下最多 4 层找(跳过 `.` 开头的目录、`node_modules`、`拆文库/`、`对标/`),含 `追踪/`、`正文/`、`设定/` 子目录或 `正文.md`、`设定.md` 文件的是书目录,找到多本时请作者选择。有 `正文/` 或 `设定/` 子目录的是长篇,有 `正文.md` 或 `设定.md` 的是短篇。找到后读:
|
|
40
23
|
|
|
41
|
-
|
|
24
|
+
- 长篇:`设定/题材定位.md`「基本信息」的书名、题材类型、目标平台、核心梗;
|
|
25
|
+
- 短篇:`设定.md`「基本信息」的标题、目标平台、目标情绪,以及「一句话梗概」「题材招式」。
|
|
42
26
|
|
|
43
|
-
|
|
44
|
-
|:-----|:--------|:-----|:-------------------|
|
|
45
|
-
| 番茄小说 | 600×800 | 3:4 | `768x1024` |
|
|
46
|
-
| 其他平台(默认竖版) | 按平台规格 | 2:3 | `1024x1536` |
|
|
27
|
+
已有字段不再问;笔名不在这些文件里,每次都要问。没有书目录或缺项时,用宿主可用的提问方式一次问齐:书名、笔名、目标平台。
|
|
47
28
|
|
|
48
|
-
|
|
29
|
+
> **书名和笔名是封面必需信息**:缺任一时先请作者补全,不得编造或留空。
|
|
49
30
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
扫描书名(必要时简介)中的关键词,对照 [references/cover-styles.md](references/cover-styles.md) 的「题材推断规则」表选定题材。
|
|
53
|
-
|
|
54
|
-
- 单题材命中 → 直接采用
|
|
55
|
-
- 多题材命中 → 按优先级取一:仙侠 > 西幻 > 古言 > 现言 > 都市 > 悬疑 > 科幻 > 历史 > 灵异 > 轻小说
|
|
56
|
-
- 零命中 → 默认 `都市`
|
|
57
|
-
|
|
58
|
-
### Step 3:构建提示词
|
|
31
|
+
选填:参考图 `REF_IMAGE`(本地路径或 URL)、风格偏好;参考图的用法见 Step 4。
|
|
59
32
|
|
|
60
|
-
|
|
33
|
+
**保存位置**:有书目录时存到 `{书目录}/封面/`,不用问;没有书目录时用 `./covers/{书名}/封面/`。下文 `BOOK_DIR` 指 `封面/` 的上一层。
|
|
61
34
|
|
|
62
|
-
|
|
35
|
+
**按目标平台定比例和上传尺寸**:番茄上传 600×800,比例 **3:4**,出图比例不符时平台再次裁剪可能切掉书名或笔名;其他平台按竖版 2:3 交付,作者给出平台上传像素时按该尺寸导出。各平台的画风关键词见 [references/cover-styles.md](references/cover-styles.md)「平台风格」。
|
|
63
36
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
Title text '书名' at top center in [书名字体风格].
|
|
68
|
-
Author name '作者名' at bottom center in [作者名字体风格].
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
#### 书名字体风格
|
|
72
|
-
|
|
73
|
-
| 题材 | 描述关键词 |
|
|
74
|
-
|:-----|:-----------|
|
|
75
|
-
| 玄幻/仙侠 | `bold golden brush calligraphy with metallic glow and sharp strokes` |
|
|
76
|
-
| 都市 | `modern bold sans-serif with metallic silver finish` |
|
|
77
|
-
| 古言/宫斗 | `elegant golden traditional Kai script with ornate decoration` |
|
|
78
|
-
| 现言/甜宠 | `soft rounded handwritten style in white with pink glow` |
|
|
79
|
-
| 悬疑/推理 | `distorted bold cracked letters in blood red` |
|
|
80
|
-
| 科幻/末世 | `neon glowing futuristic font in electric blue` |
|
|
81
|
-
| 西幻 | `metallic embossed fantasy lettering with glow effect` |
|
|
82
|
-
| 历史/军事 | `heavy stone-carved seal script in deep red` |
|
|
83
|
-
| 灵异/恐怖 | `eerie dripping handwritten font in sickly green` |
|
|
84
|
-
| 轻小说 | `colorful cartoon outlined bubbly font` |
|
|
85
|
-
|
|
86
|
-
#### 作者名字体风格(重点:作者名必须精心设计,不能只是"小字")
|
|
87
|
-
|
|
88
|
-
作者名指定**字体、颜色和装饰元素**,与书名风格呼应,保持清晰可读而不抢焦点。
|
|
37
|
+
### Step 2:题材判定
|
|
89
38
|
|
|
90
|
-
|
|
91
|
-
|:-----|:----------------|
|
|
92
|
-
| 玄幻/仙侠 | `small refined white serif text with faint golden glow, flanked by delicate cloud-scroll ornaments on both sides, resting on a thin horizontal gold line` |
|
|
93
|
-
| 都市 | `small clean white modern text with subtle drop shadow, positioned above a thin silver horizontal divider line` |
|
|
94
|
-
| 古言/宫斗 | `small elegant dark red traditional text inside a thin golden rectangular border frame with corner decorations` |
|
|
95
|
-
| 现言/甜宠 | `small soft pink-white handwritten text with a tiny heart motif on the left side, light sparkle effect` |
|
|
96
|
-
| 悬疑/推理 | `small pale grey text with slight blur effect, almost hidden in the shadows, a thin cracked line underneath` |
|
|
97
|
-
| 科幻/末世 | `small crisp white monospace text with subtle cyan scanline overlay, flanked by small geometric brackets` |
|
|
98
|
-
| 西幻 | `small bronze medieval script text with aged parchment texture, enclosed in a small decorative shield or banner shape` |
|
|
99
|
-
| 历史/军事 | `small dignified white Song typeface text above a double horizontal line in dark red` |
|
|
100
|
-
| 灵异/恐怖 | `small faded grey-green text slightly tilted, with a thin dripping ink line above` |
|
|
101
|
-
| 轻小说 | `small playful rounded white text with pastel color outline, tiny star decorations on both sides` |
|
|
39
|
+
在 [references/cover-styles.md](references/cover-styles.md) 的「风格库」里选一个题材:
|
|
102
40
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- 必须有装饰元素:线条/边框/小图标/光效中至少一种
|
|
107
|
-
- 颜色与背景形成对比但不刺眼
|
|
41
|
+
1. 有「题材类型」(长篇)或梗概、题材招式(短篇)时,按内容选风格库中最接近的一节。
|
|
42
|
+
2. 没有,或对不上风格库任何一节(如年代、种田、无限流、电竞)时,用书名(必要时简介)对照「题材推断规则」:只命中一个题材就用它;命中多个按该表下方的优先级取一;都没命中先用「都市」。
|
|
43
|
+
3. 第 2 条推断出的题材,在 Step 4 给作者看方案时一并说出来,作者可以改。
|
|
108
44
|
|
|
109
|
-
|
|
45
|
+
### Step 3:构建提示词
|
|
110
46
|
|
|
111
|
-
|
|
47
|
+
提示词 = **文字层** + **风格层** + **画面层**。设计指令用英文,书名和笔名保留作者提供的原文。所选题材的字体、标签、色彩、人物、背景、光效都在「风格库」同一节里查。
|
|
112
48
|
|
|
113
|
-
|
|
49
|
+
**文字层**:GPT-Image-2 可直接渲染中文。书名在上方居中,用该题材的书名字体;笔名在下方居中,用该题材的笔名字体。笔名要和书名风格呼应、清晰可读而不抢焦点:
|
|
114
50
|
|
|
115
|
-
|
|
51
|
+
- 大小用 `small`;位置 `at bottom center`,与画面底部留出间距;
|
|
52
|
+
- 必须带一种装饰:线条、边框、小图标或光效;
|
|
53
|
+
- 颜色与背景形成对比但不刺眼。
|
|
116
54
|
|
|
117
|
-
|
|
55
|
+
**风格层**:目标平台在「平台风格」表里有对应时,取它的关键词串;没有对应(如黑岩、红果、小程序)时省掉这一层,只靠题材风格。
|
|
118
56
|
|
|
119
|
-
|
|
120
|
-
|:-----|:-----|:---------|
|
|
121
|
-
| A | 人物特写 + 场景 | 全题材通用 |
|
|
122
|
-
| B | 全身像 + 动态姿势 | 玄幻、都市、西幻 |
|
|
123
|
-
| C | 纯场景/氛围图 | 悬疑、科幻、历史 |
|
|
57
|
+
**画面层**:题材的风格标签、人物、背景、色彩、光效,加上一种构图(见「构图变体」)。
|
|
124
58
|
|
|
125
|
-
|
|
59
|
+
完整提示词模板(唯一一份,示例和改版都按它拼):
|
|
126
60
|
|
|
127
61
|
```
|
|
128
62
|
Chinese web novel cover design, [平台风格].
|
|
129
|
-
Title text '{书名}' at top center in [
|
|
130
|
-
Author name '{
|
|
131
|
-
[题材风格标签]. [人物描述]. [背景描述].
|
|
63
|
+
Title text '{书名}' at top center in [书名字体].
|
|
64
|
+
Author name '{笔名}' at bottom center in [笔名字体].
|
|
65
|
+
[题材风格标签]. [构图关键词]. [人物描述]. [背景描述].
|
|
132
66
|
[色彩指令]. [光效指令].
|
|
133
67
|
Professional book cover, high detail digital painting, portrait [平台比例:番茄=3:4,默认=2:3] ratio, keep title and author name inside the central safe area away from edges (inner ~85%), no watermark
|
|
134
68
|
```
|
|
135
69
|
|
|
136
|
-
|
|
70
|
+
写法要点:
|
|
71
|
+
- 人物描述写清服饰、姿态、发型、表情、道具,不要只写 `a man`;
|
|
72
|
+
- 背景分三层:前景人物或道具,中景场景,远景氛围;
|
|
73
|
+
- 光效写清光源方向和颜色,如 `dramatic golden light from above`;
|
|
74
|
+
- 用 `digital painting style`,不用 `photo`,避免真人照片感。
|
|
137
75
|
|
|
138
|
-
|
|
139
|
-
- 背景分层:前景(人物)→ 中景(场景)→ 远景(氛围)
|
|
140
|
-
- 光效是指定光源方向 + 颜色(如 `dramatic golden light from above`)
|
|
141
|
-
- 用 `digital painting style` 而非 `photo`,避免真人照片感
|
|
76
|
+
### Step 4:选方案并生成
|
|
142
77
|
|
|
143
|
-
|
|
78
|
+
先从「构图变体」里挑 2-3 种适合本题材的构图,每种用一句话描述画面(构图、主色、书名字体),连同 Step 2 定的题材一起给作者挑。作者选定后只生成那一张;作者说「都出」时每个方案单独生成一次。
|
|
144
79
|
|
|
145
80
|
#### Codex 内置 ImageGen(优先)
|
|
146
81
|
|
|
147
82
|
1. 用 Step 3 的完整提示词调用 `image_gen`。比例和安全区写进提示词,不传 `GPT_IMAGE_MODEL`、`GPT_IMAGE_SIZE`、`response_format` 等 API 参数。
|
|
148
83
|
2. 有 `REF_IMAGE` 时,本地文件先用图片查看工具载入会话;URL 先下载再载入。说明它是编辑目标还是风格参考,并列出必须保持的内容。
|
|
149
|
-
3.
|
|
84
|
+
3. 先创建 `BOOK_DIR/封面/`,再把工具返回的图片复制为 `封面_vN.png`,`N` 自增且不覆盖旧版;保留 `$CODEX_HOME/generated_images/` 原文件,同时保存同名 `.prompt.txt`,有参考图再保存 `.ref.txt`。确认图片可读,并把原图绝对路径交给 Step 5。
|
|
150
85
|
|
|
151
86
|
#### API 回退
|
|
152
87
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
两种调用方式二选一:未设置 `REF_IMAGE` → 走「文生图」;设置了 → 走「图生图」。
|
|
156
|
-
|
|
157
|
-
#### 文生图(默认)
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
set -euo pipefail
|
|
161
|
-
: "${GPT_IMAGE_API_KEY:?请设置 export GPT_IMAGE_API_KEY=你的key}"
|
|
162
|
-
: "${PROMPT:?请先 export PROMPT=构建提示词步骤拼好的完整提示词}"
|
|
163
|
-
BASE_URL="${GPT_IMAGE_BASE_URL:-https://api.openai.com/v1}"
|
|
164
|
-
MODEL="${GPT_IMAGE_MODEL:-gpt-image-2}"
|
|
165
|
-
SIZE="${GPT_IMAGE_SIZE:-1024x1536}"
|
|
166
|
-
BOOK_DIR="${BOOK_DIR:?请先 export BOOK_DIR=./covers/<书名>}"
|
|
167
|
-
|
|
168
|
-
mkdir -p "$BOOK_DIR/封面"
|
|
169
|
-
|
|
170
|
-
# 自增版本号,避免覆盖之前生成的封面
|
|
171
|
-
i=1
|
|
172
|
-
while [ -f "$BOOK_DIR/封面/封面_v${i}.png" ]; do i=$((i+1)); done
|
|
173
|
-
OUT="$BOOK_DIR/封面/封面_v${i}.png"
|
|
174
|
-
RESP=$(mktemp)
|
|
175
|
-
trap 'rm -f "$RESP"' EXIT
|
|
176
|
-
|
|
177
|
-
# 用 jq 拼 JSON 体,避免 PROMPT 里的引号/换行/中文把 shell 字符串撑破
|
|
178
|
-
BODY=$(jq -n \
|
|
179
|
-
--arg m "$MODEL" \
|
|
180
|
-
--arg p "$PROMPT" \
|
|
181
|
-
--arg s "$SIZE" \
|
|
182
|
-
'{model:$m, prompt:$p, size:$s}')
|
|
183
|
-
|
|
184
|
-
curl -fsS --max-time 180 --retry 2 --retry-delay 5 \
|
|
185
|
-
"$BASE_URL/images/generations" \
|
|
186
|
-
-H "Authorization: Bearer $GPT_IMAGE_API_KEY" \
|
|
187
|
-
-H "Content-Type: application/json" \
|
|
188
|
-
-d "$BODY" > "$RESP"
|
|
189
|
-
|
|
190
|
-
# API 出错时早退,避免把 error JSON 当成 base64 写成损坏 PNG
|
|
191
|
-
if jq -e '.error' "$RESP" >/dev/null 2>&1; then
|
|
192
|
-
echo "API error:" >&2
|
|
193
|
-
jq '.error' "$RESP" >&2
|
|
194
|
-
exit 1
|
|
195
|
-
fi
|
|
196
|
-
|
|
197
|
-
# `// empty` 让缺失字段输出空串而非 "null",配合下面的 -s 检查避免写出 3 字节假 PNG
|
|
198
|
-
jq -er '.data[0].b64_json // empty' "$RESP" | base64 --decode > "$OUT"
|
|
199
|
-
[ -s "$OUT" ] || { echo "empty or malformed output: $OUT" >&2; head -c 300 "$RESP" >&2; exit 1; }
|
|
200
|
-
|
|
201
|
-
# 落地提示词副本,方便迭代时基于上一次微调
|
|
202
|
-
printf '%s\n' "$PROMPT" > "${OUT%.png}.prompt.txt"
|
|
203
|
-
|
|
204
|
-
file "$OUT"
|
|
205
|
-
ls -lt "$BOOK_DIR/封面/"
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
#### 图生图(提供参考图时)
|
|
209
|
-
|
|
210
|
-
下面的 `/v1/images/edits` 命令通过 `multipart/form-data` 上传本地图片,不加 `Content-Type: application/json`。文本字段用 `--form-string`,图片字段用 `-F image=@path`。
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
set -euo pipefail
|
|
214
|
-
: "${GPT_IMAGE_API_KEY:?请设置 export GPT_IMAGE_API_KEY=你的key}"
|
|
215
|
-
: "${PROMPT:?请先 export PROMPT=构建提示词步骤拼好的完整提示词}"
|
|
216
|
-
BASE_URL="${GPT_IMAGE_BASE_URL:-https://api.openai.com/v1}"
|
|
217
|
-
MODEL="${GPT_IMAGE_MODEL:-gpt-image-2}"
|
|
218
|
-
SIZE="${GPT_IMAGE_SIZE:-1024x1536}"
|
|
219
|
-
BOOK_DIR="${BOOK_DIR:?请先 export BOOK_DIR=./covers/<书名>}"
|
|
220
|
-
REF_IMAGE="${REF_IMAGE:?请先 export REF_IMAGE=本地路径或 URL}"
|
|
221
|
-
|
|
222
|
-
mkdir -p "$BOOK_DIR/封面"
|
|
223
|
-
|
|
224
|
-
# 自增版本号
|
|
225
|
-
i=1
|
|
226
|
-
while [ -f "$BOOK_DIR/封面/封面_v${i}.png" ]; do i=$((i+1)); done
|
|
227
|
-
OUT="$BOOK_DIR/封面/封面_v${i}.png"
|
|
228
|
-
RESP=$(mktemp)
|
|
229
|
-
REF_TMP=""
|
|
230
|
-
trap '[ -n "$REF_TMP" ] && rm -f "$REF_TMP"; rm -f "$RESP"' EXIT
|
|
231
|
-
|
|
232
|
-
# URL 先下载到临时文件,本地路径直接用。用裸 mktemp 以保证 macOS/Linux 行为一致。
|
|
233
|
-
case "$REF_IMAGE" in
|
|
234
|
-
http://*|https://*)
|
|
235
|
-
REF_TMP=$(mktemp)
|
|
236
|
-
curl -fsSL --max-time 60 -o "$REF_TMP" "$REF_IMAGE"
|
|
237
|
-
REF_LOCAL="$REF_TMP"
|
|
238
|
-
;;
|
|
239
|
-
*)
|
|
240
|
-
[ -f "$REF_IMAGE" ] || { echo "参考图不存在: $REF_IMAGE" >&2; exit 1; }
|
|
241
|
-
REF_LOCAL="$REF_IMAGE"
|
|
242
|
-
;;
|
|
243
|
-
esac
|
|
244
|
-
|
|
245
|
-
curl -fsS --max-time 240 --retry 2 --retry-delay 5 \
|
|
246
|
-
"$BASE_URL/images/edits" \
|
|
247
|
-
-H "Authorization: Bearer $GPT_IMAGE_API_KEY" \
|
|
248
|
-
--form-string "model=$MODEL" \
|
|
249
|
-
--form-string "size=$SIZE" \
|
|
250
|
-
--form-string "prompt=$PROMPT" \
|
|
251
|
-
-F "image=@$REF_LOCAL" > "$RESP"
|
|
252
|
-
|
|
253
|
-
if jq -e '.error' "$RESP" >/dev/null 2>&1; then
|
|
254
|
-
echo "API error:" >&2
|
|
255
|
-
jq '.error' "$RESP" >&2
|
|
256
|
-
exit 1
|
|
257
|
-
fi
|
|
258
|
-
|
|
259
|
-
# `// empty` 让缺失字段输出空串而非 "null",配合 -s 检查避免写出 3 字节假 PNG
|
|
260
|
-
jq -er '.data[0].b64_json // empty' "$RESP" | base64 --decode > "$OUT"
|
|
261
|
-
[ -s "$OUT" ] || { echo "empty or malformed output: $OUT" >&2; head -c 300 "$RESP" >&2; exit 1; }
|
|
262
|
-
|
|
263
|
-
printf '%s\n' "$PROMPT" > "${OUT%.png}.prompt.txt"
|
|
264
|
-
printf '%s\n' "$REF_IMAGE" > "${OUT%.png}.ref.txt"
|
|
265
|
-
|
|
266
|
-
file "$OUT"
|
|
267
|
-
ls -lt "$BOOK_DIR/封面/"
|
|
268
|
-
```
|
|
88
|
+
读 [references/api-fallback.md](references/api-fallback.md),按其中的环境变量和命令生成;没有参考图走文生图,有参考图走图生图。生成后把原图绝对路径交给 Step 5。
|
|
269
89
|
|
|
270
90
|
### Step 5:导出平台上传尺寸(平台有固定像素时)
|
|
271
91
|
|
|
@@ -302,12 +122,12 @@ fi
|
|
|
302
122
|
| 检查项 | 标准 |
|
|
303
123
|
|:-------|:-----|
|
|
304
124
|
| 文字渲染 | 书名、笔名清晰可辨,字体风格匹配题材 |
|
|
305
|
-
| 题材匹配 |
|
|
125
|
+
| 题材匹配 | 视觉风格与本书题材一致 |
|
|
306
126
|
| 构图合理 | 主体突出,文字不遮挡核心画面 |
|
|
307
|
-
| 平台适配 |
|
|
127
|
+
| 平台适配 | 符合目标平台的封面风格 |
|
|
308
128
|
| 平台尺寸 | 比例与平台一致;缩放到上传尺寸后书名、笔名完整可见、未被裁切 |
|
|
309
129
|
|
|
310
|
-
|
|
130
|
+
未达标或作者希望调整时,可更换构图、色调、字体或平台风格,改完重新生成一张。
|
|
311
131
|
|
|
312
132
|
交付时这样告诉作者;命令、环境变量和接口报错不贴给作者,失败时用一句话说原因和办法(如「生图接口没配好,需要先设置 API Key」):
|
|
313
133
|
|
|
@@ -322,6 +142,7 @@ fi
|
|
|
322
142
|
|
|
323
143
|
## 参考资料
|
|
324
144
|
|
|
325
|
-
| 文件 |
|
|
145
|
+
| 文件 | 何时读 |
|
|
326
146
|
|:-----|:---------|
|
|
327
|
-
| [references/cover-styles.md](references/cover-styles.md) |
|
|
147
|
+
| [references/cover-styles.md](references/cover-styles.md) | Step 1 定平台风格、Step 2 定题材、Step 3 查字体和画面时 |
|
|
148
|
+
| [references/api-fallback.md](references/api-fallback.md) | Step 4 走 API 回退时 |
|