{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "xerj-org-xerj--reference-coding-from-open-source",
 "repo": "xerj-org/xerj",
 "repo_url": "https://github.com/xerj-org/xerj",
 "repo_slug": "xerj-org-xerj",
 "title": "Have an agent learn from similar open-source code first",
 "page_title": "How to have an agent learn from similar open-source code first with Xerj",
 "summary": "Index OSS projects close to your task so the agent reuses how others solved it before writing code.",
 "who": "A team building on a private, internal or newer library where the coding model has little or no memory of the API.",
 "problem": "An agent working from memory retry-loops on APIs it has not memorised, and grep only points to where to look.",
 "outcome": "The agent retrieves the mechanism from indexed source and writes code with fewer output tokens and fewer fix loops, as the README's measured case study reports.",
 "steps": [
  "Clone the open-source repos closest to your task into one folder with git clone. (inferred, check the README)",
  "`xerj --insecure --data-dir ~/xerj-data &`",
  "`xerj autoindex ./oss-references` (inferred, check the README)",
  "`xerj search \"how is the session token refreshed\"` (inferred, check the README)",
  "Write your code only after citing the retrieved passages, and check each source license."
 ],
 "agent_prompt": "Clone the open-source repos closest to <task> into ./oss-references, index them with xerj autoindex ./oss-references, and retrieve how they solve <task> before writing code. Expected output: the new code plus a list of the file:line passages it used. Verify that the license of each referenced repo is noted.",
 "agents": [
  "claude-code",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README says the gain is gated by memorisation and is neutral to harmful on popular public libraries the model already knows.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "A Linux, macOS or Windows machine on x86-64 or arm64",
  "A local folder of code, docs, logs or PDFs to index",
  "Claude Code or Cursor if you want the MCP and skill setup from xerj init",
  "A terminal with curl and a shell"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/xerj-org-xerj/reference-coding-from-open-source/",
 "md": "https://dedupedai.com/use-cases/xerj-org-xerj/reference-coding-from-open-source/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/xerj-org-xerj--reference-coding-from-open-source.json",
 "api_version": "v1"
}
