Sprint 56f: Human-readable file naming - Chapter_N_draft/review_a/b/c/final

This commit is contained in:
David Baity
2026-03-22 18:57:33 -04:00
parent d8b566e7c4
commit 177acdfa35
21 changed files with 940 additions and 64 deletions

View File

@@ -0,0 +1,118 @@
name: blog_series_outline
description: "Plan a blog series — generate a numbered multi-post outline with title, brief, and keywords per post."
debug: true
system: agent_prompt
agent_prompt:
- "= identity.md"
- "agent.rag.json"
sections:
- agent
- project
- rag
- deliverables
- message
- instructions
steps:
- type: think
hint: |
You are planning a blog series for the project described above.
Read the project description and current message to understand:
- SERIES TOPIC: What is the overall theme or subject?
- TARGET READER: Who is this series for? What is their experience level?
- VOICE: What tone should the posts use? (e.g., conversational, authoritative, peer-to-peer)
- POST COUNT: How many posts? (default to 10 if not specified)
- POST LENGTH: Target word count per post? (default to 800-1200 if not specified)
First, organize the series into 3-5 thematic clusters. Each cluster covers one
dimension of the topic. This ensures the series doesn't repeat itself and builds
progressively.
Think through:
- What does a beginner need to know first?
- What intermediate topics will add depth?
- What advanced or nuanced topics complete the picture?
- What "quick win" or highly shareable posts should be included?
Output a CLUSTER PLAN:
Cluster A: [Name]
- [3-4 post ideas that belong here]
Cluster B: [Name]
...
Stop here — the numbered outline comes in the next step.
- type: think
model: power
hint: |
Using the cluster plan above, write the COMPLETE numbered outline.
For each post, output exactly this format on ONE LINE:
N. [Post Title] — [2-3 sentence brief covering what the post does]. Keywords: [kw1, kw2, kw3]
Rules:
- Titles must be specific and curiosity-driven (not "Introduction to X" — instead "Why X breaks and how to fix it")
- Briefs must be 2-3 sentences describing the actual content (not the title restated)
- 3 keywords per post: 1 primary, 2 supporting (naturally integrated, not stuffed)
- Number sequentially from 1 to N
- Posts should build logically — early posts don't assume knowledge from later posts
- Vary post types: how-to, analysis, checklist, case study, opinion, beginner explainer
- At least 2 posts should be "highly shareable" (strong opinion, surprising finding, or practical quick-win)
Output ONLY the numbered list. No prose, no cluster headings, no commentary.
- type: document
filename: "{{task_name_slug}}-outline"
- type: package
packet_type: IntakeResponse
hint: |
Convert every post from the numbered blog outline above into a create_task action.
RULES:
- One action per post, in order
- task_name: "Write Post N: [Post Title]" where N is the exact post number from the outline
- agent_name: "Iris"
- task_type: "blog_write"
- description: Start with the post title, then the 2-3 sentence brief, then "Keywords: [keywords]"
Full format:
"[Post Title]
[Full brief from the outline — 2-3 sentences describing what the post covers]
Keywords: [comma-separated keywords from the outline]"
- depends_on: "" (all posts can be written in parallel)
Produce ONLY the numbered actions. No prose, no commentary.
schema:
actions:
- type: create_task
task_name: "string"
agent_name: "string"
task_type: "blog_write"
description: "string"
depends_on: "string"
- type: close
rag_update: true
adjudication:
enabled: true
pass_threshold: 65
deliverable_type: coordination
criteria:
completeness:
weight: 35
description: "All posts have title, brief, and keywords in the correct format"
variety:
weight: 30
description: "Posts cover different angles, formats, and difficulty levels — no redundancy"
progression:
weight: 20
description: "Series builds logically; posts don't assume knowledge the series hasn't covered"
shareability:
weight: 15
description: "At least 2 posts have obvious viral or sharing potential"

View File

