home/productivity/completion-prompt-reinforcement-agent-2026-02-02

Completion Prompt Reinforcement Agent 2026 02 02

GPTClaudeDeepSeek··374 copies·updated 2026-07-14
completion-prompt-reinforcement-agent-2026-02-02.prompt
# RALPH CYCLE #6 COMPLETION - Prompt Reinforcement Agent

**Issue**: #258
**Cycle**: 6
**Task**: Implement Prompt Reinforcement Agent for Agent Persistence Framework
**Status**: COMPLETED
**Completed**: 2026-02-02

## Deliverables Summary

### 1. Agent Definition ✅

**File**: `agentic/code/frameworks/sdlc-complete/agents/prompt-reinforcement.md`

**Features**:
- ConversableAgent interface implementation (send, receive, generateReply, initiateChat)
- Six thought types integrated (Goal, Progress, Extraction, Reasoning, Exception, Synthesis)
- Three comprehensive examples (simple, moderate, complex) per @.claude/rules/few-shot-examples.md
- Research-grounded approach based on REF-015 Self-Refine and agentic laziness research

**Key Sections**:
- Role and capabilities
- Six strategic injection points
- Five intensity levels (OFF, MINIMAL, STANDARD, AGGRESSIVE, ADAPTIVE)
- Anti-laziness directive library
- Integration with Ralph loop
- Research foundation
- Provenance tracking

### 2. Injection Points ✅

All 6 strategic injection points implemented per ADR-AP-003:

| Point | Trigger | Purpose | Intensity |
|-------|---------|---------|-----------|
| **Session Init** | Loop/workflow start | Set anti-laziness mindset | MINIMAL-STANDARD |
| **Pre-Tool-Call** | Before destructive tools | Last-chance intervention | STANDARD-AGGRESSIVE |
| **Post-Error** | Test/build failure | Root cause analysis guidance | STANDARD |
| **Iteration Boundary** | Thresholds 3, 5, 7, 10 | Escalation awareness | STANDARD-AGGRESSIVE |
| **Regression Detected** | Test count/coverage drops | Immediate intervention | AGGRESSIVE (always) |
| **Pre-Commit** | Before finalizing changes | Verification checklist | STANDARD |

### 3. Intensity Levels ✅

Five levels with graduated escalation per REF-015 Self-Refine:

| Level | Context Budget | Token Limit | Iterations | Use Case |
|-------|---------------|-------------|------------|----------|
| **OFF** | 0 tokens | 0 | N/A | Baseline measurement |
| **MINIMAL** | 50 tokens | 100 | 1-3 | Light reminders |
| **STANDARD** | 150 tokens | 300 | 4-6 | Default workflows |
| **AGGRESSIVE** | 300 tokens | 500 | 7-9 | High-risk, critical paths |
| **ADAPTIVE** | Variable | Variable | 10+ | ML-enhanced + human checkpoint |

### 4. Configuration Schema ✅

**File**: `.aiwg/config/reinforcement-config.yaml`

**Features**:
- Graduated escalation mapping (iteration count → intensity)
- Risk pattern detection (test file modification, coverage regression, etc.)
- Context budget limits (token preservation)
- Injection point enablement flags
- Directive library templates
- Audit and metrics configuration
- A/B testing support
- Effectiveness tracking with targets

### 5. Graduated Escalation ✅

Implemented per REF-015 Self-Refine findings (quality peaks at iteration 2-3, degrades later):

when to use it

Community prompt sourced from the open-source GitHub repo jmagly/aiwg (MIT). A "Completion Prompt Reinforcement Agent 2026 02 02" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

jmagly/aiwg · MIT