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,148 @@
1
+ # Antigravity Kit Architecture
2
+
3
+ > Vue3 + ASP.NET + Azure Development Toolkit
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ | Metric | Value |
10
+ |--------|-------|
11
+ | Agents | 12 |
12
+ | Skills | 20 |
13
+ | Workflows | 10 |
14
+ | Scripts | 2 master + skill-level |
15
+
16
+ ---
17
+
18
+ ## Directory Structure
19
+
20
+ ```
21
+ .agent-antigravity/
22
+ ├── ARCHITECTURE.md # This file
23
+ ├── README.md # Usage guide
24
+ ├── rules/GEMINI.md # Global rules
25
+ ├── agents/ # 12 Specialist Agents
26
+ ├── skills/ # 20 Skill Modules
27
+ ├── workflows/ # 10 Slash Commands
28
+ └── scripts/ # Validation Scripts
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Agents (12)
34
+
35
+ | Agent | Focus | Skills |
36
+ |-------|-------|--------|
37
+ | orchestrator | Multi-agent coordination | intelligent-routing, brainstorming |
38
+ | project-planner | Discovery, planning | brainstorming, plan-writing, architecture |
39
+ | frontend-specialist | Vue3, TypeScript, Pinia | vue3-patterns, vitest-testing |
40
+ | backend-specialist | ASP.NET Core, C# | aspnet-patterns, csharp-patterns, api-patterns |
41
+ | database-architect | SQL Server | sqlserver-design |
42
+ | devops-engineer | Azure DevOps, AKS, GitOps | azure-devops, azure-aks, gitops-patterns |
43
+ | security-auditor | KeyVault, OWASP | vulnerability-scanner, azure-keyvault |
44
+ | test-engineer | xUnit, Vitest, E2E | xunit-testing, vitest-testing |
45
+ | debugger | Root cause analysis | systematic-debugging |
46
+ | performance-optimizer | Grafana, metrics | grafana-logging |
47
+ | documentation-writer | API docs | documentation-templates |
48
+ | explorer-agent | Codebase analysis | - |
49
+
50
+ ---
51
+
52
+ ## Skills (20)
53
+
54
+ ### Frontend & Vue3
55
+ | Skill | Description |
56
+ |-------|-------------|
57
+ | vue3-patterns | Composition API, Pinia, Vue Router |
58
+ | vitest-testing | Vue component testing |
59
+
60
+ ### Backend & ASP.NET
61
+ | Skill | Description |
62
+ |-------|-------------|
63
+ | aspnet-patterns | Controllers, Services, Middleware |
64
+ | csharp-patterns | C# best practices, async/await |
65
+ | api-patterns | REST API design |
66
+
67
+ ### Database
68
+ | Skill | Description |
69
+ |-------|-------------|
70
+ | sqlserver-design | Schema, stored procedures, optimization |
71
+
72
+ ### Azure & DevOps
73
+ | Skill | Description |
74
+ |-------|-------------|
75
+ | azure-devops | CI/CD pipelines, YAML |
76
+ | azure-aks | Kubernetes, Helm charts |
77
+ | azure-keyvault | Secrets management |
78
+ | grafana-logging | Metrics, dashboards |
79
+ | gitops-patterns | ArgoCD, Flux |
80
+
81
+ ### Testing
82
+ | Skill | Description |
83
+ |-------|-------------|
84
+ | xunit-testing | C# unit tests |
85
+ | testing-patterns | Test strategies |
86
+
87
+ ### Core
88
+ | Skill | Description |
89
+ |-------|-------------|
90
+ | clean-code | Coding standards |
91
+ | architecture | System design patterns |
92
+ | brainstorming | Socratic discovery |
93
+ | plan-writing | Task breakdown |
94
+ | intelligent-routing | Agent selection |
95
+ | vulnerability-scanner | Security auditing |
96
+
97
+ ### Industry
98
+ | Skill | Description |
99
+ |-------|-------------|
100
+ | english-education | Curriculum, lessons, quizzes |
101
+
102
+ ---
103
+
104
+ ## Workflows (10)
105
+
106
+ | Command | Description |
107
+ |---------|-------------|
108
+ | /brainstorm | Socratic discovery |
109
+ | /plan | Create PLAN-{slug}.md |
110
+ | /create | Full feature build |
111
+ | /code | Code generation |
112
+ | /test | Generate tests |
113
+ | /debug | Root cause analysis |
114
+ | /review | Code review |
115
+ | /deploy | Azure DevOps trigger |
116
+ | /status | Project health |
117
+ | /orchestrate | Multi-agent coordination |
118
+
119
+ ---
120
+
121
+ ## Skill Loading Protocol
122
+
123
+ ```
124
+ User Request → Agent Selected → Load SKILL.md → Read references/
125
+ ```
126
+
127
+ ### Skill Structure
128
+ ```
129
+ skill-name/
130
+ ├── SKILL.md # Required - metadata & rules
131
+ ├── references/ # Optional - templates, docs
132
+ └── scripts/ # Optional - validation scripts
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Quick Reference
138
+
139
+ | Need | Agent | Skills |
140
+ |------|-------|--------|
141
+ | Vue3 Component | frontend-specialist | vue3-patterns |
142
+ | ASP.NET API | backend-specialist | aspnet-patterns, api-patterns |
143
+ | SQL Schema | database-architect | sqlserver-design |
144
+ | Deploy to AKS | devops-engineer | azure-aks, gitops-patterns |
145
+ | Security Audit | security-auditor | vulnerability-scanner |
146
+ | Tests | test-engineer | xunit-testing, vitest-testing |
147
+ | Debug | debugger | systematic-debugging |
148
+ | Plan | project-planner | brainstorming, plan-writing |
@@ -0,0 +1,421 @@
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
@@ -0,0 +1,137 @@
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.