Add fallback path when code search is unavailable · Entire

Add fallback path when code search is unavailable

c5794bc→main·

evisdren·1w ago·3 files·+11 added/-3 removed

Code search is limited to admins and insiders, so agents need a backup: report the access limitation, use local rg/grep for checked-out repos, and checkpoint search for cross-repo questions.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Changes

3

18 unmodified lines
  1. Turn the task into one or more focused entire search --json queries.
  2. Always use machine-readable output via entire search --json.
  3. Use inline filters like author:, date:, branch:, and repo: when they improve precision.
  4. For code content searches across repositories, add --code and refine with --repo, --all-repos, --limit, or --case-sensitive. Do not combine --author, --branch, or --date with --code. Query with distinctive tokens like function names, error strings, or config keys.
  5. If results are broad, rerun entire search --json with a narrower query instead of switching tools.
  6. Summarize the strongest matches with the relevant commit, session, file, and prompt details available in the results.

M.claude/agents/entire-search.md+1/-1

15 unmodified lines


1. Turn the task into one or more focused `entire search --json` queries.
2. Always use machine-readable output via `entire search --json`.
3. Use inline filters like `author:`, `date:`, `branch:`, and `repo:` when they improve precision.
4. If a query is too broad, add a second distinctive term or increase specificity before raising `--limit`

### Code Search Fallback

Code search is currently limited to admins and users on the insider list. If a `--code` search fails with "not yet available" or an access/permission error, do not retry — fall back:

1. Tell the user code search requires admin or insider access
2. If the target repo is checked out locally, search it with local tools (ripgrep, grep) instead
3. For cross-repo questions, run a checkpoint search (`entire search "<query>" --json`, optionally `repo:*`) to find prior work that touches the code in question

## Search Heuristics

- Start with the user's domain terms, feature name, error text, file name, or ticket ID

## Failure Modes

- If search says authentication is required, tell the user to run `entire login`
- If code search says it is not yet available, tell the user to update the Entire CLI to the latest version
- If code search says it is not available or access is denied, it is limited to admins and insiders — use the Code Search Fallback above rather than retrying
- 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

Mskills/search/SKILL.md+9/-1