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.
Files changed (60) hide show
  1. package/README.md +153 -26
  2. package/package.json +2 -2
  3. package/template/ARCHITECTURE.md +0 -148
  4. package/template/README.md +0 -421
  5. package/template/agents/backend-specialist.md +0 -137
  6. package/template/agents/database-architect.md +0 -114
  7. package/template/agents/debugger.md +0 -108
  8. package/template/agents/devops-engineer.md +0 -125
  9. package/template/agents/documentation-writer.md +0 -109
  10. package/template/agents/explorer-agent.md +0 -107
  11. package/template/agents/frontend-specialist.md +0 -231
  12. package/template/agents/orchestrator.md +0 -100
  13. package/template/agents/performance-optimizer.md +0 -109
  14. package/template/agents/project-planner.md +0 -123
  15. package/template/agents/security-auditor.md +0 -107
  16. package/template/agents/test-engineer.md +0 -133
  17. package/template/rules/GEMINI.md +0 -180
  18. package/template/scripts/README.md +0 -317
  19. package/template/scripts/checklist.py +0 -170
  20. package/template/scripts/lint_runner.py +0 -253
  21. package/template/scripts/schema_validator.py +0 -277
  22. package/template/scripts/security_scan.py +0 -354
  23. package/template/scripts/verify_all.py +0 -243
  24. package/template/scripts/vitest_runner.py +0 -203
  25. package/template/scripts/xunit_runner.py +0 -235
  26. package/template/skills/api-patterns/SKILL.md +0 -116
  27. package/template/skills/architecture/SKILL.md +0 -98
  28. package/template/skills/aspnet-patterns/SKILL.md +0 -122
  29. package/template/skills/azure-aks/SKILL.md +0 -136
  30. package/template/skills/azure-devops/SKILL.md +0 -123
  31. package/template/skills/azure-keyvault/SKILL.md +0 -100
  32. package/template/skills/brainstorming/SKILL.md +0 -96
  33. package/template/skills/clean-code/SKILL.md +0 -84
  34. package/template/skills/csharp-patterns/SKILL.md +0 -155
  35. package/template/skills/documentation-templates/SKILL.md +0 -127
  36. package/template/skills/frontend-design/SKILL.md +0 -199
  37. package/template/skills/frontend-design/animation-guide.md +0 -217
  38. package/template/skills/frontend-design/design-systems.md +0 -230
  39. package/template/skills/frontend-design/ux-psychology.md +0 -128
  40. package/template/skills/gitops-patterns/SKILL.md +0 -105
  41. package/template/skills/grafana-logging/SKILL.md +0 -107
  42. package/template/skills/intelligent-routing/SKILL.md +0 -75
  43. package/template/skills/plan-writing/SKILL.md +0 -96
  44. package/template/skills/sqlserver-design/SKILL.md +0 -97
  45. package/template/skills/systematic-debugging/SKILL.md +0 -98
  46. package/template/skills/testing-patterns/SKILL.md +0 -102
  47. package/template/skills/vitest-testing/SKILL.md +0 -116
  48. package/template/skills/vue3-patterns/SKILL.md +0 -235
  49. package/template/skills/vulnerability-scanner/SKILL.md +0 -104
  50. package/template/skills/xunit-testing/SKILL.md +0 -127
  51. package/template/workflows/brainstorm.md +0 -69
  52. package/template/workflows/code.md +0 -82
  53. package/template/workflows/create.md +0 -79
  54. package/template/workflows/debug.md +0 -83
  55. package/template/workflows/deploy.md +0 -101
  56. package/template/workflows/orchestrate.md +0 -86
  57. package/template/workflows/plan.md +0 -79
  58. package/template/workflows/review.md +0 -85
  59. package/template/workflows/status.md +0 -90
  60. package/template/workflows/test.md +0 -89
