antigravity-devkit 1.0.2 → 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 +2 -2
- 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
package/template/rules/GEMINI.md
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
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
|
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
# Verification Scripts
|
|
2
|
-
|
|
3
|
-
Automated validation scripts used by agents to ensure code quality, security, and correctness.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Agent → Script Mapping
|
|
8
|
-
|
|
9
|
-
| Agent | Script | Purpose |
|
|
10
|
-
|-------|--------|---------|
|
|
11
|
-
| `frontend-specialist` | `vitest_runner.py` | Run Vue3/TypeScript tests with Vitest |
|
|
12
|
-
| `backend-specialist` | `xunit_runner.py` | Run ASP.NET/C# tests with xUnit |
|
|
13
|
-
| `database-architect` | `schema_validator.py` | Validate SQL schemas and migrations |
|
|
14
|
-
| `security-auditor` | `security_scan.py` | Scan for security vulnerabilities |
|
|
15
|
-
| **Any agent** | `lint_runner.py` | Universal code quality checker |
|
|
16
|
-
| **Any agent** | `checklist.py` | Quick validation checklist |
|
|
17
|
-
| **Any agent** | `verify_all.py` | Comprehensive validation suite |
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Script Output Protocol
|
|
22
|
-
|
|
23
|
-
When agents use these scripts, they follow this protocol:
|
|
24
|
-
|
|
25
|
-
1. **Run script** - Execute the appropriate validation script
|
|
26
|
-
2. **Parse errors/warnings** - Extract and categorize issues
|
|
27
|
-
3. **Summarize to user** - Present findings in readable format
|
|
28
|
-
4. **Ask before fixing** - Request approval before making changes
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Individual Script Usage
|
|
33
|
-
|
|
34
|
-
### 🧪 `vitest_runner.py` - Frontend Test Runner
|
|
35
|
-
|
|
36
|
-
**Purpose**: Execute and validate Vue3/TypeScript tests using Vitest
|
|
37
|
-
|
|
38
|
-
**Usage**:
|
|
39
|
-
```bash
|
|
40
|
-
# Run tests
|
|
41
|
-
python scripts/vitest_runner.py .
|
|
42
|
-
|
|
43
|
-
# Run with coverage
|
|
44
|
-
python scripts/vitest_runner.py . --coverage
|
|
45
|
-
|
|
46
|
-
# Watch mode
|
|
47
|
-
python scripts/vitest_runner.py . --watch
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**Requirements**: Node.js, Vitest installed in project
|
|
51
|
-
|
|
52
|
-
**Output**: Test results, pass/fail counts, coverage metrics
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
### 🧪 `xunit_runner.py` - Backend Test Runner
|
|
57
|
-
|
|
58
|
-
**Purpose**: Execute and validate ASP.NET/C# tests using xUnit
|
|
59
|
-
|
|
60
|
-
**Usage**:
|
|
61
|
-
```bash
|
|
62
|
-
# Run all tests
|
|
63
|
-
python scripts/xunit_runner.py .
|
|
64
|
-
|
|
65
|
-
# Run with coverage
|
|
66
|
-
python scripts/xunit_runner.py . --coverage
|
|
67
|
-
|
|
68
|
-
# Filter specific tests
|
|
69
|
-
python scripts/xunit_runner.py . --filter "UserServiceTests"
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**Requirements**: .NET SDK, xUnit test projects
|
|
73
|
-
|
|
74
|
-
**Output**: Test results, pass/fail counts, duration
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
### 🗄️ `schema_validator.py` - Database Schema Validator
|
|
79
|
-
|
|
80
|
-
**Purpose**: Validate SQL Server schemas, migrations, and stored procedures
|
|
81
|
-
|
|
82
|
-
**Usage**:
|
|
83
|
-
```bash
|
|
84
|
-
# Validate schemas
|
|
85
|
-
python scripts/schema_validator.py .
|
|
86
|
-
|
|
87
|
-
# With connection string (for live validation)
|
|
88
|
-
python scripts/schema_validator.py . --connection-string "Server=..."
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**Checks**:
|
|
92
|
-
- SQL syntax errors
|
|
93
|
-
- Missing primary keys
|
|
94
|
-
- Naming conventions
|
|
95
|
-
- Migration file naming
|
|
96
|
-
- SQL injection risks
|
|
97
|
-
- Transaction handling
|
|
98
|
-
|
|
99
|
-
**Output**: Schema quality report, syntax issues, recommendations
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
### 🔒 `security_scan.py` - Security Scanner
|
|
104
|
-
|
|
105
|
-
**Purpose**: Comprehensive security vulnerability detection
|
|
106
|
-
|
|
107
|
-
**Usage**:
|
|
108
|
-
```bash
|
|
109
|
-
# Full security scan
|
|
110
|
-
python scripts/security_scan.py .
|
|
111
|
-
|
|
112
|
-
# Filter by severity
|
|
113
|
-
python scripts/security_scan.py . --severity high
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Scans For**:
|
|
117
|
-
- Hardcoded secrets (passwords, API keys, tokens)
|
|
118
|
-
- npm package vulnerabilities
|
|
119
|
-
- NuGet package vulnerabilities
|
|
120
|
-
- SQL injection patterns
|
|
121
|
-
- XSS vulnerabilities
|
|
122
|
-
- Weak cryptography (MD5, SHA1)
|
|
123
|
-
- eval() usage
|
|
124
|
-
- HTTP vs HTTPS
|
|
125
|
-
- Missing security headers (HSTS, HTTPS redirect)
|
|
126
|
-
|
|
127
|
-
**Output**: Security findings grouped by severity (HIGH/MEDIUM/LOW)
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
### 🔍 `lint_runner.py` - Universal Linter
|
|
132
|
-
|
|
133
|
-
**Purpose**: Code quality and style validation for both frontend and backend
|
|
134
|
-
|
|
135
|
-
**Usage**:
|
|
136
|
-
```bash
|
|
137
|
-
# Lint entire project
|
|
138
|
-
python scripts/lint_runner.py .
|
|
139
|
-
|
|
140
|
-
# Auto-fix issues
|
|
141
|
-
python scripts/lint_runner.py . --fix
|
|
142
|
-
|
|
143
|
-
# Frontend only
|
|
144
|
-
python scripts/lint_runner.py . --frontend-only
|
|
145
|
-
|
|
146
|
-
# Backend only
|
|
147
|
-
python scripts/lint_runner.py . --backend-only
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**Frontend Checks**:
|
|
151
|
-
- ESLint (JavaScript/TypeScript)
|
|
152
|
-
- Prettier (code formatting)
|
|
153
|
-
- TypeScript type checking
|
|
154
|
-
|
|
155
|
-
**Backend Checks**:
|
|
156
|
-
- dotnet format (C# formatting)
|
|
157
|
-
- dotnet build with warnings as errors
|
|
158
|
-
|
|
159
|
-
**Output**: Code quality report with pass/fail status
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
### ✅ `checklist.py` - Quick Validation
|
|
164
|
-
|
|
165
|
-
**Purpose**: Fast validation checklist for development and pre-commit
|
|
166
|
-
|
|
167
|
-
**Usage**:
|
|
168
|
-
```bash
|
|
169
|
-
# Run checklist
|
|
170
|
-
python scripts/checklist.py .
|
|
171
|
-
|
|
172
|
-
# With URL for integration tests
|
|
173
|
-
python scripts/checklist.py . --url http://localhost:3000
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
**Checks**:
|
|
177
|
-
- Security (secrets, vulnerabilities)
|
|
178
|
-
- Frontend lint
|
|
179
|
-
- Frontend types
|
|
180
|
-
- Frontend tests
|
|
181
|
-
- Backend build
|
|
182
|
-
- Backend tests
|
|
183
|
-
|
|
184
|
-
**Output**: Pass/fail summary for each check
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
### 🎯 `verify_all.py` - Comprehensive Validation
|
|
189
|
-
|
|
190
|
-
**Purpose**: Complete validation suite before deployment
|
|
191
|
-
|
|
192
|
-
**Usage**:
|
|
193
|
-
```bash
|
|
194
|
-
# Full verification
|
|
195
|
-
python scripts/verify_all.py .
|
|
196
|
-
|
|
197
|
-
# With application URL
|
|
198
|
-
python scripts/verify_all.py . --url http://localhost:3000
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**Runs All Checks**:
|
|
202
|
-
- All checklist items
|
|
203
|
-
- Additional deployment validations
|
|
204
|
-
- Integration tests (if URL provided)
|
|
205
|
-
|
|
206
|
-
**Output**: Comprehensive validation report
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
## When to Use Each Script
|
|
211
|
-
|
|
212
|
-
| Scenario | Script | Why |
|
|
213
|
-
|----------|--------|-----|
|
|
214
|
-
| Writing Vue components | `vitest_runner.py` | Validate component tests |
|
|
215
|
-
| Writing API endpoints | `xunit_runner.py` | Validate backend tests |
|
|
216
|
-
| Creating migrations | `schema_validator.py` | Ensure schema quality |
|
|
217
|
-
| Before commit | `checklist.py` | Quick validation |
|
|
218
|
-
| Before PR | `lint_runner.py` | Code quality check |
|
|
219
|
-
| Security review | `security_scan.py` | Find vulnerabilities |
|
|
220
|
-
| Before deployment | `verify_all.py` | Complete validation |
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Exit Codes
|
|
225
|
-
|
|
226
|
-
All scripts follow standard exit code conventions:
|
|
227
|
-
|
|
228
|
-
- **0** - Success (all checks passed)
|
|
229
|
-
- **1** - Failure (issues found)
|
|
230
|
-
|
|
231
|
-
This allows scripts to be used in CI/CD pipelines:
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
python scripts/checklist.py . && echo "Ready to commit" || echo "Fix issues first"
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Integration with Agents
|
|
240
|
-
|
|
241
|
-
Agents automatically use these scripts when appropriate:
|
|
242
|
-
|
|
243
|
-
```
|
|
244
|
-
User: "Test my Vue components"
|
|
245
|
-
↓
|
|
246
|
-
@test-engineer activates
|
|
247
|
-
↓
|
|
248
|
-
Runs: python scripts/vitest_runner.py .
|
|
249
|
-
↓
|
|
250
|
-
Parses output and reports to user
|
|
251
|
-
↓
|
|
252
|
-
Asks: "Found 2 failing tests. Should I help fix them?"
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Requirements
|
|
258
|
-
|
|
259
|
-
### Python
|
|
260
|
-
- Python 3.7+
|
|
261
|
-
- No external dependencies (uses stdlib only)
|
|
262
|
-
|
|
263
|
-
### Project Dependencies
|
|
264
|
-
- **Frontend**: Node.js, npm, Vitest (for vitest_runner.py)
|
|
265
|
-
- **Backend**: .NET SDK (for xunit_runner.py)
|
|
266
|
-
- **Database**: SQL files in project (for schema_validator.py)
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Adding Custom Validations
|
|
271
|
-
|
|
272
|
-
To add project-specific validations:
|
|
273
|
-
|
|
274
|
-
1. Create a new script following the same pattern
|
|
275
|
-
2. Add to the agent's skill or workflow
|
|
276
|
-
3. Update this README with usage instructions
|
|
277
|
-
|
|
278
|
-
**Example**:
|
|
279
|
-
```python
|
|
280
|
-
#!/usr/bin/env python3
|
|
281
|
-
"""
|
|
282
|
-
Custom Validator - Your specific validation
|
|
283
|
-
"""
|
|
284
|
-
|
|
285
|
-
def main():
|
|
286
|
-
# Your validation logic
|
|
287
|
-
pass
|
|
288
|
-
|
|
289
|
-
if __name__ == "__main__":
|
|
290
|
-
main()
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## Troubleshooting
|
|
296
|
-
|
|
297
|
-
### "Command not found"
|
|
298
|
-
- Ensure required tools are installed (npm, dotnet, etc.)
|
|
299
|
-
- Check PATH environment variable
|
|
300
|
-
|
|
301
|
-
### "Permission denied"
|
|
302
|
-
- Make scripts executable: `chmod +x scripts/*.py`
|
|
303
|
-
|
|
304
|
-
### "Timeout"
|
|
305
|
-
- Scripts timeout after 5 minutes
|
|
306
|
-
- For large projects, consider running specific checks
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## Contributing
|
|
311
|
-
|
|
312
|
-
When modifying scripts:
|
|
313
|
-
|
|
314
|
-
1. Keep exit codes consistent (0 = success, 1 = failure)
|
|
315
|
-
2. Follow the output protocol (run → parse → summarize → ask)
|
|
316
|
-
3. Add timeout handling for long-running commands
|
|
317
|
-
4. Update this README with changes
|
|
@@ -1,170 +0,0 @@
|
|
|
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()
|