agentic-team-templates 0.8.3 → 0.9.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.
@@ -0,0 +1,292 @@
1
+ # QA Metrics
2
+
3
+ Guidelines for measuring and improving quality.
4
+
5
+ ## Key QA Metrics
6
+
7
+ ### Defect Metrics
8
+
9
+ | Metric | Formula | Target | Purpose |
10
+ |--------|---------|--------|---------|
11
+ | Defect Density | Defects / KLOC | < 1.0 | Code quality indicator |
12
+ | Defect Escape Rate | Prod Defects / Total Defects × 100 | < 5% | Testing effectiveness |
13
+ | Defect Removal Efficiency | (Pre-release Defects / Total Defects) × 100 | > 95% | QA effectiveness |
14
+ | Defect Leakage | Defects found post-release | < 5/release | Release quality |
15
+ | MTTR | Time to fix defects | < 24h (P1) | Response efficiency |
16
+ | Defect Aging | Days defect remains open | < 5 days avg | Process efficiency |
17
+
18
+ ### Coverage Metrics
19
+
20
+ | Metric | Formula | Target | Purpose |
21
+ |--------|---------|--------|---------|
22
+ | Code Coverage | Lines covered / Total lines × 100 | > 80% | Test thoroughness |
23
+ | Branch Coverage | Branches covered / Total branches × 100 | > 70% | Decision path testing |
24
+ | Requirement Coverage | Requirements with tests / Total requirements × 100 | 100% | Traceability |
25
+ | Risk Coverage | High-risk areas tested / Total high-risk areas × 100 | 100% | Risk mitigation |
26
+
27
+ ### Execution Metrics
28
+
29
+ | Metric | Formula | Target | Purpose |
30
+ |--------|---------|--------|---------|
31
+ | Test Pass Rate | Passed / Executed × 100 | > 95% | Test health |
32
+ | Test Execution Rate | Executed / Planned × 100 | 100% | Execution completeness |
33
+ | Automation Rate | Automated / Total tests × 100 | > 70% | Automation maturity |
34
+ | Flaky Test Rate | Flaky tests / Total automated × 100 | < 2% | Automation reliability |
35
+
36
+ ## Defect Analysis
37
+
38
+ ### Defect Density Calculation
39
+
40
+ ```markdown
41
+ ## Defect Density Report
42
+
43
+ ### By Component
44
+ | Component | KLOC | Defects | Density |
45
+ |-----------|------|---------|---------|
46
+ | Auth Service | 5.2 | 3 | 0.58 |
47
+ | Payment Module | 8.1 | 12 | 1.48 |
48
+ | User API | 3.4 | 1 | 0.29 |
49
+ | Dashboard UI | 6.8 | 4 | 0.59 |
50
+
51
+ ### Trend
52
+ | Sprint | KLOC (New) | Defects | Density |
53
+ |--------|------------|---------|---------|
54
+ | S1 | 4.5 | 2 | 0.44 |
55
+ | S2 | 5.1 | 3 | 0.59 |
56
+ | S3 | 6.2 | 8 | 1.29 |
57
+ | S4 | 3.8 | 2 | 0.53 |
58
+
59
+ ### Action Items
60
+ - Payment Module density too high - schedule code review
61
+ - S3 spike investigation - new developer onboarding
62
+ ```
63
+
64
+ ### Defect Escape Rate
65
+
66
+ ```markdown
67
+ ## Escape Rate Analysis
68
+
69
+ ### Current Period
70
+ | Stage | Defects Found | % of Total |
71
+ |-------|---------------|------------|
72
+ | Development | 45 | 45% |
73
+ | QA Testing | 40 | 40% |
74
+ | Staging | 10 | 10% |
75
+ | Production | 5 | 5% |
76
+ | **Total** | **100** | **100%** |
77
+
78
+ ### Escape Rate = 5 / 100 × 100 = 5%
79
+
80
+ ### Root Cause of Escapes
81
+ | Defect | Root Cause | Prevention |
82
+ |--------|------------|------------|
83
+ | DEF-101 | Edge case not in requirements | Add to test strategy |
84
+ | DEF-102 | Environment difference | Improve staging parity |
85
+ | DEF-103 | Race condition | Add concurrency tests |
86
+ | DEF-104 | Browser-specific issue | Expand browser matrix |
87
+ | DEF-105 | Data-dependent bug | Improve test data variety |
88
+ ```
89
+
90
+ ### Defect Removal Efficiency
91
+
92
+ ```markdown
93
+ ## DRE Calculation
94
+
95
+ DRE = (Defects found before release / Total defects) × 100
96
+
97
+ ### Example
98
+ - Found in Dev: 50
99
+ - Found in QA: 40
100
+ - Found in Staging: 8
101
+ - Found in Production: 2
102
+ - **Total: 100**
103
+
104
+ DRE = (50 + 40 + 8) / 100 × 100 = **98%**
105
+
106
+ ### DRE by Phase
107
+ | Phase | Found | Cumulative | DRE at Phase |
108
+ |-------|-------|------------|--------------|
109
+ | Development | 50 | 50 | 50% |
110
+ | QA | 40 | 90 | 90% |
111
+ | Staging | 8 | 98 | 98% |
112
+ | Production | 2 | 100 | - |
113
+ ```
114
+
115
+ ## Test Execution Dashboard
116
+
117
+ ### Daily Report
118
+
119
+ ```markdown
120
+ ## Test Execution: [Date]
121
+
122
+ ### Summary
123
+ | Metric | Today | Trend |
124
+ |--------|-------|-------|
125
+ | Tests Executed | 450 | +12 |
126
+ | Pass Rate | 96.2% | +0.5% |
127
+ | New Failures | 3 | -2 |
128
+ | Blockers | 1 | Same |
129
+
130
+ ### By Test Type
131
+ | Type | Total | Passed | Failed | Blocked | Pass Rate |
132
+ |------|-------|--------|--------|---------|-----------|
133
+ | Smoke | 25 | 25 | 0 | 0 | 100% |
134
+ | Regression | 300 | 290 | 8 | 2 | 96.7% |
135
+ | New Features | 125 | 118 | 7 | 0 | 94.4% |
136
+
137
+ ### Failed Tests
138
+ | Test | Error | Priority | Assigned |
139
+ |------|-------|----------|----------|
140
+ | checkout_payment | Timeout | P1 | @dev1 |
141
+ | user_profile_update | 500 error | P2 | @dev2 |
142
+ | search_filters | Wrong results | P2 | @dev3 |
143
+
144
+ ### Blocked Tests
145
+ | Test | Blocker | ETA |
146
+ |------|---------|-----|
147
+ | admin_dashboard | DEF-456 | Tomorrow |
148
+ | export_reports | Env issue | Today PM |
149
+ ```
150
+
151
+ ### Sprint Report
152
+
153
+ ```markdown
154
+ ## Sprint Quality Report: Sprint [N]
155
+
156
+ ### Goals vs. Actuals
157
+ | Goal | Target | Actual | Status |
158
+ |------|--------|--------|--------|
159
+ | Test Coverage | 80% | 82% | ✅ |
160
+ | Pass Rate | 95% | 97% | ✅ |
161
+ | P1 Defects Resolved | 100% | 100% | ✅ |
162
+ | Automation Added | 20 tests | 18 tests | ⚠️ |
163
+
164
+ ### Defect Summary
165
+ | Severity | Opened | Closed | Open |
166
+ |----------|--------|--------|------|
167
+ | P0 | 0 | 0 | 0 |
168
+ | P1 | 3 | 3 | 0 |
169
+ | P2 | 8 | 6 | 2 |
170
+ | P3 | 12 | 8 | 4 |
171
+
172
+ ### Quality Trends
173
+ ```text
174
+ Pass Rate (last 5 sprints)
175
+ S1: ████████████████████░░░░ 85%
176
+ S2: ██████████████████████░░ 92%
177
+ S3: ███████████████████████░ 95%
178
+ S4: ████████████████████████ 98%
179
+ S5: ███████████████████████░ 97%
180
+ ```
181
+
182
+ ### Risks for Next Sprint
183
+ 1. Large refactor planned - increase regression scope
184
+ 2. New third-party integration - add integration tests
185
+ 3. Performance concerns flagged - schedule load testing
186
+ ```
187
+
188
+ ## Quality Gates
189
+
190
+ ### Release Quality Gate
191
+
192
+ ```markdown
193
+ ## Release Quality Gate: v[X.Y.Z]
194
+
195
+ ### Mandatory Criteria
196
+ | Criterion | Threshold | Actual | Status |
197
+ |-----------|-----------|--------|--------|
198
+ | P0 Tests Pass | 100% | 100% | ✅ |
199
+ | P1 Tests Pass | 100% | 100% | ✅ |
200
+ | Open P0 Defects | 0 | 0 | ✅ |
201
+ | Open P1 Defects | 0 | 0 | ✅ |
202
+ | Regression Pass Rate | > 95% | 97.2% | ✅ |
203
+ | Code Coverage | > 80% | 84% | ✅ |
204
+ | Security Scan | 0 critical/high | 0 | ✅ |
205
+
206
+ ### Performance Criteria
207
+ | Metric | Threshold | Actual | Status |
208
+ |--------|-----------|--------|--------|
209
+ | Response Time (p95) | < 500ms | 423ms | ✅ |
210
+ | Error Rate | < 0.1% | 0.02% | ✅ |
211
+ | Throughput | > 1000 rps | 1250 rps | ✅ |
212
+
213
+ ### Exceptions
214
+ | Item | Justification | Approved By |
215
+ |------|---------------|-------------|
216
+ | P2 Defect DEF-789 | Low impact, fix in next sprint | Product Owner |
217
+
218
+ ### Sign-off
219
+ | Role | Name | Date | Approved |
220
+ |------|------|------|----------|
221
+ | QA Lead | | | ☐ |
222
+ | Dev Lead | | | ☐ |
223
+ | Product Owner | | | ☐ |
224
+ ```
225
+
226
+ ## Continuous Improvement
227
+
228
+ ### Metric Review Cadence
229
+
230
+ | Review | Frequency | Participants | Focus |
231
+ |--------|-----------|--------------|-------|
232
+ | Daily Standup | Daily | QA Team | Blockers, progress |
233
+ | Sprint Retrospective | Bi-weekly | Team | Process improvement |
234
+ | Quality Review | Monthly | Leadership | Trends, investments |
235
+ | Quarterly Planning | Quarterly | All | Strategy, goals |
236
+
237
+ ### Improvement Actions
238
+
239
+ ```markdown
240
+ ## Quality Improvement Plan
241
+
242
+ ### Current State
243
+ - Defect escape rate: 8%
244
+ - Automation coverage: 55%
245
+ - Average defect age: 8 days
246
+
247
+ ### Target State (Q2)
248
+ - Defect escape rate: < 5%
249
+ - Automation coverage: > 70%
250
+ - Average defect age: < 5 days
251
+
252
+ ### Actions
253
+ | Action | Owner | Deadline | Status |
254
+ |--------|-------|----------|--------|
255
+ | Add API test coverage for payments | @qa1 | Feb 15 | In Progress |
256
+ | Implement visual regression testing | @qa2 | Feb 28 | Not Started |
257
+ | Reduce flaky tests to < 2% | @qa1 | Feb 10 | In Progress |
258
+ | Add security scanning to CI | @devops | Feb 20 | Complete |
259
+
260
+ ### Success Metrics
261
+ - Track escape rate weekly
262
+ - Review automation coverage bi-weekly
263
+ - Monitor defect aging daily
264
+ ```
265
+
266
+ ### Trend Analysis
267
+
268
+ Track metrics over time to identify patterns:
269
+
270
+ ```markdown
271
+ ## 6-Month Trend Analysis
272
+
273
+ ### Defect Escape Rate
274
+ | Month | Rate | Trend |
275
+ |-------|------|-------|
276
+ | Aug | 12% | - |
277
+ | Sep | 9% | ↓ |
278
+ | Oct | 7% | ↓ |
279
+ | Nov | 8% | ↑ |
280
+ | Dec | 5% | ↓ |
281
+ | Jan | 4% | ↓ |
282
+
283
+ ### Insights
284
+ - Significant improvement after automation investment (Oct)
285
+ - November spike due to holiday staffing
286
+ - On track to meet < 5% target
287
+
288
+ ### Recommendations
289
+ 1. Maintain automation investment
290
+ 2. Cross-train team for coverage
291
+ 3. Document high-risk areas for new team members
292
+ ```
@@ -0,0 +1,125 @@
1
+ # QA Engineering
2
+
3
+ Principal-level guidelines for quality assurance and test engineering.
4
+
5
+ ## Scope
6
+
7
+ This ruleset applies to:
8
+
9
+ - Test strategy and planning
10
+ - Test case design and execution
11
+ - Test automation architecture
12
+ - Quality metrics and reporting
13
+ - Release quality gates
14
+ - Defect management
15
+ - QA process governance
16
+
17
+ ## Core Philosophy
18
+
19
+ **Quality is a team responsibility; QA enables it.** Testing doesn't create quality—it reveals the quality that development created. QA's role is to provide fast, accurate feedback that enables confident delivery.
20
+
21
+ ## Fundamental Principles
22
+
23
+ ### 1. Shift Left
24
+
25
+ Find defects early when they're cheapest to fix.
26
+
27
+ ```text
28
+ Cost to fix defect:
29
+ Requirements → Design → Development → Testing → Production
30
+ $1 $10 $100 $500 $10,000
31
+ ```
32
+
33
+ ### 2. Risk-Based Testing
34
+
35
+ Not all features are equally important. Focus testing effort on:
36
+
37
+ - High business impact (revenue, compliance, security)
38
+ - High user impact (frequently used, critical workflows)
39
+ - High technical risk (complex, new technology, integrations)
40
+
41
+ ### 3. Test Pyramid
42
+
43
+ More unit tests, fewer E2E tests:
44
+
45
+ ```text
46
+ ┌─────┐
47
+ │ E2E │ 10% - Slow, expensive, high confidence
48
+ ├─────┤
49
+ │ Int │ 30% - Medium speed, component interaction
50
+ ├─────┤
51
+ │Unit │ 60% - Fast, cheap, immediate feedback
52
+ └─────┘
53
+ ```
54
+
55
+ ### 4. Automation as Accelerator
56
+
57
+ Automate the repeatable; humans do the creative:
58
+
59
+ - Automate: Regression, smoke tests, data-driven tests
60
+ - Manual: Exploratory, usability, edge cases
61
+
62
+ ### 5. Continuous Quality Feedback
63
+
64
+ Quality metrics should be:
65
+
66
+ - Visible: Everyone sees the current state
67
+ - Actionable: Drive specific improvements
68
+ - Timely: Available immediately, not end of sprint
69
+
70
+ ## Project Structure
71
+
72
+ ```text
73
+ tests/
74
+ ├── unit/ # Fast, isolated tests
75
+ │ ├── components/
76
+ │ ├── utils/
77
+ │ └── services/
78
+ ├── integration/ # Component interaction tests
79
+ │ ├── api/
80
+ │ └── database/
81
+ ├── e2e/ # End-to-end user flows
82
+ │ ├── specs/
83
+ │ ├── pages/ # Page objects
84
+ │ └── fixtures/ # Test data
85
+ ├── performance/ # Load and stress tests
86
+ ├── security/ # Security scan configs
87
+ └── test-utils/ # Shared test utilities
88
+ ├── factories/ # Test data factories
89
+ ├── mocks/ # Mock implementations
90
+ └── helpers/ # Common test helpers
91
+
92
+ docs/
93
+ ├── test-strategy.md # Overall test strategy
94
+ ├── test-plan.md # Current release plan
95
+ └── runbooks/ # Test execution guides
96
+ ```
97
+
98
+ ## Quality Standards
99
+
100
+ ### Code Coverage Targets
101
+
102
+ | Type | Target | Rationale |
103
+ |------|--------|-----------|
104
+ | Unit tests | 80%+ | Core logic covered |
105
+ | Branch coverage | 70%+ | Decision paths tested |
106
+ | Critical paths | 100% | No untested critical code |
107
+
108
+ ### Defect Standards
109
+
110
+ | Severity | Response Time | Resolution Target |
111
+ |----------|---------------|-------------------|
112
+ | P0 (Critical) | Immediate | Same day |
113
+ | P1 (Major) | < 4 hours | 24-48 hours |
114
+ | P2 (Moderate) | < 24 hours | Current sprint |
115
+ | P3 (Minor) | < 48 hours | Next sprint |
116
+
117
+ ### Release Quality Gate
118
+
119
+ No release without:
120
+
121
+ - [ ] All P0/P1 tests passing
122
+ - [ ] No open P0/P1 defects
123
+ - [ ] Regression suite > 95% pass
124
+ - [ ] Security scan clean
125
+ - [ ] Performance thresholds met