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
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: aspnet-patterns
|
|
3
|
-
description: ASP.NET Core patterns - Controllers, Services, Middleware
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# ASP.NET Core Patterns
|
|
7
|
-
|
|
8
|
-
> Clean architecture for ASP.NET Core applications.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Architecture
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
Controller → Service → Repository → Database
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
| Layer | Responsibility |
|
|
19
|
-
|-------|----------------|
|
|
20
|
-
| Controller | HTTP handling, validation |
|
|
21
|
-
| Service | Business logic |
|
|
22
|
-
| Repository | Data access |
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Controller Pattern
|
|
27
|
-
|
|
28
|
-
```csharp
|
|
29
|
-
[ApiController]
|
|
30
|
-
[Route("api/[controller]")]
|
|
31
|
-
public class UsersController : ControllerBase
|
|
32
|
-
{
|
|
33
|
-
private readonly IUserService _userService;
|
|
34
|
-
|
|
35
|
-
public UsersController(IUserService userService)
|
|
36
|
-
{
|
|
37
|
-
_userService = userService;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[HttpGet("{id}")]
|
|
41
|
-
public async Task<ActionResult<UserDto>> GetById(int id)
|
|
42
|
-
{
|
|
43
|
-
var user = await _userService.GetByIdAsync(id);
|
|
44
|
-
return user is null ? NotFound() : Ok(user);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
[HttpPost]
|
|
48
|
-
public async Task<ActionResult<UserDto>> Create(CreateUserDto dto)
|
|
49
|
-
{
|
|
50
|
-
var user = await _userService.CreateAsync(dto);
|
|
51
|
-
return CreatedAtAction(nameof(GetById), new { id = user.Id }, user);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Service Pattern
|
|
59
|
-
|
|
60
|
-
```csharp
|
|
61
|
-
public class UserService : IUserService
|
|
62
|
-
{
|
|
63
|
-
private readonly IUserRepository _repository;
|
|
64
|
-
|
|
65
|
-
public UserService(IUserRepository repository)
|
|
66
|
-
{
|
|
67
|
-
_repository = repository;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
public async Task<UserDto?> GetByIdAsync(int id)
|
|
71
|
-
{
|
|
72
|
-
var user = await _repository.GetByIdAsync(id);
|
|
73
|
-
return user?.ToDto();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Dependency Injection
|
|
81
|
-
|
|
82
|
-
```csharp
|
|
83
|
-
// Program.cs
|
|
84
|
-
builder.Services.AddScoped<IUserService, UserService>();
|
|
85
|
-
builder.Services.AddScoped<IUserRepository, UserRepository>();
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Response Format
|
|
91
|
-
|
|
92
|
-
```csharp
|
|
93
|
-
public class ApiResponse<T>
|
|
94
|
-
{
|
|
95
|
-
public bool Success { get; set; }
|
|
96
|
-
public T? Data { get; set; }
|
|
97
|
-
public string? Error { get; set; }
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## HTTP Status Codes
|
|
104
|
-
|
|
105
|
-
| Method | Success | Error |
|
|
106
|
-
|--------|---------|-------|
|
|
107
|
-
| GET | 200 OK | 404 Not Found |
|
|
108
|
-
| POST | 201 Created | 400 Bad Request |
|
|
109
|
-
| PUT | 200 OK | 404 Not Found |
|
|
110
|
-
| DELETE | 204 No Content | 404 Not Found |
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## DO / DON'T
|
|
115
|
-
|
|
116
|
-
| ✅ Do | ❌ Don't |
|
|
117
|
-
|-------|---------|
|
|
118
|
-
| Async/await | Blocking calls |
|
|
119
|
-
| DI everywhere | `new` in controllers |
|
|
120
|
-
| Proper status codes | 200 for everything |
|
|
121
|
-
| Constants/Enums for strings | Magic strings |
|
|
122
|
-
| Environment variables/Config | Hardcoded settings |
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: azure-aks
|
|
3
|
-
description: Azure Kubernetes Service deployment patterns
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Azure AKS
|
|
7
|
-
|
|
8
|
-
> Kubernetes deployment for Azure.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Deployment Manifest
|
|
13
|
-
|
|
14
|
-
```yaml
|
|
15
|
-
apiVersion: apps/v1
|
|
16
|
-
kind: Deployment
|
|
17
|
-
metadata:
|
|
18
|
-
name: myapp
|
|
19
|
-
labels:
|
|
20
|
-
app: myapp
|
|
21
|
-
spec:
|
|
22
|
-
replicas: 3
|
|
23
|
-
selector:
|
|
24
|
-
matchLabels:
|
|
25
|
-
app: myapp
|
|
26
|
-
template:
|
|
27
|
-
metadata:
|
|
28
|
-
labels:
|
|
29
|
-
app: myapp
|
|
30
|
-
spec:
|
|
31
|
-
containers:
|
|
32
|
-
- name: myapp
|
|
33
|
-
image: myacr.azurecr.io/myapp:v1
|
|
34
|
-
ports:
|
|
35
|
-
- containerPort: 80
|
|
36
|
-
resources:
|
|
37
|
-
requests:
|
|
38
|
-
memory: "128Mi"
|
|
39
|
-
cpu: "100m"
|
|
40
|
-
limits:
|
|
41
|
-
memory: "256Mi"
|
|
42
|
-
cpu: "200m"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Service
|
|
48
|
-
|
|
49
|
-
```yaml
|
|
50
|
-
apiVersion: v1
|
|
51
|
-
kind: Service
|
|
52
|
-
metadata:
|
|
53
|
-
name: myapp-service
|
|
54
|
-
spec:
|
|
55
|
-
selector:
|
|
56
|
-
app: myapp
|
|
57
|
-
ports:
|
|
58
|
-
- port: 80
|
|
59
|
-
targetPort: 80
|
|
60
|
-
type: LoadBalancer
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Ingress
|
|
66
|
-
|
|
67
|
-
```yaml
|
|
68
|
-
apiVersion: networking.k8s.io/v1
|
|
69
|
-
kind: Ingress
|
|
70
|
-
metadata:
|
|
71
|
-
name: myapp-ingress
|
|
72
|
-
spec:
|
|
73
|
-
rules:
|
|
74
|
-
- host: myapp.example.com
|
|
75
|
-
http:
|
|
76
|
-
paths:
|
|
77
|
-
- path: /
|
|
78
|
-
pathType: Prefix
|
|
79
|
-
backend:
|
|
80
|
-
service:
|
|
81
|
-
name: myapp-service
|
|
82
|
-
port:
|
|
83
|
-
number: 80
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## ConfigMap & Secrets
|
|
89
|
-
|
|
90
|
-
```yaml
|
|
91
|
-
apiVersion: v1
|
|
92
|
-
kind: ConfigMap
|
|
93
|
-
metadata:
|
|
94
|
-
name: myapp-config
|
|
95
|
-
data:
|
|
96
|
-
ENVIRONMENT: "production"
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
apiVersion: v1
|
|
100
|
-
kind: Secret
|
|
101
|
-
metadata:
|
|
102
|
-
name: myapp-secrets
|
|
103
|
-
type: Opaque
|
|
104
|
-
data:
|
|
105
|
-
CONNECTION_STRING: <base64-encoded>
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Health Checks
|
|
111
|
-
|
|
112
|
-
```yaml
|
|
113
|
-
livenessProbe:
|
|
114
|
-
httpGet:
|
|
115
|
-
path: /health
|
|
116
|
-
port: 80
|
|
117
|
-
initialDelaySeconds: 10
|
|
118
|
-
periodSeconds: 5
|
|
119
|
-
|
|
120
|
-
readinessProbe:
|
|
121
|
-
httpGet:
|
|
122
|
-
path: /ready
|
|
123
|
-
port: 80
|
|
124
|
-
initialDelaySeconds: 5
|
|
125
|
-
periodSeconds: 3
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## DO / DON'T
|
|
131
|
-
|
|
132
|
-
| ✅ Do | ❌ Don't |
|
|
133
|
-
|-------|---------|
|
|
134
|
-
| Resource limits | Unlimited resources |
|
|
135
|
-
| Health checks | Skip probes |
|
|
136
|
-
| Rolling updates | Recreate strategy |
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: azure-devops
|
|
3
|
-
description: Azure DevOps CI/CD pipelines and YAML configuration
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Azure DevOps
|
|
7
|
-
|
|
8
|
-
> CI/CD pipelines with YAML configuration.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Pipeline Structure
|
|
13
|
-
|
|
14
|
-
```yaml
|
|
15
|
-
trigger:
|
|
16
|
-
- main
|
|
17
|
-
- develop
|
|
18
|
-
|
|
19
|
-
pool:
|
|
20
|
-
vmImage: 'ubuntu-latest'
|
|
21
|
-
|
|
22
|
-
variables:
|
|
23
|
-
buildConfiguration: 'Release'
|
|
24
|
-
|
|
25
|
-
stages:
|
|
26
|
-
- stage: Build
|
|
27
|
-
- stage: Test
|
|
28
|
-
- stage: Deploy
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Build Stage
|
|
34
|
-
|
|
35
|
-
```yaml
|
|
36
|
-
- stage: Build
|
|
37
|
-
jobs:
|
|
38
|
-
- job: BuildJob
|
|
39
|
-
steps:
|
|
40
|
-
- task: UseDotNet@2
|
|
41
|
-
inputs:
|
|
42
|
-
version: '8.x'
|
|
43
|
-
|
|
44
|
-
- task: DotNetCoreCLI@2
|
|
45
|
-
displayName: 'Restore'
|
|
46
|
-
inputs:
|
|
47
|
-
command: 'restore'
|
|
48
|
-
|
|
49
|
-
- task: DotNetCoreCLI@2
|
|
50
|
-
displayName: 'Build'
|
|
51
|
-
inputs:
|
|
52
|
-
command: 'build'
|
|
53
|
-
arguments: '--configuration $(buildConfiguration)'
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Test Stage
|
|
59
|
-
|
|
60
|
-
```yaml
|
|
61
|
-
- stage: Test
|
|
62
|
-
dependsOn: Build
|
|
63
|
-
jobs:
|
|
64
|
-
- job: TestJob
|
|
65
|
-
steps:
|
|
66
|
-
- task: DotNetCoreCLI@2
|
|
67
|
-
displayName: 'Test'
|
|
68
|
-
inputs:
|
|
69
|
-
command: 'test'
|
|
70
|
-
arguments: '--collect:"XPlat Code Coverage"'
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Deploy Stage
|
|
76
|
-
|
|
77
|
-
```yaml
|
|
78
|
-
- stage: Deploy
|
|
79
|
-
dependsOn: Test
|
|
80
|
-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
|
|
81
|
-
jobs:
|
|
82
|
-
- deployment: DeployJob
|
|
83
|
-
environment: 'production'
|
|
84
|
-
strategy:
|
|
85
|
-
runOnce:
|
|
86
|
-
deploy:
|
|
87
|
-
steps:
|
|
88
|
-
- task: AzureWebApp@1
|
|
89
|
-
inputs:
|
|
90
|
-
appName: 'my-app'
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## KeyVault Integration
|
|
96
|
-
|
|
97
|
-
```yaml
|
|
98
|
-
- task: AzureKeyVault@2
|
|
99
|
-
inputs:
|
|
100
|
-
azureSubscription: 'MySubscription'
|
|
101
|
-
KeyVaultName: 'MyKeyVault'
|
|
102
|
-
SecretsFilter: '*'
|
|
103
|
-
RunAsPreJob: true
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## Approval Gates
|
|
109
|
-
|
|
110
|
-
Configure in Azure DevOps UI:
|
|
111
|
-
1. Environments → Production
|
|
112
|
-
2. Approvals and checks
|
|
113
|
-
3. Add approvers
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## DO / DON'T
|
|
118
|
-
|
|
119
|
-
| ✅ Do | ❌ Don't |
|
|
120
|
-
|-------|---------|
|
|
121
|
-
| YAML pipelines | Classic editor |
|
|
122
|
-
| Environment approvals | Auto-deploy to prod |
|
|
123
|
-
| KeyVault for secrets | Variable secrets |
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: azure-keyvault
|
|
3
|
-
description: Azure KeyVault secrets management
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Azure KeyVault
|
|
7
|
-
|
|
8
|
-
> Secure secrets management for Azure applications.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## ASP.NET Core Integration
|
|
13
|
-
|
|
14
|
-
```csharp
|
|
15
|
-
// Program.cs
|
|
16
|
-
var builder = WebApplication.CreateBuilder(args);
|
|
17
|
-
|
|
18
|
-
// Add KeyVault
|
|
19
|
-
var keyVaultName = builder.Configuration["KeyVaultName"];
|
|
20
|
-
var keyVaultUri = new Uri($"https://{keyVaultName}.vault.azure.net/");
|
|
21
|
-
|
|
22
|
-
builder.Configuration.AddAzureKeyVault(
|
|
23
|
-
keyVaultUri,
|
|
24
|
-
new DefaultAzureCredential());
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Required Package
|
|
30
|
-
|
|
31
|
-
```xml
|
|
32
|
-
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.*" />
|
|
33
|
-
<PackageReference Include="Azure.Identity" Version="1.*" />
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Secret Naming
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
KeyVault: ConnectionStrings--DefaultConnection
|
|
42
|
-
Config: ConnectionStrings:DefaultConnection
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Use `--` in KeyVault, maps to `:` in configuration.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Access Configuration
|
|
50
|
-
|
|
51
|
-
```csharp
|
|
52
|
-
// Access secret like any config
|
|
53
|
-
var connectionString = builder.Configuration["ConnectionStrings:DefaultConnection"];
|
|
54
|
-
var apiKey = builder.Configuration["ExternalApi:Key"];
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Managed Identity
|
|
60
|
-
|
|
61
|
-
For Azure-hosted apps (AKS, App Service):
|
|
62
|
-
|
|
63
|
-
1. Enable Managed Identity on the resource
|
|
64
|
-
2. Grant KeyVault access policy to the identity
|
|
65
|
-
3. Use `DefaultAzureCredential()` - auto-detects
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Local Development
|
|
70
|
-
|
|
71
|
-
```json
|
|
72
|
-
// appsettings.Development.json
|
|
73
|
-
{
|
|
74
|
-
"KeyVaultName": "my-keyvault-dev"
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Use Azure CLI login: `az login`
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Pipeline Integration
|
|
83
|
-
|
|
84
|
-
```yaml
|
|
85
|
-
- task: AzureKeyVault@2
|
|
86
|
-
inputs:
|
|
87
|
-
azureSubscription: 'MySubscription'
|
|
88
|
-
KeyVaultName: 'my-keyvault'
|
|
89
|
-
SecretsFilter: 'ConnectionString,ApiKey'
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## DO / DON'T
|
|
95
|
-
|
|
96
|
-
| ✅ Do | ❌ Don't |
|
|
97
|
-
|-------|---------|
|
|
98
|
-
| KeyVault for secrets | appsettings.json secrets |
|
|
99
|
-
| Managed Identity | Service Principal keys |
|
|
100
|
-
| Secret rotation | Static secrets forever |
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: brainstorming
|
|
3
|
-
description: Socratic discovery and requirement clarification
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Brainstorming
|
|
7
|
-
|
|
8
|
-
> Clarify requirements before implementation.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Socratic Method
|
|
13
|
-
|
|
14
|
-
**Ask questions to uncover hidden requirements.**
|
|
15
|
-
|
|
16
|
-
| Question Type | Purpose |
|
|
17
|
-
|---------------|---------|
|
|
18
|
-
| Clarifying | What exactly do you mean? |
|
|
19
|
-
| Probing | Why is this important? |
|
|
20
|
-
| Challenging | What if we did X instead? |
|
|
21
|
-
| Boundary | What's out of scope? |
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Discovery Questions
|
|
26
|
-
|
|
27
|
-
### Scope
|
|
28
|
-
- What problem are we solving?
|
|
29
|
-
- Who are the users?
|
|
30
|
-
- What's the expected outcome?
|
|
31
|
-
|
|
32
|
-
### Technical
|
|
33
|
-
- What systems are involved?
|
|
34
|
-
- Any existing constraints?
|
|
35
|
-
- Performance requirements?
|
|
36
|
-
|
|
37
|
-
### Timeline
|
|
38
|
-
- What's the deadline?
|
|
39
|
-
- MVP or full feature?
|
|
40
|
-
- Can we iterate?
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## Question Flow
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
1. Understand the GOAL
|
|
48
|
-
└─ "What should users be able to do?"
|
|
49
|
-
|
|
50
|
-
2. Identify USERS
|
|
51
|
-
└─ "Who will use this?"
|
|
52
|
-
|
|
53
|
-
3. Define SCOPE
|
|
54
|
-
└─ "What's in/out of scope?"
|
|
55
|
-
|
|
56
|
-
4. Explore CONSTRAINTS
|
|
57
|
-
└─ "Any technical limitations?"
|
|
58
|
-
|
|
59
|
-
5. Clarify PRIORITIES
|
|
60
|
-
└─ "What's most important?"
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Response Format
|
|
66
|
-
|
|
67
|
-
```markdown
|
|
68
|
-
🤔 **Before we proceed, let me clarify:**
|
|
69
|
-
|
|
70
|
-
1. [Clarifying question 1]
|
|
71
|
-
2. [Clarifying question 2]
|
|
72
|
-
3. [Clarifying question 3]
|
|
73
|
-
|
|
74
|
-
Please answer these so I can create the best solution.
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## When to Brainstorm
|
|
80
|
-
|
|
81
|
-
| ✅ Brainstorm | ❌ Skip |
|
|
82
|
-
|---------------|---------|
|
|
83
|
-
| Vague requests | Clear specifications |
|
|
84
|
-
| New features | Bug fixes |
|
|
85
|
-
| Complex tasks | Simple changes |
|
|
86
|
-
| Multi-domain | Single file edit |
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## DO / DON'T
|
|
91
|
-
|
|
92
|
-
| ✅ Do | ❌ Don't |
|
|
93
|
-
|-------|---------|
|
|
94
|
-
| Ask before assuming | Guess requirements |
|
|
95
|
-
| Minimum 3 questions | Skip discovery |
|
|
96
|
-
| Wait for answers | Start coding |
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: clean-code
|
|
3
|
-
description: Pragmatic coding standards - concise, direct, no over-engineering
|
|
4
|
-
priority: CRITICAL
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Clean Code Standards
|
|
8
|
-
|
|
9
|
-
> Be **concise, direct, and solution-focused**.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Core Principles
|
|
14
|
-
|
|
15
|
-
| Principle | Rule |
|
|
16
|
-
|-----------|------|
|
|
17
|
-
| SRP | Single Responsibility - one thing per function/class |
|
|
18
|
-
| DRY | Don't Repeat Yourself |
|
|
19
|
-
| KISS | Keep It Simple |
|
|
20
|
-
| YAGNI | You Aren't Gonna Need It |
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Naming
|
|
25
|
-
|
|
26
|
-
| Element | Convention | Example |
|
|
27
|
-
|---------|------------|---------|
|
|
28
|
-
| Variables | Reveal intent | `userCount` not `n` |
|
|
29
|
-
| Functions | Verb + noun | `getUserById()` |
|
|
30
|
-
| Booleans | Question form | `isActive`, `hasPermission` |
|
|
31
|
-
| Constants | SCREAMING_SNAKE | `MAX_RETRY_COUNT` |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Functions
|
|
36
|
-
|
|
37
|
-
| Rule | Guideline |
|
|
38
|
-
|------|-----------|
|
|
39
|
-
| Small | Max 20 lines |
|
|
40
|
-
| One Thing | Single purpose |
|
|
41
|
-
| Few Args | Max 3 parameters |
|
|
42
|
-
| No Side Effects | Don't mutate inputs |
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Code Structure
|
|
47
|
-
|
|
48
|
-
| Pattern | Apply |
|
|
49
|
-
|---------|-------|
|
|
50
|
-
| Guard Clauses | Early returns |
|
|
51
|
-
| Flat > Nested | Max 2 levels |
|
|
52
|
-
| Composition | Small functions together |
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Anti-Patterns
|
|
57
|
-
|
|
58
|
-
| ❌ Don't | ✅ Do |
|
|
59
|
-
|----------|-------|
|
|
60
|
-
| Comment every line | Self-documenting names |
|
|
61
|
-
| Helper for one-liner | Inline the code |
|
|
62
|
-
| Factory for 2 objects | Direct instantiation |
|
|
63
|
-
| Deep nesting | Guard clauses |
|
|
64
|
-
| Magic numbers | Named constants |
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Before Editing
|
|
69
|
-
|
|
70
|
-
| Question | Why |
|
|
71
|
-
|----------|-----|
|
|
72
|
-
| What imports this file? | They might break |
|
|
73
|
-
| What tests cover this? | Tests might fail |
|
|
74
|
-
| Is this shared? | Multiple places affected |
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Self-Check
|
|
79
|
-
|
|
80
|
-
| Check | Question |
|
|
81
|
-
|-------|----------|
|
|
82
|
-
| ✅ Goal met? | Did exactly what was asked? |
|
|
83
|
-
| ✅ Code works? | Verified the change? |
|
|
84
|
-
| ✅ No errors? | Lint and types pass? |
|