From 0e3291f18d19eeab8372c9b037e73a0b92f100c2 Mon Sep 17 00:00:00 2001 From: Echo Date: Mon, 9 Feb 2026 09:06:48 +0000 Subject: [PATCH] Add Ralph setup documentation --- RALPH-SETUP.md | 159 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 RALPH-SETUP.md diff --git a/RALPH-SETUP.md b/RALPH-SETUP.md new file mode 100644 index 0000000..a613605 --- /dev/null +++ b/RALPH-SETUP.md @@ -0,0 +1,159 @@ +# Ralph Setup Complete ✅ + +**Data:** 2026-02-09 +**Locație:** moltbot (LXC 110) + +## Ce am făcut + +### 1. Instalat skill Ralph în Claude Code +```bash +~/.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:** +```python +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) +```python +# 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) +```python +# 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 + +```bash +# 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 + +```bash +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 + +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