Guidelines for AI coding agents working with StarRocks documentation.
StarRocks documentation is built using Docusaurus and hosted at https://docs.starrocks.io/. Documentation is available in English, Chinese, and Japanese.
Read handbook/index.md first for repo-wide routing, then use the docs domain map in handbook/domains/docs-and-translation.md for handbook-vs-public-docs boundaries.
docs/
├── en/ # English documentation
│ ├── administration/ # Admin guides
│ ├── benchmarking/ # Benchmark guides
│ ├── data_source/ # Data source integration
│ ├── deployment/ # Deployment guides
│ ├── developers/ # Developer guides
│ ├── faq/ # FAQs
│ ├── introduction/ # Introduction
│ ├── loading/ # Data loading
│ ├── reference/ # Reference docs (SQL, config)
│ ├── sql-reference/ # SQL reference
│ └── using_starrocks/ # User guides
├── ja/ # Japanese documentation (mirrors en/)
├── zh/ # Chinese documentation (mirrors en/)
├── docusaurus/ # Docusaurus build config
│ ├── docusaurus.config.js
│ ├── sidebars.js
│ └── src/
└── _assets/ # Shared images and assets
cd docs/docusaurus
# Install dependencies
npm install
# Start development server
npm start
# Build static site
npm run buildNever violate these directives. If a task would require violating them, stop and ask the user for clarification before proceeding:
- Do not add information beyond the requested changes.
- Do not modify files other than those specified by the user.
- Do not change existing frontmatter unless explicitly instructed. Adding required frontmatter fields to a new page or a page that is missing them is allowed.
- Do not use training data for StarRocks technical facts. Verify all commands, configuration options, parameter names, and version numbers against existing documentation in the same language directory before writing them. If a technical detail cannot be confirmed from existing docs, list the unconfirmed items and ask the user how to proceed.
- When editing a page in
en/,zh/, orja/, update the corresponding pages in the other language directories. If aja/page does not yet exist, note this in your completion summary and ask the user whether to create it. - Do not commit or push without explicit confirmation from the user.
- When a task attempt fails, try no more than two approaches before stopping to ask for instructions.
- When stopping to ask for clarification: state the blocker, list what you have verified or attempted, and ask one specific question. Do not ask multiple questions at once.
A task is complete when:
- All requested changes have been made to the specified files only.
- Corresponding pages in all three language directories (
en/,zh/,ja/) have been updated, or the user has been informed if aja/page does not exist. - A summary of every changed file (with path) has been provided to the user.
- The user has been asked whether they are ready to commit and push.
After presenting the completion summary, wait for explicit user instruction before making further changes.
Every page must open with frontmatter between --- delimiters.
Required:
displayed_sidebar: docs— must be present on every page.description— one-sentence plain-text summary of the page (under 160 characters). Required on every page except those withunlisted: true. Used by Algolia search snippets and thellms.txtLLM index. No markdown formatting, code spans, or links.
Optional:
sidebar_position— integer controlling sort order within a sidebar category.sidebar_label— overrides the H1 as the sidebar link text.toc_max_heading_level— integer (2–6) capping right-side TOC depth.keywords— list of terms for search and SEO.unlisted: true— keeps the URL live but hides the page from navigation and search.hide_table_of_contents: true— removes the right-side TOC.title— overrides the H1 as the browser tab title and SEO metadata.
All three language directories must stay in sync: en/, zh/, and ja/. When editing a page in one language, update the corresponding page in the other two. If a ja/ page does not yet exist, note this in your completion summary and ask whether to create it.
- Create the file under
en/. - Register it in
docusaurus/sidebars.js. - Create matching files under
zh/andja/.
Always specify a language for fenced code blocks. Never use an unlabeled fence for code that has an identifiable language.
Use Docusaurus syntax — not RST-style directives:
:::note
Supplemental information.
:::
:::tip
Helpful shortcuts or alternatives.
:::
:::warning
Risk of data loss or service disruption.
:::
:::caution
Situations requiring extra care.
:::Do not stack multiple admonitions directly after one another.
Use relative paths for internal links: [text](../category/page.md). Do not use absolute URLs for pages within the docs site.
Place images in _assets/ and reference with a relative path: .
- Use Markdown (
.md) files - Include frontmatter for metadata:
---
displayed_sidebar: docs
keywords: ['keyword1', 'keyword2']
---
# Page Title
Content here...- Clear and concise: Use simple language
- Code examples: Include runnable examples
- Screenshots: Use sparingly, keep updated
- Links: Use relative links within docs
Use fenced code blocks with language:
```sql
SELECT * FROM table WHERE id = 1;
```
```bash
./build.sh --fe --be
```
```java
public class Example {
public static void main(String[] args) { }
}
```Place images in _assets/ and reference:
- Create doc in appropriate directory
- Add to sidebar in
docusaurus/sidebars.js - Add English and Chinese versions; add Japanese version when applicable
- Create PR with
[Doc]prefix in title - Sign off commit:
git commit -s - Select "Doc" checkbox in PR template
When updating English docs, update Chinese docs too (or vice versa). Update Japanese docs when a corresponding docs/ja/ page exists or when explicitly requested:
docs/en/path/to/file.md(required)docs/zh/path/to/file.md(required)docs/ja/path/to/file.md(when applicable)
Edit docs/docusaurus/sidebars.js:
module.exports = {
docs: [
{
type: 'category',
label: 'Category Name',
items: [
'path/to/doc1',
'path/to/doc2',
],
},
],
};- Create
docs/en/category/new-page.md - Add to
sidebars.js - Create Chinese version
docs/zh/category/new-page.md - Create Japanese version
docs/ja/category/new-page.md(when applicable)
- Edit the markdown file
- Update all language versions if needed
- Verify links still work
## Example
Here's how to create a table:
```sql
CREATE TABLE example (
id INT,
name STRING
)
DISTRIBUTED BY HASH(id);
## Preview Changes
```bash
cd docs/docusaurus
npm start
# Open http://localhost:3000
Developer-specific docs are in docs/en/developers/:
code-style-guides/- Coding standardsdevelopment-environment/- Setup guidesbuild-starrocks/- Build instructions
- Keep it updated: Update docs when code changes
- Test examples: Verify code examples work
- Use templates: Follow existing page structure
- Cross-reference: Link related topics
- Version awareness: Note version-specific features
Documentation is under Apache 2.0 license.