anchi-kit 2.0.3 → 2.2.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/anchi-kit.config.yaml +32 -0
- package/.cursor/commands/context.md +76 -0
- package/.cursor/commands/cook/auto.md +80 -10
- 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/plan/auto.md +77 -0
- package/.cursor/commands/suggest.md +65 -0
- package/.cursor/custom-commands/example.md +30 -0
- package/.cursor/hooks.yaml +28 -0
- package/.cursor/team.yaml +63 -0
- package/.cursor/workflows/feature.yaml +51 -0
- package/.cursor/workflows/hotfix.yaml +35 -0
- package/.cursor/workflows/release.yaml +61 -0
- package/CURSOR.md +5 -5
- package/README.md +10 -5
- package/docs/{codebase-summary.md → CODEBASE.md} +2 -2
- package/docs/{code-standards.md → CODE_STYLE.md} +1 -1
- package/docs/FAQ.md +1 -1
- package/docs/{ONBOARDING_CHECKLIST.md → ONBOARDING.md} +4 -4
- package/docs/{project-overview-pdr.md → PROJECT.md} +2 -2
- package/docs/{TEAM_PIPELINE.md → WORKFLOW.md} +1 -1
- package/package.json +1 -1
- package/scripts/check-setup.ps1 +1 -1
- package/scripts/install-hooks.ps1 +60 -0
- package/scripts/install-hooks.sh +54 -0
- package/scripts/new-project.ps1 +1 -1
- package/scripts/new-project.sh +61 -61
- package/src/cli.js +6 -0
- package/src/commands/doctor.js +106 -0
- package/src/lib/configManager.js +200 -0
- package/docs/PROJECT_SUMMARY.md +0 -86
- /package/docs/{system-architecture.md → ARCHITECTURE.md} +0 -0
- /package/docs/{project-roadmap.md → ROADMAP.md} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# anchi-kit Configuration
|
|
2
|
+
# https://github.com/ANCHI-STE/anchi-webkit-dev
|
|
3
|
+
# ═══════════════════════════════════════════════════════════════
|
|
4
|
+
|
|
5
|
+
version: "2.1"
|
|
6
|
+
profile: developer
|
|
7
|
+
|
|
8
|
+
# Model preferences for AI
|
|
9
|
+
model_preference:
|
|
10
|
+
default: auto
|
|
11
|
+
complex: opus
|
|
12
|
+
economy: haiku
|
|
13
|
+
|
|
14
|
+
# Feature toggles
|
|
15
|
+
features:
|
|
16
|
+
auto_commit: false
|
|
17
|
+
auto_push: false
|
|
18
|
+
progress_indicators: true
|
|
19
|
+
summary_cards: true
|
|
20
|
+
quick_actions: true
|
|
21
|
+
|
|
22
|
+
# Team settings (optional)
|
|
23
|
+
team:
|
|
24
|
+
role: null
|
|
25
|
+
slack_webhook: null
|
|
26
|
+
notifications: true
|
|
27
|
+
|
|
28
|
+
# Git hooks (requires setup)
|
|
29
|
+
hooks:
|
|
30
|
+
enabled: false
|
|
31
|
+
pre_commit: []
|
|
32
|
+
post_merge: []
|
|
@@ -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) |
|
|
@@ -1,15 +1,85 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: [
|
|
2
|
+
description: ⚡⚡⚡⚡ Auto-pilot cooking - Implement with minimal interruptions
|
|
3
|
+
argument-hint: [task or phase]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
<tasks>$ARGUMENTS</tasks>
|
|
6
|
+
# /cook:auto - Auto-Pilot Implementation
|
|
8
7
|
|
|
9
|
-
**
|
|
10
|
-
**Ensure token efficiency while maintaining high quality.**
|
|
8
|
+
**What:** AI implements with minimal interruptions, auto-proceeding between phases.
|
|
11
9
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/cook:auto "Phase 1: Create components"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
👋 /cook:auto đang chạy!
|
|
20
|
+
Tôi sẽ implement liên tục, chỉ dừng khi có vấn đề.
|
|
21
|
+
|
|
22
|
+
### Auto-Proceed Logic
|
|
23
|
+
```
|
|
24
|
+
📊 Auto-Pilot Mode
|
|
25
|
+
|
|
26
|
+
[1/5] 🔍 Research... ✅
|
|
27
|
+
[2/5] 📝 Plan... ✅
|
|
28
|
+
[3/5] 💻 Implement... ✅
|
|
29
|
+
[4/5] 🧪 Test... ✅
|
|
30
|
+
[5/5] 📋 Summary... ✅
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## When AI Will Pause
|
|
36
|
+
|
|
37
|
+
| Situation | Action |
|
|
38
|
+
|-----------|--------|
|
|
39
|
+
| Error encountered | Stop and report |
|
|
40
|
+
| Tests fail | Stop and report |
|
|
41
|
+
| Destructive change | Ask confirmation |
|
|
42
|
+
| Unclear requirement | Ask question |
|
|
43
|
+
| > 5 files changed | Show summary |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Safety Rules
|
|
48
|
+
|
|
49
|
+
- **NO auto-commit** unless config allows
|
|
50
|
+
- **NO auto-push** ever
|
|
51
|
+
- **SHOW** summary after completion
|
|
52
|
+
- **OFFER** to pause at any step
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Progress Display
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
📊 Auto-Pilot Progress
|
|
60
|
+
|
|
61
|
+
Created: user.service.ts ✅
|
|
62
|
+
user.types.ts ✅
|
|
63
|
+
Modified: api/users/route.ts ✅
|
|
64
|
+
Tests: 3/3 passed ✅
|
|
65
|
+
|
|
66
|
+
┌─────────────────────────────────────┐
|
|
67
|
+
│ 📊 COMPLETE │
|
|
68
|
+
├─────────────────────────────────────┤
|
|
69
|
+
│ ✅ Created: 2 files │
|
|
70
|
+
│ 📝 Modified: 1 file │
|
|
71
|
+
│ 🧪 Tests: All passed │
|
|
72
|
+
├─────────────────────────────────────┤
|
|
73
|
+
│ 📌 Commit? (y/n) │
|
|
74
|
+
└─────────────────────────────────────┘
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Integration with Config
|
|
80
|
+
|
|
81
|
+
Reads from `anchi-kit.config.yaml`:
|
|
82
|
+
```yaml
|
|
83
|
+
features:
|
|
84
|
+
auto_commit: false # If true, will auto-commit
|
|
85
|
+
```
|
|
@@ -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,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: ⚡⚡⚡⚡ Auto-pilot planning - AI creates and proceeds with minimal input
|
|
3
|
+
argument-hint: [feature description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /plan:auto - Auto-Pilot Planning
|
|
7
|
+
|
|
8
|
+
**What:** AI creates plan AND proceeds without manual confirmation.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/plan:auto "Feature description"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
👋 /plan:auto đang chạy!
|
|
20
|
+
Tôi sẽ tự động tạo plan và bắt đầu implement.
|
|
21
|
+
|
|
22
|
+
### Step 1: Analyze
|
|
23
|
+
```
|
|
24
|
+
[1/4] 🔍 Analyzing request...
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Step 2: Create Plan
|
|
28
|
+
```
|
|
29
|
+
[2/4] 📝 Creating plan...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Step 3: Auto-Approve (if simple)
|
|
33
|
+
```
|
|
34
|
+
[3/4] ✅ Plan approved (auto)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Step 4: Start Implementation
|
|
38
|
+
```
|
|
39
|
+
[4/4] 🚀 Starting /cook...
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Auto-Proceed Rules
|
|
45
|
+
|
|
46
|
+
| Condition | Action |
|
|
47
|
+
|-----------|--------|
|
|
48
|
+
| Simple task (< 3 files) | Auto-proceed |
|
|
49
|
+
| Medium task (3-10 files) | Ask confirmation |
|
|
50
|
+
| Complex task (> 10 files) | Require manual approval |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Safety
|
|
55
|
+
|
|
56
|
+
- **ALWAYS** show plan summary before proceeding
|
|
57
|
+
- **NEVER** auto-push to git
|
|
58
|
+
- **STOP** if destructive changes detected
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Example
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
/plan:auto "Add user avatar upload"
|
|
66
|
+
|
|
67
|
+
📊 Auto-Pilot Mode
|
|
68
|
+
|
|
69
|
+
[1/4] 🔍 Analyzing...
|
|
70
|
+
[2/4] 📝 Plan created:
|
|
71
|
+
• 2 files to create
|
|
72
|
+
• 1 file to modify
|
|
73
|
+
[3/4] ✅ Auto-approved (simple task)
|
|
74
|
+
[4/4] 🚀 Starting implementation...
|
|
75
|
+
|
|
76
|
+
👉 Type 'stop' anytime to pause
|
|
77
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: ⚡⚡⚡⚡ AI suggests next action based on current context
|
|
3
|
+
argument-hint: [optional: current task status]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /suggest - AI Suggests Next Action
|
|
7
|
+
|
|
8
|
+
**What:** AI analyzes current context and suggests the best next command.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/suggest # Based on current state
|
|
13
|
+
/suggest "Just finished auth" # With context
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
👋 /suggest đang chạy!
|
|
21
|
+
Tôi sẽ phân tích và gợi ý action tiếp theo.
|
|
22
|
+
|
|
23
|
+
### Output
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
🤖 AI SUGGESTION
|
|
27
|
+
|
|
28
|
+
📊 Current State Analysis:
|
|
29
|
+
• Last command: /cook "Phase 1"
|
|
30
|
+
• Files changed: 3
|
|
31
|
+
• Tests: Not run yet
|
|
32
|
+
|
|
33
|
+
💡 Suggested Next Action:
|
|
34
|
+
|
|
35
|
+
/test
|
|
36
|
+
|
|
37
|
+
📋 Reasoning:
|
|
38
|
+
Bạn vừa implement xong Phase 1. Nên chạy tests
|
|
39
|
+
để verify trước khi tiếp tục Phase 2.
|
|
40
|
+
|
|
41
|
+
📌 Alternative Actions:
|
|
42
|
+
• /review - Review code changes
|
|
43
|
+
• /cook "Phase 2" - Continue implementation
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Smart Suggestions
|
|
49
|
+
|
|
50
|
+
| Context | Suggestion |
|
|
51
|
+
|---------|------------|
|
|
52
|
+
| After /plan | `/cook "Phase 1"` |
|
|
53
|
+
| After /cook | `/test` or `/review` |
|
|
54
|
+
| After /test fail | `/fix:fast` |
|
|
55
|
+
| After /review | `git commit` |
|
|
56
|
+
| New session | `/scout` or `/context` |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Options
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
/suggest --verbose # Show detailed reasoning
|
|
64
|
+
/suggest --all # Show all possible actions
|
|
65
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Custom command example - Copy and modify this template
|
|
3
|
+
argument-hint: [description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# My Custom Command
|
|
7
|
+
|
|
8
|
+
**What it does:** [Describe your command]
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/my-command "description"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read relevant files
|
|
18
|
+
2. Analyze context
|
|
19
|
+
3. Execute action
|
|
20
|
+
4. Report results
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
/my-command "Add authentication to /api/users"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
> 💡 **Tip:** Create your own commands in `.cursor/custom-commands/`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Git Hooks Configuration
|
|
2
|
+
# Run these commands automatically on git events
|
|
3
|
+
# ═══════════════════════════════════════════════════════════════
|
|
4
|
+
|
|
5
|
+
# Set to true to enable hooks
|
|
6
|
+
enabled: false
|
|
7
|
+
|
|
8
|
+
# Commands to run before commit
|
|
9
|
+
# Note: These are suggestions for AI, not actual shell commands
|
|
10
|
+
pre_commit:
|
|
11
|
+
- review:fast # Quick code review
|
|
12
|
+
# - test:related # Run related tests
|
|
13
|
+
|
|
14
|
+
# Commands to run after merge
|
|
15
|
+
post_merge:
|
|
16
|
+
- docs:update # Update documentation
|
|
17
|
+
# - deps:check # Check for dependency updates
|
|
18
|
+
|
|
19
|
+
# Commands to run before push
|
|
20
|
+
pre_push:
|
|
21
|
+
# - test:all # Run all tests
|
|
22
|
+
# - build:check # Verify build
|
|
23
|
+
|
|
24
|
+
# ═══════════════════════════════════════════════════════════════
|
|
25
|
+
# To install hooks, run:
|
|
26
|
+
# Windows: .\scripts\install-hooks.ps1
|
|
27
|
+
# macOS/Linux: ./scripts/install-hooks.sh
|
|
28
|
+
# ═══════════════════════════════════════════════════════════════
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Team Configuration
|
|
2
|
+
# Shared settings for team collaboration
|
|
3
|
+
# ═══════════════════════════════════════════════════════════════
|
|
4
|
+
|
|
5
|
+
# Team info
|
|
6
|
+
team:
|
|
7
|
+
name: "My Team"
|
|
8
|
+
project: "Project Name"
|
|
9
|
+
|
|
10
|
+
# Team members (optional - for standup generation)
|
|
11
|
+
members:
|
|
12
|
+
# - name: Duong
|
|
13
|
+
# role: lead
|
|
14
|
+
# github: "@duong"
|
|
15
|
+
# slack: "@duong"
|
|
16
|
+
|
|
17
|
+
# Roles and their default profiles
|
|
18
|
+
roles:
|
|
19
|
+
lead:
|
|
20
|
+
profile: fullstack
|
|
21
|
+
can_approve: true
|
|
22
|
+
frontend:
|
|
23
|
+
profile: ui_ux
|
|
24
|
+
can_approve: false
|
|
25
|
+
backend:
|
|
26
|
+
profile: developer
|
|
27
|
+
can_approve: false
|
|
28
|
+
fullstack:
|
|
29
|
+
profile: fullstack
|
|
30
|
+
can_approve: false
|
|
31
|
+
|
|
32
|
+
# Workflow rules
|
|
33
|
+
workflows:
|
|
34
|
+
feature:
|
|
35
|
+
require_plan: true
|
|
36
|
+
require_review: true
|
|
37
|
+
approvers: [lead]
|
|
38
|
+
|
|
39
|
+
hotfix:
|
|
40
|
+
require_plan: false
|
|
41
|
+
require_review: false
|
|
42
|
+
approvers: []
|
|
43
|
+
|
|
44
|
+
release:
|
|
45
|
+
require_plan: true
|
|
46
|
+
require_review: true
|
|
47
|
+
approvers: [lead]
|
|
48
|
+
|
|
49
|
+
# Notifications (optional)
|
|
50
|
+
notifications:
|
|
51
|
+
enabled: false
|
|
52
|
+
slack_webhook: null
|
|
53
|
+
# Events to notify
|
|
54
|
+
events:
|
|
55
|
+
- plan_created
|
|
56
|
+
- review_completed
|
|
57
|
+
- release_ready
|
|
58
|
+
|
|
59
|
+
# Standup settings (optional)
|
|
60
|
+
standup:
|
|
61
|
+
enabled: false
|
|
62
|
+
time: "09:00"
|
|
63
|
+
channel: "#standup"
|