fix: template prompt bloat and variable substitution failures

- chapter_polish: remove sections:deliverables — chapter text already in
  {chapter_text}; this caused 150KB+ prompts for late chapters (40MB logs)
- chapter_roundtable: require structured CONSENSUS REACHED block so
  key_changes is always formatted as an extractable string; change
  key_changes schema from list to string to match
- book_chapter: remove sections:history to reduce context; restructure
  Pass 0 to plan-only (no prose output) so the chapter is only written
  once in Pass 1 instead of twice; add explicit instruction in package
  hint to copy full chapter_text into spawn context
- short_story: remove sections:history and sections:deliverables (standalone
  task, needs neither); restructure Pass 0 to plan-only, Pass 1 to write;
  add note to handle literal {genre_name} placeholders gracefully
- recipe_develop, ai_article_write, blog_write: remove sections:history
  (these standalone tasks do not need full project conversation history;
  deliverables kept so they can read the research/plan file)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Baity
2026-03-12 09:05:45 -04:00
parent 5c1b1846fb
commit 4c9222960d
7 changed files with 57 additions and 53 deletions

View File

@@ -10,9 +10,7 @@ agent_prompt:
sections:
- agent
- project
- history
- rag
- deliverables
- message
- rejection_feedback
- instructions
@@ -20,17 +18,18 @@ sections:
steps:
- type: think
hint: |
PASS 0 — STORY PLAN (do this before drafting)
PASS 0 — STORY PLAN (produce a PLAN only — do NOT write prose yet)
GENRE: {genre_name} | AUDIENCE: {genre_audience}
PROSE STYLE: {prose_style}
(If any of the above are empty, infer genre, audience, and prose style from the task description and project goal.)
NOTE: If any field above shows as a literal placeholder (e.g. {genre_name}), it was not
provided — infer genre, audience, and prose style from the project description and task message.
TARGET LENGTH: 3,00015,000 words (short story to novelette)
Before writing, plan the story:
Before writing, plan the story — output ONLY this plan block, no prose:
TITLE: [Working title]
HOOK: [The first sentence or image that pulls the reader in]
HOOK: [The exact first sentence or image that pulls the reader in]
PREMISE: [One sentence — the "what if" or core situation]
PROTAGONIST: [Name, age, voice, fatal flaw, want vs need]
ANTAGONIST / OBSTACLE: [What opposes the protagonist — person, force, or internal]
@@ -41,32 +40,25 @@ steps:
EMOTIONAL CORE: [What does this story make the reader FEEL?]
POINT OF VIEW: [1st / 3rd limited / 3rd omniscient]
TENSE: [Past / present]
KEY SCENES: [35 numbered scene beats]
Now write the complete first draft.
Follow the prose style guide. Stay in chosen POV throughout.
Show — don't tell. Use dialogue. Use sensory detail.
End with purpose: the final line should feel earned and resonant.
Stop here. The full story will be written in the next step.
- type: think
model: power
hint: |
PASS 2DEEPEN & SHARPEN
PASS 1WRITE THE COMPLETE STORY
Read your draft critically through an editor's eyes:
Using the plan from your previous step, write the full story now.
- Does the opening line hook the reader immediately?
- Is every scene earning its place in the story?
- Are there any "telling" passages that should be "showing"?
- Is the protagonist's want vs need clearly felt (not stated) by the end?
- Is the dialogue tight, voice-distinct, and advancing the story?
- Does the pacing serve the emotional arc? (Slow the key moments. Cut the connective tissue.)
- Is the final line earned and resonant — not a summary?
- Is the prose consistent with the style guide?
- Is the total length appropriate for the story being told?
Follow the prose style from the plan. Stay in chosen POV throughout.
Show — don't tell. Use dialogue. Use sensory detail.
Start with the HOOK from your plan as the literal first sentence.
End with the RESOLUTION — the final line must feel earned and resonant.
Target: reach the word count appropriate for the story (3,00015,000 words).
Rewrite the COMPLETE final story incorporating all improvements.
Output ONLY the polished story starting with the title as # [Title].
No commentary, no "Pass 2" label, no preamble.
Output the complete story starting with # [Title].
No commentary, no "Pass 1" label, no preamble.
- type: document
filename: "{{task_name_slug}}"