4.2 KiB
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"
Link-uri utile
- Documentație completă:
memory/kb/tools/ralph-workflow.md - Helper Python:
tools/ralph_workflow.py - Skill:
~/.claude/skills/ralph/ - Workspace:
~/workspace/ - Files web: https://moltbot.tailf7372d.ts.net/echo/files.html#memory/kb/tools/ralph-workflow.md
Ce face Ralph automat
- Citește prd.json cu stories
- Selectează story cu priority minimă (passes=false)
- Rulează Claude Code pentru implementare
- Quality checks: typecheck, lint, test
- Git commit dacă OK
- Marchează passes=true
- Update progress.txt cu learnings
- 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