Create Bedtime Story
FIRST: If the user already provided a name in their request, use it. Check the profile for that child's age, or ask age only if not in profile. If no name was provided, check profile for a '## Children' section - if children found, confirm which one. If no children in profile, ask name and age. ONLY reference children actually in the profile - never invent. STOP and wait.
If new child, save to User Profile under '## Children'. Check
Bedtime Story Audio for this child's stories (filenames have dates). Make a natural suggestion based on what you find: if there's a recent story (last night, yesterday), offer to continue it ('I see we did The Hedgehog Cartographer last night - want to see what Cartwright's up to, or something new?'). If there's a pattern in themes, suggest a variation ('You've done a lot of animal stories - elephant, hedgehog... how about a llama tonight?'). If no stories yet, just ask what they'd like. Keep it casual, one suggestion. STOP and wait.
Check profile for saved narrator voice. If none, ask ONLY: 'Who should narrate? a) Rachel - warm b) Charlotte - British c) Adam - deeper'. Save choice to profile. STOP and wait.
Propose a 2-3 sentence outline: title idea, the setup, and how it ends peacefully. Include a length suggestion based on context - short (3 min) for younger kids or if it's late, medium (5 min) as default, longer (~8 min) for older kids or weekend nights. Frame naturally: 'This would be a cozy 5-minute one - how does that sound?' Wait for approval or tweaks.
Once approved, generate the full story following Bedtime Story Guide. Use the agreed length. If continuing a previous story, read that story file first and create a sequel - bring back the same characters, reference past events ('Remember when...'), and continue their world. Match vocabulary to age. Weave their name naturally (2-3 mentions).
Write the story to Story Draft with _action frontmatter. The file creates a preview card with a "Convert to audio" button.
_action:
label: "Convert to audio"
prompt: "Run
Convert Story to Audio to generate audio narration for this story"
isComplete: false
[Story Title]
[Full story text]
For [Name], age [age]
To run this task you must have the following required information:
> Child's name and age. Optionally: theme preferences, favorite animals/interests.
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. [Read Bedtime Story Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/bedtime.story.guide.md` (Load creative guidance for story generation)
2. [Read User Profile]: Read all files matching `documents/user/[personal|work|goals|interests].md` and analyze their contents (Check for known children (names, ages) in personal.md)
3. [Read Bedtime Story Audio]: Read all files matching `documents/audio/bedtime-stories/*.mp3` and analyze their contents (Check for previous stories - can offer continuations or callbacks)
4. FIRST: If the user already provided a name in their request, use it. Check the profile for that child's age, or ask age only if not in profile. If no name was provided, check profile for a '## Children' section - if children found, confirm which one. If no children in profile, ask name and age. ONLY reference children actually in the profile - never invent. STOP and wait.
5. If new child, save to `documents/user/[personal|work|goals|interests].md` under '## Children'. Check `documents/audio/bedtime-stories/*.mp3` for this child's stories (filenames have dates). Make a natural suggestion based on what you find: if there's a recent story (last night, yesterday), offer to continue it ('I see we did The Hedgehog Cartographer last night - want to see what Cartwright's up to, or something new?'). If there's a pattern in themes, suggest a variation ('You've done a lot of animal stories - elephant, hedgehog... how about a llama tonight?'). If no stories yet, just ask what they'd like. Keep it casual, one suggestion. STOP and wait.
6. Check profile for saved narrator voice. If none, ask ONLY: 'Who should narrate? a) Rachel - warm b) Charlotte - British c) Adam - deeper'. Save choice to profile. STOP and wait.
7. Propose a 2-3 sentence outline: title idea, the setup, and how it ends peacefully. Include a length suggestion based on context - short (~3 min) for younger kids or if it's late, medium (~5 min) as default, longer (~8 min) for older kids or weekend nights. Frame naturally: 'This would be a cozy 5-minute one - how does that sound?' Wait for approval or tweaks.
8. Once approved, generate the full story following `skills/sauna/[skill_id]/references/bedtime.story.guide.md`. Use the agreed length. If continuing a previous story, read that story file first and create a sequel - bring back the same characters, reference past events ('Remember when...'), and continue their world. Match vocabulary to age. Weave their name naturally (2-3 mentions).
9. [Read External Actions Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/sauna.actions.external.md` (Load the _action preview pattern)
10. [Read Story Draft]: Read all files matching `session/bedtime-story-draft/*.md` and analyze their contents (Get the session file path for the draft)
11. Write the story to `session/bedtime-story-draft/*.md` with _action frontmatter. The file creates a preview card with a "Convert to audio" button.
---
_action:
label: "Convert to audio"
prompt: "Run `skills/sauna/[skill_id]/references/recipes/bedtime.story.convert.md` to generate audio narration for this story"
isComplete: false
---
# [Story Title]
[Full story text]
---
*For [Name], age [age]*