feat(kugetsu): cmd_delegate should call cmd_start directly for parallelization #74

Closed
opened 2026-04-01 11:18:15 +02:00 by shoko · 0 comments
Owner

Problem

Currently cmd_delegate sends messages to PM session, which then decides whether to call cmd_start. This causes:

  • PM can deviate from protocol (does work instead of delegating)
  • No guaranteed parallelization
  • Multiple delegations create concurrent processes hitting same worktrees

Current Flow

kugetsu delegate "fix #69" → PM session (forked process) → PM might call cmd_start

Desired Flow

For simple implementation tasks, cmd_delegate should call cmd_start directly:

kugetsu delegate "fix #69" → cmd_start github.com/shoko/kugetsu#69 "fix #69"

PM becomes pure planner/coordinator for complex tasks only.

Implementation

Modify cmd_delegate:

  1. Parse issue ref and message from input
  2. Call cmd_start $issue_ref $message directly
  3. Return immediately (parallel)

PM skill already says: "You NEVER write code. Use kugetsu start to delegate ALL implementation tasks"

This makes the protocol technically enforced rather than convention-based.

Benefits

  • Guaranteed parallelization (no PM bottleneck)
  • Protocol enforcement (dev agents do repo work, not PM)
  • Simpler mental model: delegate = start work immediately
  • PM freed up for complex coordination only

Tasks

  1. Modify cmd_delegate to call cmd_start directly
  2. PM becomes optional for complex analysis only
  3. Update documentation
  • PM skill already documents this expectation
  • Issue #71 (lock mechanism) still needed for coordination when PM does complex work
## Problem Currently `cmd_delegate` sends messages to PM session, which then decides whether to call `cmd_start`. This causes: - PM can deviate from protocol (does work instead of delegating) - No guaranteed parallelization - Multiple delegations create concurrent processes hitting same worktrees ## Current Flow ``` kugetsu delegate "fix #69" → PM session (forked process) → PM might call cmd_start ``` ## Desired Flow For simple implementation tasks, `cmd_delegate` should call `cmd_start` directly: ``` kugetsu delegate "fix #69" → cmd_start github.com/shoko/kugetsu#69 "fix #69" ``` PM becomes pure planner/coordinator for complex tasks only. ## Implementation Modify `cmd_delegate`: 1. Parse issue ref and message from input 2. Call `cmd_start $issue_ref $message` directly 3. Return immediately (parallel) PM skill already says: "You NEVER write code. Use `kugetsu start` to delegate ALL implementation tasks" This makes the protocol technically enforced rather than convention-based. ## Benefits - Guaranteed parallelization (no PM bottleneck) - Protocol enforcement (dev agents do repo work, not PM) - Simpler mental model: delegate = start work immediately - PM freed up for complex coordination only ## Tasks 1. Modify cmd_delegate to call cmd_start directly 2. PM becomes optional for complex analysis only 3. Update documentation ## Related - PM skill already documents this expectation - Issue #71 (lock mechanism) still needed for coordination when PM does complex work
shoko closed this issue 2026-04-01 12:09:45 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#74