agentleFS
opendatadiscoveryopendatadiscovery/odd-team/.claude/skills/retrieve/SKILL.md

retrieve

Skill0 starsChanged 2 months agoApache-2.0View on GitHub

Run the graph-retriever subagent — intelligent, iterative retrieval over the derived graph query layer. The maintainer asks a free-form information-need question ("where is X", "what depends on Y", "which findings concern Z"); the agent constructs a strong query, runs a bounded retrieve→read→judge→refine loop (≤10 iterations) with adaptive traversal, and returns a cited answer set. Emits substrate-refinement suggestions to lineage/{repo}/retrieval-feedback/ without ever mutating the graph. Supersedes the grep-based registry-search. Per adrs/drafts/agentic-graph-retriever.md.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the maintainer passed it as the first argument, use it verbatim.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

/retrieve — intelligent iterative retrieval over the ontology graph

The query-time companion to the derived graph query layer. Where query (the CLI) does one static hybrid pass, /retrieve spawns the graph-retriever subagent — which iterates: it searches, reads the full content of what came back, reasons about the gap, reformulates the query to discriminate, traverses neighbours at a self-chosen depth, and converges on a cited answer. It exists because the static query() has a measured recall ceiling (it fails the maiden gold-set gate); an agentic loop does not commit to one formulation.

It is also a substrate-quality probe: when a retrieval surfaces a stale / thin / mis-described node, the agent records a structured refinement suggestion in lineage/{repo}/retrieval-feedback/ for a future /enrich or reducer batch to apply. It never mutates the graph — read-only, suggest-only.

Argument forms

FormBehaviour
/retrieve "<question>" [--repo <repo>]Default. Spawn graph-retriever on the question. Repo defaults to odd-platform.
/retrieve (no args)Ask the maintainer for the question via AskUserQuestion, then proceed.

Prerequisites

  • The graph query layer is installed: lineage/_extractor/.venv/ exists with the embeddings extra (uv sync --extra embeddings in lineage/_extractor). If not, the retriever still runs graph-only (keyword-seeded) — degraded but functional.
  • The substrate exists: lineage/{repo}/nodes.jsonl + understanding/ sidecars + the reducer detail/ dirs. The agent's first tool call builds the ephemeral graph (~8 s, one-time per substrate change; a build cache makes later calls sub-second).

Protocol

1. Capture the question

If the maintainer passed it as the first argument, use it verbatim. If not, AskUserQuestion:

"What do you want to retrieve? Free-form — the agent searches, reads, refines, and returns a cited answer set. Examples: 'every endpoint the alert API exposes', 'what reads the notifications config', 'which findings concern the lineage depth parameter'."

2. Resolve the repo

--repo flag, else default odd-platform.

3. Spawn the graph-retriever subagent

Spawn graph-retriever (.claude/agents/graph-retriever.md) with a prompt that gives it:

  • the maintainer's question, verbatim;
  • the repo;
  • the reminder that it has ≤10 iterations, must cite every answer node source_file:source_line, must stay read-only on the graph, and must write any substrate-refinement suggestions to lineage/{repo}/retrieval-feedback/{date}-{slug}.md.

The agent owns the loop — query construction, iteration, adaptive traversal depth, convergence, and the suggestion side-channel. Do not micro-manage it.

4. Relay

Relay the agent's answer to the maintainer: the cited answer node set, the confidence, and the iteration trace. If the agent wrote a retrieval-feedback/ file, surface its path — those suggestions are input for the next enrichment batch.

Notes

  • /retrieve supersedes the registry-search subagent for query/dedup needs. A reducer doing cross-batch dedup can spawn graph-retriever with a dedup-nearest-shaped question instead of grep-over-sharded-indexes.
  • The retrieval result is advisory. The maintainer applies judgment — the agent finds and cites; it does not decide.
  • Case-law / design: adrs/drafts/agentic-graph-retriever.md; tool layer: adrs/drafts/graph-query-layer.md.

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.