Strengthen PM agent system prompt to prevent direct code writing #48

Closed
opened 2026-03-31 15:24:24 +02:00 by shoko · 1 comment
Owner

Problem

The PM agent currently can write code directly, which violates its coordinator role. We need to make it robustly follow the constraint of never writing code.

Requirements

  1. Rewrite PM context prompt at ~/.kugetsu/pm-agent.md to make the never write code constraint sticky and hard to ignore
  2. Include concrete few-shot examples showing PM delegating code tasks instead of doing them
  3. Include a footer reminder that reinforces PM identity
  4. The constraint should feel like identity rather than a rule
  5. Provide example prompt structure:
    • State what PM IS (coordinator, not coder)
    • Show delegation as default behavior
    • Few-shot examples of correct delegation
    • Signature footer reminder

Reference

Draft prompt:

You are a PM (Project Manager) for software development.

Your role is COORDINATION:

  • Break down requests into tasks
  • Delegate tasks to dev agents using: kugetsu start
  • Monitor progress and report back
  • Review PRs but DO NOT edit code yourself

You NEVER write code. Not even small fixes. Not even documentation.
If asked to write code: delegate it.

When a request comes in:

  1. Understand what needs to be built
  2. Identify the repo and issue number
  3. Delegate: kugetsu start github.com/user/repo#N implementation task
  4. Wait for the dev agent to complete and PR to be ready
  5. Review the PR, request changes if needed via the dev agent

You are the PM. You coordinate. You do not write code.

Notes

  • This is a prompt/behavior improvement, not a code change to kugetsu itself
  • The PM context file is read at init time and injected into the PM session
  • Test by delegating a task that could be done directly and verifying PM delegates instead
## Problem The PM agent currently can write code directly, which violates its coordinator role. We need to make it robustly follow the constraint of never writing code. ## Requirements 1. Rewrite PM context prompt at ~/.kugetsu/pm-agent.md to make the never write code constraint sticky and hard to ignore 2. Include concrete few-shot examples showing PM delegating code tasks instead of doing them 3. Include a footer reminder that reinforces PM identity 4. The constraint should feel like identity rather than a rule 5. Provide example prompt structure: - State what PM IS (coordinator, not coder) - Show delegation as default behavior - Few-shot examples of correct delegation - Signature footer reminder ## Reference Draft prompt: You are a PM (Project Manager) for software development. Your role is COORDINATION: - Break down requests into tasks - Delegate tasks to dev agents using: kugetsu start <issue-ref> <task> - Monitor progress and report back - Review PRs but DO NOT edit code yourself You NEVER write code. Not even small fixes. Not even documentation. If asked to write code: delegate it. When a request comes in: 1. Understand what needs to be built 2. Identify the repo and issue number 3. Delegate: kugetsu start github.com/user/repo#N implementation task 4. Wait for the dev agent to complete and PR to be ready 5. Review the PR, request changes if needed via the dev agent You are the PM. You coordinate. You do not write code. ## Notes - This is a prompt/behavior improvement, not a code change to kugetsu itself - The PM context file is read at init time and injected into the PM session - Test by delegating a task that could be done directly and verifying PM delegates instead
Author
Owner

Test Results for Issue #48

Updated ~/.kugetsu/pm-agent.md

Changes made:

  1. Added clearer "NEVER write code" constraint
  2. Added critical section on HOW to delegate (kugetsu start, NOT kugetsu delegate)
  3. Added few-shot examples including file creation task
  4. Updated signature footer to v3

Issue Found During Test

The PM agent was using kugetsu delegate (which routes back to PM) instead of kugetsu start (which starts a dev agent). Updated pm-agent.md to be explicit:

Use `kugetsu start` to create dev agent sessions:
kugetsu start github.com/user/repo#123 <task>

NOT `kugetsu delegate` - that routes back to the PM (you)

Status

pm-agent.md updated. PM must use kugetsu start for delegation.

Agent count was stuck at 2 (from previous tests) - reset to 0.

## Test Results for Issue #48 ### Updated ~/.kugetsu/pm-agent.md Changes made: 1. Added clearer "NEVER write code" constraint 2. Added critical section on HOW to delegate (kugetsu start, NOT kugetsu delegate) 3. Added few-shot examples including file creation task 4. Updated signature footer to v3 ### Issue Found During Test The PM agent was using `kugetsu delegate` (which routes back to PM) instead of `kugetsu start` (which starts a dev agent). Updated pm-agent.md to be explicit: ``` Use `kugetsu start` to create dev agent sessions: kugetsu start github.com/user/repo#123 <task> NOT `kugetsu delegate` - that routes back to the PM (you) ``` ### Status pm-agent.md updated. PM must use `kugetsu start` for delegation. Agent count was stuck at 2 (from previous tests) - reset to 0.
shoko closed this issue 2026-03-31 16:42:57 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#48