docs(wren): cube skills and user-facing docs for phase G#2280
Conversation
Wires cube knowledge into the wren-usage skill and user-facing docs. Final phase of the cube rollout (impl-cube-skills.md). Skill: * skills/wren-usage/SKILL.md — new Cube Query Workflow section, Aggregation decision tree, extra command-decision-tree line; version bumped 2.2 → 2.3 * skills/wren-usage/references/wren-sql.md — new "Cube query SQL generation" section (generated SQL pattern + key points + how to diagnose cube SQL errors with --sql-only) * skills/wren-usage/references/memory.md — new "Cube schema items" subsection inside Schema context * skills/wren-generate-mdl/SKILL.md — context init directory tree now lists cubes/; a one-line "When to define cubes" hint links to the Cube guide Docs: * README.md — "Why WrenAI?" gains a pre-aggregation cubes callout * core/wren/README.md — Quick start gains step 4a (cubes) * docs/core/reference/cli.md — new "wren cube" command section with flag table, supported granularities, and operators * docs/core/get_started/quickstart.md — new optional step 8 demoing cube query * docs/core/guides/modeling/overview.md — Cube added as a core modeling object between View and Memory; rule-of-thumb list updated * docs/core/guides/modeling/cube.md — new guide parallel to model.md / view.md / relation.md (YAML structure, fields, time granularity, derived measures, filter operators, CLI, WASM, validation) Verified (no edit needed): * core/wren-core-wasm/AGENT_GUIDE.md — PR #2278's Cube Query API section is already present Trail: PR #1574 (cube types), PR #2264 (validate_cubes), PR #2265 (cube_query_to_sql), PR #2276 (cleanup), PR #2277 (PyO3 + CLI), PR #2278 (WASM + AGENT_GUIDE), now this PR (skills + docs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR adds comprehensive documentation for WrenAI's pre-aggregation Cube feature across guides, CLI references, and skill workflows. A new cube modeling guide defines the feature; user documentation shows how to discover and query cubes; skill updates teach the agent cube query workflows; and project scaffolding includes cubes in generated structure. ChangesCube Feature Documentation & Skills
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Match the SKILL.md version bump that landed in the previous commit so the parity check passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@core/wren/README.md`:
- Around line 119-120: The README link uses the wrong anchor "#cube-commands";
update the anchor in core/wren/README.md to match the actual target anchor in
docs/core/reference/cli.md by replacing "#cube-commands" with
"#wren-cube--pre-aggregation-queries" (or, if the docs anchor has been renamed,
adjust to the current anchor name), ensuring the link to the CLI reference
correctly navigates to the "wren cube / pre-aggregation queries" section.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 88745feb-09f8-48e2-b671-99ea60271358
📒 Files selected for processing (12)
README.mdcore/wren/README.mddocs/core/get_started/quickstart.mddocs/core/guides/modeling/cube.mddocs/core/guides/modeling/overview.mddocs/core/reference/cli.mdskills/index.jsonskills/versions.jsonskills/wren-generate-mdl/SKILL.mdskills/wren-usage/SKILL.mdskills/wren-usage/references/memory.mdskills/wren-usage/references/wren-sql.md
The heading is `## \`wren cube\` — Pre-aggregation Queries`, so GitHub emits anchor `#wren-cube--pre-aggregation-queries`, not the placeholder `#cube-commands` the link previously used. quickstart.md and cube.md were already correct. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase G: cube skills + docs updates
Wires cube knowledge into the wren-usage skill and user-facing docs. Final phase of the cube rollout (impl-cube-skills.md).
Skill
skills/wren-usage/SKILL.md— new## Cube Query Workflow+## Aggregation decision treesections, extra command-decision-tree line; version 2.2 → 2.3skills/wren-usage/references/wren-sql.md— new "Cube query SQL generation" section (generated SQL pattern, key points, how to diagnose cube SQL errors with--sql-only)skills/wren-usage/references/memory.md— new "Cube schema items" subsection in Schema contextskills/wren-generate-mdl/SKILL.md—context initdirectory tree now listscubes/; a one-line "When to define cubes" hint links to the Cube guideDocs
README.md— "Why WrenAI?" gains a pre-aggregation cubes calloutcore/wren/README.md— Quick start gains step 4a (cubes)docs/core/reference/cli.md— new## wren cubesection with flag table, supported granularities, and operatorsdocs/core/get_started/quickstart.md— new optional step 8 demoing cube querydocs/core/guides/modeling/overview.md— Cube added as a core modeling object between View and Memory; rule-of-thumb list updateddocs/core/guides/modeling/cube.md— new guide parallel tomodel.md/view.md/relation.md(YAML structure, fields, time granularity, derived measures, filter operators, CLI, WASM, validation)Verify-only
core/wren-core-wasm/AGENT_GUIDE.md— PR feat(wren-core-wasm): cubeQuery + listCubes browser API #2278's Cube Query API section is already present (grepconfirms "Cube Query API",listCubes(),cubeQuery({...}),loadMDL()precondition, CDN URL@0.3.0).Not in this PR (file as follow-ups)
core/wren-mdl/mdl.schema.jsonstill uses oldmetricsnaming from pre-PR chore(wren-ui): enhance model substitution error message #1574. Renaming the public JSON schema is a breaking change and needs its own PR with alias decision + version bump.Verification
skills/wren-usage/SKILL.mdfrontmatter showsversion: "2.3"✓wren cube --help,wren cube list --help,wren cube query --help— every flag documented incli.mdandcube.mdmatches the actual CLI surface ✓./examplesplaceholder in root README is unrelated)cube.md, committedTrail: PR #1574 (cube types) → PR #2264 (validate_cubes) → PR #2265 (cube_query_to_sql) → PR #2276 (cleanup) → PR #2277 (PyO3 + CLI) → PR #2278 (WASM + AGENT_GUIDE) → this PR (skills + docs).
After this merges,
feat/wasm-cubeis ready to merge intomainand release-please will publishwren,wren-core-py, and@wrenai/wren-core-wasmnew versions with full cube support.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores