agentic-sdlc 1.0.0 → 1.5.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.
Files changed (227) hide show
  1. package/.agent/ide-integration/INTEGRATION-SUMMARY.md +309 -0
  2. package/.agent/ide-integration/KIRO-IDE.md +381 -0
  3. package/.agent/ide-integration/README.md +256 -209
  4. package/.agent/knowledge-base/AUTO-LEARNING-GUIDE.md +327 -0
  5. package/.agent/knowledge-base/HOW-IT-WORKS.md +365 -0
  6. package/.agent/knowledge-base/INDEX.md +43 -0
  7. package/.agent/knowledge-base/README.md +47 -7
  8. package/.agent/knowledge-base/architecture/KB-2026-01-01-003-neo4j-graph-database-skills.md +1146 -0
  9. package/.agent/knowledge-base/architecture/README.md +98 -0
  10. package/.agent/knowledge-base/bugs/KB-2026-01-02-yaml-special-character-escaping.md +56 -0
  11. package/.agent/knowledge-base/bugs/medium/KB-2026-01-01-001-example-auto-learned.md +198 -0
  12. package/.agent/knowledge-base/features/KB-2026-01-01-001-landing-page-design-trends-2026.md +646 -0
  13. package/.agent/knowledge-base/features/KB-2026-01-01-004-uiux-design-skills-2026.md +945 -0
  14. package/.agent/knowledge-base/features/KB-2026-01-01-005-modern-ai-landing-page-ui.md +310 -0
  15. package/.agent/knowledge-base/features/KB-2026-01-01-006-award-winning-landing-page-patterns.md +324 -0
  16. package/.agent/knowledge-base/features/KB-2026-01-02-001-cleanup-workflow.md +242 -0
  17. package/.agent/knowledge-base/features/KB-2026-01-02-002-landing-page-monorepo-architecture.md +148 -0
  18. package/.agent/knowledge-base/features/KB-2026-01-02-003-premium-glassmorphism-patterns.md +58 -0
  19. package/.agent/knowledge-base/features/KB-2026-01-04-ai-agent-enforcement.md +46 -0
  20. package/.agent/knowledge-base/features/README.md +83 -0
  21. package/.agent/knowledge-base/features/figma-landing-page-workflow.md +311 -0
  22. package/.agent/knowledge-base/features/figma-mcp-sa-guide.md +673 -0
  23. package/.agent/knowledge-base/features/figma-mcp-uiux-guide.md +459 -0
  24. package/.agent/knowledge-base/performance/KB-2026-01-02-lazy-loading-optimization.md +80 -0
  25. package/.agent/knowledge-base/platform-specific/KB-2026-01-02-windows-console-encoding.md +56 -0
  26. package/.agent/knowledge-base/role-guides/DEV-KB-Guide.md +527 -0
  27. package/.agent/knowledge-base/role-guides/DEVOPS-KB-Guide.md +491 -0
  28. package/.agent/knowledge-base/role-guides/PM-KB-Guide.md +299 -0
  29. package/.agent/knowledge-base/role-guides/SECA-KB-Guide.md +555 -0
  30. package/.agent/knowledge-base/role-guides/TESTER-KB-Guide.md +519 -0
  31. package/.agent/knowledge-base/security/KB-2026-01-02-input-validation-sanitization.md +74 -0
  32. package/.agent/rules/AUTO-LEARNING.md +418 -0
  33. package/.agent/rules/ai-enforcement.md +11 -0
  34. package/.agent/rules/artifacts.md +77 -58
  35. package/.agent/rules/git-workflow.md +25 -65
  36. package/.agent/rules/global.md +18 -13
  37. package/.agent/skills/role-ba.md +76 -0
  38. package/.agent/skills/role-brain.md +470 -0
  39. package/.agent/skills/role-dev.md +338 -0
  40. package/.agent/skills/role-devops.md +122 -0
  41. package/.agent/skills/role-orchestrator.md +223 -0
  42. package/.agent/skills/role-pm.md +258 -0
  43. package/.agent/skills/role-po.md +237 -0
  44. package/.agent/skills/role-qa.md +81 -0
  45. package/.agent/skills/role-reporter.md +117 -0
  46. package/.agent/skills/role-sa.md +277 -0
  47. package/.agent/skills/role-seca.md +294 -0
  48. package/.agent/skills/role-stakeholder.md +105 -0
  49. package/.agent/skills/role-tester.md +294 -0
  50. package/.agent/skills/role-uiux.md +264 -0
  51. package/.agent/templates/CHANGELOG-Template.md +83 -0
  52. package/.agent/templates/Knowledge-Entry-Template.md +3 -0
  53. package/.agent/workflows/brain.md +84 -53
  54. package/.agent/workflows/compound.md +51 -0
  55. package/.agent/workflows/cycle.md +61 -0
  56. package/.agent/workflows/emergency.md +114 -0
  57. package/.agent/workflows/explore.md +147 -0
  58. package/.agent/workflows/housekeeping.md +105 -0
  59. package/.agent/workflows/metrics.md +179 -0
  60. package/.agent/workflows/orchestrator.md +68 -0
  61. package/.agent/workflows/preflight.md +35 -0
  62. package/.agent/workflows/release.md +153 -0
  63. package/.agent/workflows/route.md +160 -0
  64. package/.agent/workflows/sprint.md +125 -0
  65. package/.agent/workflows/validate.md +146 -0
  66. package/CHANGELOG.md +349 -6
  67. package/README.md +171 -86
  68. package/bin/CROSS-PLATFORM-CLI.md +526 -0
  69. package/bin/README.md +525 -0
  70. package/bin/cli.js +65 -90
  71. package/bin/kb +34 -0
  72. package/bin/kb.bat +28 -0
  73. package/bin/kb_cli.py +226 -0
  74. package/bin/lib/README.md +411 -0
  75. package/bin/lib/__init__.py +7 -0
  76. package/bin/lib/__pycache__/kb_add.cpython-313.pyc +0 -0
  77. package/bin/lib/__pycache__/kb_common.cpython-313.pyc +0 -0
  78. package/bin/lib/__pycache__/kb_compound.cpython-313.pyc +0 -0
  79. package/bin/lib/__pycache__/kb_index.cpython-313.pyc +0 -0
  80. package/bin/lib/__pycache__/kb_list.cpython-313.pyc +0 -0
  81. package/bin/lib/__pycache__/kb_search.cpython-313.pyc +0 -0
  82. package/bin/lib/__pycache__/kb_stats.cpython-313.pyc +0 -0
  83. package/bin/lib/kb_add.py +203 -0
  84. package/bin/lib/kb_common.py +224 -0
  85. package/bin/lib/kb_compound.py +250 -0
  86. package/bin/lib/kb_index.py +193 -0
  87. package/bin/lib/kb_list.py +144 -0
  88. package/bin/lib/kb_search.py +121 -0
  89. package/bin/lib/kb_stats.py +153 -0
  90. package/docs/AGENT-MANAGEMENT-GUIDE.md +298 -0
  91. package/docs/ARCHITECTURE-OVERVIEW.md +350 -0
  92. package/docs/BRAIN-ARCHITECTURE.md +396 -0
  93. package/docs/COMPOUND-ENGINEERING-SETUP.md +326 -0
  94. package/docs/KNOWLEDGE-BASE-GUIDE.md +330 -0
  95. package/docs/KNOWLEDGE-BASE-SIMPLE.md +248 -0
  96. package/docs/MONOREPO-ARCHITECTURE.md +492 -0
  97. package/docs/PROJECT-DOCUMENTATION-INDEX.md +540 -0
  98. package/docs/SDLC-Diagram.md +235 -0
  99. package/docs/analysis/Workflow-Optimization-Diagram.md +524 -0
  100. package/docs/analysis/Workflows-Deep-Analysis-2026-01-03.md +604 -0
  101. package/docs/architecture/{brain.md → BRAIN.md} +1 -1
  102. package/docs/global/Master-Documentation.md +307 -0
  103. package/docs/global/reports/Final-Approval-Report.md +257 -0
  104. package/docs/guides/AUTO-LEARNING-COMPLETE-GUIDE.md +519 -0
  105. package/docs/guides/AUTO-LEARNING-SYSTEM.md +322 -0
  106. package/docs/guides/LEARNING-FLOW.md +0 -0
  107. package/docs/guides/MCP-QUICK-REFERENCE.md +104 -0
  108. package/docs/guides/MCP-SETUP.md +139 -0
  109. package/docs/guides/QUICK-START.md +4 -0
  110. package/docs/guides/ROLE-COMMUNICATION-SYSTEM.md +71 -0
  111. package/docs/reports/Metrics-Dashboard-2026-01-02.md +66 -0
  112. package/docs/reports/Metrics-Dashboard-2026-01-04.md +68 -0
  113. package/docs/reports/UIUX-Design-Skills-Research-Report-2026.md +91 -0
  114. package/docs/reports/Validation-Report-2026-01-04.md +23 -0
  115. package/docs/research-reports/research-20260103-101315.json +95 -0
  116. package/docs/research-reports/research-20260103-101315.md +78 -0
  117. package/docs/research-reports/research-20260103-183837.json +95 -0
  118. package/docs/research-reports/research-20260103-183837.md +78 -0
  119. package/docs/research-reports/research-20260103-190346.json +100 -0
  120. package/docs/research-reports/research-20260103-190346.md +83 -0
  121. package/docs/setup/{github-management.md → GITHUB-MANAGEMENT.md} +1 -1
  122. package/docs/setup/RESEARCH-AGENT-SETUP.md +575 -0
  123. package/docs/sprints/{sprint-github-issues.md → SPRINT-GITHUB-ISSUES.md} +1 -1
  124. package/docs/sprints/{sprint-leann-integration.md → SPRINT-LEANN-INTEGRATION.md} +1 -1
  125. package/docs/sprints/sprint-1/designs/Backend-Design-Spec-Sprint-1-v1.md +1206 -0
  126. package/docs/sprints/sprint-1/designs/System-Design-Spec-Sprint-1-v1.md +439 -0
  127. package/docs/sprints/sprint-1/designs/System-Design-Spec-v1.0.md +425 -0
  128. package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-Sprint-1-v1.md +55 -0
  129. package/docs/sprints/sprint-1/designs/UIUX-Design-Spec-v1.0.md +644 -0
  130. package/docs/sprints/sprint-1/logs/DevOps-Plan-and-Log-Sprint-1-v1.md +253 -0
  131. package/docs/sprints/sprint-1/logs/Development-Log-Phase1.md +433 -0
  132. package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1-v1.md +181 -0
  133. package/docs/sprints/sprint-1/logs/Development-Log-Sprint-1.md +548 -0
  134. package/docs/sprints/sprint-1/logs/Orchestration-Log-Sprint-1.md +46 -0
  135. package/docs/sprints/sprint-1/logs/Phase1-Summary.md +84 -0
  136. package/docs/sprints/sprint-1/plans/Product-Backlog-Sprint-1-v1.md +40 -0
  137. package/docs/sprints/sprint-1/plans/Product-Backlog-v1.0.md +613 -0
  138. package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.0.md +210 -0
  139. package/docs/sprints/sprint-1/plans/Project-Plan-Sprint-1-v1.md +377 -0
  140. package/docs/sprints/sprint-1/reports/Design-Verification-Report-v1.0.md +220 -0
  141. package/docs/sprints/sprint-1/reports/Phase-Report-Sprint-1-v1.md +238 -0
  142. package/docs/sprints/sprint-1/reports/Security-Review-Report-v1.0.md +285 -0
  143. package/docs/sprints/sprint-1/reports/Sprint-Report-Sprint-1.md +74 -0
  144. package/docs/sprints/sprint-1/reports/Test-Report-v1.0.md +346 -0
  145. package/docs/sprints/sprint-1/reviews/Design-Verification-Report.md +508 -0
  146. package/docs/sprints/sprint-1/reviews/Security-Review-Report.md +589 -0
  147. package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-CLEANUP-FINAL.md +121 -0
  148. package/docs/sprints/sprint-1/sprint-current/logs/WORKFLOW-OPTIMIZATION-COMPLETE.md +224 -0
  149. package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Progress.md +310 -0
  150. package/docs/sprints/sprint-1/sprint-current/logs/Workflow-Optimization-Session-Summary.md +420 -0
  151. package/docs/sprints/sprint-1/sprint-current/plans/Workflow-Optimization-Implementation-Plan.md +1124 -0
  152. package/docs/sprints/sprint-2/SPRINT-SUMMARY.md +150 -0
  153. package/docs/sprints/sprint-2/designs/UIUX-Design-Spec-Sprint-2-v1.md +352 -0
  154. package/docs/sprints/sprint-2/logs/Development-Log-Sprint-2-v1.md +293 -0
  155. package/docs/sprints/sprint-2/plans/Product-Backlog-Sprint-2-v1.md +62 -0
  156. package/docs/sprints/sprint-2/plans/Project-Plan-Sprint-2-v1.md +228 -0
  157. package/docs/sprints/sprint-2/reports/Phase-Report-Sprint-2-v1.md +303 -0
  158. package/docs/sprints/sprint-3/designs/UIUX-Design-Spec-Sprint-3-v1.md +160 -0
  159. package/docs/sprints/sprint-3/logs/Development-Log-Sprint-3-v1.md +249 -0
  160. package/docs/sprints/sprint-3/logs/Testing-Report-Sprint-3-v1.md +244 -0
  161. package/docs/sprints/sprint-3/plans/Product-Backlog-Sprint-3-v1.md +95 -0
  162. package/docs/sprints/sprint-3/reports/Final-Approval-Report-Sprint-3-v1.md +299 -0
  163. package/docs/sprints/sprint-3/reports/Sprint-Summary-Sprint-3-v1.md +276 -0
  164. package/docs/sprints/sprint-3/reviews/Design-Verification-Report-Sprint-3-v1.md +122 -0
  165. package/docs/sprints/sprint-3/reviews/Security-Review-Report-Sprint-3-v1.md +67 -0
  166. package/docs/sprints/sprint-5/designs/Backend-Design-Spec-Sprint-5-v1.md +1734 -0
  167. package/docs/sprints/sprint-5/designs/Design-Verification-Report.md +101 -0
  168. package/docs/sprints/sprint-5/designs/Security-Review-Report.md +84 -0
  169. package/docs/sprints/sprint-6/.brain-state.json +29 -0
  170. package/package.json +92 -16
  171. package/.agent/ide-integration/aider-commands.md +0 -40
  172. package/.agent/ide-integration/cline-config.json +0 -108
  173. package/.agent/ide-integration/cursor-rules.md +0 -63
  174. package/.agent/ide-integration/github-copilot-instructions.md +0 -75
  175. package/.agent/ide-integration/vscode-commands.json +0 -190
  176. package/.agent/ide-integration/windsurf-cascade.md +0 -125
  177. package/.agent/knowledge-base/index.md +0 -202
  178. package/.agent/legacy/roles/designer.md +0 -311
  179. package/.agent/legacy/roles/dev.md +0 -177
  180. package/.agent/legacy/roles/devops.md +0 -146
  181. package/.agent/legacy/roles/orchestrator.md +0 -339
  182. package/.agent/legacy/roles/pm.md +0 -120
  183. package/.agent/legacy/roles/po.md +0 -89
  184. package/.agent/legacy/roles/qa.md +0 -108
  185. package/.agent/legacy/roles/reporter.md +0 -70
  186. package/.agent/legacy/roles/sa.md +0 -118
  187. package/.agent/legacy/roles/seca.md +0 -112
  188. package/.agent/legacy/roles/stakeholder.md +0 -111
  189. package/.agent/legacy/roles/tester.md +0 -129
  190. package/.agent/rules/global.md.bak +0 -154
  191. package/.agent/usage.md +0 -653
  192. package/.agent/workflows/auto.md +0 -35
  193. package/.agent/workflows/dev.md +0 -30
  194. package/.agent/workflows/devops.md +0 -28
  195. package/.agent/workflows/kb-search.md +0 -22
  196. package/.agent/workflows/pm.md +0 -42
  197. package/.agent/workflows/po.md +0 -21
  198. package/.agent/workflows/qa.md +0 -31
  199. package/.agent/workflows/reporter.md +0 -21
  200. package/.agent/workflows/sa.md +0 -51
  201. package/.agent/workflows/seca.md +0 -21
  202. package/.agent/workflows/stakeholder.md +0 -26
  203. package/.agent/workflows/tester.md +0 -21
  204. package/.agent/workflows/uiux.md +0 -38
  205. package/.cursorrules +0 -49
  206. package/.env.template +0 -10
  207. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
  208. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  209. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -33
  210. package/.github/ISSUE_TEMPLATE/security_alert.yml +0 -28
  211. package/.github/ISSUE_TEMPLATE/task_implementation.yml +0 -37
  212. package/.github/copilot-instructions.md +0 -60
  213. package/bin/commands/create.js +0 -96
  214. package/bin/commands/help.js +0 -69
  215. package/bin/commands/ide.js +0 -116
  216. package/bin/commands/init-kb.js +0 -74
  217. package/bin/commands/install.js +0 -68
  218. package/bin/commands/list.js +0 -35
  219. package/bin/graph_brain.py +0 -86
  220. package/bin/sync_github.py +0 -75
  221. package/bin/utils/args-parser.js +0 -33
  222. package/bin/utils/colors.js +0 -21
  223. package/bin/verify_neo4j.py +0 -25
  224. /package/.agent/rules/{knowledge-base.md → KNOWLEDGE-BASE.md} +0 -0
  225. /package/docs/architecture/{neo4j-learning-queries.md → NEO4J-LEARNING-QUERIES.md} +0 -0
  226. /package/docs/reports/{comparison-leann-neo4j.md → COMPARISON-LEANN-NEO4J.md} +0 -0
  227. /package/docs/sprints/{sprint-neo4j-brain.md → SPRINT-NEO4J-BRAIN.md} +0 -0
