agents-templated 2.2.20 → 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.
Files changed (56) hide show
  1. package/package.json +2 -1
  2. package/templates/CLAUDE.md +17 -17
  3. package/templates/agents/commands/README.md +0 -144
  4. package/templates/agents/commands/SCHEMA.md +0 -42
  5. package/templates/agents/commands/arch-check.md +0 -58
  6. package/templates/agents/commands/audit.md +0 -58
  7. package/templates/agents/commands/debug-track.md +0 -58
  8. package/templates/agents/commands/docs.md +0 -58
  9. package/templates/agents/commands/fix.md +0 -58
  10. package/templates/agents/commands/learn-loop.md +0 -58
  11. package/templates/agents/commands/perf.md +0 -58
  12. package/templates/agents/commands/plan.md +0 -58
  13. package/templates/agents/commands/pr.md +0 -58
  14. package/templates/agents/commands/problem-map.md +0 -58
  15. package/templates/agents/commands/release-ready.md +0 -58
  16. package/templates/agents/commands/release.md +0 -58
  17. package/templates/agents/commands/risk-review.md +0 -58
  18. package/templates/agents/commands/scope-shape.md +0 -58
  19. package/templates/agents/commands/task.md +0 -58
  20. package/templates/agents/commands/test-data.md +0 -56
  21. package/templates/agents/commands/test.md +0 -58
  22. package/templates/agents/commands/ux-bar.md +0 -58
  23. package/templates/agents/rules/ai-integration.md +0 -54
  24. package/templates/agents/rules/core.md +0 -173
  25. package/templates/agents/rules/database.md +0 -305
  26. package/templates/agents/rules/frontend.md +0 -217
  27. package/templates/agents/rules/guardrails.md +0 -97
  28. package/templates/agents/rules/hardening.md +0 -52
  29. package/templates/agents/rules/intent-routing.md +0 -54
  30. package/templates/agents/rules/lessons-learned.md +0 -44
  31. package/templates/agents/rules/planning.md +0 -69
  32. package/templates/agents/rules/security.md +0 -278
  33. package/templates/agents/rules/style.md +0 -344
  34. package/templates/agents/rules/system-workflow.md +0 -63
  35. package/templates/agents/rules/testing.md +0 -371
  36. package/templates/agents/rules/workflows.md +0 -56
  37. package/templates/agents/skills/README.md +0 -198
  38. package/templates/agents/skills/api-design/SKILL.md +0 -59
  39. package/templates/agents/skills/app-hardening/SKILL.md +0 -45
  40. package/templates/agents/skills/bug-triage/SKILL.md +0 -36
  41. package/templates/agents/skills/debug-skill/SKILL.md +0 -39
  42. package/templates/agents/skills/emilkowalski-skill/SKILL.md +0 -51
  43. package/templates/agents/skills/error-patterns/SKILL.md +0 -70
  44. package/templates/agents/skills/feature-delivery/SKILL.md +0 -38
  45. package/templates/agents/skills/feature-forge/SKILL.md +0 -39
  46. package/templates/agents/skills/find-skills/SKILL.md +0 -133
  47. package/templates/agents/skills/llm-integration/SKILL.md +0 -64
  48. package/templates/agents/skills/raphaelsalaja-userinterface-wiki/SKILL.md +0 -51
  49. package/templates/agents/skills/secure-code-guardian/SKILL.md +0 -39
  50. package/templates/agents/skills/shadcn-ui/SKILL.md +0 -1932
  51. package/templates/agents/skills/shadcn-ui/references/chart.md +0 -306
  52. package/templates/agents/skills/shadcn-ui/references/learn.md +0 -145
  53. package/templates/agents/skills/shadcn-ui/references/official-ui-reference.md +0 -1729
  54. package/templates/agents/skills/shadcn-ui/references/reference.md +0 -586
  55. package/templates/agents/skills/shadcn-ui/references/ui-reference.md +0 -1578
  56. package/templates/agents/skills/ui-ux-pro-max/SKILL.md +0 -386