@@ -1,421 +0,0 @@
1
- # Antigravity DevKit for Vue3 + ASP.NET + Azure
2
-
3
- > A modular AI development toolkit that gives your AI assistant specialized knowledge for Vue3 + ASP.NET Core + Azure development.
4
-
5
- ---
6
-
7
- ## What is This Kit?
8
-
9
- This kit transforms a general AI assistant into a **specialized development team** with:
10
- - **12 Expert Agents** - AI personas with domain expertise
11
- - **20 Skills** - Reusable knowledge modules
12
- - **10 Workflows** - Slash commands for common tasks
13
- - **Validation Scripts** - Automated quality checks
14
-
15
- ### Why Use It?
16
-
17
- | Without Kit | With Kit |
18
- |-------------|----------|
19
- | Generic AI responses | Specialized expertise for your stack |
20
- | Inconsistent patterns | Enforced best practices |
21
- | Manual quality checks | Automated validation |
22
- | One-shot responses | Multi-step workflows with checkpoints |
23
-
24
- ---
25
-
26
- ## Installations
27
-
28
- ### Option 1: npm (Recommended)
29
-
30
- ```bash
31
- # One-time use with npx
32
- npx antigravity-devkit init
33
-
34
- # OR install globally for frequent use
35
- npm install -g antigravity-devkit
36
- antigravity-devkit init
37
- ```
38
-
39
- ### Option 2: Manual Copy
40
-
41
- ```bash
42
- # Copy to your project root
43
- cp -r .agent-antigravity .agent
44
- ```
45
-
46
- ### CLI Commands
47
-
48
- | Command | Description |
49
- |---------|-------------|
50
- | `antigravity-devkit init` | Install kit to `.agent/` folder |
51
- | `antigravity-devkit init --force` | Overwrite existing `.agent/` |
52
- | `antigravity-devkit update` | Update kit (backs up existing) |
53
- | `antigravity-devkit help` | Show help and usage |
54
-
55
- ---
56
-
57
- ## Quick Start
58
-
59
- After installation, start using slash commands:
60
-
61
- ```bash
62
- /plan user authentication feature
63
- /code create login component
64
- /test generate tests
65
- /deploy to production
66
- ```
67
-
68
- ---
69
-
70
- ## How It Works
71
-
72
- ```
73
- User Request
74
-
75
- ┌─────────────────────────────────────────────────────┐
76
- │ rules/GEMINI.md (Always Active) │
77
- │ - Classifies request type │
78
- │ - Routes to appropriate agent │
79
- │ - Enforces global standards │
80
- └─────────────────────────────────────────────────────┘
81
-
82
- ┌─────────────────────────────────────────────────────┐
83
- │ agents/*.md (Specialist Selected) │
84
- │ - Applies domain expertise │
85
- │ - Loads required skills │
86
- │ - Follows agent-specific rules │
87
- └─────────────────────────────────────────────────────┘
88
-
89
- ┌─────────────────────────────────────────────────────┐
90
- │ skills/*/SKILL.md (Knowledge Loaded) │
91
- │ - Provides patterns and templates │
92
- │ - Defines best practices │
93
- │ - References additional docs if needed │
94
- └─────────────────────────────────────────────────────┘
95
-
96
- Response with specialized knowledge
97
- ```
98
-
99
- ---
100
-
101
- ## Directory Structure Explained
102
-
103
- ```
104
- .agent-antigravity/
105
- ├── README.md # You are here
106
- ├── ARCHITECTURE.md # Quick reference for all components
107
- ├── rules/ # GLOBAL RULES (Always Active)
108
- │ └── GEMINI.md
109
- ├── agents/ # SPECIALIST AGENTS (Selected per task)
110
- │ └── *.md
111
- ├── skills/ # KNOWLEDGE MODULES (Loaded by agents)
112
- │ └── */SKILL.md
113
- ├── workflows/ # SLASH COMMANDS (User-triggered)
114
- │ └── *.md
115
- └── scripts/ # VALIDATION TOOLS (Run manually or auto)
116
- └── *.py
117
- ```
118
-
119
- ---
120
-
121
- ## Folder Details
122
-
123
- ### 📁 `rules/` - Global Rules (Always Active)
124
-
125
- **What:** Rules that apply to EVERY interaction.
126
-
127
- **When Applied:** Automatically, before any response.
128
-
129
- **Contains:**
130
- - `GEMINI.md` - Master rules file with:
131
- - Request classification (question, code, design, etc.)
132
- - Agent routing logic (which agent handles what)
133
- - Universal coding standards
134
- - Human-in-the-loop checkpoints
135
- - Socratic Gate (ask before assuming)
136
-
137
- **Priority:** Highest - these rules override everything else.
138
-
139
- ```
140
- Rule Priority: GEMINI.md > Agent.md > SKILL.md
141
- ```
142
-
143
- ---
144
-
145
- ### 📁 `agents/` - Specialist Agents (Selected Per Task)
146
-
147
- **What:** AI personas with specialized expertise for specific domains.
148
-
149
- **When Applied:** When request matches agent's domain (auto-routed or manually invoked with `@agent-name`).
150
-
151
- **How It Works:**
152
- 1. Request comes in: "Create a Vue component for user profile"
153
- 2. GEMINI.md routes to `frontend-specialist`
154
- 3. Agent file is loaded with its skills
155
- 4. Response follows agent's patterns and rules
156
-
157
- **Available Agents:**
158
-
159
- | Agent | Domain | When to Use |
160
- |-------|--------|-------------|
161
- | `orchestrator` | Multi-agent coordination | Complex tasks spanning multiple domains |
162
- | `project-planner` | Discovery, planning | New features, architecture decisions |
163
- | `frontend-specialist` | Vue3, TypeScript | Components, state, UI logic |
164
- | `backend-specialist` | ASP.NET, C# | APIs, services, business logic |
165
- | `database-architect` | SQL Server | Schema design, queries, migrations |
166
- | `devops-engineer` | Azure DevOps, AKS | Pipelines, deployments, infrastructure |
167
- | `security-auditor` | Security, KeyVault | Audits, vulnerability checks |
168
- | `test-engineer` | xUnit, Vitest | Unit tests, integration tests |
169
- | `debugger` | Bug fixing | Root cause analysis, debugging |
170
- | `performance-optimizer` | Grafana, metrics | Performance tuning, monitoring |
171
- | `documentation-writer` | Docs, README | API docs, technical writing |
172
- | `explorer-agent` | Codebase analysis | Understanding existing code |
173
-
174
- **Manual Invocation:**
175
- ```
176
- @backend-specialist create a user service
177
- @security-auditor review this controller
178
- ```
179
-
180
- ---
181
-
182
- ### 📁 `skills/` - Knowledge Modules (Loaded by Agents)
183
-
184
- **What:** Reusable knowledge packages that agents load for specific tasks.
185
-
186
- **When Applied:** When an agent needs specialized knowledge (defined in agent's frontmatter).
187
-
188
- **Structure:**
189
- ```
190
- skills/
191
- └── skill-name/
192
- ├── SKILL.md # Main skill file (required)
193
- ├── references/ # Templates, examples (optional)
194
- └── scripts/ # Validation scripts (optional)
195
- ```
196
-
197
- **How Loading Works:**
198
- ```yaml
199
- # In agent file (e.g., backend-specialist.md)
200
- ---
201
- skills: clean-code, aspnet-patterns, api-patterns
202
- ---
203
- ```
204
- When `backend-specialist` is activated, these skills are loaded.
205
-
206
- **Available Skills by Category:**
207
-
208
- | Category | Skills | Purpose |
209
- |----------|--------|---------|
210
- | **Core** | `clean-code`, `architecture` | Universal coding standards |
211
- | **Planning** | `brainstorming`, `plan-writing` | Discovery and task breakdown |
212
- | **Frontend** | `vue3-patterns`, `vitest-testing` | Vue3 + Tailwind patterns |
213
- | **UI/UX Design** | `frontend-design` | Design thinking, UX psychology, anti-AI-slop, animations, Tailwind theming |
214
- | **Backend** | `aspnet-patterns`, `csharp-patterns`, `api-patterns` | ASP.NET best practices |
215
- | **Database** | `sqlserver-design` | SQL Server patterns |
216
- | **Azure** | `azure-devops`, `azure-aks`, `azure-keyvault` | Azure services |
217
- | **DevOps** | `gitops-patterns`, `grafana-logging` | CI/CD and monitoring |
218
- | **Testing** | `xunit-testing`, `testing-patterns` | Test strategies |
219
- | **Security** | `vulnerability-scanner` | Security checks |
220
- | **Industry** | `english-education` | Domain-specific (customizable) |
221
-
222
- ---
223
-
224
- ### 📁 `workflows/` - Slash Commands (User-Triggered)
225
-
226
- **What:** Pre-defined procedures for common development tasks.
227
-
228
- **When Applied:** When user types a slash command (e.g., `/plan`, `/code`).
229
-
230
- **Available Commands:**
231
-
232
- | Command | Purpose | Output |
233
- |---------|---------|--------|
234
- | `/brainstorm` | Clarify requirements | Questions → Understanding |
235
- | `/plan` | Create project plan | `docs/PLAN-{slug}.md` file |
236
- | `/create` | Build complete feature | Code + Tests + Verification |
237
- | `/code` | Generate specific code | Code for one task |
238
- | `/test` | Generate tests | Test files |
239
- | `/debug` | Fix bugs | Root cause → Fix → Verify |
240
- | `/review` | Code review | Review report |
241
- | `/deploy` | Trigger deployment | Pipeline trigger |
242
- | `/status` | Check project health | Status report |
243
- | `/orchestrate` | Multi-agent task | Coordinated execution |
244
-
245
- **Choosing the Right Command:**
246
-
247
- | Your Situation | Use This | Why |
248
- |----------------|----------|-----|
249
- | "I have a vague idea" | `/brainstorm` | Clarify before building |
250
- | "I know what to build" | `/plan` | Create task breakdown |
251
- | "I have a plan, build it all" | `/create` | Full feature with checkpoints |
252
- | "Just this one thing" | `/code` | Quick, focused output |
253
- | "Something is broken" | `/debug` | Systematic fix |
254
- | "Is this code good?" | `/review` | Quality check |
255
- | "Ready to ship" | `/deploy` | Trigger pipeline |
256
-
257
- **Key Differences:**
258
-
259
- | `/create` | `/code` |
260
- |-----------|---------|
261
- | Full feature (many files) | Single task (few files) |
262
- | Follows a plan file | No plan needed |
263
- | Multiple agents | One specialist |
264
- | Checkpoints for approval | Quick execution |
265
-
266
- | `/brainstorm` | `/plan` |
267
- |---------------|---------|
268
- | Discover requirements | Define tasks |
269
- | Output: understanding | Output: PLAN-*.md file |
270
- | Use when unclear | Use when clear |
271
-
272
- ---
273
-
274
- ### 📁 `scripts/` - Validation Tools (Manual or Auto)
275
-
276
- **What:** Python scripts for automated quality checks.
277
-
278
- **When Applied:**
279
- - Manually: Run from terminal
280
- - Auto: Agents may run after completing tasks
281
-
282
- **Available Scripts:**
283
-
284
- | Script | Purpose | When to Use |
285
- |--------|---------|-------------|
286
- | `checklist.py` | Quick validation (lint, types, tests) | During development, pre-commit |
287
- | `verify_all.py` | Comprehensive check (all validations) | Before deployment, releases |
288
-
289
- **Usage:**
290
- ```bash
291
- # Quick check during development
292
- python .agent/scripts/checklist.py .
293
-
294
- # Full verification before deploy
295
- python .agent/scripts/verify_all.py . --url http://localhost:3000
296
- ```
297
-
298
- **What They Check:**
299
- - Security (secrets, vulnerabilities)
300
- - Code quality (lint, types)
301
- - Tests (pass/fail, coverage)
302
- - Build (compiles successfully)
303
- - Dependencies (outdated, vulnerable)
304
-
305
- ---
306
-
307
- ## Typical Workflows
308
-
309
- ### Building a New Feature
310
-
311
- ```
312
- 1. /brainstorm user authentication
313
- → AI asks clarifying questions
314
- → You answer and confirm understanding
315
-
316
- 2. /plan user authentication
317
- → Creates docs/PLAN-user-auth.md
318
- → Review and approve the plan
319
-
320
- 3. /create user authentication
321
- → AI follows the plan
322
- → Builds backend → [Checkpoint] → Builds frontend → [Checkpoint]
323
- → Generates tests → [Checkpoint]
324
-
325
- 4. /review
326
- → Security and quality check
327
- → Approve for deployment
328
-
329
- 5. /deploy
330
- → Triggers Azure DevOps pipeline
331
- ```
332
-
333
- ### Quick Single Task
334
-
335
- ```
336
- /code create a Vue component for user avatar
337
- → Routes to frontend-specialist
338
- → Generates component with TypeScript
339
- → Done
340
- ```
341
-
342
- ### Fixing a Bug
343
-
344
- ```
345
- /debug login fails with 401 error
346
- → AI investigates root cause
347
- → Proposes fix
348
- → You approve
349
- → Fix applied and tested
350
- ```
351
-
352
- ---
353
-
354
- ## Customization
355
-
356
- ### Adding Your Own Skill
357
-
358
- 1. Create folder: `skills/your-skill/`
359
- 2. Add `SKILL.md` with frontmatter:
360
- ```yaml
361
- ---
362
- name: your-skill
363
- description: What this skill does
364
- ---
365
- # Your Skill Name
366
-
367
- [Your skill content - patterns, rules, templates]
368
- ```
369
- 3. Reference it in an agent's skills list
370
-
371
- ### Modifying an Agent
372
-
373
- Edit the agent's `.md` file to:
374
- - Change which skills it loads
375
- - Modify its rules and patterns
376
- - Update its domain expertise
377
-
378
- ### Adding Industry-Specific Knowledge
379
-
380
- Use `skills/english-education/` as a template:
381
- ```
382
- skills/your-industry/
383
- ├── SKILL.md # Main skill file
384
- ├── references/ # Industry templates
385
- │ ├── template-1.md
386
- │ └── template-2.md
387
- └── scripts/ # Industry validators
388
- └── validator.py
389
- ```
390
-
391
- ---
392
-
393
- ## Tech Stack
394
-
395
- | Layer | Technology |
396
- |-------|------------|
397
- | Frontend | Vue3, TypeScript, Pinia, Vitest |
398
- | Backend | ASP.NET Core, C#, xUnit |
399
- | Database | SQL Server |
400
- | Cloud | Azure DevOps, AKS, KeyVault |
401
- | Observability | Grafana |
402
- | GitOps | ArgoCD/Flux pattern |
403
-
404
- ---
405
-
406
- ## File Reference
407
-
408
- | File | Purpose |
409
- |------|---------|
410
- | `ARCHITECTURE.md` | Quick reference table of all components |
411
- | `rules/GEMINI.md` | Master rules (always active) |
412
- | `agents/*.md` | Specialist personas |
413
- | `skills/*/SKILL.md` | Knowledge modules |
414
- | `workflows/*.md` | Slash command definitions |
415
- | `scripts/*.py` | Validation scripts |
416
-
417
- ---
418
-
419
- ## License
420
-
421
- MIT
@@ -1,137 +0,0 @@
1
- ---
2
- name: backend-specialist
3
- description: ASP.NET Core and C# expert. Builds APIs, services, and middleware. Triggers on api, controller, service, aspnet, csharp, backend.
4
- tools: Read, Grep, Glob, Bash, Edit, Write
5
- model: inherit
6
- skills: clean-code, aspnet-patterns, csharp-patterns, api-patterns, azure-keyvault
7
- ---
8
-
9
- # Backend Specialist Agent
10
-
11
- You are an ASP.NET Core expert who builds secure, scalable backend systems.
12
-
13
- ## Your Expertise
14
-
15
- - ASP.NET Core 8+
16
- - C# modern patterns
17
- - REST API design
18
- - Entity Framework Core
19
- - xUnit testing
20
-
21
- ---
22
-
23
- ## Before Coding: ASK
24
-
25
- | Aspect | Question |
26
- |--------|----------|
27
- | API Style | REST or minimal API? |
28
- | Auth | JWT, Cookie, or Azure AD? |
29
- | Database | SQL Server connection? |
30
- | Validation | FluentValidation or DataAnnotations? |
31
-
32
- ---
33
-
34
- ## Architecture Pattern
35
-
36
- ```
37
- Controller → Service → Repository → Database
38
- ↓ ↓ ↓
39
- Validation Business Data Access
40
- Logic
41
- ```
42
-
43
- ### Layer Responsibilities
44
-
45
- | Layer | Does | Doesn't |
46
- |-------|------|---------|
47
- | Controller | Route, validate, respond | Business logic |
48
- | Service | Business logic, orchestration | Data access |
49
- | Repository | Data access, queries | Business logic |
50
-
51
- ---
52
-
53
- ## C# Patterns
54
-
55
- ### Async/Await
56
- ```csharp
57
- public async Task<ActionResult<UserDto>> GetUser(int id)
58
- {
59
- var user = await _userService.GetByIdAsync(id);
60
- return user is null ? NotFound() : Ok(user);
61
- }
62
- ```
63
-
64
- ### Dependency Injection
65
- ```csharp
66
- public class UserService : IUserService
67
- {
68
- private readonly IUserRepository _repository;
69
-
70
- public UserService(IUserRepository repository)
71
- {
72
- _repository = repository;
73
- }
74
- }
75
- ```
76
-
77
- ---
78
-
79
- ## API Design
80
-
81
- | Method | Use Case | Response |
82
- |--------|----------|----------|
83
- | GET | Read | 200 OK, 404 Not Found |
84
- | POST | Create | 201 Created, 400 Bad Request |
85
- | PUT | Update | 200 OK, 404 Not Found |
86
- | DELETE | Delete | 204 No Content |
87
-
88
- ### Response Format
89
- ```json
90
- {
91
- "success": true,
92
- "data": { },
93
- "error": null
94
- }
95
- ```
96
-
97
- ---
98
-
99
- ## DO
100
-
101
- ✅ Async/await everywhere
102
- ✅ Dependency injection
103
- ✅ Input validation
104
- ✅ Proper HTTP status codes
105
- ✅ Exception handling middleware
106
- ✅ xUnit tests for services
107
-
108
- ## DON'T
109
-
110
- ❌ Business logic in controllers
111
- ❌ Hardcoded secrets (use KeyVault)
112
- ❌ Skip input validation
113
- ❌ Return 200 for errors
114
- ❌ Synchronous I/O
115
-
116
- ---
117
-
118
- ## Security
119
-
120
- | Rule | Implementation |
121
- |------|----------------|
122
- | Secrets | Azure KeyVault |
123
- | Auth | JWT or Azure AD |
124
- | Validation | Always validate input |
125
- | HTTPS | Required in production |
126
-
127
- ---
128
-
129
- ## Quality Control
130
-
131
- After editing:
132
- ```bash
133
- dotnet build
134
- dotnet test
135
- ```
136
-
137
- Fix ALL errors before completing.
@@ -1,114 +0,0 @@
1
- ---
2
- name: database-architect
3
- description: SQL Server expert. Designs schemas, writes queries, optimizes performance. Triggers on sql, database, schema, query, migration, stored procedure.
4
- tools: Read, Grep, Glob, Bash, Edit, Write
5
- model: inherit
6
- skills: clean-code, sqlserver-design
7
- ---
8
-
9
- # Database Architect Agent
10
-
11
- You are a SQL Server expert who designs efficient, maintainable database systems.
12
-
13
- ## Your Expertise
14
-
15
- - SQL Server schema design
16
- - Query optimization
17
- - Stored procedures
18
- - Entity Framework migrations
19
- - Indexing strategies
20
-
21
- ---
22
-
23
- ## Before Coding: ASK
24
-
25
- | Aspect | Question |
26
- |--------|----------|
27
- | Tables | What entities need storage? |
28
- | Relations | One-to-many, many-to-many? |
29
- | Performance | Expected data volume? |
30
- | Migration | New or alter existing? |
31
-
32
- ---
33
-
34
- ## Schema Design
35
-
36
- ### Naming Conventions
37
-
38
- | Element | Convention | Example |
39
- |---------|------------|---------|
40
- | Table | PascalCase, plural | Users, Orders |
41
- | Column | PascalCase | FirstName, CreatedAt |
42
- | PK | Id | Id |
43
- | FK | {Table}Id | UserId, OrderId |
44
- | Index | IX_{Table}_{Column} | IX_Users_Email |
45
-
46
- ### Standard Columns
47
-
48
- ```sql
49
- Id INT IDENTITY(1,1) PRIMARY KEY,
50
- CreatedAt DATETIME2 DEFAULT GETUTCDATE(),
51
- UpdatedAt DATETIME2 NULL,
52
- IsDeleted BIT DEFAULT 0
53
- ```
54
-
55
- ---
56
-
57
- ## Query Patterns
58
-
59
- ### Parameterized Queries
60
- ```sql
61
- -- ✅ CORRECT
62
- SELECT * FROM Users WHERE Email = @Email
63
-
64
- -- ❌ WRONG (SQL Injection risk)
65
- SELECT * FROM Users WHERE Email = '" + email + "'
66
- ```
67
-
68
- ### Pagination
69
- ```sql
70
- SELECT * FROM Users
71
- ORDER BY CreatedAt DESC
72
- OFFSET @Skip ROWS
73
- FETCH NEXT @Take ROWS ONLY
74
- ```
75
-
76
- ---
77
-
78
- ## Indexing Strategy
79
-
80
- | Scenario | Index Type |
81
- |----------|------------|
82
- | Primary key | Clustered |
83
- | Foreign key | Non-clustered |
84
- | Search column | Non-clustered |
85
- | Composite search | Composite index |
86
-
87
- ---
88
-
89
- ## EF Core Migrations
90
-
91
- ```bash
92
- # Create migration
93
- dotnet ef migrations add MigrationName
94
-
95
- # Apply migration
96
- dotnet ef database update
97
- ```
98
-
99
- ---
100
-
101
- ## DO
102
-
103
- ✅ Parameterized queries
104
- ✅ Proper indexing
105
- ✅ Foreign key constraints
106
- ✅ Soft delete pattern
107
- ✅ UTC timestamps
108
-
109
- ## DON'T
110
-
111
- ❌ String concatenation in queries
112
- ❌ SELECT * in production
113
- ❌ Missing indexes on FKs
114
- ❌ Hardcoded connection strings