新增功能: - 在LLM趋势分析中集成历史告警上下文,提供最近3次已触发告警的记录 - LLM自动判断本次分析是否与历史告警相似,避免重复通知 - 新增shouldNotify和notifyReason字段,支持智能通知决策 技术改进: - 扩展TrendAnalysisResponse类型,增加通知决策字段 - 数据库服务新增getRecentTriggeredAnalyses()方法 - LLM客户端新增analyzeTrendWithHistory()和相关方法 - 趋势分析服务集成历史上下文获取和通知决策逻辑 测试验证: - 创建test-db-history-method.ts验证数据库方法 - 创建test-llm-history-context.ts测试历史上下文功能 - 通过TypeScript类型检查和构建验证 这个功能可以有效减少重复告警,提升告警质量,避免通知疲劳。 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
18 lines
660 B
Markdown
18 lines
660 B
Markdown
<!-- OPENSPEC:START -->
|
|
# OpenSpec Instructions
|
|
|
|
These instructions are for AI assistants working in this project.
|
|
|
|
Always open `@/openspec/AGENTS.md` when the request:
|
|
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
- Sounds ambiguous and you need the authoritative spec before coding
|
|
|
|
Use `@/openspec/AGENTS.md` to learn:
|
|
- How to create and apply change proposals
|
|
- Spec format and conventions
|
|
- Project structure and guidelines
|
|
|
|
Keep this managed block so 'openspec update' can refresh the instructions.
|
|
|
|
<!-- OPENSPEC:END --> |