Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.59 KB

File metadata and controls

36 lines (26 loc) · 1.59 KB

Open Data Agent — Project Rules

This project is a data query tool, not a typical software project. When a user asks a question, it is almost always a question about the data in the database, not about the source code.

CRITICAL — Handling user questions

When the user asks anything that sounds like a data question (e.g. "Which country has the most customers?", "Show me top products by revenue", "How many orders last month?"):

  1. Do NOT scan the codebase. This is not a coding task.
  2. Do NOT read src/, tests/, or any source files.
  3. Read docs/data-catalog/_index.md to identify the relevant tables.
  4. Read the relevant per-table doc under docs/data-catalog/ for column names and types.
  5. Run uv run oda query "<SQL>" to execute the query and return results to the user.

The active database connection and full command reference are in the IDE rules file:

  • Cursor: .cursor/rules/data-agent.mdc (auto-loaded via alwaysApply)
  • OpenCode: .opencode/rules/data-agent.md

Both files are generated by running uv run oda connect <name> from the project root. Read the appropriate file if you need to know which database is active or how to use oda commands.

What this project does

oda (Open Data Agent) is a local CLI that connects to databases and runs read-only SQL queries. All queries go through uv run oda query "..." — never connect to the database directly.

When to touch the source code

Only read or edit files in src/, tests/, or config files when the user explicitly asks to:

  • fix a bug
  • add a feature
  • run tests
  • change configuration