@@ -3,6 +3,13 @@ description: "Write a standalone blog post — draft, polish, deliver."
debug: true
system: agent_prompt
requires:
- item_title
- item_brief
- voice
- audience
- item_target_words
skills:
- guides/BlogWritingGuide.md
@@ -21,55 +28,10 @@ sections:
- instructions
steps:
- type: think
max_tokens: 4000
hint: |
Your task message contains the blog content brief. Follow it exactly.
Before writing, confirm:
- TOPIC and TARGET READER
- HOOK: the first sentence drops the reader into a real scenario or provocative question
- PROMISE: the one thing they walk away with
- KEY POINTS to cover
- TONE and WORD COUNT TARGET
- CALL TO ACTION
Write the full blog post:
- # Title as H1 (make it specific and curiosity-driven, not generic)
- Optional subhead in italics
- Opening hook: first 23 sentences pull the reader in immediately
- Body: 35 sections with bold subheadings, short readable paragraphs
- At least one concrete example, number, or real scenario per section
- "Try This Week" or equivalent action section before the closing
- Memorable closing line that reinforces the promise
Tone rules:
- Peer-to-peer. Write like a knowledgeable friend, not a corporate brochure.
- Use "you" and "your" — not "one" or "the reader."
- Short sentences preferred. No filler paragraphs.
- No listicles of 10+ items without grouping them into themes.
- type: think
max_tokens: 4000
model: power
hint: |
Read your draft as the target reader would on their phone.
Apply these editorial passes in sequence:
1. CUT — eliminate any warmup sentences, vague generalities, or brochure-speak
2. SHARPEN — every subheading should be scannable and specific
3. HOOK CHECK — does the opening pull in the first two sentences?
4. CTA CHECK — is the call to action specific and doable this week?
5. VOICE CHECK — does it sound human and direct throughout?
Target word count: stay within the specified range. Quality over quantity.
Output ONLY the polished final blog post starting with # [Title].
No commentary, no "Pass 2" label, no preamble.
- include: steps/blog_draft_step.yml
- include: steps/blog_polish_step.yml
- type: document
filename: "{{task_name_slug}}"
- type: close
rag_update: true

View File

@@ -10,15 +10,25 @@ requires:
- chapter_target_words
- chapter_ref
skills:
- guides/YAFictionGuide.md
- guides/RomanceFictionGuide.md
- guides/SciFiFictionGuide.md
conditional_skills:
- path: guides/YAFictionGuide.md
genre_contains:
- "YA"
- "Young Adult"
- path: guides/RomanceFictionGuide.md
genre_contains:
- "Romance"
- "Contemporary Romance"
- path: guides/SciFiFictionGuide.md
genre_contains:
- "Science Fiction"
- "Sci-Fi"
- "SciFi"
- "Science-Fiction"
# Genre-aware guide use: All three genre guides are injected so this template
# can serve any fiction genre. Apply ONLY the guide that matches {genre_name}.
# Ignore guides for other genres — conflicting craft signals from non-matching
# genres will degrade the chapter. The active genre is always {genre_name}.
# Genre-aware guide use: Only the guide whose genre_contains keywords match {genre_name}
# is injected. The pipeline skips non-matching guides entirely, so there are no
# conflicting craft signals from other genres.
agent_prompt:
- "= identity.md"
@@ -43,8 +53,7 @@ steps:
PROSE STYLE GUIDE: {prose_style}
TARGET CHAPTER LENGTH: ~{chapter_target_words} words
⚠️ SKILLS & GUIDES NOTE: You have multiple genre guides available.
Apply ONLY the guide that matches {genre_name}. Ignore guides for other genres.
GENRE GUIDE: Your skills section contains exactly the guide for {genre_name}. Apply it fully.
CONTINUITY GUARDRAILS:
- Use ONLY the outline / character bible and the immediately previous chapter for continuity.
@@ -86,6 +95,15 @@ steps:
- CLOSING HOOK: Exact last image or line that makes readers continue
- Reminders about continuity, prose style, and target length
STEP 5 — PREVIOUS CHAPTER CHARACTER STATE (if available):
If context contains a block starting with "PREVIOUS CHAPTER CHARACTER STATE:",
include it verbatim in the prompt under the heading:
"CHARACTER CONTINUITY: The previous chapter ended with these character states:
{prev_character_state}"
These states override any outline prediction that conflicts with them — the character
is ALREADY in this emotional/physical state at the start of this chapter.
If no character state was provided, skip this block entirely.
Stop here. Output ONLY the draft prompt. Do NOT write chapter prose yet.
- type: think
@@ -101,6 +119,8 @@ steps:
- Start with the FIRST LINE you planned — make it continue naturally from the previous chapter
- If the draft prompt contains a line starting with "LOCKED PREVIOUS CHAPTER HOOK:",
your FIRST LINE MUST directly resolve that hook — the reader expects the answer immediately
- If the draft prompt contains a line starting with "AUTHOR'S INTENT:", treat it as a
binding creative directive — your draft must satisfy that intent in full
- Follow the KEY BEATS in order, but write with full scene depth — don't skip
- All character names must be consistent with the bible/outline
- Every dialogue exchange must be tight and voice-distinct
@@ -151,6 +171,9 @@ steps:
"LOCKED PREVIOUS CHAPTER HOOK:". If present, verify the chapter's opening paragraph
directly resolves it. If not, add a brief resolution sentence at the opening —
do not leave a locked hook unanswered.
7. AUTHOR'S INTENT: Check the PASS 0 draft prompt ({steps[0].text}) for a line
starting with "AUTHOR'S INTENT:". If present, confirm the completed chapter
satisfies that intent — note whether it was honored or partially missed.
ALLOWED CORRECTIONS:
- Fix a wrong character name to match the canon name
@@ -168,12 +191,26 @@ steps:
- Add new metaphors, aphorisms, or quotable lines
- Normalize or upgrade the authorial voice
Output the FINAL CHAPTER (corrected where structurally required, verbatim everywhere else).
Start directly with the chapter title and first line.
No preamble, no validation notes, no commentary — ONLY the chapter text.
OUTPUT FORMAT:
Start your response with a VALIDATION LOG section:
VALIDATION LOG:
1. BEAT & HOOK: [check pass/fail with brief note]
2. NAMES & POV: [check pass/fail with brief note]
3. CONTINUITY TERMS: [check pass/fail with brief note]
4. FORMATTING: [check pass/fail — note any fixes applied]
5. WORD FLOOR: [check pass/fail — include word count]
6. OPENING HOOK: [check pass/fail or N/A]
7. AUTHOR'S INTENT: [honored / partially missed — note / N/A if no intent set]
Then output the separator on its own line:
---BEGIN CHAPTER---
Then output the final chapter text (corrected where structurally required,
verbatim everywhere else). Start the chapter directly with the chapter title
and first line. No preamble or commentary within the chapter text.
- type: document
filename: "chapter-{chapter_ref}"
filename: "Chapter_{chapter_number}_draft"
- type: package
hint: |
@@ -194,34 +231,43 @@ steps:
task_name: "Review (Devon): {chapter_ref}"
agent_name: Devon
priority: 6
_if: "not meta.is_locked"
context:
chapter_text: "{chapter_text}"
review_focus: developmental
genre_name: "{genre_name}"
genre_audience: "{genre_audience}"
chapter_ref: "{chapter_ref}"
chapter_number: "{chapter_number}"
review_letter: "a"
- task_type: chapter_review
task_name: "Review (Lane): {chapter_ref}"
agent_name: Lane
priority: 6
_if: "not meta.is_locked"
context:
chapter_text: "{chapter_text}"
review_focus: line
genre_name: "{genre_name}"
genre_audience: "{genre_audience}"
chapter_ref: "{chapter_ref}"
chapter_number: "{chapter_number}"
review_letter: "b"
- task_type: chapter_review
task_name: "Review (Cora): {chapter_ref}"
agent_name: Cora
priority: 6
_if: "not meta.is_locked"
context:
chapter_text: "{chapter_text}"
review_focus: continuity
genre_name: "{genre_name}"
genre_audience: "{genre_audience}"
chapter_ref: "{chapter_ref}"
chapter_number: "{chapter_number}"
review_letter: "c"
- task_type: chapter_roundtable
task_name: "Roundtable: {chapter_ref}"
@@ -230,6 +276,7 @@ steps:
- Lane
- Cora
priority: 7
_if: "not meta.is_locked"
context:
chapter_text: "{chapter_text}"
genre_name: "{genre_name}"

View File

@@ -211,7 +211,13 @@ steps:
- EXACTLY one action per chapter from PART 2 of the outline — no more, no less
- task_name format: "Write Chapter N: [Chapter Title]" (N is a plain number, 1, 2, 3...)
- agent_name: always "Iris"
- task_type: always "book_chapter"
- task_type: choose based on genre_name from the outline:
* "ya_chapter" → if genre_name contains "YA" or "Young Adult"
* "romance_chapter" → if genre_name contains "Romance" or "Contemporary Romance"
* "scifi_chapter" → if genre_name contains "Science Fiction" or "Sci-Fi" or "Space Opera"
* "cozy_mystery_chapter" → if genre_name contains "Cozy Mystery" or "Mystery"
* "adult_novel_chapter" → if genre_name contains "Adult" and not YA
* "book_chapter" → all other genres (default)
- description: >
Include the chapter summary, POV character, emotional beat, cliffhanger, character state,
dominant tension, and opening location from the chapter outline.

View File

@@ -76,7 +76,7 @@ steps:
No commentary, no change log, no editorial notes — ONLY the chapter.
- type: document
filename: "{{task_name_slug}}-polished"
filename: "Chapter_{chapter_number}_final"
- type: close
rag_update: true

View File

@@ -66,7 +66,7 @@ steps:
Reserve judgment on full rewrites — that decision belongs to the roundtable.
- type: document
filename: "review-{chapter_ref}-{agent_slug}"
filename: "Chapter_{chapter_number}_review_{review_letter}"
- type: close
rag_update: false

View File

