How phialsbasement/chain-of-recursive-thoughts works
Project type and purpose
• From the README (“Chain of Recursive Thoughts”) and file tree, this is a full-stack web application whose core logic (“CoRT”) implements recursive AI self-evaluation by generating, comparing, and selecting alternative responses.
• The frontend is a React/Tailwind UI; the backend is Python scripts (recthink_web.py, recursive_thinking_ai.py) that orchestrate LLM calls (via OpenRouter, Mistral 3.1 etc.).
File structure
• Top-level:
• frontend/: Create-React-App project (JSX components, context, API helper, Tailwind config).
• recthink_web.py: Python web server entrypoint.
• recursive_thinking_ai.py: Core AI orchestration library.
• requirements.txt: Python deps.
• demos/: standalone demo scripts for CLI usage.
• Key patterns:
• Frontend/Backend separation.
• API layer (frontend/src/api.js) calling backend endpoints.
• AI orchestration layer in Python.
Additional architectural insights from README
• The system loops: initial generation → N thinking rounds → multiple alternatives → self-evaluation → pick best.
• Web UI is “early dev” so the Python server likely serves a REST or WebSocket API for the React app.