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:
parent
c0d377b894
commit
36c2dbf46e
@ -299,6 +299,13 @@ output).
|
|||||||
|
|
||||||
### Requirements
|
### 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
|
- `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
|
needed; the `.venv\Scripts\python.exe` form just matches a typical Windows project
|
||||||
layout, and plain `python` / `python3` works anywhere.
|
layout, and plain `python` / `python3` works anywhere.
|
||||||
|
|||||||
@ -29,6 +29,13 @@ never compose a scene from a guide the user has not approved.
|
|||||||
only the Python standard library — nothing to install.
|
only the Python standard library — nothing to install.
|
||||||
- Start every task by running the smoke test under "Before you start". If it fails because
|
- 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.
|
`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)
|
## 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)
|
## Step 1 — Build the scene guide (outline)
|
||||||
|
|
||||||
The user gives you a story and how many scenes they want. Read
|
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` (PROMPT A and its WORKED EXAMPLE are the
|
`h3-plan-gate/h3_scene_agent_system_prompt.md` — the PROMPT A section (its ROLE, OUTPUT
|
||||||
quality bar) and write `outline.json` — the guide for every scene — in exactly this
|
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:
|
shape:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@ -107,8 +115,11 @@ through the guide first — never straight into a scene file.
|
|||||||
|
|
||||||
## Step 3 — Compose the scenes one at a time
|
## 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
|
Work only from the approved guide. Before writing scene 1, read **lines 157–568** of
|
||||||
`h3_scene_agent_system_prompt.md` — its SCENE COMPOSITION checklist (subject anchor,
|
`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
|
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
|
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
|
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)
|
## Short stories (2–4 scenes)
|
||||||
|
|
||||||
You may use the single-pass prompt instead — read
|
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,
|
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.
|
per-scene iteration, or when the user wants to revise single scenes or the guide.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user