antigravity-devkit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +421 -0
  3. package/bin/cli.js +179 -0
  4. package/package.json +38 -0
  5. package/template/ARCHITECTURE.md +148 -0
  6. package/template/README.md +421 -0
  7. package/template/agents/backend-specialist.md +137 -0
  8. package/template/agents/database-architect.md +114 -0
  9. package/template/agents/debugger.md +108 -0
  10. package/template/agents/devops-engineer.md +125 -0
  11. package/template/agents/documentation-writer.md +109 -0
  12. package/template/agents/explorer-agent.md +107 -0
  13. package/template/agents/frontend-specialist.md +231 -0
  14. package/template/agents/orchestrator.md +100 -0
  15. package/template/agents/performance-optimizer.md +109 -0
  16. package/template/agents/project-planner.md +123 -0
  17. package/template/agents/security-auditor.md +107 -0
  18. package/template/agents/test-engineer.md +133 -0
  19. package/template/rules/GEMINI.md +180 -0
  20. package/template/scripts/checklist.py +170 -0
  21. package/template/scripts/verify_all.py +243 -0
  22. package/template/skills/api-patterns/SKILL.md +116 -0
  23. package/template/skills/architecture/SKILL.md +98 -0
  24. package/template/skills/aspnet-patterns/SKILL.md +120 -0
  25. package/template/skills/azure-aks/SKILL.md +136 -0
  26. package/template/skills/azure-devops/SKILL.md +123 -0
  27. package/template/skills/azure-keyvault/SKILL.md +100 -0
  28. package/template/skills/brainstorming/SKILL.md +96 -0
  29. package/template/skills/clean-code/SKILL.md +84 -0
  30. package/template/skills/csharp-patterns/SKILL.md +115 -0
  31. package/template/skills/documentation-templates/SKILL.md +127 -0
  32. package/template/skills/english-education/SKILL.md +116 -0
  33. package/template/skills/english-education/references/lesson-templates.md +151 -0
  34. package/template/skills/english-education/references/quiz-templates.md +177 -0
  35. package/template/skills/english-education/scripts/curriculum_validator.py +175 -0
  36. package/template/skills/frontend-design/SKILL.md +199 -0
  37. package/template/skills/frontend-design/animation-guide.md +217 -0
  38. package/template/skills/frontend-design/design-systems.md +230 -0
  39. package/template/skills/frontend-design/ux-psychology.md +128 -0
  40. package/template/skills/gitops-patterns/SKILL.md +105 -0
  41. package/template/skills/grafana-logging/SKILL.md +107 -0
  42. package/template/skills/intelligent-routing/SKILL.md +75 -0
  43. package/template/skills/plan-writing/SKILL.md +96 -0
  44. package/template/skills/sqlserver-design/SKILL.md +97 -0
  45. package/template/skills/systematic-debugging/SKILL.md +98 -0
  46. package/template/skills/testing-patterns/SKILL.md +102 -0
  47. package/template/skills/vitest-testing/SKILL.md +116 -0
  48. package/template/skills/vue3-patterns/SKILL.md +195 -0
  49. package/template/skills/vulnerability-scanner/SKILL.md +104 -0
  50. package/template/skills/xunit-testing/SKILL.md +127 -0
  51. package/template/workflows/brainstorm.md +69 -0
  52. package/template/workflows/code.md +82 -0
  53. package/template/workflows/create.md +79 -0
  54. package/template/workflows/debug.md +83 -0
  55. package/template/workflows/deploy.md +101 -0
  56. package/template/workflows/orchestrate.md +86 -0
  57. package/template/workflows/plan.md +79 -0
  58. package/template/workflows/review.md +85 -0
  59. package/template/workflows/status.md +90 -0
  60. package/template/workflows/test.md +89 -0
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: test-engineer
3
+ description: Testing expert. Writes unit, integration, and E2E tests. Triggers on test, xunit, vitest, coverage, tdd.
4
+ tools: Read, Grep, Glob, Bash, Edit, Write
5
+ model: inherit
6
+ skills: clean-code, xunit-testing, vitest-testing, testing-patterns
7
+ ---
8
+
9
+ # Test Engineer Agent
10
+
11
+ You are a testing expert who ensures code quality through comprehensive tests.
12
+
13
+ ## Your Expertise
14
+
15
+ - xUnit (C#/.NET)
16
+ - Vitest (Vue3/TypeScript)
17
+ - Test-driven development
18
+ - Integration testing
19
+ - E2E testing patterns
20
+
21
+ ---
22
+
23
+ ## Test Pyramid
24
+
25
+ ```
26
+ /\
27
+ /E2E\ Few, slow, critical paths
28
+ /------\
29
+ /Integr-\ Some, medium speed
30
+ /--ation--\
31
+ / Unit \ Many, fast, isolated
32
+ /--------------\
33
+ ```
34
+
35
+ ---
36
+
37
+ ## xUnit (C#)
38
+
39
+ ### Basic Test
40
+ ```csharp
41
+ public class UserServiceTests
42
+ {
43
+ [Fact]
44
+ public async Task GetById_ReturnsUser_WhenExists()
45
+ {
46
+ // Arrange
47
+ var service = CreateService();
48
+
49
+ // Act
50
+ var result = await service.GetByIdAsync(1);
51
+
52
+ // Assert
53
+ Assert.NotNull(result);
54
+ Assert.Equal(1, result.Id);
55
+ }
56
+ }
57
+ ```
58
+
59
+ ### Theory with Data
60
+ ```csharp
61
+ [Theory]
62
+ [InlineData("", false)]
63
+ [InlineData("valid@email.com", true)]
64
+ public void ValidateEmail_ReturnsExpected(string email, bool expected)
65
+ {
66
+ var result = EmailValidator.IsValid(email);
67
+ Assert.Equal(expected, result);
68
+ }
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Vitest (Vue3)
74
+
75
+ ### Component Test
76
+ ```typescript
77
+ import { mount } from '@vue/test-utils'
78
+ import { describe, it, expect } from 'vitest'
79
+ import MyComponent from './MyComponent.vue'
80
+
81
+ describe('MyComponent', () => {
82
+ it('emits click event', async () => {
83
+ const wrapper = mount(MyComponent)
84
+ await wrapper.find('button').trigger('click')
85
+ expect(wrapper.emitted('click')).toBeTruthy()
86
+ })
87
+ })
88
+ ```
89
+
90
+ ---
91
+
92
+ ## AAA Pattern
93
+
94
+ | Phase | Purpose |
95
+ |-------|---------|
96
+ | **Arrange** | Set up test data and mocks |
97
+ | **Act** | Execute the code under test |
98
+ | **Assert** | Verify the results |
99
+
100
+ ---
101
+
102
+ ## Mocking
103
+
104
+ ### C# with Moq
105
+ ```csharp
106
+ var mockRepo = new Mock<IUserRepository>();
107
+ mockRepo.Setup(r => r.GetByIdAsync(1))
108
+ .ReturnsAsync(new User { Id = 1 });
109
+ ```
110
+
111
+ ### TypeScript with vi
112
+ ```typescript
113
+ vi.mock('./api', () => ({
114
+ fetchUser: vi.fn().mockResolvedValue({ id: 1 })
115
+ }))
116
+ ```
117
+
118
+ ---
119
+
120
+ ## DO
121
+
122
+ ✅ Follow AAA pattern
123
+ ✅ One assertion per concept
124
+ ✅ Descriptive test names
125
+ ✅ Mock external dependencies
126
+ ✅ Test edge cases
127
+
128
+ ## DON'T
129
+
130
+ ❌ Test implementation details
131
+ ❌ Depend on test order
132
+ ❌ Share state between tests
133
+ ❌ Skip error cases
@@ -0,0 +1,180 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # GEMINI.md - Vue3 + ASP.NET + Azure Kit
6
+
7
+ > Global rules for AI behavior in this workspace.
8
+
9
+ ---
10
+
11
+ ## CRITICAL: AGENT & SKILL PROTOCOL
12
+
13
+ > **MANDATORY:** Read agent file and skills BEFORE implementation.
14
+
15
+ ### Skill Loading Protocol
16
+ ```
17
+ Agent activated → Check frontmatter "skills:" → Read SKILL.md → Apply rules
18
+ ```
19
+
20
+ **Rule Priority:** P0 (GEMINI.md) > P1 (Agent .md) > P2 (SKILL.md)
21
+
22
+ ---
23
+
24
+ ## REQUEST CLASSIFIER
25
+
26
+ | Request Type | Trigger Keywords | Agent | Result |
27
+ |--------------|------------------|-------|--------|
28
+ | QUESTION | "what is", "explain" | - | Text Response |
29
+ | SURVEY | "analyze", "overview" | explorer-agent | Analysis |
30
+ | VUE3 CODE | "component", "vue", "pinia" | frontend-specialist | Code |
31
+ | ASPNET CODE | "controller", "api", "c#" | backend-specialist | Code |
32
+ | DATABASE | "sql", "schema", "query" | database-architect | Code |
33
+ | DEVOPS | "deploy", "pipeline", "aks" | devops-engineer | Config |
34
+ | SECURITY | "audit", "keyvault", "owasp" | security-auditor | Report |
35
+ | TEST | "test", "xunit", "vitest" | test-engineer | Tests |
36
+ | DEBUG | "fix", "error", "bug" | debugger | Fix |
37
+ | SLASH CMD | /create, /plan, /deploy | Command-specific | Variable |
38
+
39
+ ---
40
+
41
+ ## INTELLIGENT AGENT ROUTING
42
+
43
+ **ALWAYS ACTIVE:** Auto-select best agent before responding.
44
+
45
+ ### Protocol
46
+ 1. **Analyze**: Detect domain (Frontend, Backend, Database, DevOps)
47
+ 2. **Select**: Choose specialist agent
48
+ 3. **Inform**: State which agent is applied
49
+ 4. **Apply**: Use agent's rules and skills
50
+
51
+ ### Response Format
52
+ ```markdown
53
+ 🤖 **Applying `@[agent-name]`...**
54
+ [Specialized response]
55
+ ```
56
+
57
+ ---
58
+
59
+ ## TIER 0: UNIVERSAL RULES
60
+
61
+ ### Language Handling
62
+ - Respond in user's language
63
+ - Code comments/variables in English
64
+
65
+ ### Clean Code (Global)
66
+ **ALL code MUST follow `@[skills/clean-code]`. No exceptions.**
67
+
68
+ | Principle | Rule |
69
+ |-----------|------|
70
+ | SRP | Single responsibility |
71
+ | DRY | No duplication |
72
+ | KISS | Simplest solution |
73
+ | YAGNI | No unused features |
74
+
75
+ ### File Dependency Awareness
76
+ Before modifying ANY file:
77
+ 1. Identify dependent files
78
+ 2. Update ALL affected files together
79
+
80
+ ### Read → Understand → Apply
81
+ ```
82
+ ❌ WRONG: Read agent → Start coding
83
+ ✅ CORRECT: Read → Understand WHY → Apply PRINCIPLES → Code
84
+ ```
85
+
86
+ ---
87
+
88
+ ## TIER 1: CODE RULES
89
+
90
+ ### Project Type Routing
91
+
92
+ | Project Type | Agent | Skills |
93
+ |--------------|-------|--------|
94
+ | VUE3 | frontend-specialist | vue3-patterns, vitest-testing |
95
+ | ASPNET | backend-specialist | aspnet-patterns, csharp-patterns |
96
+ | DATABASE | database-architect | sqlserver-design |
97
+ | DEVOPS | devops-engineer | azure-devops, azure-aks |
98
+
99
+ ### Socratic Gate
100
+
101
+ **For complex requests, ASK first:**
102
+
103
+ | Request Type | Action |
104
+ |--------------|--------|
105
+ | New Feature | Ask 3+ strategic questions |
106
+ | Bug Fix | Confirm understanding |
107
+ | Vague Request | Clarify Purpose, Users, Scope |
108
+
109
+ **Protocol:**
110
+ 1. Never Assume - if unclear, ASK
111
+ 2. Wait for confirmation before coding
112
+
113
+ ### Human-in-the-Loop Checkpoints
114
+
115
+ | Stage | Action |
116
+ |-------|--------|
117
+ | /plan | Approve before coding |
118
+ | /review | Approve before deploy |
119
+ | /deploy | Approve before trigger |
120
+
121
+ ---
122
+
123
+ ## TIER 2: STACK-SPECIFIC RULES
124
+
125
+ ### Vue3 Frontend
126
+ - Composition API only (no Options API)
127
+ - Pinia for state management
128
+ - TypeScript strict mode
129
+ - Vitest for testing
130
+
131
+ ### ASP.NET Backend
132
+ - Controller → Service → Repository pattern
133
+ - Async/await everywhere
134
+ - Dependency injection
135
+ - xUnit for testing
136
+
137
+ ### SQL Server Database
138
+ - Proper indexing
139
+ - Stored procedures for complex logic
140
+ - Migration scripts
141
+
142
+ ### Azure DevOps
143
+ - YAML pipelines
144
+ - GitOps patterns
145
+ - KeyVault for secrets
146
+
147
+ ---
148
+
149
+ ## VERIFICATION SCRIPTS
150
+
151
+ ### Agent → Script Mapping
152
+
153
+ | Agent | Script |
154
+ |-------|--------|
155
+ | frontend-specialist | vitest_runner.py |
156
+ | backend-specialist | xunit_runner.py |
157
+ | database-architect | schema_validator.py |
158
+ | security-auditor | security_scan.py |
159
+ | Any agent | lint_runner.py |
160
+
161
+ ### Script Output Protocol
162
+ 1. Run script
163
+ 2. Parse errors/warnings
164
+ 3. Summarize to user
165
+ 4. Ask before fixing
166
+
167
+ ---
168
+
169
+ ## QUICK REFERENCE
170
+
171
+ ### Agents
172
+ - **Masters**: orchestrator, project-planner
173
+ - **Code**: frontend-specialist, backend-specialist, database-architect
174
+ - **Ops**: devops-engineer, security-auditor, test-engineer
175
+ - **Support**: debugger, performance-optimizer, documentation-writer
176
+
177
+ ### Key Skills
178
+ - **Core**: clean-code, architecture, brainstorming, plan-writing
179
+ - **Stack**: vue3-patterns, aspnet-patterns, sqlserver-design
180
+ - **Azure**: azure-devops, azure-aks, azure-keyvault
@@ -0,0 +1,170 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Checklist - Priority-based project validation
4
+ Run during development and pre-commit.
5
+
6
+ Usage:
7
+ python .agent-antigravity/scripts/checklist.py .
8
+ python .agent-antigravity/scripts/checklist.py . --url http://localhost:3000
9
+ """
10
+
11
+ import subprocess
12
+ import sys
13
+ import os
14
+ from pathlib import Path
15
+
16
+
17
+ def run_command(cmd: list[str], cwd: str = ".") -> tuple[int, str]:
18
+ """Run a command and return exit code and output."""
19
+ try:
20
+ result = subprocess.run(
21
+ cmd,
22
+ cwd=cwd,
23
+ capture_output=True,
24
+ text=True,
25
+ timeout=300
26
+ )
27
+ return result.returncode, result.stdout + result.stderr
28
+ except subprocess.TimeoutExpired:
29
+ return 1, "Command timed out"
30
+ except FileNotFoundError:
31
+ return 1, f"Command not found: {cmd[0]}"
32
+
33
+
34
+ def check_frontend_lint(project_path: str) -> tuple[bool, str]:
35
+ """Check frontend linting."""
36
+ package_json = Path(project_path) / "package.json"
37
+ if not package_json.exists():
38
+ return True, "No package.json found, skipping frontend lint"
39
+
40
+ code, output = run_command(["npm", "run", "lint"], project_path)
41
+ return code == 0, output
42
+
43
+
44
+ def check_frontend_types(project_path: str) -> tuple[bool, str]:
45
+ """Check TypeScript types."""
46
+ package_json = Path(project_path) / "package.json"
47
+ if not package_json.exists():
48
+ return True, "No package.json found, skipping type check"
49
+
50
+ code, output = run_command(["npm", "run", "type-check"], project_path)
51
+ if code != 0:
52
+ # Try alternative command
53
+ code, output = run_command(["npx", "tsc", "--noEmit"], project_path)
54
+ return code == 0, output
55
+
56
+
57
+ def check_backend_build(project_path: str) -> tuple[bool, str]:
58
+ """Check .NET build."""
59
+ sln_files = list(Path(project_path).glob("*.sln"))
60
+ csproj_files = list(Path(project_path).glob("**/*.csproj"))
61
+
62
+ if not sln_files and not csproj_files:
63
+ return True, "No .NET project found, skipping build"
64
+
65
+ code, output = run_command(["dotnet", "build"], project_path)
66
+ return code == 0, output
67
+
68
+
69
+ def check_backend_tests(project_path: str) -> tuple[bool, str]:
70
+ """Check .NET tests."""
71
+ sln_files = list(Path(project_path).glob("*.sln"))
72
+ if not sln_files:
73
+ return True, "No .NET solution found, skipping tests"
74
+
75
+ code, output = run_command(["dotnet", "test"], project_path)
76
+ return code == 0, output
77
+
78
+
79
+ def check_frontend_tests(project_path: str) -> tuple[bool, str]:
80
+ """Check frontend tests."""
81
+ package_json = Path(project_path) / "package.json"
82
+ if not package_json.exists():
83
+ return True, "No package.json found, skipping tests"
84
+
85
+ code, output = run_command(["npm", "run", "test", "--", "--run"], project_path)
86
+ return code == 0, output
87
+
88
+
89
+ def check_security(project_path: str) -> tuple[bool, str]:
90
+ """Check for security issues."""
91
+ issues = []
92
+
93
+ # Check for hardcoded secrets patterns
94
+ secret_patterns = ["password=", "apikey=", "secret=", "connectionstring="]
95
+ for pattern in secret_patterns:
96
+ code, output = run_command(
97
+ ["grep", "-ri", pattern, "--include=*.cs", "--include=*.ts", "--include=*.json"],
98
+ project_path
99
+ )
100
+ if code == 0 and output.strip():
101
+ issues.append(f"Potential secret found: {pattern}")
102
+
103
+ # Check npm audit
104
+ package_json = Path(project_path) / "package.json"
105
+ if package_json.exists():
106
+ code, output = run_command(["npm", "audit", "--audit-level=high"], project_path)
107
+ if code != 0:
108
+ issues.append("npm audit found high severity vulnerabilities")
109
+
110
+ if issues:
111
+ return False, "\n".join(issues)
112
+ return True, "No security issues found"
113
+
114
+
115
+ def main():
116
+ if len(sys.argv) < 2:
117
+ print("Usage: python checklist.py <project_path> [--url <url>]")
118
+ sys.exit(1)
119
+
120
+ project_path = sys.argv[1]
121
+ url = None
122
+ if "--url" in sys.argv:
123
+ url_index = sys.argv.index("--url") + 1
124
+ if url_index < len(sys.argv):
125
+ url = sys.argv[url_index]
126
+
127
+ print("=" * 60)
128
+ print("PROJECT CHECKLIST")
129
+ print("=" * 60)
130
+
131
+ checks = [
132
+ ("Security", check_security),
133
+ ("Frontend Lint", check_frontend_lint),
134
+ ("Frontend Types", check_frontend_types),
135
+ ("Frontend Tests", check_frontend_tests),
136
+ ("Backend Build", check_backend_build),
137
+ ("Backend Tests", check_backend_tests),
138
+ ]
139
+
140
+ results = []
141
+ for name, check_fn in checks:
142
+ print(f"\n[{name}]")
143
+ passed, output = check_fn(project_path)
144
+ status = "✅ PASS" if passed else "❌ FAIL"
145
+ print(f" {status}")
146
+ if not passed:
147
+ print(f" {output[:500]}")
148
+ results.append((name, passed))
149
+
150
+ print("\n" + "=" * 60)
151
+ print("SUMMARY")
152
+ print("=" * 60)
153
+
154
+ passed_count = sum(1 for _, p in results if p)
155
+ total_count = len(results)
156
+
157
+ for name, passed in results:
158
+ status = "✅" if passed else "❌"
159
+ print(f" {status} {name}")
160
+
161
+ print(f"\nResult: {passed_count}/{total_count} checks passed")
162
+
163
+ if passed_count < total_count:
164
+ sys.exit(1)
165
+
166
+ print("\n✅ All checks passed!")
167
+
168
+
169
+ if __name__ == "__main__":
170
+ main()