SuperAPI AI Directory

novel-outline

Writing & research

View repository

Updated 10-15 15:39

About this skill

novel-outline

Input a novel + target parameters, output a five-piece short-drama adaptation outline set.Four pieces are written by the model, one is computed by script(the asset inventory is automatically aggregated from the episode data).

{baseDir} = the directory containing this file. Script {baseDir}/scripts/novel-outline.mjs, zero dependencies,node run it directly.

Boundaries (things not done): no script dialogue, no storyboards, no image/TTS prompts. Synopses are narrative prose; if quotation-marked dialogue appears, that is out of bounds——validate will block it. If you want to extract character settings from the novel (profiles / visual prompt words / concept art), that is the job of novel-characters .


Step 0 — Collect parameters ⛔ no start without them

Ask all at once, don't interrogate one by one. Two must-ask + two with defaults pending confirmation:

Parameter Handling
Total episodes × per-episode duration Must ask, no reasonable default
Genre Must ask, determines the hook type; guess wrong and the whole thing is ruined
Adaptation degree Defaultcore extraction(faithful / core extraction / shell borrowing), just inform
Existing preferences Default none (which character or which scene you want to keep)

Different platform thresholds can be carried with params.thresholds overrides (defaults: protagonist group ≤ 5, important supporting characters ≤ 10, functional characters ≤ 10, hook interval ≤ 3 episodes).The main-scene cap does not need configuring; it is calculated automatically with the episode count: 4 + ⌈episodes/10⌉, clamped to 5–15 (60 episodes → 10). This is the number for AI short dramas——scenes are generated and there is no set-building cost, so loosen it for watchability; only an explicit maxPrimaryScenes overrides it.Short works (20–30 episodes) are advised to tighten the character-tier thresholds, since the defaults are given for 60+ episodes.

Extract the character list from the source text——the outline is the upstream of character settings; the tiers, character arcs, and sources set in thecharacters block are taken directly by downstream novel-characters as the character roster, with no need to judge again who is important.

The exception is if the user already has cast.json(previously run separately novel-characters): then use it as character material; characters, aliases, and relationships are all ready-made, with no need to re-extract from the source text. Tiers are reverse-mapped by importance : protagonist/major → lead,supporting → support,minor → functional。

Step 1 — Locate the input

Material priority, hard-coded:

  1. User-namedclose-read chapters
  2. Chapter directory + synopsis
  3. Full textvolume summaries(Step 2)

Do not make things up from the book title——all judgments are based on the provided text. Implementation means:adaptation.keep key trade-offs must be accompanied by evidence(verbatim excerpts from the source text).

If pasting the main text directly, first save it as a .txt. Output directory: use the user-specified one; if none, use the same-level directory as the original book.

Step 2 — Volume summaries (only needed for long texts)

This step is scaffolding, not a deliverable——The volume summaries are for compressing the original text for models that haven't read it. In two cases, skip straight to Step 3:

  • Short story, fits in a single volume
  • The current session has already read the full original text——No need to compress it again, and no need to backfill later

Long-form and the original text hasn't been read:

node {baseDir}/scripts/novel-outline.mjs chunk <book.txt> <workdir>

Split into volumes by chapter titles (default 15 chapters per volume,--per-volume adjustable); if chapters can't be identified, split by word count. Print {"volumes": N, ...};truncated: true to tell the user plainly that the tail wasn't scanned—don't keep quiet about it.

One sub-agent per volume (if concurrency is supported,send them all in the same message): read {baseDir}/references/volume-pass.md, read <workdir>/vol-NN.txt, write the volume summary to <workdir>/summary-NN.json, and reply with only one line: "done NN".

Step 3 — Quick-version skeleton → user signs off ⛔

Read {baseDir}/references/outline-pass.md and {baseDir}/references/schema.md, and follow them. Produce the four skeleton blocks (adaptation / characters / scenes / beats), written as <workdir>/outline.json。

node {baseDir}/scripts/novel-outline.mjs validate <workdir>/outline.json --stage beats

Once the beats file passes,put three things in front of the user for sign-off: which storyline was cut, which characters were merged, and which episode the big climax lands in. Don't move to Step 4 without a nod—if the quick version is wrong you only lose one round of skeleton; if you discover the direction is wrong only after the episode breakdown is written, everything is wasted.

Step 4 — Detailed-version skeleton

