antigravity-devkit 1.0.3 → 1.0.4
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/README.md +153 -26
- package/package.json +1 -1
- package/template/ARCHITECTURE.md +0 -148
- package/template/README.md +0 -421
- package/template/agents/backend-specialist.md +0 -137
- package/template/agents/database-architect.md +0 -114
- package/template/agents/debugger.md +0 -108
- package/template/agents/devops-engineer.md +0 -125
- package/template/agents/documentation-writer.md +0 -109
- package/template/agents/explorer-agent.md +0 -107
- package/template/agents/frontend-specialist.md +0 -231
- package/template/agents/orchestrator.md +0 -100
- package/template/agents/performance-optimizer.md +0 -109
- package/template/agents/project-planner.md +0 -123
- package/template/agents/security-auditor.md +0 -107
- package/template/agents/test-engineer.md +0 -133
- package/template/rules/GEMINI.md +0 -180
- package/template/scripts/README.md +0 -317
- package/template/scripts/checklist.py +0 -170
- package/template/scripts/lint_runner.py +0 -253
- package/template/scripts/schema_validator.py +0 -277
- package/template/scripts/security_scan.py +0 -354
- package/template/scripts/verify_all.py +0 -243
- package/template/scripts/vitest_runner.py +0 -203
- package/template/scripts/xunit_runner.py +0 -235
- package/template/skills/api-patterns/SKILL.md +0 -116
- package/template/skills/architecture/SKILL.md +0 -98
- package/template/skills/aspnet-patterns/SKILL.md +0 -122
- package/template/skills/azure-aks/SKILL.md +0 -136
- package/template/skills/azure-devops/SKILL.md +0 -123
- package/template/skills/azure-keyvault/SKILL.md +0 -100
- package/template/skills/brainstorming/SKILL.md +0 -96
- package/template/skills/clean-code/SKILL.md +0 -84
- package/template/skills/csharp-patterns/SKILL.md +0 -155
- package/template/skills/documentation-templates/SKILL.md +0 -127
- package/template/skills/frontend-design/SKILL.md +0 -199
- package/template/skills/frontend-design/animation-guide.md +0 -217
- package/template/skills/frontend-design/design-systems.md +0 -230
- package/template/skills/frontend-design/ux-psychology.md +0 -128
- package/template/skills/gitops-patterns/SKILL.md +0 -105
- package/template/skills/grafana-logging/SKILL.md +0 -107
- package/template/skills/intelligent-routing/SKILL.md +0 -75
- package/template/skills/plan-writing/SKILL.md +0 -96
- package/template/skills/sqlserver-design/SKILL.md +0 -97
- package/template/skills/systematic-debugging/SKILL.md +0 -98
- package/template/skills/testing-patterns/SKILL.md +0 -102
- package/template/skills/vitest-testing/SKILL.md +0 -116
- package/template/skills/vue3-patterns/SKILL.md +0 -235
- package/template/skills/vulnerability-scanner/SKILL.md +0 -104
- package/template/skills/xunit-testing/SKILL.md +0 -127
- package/template/workflows/brainstorm.md +0 -69
- package/template/workflows/code.md +0 -82
- package/template/workflows/create.md +0 -79
- package/template/workflows/debug.md +0 -83
- package/template/workflows/deploy.md +0 -101
- package/template/workflows/orchestrate.md +0 -86
- package/template/workflows/plan.md +0 -79
- package/template/workflows/review.md +0 -85
- package/template/workflows/status.md +0 -90
- package/template/workflows/test.md +0 -89
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Debug issues and fix bugs
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /debug - Bug Fixing
|
|
6
|
-
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Systematically find and fix the root cause of issues.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Protocol
|
|
18
|
-
|
|
19
|
-
### 1. Gather Information
|
|
20
|
-
- What is the error message?
|
|
21
|
-
- What are the reproduction steps?
|
|
22
|
-
- What's expected vs actual?
|
|
23
|
-
|
|
24
|
-
### 2. Apply Debugger Agent
|
|
25
|
-
Route to `@debugger` with systematic-debugging skill.
|
|
26
|
-
|
|
27
|
-
### 3. Investigation Flow
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
REPRODUCE → ISOLATE → IDENTIFY → FIX → VERIFY
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### 4. Root Cause Analysis
|
|
34
|
-
|
|
35
|
-
| Step | Question |
|
|
36
|
-
|------|----------|
|
|
37
|
-
| Reproduce | Can we trigger it? |
|
|
38
|
-
| Isolate | Where does it fail? |
|
|
39
|
-
| Identify | What's the root cause? |
|
|
40
|
-
| Fix | Minimal change |
|
|
41
|
-
| Verify | Does it work? |
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Fix Approach
|
|
46
|
-
|
|
47
|
-
- ✅ Minimal change
|
|
48
|
-
- ✅ Add regression test
|
|
49
|
-
- ✅ No side effects
|
|
50
|
-
- ❌ Guess and patch
|
|
51
|
-
- ❌ Multiple unrelated changes
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Human Checkpoint
|
|
56
|
-
|
|
57
|
-
```markdown
|
|
58
|
-
🔍 **Root cause identified:**
|
|
59
|
-
|
|
60
|
-
Issue: [description]
|
|
61
|
-
Cause: [root cause]
|
|
62
|
-
Fix: [proposed solution]
|
|
63
|
-
|
|
64
|
-
**Approve fix?**
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Output
|
|
70
|
-
|
|
71
|
-
```markdown
|
|
72
|
-
✅ **Bug fixed**
|
|
73
|
-
|
|
74
|
-
Root cause: [description]
|
|
75
|
-
Fix: [what was changed]
|
|
76
|
-
|
|
77
|
-
Files modified:
|
|
78
|
-
- `path/to/file`
|
|
79
|
-
|
|
80
|
-
Tests:
|
|
81
|
-
- [x] Regression test added
|
|
82
|
-
- [x] All tests pass
|
|
83
|
-
```
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Deploy to Azure DevOps with approval
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /deploy - Deployment
|
|
6
|
-
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Trigger Azure DevOps deployment with human approval.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Pre-Deployment Checklist
|
|
18
|
-
|
|
19
|
-
```markdown
|
|
20
|
-
## Deployment Checklist
|
|
21
|
-
|
|
22
|
-
### Code Quality
|
|
23
|
-
- [ ] All tests pass
|
|
24
|
-
- [ ] Code review approved
|
|
25
|
-
- [ ] No lint errors
|
|
26
|
-
|
|
27
|
-
### Security
|
|
28
|
-
- [ ] Security scan passed
|
|
29
|
-
- [ ] No exposed secrets
|
|
30
|
-
- [ ] Dependencies updated
|
|
31
|
-
|
|
32
|
-
### Documentation
|
|
33
|
-
- [ ] README updated
|
|
34
|
-
- [ ] API docs current
|
|
35
|
-
- [ ] Changelog updated
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Protocol
|
|
41
|
-
|
|
42
|
-
### 1. Verify Prerequisites
|
|
43
|
-
- Tests passing?
|
|
44
|
-
- Review approved?
|
|
45
|
-
- Branch up to date?
|
|
46
|
-
|
|
47
|
-
### 2. Select Environment
|
|
48
|
-
|
|
49
|
-
| Environment | Approval |
|
|
50
|
-
|-------------|----------|
|
|
51
|
-
| Dev | Auto |
|
|
52
|
-
| Staging | Auto |
|
|
53
|
-
| Production | **Required** |
|
|
54
|
-
|
|
55
|
-
### 3. Human Approval (Production)
|
|
56
|
-
|
|
57
|
-
```markdown
|
|
58
|
-
🚀 **Ready to deploy to PRODUCTION**
|
|
59
|
-
|
|
60
|
-
Changes:
|
|
61
|
-
- [List of changes]
|
|
62
|
-
|
|
63
|
-
Pre-flight:
|
|
64
|
-
- [x] Tests pass
|
|
65
|
-
- [x] Review approved
|
|
66
|
-
- [x] Security scan clean
|
|
67
|
-
|
|
68
|
-
**Approve deployment?**
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 4. Trigger Pipeline
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# Azure DevOps CLI
|
|
75
|
-
az pipelines run --name "Deploy-Pipeline" --branch main
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Post-Deployment
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
✅ **Deployed to [Environment]**
|
|
84
|
-
|
|
85
|
-
Pipeline: [link]
|
|
86
|
-
Status: Success
|
|
87
|
-
|
|
88
|
-
Verification:
|
|
89
|
-
- [ ] Health check passed
|
|
90
|
-
- [ ] Smoke tests passed
|
|
91
|
-
- [ ] Monitoring active
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Rollback
|
|
97
|
-
|
|
98
|
-
If issues detected:
|
|
99
|
-
```
|
|
100
|
-
az pipelines run --name "Rollback-Pipeline"
|
|
101
|
-
```
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Multi-agent coordination for complex tasks
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /orchestrate - Multi-Agent Task
|
|
6
|
-
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Coordinate multiple specialist agents for complex, multi-domain tasks.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Protocol
|
|
18
|
-
|
|
19
|
-
### 1. Analyze Request
|
|
20
|
-
Identify all domains involved:
|
|
21
|
-
- Frontend (Vue3)?
|
|
22
|
-
- Backend (ASP.NET)?
|
|
23
|
-
- Database (SQL Server)?
|
|
24
|
-
- DevOps (Azure)?
|
|
25
|
-
|
|
26
|
-
### 2. Create Orchestration Plan
|
|
27
|
-
|
|
28
|
-
```markdown
|
|
29
|
-
## Orchestration Plan: [Task]
|
|
30
|
-
|
|
31
|
-
### Agents Required
|
|
32
|
-
- @backend-specialist
|
|
33
|
-
- @frontend-specialist
|
|
34
|
-
- @database-architect
|
|
35
|
-
|
|
36
|
-
### Phases
|
|
37
|
-
1. Database schema [@database-architect]
|
|
38
|
-
2. API endpoints [@backend-specialist]
|
|
39
|
-
3. UI components [@frontend-specialist]
|
|
40
|
-
4. Integration tests [@test-engineer]
|
|
41
|
-
|
|
42
|
-
### Checkpoints
|
|
43
|
-
- After Phase 2 (backend complete)
|
|
44
|
-
- After Phase 4 (all complete)
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 3. Execute with Checkpoints
|
|
48
|
-
|
|
49
|
-
After each phase:
|
|
50
|
-
```markdown
|
|
51
|
-
🛑 **Checkpoint: Phase [N] Complete**
|
|
52
|
-
|
|
53
|
-
Completed:
|
|
54
|
-
- [x] Task 1
|
|
55
|
-
- [x] Task 2
|
|
56
|
-
|
|
57
|
-
Next: Phase [N+1]
|
|
58
|
-
|
|
59
|
-
**Continue?**
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 4. Final Verification
|
|
63
|
-
|
|
64
|
-
```markdown
|
|
65
|
-
✅ **Orchestration Complete**
|
|
66
|
-
|
|
67
|
-
All phases:
|
|
68
|
-
- [x] Phase 1: Database
|
|
69
|
-
- [x] Phase 2: Backend
|
|
70
|
-
- [x] Phase 3: Frontend
|
|
71
|
-
- [x] Phase 4: Testing
|
|
72
|
-
|
|
73
|
-
Verification:
|
|
74
|
-
- [x] All tests pass
|
|
75
|
-
- [x] Integration verified
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## When to Orchestrate
|
|
81
|
-
|
|
82
|
-
| Scenario | Action |
|
|
83
|
-
|----------|--------|
|
|
84
|
-
| Single domain | Direct to specialist |
|
|
85
|
-
| Multi-domain | Orchestrate |
|
|
86
|
-
| Full feature | Orchestrate |
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Create project plan with task breakdown. No code - planning only.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /plan - Project Planning
|
|
6
|
-
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Create a structured plan file with task breakdown. **NO CODE WRITING.**
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Protocol
|
|
18
|
-
|
|
19
|
-
### 1. Socratic Gate
|
|
20
|
-
Ask clarifying questions if request is vague.
|
|
21
|
-
|
|
22
|
-
### 2. Create Plan File
|
|
23
|
-
**Location:** `docs/PLAN-{slug}.md`
|
|
24
|
-
|
|
25
|
-
**Naming:** Extract 2-3 keywords, lowercase, hyphen-separated.
|
|
26
|
-
|
|
27
|
-
| Request | File |
|
|
28
|
-
|---------|------|
|
|
29
|
-
| E-commerce cart | PLAN-ecommerce-cart.md |
|
|
30
|
-
| User authentication | PLAN-user-auth.md |
|
|
31
|
-
|
|
32
|
-
### 3. Plan Structure
|
|
33
|
-
|
|
34
|
-
```markdown
|
|
35
|
-
# PLAN: [Feature Name]
|
|
36
|
-
|
|
37
|
-
## Overview
|
|
38
|
-
[Brief description]
|
|
39
|
-
|
|
40
|
-
## Requirements
|
|
41
|
-
- [ ] Requirement 1
|
|
42
|
-
- [ ] Requirement 2
|
|
43
|
-
|
|
44
|
-
## Tasks
|
|
45
|
-
|
|
46
|
-
### Backend
|
|
47
|
-
- [ ] Task 1 [@backend-specialist]
|
|
48
|
-
|
|
49
|
-
### Frontend
|
|
50
|
-
- [ ] Task 2 [@frontend-specialist]
|
|
51
|
-
|
|
52
|
-
### Testing
|
|
53
|
-
- [ ] Task 3 [@test-engineer]
|
|
54
|
-
|
|
55
|
-
## Verification
|
|
56
|
-
- [ ] Run checklist.py
|
|
57
|
-
- [ ] Code review
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Rules
|
|
63
|
-
|
|
64
|
-
- ❌ NO code writing
|
|
65
|
-
- ✅ Assign agents to tasks
|
|
66
|
-
- ✅ Order by dependency
|
|
67
|
-
- ✅ Include verification
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## After Planning
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
✅ **Plan created:** docs/PLAN-{slug}.md
|
|
75
|
-
|
|
76
|
-
**Next steps:**
|
|
77
|
-
1. Review the plan
|
|
78
|
-
2. Run `/create` to implement
|
|
79
|
-
```
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Code review with security checks
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /review - Code Review
|
|
6
|
-
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Review code for quality, security, and best practices.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Protocol
|
|
18
|
-
|
|
19
|
-
### 1. Identify Scope
|
|
20
|
-
- Which files to review?
|
|
21
|
-
- Focus areas (security, performance, etc.)?
|
|
22
|
-
|
|
23
|
-
### 2. Apply Reviewers
|
|
24
|
-
- `@security-auditor` for security
|
|
25
|
-
- Domain specialist for patterns
|
|
26
|
-
|
|
27
|
-
### 3. Review Checklist
|
|
28
|
-
|
|
29
|
-
**Code Quality:**
|
|
30
|
-
- [ ] Clean code principles
|
|
31
|
-
- [ ] No code smells
|
|
32
|
-
- [ ] Proper naming
|
|
33
|
-
- [ ] No duplication
|
|
34
|
-
|
|
35
|
-
**Security:**
|
|
36
|
-
- [ ] No hardcoded secrets
|
|
37
|
-
- [ ] Input validation
|
|
38
|
-
- [ ] Proper auth checks
|
|
39
|
-
- [ ] No SQL injection
|
|
40
|
-
|
|
41
|
-
**Performance:**
|
|
42
|
-
- [ ] No N+1 queries
|
|
43
|
-
- [ ] Proper async usage
|
|
44
|
-
- [ ] No memory leaks
|
|
45
|
-
|
|
46
|
-
**Testing:**
|
|
47
|
-
- [ ] Tests exist
|
|
48
|
-
- [ ] Edge cases covered
|
|
49
|
-
- [ ] Tests pass
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Output Format
|
|
54
|
-
|
|
55
|
-
```markdown
|
|
56
|
-
## Code Review: [Scope]
|
|
57
|
-
|
|
58
|
-
### ✅ Passed
|
|
59
|
-
- Clean code standards
|
|
60
|
-
- Security checks
|
|
61
|
-
|
|
62
|
-
### ⚠️ Suggestions
|
|
63
|
-
- [Improvement 1]
|
|
64
|
-
- [Improvement 2]
|
|
65
|
-
|
|
66
|
-
### ❌ Issues (Must Fix)
|
|
67
|
-
- [Critical issue]
|
|
68
|
-
|
|
69
|
-
**Approve for deployment?**
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Human Approval
|
|
75
|
-
|
|
76
|
-
Review requires explicit approval before `/deploy`.
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## After Review
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
Approved: /deploy
|
|
84
|
-
Issues: Fix and re-review
|
|
85
|
-
```
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Check project health and status
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /status - Project Health
|
|
6
|
-
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Quick overview of project health and status.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Protocol
|
|
18
|
-
|
|
19
|
-
### 1. Gather Metrics
|
|
20
|
-
|
|
21
|
-
**Code Quality:**
|
|
22
|
-
- Lint errors
|
|
23
|
-
- Type errors
|
|
24
|
-
- Test coverage
|
|
25
|
-
|
|
26
|
-
**Dependencies:**
|
|
27
|
-
- Outdated packages
|
|
28
|
-
- Security vulnerabilities
|
|
29
|
-
|
|
30
|
-
**Build:**
|
|
31
|
-
- Last build status
|
|
32
|
-
- Build time
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Status Report
|
|
37
|
-
|
|
38
|
-
```markdown
|
|
39
|
-
## Project Status: [Project Name]
|
|
40
|
-
|
|
41
|
-
### Code Quality
|
|
42
|
-
| Metric | Status |
|
|
43
|
-
|--------|--------|
|
|
44
|
-
| Lint | ✅ Clean |
|
|
45
|
-
| Types | ✅ No errors |
|
|
46
|
-
| Coverage | 85% |
|
|
47
|
-
|
|
48
|
-
### Dependencies
|
|
49
|
-
| Check | Status |
|
|
50
|
-
|-------|--------|
|
|
51
|
-
| Outdated | ⚠️ 3 packages |
|
|
52
|
-
| Vulnerable | ✅ None |
|
|
53
|
-
|
|
54
|
-
### Build
|
|
55
|
-
| Metric | Value |
|
|
56
|
-
|--------|-------|
|
|
57
|
-
| Last build | ✅ Passed |
|
|
58
|
-
| Duration | 2m 30s |
|
|
59
|
-
|
|
60
|
-
### Recommendations
|
|
61
|
-
1. Update outdated packages
|
|
62
|
-
2. Add tests for new features
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Commands Used
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
# Lint check
|
|
71
|
-
npm run lint
|
|
72
|
-
|
|
73
|
-
# Type check
|
|
74
|
-
npm run type-check
|
|
75
|
-
|
|
76
|
-
# Test coverage
|
|
77
|
-
npm run test -- --coverage
|
|
78
|
-
|
|
79
|
-
# Outdated packages
|
|
80
|
-
npm outdated
|
|
81
|
-
|
|
82
|
-
# Vulnerabilities
|
|
83
|
-
npm audit
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## No Approval Required
|
|
89
|
-
|
|
90
|
-
Status check is read-only, no human approval needed.
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate tests for existing code
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /test - Test Generation
|
|
6
|
-
|
|
7
|
-
$ARGUMENTS
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Generate unit and integration tests for specified code.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Protocol
|
|
18
|
-
|
|
19
|
-
### 1. Analyze Target
|
|
20
|
-
- What code needs testing?
|
|
21
|
-
- Frontend (Vitest) or Backend (xUnit)?
|
|
22
|
-
- Unit or integration tests?
|
|
23
|
-
|
|
24
|
-
### 2. Apply Testing Agent
|
|
25
|
-
Route to `@test-engineer` with appropriate skills.
|
|
26
|
-
|
|
27
|
-
### 3. Generate Tests
|
|
28
|
-
|
|
29
|
-
**Frontend (Vitest):**
|
|
30
|
-
```typescript
|
|
31
|
-
describe('ComponentName', () => {
|
|
32
|
-
it('should render', () => {
|
|
33
|
-
// Arrange, Act, Assert
|
|
34
|
-
})
|
|
35
|
-
})
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Backend (xUnit):**
|
|
39
|
-
```csharp
|
|
40
|
-
[Fact]
|
|
41
|
-
public void Method_Scenario_Expected()
|
|
42
|
-
{
|
|
43
|
-
// Arrange, Act, Assert
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 4. Run Tests
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# Frontend
|
|
51
|
-
npm run test
|
|
52
|
-
|
|
53
|
-
# Backend
|
|
54
|
-
dotnet test
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Test Coverage
|
|
60
|
-
|
|
61
|
-
| Target | Minimum |
|
|
62
|
-
|--------|---------|
|
|
63
|
-
| Business logic | 90% |
|
|
64
|
-
| API endpoints | 80% |
|
|
65
|
-
| Components | 70% |
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Output
|
|
70
|
-
|
|
71
|
-
```markdown
|
|
72
|
-
✅ **Tests generated**
|
|
73
|
-
|
|
74
|
-
Files:
|
|
75
|
-
- `tests/UserService.test.ts`
|
|
76
|
-
- `tests/UserController.Tests.cs`
|
|
77
|
-
|
|
78
|
-
Results:
|
|
79
|
-
- 10 tests passed
|
|
80
|
-
- Coverage: 85%
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## After Testing
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
Next: `/review` for code review
|
|
89
|
-
```
|