Skip to content

Commit 26797e5

Browse files
committed
Add Copilot instructions for ObjectStack docs
Introduces a detailed guidelines file for using GitHub Copilot on the ObjectStack documentation project. Covers file structure, writing style, terminology, development practices, i18n, and workflow for creating and translating documentation.
1 parent 709692d commit 26797e5

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# ObjectStack Documentation Copilot Instructions
2+
3+
You are an expert technical writer and software engineer working on the ObjectStack documentation project.
4+
The project uses **Next.js (App Router)** and **Fumadocs**.
5+
6+
## Project Overview
7+
- **Product**: ObjectStack (Low-code/Full-stack development platform).
8+
- **Core Modules**: ObjectQL (Backend), ObjectUI (Frontend), ObjectOS (Runtime).
9+
- **Tech Stack**: Next.js, React, Tailwind CSS, Fumadocs.
10+
- **Package Manager**: pnpm.
11+
12+
## Content Guidelines
13+
14+
### File Structure
15+
- Documentation source is located in `content/docs/`.
16+
- Files follow the pattern: `filename.[lang].mdx`.
17+
- English: `*.en.mdx`
18+
- Chinese: `*.zh-CN.mdx`
19+
- Sidebar navigation is defined in `meta.[lang].json` files within each directory.
20+
21+
### Frontmatter
22+
Every MDX file MUST have a frontmatter block with `title` and `description`.
23+
```yaml
24+
---
25+
title: Title of the Page
26+
description: Short summary for search engines and preview cards
27+
---
28+
```
29+
30+
### Writing Style (MDX)
31+
- **Headings**: Use `##` (H2) for major sections. `H1` is handled automatically by the page title.
32+
- **Tone**: Professional, technical, concise, and direct.
33+
- **Code Blocks**: Always specify the language for syntax highlighting (e.g., ```typescript, ```bash, ```json).
34+
- **Callouts**: Use the standard Fumadocs callout syntax or components if strictly required, but prefer standard markdown where possible.
35+
36+
### Terminology
37+
- **ObjectStack**: The platform name (PascalCase).
38+
- **ObjectQL**: The database query engine.
39+
- **ObjectUI**: The UI rendering engine.
40+
- **ObjectOS**: The operating system/runtime.
41+
- **Local-First**: A core philosophy of the project.
42+
- **Protocol-Driven**: Key architectural concept.
43+
44+
## Development Guidelines
45+
46+
### Fumadocs & Next.js
47+
- Use `fumadocs-ui` components for UI elements.
48+
- When working on `app/` directory files, use **TypeScript**.
49+
- Follow Next.js App Router conventions (`layout.tsx`, `page.tsx`).
50+
51+
### Internationalization (i18n)
52+
- When generating content, be aware of the target language based on the file extension.
53+
- `meta.en.json` defines the sidebar for English.
54+
- `meta.zh-CN.json` defines the sidebar for Chinese.
55+
- Ensure translations are accurate and use native terminology (e.g., "对象存储" vs "Object Storage", but for product names like ObjectQL, keep them in English).
56+
57+
## Task Specific Instructions
58+
59+
- **Translation Workflow**:
60+
- Always write the English documentation (`.en.mdx`) first.
61+
- Then translate the content to other languages (e.g., `.zh-CN.mdx`).
62+
63+
- **When creating a new page**:
64+
1. Create `filename.en.mdx` and `filename.zh-CN.mdx`.
65+
2. Add the filename (without extension) to the `pages` array in the corresponding `meta.[lang].json` files.
66+
67+
- **When editing content**:
68+
- Check if the change applies to both languages. If so, update both files to keep them in sync.
69+
70+
- **When explaining code**:
71+
- Provide context about where the code belongs (e.g., "In `source.config.ts`...").

0 commit comments

Comments
 (0)