@@ -1,278 +0,0 @@
1
- ---
2
- title: "Security Rules & Best Practices"
3
- description: "Apply when implementing authentication, authorization, API validation, secrets management, or protecting against OWASP Top 10 vulnerabilities"
4
- alwaysApply: true
5
- version: "3.0.0"
6
- tags: ["security", "auth", "validation", "secrets", "owasp"]
7
- ---
8
-
9
- # Security Rules & Best Practices
10
-
11
- You are an expert security-focused developer implementing security-first development regardless of technology stack.
12
-
13
- ## Core Security Principles
14
-
15
- - **Defense in Depth**: Implement multiple layers of security controls
16
- - **Least Privilege**: Grant minimum necessary permissions for each role/service
17
- - **Input Validation**: Validate all inputs at boundaries with appropriate schema validation
18
- - **Output Encoding**: Encode all outputs to prevent injection attacks
19
- - **Secure by Default**: Choose secure configurations over convenience
20
- - **Fail Securely**: Default to denial, require explicit allow
21
-
22
- ## Authentication & Authorization Patterns
23
-
24
- ### Session Management Best Practices
25
-
26
- Implement secure session handling regardless of framework:
27
- - **Session storage**: Use secure cookies (HttpOnly, Secure, SameSite) or JWT tokens
28
- - **Token expiration**: Implement appropriate timeout for token validity
29
- - **Refresh tokens**: Separate long-lived and short-lived tokens
30
- - **Session invalidation**: Properly terminate sessions on logout
31
- - **CSRF protection**: Verify request origin for state-changing operations
32
-
33
- ### Authentication Patterns (Language-Agnostic)
34
-
35
- Authentication Flow:
36
- 1. User provides credentials (username/password)
37
- 2. Validate credentials against hashed password in database
38
- 3. Create session or JWT token with user identity
39
- 4. Return session/token to client with secure flags
40
- 5. Client includes token/session in subsequent requests
41
- 6. Server validates token/session on each request
42
- 7. Extract user identity from verified token/session
43
-
44
- **Key Requirements:**
45
- - Hash passwords with strong algorithms (bcrypt, scrypt, argon2)
46
- - Salt rounds: 12+ for bcrypt
47
- - Never store plaintext passwords
48
- - Implement rate limiting on authentication endpoints
49
- - Log authentication attempts (failures especially)
50
- - Provide clear error messages that don't leak user information
51
-
52
- ### Authorization Patterns (Language-Agnostic)
53
-
54
- Authorization Flow:
55
- 1. Extract user identity from authenticated session/token
56
- 2. For each protected operation:
57
- a. Check if user is authenticated
58
- b. Retrieve user''s roles/permissions from database
59
- c. Verify required permissions for operation
60
- d. Allow or deny based on permission check
61
- 3. Log authorization checks (especially failures)
62
- 4. Return appropriate error for denied access
63
-
64
- **Role-Based Access Control (RBAC):**
65
- - Define roles with clear permissions (admin, moderator, user, guest)
66
- - Assign roles to users (can be multiple)
67
- - Check user''s roles before allowing sensitive operations
68
- - Implement at API boundaries and critical business logic
69
- - Audit role changes and permission checks
70
-
71
- ## Input Validation & Sanitization
72
-
73
- ### Validation Strategy (Technology-Agnostic)
74
-
75
- Validate all user inputs at API boundaries:
76
-
77
- Validation Process:
78
- 1. Define schema/rules for each input
79
- - Data type (string, number, boolean, date, etc.)
80
- - Length constraints (min/max)
81
- - Format requirements (regex patterns)
82
- - Allowed values (whitelist)
83
- - Required fields
84
-
85
- 2. Validate incoming data against schema
86
- - Reject invalid data with clear error messages
87
- - Never modify user input, reject or accept
88
-
89
- 3. Transform/normalize data if needed
90
- - Trim whitespace
91
- - Convert to lowercase/uppercase as appropriate
92
- - Parse dates to consistent format
93
-
94
- 4. Return validation result
95
- - Success with validated data
96
- - Failure with specific field errors
97
-
98
- **Common Validation Rules:**
99
- - Email: Valid format using standardized validation, convert to lowercase
100
- - Password: Minimum 8 characters, complexity requirements (uppercase, lowercase, number, special)
101
- - Names: 2-100 characters, alphanumeric with spaces allowed
102
- - URLs: Valid URL format for whitelist only
103
- - Phone: Valid format for your region
104
- - User IDs: UUID v4 format or similar non-sequential identifiers
105
-
106
- ### Special Input Handling
107
-
108
- **File Uploads:**
109
- - Validate file content type (MIME type check from file content, not extension)
110
- - Enforce size limits (max upload size)
111
- - Scan for malware when possible
112
- - Store outside web root
113
- - No execute permission on upload directory
114
- - Serve with inline=false to force download
115
-
116
- **API Parameters:**
117
- - Validate query parameters with same rules as request body
118
- - Whitelist allowed parameters per endpoint
119
- - Validate pagination limits (max 100-1000 items)
120
- - Validate sort fields against whitelist
121
-
122
- **Database Queries:**
123
- - Use ORM/parameterized queries only (never string concatenation)
124
- - Filter results to authenticated user''s data
125
- - Limit results with pagination
126
- - Monitor for suspicious query patterns
127
-
128
- ## Rate Limiting & DoS Protection
129
-
130
- ### Rate Limiting Strategy
131
-
132
- Implement rate limiting on sensitive endpoints:
133
-
134
- Rate Limiting Levels:
135
- - Authentication endpoints: 5 attempts per 15 minutes per IP
136
- - API endpoints: 100-1000 requests per hour per user/IP
137
- - Public endpoints: 1000+ requests per hour per IP
138
- - Critical operations: 1 attempt per minute per user
139
-
140
- **Implementation approach:**
141
- - Use Redis or similar for distributed rate limiting
142
- - Track by IP address, user ID, or API key depending on endpoint
143
- - Return 429 (Too Many Requests) when limit exceeded
144
- - Include retry-after header in response
145
- - Log rate limit violations
146
-
147
- ## OWASP Top 10 Protection
148
-
149
- ### A01: Broken Access Control
150
- - Implement authentication on all protected endpoints
151
- - Check authorization for current user before returning data
152
- - Use role-based access control with clear permission model
153
- - Validate user can only access their own data
154
- - Log authorization failures for security monitoring
155
-
156
- ### A02: Cryptographic Failures
157
- - Hash passwords with strong algorithms (bcrypt, scrypt, argon2)
158
- - Use HTTPS in production for all communications
159
- - Store secrets in environment variables, never in code
160
- - Use secure cookie flags (HttpOnly, Secure, SameSite)
161
- - Encrypt sensitive data at rest when appropriate
162
-
163
- ### A03: Injection
164
- - Use ORM/parameterized queries only (no string concatenation)
165
- - Validate all inputs with schema/whitelist approach
166
- - Encode output data in appropriate context (HTML, URL, etc.)
167
- - Implement Content Security Policy headers
168
- - Use prepared statements for database queries
169
-
170
- ### A04: Insecure Design
171
- - Implement authentication and authorization from start
172
- - Rate limit authentication endpoints
173
- - Validate input at every API boundary
174
- - Design with fail-secure defaults
175
- - Implement comprehensive error handling
176
-
177
- ### A05: Security Misconfiguration
178
- - Run only necessary services/features
179
- - Implement all security headers (CSP, X-Frame-Options, HSTS, etc.)
180
- - Update frameworks and dependencies regularly
181
- - Remove default accounts and credentials
182
- - Validate environment variables at startup
183
-
184
- ### A06: Vulnerable Components
185
- - Keep dependencies updated with security patches
186
- - Use lock files (package-lock.json, requirements.txt, etc.)
187
- - Regularly scan dependencies for vulnerabilities
188
- - Remove unused dependencies
189
- - Only use supported versions of frameworks
190
-
191
- ### A07: Authentication Failure
192
- - Implement strong password requirements
193
- - Use rate limiting on authentication endpoints
194
- - Hash passwords securely (bcrypt, scrypt, argon2)
195
- - Implement session timeouts
196
- - Log authentication attempts
197
-
198
- ### A08: Data Integrity Failures
199
- - Validate all input data with schema validation
200
- - Implement proper error handling
201
- - Log integrity violation attempts
202
- - Use strong checksums/hashes for critical data
203
- - Implement database constraints
204
-
205
- ### A09: Logging and Monitoring Failure
206
- - Log authentication and authorization events
207
- - Log sensitive operations and data access
208
- - Monitor for suspicious patterns
209
- - Keep logs secure and don''t expose sensitive info
210
- - Alert on security-relevant events
211
-
212
- ### A10: SSRF (Server-Side Request Forgery)
213
- - Validate and whitelist URLs that application accesses
214
- - Implement network-level restrictions
215
- - Disable unused URL schemes
216
- - Implement timeouts on external requests
217
- - Log and monitor external API calls
218
-
219
- ## Environment & Secrets Management
220
-
221
- ### Environment Variables
222
-
223
- Environment Variable Validation Pattern:
224
- 1. Define all required variables with types
225
- 2. Load from .env file or environment not from code
226
- 3. Validate all variables exist at startup
227
- 4. Validate all variables are correct type/format
228
- 5. Provide clear error if validation fails
229
- 6. Never log or expose environment variables
230
-
231
- **Sensitive Variables:**
232
- - Database credentials (URL, passwords)
233
- - API keys and secrets
234
- - Encryption keys
235
- - Authentication secrets (session secret, JWT secret)
236
- - Third-party service credentials
237
-
238
- No sensitive variables should ever be:
239
- - Committed to version control
240
- - Logged (even in debug logs)
241
- - Exposed in error messages
242
- - Included in client-side code
243
- - Transmitted in URLs
244
-
245
- ## Application Hardening & Obfuscation
246
-
247
- - Treat obfuscation as **defense in depth**, not a replacement for authentication, authorization, secrets hygiene, or validation.
248
- - Apply hardening selectively by risk profile, especially for distributed clients (mobile/desktop/browser) and high-value IP logic.
249
- - Integrate hardening into build/release flow and require post-hardening functional regression and performance checks.
250
- - Protect symbol/mapping/debug artifacts with restricted access and secure retention policies.
251
- - Require reproducible builds and a clear rollback path for hardened releases.
252
-
253
- ## Security Checklist
254
-
255
- Before deploying to production:
256
-
257
- - [ ] All inputs validated with schema validation
258
- - [ ] Password hashing implemented with strong algorithm
259
- - [ ] Rate limiting on authentication endpoints
260
- - [ ] HTTPS enforced in production
261
- - [ ] Security headers configured
262
- - [ ] Environment variables validated at startup
263
- - [ ] No sensitive data in logs
264
- - [ ] Database queries use ORM (no raw SQL)
265
- - [ ] Authorization checks on protected endpoints
266
- - [ ] Error messages don''t leak sensitive information
267
- - [ ] External API calls use HTTPS
268
- - [ ] Dependencies scanned for vulnerabilities
269
- - [ ] Unused dependencies removed
270
- - [ ] Dead code removed
271
- - [ ] Secrets never committed to version control
272
- - [ ] Session/token timeouts configured
273
- - [ ] CSRF protection implemented (if applicable)
274
-
275
- ---
276
-
277
- Remember: **Security must be built in from the beginning, not added as an afterthought.**
278
- Every feature should consider security implications, and every developer should understand these principles.
@@ -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.