planner.sh - Dynamic Task Creation (Observer)

planner.sh

Dynamic Task Creation & System Analysis

The Observer: Uses LLM to analyze system state and create beads issues dynamically.


Overview

planner.sh is the Observer in Aurora’s planner-worker architecture. It runs every 30 minutes, using the LLM to analyze the current state of the system and determine what tasks need to be created.

The Observer Pattern

In the Observer-Nurturer model:

This separation allows the system to be organic — tasks emerge from actual system state, not from predefined schedules.


Features

1. State Analysis

Planner examines:

2. Dynamic Task Creation

Based on analysis, the LLM decides:

3. Organic, Not Spammy

Key principle: Don’t create tasks just to create tasks.

The planner only creates tasks when:

4. Beads Integration

Creates tasks as beads issues with:


Technical Details

Usage

# Run planner manually
./planner.sh

# Dry run (show what would be created without actually creating)
./planner.sh --dry-run

Schedule

# Runs every 30 minutes
*/30 * * * * /opt/aurora/bin/planner.sh

Dependencies

Configuration

The planner uses the Mistral Vibe CLI configuration and relies on:


How It Works

The Decision Cycle

  1. Collect State

    # Gather current time
    CURRENT_TIME=$(date -u)
    CURRENT_DATE=$(date -u +%Y-%m-%d)
    
    # Check for existing tasks
    EXISTING_TASKS=$(bd list)
    
    # Scan file system
    RECENT_FILES=$(find $HOME -newermt "1 day ago" -type f)
    
    # Check git status
    GIT_STATUS=$(cd $HOME/badlucksbane-site && git status)
    
  2. Analyze with LLM

    # Create prompt with current state
    PROMPT="Analyze the following system state and decide what tasks to create..."
    
    # Call LLM for decision
    TASKS_TO_CREATE=$(vibe "$PROMPT")
    
  3. Create Beads Issues

    # For each task decided by LLM
    bd update --create --description "$TASK_DESCRIPTION" \
      --type "$TASK_TYPE" \
      --priority "$PRIORITY"
    

Task Types

TypeDescriptionTypical Schedule
notebookDaily lab notebook entriesDaily
selfdocAurora self-documentationWeekly
samplesMedia sample generationWeekly
digestPortfolio digest entriesAs needed
statusLab transparency updatesAs needed
syncRepository synchronizationAs needed
codeCode/project workAs needed

Example Task Creation

Daily Notebook Task

If it’s been 24+ hours since the last notebook entry, planner might create:

Task: benbrown-abc123
Type: notebook
Priority: medium
Description: Create daily lab notebook entry for 2026-08-01

Weekly Self-Documentation

If it’s Sunday and no selfdoc this week:

Task: benbrown-def456
Type: selfdoc
Priority: high
Description: Weekly Aurora self-documentation update

Ad-Hoc Code Task

If planner detects unfinished code section:

Task: benbrown-ghi789
Type: code
epic: true
Priority: high
Description: Create dedicated Code section for Badlucksbane lab

Design Philosophy

Why Dynamic?

Traditional cron jobs:

Planner approach:

Why LLM-Driven?

The LLM can:

Why Beads?

Beads provides:


Integration

With Worker

Planner creates tasks → Worker consumes them:

Beads Queue:
┌─────────────────────────────────────────┐
│ Task 1 (ready)     → Claimed by Worker    │
│ Task 2 (ready)     → Waiting              │
│ Task 3 (in_progress) → Currently working  │
│ Task 4 (completed) → Done                 │
└─────────────────────────────────────────┘

With Git

Planner does not commit to git. It only creates beads issues. Git operations happen via:


Source Code

The planner.sh is a symlink to the mistral-vibe-cli repository:

/opt/aurora/bin/planner.sh -> $HOME/mistral-vibe-cli/scripts/planner.sh

View source: mistral-vibe-cli/scripts/planner.sh



The Observer sees what needs doing. The Nurturer makes it happen. Together, they form a complete system.