From d84f9e6272fc9061c28c141fd7dcfa2fcc302318 Mon Sep 17 00:00:00 2001 From: Joachim Meyer Date: Fri, 10 Jul 2026 16:23:14 -0600 Subject: [PATCH 1/3] Create root level AGENTS.md --- AGENTS.md | 38 ++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 39 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..c20d775 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,38 @@ +# AGENTS.md + +Guide for LLM coding agents working with the snowexsql repository. + +## When using the package + +DO NOT explore the codebase at first. +Use the preferred pattern from the [README.md](README.md). +Only use reverse engineering based on the code as a last resort. + +## When writing new code + +### Core Technologies + +Do not add new dependencies without approval from the team. +Prefer existing core technologies used in this project: + +- **SQLAlchemy** + **GeoAlchemy2** - ORM with PostGIS spatial query support +- **PostgreSQL/PostGIS** - Database with spatial extensions. Hosted on Amazon. +- **AWS Lambda** - Serverless public access point. Documented in the [deployment](deployment/README.md) folder. + +### API - Design + +The central logic for API lives in [api.py](snowexsql/api.py) +All measurement types must inherit from `BaseDataset`. + +### Database Schema + +Further explained in classes under [snowexsql/tables](snowexsql/tables) + +## Testing + +Need to pass with every code change. +Command: + +``` +pytest tests/ +``` diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md From 22c4bd356fef507acf55d49ea50c57512f56623e Mon Sep 17 00:00:00 2001 From: Joachim Meyer Date: Mon, 24 Aug 2026 16:19:28 -0600 Subject: [PATCH 2/3] Gitignore - Add more IDEs --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index df92e95..54d6f64 100644 --- a/.gitignore +++ b/.gitignore @@ -24,9 +24,13 @@ docs/_build/* coverage.xml htmlcov/* +# IDEs and editors .idea/ .vscode/ -scripts/download/data/* +.zed/ +# ZED spellchecker +codebook.toml + *.egg-info # Version From 936457f405be4b6cd06d9543773b8a4f6e2a9cff Mon Sep 17 00:00:00 2001 From: Joachim Meyer Date: Mon, 24 Aug 2026 16:20:50 -0600 Subject: [PATCH 3/3] Add agent skills - Start with a db query example --- .agents/skills | 1 + .claude/skills | 1 + AGENTS.md | 4 ++++ skills/db-query/SKILL.md | 30 ++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 120000 .agents/skills create mode 120000 .claude/skills create mode 100644 skills/db-query/SKILL.md diff --git a/.agents/skills b/.agents/skills new file mode 120000 index 0000000..42c5394 --- /dev/null +++ b/.agents/skills @@ -0,0 +1 @@ +../skills \ No newline at end of file diff --git a/.claude/skills b/.claude/skills new file mode 120000 index 0000000..42c5394 --- /dev/null +++ b/.claude/skills @@ -0,0 +1 @@ +../skills \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index c20d775..03c2a94 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,3 +36,7 @@ Command: ``` pytest tests/ ``` + +# Skills +Project specific skills are defined in [skills](skills/) + diff --git a/skills/db-query/SKILL.md b/skills/db-query/SKILL.md new file mode 100644 index 0000000..e4aa157 --- /dev/null +++ b/skills/db-query/SKILL.md @@ -0,0 +1,30 @@ +--- +name: db-query +description: Guide to answering SnowEx database query questions +whenToUse: When the user asks how to query, access, or filter data from the SnowEx database +--- + +# SnowEx Query Skill + +## No setup required + +Use the preferred Lambda client. It works with zero configuration. No env vars, credentials, or AWS account. +Do not tell users to set `SNOWEX_LAMBDA_URL` or any other variable. + +## Filtering + +Check `ALLOWED_QRY_KWARGS` of the `BaseDataset` class in `snowexsql/api.py` to get supported filtering criteria. +Use `all_*` properties of query classes to inspect possible values to filter on. +Allowed filter kwargs, available campaigns/sites/types change over time. + +## Query result + +All returned timestamps are in UTC. +All returned coordinates are in WGS84 (EPSG:4326) lat/lon. + +### Limits + +The Lambda client returns a maximum of 1000 records per query. +Advise users to use filters to narrow results rather than paginating. +Use a count query to check how many records match a filter before running a full query and +advise the user to narrow the filter if the count is too high.