Incorporate the user's feedback to revise the skeleton, then run validate --stage beatsonce more. If the user has no comments, go straight to Step 5.

Step 5 — Episode synopses (in batches)

Each batch ≤ 10 episodes, and parallelize if possible. Each sub-agent gets: the four skeleton blocks after sign-off, the episode range it is responsible for, and the payoff points within that range; read {baseDir}/references/episode-pass.md and follow it, and write the output to <workdir>/eps-NN.json。

When merging, sort by ep and splice into outline.json's episodes。

Step 6 — Validation ⛔ cannot be skipped

node {baseDir}/scripts/novel-outline.mjs validate <输出目录>/<书名>-outline.json

All 14 quality gates are code, not a checklist for you to read: 1–5 protagonists, ≤ 10 important supporting characters, ≤ 10 functional characters, main scenes not over the limit (dynamic with episode count, 60 episodes → 10), ≤ 8 narrative props, one-off scenes have avoidance plans, payoff intervals ≤ 3 episodes with no gaps, episode 1 has a hook, the big climax isn't crammed into the last episode, all three columns are complete for each episode, three characters in the same frame have a breakdown, generation difficulties go into warnings, references are complete with no unemployed characters, no idle scenes, no zero-episode props, and narrative prose has no dialogue.

If there are violations, fix them one by one, rerun after fixing, until it passes.

Step 7 — Output and reporting

cd <输出目录>
node {baseDir}/scripts/novel-outline.mjs render <书名>-outline.json --md   > <书名>-outline.md
node {baseDir}/scripts/novel-outline.mjs render <书名>-outline.json --html > outline-report.html

The report interface defaults to Chinese; if the user wants an English interface, add --lang en(or write the lang field at the top level of outline.json, with--lang taking priority). Only translate the interface text; output data content (payoff types, synopses, quality gate text) as-is.

The report includes: KPI band, key decisions (the three sign-off items, with the big climax list and character-position stats calculated automatically), payoff timeline (gaps marked on the axis, turning red when over threshold), per-episode scheduling matrix, scene overview cards, asset volume conversion, quality gates (✓/✗ baked into the page; if not passed, a problem banner pops up), and an export JSON button (what downloads is outline.json as-is).

In one sentence, report clearly: how many episodes, how many characters and scenes, the payoff distribution, and the report path; if truncated or if there are gates that didn't pass, say so explicitly.

Final deliverable:

<输出目录>/
├── <书名>-outline.json
├── <书名>-outline.md
└── outline-report.html            ← 双击就能开

Checkup mode

The user pastes anexisting outlineand only wants a diagnosis: convert it into outline.json (ask the user for missing fields or mark them as missing), then:

node {baseDir}/scripts/novel-outline.mjs checkup <outline.json>   # 终端 ✓/✗
node {baseDir}/scripts/novel-outline.mjs render <outline.json> --html > outline-report.html

The quality gate panel is the diagnostic report. Gates that fail do not block rendering—the whole point is to lay the pathology out in the open.

Linked updates

When the user changes something upstream, run validate, and errors will name exactly where downstream is broken: which episodes still reference deleted IDs after merging characters, which episodes spin empty after cutting scenes, and where vacuum zones appear after moving the excitement beats.Don't rely on memory to prompt linkage; rely on the validator.

Boundaries

  • Single-run cap of 60 volumes (15 chapters per volume, about 900 chapters). If exceeded, report explicitly truncated, do not silently truncate
  • Thresholds are parameters, not sacred decrees: if the platform differs, override with params.thresholds , don't change the code
  • The report interface has built-in Chinese and English (--lang, default Chinese, or follow outline.json's lang field): interface copy and quality gate labels are translated, while data content (excitement beat types, synopses, names) and gate failure details remain in the original text
  • The fifth item of the five-piece set (the asset inventory) is always computed; if handwritten by the model, something will inevitably be missed

Self-test

node {baseDir}/scripts/selftest.mjs

249 assertions, no model calls, no quota spent. Each of the 14 quality gates has a break-through test case—proving it really blocks. Run this first after changing the script.

Built-in sample

{baseDir}/examples/渡口-outline.json: adapt the short story "Ferry Crossing" (novel-characters' built-in sample) into a 6-episode × 2-minute micro outline, with four characters, three scenes, and four excitement beats, passing all quality gates. Use it as a quality benchmark and also as a self-test fixture.