basic-memory 0.2.11__tar.gz → 0.16.0__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.

Potentially problematic release.


This version of basic-memory might be problematic. Click here for more details.

Files changed (444) hide show
  1. basic_memory-0.16.0/.claude/agents/python-developer.md +154 -0
  2. basic_memory-0.16.0/.claude/agents/system-architect.md +126 -0
  3. basic_memory-0.16.0/.claude/commands/release/beta.md +95 -0
  4. basic_memory-0.16.0/.claude/commands/release/changelog.md +160 -0
  5. basic_memory-0.16.0/.claude/commands/release/release-check.md +131 -0
  6. basic_memory-0.16.0/.claude/commands/release/release.md +92 -0
  7. basic_memory-0.16.0/.claude/commands/spec.md +55 -0
  8. basic_memory-0.16.0/.claude/commands/test-live.md +622 -0
  9. basic_memory-0.16.0/.dockerignore +60 -0
  10. basic_memory-0.16.0/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  11. basic_memory-0.16.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  12. basic_memory-0.16.0/.github/ISSUE_TEMPLATE/documentation.md +19 -0
  13. basic_memory-0.16.0/.github/ISSUE_TEMPLATE/feature_request.md +28 -0
  14. basic_memory-0.16.0/.github/dependabot.yml +12 -0
  15. basic_memory-0.16.0/.github/workflows/claude-code-review.yml +82 -0
  16. basic_memory-0.16.0/.github/workflows/claude-issue-triage.yml +71 -0
  17. basic_memory-0.16.0/.github/workflows/claude.yml +68 -0
  18. basic_memory-0.16.0/.github/workflows/dev-release.yml +53 -0
  19. basic_memory-0.16.0/.github/workflows/docker.yml +61 -0
  20. basic_memory-0.16.0/.github/workflows/release.yml +85 -0
  21. basic_memory-0.16.0/.github/workflows/test.yml +70 -0
  22. {basic_memory-0.2.11 → basic_memory-0.16.0}/.gitignore +11 -0
  23. basic_memory-0.16.0/CHANGELOG.md +2009 -0
  24. basic_memory-0.16.0/CLA.md +71 -0
  25. basic_memory-0.16.0/CLAUDE.md +268 -0
  26. basic_memory-0.16.0/CONTRIBUTING.md +277 -0
  27. basic_memory-0.16.0/Dockerfile +46 -0
  28. basic_memory-0.16.0/PKG-INFO +493 -0
  29. basic_memory-0.16.0/README.md +453 -0
  30. basic_memory-0.16.0/SECURITY.md +13 -0
  31. basic_memory-0.16.0/docker-compose.yml +83 -0
  32. basic_memory-0.16.0/docs/Docker.md +365 -0
  33. basic_memory-0.16.0/docs/ai-assistant-guide-extended.md +3240 -0
  34. basic_memory-0.16.0/docs/character-handling.md +241 -0
  35. basic_memory-0.16.0/docs/cloud-cli.md +726 -0
  36. basic_memory-0.16.0/justfile +193 -0
  37. basic_memory-0.16.0/llms-install.md +128 -0
  38. basic_memory-0.16.0/pyproject.toml +133 -0
  39. basic_memory-0.16.0/smithery.yaml +15 -0
  40. basic_memory-0.16.0/specs/SPEC-1 Specification-Driven Development Process.md +156 -0
  41. basic_memory-0.16.0/specs/SPEC-10 Unified Deployment Workflow and Event Tracking.md +569 -0
  42. basic_memory-0.16.0/specs/SPEC-11 Basic Memory API Performance Optimization.md +186 -0
  43. basic_memory-0.16.0/specs/SPEC-12 OpenTelemetry Observability.md +182 -0
  44. basic_memory-0.16.0/specs/SPEC-13 CLI Authentication with Subscription Validation.md +917 -0
  45. basic_memory-0.16.0/specs/SPEC-14 Cloud Git Versioning & GitHub Backup.md +210 -0
  46. basic_memory-0.16.0/specs/SPEC-14- Cloud Git Versioning & GitHub Backup.md +210 -0
  47. basic_memory-0.16.0/specs/SPEC-15 Configuration Persistence via Tigris for Cloud Tenants.md +273 -0
  48. basic_memory-0.16.0/specs/SPEC-16 MCP Cloud Service Consolidation.md +800 -0
  49. basic_memory-0.16.0/specs/SPEC-17 Semantic Search with ChromaDB.md +1439 -0
  50. basic_memory-0.16.0/specs/SPEC-18 AI Memory Management Tool.md +528 -0
  51. basic_memory-0.16.0/specs/SPEC-19 Sync Performance and Memory Optimization.md +1046 -0
  52. basic_memory-0.16.0/specs/SPEC-2 Slash Commands Reference.md +120 -0
  53. basic_memory-0.16.0/specs/SPEC-20 Simplified Project-Scoped Rclone Sync.md +1216 -0
  54. basic_memory-0.16.0/specs/SPEC-3 Agent Definitions.md +108 -0
  55. basic_memory-0.16.0/specs/SPEC-4 Notes Web UI Component Architecture.md +311 -0
  56. basic_memory-0.16.0/specs/SPEC-5 CLI Cloud Upload via WebDAV.md +201 -0
  57. basic_memory-0.16.0/specs/SPEC-6 Explicit Project Parameter Architecture.md +497 -0
  58. basic_memory-0.16.0/specs/SPEC-7 POC to spike Tigris Turso for local access to cloud data.md +324 -0
  59. basic_memory-0.16.0/specs/SPEC-8 TigrisFS Integration.md +886 -0
  60. basic_memory-0.16.0/specs/SPEC-9 Multi-Project Bidirectional Sync Architecture.md +1114 -0
  61. basic_memory-0.16.0/specs/SPEC-9 Signed Header Tenant Information.md +196 -0
  62. basic_memory-0.16.0/specs/SPEC-9-1 Follow-Ups- Conflict, Sync, and Observability.md +390 -0
  63. basic_memory-0.16.0/src/basic_memory/__init__.py +7 -0
  64. {basic_memory-0.2.11 → basic_memory-0.16.0/src/basic_memory/alembic}/alembic.ini +1 -1
  65. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/alembic/env.py +27 -3
  66. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/alembic/migrations.py +4 -9
  67. basic_memory-0.16.0/src/basic_memory/alembic/versions/502b60eaa905_remove_required_from_entity_permalink.py +51 -0
  68. basic_memory-0.16.0/src/basic_memory/alembic/versions/5fe1ab1ccebe_add_projects_table.py +108 -0
  69. basic_memory-0.16.0/src/basic_memory/alembic/versions/647e7a75e2cd_project_constraint_fix.py +104 -0
  70. basic_memory-0.16.0/src/basic_memory/alembic/versions/9d9c1cb7d8f5_add_mtime_and_size_columns_to_entity_.py +49 -0
  71. basic_memory-0.16.0/src/basic_memory/alembic/versions/a1b2c3d4e5f6_fix_project_foreign_keys.py +49 -0
  72. basic_memory-0.16.0/src/basic_memory/alembic/versions/b3c3938bacdb_relation_to_name_unique_index.py +44 -0
  73. basic_memory-0.16.0/src/basic_memory/alembic/versions/cc7172b46608_update_search_index_schema.py +100 -0
  74. basic_memory-0.16.0/src/basic_memory/alembic/versions/e7e1f4367280_add_scan_watermark_tracking_to_project.py +37 -0
  75. basic_memory-0.16.0/src/basic_memory/api/app.py +98 -0
  76. basic_memory-0.16.0/src/basic_memory/api/routers/__init__.py +11 -0
  77. basic_memory-0.16.0/src/basic_memory/api/routers/directory_router.py +84 -0
  78. basic_memory-0.16.0/src/basic_memory/api/routers/importer_router.py +152 -0
  79. basic_memory-0.16.0/src/basic_memory/api/routers/knowledge_router.py +307 -0
  80. basic_memory-0.16.0/src/basic_memory/api/routers/management_router.py +80 -0
  81. basic_memory-0.16.0/src/basic_memory/api/routers/memory_router.py +90 -0
  82. basic_memory-0.16.0/src/basic_memory/api/routers/project_router.py +406 -0
  83. basic_memory-0.16.0/src/basic_memory/api/routers/prompt_router.py +260 -0
  84. basic_memory-0.16.0/src/basic_memory/api/routers/resource_router.py +239 -0
  85. basic_memory-0.16.0/src/basic_memory/api/routers/search_router.py +36 -0
  86. basic_memory-0.16.0/src/basic_memory/api/routers/utils.py +130 -0
  87. basic_memory-0.16.0/src/basic_memory/api/template_loader.py +292 -0
  88. basic_memory-0.16.0/src/basic_memory/cli/app.py +54 -0
  89. basic_memory-0.16.0/src/basic_memory/cli/auth.py +277 -0
  90. basic_memory-0.16.0/src/basic_memory/cli/commands/__init__.py +16 -0
  91. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/__init__.py +6 -0
  92. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/api_client.py +112 -0
  93. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/bisync_commands.py +110 -0
  94. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/cloud_utils.py +101 -0
  95. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/core_commands.py +195 -0
  96. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/rclone_commands.py +299 -0
  97. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/rclone_config.py +110 -0
  98. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/rclone_installer.py +249 -0
  99. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/upload.py +233 -0
  100. basic_memory-0.16.0/src/basic_memory/cli/commands/cloud/upload_command.py +124 -0
  101. basic_memory-0.16.0/src/basic_memory/cli/commands/command_utils.py +51 -0
  102. basic_memory-0.16.0/src/basic_memory/cli/commands/db.py +44 -0
  103. basic_memory-0.16.0/src/basic_memory/cli/commands/import_chatgpt.py +83 -0
  104. basic_memory-0.16.0/src/basic_memory/cli/commands/import_claude_conversations.py +86 -0
  105. basic_memory-0.16.0/src/basic_memory/cli/commands/import_claude_projects.py +85 -0
  106. basic_memory-0.16.0/src/basic_memory/cli/commands/import_memory_json.py +86 -0
  107. basic_memory-0.16.0/src/basic_memory/cli/commands/mcp.py +94 -0
  108. basic_memory-0.16.0/src/basic_memory/cli/commands/project.py +876 -0
  109. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/cli/commands/status.py +47 -30
  110. basic_memory-0.16.0/src/basic_memory/cli/commands/tool.py +341 -0
  111. basic_memory-0.16.0/src/basic_memory/cli/main.py +21 -0
  112. basic_memory-0.16.0/src/basic_memory/config.py +516 -0
  113. basic_memory-0.16.0/src/basic_memory/db.py +312 -0
  114. basic_memory-0.16.0/src/basic_memory/deps.py +411 -0
  115. basic_memory-0.16.0/src/basic_memory/file_utils.py +269 -0
  116. basic_memory-0.16.0/src/basic_memory/ignore_utils.py +297 -0
  117. basic_memory-0.16.0/src/basic_memory/importers/__init__.py +27 -0
  118. basic_memory-0.16.0/src/basic_memory/importers/base.py +79 -0
  119. basic_memory-0.16.0/src/basic_memory/importers/chatgpt_importer.py +232 -0
  120. basic_memory-0.16.0/src/basic_memory/importers/claude_conversations_importer.py +177 -0
  121. basic_memory-0.16.0/src/basic_memory/importers/claude_projects_importer.py +148 -0
  122. basic_memory-0.16.0/src/basic_memory/importers/memory_json_importer.py +108 -0
  123. basic_memory-0.16.0/src/basic_memory/importers/utils.py +58 -0
  124. basic_memory-0.16.0/src/basic_memory/markdown/entity_parser.py +240 -0
  125. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/markdown/markdown_processor.py +3 -3
  126. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/markdown/plugins.py +39 -21
  127. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/markdown/schemas.py +1 -1
  128. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/markdown/utils.py +28 -13
  129. basic_memory-0.16.0/src/basic_memory/mcp/async_client.py +138 -0
  130. basic_memory-0.16.0/src/basic_memory/mcp/project_context.py +141 -0
  131. basic_memory-0.16.0/src/basic_memory/mcp/prompts/__init__.py +19 -0
  132. basic_memory-0.16.0/src/basic_memory/mcp/prompts/ai_assistant_guide.py +70 -0
  133. basic_memory-0.16.0/src/basic_memory/mcp/prompts/continue_conversation.py +62 -0
  134. basic_memory-0.16.0/src/basic_memory/mcp/prompts/recent_activity.py +188 -0
  135. basic_memory-0.16.0/src/basic_memory/mcp/prompts/search.py +57 -0
  136. basic_memory-0.16.0/src/basic_memory/mcp/prompts/utils.py +162 -0
  137. basic_memory-0.16.0/src/basic_memory/mcp/resources/ai_assistant_guide.md +283 -0
  138. basic_memory-0.16.0/src/basic_memory/mcp/resources/project_info.py +71 -0
  139. basic_memory-0.16.0/src/basic_memory/mcp/server.py +9 -0
  140. basic_memory-0.16.0/src/basic_memory/mcp/tools/__init__.py +48 -0
  141. basic_memory-0.16.0/src/basic_memory/mcp/tools/build_context.py +120 -0
  142. basic_memory-0.16.0/src/basic_memory/mcp/tools/canvas.py +130 -0
  143. basic_memory-0.16.0/src/basic_memory/mcp/tools/chatgpt_tools.py +187 -0
  144. basic_memory-0.16.0/src/basic_memory/mcp/tools/delete_note.py +225 -0
  145. basic_memory-0.16.0/src/basic_memory/mcp/tools/edit_note.py +320 -0
  146. basic_memory-0.16.0/src/basic_memory/mcp/tools/list_directory.py +167 -0
  147. basic_memory-0.16.0/src/basic_memory/mcp/tools/move_note.py +545 -0
  148. basic_memory-0.16.0/src/basic_memory/mcp/tools/project_management.py +200 -0
  149. basic_memory-0.16.0/src/basic_memory/mcp/tools/read_content.py +271 -0
  150. basic_memory-0.16.0/src/basic_memory/mcp/tools/read_note.py +255 -0
  151. basic_memory-0.16.0/src/basic_memory/mcp/tools/recent_activity.py +534 -0
  152. basic_memory-0.16.0/src/basic_memory/mcp/tools/search.py +384 -0
  153. basic_memory-0.16.0/src/basic_memory/mcp/tools/utils.py +512 -0
  154. basic_memory-0.16.0/src/basic_memory/mcp/tools/view_note.py +77 -0
  155. basic_memory-0.16.0/src/basic_memory/mcp/tools/write_note.py +207 -0
  156. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/models/__init__.py +3 -2
  157. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/models/knowledge.py +67 -15
  158. basic_memory-0.16.0/src/basic_memory/models/project.py +87 -0
  159. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/models/search.py +10 -6
  160. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/repository/__init__.py +2 -0
  161. basic_memory-0.16.0/src/basic_memory/repository/entity_repository.py +314 -0
  162. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/repository/observation_repository.py +35 -3
  163. basic_memory-0.16.0/src/basic_memory/repository/project_info_repository.py +10 -0
  164. basic_memory-0.16.0/src/basic_memory/repository/project_repository.py +103 -0
  165. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/repository/relation_repository.py +21 -2
  166. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/repository/repository.py +147 -29
  167. basic_memory-0.16.0/src/basic_memory/repository/search_repository.py +639 -0
  168. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/schemas/__init__.py +22 -9
  169. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/schemas/base.py +97 -8
  170. basic_memory-0.16.0/src/basic_memory/schemas/cloud.py +50 -0
  171. basic_memory-0.16.0/src/basic_memory/schemas/directory.py +30 -0
  172. basic_memory-0.16.0/src/basic_memory/schemas/importer.py +35 -0
  173. basic_memory-0.16.0/src/basic_memory/schemas/memory.py +278 -0
  174. basic_memory-0.16.0/src/basic_memory/schemas/project_info.py +211 -0
  175. basic_memory-0.16.0/src/basic_memory/schemas/prompt.py +90 -0
  176. basic_memory-0.16.0/src/basic_memory/schemas/request.py +112 -0
  177. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/schemas/response.py +9 -1
  178. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/schemas/search.py +33 -35
  179. basic_memory-0.16.0/src/basic_memory/schemas/sync_report.py +72 -0
  180. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/services/__init__.py +2 -1
  181. basic_memory-0.16.0/src/basic_memory/services/context_service.py +425 -0
  182. basic_memory-0.16.0/src/basic_memory/services/directory_service.py +295 -0
  183. basic_memory-0.16.0/src/basic_memory/services/entity_service.py +829 -0
  184. basic_memory-0.16.0/src/basic_memory/services/exceptions.py +37 -0
  185. basic_memory-0.16.0/src/basic_memory/services/file_service.py +430 -0
  186. basic_memory-0.16.0/src/basic_memory/services/initialization.py +191 -0
  187. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/services/link_resolver.py +50 -56
  188. basic_memory-0.16.0/src/basic_memory/services/project_service.py +863 -0
  189. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/services/search_service.py +172 -34
  190. basic_memory-0.16.0/src/basic_memory/sync/__init__.py +6 -0
  191. basic_memory-0.16.0/src/basic_memory/sync/background_sync.py +26 -0
  192. basic_memory-0.16.0/src/basic_memory/sync/sync_service.py +1245 -0
  193. basic_memory-0.16.0/src/basic_memory/sync/watch_service.py +495 -0
  194. basic_memory-0.16.0/src/basic_memory/templates/prompts/continue_conversation.hbs +110 -0
  195. basic_memory-0.16.0/src/basic_memory/templates/prompts/search.hbs +101 -0
  196. basic_memory-0.16.0/src/basic_memory/utils.py +447 -0
  197. basic_memory-0.16.0/test-int/BENCHMARKS.md +139 -0
  198. basic_memory-0.16.0/test-int/cli/test_project_commands_integration.py +121 -0
  199. basic_memory-0.16.0/test-int/cli/test_version_integration.py +15 -0
  200. basic_memory-0.16.0/test-int/conftest.py +220 -0
  201. basic_memory-0.16.0/test-int/mcp/test_build_context_underscore.py +171 -0
  202. basic_memory-0.16.0/test-int/mcp/test_build_context_validation.py +188 -0
  203. basic_memory-0.16.0/test-int/mcp/test_chatgpt_tools_integration.py +455 -0
  204. basic_memory-0.16.0/test-int/mcp/test_default_project_mode_integration.py +367 -0
  205. basic_memory-0.16.0/test-int/mcp/test_delete_note_integration.py +455 -0
  206. basic_memory-0.16.0/test-int/mcp/test_edit_note_integration.py +639 -0
  207. basic_memory-0.16.0/test-int/mcp/test_list_directory_integration.py +578 -0
  208. basic_memory-0.16.0/test-int/mcp/test_move_note_integration.py +641 -0
  209. basic_memory-0.16.0/test-int/mcp/test_project_management_integration.py +553 -0
  210. basic_memory-0.16.0/test-int/mcp/test_project_state_sync_integration.py +82 -0
  211. basic_memory-0.16.0/test-int/mcp/test_read_content_integration.py +384 -0
  212. basic_memory-0.16.0/test-int/mcp/test_read_note_integration.py +48 -0
  213. basic_memory-0.16.0/test-int/mcp/test_search_integration.py +501 -0
  214. basic_memory-0.16.0/test-int/mcp/test_single_project_mcp_integration.py +340 -0
  215. basic_memory-0.16.0/test-int/mcp/test_write_note_integration.py +492 -0
  216. basic_memory-0.16.0/test-int/test_db_wal_mode.py +143 -0
  217. basic_memory-0.16.0/test-int/test_disable_permalinks_integration.py +141 -0
  218. basic_memory-0.16.0/test-int/test_sync_performance_benchmark.py +369 -0
  219. basic_memory-0.16.0/tests/Non-MarkdownFileSupport.pdf +0 -0
  220. basic_memory-0.16.0/tests/Screenshot.png +0 -0
  221. basic_memory-0.16.0/tests/__init__.py +4 -0
  222. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/api/conftest.py +17 -3
  223. basic_memory-0.16.0/tests/api/test_async_client.py +52 -0
  224. basic_memory-0.16.0/tests/api/test_continue_conversation_template.py +142 -0
  225. basic_memory-0.16.0/tests/api/test_directory_router.py +412 -0
  226. basic_memory-0.16.0/tests/api/test_importer_router.py +465 -0
  227. basic_memory-0.16.0/tests/api/test_knowledge_router.py +1325 -0
  228. basic_memory-0.16.0/tests/api/test_management_router.py +211 -0
  229. basic_memory-0.16.0/tests/api/test_memory_router.py +146 -0
  230. basic_memory-0.16.0/tests/api/test_project_router.py +841 -0
  231. basic_memory-0.16.0/tests/api/test_project_router_operations.py +55 -0
  232. basic_memory-0.16.0/tests/api/test_prompt_router.py +155 -0
  233. basic_memory-0.16.0/tests/api/test_relation_background_resolution.py +40 -0
  234. basic_memory-0.16.0/tests/api/test_resource_router.py +450 -0
  235. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/api/test_search_router.py +37 -43
  236. basic_memory-0.16.0/tests/api/test_search_template.py +158 -0
  237. basic_memory-0.16.0/tests/api/test_template_loader.py +219 -0
  238. basic_memory-0.16.0/tests/api/test_template_loader_helpers.py +203 -0
  239. basic_memory-0.16.0/tests/cli/conftest.py +32 -0
  240. basic_memory-0.16.0/tests/cli/test_cli_tools.py +492 -0
  241. basic_memory-0.16.0/tests/cli/test_cloud_authentication.py +239 -0
  242. basic_memory-0.16.0/tests/cli/test_ignore_utils.py +315 -0
  243. basic_memory-0.16.0/tests/cli/test_import_chatgpt.py +199 -0
  244. basic_memory-0.16.0/tests/cli/test_import_claude_conversations.py +203 -0
  245. basic_memory-0.16.0/tests/cli/test_import_claude_projects.py +142 -0
  246. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/cli/test_import_memory_json.py +50 -29
  247. basic_memory-0.16.0/tests/cli/test_project_add_with_local_path.py +149 -0
  248. basic_memory-0.16.0/tests/cli/test_upload.py +512 -0
  249. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/conftest.py +205 -71
  250. basic_memory-0.16.0/tests/db/test_issue_254_foreign_key_constraints.py +170 -0
  251. basic_memory-0.16.0/tests/importers/test_importer_base.py +130 -0
  252. basic_memory-0.16.0/tests/importers/test_importer_utils.py +57 -0
  253. basic_memory-0.16.0/tests/markdown/test_date_frontmatter_parsing.py +236 -0
  254. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/test_entity_parser.py +39 -8
  255. basic_memory-0.16.0/tests/markdown/test_entity_parser_error_handling.py +293 -0
  256. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/test_markdown_plugins.py +46 -0
  257. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/test_markdown_processor.py +5 -5
  258. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/mcp/conftest.py +9 -8
  259. basic_memory-0.16.0/tests/mcp/test_obsidian_yaml_formatting.py +189 -0
  260. basic_memory-0.16.0/tests/mcp/test_permalink_collision_file_overwrite.py +385 -0
  261. basic_memory-0.16.0/tests/mcp/test_prompts.py +180 -0
  262. basic_memory-0.16.0/tests/mcp/test_resources.py +19 -0
  263. basic_memory-0.16.0/tests/mcp/test_tool_build_context.py +144 -0
  264. basic_memory-0.16.0/tests/mcp/test_tool_canvas.py +287 -0
  265. basic_memory-0.16.0/tests/mcp/test_tool_delete_note.py +98 -0
  266. basic_memory-0.16.0/tests/mcp/test_tool_edit_note.py +458 -0
  267. basic_memory-0.16.0/tests/mcp/test_tool_list_directory.py +223 -0
  268. basic_memory-0.16.0/tests/mcp/test_tool_move_note.py +922 -0
  269. basic_memory-0.16.0/tests/mcp/test_tool_read_content.py +464 -0
  270. basic_memory-0.16.0/tests/mcp/test_tool_read_note.py +487 -0
  271. basic_memory-0.16.0/tests/mcp/test_tool_recent_activity.py +135 -0
  272. basic_memory-0.16.0/tests/mcp/test_tool_resource.py +227 -0
  273. basic_memory-0.16.0/tests/mcp/test_tool_search.py +317 -0
  274. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/mcp/test_tool_utils.py +52 -8
  275. basic_memory-0.16.0/tests/mcp/test_tool_view_note.py +281 -0
  276. basic_memory-0.16.0/tests/mcp/test_tool_write_note.py +1138 -0
  277. basic_memory-0.16.0/tests/mcp/tools/test_chatgpt_tools.py +228 -0
  278. basic_memory-0.16.0/tests/repository/test_entity_repository.py +812 -0
  279. basic_memory-0.16.0/tests/repository/test_entity_repository_upsert.py +468 -0
  280. basic_memory-0.16.0/tests/repository/test_entity_upsert_issue_187.py +132 -0
  281. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/repository/test_observation_repository.py +21 -7
  282. basic_memory-0.16.0/tests/repository/test_project_info_repository.py +36 -0
  283. basic_memory-0.16.0/tests/repository/test_project_repository.py +297 -0
  284. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/repository/test_relation_repository.py +5 -3
  285. basic_memory-0.16.0/tests/repository/test_search_repository.py +599 -0
  286. basic_memory-0.16.0/tests/repository/test_search_repository_edit_bug_fix.py +270 -0
  287. basic_memory-0.16.0/tests/schemas/test_base_timeframe_minimum.py +104 -0
  288. basic_memory-0.16.0/tests/schemas/test_memory_serialization.py +239 -0
  289. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/schemas/test_memory_url.py +21 -1
  290. basic_memory-0.16.0/tests/schemas/test_memory_url_validation.py +274 -0
  291. basic_memory-0.16.0/tests/schemas/test_schemas.py +468 -0
  292. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/schemas/test_search.py +20 -27
  293. basic_memory-0.16.0/tests/services/test_context_service.py +320 -0
  294. basic_memory-0.16.0/tests/services/test_directory_service.py +258 -0
  295. basic_memory-0.16.0/tests/services/test_entity_service.py +1941 -0
  296. basic_memory-0.16.0/tests/services/test_entity_service_disable_permalinks.py +220 -0
  297. basic_memory-0.16.0/tests/services/test_initialization.py +180 -0
  298. basic_memory-0.16.0/tests/services/test_link_resolver.py +358 -0
  299. basic_memory-0.16.0/tests/services/test_project_removal_bug.py +138 -0
  300. basic_memory-0.16.0/tests/services/test_project_service.py +1357 -0
  301. basic_memory-0.16.0/tests/services/test_project_service_operations.py +111 -0
  302. basic_memory-0.16.0/tests/services/test_search_service.py +743 -0
  303. basic_memory-0.16.0/tests/sync/test_character_conflicts.py +343 -0
  304. basic_memory-0.16.0/tests/sync/test_sync_service.py +1973 -0
  305. basic_memory-0.16.0/tests/sync/test_sync_service_incremental.py +790 -0
  306. basic_memory-0.16.0/tests/sync/test_sync_wikilink_issue.py +83 -0
  307. basic_memory-0.16.0/tests/sync/test_tmp_files.py +162 -0
  308. basic_memory-0.16.0/tests/sync/test_watch_service.py +532 -0
  309. basic_memory-0.16.0/tests/sync/test_watch_service_edge_cases.py +281 -0
  310. basic_memory-0.16.0/tests/sync/test_watch_service_reload.py +252 -0
  311. basic_memory-0.16.0/tests/test_config.py +369 -0
  312. basic_memory-0.16.0/tests/test_db_migration_deduplication.py +185 -0
  313. basic_memory-0.16.0/tests/test_deps.py +206 -0
  314. basic_memory-0.16.0/tests/test_production_cascade_delete.py +353 -0
  315. basic_memory-0.16.0/tests/test_rclone_commands.py +353 -0
  316. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/utils/test_file_utils.py +58 -85
  317. basic_memory-0.16.0/tests/utils/test_frontmatter_obsidian_compatible.py +280 -0
  318. basic_memory-0.16.0/tests/utils/test_parse_tags.py +68 -0
  319. basic_memory-0.16.0/tests/utils/test_permalink_formatting.py +123 -0
  320. basic_memory-0.16.0/tests/utils/test_utf8_handling.py +197 -0
  321. basic_memory-0.16.0/tests/utils/test_validate_project_path.py +413 -0
  322. basic_memory-0.16.0/uv.lock +2295 -0
  323. basic_memory-0.16.0/v0.15.0-RELEASE-DOCS.md +161 -0
  324. basic_memory-0.16.0/v15-docs/README.md +61 -0
  325. basic_memory-0.16.0/v15-docs/api-performance.md +585 -0
  326. basic_memory-0.16.0/v15-docs/background-relations.md +531 -0
  327. basic_memory-0.16.0/v15-docs/basic-memory-home.md +371 -0
  328. basic_memory-0.16.0/v15-docs/bug-fixes.md +395 -0
  329. basic_memory-0.16.0/v15-docs/chatgpt-integration.md +648 -0
  330. basic_memory-0.16.0/v15-docs/cloud-authentication.md +381 -0
  331. basic_memory-0.16.0/v15-docs/cloud-bisync.md +531 -0
  332. basic_memory-0.16.0/v15-docs/cloud-mode-usage.md +546 -0
  333. basic_memory-0.16.0/v15-docs/cloud-mount.md +501 -0
  334. basic_memory-0.16.0/v15-docs/default-project-mode.md +425 -0
  335. basic_memory-0.16.0/v15-docs/env-file-removal.md +434 -0
  336. basic_memory-0.16.0/v15-docs/env-var-overrides.md +449 -0
  337. basic_memory-0.16.0/v15-docs/explicit-project-parameter.md +198 -0
  338. basic_memory-0.16.0/v15-docs/gitignore-integration.md +621 -0
  339. basic_memory-0.16.0/v15-docs/project-root-env-var.md +424 -0
  340. basic_memory-0.16.0/v15-docs/sqlite-performance.md +512 -0
  341. basic_memory-0.2.11/.github/workflows/release.yml +0 -97
  342. basic_memory-0.2.11/.github/workflows/test.yml +0 -47
  343. basic_memory-0.2.11/CHANGELOG.md +0 -172
  344. basic_memory-0.2.11/CONTRIBUTING.md +0 -17
  345. basic_memory-0.2.11/Makefile +0 -42
  346. basic_memory-0.2.11/PKG-INFO +0 -291
  347. basic_memory-0.2.11/README.md +0 -258
  348. basic_memory-0.2.11/basic-memory.md +0 -1419
  349. basic_memory-0.2.11/installer/Basic.icns +0 -0
  350. basic_memory-0.2.11/installer/README.md +0 -16
  351. basic_memory-0.2.11/installer/icon.svg +0 -64
  352. basic_memory-0.2.11/installer/installer.py +0 -89
  353. basic_memory-0.2.11/installer/make_icons.sh +0 -27
  354. basic_memory-0.2.11/installer/setup.py +0 -50
  355. basic_memory-0.2.11/memory.json +0 -378
  356. basic_memory-0.2.11/pyproject.toml +0 -100
  357. basic_memory-0.2.11/scripts/install.sh +0 -36
  358. basic_memory-0.2.11/src/basic_memory/__init__.py +0 -3
  359. basic_memory-0.2.11/src/basic_memory/alembic/README +0 -1
  360. basic_memory-0.2.11/src/basic_memory/api/app.py +0 -66
  361. basic_memory-0.2.11/src/basic_memory/api/routers/__init__.py +0 -8
  362. basic_memory-0.2.11/src/basic_memory/api/routers/knowledge_router.py +0 -170
  363. basic_memory-0.2.11/src/basic_memory/api/routers/memory_router.py +0 -129
  364. basic_memory-0.2.11/src/basic_memory/api/routers/resource_router.py +0 -34
  365. basic_memory-0.2.11/src/basic_memory/api/routers/search_router.py +0 -28
  366. basic_memory-0.2.11/src/basic_memory/cli/app.py +0 -3
  367. basic_memory-0.2.11/src/basic_memory/cli/commands/__init__.py +0 -5
  368. basic_memory-0.2.11/src/basic_memory/cli/commands/db.py +0 -25
  369. basic_memory-0.2.11/src/basic_memory/cli/commands/import_memory_json.py +0 -143
  370. basic_memory-0.2.11/src/basic_memory/cli/commands/mcp.py +0 -20
  371. basic_memory-0.2.11/src/basic_memory/cli/commands/sync.py +0 -203
  372. basic_memory-0.2.11/src/basic_memory/cli/main.py +0 -14
  373. basic_memory-0.2.11/src/basic_memory/config.py +0 -57
  374. basic_memory-0.2.11/src/basic_memory/db.py +0 -152
  375. basic_memory-0.2.11/src/basic_memory/deps.py +0 -181
  376. basic_memory-0.2.11/src/basic_memory/file_utils.py +0 -214
  377. basic_memory-0.2.11/src/basic_memory/markdown/entity_parser.py +0 -120
  378. basic_memory-0.2.11/src/basic_memory/mcp/async_client.py +0 -8
  379. basic_memory-0.2.11/src/basic_memory/mcp/server.py +0 -15
  380. basic_memory-0.2.11/src/basic_memory/mcp/tools/__init__.py +0 -36
  381. basic_memory-0.2.11/src/basic_memory/mcp/tools/knowledge.py +0 -56
  382. basic_memory-0.2.11/src/basic_memory/mcp/tools/memory.py +0 -151
  383. basic_memory-0.2.11/src/basic_memory/mcp/tools/notes.py +0 -122
  384. basic_memory-0.2.11/src/basic_memory/mcp/tools/search.py +0 -29
  385. basic_memory-0.2.11/src/basic_memory/mcp/tools/utils.py +0 -154
  386. basic_memory-0.2.11/src/basic_memory/repository/entity_repository.py +0 -92
  387. basic_memory-0.2.11/src/basic_memory/repository/search_repository.py +0 -261
  388. basic_memory-0.2.11/src/basic_memory/schemas/discovery.py +0 -28
  389. basic_memory-0.2.11/src/basic_memory/schemas/memory.py +0 -113
  390. basic_memory-0.2.11/src/basic_memory/schemas/request.py +0 -58
  391. basic_memory-0.2.11/src/basic_memory/services/context_service.py +0 -280
  392. basic_memory-0.2.11/src/basic_memory/services/entity_service.py +0 -294
  393. basic_memory-0.2.11/src/basic_memory/services/exceptions.py +0 -16
  394. basic_memory-0.2.11/src/basic_memory/services/file_service.py +0 -176
  395. basic_memory-0.2.11/src/basic_memory/sync/__init__.py +0 -5
  396. basic_memory-0.2.11/src/basic_memory/sync/file_change_scanner.py +0 -158
  397. basic_memory-0.2.11/src/basic_memory/sync/sync_service.py +0 -165
  398. basic_memory-0.2.11/src/basic_memory/sync/utils.py +0 -34
  399. basic_memory-0.2.11/src/basic_memory/sync/watch_service.py +0 -218
  400. basic_memory-0.2.11/src/basic_memory/utils.py +0 -87
  401. basic_memory-0.2.11/tests/api/test_knowledge_router.py +0 -482
  402. basic_memory-0.2.11/tests/api/test_memory_router.py +0 -106
  403. basic_memory-0.2.11/tests/api/test_resource_router.py +0 -91
  404. basic_memory-0.2.11/tests/cli/test_status.py +0 -160
  405. basic_memory-0.2.11/tests/cli/test_sync.py +0 -109
  406. basic_memory-0.2.11/tests/edit_file_test.py +0 -19
  407. basic_memory-0.2.11/tests/mcp/test_tool_get_entity.py +0 -45
  408. basic_memory-0.2.11/tests/mcp/test_tool_knowledge.py +0 -87
  409. basic_memory-0.2.11/tests/mcp/test_tool_memory.py +0 -147
  410. basic_memory-0.2.11/tests/mcp/test_tool_notes.py +0 -238
  411. basic_memory-0.2.11/tests/mcp/test_tool_search.py +0 -65
  412. basic_memory-0.2.11/tests/repository/test_entity_repository.py +0 -408
  413. basic_memory-0.2.11/tests/schemas/test_schemas.py +0 -178
  414. basic_memory-0.2.11/tests/services/test_context_service.py +0 -159
  415. basic_memory-0.2.11/tests/services/test_entity_service.py +0 -504
  416. basic_memory-0.2.11/tests/services/test_link_resolver.py +0 -144
  417. basic_memory-0.2.11/tests/services/test_search_service.py +0 -185
  418. basic_memory-0.2.11/tests/sync/test_file_change_scanner.py +0 -245
  419. basic_memory-0.2.11/tests/sync/test_sync_service.py +0 -840
  420. basic_memory-0.2.11/tests/sync/test_watch_service.py +0 -121
  421. basic_memory-0.2.11/tests/test_basic_memory.py +0 -8
  422. basic_memory-0.2.11/tests/utils/test_permalink_formatting.py +0 -67
  423. basic_memory-0.2.11/uv.lock +0 -1410
  424. {basic_memory-0.2.11 → basic_memory-0.16.0}/.github/workflows/pr-title.yml +0 -0
  425. {basic_memory-0.2.11 → basic_memory-0.16.0}/.python-version +0 -0
  426. {basic_memory-0.2.11 → basic_memory-0.16.0}/CITATION.cff +0 -0
  427. {basic_memory-0.2.11 → basic_memory-0.16.0}/CODE_OF_CONDUCT.md +0 -0
  428. {basic_memory-0.2.11 → basic_memory-0.16.0}/LICENSE +0 -0
  429. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/alembic/script.py.mako +0 -0
  430. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/alembic/versions/3dae7c7b1564_initial_schema.py +0 -0
  431. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/api/__init__.py +0 -0
  432. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/cli/__init__.py +0 -0
  433. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/markdown/__init__.py +0 -0
  434. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/mcp/__init__.py +0 -0
  435. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/models/base.py +0 -0
  436. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/schemas/delete.py +0 -0
  437. {basic_memory-0.2.11 → basic_memory-0.16.0}/src/basic_memory/services/service.py +0 -0
  438. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/__init__.py +0 -0
  439. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/test_observation_edge_cases.py +0 -0
  440. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/test_parser_edge_cases.py +0 -0
  441. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/test_relation_edge_cases.py +0 -0
  442. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/markdown/test_task_detection.py +0 -0
  443. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/repository/test_repository.py +0 -0
  444. {basic_memory-0.2.11 → basic_memory-0.16.0}/tests/services/test_file_service.py +0 -0
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: python-developer
3
+ description: Python backend developer specializing in FastAPI, DBOS workflows, and API implementation. Implements specifications into working Python services and follows modern Python best practices.
4
+ model: sonnet
5
+ color: red
6
+ ---
7
+
8
+ You are an expert Python developer specializing in implementing specifications into working Python services and APIs. You have deep expertise in Python language features, FastAPI, DBOS workflows, database operations, and the Basic Memory Cloud backend architecture.
9
+
10
+ **Primary Role: Backend Implementation Agent**
11
+ You implement specifications into working Python code and services. You read specs from basic-memory, implement the requirements using modern Python patterns, and update specs with implementation progress and decisions.
12
+
13
+ **Core Responsibilities:**
14
+
15
+ **Specification Implementation:**
16
+ - Read specs using basic-memory MCP tools to understand backend requirements
17
+ - Implement Python services, APIs, and workflows that fulfill spec requirements
18
+ - Update specs with implementation progress, decisions, and completion status
19
+ - Document any architectural decisions or modifications needed during implementation
20
+
21
+ **Python/FastAPI Development:**
22
+ - Create FastAPI applications with proper middleware and dependency injection
23
+ - Implement DBOS workflows for durable, long-running operations
24
+ - Design database schemas and implement repository patterns
25
+ - Handle authentication, authorization, and security requirements
26
+ - Implement async/await patterns for optimal performance
27
+
28
+ **Backend Implementation Process:**
29
+ 1. **Read Spec**: Use `mcp__basic-memory__read_note` to get spec requirements
30
+ 2. **Analyze Existing Patterns**: Study codebase architecture and established patterns before implementing
31
+ 3. **Follow Modular Structure**: Create separate modules/routers following existing conventions
32
+ 4. **Implement**: Write Python code following spec requirements and codebase patterns
33
+ 5. **Test**: Create tests that validate spec success criteria
34
+ 6. **Update Spec**: Document completion and any implementation decisions
35
+ 7. **Validate**: Run tests and ensure integration works correctly
36
+
37
+ **Technical Standards:**
38
+ - Follow PEP 8 and modern Python conventions
39
+ - Use type hints throughout the codebase
40
+ - Implement proper error handling and logging
41
+ - Use async/await for all database and external service calls
42
+ - Write comprehensive tests using pytest
43
+ - Follow security best practices for web APIs
44
+ - Document functions and classes with clear docstrings
45
+
46
+ **Codebase Architecture Patterns:**
47
+
48
+ **CLI Structure Patterns:**
49
+ - Follow existing modular CLI pattern: create separate CLI modules (e.g., `upload_cli.py`) instead of adding commands directly to `main.py`
50
+ - Existing examples: `polar_cli.py`, `tenant_cli.py` in `apps/cloud/src/basic_memory_cloud/cli/`
51
+ - Register new CLI modules using `app.add_typer(new_cli, name="command", help="description")`
52
+ - Maintain consistent command structure and help text patterns
53
+
54
+ **FastAPI Router Patterns:**
55
+ - Create dedicated routers for logical endpoint groups instead of adding routes directly to main app
56
+ - Place routers in dedicated files (e.g., `apps/api/src/basic_memory_cloud_api/routers/webdav_router.py`)
57
+ - Follow existing middleware and dependency injection patterns
58
+ - Register routers using `app.include_router(router, prefix="/api-path")`
59
+
60
+ **Modular Organization:**
61
+ - Always analyze existing codebase structure before implementing new features
62
+ - Follow established file organization and naming conventions
63
+ - Create separate modules for distinct functionality areas
64
+ - Maintain consistency with existing architectural decisions
65
+ - Preserve separation of concerns across service boundaries
66
+
67
+ **Pattern Analysis Process:**
68
+ 1. Examine similar existing functionality in the codebase
69
+ 2. Identify established patterns for file organization and module structure
70
+ 3. Follow the same architectural approach for consistency
71
+ 4. Create new modules/routers following existing conventions
72
+ 5. Integrate new code using established registration patterns
73
+
74
+ **Basic Memory Cloud Expertise:**
75
+
76
+ **FastAPI Service Patterns:**
77
+ - Multi-app architecture (Cloud, MCP, API services)
78
+ - Shared middleware for JWT validation, CORS, logging
79
+ - Dependency injection for services and repositories
80
+ - Proper async request handling and error responses
81
+
82
+ **DBOS Workflow Implementation:**
83
+ - Durable workflows for tenant provisioning and infrastructure operations
84
+ - Service layer pattern with repository data access
85
+ - Event sourcing for audit trails and business processes
86
+ - Idempotent operations with proper error handling
87
+
88
+ **Database & Repository Patterns:**
89
+ - SQLAlchemy with async patterns
90
+ - Repository pattern for data access abstraction
91
+ - Database migration strategies
92
+ - Multi-tenant data isolation patterns
93
+
94
+ **Authentication & Security:**
95
+ - JWT token validation and middleware
96
+ - OAuth 2.1 flow implementation
97
+ - Tenant-specific authorization patterns
98
+ - Secure API design and input validation
99
+
100
+ **Code Quality Standards:**
101
+ - Clear, descriptive variable and function names
102
+ - Proper docstrings for functions and classes
103
+ - Handle edge cases and error conditions gracefully
104
+ - Use context managers for resource management
105
+ - Apply composition over inheritance
106
+ - Consider security implications for all API endpoints
107
+ - Optimize for performance while maintaining readability
108
+
109
+ **Testing & Validation:**
110
+ - Write pytest tests that validate spec requirements
111
+ - Include unit tests for business logic
112
+ - Integration tests for API endpoints
113
+ - Test error conditions and edge cases
114
+ - Use fixtures for consistent test setup
115
+ - Mock external dependencies appropriately
116
+
117
+ **Debugging & Problem Solving:**
118
+ - Analyze error messages and stack traces methodically
119
+ - Identify root causes rather than applying quick fixes
120
+ - Use logging effectively for troubleshooting
121
+ - Apply systematic debugging approaches
122
+ - Document solutions for future reference
123
+
124
+ **Basic Memory Integration:**
125
+ - Use `mcp__basic-memory__read_note` to read specifications
126
+ - Use `mcp__basic-memory__edit_note` to update specs with progress
127
+ - Document implementation patterns and decisions
128
+ - Link related services and database schemas
129
+ - Maintain implementation history and troubleshooting guides
130
+
131
+ **Communication Style:**
132
+ - Focus on concrete implementation results and working code
133
+ - Document technical decisions and trade-offs clearly
134
+ - Ask specific questions about requirements and constraints
135
+ - Provide clear status updates on implementation progress
136
+ - Explain code choices and architectural patterns
137
+
138
+ **Deliverables:**
139
+ - Working Python services that meet spec requirements
140
+ - Updated specifications with implementation status
141
+ - Comprehensive tests validating functionality
142
+ - Clean, maintainable, type-safe Python code
143
+ - Proper error handling and logging
144
+ - Database migrations and schema updates
145
+
146
+ **Key Principles:**
147
+ - Implement specifications faithfully and completely
148
+ - Write clean, efficient, and maintainable Python code
149
+ - Follow established patterns and conventions
150
+ - Apply proper error handling and security practices
151
+ - Test thoroughly and document implementation decisions
152
+ - Balance performance with code clarity and maintainability
153
+
154
+ When handed a specification via `/spec implement`, you will read the spec, understand the requirements, implement the Python solution using appropriate patterns and frameworks, create tests to validate functionality, and update the spec with completion status and any implementation notes.
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: system-architect
3
+ description: System architect who designs and implements architectural solutions, creates ADRs, and applies software engineering principles to solve complex system design problems.
4
+ model: sonnet
5
+ color: blue
6
+ ---
7
+
8
+ You are a Senior System Architect who designs and implements architectural solutions for complex software systems. You have deep expertise in software engineering principles, system design, multi-tenant SaaS architecture, and the Basic Memory Cloud platform.
9
+
10
+ **Primary Role: Architectural Implementation Agent**
11
+ You design system architecture and implement architectural decisions through code, configuration, and documentation. You read specs from basic-memory, create architectural solutions, and update specs with implementation progress.
12
+
13
+ **Core Responsibilities:**
14
+
15
+ **Specification Implementation:**
16
+ - Read architectural specs using basic-memory MCP tools
17
+ - Design and implement system architecture solutions
18
+ - Create code scaffolding, service structure, and system interfaces
19
+ - Update specs with architectural decisions and implementation status
20
+ - Document ADRs (Architectural Decision Records) for significant choices
21
+
22
+ **Architectural Design & Implementation:**
23
+ - Design multi-service system architectures
24
+ - Implement service boundaries and communication patterns
25
+ - Create database schemas and migration strategies
26
+ - Design authentication and authorization systems
27
+ - Implement infrastructure-as-code patterns
28
+
29
+ **System Implementation Process:**
30
+ 1. **Read Spec**: Use `mcp__basic-memory__read_note` to understand architectural requirements
31
+ 2. **Design Solution**: Apply architectural principles and patterns
32
+ 3. **Implement Structure**: Create service scaffolding, interfaces, configurations
33
+ 4. **Document Decisions**: Create ADRs documenting architectural choices
34
+ 5. **Update Spec**: Record implementation progress and decisions
35
+ 6. **Validate**: Ensure implementation meets spec success criteria
36
+
37
+ **Architectural Principles Applied:**
38
+ - DRY (Don't Repeat Yourself) - Single sources of truth
39
+ - KISS (Keep It Simple Stupid) - Favor simplicity over cleverness
40
+ - YAGNI (You Aren't Gonna Need It) - Build only what's needed now
41
+ - Principle of Least Astonishment - Intuitive system behavior
42
+ - Separation of Concerns - Clear boundaries and responsibilities
43
+
44
+ **Basic Memory Cloud Expertise:**
45
+
46
+ **Multi-Service Architecture:**
47
+ - **Cloud Service**: Tenant management, OAuth 2.1, DBOS workflows
48
+ - **MCP Gateway**: JWT validation, tenant routing, MCP proxy
49
+ - **Web App**: Vue.js frontend, OAuth flows, user interface
50
+ - **API Service**: Per-tenant Basic Memory instances with MCP
51
+
52
+ **Multi-Tenant SaaS Patterns:**
53
+ - **Tenant Isolation**: Infrastructure-level isolation with dedicated instances
54
+ - **Database-per-tenant**: Isolated PostgreSQL databases
55
+ - **Authentication**: JWT tokens with tenant-specific claims
56
+ - **Provisioning**: DBOS workflows for durable operations
57
+ - **Resource Management**: Fly.io machine lifecycle management
58
+
59
+ **Implementation Capabilities:**
60
+ - FastAPI service structure and middleware
61
+ - DBOS workflow implementation
62
+ - Database schema design and migrations
63
+ - JWT authentication and authorization
64
+ - Fly.io deployment configuration
65
+ - Service communication patterns
66
+
67
+ **Technical Implementation:**
68
+ - Create service scaffolding and project structure
69
+ - Implement authentication and authorization middleware
70
+ - Design database schemas and relationships
71
+ - Configure deployment and infrastructure
72
+ - Implement monitoring and health checks
73
+ - Create API interfaces and contracts
74
+
75
+ **Code Quality Standards:**
76
+ - Follow established patterns and conventions
77
+ - Implement proper error handling and logging
78
+ - Design for scalability and maintainability
79
+ - Apply security best practices
80
+ - Create comprehensive tests for architectural components
81
+ - Document system behavior and interfaces
82
+
83
+ **Decision Documentation:**
84
+ - Create ADRs for significant architectural choices
85
+ - Document trade-offs and alternative approaches considered
86
+ - Maintain decision history and rationale
87
+ - Link architectural decisions to implementation code
88
+ - Update decisions when new information becomes available
89
+
90
+ **Basic Memory Integration:**
91
+ - Use `mcp__basic-memory__read_note` to read architectural specs
92
+ - Use `mcp__basic-memory__write_note` to create ADRs and architectural documentation
93
+ - Use `mcp__basic-memory__edit_note` to update specs with implementation progress
94
+ - Document architectural patterns and anti-patterns for reuse
95
+ - Maintain searchable knowledge base of system design decisions
96
+
97
+ **Communication Style:**
98
+ - Focus on implemented solutions and concrete architectural artifacts
99
+ - Document decisions with clear rationale and trade-offs
100
+ - Provide specific implementation guidance and code examples
101
+ - Ask targeted questions about requirements and constraints
102
+ - Explain architectural choices in terms of business and technical impact
103
+
104
+ **Deliverables:**
105
+ - Working system architecture implementations
106
+ - ADRs documenting architectural decisions
107
+ - Service scaffolding and interface definitions
108
+ - Database schemas and migration scripts
109
+ - Configuration and deployment artifacts
110
+ - Updated specifications with implementation status
111
+
112
+ **Anti-Patterns to Avoid:**
113
+ - Premature optimization over correctness
114
+ - Over-engineering for current needs
115
+ - Building without clear requirements
116
+ - Creating multiple sources of truth
117
+ - Implementing solutions without understanding root causes
118
+
119
+ **Key Principles:**
120
+ - Implement architectural decisions through working code
121
+ - Document all significant decisions and trade-offs
122
+ - Build systems that teams can understand and maintain
123
+ - Apply proven patterns and avoid reinventing solutions
124
+ - Balance current needs with long-term maintainability
125
+
126
+ When handed an architectural specification via `/spec implement`, you will read the spec, design the solution applying architectural principles, implement the necessary code and configuration, document decisions through ADRs, and update the spec with completion status and architectural notes.
@@ -0,0 +1,95 @@
1
+ # /beta - Create Beta Release
2
+
3
+ Create a new beta release using the automated justfile target with quality checks and tagging.
4
+
5
+ ## Usage
6
+ ```
7
+ /beta <version>
8
+ ```
9
+
10
+ **Parameters:**
11
+ - `version` (required): Beta version like `v0.13.2b1` or `v0.13.2rc1`
12
+
13
+ ## Implementation
14
+
15
+ You are an expert release manager for the Basic Memory project. When the user runs `/beta`, execute the following steps:
16
+
17
+ ### Step 1: Pre-flight Validation
18
+ 1. Verify version format matches `v\d+\.\d+\.\d+(b\d+|rc\d+)` pattern
19
+ 2. Check current git status for uncommitted changes
20
+ 3. Verify we're on the `main` branch
21
+ 4. Confirm no existing tag with this version
22
+
23
+ ### Step 2: Use Justfile Automation
24
+ Execute the automated beta release process:
25
+ ```bash
26
+ just beta <version>
27
+ ```
28
+
29
+ The justfile target handles:
30
+ - ✅ Beta version format validation (supports b1, b2, rc1, etc.)
31
+ - ✅ Git status and branch checks
32
+ - ✅ Quality checks (`just check` - lint, format, type-check, tests)
33
+ - ✅ Version update in `src/basic_memory/__init__.py`
34
+ - ✅ Automatic commit with proper message
35
+ - ✅ Tag creation and pushing to GitHub
36
+ - ✅ Beta release workflow trigger
37
+
38
+ ### Step 3: Monitor Beta Release
39
+ 1. Check GitHub Actions workflow starts successfully
40
+ 2. Monitor workflow at: https://github.com/basicmachines-co/basic-memory/actions
41
+ 3. Verify PyPI pre-release publication
42
+ 4. Test beta installation: `uv tool install basic-memory --pre`
43
+
44
+ ### Step 4: Beta Testing Instructions
45
+ Provide users with beta testing instructions:
46
+
47
+ ```bash
48
+ # Install/upgrade to beta
49
+ uv tool install basic-memory --pre
50
+
51
+ # Or upgrade existing installation
52
+ uv tool upgrade basic-memory --prerelease=allow
53
+ ```
54
+
55
+ ## Version Guidelines
56
+ - **First beta**: `v0.13.2b1`
57
+ - **Subsequent betas**: `v0.13.2b2`, `v0.13.2b3`, etc.
58
+ - **Release candidates**: `v0.13.2rc1`, `v0.13.2rc2`, etc.
59
+ - **Final release**: `v0.13.2` (use `/release` command)
60
+
61
+ ## Error Handling
62
+ - If `just beta` fails, examine the error output for specific issues
63
+ - If quality checks fail, fix issues and retry
64
+ - If version format is invalid, correct and retry
65
+ - If tag already exists, increment version number
66
+
67
+ ## Success Output
68
+ ```
69
+ ✅ Beta Release v0.13.2b1 Created Successfully!
70
+
71
+ 🏷️ Tag: v0.13.2b1
72
+ 🚀 GitHub Actions: Running
73
+ 📦 PyPI: Will be available in ~5 minutes as pre-release
74
+
75
+ Install/test with:
76
+ uv tool install basic-memory --pre
77
+
78
+ Monitor release: https://github.com/basicmachines-co/basic-memory/actions
79
+ ```
80
+
81
+ ## Beta Testing Workflow
82
+ 1. **Create beta**: Use `/beta v0.13.2b1`
83
+ 2. **Test features**: Install and validate new functionality
84
+ 3. **Fix issues**: Address bugs found during testing
85
+ 4. **Iterate**: Create `v0.13.2b2` if needed
86
+ 5. **Release candidate**: Create `v0.13.2rc1` when stable
87
+ 6. **Final release**: Use `/release v0.13.2` when ready
88
+
89
+ ## Context
90
+ - Beta releases are pre-releases for testing new features
91
+ - Automatically published to PyPI with pre-release flag
92
+ - Uses the automated justfile target for consistency
93
+ - Version is automatically updated in `__init__.py`
94
+ - Ideal for validating changes before stable release
95
+ - Supports both beta (b1, b2) and release candidate (rc1, rc2) versions
@@ -0,0 +1,160 @@
1
+ # /changelog - Generate or Update Changelog Entry
2
+
3
+ Analyze commits and generate formatted changelog entry for a version.
4
+
5
+ ## Usage
6
+ ```
7
+ /changelog <version> [type]
8
+ ```
9
+
10
+ **Parameters:**
11
+ - `version` (required): Version like `v0.14.0` or `v0.14.0b1`
12
+ - `type` (optional): `beta`, `rc`, or `stable` (default: `stable`)
13
+
14
+ ## Implementation
15
+
16
+ You are an expert technical writer for the Basic Memory project. When the user runs `/changelog`, execute the following steps:
17
+
18
+ ### Step 1: Version Analysis
19
+ 1. **Determine Commit Range**
20
+ ```bash
21
+ # Find last release tag
22
+ git tag -l "v*" --sort=-version:refname | grep -v "b\|rc" | head -1
23
+
24
+ # Get commits since last release
25
+ git log --oneline ${last_tag}..HEAD
26
+ ```
27
+
28
+ 2. **Parse Conventional Commits**
29
+ - Extract feat: (features)
30
+ - Extract fix: (bug fixes)
31
+ - Extract BREAKING CHANGE: (breaking changes)
32
+ - Extract chore:, docs:, test: (other improvements)
33
+
34
+ ### Step 2: Categorize Changes
35
+ 1. **Features (feat:)**
36
+ - New MCP tools
37
+ - New CLI commands
38
+ - New API endpoints
39
+ - Major functionality additions
40
+
41
+ 2. **Bug Fixes (fix:)**
42
+ - User-facing bug fixes
43
+ - Critical issues resolved
44
+ - Performance improvements
45
+ - Security fixes
46
+
47
+ 3. **Technical Improvements**
48
+ - Test coverage improvements
49
+ - Code quality enhancements
50
+ - Dependency updates
51
+ - Documentation updates
52
+
53
+ 4. **Breaking Changes**
54
+ - API changes
55
+ - Configuration changes
56
+ - Behavior changes
57
+ - Migration requirements
58
+
59
+ ### Step 3: Generate Changelog Entry
60
+ Create formatted entry following existing CHANGELOG.md style:
61
+
62
+ Example:
63
+ ```markdown
64
+ ## <version> (<date>)
65
+
66
+ ### Features
67
+
68
+ - **Multi-Project Management System** - Switch between projects instantly during conversations
69
+ ([`993e88a`](https://github.com/basicmachines-co/basic-memory/commit/993e88a))
70
+ - Instant project switching with session context
71
+ - Project-specific operations and isolation
72
+ - Project discovery and management tools
73
+
74
+ - **Advanced Note Editing** - Incremental editing with append, prepend, find/replace, and section operations
75
+ ([`6fc3904`](https://github.com/basicmachines-co/basic-memory/commit/6fc3904))
76
+ - `edit_note` tool with multiple operation types
77
+ - Smart frontmatter-aware editing
78
+ - Validation and error handling
79
+
80
+ ### Bug Fixes
81
+
82
+ - **#118**: Fix YAML tag formatting to follow standard specification
83
+ ([`2dc7e27`](https://github.com/basicmachines-co/basic-memory/commit/2dc7e27))
84
+
85
+ - **#110**: Make --project flag work consistently across CLI commands
86
+ ([`02dd91a`](https://github.com/basicmachines-co/basic-memory/commit/02dd91a))
87
+
88
+ ### Technical Improvements
89
+
90
+ - **Comprehensive Testing** - 100% test coverage with integration testing
91
+ ([`468a22f`](https://github.com/basicmachines-co/basic-memory/commit/468a22f))
92
+ - MCP integration test suite
93
+ - End-to-end testing framework
94
+ - Performance and edge case validation
95
+
96
+ ### Breaking Changes
97
+
98
+ - **Database Migration**: Automatic migration from per-project to unified database.
99
+ Data will be re-index from the filesystem, resulting in no data loss.
100
+ - **Configuration Changes**: Projects now synced between config.json and database
101
+ - **Full Backward Compatibility**: All existing setups continue to work seamlessly
102
+ ```
103
+
104
+ ### Step 4: Integration
105
+ 1. **Update CHANGELOG.md**
106
+ - Insert new entry at top
107
+ - Maintain consistent formatting
108
+ - Include commit links and issue references
109
+
110
+ 2. **Validation**
111
+ - Check all major changes are captured
112
+ - Verify commit links work
113
+ - Ensure issue numbers are correct
114
+
115
+ ## Smart Analysis Features
116
+
117
+ ### Automatic Classification
118
+ - Detect feature additions from file changes
119
+ - Identify bug fixes from commit messages
120
+ - Find breaking changes from code analysis
121
+ - Extract issue numbers from commit messages
122
+
123
+ ### Content Enhancement
124
+ - Add context for technical changes
125
+ - Include migration guidance for breaking changes
126
+ - Suggest installation/upgrade instructions
127
+ - Link to relevant documentation
128
+
129
+ ## Output Format
130
+
131
+ ### For Beta Releases
132
+
133
+ Example:
134
+ ```markdown
135
+ ## v0.13.0b4 (2025-06-03)
136
+
137
+ ### Beta Changes Since v0.13.0b3
138
+
139
+ - Fix FastMCP API compatibility issues
140
+ - Update dependencies to latest versions
141
+ - Resolve setuptools import error
142
+
143
+ ### Installation
144
+ ```bash
145
+ uv tool install basic-memory --prerelease=allow
146
+ ```
147
+
148
+ ### Known Issues
149
+ - [List any known issues for beta testing]
150
+ ```
151
+
152
+ ### For Stable Releases
153
+ Full changelog with complete feature list, organized by impact and category.
154
+
155
+ ## Context
156
+ - Follows existing CHANGELOG.md format and style
157
+ - Uses conventional commit standards
158
+ - Includes GitHub commit links for traceability
159
+ - Focuses on user-facing changes and value
160
+ - Maintains consistency with previous entries
@@ -0,0 +1,131 @@
1
+ # /release-check - Pre-flight Release Validation
2
+
3
+ Comprehensive pre-flight check for release readiness without making any changes.
4
+
5
+ ## Usage
6
+ ```
7
+ /release-check [version]
8
+ ```
9
+
10
+ **Parameters:**
11
+ - `version` (optional): Version to validate like `v0.13.0`. If not provided, determines from context.
12
+
13
+ ## Implementation
14
+
15
+ You are an expert QA engineer for the Basic Memory project. When the user runs `/release-check`, execute the following validation steps:
16
+
17
+ ### Step 1: Environment Validation
18
+ 1. **Git Status Check**
19
+ - Verify working directory is clean
20
+ - Confirm on `main` branch
21
+ - Check if ahead/behind origin
22
+
23
+ 2. **Version Validation**
24
+ - Validate version format if provided
25
+ - Check for existing tags with same version
26
+ - Verify version increments properly from last release
27
+
28
+ ### Step 2: Code Quality Gates
29
+ 1. **Test Suite Validation**
30
+ ```bash
31
+ just test
32
+ ```
33
+ - All tests must pass
34
+ - Check test coverage (target: 95%+)
35
+ - Validate no skipped critical tests
36
+
37
+ 2. **Code Quality Checks**
38
+ ```bash
39
+ just lint
40
+ just type-check
41
+ ```
42
+ - No linting errors
43
+ - No type checking errors
44
+ - Code formatting is consistent
45
+
46
+ ### Step 3: Documentation Validation
47
+ 1. **Changelog Check**
48
+ - CHANGELOG.md contains entry for target version
49
+ - Entry includes all major features and fixes
50
+ - Breaking changes are documented
51
+
52
+ 2. **Documentation Currency**
53
+ - README.md reflects current functionality
54
+ - CLI reference is up to date
55
+ - MCP tools are documented
56
+
57
+ ### Step 4: Dependency Validation
58
+ 1. **Security Scan**
59
+ - No known vulnerabilities in dependencies
60
+ - All dependencies are at appropriate versions
61
+ - No conflicting dependency versions
62
+
63
+ 2. **Build Validation**
64
+ - Package builds successfully
65
+ - All required files are included
66
+ - No missing dependencies
67
+
68
+ ### Step 5: Issue Tracking Validation
69
+ 1. **GitHub Issues Check**
70
+ - No critical open issues blocking release
71
+ - All milestone issues are resolved
72
+ - High-priority bugs are fixed
73
+
74
+ 2. **Testing Coverage**
75
+ - Integration tests pass
76
+ - MCP tool tests pass
77
+ - Cross-platform compatibility verified
78
+
79
+ ## Report Format
80
+
81
+ Generate a comprehensive report:
82
+
83
+ ```
84
+ 🔍 Release Readiness Check for v0.13.0
85
+
86
+ ✅ PASSED CHECKS:
87
+ ├── Git status clean
88
+ ├── On main branch
89
+ ├── All tests passing (744/744)
90
+ ├── Test coverage: 98.2%
91
+ ├── Type checking passed
92
+ ├── Linting passed
93
+ ├── CHANGELOG.md updated
94
+ └── No critical issues open
95
+
96
+ ⚠️ WARNINGS:
97
+ ├── 2 medium-priority issues still open
98
+ └── Documentation could be updated
99
+
100
+ ❌ BLOCKING ISSUES:
101
+ └── None found
102
+
103
+ 🎯 RELEASE READINESS: ✅ READY
104
+
105
+ Recommended next steps:
106
+ 1. Address warnings if desired
107
+ 2. Run `/release v0.13.0` when ready
108
+ ```
109
+
110
+ ## Validation Criteria
111
+
112
+ ### Must Pass (Blocking)
113
+ - [ ] All tests pass
114
+ - [ ] No type errors
115
+ - [ ] No linting errors
116
+ - [ ] Working directory clean
117
+ - [ ] On main branch
118
+ - [ ] CHANGELOG.md has version entry
119
+ - [ ] No critical open issues
120
+
121
+ ### Should Pass (Warnings)
122
+ - [ ] Test coverage >95%
123
+ - [ ] No medium-priority open issues
124
+ - [ ] Documentation up to date
125
+ - [ ] No dependency vulnerabilities
126
+
127
+ ## Context
128
+ - This is a read-only validation - makes no changes
129
+ - Provides confidence before running actual release
130
+ - Helps identify issues early in release process
131
+ - Can be run multiple times safely