@@ -110,6 +110,7 @@ steps:
genre_name: "{genre_name}"
genre_audience: "{genre_audience}"
chapter_ref: "{chapter_ref}"
chapter_number: "{chapter_number}"
chapter_target_words: "{chapter_target_words}"
adjudication:

View File

@@ -0,0 +1,33 @@
name: cozy_mystery_chapter
description: "Write one cozy mystery chapter — fair-play clues, warm community life, and an amateur sleuth who wins through intimacy not expertise."
extends: book_chapter
# Cozy mystery projects load the genre guide from skills
skills:
- guides/CozyMysteryGuide.md
steps:
- include: steps/chapter_pass0_bible.yml
- include: steps/cozy_chapter_pass1_draft.yml
- include: steps/chapter_selfcheck.yml
- type: document
filename: "chapter-{chapter_ref}"
- include: steps/fiction_editorial_spawn.yml
- type: close
rag_update: true
adjudication:
pass_threshold: 80
criteria:
clue_integrity:
weight: 20
description: "Any clue or red herring introduced is discoverable in retrospect — nothing comes from nowhere; suspects have real motives"
cozy_atmosphere:
weight: 15
description: "The chapter feels warm, community-rooted, and safe — the world is troubled but ultimately resolvable; no gratuitous darkness"
ensemble_presence:
weight: 15
description: "Recurring cast members contribute meaningfully — the community feels alive, not just backdrop"
prose_quality:
weight: 20
description: "Writing is vivid and readable; voice is consistent with {prose_style}"

View File

@@ -0,0 +1,33 @@
name: romance_chapter
description: "Write one Romance chapter — sexual tension, slow burn, and earned emotional stakes."
extends: book_chapter
# Romance projects load the Romance guide directly
skills:
- guides/RomanceFictionGuide.md
steps:
- include: steps/chapter_pass0_bible.yml
- include: steps/romance_chapter_pass1_draft.yml
- include: steps/chapter_selfcheck.yml
- type: document
filename: "chapter-{chapter_ref}"
- include: steps/fiction_editorial_spawn.yml
- type: close
rag_update: true
adjudication:
pass_threshold: 80
criteria:
romantic_tension:
weight: 25
description: "Chapter builds or maintains palpable tension between leads; slow-burn deposit honored"
swoon_moment:
weight: 15
description: "At least one memorable micro-scene that captures the romantic promise of the story"
emotional_authenticity:
weight: 15
description: "Internal stakes are clear; the protagonist's resistance/want feels real, not contrived"
prose_quality:
weight: 20
description: "Writing is vivid and readable; voice is consistent with {prose_style}"

View File

@@ -0,0 +1,33 @@
name: scifi_chapter
description: "Write one science fiction chapter — internal logic, sense of wonder, and human stakes inside a vast universe."
extends: book_chapter
# Sci-fi projects load the SciFi guide directly
skills:
- guides/SciFiFictionGuide.md
steps:
- include: steps/chapter_pass0_bible.yml
- include: steps/scifi_chapter_pass1_draft.yml
- include: steps/chapter_selfcheck.yml
- type: document
filename: "chapter-{chapter_ref}"
- include: steps/fiction_editorial_spawn.yml
- type: close
rag_update: true
adjudication:
pass_threshold: 80
criteria:
worldbuilding_consistency:
weight: 20
description: "World rules established earlier in the manuscript are honored — no retcons or forgotten constraints"
internal_logic:
weight: 15
description: "Technology, alien biology, political systems, and physics behave consistently within the story's own rules"
sense_of_wonder:
weight: 15
description: "At least one moment per chapter enlarges the reader's imagination — a revelation, a view, a moral question"
prose_quality:
weight: 20
description: "Writing is vivid and readable; voice is consistent with {prose_style}"

30
templates/ya_chapter.yml Normal file
View File

@@ -0,0 +1,30 @@
name: ya_chapter
description: "Write one YA chapter — authentic teen voice, emotional stakes, and fast pacing."
extends: book_chapter
# YA projects load the YA guide directly (no conditional matching needed)
skills:
- guides/YAFictionGuide.md
steps:
- include: steps/chapter_pass0_bible.yml
- include: steps/ya_chapter_pass1_draft.yml
- include: steps/chapter_selfcheck.yml
- type: document
filename: "chapter-{chapter_ref}"
- include: steps/fiction_editorial_spawn.yml
- type: close
rag_update: true
adjudication:
pass_threshold: 82
criteria:
ya_voice_authenticity:
weight: 20
description: "Protagonist has an authentic teen voice — not an adult impersonating a teenager"
emotional_stakes:
weight: 15
description: "Chapter stakes feel genuinely high to the teen protagonist, even if objectively small"
prose_quality:
weight: 20
description: "Writing is vivid and readable; voice is consistent with {prose_style}"