anchi-kit 2.2.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.
Files changed (51) hide show
  1. package/.cursor/commands/entity.md +135 -0
  2. package/.cursor/commands/memory/add.md +65 -0
  3. package/.cursor/commands/memory/load.md +74 -0
  4. package/.cursor/commands/memory/save.md +68 -0
  5. package/.cursor/commands/memory.md +141 -0
  6. package/README.md +427 -127
  7. package/package.json +1 -1
  8. package/src/cli.js +6 -0
  9. package/src/commands/memory.js +158 -0
  10. package/src/lib/contextDatabase.js +362 -0
  11. package/src/lib/memoryManager.js +250 -0
  12. package/.antigravity/agent/code-reviewer.md +0 -141
  13. package/.antigravity/agent/debugger.md +0 -75
  14. package/.antigravity/agent/docs-manager.md +0 -120
  15. package/.antigravity/agent/git-manager.md +0 -60
  16. package/.antigravity/agent/planner-researcher.md +0 -101
  17. package/.antigravity/agent/planner.md +0 -88
  18. package/.antigravity/agent/project-manager.md +0 -113
  19. package/.antigravity/agent/researcher.md +0 -174
  20. package/.antigravity/agent/solution-brainstormer.md +0 -90
  21. package/.antigravity/agent/system-architecture.md +0 -193
  22. package/.antigravity/agent/tester.md +0 -96
  23. package/.antigravity/agent/ui-ux-designer.md +0 -233
  24. package/.antigravity/agent/ui-ux-developer.md +0 -98
  25. package/.antigravity/command/cook.md +0 -7
  26. package/.antigravity/command/debug.md +0 -10
  27. package/.antigravity/command/design/3d.md +0 -65
  28. package/.antigravity/command/design/fast.md +0 -18
  29. package/.antigravity/command/design/good.md +0 -21
  30. package/.antigravity/command/design/screenshot.md +0 -22
  31. package/.antigravity/command/design/video.md +0 -22
  32. package/.antigravity/command/docs/init.md +0 -11
  33. package/.antigravity/command/docs/summarize.md +0 -10
  34. package/.antigravity/command/docs/update.md +0 -18
  35. package/.antigravity/command/fix/ci.md +0 -8
  36. package/.antigravity/command/fix/fast.md +0 -11
  37. package/.antigravity/command/fix/hard.md +0 -15
  38. package/.antigravity/command/fix/logs.md +0 -16
  39. package/.antigravity/command/fix/test.md +0 -18
  40. package/.antigravity/command/fix/types.md +0 -10
  41. package/.antigravity/command/git/cm.md +0 -5
  42. package/.antigravity/command/git/cp.md +0 -4
  43. package/.antigravity/command/plan/ci.md +0 -12
  44. package/.antigravity/command/plan/two.md +0 -13
  45. package/.antigravity/command/plan.md +0 -10
  46. package/.antigravity/command/test.md +0 -7
  47. package/.antigravity/command/watzup.md +0 -8
  48. package/ANTIGRAVITY.md +0 -36
  49. package/GEMINI.md +0 -75
  50. package/scripts/prepare-release-assets.cjs +0 -97
  51. package/scripts/send-discord-release.cjs +0 -204
@@ -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,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
+ ```
@@ -0,0 +1,141 @@
1
+ ---
2
+ description: ⚡⚡⚡⚡ Project memory - Save and load project context so AI remembers
3
+ argument-hint: [optional: save|load|show|clear]
4
+ ---
5
+
6
+ # /memory - Project Memory Management
7
+
8
+ **What:** Save and load project context so AI doesn't "forget" between sessions.
9
+
10
+ ## Usage
11
+ ```
12
+ /memory # Show current memory
13
+ /memory show # Same as above
14
+ /memory save # Save current context
15
+ /memory load # Load saved context
16
+ /memory clear # Clear all memory
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Workflow
22
+
23
+ ### Tự Động Khi Bắt Đầu Session
24
+
25
+ ```
26
+ 👋 /memory load
27
+
28
+ 📋 LOADED PROJECT CONTEXT
29
+
30
+ ┌─────────────────────────────────────────────────────────────┐
31
+ │ 📂 Project: E-commerce Platform │
32
+ │ 🔧 Tech: Next.js, TypeScript, Prisma, PostgreSQL │
33
+ │ 🏗️ Architecture: professional │
34
+ ├─────────────────────────────────────────────────────────────┤
35
+ │ 📌 Last Task: Implement user authentication │
36
+ │ 📊 Phase: Cook (Phase 2/3) │
37
+ │ 📋 Pending: Add password reset feature │
38
+ ├─────────────────────────────────────────────────────────────┤
39
+ │ 🧠 Recent Decisions: │
40
+ │ • Use NextAuth.js for auth │
41
+ │ • JWT with refresh tokens │
42
+ │ • Store sessions in database │
43
+ └─────────────────────────────────────────────────────────────┘
44
+
45
+ ✅ Context loaded! AI now remembers your project.
46
+ ```
47
+
48
+ ### Lưu Khi Kết Thúc Session
49
+
50
+ ```
51
+ /memory save
52
+
53
+ ✅ Context saved!
54
+
55
+ 📊 Saved:
56
+ • Project info
57
+ • Current task & phase
58
+ • 3 decisions
59
+ • 2 notes
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Memory Data
65
+
66
+ | Category | Content |
67
+ |----------|---------|
68
+ | **Project** | Name, tech stack, architecture |
69
+ | **Session** | Last task, current phase, pending actions |
70
+ | **Decisions** | Architecture/design decisions đã đưa ra |
71
+ | **Notes** | Quick notes về codebase |
72
+ | **Entities** | Components, modules quan trọng |
73
+
74
+ ---
75
+
76
+ ## Commands Chi Tiết
77
+
78
+ ### /memory show
79
+ ```
80
+ 📋 CURRENT MEMORY
81
+
82
+ Project: My App
83
+ Tech: Next.js, Prisma
84
+ Architecture: professional
85
+
86
+ Last Task: Add payment integration
87
+ Phase: Plan (waiting approval)
88
+
89
+ Decisions (3):
90
+ • Use Stripe for payments
91
+ • Store cards via Stripe, not local
92
+ • Webhook for payment events
93
+
94
+ Notes (2):
95
+ • Remember to add VAT calculation
96
+ • Check timezone for invoices
97
+ ```
98
+
99
+ ### /memory add "note"
100
+ ```
101
+ /memory add "User requested dark mode support"
102
+
103
+ ✅ Note added!
104
+ ```
105
+
106
+ ### /memory decision "decision" "reason"
107
+ ```
108
+ /memory decision "Use Redis for caching" "Better performance for session storage"
109
+
110
+ ✅ Decision recorded!
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Auto-Save Triggers
116
+
117
+ AI sẽ tự động suggest `/memory save` khi:
118
+ - Kết thúc một task lớn
119
+ - Đưa ra architecture decision
120
+ - Trước khi close Cursor
121
+ - Sau 30 phút làm việc
122
+
123
+ ---
124
+
125
+ ## Storage Location
126
+
127
+ ```
128
+ .cursor/context/
129
+ ├── memory.json # Main memory file
130
+ └── cache/ # Summaries cache
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Integration
136
+
137
+ Memory được sử dụng bởi:
138
+ - `/start` - Load memory khi start
139
+ - `/plan` - Reference past decisions
140
+ - `/context` - Include in context summary
141
+ - `/suggest` - Smart suggestions based on history