Cline-aware bounded reads: cite exact line ranges (PROMPT A 53-156, PROMPT B 157-568, single-pass fence 30-428), run-don't-read the 62KB validator, chunking fallback for truncated reads - Cline caps reads at ~50k chars and cuts sooner on small model contexts

This commit is contained in:
Z User 2026-10-31 00:12:22 +00:00
parent c0d377b894
commit 36c2dbf46e
2 changed files with 26 additions and 6 deletions

View File

@ -299,6 +299,13 @@ output).
### Requirements
- **Local models through Cline (Windows 11 + llama.cpp):** Cline truncates file reads at
~50,000 characters, and cuts sooner when the model's context window is small — raise
your llama.cpp context (`llama-server -c 32768`) so a whole task fits. SKILL.md accounts
for this: the scripts are run, never read (`verify_plan_rules.py` is ~62 KB and exceeds
Cline's cap by design), and the big prompt files are read in bounded line ranges cited
in Steps 1, 3, and the short-stories section.
- `build_plan.py` and `verify_plan_rules.py`: Python 3 stdlib only — no venv packages
needed; the `.venv\Scripts\python.exe` form just matches a typical Windows project
layout, and plain `python` / `python3` works anywhere.

View File

@ -29,6 +29,13 @@ never compose a scene from a guide the user has not approved.
only the Python standard library — nothing to install.
- Start every task by running the smoke test under "Before you start". If it fails because
`h3-plan-gate` is missing files, stop and tell the user the folder is incomplete.
- **Never read `verify_plan_rules.py` or `build_plan.py`** — run them and work from their
printed output. Cline truncates file reads (~50,000 characters, sooner when the model's
context window is small), so the ~62 KB validator arrives cut no matter what. A
truncation notice is Cline's read cap, not repo corruption — do not "fix" truncated files.
- The two big prompt files are read in the **bounded line ranges** given in Step 1 and
Step 3 — never whole. If any read still arrives truncated, split it: read lines 1–230,
then 231 onward, and continue from where the last chunk ended.
## Before you start (smoke test)
@ -42,9 +49,10 @@ Expect the suite to pass and the second command to print
## Step 1 — Build the scene guide (outline)
The user gives you a story and how many scenes they want. Read
`h3-plan-gate/h3_scene_agent_system_prompt.md` (PROMPT A and its WORKED EXAMPLE are the
quality bar) and write `outline.json` — the guide for every scene — in exactly this
The user gives you a story and how many scenes they want. Read **lines 53–156** of
`h3-plan-gate/h3_scene_agent_system_prompt.md` — the PROMPT A section (its ROLE, OUTPUT
SHAPE, FIELD RULES, WORKED EXAMPLE and SELF-CHECK are the quality bar); never the whole
~36 KB file. Then write `outline.json` — the guide for every scene — in exactly this
shape:
```json
@ -107,8 +115,11 @@ through the guide first — never straight into a scene file.
## Step 3 — Compose the scenes one at a time
Work only from the approved guide. Before writing scene 1, read the PROMPT B section of
`h3_scene_agent_system_prompt.md` — its SCENE COMPOSITION checklist (subject anchor,
Work only from the approved guide. Before writing scene 1, read **lines 157–568** of
`h3-plan-gate/h3_scene_agent_system_prompt.md` — the PROMPT B section (role, output
shape, turn template, SCENE COMPOSITION checklist, craft, audio, dialogue, timing,
worked example, self-check; ~3.6k tokens as a section, versus ~11k for the whole file).
Its SCENE COMPOSITION checklist (subject anchor,
style anchor, continuity anchor, blocking, camera, performance, physical texture, exit
state) is what each turn is for. Then, in story order: compose ONE scene file, validate
it, fix it until it passes, and only then move to the next scene. Since you wrote the
@ -330,7 +341,9 @@ and sampler latent or the video can come out square.
## Short stories (2–4 scenes)
You may use the single-pass prompt instead — read
`h3-plan-gate/h3_plan_json_system_prompt.md`, have its rules govern one turn that writes
`h3-plan-gate/h3_plan_json_system_prompt.md` (501 lines: the copyable system prompt is
the text fence spanning lines 30–428; on a limited-context agent read lines 1–230
then 231–501 instead of the whole file), have its rules govern one turn that writes
the whole plan, then run `--check` on the file. Use the full workflow for long stories,
per-scene iteration, or when the user wants to revise single scenes or the guide.