Skip to content

Commit 3cd57d4

Browse files
Claudehotlong
andauthored
Migrate project to Claude Code as primary AI coding assistant
Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/5c860d51-bea2-48cb-918a-9129f37adb46 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent ffa8f55 commit 3cd57d4

File tree

4 files changed

+71
-10
lines changed

4 files changed

+71
-10
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ objectstack-ai/spec/
9090
│ ├── app-crm/ # Advanced: full CRM with relations
9191
│ └── plugin-bi/ # Plugin example: BI dashboard
9292
93-
├── skills/ # 🤖 AI skill definitions (for Copilot/Cursor)
93+
├── skills/ # 🤖 AI skill definitions (for Claude Code, Copilot, Cursor)
9494
│ ├── objectstack-schema/
9595
│ ├── objectstack-query/
9696
│ ├── objectstack-api/

.github/prompts/OVERVIEW.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,22 @@ ObjectStack AI Prompts
114114

115115
## 🚀 使用方式 (Usage)
116116

117-
### GitHub Copilot 集成
117+
### AI 编码助手集成
118118

119-
这些提示词会被 GitHub Copilot 自动加载:
119+
这些提示词兼容多个 AI 编码助手:
120+
121+
- **Claude Code**(推荐):从代码库上下文自动加载
122+
- **GitHub Copilot**:在代码库中工作时自动加载
123+
- **Cursor**:可引用这些提示词获取上下文感知帮助
124+
125+
提示词会根据以下内容自动加载:
120126

121127
```
122128
.github/
123129
└── prompts/
124-
├── data-protocol.prompt.md ← 编辑数据协议时自动加载
125-
├── ui-protocol.prompt.md ← 编辑UI协议时自动加载
126-
├── system-protocol.prompt.md ← 编辑系统协议时自动加载
130+
├── data-protocol.prompt.md ← 编辑数据协议时加载
131+
├── ui-protocol.prompt.md ← 编辑UI协议时加载
132+
├── system-protocol.prompt.md ← 编辑系统协议时加载
127133
└── ...
128134
```
129135

.github/prompts/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,15 @@ These prompts help with specific development tasks:
142142

143143
## 🎯 How to Use These Prompts
144144

145-
### For GitHub Copilot
145+
### For AI Coding Assistants
146146

147-
These prompts are automatically loaded by GitHub Copilot when working in the repository. They provide context-aware assistance based on:
147+
These prompts are compatible with multiple AI coding assistants:
148+
149+
- **Claude Code** (Recommended): Automatically loaded from the repository context
150+
- **GitHub Copilot**: Automatically loaded when working in the repository
151+
- **Cursor**: Can reference these prompts for context-aware assistance
152+
153+
They provide context-aware assistance based on:
148154
- The file you're editing
149155
- The protocol layer you're working on
150156
- The task you're performing

CLAUDE.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
> **Last synced with `.github/copilot-instructions.md`:** 2026-04-16
44
>
5-
> This file is the **Claude Code** equivalent of `.github/copilot-instructions.md` (GitHub Copilot).
5+
> This file is the **Claude Code** primary instruction file for ObjectStack development.
6+
> A parallel `.github/copilot-instructions.md` exists for GitHub Copilot compatibility.
67
> Keep both files in sync when updating project-wide AI instructions.
78
89
---
@@ -88,7 +89,7 @@ objectstack-ai/framework/
8889
│ └── server/ # 🚀 Production server (multi-app orchestration)
8990
9091
├── examples/ # 📚 Reference implementations
91-
├── skills/ # 🤖 AI skill definitions (for Copilot/Cursor/Claude)
92+
├── skills/ # 🤖 AI skill definitions (for Claude Code, Copilot, Cursor)
9293
└── content/docs/ # 📝 Documentation content
9394
```
9495

@@ -264,6 +265,54 @@ When editing files matching these patterns, apply the corresponding architectura
264265

265266
---
266267

268+
## Claude Code Best Practices
269+
270+
This project is optimized for development with **Claude Code** (Anthropic's official AI coding assistant). Follow these practices for the best experience:
271+
272+
### Effective Prompting
273+
274+
1. **Be Specific**: Reference exact file paths and line numbers when discussing code
275+
2. **Provide Context**: Mention the protocol domain you're working in (Data, UI, System, AI, API)
276+
3. **Use Domain Skills**: Reference the appropriate skill file when working on specialized tasks
277+
4. **Sequential Tasks**: Break complex tasks into smaller, testable increments
278+
279+
### Leveraging Claude Code Features
280+
281+
1. **Multi-File Awareness**: Claude Code can read and edit multiple files simultaneously
282+
2. **Deep Analysis**: Request architectural analysis before making significant changes
283+
3. **Code Review**: Ask for code review suggestions before committing
284+
4. **Test-Driven**: Request test generation alongside implementation
285+
286+
### Working with This Repository
287+
288+
1. **Start with Skills**: Consult `skills/objectstack-{domain}/SKILL.md` for domain-specific guidance
289+
2. **Check Prompts**: Review `.github/prompts/{domain}-protocol.prompt.md` for detailed context
290+
3. **Follow Conventions**: Always adhere to Prime Directives (Zod-first, naming conventions, etc.)
291+
4. **Incremental Changes**: Make small, focused changes and test frequently
292+
293+
### Example Prompts
294+
295+
**Data Protocol Work:**
296+
```
297+
"I need to add a new field type 'geolocation' to packages/spec/src/data/field-type.zod.ts.
298+
First, read the existing field types to understand the pattern, then implement following
299+
the Zod-first approach with proper TSDoc comments."
300+
```
301+
302+
**Testing:**
303+
```
304+
"Review the test coverage for packages/spec/src/ui/view.zod.ts and suggest additional
305+
edge cases we should test, particularly around view type validation."
306+
```
307+
308+
**Architecture:**
309+
```
310+
"I want to add a new service for caching. Review packages/services/service-cache/ if it exists,
311+
or suggest the architecture following the kernel-managed service pattern used in other services."
312+
```
313+
314+
---
315+
267316
## Post-Task Checklist
268317

269318
After completing any task:

0 commit comments

Comments
 (0)