feat: AI Self-Loop 專案骨架 — 爬站健檢版

完整實作建構順序 1-8(rule-based):
- Task Queue(SQLite):tasks/attempts/results + claim 防重複
- LLM 後端:OllamaBackend(num_ctx=32768) + LLMRouter
- Prompt Builder(YAML+Jinja2,重試注入 feedback)
- Context Assembler / Output Judge / Feedback Builder
- Loop Controller + Circuit Breaker
- Driver 層(BaseDriver + ApiClientDriver)
- Agent 層(BaseAgent + SiteHealthAgent:爬站/健檢/issue 生成)
- pipeline.py 入口,驗收:pending→done,output/ 落地

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Yellow
2026-06-14 17:35:54 +08:00
commit 27f98712ee
31 changed files with 1480 additions and 0 deletions

6
requirements.txt Normal file
View File

@@ -0,0 +1,6 @@
# --- Loop engine / infra ---
PyYAML>=6.0 # environments.yaml + prompt templates
Jinja2>=3.1 # prompt rendering
requests>=2.31 # api_client driver (HTTP)
beautifulsoup4>=4.12 # HTML parsing for the crawler agent
# stdlib used elsewhere: sqlite3, dataclasses, urllib, json, logging