# MoAI - Master of AIs ## What This Is A multi-AI collaborative brainstorming platform where multiple AI models (Claude, GPT, Gemini) discuss topics together, see each other's responses, and work toward consensus. Phase 1 is a Telegram bot for personal use; Phase 2 adds a web UI; future phases enable lightweight SaaS with multi-user collaboration. ## Core Value Get richer, more diverse AI insights through structured multi-model discussions—ask a team of AIs instead of just one. ## Requirements ### Validated (None yet — ship to validate) ### Active - [ ] Project scaffolding (pyproject.toml, ruff, pre-commit, src layout) - [ ] M1: Bot responds to /help, /status - [ ] M2: Project CRUD (/projects, /project new, select, delete, models, info) - [ ] M3: Single model Q&A working - [ ] M4: Open mode (parallel) with multiple models - [ ] M5: Discuss mode (sequential rounds) - [ ] M6: Consensus generation (/consensus) - [ ] M7: Export to markdown (/export) - [ ] M8: @mention direct messages ### Out of Scope - Web UI — Phase 2, after Telegram POC is validated - Multi-user collaboration — Phase 3 future - Personas (optimist/critic/pragmatist modes) — future enhancement - Voting/tallying — future enhancement - Cross-project memory — future enhancement - Automated triggers/webhooks — future enhancement - Voice memo transcription — future enhancement ## Context **SPEC.md contains:** - Full architecture diagram (Telegram → Python backend → Requesty/OpenRouter → AI APIs) - Complete data model (Project, Discussion, Round, Message, Consensus) - All Telegram commands with syntax - System prompts for models and consensus detection - Export markdown format - File structure specification **Current state:** Greenfield. Only documentation exists (SPEC.md, README.md, CLAUDE.md). ## Constraints - **Python version**: 3.11+ — required for modern async patterns - **Bot framework**: python-telegram-bot (async) — spec requirement - **Database**: SQLAlchemy + SQLite — upgrades to PostgreSQL in Phase 2 - **AI routing**: Modular abstraction layer — Requesty first, support OpenRouter and others - **Linting**: ruff (line length 100) — enforced via pre-commit - **Testing**: pytest, 80%+ coverage on core logic - **Type hints**: Required on all public functions - **Docstrings**: Required on modules and classes - **Logging**: logging module only, no print() - **Dependencies**: Unpinned unless security requires it ## Key Decisions | Decision | Rationale | Outcome | |----------|-----------|---------| | AI client as abstraction layer | Support Requesty, OpenRouter, direct APIs without changing core code | — Pending | | Full project scaffolding first | Consistent tooling from day one; prevents tech debt | — Pending | | User allowlist auth (Phase 1) | Simple for single-user POC, each user brings own AI credentials later | — Pending | --- *Last updated: 2026-01-16 after initialization*