SuperAPI AI Directory

short-drama-novel-analyze

General & other

View repository

Updated 10-16 09:30

About this skill

Full-Length Source-Material Analysis

Turn a long piece of material intoan analysis layer that can be cited, can be rebutted, and can be used further. The goal is not to retell the plot, but to identify the dramatic function each passage carries and to state how much it is worth in a vertical-screen short drama.

Analysis is always a candidate. Which storyline to keep, which characters to merge, and where to begin are the creator's decisions, established by $short-drama-develop as the adaptation contract. This skill does not decide for it, nor does it approve its own output.

Quick Start

Offline verification of the chapter index, sampling, and source-file change detection:

python3 {技能目录}/scripts/selftest.py
python3 {技能目录}/scripts/novel_index.py index <原著.txt> --out <chapter-index.json>

Before You Start

This skill can be installed and executed independently. First read the source material explicitly provided by the user and the direct inputs for this task; if the current directory is a short-drama project and the project tools are available, you may read status and use its release lifecycle, but the absence of core or any other skill is not a blocking condition for the analysis work. For the complete boundaries and rules, see Stage Contract, with no need to read files from other skills.

Material Preconditions

Only analyze works that the creatorlawfully holds and has the right to use. Analysis is read-only transformative work: extract structure and function, do not copy the original text into passages, and do not move original sentences into downstream outputs.

Violence, revenge, betrayal, romantic tension, and dark ethics in popular genres are conventional fictional narrative elements; perform structured extraction as usual. When an individual passage cannot be processed, skip that passage and record it; do not abort the entire chapter or the entire book because of it—aborting would leave all subsequent stages with an analysis that has holes but no way to see where the holes are.

Determine the Entry Point First

  1. Only a title, no original text: ask the creator to provide a file path or paste the text. Do not recall the plot from the title— no bytes means no spans, and an analysis without spans cannot be cited or rebutted.
  2. Original text available, no project created: directly create a workspace for this skill itself, containing at minimum a read-only input directory 输入/ and an output directory 项目开发/source-analysis/_work/; copy the original text bytes into 输入/ , record the original file location, then use this skill's novel_index.py to build the index. If $short-drama is available, you may optionally use it to initialize the same directories and release lifecycle, but installing core must not become a precondition for starting the analysis.
  3. Original text available, project already in: go directly into the pipeline.
  4. Partial analysis already exists: read 项目开发/source-analysis/_progress.md to resume from the breakpoint, without rerunning completed stages.

Pipeline

输入/ is the immutable creator input; this stage only reads it. All outputs land in 项目开发/source-analysis/. The standalone workspace and the full project use the same set of relative paths, so no analysis artifacts need to be migrated when core is installed later.

Stage What It Does Output Stop
S0 Build chapter index (script) _index.json、_progress.md Stop if the index has problems
S1 Quick adaptation-value assessment (sampling) triage.md Stop and ask the creator
S2 Chapter-by-chapter function extraction chapters/ch-<N>-extract.md Stop when coverage is insufficient
S3 Plot units and rhythm aggregation story-units.md、rhythm-and-emotion.md Review when the threshold is not met
S4 Character merging and setting characters.md、world.md —
S5 Adaptation value and episode candidates adaptation-value.md、episode-candidates.jsonl Hand off to develop

S0 Chapter index

The index is thesole source of truth for slicing, established by the chapter index script . If each stage runs its own regex once, it will cut out chapters that do not match each other; Chapter 47 would be analyzed by one boundary and aggregated by another, and nobody would notice.

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 numerals and Chinese numeral chapter numbers (including 千 / 两, covering serials with more than a thousand chapters),recognizes only one numbering unit (the one that appears most often among 章/回/节, and records the rest in ignored_heading_units), and treats onlyshort standalone linesas titles (body paragraphs beginning with a chapter number are recorded in long_heading_lines_skipped), removes the table-of-contents block at the beginning, and validates numbering by volume segment. Itdoes not make editorial judgments—which chapters matter and what they are about are matters for later stages.

problems If non-empty, stop and report; do not enter S1 with a bad table. There are four common cases: chapter-number gaps (missing chapters or wrongly captured titles), duplicate numbers within the same volume, chapters with extremely little body text (usually table-of-contents residue or volume front matter was captured), and unparseable chapter numbers. Also confirm three counts:chapter_unit and ignored_heading_units—a book that uses 第N章 to divide chapters and uses 第N节 to divide sections should show chapter_unit: 章 and 节 recorded in the ignored count; the reverse indicates that the chaptering unit was judged incorrectly;long_heading_lines_skipped when it is obviously too large, it is most likely that this book's chapter titles are genuinely very long, and the boundaries need to be written by hand after confirming with the creator.

