lantern

cookie-jar-state-machine

🎯 The Case of the Cookie Jar State Machine

Case Details

Case ID: task-4b238dee-3ce5-4e85-8baa-e2386887fca9 Status: parked Created: 2025-12-19T21:53:20.309Z Updated: 2025-12-19T21:53:20.309Z Priority: 2

Investigation Details

Case Type: investigation Urgency Level: routine

Notes

First demo of Jenkinsfile Dynamic Bootstrapping - implementing "Who Stole the Cookie from the Cookie Jar" as a YAML state machine.

The Vision: Prove that Peregrine's accidentally-Turing-complete YAML can implement actual flow control by recreating the Casebook demo pattern within the pipeline system.

The Song Pattern:

  • Seed with players: ["Alice", "Bob", "Charlie"]
  • Each round: pick one, emit the verse, remove from list
  • Exit when list empty

Required Primitives:

  • Peek: Read value from pipeline state
  • Poke: Write value to pipeline state
  • Emit: Template-based output
  • Tick: Re-render loop with exit condition

Existing Infrastructure:

  • jeeves.getParameter() / jeeves.updateParameter() for state
  • PIPELINE_ENVIRONMENT for state pointer
  • Environment selector for state machine routing
  • ERB templating for dynamic values

Design Questions:

  • Do we need a new deployer type (dynamic) or can we do this with activities only?
  • Should state live in pipeline cache (DynamoDB) or just env vars?
  • How do we handle the re-render loop - activity that spawns activities?

Investigation Timeline

2025-12-19T21:53:20.315Z - System - case_created

Case opened from CLI

Consciousness Links

Auto-Detected Keywords

investigation


This case file is automatically updated. For investigation logs, see the corresponding log channel.

πŸ“‹ Case To-Do List

This case has an integrated to-do list system that syncs with the Oculus knowledge graph. The to-do list uses the virtual:todo-list fence which auto-detects GitHub-style checkbox markdown.

How the To-Do System Works

  • Auto-Detection: Checkbox lists are automatically detected as virtual:todo-list fences
  • Alice Integration: Display in Alice dashboard using :::wonderland-todo-list slug="${current_case}"
  • ISA Operations: Use fence exec for add/check/update operations
  • Metadata Support: Add [assignee:name] [priority:level] tags to tasks

Case To-Do Operations

  • View state: oculus fence list ${slug} then oculus fence view ${slug} <fence-index>
  • Add task: oculus fence exec ${slug} <fence-index> add "New task"
  • Check task: oculus fence exec ${slug} <fence-index> check 0
  • Update task: oculus fence exec ${slug} <fence-index> update 0 "Updated content"
  • Reference: See virtual-fence-todo for full documentation

Current Case Tasks

  • 🎯 Solve the case
  • πŸ“ Document findings in investigation notes
  • πŸ”— Link relevant evidence and consciousness resources
  • βœ… Update case status when complete

Next Steps

Add investigation notes and evidence tags as you progress. The to-do list will evolve with your investigation. Tasks can be managed via Oculus fence operations or edited directly in the node.