@@ -0,0 +1,526 @@
1
+ # Cross-Platform Knowledge Base CLI
2
+
3
+ ## Overview
4
+
5
+ The Knowledge Base CLI has been reorganized to support **Windows, Linux, and macOS** with a unified Python-based implementation.
6
+
7
+ ```
8
+ ┌─────────────────────────────────────────────────────────────┐
9
+ │ CROSS-PLATFORM CLI ARCHITECTURE │
10
+ └─────────────────────────────────────────────────────────────┘
11
+
12
+ ┌─────────────┴─────────────┐
13
+ ▼ ▼
14
+ ┌───────────────────┐ ┌───────────────────┐
15
+ │ ENTRY POINTS │ │ PYTHON CORE │
16
+ │ │ │ │
17
+ │ • kb (bash) │──────►│ kb_cli.py │
18
+ │ • kb.bat (win) │ │ │
19
+ └───────────────────┘ └───────────────────┘
20
+
21
+
22
+ ┌───────────────────┐
23
+ │ LIB MODULES │
24
+ │ │
25
+ │ • kb_common.py │
26
+ │ • kb_search.py │
27
+ │ • kb_add.py │
28
+ │ • kb_index.py │
29
+ │ • kb_stats.py │
30
+ │ • kb_list.py │
31
+ │ • kb_compound.py │
32
+ └───────────────────┘
33
+ ```
34
+
35
+ ## Directory Structure
36
+
37
+ ```
38
+ bin/
39
+ ├── kb # Bash entry point (Linux/macOS/Git Bash)
40
+ ├── kb.bat # Windows batch entry point
41
+ ├── kb_cli.py # Main Python CLI
42
+ ├── lib/ # Python library modules
43
+ │ ├── __init__.py
44
+ │ ├── kb_common.py # Common utilities
45
+ │ ├── kb_search.py # Search functionality
46
+ │ ├── kb_add.py # Add entries
47
+ │ ├── kb_index.py # Index generation
48
+ │ ├── kb_stats.py # Statistics
49
+ │ ├── kb_list.py # List entries
50
+ │ └── kb_compound.py # Neo4j integration
51
+ ├── kb.ps1 # Legacy PowerShell (kept for compatibility)
52
+ ├── kb-*.ps1 # Legacy PowerShell scripts
53
+ └── README.md # Documentation
54
+ ```
55
+
56
+ ## Installation
57
+
58
+ ### Prerequisites
59
+
60
+ **All Platforms:**
61
+ - Python 3.7 or higher
62
+ - pip (Python package manager)
63
+
64
+ **Optional (for Neo4j integration):**
65
+ ```bash
66
+ pip install neo4j python-dotenv
67
+ ```
68
+
69
+ ### Platform-Specific Setup
70
+
71
+ #### Windows
72
+
73
+ **Option 1: Using Command Prompt**
74
+ ```cmd
75
+ cd path\to\agentic-sdlc
76
+ bin\kb.bat help
77
+ ```
78
+
79
+ **Option 2: Using PowerShell**
80
+ ```powershell
81
+ cd path\to\agentic-sdlc
82
+ .\bin\kb.ps1 help
83
+ ```
84
+
85
+ **Option 3: Using Git Bash**
86
+ ```bash
87
+ cd /path/to/agentic-sdlc
88
+ ./bin/kb help
89
+ ```
90
+
91
+ **Add to PATH (Optional):**
92
+ ```cmd
93
+ setx PATH "%PATH%;C:\path\to\agentic-sdlc\bin"
94
+ ```
95
+
96
+ #### Linux
97
+
98
+ **Make executable:**
99
+ ```bash
100
+ chmod +x bin/kb
101
+ ```
102
+
103
+ **Usage:**
104
+ ```bash
105
+ cd /path/to/agentic-sdlc
106
+ ./bin/kb help
107
+ ```
108
+
109
+ **Add to PATH (Optional):**
110
+ ```bash
111
+ # Add to ~/.bashrc or ~/.zshrc
112
+ export PATH="$PATH:/path/to/agentic-sdlc/bin"
113
+ ```
114
+
115
+ #### macOS
116
+
117
+ **Make executable:**
118
+ ```bash
119
+ chmod +x bin/kb
120
+ ```
121
+
122
+ **Usage:**
123
+ ```bash
124
+ cd /path/to/agentic-sdlc
125
+ ./bin/kb help
126
+ ```
127
+
128
+ **Add to PATH (Optional):**
129
+ ```bash
130
+ # Add to ~/.zshrc or ~/.bash_profile
131
+ export PATH="$PATH:/path/to/agentic-sdlc/bin"
132
+ ```
133
+
134
+ ## Usage
135
+
136
+ ### Basic Commands
137
+
138
+ All commands work identically across platforms:
139
+
140
+ ```bash
141
+ # Show help
142
+ kb help
143
+
144
+ # Search knowledge base
145
+ kb search "react hydration"
146
+
147
+ # Add new entry
148
+ kb add
149
+
150
+ # Update index
151
+ kb index
152
+
153
+ # Show statistics
154
+ kb stats
155
+
156
+ # List entries
157
+ kb list
158
+ kb list bugs
159
+
160
+ # Show recent entries
161
+ kb recent
162
+ kb recent 5
163
+ ```
164
+
165
+ ### Compound Commands (Neo4j Integration)
166
+
167
+ ```bash
168
+ # Compound search (file + Neo4j)
169
+ kb compound search "authentication"
170
+
171
+ # Compound add (create + sync)
172
+ kb compound add
173
+
174
+ # Full sync
175
+ kb compound sync
176
+
177
+ # Intelligent query
178
+ kb compound query "React"
179
+
180
+ # System health
181
+ kb compound stats
182
+ ```
183
+
184
+ ## Platform-Specific Notes
185
+
186
+ ### Windows
187
+
188
+ **Command Prompt:**
189
+ ```cmd
190
+ bin\kb.bat search "term"
191
+ ```
192
+
193
+ **PowerShell:**
194
+ ```powershell
195
+ .\bin\kb.ps1 search "term"
196
+ ```
197
+
198
+ **Git Bash:**
199
+ ```bash
200
+ ./bin/kb search "term"
201
+ ```
202
+
203
+ **Colors:**
204
+ - ANSI colors are automatically enabled on Windows 10+
205
+ - Older Windows versions may not display colors
206
+
207
+ ### Linux
208
+
209
+ **Bash/Zsh:**
210
+ ```bash
211
+ ./bin/kb search "term"
212
+ ```
213
+
214
+ **Colors:**
215
+ - Full ANSI color support
216
+ - Works in all modern terminals
217
+
218
+ ### macOS
219
+
220
+ **Bash/Zsh:**
221
+ ```bash
222
+ ./bin/kb search "term"
223
+ ```
224
+
225
+ **Colors:**
226
+ - Full ANSI color support
227
+ - Works in Terminal.app and iTerm2
228
+
229
+ ## Architecture
230
+
231
+ ### Entry Points
232
+
233
+ **1. Bash Script (`kb`)**
234
+ - Detects OS automatically
235
+ - Finds Python interpreter
236
+ - Executes `kb_cli.py`
237
+ - Works on Linux, macOS, Git Bash
238
+
239
+ **2. Batch Script (`kb.bat`)**
240
+ - Windows-specific entry point
241
+ - Finds Python interpreter
242
+ - Executes `kb_cli.py`
243
+ - Works on CMD and PowerShell
244
+
245
+ **3. Python CLI (`kb_cli.py`)**
246
+ - Main command-line interface
247
+ - Parses arguments
248
+ - Routes to appropriate modules
249
+ - Cross-platform color support
250
+
251
+ ### Library Modules
252
+
253
+ **`kb_common.py`**
254
+ - Common utilities
255
+ - Configuration management
256
+ - Color handling
257
+ - YAML frontmatter parsing
258
+ - Platform detection
259
+
260
+ **`kb_search.py`**
261
+ - Search INDEX.md
262
+ - Search all KB files
263
+ - Display results with context
264
+
265
+ **`kb_add.py`**
266
+ - Interactive entry creation
267
+ - YAML frontmatter generation
268
+ - Auto-open in editor
269
+
270
+ **`kb_index.py`**
271
+ - Scan all entries
272
+ - Generate INDEX.md
273
+ - Group by category/priority/date
274
+
275
+ **`kb_stats.py`**
276
+ - Calculate statistics
277
+ - Display metrics
278
+ - Show growth trends
279
+
280
+ **`kb_list.py`**
281
+ - List all entries
282
+ - Filter by category
283
+ - Show recent entries
284
+
285
+ **`kb_compound.py`**
286
+ - Neo4j integration
287
+ - Compound operations
288
+ - Cross-platform subprocess handling
289
+
290
+ ## Features
291
+
292
+ ### ✅ Cross-Platform
293
+
294
+ - **Windows** - CMD, PowerShell, Git Bash
295
+ - **Linux** - Bash, Zsh, Fish
296
+ - **macOS** - Bash, Zsh
297
+
298
+ ### ✅ Color Support
299
+
300
+ - ANSI colors on all platforms
301
+ - Automatic Windows 10+ color enabling
302
+ - Graceful fallback for older systems
303
+
304
+ ### ✅ Python-Based
305
+
306
+ - Single codebase for all platforms
307
+ - Easy to maintain and extend
308
+ - No platform-specific logic in core
309
+
310
+ ### ✅ Neo4j Integration
311
+
312
+ - Optional Neo4j brain integration
313
+ - Graceful fallback if not available
314
+ - Cross-platform subprocess handling
315
+
316
+ ### ✅ Interactive
317
+
318
+ - Interactive entry creation
319
+ - Auto-open in default editor
320
+ - Platform-specific editor detection
321
+
322
+ ## Migration from PowerShell
323
+
324
+ ### Old PowerShell Commands
325
+
326
+ ```powershell
327
+ .\bin\kb.ps1 search "term"
328
+ .\bin\kb.ps1 add
329
+ .\bin\kb.ps1 compound search "term"
330
+ ```
331
+
332
+ ### New Cross-Platform Commands
333
+
334
+ **Windows (any shell):**
335
+ ```bash
336
+ kb search "term"
337
+ kb add
338
+ kb compound search "term"
339
+ ```
340
+
341
+ **Linux/macOS:**
342
+ ```bash
343
+ ./bin/kb search "term"
344
+ ./bin/kb add
345
+ ./bin/kb compound search "term"
346
+ ```
347
+
348
+ ### Compatibility
349
+
350
+ The old PowerShell scripts (`kb.ps1`, `kb-*.ps1`) are kept for backward compatibility but are deprecated. Please migrate to the new cross-platform CLI.
351
+
352
+ ## Troubleshooting
353
+
354
+ ### Python Not Found
355
+
356
+ **Windows:**
357
+ ```cmd
358
+ where python
359
+ where python3
360
+ ```
361
+
362
+ Install from: https://www.python.org/downloads/
363
+
364
+ **Linux:**
365
+ ```bash
366
+ sudo apt install python3 python3-pip # Debian/Ubuntu
367
+ sudo yum install python3 python3-pip # RHEL/CentOS
368
+ ```
369
+
370
+ **macOS:**
371
+ ```bash
372
+ brew install python3
373
+ ```
374
+
375
+ ### Permission Denied (Linux/macOS)
376
+
377
+ ```bash
378
+ chmod +x bin/kb
379
+ ```
380
+
381
+ ### Colors Not Working (Windows)
382
+
383
+ - Requires Windows 10 or later
384
+ - Use Windows Terminal for best experience
385
+ - Git Bash has full color support
386
+
387
+ ### Neo4j Not Available
388
+
389
+ The CLI works without Neo4j. Compound commands will fall back to file-only mode.
390
+
391
+ To enable Neo4j:
392
+ 1. Install dependencies: `pip install neo4j python-dotenv`
393
+ 2. Configure `.env` with Neo4j credentials
394
+ 3. Ensure `tools/neo4j/` scripts exist
395
+
396
+ ## Development
397
+
398
+ ### Adding New Commands
399
+
400
+ 1. Create module in `bin/lib/kb_newcommand.py`
401
+ 2. Import in `kb_cli.py`
402
+ 3. Add command handler in `main()`
403
+ 4. Update help text
404
+
405
+ ### Testing
406
+
407
+ **Test on all platforms:**
408
+
409
+ ```bash
410
+ # Windows
411
+ bin\kb.bat help
412
+
413
+ # Linux/macOS
414
+ ./bin/kb help
415
+
416
+ # Test all commands
417
+ kb search test
418
+ kb add
419
+ kb index
420
+ kb stats
421
+ kb list
422
+ kb recent
423
+ kb compound stats
424
+ ```
425
+
426
+ ## Examples
427
+
428
+ ### Example 1: Search Across Platforms
429
+
430
+ **Windows CMD:**
431
+ ```cmd
432
+ C:\project> bin\kb.bat search "authentication"
433
+ ```
434
+
435
+ **Linux:**
436
+ ```bash
437
+ $ ./bin/kb search "authentication"
438
+ ```
439
+
440
+ **macOS:**
441
+ ```bash
442
+ $ ./bin/kb search "authentication"
443
+ ```
444
+
445
+ ### Example 2: Add Entry
446
+
447
+ **All platforms:**
448
+ ```bash
449
+ kb add
450
+ ```
451
+
452
+ Interactive prompts:
453
+ ```
454
+ Title: OAuth 2.0 Implementation
455
+ Category (1-6): 2
456
+ Priority (1-4): 2
457
+ Tags: oauth, authentication, security
458
+ Attempts: 3
459
+ Time saved: 2 hours
460
+ ```
461
+
462
+ ### Example 3: Compound Workflow
463
+
464
+ **All platforms:**
465
+ ```bash
466
+ # Search first
467
+ kb compound search "react hooks"
468
+
469
+ # Add solution
470
+ kb compound add
471
+
472
+ # Sync to Neo4j
473
+ kb compound sync
474
+ ```
475
+
476
+ ## Performance
477
+
478
+ ### Startup Time
479
+
480
+ - **Python CLI:** ~100-200ms
481
+ - **PowerShell:** ~500-1000ms
482
+ - **Improvement:** 5-10x faster
483
+
484
+ ### Cross-Platform
485
+
486
+ - Same performance on all platforms
487
+ - No platform-specific overhead
488
+ - Efficient file operations
489
+
490
+ ## Future Enhancements
491
+
492
+ ### Planned
493
+
494
+ - [ ] Shell completion (bash, zsh, fish)
495
+ - [ ] Config file support (~/.kbrc)
496
+ - [ ] Plugin system
497
+ - [ ] Web UI
498
+ - [ ] REST API
499
+
500
+ ### Experimental
501
+
502
+ - [ ] Real-time sync
503
+ - [ ] Collaborative editing
504
+ - [ ] AI-powered suggestions
505
+ - [ ] Mobile app
506
+
507
+ ## Summary
508
+
509
+ The cross-platform CLI provides:
510
+
511
+ ✅ **Unified Experience** - Same commands on all platforms
512
+ ✅ **Python-Based** - Single codebase, easy maintenance
513
+ ✅ **Fast** - 5-10x faster than PowerShell
514
+ ✅ **Color Support** - ANSI colors everywhere
515
+ ✅ **Neo4j Integration** - Optional brain integration
516
+ ✅ **Interactive** - User-friendly prompts
517
+ ✅ **Backward Compatible** - Old scripts still work
518
+
519
+ ---
520
+
521
+ **Version:** 2.0.0
522
+ **Created:** 2026-01-02
523
+ **Platform:** Windows, Linux, macOS
524
+ **Language:** Python 3.7+
525
+
526
+ #cross-platform #cli #python #knowledge-base