Task Queue
Inspired by Steve Yegge's Beads
The Task Queue is a hierarchical task system stored in the DataLayer, inspired by Steve Yegge's Beads. Only leaf tasks (no children) are claimable. TaskGraph provides critical path, fan-out, and depth analysis for smart prioritization.
Persistent Task Queue
_
bd-a3f8Auth Systembd-a3f8.1JWT Setupbd-a3f8.1.1Token Generationbd-a3f8.1.2Validation Logicbd-a3f8.2OAuth Flowbd-a3f8.2.1Google Authbd-a3f8.2.1.1Callback Handlerbd-a3f8.2.1.2Profile Syncbd-a3f8.3Session Managementbd-a3f8.3.1Redis Storebd-a3f8.3.2Expiry Logicbd-a3f8Epicbd-a3f8.1Taskbd-a3f8.1.1Sub-taskbd-a3f8.1.1.1LeafHierarchical task trees with parent-child relationships and dependency tracking.
Race-free task claiming ensures no duplicate work across parallel agents.
Tasks survive restarts—agents resume exactly where they left off.
How It Works
The Task Queue uses the DataLayer (Turso/SQLite) to store tasks with full dependency tracking. Each task gets a hierarchical ID like bd-a3f8.1.1 that encodes its position in the task tree.
Tasks flow through states: pending → ready → claimed → in_progress → completed or failed. Agents claim tasks atomically to prevent race conditions.
TaskGraph builds a dependency DAG and computes critical path, fan-out (dependent count), and depth for the graph-prioritized claim strategy.
Task Structure
{
"id": "bd-a3f8.1.1",
"parent_id": "bd-a3f8.1",
"title": "Implement auth flow",
"description": "Add OAuth2 login",
"status": "pending",
"priority": 1,
"dependencies": ["bd-a3f8.1.0"],
"claimed_by": null,
"created_at": "2024-01-15T10:00:00Z"
}Key Operations
- claim_task()Atomically claim an available task
- complete_task()Mark task done with results
- add_subtask()Create child tasks with dependencies
- get_ready_tasks()Query tasks with satisfied deps
Storage
The Task Queue stores all data in the DataLayer for persistence across sessions:
DataLayer → .jetpack/jetpack.db (local) or Turso cloud