From 6357b3499bf77808591e5f8c7a2af2296e951891 Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Fri, 16 Jan 2026 14:39:07 +0000 Subject: [PATCH] Add coding standards and update project structure --- SPEC.md | 55 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/SPEC.md b/SPEC.md index fa81c1a..96f4d26 100644 --- a/SPEC.md +++ b/SPEC.md @@ -1,7 +1,9 @@ -# AI Roundtable +# MoAI - Master of AIs A multi-AI collaborative brainstorming platform where multiple AI models (Claude, GPT, Gemini, etc.) discuss topics together, see each other's responses, and work toward consensus. +**Domain:** moai.dk (planned) + ## Concept Instead of asking one AI a question, ask a "team" of AIs. They each provide initial thoughts, then engage in a structured discussion where each can see and respond to the others' contributions. The result is a richer, more diverse exploration of ideas that gets summarized into actionable markdown documents. @@ -304,26 +306,43 @@ Format as structured JSON. - httpx for API calls - Requesty or OpenRouter for model routing +### Coding Standards +- **Formatting/Linting:** ruff (line length 100) +- **Testing:** pytest (80%+ coverage on core logic) +- **Type hints:** Required on all public functions +- **Docstrings:** Required on modules and classes +- **Logging:** Use `logging` module, no `print()` in production +- **Pre-commit:** Enforce ruff and pytest before commits + ### File Structure ``` -ai-roundtable/ -├── bot/ +moai/ +├── src/ +│ └── moai/ +│ ├── __init__.py +│ ├── bot/ +│ │ ├── __init__.py +│ │ ├── main.py # Bot entry point +│ │ ├── handlers/ +│ │ │ ├── __init__.py +│ │ │ ├── projects.py # /project commands +│ │ │ ├── discussion.py # /open, /discuss, @mentions +│ │ │ └── export.py # /export, /consensus +│ │ └── middleware.py # Auth, logging +│ └── core/ +│ ├── __init__.py +│ ├── models.py # SQLAlchemy models +│ ├── database.py # DB connection +│ ├── orchestrator.py # AI round management +│ ├── ai_client.py # Requesty/OpenRouter wrapper +│ └── exporter.py # Markdown generation +├── tests/ │ ├── __init__.py -│ ├── main.py # Bot entry point -│ ├── handlers/ -│ │ ├── projects.py # /project commands -│ │ ├── discussion.py # /open, /discuss, @mentions -│ │ └── export.py # /export, /consensus -│ └── middleware.py # Auth, logging -├── core/ -│ ├── __init__.py -│ ├── models.py # SQLAlchemy models -│ ├── database.py # DB connection -│ ├── orchestrator.py # AI round management -│ ├── ai_client.py # Requesty/OpenRouter wrapper -│ └── exporter.py # Markdown generation -├── config.py # Settings, API keys -├── requirements.txt +│ ├── test_models.py +│ ├── test_orchestrator.py +│ └── test_handlers.py +├── pyproject.toml # Project config, dependencies, ruff settings +├── .pre-commit-config.yaml └── README.md ```