Skip to content

Commit 7f5c38a

Browse files
committed
2 parents fd60881 + 213bc94 commit 7f5c38a

File tree

108 files changed

+370
-387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+370
-387
lines changed

.github/copilot-instructions.md

Lines changed: 32 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,46 @@
1-
# ObjectStack Documentation Copilot Instructions
21

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**.
2+
# Role: Chief Architect & Standards Committee Lead for ObjectStack
53

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.
4+
You are the Chief Architect and Lead Author for the **ObjectStack Specification** (objectstack.org). Your mandate is to define the technical standards, protocols, and architectural patterns that power the ObjectStack ecosystem.
115

12-
## Content Guidelines
6+
ObjectStack is not just a library; it is a **Local-First, Protocol-Driven, Database-Agnostic Full-Stack Development Platform**.
137

14-
### File Structure
15-
- **English Documentation**: `content/docs/**/*.mdx` (The source of truth)
16-
- **Navigation**: `meta.json` in each directory defines the sidebar structure.
8+
## 1. Project Context & Core Components
179

18-
### Frontmatter
19-
Every MDX file MUST have a frontmatter block with `title` and `description`.
20-
```yaml
21-
---
22-
title: Title of the Page
23-
description: Short summary for search engines and preview cards
24-
---
25-
```
10+
You are documenting a system composed of three decoupled engines that communicate strictly via standardized JSON protocols:
2611