When the original text itself has no chapter titles, the index returns an empty table. At that point, confirm with the creator how to split it, write the boundaries into _work/_index.next.json, and after passing verify , publish according to the public lifecycle above—handwritten lines must also include all sequence / line_start / line_end,verify will check line by line and report lines with missing fields.

After changing the original text, the index must be rebuilt; old spans cannot be reused.verify checks numbering, order, and line-number coverage, so inserted or deleted lines will be reported; but in-place rewrites with the same number of lines will not be—that step relies on whoever changed the original text to rebuild it themselves, and the suite does not compare bytes.

python3 {技能目录}/scripts/novel_index.py verify \
  项目开发/source-analysis/_index.json 输入/{原文文件}

S1 Adaptation value quick assessment

Answerwhether this book is worth the cost of a full decomposition. The criterion is the book's overall adaptation density—screen_ready how many units there are, prose_only how many there are, and which sections carry the production burden—so the quick assessment spans the whole book, using script sampling:

python3 {技能目录}/scripts/novel_index.py sample \
  项目开发/source-analysis/_index.json --count 12

Sampling is fixed, reproducible, and always includes the beginning and end; a second run references the same batch of chapters. Write according to Adaptation value quick assessment Write triage.md, covering six things: the story framework, the proportions of the three judgment types, opening replacement points, the order of magnitude of the production burden, the three biggest adaptation risks, and the order of magnitude of episode candidates. The first line states the coverage rate (the script returns coverage_ratio); all conclusions are limited to the sampling scope.

Stop here and ask the creator: give the quick assessment and the estimated time for full decomposition (roughly estimated by chapter count), and ask whether to continue. When the creator states at the outset to 'run it all at once', still write triage.md, but do not stop and wait—it is the first version of the hypothesis to be backfilled for comparison in S5.

When stopping, put _progress.md status as paused_after_triage, and write the breakpoint as "Next: S2 chapter-by-chapter extraction".

The Agent creation outputs of S1–S5 are likewise first written to source-analysis/_work/, and after completing this stage's mechanical checks, published to the official paths in the table above. When project tools are available, use project_tool.py publish and a stable artifact-id; when running standalone, atomically replace the official files. Do not overwrite _index.json、_progress.md、chapters/*.md or aggregate outputs with half-finished work. _work/ is a candidate workspace, not an authoritative analysis layer, and does not enter the delivery package.

Concurrent subagents write _work/, the main thread publishes to the official path. Subagents only land _work/chapters/ch-<N>-extract.md, and the main thread publishes to chapters/after running the mechanical self-checks. The coverage gate matches filenames by the official path chapters/ —if you run it before publishing, every chapter will go into unmatched_files; that is not a defect, it is just running too early.

_progress.md is rewritten at every stage, and publishing requires that a path have only one owner, so it uses a fixed artifact-id:source-analysis:progress, the owner is short-drama-novel-analyze, and every S0–S5 stop republishes with the same id.

S2 Chapter-by-Chapter Function Extraction

Process each chapter according to chapter extraction . If concurrent subagents are possible, run them in batches (5–8 chapters per batch, wait for one batch to land before sending the next); if not supported, run serially—the writing requirements and self-checks are the same for both paths, only the speed differs.

After each chapter is extracted, it lands in chapters/ch-<N>-extract.md,<N> is the sequencein the index, not the original chapter number (original chapter numbers repeat in multi-volume books, sequence does not). After everything has landed, run coverage:

python3 {技能目录}/scripts/novel_index.py coverage \
  项目开发/source-analysis/_index.json 项目开发/source-analysis/chapters

missing If non-empty, rerun the missing chapters; ifunmatched_files is non-empty, it means some filenames are wrong—it neither counts as covered, nor is treated as a missing chapter, and must be renamed rather than rerun.Do not enter S3 when coverage is insufficient—aggregation will still produce a result that reads as complete, and the missing chapters will leave no trace anywhere.

If a single chapter fails twice in a row, mark it as skipped, write it into the failure record in _progress.md , and note the chapter's absence in every subsequent aggregate output. Failure is acceptable; hiding failure is not.

S3 Plot Units and Pacing

