Long-Form Source Novel Analysis
Turn a long source material into an analysis layer that can be cited, can be challenged, and can be built upon. The goal is not to retell the plot, but to identify the dramatic function each segment serves and explain how much it is worth in a vertical short drama.
The analysis is always a candidate. Which storylines to keep, which characters to merge, and where to start are the creator's decisions, formalized into an adaptation contract by
. This skill does not make those decisions on its behalf, nor does it approve its own output.
Quick Start
Offline validation of chapter indexing, sampling, and source-file change detection:
bash
python3 {技能目录}/scripts/selftest.py
python3 {技能目录}/scripts/novel_index.py index <原著.txt> --out <chapter-index.json>
Before You Begin
This skill can be installed and executed independently. First read the source work explicitly provided by the user and the direct inputs of this task; if the current directory is a
project and the project tool is available, it may read
and use its release lifecycle, but the absence of core or any other skill is not a blocker for the analysis work. Full boundaries and rules are in
Stage Contract; no need to read other skills' files.
Material Prerequisites
Only analyze works the creator legally owns or holds usage rights to. The analysis is read-only transformative work: extract structure and function, do not copy the source into paragraphs, and do not carry original sentences into downstream artifacts.
Violence, revenge, betrayal, romantic tension, and dark ethics in popular genres are ordinary fictional narrative elements; perform structured extraction on them as usual. If an individual passage cannot be processed, skip it and record it; do not abort the whole chapter or book because of it—an abort gives every downstream stage an analysis with holes that do not reveal where the holes are.
Determine the Entry Point First
- Only has the title, no source text: Ask the creator to provide a file path or paste the text. Do not recall the plot from the title—without bytes there are no spans, and analysis without spans cannot be cited or challenged.
- Has source text, no project created: Directly create a workspace for this skill, with at least a read-only input directory and an output directory
项目开发/source-analysis/_work/
; copy the source bytes to , record the original file location, then use this skill's to build the index. If is available, it may optionally be used to initialize the same directories and release lifecycle, but installing core must not become a prerequisite for starting the analysis.
- Has source text, project already exists: Go straight into the pipeline.
- Already has partial analysis: Read
项目开发/source-analysis/_progress.md
and resume from the breakpoint; do not rerun completed stages.
Pipeline
is immutable creator input; this stage only reads it. All output lands in
. A standalone workspace and a full project use the same relative paths, so there is no need to migrate analysis artifacts when core is installed later.
| Stage | What it does | Output | Gate |
|---|
| S0 | Build chapter index (script) | , | Stop if the index has problems |
| S1 | Adaptation-value triage (sampling) | | Gate: ask the creator |
| S2 | Per-chapter function extraction | chapters/ch-<N>-extract.md
| Stop if coverage is insufficient |
| S3 | Story-unit and rhythm aggregation | , | Re-check if thresholds are not met |
| S4 | Character consolidation and setting | , | — |
| S5 | Adaptation value and episode candidates | , | Hand off to develop |
S0 Chapter Indexing
The index is the only slice source of truth, built by the chapter indexing script. If every stage runs its own regex separately, chapters will be sliced against mismatched boundaries: chapter 47 is analyzed against one boundary and aggregated against another, and nobody notices.
bash
python3 {技能目录}/scripts/novel_index.py index 输入/{原文文件} \
--out 项目开发/source-analysis/_work/_index.next.json
python3 {技能目录}/scripts/novel_index.py verify \
项目开发/source-analysis/_work/_index.next.json 输入/{原文文件}
# 项目工具可用时可选:
python3 {core 技能目录}/scripts/project_tool.py publish {项目根} \
--owner short-drama-novel-analyze --artifact-id source-analysis:index \
--output 项目开发/source-analysis/_index.json=项目开发/source-analysis/_work/_index.next.json \
--input 输入/{原文文件}
The script recognizes Arabic numeral and Chinese numeral chapter numbers (including 千 / 两, covering serials with more than a thousand chapters),
recognizes only one numbering unit (the most frequent among 章/回/节; the rest are recorded in
), only treats
short standalone lines as headings (body paragraphs beginning with a chapter number are recorded in
long_heading_lines_skipped
), removes the leading table-of-contents block, and validates numbering segment by volume. It makes
no editorial judgments—which chapters matter and what they contain is the business of later stages.
If
is non-empty, stop and report; do not carry an error table into S1. Four common types: numbered chapter gaps (missing chapter or wrong heading captured), duplicate numbers within the same volume, chapters with very little content (usually captured table-of-contents residue or volume front page), and unparseable chapter numbers. Also confirm three counts:
and
—a book divided into
with
subsections should show
with
recorded in the ignored count; the reverse indicates the chapter unit was misjudged. When
long_heading_lines_skipped
is conspicuously large, it usually means the book's chapter titles are genuinely long; confirm with the creator and write the boundaries by hand.
When the source text itself has no chapter headings, the index returns an empty table; in that case, confirm with the creator how to segment, write the boundaries into
, and after passing
, publish through the public lifecycle above—hand-written rows must also carry
/
/
, and
will check each row and report rows with missing fields.
If the source text is changed, the index must be rebuilt; old spans cannot be reused.
checks numbering, order, and line-number coverage, so inserted or deleted lines will be reported; but an in-place edit with the same number of lines will not—that step depends on the person editing the source text to rebuild, because the suite does not compare bytes.
bash
python3 {技能目录}/scripts/novel_index.py verify \
项目开发/source-analysis/_index.json 输入/{原文文件}
S1 Adaptation-Value Triage
Answer the question
whether this book is worth the cost of full decomposition. The criterion is the book's adaptation density—how many units are
, how many are
, and where the production burden falls—so the triage spans the entire book and samples via a script:
bash
python3 {技能目录}/scripts/novel_index.py sample \
项目开发/source-analysis/_index.json --count 12
The sample is deterministic, reproducible, and always includes the first and last chapters; running it a second time references the same set of chapters. Write
according to
Adaptation-Value Triage, covering six things: story framework, ratio of the three verdict classes, opening replacement point, production burden magnitude, the three biggest adaptation risks, and episode-candidate magnitude. The first line states the coverage rate (
returned by the script); all conclusions are limited to the sampled range.
Gate here and ask the creator: provide the estimated time for the triage and full decomposition (roughly by chapter count) and ask whether to continue. If the creator explicitly said 'run it all at once' from the start, still write
, but do not stop and wait—it is the first version of assumptions S5 will backfill against.
At the gate, write the status in
as
, and write 'Next step: S2 per-chapter extraction' as the breakpoint.
The Agent-generated artifacts for S1–S5 are also written to
first, and only published to the official paths in the table above after the stage's mechanical checks. When the project tool is available, use
and stable artifact-ids; when running standalone, atomically replace the official files. Do not overwrite
,
,
, or aggregation artifacts with half-finished products.
is a candidate workspace, not the authoritative analysis layer, and is not part of the deliverable package.
Concurrent subagents write to , and the main thread publishes to the official paths. Subagents only land
_work/chapters/ch-<N>-extract.md
; the main thread runs its mechanical self-checks and then publishes to
. The coverage gate matches filenames against the official
path—if you run it before publishing, every chapter appears in
; that is not a bug, it just means the check ran too early.
is rewritten at every stage, and publishing requires one owner per path, so it uses a fixed artifact-id:
, with owner
short-drama-novel-analyze
; every S0–S5 gate republishes with the same id.
S2 Per-Chapter Function Extraction
Process each chapter according to Chapter Extraction. If concurrent subagents are supported, batch them (5–8 chapters per batch; wait for one batch to land before dispatching the next); otherwise run serially—both paths share the same writing requirements and self-checks, only the speed differs.
After each chapter is extracted, land it in
chapters/ch-<N>-extract.md
, where
is the
from the index, not the original chapter number (original chapter numbers repeat in multi-volume books;
does not). After all chapters are on disk, run coverage:
bash
python3 {技能目录}/scripts/novel_index.py coverage \
项目开发/source-analysis/_index.json 项目开发/source-analysis/chapters
If
is non-empty, run the missing chapters; if
is non-empty, a filename was written incorrectly—it is neither counted as coverage nor treated as a missing chapter; rename the file instead of rerunning.
Do not enter S3 with insufficient coverage—aggregation will still produce a complete-looking result, while the missing chapters leave no trace anywhere.
If a single chapter fails twice in a row, mark it as skipped, record it in the failure log in
, and note the missing chapter in every subsequent aggregation artifact. Failure is acceptable; hiding failure is not.
S3 Story Units and Rhythm
Aggregate from the per-chapter extraction; do not go back and reread the source—the source was already read once in S2, and reading it again only produces a second set of mutually contradictory facts. According to Aggregation and Entities, first identify the story framework (the framework determines how units are cut), then produce:
- : group plot points into units with a beginning and an end, each recording entry state, conflict, cost, and exit state;
- : how key information advances chapter by chapter, the setup → release → aftermath of emotional beats, and cross-chapter foreshadowing and payoff.
After aggregation, run the three threshold self-checks in the same file (assignment confidence, coverage, overlap) and the orphan-plot fallback. Thresholds are not scores; they are signals of fuzzy boundaries: an overlap rate that is too high means two units are actually one.
S4 Characters and Setting
Consolidate characters according to Aggregation and Entities (deduplicate across chapters, normalize aliases, classify by prominence), and infer world rules, power systems, and factions from mention data. Aliases can only be merged when they are proper names or nicknames with co-reference evidence; descriptive epithets and titles never trigger a merge.
Character consolidation is a candidate, not an asset. The character entries here carry
and source references; only after
makes adaptation decisions and
writes them into the script does
build real asset identities from accepted scripts. Bypassing this chain and building assets directly is equivalent to letting the source novel's character table impersonate script appearance evidence.
S5 Adaptation Value and Episode Candidates
This is the dividing line between this skill and generic book decomposition. Produce, according to Adaptation Value:
- : which units can directly work in a vertical short drama, which need a different medium, and which are pure textual pleasures (inner monologue, narrative tricks, long setups) that cannot be realized on screen; where the production burden falls.
- : candidate sets cut by local dramatic outcome and precise handoff, not averaged by chapter number or word count. Each entry carries source spans, the function it serves, and open items.
At the same time,
backfill the triage: which S1 judgments were overturned by the full results, written at the top of
. A sampling conclusion being falsified is far more useful than being silently forgotten—it makes the next book's triage more accurate.
See Episode Candidate Example.
Handoff
After S5, present a creator-readable summary stating: how many chapters were decomposed, which ones were skipped, how many candidate sets were produced, the three biggest adaptation risks, and which triage judgments were overturned. Then hand off to
—it turns the candidates into
项目开发/adaptation-map.jsonl
and the adaptation contract.
This skill does not write ; that is develop's artifact. When a quality conclusion is needed, hand it to the independent
(scope
).
Rule Levels
- : provability of the index and spans, citation integrity, coverage. Can be blocked by scripts.
- : semantic obligations such as whether the function extraction is faithful to the source and whether consolidation preserves dramatic function.
- : practices that are usually helpful; can be overridden when the creator provides a reason.
- : choices such as where to open and which storyline to keep; cannot block on their own.
Do not replace causal judgment with fixed chapter-count formulas, plot-point counts, or section-length ratios.
Artifacts and Boundaries
This skill owns only the files under
:
,
,
,
,
,
,
,
,
,
.
It does not rewrite
, does not write other skills' artifacts under
, does not build assets, write scenes or dialogue, write prompts, generate media, or issue final review conclusions.
Do not copy source text in paragraphs into the analysis. Record locators, spans, and de-referenced functional summaries; when evidence is needed, quote the shortest necessary fragment. The deliverable package must not carry raw material outside the boundary.
Language
Analysis artifacts are read by creators: inside a project, follow
short-drama.json#/language
; when running standalone, follow the language the user is using. The skill does not hardcode a language. This skill does not produce prompt text, so it is unrelated to
.
On-Demand Loading
- Which chapters the triage reads, what six things it writes, and how it avoids masquerading as full analysis: Adaptation-Value Triage
- Per-chapter extraction style, the line between plain description and narrative-framework words, mechanical self-checks, concurrency and serial execution: Chapter Extraction
- Story framework, story units, rhythm and emotion, character consolidation, thresholds, and orphan-plot fallback: Aggregation and Entities
- Adaptation-value assessment, medium substitution, and episode-candidate cutting: Adaptation Value
- What this stage owns, inherits, and must not overstep: Stage Contract