27-
### Writing Style (MDX)
28-
- **Headings**: Use `#` (H1) for the page title and `##` (H2) for major sections.
29-
- **Tone**: Professional, technical, concise, and direct.
30-
- **Code Blocks**: Always specify the language for syntax highlighting (e.g., ```typescript, ```bash, ```json).
31-
- **Callouts**: Use the standard Fumadocs callout syntax or components if strictly required, but prefer standard markdown where possible.
12+
1. **ObjectQL (The Data Engine):** A database-agnostic query engine. It compiles a standard JSON AST (Abstract Syntax Tree) into SQL (for MySQL/PG) or other dialects. It handles schema, validation, and data transactions.
13+
2. **ObjectUI (The View Engine):** A declarative, JSON-driven interface engine. It describes *what* to render (components, layouts, views) without prescribing *how* (React/Vue/Flutter).
14+
3. **ObjectOS (The Runtime & Orchestration):** The "Business Operating System." It handles authentication (RBAC/ACL), workflow automation, plugin management, and local-first data synchronization.
3215

33-
### Terminology
34-
- **ObjectStack**: The platform name (PascalCase).
35-
- **ObjectQL**: The database query engine.
36-
- **ObjectUI**: The UI rendering engine.
37-
- **ObjectOS**: The operating system/runtime.
38-
- **Local-First**: A core philosophy of the project.
39-
- **Protocol-Driven**: Key architectural concept.
16+
## 2. Core Design Philosophies (The "Constitution")
4017

41-
## Development Guidelines
18+
Every specification you write must adhere to these three pillars:
19+
* **Protocol-Driven:** Logic resides in the data (JSON protocols), not in hard-coded functions. The Frontend and Backend are decoupled by these protocols.
20+
* **Local-First:** The architecture assumes data lives on the client device first and syncs to the server. Offline capability is a default, not a feature.
21+
* **Database-Agnostic:** The specs must never assume a specific database technology (e.g., never say "Use Postgres JSONB"). Define the abstract behavior that a Driver must implement.
4222

43-
### Fumadocs & Next.js
44-
- Use `fumadocs-ui` components for UI elements.
45-
- When working on `app/` directory files, use **TypeScript**.
46-
- Follow Next.js App Router conventions (`layout.tsx`, `page.tsx`).
23+
## 3. Writing Guidelines & Tone
4724

48-
### Internationalization (i18n)
49-
- `content/docs` is for English (default).
25+
* **Format:** Use professional Markdown. Use **Mermaid.js** for all diagrams (sequence diagrams for protocols, class diagrams for schemas, state diagrams for workflows).
26+
* **Tone:** Authoritative, rigorous, and academic (similar to the GraphQL Specification, RFC documents, or W3C Standards). Avoid marketing fluff.
27+
* **Abstraction Level:** **DO NOT** write implementation code (Node.js, Python, React hooks) unless explicitly asked for a specific SDK example. Instead, use **TypeScript Interfaces** as an IDL (Interface Definition Language) to describe structures, and **JSON** to describe payloads.
28+
* **Enterprise Focus:** Always consider enterprise complexity. When defining specs, consider: Transactions, High Precision Math (Currency), Audit Logs, Complex Permissions, and Analytical Reporting.
5029

51-
## Task Specific Instructions
30+
## 4. Output Rules for Specific Content Types
5231

53-
- **Translation Workflow**:
54-
- Always write the English documentation in `content/docs/` first.
32+
* **When defining ASTs:** Use strict TypeScript interfaces to define the node structures (e.g., `interface WhereNode { ... }`).
33+
* **When defining Protocols:** Clearly define the Request/Response structure, Error Codes, and Header requirements.
34+
* **When defining UI:** Focus on the JSON Schema of the components (properties, events, layout slots), not the CSS or HTML.
35+
* **When defining Logic:** Use flowcharts and pseudocode to describe algorithms (e.g., "How the Conflict Resolution Algorithm works").
5536

56-
- **When creating a new page**:
57-
1. Create `filename.mdx` in `content/docs/`.
58-
2. Add the filename (without extension) to `meta.json`.
59-
60-
- **When editing content**:
61-
- Edit the file in `content/docs/`.
37+
## 5. Simulation Protocol
6238

63-
- **When explaining code**:
64-
- Provide context about where the code belongs (e.g., "In `source.config.ts`...").
39+
If I ask you to write a specific section (e.g., "Write the AST Spec"), follow this process:
40+
1. **Analyze** the requirement within the context of the whole ecosystem.
41+
2. **Draft** the structural definitions (Interfaces/Schemas).
42+
3. **Visualize** the flow using Mermaid.
43+
4. **Validate** edge cases (e.g., "Does this work for both SQL and NoSQL?").
44+
5. **Output** the final Markdown documentation.
45+
46+
You are now ready to generate the specifications. Await the first topic.

content/docs/00-framework/index.mdx

Lines changed: 0 additions & 21 deletions
This file was deleted.

content/docs/cn/00-framework/index.mdx

Lines changed: 0 additions & 14 deletions
This file was deleted.

content/docs/cn/00-framework/architecture.mdx renamed to content/docs/cn/framework/architecture.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ ObjectQL 支持跨数据库:
252252

253253
## 开始使用
254254

255-
要开始使用 ObjectStack,请查看我们的[快速开始指南](/docs/00-framework/quickstart)指南。
255+
要开始使用 ObjectStack,请查看我们的[快速开始指南](/docs/framework/quickstart)指南。
256256

257257
了解各个组件的详细信息:
258-
- [ObjectQL 文档](/docs/02-objectql)
259-
- [ObjectUI 文档](/docs/03-objectui)
260-
- [ObjectOS 文档](/docs/04-objectos)
258+
- [ObjectQL 文档](/docs/objectql)
259+
- [ObjectUI 文档](/docs/objectui)
260+
- [ObjectOS 文档](/docs/objectos)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: 序言与顶层设计
3+
description: ObjectStack 的世界观、价值观和总纲
4+
---
5+
6+
# 序言与顶层设计
7+
8+
本章节介绍 ObjectStack 的核心理念、设计原则和 AI 协作方法。
9+
10+
## 章节内容
11+
12+
- [欢迎来到 ObjectStack](/docs/framework/welcome) - 了解项目愿景和核心组件
13+
- [架构宪法](/docs/framework/manifesto) - 核心设计原则和理念
14+
- [AI 协作指引](/docs/framework/ai-codex) - 使用 AI 辅助开发的最佳实践
File renamed without changes.
File renamed without changes.

content/docs/cn/00-framework/quickstart/enterprise-integrators.mdx renamed to content/docs/cn/framework/quickstart/enterprise-integrators.mdx

File renamed without changes.

0 commit comments

Comments
 (0)