Files
clawd/RALPH-SETUP.md
2026-02-09 09:06:48 +00:00

4.2 KiB

Ralph Setup Complete

Data: 2026-02-09 Locație: moltbot (LXC 110)

Ce am făcut

1. Instalat skill Ralph în Claude Code

~/.claude/skills/ralph/
├── SKILL.md              # Documentație skill
├── commands/
│   ├── prd.md           # Workflow /ralph:prd
│   └── convert.md       # Workflow /ralph:convert
├── templates/
│   ├── ralph.sh         # Loop autonom
│   ├── prompt.md        # Instrucțiuni per iterație
│   └── prd-template.json
└── examples/
    └── prd-hello-api.json

Comenzi disponibile în Claude Code:

  • /ralph:prd - Generează PRD cu întrebări adaptive
  • /ralph:convert - Convertește PRD în prd.json + configurare

2. Creat helper Python

Locație: ~/clawd/tools/ralph_workflow.py

Funcții pentru Echo:

from tools.ralph_workflow import create_prd, convert_prd, run_ralph, check_status

# Creează proiect complet
prd = create_prd("project-name", "descriere")
prd_json = convert_prd(prd)
run_ralph(prd_json, max_iterations=20, background=True)

# Verifică progres
status = check_status(Path("~/workspace/project-name"))

3. Actualizat documentație

  • AGENTS.md - workflow night-execute cu Ralph local
  • TOOLS.md - adăugat ralph_workflow.py
  • memory/kb/tools/ralph-workflow.md - documentație completă
  • Git commit + push către gitea

Workflow complet (pentru Echo)

Evening Report (20:00)

Echo propune proiecte/features → Marius aprobă

Night Execute (23:00)

# Planning cu Opus (Echo)
prd = create_prd(
    "task-tracker",
    "Task tracker simplu pentru CLI cu SQLite"
)
prd_json = convert_prd(prd)

# Lansare Ralph autonom (Sonnet)
run_ralph(prd_json, max_iterations=20, background=True)

# Git push
cd ~/workspace/task-tracker
git init && git add . && git commit -m "Initial"
git remote add origin https://gitea.romfast.ro/romfast/task-tracker
git push -u origin main

Morning Report (08:30)

# Verifică status
status = check_status(Path.home() / "workspace" / "task-tracker")

# Raportează în Discord
f"""
## 🔄 Proiecte Ralph

### task-tracker
- ✅ Complete: {len(status['complete'])} stories
- 🔄 Incomplete: {len(status['incomplete'])} stories
- 📚 Learnings: {status['learnings'][-3:]}
- 🔗 https://gitea.romfast.ro/romfast/task-tracker
"""

Diferențe față de sistemul vechi

Înainte (claude-agent) Acum (moltbot)
SSH către LXC 171 Local pe LXC 110
/workspace/ pe claude-agent ~/workspace/ pe moltbot
Manual SSH + claude exec Python helper automat
Monitoring manual check_status() automat

Test rapid

# Test manual cu Claude Code
cd ~/workspace
mkdir test-ralph && cd test-ralph

claude exec "/ralph:prd

Vreau un calculator simplu CLI cu Python.
Features: add, subtract, multiply, divide."

# Apoi
claude exec "/ralph:convert

Convertește PRD din tasks/prd-calculator.md"

# Rulează Ralph
./scripts/ralph/ralph.sh 5  # max 5 iterații pentru test

# Verifică status
jq '.userStories[] | {id, title, passes}' scripts/ralph/prd.json

Sau cu Python helper

python3 ~/clawd/tools/ralph_workflow.py create "test-calculator" "Calculator simplu CLI cu Python"

# Monitorizează
python3 ~/clawd/tools/ralph_workflow.py status "test-calculator"

Ce face Ralph automat

  1. Citește prd.json cu stories
  2. Selectează story cu priority minimă (passes=false)
  3. Rulează Claude Code pentru implementare
  4. Quality checks: typecheck, lint, test
  5. Git commit dacă OK
  6. Marchează passes=true
  7. Update progress.txt cu learnings
  8. Repetă până complete sau max iterations

Model Strategy

  • Opus (Echo) → Planning, PRD, stories
  • Sonnet (Ralph) → Coding, implementare, debugging

Status: Ready to use Next: Test cu primul proiect real în night-execute