@neyugn/agent-kits 0.1.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/LICENSE +21 -0
- package/README.md +514 -0
- package/README.vi.md +410 -0
- package/README.zh.md +410 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +422 -0
- package/kits/coder/ARCHITECTURE.md +289 -0
- package/kits/coder/agents/ai-engineer.md +344 -0
- package/kits/coder/agents/backend-specialist.md +270 -0
- package/kits/coder/agents/cloud-architect.md +363 -0
- package/kits/coder/agents/code-reviewer.md +284 -0
- package/kits/coder/agents/data-engineer.md +401 -0
- package/kits/coder/agents/database-specialist.md +251 -0
- package/kits/coder/agents/debugger.md +209 -0
- package/kits/coder/agents/devops-engineer.md +281 -0
- package/kits/coder/agents/documentation-writer.md +296 -0
- package/kits/coder/agents/frontend-specialist.md +298 -0
- package/kits/coder/agents/i18n-specialist.md +348 -0
- package/kits/coder/agents/integration-specialist.md +314 -0
- package/kits/coder/agents/mobile-developer.md +271 -0
- package/kits/coder/agents/multi-tenant-architect.md +281 -0
- package/kits/coder/agents/orchestrator.md +263 -0
- package/kits/coder/agents/performance-analyst.md +327 -0
- package/kits/coder/agents/project-planner.md +277 -0
- package/kits/coder/agents/queue-specialist.md +282 -0
- package/kits/coder/agents/realtime-specialist.md +267 -0
- package/kits/coder/agents/security-auditor.md +253 -0
- package/kits/coder/agents/test-engineer.md +315 -0
- package/kits/coder/agents/ux-researcher.md +388 -0
- package/kits/coder/rules/.cursorrules +287 -0
- package/kits/coder/rules/CLAUDE.md +287 -0
- package/kits/coder/rules/CODEX.md +287 -0
- package/kits/coder/rules/GEMINI.md +287 -0
- package/kits/coder/scripts/checklist.py +318 -0
- package/kits/coder/scripts/kit_status.py +292 -0
- package/kits/coder/scripts/skills_manager.py +243 -0
- package/kits/coder/scripts/verify_all.py +391 -0
- package/kits/coder/skills/accessibility-patterns/SKILL.md +372 -0
- package/kits/coder/skills/accessibility-patterns/scripts/a11y_checker.py +211 -0
- package/kits/coder/skills/ai-rag-patterns/SKILL.md +444 -0
- package/kits/coder/skills/api-patterns/SKILL.md +316 -0
- package/kits/coder/skills/api-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/api-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/api-patterns/scripts/api_validator.py +253 -0
- package/kits/coder/skills/api-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/auth-patterns/SKILL.md +267 -0
- package/kits/coder/skills/aws-patterns/SKILL.md +576 -0
- package/kits/coder/skills/brainstorming/SKILL.md +370 -0
- package/kits/coder/skills/brainstorming/assets/.gitkeep +1 -0
- package/kits/coder/skills/brainstorming/references/deep-dive.md +21 -0
- package/kits/coder/skills/brainstorming/scripts/validate.py +56 -0
- package/kits/coder/skills/clean-code/SKILL.md +240 -0
- package/kits/coder/skills/clean-code/assets/.gitkeep +1 -0
- package/kits/coder/skills/clean-code/references/deep-dive.md +21 -0
- package/kits/coder/skills/clean-code/scripts/lint_runner.py +186 -0
- package/kits/coder/skills/clean-code/scripts/validate.py +56 -0
- package/kits/coder/skills/database-design/SKILL.md +255 -0
- package/kits/coder/skills/database-design/assets/.gitkeep +1 -0
- package/kits/coder/skills/database-design/references/deep-dive.md +21 -0
- package/kits/coder/skills/database-design/scripts/schema_validator.py +272 -0
- package/kits/coder/skills/database-design/scripts/validate.py +56 -0
- package/kits/coder/skills/docker-patterns/SKILL.md +240 -0
- package/kits/coder/skills/documentation-templates/SKILL.md +441 -0
- package/kits/coder/skills/e2e-testing/SKILL.md +457 -0
- package/kits/coder/skills/flutter-patterns/SKILL.md +330 -0
- package/kits/coder/skills/frontend-design/SKILL.md +127 -0
- package/kits/coder/skills/github-actions/SKILL.md +349 -0
- package/kits/coder/skills/gitlab-ci-patterns/SKILL.md +466 -0
- package/kits/coder/skills/graphql-patterns/SKILL.md +558 -0
- package/kits/coder/skills/i18n-localization/SKILL.md +345 -0
- package/kits/coder/skills/i18n-localization/scripts/i18n_checker.py +267 -0
- package/kits/coder/skills/kubernetes-patterns/SKILL.md +357 -0
- package/kits/coder/skills/mermaid-diagrams/SKILL.md +351 -0
- package/kits/coder/skills/mobile-design/SKILL.md +305 -0
- package/kits/coder/skills/monitoring-observability/SKILL.md +458 -0
- package/kits/coder/skills/multi-tenancy/SKILL.md +317 -0
- package/kits/coder/skills/multi-tenancy/assets/.gitkeep +1 -0
- package/kits/coder/skills/multi-tenancy/references/deep-dive.md +21 -0
- package/kits/coder/skills/multi-tenancy/scripts/validate.py +56 -0
- package/kits/coder/skills/nodejs-best-practices/SKILL.md +220 -0
- package/kits/coder/skills/performance-profiling/SKILL.md +333 -0
- package/kits/coder/skills/performance-profiling/assets/.gitkeep +1 -0
- package/kits/coder/skills/performance-profiling/references/deep-dive.md +21 -0
- package/kits/coder/skills/performance-profiling/scripts/validate.py +56 -0
- package/kits/coder/skills/plan-writing/SKILL.md +360 -0
- package/kits/coder/skills/plan-writing/assets/.gitkeep +1 -0
- package/kits/coder/skills/plan-writing/references/deep-dive.md +21 -0
- package/kits/coder/skills/plan-writing/scripts/validate.py +56 -0
- package/kits/coder/skills/postgres-patterns/SKILL.md +361 -0
- package/kits/coder/skills/prompt-engineering/SKILL.md +277 -0
- package/kits/coder/skills/queue-patterns/SKILL.md +359 -0
- package/kits/coder/skills/queue-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/queue-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/queue-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/react-native-patterns/SKILL.md +393 -0
- package/kits/coder/skills/react-patterns/SKILL.md +319 -0
- package/kits/coder/skills/realtime-patterns/SKILL.md +506 -0
- package/kits/coder/skills/realtime-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/realtime-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/realtime-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/redis-patterns/SKILL.md +484 -0
- package/kits/coder/skills/security-fundamentals/SKILL.md +363 -0
- package/kits/coder/skills/security-fundamentals/assets/.gitkeep +1 -0
- package/kits/coder/skills/security-fundamentals/references/deep-dive.md +21 -0
- package/kits/coder/skills/security-fundamentals/scripts/security_scan.py +326 -0
- package/kits/coder/skills/security-fundamentals/scripts/validate.py +56 -0
- package/kits/coder/skills/seo-patterns/SKILL.md +262 -0
- package/kits/coder/skills/seo-patterns/scripts/seo_checker.py +211 -0
- package/kits/coder/skills/systematic-debugging/SKILL.md +478 -0
- package/kits/coder/skills/systematic-debugging/assets/.gitkeep +1 -0
- package/kits/coder/skills/systematic-debugging/references/deep-dive.md +21 -0
- package/kits/coder/skills/systematic-debugging/scripts/validate.py +56 -0
- package/kits/coder/skills/tailwind-patterns/SKILL.md +395 -0
- package/kits/coder/skills/terraform-patterns/SKILL.md +470 -0
- package/kits/coder/skills/testing-patterns/SKILL.md +285 -0
- package/kits/coder/skills/testing-patterns/assets/.gitkeep +1 -0
- package/kits/coder/skills/testing-patterns/references/deep-dive.md +21 -0
- package/kits/coder/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/kits/coder/skills/testing-patterns/scripts/validate.py +56 -0
- package/kits/coder/skills/typescript-patterns/SKILL.md +417 -0
- package/kits/coder/skills/ui-ux-pro-max/SKILL.md +364 -0
- package/kits/coder/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/kits/coder/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/kits/coder/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/kits/coder/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/kits/coder/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/kits/coder/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/kits/coder/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/kits/coder/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/kits/coder/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/kits/coder/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/kits/coder/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/kits/coder/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/kits/coder/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/design_system.py +488 -0
- package/kits/coder/skills/ui-ux-pro-max/scripts/search.py +76 -0
- package/kits/coder/workflows/.gitkeep +20 -0
- package/kits/coder/workflows/create.md +152 -0
- package/kits/coder/workflows/debug.md +223 -0
- package/kits/coder/workflows/deploy.md +283 -0
- package/kits/coder/workflows/orchestrate.md +243 -0
- package/kits/coder/workflows/plan.md +134 -0
- package/kits/coder/workflows/test.md +237 -0
- package/kits/coder/workflows/ui-ux-pro-max.md +109 -0
- package/package.json +49 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create new application from scratch. Triggers app-builder skill with multi-agent orchestration.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /create - Application Creation Workflow
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
|
|
13
|
+
Use when user says: "create", "build", "tạo", "make", "new app", or `/create`
|
|
14
|
+
|
|
15
|
+
## Agent
|
|
16
|
+
|
|
17
|
+
Route to `orchestrator` agent → coordinates specialists
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🔴 Critical Rules
|
|
22
|
+
|
|
23
|
+
1. **Socratic Gate First** - Do NOT start building without understanding requirements
|
|
24
|
+
2. **Plan Before Code** - Create or reference a plan before implementation
|
|
25
|
+
3. **Multi-Agent** - Orchestrate specialists for each domain
|
|
26
|
+
4. **Preview at End** - Start dev server and provide URL
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
### Phase 1: Request Analysis
|
|
33
|
+
|
|
34
|
+
Understand user's request:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## Request Analysis
|
|
38
|
+
|
|
39
|
+
- **Type**: Web app / Mobile app / API / CLI
|
|
40
|
+
- **Core Features**: [List main features]
|
|
41
|
+
- **Stack**: [Inferred or specified tech stack]
|
|
42
|
+
- **Complexity**: Simple / Medium / Complex
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If unclear, ask:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
Before I start building, I need to understand:
|
|
49
|
+
|
|
50
|
+
1. **Type**: What kind of application? (Web/Mobile/API)
|
|
51
|
+
2. **Features**: What are the 3 most important features?
|
|
52
|
+
3. **Users**: Who will use this application?
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Phase 2: Project Planning
|
|
56
|
+
|
|
57
|
+
Two options:
|
|
58
|
+
|
|
59
|
+
| Condition | Action |
|
|
60
|
+
| ----------- | ----------------------------------------- |
|
|
61
|
+
| Plan exists | Read `docs/PLAN-*.md` |
|
|
62
|
+
| No plan | Create brief plan using `project-planner` |
|
|
63
|
+
|
|
64
|
+
Determine:
|
|
65
|
+
|
|
66
|
+
- Tech stack selection
|
|
67
|
+
- File structure
|
|
68
|
+
- Component breakdown
|
|
69
|
+
- API design (if applicable)
|
|
70
|
+
|
|
71
|
+
### Phase 3: Orchestrated Building
|
|
72
|
+
|
|
73
|
+
Coordinate specialists:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
## Agent Assignments
|
|
77
|
+
|
|
78
|
+
| Agent | Task |
|
|
79
|
+
| --------------------- | ------------------- |
|
|
80
|
+
| `database-specialist` | Schema design |
|
|
81
|
+
| `backend-specialist` | API implementation |
|
|
82
|
+
| `frontend-specialist` | UI components |
|
|
83
|
+
| `devops-engineer` | Config & deployment |
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Build order:
|
|
87
|
+
|
|
88
|
+
1. Database schema → 2. Backend API → 3. Frontend UI → 4. Integration
|
|
89
|
+
|
|
90
|
+
### Phase 4: Testing & Preview
|
|
91
|
+
|
|
92
|
+
After building:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Start development server
|
|
96
|
+
pnpm dev
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Phase 5: Report
|
|
100
|
+
|
|
101
|
+
Present to user:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
✅ **Application Created!**
|
|
105
|
+
|
|
106
|
+
**Stack:** [Tech stack used]
|
|
107
|
+
**Structure:**
|
|
108
|
+
|
|
109
|
+
- `src/` - Source code
|
|
110
|
+
- `api/` - Backend routes
|
|
111
|
+
- `components/` - UI components
|
|
112
|
+
|
|
113
|
+
**Preview:** http://localhost:3000
|
|
114
|
+
|
|
115
|
+
**Next Steps:**
|
|
116
|
+
|
|
117
|
+
- Review the code
|
|
118
|
+
- Run `/test` to add tests
|
|
119
|
+
- Run `/deploy` when ready
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Tech Stack Decision Framework
|
|
125
|
+
|
|
126
|
+
| Project Type | Recommended Stack |
|
|
127
|
+
| ------------ | ------------------------ |
|
|
128
|
+
| Simple Web | Vanilla HTML/CSS/JS |
|
|
129
|
+
| React App | Vite + React + CSS |
|
|
130
|
+
| Full-Stack | Next.js / Vite + Express |
|
|
131
|
+
| Mobile | React Native / Flutter |
|
|
132
|
+
| API Only | Express / Hono / Fastify |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Exit Conditions
|
|
137
|
+
|
|
138
|
+
- ✅ **Success:** App running at localhost with core features
|
|
139
|
+
- ❌ **Failure:** User cancels or critical dependency unavailable
|
|
140
|
+
- ⚠️ **Warning:** Partial build, some features incomplete
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Usage Examples
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
/create blog site
|
|
148
|
+
/create e-commerce app with cart
|
|
149
|
+
/create todo app
|
|
150
|
+
/create Instagram clone
|
|
151
|
+
/create CRM với quản lý khách hàng
|
|
152
|
+
```
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Debugging command. Activates DEBUG mode for systematic problem investigation using 4-phase methodology.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /debug - Systematic Debugging Workflow
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
|
|
13
|
+
Use when user says: "debug", "fix", "gỡ lỗi", "investigate", "error", or `/debug`
|
|
14
|
+
|
|
15
|
+
## Agent
|
|
16
|
+
|
|
17
|
+
Route to `debugger` agent
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🔴 Critical Rules
|
|
22
|
+
|
|
23
|
+
1. **Gather Evidence First** - Never guess without information
|
|
24
|
+
2. **Form Hypotheses** - Rank by likelihood
|
|
25
|
+
3. **Test Systematically** - One variable at a time
|
|
26
|
+
4. **Explain Root Cause** - Not just the fix
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
### Phase 1: Information Gathering
|
|
33
|
+
|
|
34
|
+
Collect all relevant context:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
## 🔍 Debug Session: [Issue Title]
|
|
38
|
+
|
|
39
|
+
### Symptom
|
|
40
|
+
|
|
41
|
+
- What is happening?
|
|
42
|
+
- What should happen instead?
|
|
43
|
+
|
|
44
|
+
### Context
|
|
45
|
+
|
|
46
|
+
- **Error Message**: `[exact error]`
|
|
47
|
+
- **File(s) Affected**: `[file paths]`
|
|
48
|
+
- **Line Number(s)**: [if known]
|
|
49
|
+
- **Recent Changes**: [what changed before issue appeared]
|
|
50
|
+
- **Reproduction Steps**: [how to reproduce]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If user provides incomplete info, ask:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
I need more information to debug effectively:
|
|
57
|
+
|
|
58
|
+
1. What is the exact error message?
|
|
59
|
+
2. How do you reproduce this issue?
|
|
60
|
+
3. What was working before?
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Phase 2: Hypothesis Formation
|
|
64
|
+
|
|
65
|
+
Create ranked list of possible causes:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
### Hypotheses (Ranked by Likelihood)
|
|
69
|
+
|
|
70
|
+
1. ❓ **High**: [Most likely cause based on symptoms]
|
|
71
|
+
2. ❓ **Medium**: [Second possibility]
|
|
72
|
+
3. ❓ **Low**: [Less likely cause]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Phase 3: Systematic Investigation
|
|
76
|
+
|
|
77
|
+
Test each hypothesis:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
### Investigation
|
|
81
|
+
|
|
82
|
+
**Testing Hypothesis 1: [Name]**
|
|
83
|
+
|
|
84
|
+
- Action: [What I checked]
|
|
85
|
+
- Result: ✅ Confirmed / ❌ Ruled Out
|
|
86
|
+
- Evidence: [Specific finding]
|
|
87
|
+
|
|
88
|
+
**Testing Hypothesis 2: [Name]**
|
|
89
|
+
|
|
90
|
+
- Action: [What I checked]
|
|
91
|
+
- Result: ✅ Confirmed / ❌ Ruled Out
|
|
92
|
+
- Evidence: [Specific finding]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Tools to use:
|
|
96
|
+
|
|
97
|
+
- Add console logs / breakpoints
|
|
98
|
+
- Check network requests
|
|
99
|
+
- Verify data flow
|
|
100
|
+
- Compare with working state
|
|
101
|
+
|
|
102
|
+
### Phase 4: Fix & Prevent
|
|
103
|
+
|
|
104
|
+
Apply fix and document:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
### 🎯 Root Cause
|
|
108
|
+
|
|
109
|
+
[Clear explanation of WHY this happened]
|
|
110
|
+
|
|
111
|
+
### Fix Applied
|
|
112
|
+
|
|
113
|
+
\`\`\`[language]
|
|
114
|
+
// Before (broken)
|
|
115
|
+
[old code]
|
|
116
|
+
|
|
117
|
+
// After (fixed)
|
|
118
|
+
[new code]
|
|
119
|
+
\`\`\`
|
|
120
|
+
|
|
121
|
+
### Prevention
|
|
122
|
+
|
|
123
|
+
🛡️ To prevent this in the future:
|
|
124
|
+
|
|
125
|
+
- [ ] [Specific prevention measure]
|
|
126
|
+
- [ ] [Add test case]
|
|
127
|
+
- [ ] [Update documentation]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Phase 5: Report
|
|
131
|
+
|
|
132
|
+
Summarize the debugging session:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
✅ **Debug Complete**
|
|
136
|
+
|
|
137
|
+
**Issue:** [Brief description]
|
|
138
|
+
**Root Cause:** [One sentence explanation]
|
|
139
|
+
**Fix:** [What was changed]
|
|
140
|
+
|
|
141
|
+
**Files Modified:**
|
|
142
|
+
|
|
143
|
+
- `[file1]` - [change description]
|
|
144
|
+
- `[file2]` - [change description]
|
|
145
|
+
|
|
146
|
+
**Next Steps:**
|
|
147
|
+
|
|
148
|
+
- Run tests to verify fix
|
|
149
|
+
- Consider adding regression test
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Output Format Template
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
## 🔍 Debug: [Issue Summary]
|
|
158
|
+
|
|
159
|
+
### 1. Symptom
|
|
160
|
+
|
|
161
|
+
[What's happening]
|
|
162
|
+
|
|
163
|
+
### 2. Information Gathered
|
|
164
|
+
|
|
165
|
+
| Item | Value |
|
|
166
|
+
| ----- | ----------- |
|
|
167
|
+
| Error | `[message]` |
|
|
168
|
+
| File | `[path]` |
|
|
169
|
+
| Line | [number] |
|
|
170
|
+
|
|
171
|
+
### 3. Hypotheses
|
|
172
|
+
|
|
173
|
+
1. ❓ [Most likely]
|
|
174
|
+
2. ❓ [Second option]
|
|
175
|
+
3. ❓ [Less likely]
|
|
176
|
+
|
|
177
|
+
### 4. Investigation
|
|
178
|
+
|
|
179
|
+
Testing each hypothesis with evidence...
|
|
180
|
+
|
|
181
|
+
### 5. Root Cause
|
|
182
|
+
|
|
183
|
+
🎯 **[Explanation]**
|
|
184
|
+
|
|
185
|
+
### 6. Fix
|
|
186
|
+
|
|
187
|
+
[Code changes]
|
|
188
|
+
|
|
189
|
+
### 7. Prevention
|
|
190
|
+
|
|
191
|
+
🛡️ [Future safeguards]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Exit Conditions
|
|
197
|
+
|
|
198
|
+
- ✅ **Success:** Root cause identified, fix applied, verified working
|
|
199
|
+
- ❌ **Failure:** Unable to reproduce issue or requires external support
|
|
200
|
+
- ⚠️ **Warning:** Workaround applied but root cause unclear
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Usage Examples
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
/debug login not working
|
|
208
|
+
/debug API returns 500 error
|
|
209
|
+
/debug form doesn't submit
|
|
210
|
+
/debug dữ liệu không lưu được
|
|
211
|
+
/debug component not rendering
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Key Principles
|
|
217
|
+
|
|
218
|
+
| Principle | Description |
|
|
219
|
+
| ---------------------- | ------------------------------------------- |
|
|
220
|
+
| **Ask First** | Get full error context before investigating |
|
|
221
|
+
| **Test Hypotheses** | Don't guess randomly, be systematic |
|
|
222
|
+
| **Explain Why** | Document root cause, not just fix |
|
|
223
|
+
| **Prevent Recurrence** | Add tests or validation |
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Deployment command for production releases. Pre-flight checks and deployment execution.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /deploy - Production Deployment Workflow
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
|
|
13
|
+
Use when user says: "deploy", "release", "ship", "triển khai", or `/deploy`
|
|
14
|
+
|
|
15
|
+
## Agent
|
|
16
|
+
|
|
17
|
+
Route to `devops-engineer` agent
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Sub-commands
|
|
22
|
+
|
|
23
|
+
| Command | Description |
|
|
24
|
+
| -------------------- | ------------------------------ |
|
|
25
|
+
| `/deploy` | Interactive deployment wizard |
|
|
26
|
+
| `/deploy check` | Run pre-deployment checks only |
|
|
27
|
+
| `/deploy preview` | Deploy to preview/staging |
|
|
28
|
+
| `/deploy production` | Deploy to production |
|
|
29
|
+
| `/deploy rollback` | Rollback to previous version |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 🔴 Critical Rules
|
|
34
|
+
|
|
35
|
+
1. **Pre-flight Checks** - Never deploy without passing all checks
|
|
36
|
+
2. **No Hardcoded Secrets** - All secrets in environment variables
|
|
37
|
+
3. **Health Check After Deploy** - Verify application is running
|
|
38
|
+
4. **Rollback Plan Ready** - Always have a way back
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
### Phase 1: Pre-Deployment Checks
|
|
45
|
+
|
|
46
|
+
Run all checks before deployment:
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
## 🚀 Pre-Deploy Checklist
|
|
50
|
+
|
|
51
|
+
### Code Quality
|
|
52
|
+
|
|
53
|
+
- [ ] No TypeScript errors (`pnpm tsc --noEmit`)
|
|
54
|
+
- [ ] ESLint passing (`pnpm lint`)
|
|
55
|
+
- [ ] All tests passing (`pnpm test`)
|
|
56
|
+
|
|
57
|
+
### Security
|
|
58
|
+
|
|
59
|
+
- [ ] No hardcoded secrets
|
|
60
|
+
- [ ] Environment variables documented
|
|
61
|
+
- [ ] Dependencies audited (`pnpm audit`)
|
|
62
|
+
|
|
63
|
+
### Performance
|
|
64
|
+
|
|
65
|
+
- [ ] Bundle size acceptable
|
|
66
|
+
- [ ] No console.log statements
|
|
67
|
+
- [ ] Images optimized
|
|
68
|
+
|
|
69
|
+
### Documentation
|
|
70
|
+
|
|
71
|
+
- [ ] README updated
|
|
72
|
+
- [ ] CHANGELOG updated
|
|
73
|
+
- [ ] API docs current
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If any check fails, stop and fix before proceeding.
|
|
77
|
+
|
|
78
|
+
### Phase 2: Build Application
|
|
79
|
+
|
|
80
|
+
Build for production:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Build the application
|
|
84
|
+
pnpm build
|
|
85
|
+
|
|
86
|
+
# Verify build output
|
|
87
|
+
ls -la dist/
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Check for build errors or warnings.
|
|
91
|
+
|
|
92
|
+
### Phase 3: Deploy
|
|
93
|
+
|
|
94
|
+
Deploy to target platform:
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
## Deployment Execution
|
|
98
|
+
|
|
99
|
+
### Platform: [Detected/Specified]
|
|
100
|
+
|
|
101
|
+
### Environment: [preview/production]
|
|
102
|
+
|
|
103
|
+
### Version: [Auto-generated or specified]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Platform-specific commands:
|
|
107
|
+
|
|
108
|
+
| Platform | Command | Auto-detect |
|
|
109
|
+
| -------- | ---------------------- | ------------------ |
|
|
110
|
+
| Vercel | `vercel --prod` | Next.js |
|
|
111
|
+
| Railway | `railway up` | Node.js |
|
|
112
|
+
| Fly.io | `fly deploy` | Dockerfile |
|
|
113
|
+
| Docker | `docker compose up -d` | docker-compose.yml |
|
|
114
|
+
| AWS | `aws s3 sync` | AWS CLI |
|
|
115
|
+
|
|
116
|
+
### Phase 4: Health Check
|
|
117
|
+
|
|
118
|
+
Verify deployment success:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
## Health Check
|
|
122
|
+
|
|
123
|
+
### Endpoints
|
|
124
|
+
|
|
125
|
+
- [ ] Main URL responding (200 OK)
|
|
126
|
+
- [ ] API health endpoint (`/api/health`)
|
|
127
|
+
- [ ] Database connected
|
|
128
|
+
|
|
129
|
+
### Services
|
|
130
|
+
|
|
131
|
+
- [ ] All containers running
|
|
132
|
+
- [ ] No error logs in last 5 minutes
|
|
133
|
+
- [ ] Memory/CPU within limits
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Phase 5: Report
|
|
137
|
+
|
|
138
|
+
Present deployment summary:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
## 🚀 Deployment Complete
|
|
142
|
+
|
|
143
|
+
### Summary
|
|
144
|
+
|
|
145
|
+
| Item | Value |
|
|
146
|
+
| ----------- | ---------- |
|
|
147
|
+
| Version | v1.2.3 |
|
|
148
|
+
| Environment | production |
|
|
149
|
+
| Duration | 47 seconds |
|
|
150
|
+
| Platform | Vercel |
|
|
151
|
+
|
|
152
|
+
### URLs
|
|
153
|
+
|
|
154
|
+
- 🌐 **Production:** https://app.example.com
|
|
155
|
+
- 📊 **Dashboard:** https://vercel.com/project
|
|
156
|
+
|
|
157
|
+
### What Changed
|
|
158
|
+
|
|
159
|
+
- Added user profile feature
|
|
160
|
+
- Fixed login bug
|
|
161
|
+
- Updated dependencies
|
|
162
|
+
|
|
163
|
+
### Health Check
|
|
164
|
+
|
|
165
|
+
✅ API responding (200 OK)
|
|
166
|
+
✅ Database connected
|
|
167
|
+
✅ All services healthy
|
|
168
|
+
|
|
169
|
+
### Rollback
|
|
170
|
+
|
|
171
|
+
If issues occur, run: `/deploy rollback`
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Deployment Flow Diagram
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
┌─────────────────┐
|
|
180
|
+
│ /deploy │
|
|
181
|
+
└────────┬────────┘
|
|
182
|
+
│
|
|
183
|
+
▼
|
|
184
|
+
┌─────────────────┐
|
|
185
|
+
│ Pre-flight │
|
|
186
|
+
│ checks │
|
|
187
|
+
└────────┬────────┘
|
|
188
|
+
│
|
|
189
|
+
Pass? ──No──► Fix issues
|
|
190
|
+
│
|
|
191
|
+
Yes
|
|
192
|
+
│
|
|
193
|
+
▼
|
|
194
|
+
┌─────────────────┐
|
|
195
|
+
│ Build │
|
|
196
|
+
│ application │
|
|
197
|
+
└────────┬────────┘
|
|
198
|
+
│
|
|
199
|
+
▼
|
|
200
|
+
┌─────────────────┐
|
|
201
|
+
│ Deploy to │
|
|
202
|
+
│ platform │
|
|
203
|
+
└────────┬────────┘
|
|
204
|
+
│
|
|
205
|
+
▼
|
|
206
|
+
┌─────────────────┐
|
|
207
|
+
│ Health check │
|
|
208
|
+
│ & verify │
|
|
209
|
+
└────────┬────────┘
|
|
210
|
+
│
|
|
211
|
+
▼
|
|
212
|
+
┌─────────────────┐
|
|
213
|
+
│ ✅ Complete │
|
|
214
|
+
└─────────────────┘
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Rollback Procedure
|
|
220
|
+
|
|
221
|
+
If deployment fails or issues are detected:
|
|
222
|
+
|
|
223
|
+
````markdown
|
|
224
|
+
## 🔄 Rollback Procedure
|
|
225
|
+
|
|
226
|
+
### Step 1: Identify Issue
|
|
227
|
+
|
|
228
|
+
- What symptom?
|
|
229
|
+
- When did it start?
|
|
230
|
+
- Which version?
|
|
231
|
+
|
|
232
|
+
### Step 2: Execute Rollback
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
# Vercel
|
|
236
|
+
vercel rollback
|
|
237
|
+
|
|
238
|
+
# Railway
|
|
239
|
+
railway rollback
|
|
240
|
+
|
|
241
|
+
# Docker
|
|
242
|
+
docker compose down
|
|
243
|
+
docker compose -f docker-compose.previous.yml up -d
|
|
244
|
+
```
|
|
245
|
+
````
|
|
246
|
+
|
|
247
|
+
### Step 3: Verify Rollback
|
|
248
|
+
|
|
249
|
+
- [ ] Previous version running
|
|
250
|
+
- [ ] Health checks passing
|
|
251
|
+
- [ ] User-facing error resolved
|
|
252
|
+
|
|
253
|
+
### Step 4: Document
|
|
254
|
+
|
|
255
|
+
- Record what failed
|
|
256
|
+
- Create fix plan
|
|
257
|
+
- Schedule proper deployment
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Exit Conditions
|
|
264
|
+
|
|
265
|
+
- ✅ **Success:** Deployed, health check passing, URLs accessible
|
|
266
|
+
- ❌ **Failure:** Build failed, deployment error, health check failed
|
|
267
|
+
- ⚠️ **Warning:** Deployed but with warnings (deprecations, high memory)
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Usage Examples
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
/deploy
|
|
276
|
+
/deploy check
|
|
277
|
+
/deploy preview
|
|
278
|
+
/deploy production
|
|
279
|
+
/deploy rollback
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
```
|