github-scanning
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Scanning
GitHub 扫描
Search Query Patterns by Intent
按意图划分的搜索查询模式
Issues
Issues
| Intent | Query Pattern | Scope |
|---|---|---|
| Assigned to you | | All repos |
| You were @mentioned | | All repos |
| Authored by you | | All repos |
| Specific repo | | Single repo |
| By keyword | | All repos |
| Org-wide | | Org repos |
| Closed (for recap) | | All repos |
| 意图 | 查询模式 | 范围 |
|---|---|---|
| 分配给你的 | | 所有仓库 |
| 你被@提及的 | | 所有仓库 |
| 你创建的 | | 所有仓库 |
| 指定仓库 | | 单个仓库 |
| 按关键词 | | 所有仓库 |
| 整个组织范围 | | 组织下所有仓库 |
| 已关闭(用于复盘) | | 所有仓库 |
Pull Requests
Pull Requests
| Intent | Query Pattern | Scope |
|---|---|---|
| Awaiting your review | | All repos |
| Your open PRs | | All repos |
| Assigned to you | | All repos |
| You reviewed, check for updates | | All repos |
| Specific PR | Fetch directly with owner, repo, number | Single repo |
| Org-wide | | Org repos |
| 意图 | 查询模式 | 范围 |
|---|---|---|
| 等待你审核的 | | 所有仓库 |
| 你创建的未合并PR | | 所有仓库 |
| 分配给你的 | | 所有仓库 |
| 你已审核过、需要查看更新的 | | 所有仓库 |
| 指定PR | 直接通过owner、仓库名、PR编号获取 | 单个仓库 |
| 整个组织范围 | | 组织下所有仓库 |
Discussions
Discussions
| Intent | Action |
|---|---|
| You're mentioned | Search with |
| You're participating | Search discussions you've commented on |
| High activity | Filter for 10+ comments in last 24h |
| Linked to your issues | Scan description/comments for issue references |
| 意图 | 操作 |
|---|---|
| 你被提及的 | 使用 |
| 你参与的 | 搜索你评论过的讨论 |
| 高活跃度 | 筛选过去24小时内评论数10条以上的内容 |
| 关联你的Issues的 | 扫描描述/评论中的Issue引用 |
Releases
Releases
- Use per repo - check for recent, draft, and pre-releases.
github_list_releases - Cross-reference merged PRs against release notes to identify unreleased work.
- Compare issue milestones against release schedules to flag upcoming deadline items.
- 每个仓库使用接口,检查最新版本、草稿版本和预发布版本。
github_list_releases - 将已合并的PR与发布说明交叉比对,识别尚未发布的工作内容。
- 将Issue里程碑与发布计划对比,标记即将到期的事项。
Security
安全
- Dependabot alerts: critical and high severity across monitored repos.
- Security advisories affecting dependencies.
- Pending dependency update PRs from or
dependabot[bot].renovate[bot]
- Dependabot告警:监控所有仓库的严重和高危级别告警。
- 影响依赖的安全公告。
- 来自或
dependabot[bot]的待处理依赖更新PR。renovate[bot]
CI/CD
CI/CD
- Fetch recent workflow runs - identify failing workflows, long jobs, and flaky tests.
- For failing workflows: note repo, workflow name, branch, failure reason, and link to run.
- Cross-reference user's open PRs against CI results.
- 获取最近的工作流运行记录,识别失败的工作流、长耗时任务和不稳定测试。
- 针对失败的工作流:记录仓库、工作流名称、分支、失败原因和运行记录链接。
- 将用户的未合并PR与CI结果交叉比对。
Date Range Handling
日期范围处理
Convert natural language to GitHub query qualifiers:
| User Says | GitHub Qualifier |
|---|---|
| "last week" | |
| "this month" | |
| "today" | |
| "this week" | |
| "between X and Y" | |
| Not specified | Use |
| "for current month" (a11y tracker) | |
将自然语言转换为GitHub查询限定符:
| 用户表述 | GitHub限定符 |
|---|---|
| "上周" | |
| "本月" | |
| "今天" | |
| "本周" | |
| "X到Y之间" | |
| 未指定 | 使用偏好配置中的 |
| "当月"(无障碍追踪器) | |
Scope Narrowing
范围收窄
Add qualifiers to narrow by scope when the user specifies one:
| Scope | Qualifier |
|---|---|
| Single repo | |
| All org repos | |
| All repos by user | |
| Everything (default) | No qualifier - searches all accessible repos |
当用户指定范围时,添加限定符缩小搜索范围:
| 范围 | 限定符 |
|---|---|
| 单个仓库 | |
| 组织下所有仓库 | |
| 用户的所有仓库 | |
| 全部(默认) | 无限制符 - 搜索所有可访问的仓库 |
Preferences File Integration
偏好配置文件集成
Read and apply these filters before and after searching:
.github/agents/preferences.md- - determines the default search scope (all / starred / owned / configured / workspace).
repos.discovery - - always include these repos even in restricted modes.
repos.include - - skip these repos in all searches.
repos.exclude - - per-repo settings:
repos.overrides- -> skip issue searches for this repo
track.issues: false - -> skip PR searches for this repo
track.pull_requests: false - -> skip discussions for this repo
track.discussions: false - -> skip release checks for this repo
track.releases: false - -> skip security alerts for this repo
track.security: false - -> skip CI status for this repo
track.ci: false - /
labels.include-> filter results by labellabels.exclude - -> only trigger for changes touching these file paths (for PRs/CI)
paths - -> filter to specific assignees (empty = all)
assignees
- - default time range if the user doesn't specify one.
search.default_window - - which sections to include in the daily briefing.
briefing.sections - - config for the a11y tracker (repos, labels, channels).
accessibility_tracking
读取,在搜索前后应用以下过滤规则:
.github/agents/preferences.md- - 定义默认搜索范围(全部/标星/自有/已配置/工作区)。
repos.discovery - - 即使在受限模式下也始终包含这些仓库。
repos.include - - 所有搜索都跳过这些仓库。
repos.exclude - - 单仓库配置:
repos.overrides- -> 跳过该仓库的Issue搜索
track.issues: false - -> 跳过该仓库的PR搜索
track.pull_requests: false - -> 跳过该仓库的讨论搜索
track.discussions: false - -> 跳过该仓库的版本发布检查
track.releases: false - -> 跳过该仓库的安全告警
track.security: false - -> 跳过该仓库的CI状态检查
track.ci: false - /
labels.include-> 按标签过滤结果labels.exclude - -> 仅当PR/CI变更触及这些文件路径时触发(适用于PR/CI场景)
paths - -> 过滤指定经办人(空=全部)
assignees
- - 用户未指定时的默认时间范围。
search.default_window - - 每日简报中需要包含的板块。
briefing.sections - - 无障碍追踪器配置(仓库、标签、频道)。
accessibility_tracking
Cross-Repo Intelligence
跨仓库智能分析
When results arrive from different repos, look for and surface these patterns:
| Pattern | Action |
|---|---|
| Cross-repo references | When issue A contains |
| Shared label patterns | Group items in different repos tagged |
| Related PRs in different repos | Flag: "This issue depends on PR #N in repo-B which is still open" |
| Merged PR not yet released | Note: "Your PR #N is merged but not in any release yet" |
| Issue with merged fix PR | Flag: "This may be resolved - PR #N that closes it was merged on {date}" |
| Branch naming patterns | Group PRs in different repos using the same branch naming convention |
当从不同仓库返回结果时,查找并呈现以下模式:
| 模式 | 操作 |
|---|---|
| 跨仓库引用 | 当Issue A包含 |
| 共享标签模式 | 分类时将不同仓库中标记为 |
| 不同仓库中的关联PR | 标记:"该Issue依赖于repo-B中仍未合并的PR #N" |
| 已合并PR尚未发布 | 标注:"你的PR #N已合并,但尚未纳入任何发布版本" |
| Issue已有已合并的修复PR | 标记:"该问题可能已解决 - 对应的关闭PR #N已于{date}合并" |
| 分支命名模式 | 将不同仓库中使用相同分支命名规则的PR归为一组 |
Parallel Stream Collection Model
并行流采集模型
For agents that collect from multiple data streams, run independent streams simultaneously. Don't serialize operations with no dependencies.
对于从多个数据流采集数据的Agent,可同时运行独立的数据流。无依赖的操作不要串行执行。
Example: Daily Briefing - 3 Parallel Batches
示例:每日简报 - 3个并行批次
Batch 1 - fully independent, run simultaneously:
- Issues (assigned, mentioned, authored)
- Pull requests (review-requested, authored)
- Releases & deployments
- Accessibility updates
Batch 2 - run after Batch 1 (CI needs PR list from Batch 1):
- GitHub Discussions
- CI/CD health (cross-references PR list)
- Security alerts
Batch 3 - can overlap with Batch 2:
- Project board status
- Recently closed/merged work
批次1 - 完全独立,同时运行:
- Issues(分配给你的、提及你的、你创建的)
- Pull requests(待你审核的、你创建的)
- 版本发布与部署
- 无障碍更新
批次2 - 批次1完成后运行(CI需要批次1的PR列表):
- GitHub Discussions
- CI/CD健康度(交叉引用PR列表)
- 安全告警
批次3 - 可与批次2重叠运行:
- 项目看板状态
- 近期关闭/合并的工作
Example: Analytics - 2 Parallel Batches
示例:分析任务 - 2个并行批次
Batch 1 - collection (all independent):
- Closed/merged PRs in period
- Opened issues in period
- CI workflow runs in period
- Security alerts in period
Batch 2 - analysis (depends on Batch 1 data):
- Health score computation
- Velocity metrics calculation
- Bottleneck detection
批次1 - 数据采集(全部独立):
- 时段内关闭/合并的PR
- 时段内新建的Issues
- 时段内CI工作流运行记录
- 时段内安全告警
批次2 - 分析(依赖批次1的数据):
- 健康度评分计算
- 效能指标计算
- 瓶颈检测
Announcement Template for Parallel Work
并行工作的公告模板
text
Running {N} searches in parallel... ({scope})
Batch 1 complete - {X} items found
Running {N} additional searches...
Batch 2 complete - {Y} items found
Scoring and prioritizing...
Done - {Z} items need action, {W} to monitortext
Running {N} searches in parallel... ({scope})
Batch 1 complete - {X} items found
Running {N} additional searches...
Batch 2 complete - {Y} items found
Scoring and prioritizing...
Done - {Z} items need action, {W} to monitorAuto-Recovery for Empty Results
空结果自动恢复
If a search returns 0 results:
- Automatically broaden: remove date filter, expand scope to , or remove label filters.
all - Tell the user exactly what changed: "No results in last 7 days - broadened to last 30 days and found 3 items."
- Never return 0 results without trying at least one broader query first.
Recovery cascade:
- First try: Remove date qualifier
- Second try: Expand scope (add org: or remove repo: qualifier)
- Third try: Remove label filters
- Report 0 results only if all three attempts return nothing
如果搜索返回0条结果:
- 自动扩大范围:移除日期过滤器、将范围扩展为、或移除标签过滤器。
all - 明确告知用户调整内容:"过去7天无结果 - 已扩大范围到过去30天,找到3条结果。"
- 至少尝试一次扩大范围的查询后,才可以返回0条结果。
恢复级联步骤:
- 第一次尝试:移除日期限定符
- 第二次尝试:扩大范围(添加org:限定符或移除repo:限定符)
- 第三次尝试:移除标签过滤器
- 仅当三次尝试都返回空时,才报告0条结果
Pagination
分页
- Paginate large result sets in batches of 10.
- Ask before loading more: "Showing 10 of 47. Load more?"
- Never silently truncate results - always disclose the total count.
- 大型结果集按10条为一批分页。
- 加载更多前询问用户:"共47条,当前展示10条。是否加载更多?"
- 不要静默截断结果 - 始终披露总数量。
Result Deduplication
结果去重
When the same item appears in multiple searches (e.g., an issue you're both assigned to AND mentioned in):
- Show it once, with all context combined.
- In the Signal column, combine signals: "Assigned, @mentioned".
- In priority calculations, apply the highest-scoring signal, not additive.
当同一条目在多次搜索中出现(例如:一个Issue既分配给你同时也@了你):
- 仅展示一次,合并所有上下文。
- 在信号列合并信号:"已分配, @提及"。
- 优先级计算时,取最高得分的信号,不叠加计算。
Rate Limiting
速率限制
- If rate-limited (403/429), tell the user the reset time in one sentence.
- Do not retry the same query - wait if reset is <60 seconds; otherwise report and move on.
- For multi-stream collection, skip rate-limited streams and complete them in a follow-up.
- 如果触发速率限制(403/429),用一句话告知用户重置时间。
- 不要重试相同查询 - 如果重置时间小于60秒则等待,否则报告问题并继续其他任务。
- 多流采集场景下,跳过触发速率限制的流,后续补全该部分内容。