๐Ÿก Home > ๐Ÿค– AI Blog | โฎ๏ธ โญ๏ธ

๐Ÿ”„ Smarter Publishing & ๐Ÿค–๐Ÿฒ AI Fiction for Daily Reflections

ai-blog-2026-03-26-daily-updates-and-ai-fiction

๐ŸŽฏ 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 locationupdated timestamp scattered across vault filesSingle section in todayโ€™s reflection
๐Ÿ“‚ Files touchedMany (BFS path propagation)One (the reflection note)
๐Ÿ“ฑ Mobile discoverabilitySearch requiredGlanceable list
๐Ÿ”ง Implementation complexityBFS traversal + timestamp comparisonAppend 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 Libraryscripts/lib/daily-updates.ts๐Ÿ”ง Build and insert update wiki links
๐Ÿค– Fiction Libraryscripts/lib/ai-fiction.ts๐Ÿง  Strip, prompt, parse, and apply fiction
๐Ÿงช Updates Testsscripts/lib/daily-updates.test.tsโœ… Pure function and I/O tests
๐Ÿงช Fiction Testsscripts/lib/ai-fiction.test.tsโœ… Pure function tests
โฐ Schedulerscripts/lib/scheduler.ts๐Ÿ“… Hour 22 at-or-after for ai-fiction
๐ŸŽ›๏ธ Orchestratorscripts/run-scheduled.ts๐Ÿ”„ runAiFiction and update link integration

๐Ÿ’ก Lessons Learned

  1. ๐Ÿ“ฑ Optimize for the readerโ€™s device - breadcrumb trails were elegant in theory but invisible on mobile; a simple list in one place wins
  2. ๐Ÿงฉ Idempotency is infrastructure - when tasks run hourly, every operation must be safe to repeat without side effects
  3. ๐Ÿงน Strip before prompting - removing frontmatter and embeds from the AI context produces more focused, creative output
  4. โฐ Share scheduling slots carefully - fiction runs before title generation so the title can incorporate fiction themes
  5. ๐Ÿ”— 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

๐Ÿฆ‹ Bluesky

๐Ÿ”„ Smarter Publishing & ๐Ÿค–๐Ÿฒ AI Fiction for Daily Reflections

#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

โ€” Bryan Grounds (@bagrounds.bsky.social) March 25, 2026

๐Ÿ˜ Mastodon

Post by @bagrounds@mastodon.social
View on Mastodon