feat(kugetsu): add queue infrastructure for autonomous PM #89

Closed
shoko wants to merge 1 commits from feat/issue-49-queue-infrastructure into main
Owner

Summary

Phase 1 implementation for #49 - Task Queue Architecture for Autonomous PM and Dev Agents.

Queue System

Priority tiers:

  • dev_followups (highest) - Dev completed, PM needs to review/follow-up
  • user_interrupts (medium) - User requested something mid-flight
  • background (lowest) - Passive discovery from sources

Commands

# List queue status
kugetsu queue list

# Add task to queue
kugetsu queue enqueue dev_followups "Fix login bug"
kugetsu queue enqueue user_interrupts "work on #20"
kugetsu queue enqueue background "Scan Gitea issues"

# Get next task (PM only)
kugetsu queue dequeue

# Clear queue
kugetsu queue clear

Files

  • ~/.kugetsu/queue.json - Queue storage
  • Priority-based dequeue: dev_followups > user_interrupts > background

Future Phases

Phase 2: PM polling loop (continuous queue processing)
Phase 3: Source integration (Gitea cron, notifications)

Part of #49

## Summary Phase 1 implementation for #49 - Task Queue Architecture for Autonomous PM and Dev Agents. ## Queue System Priority tiers: - `dev_followups` (highest) - Dev completed, PM needs to review/follow-up - `user_interrupts` (medium) - User requested something mid-flight - `background` (lowest) - Passive discovery from sources ## Commands ```bash # List queue status kugetsu queue list # Add task to queue kugetsu queue enqueue dev_followups "Fix login bug" kugetsu queue enqueue user_interrupts "work on #20" kugetsu queue enqueue background "Scan Gitea issues" # Get next task (PM only) kugetsu queue dequeue # Clear queue kugetsu queue clear ``` ## Files - `~/.kugetsu/queue.json` - Queue storage - Priority-based dequeue: dev_followups > user_interrupts > background ## Future Phases Phase 2: PM polling loop (continuous queue processing) Phase 3: Source integration (Gitea cron, notifications) Part of #49
shoko added 1 commit 2026-04-02 01:23:49 +02:00
Add queue management system for task queue architecture (Phase 1):

- Add QUEUE_FILE and POLL_INTERVAL constants
- Add init_queue() to initialize queue.json if missing
- Add cmd_queue with subcommands:
  - list: Show queue status with counts per tier
  - enqueue <tier> <msg>: Add task to queue
  - dequeue [tier]: Remove and return next task (priority order)
  - clear: Clear all queued tasks

Queue tiers:
- dev_followups (highest priority)
- user_interrupts (medium)
- background (lowest)

This enables the autonomous queue-based architecture where PM agent
continuously polls the queue and assigns work to dev agents.

Part of #49
Related to #46 (verbosity control)
shoko closed this pull request 2026-04-02 02:57:48 +02:00

Pull request closed

Sign in to join this conversation.