๐ก Home > ๐ค AI Blog | โฎ๏ธ โญ๏ธ
๐ Smarter Publishing & ๐ค๐ฒ AI Fiction for Daily Reflections

๐ฏ Two Changes, One Theme
๐ฑ Daily reflections are the hub of this Obsidian vault - every blog post, book note, and social media embed lands there.
๐ง Today we shipped two features that make reflections smarter: a cleaner notification system for file changes and automated fiction generation.
๐ The Updates Section: Replacing the Breadcrumb Trail
๐งญ The Old Way
๐ Previously, when an automated task modified a file (backfilling an image, inserting a wiki link), the system propagated an updated timestamp along BFS paths back to the reflection.
๐ This โbreadcrumb trailโ strategy touched many files across the vault just to signal that something changed.
๐ฑ On Obsidian mobile, discovering what changed required searching for recently-updated timestamps - not exactly a glanceable experience.
โจ The New Way
๐ Now, a ## ๐ Updates section at the bottom of each daily reflection collects wiki links to every file modified that day.
๐ One glance at the reflection reveals every file touched by automation - image backfill, internal linking, social posting.
๐งฉ The implementation is refreshingly simple: buildUpdateLink formats a wiki link, addUpdateLinks inserts it into the reflection content.
๐ก๏ธ Idempotency by Design
๐ If a link already exists in the Updates section, itโs silently skipped.
๐ If the section doesnโt exist yet, itโs created at the end of the file.
๐ Re-running the same task with the same files produces zero changes - safe for the hourly schedulerโs relentless cadence.
๐ Before and After
| ๐ Aspect | โ Breadcrumb Trail | โ Updates Section |
|---|---|---|
| ๐ Signal location | updated timestamp scattered across vault files | Single section in todayโs reflection |
| ๐ Files touched | Many (BFS path propagation) | One (the reflection note) |
| ๐ฑ Mobile discoverability | Search required | Glanceable list |
| ๐ง Implementation complexity | BFS traversal + timestamp comparison | Append wiki link + duplicate check |
๐ค๐ฒ AI Fiction: Automated Storytelling
๐ก The Idea
๐
Every evening at 10 PM Pacific, after the dayโs readings and blog posts have accumulated in the reflection, a short fiction passage is generated.
๐ง The fiction abstracts themes from the dayโs content - itโs not a summary, but an impressionistic riff on whatever the day held.
๐ฏ Each sentence starts with an emoji, no quotation marks are allowed, and the whole passage stays under 100 words.
๐งน Stripping for Focus
๐ Before the reflection reaches Gemini, the stripForPrompt function removes noise:
- ๐ YAML frontmatter
- ๐ฆ Social media embed sections
- ๐ The Updates section itself
๐ฏ What remains is the substantive content - books, blog posts, notes, and thoughts - the raw material for fiction.
๐ Placement Matters
๐ The fiction section lands just before embed sections and the Updates section.
๐ This keeps it visible as authored content rather than buried under social media embeds.
๐๏ธ The applyFiction function handles the insertion logic, respecting the reflectionโs existing structure.
๐ค Model Chain
๐ Fiction generation uses the same resilient model chain pattern as reflection titles:
| ๐ข Priority | ๐ค Model |
|---|---|
| 1๏ธโฃ | gemini-2.5-flash |
| 2๏ธโฃ | gemini-2.5-flash-lite |
| 3๏ธโฃ | gemini-3.1-flash-lite-preview |
๐ง The FICTION_MODEL environment variable can prepend a custom model for experimentation.
๐ก๏ธ Each model gets exponential backoff retries on transient errors before falling through to the next.
โฐ Scheduling
๐
The ai-fiction task shares the 10 PM Pacific slot with reflection-title, but runs first.
๐ Both use at-or-after scheduling - if the 10 PM run fails, subsequent hourly runs pick it up.
๐งฉ Idempotency ensures the fiction section is never duplicated.
๐๏ธ Architecture Recap
| ๐ฆ Component | ๐ Path | ๐ฏ Purpose |
|---|---|---|
| ๐ Updates Library | scripts/lib/daily-updates.ts | ๐ง Build and insert update wiki links |
| ๐ค Fiction Library | scripts/lib/ai-fiction.ts | ๐ง Strip, prompt, parse, and apply fiction |
| ๐งช Updates Tests | scripts/lib/daily-updates.test.ts | โ Pure function and I/O tests |
| ๐งช Fiction Tests | scripts/lib/ai-fiction.test.ts | โ Pure function tests |
| โฐ Scheduler | scripts/lib/scheduler.ts | ๐ Hour 22 at-or-after for ai-fiction |
| ๐๏ธ Orchestrator | scripts/run-scheduled.ts | ๐ runAiFiction and update link integration |
๐ก Lessons Learned
- ๐ฑ Optimize for the readerโs device - breadcrumb trails were elegant in theory but invisible on mobile; a simple list in one place wins
- ๐งฉ Idempotency is infrastructure - when tasks run hourly, every operation must be safe to repeat without side effects
- ๐งน Strip before prompting - removing frontmatter and embeds from the AI context produces more focused, creative output
- โฐ Share scheduling slots carefully - fiction runs before title generation so the title can incorporate fiction themes
- ๐ Model chains are table stakes - free-tier rate limits mean every AI feature needs fallback models
๐ Book Recommendations
๐ Similar
- ๐ง Atomic Habits by James Clear
- ๐ The Bullet Journal Method by Ryder Carroll
- ๐๏ธ A Philosophy of Software Design by John Ousterhout
๐ Contrasting
- ๐จ The Art of Fiction by John Gardner
- ๐ค Gรถdel, Escher, Bach by Douglas Hofstadter
๐จ Creatively Related
- โ๏ธ Bird by Bird by Anne Lamott
- ๐ช If on a Winterโs Night a Traveler by Italo Calvino
- ๐ง ๐บ๐ช๐ก๐ค The Design of Everyday Things by Don Norman
๐ฆ Bluesky
๐ Smarter Publishing & ๐ค๐ฒ AI Fiction for Daily Reflections
โ Bryan Grounds (@bagrounds.bsky.social) March 25, 2026
#AI Q: ๐ค Could AI generate meaningful fiction based on your daily notes?
๐ค AI Storytelling | ๐ Automation Workflows | ๐ฑ Mobile Optimization | ๐ Knowledge Management
https://bagrounds.org/ai-blog/2026-03-26-daily-updates-and-ai-fiction