anchi-kit 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/commands/context.md +76 -0
- package/.cursor/commands/entity.md +135 -0
- package/.cursor/commands/generate/api.md +79 -0
- package/.cursor/commands/generate/component.md +80 -0
- package/.cursor/commands/generate/page.md +71 -0
- package/.cursor/commands/memory/add.md +65 -0
- package/.cursor/commands/memory/load.md +74 -0
- package/.cursor/commands/memory/save.md +68 -0
- package/.cursor/commands/memory.md +141 -0
- package/.cursor/commands/suggest.md +65 -0
- package/README.md +427 -122
- package/package.json +1 -1
- package/src/cli.js +12 -0
- package/src/commands/doctor.js +106 -0
- package/src/commands/memory.js +158 -0
- package/src/lib/contextDatabase.js +362 -0
- package/src/lib/memoryManager.js +250 -0
- package/.antigravity/agent/code-reviewer.md +0 -141
- package/.antigravity/agent/debugger.md +0 -75
- package/.antigravity/agent/docs-manager.md +0 -120
- package/.antigravity/agent/git-manager.md +0 -60
- package/.antigravity/agent/planner-researcher.md +0 -101
- package/.antigravity/agent/planner.md +0 -88
- package/.antigravity/agent/project-manager.md +0 -113
- package/.antigravity/agent/researcher.md +0 -174
- package/.antigravity/agent/solution-brainstormer.md +0 -90
- package/.antigravity/agent/system-architecture.md +0 -193
- package/.antigravity/agent/tester.md +0 -96
- package/.antigravity/agent/ui-ux-designer.md +0 -233
- package/.antigravity/agent/ui-ux-developer.md +0 -98
- package/.antigravity/command/cook.md +0 -7
- package/.antigravity/command/debug.md +0 -10
- package/.antigravity/command/design/3d.md +0 -65
- package/.antigravity/command/design/fast.md +0 -18
- package/.antigravity/command/design/good.md +0 -21
- package/.antigravity/command/design/screenshot.md +0 -22
- package/.antigravity/command/design/video.md +0 -22
- package/.antigravity/command/docs/init.md +0 -11
- package/.antigravity/command/docs/summarize.md +0 -10
- package/.antigravity/command/docs/update.md +0 -18
- package/.antigravity/command/fix/ci.md +0 -8
- package/.antigravity/command/fix/fast.md +0 -11
- package/.antigravity/command/fix/hard.md +0 -15
- package/.antigravity/command/fix/logs.md +0 -16
- package/.antigravity/command/fix/test.md +0 -18
- package/.antigravity/command/fix/types.md +0 -10
- package/.antigravity/command/git/cm.md +0 -5
- package/.antigravity/command/git/cp.md +0 -4
- package/.antigravity/command/plan/ci.md +0 -12
- package/.antigravity/command/plan/two.md +0 -13
- package/.antigravity/command/plan.md +0 -10
- package/.antigravity/command/test.md +0 -7
- package/.antigravity/command/watzup.md +0 -8
- package/ANTIGRAVITY.md +0 -36
- package/GEMINI.md +0 -75
- package/scripts/prepare-release-assets.cjs +0 -97
- package/scripts/send-discord-release.cjs +0 -204
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: ⚡⚡⚡⚡ Show current AI context and suggest relevant files
|
|
3
|
+
argument-hint: [optional: topic or feature]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /context - Show AI Context
|
|
7
|
+
|
|
8
|
+
**What:** Display current context AI is using and suggest relevant files.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/context # Show current context
|
|
13
|
+
/context "authentication" # Find auth-related files
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
👋 /context đang chạy!
|
|
21
|
+
Tôi sẽ show context hiện tại và suggest files liên quan.
|
|
22
|
+
|
|
23
|
+
### Output
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
📋 CURRENT AI CONTEXT
|
|
27
|
+
|
|
28
|
+
📂 Active Files:
|
|
29
|
+
• .cursorrules (preset: professional)
|
|
30
|
+
• docs/PROJECT.md
|
|
31
|
+
|
|
32
|
+
📚 Active Skills:
|
|
33
|
+
• frontend-development
|
|
34
|
+
• api-patterns
|
|
35
|
+
|
|
36
|
+
🔍 Related Files (based on recent work):
|
|
37
|
+
• app/api/users/route.ts
|
|
38
|
+
• lib/services/users.service.ts
|
|
39
|
+
• components/user-card/index.tsx
|
|
40
|
+
|
|
41
|
+
💡 Suggested Tags:
|
|
42
|
+
@app/api/users/route.ts @lib/services/users.service.ts
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## With Topic
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
/context "authentication"
|
|
51
|
+
|
|
52
|
+
📋 AUTH-RELATED CONTEXT
|
|
53
|
+
|
|
54
|
+
📂 Files Found:
|
|
55
|
+
• app/api/auth/route.ts
|
|
56
|
+
• lib/auth/session.ts
|
|
57
|
+
• middleware.ts
|
|
58
|
+
• components/auth/login-form.tsx
|
|
59
|
+
|
|
60
|
+
📚 Relevant Skills:
|
|
61
|
+
• auth-patterns
|
|
62
|
+
• security
|
|
63
|
+
|
|
64
|
+
💡 Tag để AI hiểu hơn:
|
|
65
|
+
@app/api/auth/route.ts @lib/auth/session.ts @middleware.ts
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Use Cases
|
|
71
|
+
|
|
72
|
+
| Command | Khi dùng |
|
|
73
|
+
|---------|----------|
|
|
74
|
+
| `/context` | Xem AI đang "nhớ" gì |
|
|
75
|
+
| `/context "topic"` | Tìm files liên quan topic |
|
|
76
|
+
| `/context --clear` | Reset context (start fresh) |
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: ⚡⚡⚡⚡ Record and view entities in project knowledge graph
|
|
3
|
+
argument-hint: [entity name] [optional: type/description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /entity - Knowledge Graph Entities
|
|
7
|
+
|
|
8
|
+
**What:** Record and view important entities (components, modules, concepts) in your project's knowledge graph.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/entity # List all entities
|
|
13
|
+
/entity "UserService" # View entity details
|
|
14
|
+
/entity add "UserService" "service" "Handles user CRUD"
|
|
15
|
+
/entity relate "UserService" "uses" "Database"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## What is an Entity?
|
|
21
|
+
|
|
22
|
+
Entities are important items in your codebase:
|
|
23
|
+
- **Components**: `UserCard`, `PaymentForm`
|
|
24
|
+
- **Services**: `AuthService`, `EmailService`
|
|
25
|
+
- **Modules**: `payments`, `auth`
|
|
26
|
+
- **Files**: `schema.prisma`, `middleware.ts`
|
|
27
|
+
- **Concepts**: `JWT`, `rate-limiting`
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
### List All Entities
|
|
34
|
+
```
|
|
35
|
+
/entity
|
|
36
|
+
|
|
37
|
+
📊 PROJECT ENTITIES
|
|
38
|
+
|
|
39
|
+
Services (4):
|
|
40
|
+
• AuthService - Handles authentication
|
|
41
|
+
• UserService - User CRUD operations
|
|
42
|
+
• EmailService - Send emails
|
|
43
|
+
• PaymentService - Stripe integration
|
|
44
|
+
|
|
45
|
+
Components (3):
|
|
46
|
+
• UserCard - Display user info
|
|
47
|
+
• PaymentForm - Collect payment details
|
|
48
|
+
• DashboardLayout - Main layout
|
|
49
|
+
|
|
50
|
+
Modules (2):
|
|
51
|
+
• auth - Authentication module
|
|
52
|
+
• payments - Payment processing
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### View Entity Details
|
|
56
|
+
```
|
|
57
|
+
/entity "AuthService"
|
|
58
|
+
|
|
59
|
+
📋 ENTITY: AuthService
|
|
60
|
+
|
|
61
|
+
Type: service
|
|
62
|
+
Description: Handles user authentication with JWT
|
|
63
|
+
|
|
64
|
+
📂 Files:
|
|
65
|
+
• lib/services/auth.service.ts
|
|
66
|
+
• lib/types/auth.types.ts
|
|
67
|
+
|
|
68
|
+
🔗 Relations:
|
|
69
|
+
• uses → Database
|
|
70
|
+
• uses → JWTUtils
|
|
71
|
+
• implements → IAuthService
|
|
72
|
+
|
|
73
|
+
📝 Notes:
|
|
74
|
+
• Uses bcrypt for password hashing
|
|
75
|
+
• Refresh tokens stored in Redis
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Add Entity
|
|
79
|
+
```
|
|
80
|
+
/entity add "RateLimiter" "utility" "Limits API requests per IP"
|
|
81
|
+
|
|
82
|
+
✅ Entity added: RateLimiter
|
|
83
|
+
Type: utility
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Add Relation
|
|
87
|
+
```
|
|
88
|
+
/entity relate "AuthController" "uses" "AuthService"
|
|
89
|
+
|
|
90
|
+
✅ Relation added:
|
|
91
|
+
AuthController ─uses─→ AuthService
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Relation Types
|
|
97
|
+
|
|
98
|
+
| Type | Example |
|
|
99
|
+
|------|---------|
|
|
100
|
+
| `uses` | UserController uses UserService |
|
|
101
|
+
| `extends` | AdminUser extends User |
|
|
102
|
+
| `implements` | AuthService implements IAuth |
|
|
103
|
+
| `contains` | PaymentModule contains PaymentService |
|
|
104
|
+
| `depends_on` | OrderService depends_on PaymentService |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Auto-Discovery
|
|
109
|
+
|
|
110
|
+
AI có thể auto-discover entities khi:
|
|
111
|
+
- Chạy `/scout`
|
|
112
|
+
- Đọc code files
|
|
113
|
+
- Analyze imports
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
/entity discover
|
|
117
|
+
|
|
118
|
+
🔍 Discovering entities...
|
|
119
|
+
|
|
120
|
+
Found 12 new entities:
|
|
121
|
+
✅ UserController (controller)
|
|
122
|
+
✅ prisma (database)
|
|
123
|
+
✅ middleware (utility)
|
|
124
|
+
...
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Integration
|
|
130
|
+
|
|
131
|
+
Entities được sử dụng bởi:
|
|
132
|
+
- `/context` - Include trong context summary
|
|
133
|
+
- `/plan` - Reference khi planning
|
|
134
|
+
- `/suggest` - Smart suggestions
|
|
135
|
+
- AI - Understand code relationships
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: ⚡⚡⚡⚡ Generate API route boilerplate based on current preset
|
|
3
|
+
argument-hint: [endpoint name and description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /generate:api - Create API Route Boilerplate
|
|
7
|
+
|
|
8
|
+
**What:** Generate API route with correct patterns for current preset.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/generate:api "users - CRUD operations for users"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
👋 /generate:api đang chạy!
|
|
20
|
+
Tôi sẽ tạo API route theo best practices.
|
|
21
|
+
|
|
22
|
+
### Step 1: Analyze
|
|
23
|
+
```
|
|
24
|
+
[1/3] 🔍 Reading preset...
|
|
25
|
+
Detected: professional
|
|
26
|
+
Pattern: Route handlers + Services
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 2: Generate
|
|
30
|
+
```
|
|
31
|
+
[2/3] 📝 Generating API structure...
|
|
32
|
+
|
|
33
|
+
📂 Files to create:
|
|
34
|
+
├── app/api/users/route.ts
|
|
35
|
+
├── lib/services/users.service.ts
|
|
36
|
+
└── lib/types/users.types.ts
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Step 3: Preview
|
|
40
|
+
```
|
|
41
|
+
[3/3] 📋 Preview:
|
|
42
|
+
|
|
43
|
+
// app/api/users/route.ts
|
|
44
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
45
|
+
import { usersService } from '@/lib/services/users.service';
|
|
46
|
+
|
|
47
|
+
export async function GET(request: NextRequest) {
|
|
48
|
+
const users = await usersService.getAll();
|
|
49
|
+
return NextResponse.json(users);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function POST(request: NextRequest) {
|
|
53
|
+
const body = await request.json();
|
|
54
|
+
const user = await usersService.create(body);
|
|
55
|
+
return NextResponse.json(user, { status: 201 });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
👉 Create files? (ok/cancel)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Preset Patterns
|
|
64
|
+
|
|
65
|
+
| Preset | Pattern |
|
|
66
|
+
|--------|---------|
|
|
67
|
+
| Rapid | Inline logic in route.ts |
|
|
68
|
+
| Professional | Route + Service layer |
|
|
69
|
+
| Enterprise | Route + Service + Repository + Domain |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Options
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
/generate:api "name" --crud # Full CRUD
|
|
77
|
+
/generate:api "name" --with-auth # Include auth middleware
|
|
78
|
+
/generate:api "name" --with-validation # Include Zod schemas
|
|
79
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: ⚡⚡⚡⚡ Generate component boilerplate based on current preset
|
|
3
|
+
argument-hint: [component name and description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /generate:component - Create Component Boilerplate
|
|
7
|
+
|
|
8
|
+
**What:** Generate a new component with correct patterns for current preset.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/generate:component "UserCard - Display user info with avatar"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
👋 /generate:component đang chạy!
|
|
20
|
+
Tôi sẽ tạo component theo cấu trúc preset.
|
|
21
|
+
|
|
22
|
+
### Step 1: Analyze
|
|
23
|
+
```
|
|
24
|
+
[1/3] 🔍 Reading preset...
|
|
25
|
+
Detected: professional
|
|
26
|
+
UI Library: shadcn/ui
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 2: Generate
|
|
30
|
+
```
|
|
31
|
+
[2/3] 📝 Generating component...
|
|
32
|
+
|
|
33
|
+
📂 Files to create:
|
|
34
|
+
├── components/user-card/index.tsx
|
|
35
|
+
├── components/user-card/user-card.tsx
|
|
36
|
+
└── components/user-card/user-card.types.ts
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Step 3: Preview
|
|
40
|
+
```
|
|
41
|
+
[3/3] 📋 Preview:
|
|
42
|
+
|
|
43
|
+
// components/user-card/user-card.tsx
|
|
44
|
+
import { Card, CardHeader } from '@/components/ui/card';
|
|
45
|
+
import { Avatar } from '@/components/ui/avatar';
|
|
46
|
+
import { UserCardProps } from './user-card.types';
|
|
47
|
+
|
|
48
|
+
export function UserCard({ user }: UserCardProps) {
|
|
49
|
+
return (
|
|
50
|
+
<Card>
|
|
51
|
+
<CardHeader>
|
|
52
|
+
<Avatar src={user.avatar} />
|
|
53
|
+
<span>{user.name}</span>
|
|
54
|
+
</CardHeader>
|
|
55
|
+
</Card>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
👉 Create files? (ok/cancel)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Preset Patterns
|
|
65
|
+
|
|
66
|
+
| Preset | Pattern |
|
|
67
|
+
|--------|---------|
|
|
68
|
+
| Rapid | Single file component |
|
|
69
|
+
| Professional | Folder with types + tests |
|
|
70
|
+
| Enterprise | + stories + docs |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Options
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
/generate:component "Name" --with-test # Include test file
|
|
78
|
+
/generate:component "Name" --with-story # Include Storybook
|
|
79
|
+
/generate:component "Name" --client # Add "use client"
|
|
80
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: ⚡⚡⚡⚡ Generate page boilerplate based on current preset
|
|
3
|
+
argument-hint: [page name and description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /generate:page - Create Page Boilerplate
|
|
7
|
+
|
|
8
|
+
**What:** Generate a new page with correct structure for current preset.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/generate:page "Dashboard - Main user dashboard"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
👋 /generate:page đang chạy!
|
|
20
|
+
Tôi sẽ tạo page theo cấu trúc preset hiện tại.
|
|
21
|
+
|
|
22
|
+
### Step 1: Read Preset
|
|
23
|
+
```
|
|
24
|
+
[1/3] 🔍 Reading .cursorrules for preset...
|
|
25
|
+
Detected: professional
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Step 2: Generate Files
|
|
29
|
+
```
|
|
30
|
+
[2/3] 📝 Generating page structure...
|
|
31
|
+
|
|
32
|
+
📂 Files to create:
|
|
33
|
+
├── app/dashboard/page.tsx
|
|
34
|
+
├── app/dashboard/layout.tsx
|
|
35
|
+
└── app/dashboard/loading.tsx
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Step 3: Confirm
|
|
39
|
+
```
|
|
40
|
+
[3/3] 📋 Preview:
|
|
41
|
+
|
|
42
|
+
// app/dashboard/page.tsx
|
|
43
|
+
export default function DashboardPage() {
|
|
44
|
+
return (
|
|
45
|
+
<div>
|
|
46
|
+
<h1>Dashboard</h1>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
👉 Create files? (ok/cancel)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Preset-Aware Structure
|
|
57
|
+
|
|
58
|
+
| Preset | Structure |
|
|
59
|
+
|--------|-----------|
|
|
60
|
+
| Rapid | `app/[page]/page.tsx` only |
|
|
61
|
+
| Professional | + layout, loading, error |
|
|
62
|
+
| Enterprise | + module folder structure |
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Options
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
/generate:page "Name" --with-api # Include API route
|
|
70
|
+
/generate:page "Name" --with-form # Include form component
|
|
71
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Add a note or decision to project memory
|
|
3
|
+
argument-hint: [note or "decision: reason"]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /memory:add - Add to Memory
|
|
7
|
+
|
|
8
|
+
**What:** Add a note or record a decision to project memory.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/memory:add "Remember to add loading states"
|
|
13
|
+
/memory:add "decision: Use Redis for caching - better performance"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Types
|
|
19
|
+
|
|
20
|
+
### Add Note
|
|
21
|
+
```
|
|
22
|
+
/memory:add "Check API rate limits before launch"
|
|
23
|
+
|
|
24
|
+
✅ Note added!
|
|
25
|
+
|
|
26
|
+
📝 Notes (4):
|
|
27
|
+
1. Check API rate limits before launch ← NEW
|
|
28
|
+
2. Remember VAT calculation
|
|
29
|
+
3. Handle timezone for orders
|
|
30
|
+
4. Add email confirmation
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Add Decision
|
|
34
|
+
```
|
|
35
|
+
/memory:add "decision: Use SWR for data fetching - better cache control"
|
|
36
|
+
|
|
37
|
+
✅ Decision recorded!
|
|
38
|
+
|
|
39
|
+
🧠 Decisions (6):
|
|
40
|
+
1. Use SWR for data fetching ← NEW
|
|
41
|
+
2. Stripe for payments
|
|
42
|
+
3. PostgreSQL for database
|
|
43
|
+
...
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Categories
|
|
49
|
+
|
|
50
|
+
| Prefix | Type | Example |
|
|
51
|
+
|--------|------|---------|
|
|
52
|
+
| (none) | Note | `/memory:add "Remember X"` |
|
|
53
|
+
| `decision:` | Decision | `/memory:add "decision: Use Y"` |
|
|
54
|
+
| `todo:` | Todo | `/memory:add "todo: Implement Z"` |
|
|
55
|
+
| `important:` | Important | `/memory:add "important: Never do W"` |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Context
|
|
60
|
+
|
|
61
|
+
Notes và decisions sẽ appear trong:
|
|
62
|
+
- `/memory show`
|
|
63
|
+
- `/memory:load`
|
|
64
|
+
- `/context`
|
|
65
|
+
- AI context khi làm việc
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Load saved project context from memory
|
|
3
|
+
argument-hint: none
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /memory:load - Load Context
|
|
7
|
+
|
|
8
|
+
**What:** Load saved project context so AI immediately understands your project.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/memory:load
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Output
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/memory:load
|
|
21
|
+
|
|
22
|
+
📋 Loading project context...
|
|
23
|
+
|
|
24
|
+
✅ Context loaded!
|
|
25
|
+
|
|
26
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ 📂 PROJECT INFO │
|
|
28
|
+
├─────────────────────────────────────────────────────────────┤
|
|
29
|
+
│ Name: E-commerce Platform │
|
|
30
|
+
│ Tech: Next.js 14, TypeScript, Prisma, PostgreSQL │
|
|
31
|
+
│ Architecture: professional │
|
|
32
|
+
│ Last Updated: 2024-01-15 10:30:00 │
|
|
33
|
+
├─────────────────────────────────────────────────────────────┤
|
|
34
|
+
│ 📌 LAST SESSION │
|
|
35
|
+
├─────────────────────────────────────────────────────────────┤
|
|
36
|
+
│ Task: Implement checkout flow │
|
|
37
|
+
│ Phase: Cook (Phase 2/3) │
|
|
38
|
+
│ Pending: Add payment confirmation email │
|
|
39
|
+
├─────────────────────────────────────────────────────────────┤
|
|
40
|
+
│ 🧠 RECENT DECISIONS │
|
|
41
|
+
├─────────────────────────────────────────────────────────────┤
|
|
42
|
+
│ • Use Stripe for payments (secure, well-documented) │
|
|
43
|
+
│ • Store only Stripe customer ID locally │
|
|
44
|
+
│ • Use webhooks for async payment updates │
|
|
45
|
+
├─────────────────────────────────────────────────────────────┤
|
|
46
|
+
│ 📝 NOTES │
|
|
47
|
+
├─────────────────────────────────────────────────────────────┤
|
|
48
|
+
│ • Remember VAT calculation for EU customers │
|
|
49
|
+
│ • Check timezone handling for order timestamps │
|
|
50
|
+
└─────────────────────────────────────────────────────────────┘
|
|
51
|
+
|
|
52
|
+
🧠 AI now knows context của project. Sẵn sàng làm việc!
|
|
53
|
+
|
|
54
|
+
📌 Continue: /cook "Phase 3" or /suggest
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## When To Use
|
|
60
|
+
|
|
61
|
+
| Situation | Action |
|
|
62
|
+
|-----------|--------|
|
|
63
|
+
| Mới mở Cursor | `/memory:load` |
|
|
64
|
+
| Sau khi restart | `/memory:load` |
|
|
65
|
+
| AI "quên" context | `/memory:load` |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Auto-Load
|
|
70
|
+
|
|
71
|
+
💡 Tip: Add to `/start` để auto-load memory:
|
|
72
|
+
```
|
|
73
|
+
/start sẽ tự động gọi /memory:load
|
|
74
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Save current project context to memory
|
|
3
|
+
argument-hint: [optional: description of what to save]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /memory:save - Save Context
|
|
7
|
+
|
|
8
|
+
**What:** Save current project context so AI remembers next session.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/memory:save # Save current context
|
|
13
|
+
/memory:save "Finished auth feature" # Save with note
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What Gets Saved
|
|
19
|
+
|
|
20
|
+
| Category | Content |
|
|
21
|
+
|----------|---------|
|
|
22
|
+
| Project | Name, tech stack, architecture |
|
|
23
|
+
| Session | Current task, phase, open files |
|
|
24
|
+
| Decisions | Choices made during session |
|
|
25
|
+
| Progress | What was completed |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/memory:save
|
|
33
|
+
|
|
34
|
+
📊 Saving project context...
|
|
35
|
+
|
|
36
|
+
✅ Memory saved!
|
|
37
|
+
|
|
38
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
39
|
+
│ 📂 Project: E-commerce Platform │
|
|
40
|
+
│ 📌 Last Task: Implement checkout flow │
|
|
41
|
+
│ 📊 Phase: Cook (completed) │
|
|
42
|
+
│ 🧠 Decisions: 5 │
|
|
43
|
+
│ 📝 Notes: 3 │
|
|
44
|
+
├─────────────────────────────────────────────────────────────┤
|
|
45
|
+
│ 💾 Saved to: .cursor/context/memory.json │
|
|
46
|
+
│ ⏰ Time: 2024-01-15 10:30:00 │
|
|
47
|
+
└─────────────────────────────────────────────────────────────┘
|
|
48
|
+
|
|
49
|
+
📌 Next session: Run /memory:load or /start
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Auto-Save Tips
|
|
55
|
+
|
|
56
|
+
💡 Nên save khi:
|
|
57
|
+
- Hoàn thành một feature
|
|
58
|
+
- Đưa ra architecture decision
|
|
59
|
+
- Trước khi đóng Cursor
|
|
60
|
+
- Kết thúc ngày làm việc
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## File Location
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
.cursor/context/memory.json
|
|
68
|
+
```
|