64 lines
2.1 KiB
Markdown
64 lines
2.1 KiB
Markdown
# Topic项目计划新增
|
|
|
|
- Registry ID: `topic-discovery`
|
|
- n8n Workflow ID: `iw9vx9ih5Lt0Mobk`
|
|
- Status: `external-upstream`
|
|
- 角色: 从 GitHub Search API 按 topic 和关键词发现候选仓库,经过去重与 AI 筛选后,写入 discovery 任务队列。
|
|
|
|
## 触发方式
|
|
|
|
- 定时触发
|
|
- 当前已核查行为:每日约 `01:00` 运行
|
|
|
|
## 外部输入
|
|
|
|
- GitHub Search API
|
|
- 预设 topic / keyword watchlist
|
|
- AI 保留或丢弃判断
|
|
|
|
## 主流程
|
|
|
|
1. 组合 topic 与关键词查询 GitHub 仓库。
|
|
2. 提取候选仓库 URL、基础描述和来源信息。
|
|
3. 调用 discovery 去重接口判断是否应该继续创建任务。
|
|
4. 使用 LLM 对候选项目做保留或丢弃判断。
|
|
5. 把保留结果写入 discovery 任务队列。
|
|
6. 当召回偏低时发出低召回告警。
|
|
|
|
## 输出结果
|
|
|
|
- `tasks[].sourceUrl`
|
|
- `tasks[].sourceType`
|
|
- `dedupe shouldCreate`
|
|
- `task creation result`
|
|
- `low recall alert`
|
|
|
|
## 与仓库的关系
|
|
|
|
这条流程不直接写当前仓库的 `projects` 表。它的作用是“发现项目并造任务”,后续由 `项目分析入库(多源)` 消费任务并完成入库。
|
|
|
|
当前仓库内最终会消费它产出的结果:
|
|
|
|
- [route.ts](D:/Code/AI/agent-park/src/app/api/projects/route.ts)
|
|
- [route.ts](D:/Code/AI/agent-park/src/app/api/projects/[slug]/route.ts)
|
|
|
|
## 系统边界
|
|
|
|
当前仓库没有实现以下接口,这部分应视为外部上游系统:
|
|
|
|
- `POST /api/discovery/check-duplicates`
|
|
- `POST /api/discovery/tasks`
|
|
|
|
因此,这条流程在仓库侧属于 `external-upstream`,不是应用内路由。
|
|
|
|
## 已确认要点
|
|
|
|
- 已通过 live n8n MCP 核查 workflow 元数据与职责。
|
|
- 该流程围绕 agent / infra / observability / evaluation / MCP 等方向搜索仓库。
|
|
- 任务入队后,真实入库并不在当前流程内完成。
|
|
|
|
## 维护要求
|
|
|
|
- GitHub 搜索 query、topic watchlist、保留规则变更时,同步更新 [registry.json](D:/Code/AI/agent-park/docs/integrations/n8n/registry.json)。
|
|
- 若未来 discovery 服务代码并入当前仓库,应把这里的外部边界改成具体路由映射。
|