AgentEvalTool/.scratch/v1.0/issues/01-data-model.md
sinohqb 9cdbc41808 docs(intelligent-eval): commit v1.0 spec, tickets, and post-v1.0 improvements
All 8 tickets' acceptance criteria checked off (incl. the real OpenClaw
E2E verified on t480). Trivial import-sort fix from ruff included.
2026-08-05 14:01:24 +08:00

18 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 01 — 智能评估数据模型 + 迁移
**What to build:** 创建智能评估的三个数据表(IntelligentEval、IntelligentEvalSession、IntelligentEvalMessage)及对应的 Repository 类,走 Alembic batch mode 迁移。
**Blocked by:** 无
**Acceptance criteria:**
- [x] `IntelligentEvalDB` 表定义:id, name, target_id, status, goal, seeds(JSON), intent, role_description, plan(JSON), plan_feedback, time_window_hours, report(JSON), created_at, updated_at, started_at, completed_at
- [x] `IntelligentEvalSessionDB` 表定义:id, eval_id, target_id, persona(JSON), goal, dimension, status, verdict(JSON), turn_count, created_at, closed_at
- [x] `IntelligentEvalMessageDB` 表定义:id, session_id, role, content, latency_ms, created_at
- [x] `IntelligentEvalStatus` 枚举:draft, planning, pending_approval, executing, completed, cancelled, failed
- [x] `IntelligentEvalSessionStatus` 枚举:running, completed, failed, expired
- [x] `IntelligentEvalRepository`:CRUD + list + 状态转换方法
- [x] `IntelligentEvalSessionRepository`:CRUD + list_by_eval
- [x] `IntelligentEvalMessageRepository`:create + list_by_session
- [x] Alembic 迁移(batch mode)通过
- [x] `init_db()` 的 `create_all()` 能建出三张表