agentic-sdlc 1.5.1 → 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.
Files changed (149) hide show
  1. package/.agent/rules/agent-execution.md +55 -0
  2. package/.agent/rules/ai-enforcement.md +4 -3
  3. package/.agent/rules/artifacts.md +79 -77
  4. package/.agent/rules/auto-learning.md +78 -0
  5. package/.agent/rules/code-quality.md +40 -0
  6. package/.agent/rules/git-workflow.md +44 -24
  7. package/.agent/rules/global.md +10 -6
  8. package/.agent/rules/naming-conventions.md +55 -0
  9. package/.agent/skills/role-ba.md +6 -2
  10. package/.agent/skills/role-brain.md +5 -1
  11. package/.agent/skills/role-cloud.md +38 -0
  12. package/.agent/skills/role-dev.md +31 -5
  13. package/.agent/skills/role-devops.md +9 -0
  14. package/.agent/skills/role-game.md +35 -0
  15. package/.agent/skills/role-mobile.md +55 -0
  16. package/.agent/skills/role-orchestrator.md +4 -0
  17. package/.agent/skills/role-pm.md +4 -0
  18. package/.agent/skills/role-po.md +4 -0
  19. package/.agent/skills/role-reporter.md +4 -0
  20. package/.agent/skills/role-research.md +78 -0
  21. package/.agent/skills/role-sa.md +4 -0
  22. package/.agent/skills/role-seca.md +4 -0
  23. package/.agent/skills/role-stakeholder.md +4 -0
  24. package/.agent/skills/role-tester.md +15 -3
  25. package/.agent/skills/role-uiux.md +4 -0
  26. package/.agent/templates/CHANGELOG-Template.md +2 -2
  27. package/.agent/templates/Design-Verification-Report-Template.md +4 -4
  28. package/.agent/templates/DevOps-Plan-Template.md +7 -0
  29. package/.agent/templates/Specification-Template.md +38 -0
  30. package/.agent/templates/ab-comparison-report.md +175 -0
  31. package/.agent/templates/observer-report.md +131 -0
  32. package/.agent/templates/quality-score-report.md +197 -0
  33. package/.agent/templates/self-learning-digest.md +268 -0
  34. package/.agent/templates/system-health-report.md +330 -0
  35. package/.agent/workflows/ab.md +101 -0
  36. package/.agent/workflows/autogen.md +65 -0
  37. package/.agent/workflows/brain.md +52 -42
  38. package/.agent/workflows/commit.md +61 -0
  39. package/.agent/workflows/cycle.md +36 -15
  40. package/.agent/workflows/debug.md +123 -0
  41. package/.agent/workflows/deep-search.md +82 -0
  42. package/.agent/workflows/docs.md +144 -0
  43. package/.agent/workflows/emergency.md +17 -15
  44. package/.agent/workflows/explore.md +15 -9
  45. package/.agent/workflows/housekeeping.md +24 -11
  46. package/.agent/workflows/metrics.md +14 -12
  47. package/.agent/workflows/monitor.md +98 -0
  48. package/.agent/workflows/observe.md +84 -0
  49. package/.agent/workflows/onboarding.md +135 -0
  50. package/.agent/workflows/orchestrator.md +21 -14
  51. package/.agent/workflows/planning.md +126 -0
  52. package/.agent/workflows/refactor.md +132 -0
  53. package/.agent/workflows/release.md +19 -12
  54. package/.agent/workflows/review.md +99 -0
  55. package/.agent/workflows/score.md +104 -0
  56. package/.agent/workflows/sprint.md +16 -14
  57. package/.agent/workflows/validate.md +13 -11
  58. package/.agent/workflows/worktree.md +154 -0
  59. package/CHANGELOG.md +88 -0
  60. package/README.md +12 -4
  61. package/bin/cli.js +143 -13
  62. package/docs/.brain-health-history.json +42 -0
  63. package/docs/.brain-improvements.json +53 -0
  64. package/docs/.brain-learner-log.json +27 -0
  65. package/docs/.brain-scores.json +310 -0
  66. package/docs/architecture/system-flow.mermaid +81 -0
  67. package/docs/artifacts/2026-01-05-enforcement-gates-plan.md +80 -0
  68. package/docs/artifacts/2026-01-05-workflow-analysis.md +231 -0
  69. package/docs/artifacts/README.md +26 -0
  70. package/docs/guides/MCP-GUIDE.md +1 -0
  71. package/docs/reports/2026-01-05-autogen-evaluation.md +64 -0
  72. package/docs/reports/2026-01-05-brain-layer-analysis.md +109 -0
  73. package/docs/reports/2026-01-05-repository-audit.md +253 -0
  74. package/docs/reports/Metrics-Dashboard-2026-01-08.md +29 -0
  75. package/docs/reports/Metrics-Dashboard-Final.md +29 -0
  76. package/docs/reports/Validation-Report-2026-01-05.md +40 -0
  77. package/docs/reports/Validation-Report-2026-01-08.md +40 -0
  78. package/docs/reports/worktrunk-audit.md +94 -0
  79. package/docs/solutions/README.md +96 -0
  80. package/docs/walkthroughs/2026-01-05-audit-implementation.md +36 -0
  81. package/docs/walkthroughs/2026-01-05-autonomy-release.md +54 -0
  82. package/docs/walkthroughs/2026-01-05-enforcement-gates.md +33 -0
  83. package/docs/walkthroughs/2026-01-05-judge-enhancement.md +30 -0
  84. package/docs/walkthroughs/2026-01-05-landing-page-orchestrator.md +52 -0
  85. package/docs/walkthroughs/2026-01-05-validation.md +32 -0
  86. package/docs/walkthroughs/2026-01-05-workflow-audit.md +89 -0
  87. package/docs/walkthroughs/2026-01-05-workflow-refactoring.md +44 -0
  88. package/docs/walkthroughs/2026-01-06-worktrunk-integration.md +41 -0
  89. package/docs/walkthroughs/README.md +25 -0
  90. package/package.json +33 -19
  91. package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +0 -327
  92. package/.agent/knowledge-base/HOW-IT-WORKS.md +0 -365
  93. package/.agent/knowledge-base/INDEX.md +0 -43
  94. package/.agent/knowledge-base/README.md +0 -242
  95. package/.agent/knowledge-base/architecture/.gitkeep +0 -1
  96. package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +0 -1146
  97. package/.agent/knowledge-base/architecture/README.md +0 -98
  98. package/.agent/knowledge-base/bugs/.gitkeep +0 -1
  99. package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +0 -56
  100. package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +0 -198
  101. package/.agent/knowledge-base/features/.gitkeep +0 -1
  102. package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +0 -646
  103. package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +0 -945
  104. package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +0 -310
  105. package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +0 -324
  106. package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +0 -242
  107. package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +0 -148
  108. package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +0 -58
  109. package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +0 -46
  110. package/.agent/knowledge-base/features/README.md +0 -83
  111. package/.agent/knowledge-base/features/figma-landing-page-workflow.md +0 -311
  112. package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +0 -673
  113. package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +0 -459
  114. package/.agent/knowledge-base/performance/.gitkeep +0 -1
  115. package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +0 -80
  116. package/.agent/knowledge-base/platform-specific/.gitkeep +0 -1
  117. package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +0 -56
  118. package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +0 -527
  119. package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +0 -491
  120. package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +0 -299
  121. package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +0 -555
  122. package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +0 -519
  123. package/.agent/knowledge-base/security/.gitkeep +0 -1
  124. package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +0 -74
  125. package/.agent/rules/AUTO-LEARNING.md +0 -418
  126. package/.agent/rules/KNOWLEDGE-BASE.md +0 -45
  127. package/.agent/skills/role-qa.md +0 -81
  128. package/.agent/workflows/compound.md +0 -51
  129. package/.agent/workflows/preflight.md +0 -35
  130. package/.agent/workflows/route.md +0 -160
  131. package/bin/kb +0 -34
  132. package/bin/kb.bat +0 -28
  133. package/bin/kb_cli.py +0 -226
  134. package/bin/lib/README.md +0 -411
  135. package/bin/lib/__init__.py +0 -7
  136. package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
  137. package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
  138. package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
  139. package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
  140. package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
  141. package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
  142. package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
  143. package/bin/lib/kb_add.py +0 -203
  144. package/bin/lib/kb_common.py +0 -224
  145. package/bin/lib/kb_compound.py +0 -250
  146. package/bin/lib/kb_index.py +0 -193
  147. package/bin/lib/kb_list.py +0 -144
  148. package/bin/lib/kb_search.py +0 -121
  149. package/bin/lib/kb_stats.py +0 -153
