{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "colinhacks-reylo--let-coding-agents-edit-sql-without-stale-types",
 "repo": "colinhacks/reylo",
 "repo_url": "https://github.com/colinhacks/reylo",
 "repo_slug": "colinhacks-reylo",
 "title": "Let coding agents edit SQL without leaving stale types",
 "page_title": "How to let coding agents edit SQL without leaving stale types with Reylo",
 "summary": "Keep each query in one .sql file so an agent cannot leave an old type behind, and let tsc find every caller.",
 "who": "A developer whose agent changes a query but forgets to update the matching TypeScript type.",
 "problem": "When types live apart from queries, agents fix one and leave the other stale.",
 "outcome": "Agent edits that are checked end to end: change the SQL, and the type check flags every caller it missed.",
 "steps": [
  "Set up Reylo as in its README so queries live in .sql files and types come from the SQL itself",
  "Point your agent at the docs as Markdown at Reylo.dev/llms.txt",
  "Ask the agent to change a query and then run the typecheck script",
  "Have it fix every caller the type check reports before it calls the task done"
 ],
 "agent_prompt": "Read reylo.dev/llms.txt, then in <project> change <query>.sql to <change>. Run the typecheck with --runExternalCode and fix every caller it reports. Do not hand-write any row types.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "The agent still needs access to the dev database for the type check to mean anything.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "TypeScript 7.1 (currently in beta), the first release with content mappers",
  "Node 24 or later",
  "A running dev database: Postgres, MySQL 8.0.22 or later, or a SQLite file",
  "A supported driver such as pg, postgres.js, mysql2, better-sqlite3, Bun.sql or Cloudflare D1"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/colinhacks-reylo/let-coding-agents-edit-sql-without-stale-types/",
 "md": "https://dedupedai.com/use-cases/colinhacks-reylo/let-coding-agents-edit-sql-without-stale-types/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/colinhacks-reylo--let-coding-agents-edit-sql-without-stale-types.json",
 "api_version": "v1"
}
