Skip to content

chore(main): refactor docs/core for Wren AI Core rebrand#2241

Merged
goldmedal merged 4 commits into
mainfrom
feat/adjust-document-structure
May 5, 2026
Merged

chore(main): refactor docs/core for Wren AI Core rebrand#2241
goldmedal merged 4 commits into
mainfrom
feat/adjust-document-structure

Conversation

@PaulChen79
Copy link
Copy Markdown
Contributor

@PaulChen79 PaulChen79 commented May 5, 2026

Summary

Restructure docs/core to align with the rebrand from Wren Engine (a sub-section of GenBI) to Wren AI Core (the top-level open context layer for AI agents). The rebrand makes Core the primary OSS narrative and reduces GenBI to a downstream reference application.

This PR is the source-of-truth side of the migration. The downstream docs site (docs.getwren.ai) is being updated in parallel; once this PR merges to main, the sync workflow will create a docs site PR mirroring these changes.

What changed

Source content (docs/core/)

  • Rename concept/concepts/, guide/guides/
    Plural names match the new docs site top-level URL space (/oss/concepts/..., /oss/guides/...) and provide structural separation from GenBI legacy folders that use singular names (concept/, guide/) under docs/oss/genbi/ on the docs site.
  • New introduction.mdx — the Wren AI Core overview entry page (architecture diagram, problem framing, key ideas, use cases).
  • New sdks/ — overview + LangChain placeholder; wired up as a first-class sidebar section on the docs site.
  • Extend reference/skills.md with wren-onboarding and wren-dlt-connector sections (full coverage of all 4 skills).
  • Add agent-first onboarding section to get_started/installation.md:
    npx skills add Canner/WrenAI --skill '*'
    Then ask the agent to use the wren-onboarding skill to drive setup.
  • Copy updates throughout: "context engine" → "context layer".
  • Rewrite README.md for Wren AI Core naming and the new structure.

Sync workflow (.github/workflows/sync-docs.yml)

  • Target moves from docs/oss/enginedocs/oss. Core is now the top-level of the OSS docs site, no longer a sub-section.
  • Mode switches from destructive (rm -rf + cp -r) → additive overlay (cp -r only).
    Stale files from source-side renames/deletions must be cleaned up manually by maintainers in the docs site repo (see Manual Cleanup below).
  • Watch paths and sync allowlist updated for plural folder names, introduction.mdx, and sdks/.
  • PR / branch naming updated from engine-docscore-docs.

Sync declaration (docs/core/.sync.yml)

  • target_dir: docs/oss
  • New sync_files entry for top-level introduction.mdx.
  • Plural sync_dirs: get_started, concepts, guides, reference, sdks.
  • Document additive sync mode and GenBI legacy isolation rules.

Test plan

  • Local dry-run of the sync action against a fresh clone of docs.getwren.ai (master).
    • GenBI legacy paths (docs/oss/{overview,installation,getting_started,concept,guide,ai_service}) untouched in git diff.
    • docs/cp untouched in git diff.
    • All 156 legacy + cp file mtimes unchanged before and after sync.
    • Synced Core output matches source byte-for-byte (get_started/, concepts/, guides/, reference/, sdks/, introduction.mdx).
    • 6 entries created (5 dirs + 1 file), 0 modified — sync is purely additive.
  • After merge, verify the auto-generated docs site PR contains only Core paths and matches source.
  • After merge, verify npm run build passes on the docs site PR.

Manual cleanup needed on docs site after this PR merges

Because the sync is now additive (no automatic deletion), once the auto-generated docs site PR is merged, a maintainer should follow up with a cleanup PR on docs.getwren.ai to remove the stale paths that the old (destructive) sync used to manage:

  • docs/oss/engine/get_started/
  • docs/oss/engine/concept/
  • docs/oss/engine/guide/
  • docs/oss/engine/reference/

docs/oss/engine/archived/ is kept on the docs site under oss/genbi/archived/ with slug: frontmatter that preserves the old /oss/engine/archived/... URLs for backward compatibility.

Related

  • Downstream docs site refactor PR: (to be opened on docs.getwren.ai)
  • Migration plan: see temp-docs/poc-to-source-migration-plan.md on the docs site refactor branch.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a new Introduction and Overview for Wren AI Core; refreshed branding and terminology.
    • Restructured navigation (pluralized sections: Concepts, Guides) and corrected cross-links.
    • Reworded several pages to describe Wren as an “open context layer.”
    • Added quick-install instructions for skills (LLM-agent workflow) and expanded skills reference with wren-onboarding and wren-dlt-connector.

