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,527 +0,0 @@
|
|
|
1
|
-
# 💻 Developer - Knowledge Base Guide
|
|
2
|
-
|
|
3
|
-
## Role: @DEV (Developer)
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🎯 Your Auto-Learning Responsibilities
|
|
8
|
-
|
|
9
|
-
As DEV, you capture knowledge about:
|
|
10
|
-
- Bug fixes and root causes
|
|
11
|
-
- Complex feature implementations
|
|
12
|
-
- Code patterns and anti-patterns
|
|
13
|
-
- Integration challenges
|
|
14
|
-
- Performance optimizations
|
|
15
|
-
- Refactoring lessons
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 🔄 Auto-Learning Triggers for DEV
|
|
20
|
-
|
|
21
|
-
### Mandatory KB Entry Creation
|
|
22
|
-
|
|
23
|
-
| Trigger | When | Category | Example |
|
|
24
|
-
|---------|------|----------|---------|
|
|
25
|
-
| **Bug Fixed** | Any medium+ priority bug | Bugs | KB-[date]-###-bug-fix |
|
|
26
|
-
| **3+ Attempts** | Task required 3+ attempts | Features | KB-[date]-###-complex-implementation |
|
|
27
|
-
| **Integration Issue** | Third-party integration problem | Features/Integration | KB-[date]-###-api-integration |
|
|
28
|
-
| **Performance Fix** | Performance optimization applied | Performance | KB-[date]-###-optimization |
|
|
29
|
-
| **Refactoring** | Major code refactoring | Architecture | KB-[date]-###-refactoring-pattern |
|
|
30
|
-
| **Error Pattern** | Same error occurred 2+ times | Bugs | KB-[date]-###-error-pattern |
|
|
31
|
-
| **Complex Logic** | Logic required 4+ hours | Features | KB-[date]-###-complex-logic |
|
|
32
|
-
| **Security Fix** | Security vulnerability fixed | Security | KB-[date]-###-security-fix |
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## 📝 KB Entry Template for DEV
|
|
37
|
-
|
|
38
|
-
```markdown
|
|
39
|
-
# KB-[YYYY-MM-DD]-[###] - [Bug/Feature Title]
|
|
40
|
-
|
|
41
|
-
## Document Info
|
|
42
|
-
| Field | Value |
|
|
43
|
-
|-------|-------|
|
|
44
|
-
| ID | KB-[YYYY-MM-DD]-[###] |
|
|
45
|
-
| Date | [YYYY-MM-DD] |
|
|
46
|
-
| Author | @DEV |
|
|
47
|
-
| Category | Bugs / Features / Performance / Security |
|
|
48
|
-
| Severity | [Critical/High/Medium/Low] |
|
|
49
|
-
| Auto-Generated | Yes |
|
|
50
|
-
| Source Task | [Task ID] |
|
|
51
|
-
| Sprint | [N] |
|
|
52
|
-
| Tags | #bug-fix #feature #performance #auto-learned |
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Problem Description
|
|
57
|
-
|
|
58
|
-
### Issue
|
|
59
|
-
[Clear description of the bug or challenge]
|
|
60
|
-
|
|
61
|
-
### Error Message (if applicable)
|
|
62
|
-
```
|
|
63
|
-
[Exact error message]
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Context
|
|
67
|
-
- **Component:** [Component name]
|
|
68
|
-
- **File Path:** [Path to file]
|
|
69
|
-
- **Technology:** [React/Node/Python/etc.]
|
|
70
|
-
- **Environment:** [Dev/Staging/Production]
|
|
71
|
-
|
|
72
|
-
### Symptoms
|
|
73
|
-
- [How the issue manifested]
|
|
74
|
-
- [User impact]
|
|
75
|
-
- [System behavior]
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Root Cause Analysis
|
|
80
|
-
|
|
81
|
-
### Investigation Process
|
|
82
|
-
1. [Step 1 - What was checked]
|
|
83
|
-
2. [Step 2 - What was found]
|
|
84
|
-
3. [Step 3 - Root cause identified]
|
|
85
|
-
|
|
86
|
-
### Root Cause
|
|
87
|
-
[Detailed technical explanation]
|
|
88
|
-
|
|
89
|
-
### Why It Happened
|
|
90
|
-
- [Reason 1]
|
|
91
|
-
- [Reason 2]
|
|
92
|
-
- [Contributing factors]
|
|
93
|
-
|
|
94
|
-
### Problematic Code
|
|
95
|
-
```javascript
|
|
96
|
-
// Before - Problematic code
|
|
97
|
-
[code snippet showing the issue]
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Solution Applied
|
|
103
|
-
|
|
104
|
-
### Approach
|
|
105
|
-
[Explanation of solution strategy]
|
|
106
|
-
|
|
107
|
-
### Implementation
|
|
108
|
-
```javascript
|
|
109
|
-
// After - Fixed code
|
|
110
|
-
[code snippet showing the fix]
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Changes Made
|
|
114
|
-
- **Files Modified:** [List files]
|
|
115
|
-
- **Lines Changed:** [Number]
|
|
116
|
-
- **Dependencies Added:** [If any]
|
|
117
|
-
|
|
118
|
-
### Testing
|
|
119
|
-
```javascript
|
|
120
|
-
// Test to verify fix
|
|
121
|
-
[test code]
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Verification Steps
|
|
125
|
-
1. [Step 1]
|
|
126
|
-
2. [Step 2]
|
|
127
|
-
3. [Step 3]
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Attempts History
|
|
132
|
-
|
|
133
|
-
### Attempt 1
|
|
134
|
-
- **Approach:** [What was tried]
|
|
135
|
-
- **Result:** [Why it failed]
|
|
136
|
-
- **Time Spent:** [Hours]
|
|
137
|
-
|
|
138
|
-
### Attempt 2
|
|
139
|
-
- **Approach:** [What was tried]
|
|
140
|
-
- **Result:** [Why it failed]
|
|
141
|
-
- **Time Spent:** [Hours]
|
|
142
|
-
|
|
143
|
-
### Attempt 3 (Final)
|
|
144
|
-
- **Approach:** [What worked]
|
|
145
|
-
- **Result:** [Success]
|
|
146
|
-
- **Time Spent:** [Hours]
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Prevention Measures
|
|
151
|
-
|
|
152
|
-
### Code Review Checklist
|
|
153
|
-
- [ ] [Check for similar patterns]
|
|
154
|
-
- [ ] [Validate edge cases]
|
|
155
|
-
- [ ] [Verify error handling]
|
|
156
|
-
- [ ] [Check performance impact]
|
|
157
|
-
|
|
158
|
-
### Best Practices
|
|
159
|
-
- [Best practice 1]
|
|
160
|
-
- [Best practice 2]
|
|
161
|
-
|
|
162
|
-
### Linting/Static Analysis
|
|
163
|
-
```json
|
|
164
|
-
// ESLint rule to prevent this
|
|
165
|
-
{
|
|
166
|
-
"rules": {
|
|
167
|
-
"[rule-name]": "error"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Unit Tests Added
|
|
173
|
-
```javascript
|
|
174
|
-
// Regression test
|
|
175
|
-
describe('[Component]', () => {
|
|
176
|
-
it('should handle [edge case]', () => {
|
|
177
|
-
// Test implementation
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## Performance Impact (if applicable)
|
|
185
|
-
|
|
186
|
-
### Metrics
|
|
187
|
-
- **Before:** [Metric value]
|
|
188
|
-
- **After:** [Metric value]
|
|
189
|
-
- **Improvement:** [Percentage]
|
|
190
|
-
|
|
191
|
-
### Profiling Results
|
|
192
|
-
```
|
|
193
|
-
[Profiling data or screenshots]
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## Code Patterns
|
|
199
|
-
|
|
200
|
-
### Pattern to Avoid (Anti-pattern)
|
|
201
|
-
```javascript
|
|
202
|
-
// ❌ Don't do this
|
|
203
|
-
[anti-pattern code]
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### Recommended Pattern
|
|
207
|
-
```javascript
|
|
208
|
-
// ✅ Do this instead
|
|
209
|
-
[recommended code]
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## Dependencies & Compatibility
|
|
215
|
-
|
|
216
|
-
### Dependencies Updated
|
|
217
|
-
- [Package name]: [Old version] → [New version]
|
|
218
|
-
|
|
219
|
-
### Breaking Changes
|
|
220
|
-
- [Change 1]
|
|
221
|
-
- [Change 2]
|
|
222
|
-
|
|
223
|
-
### Migration Steps
|
|
224
|
-
1. [Step 1]
|
|
225
|
-
2. [Step 2]
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## Lessons Learned
|
|
230
|
-
|
|
231
|
-
### What Worked Well
|
|
232
|
-
- [Success 1]
|
|
233
|
-
- [Success 2]
|
|
234
|
-
|
|
235
|
-
### What Didn't Work
|
|
236
|
-
- [Failed approach 1]
|
|
237
|
-
- [Failed approach 2]
|
|
238
|
-
|
|
239
|
-
### Key Takeaways
|
|
240
|
-
1. [Takeaway 1]
|
|
241
|
-
2. [Takeaway 2]
|
|
242
|
-
|
|
243
|
-
### Technical Insights
|
|
244
|
-
- [Insight 1]
|
|
245
|
-
- [Insight 2]
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Related Entries
|
|
250
|
-
- KB-[ID]: [Related bug fix]
|
|
251
|
-
- KB-[ID]: [Related feature]
|
|
252
|
-
|
|
253
|
-
---
|
|
254
|
-
|
|
255
|
-
## References
|
|
256
|
-
- Documentation: [Link]
|
|
257
|
-
- Stack Overflow: [Link]
|
|
258
|
-
- GitHub Issue: [Link]
|
|
259
|
-
- Pull Request: [Link]
|
|
260
|
-
|
|
261
|
-
---
|
|
262
|
-
|
|
263
|
-
#knowledge-base #development #bug-fix #feature #auto-learned
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## 🔍 Pre-Development KB Search
|
|
269
|
-
|
|
270
|
-
Before starting development, search KB for:
|
|
271
|
-
|
|
272
|
-
```markdown
|
|
273
|
-
### DEV KB Search Checklist
|
|
274
|
-
- [ ] Similar bugs in this component
|
|
275
|
-
- [ ] Known issues with this technology
|
|
276
|
-
- [ ] Integration patterns for this API
|
|
277
|
-
- [ ] Performance considerations
|
|
278
|
-
- [ ] Security vulnerabilities
|
|
279
|
-
- [ ] Code patterns to follow/avoid
|
|
280
|
-
|
|
281
|
-
**Search Keywords:**
|
|
282
|
-
- Error message (if fixing bug)
|
|
283
|
-
- Component name
|
|
284
|
-
- Technology/library name
|
|
285
|
-
- Feature type
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
|
-
## 📊 DEV-Specific Metrics
|
|
291
|
-
|
|
292
|
-
Track in your Development Log:
|
|
293
|
-
|
|
294
|
-
```markdown
|
|
295
|
-
## Development Knowledge Metrics
|
|
296
|
-
|
|
297
|
-
### Bug Fixes
|
|
298
|
-
- **Bugs Fixed:** [X]
|
|
299
|
-
- **Average Resolution Time:** [Y] hours
|
|
300
|
-
- **KB Entries Created:** [Z]
|
|
301
|
-
- **KB Entries Referenced:** [W]
|
|
302
|
-
|
|
303
|
-
### Feature Implementation
|
|
304
|
-
- **Features Completed:** [X]
|
|
305
|
-
- **Complex Features:** [Y]
|
|
306
|
-
- **KB Entries Created:** [Z]
|
|
307
|
-
|
|
308
|
-
### Code Quality
|
|
309
|
-
- **Refactorings:** [X]
|
|
310
|
-
- **Performance Optimizations:** [Y]
|
|
311
|
-
- **KB Entries:** [List KB-IDs]
|
|
312
|
-
|
|
313
|
-
### Knowledge Reuse
|
|
314
|
-
- **Time Saved by KB:** [Estimate]
|
|
315
|
-
- **Issues Prevented:** [Number]
|
|
316
|
-
- **Patterns Applied:** [List]
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## 🎯 Integration with Development Log
|
|
322
|
-
|
|
323
|
-
Add this section to every Development Log:
|
|
324
|
-
|
|
325
|
-
```markdown
|
|
326
|
-
## Knowledge Base Integration
|
|
327
|
-
|
|
328
|
-
### KB Entries Referenced
|
|
329
|
-
| KB-ID | Title | How It Helped |
|
|
330
|
-
|-------|-------|---------------|
|
|
331
|
-
| KB-[ID] | [Title] | [Description] |
|
|
332
|
-
|
|
333
|
-
### Code Patterns Applied from KB
|
|
334
|
-
1. [Pattern 1 from KB-ID]
|
|
335
|
-
2. [Pattern 2 from KB-ID]
|
|
336
|
-
|
|
337
|
-
### New KB Entries Created
|
|
338
|
-
| KB-ID | Title | Category | Trigger |
|
|
339
|
-
|-------|-------|----------|---------|
|
|
340
|
-
| KB-[ID] | [Title] | [Category] | [3+ attempts/Bug fix/etc.] |
|
|
341
|
-
|
|
342
|
-
### Anti-Patterns Avoided
|
|
343
|
-
| Anti-Pattern | Source KB | Alternative Used |
|
|
344
|
-
|--------------|-----------|------------------|
|
|
345
|
-
| [Pattern] | KB-[ID] | [Solution] |
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## 🚀 Quick Actions
|
|
351
|
-
|
|
352
|
-
### After Bug Fix
|
|
353
|
-
```markdown
|
|
354
|
-
1. Check severity: [critical/high/medium/low]
|
|
355
|
-
2. If medium+: Create KB entry
|
|
356
|
-
3. Document root cause
|
|
357
|
-
4. Add regression test
|
|
358
|
-
5. Update code review checklist
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
### After 3+ Attempts
|
|
362
|
-
```markdown
|
|
363
|
-
1. Document all attempts
|
|
364
|
-
2. Create KB entry immediately
|
|
365
|
-
3. Explain what didn't work
|
|
366
|
-
4. Document final solution
|
|
367
|
-
5. Add prevention measures
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### After Integration
|
|
371
|
-
```markdown
|
|
372
|
-
1. Document integration approach
|
|
373
|
-
2. Note any challenges
|
|
374
|
-
3. Create KB entry if complex
|
|
375
|
-
4. Add integration tests
|
|
376
|
-
5. Update documentation
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
## 💡 Code Patterns Library
|
|
382
|
-
|
|
383
|
-
### Common Patterns to Document
|
|
384
|
-
|
|
385
|
-
#### Error Handling Pattern
|
|
386
|
-
```javascript
|
|
387
|
-
// KB-worthy error handling
|
|
388
|
-
try {
|
|
389
|
-
await riskyOperation();
|
|
390
|
-
} catch (error) {
|
|
391
|
-
logger.error('Operation failed', { error, context });
|
|
392
|
-
// Proper error recovery
|
|
393
|
-
}
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
#### Async Pattern
|
|
397
|
-
```javascript
|
|
398
|
-
// KB-worthy async pattern
|
|
399
|
-
const results = await Promise.allSettled(
|
|
400
|
-
items.map(item => processItem(item))
|
|
401
|
-
);
|
|
402
|
-
// Handle both successes and failures
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
#### State Management Pattern
|
|
406
|
-
```javascript
|
|
407
|
-
// KB-worthy state pattern
|
|
408
|
-
const [state, setState] = useState(initialState);
|
|
409
|
-
useEffect(() => {
|
|
410
|
-
// Proper cleanup
|
|
411
|
-
return () => cleanup();
|
|
412
|
-
}, [dependencies]);
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
---
|
|
416
|
-
|
|
417
|
-
## 📚 Example KB Entries for DEV
|
|
418
|
-
|
|
419
|
-
### Example 1: React Hydration Bug
|
|
420
|
-
**KB-2026-01-01-001-react-hydration-mismatch.md**
|
|
421
|
-
- Pattern: SSR/CSR mismatch with dynamic IDs
|
|
422
|
-
- Solution: Use React 18's useId() hook
|
|
423
|
-
- Prevention: Avoid Date.now() in initial render
|
|
424
|
-
|
|
425
|
-
### Example 2: API Integration
|
|
426
|
-
**KB-2026-01-01-030-oauth-token-refresh.md**
|
|
427
|
-
- Pattern: OAuth token expires during long sessions
|
|
428
|
-
- Solution: Implement token refresh interceptor
|
|
429
|
-
- Prevention: Always handle token expiration
|
|
430
|
-
|
|
431
|
-
### Example 3: Performance Optimization
|
|
432
|
-
**KB-2026-01-01-031-list-virtualization.md**
|
|
433
|
-
- Pattern: Slow rendering with 1000+ items
|
|
434
|
-
- Solution: Implement virtual scrolling
|
|
435
|
-
- Prevention: Performance test with large datasets
|
|
436
|
-
|
|
437
|
-
### Example 4: Memory Leak
|
|
438
|
-
**KB-2026-01-01-032-event-listener-leak.md**
|
|
439
|
-
- Pattern: Event listeners not cleaned up
|
|
440
|
-
- Solution: Use cleanup in useEffect
|
|
441
|
-
- Prevention: Always return cleanup function
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
## 🎓 DEV Best Practices
|
|
446
|
-
|
|
447
|
-
1. **Search KB Before Coding**
|
|
448
|
-
- Check for similar bugs
|
|
449
|
-
- Review code patterns
|
|
450
|
-
- Find integration examples
|
|
451
|
-
|
|
452
|
-
2. **Document While Coding**
|
|
453
|
-
- Don't wait until end
|
|
454
|
-
- Capture failed attempts
|
|
455
|
-
- Note why solutions work
|
|
456
|
-
|
|
457
|
-
3. **Create KB After 3 Attempts**
|
|
458
|
-
- Mandatory for complex issues
|
|
459
|
-
- Include all attempts
|
|
460
|
-
- Explain reasoning
|
|
461
|
-
|
|
462
|
-
4. **Add Regression Tests**
|
|
463
|
-
- Every bug fix gets test
|
|
464
|
-
- Link test to KB entry
|
|
465
|
-
- Update test suite
|
|
466
|
-
|
|
467
|
-
5. **Share Code Patterns**
|
|
468
|
-
- Document reusable patterns
|
|
469
|
-
- Create utility functions
|
|
470
|
-
- Update style guide
|
|
471
|
-
|
|
472
|
-
---
|
|
473
|
-
|
|
474
|
-
## 🔄 Development Workflow with KB
|
|
475
|
-
|
|
476
|
-
```markdown
|
|
477
|
-
### KB-Integrated Development Flow
|
|
478
|
-
|
|
479
|
-
1. **Pre-Development**
|
|
480
|
-
- Search KB for similar work
|
|
481
|
-
- Review relevant patterns
|
|
482
|
-
- Check for known issues
|
|
483
|
-
|
|
484
|
-
2. **During Development**
|
|
485
|
-
- Track attempts (1, 2, 3+)
|
|
486
|
-
- Note what doesn't work
|
|
487
|
-
- Document challenges
|
|
488
|
-
|
|
489
|
-
3. **After Development**
|
|
490
|
-
- Check auto-learn triggers
|
|
491
|
-
- Create KB entry if needed
|
|
492
|
-
- Add tests
|
|
493
|
-
- Update documentation
|
|
494
|
-
|
|
495
|
-
4. **Code Review**
|
|
496
|
-
- Reference KB entries
|
|
497
|
-
- Check for anti-patterns
|
|
498
|
-
- Verify best practices
|
|
499
|
-
|
|
500
|
-
5. **Deployment**
|
|
501
|
-
- Monitor for issues
|
|
502
|
-
- Update KB if problems found
|
|
503
|
-
- Share lessons learned
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
---
|
|
507
|
-
|
|
508
|
-
## 🎯 Success Criteria
|
|
509
|
-
|
|
510
|
-
### Individual Success
|
|
511
|
-
- [ ] Searches KB before coding
|
|
512
|
-
- [ ] Creates KB entries for bugs
|
|
513
|
-
- [ ] Documents complex features
|
|
514
|
-
- [ ] Adds regression tests
|
|
515
|
-
- [ ] Shares code patterns
|
|
516
|
-
|
|
517
|
-
### Team Success
|
|
518
|
-
- [ ] Reduced bug recurrence
|
|
519
|
-
- [ ] Faster development
|
|
520
|
-
- [ ] Better code quality
|
|
521
|
-
- [ ] Shared knowledge
|
|
522
|
-
- [ ] Consistent patterns
|
|
523
|
-
|
|
524
|
-
---
|
|
525
|
-
|
|
526
|
-
#dev #developer #knowledge-base #coding #bug-fix
|
|
527
|
-
|