agentic-team-templates 0.8.3 → 0.9.1

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.
@@ -0,0 +1,372 @@
1
+ # Quality Gates
2
+
3
+ Standards for release readiness and quality control.
4
+
5
+ ## Gate Definitions
6
+
7
+ ### Development Gate (Code Complete)
8
+
9
+ Before code is considered ready for QA:
10
+
11
+ ```markdown
12
+ ## Development Gate Checklist
13
+
14
+ ### Code Quality
15
+ - [ ] Code compiles without errors
16
+ - [ ] Code review approved
17
+ - [ ] No critical static analysis issues
18
+ - [ ] Self-tested by developer
19
+
20
+ ### Unit Testing
21
+ - [ ] Unit tests written for new code
22
+ - [ ] Unit tests passing (100%)
23
+ - [ ] Code coverage meets threshold (80%+)
24
+ - [ ] No regressions in existing tests
25
+
26
+ ### Documentation
27
+ - [ ] Code comments where needed
28
+ - [ ] API documentation updated
29
+ - [ ] README updated if applicable
30
+
31
+ ### Integration
32
+ - [ ] Feature branch merged to develop
33
+ - [ ] No merge conflicts
34
+ - [ ] Build pipeline passing
35
+ ```
36
+
37
+ ### QA Gate (Test Complete)
38
+
39
+ Before code is promoted to staging:
40
+
41
+ ```markdown
42
+ ## QA Gate Checklist
43
+
44
+ ### Test Execution
45
+ - [ ] All planned test cases executed
46
+ - [ ] Pass rate > 95%
47
+ - [ ] All P0/P1 tests passing
48
+ - [ ] Regression suite passing
49
+
50
+ ### Defect Status
51
+ - [ ] No open P0 defects
52
+ - [ ] No open P1 defects (or approved exceptions)
53
+ - [ ] P2 defects < threshold (5)
54
+ - [ ] All defects triaged
55
+
56
+ ### Automation
57
+ - [ ] New features have automated tests
58
+ - [ ] Automated regression passing
59
+ - [ ] No new flaky tests introduced
60
+
61
+ ### Sign-off
62
+ - [ ] QA lead approval
63
+ - [ ] Test summary report generated
64
+ ```
65
+
66
+ ### Staging Gate (Pre-Production)
67
+
68
+ Before code is promoted to production:
69
+
70
+ ```markdown
71
+ ## Staging Gate Checklist
72
+
73
+ ### Functional Verification
74
+ - [ ] Smoke tests passing in staging
75
+ - [ ] Integration tests passing
76
+ - [ ] E2E critical paths verified
77
+ - [ ] Cross-browser testing complete
78
+
79
+ ### Non-Functional Testing
80
+ - [ ] Performance benchmarks met
81
+ - [ ] Security scan clean
82
+ - [ ] Accessibility audit passed
83
+ - [ ] Load testing completed (if applicable)
84
+
85
+ ### Operational Readiness
86
+ - [ ] Monitoring dashboards configured
87
+ - [ ] Alerting rules in place
88
+ - [ ] Runbook updated
89
+ - [ ] Rollback procedure tested
90
+
91
+ ### Stakeholder Approval
92
+ - [ ] Product owner sign-off
93
+ - [ ] QA lead sign-off
94
+ - [ ] Engineering lead sign-off
95
+ - [ ] Operations sign-off (if applicable)
96
+ ```
97
+
98
+ ### Production Gate (Go-Live)
99
+
100
+ Final checks before release:
101
+
102
+ ```markdown
103
+ ## Production Gate Checklist
104
+
105
+ ### Pre-Deployment
106
+ - [ ] All lower environment gates passed
107
+ - [ ] Release notes prepared
108
+ - [ ] Customer communication ready
109
+ - [ ] Support team briefed
110
+
111
+ ### Deployment Verification
112
+ - [ ] Deployment successful
113
+ - [ ] Smoke tests passing in production
114
+ - [ ] No error spikes in monitoring
115
+ - [ ] Feature flags configured correctly
116
+
117
+ ### Post-Deployment
118
+ - [ ] Monitor for 30 minutes
119
+ - [ ] Verify key metrics stable
120
+ - [ ] Confirm no customer complaints
121
+ - [ ] Update deployment log
122
+ ```
123
+
124
+ ## Threshold Definitions
125
+
126
+ ### Test Pass Rate Thresholds
127
+
128
+ | Gate | Smoke | Regression | New Features |
129
+ |------|-------|------------|--------------|
130
+ | QA Complete | 100% | 95% | 90% |
131
+ | Staging | 100% | 98% | 95% |
132
+ | Production | 100% | 100% | 100% |
133
+
134
+ ### Defect Thresholds
135
+
136
+ | Severity | QA Gate | Staging Gate | Production Gate |
137
+ |----------|---------|--------------|-----------------|
138
+ | P0 | 0 open | 0 open | 0 open |
139
+ | P1 | 0 open | 0 open | 0 open |
140
+ | P2 | < 10 open | < 5 open | < 3 open |
141
+ | P3 | No limit | < 20 open | < 10 open |
142
+
143
+ ### Coverage Thresholds
144
+
145
+ | Metric | Minimum | Target | Stretch |
146
+ |--------|---------|--------|---------|
147
+ | Code Coverage | 70% | 80% | 90% |
148
+ | Branch Coverage | 60% | 70% | 80% |
149
+ | Requirement Coverage | 90% | 100% | 100% |
150
+
151
+ ## Performance Gates
152
+
153
+ ### Response Time Thresholds
154
+
155
+ | Endpoint Type | Warning | Critical | Block Release |
156
+ |---------------|---------|----------|---------------|
157
+ | API (p50) | > 100ms | > 200ms | > 500ms |
158
+ | API (p95) | > 300ms | > 500ms | > 1000ms |
159
+ | Page Load (p50) | > 1s | > 2s | > 3s |
160
+ | Page Load (p95) | > 2s | > 3s | > 5s |
161
+
162
+ ### Reliability Thresholds
163
+
164
+ | Metric | Warning | Critical | Block Release |
165
+ |--------|---------|----------|---------------|
166
+ | Error Rate | > 0.1% | > 0.5% | > 1% |
167
+ | Availability | < 99.9% | < 99.5% | < 99% |
168
+ | Timeout Rate | > 0.5% | > 1% | > 2% |
169
+
170
+ ### Load Test Thresholds
171
+
172
+ | Metric | Baseline | +20% Load | +50% Load |
173
+ |--------|----------|-----------|-----------|
174
+ | Response Time | < 200ms | < 300ms | < 500ms |
175
+ | Error Rate | < 0.1% | < 0.5% | < 1% |
176
+ | Throughput | 1000 rps | 1200 rps | 1500 rps |
177
+
178
+ ## Security Gates
179
+
180
+ ### Vulnerability Thresholds
181
+
182
+ | Severity | Development | Staging | Production |
183
+ |----------|-------------|---------|------------|
184
+ | Critical | Block merge | Block deploy | Block release |
185
+ | High | Block merge | Block deploy | Block release |
186
+ | Medium | Warning | Block deploy | Review required |
187
+ | Low | Warning | Warning | Warning |
188
+
189
+ ### Security Scan Requirements
190
+
191
+ ```markdown
192
+ ## Security Gate Requirements
193
+
194
+ ### Static Analysis (SAST)
195
+ - [ ] No critical/high vulnerabilities
196
+ - [ ] No hardcoded secrets
197
+ - [ ] No SQL injection patterns
198
+ - [ ] No XSS vulnerabilities
199
+
200
+ ### Dependency Scanning
201
+ - [ ] No critical vulnerabilities in dependencies
202
+ - [ ] No known malicious packages
203
+ - [ ] Dependencies up to date (< 2 major versions behind)
204
+
205
+ ### Dynamic Analysis (DAST)
206
+ - [ ] No critical findings
207
+ - [ ] No authentication bypasses
208
+ - [ ] No injection vulnerabilities
209
+ - [ ] HTTPS enforced
210
+
211
+ ### Container Scanning (if applicable)
212
+ - [ ] Base image from approved list
213
+ - [ ] No critical vulnerabilities in image
214
+ - [ ] Non-root user configured
215
+ - [ ] Minimal attack surface
216
+ ```
217
+
218
+ ## Exception Process
219
+
220
+ ### Requesting an Exception
221
+
222
+ ```markdown
223
+ ## Quality Gate Exception Request
224
+
225
+ **Requestor**: [Name]
226
+ **Date**: [Date]
227
+ **Gate**: [Which gate]
228
+ **Release**: [Version]
229
+
230
+ ### Exception Details
231
+ **Criterion not met**: [Specific criterion]
232
+ **Current state**: [What it is]
233
+ **Required state**: [What it should be]
234
+
235
+ ### Business Justification
236
+ [Why this release cannot wait for the criterion to be met]
237
+
238
+ ### Risk Assessment
239
+ **Impact if released**: [What could go wrong]
240
+ **Likelihood**: [High/Medium/Low]
241
+ **Mitigation**: [How we'll handle issues]
242
+
243
+ ### Remediation Plan
244
+ **Fix timeline**: [When will it be fixed]
245
+ **Owner**: [Who is responsible]
246
+ **Verification**: [How we'll verify the fix]
247
+
248
+ ### Approval
249
+ | Approver | Role | Date | Decision |
250
+ |----------|------|------|----------|
251
+ | [Name] | QA Lead | | |
252
+ | [Name] | Dev Lead | | |
253
+ | [Name] | Product Owner | | |
254
+ ```
255
+
256
+ ### Exception Criteria
257
+
258
+ Exceptions may be considered when:
259
+
260
+ - Fix would delay critical business deadline
261
+ - Risk is low and well-understood
262
+ - Mitigation plan is in place
263
+ - Remediation is scheduled
264
+ - Stakeholders accept the risk
265
+
266
+ Exceptions are NOT appropriate when:
267
+
268
+ - Security vulnerability exists
269
+ - Data integrity at risk
270
+ - User safety concerns
271
+ - Compliance requirements
272
+ - No remediation plan
273
+
274
+ ## Gate Automation
275
+
276
+ ### CI/CD Gate Implementation
277
+
278
+ ```yaml
279
+ # Example: GitHub Actions quality gates
280
+ name: Quality Gates
281
+
282
+ on:
283
+ pull_request:
284
+ branches: [main, develop]
285
+
286
+ jobs:
287
+ development-gate:
288
+ runs-on: ubuntu-latest
289
+ steps:
290
+ - uses: actions/checkout@v4
291
+
292
+ - name: Run unit tests
293
+ run: npm run test:unit -- --coverage
294
+
295
+ - name: Check coverage threshold
296
+ run: |
297
+ COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
298
+ if (( $(echo "$COVERAGE < 80" | bc -l) )); then
299
+ echo "Coverage $COVERAGE% is below 80% threshold"
300
+ exit 1
301
+ fi
302
+
303
+ - name: Run static analysis
304
+ run: npm run lint
305
+
306
+ - name: Security scan
307
+ uses: snyk/actions/node@master
308
+ env:
309
+ SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
310
+
311
+ qa-gate:
312
+ needs: development-gate
313
+ runs-on: ubuntu-latest
314
+ steps:
315
+ - name: Run integration tests
316
+ run: npm run test:integration
317
+
318
+ - name: Run E2E tests
319
+ run: npm run test:e2e
320
+
321
+ - name: Check test results
322
+ run: |
323
+ PASS_RATE=$(cat test-results.json | jq '.passRate')
324
+ if (( $(echo "$PASS_RATE < 95" | bc -l) )); then
325
+ echo "Pass rate $PASS_RATE% is below 95% threshold"
326
+ exit 1
327
+ fi
328
+
329
+ staging-gate:
330
+ needs: qa-gate
331
+ runs-on: ubuntu-latest
332
+ environment: staging
333
+ steps:
334
+ - name: Deploy to staging
335
+ run: ./deploy.sh staging
336
+
337
+ - name: Run smoke tests
338
+ run: npm run test:smoke -- --env=staging
339
+
340
+ - name: Run performance tests
341
+ run: npm run test:performance -- --env=staging
342
+
343
+ - name: Check performance thresholds
344
+ run: ./check-performance-thresholds.sh
345
+ ```
346
+
347
+ ### Quality Dashboard
348
+
349
+ ```markdown
350
+ ## Quality Gate Dashboard
351
+
352
+ ### Current Release: v2.5.0
353
+
354
+ | Gate | Status | Details |
355
+ |------|--------|---------|
356
+ | Development | ✅ Passed | All criteria met |
357
+ | QA | ✅ Passed | 97.2% pass rate |
358
+ | Staging | 🔄 In Progress | Performance testing |
359
+ | Production | ⏳ Pending | Awaiting staging |
360
+
361
+ ### Blocking Issues
362
+ None
363
+
364
+ ### Warnings
365
+ - P2 defect count at threshold (5)
366
+ - One flaky test identified (being fixed)
367
+
368
+ ### Next Actions
369
+ 1. Complete performance testing (ETA: 2 hours)
370
+ 2. Fix flaky test before staging gate
371
+ 3. Schedule production deployment window
372
+ ```
@@ -0,0 +1,301 @@
1
+ # Test Design
2
+
3
+ Best practices for designing effective test cases.
4
+
5
+ ## Test Case Structure
6
+
7
+ ### Standard Template
8
+
9
+ ```markdown
10
+ ## Test Case: [TC-XXX]
11
+
12
+ **Title**: [Clear, action-oriented description]
13
+
14
+ **Priority**: P0 | P1 | P2 | P3
15
+
16
+ **Type**: Smoke | Regression | Functional | Integration | E2E
17
+
18
+ **Requirement**: [Linked user story or requirement ID]
19
+
20
+ ### Preconditions
21
+ - [Required system state]
22
+ - [Required test data]
23
+ - [Required user permissions]
24
+
25
+ ### Test Steps
26
+ | Step | Action | Expected Result |
27
+ |------|--------|-----------------|
28
+ | 1 | [Specific action] | [Observable outcome] |
29
+ | 2 | [Specific action] | [Observable outcome] |
30
+ | 3 | [Specific action] | [Observable outcome] |
31
+
32
+ ### Postconditions
33
+ - [Expected system state after test]
34
+ - [Cleanup actions if needed]
35
+
36
+ ### Test Data
37
+ | Input | Value | Notes |
38
+ |-------|-------|-------|
39
+ | [Field] | [Value] | [Any special notes] |
40
+
41
+ ### Notes
42
+ - [Any additional context]
43
+ - [Known issues or workarounds]
44
+ ```
45
+
46
+ ### Good vs. Bad Test Cases
47
+
48
+ **Good Test Case:**
49
+ ```markdown
50
+ ## TC-001: User successfully logs in with valid credentials
51
+
52
+ **Priority**: P0
53
+ **Type**: Smoke
54
+
55
+ ### Preconditions
56
+ - User account exists with email: test@example.com
57
+ - Account is active and not locked
58
+
59
+ ### Test Steps
60
+ | Step | Action | Expected Result |
61
+ |------|--------|-----------------|
62
+ | 1 | Navigate to /login | Login form displayed |
63
+ | 2 | Enter email: test@example.com | Email field populated |
64
+ | 3 | Enter password: ValidPass123! | Password field shows masked input |
65
+ | 4 | Click "Sign In" button | Loading indicator appears |
66
+ | 5 | Wait for response | Redirected to /dashboard |
67
+
68
+ ### Postconditions
69
+ - User session created
70
+ - Last login timestamp updated
71
+ ```
72
+
73
+ **Bad Test Case:**
74
+ ```markdown
75
+ ## TC-001: Login test
76
+
77
+ ### Steps
78
+ 1. Login
79
+ 2. Check if it works
80
+ ```
81
+ (Vague, no preconditions, no expected results)
82
+
83
+ ## Test Design Techniques
84
+
85
+ ### Equivalence Partitioning
86
+
87
+ Divide inputs into groups that should behave identically:
88
+
89
+ ```markdown
90
+ ## Input: Email Address
91
+
92
+ ### Valid Partitions
93
+ - Standard email: user@domain.com
94
+ - With subdomain: user@mail.domain.com
95
+ - With plus: user+tag@domain.com
96
+
97
+ ### Invalid Partitions
98
+ - Missing @: userdomain.com
99
+ - Missing domain: user@
100
+ - Missing local part: @domain.com
101
+ - Empty string: ""
102
+ - Invalid characters: user@domain..com
103
+
104
+ ### Test Cases
105
+ | ID | Input | Expected | Partition |
106
+ |----|-------|----------|-----------|
107
+ | EP-01 | user@example.com | Valid | Standard |
108
+ | EP-02 | user@mail.example.com | Valid | Subdomain |
109
+ | EP-03 | user+test@example.com | Valid | Plus addressing |
110
+ | EP-04 | userexample.com | Invalid | Missing @ |
111
+ | EP-05 | "" | Invalid | Empty |
112
+ ```
113
+
114
+ ### Boundary Value Analysis
115
+
116
+ Test at the edges of valid ranges:
117
+
118
+ ```markdown
119
+ ## Input: Age (Valid Range: 18-120)
120
+
121
+ ### Boundary Values
122
+ | Value | Type | Expected |
123
+ |-------|------|----------|
124
+ | 17 | Below minimum | Invalid |
125
+ | 18 | Minimum | Valid |
126
+ | 19 | Just above minimum | Valid |
127
+ | 119 | Just below maximum | Valid |
128
+ | 120 | Maximum | Valid |
129
+ | 121 | Above maximum | Invalid |
130
+ | 0 | Zero | Invalid |
131
+ | -1 | Negative | Invalid |
132
+ ```
133
+
134
+ ### State Transition Testing
135
+
136
+ For features with distinct states:
137
+
138
+ ```markdown
139
+ ## Order State Machine
140
+
141
+ ### States
142
+ - Created
143
+ - Submitted
144
+ - Approved
145
+ - Rejected
146
+ - Shipped
147
+ - Delivered
148
+ - Cancelled
149
+
150
+ ### Transitions
151
+ | From | To | Trigger | Guard |
152
+ |------|-----|---------|-------|
153
+ | Created | Submitted | Submit | Has items |
154
+ | Created | Cancelled | Cancel | - |
155
+ | Submitted | Approved | Approve | Auth user |
156
+ | Submitted | Rejected | Reject | Auth user |
157
+ | Approved | Shipped | Ship | In stock |
158
+ | Approved | Cancelled | Cancel | Not shipped |
159
+ | Shipped | Delivered | Deliver | - |
160
+
161
+ ### Test Cases
162
+ | ID | Scenario | Expected |
163
+ |----|----------|----------|
164
+ | ST-01 | Created → Submitted | Success |
165
+ | ST-02 | Created → Approved | Fail (invalid transition) |
166
+ | ST-03 | Shipped → Cancelled | Fail (too late) |
167
+ | ST-04 | Submitted → Rejected → Resubmit | Fail (no path back) |
168
+ ```
169
+
170
+ ### Decision Table Testing
171
+
172
+ For complex business rules:
173
+
174
+ ```markdown
175
+ ## Shipping Cost Calculation
176
+
177
+ ### Conditions
178
+ | Condition | Rule 1 | Rule 2 | Rule 3 | Rule 4 | Rule 5 |
179
+ |-----------|--------|--------|--------|--------|--------|
180
+ | Order > $100 | Y | Y | N | N | N |
181
+ | Prime Member | Y | N | Y | N | N |
182
+ | Heavy Item | - | - | - | Y | N |
183
+
184
+ ### Actions
185
+ | Action | Rule 1 | Rule 2 | Rule 3 | Rule 4 | Rule 5 |
186
+ |--------|--------|--------|--------|--------|--------|
187
+ | Free Shipping | X | X | - | - | - |
188
+ | $5.99 Shipping | - | - | X | - | - |
189
+ | $9.99 Shipping | - | - | - | - | X |
190
+ | $14.99 Shipping | - | - | - | X | - |
191
+
192
+ ### Test Cases
193
+ | ID | Order | Prime | Heavy | Expected Cost |
194
+ |----|-------|-------|-------|---------------|
195
+ | DT-01 | $150 | Yes | No | Free |
196
+ | DT-02 | $150 | No | No | Free |
197
+ | DT-03 | $50 | Yes | No | $5.99 |
198
+ | DT-04 | $50 | No | Yes | $14.99 |
199
+ | DT-05 | $50 | No | No | $9.99 |
200
+ ```
201
+
202
+ ### Pairwise Testing
203
+
204
+ For features with many input combinations:
205
+
206
+ ```markdown
207
+ ## Search Filter Combinations
208
+
209
+ ### Parameters
210
+ - Category: Electronics, Clothing, Books
211
+ - Price Range: Under $25, $25-$100, Over $100
212
+ - Sort: Price, Rating, Newest
213
+ - Availability: In Stock, All
214
+
215
+ ### Pairwise Test Cases (reduced from 36 to ~12)
216
+ | ID | Category | Price | Sort | Availability |
217
+ |----|----------|-------|------|--------------|
218
+ | PW-01 | Electronics | Under $25 | Price | In Stock |
219
+ | PW-02 | Electronics | $25-$100 | Rating | All |
220
+ | PW-03 | Electronics | Over $100 | Newest | In Stock |
221
+ | PW-04 | Clothing | Under $25 | Rating | In Stock |
222
+ | PW-05 | Clothing | $25-$100 | Newest | In Stock |
223
+ | PW-06 | Clothing | Over $100 | Price | All |
224
+ | ... | ... | ... | ... | ... |
225
+ ```
226
+
227
+ ## Edge Cases & Error Handling
228
+
229
+ ### Common Edge Cases
230
+
231
+ | Category | Examples |
232
+ |----------|----------|
233
+ | Empty/Null | Empty string, null, undefined, whitespace only |
234
+ | Boundaries | Zero, negative, max int, min int |
235
+ | Format | Wrong type, wrong encoding, special characters |
236
+ | Timing | Concurrent requests, timeouts, race conditions |
237
+ | State | Already exists, doesn't exist, locked, expired |
238
+ | Permissions | Unauthorized, wrong role, expired token |
239
+
240
+ ### Error Scenario Template
241
+
242
+ ```markdown
243
+ ## Error Scenario: [Description]
244
+
245
+ ### Trigger
246
+ [How to cause this error]
247
+
248
+ ### Expected Behavior
249
+ - User message: [What user should see]
250
+ - System action: [What system should do]
251
+ - Logging: [What should be logged]
252
+ - Recovery: [How to recover]
253
+
254
+ ### Test Cases
255
+ | ID | Scenario | Expected Response |
256
+ |----|----------|-------------------|
257
+ | ERR-01 | Network timeout | Retry with backoff |
258
+ | ERR-02 | Invalid input | Validation message |
259
+ | ERR-03 | Permission denied | 403 with clear message |
260
+ ```
261
+
262
+ ## Traceability
263
+
264
+ ### Requirements Mapping
265
+
266
+ ```markdown
267
+ ## Traceability Matrix
268
+
269
+ | Requirement | Test Cases | Coverage |
270
+ |-------------|------------|----------|
271
+ | REQ-001: User login | TC-001, TC-002, TC-003 | Full |
272
+ | REQ-002: Password reset | TC-010, TC-011 | Full |
273
+ | REQ-003: User profile | TC-020 | Partial |
274
+ | REQ-004: Notifications | - | None |
275
+ ```
276
+
277
+ ### Coverage Analysis
278
+
279
+ - **Full Coverage**: All acceptance criteria have test cases
280
+ - **Partial Coverage**: Some criteria tested, gaps identified
281
+ - **No Coverage**: Tests needed - flag for prioritization
282
+
283
+ ## Test Data Design
284
+
285
+ ### Data Categories
286
+
287
+ | Category | Description | Example |
288
+ |----------|-------------|---------|
289
+ | Valid | Normal, expected values | "John", 25, "user@test.com" |
290
+ | Boundary | At limits of valid range | 0, 100, max length |
291
+ | Invalid | Outside valid range | -1, 101, empty |
292
+ | Special | Characters that may cause issues | <script>, ', ", NULL |
293
+ | Realistic | Production-like data | Actual names, addresses |
294
+
295
+ ### Test Data Best Practices
296
+
297
+ - **Externalize**: Store data outside tests
298
+ - **Version control**: Track data changes
299
+ - **Isolation**: Each test manages its own data
300
+ - **Cleanup**: Tests clean up after themselves
301
+ - **Seeding**: Consistent starting state