search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Search Checkpoints

搜索检查点(Checkpoints)

Use
entire search
to find relevant checkpoints before guessing from memory.
在凭借记忆猜测之前,使用
entire search
来查找相关的检查点。

Response Format

响应格式

Begin the first response to this skill invocation with the line:
Entire Search:
followed by a blank line, then the content.
  • Apply the header to the first response of the invocation only. Do not re-print it on follow-up turns within the same invocation (e.g. after the user answers a clarifying question).
  • Do not include the header on error or early-exit responses (e.g. "Entire CLI not installed", "authentication required", "no matches"). The header's presence should signal that the skill ran and produced real output.
首次调用该技能时,回复需以以下内容开头:
Entire Search:
随后空一行,再输出内容。
  • 仅在首次调用响应中添加该标题。在同一调用的后续回合中(例如用户回答澄清问题后),请勿重复打印该标题。
  • 在错误或提前退出的响应中(例如“Entire CLI未安装”、“需要认证”、“无匹配结果”),请勿包含该标题。标题的存在应表明技能已运行并生成了实际输出。

When to Use

使用场景

  • The user asks things like "have we done this before?", "search past work", "find the previous implementation", or "look for checkpoints about X"
  • You need prior context from another branch, repo, author, or recent time period
  • You want likely matches first, then a deeper transcript read only for the best hit
Do not use this for the current active session. Use
session-handoff
for that.
  • 用户询问类似“我们之前做过这个吗?”、“搜索过往工作”、“查找之前的实现方案”或“查找关于X的检查点”等问题时
  • 你需要来自其他分支、仓库(repo)、作者或最近时间段的过往上下文时
  • 你希望先获取可能的匹配结果,再仅针对最佳匹配进行更深入的 transcript 读取时
请勿将此用于当前活动会话。当前会话请使用
session-handoff

Process

流程

  1. Run a focused search with JSON output so results are easy to inspect:
bash
entire search "<query>" --json
Add filters when the user already gave them or when the first search is too broad:
bash
entire search "<query>" --json --repo owner/name --branch branch-name --author "Name" --date week
Inline filters are also supported in the query:
author:<name>
,
date:<week|month>
,
branch:<name>
,
repo:<owner/name>
,
repo:*
.
  1. Review the top matches and summarize the likely candidates for the user. Do not dump raw JSON unless they ask for it.
  2. If the user wants details on a specific result, open the checkpoint with:
bash
entire explain --checkpoint <checkpoint-id> --full --no-pager
If
--full
fails, fall back to:
bash
entire explain --checkpoint <checkpoint-id> --raw-transcript --no-pager
  1. 运行指定搜索并以JSON格式输出,以便于查看结果:
bash
entire search "<query>" --json
当用户已提供筛选条件,或首次搜索范围过宽时,添加筛选器:
bash
entire search "<query>" --json --repo owner/name --branch branch-name --author "Name" --date week
查询中也支持内联筛选器:
author:<name>
date:<week|month>
branch:<name>
repo:<owner/name>
repo:*
  1. 查看顶部匹配结果,并为用户总结可能的候选结果。除非用户要求,否则请勿直接输出原始JSON。
  2. 如果用户想要某个特定结果的详细信息,使用以下命令打开检查点:
bash
entire explain --checkpoint <checkpoint-id> --full --no-pager
如果
--full
参数失效,回退至:
bash
entire explain --checkpoint <checkpoint-id> --raw-transcript --no-pager

Search Heuristics

搜索策略

  • Start with the user's domain terms, feature name, error text, file name, or ticket ID
  • Prefer narrower searches before increasing
    --limit
  • Add
    --repo
    or
    repo:*
    explicitly when repository scope matters
  • If there are no useful hits, broaden in this order: remove branch filter, widen date, simplify query terms
  • 从用户的领域术语、功能名称、错误文本、文件名或工单ID开始搜索
  • 在增加
    --limit
    参数之前,优先选择范围更窄的搜索
  • 当仓库范围很重要时,显式添加
    --repo
    repo:*
  • 如果没有有用的匹配结果,按以下顺序扩大范围:移除分支筛选器、扩大时间范围、简化查询术语

Failure Modes

失败处理

  • If search says authentication is required, tell the user to run
    entire login
  • If there are no matches, say that clearly and mention the filters or query terms you tried
  • If the user really wants the current session, switch to
    session-handoff
    instead of searching checkpoints
  • 如果搜索提示需要认证,告知用户运行
    entire login
  • 如果没有匹配结果,明确说明这一点,并提及你尝试过的筛选器或查询术语
  • 如果用户确实需要当前会话的内容,切换至
    session-handoff
    而非搜索检查点