docs: update API and class references to ralph-* naming

- README.md: Update API endpoints to /ralph-state and /ralph-config
- ralph-wiggum-guide.md: Update class names (RalphTracker, RalphLoopState),
  file paths (ralph-tracker.ts), SSE events (session:ralphLoopUpdate), and
  API endpoints throughout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-21 23:07:05 +01:00
co-authored by Claude Opus 4.5
parent 0d1ca37b6e
commit 50150befef
2 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -202,11 +202,11 @@ npx tsx src/index.ts web
| `POST` | `/api/sessions/:id/respawn/stop` | Stop controller | | `POST` | `/api/sessions/:id/respawn/stop` | Stop controller |
| `PUT` | `/api/sessions/:id/respawn/config` | Update config | | `PUT` | `/api/sessions/:id/respawn/config` | Update config |
### Ralph Tracking ### Ralph / Todo Tracking
| Method | Endpoint | Description | | Method | Endpoint | Description |
|--------|----------|-------------| |--------|----------|-------------|
| `GET` | `/api/sessions/:id/inner-state` | Get loop state + todos | | `GET` | `/api/sessions/:id/ralph-state` | Get loop state + todos |
| `POST` | `/api/sessions/:id/inner-config` | Configure tracking | | `POST` | `/api/sessions/:id/ralph-config` | Configure tracking |
### Real-Time ### Real-Time
| Method | Endpoint | Description | | Method | Endpoint | Description |
+12 -12
View File
@@ -159,7 +159,7 @@ The official implementation (and Claudeman) prevents false positives when comple
- **If loop already active**: Emit immediately (explicit loop start via `/ralph-loop:ralph-loop`) - **If loop already active**: Emit immediately (explicit loop start via `/ralph-loop:ralph-loop`)
```typescript ```typescript
// From claudeman/src/inner-loop-tracker.ts // From claudeman/src/ralph-tracker.ts
private handleCompletionPhrase(phrase: string): void { private handleCompletionPhrase(phrase: string): void {
const count = (this._completionPhraseCount.get(phrase) || 0) + 1; const count = (this._completionPhraseCount.get(phrase) || 0) + 1;
this._completionPhraseCount.set(phrase, count); this._completionPhraseCount.set(phrase, count);
@@ -616,7 +616,7 @@ Ask yourself:
## Claudeman Implementation ## Claudeman Implementation
Claudeman implements Ralph Wiggum tracking via the `InnerLoopTracker` class in `src/inner-loop-tracker.ts`. Claudeman implements Ralph Wiggum tracking via the `RalphTracker` class in `src/ralph-tracker.ts`.
### Auto-Detection Patterns ### Auto-Detection Patterns
@@ -657,7 +657,7 @@ Each session has its **own independent tracker**:
### State Structure ### State Structure
```typescript ```typescript
interface InnerLoopState { interface RalphLoopState {
enabled: boolean; // Tracker active? enabled: boolean; // Tracker active?
active: boolean; // Loop running? active: boolean; // Loop running?
completionPhrase: string | null; completionPhrase: string | null;
@@ -668,7 +668,7 @@ interface InnerLoopState {
elapsedHours: number | null; elapsedHours: number | null;
} }
interface InnerTodoItem { interface RalphTodoItem {
id: string; id: string;
content: string; content: string;
status: 'pending' | 'in_progress' | 'completed'; status: 'pending' | 'in_progress' | 'completed';
@@ -680,10 +680,10 @@ interface InnerTodoItem {
| Method | Endpoint | Description | | Method | Endpoint | Description |
|--------|----------|-------------| |--------|----------|-------------|
| GET | `/api/sessions/:id/inner-state` | Get loop state and todos | | GET | `/api/sessions/:id/ralph-state` | Get loop state and todos |
| POST | `/api/sessions/:id/inner-config` | Configure tracker settings | | POST | `/api/sessions/:id/ralph-config` | Configure tracker settings |
**POST `/inner-config` Options**: **POST `/ralph-config` Options**:
```json ```json
{ {
"enabled": true, // Enable/disable tracker "enabled": true, // Enable/disable tracker
@@ -719,9 +719,9 @@ interface InnerTodoItem {
| Event | Data | When | | Event | Data | When |
|-------|------|------| |-------|------|------|
| `session:innerLoopUpdate` | `InnerLoopState` | Loop state changes | | `session:ralphLoopUpdate` | `RalphLoopState` | Loop state changes |
| `session:innerTodoUpdate` | `InnerTodoItem[]` | Todos detected/updated | | `session:ralphTodoUpdate` | `RalphTodoItem[]` | Todos detected/updated |
| `session:innerCompletionDetected` | `{ phrase: string }` | Completion phrase found | | `session:ralphCompletionDetected` | `{ phrase: string }` | Completion phrase found |
### Skill Commands ### Skill Commands
@@ -787,7 +787,7 @@ If stuck after 10 iterations with the same error:
**Cause**: No Ralph patterns detected in output. **Cause**: No Ralph patterns detected in output.
**Solution**: **Solution**:
1. Manually enable: `POST /api/sessions/:id/inner-config { "enabled": true }` 1. Manually enable: `POST /api/sessions/:id/ralph-config { "enabled": true }`
2. Or ensure Claude outputs recognizable patterns 2. Or ensure Claude outputs recognizable patterns
### Context Window Exhaustion ### Context Window Exhaustion
@@ -816,7 +816,7 @@ POST /api/sessions/:id/auto-clear
- [DeepWiki - Ralph Loop](https://deepwiki.com/anthropics/claude-plugins-official/5.2.2-ralph-loop) - [DeepWiki - Ralph Loop](https://deepwiki.com/anthropics/claude-plugins-official/5.2.2-ralph-loop)
### Related Claudeman Files ### Related Claudeman Files
- `src/inner-loop-tracker.ts` - Core detection engine - `src/ralph-tracker.ts` - Core detection engine
- `src/ralph-loop.ts` - Task orchestration - `src/ralph-loop.ts` - Task orchestration
- `src/respawn-controller.ts` - Session cycling - `src/respawn-controller.ts` - Session cycling
- `src/types.ts` - Type definitions - `src/types.ts` - Type definitions