agents-templated 2.2.21 → 2.2.22
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/package.json +2 -1
- package/templates/agents/commands/README.md +0 -144
- package/templates/agents/commands/SCHEMA.md +0 -42
- package/templates/agents/commands/arch-check.md +0 -58
- package/templates/agents/commands/audit.md +0 -58
- package/templates/agents/commands/debug-track.md +0 -58
- package/templates/agents/commands/docs.md +0 -58
- package/templates/agents/commands/fix.md +0 -58
- package/templates/agents/commands/learn-loop.md +0 -58
- package/templates/agents/commands/perf.md +0 -58
- package/templates/agents/commands/plan.md +0 -58
- package/templates/agents/commands/pr.md +0 -58
- package/templates/agents/commands/problem-map.md +0 -58
- package/templates/agents/commands/release-ready.md +0 -58
- package/templates/agents/commands/release.md +0 -58
- package/templates/agents/commands/risk-review.md +0 -58
- package/templates/agents/commands/scope-shape.md +0 -58
- package/templates/agents/commands/task.md +0 -58
- package/templates/agents/commands/test-data.md +0 -56
- package/templates/agents/commands/test.md +0 -58
- package/templates/agents/commands/ux-bar.md +0 -58
- package/templates/agents/rules/ai-integration.md +0 -54
- package/templates/agents/rules/core.md +0 -173
- package/templates/agents/rules/database.md +0 -305
- package/templates/agents/rules/frontend.md +0 -217
- package/templates/agents/rules/guardrails.md +0 -97
- package/templates/agents/rules/hardening.md +0 -52
- package/templates/agents/rules/intent-routing.md +0 -54
- package/templates/agents/rules/lessons-learned.md +0 -44
- package/templates/agents/rules/planning.md +0 -69
- package/templates/agents/rules/security.md +0 -278
- package/templates/agents/rules/style.md +0 -344
- package/templates/agents/rules/system-workflow.md +0 -63
- package/templates/agents/rules/testing.md +0 -371
- package/templates/agents/rules/workflows.md +0 -56
- package/templates/agents/skills/README.md +0 -198
- package/templates/agents/skills/api-design/SKILL.md +0 -59
- package/templates/agents/skills/app-hardening/SKILL.md +0 -45
- package/templates/agents/skills/bug-triage/SKILL.md +0 -36
- package/templates/agents/skills/debug-skill/SKILL.md +0 -39
- package/templates/agents/skills/emilkowalski-skill/SKILL.md +0 -51
- package/templates/agents/skills/error-patterns/SKILL.md +0 -70
- package/templates/agents/skills/feature-delivery/SKILL.md +0 -38
- package/templates/agents/skills/feature-forge/SKILL.md +0 -39
- package/templates/agents/skills/find-skills/SKILL.md +0 -133
- package/templates/agents/skills/llm-integration/SKILL.md +0 -64
- package/templates/agents/skills/raphaelsalaja-userinterface-wiki/SKILL.md +0 -51
- package/templates/agents/skills/secure-code-guardian/SKILL.md +0 -39
- package/templates/agents/skills/shadcn-ui/SKILL.md +0 -1932
- package/templates/agents/skills/shadcn-ui/references/chart.md +0 -306
- package/templates/agents/skills/shadcn-ui/references/learn.md +0 -145
- package/templates/agents/skills/shadcn-ui/references/official-ui-reference.md +0 -1729
- package/templates/agents/skills/shadcn-ui/references/reference.md +0 -586
- package/templates/agents/skills/shadcn-ui/references/ui-reference.md +0 -1578
- package/templates/agents/skills/ui-ux-pro-max/SKILL.md +0 -386
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Code Style and Standards"
|
|
3
|
-
description: "Apply when organizing code, naming variables/functions, improving clarity, formatting with consistency, and maintaining code quality"
|
|
4
|
-
alwaysApply: true
|
|
5
|
-
version: "3.0.0"
|
|
6
|
-
tags: ["style", "formatting", "naming", "quality"]
|
|
7
|
-
globs:
|
|
8
|
-
- "**/*"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Code Style and Standards
|
|
12
|
-
|
|
13
|
-
Language and framework-agnostic standards for clean, maintainable code.
|
|
14
|
-
|
|
15
|
-
## General Code Quality
|
|
16
|
-
|
|
17
|
-
### Core Principles
|
|
18
|
-
|
|
19
|
-
- **Readability**: Code should be easy to understand without extensive comments
|
|
20
|
-
- **Consistency**: Follow the same patterns throughout the codebase
|
|
21
|
-
- **Simplicity**: Prefer simple solutions to complex ones
|
|
22
|
-
- **SOLID principles**: Single responsibility, Open/closed, Liskov, Interface segregation, Dependency inversion
|
|
23
|
-
- **DRY**: Don''t Repeat Yourself - extract common patterns
|
|
24
|
-
|
|
25
|
-
### Code Review Standards
|
|
26
|
-
|
|
27
|
-
Code should:
|
|
28
|
-
- Do one thing well
|
|
29
|
-
- Be testable
|
|
30
|
-
- Have no dead code
|
|
31
|
-
- Follow established patterns
|
|
32
|
-
- Include appropriate comments
|
|
33
|
-
- Have meaningful names
|
|
34
|
-
- Handle errors appropriately
|
|
35
|
-
- Consider security implications
|
|
36
|
-
- Consider performance implications
|
|
37
|
-
|
|
38
|
-
## Naming Conventions
|
|
39
|
-
|
|
40
|
-
### File Naming
|
|
41
|
-
|
|
42
|
-
Choose from established conventions:
|
|
43
|
-
|
|
44
|
-
**Option 1: kebab-case (Recommended)**
|
|
45
|
-
- File names: `user-profile.ts`, `navigation-bar.tsx`, `date-utils.js`
|
|
46
|
-
- Matches URLs and file systems
|
|
47
|
-
- Language-agnostic
|
|
48
|
-
- Easy to type and read
|
|
49
|
-
|
|
50
|
-
**Option 2: snake_case**
|
|
51
|
-
- File names: `user_profile.py`, `date_utils.go`
|
|
52
|
-
- Common in Python, Go, and Ruby
|
|
53
|
-
- Matches language conventions
|
|
54
|
-
|
|
55
|
-
**Option 3: PascalCase**
|
|
56
|
-
- File names: `UserProfile.tsx`, `DateUtils.ts`
|
|
57
|
-
- Common in C# and some JavaScript frameworks
|
|
58
|
-
- Use consistently if chosen
|
|
59
|
-
|
|
60
|
-
**Consistency rule**: Pick ONE and use it throughout the entire project.
|
|
61
|
-
|
|
62
|
-
### Code Naming
|
|
63
|
-
|
|
64
|
-
Consistent naming patterns:
|
|
65
|
-
|
|
66
|
-
**Variables and Functions**
|
|
67
|
-
- Use camelCase: `getUserData`, `isLoading`, `handleSubmit`
|
|
68
|
-
- Use English words (even in non-English projects)
|
|
69
|
-
- Be descriptive: `user` is worse than `currentUser`
|
|
70
|
-
- Avoid abbreviations: `getDesc` vs `getDescription`
|
|
71
|
-
- Prefix booleans with is/has: `isActive`, `hasPermission`
|
|
72
|
-
|
|
73
|
-
**Constants**
|
|
74
|
-
- Use UPPER_SNAKE_CASE: `MAX_RETRIES`, `API_BASE_URL`
|
|
75
|
-
- Immutable values that don''t change
|
|
76
|
-
- Global configuration values
|
|
77
|
-
- Magic numbers should become constants
|
|
78
|
-
|
|
79
|
-
**Classes/Types/Interfaces**
|
|
80
|
-
- Use PascalCase: `UserProfile`, `ApiResponse`, `DatabaseConfig`
|
|
81
|
-
- Descriptive and specific names
|
|
82
|
-
- Avoid generic names like `Data`, `Info`, `Object`
|
|
83
|
-
|
|
84
|
-
**Enums**
|
|
85
|
-
- Type name PascalCase: `UserStatus`
|
|
86
|
-
- Values UPPER_SNAKE_CASE: `ACTIVE`, `INACTIVE`
|
|
87
|
-
- Example: `UserStatus.ACTIVE`, `Theme.DARK_MODE`
|
|
88
|
-
|
|
89
|
-
### Examples
|
|
90
|
-
|
|
91
|
-
Good naming:
|
|
92
|
-
```
|
|
93
|
-
getUserById()
|
|
94
|
-
isValidEmail()
|
|
95
|
-
parseJsonResponse()
|
|
96
|
-
calculateProposedDiscount()
|
|
97
|
-
MAXIMUM_RETRY_ATTEMPTS
|
|
98
|
-
ValidationError
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Bad naming:
|
|
102
|
-
```
|
|
103
|
-
get()
|
|
104
|
-
foo(), bar(), x
|
|
105
|
-
process()
|
|
106
|
-
u1, u2, s
|
|
107
|
-
var1, var2
|
|
108
|
-
handleIt()
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Formatting
|
|
112
|
-
|
|
113
|
-
### Consistent Formatting
|
|
114
|
-
|
|
115
|
-
Use automated tools:
|
|
116
|
-
- **Prettier**: JavaScript/TypeScript/CSS/YAML
|
|
117
|
-
- **Black**: Python
|
|
118
|
-
- **gofmt**: Go
|
|
119
|
-
- **rustfmt**: Rust
|
|
120
|
-
- **clang-format**: C/C++
|
|
121
|
-
- Your language''s standard formatter
|
|
122
|
-
|
|
123
|
-
Benefits:
|
|
124
|
-
- No debates about formatting
|
|
125
|
-
- Quick review of actual changes
|
|
126
|
-
- Consistent codebase
|
|
127
|
-
|
|
128
|
-
### Line Length
|
|
129
|
-
|
|
130
|
-
- Target: 80-120 characters
|
|
131
|
-
- Maximum: 120-140 characters
|
|
132
|
-
- Avoid scrolling horizontally
|
|
133
|
-
|
|
134
|
-
### Indentation
|
|
135
|
-
|
|
136
|
-
Choose ONE and use consistently:
|
|
137
|
-
- **2 spaces**: JavaScript, YAML, some Python
|
|
138
|
-
- **4 spaces**: Python, Java, most languages
|
|
139
|
-
- **Tabs**: If configured, consistently
|
|
140
|
-
|
|
141
|
-
### Comments & Documentation
|
|
142
|
-
|
|
143
|
-
Good comments explain:
|
|
144
|
-
- **Why**: The reason for this code
|
|
145
|
-
- **Complex logic**: How it works if not obvious
|
|
146
|
-
- **Edge cases**: Special handling and why
|
|
147
|
-
- **Warnings**: Performance implications or gotchas
|
|
148
|
-
|
|
149
|
-
Bad comments:
|
|
150
|
-
```
|
|
151
|
-
// Increment x
|
|
152
|
-
x = x + 1
|
|
153
|
-
|
|
154
|
-
// Loop through users
|
|
155
|
-
for (user in users) { ... }
|
|
156
|
-
|
|
157
|
-
// This is a variable
|
|
158
|
-
let name = getUserName()
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Good comments:
|
|
162
|
-
```
|
|
163
|
-
// Increment retry counter before exponential backoff
|
|
164
|
-
retryCount = retryCount + 1
|
|
165
|
-
|
|
166
|
-
// Process users in batches to prevent memory overload
|
|
167
|
-
for (batch in users.batches()) { ... }
|
|
168
|
-
|
|
169
|
-
// Fetch fresh name from API to avoid stale cache
|
|
170
|
-
let name = getUserName()
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Comments vs Code
|
|
174
|
-
|
|
175
|
-
Let code speak for itself:
|
|
176
|
-
|
|
177
|
-
Instead of:
|
|
178
|
-
```
|
|
179
|
-
// Get user age
|
|
180
|
-
int age = currentYear - birthYear
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Write:
|
|
184
|
-
```
|
|
185
|
-
int age = calculateAge(currentYear, birthYear)
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Code Organization
|
|
189
|
-
|
|
190
|
-
### Module Organization
|
|
191
|
-
|
|
192
|
-
Order within files:
|
|
193
|
-
1. **Imports/Dependencies** - at top
|
|
194
|
-
2. **Constants** - module-level constants
|
|
195
|
-
3. **Types/Interfaces** - type definitions
|
|
196
|
-
4. **Functions/Classes** - main code (public first, private after)
|
|
197
|
-
5. **Exports** - explicit exports at end
|
|
198
|
-
|
|
199
|
-
### Function Organization
|
|
200
|
-
|
|
201
|
-
Function structure:
|
|
202
|
-
1. **Parameters** - at top
|
|
203
|
-
2. **Early returns** - validate inputs early
|
|
204
|
-
3. **Logic** - main implementation
|
|
205
|
-
4. **Return** - return result
|
|
206
|
-
|
|
207
|
-
### Class/Object Organization
|
|
208
|
-
|
|
209
|
-
Class structure:
|
|
210
|
-
1. **Constructor/initializer**
|
|
211
|
-
2. **Public methods**
|
|
212
|
-
3. **Private methods**
|
|
213
|
-
4. **Getters/setters**
|
|
214
|
-
5. **Static methods** (if applicable)
|
|
215
|
-
|
|
216
|
-
## Type Definitions
|
|
217
|
-
|
|
218
|
-
### Clear Type Contracts
|
|
219
|
-
|
|
220
|
-
Document what your types expect:
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
Define data structures clearly:
|
|
224
|
-
- What fields are required
|
|
225
|
-
- What data types
|
|
226
|
-
- What values are valid
|
|
227
|
-
- Any constraints or rules
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Avoid Magic Values
|
|
231
|
-
|
|
232
|
-
Instead of magic numbers/strings:
|
|
233
|
-
```
|
|
234
|
-
if (status === 1) { ... }
|
|
235
|
-
if (timeout === 60000) { ... }
|
|
236
|
-
|
|
237
|
-
const ACTIVE_STATUS = 1
|
|
238
|
-
const DEFAULT_TIMEOUT_MS = 60000
|
|
239
|
-
if (status === ACTIVE_STATUS) { ... }
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
## Error Handling
|
|
243
|
-
|
|
244
|
-
### Clear Error Messages
|
|
245
|
-
|
|
246
|
-
Error messages should:
|
|
247
|
-
- Describe what went wrong
|
|
248
|
-
- Explain why (if not obvious)
|
|
249
|
-
- Suggest how to fix
|
|
250
|
-
- Use user-friendly language
|
|
251
|
-
|
|
252
|
-
Good error messages:
|
|
253
|
-
- "Email format is invalid. Please enter a valid email address."
|
|
254
|
-
- "Password must be at least 8 characters."
|
|
255
|
-
- "User with this email already exists."
|
|
256
|
-
|
|
257
|
-
Bad error messages:
|
|
258
|
-
- "Error"
|
|
259
|
-
- "Invalid input"
|
|
260
|
-
- "Stack trace here..."
|
|
261
|
-
|
|
262
|
-
### Error Handling Pattern
|
|
263
|
-
|
|
264
|
-
Proper error handling:
|
|
265
|
-
1. Catch/handle errors explicitly
|
|
266
|
-
2. Log error with context
|
|
267
|
-
3. Return appropriate error response
|
|
268
|
-
4. Never expose sensitive data
|
|
269
|
-
5. Include error code for client handling
|
|
270
|
-
|
|
271
|
-
## Security in Code
|
|
272
|
-
|
|
273
|
-
### Dangerous Patterns to Avoid
|
|
274
|
-
|
|
275
|
-
Never:
|
|
276
|
-
- Store secrets in code
|
|
277
|
-
- Log sensitive data
|
|
278
|
-
- Dynamic SQL/query construction
|
|
279
|
-
- Eval user input
|
|
280
|
-
- Hardcoded API keys
|
|
281
|
-
- Return sensitive data in errors
|
|
282
|
-
- Skip input validation
|
|
283
|
-
|
|
284
|
-
Always:
|
|
285
|
-
- Validate all inputs
|
|
286
|
-
- Use parameterized queries
|
|
287
|
-
- Hash sensitive data
|
|
288
|
-
- Use environment variables for secrets
|
|
289
|
-
- Log security events
|
|
290
|
-
- Encode output appropriately
|
|
291
|
-
|
|
292
|
-
## Performance Considerations
|
|
293
|
-
|
|
294
|
-
### Avoid N+1 Queries
|
|
295
|
-
|
|
296
|
-
Good:
|
|
297
|
-
```
|
|
298
|
-
Get all users once with their posts
|
|
299
|
-
Result: 1 query
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Bad:
|
|
303
|
-
```
|
|
304
|
-
For each user (loop):
|
|
305
|
-
Get posts for that user
|
|
306
|
-
Result: 1 + N queries
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### Avoid Premature Optimization
|
|
310
|
-
|
|
311
|
-
Focus on:
|
|
312
|
-
1. **Correct code first** - Works before optimizing
|
|
313
|
-
2. **Readable code** - Easy to understand
|
|
314
|
-
3. **Profile critical paths** - Where time is spent
|
|
315
|
-
4. **Optimize bottlenecks** - Only where it matters
|
|
316
|
-
|
|
317
|
-
## Testing
|
|
318
|
-
|
|
319
|
-
### Code for Testability
|
|
320
|
-
|
|
321
|
-
Testable code:
|
|
322
|
-
- Has clear inputs and outputs
|
|
323
|
-
- Is easy to mock dependencies
|
|
324
|
-
- Has single responsibility
|
|
325
|
-
- Doesn''t depend on side effects
|
|
326
|
-
- Has deterministic behavior
|
|
327
|
-
|
|
328
|
-
### Test Naming
|
|
329
|
-
|
|
330
|
-
Test names describe what is being tested:
|
|
331
|
-
```
|
|
332
|
-
testEmailValidationAcceptsValidEmail()
|
|
333
|
-
testUserCreationReturnsUserWithId()
|
|
334
|
-
testPasswordResetTokenExpiresAfter24Hours()
|
|
335
|
-
|
|
336
|
-
test1()
|
|
337
|
-
testFunction()
|
|
338
|
-
testWorks()
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
Remember: **Write code for humans first, computers second.**
|
|
344
|
-
Clean code is maintainable code, and maintainable code is more secure, performant, and bug-free.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "System Workflow Orchestration"
|
|
3
|
-
description: "Apply when planning delivery phases, defining acceptance criteria, establishing rollback procedures, or orchestrating multi-step workflows"
|
|
4
|
-
version: "3.0.0"
|
|
5
|
-
tags: ["workflow", "gates", "delivery", "governance"]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Define a repeatable lifecycle so all work is traceable, verifiable, and releasable.
|
|
11
|
-
|
|
12
|
-
## Workflow Phases
|
|
13
|
-
|
|
14
|
-
1. Discover
|
|
15
|
-
2. Plan
|
|
16
|
-
3. Implement
|
|
17
|
-
4. Verify
|
|
18
|
-
5. Release
|
|
19
|
-
|
|
20
|
-
## Phase Requirements
|
|
21
|
-
|
|
22
|
-
### 1) Discover
|
|
23
|
-
- Capture objective, scope boundaries, constraints, and risk profile.
|
|
24
|
-
- Produce: context summary + assumptions.
|
|
25
|
-
|
|
26
|
-
### 2) Plan
|
|
27
|
-
- Break work into atomic units and dependency order.
|
|
28
|
-
- Define acceptance criteria and rollback considerations.
|
|
29
|
-
- Produce: execution plan with checkpoints.
|
|
30
|
-
|
|
31
|
-
### 3) Implement
|
|
32
|
-
- Apply smallest safe changes within declared scope.
|
|
33
|
-
- Keep changes deterministic and reversible when possible.
|
|
34
|
-
- Produce: change summary and affected files.
|
|
35
|
-
|
|
36
|
-
### 4) Verify
|
|
37
|
-
- Run relevant tests/checks (targeted first, broad second).
|
|
38
|
-
- Confirm security and regression impact.
|
|
39
|
-
- Produce: validation evidence.
|
|
40
|
-
|
|
41
|
-
### 5) Release
|
|
42
|
-
- Check gates: tests, security posture, migration safety, rollback readiness.
|
|
43
|
-
- Produce: release decision + rollout/rollback steps.
|
|
44
|
-
|
|
45
|
-
## Required Delivery Artifacts
|
|
46
|
-
|
|
47
|
-
- Objective and scope
|
|
48
|
-
- Acceptance criteria
|
|
49
|
-
- Risk register
|
|
50
|
-
- Validation evidence
|
|
51
|
-
- Rollback strategy (for non-trivial changes)
|
|
52
|
-
|
|
53
|
-
## Gate Rules
|
|
54
|
-
|
|
55
|
-
- Fail any critical gate -> `status: blocked`.
|
|
56
|
-
- Missing rollback for risky changes -> blocked.
|
|
57
|
-
- Missing validation evidence -> blocked.
|
|
58
|
-
|
|
59
|
-
## Rollback Requirements
|
|
60
|
-
|
|
61
|
-
- Identify rollback trigger conditions.
|
|
62
|
-
- Provide explicit rollback steps.
|
|
63
|
-
- Keep backups/version references for destructive changes.
|