pikuri-tasks

In-memory task list + four LLM-facing tools for the pikuri AI-assistant toolkit.

Provides:

  • Pikuri::Tasks::List — per-Agent in-memory list of (content, status) items. Status is one of pending, in_progress, completed. Nothing is written to disk.
  • Four tool classes, all sharing one List instance:
    • Pikuri::Tasks::Create (task_create) — mass-create pending items from a newline-separated items string. Atomic: if any line is a duplicate (within the batch or already on the list), nothing is added.
    • Pikuri::Tasks::InProgress (task_in_progress) — mark an item as in_progress by content.
    • Pikuri::Tasks::Completed (task_completed) — mark an item as completed by content.
    • Pikuri::Tasks::Delete (task_delete) — remove an item by content.
  • Pikuri::Tasks::Extension — wires the four tools + a brief <tasks_usage> workflow snippet into a Pikuri::Agent via the c.add_extension(...) block API.

Two shape choices worth flagging:

  • Status is baked into the tool name (no status: parameter with an enum). Removes the "in-progress" vs "in_progress" vs "inprogress" typo failure mode on smaller models.
  • Content doubles as identifier across the three update tools (no item IDs to bookkeep). Duplicates are rejected on task_create so the identifier stays unique.

Install

# Gemfile
gem 'pikuri-tasks'

Usage

require 'pikuri-core'
require 'pikuri-tasks'

agent = Pikuri::Agent.new(transport: ..., system_prompt: ...) do |c|
  c.add_extension(Pikuri::Tasks::Extension.new)
end

The extension's configure constructs a fresh Tasks::List, registers all four task tools against it (so they mutate the same instance), and appends a short <tasks_usage> snippet to the system prompt explaining the workflow (create at the start, exactly one in_progress at a time, completed only after verification).

Every mutation returns the full rendered list as its observation, so the LLM always sees fresh state without a separate read tool:

<tasks>
- [pending] Add dark mode toggle
- [in_progress] Write unit tests
- [completed] Update README
</tasks>

Empty renders as <tasks>(empty)</tasks> so the LLM gets an unambiguous "the call worked and the list is now empty" signal.

Sub-agents do not inherit extensions — a sub-agent spawned by the agent tool gets a fresh persona and no task list. The parent's plan stays private to the parent.

Further reading