-
Notifications
You must be signed in to change notification settings - Fork 183
docs: add CLAUDE.md and settings.json for AI agent context #1440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # CLAUDE.md | ||
|
|
||
| Wren Engine (OSS) — open-source semantic SQL engine for MCP clients and AI agents. Translates queries through MDL (Modeling Definition Language) against 22+ data sources, powered by Apache DataFusion (Canner fork). | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| - **wren-core/** — Rust semantic engine: MDL analysis, query planning, DataFusion integration | ||
| - **wren-core-base/** — Shared Rust crate: manifest types (`Model`, `Column`, `Metric`, `Relationship`, `View`) | ||
| - **wren-core-py/** — PyO3 Python bindings for wren-core, built with Maturin | ||
| - **ibis-server/** — FastAPI REST server: query execution, validation, 22 connector backends | ||
| - **mcp-server/** — MCP server exposing Wren Engine to AI agents | ||
| - **skills/** — User-facing MCP skills (wren-sql, wren-quickstart, etc.) | ||
|
|
||
| Supporting: `wren-core-legacy/` (Java fallback for v2), `mock-web-server/`, `benchmark/`, `example/` | ||
|
|
||
| ## Build Quick Reference | ||
|
|
||
| | Module | Install | Test | Format / Lint | | ||
| |--------|---------|------|---------------| | ||
| | wren-core | — | `cargo test --lib --tests --bins` | `cargo fmt --all` / `cargo clippy` | | ||
| | wren-core-py | `just install` | `just test` | `just format` | | ||
| | ibis-server | `just install` | `just test <MARKER>` | `just format` / `just lint` | | ||
| | mcp-server | `uv sync` | — | — | | ||
|
|
||
| > Detailed commands, env vars, and test markers → see each module's README | ||
|
|
||
| ## Architecture: Query Flow | ||
|
|
||
| ``` | ||
| SQL Query → ibis-server (FastAPI v3 router) | ||
| → MDL Processing (manifest cache, validation) | ||
| → wren-core-py (PyO3 FFI) | ||
| → wren-core (Rust: MDL analysis → logical plan → optimization) | ||
| → DataFusion (query planning) | ||
| → Connector (Ibis/sqlglot → dialect SQL) | ||
| → Native execution (Postgres, BigQuery, etc.) | ||
| ``` | ||
|
|
||
| Fallback: if wren-core (v3) fails, ibis-server retries via wren-core-legacy (Java, v2). | ||
|
|
||
| Key files: `ibis-server/app/routers/v3/connector.py`, `wren-core/core/src/logical_plan/analyze/` | ||
|
|
||
| ## Conventions | ||
|
|
||
| - **Commits**: Conventional commits — `feat:`, `fix:`, `chore:`, `refactor:`, `test:`, `docs:`, `perf:`, `deps:` | ||
| - **Releases**: Automated via release-please | ||
| - **Rust**: `cargo fmt`, `clippy -D warnings`, `taplo fmt` for TOML | ||
| - **Python**: `ruff` (line-length 88, Python 3.11 target), Poetry for deps | ||
| - **Snapshot tests**: wren-core uses `insta` | ||
| - **CI**: Rust CI on `wren-core/**`; ibis CI on all PRs; core-py CI on `wren-core-py/**` or `wren-core/**` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(cd wren-core && cargo fmt:*)", | ||
| "Bash(cd wren-core && cargo check:*)", | ||
| "Bash(cd wren-core && cargo clippy:*)", | ||
| "Bash(cd wren-core && RUST_MIN_STACK=8388608 cargo test:*)", | ||
| "Bash(cd wren-core-py && just:*)", | ||
| "Bash(cd ibis-server && just:*)", | ||
| "Bash(cd ibis-server && poetry run ruff:*)", | ||
| "Bash(taplo fmt:*)", | ||
| "Bash(taplo format:*)", | ||
| "Bash(git status:*)", | ||
| "Bash(git diff:*)", | ||
| "Bash(git log:*)", | ||
| "Bash(git branch:*)", | ||
| "Bash(gh pr:*)", | ||
| "Bash(gh run:*)", | ||
| "Bash(gh api:*)", | ||
| "Bash(ls:*)", | ||
| "Bash(wc:*)" | ||
| ] | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify language for the fenced code block.
The architecture diagram code block should specify a language identifier for proper rendering and syntax highlighting. Consider using
textormermaiddepending on the intended format.📝 Proposed fix to add language specification
Based on learnings: As per coding guidelines, markdownlint requires fenced code blocks to have a language specified.
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 29-29: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents