---
actual_hours: null
assignees: []
created_at: '2025-08-27T23:39:00.821644'
dependencies: []
description: 'The PM agent experiences ''instruction drift'' in long conversations,
  gradually forgetting its core directive to delegate all implementation work to specialized
  agents. This epic tracks the development of a reinforcement system that uses TodoWrite
  hook injection to maintain instruction adherence.


  PROBLEM STATEMENT:

  - PM agents drift from instructions after 15-30 conversation turns

  - They begin implementing directly instead of delegating

  - Current static instructions in INSTRUCTIONS.md are insufficient for long threads

  - No runtime mechanism exists to reinforce instructions in exec mode


  PROPOSED SOLUTION:

  Implement a daemon-based TodoWrite hijacking system that:

  1. Monitors PM conversation patterns via Socket.IO events

  2. Detects instruction drift (PM using Edit/Write/Bash tools)

  3. Injects reminder todos via hook system

  4. Progressively increases reminder intensity based on violations


  TECHNICAL APPROACH:

  - Extend existing TodoAgentPrefixHook pattern

  - Use Socket.IO event monitoring (ports 8765-8785)

  - Hook-based parameter injection for TodoWrite

  - Progressive reminder system based on turn count and violations


  KEY COMPONENTS:

  1. InstructionReinforcementDaemon class

  2. Hook interceptor extensions

  3. Configuration system

  4. Metrics tracking

  5. Test implementation'
due_date: null
estimated_hours: null
id: EP-0004
labels: []
metadata:
  goal: Develop and deploy a reinforcement system that maintains PM instruction adherence
    in long conversations, reducing instruction drift violations by 80% through real-time
    monitoring and todo injection
  subtasks:
  - ISS-0022
  type: epic
parent: null
priority: high
status: open
tags:
- epic
title: PM Instruction Reinforcement System - Combat Instruction Drift in Long Conversations
updated_at: '2025-08-28T00:19:44.231513'
---

# PM Instruction Reinforcement System - Combat Instruction Drift in Long Conversations

## Description
The PM agent experiences 'instruction drift' in long conversations, gradually forgetting its core directive to delegate all implementation work to specialized agents. This epic tracks the development of a reinforcement system that uses TodoWrite hook injection to maintain instruction adherence.

PROBLEM STATEMENT:
- PM agents drift from instructions after 15-30 conversation turns
- They begin implementing directly instead of delegating
- Current static instructions in INSTRUCTIONS.md are insufficient for long threads
- No runtime mechanism exists to reinforce instructions in exec mode

PROPOSED SOLUTION:
Implement a daemon-based TodoWrite hijacking system that:
1. Monitors PM conversation patterns via Socket.IO events
2. Detects instruction drift (PM using Edit/Write/Bash tools)
3. Injects reminder todos via hook system
4. Progressively increases reminder intensity based on violations

TECHNICAL APPROACH:
- Extend existing TodoAgentPrefixHook pattern
- Use Socket.IO event monitoring (ports 8765-8785)
- Hook-based parameter injection for TodoWrite
- Progressive reminder system based on turn count and violations

KEY COMPONENTS:
1. InstructionReinforcementDaemon class
2. Hook interceptor extensions
3. Configuration system
4. Metrics tracking
5. Test implementation

## Details
- **Status**: open
- **Priority**: high
- **Assignees**: None
- **Tags**: epic
- **Created**: 2025-08-27 23:39:00
- **Updated**: 2025-08-28 00:19:44

## Tasks
- [ ] Add task items here

## Notes
_Add any additional notes or context here._
