@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,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Coordinate multiple agents for complex tasks. Use for multi-perspective analysis, comprehensive reviews, or tasks requiring different domain expertise.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /orchestrate - Multi-Agent Coordination Workflow
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
|
|
13
|
+
Use when user says: "orchestrate", "coordinate", "multi-agent", or `/orchestrate`
|
|
14
|
+
|
|
15
|
+
## Agent
|
|
16
|
+
|
|
17
|
+
Route to `orchestrator` agent
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🔴 Critical Rules
|
|
22
|
+
|
|
23
|
+
1. **Minimum 3 Agents** - Orchestration requires 3+ different specialists
|
|
24
|
+
2. **2-Phase Execution** - Planning first, then implementation
|
|
25
|
+
3. **Context Passing** - Always pass full context to subagents
|
|
26
|
+
4. **User Approval** - Get approval before Phase 2
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Agent Selection Matrix
|
|
31
|
+
|
|
32
|
+
| Task Type | REQUIRED Agents (minimum) |
|
|
33
|
+
| -------------- | ------------------------------------------------------------------------- |
|
|
34
|
+
| **Web App** | frontend-specialist, backend-specialist, test-engineer |
|
|
35
|
+
| **API** | backend-specialist, security-auditor, test-engineer |
|
|
36
|
+
| **UI/Design** | frontend-specialist, ux-researcher, performance-analyst |
|
|
37
|
+
| **Database** | database-specialist, backend-specialist, security-auditor |
|
|
38
|
+
| **Full Stack** | project-planner, frontend-specialist, backend-specialist, devops-engineer |
|
|
39
|
+
| **Debug** | debugger, test-engineer, performance-analyst |
|
|
40
|
+
| **Security** | security-auditor, test-engineer, devops-engineer |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Workflow
|
|
45
|
+
|
|
46
|
+
### Phase 1: Planning (Sequential)
|
|
47
|
+
|
|
48
|
+
Only these agents allowed during planning:
|
|
49
|
+
|
|
50
|
+
| Agent | Purpose |
|
|
51
|
+
| ----------------- | -------------------- |
|
|
52
|
+
| `project-planner` | Create PLAN.md |
|
|
53
|
+
| `orchestrator` | Coordinate and route |
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
## Phase 1: Planning
|
|
57
|
+
|
|
58
|
+
1. Analyze task domains
|
|
59
|
+
2. Create docs/PLAN-{slug}.md
|
|
60
|
+
3. Define agent assignments
|
|
61
|
+
4. Wait for user approval
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### ⏸️ CHECKPOINT: User Approval
|
|
65
|
+
|
|
66
|
+
After plan is created, ask:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
✅ **Plan created:** `docs/PLAN-{slug}.md`
|
|
70
|
+
|
|
71
|
+
Proceed with implementation? (Y/N)
|
|
72
|
+
|
|
73
|
+
- Y: Start Phase 2 with multiple agents
|
|
74
|
+
- N: Modify plan first
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
🔴 **DO NOT proceed to Phase 2 without explicit approval!**
|
|
78
|
+
|
|
79
|
+
### Phase 2: Implementation (Parallel)
|
|
80
|
+
|
|
81
|
+
After approval, invoke agents in parallel groups:
|
|
82
|
+
|
|
83
|
+
| Group | Agents | Tasks |
|
|
84
|
+
| -------------- | --------------------------------------- | ------------------------ |
|
|
85
|
+
| **Foundation** | database-specialist, security-auditor | Schema, security review |
|
|
86
|
+
| **Core** | backend-specialist, frontend-specialist | API, UI implementation |
|
|
87
|
+
| **Polish** | test-engineer, devops-engineer | Tests, deployment config |
|
|
88
|
+
|
|
89
|
+
### Phase 3: Verification
|
|
90
|
+
|
|
91
|
+
Last agent runs verification:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Run security scan
|
|
95
|
+
python .agent/skills/security-fundamentals/scripts/security_scan.py .
|
|
96
|
+
|
|
97
|
+
# Run linting
|
|
98
|
+
pnpm lint
|
|
99
|
+
|
|
100
|
+
# Run tests
|
|
101
|
+
pnpm test
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Phase 4: Synthesis
|
|
105
|
+
|
|
106
|
+
Combine all agent outputs into unified report.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Context Passing Protocol (MANDATORY)
|
|
111
|
+
|
|
112
|
+
When invoking ANY subagent, include:
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
## CONTEXT for [Agent Name]
|
|
116
|
+
|
|
117
|
+
**Original Request:** [Full user request]
|
|
118
|
+
**Decisions Made:** [All answers to Socratic questions]
|
|
119
|
+
**Previous Agent Work:** [Summary of completed work]
|
|
120
|
+
**Current Plan:** [Reference to PLAN.md if exists]
|
|
121
|
+
|
|
122
|
+
**YOUR TASK:** [Specific task for this agent]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
⚠️ **VIOLATION:** Invoking agent without context = wrong assumptions!
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Output Format
|
|
130
|
+
|
|
131
|
+
```markdown
|
|
132
|
+
## 🎼 Orchestration Report
|
|
133
|
+
|
|
134
|
+
### Task
|
|
135
|
+
|
|
136
|
+
[Original task summary]
|
|
137
|
+
|
|
138
|
+
### Agents Invoked (MINIMUM 3)
|
|
139
|
+
|
|
140
|
+
| # | Agent | Focus Area | Status |
|
|
141
|
+
| --- | ------------------- | ------------------ | ------ |
|
|
142
|
+
| 1 | project-planner | Task breakdown | ✅ |
|
|
143
|
+
| 2 | frontend-specialist | UI implementation | ✅ |
|
|
144
|
+
| 3 | backend-specialist | API implementation | ✅ |
|
|
145
|
+
| 4 | test-engineer | Verification | ✅ |
|
|
146
|
+
|
|
147
|
+
### Phase 1: Planning
|
|
148
|
+
|
|
149
|
+
- [x] PLAN.md created
|
|
150
|
+
- [x] User approved plan
|
|
151
|
+
|
|
152
|
+
### Phase 2: Implementation
|
|
153
|
+
|
|
154
|
+
- [x] Database schema designed
|
|
155
|
+
- [x] API endpoints implemented
|
|
156
|
+
- [x] UI components built
|
|
157
|
+
- [x] Tests written
|
|
158
|
+
|
|
159
|
+
### Phase 3: Verification
|
|
160
|
+
|
|
161
|
+
- [x] Security scan passed
|
|
162
|
+
- [x] Lint check passed
|
|
163
|
+
- [x] All tests passing
|
|
164
|
+
|
|
165
|
+
### Key Findings
|
|
166
|
+
|
|
167
|
+
1. **project-planner**: Identified 12 tasks across 4 domains
|
|
168
|
+
2. **frontend-specialist**: Created 8 reusable components
|
|
169
|
+
3. **backend-specialist**: Implemented 15 API endpoints
|
|
170
|
+
4. **test-engineer**: Added 45 test cases
|
|
171
|
+
|
|
172
|
+
### Deliverables
|
|
173
|
+
|
|
174
|
+
| Deliverable | Location |
|
|
175
|
+
| ----------- | --------------------- |
|
|
176
|
+
| Plan | `docs/PLAN-{slug}.md` |
|
|
177
|
+
| API | `src/api/` |
|
|
178
|
+
| UI | `src/components/` |
|
|
179
|
+
| Tests | `tests/` |
|
|
180
|
+
|
|
181
|
+
### Summary
|
|
182
|
+
|
|
183
|
+
[One paragraph synthesis of all agent work]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Exit Gate
|
|
189
|
+
|
|
190
|
+
Before completing orchestration, verify:
|
|
191
|
+
|
|
192
|
+
| Check | Requirement |
|
|
193
|
+
| ---------------- | ------------------------------ |
|
|
194
|
+
| ✅ Agent Count | `invoked_agents >= 3` |
|
|
195
|
+
| ✅ Plan Approved | User said Y to proceed |
|
|
196
|
+
| ✅ Verification | At least one scan/test ran |
|
|
197
|
+
| ✅ Report | Orchestration report generated |
|
|
198
|
+
|
|
199
|
+
If any check fails → DO NOT complete. Invoke more agents or run verification.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Available Agents (19)
|
|
204
|
+
|
|
205
|
+
### Tier 1: Master
|
|
206
|
+
|
|
207
|
+
- `orchestrator`, `project-planner`, `debugger`
|
|
208
|
+
|
|
209
|
+
### Tier 2: Development
|
|
210
|
+
|
|
211
|
+
- `frontend-specialist`, `backend-specialist`, `mobile-developer`
|
|
212
|
+
- `database-specialist`, `devops-engineer`
|
|
213
|
+
|
|
214
|
+
### Tier 3: Quality
|
|
215
|
+
|
|
216
|
+
- `security-auditor`, `code-reviewer`, `test-engineer`, `performance-analyst`
|
|
217
|
+
|
|
218
|
+
### Tier 4: Domain
|
|
219
|
+
|
|
220
|
+
- `realtime-specialist`, `multi-tenant-architect`, `queue-specialist`, `integration-specialist`
|
|
221
|
+
|
|
222
|
+
### Tier 5: Support
|
|
223
|
+
|
|
224
|
+
- `documentation-writer`, `i18n-specialist`, `ux-researcher`
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Exit Conditions
|
|
229
|
+
|
|
230
|
+
- ✅ **Success:** 3+ agents invoked, plan approved, verification passed, report generated
|
|
231
|
+
- ❌ **Failure:** Fewer than 3 agents, user rejected plan, verification failed
|
|
232
|
+
- ⚠️ **Warning:** Completed but with verification warnings
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Usage Examples
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
/orchestrate build e-commerce site
|
|
240
|
+
/orchestrate full security audit
|
|
241
|
+
/orchestrate refactor with tests
|
|
242
|
+
/orchestrate xây dựng API cho mobile app
|
|
243
|
+
```
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create project plan using project-planner agent. No code writing - only plan file generation.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /plan - Project Planning Workflow
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
|
|
13
|
+
Use when user says: "plan", "lập kế hoạch", "create plan", "make a plan for", or `/plan`
|
|
14
|
+
|
|
15
|
+
## Agent
|
|
16
|
+
|
|
17
|
+
Route to `project-planner` agent
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🔴 Critical Rules
|
|
22
|
+
|
|
23
|
+
1. **NO CODE WRITING** - This workflow creates plan file ONLY
|
|
24
|
+
2. **Use project-planner agent** - Follow 4-phase methodology
|
|
25
|
+
3. **Socratic Gate** - Ask clarifying questions BEFORE planning
|
|
26
|
+
4. **Dynamic Naming** - Plan file named based on task
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
### Phase 1: Context Check
|
|
33
|
+
|
|
34
|
+
Understand the user's request:
|
|
35
|
+
|
|
36
|
+
- What is being planned?
|
|
37
|
+
- Is this a new project or feature addition?
|
|
38
|
+
- Any constraints mentioned?
|
|
39
|
+
|
|
40
|
+
### Phase 2: Socratic Gate
|
|
41
|
+
|
|
42
|
+
Ask minimum 3 clarifying questions:
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
Before I create the plan, I need to understand:
|
|
46
|
+
|
|
47
|
+
1. **Scope**: What are the main features/requirements?
|
|
48
|
+
2. **Users**: Who is the target audience?
|
|
49
|
+
3. **Tech**: Any technology preferences or constraints?
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Wait for user response before proceeding.
|
|
53
|
+
|
|
54
|
+
### Phase 3: Planning
|
|
55
|
+
|
|
56
|
+
Using `project-planner` agent, create plan with:
|
|
57
|
+
|
|
58
|
+
- Task breakdown (WBS)
|
|
59
|
+
- Dependencies and ordering
|
|
60
|
+
- Agent assignments
|
|
61
|
+
- Verification checklist
|
|
62
|
+
|
|
63
|
+
**Dynamic Naming Convention:**
|
|
64
|
+
|
|
65
|
+
| Rule | Example |
|
|
66
|
+
| --------------------------- | ------------------------ |
|
|
67
|
+
| Extract 2-3 key words | "e-commerce cart" |
|
|
68
|
+
| Lowercase, hyphen-separated | `ecommerce-cart` |
|
|
69
|
+
| Max 30 characters | `PLAN-ecommerce-cart.md` |
|
|
70
|
+
|
|
71
|
+
Output file: `docs/PLAN-{task-slug}.md`
|
|
72
|
+
|
|
73
|
+
### Phase 4: Report
|
|
74
|
+
|
|
75
|
+
Report to user:
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
✅ **Plan Created:** `docs/PLAN-{slug}.md`
|
|
79
|
+
|
|
80
|
+
**Contents:**
|
|
81
|
+
|
|
82
|
+
- [ ] Requirements analysis
|
|
83
|
+
- [ ] Task breakdown
|
|
84
|
+
- [ ] Agent assignments
|
|
85
|
+
- [ ] Verification checklist
|
|
86
|
+
|
|
87
|
+
**Next Steps:**
|
|
88
|
+
|
|
89
|
+
- Review the plan
|
|
90
|
+
- Run `/create` to start implementation
|
|
91
|
+
- Or modify plan manually
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Expected Output
|
|
97
|
+
|
|
98
|
+
| Deliverable | Location |
|
|
99
|
+
| ---------------------- | -------------------------- |
|
|
100
|
+
| Project Plan | `docs/PLAN-{task-slug}.md` |
|
|
101
|
+
| Task Breakdown | Inside plan file |
|
|
102
|
+
| Agent Assignments | Inside plan file |
|
|
103
|
+
| Verification Checklist | Phase X in plan file |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Naming Examples
|
|
108
|
+
|
|
109
|
+
| Request | Plan File |
|
|
110
|
+
| --------------------------------- | ----------------------------- |
|
|
111
|
+
| `/plan e-commerce site with cart` | `docs/PLAN-ecommerce-cart.md` |
|
|
112
|
+
| `/plan mobile app for fitness` | `docs/PLAN-fitness-app.md` |
|
|
113
|
+
| `/plan add dark mode feature` | `docs/PLAN-dark-mode.md` |
|
|
114
|
+
| `/plan fix authentication bug` | `docs/PLAN-auth-fix.md` |
|
|
115
|
+
| `/plan SaaS dashboard` | `docs/PLAN-saas-dashboard.md` |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Exit Conditions
|
|
120
|
+
|
|
121
|
+
- ✅ **Success:** Plan file created in `docs/` directory
|
|
122
|
+
- ❌ **Failure:** User cancels or requirements too vague after 3 attempts
|
|
123
|
+
- ⚠️ **Warning:** Partial plan due to incomplete information
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Usage
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
/plan e-commerce site with cart
|
|
131
|
+
/plan mobile app for fitness tracking
|
|
132
|
+
/plan SaaS dashboard with analytics
|
|
133
|
+
/plan thêm tính năng dark mode
|
|
134
|
+
```
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Test generation and test running command. Creates and executes tests for code.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /test - Test Generation and Execution Workflow
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Trigger
|
|
12
|
+
|
|
13
|
+
Use when user says: "test", "kiểm tra", "write tests", "run tests", or `/test`
|
|
14
|
+
|
|
15
|
+
## Agent
|
|
16
|
+
|
|
17
|
+
Route to `test-engineer` agent
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Sub-commands
|
|
22
|
+
|
|
23
|
+
| Command | Description |
|
|
24
|
+
| ---------------------- | ---------------------------------- |
|
|
25
|
+
| `/test` | Run all tests |
|
|
26
|
+
| `/test [file/feature]` | Generate tests for specific target |
|
|
27
|
+
| `/test coverage` | Show test coverage report |
|
|
28
|
+
| `/test watch` | Run tests in watch mode |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🔴 Critical Rules
|
|
33
|
+
|
|
34
|
+
1. **Test Pyramid** - Unit > Integration > E2E
|
|
35
|
+
2. **AAA Pattern** - Arrange, Act, Assert
|
|
36
|
+
3. **Behavior over Implementation** - Test what, not how
|
|
37
|
+
4. **One Assertion per Test** - When practical
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Workflow
|
|
42
|
+
|
|
43
|
+
### Phase 1: Analyze Target
|
|
44
|
+
|
|
45
|
+
Determine what needs testing:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## Test Analysis
|
|
49
|
+
|
|
50
|
+
- **Target**: [File/Feature/Component]
|
|
51
|
+
- **Type**: Unit / Integration / E2E
|
|
52
|
+
- **Framework**: Jest / Vitest / Playwright / etc.
|
|
53
|
+
- **Existing Tests**: [Count] tests found
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Phase 2: Generate Test Plan
|
|
57
|
+
|
|
58
|
+
Create comprehensive test plan:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## 🧪 Test Plan: [Target]
|
|
62
|
+
|
|
63
|
+
| Test Case | Type | Coverage |
|
|
64
|
+
| ----------------------------- | ----------- | ---------- |
|
|
65
|
+
| Should create user | Unit | Happy path |
|
|
66
|
+
| Should reject invalid email | Unit | Validation |
|
|
67
|
+
| Should handle db error | Unit | Error case |
|
|
68
|
+
| Should return 404 for missing | Integration | Edge case |
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Identify:
|
|
72
|
+
|
|
73
|
+
- Happy path tests
|
|
74
|
+
- Error cases
|
|
75
|
+
- Edge cases
|
|
76
|
+
- Integration points
|
|
77
|
+
|
|
78
|
+
### Phase 3: Write Tests
|
|
79
|
+
|
|
80
|
+
Generate tests using project's framework:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
describe("[Component/Service]", () => {
|
|
84
|
+
describe("[method/feature]", () => {
|
|
85
|
+
it("should [expected behavior]", async () => {
|
|
86
|
+
// Arrange
|
|
87
|
+
const input = {
|
|
88
|
+
/* test data */
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// Act
|
|
92
|
+
const result = await subject.method(input);
|
|
93
|
+
|
|
94
|
+
// Assert
|
|
95
|
+
expect(result).toBeDefined();
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it("should throw for [invalid case]", async () => {
|
|
99
|
+
// Arrange
|
|
100
|
+
const invalidInput = {
|
|
101
|
+
/* invalid data */
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// Act & Assert
|
|
105
|
+
await expect(subject.method(invalidInput)).rejects.toThrow(
|
|
106
|
+
"[ExpectedError]",
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Phase 4: Execute Tests
|
|
114
|
+
|
|
115
|
+
Run the tests:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Run all tests
|
|
119
|
+
pnpm test
|
|
120
|
+
|
|
121
|
+
# Run specific file
|
|
122
|
+
pnpm test src/services/auth.test.ts
|
|
123
|
+
|
|
124
|
+
# Run with coverage
|
|
125
|
+
pnpm test --coverage
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Phase 5: Report
|
|
129
|
+
|
|
130
|
+
Present results to user:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
## 🧪 Test Results
|
|
134
|
+
|
|
135
|
+
### Summary
|
|
136
|
+
|
|
137
|
+
✅ **15 tests** (14 passed, 1 failed)
|
|
138
|
+
|
|
139
|
+
### By Status
|
|
140
|
+
|
|
141
|
+
| Status | Count | Files |
|
|
142
|
+
| --------- | ----- | -------------------------- |
|
|
143
|
+
| ✅ Passed | 14 | auth.test.ts, user.test.ts |
|
|
144
|
+
| ❌ Failed | 1 | order.test.ts |
|
|
145
|
+
|
|
146
|
+
### Failed Tests
|
|
147
|
+
|
|
148
|
+
❌ `should calculate total with discount`
|
|
149
|
+
|
|
150
|
+
- Expected: 90
|
|
151
|
+
- Received: 100
|
|
152
|
+
- File: `order.test.ts:45`
|
|
153
|
+
|
|
154
|
+
### Coverage
|
|
155
|
+
|
|
156
|
+
| Metric | Value |
|
|
157
|
+
| ---------- | ----- |
|
|
158
|
+
| Statements | 85% |
|
|
159
|
+
| Branches | 72% |
|
|
160
|
+
| Functions | 90% |
|
|
161
|
+
| Lines | 84% |
|
|
162
|
+
|
|
163
|
+
### Next Steps
|
|
164
|
+
|
|
165
|
+
- Fix failed test in `order.test.ts`
|
|
166
|
+
- Consider adding tests for uncovered branches
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Test Patterns
|
|
172
|
+
|
|
173
|
+
### Unit Test (AAA Pattern)
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
it("should return user by id", async () => {
|
|
177
|
+
// Arrange
|
|
178
|
+
const userId = "user-123";
|
|
179
|
+
mockDb.findOne.mockResolvedValue({ id: userId, name: "Test" });
|
|
180
|
+
|
|
181
|
+
// Act
|
|
182
|
+
const user = await userService.findById(userId);
|
|
183
|
+
|
|
184
|
+
// Assert
|
|
185
|
+
expect(user.id).toBe(userId);
|
|
186
|
+
expect(mockDb.findOne).toHaveBeenCalledWith({ id: userId });
|
|
187
|
+
});
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Integration Test
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
describe("POST /api/users", () => {
|
|
194
|
+
it("should create user and return 201", async () => {
|
|
195
|
+
const response = await request(app)
|
|
196
|
+
.post("/api/users")
|
|
197
|
+
.send({ name: "Test", email: "test@test.com" });
|
|
198
|
+
|
|
199
|
+
expect(response.status).toBe(201);
|
|
200
|
+
expect(response.body.id).toBeDefined();
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### E2E Test (Playwright)
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
test("user can login and see dashboard", async ({ page }) => {
|
|
209
|
+
await page.goto("/login");
|
|
210
|
+
await page.fill('[name="email"]', "test@test.com");
|
|
211
|
+
await page.fill('[name="password"]', "password123");
|
|
212
|
+
await page.click('button[type="submit"]');
|
|
213
|
+
|
|
214
|
+
await expect(page).toHaveURL("/dashboard");
|
|
215
|
+
await expect(page.locator("h1")).toContainText("Welcome");
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Exit Conditions
|
|
222
|
+
|
|
223
|
+
- ✅ **Success:** All tests passing, coverage targets met
|
|
224
|
+
- ❌ **Failure:** Tests cannot run due to syntax/config errors
|
|
225
|
+
- ⚠️ **Warning:** Tests run but some fail, coverage below target
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Usage Examples
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
/test
|
|
233
|
+
/test src/services/auth.service.ts
|
|
234
|
+
/test user registration flow
|
|
235
|
+
/test coverage
|
|
236
|
+
/test fix failed tests
|
|
237
|
+
```
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan and implement UI/UX with design intelligence. Generates design system, style guide, and implementation checklist.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ui-ux-pro-max Workflow
|
|
6
|
+
|
|
7
|
+
> UI/UX Design Intelligence workflow with BM25-powered style matching.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- Designing new landing pages, dashboards, or web apps
|
|
12
|
+
- Choosing color palettes, typography, and style
|
|
13
|
+
- Building UI with specific style requirements
|
|
14
|
+
- Need design system recommendations for a product type
|
|
15
|
+
|
|
16
|
+
## Workflow Steps
|
|
17
|
+
|
|
18
|
+
### Phase 1: Requirements Analysis
|
|
19
|
+
|
|
20
|
+
1. **Extract from user request:**
|
|
21
|
+
- Product type (SaaS, e-commerce, portfolio, dashboard, etc.)
|
|
22
|
+
- Style keywords (minimal, playful, professional, dark mode, etc.)
|
|
23
|
+
- Industry (healthcare, fintech, gaming, education, etc.)
|
|
24
|
+
- Tech stack (React, Vue, Next.js - default to `html-tailwind`)
|
|
25
|
+
|
|
26
|
+
### Phase 2: Generate Design System (REQUIRED)
|
|
27
|
+
|
|
28
|
+
2. **Run design system generator:**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
python3 .agent/skills/ui-ux-pro-max/scripts/search.py "<product_type> <industry> <keywords>" --design-system -p "Project Name"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Example:**
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
python3 .agent/skills/ui-ux-pro-max/scripts/search.py "beauty spa wellness" --design-system -p "Serenity Spa"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Phase 3: Detailed Searches (Optional)
|
|
41
|
+
|
|
42
|
+
3. **Get additional details if needed:**
|
|
43
|
+
|
|
44
|
+
| Need | Command |
|
|
45
|
+
| --------------------- | --------------------------------------- |
|
|
46
|
+
| More style options | `--domain style "glassmorphism dark"` |
|
|
47
|
+
| Chart recommendations | `--domain chart "real-time dashboard"` |
|
|
48
|
+
| UX guidelines | `--domain ux "animation accessibility"` |
|
|
49
|
+
| Alternative fonts | `--domain typography "elegant luxury"` |
|
|
50
|
+
| Landing structure | `--domain landing "hero social-proof"` |
|
|
51
|
+
|
|
52
|
+
### Phase 4: Stack Guidelines
|
|
53
|
+
|
|
54
|
+
4. **Get stack-specific best practices:**
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
python3 .agent/skills/ui-ux-pro-max/scripts/search.py "<keywords>" --stack html-tailwind
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Available stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`, `shadcn`
|
|
61
|
+
|
|
62
|
+
### Phase 5: Implementation
|
|
63
|
+
|
|
64
|
+
5. **Build with design system:**
|
|
65
|
+
- Apply colors from design system
|
|
66
|
+
- Use recommended typography (Google Fonts)
|
|
67
|
+
- Follow layout pattern
|
|
68
|
+
- Implement key effects
|
|
69
|
+
- Avoid anti-patterns
|
|
70
|
+
|
|
71
|
+
### Phase 6: Pre-Delivery Checklist
|
|
72
|
+
|
|
73
|
+
6. **Verify before delivery:**
|
|
74
|
+
- [ ] No emojis as icons (use SVG: Heroicons/Lucide)
|
|
75
|
+
- [ ] cursor-pointer on all clickable elements
|
|
76
|
+
- [ ] Hover states with smooth transitions (150-300ms)
|
|
77
|
+
- [ ] Light mode: text contrast 4.5:1 minimum
|
|
78
|
+
- [ ] Focus states visible for keyboard nav
|
|
79
|
+
- [ ] prefers-reduced-motion respected
|
|
80
|
+
- [ ] Responsive: 375px, 768px, 1024px, 1440px
|
|
81
|
+
|
|
82
|
+
## Available Domains
|
|
83
|
+
|
|
84
|
+
| Domain | Use For |
|
|
85
|
+
| ------------ | ------------------------------------ |
|
|
86
|
+
| `product` | Product type recommendations |
|
|
87
|
+
| `style` | UI styles, colors, effects |
|
|
88
|
+
| `typography` | Font pairings, Google Fonts |
|
|
89
|
+
| `color` | Color palettes by product type |
|
|
90
|
+
| `landing` | Page structure, CTA strategies |
|
|
91
|
+
| `chart` | Chart types, library recommendations |
|
|
92
|
+
| `ux` | Best practices, anti-patterns |
|
|
93
|
+
| `react` | React/Next.js performance |
|
|
94
|
+
| `web` | Web interface guidelines |
|
|
95
|
+
|
|
96
|
+
## Critical Rules
|
|
97
|
+
|
|
98
|
+
1. **Always start with `--design-system`** for comprehensive recommendations
|
|
99
|
+
2. **Default stack is `html-tailwind`** unless user specifies otherwise
|
|
100
|
+
3. **Follow Pre-Delivery Checklist** before delivering any UI code
|
|
101
|
+
4. **Avoid Purple Ban** - Never use purple/violet as primary unless requested
|
|
102
|
+
5. **No emojis as icons** - Always use SVG icons (Heroicons, Lucide)
|
|
103
|
+
|
|
104
|
+
## Exit Conditions
|
|
105
|
+
|
|
106
|
+
- ✅ Design system generated and applied
|
|
107
|
+
- ✅ UI implementation matches design system
|
|
108
|
+
- ✅ Pre-delivery checklist passed
|
|
109
|
+
- ✅ Responsive design verified
|