agentleFS
mtarcuremtarcure/claude-vibe-squad/.agents/skills/dual-level-retrieval/SKILL.md

dual-level-retrieval

Skill220 starsChanged 20 days agoMITView on GitHub

Use when search results are too coarse to support a claim—sweep broadly to identify every candidate location, then open the most decisive hits around their definitions and callers before quoting or citing them.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the coarse pass over the entire corpus using cheap, recall-oriented queries: names, symbols, and identifiers rather than concepts.

    line 12
  2. Distinctive:

    Run the fine pass by reading the ranked candidates in full context, wide enough to capture the enclosing definition and its callers.

    line 15
  3. Distinctive:

    Every quoted line comes from a file read in the fine pass.

    line 22

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dual-Level Retrieval

Retrieve twice — once coarsely over the whole corpus to locate candidates, once precisely inside them to read evidence — so breadth never comes at the cost of quoting accurately.

Steps

  1. Run the coarse pass over the entire corpus using cheap, recall-oriented queries: names, symbols, and identifiers rather than concepts. Optimize for missing nothing, and accept false positives.
  2. Record the coarse hit set as a list of locations before reading any of them. This list is the denominator for the fine pass.
  3. Rank the hit set by expected decisiveness, not by match count — the file that defines a behavior outranks the ten that mention it.
  4. Run the fine pass by reading the ranked candidates in full context, wide enough to capture the enclosing definition and its callers.
  5. Quote from the fine pass only. Any claim traced to a coarse-pass snippet is unverified, because a grep line is not a reading of the code.
  6. Feed fine-pass discoveries back into a new coarse query when they reveal vocabulary you did not know to search for, and iterate until a coarse pass adds no new decisive locations.
  7. Report both levels: how many locations the coarse pass found, how many the fine pass read, and what was deliberately left unread.

Acceptance

  • Coarse queries and their exact hit counts are recorded.
  • Every quoted line comes from a file read in the fine pass.
  • Candidate ranking is justified by decisiveness rather than frequency.
  • At least one feedback iteration is attempted, or its absence is justified.
  • The gap between locations found and locations read is stated explicitly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.