Aggregate from the chapter-by-chapter extraction; do not go back and reread the original text—the original text has already been read once in S2, and reading it again will only yield a second set of mutually contradictory facts. According to aggregation and entities , first identify the story framework (the framework determines how units are divided), then produce:

  • story-units.md: group plot points into units with a beginning and an end; each unit records the entering state, conflict, cost, and exiting state;
  • rhythm-and-emotion.md: how key information advances chapter by chapter, the setup→release→aftermath of emotional touchpoints, cross-chapter foreshadowing and payoff, and a thrill-point table ranked by audience payoff.

After aggregation is complete, run the three threshold self-checks in the same file (attribution confidence, coverage, overlap rate) and the scattered-plot fallback. Thresholds are not a score; they aresignals of fuzzy boundaries: an excessively high overlap rate means two units are actually one.

S4 Characters and Setting

According to aggregation and entities , merge characters (cross-chapter deduplication, alias normalization, and tiering), and induce world rules, power systems, and factions from mention data. Aliases can only be merged when they are proper names or nicknames with evidence of co-reference; descriptive appellations and titlesnever trigger merging。

Character merging is a candidate, not an asset. The character entries here carry unresolved and source citations, handed to $short-drama-develop to decide on adaptation decisions,$short-drama-write to write into the script, only then does $short-drama-assets establish the real asset identity from the accepted script. Bypassing this chain to directly create assets is equivalent to letting the source material's character list impersonate evidence of the script's appearances.

S5 Adaptation Value and Episode Candidates

This is the watershed between this skill and generic book breakdown. Output by adaptation value :

  • adaptation-value.md: which units can work directly in vertical-screen short drama, which need a change of carrier, which are pure text pleasure (inner monologue, narrative trickery, long buildup) that cannot be cashed out on screen; where the production burden falls.
  • episode-candidates.jsonl: bypayoff distribution, local dramatic results, and precise handoffsthe candidate set cut out, not split evenly by chapter number or word count. Each entry carries source span, the function it bears, the payoff it inherits, and unresolved items.

At the same timebackfill the quick review: which judgments from S1 were overturned by the full results, written into the beginning of adaptation-value.md . A sampling conclusion being falsified is far more useful than it being quietly forgotten—the next book's quick review will be more accurate because of it.

For samples see Episode Candidate Samples。

Handoff

After S5 is complete, present a creator-readable summary explaining: how many chapters were broken down, which were skipped, how many candidate sets were produced, the three biggest adaptation risks, and the judgments overturned in the quick review. Then hand off to $short-drama-develop— it turns candidates into 项目开发/adaptation-map.jsonl and the adaptation contract.

This skill does not write adaptation-map.jsonl, which is a product of develop. When a quality conclusion is needed, hand off to the independent $short-drama-review(scope source_analysis)。

Rule Grading

  • structural_invariant: provability of indexes and spans, citation integrity, coverage. Can be blocked by scripts.
  • reviewed_invariant: semantic obligations such as whether function extraction is faithful to the original text, whether merging preserves dramatic function, etc.
  • craft_default: practices that are usually helpful; creators may override after explaining their reasons.
  • taste_option: choices such as where to begin, which line to keep; must not block on their own.

Do not replace causal judgment with fixed chapter-count recipes, plot-point counts, or length ratios.

Products and Boundaries

This skill only owns files under 项目开发/source-analysis/ :_index.json、_progress.md、 chapters/*.md、triage.md、story-units.md、rhythm-and-emotion.md、 characters.md、world.md、adaptation-value.md、episode-candidates.jsonl。

It does not rewrite 输入/, does not write products of other skills under 项目开发/ , does not create assets, does not write scenes and dialogue, does not write prompts, does not generate media, and does not issue final review conclusions.

Do not copy source text in paragraphs into the analysis. Record locators, spans, and de-quoted function summaries; when evidence is needed, cite the shortest necessary fragment. The delivery package must not take raw material outside the boundary.

Language

Analysis products are read by creators: within a project, follow short-drama.json#/language, when run independently, follow the language used by the user, not hardcoding language within this skill. This skill does not produce prompt body text, and is unrelated to #/format/prompt_language .

Load on Demand

  • Which chapters the quick review reads, what six things it writes, how it avoids impersonating full analysis:Adaptation Value Quick Review
  • Chapter-by-chapter extraction writing, the boundary between plain description and narrative framing words, mechanical self-checks, concurrency and serialization:Chapter Extraction
  • Story framework, plot units, pacing and emotion, character merging, thresholds, and scattered fallback:Aggregation and entities
  • Adaptation value assessment, carrier replacement, and candidate episode segmentation methods:Adaptation value
  • What this stage owns, what it inherits, and what it does not overstep:Stage contract