socrates-ai 0.1.1__tar.gz

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 (206) hide show
  1. socrates_ai-0.1.1/CHANGELOG.md +69 -0
  2. socrates_ai-0.1.1/LICENSE +21 -0
  3. socrates_ai-0.1.1/MANIFEST.in +8 -0
  4. socrates_ai-0.1.1/PKG-INFO +555 -0
  5. socrates_ai-0.1.1/README.md +495 -0
  6. socrates_ai-0.1.1/pyproject.toml +114 -0
  7. socrates_ai-0.1.1/setup.cfg +4 -0
  8. socrates_ai-0.1.1/setup.py +8 -0
  9. socrates_ai-0.1.1/socrates_ai.egg-info/PKG-INFO +555 -0
  10. socrates_ai-0.1.1/socrates_ai.egg-info/SOURCES.txt +204 -0
  11. socrates_ai-0.1.1/socrates_ai.egg-info/dependency_links.txt +1 -0
  12. socrates_ai-0.1.1/socrates_ai.egg-info/requires.txt +32 -0
  13. socrates_ai-0.1.1/socrates_ai.egg-info/top_level.txt +1 -0
  14. socrates_ai-0.1.1/socratic_system/__init__.py +219 -0
  15. socrates_ai-0.1.1/socratic_system/clients/__init__.py +14 -0
  16. socrates_ai-0.1.1/socratic_system/config/constants.py +196 -0
  17. socrates_ai-0.1.1/socratic_system/config/knowledge_base.json +1111 -0
  18. socrates_ai-0.1.1/socratic_system/conflict_resolution/__init__.py +22 -0
  19. socrates_ai-0.1.1/socratic_system/conflict_resolution/base.py +129 -0
  20. socrates_ai-0.1.1/socratic_system/conflict_resolution/checkers.py +295 -0
  21. socrates_ai-0.1.1/socratic_system/conflict_resolution/detector.py +284 -0
  22. socrates_ai-0.1.1/socratic_system/conflict_resolution/rules.py +92 -0
  23. socrates_ai-0.1.1/socratic_system/constants.py +145 -0
  24. socrates_ai-0.1.1/socratic_system/core/__init__.py +39 -0
  25. socrates_ai-0.1.1/socratic_system/core/analyzer_integration.py +454 -0
  26. socrates_ai-0.1.1/socratic_system/core/insight_categorizer.py +373 -0
  27. socrates_ai-0.1.1/socratic_system/core/learning_integration.py +353 -0
  28. socrates_ai-0.1.1/socratic_system/core/project_categories.py +351 -0
  29. socrates_ai-0.1.1/socratic_system/core/question_selector.py +236 -0
  30. socrates_ai-0.1.1/socratic_system/core/workflow_builder.py +525 -0
  31. socrates_ai-0.1.1/socratic_system/core/workflow_integration.py +399 -0
  32. socrates_ai-0.1.1/socratic_system/database/__init__.py +7 -0
  33. socrates_ai-0.1.1/socratic_system/database/connection_pool.py +380 -0
  34. socrates_ai-0.1.1/socratic_system/database/embedding_cache.py +164 -0
  35. socrates_ai-0.1.1/socratic_system/database/knowledge_manager.py +249 -0
  36. socrates_ai-0.1.1/socratic_system/database/migration_runner.py +303 -0
  37. socrates_ai-0.1.1/socratic_system/database/project_db.py +4061 -0
  38. socrates_ai-0.1.1/socratic_system/database/project_file_manager.py +458 -0
  39. socrates_ai-0.1.1/socratic_system/database/query_profiler.py +489 -0
  40. socrates_ai-0.1.1/socratic_system/database/read_write_split.py +498 -0
  41. socrates_ai-0.1.1/socratic_system/database/search_cache.py +291 -0
  42. socrates_ai-0.1.1/socratic_system/database/vector_db.py +362 -0
  43. socrates_ai-0.1.1/socratic_system/migration/enable_workflow_optimization.py +271 -0
  44. socrates_ai-0.1.1/socratic_system/models/__init__.py +57 -0
  45. socrates_ai-0.1.1/socratic_system/models/conflict.py +22 -0
  46. socrates_ai-0.1.1/socratic_system/models/knowledge.py +17 -0
  47. socrates_ai-0.1.1/socratic_system/models/learning.py +154 -0
  48. socrates_ai-0.1.1/socratic_system/models/llm_provider.py +228 -0
  49. socrates_ai-0.1.1/socratic_system/models/maturity.py +58 -0
  50. socrates_ai-0.1.1/socratic_system/models/monitoring.py +18 -0
  51. socrates_ai-0.1.1/socratic_system/models/note.py +52 -0
  52. socrates_ai-0.1.1/socratic_system/models/project.py +271 -0
  53. socrates_ai-0.1.1/socratic_system/models/role.py +151 -0
  54. socrates_ai-0.1.1/socratic_system/models/user.py +102 -0
  55. socrates_ai-0.1.1/socratic_system/models/workflow.py +123 -0
  56. socrates_ai-0.1.1/socratic_system/monitoring_metrics.py +382 -0
  57. socrates_ai-0.1.1/socratic_system/orchestration/__init__.py +5 -0
  58. socrates_ai-0.1.1/socratic_system/orchestration/knowledge_base.py +100 -0
  59. socrates_ai-0.1.1/socratic_system/orchestration/orchestrator.py +776 -0
  60. socrates_ai-0.1.1/socratic_system/parsers/__init__.py +7 -0
  61. socrates_ai-0.1.1/socratic_system/parsers/code_parser.py +655 -0
  62. socrates_ai-0.1.1/socratic_system/services/__init__.py +18 -0
  63. socrates_ai-0.1.1/socratic_system/services/document_understanding.py +487 -0
  64. socrates_ai-0.1.1/socratic_system/services/orchestrator_service.py +275 -0
  65. socrates_ai-0.1.1/socratic_system/sponsorships/__init__.py +26 -0
  66. socrates_ai-0.1.1/socratic_system/sponsorships/models.py +39 -0
  67. socrates_ai-0.1.1/socratic_system/sponsorships/tiers.py +69 -0
  68. socrates_ai-0.1.1/socratic_system/sponsorships/webhook.py +140 -0
  69. socrates_ai-0.1.1/socratic_system/subscription/__init__.py +10 -0
  70. socrates_ai-0.1.1/socratic_system/subscription/checker.py +220 -0
  71. socrates_ai-0.1.1/socratic_system/subscription/storage.py +177 -0
  72. socrates_ai-0.1.1/socratic_system/subscription/tiers.py +93 -0
  73. socrates_ai-0.1.1/socratic_system/ui/__init__.py +5 -0
  74. socrates_ai-0.1.1/socratic_system/ui/analytics_display.py +328 -0
  75. socrates_ai-0.1.1/socratic_system/ui/command_handler.py +335 -0
  76. socrates_ai-0.1.1/socratic_system/ui/commands/__init__.py +221 -0
  77. socrates_ai-0.1.1/socratic_system/ui/commands/analytics_commands.py +368 -0
  78. socrates_ai-0.1.1/socratic_system/ui/commands/base.py +188 -0
  79. socrates_ai-0.1.1/socratic_system/ui/commands/code_commands.py +265 -0
  80. socrates_ai-0.1.1/socratic_system/ui/commands/collab_commands.py +337 -0
  81. socrates_ai-0.1.1/socratic_system/ui/commands/conv_commands.py +141 -0
  82. socrates_ai-0.1.1/socratic_system/ui/commands/debug_commands.py +134 -0
  83. socrates_ai-0.1.1/socratic_system/ui/commands/doc_commands.py +590 -0
  84. socrates_ai-0.1.1/socratic_system/ui/commands/file_commands.py +83 -0
  85. socrates_ai-0.1.1/socratic_system/ui/commands/finalize_commands.py +249 -0
  86. socrates_ai-0.1.1/socratic_system/ui/commands/github_commands.py +746 -0
  87. socrates_ai-0.1.1/socratic_system/ui/commands/knowledge_commands.py +406 -0
  88. socrates_ai-0.1.1/socratic_system/ui/commands/llm_commands.py +423 -0
  89. socrates_ai-0.1.1/socratic_system/ui/commands/maturity_commands.py +191 -0
  90. socrates_ai-0.1.1/socratic_system/ui/commands/model_commands.py +113 -0
  91. socrates_ai-0.1.1/socratic_system/ui/commands/note_commands.py +324 -0
  92. socrates_ai-0.1.1/socratic_system/ui/commands/project_commands.py +1775 -0
  93. socrates_ai-0.1.1/socratic_system/ui/commands/query_commands.py +252 -0
  94. socrates_ai-0.1.1/socratic_system/ui/commands/session_commands.py +840 -0
  95. socrates_ai-0.1.1/socratic_system/ui/commands/skills_commands.py +107 -0
  96. socrates_ai-0.1.1/socratic_system/ui/commands/stats_commands.py +273 -0
  97. socrates_ai-0.1.1/socratic_system/ui/commands/subscription_commands.py +314 -0
  98. socrates_ai-0.1.1/socratic_system/ui/commands/system_commands.py +385 -0
  99. socrates_ai-0.1.1/socratic_system/ui/commands/user_commands.py +373 -0
  100. socrates_ai-0.1.1/socratic_system/ui/commands/workflow_commands.py +332 -0
  101. socrates_ai-0.1.1/socratic_system/ui/context_display.py +190 -0
  102. socrates_ai-0.1.1/socratic_system/ui/main_app.py +873 -0
  103. socrates_ai-0.1.1/socratic_system/ui/maturity_display.py +336 -0
  104. socrates_ai-0.1.1/socratic_system/ui/navigation.py +137 -0
  105. socrates_ai-0.1.1/socratic_system/ui/nlu_handler.py +520 -0
  106. socrates_ai-0.1.1/socratic_system/utils/__init__.py +1 -0
  107. socrates_ai-0.1.1/socratic_system/utils/archive_builder.py +327 -0
  108. socrates_ai-0.1.1/socratic_system/utils/artifact_saver.py +342 -0
  109. socrates_ai-0.1.1/socratic_system/utils/code_extractor.py +253 -0
  110. socrates_ai-0.1.1/socratic_system/utils/code_structure_analyzer.py +293 -0
  111. socrates_ai-0.1.1/socratic_system/utils/documentation_generator.py +1281 -0
  112. socrates_ai-0.1.1/socratic_system/utils/extractors/__init__.py +42 -0
  113. socrates_ai-0.1.1/socratic_system/utils/extractors/base.py +286 -0
  114. socrates_ai-0.1.1/socratic_system/utils/extractors/generic_extractor.py +101 -0
  115. socrates_ai-0.1.1/socratic_system/utils/extractors/models.py +38 -0
  116. socrates_ai-0.1.1/socratic_system/utils/extractors/python_extractor.py +136 -0
  117. socrates_ai-0.1.1/socratic_system/utils/extractors/registry.py +276 -0
  118. socrates_ai-0.1.1/socratic_system/utils/file_change_tracker.py +319 -0
  119. socrates_ai-0.1.1/socratic_system/utils/git_initializer.py +527 -0
  120. socrates_ai-0.1.1/socratic_system/utils/git_repository_manager.py +665 -0
  121. socrates_ai-0.1.1/socratic_system/utils/logger.py +270 -0
  122. socrates_ai-0.1.1/socratic_system/utils/multi_file_splitter.py +515 -0
  123. socrates_ai-0.1.1/socratic_system/utils/orchestrator_helper.py +132 -0
  124. socrates_ai-0.1.1/socratic_system/utils/project_templates.py +766 -0
  125. socrates_ai-0.1.1/socratic_system/utils/validators/__init__.py +18 -0
  126. socrates_ai-0.1.1/socratic_system/utils/validators/dependency_validator.py +404 -0
  127. socrates_ai-0.1.1/socratic_system/utils/validators/syntax_validator.py +334 -0
  128. socrates_ai-0.1.1/socratic_system/utils/validators/test_executor.py +362 -0
  129. socrates_ai-0.1.1/tests/__init__.py +1 -0
  130. socrates_ai-0.1.1/tests/api/test_finalization_endpoints.py +484 -0
  131. socrates_ai-0.1.1/tests/caching/test_embedding_cache.py +372 -0
  132. socrates_ai-0.1.1/tests/caching/test_search_cache.py +504 -0
  133. socrates_ai-0.1.1/tests/caching/test_ttl_cache.py +458 -0
  134. socrates_ai-0.1.1/tests/conftest.py +465 -0
  135. socrates_ai-0.1.1/tests/database/test_db_verification.py +508 -0
  136. socrates_ai-0.1.1/tests/database/test_project_db_operations.py +487 -0
  137. socrates_ai-0.1.1/tests/database/test_vector_db_operations.py +422 -0
  138. socrates_ai-0.1.1/tests/e2e/__init__.py +0 -0
  139. socrates_ai-0.1.1/tests/e2e/journeys/test_complete_flow.py +1032 -0
  140. socrates_ai-0.1.1/tests/e2e/journeys/test_comprehensive_flow.py +502 -0
  141. socrates_ai-0.1.1/tests/e2e/test_api_workflows.py +206 -0
  142. socrates_ai-0.1.1/tests/e2e/test_complete_workflows.py +262 -0
  143. socrates_ai-0.1.1/tests/integration/__init__.py +0 -0
  144. socrates_ai-0.1.1/tests/integration/conftest.py +34 -0
  145. socrates_ai-0.1.1/tests/integration/test_api_comprehensive.py +473 -0
  146. socrates_ai-0.1.1/tests/integration/test_api_database_integration.py +641 -0
  147. socrates_ai-0.1.1/tests/integration/test_api_workflows.py +462 -0
  148. socrates_ai-0.1.1/tests/integration/test_auth_workflows.py +391 -0
  149. socrates_ai-0.1.1/tests/integration/test_chat_workflows.py +389 -0
  150. socrates_ai-0.1.1/tests/integration/test_database_operations.py +114 -0
  151. socrates_ai-0.1.1/tests/integration/test_end_to_end_scenarios.py +504 -0
  152. socrates_ai-0.1.1/tests/integration/test_integration_workflows.py +267 -0
  153. socrates_ai-0.1.1/tests/integration/test_knowledge_workflows.py +474 -0
  154. socrates_ai-0.1.1/tests/integration/test_library_imports.py +131 -0
  155. socrates_ai-0.1.1/tests/integration/test_orchestrator_workflows.py +148 -0
  156. socrates_ai-0.1.1/tests/integration/test_project_management.py +330 -0
  157. socrates_ai-0.1.1/tests/integration/test_project_workflow.py +439 -0
  158. socrates_ai-0.1.1/tests/integration/test_project_workflows.py +416 -0
  159. socrates_ai-0.1.1/tests/integration/test_subscription_enforcement.py +199 -0
  160. socrates_ai-0.1.1/tests/integration/test_websocket_database_integration.py +488 -0
  161. socrates_ai-0.1.1/tests/integration/workflow_integration_test.py +346 -0
  162. socrates_ai-0.1.1/tests/integration/workflows/test_full_flow.py +243 -0
  163. socrates_ai-0.1.1/tests/integration/workflows/test_knowledge_management.py +344 -0
  164. socrates_ai-0.1.1/tests/integration/workflows/test_knowledge_workflows.py +312 -0
  165. socrates_ai-0.1.1/tests/integration/workflows/test_phase2_smoke.py +234 -0
  166. socrates_ai-0.1.1/tests/integration/workflows/test_phase4_verification.py +220 -0
  167. socrates_ai-0.1.1/tests/performance/__init__.py +1 -0
  168. socrates_ai-0.1.1/tests/unit/__init__.py +0 -0
  169. socrates_ai-0.1.1/tests/unit/core/__init__.py +0 -0
  170. socrates_ai-0.1.1/tests/unit/database/__init__.py +0 -0
  171. socrates_ai-0.1.1/tests/unit/database/test_project_db_core.py +453 -0
  172. socrates_ai-0.1.1/tests/unit/database/test_read_write_split.py +548 -0
  173. socrates_ai-0.1.1/tests/unit/middleware/test_metrics.py +374 -0
  174. socrates_ai-0.1.1/tests/unit/models/test_models.py +384 -0
  175. socrates_ai-0.1.1/tests/unit/models/test_project_types.py +143 -0
  176. socrates_ai-0.1.1/tests/unit/orchestration/__init__.py +0 -0
  177. socrates_ai-0.1.1/tests/unit/orchestration/test_orchestrator_basic.py +199 -0
  178. socrates_ai-0.1.1/tests/unit/routers/__init__.py +0 -0
  179. socrates_ai-0.1.1/tests/unit/routers/test_analytics.py +86 -0
  180. socrates_ai-0.1.1/tests/unit/routers/test_api_endpoints.py +548 -0
  181. socrates_ai-0.1.1/tests/unit/routers/test_auth.py +129 -0
  182. socrates_ai-0.1.1/tests/unit/routers/test_chat_sessions.py +110 -0
  183. socrates_ai-0.1.1/tests/unit/routers/test_collaboration.py +105 -0
  184. socrates_ai-0.1.1/tests/unit/routers/test_knowledge.py +127 -0
  185. socrates_ai-0.1.1/tests/unit/routers/test_nlu.py +711 -0
  186. socrates_ai-0.1.1/tests/unit/routers/test_projects.py +203 -0
  187. socrates_ai-0.1.1/tests/unit/routers/test_routing.py +353 -0
  188. socrates_ai-0.1.1/tests/unit/services/test_orchestrator.py +390 -0
  189. socrates_ai-0.1.1/tests/unit/services/test_orchestrator_expansion.py +365 -0
  190. socrates_ai-0.1.1/tests/unit/services/test_orchestrator_integration.py +331 -0
  191. socrates_ai-0.1.1/tests/unit/utils/__init__.py +0 -0
  192. socrates_ai-0.1.1/tests/unit/utils/test_code_extractor.py +306 -0
  193. socrates_ai-0.1.1/tests/unit/utils/test_code_structure_analyzer.py +574 -0
  194. socrates_ai-0.1.1/tests/unit/utils/test_dependency_validator.py +303 -0
  195. socrates_ai-0.1.1/tests/unit/utils/test_file_change_tracker.py +508 -0
  196. socrates_ai-0.1.1/tests/unit/utils/test_git_repository_manager.py +340 -0
  197. socrates_ai-0.1.1/tests/unit/utils/test_parsers.py +192 -0
  198. socrates_ai-0.1.1/tests/unit/utils/test_syntax_validator.py +397 -0
  199. socrates_ai-0.1.1/tests/unit/workflow_test.py +420 -0
  200. socrates_ai-0.1.1/tests/utils/__init__.py +1 -0
  201. socrates_ai-0.1.1/tests/utils/test_archive_builder.py +318 -0
  202. socrates_ai-0.1.1/tests/utils/test_code_extractor.py +375 -0
  203. socrates_ai-0.1.1/tests/utils/test_documentation_generator.py +430 -0
  204. socrates_ai-0.1.1/tests/utils/test_git_initializer.py +349 -0
  205. socrates_ai-0.1.1/tests/utils/test_project_templates.py +310 -0
  206. socrates_ai-0.1.1/tests/utils/test_utils.py +258 -0