@@ -1,327 +0,0 @@
1
- # 🧠 Auto-Learning System - Quick Start Guide
2
-
3
- ## What is Auto-Learning?
4
-
5
- The auto-learning system automatically captures knowledge from every task, issue, and bug fix to build project intelligence. This creates a self-improving system that learns from experience.
6
-
7
- ---
8
-
9
- ## 🚀 Quick Start (3 Steps)
10
-
11
- ### Step 1: Check if Learning is Required
12
- After completing ANY task, ask yourself:
13
-
14
- ```markdown
15
- ### Auto-Learn Check
16
- - [ ] Bug priority medium or higher?
17
- - [ ] Required 3+ attempts?
18
- - [ ] Same error occurred before?
19
- - [ ] Implementation took 4+ hours?
20
- - [ ] Security or performance issue?
21
-
22
- **Result:** [YES/NO]
23
- ```
24
-
25
- ### Step 2: Create Knowledge Entry (if YES)
26
- ```bash
27
- # Copy template
28
- cp .agent/templates/Knowledge-Entry-Template.md \
29
- .agent/knowledge-base/[category]/[severity]/KB-$(date +%Y-%m-%d)-[###]-[title].md
30
-
31
- # Fill in the template
32
- # Set "Auto-Generated: Yes"
33
- # Set "Source Task: [Your Task ID]"
34
- ```
35
-
36
- ### Step 3: Sync to Neo4j Knowledge Graph
37
- ```bash
38
- # Automatically sync your entry to Neo4j
39
- python tools/neo4j/sync_skills_to_neo4j.py
40
-
41
- # Verify sync and explore relationships
42
- python tools/neo4j/query_skills_neo4j.py --all-skills
43
- ```
44
-
45
- **What Neo4j Extracts:**
46
- - Skills mentioned in your entry
47
- - Technologies used
48
- - Relationships between skills
49
- - Learning paths and prerequisites
50
- - Author expertise mapping
51
-
52
- ### Step 4: Update Index
53
- Add entry to `.agent/knowledge-base/INDEX.md`:
54
- - Update statistics
55
- - Add to recent entries
56
- - Add to category table
57
- - Add to technology search
58
- - Add to tag search
59
-
60
- **Note:** Neo4j sync is automatic - no manual indexing needed for graph queries!
61
-
62
- ---
63
-
64
- ## 📋 Auto-Learning Triggers
65
-
66
- | Trigger | Action | Priority |
67
- |---------|--------|----------|
68
- | 🐛 Bug Fixed (Medium+) | Create KB entry | High |
69
- | 🔄 3+ Attempts | Create KB entry | High |
70
- | 🔁 Recurring Error | Create KB entry | Critical |
71
- | ⏱️ 4+ Hours Work | Create KB entry | Medium |
72
- | 🔒 Security Issue | Create KB entry | Critical |
73
- | ⚡ Performance Fix | Create KB entry | Medium |
74
- | 🔗 Integration Issue | Create KB entry | Medium |
75
- | 🏗️ Architecture Decision | Create KB entry | High |
76
- | 🚨 Rollback Event | Create KB entry | Critical |
77
-
78
- ---
79
-
80
- ## 🎯 Role-Specific Quick Actions
81
-
82
- ### @DEV
83
- ```markdown
84
- ## After Bug Fix
85
- 1. Check severity: [critical/high/medium/low]
86
- 2. If medium+: Create KB entry
87
- 3. Document: Problem → Root Cause → Solution → Prevention
88
- 4. Tag: #bug-pattern #[technology] #auto-learned
89
- ```
90
-
91
- ### @DEVOPS
92
- ```markdown
93
- ## After Deployment Issue
94
- 1. Document: What failed → Why → How fixed
95
- 2. Create KB entry in platform-specific/
96
- 3. Add monitoring/alert recommendations
97
- 4. Tag: #deployment #infrastructure #auto-learned
98
- ```
99
-
100
- ### @TESTER
101
- ```markdown
102
- ## After Finding Edge Case
103
- 1. Document: Test scenario → Expected vs Actual → Root cause
104
- 2. Create KB entry in bugs/ or features/
105
- 3. Add regression test details
106
- 4. Tag: #testing #edge-case #auto-learned
107
- ```
108
-
109
- ### @SECA
110
- ```markdown
111
- ## After Security Issue
112
- 1. Document: Vulnerability → Impact → Fix → Prevention
113
- 2. Create KB entry in security/
114
- 3. Add detection strategy
115
- 4. Tag: #security #vulnerability #auto-learned
116
- ```
117
-
118
- ---
119
-
120
- ## 🔍 Search Before Starting
121
-
122
- **ALWAYS search knowledge base before starting work:**
123
-
124
- ### Option 1: Automated Research Agent (Recommended)
125
- ```bash
126
- # Searches both file system AND Neo4j automatically
127
- python tools/research/research_agent.py --task "your task" --type feature
128
-
129
- # Output includes:
130
- # - File-based KB entries
131
- # - Neo4j graph relationships
132
- # - Related technologies and skills
133
- # - Confidence level
134
- ```
135
-
136
- ### Option 2: Neo4j Graph Query
137
- ```bash
138
- # Find skills for technology
139
- python tools/neo4j/query_skills_neo4j.py --tech "React"
140
-
141
- # Find related skills
142
- python tools/neo4j/query_skills_neo4j.py --skill "Authentication"
143
-
144
- # Search by keyword
145
- python tools/neo4j/query_skills_neo4j.py --search "performance"
146
- ```
147
-
148
- ### Option 3: Manual File Search
149
- ```markdown
150
- ### KB Search
151
- **Keywords:** [error message, technology, component]
152
- **Category:** [bugs/features/architecture/security/performance]
153
- **Results Found:** [number]
154
-
155
- #### Relevant Entries:
156
- 1. KB-[ID]: [Title] - Relevance: [high/medium/low]
157
- - **Solution:** [Brief summary]
158
- - **Applicable:** [yes/no]
159
-
160
- 2. KB-[ID]: [Title] - Relevance: [high/medium/low]
161
- - **Solution:** [Brief summary]
162
- - **Applicable:** [yes/no]
163
- ```
164
-
165
- **See [Research Agent Documentation](../../tools/research/README.md) for complete guide.**
166
-
167
- ---
168
-
169
- ## 📝 Quick Template
170
-
171
- Use this minimal template for fast knowledge capture:
172
-
173
- ```markdown
174
- # KB-[YYYY-MM-DD]-[###] - [Title]
175
-
176
- **Auto-Generated:** Yes
177
- **Source:** [Task ID]
178
- **Category:** [Category]
179
- **Severity:** [Severity]
180
-
181
- ## Problem
182
- [What went wrong]
183
-
184
- ## Root Cause
185
- [Why it happened]
186
-
187
- ## Solution
188
- [What fixed it]
189
-
190
- ```code
191
- [Code snippet]
192
- ```
193
-
194
- ## Prevention
195
- - [How to avoid]
196
- - [How to detect early]
197
-
198
- ## Tags
199
- #auto-learned #[category] #[technology]
200
- ```
201
-
202
- ---
203
-
204
- ## 🎓 Learning Categories
205
-
206
- | Category | When to Use | Location |
207
- |----------|-------------|----------|
208
- | **Bugs** | Any bug fix | `bugs/[severity]/` |
209
- | **Features** | Complex implementation | `features/[type]/` |
210
- | **Architecture** | Design decision | `architecture/` |
211
- | **Security** | Security issue | `security/` |
212
- | **Performance** | Optimization | `performance/` |
213
- | **Platform** | Platform-specific | `platform-specific/[platform]/` |
214
-
215
- ---
216
-
217
- ## 📊 Quality Checklist
218
-
219
- Before saving KB entry, verify:
220
-
221
- - [ ] Clear problem description
222
- - [ ] Root cause explained
223
- - [ ] Working solution documented
224
- - [ ] Code snippets included
225
- - [ ] Prevention measures listed
226
- - [ ] Proper category and severity
227
- - [ ] Relevant tags added
228
- - [ ] Source task referenced
229
- - [ ] Index updated
230
-
231
- ---
232
-
233
- ## 🔄 Weekly Maintenance
234
-
235
- Every Friday, @REPORTER should:
236
-
237
- 1. **Review** all auto-generated entries
238
- 2. **Verify** completeness and quality
239
- 3. **Add** missing details
240
- 4. **Update** cross-references
241
- 5. **Archive** duplicates
242
-
243
- ---
244
-
245
- ## 💡 Pro Tips
246
-
247
- ### Tip 1: Be Specific
248
- ❌ Bad: "Fixed login bug"
249
- ✅ Good: "Fixed OAuth token refresh race condition in login flow"
250
-
251
- ### Tip 2: Include Error Messages
252
- Always include exact error messages for searchability:
253
- ```
254
- Error: Cannot read property 'user' of undefined
255
- ```
256
-
257
- ### Tip 3: Document Failed Attempts
258
- Don't just document what worked - document what DIDN'T work:
259
- ```markdown
260
- ## What Didn't Work
261
- - Tried increasing timeout → Still failed
262
- - Tried different library → Compatibility issues
263
- - Tried caching → Race condition persisted
264
- ```
265
-
266
- ### Tip 4: Add Visual Aids
267
- Include screenshots, diagrams, or recordings when helpful.
268
-
269
- ### Tip 5: Cross-Reference
270
- Link to related KB entries:
271
- ```markdown
272
- ## Related Entries
273
- - KB-2026-01-01-001: Similar hydration issue
274
- - KB-2025-12-15-042: SSR best practices
275
- ```
276
-
277
- ---
278
-
279
- ## 📞 Need Help?
280
-
281
- - **What to document:** Tag @REPORTER
282
- - **Where to store:** Check category structure
283
- - **How to search:** Use index.md or grep
284
- - **Quality issues:** Tag @REPORTER for review
285
-
286
- ---
287
-
288
- ## 🎯 Success Metrics
289
-
290
- Track your learning impact:
291
-
292
- | Metric | Target | Current |
293
- |--------|--------|---------|
294
- | KB Entries Created | Growing | 1 |
295
- | KB Entries Referenced | >50% | - |
296
- | Similar Issues Prevented | >80% | - |
297
- | Resolution Time Reduced | >30% | - |
298
-
299
- ---
300
-
301
- ## 🚀 Advanced Features
302
-
303
- ### Auto-Tagging
304
- System can suggest tags based on:
305
- - Error messages
306
- - Technology stack
307
- - Component names
308
- - File paths
309
-
310
- ### Auto-Linking
311
- System can find related entries by:
312
- - Similar keywords
313
- - Same technology
314
- - Same component
315
- - Same error pattern
316
-
317
- ### Auto-Metrics
318
- System tracks:
319
- - Most common issues
320
- - Fastest resolutions
321
- - Most referenced entries
322
- - Learning trends
323
-
324
- ---
325
-
326
- #auto-learning #knowledge-base #quick-start #guide
327
-
@@ -1,365 +0,0 @@
1
- # How the Knowledge Base Works - Simple Explanation
2
-
3
- ## 🎯 The Big Idea
4
-
5
- Think of the knowledge base as a **team memory** that gets smarter over time. Every time you solve a hard problem, you write it down so you (or anyone else) can find the solution instantly next time.
6
-
7
- ## 📚 Simple Analogy
8
-
9
- Imagine you're cooking:
10
- - **First time:** You try a recipe, burn it twice, finally get it right after 3 hours
11
- - **Without KB:** Next time, you start from scratch again, burn it again
12
- - **With KB:** You wrote down what worked, next time takes 30 minutes
13
-
14
- **That's compound learning!** Each solution makes future work easier.
15
-
16
- ## 🔄 The Compound Loop
17
-
18
- ```
19
- 1. Problem → You encounter a bug or challenge
20
- 2. Solution → You figure it out (maybe after 3 attempts)
21
- 3. Document → You write it in the knowledge base
22
- 4. Search → Next time, you search first
23
- 5. Reuse → You find your old solution instantly
24
- 6. Compound → You saved hours of work!
25
- ```
26
-
27
- ## 📁 How It's Organized
28
-
29
- ```
30
- .agent/knowledge-base/
31
- ├── INDEX.md # 📇 Quick lookup table
32
- ├── bugs/ # 🐛 Bug fixes
33
- │ ├── critical/ # 🔴 System breaking
34
- │ ├── high/ # 🟠 Major issues
35
- │ ├── medium/ # 🟡 Moderate issues
36
- │ └── low/ # 🟢 Minor issues
37
- ├── features/ # ✨ Complex features
38
- │ ├── authentication/ # 🔐 Login, OAuth, etc.
39
- │ ├── performance/ # ⚡ Speed optimizations
40
- │ ├── integration/ # 🔌 Third-party APIs
41
- │ └── ui-ux/ # 🎨 Design patterns
42
- ├── architecture/ # 🏗️ Big decisions
43
- ├── security/ # 🔒 Security fixes
44
- ├── performance/ # 🚀 Speed improvements
45
- └── platform-specific/ # 📱 Platform issues
46
- ├── web/ # 🌐 Web apps
47
- ├── mobile/ # 📱 iOS/Android
48
- ├── desktop/ # 💻 Desktop apps
49
- └── cli/ # ⌨️ Command line
50
- ```
51
-
52
- ## 💡 Real Example
53
-
54
- ### Without Knowledge Base:
55
- ```
56
- Day 1: "Why is React hydration failing?"
57
- → Google for 2 hours
58
- → Try 5 different solutions
59
- → Finally fix it
60
-
61
- Day 30: Same error on different project
62
- → Google for 2 hours again
63
- → Try same 5 solutions again
64
- → Waste another 2 hours
65
- ```
66
-
67
- ### With Knowledge Base:
68
- ```
69
- Day 1: "Why is React hydration failing?"
70
- → Google for 2 hours
71
- → Try 5 different solutions
72
- → Finally fix it
73
- → Write it in KB: bugs/high/KB-2026-01-01-react-hydration.md
74
-
75
- Day 30: Same error on different project
76
- → Search KB: "react hydration"
77
- → Find your old solution
78
- → Fix in 5 minutes
79
- → Saved 1 hour 55 minutes!
80
- ```
81
-
82
- ## 📝 What Goes in the Knowledge Base?
83
-
84
- ### ✅ DO Document:
85
- - **Hard bugs** - Took 3+ attempts to fix
86
- - **Tricky features** - Non-obvious implementation
87
- - **Performance issues** - Required investigation
88
- - **Security fixes** - Important to remember
89
- - **Architecture decisions** - Why you chose X over Y
90
- - **Platform quirks** - iOS vs Android differences
91
-
92
- ### ❌ DON'T Document:
93
- - Simple typos
94
- - Obvious solutions (just Google it)
95
- - One-time issues that won't recur
96
- - Things already well-documented elsewhere
97
-
98
- ## 🔍 How to Search
99
-
100
- ### Method 1: Browse by Category
101
- ```
102
- Need authentication help?
103
- → Look in features/authentication/
104
-
105
- Found a critical bug?
106
- → Look in bugs/critical/
107
-
108
- Performance issue?
109
- → Look in performance/
110
- ```
111
-
112
- ### Method 2: Search INDEX.md
113
- ```
114
- Open: .agent/knowledge-base/INDEX.md
115
- Search (Ctrl+F): "react hydration"
116
- → Find: KB-2026-01-01-001-react-hydration.md
117
- → Open and read solution
118
- ```
119
-
120
- ### Method 3: File Search
121
- ```
122
- In your IDE:
123
- Search all files for: "hydration error"
124
- → Finds all KB entries mentioning it
125
- ```
126
-
127
- ## 📄 Entry Format (Simple)
128
-
129
- Every entry has:
130
-
131
- ```markdown
132
- ---
133
- title: "React Hydration Mismatch Error"
134
- category: bug
135
- priority: high
136
- date: 2026-01-01
137
- tags: [react, ssr, hydration]
138
- ---
139
-
140
- ## Problem
141
- React shows "Hydration failed" error in production
142
-
143
- ## What I Tried (That Didn't Work)
144
- 1. Cleared cache - didn't help
145
- 2. Reinstalled node_modules - didn't help
146
- 3. Changed React version - didn't help
147
-
148
- ## Solution (What Actually Worked)
149
- The issue was server/client date formatting mismatch.
150
-
151
- Fixed by:
152
- 1. Use same date format on server and client
153
- 2. Add suppressHydrationWarning for dynamic content
154
-
155
- ## Code
156
- ```jsx
157
- <time suppressHydrationWarning>
158
- {new Date().toISOString()}
159
- </time>
160
- ```
161
-
162
- ## Prevention
163
- Always use ISO format for dates in SSR apps
164
- ```
165
-
166
- ## 🎯 When to Use It
167
-
168
- ### Before Starting Work:
169
- ```
170
- You: "I need to add OAuth login"
171
- → Search KB: "oauth authentication"
172
- → Find: KB-2025-12-15-oauth-implementation.md
173
- → Read how it was done before
174
- → Reuse the pattern
175
- → Save 3 hours!
176
- ```
177
-
178
- ### After Solving Hard Problem:
179
- ```
180
- You: "Finally fixed that memory leak after 4 hours!"
181
- → Write it down in KB
182
- → Next person (or future you) finds it instantly
183
- → Team saves 4 hours next time
184
- ```
185
-
186
- ### During Code Review:
187
- ```
188
- Reviewer: "Why did you do it this way?"
189
- You: "See KB-2025-12-20-why-we-use-redis.md"
190
- → Clear explanation already documented
191
- → No need to explain again
192
- ```
193
-
194
- ## 📊 The Compound Effect
195
-
196
- ### Month 1:
197
- - 5 entries in KB
198
- - Saved 2 hours total
199
-
200
- ### Month 3:
201
- - 20 entries in KB
202
- - Saved 15 hours total
203
-
204
- ### Month 6:
205
- - 50 entries in KB
206
- - Saved 40 hours total
207
-
208
- ### Year 1:
209
- - 150 entries in KB
210
- - Saved 200+ hours total
211
-
212
- **Each entry makes the next one more valuable!**
213
-
214
- ## 🚀 Quick Start
215
-
216
- ### Step 1: Search First
217
- Before solving any problem:
218
- ```
219
- 1. Open .agent/knowledge-base/INDEX.md
220
- 2. Search for keywords
221
- 3. Check if someone solved it before
222
- ```
223
-
224
- ### Step 2: Document After
225
- After solving a hard problem:
226
- ```
227
- 1. Copy template: .agent/templates/Knowledge-Entry-Template.md
228
- 2. Fill in: Problem, Solution, Prevention
229
- 3. Save in correct folder
230
- 4. Add to INDEX.md
231
- ```
232
-
233
- ### Step 3: Share
234
- ```
235
- Tell your team:
236
- "I added KB-2026-01-01-005 about OAuth refresh tokens"
237
- → Everyone benefits
238
- ```
239
-
240
- ## 🎓 Learning Path
241
-
242
- ### Week 1: Consumer
243
- - Just search and read existing entries
244
- - Learn from past solutions
245
-
246
- ### Week 2: Contributor
247
- - Start adding your own entries
248
- - Document 1-2 problems you solve
249
-
250
- ### Week 3: Curator
251
- - Update old entries with new info
252
- - Link related entries together
253
-
254
- ### Month 2: Expert
255
- - Knowledge base becomes second nature
256
- - Search before Google
257
- - Team productivity increases
258
-
259
- ## 💪 Benefits
260
-
261
- ### For You:
262
- ✅ Never solve the same problem twice
263
- ✅ Build your personal knowledge library
264
- ✅ Become faster over time
265
- ✅ Look like a genius (you remember everything!)
266
-
267
- ### For Team:
268
- ✅ New members get up to speed faster
269
- ✅ Consistent solutions across projects
270
- ✅ Less time wasted on known issues
271
- ✅ Institutional knowledge preserved
272
-
273
- ### For Project:
274
- ✅ Faster development
275
- ✅ Fewer bugs
276
- ✅ Better quality
277
- ✅ Lower costs
278
-
279
- ## 🤔 Common Questions
280
-
281
- ### Q: "Isn't this just documentation?"
282
- **A:** No! Documentation explains how things work. KB explains how to solve problems that already happened.
283
-
284
- ### Q: "Won't this take too much time?"
285
- **A:** Writing takes 10 minutes. Saves hours later. Math checks out!
286
-
287
- ### Q: "What if I forget to search?"
288
- **A:** Make it a habit. Before coding, search KB. Like checking your mirrors before driving.
289
-
290
- ### Q: "What if the solution is outdated?"
291
- **A:** Update it! KB is living documentation. Add a note: "Updated 2026-01-15: Now use v2 API"
292
-
293
- ### Q: "Do I document everything?"
294
- **A:** No! Only hard problems (3+ attempts) or non-obvious solutions.
295
-
296
- ## 🎯 Success Metrics
297
-
298
- Track your compound learning:
299
-
300
- ```
301
- 📊 My KB Stats
302
- - Entries Created: 12
303
- - Entries Reused: 8
304
- - Time Saved: 24 hours
305
- - Compound Rate: 67%
306
- ```
307
-
308
- **Goal:** Reuse rate > 50% means KB is working!
309
-
310
- ## 🔗 Integration with Roles
311
-
312
- ### @DEV
313
- - Search KB before implementing
314
- - Document tricky bugs
315
- - Update entries with better solutions
316
-
317
- ### @TESTER
318
- - Search for known test patterns
319
- - Document edge cases
320
- - Link test failures to KB
321
-
322
- ### @SA
323
- - Document architecture decisions
324
- - Reference KB in designs
325
- - Update patterns as they evolve
326
-
327
- ### @SECA
328
- - Document security fixes
329
- - Create prevention checklists
330
- - Maintain security KB
331
-
332
- ## 🎉 The Magic
333
-
334
- After 6 months of using KB:
335
-
336
- **Before:**
337
- - "How do I fix this?" → 2 hours of Googling
338
- - "I solved this before..." → Can't remember how
339
- - "New team member" → Takes weeks to learn
340
-
341
- **After:**
342
- - "How do I fix this?" → 5 minutes in KB
343
- - "I solved this before!" → Found in 30 seconds
344
- - "New team member" → Reads KB, productive in days
345
-
346
- **That's the power of compound learning!** 🚀
347
-
348
- ---
349
-
350
- ## 📚 Next Steps
351
-
352
- 1. **Read:** Browse existing entries in `.agent/knowledge-base/`
353
- 2. **Search:** Try finding solutions in `INDEX.md`
354
- 3. **Document:** Write your first entry after solving a problem
355
- 4. **Share:** Tell your team about useful entries
356
-
357
- **Remember:** Every entry makes the team smarter. Every search saves time. Every reuse compounds value.
358
-
359
- ---
360
-
361
- **Version:** 1.0.0
362
- **Created:** 2026-01-02
363
- **Philosophy:** "Each unit of work should make the next unit easier"
364
-
365
- #knowledge-base #compound-learning #how-it-works #simple-guide