agentic-sdlc 1.6.0 → 1.8.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.
- package/.agent/rules/agent-execution.md +55 -0
- package/.agent/rules/ai-enforcement.md +4 -3
- package/.agent/rules/artifacts.md +1 -1
- package/.agent/rules/auto-learning.md +78 -0
- package/.agent/rules/code-quality.md +40 -0
- package/.agent/rules/global.md +2 -2
- package/.agent/rules/naming-conventions.md +55 -0
- package/.agent/skills/role-ba.md +6 -2
- package/.agent/skills/role-brain.md +5 -1
- package/.agent/skills/role-cloud.md +38 -0
- package/.agent/skills/role-dev.md +22 -1
- package/.agent/skills/role-devops.md +4 -0
- package/.agent/skills/role-game.md +35 -0
- package/.agent/skills/role-mobile.md +55 -0
- package/.agent/skills/role-orchestrator.md +4 -0
- package/.agent/skills/role-pm.md +4 -0
- package/.agent/skills/role-po.md +4 -0
- package/.agent/skills/role-reporter.md +4 -0
- package/.agent/skills/role-research.md +78 -0
- package/.agent/skills/role-sa.md +4 -0
- package/.agent/skills/role-seca.md +4 -0
- package/.agent/skills/role-stakeholder.md +4 -0
- package/.agent/skills/role-tester.md +4 -0
- package/.agent/skills/role-uiux.md +4 -0
- package/.agent/templates/Specification-Template.md +38 -0
- package/.agent/templates/ab-comparison-report.md +175 -0
- package/.agent/templates/observer-report.md +131 -0
- package/.agent/templates/quality-score-report.md +197 -0
- package/.agent/templates/self-learning-digest.md +268 -0
- package/.agent/templates/system-health-report.md +330 -0
- package/.agent/workflows/ab.md +101 -0
- package/.agent/workflows/autogen.md +65 -0
- package/.agent/workflows/brain.md +48 -37
- package/.agent/workflows/commit.md +61 -0
- package/.agent/workflows/cycle.md +32 -11
- package/.agent/workflows/debug.md +123 -0
- package/.agent/workflows/deep-search.md +82 -0
- package/.agent/workflows/docs.md +144 -0
- package/.agent/workflows/emergency.md +17 -15
- package/.agent/workflows/explore.md +15 -9
- package/.agent/workflows/housekeeping.md +24 -11
- package/.agent/workflows/metrics.md +14 -12
- package/.agent/workflows/monitor.md +98 -0
- package/.agent/workflows/observe.md +84 -0
- package/.agent/workflows/onboarding.md +135 -0
- package/.agent/workflows/orchestrator.md +12 -5
- package/.agent/workflows/planning.md +126 -0
- package/.agent/workflows/refactor.md +132 -0
- package/.agent/workflows/release.md +19 -12
- package/.agent/workflows/review.md +99 -0
- package/.agent/workflows/score.md +104 -0
- package/.agent/workflows/sprint.md +16 -14
- package/.agent/workflows/validate.md +13 -11
- package/.agent/workflows/worktree.md +154 -0
- package/CHANGELOG.md +71 -0
- package/README.md +12 -4
- package/bin/cli.js +142 -16
- package/docs/.brain-health-history.json +42 -0
- package/docs/.brain-improvements.json +53 -0
- package/docs/.brain-learner-log.json +27 -0
- package/docs/.brain-scores.json +310 -0
- package/docs/architecture/system-flow.mermaid +81 -0
- package/docs/artifacts/2026-01-05-enforcement-gates-plan.md +80 -0
- package/docs/artifacts/2026-01-05-workflow-analysis.md +231 -0
- package/docs/artifacts/README.md +26 -0
- package/docs/guides/MCP-GUIDE.md +1 -0
- package/docs/reports/2026-01-05-autogen-evaluation.md +64 -0
- package/docs/reports/2026-01-05-brain-layer-analysis.md +109 -0
- package/docs/reports/2026-01-05-repository-audit.md +253 -0
- package/docs/reports/Metrics-Dashboard-2026-01-08.md +29 -0
- package/docs/reports/Metrics-Dashboard-Final.md +29 -0
- package/docs/reports/Validation-Report-2026-01-05.md +40 -0
- package/docs/reports/Validation-Report-2026-01-08.md +40 -0
- package/docs/reports/worktrunk-audit.md +94 -0
- package/docs/solutions/README.md +96 -0
- package/docs/walkthroughs/2026-01-05-audit-implementation.md +36 -0
- package/docs/walkthroughs/2026-01-05-autonomy-release.md +54 -0
- package/docs/walkthroughs/2026-01-05-enforcement-gates.md +33 -0
- package/docs/walkthroughs/2026-01-05-judge-enhancement.md +30 -0
- package/docs/walkthroughs/2026-01-05-landing-page-orchestrator.md +52 -0
- package/docs/walkthroughs/2026-01-05-validation.md +32 -0
- package/docs/walkthroughs/2026-01-05-workflow-audit.md +89 -0
- package/docs/walkthroughs/2026-01-05-workflow-refactoring.md +44 -0
- package/docs/walkthroughs/2026-01-06-worktrunk-integration.md +41 -0
- package/docs/walkthroughs/README.md +25 -0
- package/package.json +33 -19
- package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +0 -327
- package/.agent/knowledge-base/HOW-IT-WORKS.md +0 -365
- package/.agent/knowledge-base/INDEX.md +0 -43
- package/.agent/knowledge-base/README.md +0 -242
- package/.agent/knowledge-base/architecture/.gitkeep +0 -1
- package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +0 -1146
- package/.agent/knowledge-base/architecture/README.md +0 -98
- package/.agent/knowledge-base/bugs/.gitkeep +0 -1
- package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +0 -56
- package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +0 -198
- package/.agent/knowledge-base/features/.gitkeep +0 -1
- package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +0 -646
- package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +0 -945
- package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +0 -310
- package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +0 -324
- package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +0 -242
- package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +0 -148
- package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +0 -58
- package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +0 -46
- package/.agent/knowledge-base/features/README.md +0 -83
- package/.agent/knowledge-base/features/figma-landing-page-workflow.md +0 -311
- package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +0 -673
- package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +0 -459
- package/.agent/knowledge-base/performance/.gitkeep +0 -1
- package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +0 -80
- package/.agent/knowledge-base/platform-specific/.gitkeep +0 -1
- package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +0 -56
- package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +0 -527
- package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +0 -491
- package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +0 -299
- package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +0 -555
- package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +0 -519
- package/.agent/knowledge-base/security/.gitkeep +0 -1
- package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +0 -74
- package/.agent/rules/AUTO-LEARNING.md +0 -418
- package/.agent/rules/KNOWLEDGE-BASE.md +0 -45
- package/.agent/workflows/compound.md +0 -51
- package/.agent/workflows/preflight.md +0 -35
- package/.agent/workflows/route.md +0 -160
- package/bin/kb +0 -34
- package/bin/kb.bat +0 -28
- package/bin/kb_cli.py +0 -226
- package/bin/lib/README.md +0 -411
- package/bin/lib/__init__.py +0 -7
- package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
- package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
- package/bin/lib/kb_add.py +0 -203
- package/bin/lib/kb_common.py +0 -224
- package/bin/lib/kb_compound.py +0 -250
- package/bin/lib/kb_index.py +0 -193
- package/bin/lib/kb_list.py +0 -144
- package/bin/lib/kb_search.py +0 -121
- package/bin/lib/kb_stats.py +0 -153
|
@@ -1,519 +0,0 @@
|
|
|
1
|
-
# 🧪 Tester - Knowledge Base Guide
|
|
2
|
-
|
|
3
|
-
## Role: @TESTER (Quality Assurance Tester)
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🎯 Your Auto-Learning Responsibilities
|
|
8
|
-
|
|
9
|
-
As TESTER, you capture knowledge about:
|
|
10
|
-
- Test failure patterns and edge cases
|
|
11
|
-
- Regression bug patterns
|
|
12
|
-
- Test automation challenges
|
|
13
|
-
- Performance bottlenecks
|
|
14
|
-
- Integration testing issues
|
|
15
|
-
- E2E testing strategies
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 🔄 Auto-Learning Triggers for TESTER
|
|
20
|
-
|
|
21
|
-
### Mandatory KB Entry Creation
|
|
22
|
-
|
|
23
|
-
| Trigger | When | Category | Example |
|
|
24
|
-
|---------|------|----------|---------|
|
|
25
|
-
| **Test Failure** | Test fails 3+ times | Bugs | KB-[date]-###-test-failure-pattern |
|
|
26
|
-
| **Edge Case Found** | Unexpected behavior discovered | Bugs | KB-[date]-###-edge-case-discovery |
|
|
27
|
-
| **Regression Bug** | Previously fixed bug reappears | Bugs | KB-[date]-###-regression-pattern |
|
|
28
|
-
| **Flaky Test** | Test intermittently fails | Features/Testing | KB-[date]-###-flaky-test-fix |
|
|
29
|
-
| **Performance Issue** | Performance below threshold | Performance | KB-[date]-###-performance-bottleneck |
|
|
30
|
-
| **Automation Challenge** | Test automation difficulty | Features/Testing | KB-[date]-###-automation-solution |
|
|
31
|
-
| **Integration Failure** | Component integration fails | Bugs | KB-[date]-###-integration-issue |
|
|
32
|
-
| **Browser Compatibility** | Cross-browser issue found | Platform/Web | KB-[date]-###-browser-compatibility |
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## 📝 KB Entry Template for TESTER
|
|
37
|
-
|
|
38
|
-
```markdown
|
|
39
|
-
# KB-[YYYY-MM-DD]-[###] - [Test Issue Title]
|
|
40
|
-
|
|
41
|
-
## Document Info
|
|
42
|
-
| Field | Value |
|
|
43
|
-
|-------|-------|
|
|
44
|
-
| ID | KB-[YYYY-MM-DD]-[###] |
|
|
45
|
-
| Date | [YYYY-MM-DD] |
|
|
46
|
-
| Author | @TESTER |
|
|
47
|
-
| Category | Bugs / Features / Performance / Platform |
|
|
48
|
-
| Severity | [Critical/High/Medium/Low] |
|
|
49
|
-
| Auto-Generated | Yes |
|
|
50
|
-
| Source Task | [Task ID] |
|
|
51
|
-
| Sprint | [N] |
|
|
52
|
-
| Tags | #testing #bug-pattern #edge-case #auto-learned |
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Test Failure Description
|
|
57
|
-
|
|
58
|
-
### Test Case
|
|
59
|
-
**Test Name:** [Test case name]
|
|
60
|
-
**Test Type:** [Unit/Integration/E2E/Performance]
|
|
61
|
-
**Test File:** [Path to test file]
|
|
62
|
-
|
|
63
|
-
### Expected Behavior
|
|
64
|
-
[What should happen]
|
|
65
|
-
|
|
66
|
-
### Actual Behavior
|
|
67
|
-
[What actually happened]
|
|
68
|
-
|
|
69
|
-
### Failure Frequency
|
|
70
|
-
- **First Occurrence:** [Date]
|
|
71
|
-
- **Total Failures:** [Number]
|
|
72
|
-
- **Failure Rate:** [Percentage]
|
|
73
|
-
- **Flaky:** [Yes/No]
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Context
|
|
78
|
-
|
|
79
|
-
### Environment
|
|
80
|
-
- **Platform:** [Web/Mobile/Desktop/API]
|
|
81
|
-
- **Browser/Device:** [If applicable]
|
|
82
|
-
- **OS:** [Operating system]
|
|
83
|
-
- **Test Framework:** [Jest/Playwright/Cypress/etc.]
|
|
84
|
-
|
|
85
|
-
### Component Under Test
|
|
86
|
-
- **Component:** [Component name]
|
|
87
|
-
- **File Path:** [Path]
|
|
88
|
-
- **Dependencies:** [List]
|
|
89
|
-
|
|
90
|
-
### Test Data
|
|
91
|
-
```json
|
|
92
|
-
{
|
|
93
|
-
"input": "test data used",
|
|
94
|
-
"expected": "expected output",
|
|
95
|
-
"actual": "actual output"
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Root Cause Analysis
|
|
102
|
-
|
|
103
|
-
### Investigation Steps
|
|
104
|
-
1. [Step 1 - What was checked]
|
|
105
|
-
2. [Step 2 - What was found]
|
|
106
|
-
3. [Step 3 - Root cause identified]
|
|
107
|
-
|
|
108
|
-
### Root Cause
|
|
109
|
-
[Detailed explanation of why test failed]
|
|
110
|
-
|
|
111
|
-
### Contributing Factors
|
|
112
|
-
- [Factor 1]
|
|
113
|
-
- [Factor 2]
|
|
114
|
-
|
|
115
|
-
### Code Issue (if applicable)
|
|
116
|
-
```javascript
|
|
117
|
-
// Problematic code
|
|
118
|
-
[code snippet]
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Solution Applied
|
|
124
|
-
|
|
125
|
-
### Fix Approach
|
|
126
|
-
[How the issue was resolved]
|
|
127
|
-
|
|
128
|
-
### Code Changes
|
|
129
|
-
```javascript
|
|
130
|
-
// Fixed code
|
|
131
|
-
[code snippet]
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Test Updates
|
|
135
|
-
```javascript
|
|
136
|
-
// Updated test
|
|
137
|
-
[test code]
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Verification Steps
|
|
141
|
-
1. [Step 1]
|
|
142
|
-
2. [Step 2]
|
|
143
|
-
3. [Step 3]
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## Regression Prevention
|
|
148
|
-
|
|
149
|
-
### Regression Test Added
|
|
150
|
-
```javascript
|
|
151
|
-
// New regression test
|
|
152
|
-
describe('[Test Suite]', () => {
|
|
153
|
-
it('should prevent regression of [issue]', () => {
|
|
154
|
-
// Test implementation
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Test Coverage
|
|
160
|
-
- **Before:** [X]%
|
|
161
|
-
- **After:** [Y]%
|
|
162
|
-
- **Improvement:** [Z]%
|
|
163
|
-
|
|
164
|
-
### Automated Checks
|
|
165
|
-
- [ ] Unit test added
|
|
166
|
-
- [ ] Integration test added
|
|
167
|
-
- [ ] E2E test added
|
|
168
|
-
- [ ] Performance test added
|
|
169
|
-
- [ ] CI/CD pipeline updated
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Edge Cases Documented
|
|
174
|
-
|
|
175
|
-
### Edge Case 1
|
|
176
|
-
- **Scenario:** [Description]
|
|
177
|
-
- **Test:** [How to test]
|
|
178
|
-
- **Expected:** [Expected behavior]
|
|
179
|
-
|
|
180
|
-
### Edge Case 2
|
|
181
|
-
- **Scenario:** [Description]
|
|
182
|
-
- **Test:** [How to test]
|
|
183
|
-
- **Expected:** [Expected behavior]
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Prevention Measures
|
|
188
|
-
|
|
189
|
-
### Testing Checklist Updates
|
|
190
|
-
- [ ] [New test scenario to always check]
|
|
191
|
-
- [ ] [New edge case to consider]
|
|
192
|
-
- [ ] [New validation to add]
|
|
193
|
-
|
|
194
|
-
### Test Strategy Updates
|
|
195
|
-
- [Update to test strategy]
|
|
196
|
-
- [New testing approach]
|
|
197
|
-
|
|
198
|
-
### Code Review Checklist
|
|
199
|
-
- [ ] [Check for similar patterns]
|
|
200
|
-
- [ ] [Validate edge cases]
|
|
201
|
-
- [ ] [Verify error handling]
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Performance Impact (if applicable)
|
|
206
|
-
|
|
207
|
-
### Metrics
|
|
208
|
-
- **Response Time:** [Before] → [After]
|
|
209
|
-
- **Memory Usage:** [Before] → [After]
|
|
210
|
-
- **CPU Usage:** [Before] → [After]
|
|
211
|
-
|
|
212
|
-
### Performance Test
|
|
213
|
-
```javascript
|
|
214
|
-
// Performance test
|
|
215
|
-
[test code]
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
## Browser/Platform Compatibility (if applicable)
|
|
221
|
-
|
|
222
|
-
### Tested Platforms
|
|
223
|
-
| Platform | Version | Status | Notes |
|
|
224
|
-
|----------|---------|--------|-------|
|
|
225
|
-
| Chrome | [version] | ✅/❌ | [notes] |
|
|
226
|
-
| Firefox | [version] | ✅/❌ | [notes] |
|
|
227
|
-
| Safari | [version] | ✅/❌ | [notes] |
|
|
228
|
-
| Edge | [version] | ✅/❌ | [notes] |
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Lessons Learned
|
|
233
|
-
|
|
234
|
-
### What Worked Well
|
|
235
|
-
- [Success 1]
|
|
236
|
-
- [Success 2]
|
|
237
|
-
|
|
238
|
-
### What Didn't Work
|
|
239
|
-
- [Failed approach 1]
|
|
240
|
-
- [Failed approach 2]
|
|
241
|
-
|
|
242
|
-
### Key Takeaways
|
|
243
|
-
1. [Takeaway 1]
|
|
244
|
-
2. [Takeaway 2]
|
|
245
|
-
|
|
246
|
-
### Testing Best Practices
|
|
247
|
-
- [Best practice 1]
|
|
248
|
-
- [Best practice 2]
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## Related Entries
|
|
253
|
-
- KB-[ID]: [Related test pattern]
|
|
254
|
-
- KB-[ID]: [Related bug fix]
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## References
|
|
259
|
-
- Test Report: [Link]
|
|
260
|
-
- Bug Report: [Link]
|
|
261
|
-
- Documentation: [Link]
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
#knowledge-base #testing #bug-pattern #edge-case #auto-learned
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## 🔍 Pre-Testing KB Search
|
|
271
|
-
|
|
272
|
-
Before starting testing, search KB for:
|
|
273
|
-
|
|
274
|
-
```markdown
|
|
275
|
-
### TESTER KB Search Checklist
|
|
276
|
-
- [ ] Similar component test patterns
|
|
277
|
-
- [ ] Known edge cases for this feature type
|
|
278
|
-
- [ ] Common test failures in this area
|
|
279
|
-
- [ ] Browser compatibility issues
|
|
280
|
-
- [ ] Performance benchmarks
|
|
281
|
-
- [ ] Flaky test patterns
|
|
282
|
-
|
|
283
|
-
**Search Keywords:**
|
|
284
|
-
- Component name
|
|
285
|
-
- Feature type (auth, payment, etc.)
|
|
286
|
-
- Technology (React, API, etc.)
|
|
287
|
-
- Test type (E2E, integration, etc.)
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
## 📊 TESTER-Specific Metrics
|
|
293
|
-
|
|
294
|
-
Track in your Test Reports:
|
|
295
|
-
|
|
296
|
-
```markdown
|
|
297
|
-
## Testing Knowledge Metrics
|
|
298
|
-
|
|
299
|
-
### Test Execution
|
|
300
|
-
- **Total Tests:** [X]
|
|
301
|
-
- **Passed:** [Y]
|
|
302
|
-
- **Failed:** [Z]
|
|
303
|
-
- **Flaky:** [W]
|
|
304
|
-
- **KB Entries Created:** [Number]
|
|
305
|
-
|
|
306
|
-
### Bug Discovery
|
|
307
|
-
- **Bugs Found:** [X]
|
|
308
|
-
- **Edge Cases:** [Y]
|
|
309
|
-
- **Regressions:** [Z]
|
|
310
|
-
- **KB Entries:** [List KB-IDs]
|
|
311
|
-
|
|
312
|
-
### Test Coverage
|
|
313
|
-
- **Coverage Before:** [X]%
|
|
314
|
-
- **Coverage After:** [Y]%
|
|
315
|
-
- **Improvement:** [Z]%
|
|
316
|
-
|
|
317
|
-
### Knowledge Reuse
|
|
318
|
-
- **KB Entries Referenced:** [Number]
|
|
319
|
-
- **Time Saved:** [Estimate]
|
|
320
|
-
- **Issues Prevented:** [Number]
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
---
|
|
324
|
-
|
|
325
|
-
## 🎯 Integration with Test Report
|
|
326
|
-
|
|
327
|
-
Add this section to every Test Report:
|
|
328
|
-
|
|
329
|
-
```markdown
|
|
330
|
-
## Knowledge Base Integration
|
|
331
|
-
|
|
332
|
-
### KB Entries Referenced
|
|
333
|
-
| KB-ID | Title | How It Helped Testing |
|
|
334
|
-
|-------|-------|----------------------|
|
|
335
|
-
| KB-[ID] | [Title] | [Description] |
|
|
336
|
-
|
|
337
|
-
### Test Patterns Applied from KB
|
|
338
|
-
1. [Pattern 1 from KB-ID]
|
|
339
|
-
2. [Pattern 2 from KB-ID]
|
|
340
|
-
|
|
341
|
-
### New KB Entries Created
|
|
342
|
-
| KB-ID | Title | Category | Severity |
|
|
343
|
-
|-------|-------|----------|----------|
|
|
344
|
-
| KB-[ID] | [Title] | [Category] | [Severity] |
|
|
345
|
-
|
|
346
|
-
### Edge Cases from KB
|
|
347
|
-
| Edge Case | Source KB | Test Added |
|
|
348
|
-
|-----------|-----------|------------|
|
|
349
|
-
| [Case] | KB-[ID] | [Yes/No] |
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
---
|
|
353
|
-
|
|
354
|
-
## 🚀 Quick Actions
|
|
355
|
-
|
|
356
|
-
### After Test Failure
|
|
357
|
-
```markdown
|
|
358
|
-
1. Check if similar failure in KB
|
|
359
|
-
2. If 3+ failures, create KB entry
|
|
360
|
-
3. Document edge case
|
|
361
|
-
4. Add regression test
|
|
362
|
-
5. Update test strategy
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
### After Finding Edge Case
|
|
366
|
-
```markdown
|
|
367
|
-
1. Document edge case immediately
|
|
368
|
-
2. Create KB entry
|
|
369
|
-
3. Add test coverage
|
|
370
|
-
4. Notify @DEV
|
|
371
|
-
5. Update test checklist
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
### After Regression Bug
|
|
375
|
-
```markdown
|
|
376
|
-
1. Search KB for original fix
|
|
377
|
-
2. Create KB entry linking to original
|
|
378
|
-
3. Add regression test
|
|
379
|
-
4. Update CI/CD checks
|
|
380
|
-
5. Review test coverage gaps
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
---
|
|
384
|
-
|
|
385
|
-
## 🧪 Testing with MCP Tools
|
|
386
|
-
|
|
387
|
-
### Using Playwright MCP
|
|
388
|
-
```markdown
|
|
389
|
-
### Playwright Test Pattern
|
|
390
|
-
1. Search KB for similar E2E tests
|
|
391
|
-
2. Use Playwright MCP for browser automation
|
|
392
|
-
3. Document any browser-specific issues
|
|
393
|
-
4. Create KB entry if complex scenario
|
|
394
|
-
5. Add to regression suite
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
### Browser Automation KB Entry
|
|
398
|
-
```markdown
|
|
399
|
-
## KB Entry for Browser Test
|
|
400
|
-
- **Tool:** Playwright MCP
|
|
401
|
-
- **Test Type:** E2E
|
|
402
|
-
- **Scenario:** [Description]
|
|
403
|
-
- **Selectors:** [CSS/XPath used]
|
|
404
|
-
- **Challenges:** [What was difficult]
|
|
405
|
-
- **Solution:** [How it was solved]
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
---
|
|
409
|
-
|
|
410
|
-
## 📚 Example KB Entries for TESTER
|
|
411
|
-
|
|
412
|
-
### Example 1: Flaky Test Fix
|
|
413
|
-
**KB-2026-01-01-020-flaky-test-race-condition.md**
|
|
414
|
-
- Pattern: Test fails intermittently due to race condition
|
|
415
|
-
- Solution: Add explicit waits, use data-testid
|
|
416
|
-
- Prevention: Always wait for elements, avoid timeouts
|
|
417
|
-
|
|
418
|
-
### Example 2: Edge Case Discovery
|
|
419
|
-
**KB-2026-01-01-021-empty-state-edge-case.md**
|
|
420
|
-
- Pattern: App crashes with empty data array
|
|
421
|
-
- Solution: Add null/empty checks
|
|
422
|
-
- Prevention: Always test empty states
|
|
423
|
-
|
|
424
|
-
### Example 3: Browser Compatibility
|
|
425
|
-
**KB-2026-01-01-022-safari-date-picker-issue.md**
|
|
426
|
-
- Pattern: Date picker fails in Safari
|
|
427
|
-
- Solution: Use native input type="date"
|
|
428
|
-
- Prevention: Test all browsers, use polyfills
|
|
429
|
-
|
|
430
|
-
### Example 4: Performance Bottleneck
|
|
431
|
-
**KB-2026-01-01-023-slow-list-rendering.md**
|
|
432
|
-
- Pattern: List with 1000+ items renders slowly
|
|
433
|
-
- Solution: Implement virtual scrolling
|
|
434
|
-
- Prevention: Performance test with large datasets
|
|
435
|
-
|
|
436
|
-
---
|
|
437
|
-
|
|
438
|
-
## 🎓 TESTER Best Practices
|
|
439
|
-
|
|
440
|
-
1. **Search KB Before Testing**
|
|
441
|
-
- Check for known issues
|
|
442
|
-
- Review edge cases
|
|
443
|
-
- Find test patterns
|
|
444
|
-
|
|
445
|
-
2. **Document Edge Cases Immediately**
|
|
446
|
-
- Don't wait until end of sprint
|
|
447
|
-
- Include reproduction steps
|
|
448
|
-
- Add test coverage
|
|
449
|
-
|
|
450
|
-
3. **Track Flaky Tests**
|
|
451
|
-
- Create KB entry after 3 failures
|
|
452
|
-
- Document root cause
|
|
453
|
-
- Fix or remove flaky tests
|
|
454
|
-
|
|
455
|
-
4. **Build Regression Suite**
|
|
456
|
-
- Every bug gets regression test
|
|
457
|
-
- Link test to KB entry
|
|
458
|
-
- Update CI/CD pipeline
|
|
459
|
-
|
|
460
|
-
5. **Share Test Patterns**
|
|
461
|
-
- Document reusable patterns
|
|
462
|
-
- Create test utilities
|
|
463
|
-
- Update test strategy
|
|
464
|
-
|
|
465
|
-
---
|
|
466
|
-
|
|
467
|
-
## 🔄 Test Automation Workflow
|
|
468
|
-
|
|
469
|
-
```markdown
|
|
470
|
-
### Automated Testing with KB
|
|
471
|
-
|
|
472
|
-
1. **Pre-Test Search**
|
|
473
|
-
- Search KB for component
|
|
474
|
-
- Review test patterns
|
|
475
|
-
- Check edge cases
|
|
476
|
-
|
|
477
|
-
2. **Test Execution**
|
|
478
|
-
- Run automated tests
|
|
479
|
-
- Monitor for failures
|
|
480
|
-
- Track flaky tests
|
|
481
|
-
|
|
482
|
-
3. **Failure Analysis**
|
|
483
|
-
- Investigate root cause
|
|
484
|
-
- Check if known issue
|
|
485
|
-
- Document if new pattern
|
|
486
|
-
|
|
487
|
-
4. **KB Entry Creation**
|
|
488
|
-
- If 3+ failures
|
|
489
|
-
- If edge case found
|
|
490
|
-
- If regression detected
|
|
491
|
-
|
|
492
|
-
5. **Regression Prevention**
|
|
493
|
-
- Add test to suite
|
|
494
|
-
- Update KB entry
|
|
495
|
-
- Share with team
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
---
|
|
499
|
-
|
|
500
|
-
## 🎯 Success Criteria
|
|
501
|
-
|
|
502
|
-
### Individual Success
|
|
503
|
-
- [ ] Searches KB before testing
|
|
504
|
-
- [ ] Creates KB entries for test failures
|
|
505
|
-
- [ ] Documents edge cases
|
|
506
|
-
- [ ] Adds regression tests
|
|
507
|
-
- [ ] Shares test patterns
|
|
508
|
-
|
|
509
|
-
### Team Success
|
|
510
|
-
- [ ] Reduced regression rate
|
|
511
|
-
- [ ] Improved test coverage
|
|
512
|
-
- [ ] Faster bug detection
|
|
513
|
-
- [ ] Better test automation
|
|
514
|
-
- [ ] Shared test knowledge
|
|
515
|
-
|
|
516
|
-
---
|
|
517
|
-
|
|
518
|
-
#tester #testing #quality-assurance #knowledge-base #automation
|
|
519
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# This folder stores security issues and solutions
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Input Validation and Sanitization Best Practices"
|
|
3
|
-
category: security
|
|
4
|
-
priority: high
|
|
5
|
-
sprint: sprint-[N]
|
|
6
|
-
date: 2026-01-02
|
|
7
|
-
tags: [security, validation, sanitization, xss, injection]
|
|
8
|
-
related_files: []
|
|
9
|
-
attempts: 1
|
|
10
|
-
time_saved: "2 hours (future reuse)"
|
|
11
|
-
author: "SECA"
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Problem
|
|
15
|
-
User input passed directly to database, HTML output, or system commands leads to injection attacks (SQL, XSS, Command Injection).
|
|
16
|
-
|
|
17
|
-
## Root Cause
|
|
18
|
-
Trust in user input without validation or sanitization. Missing output encoding.
|
|
19
|
-
|
|
20
|
-
## Solution
|
|
21
|
-
|
|
22
|
-
### 1. Input Validation (Whitelist Approach)
|
|
23
|
-
```typescript
|
|
24
|
-
const validateEmail = (input: string): boolean => {
|
|
25
|
-
const pattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
26
|
-
return pattern.test(input);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const validateUsername = (input: string): boolean => {
|
|
30
|
-
const pattern = /^[a-zA-Z0-9_]{3,20}$/;
|
|
31
|
-
return pattern.test(input);
|
|
32
|
-
};
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### 2. Output Encoding (XSS Prevention)
|
|
36
|
-
```typescript
|
|
37
|
-
const escapeHtml = (unsafe: string): string => {
|
|
38
|
-
return unsafe
|
|
39
|
-
.replace(/&/g, '&')
|
|
40
|
-
.replace(/</g, '<')
|
|
41
|
-
.replace(/>/g, '>')
|
|
42
|
-
.replace(/"/g, '"')
|
|
43
|
-
.replace(/'/g, ''');
|
|
44
|
-
};
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 3. SQL Parameterization
|
|
48
|
-
```python
|
|
49
|
-
# ❌ Vulnerable
|
|
50
|
-
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
|
|
51
|
-
|
|
52
|
-
# ✅ Safe
|
|
53
|
-
cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 4. Content Security Policy
|
|
57
|
-
```html
|
|
58
|
-
<meta http-equiv="Content-Security-Policy"
|
|
59
|
-
content="default-src 'self'; script-src 'self'">
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Validation Libraries
|
|
63
|
-
- **Zod** (TypeScript) - Schema validation
|
|
64
|
-
- **Joi** (Node.js) - Object schema validation
|
|
65
|
-
- **Pydantic** (Python) - Data validation
|
|
66
|
-
|
|
67
|
-
## Prevention
|
|
68
|
-
1. Never trust user input
|
|
69
|
-
2. Validate on both client and server
|
|
70
|
-
3. Use parameterized queries always
|
|
71
|
-
4. Encode output based on context
|
|
72
|
-
5. Implement CSP headers
|
|
73
|
-
|
|
74
|
-
#security #validation #xss #injection
|