AOSSIE-Org / AOSSIE-Org/SkillBot

Proposal: Modularizing SkillBot & Adding Support for Flexible AI Backends

Đang mở
#31 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
6
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi there!

I’ve been reviewing the SkillBot codebase and really love what the bot does for automating contributor onboarding and GitHub issue creation!

While looking through the current implementation (`bot.py` and `repo_router.py`), I noticed a few areas where we could make the bot much more flexible, faster, and easier to maintain:

### 1. Hardcoded to Local Ollama
Currently, the AI requests are directly tied to a local Ollama instance (`http://localhost:11434`). If a maintainer wants to deploy SkillBot using OpenAI, Anthropic Claude, or a remote server endpoint, it requires editing core code. Adding a simple provider setting would let us easily switch or configure AI backends.

### 2. File Logging Slowdowns (`gap_log.json`)
Whenever SkillBot records a knowledge gap, it reads the entire `gap_log.json` file into memory and rewrites the whole file synchronously. As the log file grows, this can freeze the bot's response loop. Switching to a lightweight async append format (like `.jsonl`) will keep logging fast O(1) and non-blocking.

### 3. Large Monolithic Files (`bot.py`)
`bot.py` is over 700 lines long and handles Discord messages, AI prompts, file loading, gap logging, and GitHub API calls all in one place. Splitting this into clear, single-purpose helper modules (e.g., `discord_bot.py`, `ai_provider.py`, `github_service.py`) will make testing and adding new features much simpler.

---

### Proposed Overview of the Plan
* **Modular structure:** Separate Discord event handling, AI service calls, and GitHub API integrations.
* **Flexible AI Providers:** Introduce a clean interface for AI providers so we can easily swap between Ollama, OpenAI, or other models.
* **Fast Async Logging:** Update `gap_log.json` to an async append log to prevent event-loop freezing.

If the maintainers are open to this direction, I'd love to put together a full proposal / draft PR to work on this!

Looking forward to hearing your thoughts!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by reading bot.py and repo_router.py, then trace the Ollama endpoint and the gap_log.json read/write path. This proposal is ready only after maintainers agree on scope and architecture; done would mean separated Discord, AI, and GitHub responsibilities, configurable AI providers, and non-blocking append-style gap logging.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github, ollama, python
Lĩnh vực
ai, backend, devtools, performance
Loại issue
Tái cấu trúc
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.