@github-actions github-actions Bot added documentation Improvements or additions to documentation ci labels May 5, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e245ae69-83c4-4c11-90d4-88d25e1d995e

📥 Commits

Reviewing files that changed from the base of the PR and between 95821a7 and 8a53177.

📒 Files selected for processing (1)
  • scripts/sync-docs.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/sync-docs.sh

Walkthrough

This PR retargets and rebrands core docs to “Wren AI Core,” adds docs/core/introduction.mdx, pluralizes concept/guide folders, fixes internal links, updates installation/skills docs, and changes the docs sync from a destructive replace to an additive overlay (workflow and sync script updated to use Canner/WrenAI and new branch/PR naming).

Changes

Docs & Sync Rebrand / Additive Overlay

Layer / File(s) Summary
Workflow triggers & labels
.github/workflows/sync-docs.yml
Push path filters now include docs/core/introduction.mdx and use docs/core/concepts/**, docs/core/guides/**; checkout step label changed to “Checkout WrenAI”.
Sync configuration
docs/core/.sync.yml
Target path changed from docs/oss/enginedocs/oss; sync_mode changed to additive; added sync_files: introduction.mdx; sync_dirs updated to get_started, concepts, guides, reference; exclusions/docs comments updated.
Sync implementation
scripts/sync-docs.sh
Defaults SOURCE_REPO=Canner/WrenAI; derives TARGET_REPO/TARGET_BRANCH from repo vars; sets TARGET_DIR="docs/oss", SYNC_FILES=(introduction.mdx), SYNC_DIRS=(get_started concepts guides reference); overlays files/dirs via cp -r .../. without rm -rf; updates branch names/commit messages and gh pr create title/body to reference WrenAI Core and SOURCE_REPO.
Top-level docs & navigation
docs/core/README.md, docs/core/introduction.mdx
README retargeted to “Wren AI Core”, navigation updated (Overview, pluralized paths), added Sync configuration section; new introduction.mdx added describing product, capabilities, typical workflow, and nav links.
Content edits & link fixes
docs/core/concepts/*, docs/core/get_started/*
Terminology changed (“open context engine” → “open context layer”); internal links updated from ../guide/../guides/ and ../concept/../concepts/; minor spacing/reorder edits.
Installation & skills docs
docs/core/get_started/installation.md, docs/core/reference/skills.md
Added “Quick install with an LLM agent” section; changed install/update commands to use Canner/WrenAI; skills.md expanded with wren-onboarding and wren-dlt-connector docs and updated skill structure entries.
CI/workflow PR text
.github/workflows/sync-docs.yml, scripts/sync-docs.sh
Branch prefix changed to sync/core-docs-...; PR title/body and commit messages updated to reference “Wren AI Core”/WrenAI and include SOURCE_REPO commit URL.

Sequence Diagram

sequenceDiagram
    participant GH_Action as GitHub Action
    participant Sync_Script as sync-docs.sh
    participant Source as Canner/WrenAI (repo)
    participant Target as Documentation Repo
    GH_Action->>Sync_Script: run script with SOURCE_REPO env
    Sync_Script->>Source: fetch files (introduction.mdx, dirs)
    Sync_Script->>Target: ensure TARGET_DIR exists (docs/oss)
    Sync_Script->>Target: copy files/directories (additive overlay)
    Sync_Script->>Target: commit changes, push branch (sync/core-docs-<sha>)
    Sync_Script->>GH_Action: create PR via gh CLI with updated title/body
    GH_Action->>Target: PR created for reviewer inspection
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Canner/WrenAI#2234: Reframes Wren from “engine” to “open context layer” in documentation; closely related wording/branding changes.

Suggested labels

core

Suggested reviewers

  • chilijung

Poem

🐰 With twitching whiskers I hop to the chore,

Engine becomes Core and the docs bloom once more.
Concepts pluralized, introductions unfurled,
Overlay syncs gently—no deletions in world.
Hooray for the docs, may they guide every explorer!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: refactoring docs/core for the Wren AI Core rebrand, which is the central objective across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/adjust-document-structure

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@PaulChen79 PaulChen79 changed the title docs: refactor docs/core for Wren AI Core rebrand chore(main): refactor docs/core for Wren AI Core rebrand May 5, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/core/reference/skills.md (1)

3-3: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Update skills.md to use Canner/WrenAI and "Wren AI Core" throughout.

The skills documentation is still using the old repository and product name. This creates a divergence with the new onboarding path in installation.md (lines 9–12), which correctly directs users to Canner/WrenAI. Users following either path encounter inconsistent guidance for the same skills.

Verify and update:

  • Line 3: "Wren Engine" → "Wren AI Core"
  • Lines 18, 21, 32, 35: Canner/wren-engineCanner/WrenAI
  • Line 224: "wren engine" → "Wren AI Core"
Suggested fixes
-Wren Engine provides **skills** — reusable AI agent workflow guides that teach Claude Code (or other AI coding agents) how to use the Wren CLI effectively. Skills are not plugins or extensions; they are structured prompts with decision trees that guide an agent through multi-step tasks.
+Wren AI Core provides **skills** — reusable AI agent workflow guides that teach Claude Code (or other AI coding agents) how to use the Wren CLI effectively. Skills are not plugins or extensions; they are structured prompts with decision trees that guide an agent through multi-step tasks.
 # All skills at once
-npx skills add Canner/wren-engine --skill '*' --agent claude-code
+npx skills add Canner/WrenAI --skill '*' --agent claude-code

 # Or via install script
-curl -fsSL https://raw.githubusercontent.com/Canner/wren-engine/main/skills/install.sh | bash
+curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash
 # All skills
-curl -fsSL https://raw.githubusercontent.com/Canner/wren-engine/main/skills/install.sh | bash -s -- --force
+curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash -s -- --force

 # Single skill
-curl -fsSL https://raw.githubusercontent.com/Canner/wren-engine/main/skills/install.sh | bash -s -- --force wren-generate-mdl
+curl -fsSL https://raw.githubusercontent.com/Canner/WrenAI/main/skills/install.sh | bash -s -- --force wren-generate-mdl
-1. **DuckDB catalog naming** — when wren engine `ATTACH`es a `.duckdb` file, it uses the filename stem as the catalog alias.
+1. **DuckDB catalog naming** — when Wren AI Core `ATTACH`es a `.duckdb` file, it uses the filename stem as the catalog alias.

Also applies to: 18-18, 21-21, 32-32, 35-35, 224-224

🤖 Prompt for 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.

In `@docs/core/reference/skills.md` at line 3, Update the terminology and
repository name in the skills doc: replace the phrase "Wren Engine" with "Wren
AI Core" (occurrence at the top and any sentence-cased variants), replace all
instances of the repo string "Canner/wren-engine" with "Canner/WrenAI" (lines
referenced in the review), and replace the lowercase "wren engine" with "Wren AI
Core" where used; ensure casing and spacing match existing sentences and update
all listed occurrences (line 3, lines ~18/21/32/35, and line ~224) so the
document consistently uses Canner/WrenAI and Wren AI Core.
🧹 Nitpick comments (1)
.github/workflows/sync-docs.yml (1)

34-50: 💤 Low value

Defensive: mkdir -p the target before copying introduction.mdx.

The top-level cp runs before any directory is created, so the step relies on _docs-site/docs/oss already existing in the target repo. The per-dir loop already uses mkdir -p for each subfolder; mirroring that for the target root makes this resilient if docs/oss is ever absent (e.g., a fresh docs repo, a renamed root, or a future restructure).

♻️ Proposed change
           TARGET="_docs-site/docs/oss"
+          mkdir -p "${TARGET}"

           # Sync top-level files
           cp "docs/core/introduction.mdx" "${TARGET}/introduction.mdx"
🤖 Prompt for 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.

In @.github/workflows/sync-docs.yml around lines 34 - 50, The step that copies
introduction.mdx relies on the TARGET directory existing; add a defensive mkdir
-p for the TARGET root before the cp command (i.e., run mkdir -p "${TARGET}"
immediately before cp "docs/core/introduction.mdx" "${TARGET}/introduction.mdx")
so that the subsequent cp and the for-loop that uses mkdir -p per-subdir both
succeed even if _docs-site/docs/oss doesn't exist yet.
🤖 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 `@docs/core/get_started/installation.md`:
- Around line 9-20: The quick-start section mixes two repository names
(Canner/WrenAI and Canner/wren-engine) causing contradictory install guidance;
update the commands and prose in the installer snippet and surrounding lines so
they consistently use one repo (preferably Canner/wren-engine to match the rest
of the doc), or explicitly state the fallback order (attempt Canner/WrenAI first
then Canner/wren-engine if it fails). Locate and edit the npx skills add
command, the curl install.sh line, and the migration note text to either replace
all occurrences of Canner/WrenAI with Canner/wren-engine or add a short
conditional sentence clarifying "try X first; if it fails use Y" while keeping
the installer detection/--agent examples unchanged.

In `@docs/core/introduction.mdx`:
- Line 61: Confirm whether "OSI+" in the sentence "MDL (Modeling Definition
Language) — the OSI+ semantic contract that powers governed agent access" is a
typo or a specific term; if it was meant to be "OSS" or another phrase, replace
"OSI+" with the correct term and update the surrounding wording for clarity
(e.g., "open-source semantic contract" or the official product/standard name).
Ensure the change occurs in the MDL descriptive line and, if "OSI+" is a branded
term, add a brief parenthetical or footnote clarifying its meaning so readers
aren’t confused.
- Line 7: Update the image references in docs/core/introduction.mdx to use the
pluralized folder name and current filename prefix: replace occurrences of
"/img/oss/concept/wren-engine-architecture.png" (and the other image at line 20)
with the corrected path "/img/oss/concepts/..." and, if repository uses a new
prefix, rename the filename accordingly (e.g., adjust "wren-engine-..." to the
new prefix) so the src matches existing assets; verify the corrected files
actually exist in the docs-site repo and update both image src strings in
introduction.mdx to the exact filenames found.

In `@docs/core/sdks/overview.md`:
- Line 19: The markdown line referencing the archived MCP quickstart uses a
broken path ('../engine/archived/quickstart_mcp.md') in the "**MCP** — see
archived [MCP quickstart](../engine/archived/quickstart_mcp.md)" entry; update
that link to a valid existing path (or remove the hyperlink) so the link
resolves when rendered—locate the "**MCP**" line and replace the URL portion
'../engine/archived/quickstart_mcp.md' with the correct relative path to the
archived quickstart file or remove the bracketed link if the file no longer
exists.

---

Outside diff comments:
In `@docs/core/reference/skills.md`:
- Line 3: Update the terminology and repository name in the skills doc: replace
the phrase "Wren Engine" with "Wren AI Core" (occurrence at the top and any
sentence-cased variants), replace all instances of the repo string
"Canner/wren-engine" with "Canner/WrenAI" (lines referenced in the review), and
replace the lowercase "wren engine" with "Wren AI Core" where used; ensure
casing and spacing match existing sentences and update all listed occurrences
(line 3, lines ~18/21/32/35, and line ~224) so the document consistently uses
Canner/WrenAI and Wren AI Core.

---

Nitpick comments:
In @.github/workflows/sync-docs.yml:
- Around line 34-50: The step that copies introduction.mdx relies on the TARGET
directory existing; add a defensive mkdir -p for the TARGET root before the cp
command (i.e., run mkdir -p "${TARGET}" immediately before cp
"docs/core/introduction.mdx" "${TARGET}/introduction.mdx") so that the
subsequent cp and the for-loop that uses mkdir -p per-subdir both succeed even
if _docs-site/docs/oss doesn't exist yet.
🪄 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: b4bef99c-292b-4b3b-9655-df9735428c3d

📥 Commits

Reviewing files that changed from the base of the PR and between ddf4a02 and 0107f83.

📒 Files selected for processing (20)
  • .github/workflows/sync-docs.yml
  • docs/core/.sync.yml
  • docs/core/README.md
  • docs/core/concepts/architecture.md
  • docs/core/concepts/benefits_llm.md
  • docs/core/concepts/what_is_context.md
  • docs/core/concepts/what_is_mdl.md
  • docs/core/get_started/connect.md
  • docs/core/get_started/installation.md
  • docs/core/guides/memory.md
  • docs/core/guides/modeling/model.md
  • docs/core/guides/modeling/overview.md
  • docs/core/guides/modeling/relation.md
  • docs/core/guides/modeling/view.md
  • docs/core/guides/modeling/wren_project.md
  • docs/core/guides/profiles.md
  • docs/core/introduction.mdx
  • docs/core/reference/skills.md
  • docs/core/sdks/langchain.md
  • docs/core/sdks/overview.md

Comment thread docs/core/get_started/installation.md
Comment thread docs/core/introduction.mdx
Comment thread docs/core/introduction.mdx Outdated
Comment thread docs/core/sdks/overview.md Outdated
PaulChen79 added a commit that referenced this pull request May 5, 2026
Apply CodeRabbit review feedback for the Wren AI Core docs refactor:

1. installation.md — resolve mixed repo references
   - Remove "during migration period, use Canner/wren-engine" caveat
     (this PR lands in Canner/WrenAI, where skills/ already lives,
     so the migration callout is no longer needed)
   - Update legacy "Install skills" subsection to use Canner/WrenAI
     consistently with the new agent-first onboarding section above

2. reference/skills.md — propagate Wren AI Core branding
   - "Wren Engine provides skills" -> "Wren AI Core provides skills"
   - All four Canner/wren-engine npx + curl commands swapped to
     Canner/WrenAI
   - Technical line in wren-dlt-connector invariants: "wren engine
     ATTACHes a .duckdb file" -> "Wren AI Core ATTACHes a .duckdb file"

3. introduction.mdx — clarify "OSI+" terminology
   - Inline expand the term so first-time readers understand it as
     "Open Semantic Interchange compliance plus agent extensions
     (MCP bindings, confidence, intent grain, governance-as-data)"
     instead of reading it as a typo

4. sdks/overview.md — fix archived MCP quickstart link
   - The archived MCP quickstart no longer exists at the relative
     path on the source repo, but its URL is preserved on the docs
     site via slug frontmatter. Switch from a relative file link
     to the absolute URL /oss/engine/archived/quickstart_mcp so it
     resolves correctly post-sync.

Skipped:
- Image asset paths in introduction.mdx (/img/oss/concept/...).
  CodeRabbit suggested pluralizing to /img/oss/concepts/ but the
  actual files live at /img/oss/concept/ on the docs site (D3:
  short-term don't move images). Changing the path would 404.
- "set up wren engine" trigger phrases in installation.md:122 and
  skills.md:91 — these document legacy user phrasing the
  wren-onboarding skill recognizes, not brand declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@docs/core/reference/skills.md`:
- Line 46: Two unlabeled fenced code blocks (``` ) in
docs/core/reference/skills.md are triggering markdownlint MD040; edit each
unlabeled ``` block and add an explicit language identifier (for example
```text, ```bash, or ```tree) matching the block content so the fenced blocks
are labeled and the linter warning is resolved.
🪄 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: 3d023ce7-0a83-4b97-b092-73e1ef2ca339

📥 Commits

Reviewing files that changed from the base of the PR and between 0107f83 and 2c1a899.

📒 Files selected for processing (4)
  • docs/core/get_started/installation.md
  • docs/core/introduction.mdx
  • docs/core/reference/skills.md
  • docs/core/sdks/overview.md
✅ Files skipped from review due to trivial changes (2)
  • docs/core/sdks/overview.md
  • docs/core/introduction.mdx

Comment thread docs/core/reference/skills.md Outdated
PaulChen79 and others added 2 commits May 5, 2026 14:15
Restructure docs/core to align with the rebrand from "Wren Engine"
(a sub-section of GenBI) to "Wren AI Core" (the top-level open
context layer for AI agents).

Source content changes:
- Rename docs/core/{concept,guide} -> docs/core/{concepts,guides}
  Plural names match the new docs site top-level URL space and
  provide separation from GenBI legacy folders that use singular
  names under docs/oss/genbi/ on the docs site.
- Add introduction.mdx as the Wren AI Core overview entry page
  (architecture diagram, problem framing, key ideas, use cases).
- Add docs/core/sdks/ with overview + LangChain placeholder.
- Extend reference/skills.md with wren-onboarding and
  wren-dlt-connector sections (full coverage of all 4 skills).
- Add agent-first onboarding section to get_started/installation.md
  (npx skills add Canner/WrenAI --skill '*').
- Update internal copy: "context engine" -> "context layer".
- Rewrite README.md for Wren AI Core naming and new structure.

Sync workflow (.github/workflows/sync-docs.yml):
- Target moves from docs/oss/engine to docs/oss. Core is now the
  top-level of the OSS docs site, no longer a sub-section.
- Switch from destructive (rm -rf + cp) to additive overlay (cp
  only). Stale files left by source-side renames/deletions must be
  cleaned up manually by maintainers in the docs site repo.
- Watch paths and sync allowlist updated for plural folder names,
  introduction.mdx, and sdks/.
- PR / branch naming updated from "engine-docs" to "core-docs".

Sync declaration (docs/core/.sync.yml):
- target_dir: docs/oss
- New sync_files entry for top-level introduction.mdx.
- Plural sync_dirs: get_started, concepts, guides, reference, sdks.
- Document additive sync mode and GenBI legacy isolation rules.

Verified with local dry-run: sync action only touches the allowlist
paths (introduction.mdx + 5 dirs), all 156 GenBI legacy + cp file
mtimes remain unchanged, and synced output matches source
byte-for-byte.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apply CodeRabbit review feedback for the Wren AI Core docs refactor:

1. installation.md — resolve mixed repo references
   - Remove "during migration period, use Canner/wren-engine" caveat
     (this PR lands in Canner/WrenAI, where skills/ already lives,
     so the migration callout is no longer needed)
   - Update legacy "Install skills" subsection to use Canner/WrenAI
     consistently with the new agent-first onboarding section above

2. reference/skills.md — propagate Wren AI Core branding
   - "Wren Engine provides skills" -> "Wren AI Core provides skills"
   - All four Canner/wren-engine npx + curl commands swapped to
     Canner/WrenAI
   - Technical line in wren-dlt-connector invariants: "wren engine
     ATTACHes a .duckdb file" -> "Wren AI Core ATTACHes a .duckdb file"

3. introduction.mdx — clarify "OSI+" terminology
   - Inline expand the term so first-time readers understand it as
     "Open Semantic Interchange compliance plus agent extensions
     (MCP bindings, confidence, intent grain, governance-as-data)"
     instead of reading it as a typo

4. sdks/overview.md — fix archived MCP quickstart link
   - The archived MCP quickstart no longer exists at the relative
     path on the source repo, but its URL is preserved on the docs
     site via slug frontmatter. Switch from a relative file link
     to the absolute URL /oss/engine/archived/quickstart_mcp so it
     resolves correctly post-sync.

Skipped:
- Image asset paths in introduction.mdx (/img/oss/concept/...).
  CodeRabbit suggested pluralizing to /img/oss/concepts/ but the
  actual files live at /img/oss/concept/ on the docs site (D3:
  short-term don't move images). Changing the path would 404.
- "set up wren engine" trigger phrases in installation.md:122 and
  skills.md:91 — these document legacy user phrasing the
  wren-onboarding skill recognizes, not brand declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PaulChen79 PaulChen79 force-pushed the feat/adjust-document-structure branch from 5d20e01 to 6bd4c12 Compare May 5, 2026 06:15
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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 @.github/workflows/sync-docs.yml:
- Around line 6-12: The workflow's path filters and the copy loop are missing
the SDK docs, so add the missing pattern docs/core/sdks/** to the paths: array
(alongside docs/core/introduction.mdx, docs/core/get_started/**, etc.) and
update the copy loop step that iterates over doc categories to include the
"sdks" entry so SDK docs are copied/synced like other core docs; look for the
"paths:" array and the copy loop step (the iteration over categories) and add
"docs/core/sdks/**" and "sdks" respectively.
- Around line 33-37: The workflow sets TARGET="_docs-site/docs/oss" and then
copies docs/core/introduction.mdx into "${TARGET}/introduction.mdx" without
ensuring the directory exists; add a preparatory step that creates the directory
(use mkdir -p on "${TARGET}") immediately before the first top-level cp so the
subsequent copies (e.g., cp "docs/core/introduction.mdx"
"${TARGET}/introduction.mdx") cannot fail due to a missing target directory.
- Around line 31-49: The CI workflow and the standalone script diverge: the
workflow uses TARGET variable set to "_docs-site/docs/oss", plural folders
(concepts/guides) and additive cp semantics, while scripts/sync-docs.sh targets
"docs/oss/engine", uses singular folder names (concept/guide) and rm -rf
destructive sync; fix by choosing one authoritative approach and aligning both
artifacts—either update the workflow in sync-docs.yml to use the same target,
folder names and destructive rm -rf strategy as scripts/sync-docs.sh (or update
scripts/sync-docs.sh to match TARGET, plural names and additive copy behavior),
and add a clear comment and/or deprecation note in scripts/sync-docs.sh or the
workflow explaining which is canonical to avoid accidental data loss; ensure the
TARGET variable, the for dir list (get_started concepts guides reference), and
the singular/plural folder name mappings are consistent between the two
implementations.
🪄 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: 4cca37ba-d7c9-444d-a46c-cae29641c604

📥 Commits

Reviewing files that changed from the base of the PR and between 2c1a899 and 6bd4c12.

📒 Files selected for processing (18)
  • .github/workflows/sync-docs.yml
  • docs/core/.sync.yml
  • docs/core/README.md
  • docs/core/concepts/architecture.md
  • docs/core/concepts/benefits_llm.md
  • docs/core/concepts/what_is_context.md
  • docs/core/concepts/what_is_mdl.md
  • docs/core/get_started/connect.md
  • docs/core/get_started/installation.md
  • docs/core/guides/memory.md
  • docs/core/guides/modeling/model.md
  • docs/core/guides/modeling/overview.md
  • docs/core/guides/modeling/relation.md
  • docs/core/guides/modeling/view.md
  • docs/core/guides/modeling/wren_project.md
  • docs/core/guides/profiles.md
  • docs/core/introduction.mdx
  • docs/core/reference/skills.md
✅ Files skipped from review due to trivial changes (5)
  • docs/core/concepts/what_is_mdl.md
  • docs/core/concepts/benefits_llm.md
  • docs/core/concepts/what_is_context.md
  • docs/core/concepts/architecture.md
  • docs/core/.sync.yml
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/core/get_started/installation.md
  • docs/core/get_started/connect.md
  • docs/core/introduction.mdx

Comment thread .github/workflows/sync-docs.yml
Comment thread .github/workflows/sync-docs.yml
Comment thread .github/workflows/sync-docs.yml
Apply remaining CodeRabbit feedback:

1. reference/skills.md — markdownlint MD040 (fenced code language)
   Three ASCII workflow/tree blocks were unlabeled. Tag them as
   `text` so markdownlint stops flagging them and renderers know
   not to apply syntax highlighting. CodeRabbit explicitly called
   out lines 46 and 247; line 110 (wren-usage workflow) had the
   same issue and is fixed for consistency.

2. .github/workflows/sync-docs.yml — defensive mkdir
   Add `mkdir -p "${TARGET}"` before the first cp so the workflow
   does not fail if the target docs/oss directory is missing on a
   freshly cloned site.

3. scripts/sync-docs.sh — align with the workflow
   The local sync helper had drifted from the GitHub Action: it
   targeted docs/oss/engine, used singular folder names (concept,
   guide), did destructive rm -rf + cp, and named branches/PRs
   "engine-docs". Rewrite to match the workflow exactly:
   - target docs/oss (Core is now top-level on the docs site)
   - sync introduction.mdx as a top-level file
   - plural sync_dirs: get_started, concepts, guides, reference
   - additive overlay (mkdir -p + cp -r src/. dst/, no rm -rf)
   - branch sync/core-docs-<sha>, PR title "Wren AI Core docs"
   - fallback owner Canner/WrenAI when gh repo view is unavailable

Skipped (not applicable):
- CodeRabbit comment about sdks/ missing from sync paths is now
  obsolete: SDK section was a POC placeholder and was removed from
  this PR in a later commit (no longer in docs/core/, sidebars, or
  any sync target).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
scripts/sync-docs.sh (2)

46-47: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

TMPDIR shadows a reserved system environment variable.

TMPDIR is a well-known OS/shell env variable (particularly set by macOS for every process). Overwriting it means any subprocess launched after this point that respects TMPDIR will use the wrong temp directory. Under set -euo pipefail the trap cleanup also relies on this variable, so if a future edit adds unset TMPDIR it silently breaks the cleanup.

Use a distinct name:

🐛 Proposed fix
-TMPDIR="$(mktemp -d)"
-trap 'rm -rf "$TMPDIR"' EXIT
+WORK_DIR="$(mktemp -d)"
+trap 'rm -rf "$WORK_DIR"' EXIT

And update all downstream references ($TMPDIR/docs-site, etc.) to $WORK_DIR/docs-site.

🤖 Prompt for 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.

In `@scripts/sync-docs.sh` around lines 46 - 47, The script is overwriting the
common system env var TMPDIR; rename the temp-dir variable to a unique name
(e.g., WORK_DIR or SYNC_TMPDIR) where TMPDIR="$(mktemp -d)" is used and update
the trap that references it (trap 'rm -rf "$TMPDIR"' EXIT) to use the new
variable name, and then update all downstream references (e.g.,
"$TMPDIR/docs-site") to the new variable ("$WORK_DIR/docs-site" or similar) so
you no longer shadow the system TMPDIR and cleanup still works.

69-74: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

git diff --quiet does not detect untracked (new) files — early-exit is broken on first sync.

git diff only shows changes to files already tracked by the destination repo. On the very first sync, or whenever introduction.mdx / any new sub-directory is copied for the first time, all the copied files are untracked and git diff --quiet exits 0, causing the script to print "No changes — docs are already in sync." and exit before creating a PR.

The equivalent issue exists on Line 78 where git diff --stat would also show nothing.

Use git status --porcelain to cover both modified and untracked files:

🐛 Proposed fix
-if git diff --quiet; then
+if [[ -z "$(git status --porcelain)" ]]; then
   echo "No changes — docs are already in sync."
   exit 0
 fi

 echo ""
 echo "=== Changes ==="
-git diff --stat
+git status --short
 echo ""
🤖 Prompt for 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.

In `@scripts/sync-docs.sh` around lines 69 - 74, The script's early-exit uses `git
diff --quiet` and `git diff --stat` which ignore untracked files (so first-time
or new-file syncs are missed); replace those checks with `git status
--porcelain` (or `git --no-pager status --porcelain`) to detect both modified
and untracked files. Concretely, update the conditional that currently calls
`git diff --quiet` (and the subsequent `git diff --stat` usage) to instead test
whether `git status --porcelain` returns an empty string (no changes) and, when
non-empty, show or capture the porcelain output for the PR creation flow; adjust
the branches around those checks in scripts/sync-docs.sh so the script only
exits when `git status --porcelain` is empty and proceeds when it reports
changes.
🤖 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 `@scripts/sync-docs.sh`:
- Around line 93-96: The PR body currently hardcodes the repo path
"Canner/WrenAI" which breaks forks/renames; update the gh pr create call (where
PR_URL is assigned) to use the dynamically determined $SOURCE_REPO variable
instead of the literal "Canner/WrenAI" when constructing the commit URL (i.e.
replace https://github.com/Canner/WrenAI/commit/${SHORT_SHA} with
https://github.com/${SOURCE_REPO}/commit/${SHORT_SHA}), keeping existing
variables SHORT_SHA and TARGET_BRANCH intact.

---

Outside diff comments:
In `@scripts/sync-docs.sh`:
- Around line 46-47: The script is overwriting the common system env var TMPDIR;
rename the temp-dir variable to a unique name (e.g., WORK_DIR or SYNC_TMPDIR)
where TMPDIR="$(mktemp -d)" is used and update the trap that references it (trap
'rm -rf "$TMPDIR"' EXIT) to use the new variable name, and then update all
downstream references (e.g., "$TMPDIR/docs-site") to the new variable
("$WORK_DIR/docs-site" or similar) so you no longer shadow the system TMPDIR and
cleanup still works.
- Around line 69-74: The script's early-exit uses `git diff --quiet` and `git
diff --stat` which ignore untracked files (so first-time or new-file syncs are
missed); replace those checks with `git status --porcelain` (or `git --no-pager
status --porcelain`) to detect both modified and untracked files. Concretely,
update the conditional that currently calls `git diff --quiet` (and the
subsequent `git diff --stat` usage) to instead test whether `git status
--porcelain` returns an empty string (no changes) and, when non-empty, show or
capture the porcelain output for the PR creation flow; adjust the branches
around those checks in scripts/sync-docs.sh so the script only exits when `git
status --porcelain` is empty and proceeds when it reports changes.
🪄 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: 369164cf-40b2-423e-88f3-b88a9090088d

📥 Commits

Reviewing files that changed from the base of the PR and between 6bd4c12 and 95821a7.

📒 Files selected for processing (3)
  • .github/workflows/sync-docs.yml
  • docs/core/reference/skills.md
  • scripts/sync-docs.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/sync-docs.yml

Comment thread scripts/sync-docs.sh
scripts/sync-docs.sh hardcoded "Canner/WrenAI" in the PR title and
in the body's commit URL, defeating the purpose of $SOURCE_REPO
(derived dynamically from `gh repo view` so the script works from
forks or after a future rename).

Replace both with $SOURCE_REPO so the PR points at whatever repo
the script is actually run from. The fallback default in the
SOURCE_REPO assignment (Line 17) is still "Canner/WrenAI" — that
is intentional and only kicks in when `gh repo view` cannot
determine the current repo.

Addresses CodeRabbit comment on PR #2241.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @PaulChen79 👍

@goldmedal goldmedal merged commit 379a0ce into main May 5, 2026
9 checks passed
@goldmedal goldmedal deleted the feat/adjust-document-structure branch May 5, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants