Built with Ralph Loop Methodology — A project demonstrating iterative, promise-driven development.
This project is developed using the Ralph Loop approach — an iterative development methodology that emphasizes:
- Promise-driven development: Clear commitments (
<promise>COMPLETE</promise>) for each task - Incremental delivery: Tasks completed and verified one by one
- Continuous validation: Each task is tested before moving to the next
- Transparent progress: All progress tracked in
progress.txt
This project serves as a proof of concept for the Ralph Loop methodology:
| Ralph Loop Principle | Implementation in This Project |
|---|---|
| Task Breakdown | 6 well-defined tasks from initialization to completion |
| Promise Tracking | Each task marked with <promise>COMPLETE</promise> |
| Iterative Progress | Sequential task completion with verification |
| Self-Documentation | Progress tracked in progress.txt |
| Full Delivery | All promised features delivered and working |
Result: ✅ Ralph Loop methodology verified — All 6 tasks completed successfully with a fully functional application.
- 📋 Debate Configuration: Customize debate topics, select AI models, set number of debaters
- 🤖 AI Debaters: Simulate AI models conducting debates (opening statements, rebuttals, free debate, closing statements)
- 👨⚖️ Judge Scoring: Multi-dimensional scoring system (logic, expression, rebuttal, teamwork)
- 📊 Results Display: Real-time score statistics, visual comparison, winner announcement
- 🏆 Traditional Format: Supports standard debate competition format
- React 18 + TypeScript
- Material-UI (MUI) + Bootstrap
- React Router
- Vite
- Node.js + Express
- RESTful API
- CORS support
- Node.js 18+ installed
- Qwen Code CLI (
qwencommand) installed and configured - API keys configured in
~/.qwen/settings.json
cd debate-app
# Install dependencies
npm install# Terminal 1: Start backend server
npm run server
# Terminal 2: Start frontend dev server
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
- Home Page: Click "Start Debate Configuration"
- Configuration Page:
- Enter the debate topic
- Select AI models for both sides (Proposition & Opposition)
- Set number of debaters (1-4 per side)
- Set number of judges (1-5)
- Debate Page:
- Click "Start Debate" to begin AI debate
- View debate content in real-time
- Switch to "Judge Scoring" tab
- Each judge submits their scores
- Results Page: View final scores and winner
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/models |
Get available AI models |
| GET | /api/rules |
Get debate rules |
| POST | /api/debate/speak |
Generate debate speech |
| POST | /api/debate/score |
Get judge scores |
POST /api/debate/speak
Content-Type: application/json
{
"topic": "AI will benefit humanity",
"side": "proposition",
"round": "opening",
"position": 1,
"context": []
}debate/
├── PRD.md # Product Requirements Document
├── progress.txt # Ralph Loop progress tracking
├── README.md # This file
└── debate-app/
├── src/
│ ├── components/ # React components
│ │ └── JudgePanel.tsx
│ ├── pages/ # Page components
│ │ ├── Home.tsx
│ │ ├── Config.tsx
│ │ ├── Debate.tsx
│ │ └── Result.tsx
│ ├── services/ # API services
│ │ └── api.ts
│ ├── types/ # TypeScript types
│ │ └── index.ts
│ ├── App.tsx
│ └── main.tsx
├── server/ # Backend server
│ ├── index.js
│ ├── package.json
│ └── models.allowed.json
├── package.json
└── README.md
| Dimension | Weight | Description |
|---|---|---|
| Logic | 30% | Sound reasoning and logical arguments |
| Expression | 25% | Clear and fluent language |
| Rebuttal | 25% | Effective counter-arguments |
| Teamwork | 20% | Coordination and overall coherence |
| Task | Status | Description |
|---|---|---|
| Task 1 | ✅ | Project initialization and architecture |
| Task 2 | ✅ | Debate configuration page |
| Task 3 | ✅ | Debate display page UI |
| Task 4 | ✅ | AI debater integration |
| Task 5 | ✅ | Judge scoring system |
| Task 6 | ✅ | Complete flow and optimization |
Final Promise: <promise>COMPLETE</promise> — All tasks delivered and verified.
| Command | Description |
|---|---|
npm run dev |
Start frontend development server |
npm run build |
Build for production |
npm run server |
Start backend server |
npm run lint |
Run ESLint |
npm run preview |
Preview production build |
The backend reads allowed models from server/models.allowed.json. You can override this using environment variables:
DEBATE_ALLOWED_MODEL_IDS: Comma-separated list of model IDsDEBATE_ALLOWED_MODELS_JSON: JSON array of model configurations
Ensure the following are configured before running:
~/.qwen/settings.json: Qwen Code CLI configuration- Required API keys (e.g.,
BAILIAN_CODING_PLAN_API_KEY)
MIT
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Ralph Loop Methodology Verified ✅
This project demonstrates that the Ralph Loop approach can successfully deliver a complete, functional web application through promise-driven, iterative development.