mirror of
https://github.com/Dasemu/faust-vn.git
synced 2026-11-26 15:26:20 +00:00
docs: reduce docs to Faust and link to vnpipe
Update README, CLAUDE.md, LESSONS.md and docs for the flattened layout; the generic pipeline docs now live in the vnpipe repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a3177de79
commit
086e6db0b4
9 files changed
+83
-119
No files matched your search
+19
-68
@@ -1,75 +1,26 @@
|
||||
# Adaptation rules
|
||||
# Adaptation rules (Faust)
|
||||
|
||||
How a play becomes a visual novel. The text is never rewritten, abridged or reordered:
|
||||
every verse line of the scoped text is shown, in order. What changes is *how* it is
|
||||
shown. Generic rules are implemented in `src/vnpipe/renpy_gen.py`; work-specific choices
|
||||
live in `works/<id>/work.toml` (`[staging.*]`, `[[cues]]`, `[cast.*]`).
|
||||
The generic rules (text is never rewritten, NVL for lyric passages, text rhythm, sprites and
|
||||
expressions, transitions, music, the `work.toml` override layer) live in vnpipe:
|
||||
`../vnpipe/docs/adaptation-rules.md`. This file records how they apply to Faust; the
|
||||
decisions themselves are in `work.toml` (`[staging.*]`, `[[cues]]`, `[[overrides]]`).
|
||||
|
||||
## Principle: show less, suggest more
|
||||
## Application to Faust
|
||||
|
||||
A VN tempts you to draw everything. Romantic verse drama works better when the image
|
||||
sets the mood and the words carry the scene. So:
|
||||
- Sprites appear in dialogue scenes only: the theatre, Mephistopheles before the Lord,
|
||||
Faust in his study.
|
||||
- The ineffable is never drawn. The Lord is a radiance (`bg_heaven_lord`); the Earth Spirit
|
||||
is a lighting change plus a flash and a shake (`bg_study_spirit`). Their lines still
|
||||
carry a name and colour.
|
||||
- The Dedicatoria (the poet's own voice) and the archangels' hymn are NVL poems over a
|
||||
background.
|
||||
- The three archangels are painted into `bg_heaven`, not drawn as three sprites.
|
||||
- One background per location, plus variants only where the text changes the light
|
||||
(macrocosm sign, Earth Spirit, heaven closing).
|
||||
- The prototype ships without audio; music moods are annotated but only played if
|
||||
`vn/game/audio/<mood>.ogg` exists.
|
||||
|
||||
1. **Draw people only when they converse.** Sprites appear in dialogue scenes (the
|
||||
theatre, Mephistopheles before the Lord, Faust in his study).
|
||||
2. **Never draw the ineffable.** The Lord is a radiance (`bg_heaven_lord`), never a
|
||||
figure; the Earth Spirit is a lighting change plus a flash and a shake
|
||||
(`bg_study_spirit`), never a sprite. Their lines still carry a name and colour.
|
||||
3. **Lyric passages are full-screen text (NVL).** The Dedicatoria (the poet's own voice)
|
||||
and the archangels' hymn are read as poems over a background, without a dialogue
|
||||
box or sprites.
|
||||
4. **Choral or crowd presences belong to the background.** The three archangels are
|
||||
painted into `bg_heaven`, not drawn as three sprites.
|
||||
5. **Stage directions are narration**, shown in italics by the narrator. Directions that
|
||||
change the scene also trigger a cue (background, tint, transition). Cast lists under
|
||||
a scene heading are not shown; they only inform who is on stage.
|
||||
6. **One background per location**, plus variants only where the text itself changes
|
||||
the light (macrocosm sign, Earth Spirit, heaven closing).
|
||||
|
||||
## Text rhythm
|
||||
|
||||
- Each scene opens with a title card (scene heading, centred, over black).
|
||||
- Verse is grouped into text boxes of at most **4 lines**, never crossing a stanza or a
|
||||
speaker change. In NVL, a whole stanza (max 8 lines) is shown before the page clears.
|
||||
- Split verse lines (a line shared between two speakers, printed deeply indented) are
|
||||
shown as their own box so the exchange keeps its speed.
|
||||
|
||||
## Sprites and expressions
|
||||
|
||||
- The annotation gives each line one emotion from a fixed vocabulary: `neutral`,
|
||||
`joyful`, `melancholic`, `solemn`, `ironic`, `angry`, `fearful`, `ecstatic`.
|
||||
- `work.toml` maps that vocabulary to the 3–4 expressions each character actually has
|
||||
(`[cast.<id>].expressions`). A text box uses the emotion of its first line.
|
||||
- Positions (`left`, `center`, `right`) come from the annotation, but the first
|
||||
position a character gets in a scene is kept for the whole scene, so nobody jumps
|
||||
around between boxes.
|
||||
- Characters with `sprite = false` are never drawn, even if annotated as on stage.
|
||||
|
||||
## Human judgment layer
|
||||
|
||||
The annotation is an LLM's first guess; `work.toml` can override it, generically:
|
||||
|
||||
- `[staging.<scene>].cast = { <char> = "<pos>" }` pins characters (sprite = true) on stage
|
||||
at fixed positions for the whole scene, overriding the annotation's `on_stage`.
|
||||
- A cue's `move = { <char> = "<pos>" }` slides a visible sprite to another position.
|
||||
- `[[overrides]] { from, to, emotion }` forces the emotion of an inclusive line range
|
||||
(same scene) before expression mapping.
|
||||
|
||||
Stage-direction lines never change who is on stage (they keep the previous box's
|
||||
`on_stage`). Unknown line ids, characters, positions or emotions are errors at generation.
|
||||
|
||||
## Transitions
|
||||
|
||||
- `dissolve` between expressions and on sprite entry/exit, `fade` between scenes,
|
||||
`slow` (2 s dissolve) for light changes, `flash` for supernatural apparitions.
|
||||
|
||||
## Music
|
||||
|
||||
Every line carries an optional music mood (`contemplative`, `comic`, `sacred`,
|
||||
`ominous`, `mystical`, `none`). The prototype ships without audio; the generator emits
|
||||
`play music` only when `game/audio/<mood>.ogg` exists, so adding files is enough.
|
||||
|
||||
## Staging for Faust (work.toml)
|
||||
## Staging (work.toml)
|
||||
|
||||
| Scene | Base | Notes |
|
||||
|---|---|---|
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
The look of every asset is fixed here before anything is generated. Prompts are
|
||||
assembled mechanically: **base prompt + kind template + asset prompt**. The exact
|
||||
strings live in `works/faust/assets/assets.json` (`base_prompt` and each asset's
|
||||
strings live in `assets/assets.json` (`base_prompt` and each asset's
|
||||
`prompt`); this document explains them.
|
||||
|
||||
## Look
|
||||
|
||||
+15
-15
@@ -1,11 +1,11 @@
|
||||
# Plan
|
||||
|
||||
Goal: a playable Ren'Py prototype of the opening of Goethe's *Faust I* (Llorente's
|
||||
Spanish translation) **and** a reusable pipeline that turns any public-domain play
|
||||
from Project Gutenberg into a visual novel. Faust is the first "work"; Werther and
|
||||
others should only need a new `works/<name>/work.toml` plus art.
|
||||
Spanish translation). The reusable pipeline lives in its own repo, `../vnpipe`
|
||||
(see its `docs/pipeline.md`); this repo is the Faust "work": `work.toml`, data,
|
||||
annotations, art and the generated game.
|
||||
|
||||
## Pipeline
|
||||
## Pipeline (as run for Faust)
|
||||
|
||||
```
|
||||
Gutenberg .txt ──fetch──▶ raw (cached, gitignored)
|
||||
@@ -15,7 +15,7 @@ Gutenberg .txt ──fetch──▶ raw (cached, gitignored)
|
||||
LLM sub-agents ─────▶ annotations/cache/*.json (one file per chunk, keyed by hash)
|
||||
──merge──▶ annotated.json (schema-validated, complete)
|
||||
art (MCP) ──▶ assets/assets.json + images (manifest, sha256, status)
|
||||
──renpy──▶ vn/faust/ (generated Ren'Py project)
|
||||
──renpy──▶ vn/ (generated Ren'Py project)
|
||||
```
|
||||
|
||||
Every stage is a `vnpipe` CLI subcommand, deterministic given its inputs, and
|
||||
@@ -27,25 +27,25 @@ hash, so they are resumable and never redone unless their input changes.
|
||||
|
||||
| Path | Purpose |
|
||||
|---|---|
|
||||
| `src/vnpipe/` | Generic pipeline code (no Faust-specific logic) |
|
||||
| `src/vnpipe/schemas/` | JSON Schemas: parsed text, annotation, asset manifest |
|
||||
| `works/faust/work.toml` | Everything work-specific: source URL, scope markers, cast, colors, locations, expression maps |
|
||||
| `works/faust/data/` | `play.txt`, `parsed.json`, `annotated.json` |
|
||||
| `works/faust/annotations/` | Chunk inputs and cached LLM outputs |
|
||||
| `works/faust/assets/` | `assets.json` manifest, generated/processed images |
|
||||
| `vn/<id>/` | Generated Ren'Py project (committed so the repo is playable) |
|
||||
| `docs/` | Design and process docs |
|
||||
| `work.toml` | Everything work-specific: source URL, scope markers, cast, colors, locations, expression maps, staging |
|
||||
| `data/` | `play.txt`, `parsed.json`, `annotated.json` (`raw/` is the gitignored download) |
|
||||
| `annotations/` | Chunk inputs and cached LLM outputs |
|
||||
| `assets/` | `assets.json` manifest, generated/processed images (`raw/` is gitignored) |
|
||||
| `vn/` | Generated Ren'Py project (committed so the repo is playable) |
|
||||
| `tests/` | Faust integration tests (real text, e2e playthrough) |
|
||||
| `docs/` | Faust design and process docs |
|
||||
| `../vnpipe` | The pipeline code, schemas, prompts, GUI templates and generic docs |
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Text** — fetch, clean, cut scope (`docs/scope.md`), deterministic parser + tests,
|
||||
`docs/licensing.md`.
|
||||
2. **Annotation** — JSON Schema, chunker, merge/validate, cache. Haiku sub-agents
|
||||
annotate chunks in parallel. Adaptation rules in `docs/adaptation-rules.md`.
|
||||
annotate chunks in parallel. Faust adaptation rules in `docs/adaptation-rules.md`.
|
||||
3. **Art** — `docs/art-bible.md` with a fixed base prompt. Backgrounds and sprites via
|
||||
the ChatGPT image MCP (max 20 generations/hour), background removal, manifest,
|
||||
placeholders for anything missing.
|
||||
4. **Ren'Py** — generator from `annotated.json` + manifest; `renpy lint` clean;
|
||||
4. **Ren'Py** — vnpipe generator from `annotated.json` + manifest; `renpy lint` clean;
|
||||
web/desktop build if feasible.
|
||||
5. **Report** — `docs/report.md`: automation vs human judgment, cost/time, weaknesses,
|
||||
next steps.
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ Earth Spirit's rejection of Faust — 630 verse lines, 7 stage directions, 4 sce
|
||||
| Parsing | Deterministic parser: scenes, speakers + notes, verse, stanzas, split verses, directions, cast lists; fails loudly on anything unknown | `parsed.json` (639 lines) |
|
||||
| Annotation | `vnpipe annotate chunk` → 16 chunks; 8 Haiku sub-agents (2 chunks each) in parallel; `status`/`merge` validate schema, input hash, line coverage, deterministic fields, cast ids | `annotated.json`, 0 fallback chunks, 0 invalid on first pass |
|
||||
| Art | One Sonnet sub-agent drove the ChatGPT image MCP (≤ 20 generations/hour), imported with sha256 verification, chroma-keyed sprites, reviewed every image | 7 backgrounds + 17 sprites, all approved |
|
||||
| Ren'Py | `vnpipe renpy`: GUI from the SDK's `generate_gui` template, characters, images, script with title cards, NVL/ADV, cues, tints, flash/shake, expression mapping | `vn/faust/`, `renpy lint` clean |
|
||||
| Ren'Py | `vnpipe renpy`: GUI from the SDK's `generate_gui` template, characters, images, script with title cards, NVL/ADV, cues, tints, flash/shake, expression mapping | `vn/`, `renpy lint` clean |
|
||||
| Builds | Ren'Py launcher `web_build` and `distribute --package linux` | `build/web/`, `build/dist/*.tar.bz2` |
|
||||
|
||||
Everything except the LLM and image calls is deterministic and idempotent (re-running
|
||||
|
||||
+14
-13
@@ -1,7 +1,8 @@
|
||||
# Running, linting and building the game
|
||||
|
||||
The Ren'Py project in `vn/faust/` is generated; never edit it by hand. All commands run
|
||||
from the repository root.
|
||||
The Ren'Py project in `vn/` is generated by vnpipe (`../vnpipe`); never edit it by hand. All
|
||||
commands run from the repository root. Generic details (CLI, GUI template, SDK commands):
|
||||
`../vnpipe/docs/running.md`.
|
||||
|
||||
## 1. Ren'Py SDK
|
||||
|
||||
@@ -20,9 +21,9 @@ SDK commands, since Ren'Py writes to `~/.renpy`.
|
||||
## 2. Regenerate the project
|
||||
|
||||
```sh
|
||||
uv run vnpipe renpy # from works/faust/data/annotated.json
|
||||
uv run vnpipe renpy # from data/annotated.json
|
||||
uv run vnpipe renpy --from-parsed # trivial annotations built from parsed.json
|
||||
uv run vnpipe renpy --out some/dir # default output: vn/<work id>
|
||||
uv run vnpipe renpy --out some/dir # default output: vn
|
||||
```
|
||||
|
||||
Generation is deterministic: running it twice gives identical files (no timestamps).
|
||||
@@ -31,13 +32,13 @@ It rewrites `game/{options,gui,screens,support,characters,images,script}.rpy`,
|
||||
is left alone. Music only appears in the script for moods that have a matching
|
||||
`game/audio/<mood>.ogg`, so drop files there and regenerate.
|
||||
|
||||
Images come from `works/<id>/assets/assets.json` (statuses `processed`, `approved`,
|
||||
Images come from `assets/assets.json` (statuses `processed`, `approved`,
|
||||
`placeholder`); anything missing or unusable is replaced by a generated placeholder so
|
||||
the game always runs.
|
||||
|
||||
### GUI template and licences
|
||||
|
||||
`src/vnpipe/renpy_templates/` holds the default Ren'Py GUI (`gui.rpy`, `screens.rpy`,
|
||||
`renpy_templates/` in vnpipe holds the default Ren'Py GUI (`gui.rpy`, `screens.rpy`,
|
||||
`options.rpy` and `gui/*.png`). It was generated once with the SDK's own command and then
|
||||
edited minimally (dark palette, ivory text, accent `#c9a25b`, Roboto Slab font, NVL
|
||||
tweaks, `@@TOKEN@@` placeholders for title/build name/about text/menu background):
|
||||
@@ -54,7 +55,7 @@ documentation assets.
|
||||
## 3. Lint
|
||||
|
||||
```sh
|
||||
HOME=$TMPDIR/renpy-home tools/renpy-sdk/renpy.sh vn/faust lint
|
||||
HOME=$TMPDIR/renpy-home tools/renpy-sdk/renpy.sh vn lint
|
||||
```
|
||||
|
||||
The expected result is a statistics block with no warnings above it.
|
||||
@@ -75,26 +76,26 @@ HOME=$TMPDIR/renpy-home SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy RENPY_RENDER
|
||||
|
||||
The headless run needs the software renderer (`RENPY_RENDERER=sw`, no GL under the dummy
|
||||
video driver); matrix tints are therefore not rendered but all game logic is exercised.
|
||||
`tests/test_renpy_gen.py` runs this for the fixture and for Faust when the SDK exists
|
||||
(slow: about a minute). On a desktop with a display, drop the three variables.
|
||||
`tests/test_faust_e2e.py` runs this when the SDK exists (`RENPY_SDK` or
|
||||
`tools/renpy-sdk`; slow: about a minute). On a desktop with a display, drop the three variables.
|
||||
|
||||
## 4. Play
|
||||
|
||||
```sh
|
||||
tools/renpy-sdk/renpy.sh vn/faust
|
||||
tools/renpy-sdk/renpy.sh vn
|
||||
```
|
||||
|
||||
## 5. Builds (output under `build/`, gitignored)
|
||||
|
||||
```sh
|
||||
# Web (HTML5)
|
||||
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher web_build vn/faust --destination build/web
|
||||
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher web_build vn --destination build/web
|
||||
python3 -m http.server -d build/web 8000 # then open http://localhost:8000
|
||||
|
||||
# Linux desktop
|
||||
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher distribute vn/faust --package linux --destination build/dist
|
||||
tools/renpy-sdk/renpy.sh tools/renpy-sdk/launcher distribute vn --package linux --destination build/dist
|
||||
```
|
||||
|
||||
`--package` also accepts `win` and `mac`; omit it to build every package. The web build
|
||||
also leaves a `build/web.zip` next to the folder. A web build writes
|
||||
`vn/faust/progressive_download.txt`; delete it (it is not part of the generated project).
|
||||
`vn/progressive_download.txt`; delete it (it is not part of the generated project).
|
||||
+4
-4
@@ -5,7 +5,7 @@ Project Gutenberg #68566.
|
||||
|
||||
## Included
|
||||
|
||||
Raw file lines 1092-1921 (`works/faust/data/raw/pg68566.txt`), i.e. from the `DEDICATORIA`
|
||||
Raw file lines 1092-1921 (`data/raw/pg68566.txt`), i.e. from the `DEDICATORIA`
|
||||
heading up to, but excluding, the `(_Llaman._)` direction at line 1923.
|
||||
|
||||
| Scene id | Heading | Verse lines | Directions | Cast lines | Speeches |
|
||||
@@ -33,7 +33,7 @@ movement.
|
||||
|
||||
## Scope rule
|
||||
|
||||
Defined in `works/faust/work.toml` under `[scope]` and applied by `vnpipe.text.clean`:
|
||||
Defined in `work.toml` under `[scope]` and applied by `vnpipe.text.clean`:
|
||||
|
||||
- Start: the first line whose stripped text equals `start_marker`. Table of contents entries
|
||||
carry page numbers, so they never match as whole lines.
|
||||
@@ -41,6 +41,6 @@ Defined in `works/faust/work.toml` under `[scope]` and applied by `vnpipe.text.c
|
||||
(exclusive).
|
||||
- Illustration lines are dropped, trailing whitespace is removed, blank runs collapse to one.
|
||||
|
||||
`vnpipe parse` writes the result to `works/faust/data/play.txt` and the structured form to
|
||||
`works/faust/data/parsed.json` (line ids `<scene>_<NNNN>`, numbered from 0001 per scene;
|
||||
`vnpipe parse` writes the result to `data/play.txt` and the structured form to
|
||||
`data/parsed.json` (line ids `<scene>_<NNNN>`, numbered from 0001 per scene;
|
||||
`src_line` points back to the raw file).
|
||||
Reference in new issue
Block a user