@@ -0,0 +1,69 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2024-03-21
9
+
10
+ ### Added
11
+ - Initial PyPI release of socrates-ai
12
+ - Core Socratic method tutoring system with Claude AI integration
13
+ - Multi-agent orchestration system
14
+ - RAG (Retrieval-Augmented Generation) support
15
+ - Project context management
16
+ - Workflow builder for defining learning paths
17
+ - Question selector for adaptive questioning
18
+ - Code structure analysis and code extraction
19
+ - File change tracking and Git integration
20
+ - Dependency validation
21
+ - Comprehensive test suite (500+ tests)
22
+ - FastAPI integration for building applications
23
+ - Vector database support via ChromaDB
24
+ - Database operations with SQLAlchemy
25
+ - User authentication with JWT and bcrypt
26
+ - Rate limiting with SlowAPI
27
+ - Prometheus metrics support
28
+ - Docker and Kubernetes ready
29
+ - GitHub integration and export capabilities
30
+
31
+ ### Features
32
+ - Socratic method-based tutoring
33
+ - Multi-agent system for complex tasks
34
+ - RAG with sentence transformers and ChromaDB
35
+ - Real-time collaboration support
36
+ - Knowledge management system
37
+ - Project lifecycle management
38
+ - Code generation and validation
39
+ - Git repository management
40
+ - Workflow and questionnaire support
41
+ - User and subscription management
42
+ - Chat sessions and message history
43
+ - Project invitations and collaboration
44
+ - Activity logging and analytics
45
+ - Performance monitoring
46
+ - Security features (encryption, password hashing)
47
+
48
+ ### Documentation
49
+ - Comprehensive README
50
+ - Setup and installation guide
51
+ - API documentation
52
+ - Contributing guidelines
53
+
54
+ ### Testing
55
+ - 500+ comprehensive tests across all modules
56
+ - Unit tests for core functionality
57
+ - Integration tests for multi-module workflows
58
+ - End-to-end scenario testing
59
+ - 50%+ code coverage
60
+
61
+ ## [Unreleased]
62
+
63
+ ### Planned Features
64
+ - Advanced workflow orchestration
65
+ - Enhanced RAG capabilities
66
+ - Real-time streaming responses
67
+ - Advanced analytics dashboard
68
+ - Enterprise features
69
+ - Plugin system for extensibility
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Socrates Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ recursive-include socratic_system *.py
5
+ recursive-include socratic_system *.json
6
+ recursive-include socratic_system *.yaml
7
+ recursive-include socratic_system *.yml
8
+ recursive-include tests *.py
@@ -0,0 +1,555 @@
1
+ Metadata-Version: 2.4
2
+ Name: socrates-ai
3
+ Version: 0.1.1
4
+ Summary: A Socratic method tutoring system with Claude AI integration, multi-agent orchestration, and RAG support
5
+ Author-email: Socrates AI Contributors <info@socrates-ai.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Nireus79/Socrates-ai
8
+ Project-URL: Repository, https://github.com/Nireus79/Socrates-ai.git
9
+ Project-URL: Bug Tracker, https://github.com/Nireus79/Socrates-ai/issues
10
+ Project-URL: Documentation, https://socrates-ai.readthedocs.io
11
+ Keywords: ai,education,tutoring,socratic-method,claude,multi-agent,rag
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Education
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Natural Language :: English
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Education
25
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: anthropic>=0.7.0
30
+ Requires-Dist: chromadb>=0.3.21
31
+ Requires-Dist: sentence-transformers>=2.2.0
32
+ Requires-Dist: fastapi>=0.95.0
33
+ Requires-Dist: sqlalchemy>=2.0.0
34
+ Requires-Dist: redis>=4.5.0
35
+ Requires-Dist: pydantic>=2.0.0
36
+ Requires-Dist: python-multipart>=0.0.5
37
+ Requires-Dist: slowapi>=0.1.8
38
+ Requires-Dist: prometheus-client>=0.16.0
39
+ Requires-Dist: pyjwt>=2.6.0
40
+ Requires-Dist: passlib>=1.7.4
41
+ Requires-Dist: bcrypt>=4.0.0
42
+ Requires-Dist: python-dotenv>=1.0.0
43
+ Requires-Dist: requests>=2.28.0
44
+ Requires-Dist: gitpython>=3.1.0
45
+ Provides-Extra: dev
46
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
47
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
48
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
49
+ Requires-Dist: pytest-timeout>=2.1.0; extra == "dev"
50
+ Requires-Dist: black>=23.0.0; extra == "dev"
51
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
52
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
53
+ Requires-Dist: types-requests; extra == "dev"
54
+ Requires-Dist: types-python-dateutil; extra == "dev"
55
+ Provides-Extra: docs
56
+ Requires-Dist: sphinx>=6.0.0; extra == "docs"
57
+ Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "docs"
58
+ Requires-Dist: myst-parser>=1.0.0; extra == "docs"
59
+ Dynamic: license-file
60
+
61
+ # Socrates AI - Socratic Method Tutoring System
62
+
63
+ **Self-hosted platform for AI-guided collaborative projects development using the Socratic method with multi-agent orchestration, RAG, and knowledge management.**
64
+
65
+ ![SocratesSS](https://github.com/user-attachments/assets/233891d6-b983-42a7-8e85-1040e99024f1)
66
+
67
+ ## What is Socrates?
68
+
69
+ Socrates is a production-ready Python framework that implements the Socratic method using Claude AI to help software development teams think through complex architectural and design decisions. Rather than providing direct answers, Socrates asks carefully crafted questions to guide teams toward their own solutions, promoting deeper understanding and better decision-making.
70
+
71
+ **Key insight**: Socrates uses Claude AI not to solve problems directly, but to ask better questions.
72
+
73
+ ## Core Features
74
+
75
+ ### 🤔 Socratic Method
76
+ - AI-guided questioning to help teams think through design problems
77
+ - Guides users toward better solutions through dialogue
78
+ - Promotes collaborative problem-solving
79
+ - Context-aware questions based on project state
80
+
81
+ ### 🤖 Multi-Agent Orchestration
82
+ Specialized agents for different development tasks:
83
+ - **Code Generator**: Generates code with explanations
84
+ - **Conflict Detector**: Identifies design/specification conflicts
85
+ - **Context Analyzer**: Analyzes project context and dependencies
86
+ - **Document Processor**: Processes and indexes documents
87
+ - **Learning Agent**: Tracks user interactions and learning patterns
88
+ - **And more**: 10+ specialized agents
89
+
90
+ ### 📚 Knowledge Management (RAG)
91
+ - Vector-based document search using ChromaDB
92
+ - Retrieval-Augmented Generation for intelligent context
93
+ - Multi-document indexing and querying
94
+ - Semantic search across knowledge base
95
+
96
+ ### 💾 Persistent Storage
97
+ - Project management and tracking
98
+ - User sessions and history
99
+ - Knowledge base with versioning
100
+ - Team member and access control
101
+
102
+ ### 🔐 Production Features
103
+ - JWT authentication
104
+ - Multi-factor authentication (TOTP)
105
+ - Role-based access control (RBAC)
106
+ - API rate limiting
107
+ - Comprehensive logging and monitoring
108
+ - Error tracking and reporting
109
+
110
+ ### ⚡ Performance & Scale
111
+ - Async/await support for concurrent operations
112
+ - Redis caching with in-memory fallback
113
+ - Connection pooling for databases
114
+ - Optimized vector search
115
+ - Cross-platform compatible (Windows, Linux, macOS)
116
+
117
+ ## Architecture
118
+
119
+ Socrates is built on a modular library architecture:
120
+
121
+ ```
122
+ ┌─────────────────────────────────────────┐
123
+ │ socratic-core (Configuration, │
124
+ │ Events, Exceptions, Logging, Utils) │
125
+ └────────────┬────────────────────────────┘
126
+
127
+ ┌────────┼────────┬────────────┐
128
+ │ │ │ │
129
+ ▼ ▼ ▼ ▼
130
+ socratic- socratic- socratic- socratic-
131
+ rag agents analyzer knowledge
132
+ (RAG) (Agents) (Analysis) (Storage)
133
+ │ │ │ │
134
+ └────────┼────────┼────────────┘
135
+
136
+ ┌────────▼────────────────────┐
137
+ │ Specialized Libraries: │
138
+ │ - socratic-learning │
139
+ │ - socratic-workflow │
140
+ │ - socratic-conflict │
141
+ └────────┬────────────────────┘
142
+
143
+ ┌────────┴──────────┬──────────┐
144
+ │ │ │
145
+ ▼ ▼ ▼
146
+ socrates-cli socrates-api Socrates
147
+ (CLI Tool) (REST API) (Main App)
148
+ ```
149
+
150
+ ### Component Overview
151
+
152
+ **socratic-core**: Foundation library providing configuration, event system, exceptions, logging, and utilities
153
+
154
+ **socratic-rag**: Retrieval-Augmented Generation system for intelligent document search and context
155
+
156
+ **socratic-agents**: Multi-agent system with specialized agents for different tasks
157
+
158
+ **socratic-knowledge**: Knowledge base management with versioning and access control
159
+
160
+ **socratic-learning**: User interaction tracking, learning pattern detection, maturity calculation
161
+
162
+ **socratic-analyzer**: Code and context analysis with LLM-powered insights
163
+
164
+ **socratic-workflow**: Workflow orchestration with cost tracking
165
+
166
+ **socratic-conflict**: Conflict detection and resolution
167
+
168
+ **socrates-cli**: Command-line interface for Socrates
169
+
170
+ **socrates-api**: REST API server built with FastAPI
171
+
172
+ **Socrates**: Main application integrating all components with orchestration layer
173
+
174
+ ---
175
+
176
+ ## Published Libraries on PyPI
177
+
178
+ All Socrates components are available as standalone PyPI packages. You can install only what you need.
179
+
180
+ ### Core & Framework
181
+
182
+ | Package | Version | PyPI | Purpose |
183
+ |---------|---------|------|---------|
184
+ | **socratic-core** | 0.1.1+ | [socratic-core](https://pypi.org/project/socratic-core/) | Foundation: config, events, exceptions, logging, utils |
185
+ | **socratic-learning** | 0.1.1+ | [socratic-learning](https://pypi.org/project/socratic-learning/) | Learning engine, interaction tracking, maturity calculation |
186
+
187
+ ### Agent & RAG
188
+
189
+ | Package | Version | PyPI | Purpose |
190
+ |---------|---------|------|---------|
191
+ | **socratic-agents** | 0.1.0+ | [socratic-agents](https://pypi.org/project/socratic-agents/) | Multi-agent orchestration with specialized agents |
192
+ | **socratic-rag** | 0.1.0+ | [socratic-rag](https://pypi.org/project/socratic-rag/) | Retrieval-Augmented Generation with vector search |
193
+ | **socratic-analyzer** | 0.1.0+ | [socratic-analyzer](https://pypi.org/project/socratic-analyzer/) | Code analysis with LLM-powered insights |
194
+
195
+ ### Specialized & Utilities
196
+
197
+ | Package | Version | PyPI | Purpose |
198
+ |---------|---------|------|---------|
199
+ | **socratic-knowledge** | 0.1.0+ | [socratic-knowledge](https://pypi.org/project/socratic-knowledge/) | Knowledge base management with versioning |
200
+ | **socratic-workflow** | 0.1.0+ | [socratic-workflow](https://pypi.org/project/socratic-workflow/) | Workflow orchestration with cost tracking |
201
+ | **socratic-conflict** | 0.1.0+ | [socratic-conflict](https://pypi.org/project/socratic-conflict/) | Conflict detection and resolution |
202
+
203
+ ### Integration & Tools
204
+
205
+ | Package | Version | PyPI | Purpose |
206
+ |---------|---------|------|---------|
207
+ | **socratic-openclaw-skill** | 0.1.0+ | [socratic-openclaw-skill](https://pypi.org/project/socratic-openclaw-skill/) | OpenClaw skill for Socratic discovery |
208
+ | **socrates-ai-langraph** | 0.1.0+ | [socrates-ai-langraph](https://pypi.org/project/socrates-ai-langraph/) | LangGraph integration framework |
209
+ | **socrates-cli** | 0.1.0+ | [socrates-cli](https://pypi.org/project/socrates-cli/) | Command-line interface tools |
210
+ | **socrates-core-api** | 0.1.0+ | [socrates-core-api](https://pypi.org/project/socrates-core-api/) | REST API base framework |
211
+
212
+ ### Installation by Use Case
213
+
214
+ ```bash
215
+ # Minimal installation (just the framework)
216
+ pip install socratic-core>=0.1.1
217
+
218
+ # Learning system (recommended for most users)
219
+ pip install socratic-core>=0.1.1 socratic-learning>=0.1.1
220
+
221
+ # Full RAG capabilities
222
+ pip install socratic-core>=0.1.1 socratic-rag>=0.1.0
223
+
224
+ # Multi-agent orchestration
225
+ pip install socratic-core>=0.1.1 socratic-agents>=0.1.0
226
+
227
+ # OpenClaw integration
228
+ pip install socratic-openclaw-skill>=0.1.0
229
+
230
+ # LangGraph integration
231
+ pip install socrates-ai-langraph>=0.1.0
232
+
233
+ # Everything (kitchen sink)
234
+ pip install socratic-core socratic-learning socratic-agents socratic-rag socratic-analyzer socratic-knowledge socratic-workflow socratic-conflict socrates-cli socrates-core-api
235
+ ```
236
+
237
+ ---
238
+
239
+ ## Quick Start
240
+
241
+ ### Installation
242
+
243
+ ```bash
244
+ # Install the main package
245
+ pip install socrates-ai
246
+
247
+ # OR install specific components
248
+ pip install socratic-core # Just the framework
249
+ pip install socratic-core socrates-cli # Framework + CLI
250
+ pip install socratic-core socratic-rag # Framework + RAG
251
+ ```
252
+
253
+ ### Basic Usage
254
+
255
+ ```python
256
+ import socrates
257
+ from socratic_core import EventType
258
+
259
+ # Create a config
260
+ config = socrates.SocratesConfig(
261
+ api_key="your-anthropic-key",
262
+ data_dir="/path/to/data"
263
+ )
264
+
265
+ # Create orchestrator
266
+ orchestrator = socrates.create_orchestrator(config)
267
+
268
+ # Listen to events
269
+ def on_question_generated(data):
270
+ print(f"Question: {data.get('question')}")
271
+
272
+ orchestrator.event_emitter.on(
273
+ EventType.QUESTION_GENERATED,
274
+ on_question_generated
275
+ )
276
+
277
+ # Process request
278
+ result = await orchestrator.process_request_async(
279
+ agent_name="socratic_counselor",
280
+ action_data={
281
+ "project_id": "proj_123",
282
+ "context": "We need to decide between microservices and monolith",
283
+ "constraints": ["team size: 5", "2-year timeline"]
284
+ }
285
+ )
286
+
287
+ print(result["question"])
288
+ ```
289
+
290
+ ### CLI Usage
291
+
292
+ ```bash
293
+ # Create a new project
294
+ socrates project create --name "My API" --owner "alice"
295
+
296
+ # Start interactive session
297
+ socrates project chat proj_123
298
+
299
+ # Search knowledge base
300
+ socrates knowledge search proj_123 "authentication"
301
+
302
+ # View project details
303
+ socrates project info proj_123
304
+ ```
305
+
306
+ ### REST API
307
+
308
+ ```bash
309
+ # Start the API server
310
+ socrates-api --port 8000
311
+
312
+ # Create a project via API
313
+ curl -X POST http://localhost:8000/projects \
314
+ -H "Authorization: Bearer $TOKEN" \
315
+ -d '{"name": "My Project", "owner": "alice"}'
316
+
317
+ # Ask a Socratic question
318
+ curl -X POST http://localhost:8000/projects/proj_123/question \
319
+ -H "Authorization: Bearer $TOKEN" \
320
+ -d '{"context": "Monolith vs microservices"}'
321
+ ```
322
+
323
+ ## Use Cases
324
+
325
+ ### 1. Architectural Decision Making
326
+ Help teams evaluate different architecture approaches by asking targeted questions about requirements, constraints, and trade-offs.
327
+
328
+ ### 2. Code Review & Design Discussion
329
+ Use agents to analyze code, detect potential conflicts, and guide teams through resolution discussions.
330
+
331
+ ### 3. Team Learning & Onboarding
332
+ Track team members' learning patterns and provide personalized guidance based on their interaction history.
333
+
334
+ ### 4. Knowledge Management
335
+ Maintain a searchable knowledge base of project decisions, patterns, and best practices with RAG.
336
+
337
+ ### 5. Project Documentation
338
+ Automatically generate documentation and decision records from project interactions.
339
+
340
+ ## Production Deployment
341
+
342
+ ### Docker
343
+
344
+ ```bash
345
+ # Build Docker image
346
+ docker build -t socrates:latest .
347
+
348
+ # Run with Docker Compose
349
+ docker-compose up -d
350
+
351
+ # Access API at http://localhost:8000
352
+ # API docs at http://localhost:8000/docs
353
+ ```
354
+
355
+ ### Kubernetes
356
+
357
+ ```bash
358
+ # Deploy with Kubernetes manifests
359
+ kubectl apply -f k8s/
360
+
361
+ # Or use Helm chart
362
+ helm install socrates ./helm/socrates
363
+ ```
364
+
365
+ ## Configuration
366
+
367
+ Socrates can be configured via:
368
+
369
+ 1. **Environment Variables**
370
+ ```bash
371
+ ANTHROPIC_API_KEY=sk-ant-...
372
+ SOCRATES_DATA_DIR=/data/socrates
373
+ SOCRATES_DB_URL=postgresql://user:pass@localhost/socrates
374
+ SOCRATES_REDIS_URL=redis://localhost:6379
375
+ ```
376
+
377
+ 2. **Configuration File** (YAML/JSON)
378
+ ```yaml
379
+ api_key: sk-ant-...
380
+ data_dir: /data/socrates
381
+ database:
382
+ url: postgresql://user:pass@localhost/socrates
383
+ pool_size: 20
384
+ redis:
385
+ url: redis://localhost:6379
386
+ logging:
387
+ level: INFO
388
+ ```
389
+
390
+ 3. **Python Code**
391
+ ```python
392
+ config = socrates.SocratesConfig(
393
+ api_key="sk-ant-...",
394
+ data_dir="/data/socrates",
395
+ log_level="DEBUG",
396
+ database_url="postgresql://..."
397
+ )
398
+ ```
399
+
400
+ ## API Endpoints
401
+
402
+ ### Authentication
403
+ - `POST /auth/register` - User registration
404
+ - `POST /auth/login` - User login with JWT
405
+ - `POST /auth/logout` - Logout
406
+ - `POST /auth/mfa/setup` - Setup MFA
407
+
408
+ ### Projects
409
+ - `POST /projects` - Create project
410
+ - `GET /projects` - List user's projects
411
+ - `GET /projects/{id}` - Get project details
412
+ - `PUT /projects/{id}` - Update project
413
+ - `DELETE /projects/{id}` - Delete project
414
+ - `POST /projects/{id}/advance-phase` - Move to next phase
415
+
416
+ ### Socratic Interaction
417
+ - `POST /projects/{id}/question` - Get Socratic question
418
+ - `POST /projects/{id}/question/answer` - Submit answer
419
+ - `GET /projects/{id}/question/history` - Get question history
420
+
421
+ ### Knowledge Management
422
+ - `POST /projects/{id}/knowledge` - Add knowledge entry
423
+ - `GET /projects/{id}/knowledge` - List knowledge entries
424
+ - `GET /projects/{id}/knowledge/search` - Search knowledge
425
+
426
+ ### Analytics
427
+ - `GET /projects/{id}/analytics` - Project analytics
428
+ - `GET /projects/{id}/insights` - Generated insights
429
+
430
+ See [docs/API_REFERENCE.md](docs/API_REFERENCE.md) for complete documentation.
431
+
432
+ ## Development
433
+
434
+ ### Setup Development Environment
435
+
436
+ ```bash
437
+ # Clone repository
438
+ git clone https://github.com/Nireus79/Socrates.git
439
+ cd Socrates
440
+
441
+ # Create virtual environment
442
+ python -m venv venv
443
+ source venv/bin/activate # On Windows: venv\Scripts\activate
444
+
445
+ # Install dependencies
446
+ pip install -r requirements.txt
447
+ pip install -r requirements-test.txt
448
+
449
+ # Setup pre-commit hooks
450
+ pre-commit install
451
+ ```
452
+
453
+ ### Running Tests
454
+
455
+ ```bash
456
+ # All tests
457
+ pytest tests/ -v --cov=socratic_system
458
+
459
+ # Specific categories
460
+ pytest tests/unit/ -v
461
+ pytest tests/integration/ -v
462
+
463
+ # With coverage report
464
+ pytest --cov=socratic_system --cov-report=html
465
+ ```
466
+
467
+ ### Code Quality
468
+
469
+ ```bash
470
+ # Format code
471
+ black socratic_system/ socrates-api/ socrates-cli/
472
+
473
+ # Lint
474
+ ruff check socratic_system/ socrates-api/ socrates-cli/
475
+
476
+ # Type checking
477
+ mypy socratic_system/ --ignore-missing-imports
478
+
479
+ # Security scan
480
+ bandit -r socratic_system/ socrates-api/
481
+ ```
482
+
483
+ ## Documentation
484
+
485
+ - **[Installation Guide](INSTALL.md)** - Complete setup instructions
486
+ - **[Quick Start Guide](QUICKSTART.md)** - 5-minute tutorial
487
+ - **[Architecture Documentation](ARCHITECTURE.md)** - System design and components
488
+ - **[API Reference](docs/API_REFERENCE.md)** - Complete API documentation
489
+ - **[CLI Reference](socrates-cli/README.md)** - Command-line tool guide
490
+ - **[Configuration Guide](docs/CONFIGURATION.md)** - Configuration options
491
+ - **[Developer Guide](docs/DEVELOPER_GUIDE.md)** - Development guidelines
492
+ - **[Contributing](docs/CONTRIBUTING.md)** - Contribution guidelines
493
+
494
+ ## Technology Stack
495
+
496
+ - **Language**: Python 3.11+
497
+ - **LLM**: Claude (via Anthropic API)
498
+ - **API Framework**: FastAPI
499
+ - **Databases**: PostgreSQL, SQLite
500
+ - **Vector Store**: ChromaDB
501
+ - **Caching**: Redis
502
+ - **Frontend**: React (if included)
503
+ - **Deployment**: Docker, Kubernetes, Helm
504
+ - **Testing**: pytest, pytest-cov
505
+ - **Code Quality**: ruff, mypy, black, bandit
506
+
507
+ ## 🔄 Latest Updates
508
+
509
+ ### Recent Changes (March 2026)
510
+ - ✅ Fixed MaturityCalculator import issue - now correctly imports from `socratic_learning` package
511
+ - ✅ Improved module resolution for external dependencies
512
+ - ✅ Enhanced API stability and reliability
513
+
514
+ ### 🎯 Open for Review & Contributions
515
+
516
+ **I'm actively seeking:**
517
+ - **Code Reviews** - Feedback on architecture, design patterns, and code quality
518
+ - **Bug Reports** - Issues, edge cases, or unexpected behaviors
519
+ - **Corrections** - Grammar, documentation, or technical inaccuracies
520
+ - **Suggestions** - Improvements, optimizations, or new features
521
+ - **Pull Requests** - Contributions to fix bugs or add features
522
+
523
+ This is a collaborative learning project. All feedback, whether critical or constructive, helps improve the codebase. Don't hesitate to open issues or PRs!
524
+
525
+ ## Community & Support
526
+
527
+ - **GitHub Issues**: [Report bugs or request features](https://github.com/Nireus79/Socrates/issues)
528
+ - **Discussions**: [Ask questions and share ideas](https://github.com/Nireus79/Socrates/discussions)
529
+ - **Pull Requests**: [Submit code reviews and contributions](https://github.com/Nireus79/Socrates/pulls)
530
+ - **Documentation**: [Full docs](docs/)
531
+ - **Contributing**: [Contribution guide](docs/CONTRIBUTING.md)
532
+
533
+ ## Sponsorship
534
+
535
+ Socrates is free and open-source. Support development through GitHub Sponsors:
536
+
537
+ - **Supporter ($5/month)**: 10 projects, 5 team members
538
+ - **Contributor ($15/month)**: Unlimited projects, members, storage
539
+ - **Custom ($25+/month)**: Enterprise features + priority support
540
+
541
+ [Become a Sponsor](https://github.com/sponsors/Nireus79)
542
+
543
+ ## License
544
+
545
+ MIT License - see [LICENSE](LICENSE) for details
546
+
547
+ ## Acknowledgments
548
+
549
+ Built with:
550
+ - [Claude AI](https://anthropic.com) by Anthropic
551
+ - [FastAPI](https://fastapi.tiangolo.com/) for REST API
552
+ - [PostgreSQL](https://www.postgresql.org/) for data persistence
553
+ - [ChromaDB](https://www.trychroma.com/) for vector storage
554
+ - [Redis](https://redis.io/) for caching
555
+ - And the open-source community