chore(main): refactor docs/core for Wren AI Core rebrand#2241
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR retargets and rebrands core docs to “Wren AI Core,” adds ChangesDocs & Sync Rebrand / Additive Overlay
Sequence DiagramsequenceDiagram
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
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 docstrings
🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
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 winUpdate 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 toCanner/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-engine→Canner/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 valueDefensive:
mkdir -pthe target before copyingintroduction.mdx.The top-level
cpruns before any directory is created, so the step relies on_docs-site/docs/ossalready existing in the target repo. The per-dir loop already usesmkdir -pfor each subfolder; mirroring that for the target root makes this resilient ifdocs/ossis 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
📒 Files selected for processing (20)
.github/workflows/sync-docs.ymldocs/core/.sync.ymldocs/core/README.mddocs/core/concepts/architecture.mddocs/core/concepts/benefits_llm.mddocs/core/concepts/what_is_context.mddocs/core/concepts/what_is_mdl.mddocs/core/get_started/connect.mddocs/core/get_started/installation.mddocs/core/guides/memory.mddocs/core/guides/modeling/model.mddocs/core/guides/modeling/overview.mddocs/core/guides/modeling/relation.mddocs/core/guides/modeling/view.mddocs/core/guides/modeling/wren_project.mddocs/core/guides/profiles.mddocs/core/introduction.mdxdocs/core/reference/skills.mddocs/core/sdks/langchain.mddocs/core/sdks/overview.md
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>
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 `@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
📒 Files selected for processing (4)
docs/core/get_started/installation.mddocs/core/introduction.mdxdocs/core/reference/skills.mddocs/core/sdks/overview.md
✅ Files skipped from review due to trivial changes (2)
- docs/core/sdks/overview.md
- docs/core/introduction.mdx
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>
5d20e01 to
6bd4c12
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (18)
.github/workflows/sync-docs.ymldocs/core/.sync.ymldocs/core/README.mddocs/core/concepts/architecture.mddocs/core/concepts/benefits_llm.mddocs/core/concepts/what_is_context.mddocs/core/concepts/what_is_mdl.mddocs/core/get_started/connect.mddocs/core/get_started/installation.mddocs/core/guides/memory.mddocs/core/guides/modeling/model.mddocs/core/guides/modeling/overview.mddocs/core/guides/modeling/relation.mddocs/core/guides/modeling/view.mddocs/core/guides/modeling/wren_project.mddocs/core/guides/profiles.mddocs/core/introduction.mdxdocs/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
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>
There was a problem hiding this comment.
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
TMPDIRshadows a reserved system environment variable.
TMPDIRis a well-known OS/shell env variable (particularly set by macOS for every process). Overwriting it means any subprocess launched after this point that respectsTMPDIRwill use the wrong temp directory. Underset -euo pipefailthetrapcleanup also relies on this variable, so if a future edit addsunset TMPDIRit 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"' EXITAnd 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 --quietdoes not detect untracked (new) files — early-exit is broken on first sync.
git diffonly shows changes to files already tracked by the destination repo. On the very first sync, or wheneverintroduction.mdx/ any new sub-directory is copied for the first time, all the copied files are untracked andgit diff --quietexits 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 --statwould also show nothing.Use
git status --porcelainto 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
📒 Files selected for processing (3)
.github/workflows/sync-docs.ymldocs/core/reference/skills.mdscripts/sync-docs.sh
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/sync-docs.yml
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>
Summary
Restructure
docs/coreto 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 tomain, the sync workflow will create a docs site PR mirroring these changes.What changed
Source content (
docs/core/)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/) underdocs/oss/genbi/on the docs site.introduction.mdx— the Wren AI Core overview entry page (architecture diagram, problem framing, key ideas, use cases).sdks/— overview + LangChain placeholder; wired up as a first-class sidebar section on the docs site.reference/skills.mdwithwren-onboardingandwren-dlt-connectorsections (full coverage of all 4 skills).get_started/installation.md:npx skills add Canner/WrenAI --skill '*'wren-onboardingskill to drive setup.README.mdfor Wren AI Core naming and the new structure.Sync workflow (
.github/workflows/sync-docs.yml)docs/oss/engine→docs/oss. Core is now the top-level of the OSS docs site, no longer a sub-section.rm -rf+cp -r) → additive overlay (cp -ronly).Stale files from source-side renames/deletions must be cleaned up manually by maintainers in the docs site repo (see Manual Cleanup below).
introduction.mdx, andsdks/.engine-docs→core-docs.Sync declaration (
docs/core/.sync.yml)target_dir: docs/osssync_filesentry for top-levelintroduction.mdx.sync_dirs:get_started, concepts, guides, reference, sdks.Test plan
docs.getwren.ai(master).docs/oss/{overview,installation,getting_started,concept,guide,ai_service}) untouched ingit diff.docs/cpuntouched ingit diff.get_started/,concepts/,guides/,reference/,sdks/,introduction.mdx).npm run buildpasses 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.aito 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 undeross/genbi/archived/withslug:frontmatter that preserves the old/oss/engine/archived/...URLs for backward compatibility.Related
docs.getwren.ai)temp-docs/poc-to-source-migration-plan.mdon the docs site refactor branch.🤖 Generated with Claude Code
Summary by CodeRabbit