stravinsky 0.2.24__tar.gz → 0.4.17__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 stravinsky might be problematic. Click here for more details.

Files changed (287) hide show
  1. stravinsky-0.4.17/.claude/HOOKS_INTEGRATION.md +316 -0
  2. stravinsky-0.4.17/.claude/agents/HOOKS.md +437 -0
  3. stravinsky-0.4.17/.claude/agents/code-reviewer.md +209 -0
  4. stravinsky-0.4.17/.claude/agents/debugger.md +253 -0
  5. stravinsky-0.4.17/.claude/agents/delphi.md +491 -0
  6. stravinsky-0.4.17/.claude/agents/dewey.md +245 -0
  7. stravinsky-0.4.17/.claude/agents/explore.md +890 -0
  8. stravinsky-0.4.17/.claude/agents/frontend.md +471 -0
  9. stravinsky-0.4.17/.claude/agents/implementation-lead.md +164 -0
  10. stravinsky-0.4.17/.claude/agents/research-lead.md +129 -0
  11. stravinsky-0.4.17/.claude/agents/stravinsky.md +612 -0
  12. stravinsky-0.4.17/.claude/commands/delphi.md +5 -0
  13. stravinsky-0.4.17/.claude/commands/dewey.md +54 -0
  14. stravinsky-0.4.17/.claude/commands/index.md +49 -0
  15. stravinsky-0.4.17/.claude/commands/publish.md +86 -0
  16. stravinsky-0.4.17/.claude/commands/review.md +67 -0
  17. stravinsky-0.4.17/.claude/commands/str/index.md +199 -0
  18. stravinsky-0.4.17/.claude/commands/str/search.md +205 -0
  19. stravinsky-0.4.17/.claude/commands/str/start_filewatch.md +136 -0
  20. stravinsky-0.4.17/.claude/commands/str/stats.md +71 -0
  21. stravinsky-0.4.17/.claude/commands/str/stop_filewatch.md +89 -0
  22. stravinsky-0.4.17/.claude/commands/str-cancel.md +51 -0
  23. stravinsky-0.4.17/.claude/commands/str-clean.md +68 -0
  24. stravinsky-0.4.17/.claude/commands/str-unwatch.md +42 -0
  25. stravinsky-0.4.17/.claude/commands/str-watch.md +45 -0
  26. stravinsky-0.4.17/.claude/commands/strav.md +216 -0
  27. stravinsky-0.4.17/.claude/commands/verify.md +60 -0
  28. stravinsky-0.4.17/.claude/commands/version.md +5 -0
  29. stravinsky-0.4.17/.claude/hooks/context_monitor.py +153 -0
  30. stravinsky-0.4.17/.claude/hooks/notification_hook.py +103 -0
  31. stravinsky-0.4.17/.claude/hooks/parallel_execution.py +111 -0
  32. stravinsky-0.4.17/.claude/hooks/pre_compact.py +123 -0
  33. stravinsky-0.4.17/.claude/hooks/stravinsky_mode.py +146 -0
  34. stravinsky-0.4.17/.claude/hooks/subagent_stop.py +98 -0
  35. stravinsky-0.4.17/.claude/hooks/todo_continuation.py +90 -0
  36. stravinsky-0.4.17/.claude/hooks/todo_delegation.py +88 -0
  37. stravinsky-0.4.17/.claude/hooks/tool_messaging.py +263 -0
  38. stravinsky-0.4.17/.claude/rules/pypi_deployment.md +220 -0
  39. stravinsky-0.4.17/.claude/settings.json +172 -0
  40. stravinsky-0.4.17/.claude/skills/chrome-devtools/SKILL.md +81 -0
  41. stravinsky-0.4.17/.claude/skills/sqlite/SKILL.md +77 -0
  42. stravinsky-0.4.17/.claude/skills/supabase/SKILL.md +74 -0
  43. {stravinsky-0.2.24 → stravinsky-0.4.17}/.github/workflows/publish.yml +3 -4
  44. stravinsky-0.4.17/.gitignore +49 -0
  45. stravinsky-0.4.17/.stravinsky/agents/agent_0de66569.out +117 -0
  46. stravinsky-0.4.17/.stravinsky/agents/agent_0de66569.system +10 -0
  47. stravinsky-0.4.17/.stravinsky/agents/agent_2ef2b305.out +142 -0
  48. stravinsky-0.4.17/.stravinsky/agents/agent_2ef2b305.system +9 -0
  49. stravinsky-0.4.17/.stravinsky/agents/agent_32fc606b.out +123 -0
  50. stravinsky-0.4.17/.stravinsky/agents/agent_32fc606b.system +10 -0
  51. stravinsky-0.4.17/.stravinsky/agents/agent_4ed6ec7a.out +132 -0
  52. stravinsky-0.4.17/.stravinsky/agents/agent_4ed6ec7a.system +9 -0
  53. stravinsky-0.4.17/.stravinsky/agents/agent_622ae68b.out +119 -0
  54. stravinsky-0.4.17/.stravinsky/agents/agent_622ae68b.system +10 -0
  55. stravinsky-0.4.17/.stravinsky/agents/agent_6731b838.out +278 -0
  56. stravinsky-0.4.17/.stravinsky/agents/agent_6731b838.system +10 -0
  57. stravinsky-0.4.17/.stravinsky/agents/agent_6c536f2d.out +103 -0
  58. stravinsky-0.4.17/.stravinsky/agents/agent_6c536f2d.system +10 -0
  59. stravinsky-0.4.17/.stravinsky/agents/agent_6ecde4ed.out +76 -0
  60. stravinsky-0.4.17/.stravinsky/agents/agent_6ecde4ed.system +9 -0
  61. stravinsky-0.4.17/.stravinsky/agents/agent_85449406.out +13 -0
  62. stravinsky-0.4.17/.stravinsky/agents/agent_85449406.system +9 -0
  63. stravinsky-0.4.17/.stravinsky/agents/agent_940fbc06.out +170 -0
  64. stravinsky-0.4.17/.stravinsky/agents/agent_940fbc06.system +10 -0
  65. stravinsky-0.4.17/.stravinsky/agents/agent_adc99d05.out +128 -0
  66. stravinsky-0.4.17/.stravinsky/agents/agent_adc99d05.system +10 -0
  67. stravinsky-0.4.17/.stravinsky/agents/agent_b3c09833.out +124 -0
  68. stravinsky-0.4.17/.stravinsky/agents/agent_b3c09833.system +10 -0
  69. stravinsky-0.4.17/.stravinsky/agents/agent_cdd28e91.system +10 -0
  70. stravinsky-0.4.17/.stravinsky/agents/agent_fee89a04.out +81 -0
  71. stravinsky-0.4.17/.stravinsky/agents/agent_fee89a04.system +10 -0
  72. stravinsky-0.4.17/.stravinsky/agents.json +1442 -0
  73. stravinsky-0.4.17/.stravinsky/mcp_mode +1 -0
  74. stravinsky-0.4.17/ARCHITECTURE.md +1133 -0
  75. stravinsky-0.4.17/AUTO_INDEXING_TEST_SUMMARY.md +353 -0
  76. {stravinsky-0.2.24 → stravinsky-0.4.17}/CLAUDE.md +72 -14
  77. stravinsky-0.4.17/COMPREHENSIVE_TEST_IMPLEMENTATION.txt +602 -0
  78. stravinsky-0.4.17/DELEGATION_FLOW_VERIFICATION.md +437 -0
  79. stravinsky-0.4.17/FILEWATCHER_DOCS_UPDATE_SUMMARY.md +186 -0
  80. stravinsky-0.4.17/FILEWATCHER_README.md +413 -0
  81. stravinsky-0.4.17/INSTALL.md +484 -0
  82. stravinsky-0.4.17/LSP_CLEANUP_FIX.md +141 -0
  83. stravinsky-0.4.17/MANUAL_TESTING_CHECKLIST.md +368 -0
  84. stravinsky-0.4.17/PKG-INFO +468 -0
  85. stravinsky-0.4.17/README.md +426 -0
  86. stravinsky-0.4.17/TESTING_AUTO_INDEXING.md +348 -0
  87. stravinsky-0.4.17/TESTING_SUMMARY_FINAL.md +234 -0
  88. stravinsky-0.4.17/TEST_ARTIFACTS_README.md +430 -0
  89. stravinsky-0.4.17/TEST_EXECUTION_REPORT.md +157 -0
  90. stravinsky-0.4.17/TEST_PLAN_AUTO_INDEXING.md +500 -0
  91. stravinsky-0.4.17/deploy.sh +201 -0
  92. stravinsky-0.4.17/docs/AGENTS.md +382 -0
  93. stravinsky-0.4.17/docs/AGENT_WORKFLOW.md +974 -0
  94. stravinsky-0.4.17/docs/CALL_FLOW_DIAGRAM.txt +168 -0
  95. stravinsky-0.4.17/docs/COMMANDS_CONSOLIDATION_REPORT.md +310 -0
  96. stravinsky-0.4.17/docs/COMMANDS_QUICK_SUMMARY.md +114 -0
  97. stravinsky-0.4.17/docs/DEPLOYMENT.md +121 -0
  98. stravinsky-0.4.17/docs/FILEWATCHER_ARCHITECTURE.md +530 -0
  99. stravinsky-0.4.17/docs/FILEWATCHER_IMPLEMENTATION_SUMMARY.md +375 -0
  100. stravinsky-0.4.17/docs/FILE_WATCHER.md +357 -0
  101. stravinsky-0.4.17/docs/HOOKS_INSTALLATION.md +194 -0
  102. stravinsky-0.4.17/docs/IMPLEMENTATION_PLAN.md +768 -0
  103. stravinsky-0.4.17/docs/INDEX_TOOL_CALL_LOGGING.md +189 -0
  104. stravinsky-0.4.17/docs/INJECTION_POINT_CODE_LOCATIONS.txt +322 -0
  105. stravinsky-0.4.17/docs/INSTALL.md +370 -0
  106. stravinsky-0.4.17/docs/INTELLIGENT_SEARCH_DESIGN.md +650 -0
  107. stravinsky-0.4.17/docs/KEYRING_AUTH_FIX.md +216 -0
  108. stravinsky-0.4.17/docs/LSP_MIGRATION_GUIDE.md +1452 -0
  109. stravinsky-0.4.17/docs/MCP_TOOL_CALL_INJECTION_POINTS.md +377 -0
  110. stravinsky-0.4.17/docs/MODEL_ROUTING.md +72 -0
  111. stravinsky-0.4.17/docs/QUERY_CLASSIFIER_DESIGN.md +533 -0
  112. stravinsky-0.4.17/docs/QUICKSTART.md +127 -0
  113. stravinsky-0.4.17/docs/QUICK_REFERENCE_INJECTION_POINTS.md +97 -0
  114. stravinsky-0.4.17/docs/README.md +79 -0
  115. stravinsky-0.4.17/docs/README_COMMANDS_ANALYSIS.md +180 -0
  116. stravinsky-0.4.17/docs/README_filewatcher.md +213 -0
  117. stravinsky-0.4.17/docs/REPORT_INDEX.txt +189 -0
  118. stravinsky-0.4.17/docs/SEARCH_STRATEGY_TEST_SUITE.md +308 -0
  119. stravinsky-0.4.17/docs/SEARCH_TOOLS_ANALYSIS.md +826 -0
  120. stravinsky-0.4.17/docs/SEMANTIC_INDEXING_INDEX.md +214 -0
  121. stravinsky-0.4.17/docs/SEMANTIC_SEARCH_BEST_PRACTICES.md +1392 -0
  122. stravinsky-0.4.17/docs/SEMANTIC_SEARCH_QUICK_START.md +215 -0
  123. stravinsky-0.4.17/docs/SEMANTIC_SEARCH_TESTING_INDEX.md +278 -0
  124. stravinsky-0.4.17/docs/SEMANTIC_SEARCH_TEST_REPORT.md +225 -0
  125. stravinsky-0.4.17/docs/SEMANTIC_WATCHER_USAGE.md +400 -0
  126. stravinsky-0.4.17/docs/TEMPLATES_STRUCTURE.md +170 -0
  127. stravinsky-0.4.17/docs/TROUBLESHOOTING.md +382 -0
  128. stravinsky-0.4.17/docs/USAGE.md +537 -0
  129. stravinsky-0.4.17/docs/architecture_workflow.md +157 -0
  130. stravinsky-0.4.17/docs/filewatcher_design_summary.md +287 -0
  131. stravinsky-0.4.17/docs/filewatcher_integration_design.md +606 -0
  132. stravinsky-0.4.17/docs/filewatcher_quick_reference.md +448 -0
  133. stravinsky-0.4.17/docs/remediation_plan.md +38 -0
  134. stravinsky-0.4.17/docs/semantic_indexing_analysis.md +444 -0
  135. stravinsky-0.4.17/docs/semantic_indexing_quick_start.md +422 -0
  136. stravinsky-0.4.17/logs/.1c0e2f6784d083818216ed08579b248b799c8d86-audit.json +40 -0
  137. stravinsky-0.4.17/logs/.270de9f01be3c37438e0ae9542f6c146c85078ae-audit.json +40 -0
  138. stravinsky-0.4.17/logs/application-2026-01-03.log +45 -0
  139. stravinsky-0.4.17/logs/application-2026-01-04.log +232 -0
  140. stravinsky-0.4.17/logs/application-2026-01-05.log +172 -0
  141. stravinsky-0.4.17/logs/error-2026-01-03.log +3 -0
  142. stravinsky-0.4.17/logs/error-2026-01-04.log +24 -0
  143. stravinsky-0.4.17/logs/error-2026-01-05.log +15 -0
  144. stravinsky-0.4.17/mcp_bridge/__init__.py +1 -0
  145. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/auth/cli.py +84 -46
  146. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/auth/oauth.py +88 -63
  147. stravinsky-0.4.17/mcp_bridge/auth/token_refresh.py +130 -0
  148. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/auth/token_store.py +113 -11
  149. stravinsky-0.4.17/mcp_bridge/cli/__init__.py +6 -0
  150. stravinsky-0.4.17/mcp_bridge/cli/install_hooks.py +1265 -0
  151. stravinsky-0.4.17/mcp_bridge/cli/session_report.py +585 -0
  152. stravinsky-0.4.17/mcp_bridge/config/MANIFEST_SCHEMA.md +305 -0
  153. stravinsky-0.4.17/mcp_bridge/config/README.md +276 -0
  154. stravinsky-0.4.17/mcp_bridge/config/hooks_manifest.json +138 -0
  155. stravinsky-0.4.17/mcp_bridge/config/skills_manifest.json +128 -0
  156. stravinsky-0.4.17/mcp_bridge/hooks/HOOKS_SETTINGS.json +175 -0
  157. stravinsky-0.4.17/mcp_bridge/hooks/README.md +215 -0
  158. stravinsky-0.4.17/mcp_bridge/hooks/__init__.py +125 -0
  159. stravinsky-0.4.17/mcp_bridge/hooks/agent_reminder.py +61 -0
  160. stravinsky-0.4.17/mcp_bridge/hooks/auto_slash_command.py +186 -0
  161. stravinsky-0.4.17/mcp_bridge/hooks/comment_checker.py +136 -0
  162. stravinsky-0.4.17/mcp_bridge/hooks/context.py +38 -0
  163. stravinsky-0.4.17/mcp_bridge/hooks/context_monitor.py +58 -0
  164. stravinsky-0.4.17/mcp_bridge/hooks/edit_recovery.py +46 -0
  165. stravinsky-0.4.17/mcp_bridge/hooks/empty_message_sanitizer.py +240 -0
  166. stravinsky-0.4.17/mcp_bridge/hooks/git_noninteractive.py +89 -0
  167. stravinsky-0.4.17/mcp_bridge/hooks/keyword_detector.py +152 -0
  168. stravinsky-0.4.17/mcp_bridge/hooks/manager.py +146 -0
  169. stravinsky-0.4.17/mcp_bridge/hooks/notification_hook.py +103 -0
  170. stravinsky-0.4.17/mcp_bridge/hooks/parallel_enforcer.py +127 -0
  171. stravinsky-0.4.17/mcp_bridge/hooks/parallel_execution.py +111 -0
  172. stravinsky-0.4.17/mcp_bridge/hooks/pre_compact.py +123 -0
  173. stravinsky-0.4.17/mcp_bridge/hooks/preemptive_compaction.py +231 -0
  174. stravinsky-0.4.17/mcp_bridge/hooks/rules_injector.py +507 -0
  175. stravinsky-0.4.17/mcp_bridge/hooks/session_idle.py +116 -0
  176. stravinsky-0.4.17/mcp_bridge/hooks/session_notifier.py +125 -0
  177. stravinsky-0.4.17/mcp_bridge/hooks/session_recovery.py +186 -0
  178. stravinsky-0.4.17/mcp_bridge/hooks/stravinsky_mode.py +144 -0
  179. stravinsky-0.4.17/mcp_bridge/hooks/subagent_stop.py +98 -0
  180. stravinsky-0.4.17/mcp_bridge/hooks/task_validator.py +73 -0
  181. stravinsky-0.4.17/mcp_bridge/hooks/tmux_manager.py +141 -0
  182. stravinsky-0.4.17/mcp_bridge/hooks/todo_continuation.py +90 -0
  183. stravinsky-0.4.17/mcp_bridge/hooks/todo_delegation.py +88 -0
  184. stravinsky-0.4.17/mcp_bridge/hooks/todo_enforcer.py +75 -0
  185. stravinsky-0.4.17/mcp_bridge/hooks/tool_messaging.py +267 -0
  186. stravinsky-0.4.17/mcp_bridge/hooks/truncator.py +23 -0
  187. stravinsky-0.4.17/mcp_bridge/notifications.py +151 -0
  188. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/prompts/__init__.py +3 -1
  189. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/prompts/delphi.py +3 -2
  190. stravinsky-0.4.17/mcp_bridge/prompts/dewey.py +277 -0
  191. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/prompts/explore.py +46 -8
  192. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/prompts/multimodal.py +24 -3
  193. stravinsky-0.4.17/mcp_bridge/prompts/planner.py +222 -0
  194. stravinsky-0.4.17/mcp_bridge/prompts/stravinsky.py +739 -0
  195. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/server.py +453 -63
  196. stravinsky-0.4.17/mcp_bridge/server_tools.py +1119 -0
  197. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/__init__.py +22 -18
  198. stravinsky-0.4.17/mcp_bridge/tools/agent_manager.py +1110 -0
  199. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/background_tasks.py +2 -1
  200. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/code_search.py +97 -11
  201. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/lsp/__init__.py +7 -0
  202. stravinsky-0.4.17/mcp_bridge/tools/lsp/manager.py +448 -0
  203. stravinsky-0.4.17/mcp_bridge/tools/lsp/tools.py +1013 -0
  204. stravinsky-0.4.17/mcp_bridge/tools/model_invoke.py +1029 -0
  205. stravinsky-0.4.17/mcp_bridge/tools/query_classifier.py +323 -0
  206. stravinsky-0.4.17/mcp_bridge/tools/semantic_search.py +3042 -0
  207. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/skill_loader.py +51 -47
  208. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/task_runner.py +53 -35
  209. stravinsky-0.4.17/mcp_bridge/tools/templates.py +189 -0
  210. stravinsky-0.4.17/mcp_bridge/update_manager.py +589 -0
  211. stravinsky-0.4.17/mcp_bridge/update_manager_pypi.py +299 -0
  212. {stravinsky-0.2.24 → stravinsky-0.4.17}/pyproject.toml +15 -2
  213. stravinsky-0.4.17/run-mcp.sh +3 -0
  214. stravinsky-0.4.17/test_lsp_cleanup.py +103 -0
  215. stravinsky-0.4.17/test_lsp_manager.py +307 -0
  216. stravinsky-0.4.17/tests/MANUAL_TEST_GUIDE.md +414 -0
  217. stravinsky-0.4.17/tests/QUERY_CLASSIFICATION_GUIDE.md +375 -0
  218. stravinsky-0.4.17/tests/QUICK_REFERENCE.md +165 -0
  219. stravinsky-0.4.17/tests/README.md +89 -0
  220. stravinsky-0.4.17/tests/README_AUTO_INDEXING_TESTS.md +354 -0
  221. stravinsky-0.4.17/tests/README_QUERY_CLASSIFICATION.md +344 -0
  222. stravinsky-0.4.17/tests/TEST_IMPLEMENTATION_SUMMARY.md +391 -0
  223. stravinsky-0.4.17/tests/TEST_RESULTS_direct_gemini.md +299 -0
  224. stravinsky-0.4.17/tests/conftest.py +8 -0
  225. stravinsky-0.4.17/tests/manual_test_auto_indexing.py +788 -0
  226. stravinsky-0.4.17/tests/test_auto_indexing.py +571 -0
  227. stravinsky-0.4.17/tests/test_direct_gemini.py +321 -0
  228. stravinsky-0.4.17/tests/test_file_watcher.py +314 -0
  229. stravinsky-0.4.17/tests/test_file_watcher_no_index.py +404 -0
  230. stravinsky-0.4.17/tests/test_new_hooks.py +316 -0
  231. stravinsky-0.4.17/tests/test_query_classification.py +982 -0
  232. stravinsky-0.4.17/tests/test_query_classifier.py +566 -0
  233. stravinsky-0.4.17/tests/test_symlink_boundary.py +148 -0
  234. stravinsky-0.4.17/tests/test_update_manager.py +1120 -0
  235. stravinsky-0.4.17/tests/verify_semantic_search.py +155 -0
  236. stravinsky-0.4.17/uv.lock +2542 -0
  237. stravinsky-0.2.24/.gitignore +0 -35
  238. stravinsky-0.2.24/.mcp.json +0 -3
  239. stravinsky-0.2.24/.stravinsky/agents/agent_8e68511c.log +0 -0
  240. stravinsky-0.2.24/.stravinsky/agents/agent_8e68511c.out +0 -1
  241. stravinsky-0.2.24/.stravinsky/agents/agent_9b9fd4f0.log +0 -0
  242. stravinsky-0.2.24/.stravinsky/agents/agent_9b9fd4f0.out +0 -1
  243. stravinsky-0.2.24/.stravinsky/agents/agent_e76617db.log +0 -0
  244. stravinsky-0.2.24/.stravinsky/agents/agent_e76617db.out +0 -1
  245. stravinsky-0.2.24/.stravinsky/agents.json +0 -34
  246. stravinsky-0.2.24/PKG-INFO +0 -210
  247. stravinsky-0.2.24/README.md +0 -178
  248. stravinsky-0.2.24/install_native_hooks.py +0 -53
  249. stravinsky-0.2.24/mcp_bridge/__init__.py +0 -1
  250. stravinsky-0.2.24/mcp_bridge/hooks/__init__.py +0 -28
  251. stravinsky-0.2.24/mcp_bridge/hooks/edit_recovery.py +0 -41
  252. stravinsky-0.2.24/mcp_bridge/hooks/manager.py +0 -77
  253. stravinsky-0.2.24/mcp_bridge/hooks/truncator.py +0 -19
  254. stravinsky-0.2.24/mcp_bridge/prompts/dewey.py +0 -183
  255. stravinsky-0.2.24/mcp_bridge/prompts/stravinsky.py +0 -345
  256. stravinsky-0.2.24/mcp_bridge/server_tools.py +0 -547
  257. stravinsky-0.2.24/mcp_bridge/tools/agent_manager.py +0 -779
  258. stravinsky-0.2.24/mcp_bridge/tools/lsp/tools.py +0 -526
  259. stravinsky-0.2.24/mcp_bridge/tools/model_invoke.py +0 -561
  260. stravinsky-0.2.24/mcp_bridge/tools/templates.py +0 -94
  261. stravinsky-0.2.24/uv.lock +0 -1483
  262. {stravinsky-0.2.24/mcp_bridge/native_hooks → stravinsky-0.4.17/.claude/hooks}/context.py +0 -0
  263. {stravinsky-0.2.24/mcp_bridge/native_hooks → stravinsky-0.4.17/.claude/hooks}/edit_recovery.py +0 -0
  264. {stravinsky-0.2.24/mcp_bridge/native_hooks → stravinsky-0.4.17/.claude/hooks}/truncator.py +0 -0
  265. {stravinsky-0.2.24 → stravinsky-0.4.17}/assets/logo.png +0 -0
  266. {stravinsky-0.2.24 → stravinsky-0.4.17}/assets/logo.png.txt +0 -0
  267. {stravinsky-0.2.24 → stravinsky-0.4.17}/assets/logo_small.png +0 -0
  268. {stravinsky-0.2.24 → stravinsky-0.4.17}/error.log +0 -0
  269. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/auth/__init__.py +0 -0
  270. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/auth/openai_oauth.py +0 -0
  271. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/config/__init__.py +0 -0
  272. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/config/hooks.py +0 -0
  273. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/hooks/budget_optimizer.py +0 -0
  274. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/hooks/compaction.py +0 -0
  275. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/hooks/directory_context.py +0 -0
  276. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/prompts/document_writer.py +0 -0
  277. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/prompts/frontend.py +0 -0
  278. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/continuous_loop.py +0 -0
  279. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/init.py +0 -0
  280. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/project_context.py +0 -0
  281. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/tools/session_manager.py +0 -0
  282. {stravinsky-0.2.24 → stravinsky-0.4.17}/mcp_bridge/utils/__init__.py +0 -0
  283. {stravinsky-0.2.24 → stravinsky-0.4.17}/repro_spawn.py +0 -0
  284. {stravinsky-0.2.24 → stravinsky-0.4.17}/stdout_handshake_auditor.py +0 -0
  285. {stravinsky-0.2.24 → stravinsky-0.4.17}/tests/manual_test_hooks.py +0 -0
  286. {stravinsky-0.2.24 → stravinsky-0.4.17}/tests/test_hooks.py +0 -0
  287. {stravinsky-0.2.24 → stravinsky-0.4.17}/verify_tools.py +0 -0
@@ -0,0 +1,316 @@
1
+ # Stravinsky Hooks Integration
2
+
3
+ ## Overview
4
+
5
+ Stravinsky uses native Claude Code hooks for delegation enforcement and user messaging. All hooks are configured in `.claude/settings.json` and execute as Python scripts.
6
+
7
+ ## Hook Types
8
+
9
+ ### PreToolUse Hooks
10
+
11
+ **Purpose**: Intercept tool calls before execution to enforce delegation patterns.
12
+
13
+ #### 1. Stravinsky Mode Enforcer (`stravinsky_mode.py`)
14
+
15
+ **Location**: `mcp_bridge/native_hooks/stravinsky_mode.py`
16
+
17
+ **Matcher**: `Read,Search,Grep,Bash,Edit,MultiEdit`
18
+
19
+ **Behavior**:
20
+ - Checks for `~/.stravinsky_mode` marker file
21
+ - When active, blocks native file tools (Read, Grep, Bash, etc.)
22
+ - Forces use of Task tool for native subagent delegation
23
+ - Outputs user-friendly messages like: `🎭 explore('Delegating Grep (searching for 'auth')')`
24
+
25
+ **Example**:
26
+ ```
27
+ User prompt: "Find all authentication code"
28
+ Without hook: Uses Grep directly
29
+ With hook: Blocks Grep, shows "🎭 explore('Delegating Grep (searching for 'auth')')", forces Task delegation
30
+ ```
31
+
32
+ **Delegation Pattern**:
33
+ ```python
34
+ # WRONG (blocked by hook)
35
+ Grep(pattern="auth", path="src/")
36
+
37
+ # CORRECT (enforced by hook)
38
+ Task(
39
+ subagent_type="explore",
40
+ prompt="Find all authentication implementations in src/",
41
+ description="Find auth code"
42
+ )
43
+ ```
44
+
45
+ ### PostToolUse Hooks
46
+
47
+ **Purpose**: Execute after tool completion for messaging and result processing.
48
+
49
+ #### 1. Truncator (`truncator.py`)
50
+
51
+ **Location**: `mcp_bridge/native_hooks/truncator.py`
52
+
53
+ **Matcher**: `*` (all tools)
54
+
55
+ **Behavior**: Truncates large tool outputs to prevent context overflow.
56
+
57
+ #### 2. Tool Messaging (`tool_messaging.py`)
58
+
59
+ **Location**: `mcp_bridge/native_hooks/tool_messaging.py`
60
+
61
+ **Matcher**: `mcp__stravinsky__*,mcp__grep-app__*,Task`
62
+
63
+ **Behavior**:
64
+ - Outputs concise messages about which tool/agent was used
65
+ - Format: `🔧 tool-name('description')` or `🎯 agent:model('description')`
66
+
67
+ **Examples**:
68
+ ```
69
+ 🔧 ast-grep('Searching AST in src/ for class definitions')
70
+ 🔧 grep('Searching for authentication patterns')
71
+ 🔧 lsp-diagnostics('Checking server.py for errors')
72
+ 🎯 explore:gemini-3-flash('Finding all API endpoints')
73
+ 🎯 delphi:gpt-5.2-medium('Analyzing architecture trade-offs')
74
+ 🎯 frontend:gemini-3-pro-high('Designing login component')
75
+ ```
76
+
77
+ #### 3. Edit Recovery (`edit_recovery.py`)
78
+
79
+ **Location**: `mcp_bridge/native_hooks/edit_recovery.py`
80
+
81
+ **Matcher**: `Edit,MultiEdit`
82
+
83
+ **Behavior**: Backs up file state before edits for recovery.
84
+
85
+ #### 4. Todo Delegation (`todo_delegation.py`)
86
+
87
+ **Location**: `mcp_bridge/native_hooks/todo_delegation.py`
88
+
89
+ **Matcher**: `TodoWrite`
90
+
91
+ **Behavior**: After TodoWrite, enforces parallel Task delegation for independent todos.
92
+
93
+ **Example Output**:
94
+ ```
95
+ [PARALLEL DELEGATION REQUIRED]
96
+
97
+ You just created 3 pending TODOs. Before your NEXT response:
98
+
99
+ 1. Identify which TODOs are INDEPENDENT (can run simultaneously)
100
+ 2. For EACH independent TODO, spawn a Task agent:
101
+ Task(subagent_type="explore", prompt="[TODO details]", run_in_background=true)
102
+ 3. Fire ALL Task calls in ONE response - do NOT wait between them
103
+ ```
104
+
105
+ ### UserPromptSubmit Hooks
106
+
107
+ **Purpose**: Execute before prompt processing to inject context.
108
+
109
+ #### 1. Context Injector (`context.py`)
110
+
111
+ **Location**: `mcp_bridge/native_hooks/context.py`
112
+
113
+ **Matcher**: `*` (all prompts)
114
+
115
+ **Behavior**: Injects project context (git status, rules, todos) into prompts.
116
+
117
+ ## Configuration
118
+
119
+ **File**: `.claude/settings.json`
120
+
121
+ ```json
122
+ {
123
+ "hooks": {
124
+ "PreToolUse": [
125
+ {
126
+ "matcher": "Read,Search,Grep,Bash,Edit,MultiEdit",
127
+ "hooks": [{
128
+ "type": "command",
129
+ "command": "python3 /path/to/stravinsky_mode.py"
130
+ }]
131
+ }
132
+ ],
133
+ "PostToolUse": [
134
+ {
135
+ "matcher": "*",
136
+ "hooks": [{
137
+ "type": "command",
138
+ "command": "python3 /path/to/truncator.py"
139
+ }]
140
+ },
141
+ {
142
+ "matcher": "mcp__stravinsky__*,mcp__grep-app__*,Task",
143
+ "hooks": [{
144
+ "type": "command",
145
+ "command": "python3 /path/to/tool_messaging.py"
146
+ }]
147
+ },
148
+ {
149
+ "matcher": "Edit,MultiEdit",
150
+ "hooks": [{
151
+ "type": "command",
152
+ "command": "python3 /path/to/edit_recovery.py"
153
+ }]
154
+ },
155
+ {
156
+ "matcher": "TodoWrite",
157
+ "hooks": [{
158
+ "type": "command",
159
+ "command": "python3 /path/to/todo_delegation.py"
160
+ }]
161
+ }
162
+ ],
163
+ "UserPromptSubmit": [
164
+ {
165
+ "matcher": "*",
166
+ "hooks": [{
167
+ "type": "command",
168
+ "command": "python3 /path/to/context.py"
169
+ }]
170
+ }
171
+ ]
172
+ }
173
+ }
174
+ ```
175
+
176
+ ## Hook Execution Flow
177
+
178
+ ### Stravinsky Mode Active
179
+
180
+ ```
181
+ User: "Find all auth code"
182
+
183
+ PreToolUse (stravinsky_mode.py)
184
+ ↓ Detects ~/.stravinsky_mode exists
185
+ ↓ Tool: Grep
186
+ ↓ BLOCK (exit code 2)
187
+ ↓ Output: 🎭 explore('Delegating Grep (searching for 'auth')')
188
+
189
+ Claude receives block + message
190
+ ↓ Uses Task tool instead:
191
+ ↓ Task(subagent_type="explore", prompt="Find all auth...", description="Find auth")
192
+
193
+ PostToolUse (tool_messaging.py)
194
+ ↓ Tool: Task
195
+ ↓ Output: 🎯 explore:gemini-3-flash('Find auth')
196
+
197
+ User sees both messages:
198
+ 🎭 explore('Delegating Grep (searching for 'auth')')
199
+ 🎯 explore:gemini-3-flash('Find auth')
200
+ ```
201
+
202
+ ### Normal Mode (No Stravinsky Mode)
203
+
204
+ ```
205
+ User: "Read server.py"
206
+
207
+ PreToolUse (stravinsky_mode.py)
208
+ ↓ ~/.stravinsky_mode does NOT exist
209
+ ↓ ALLOW (exit code 0)
210
+
211
+ Read tool executes normally
212
+
213
+ PostToolUse (truncator.py)
214
+ ↓ Truncates output if too large
215
+
216
+ User sees normal Read output
217
+ ```
218
+
219
+ ### MCP Tool Usage
220
+
221
+ ```
222
+ Claude: Uses lsp_diagnostics(file_path="server.py")
223
+
224
+ PostToolUse (tool_messaging.py)
225
+ ↓ Tool: mcp__stravinsky__lsp_diagnostics
226
+ ↓ Output: 🔧 lsp-diagnostics('Checking server.py for errors')
227
+
228
+ User sees: 🔧 lsp-diagnostics('Checking server.py for errors')
229
+ [followed by actual diagnostic results]
230
+ ```
231
+
232
+ ## Activating Stravinsky Mode
233
+
234
+ ```bash
235
+ # Activate (blocks native tools, forces Task delegation)
236
+ touch ~/.stravinsky_mode
237
+
238
+ # Or with configuration
239
+ echo '{"active": true, "agent_type": "explore"}' > ~/.stravinsky_mode
240
+
241
+ # Deactivate (allows normal tool usage)
242
+ rm ~/.stravinsky_mode
243
+ ```
244
+
245
+ ## Agent Model Mapping
246
+
247
+ When user sees messages like `agent:model('description')`, the model shows which backend is being used:
248
+
249
+ | Agent | Model | Cost | Use Case |
250
+ |-------|-------|------|----------|
251
+ | explore | gemini-3-flash | Free | Code search, file reading |
252
+ | dewey | gemini-3-flash | Cheap | Documentation research |
253
+ | code-reviewer | sonnet | Cheap | Code quality analysis |
254
+ | debugger | sonnet | Medium | Root cause investigation |
255
+ | frontend | gemini-3-pro-high | Medium | UI/UX design |
256
+ | delphi | gpt-5.2-medium | Expensive | Strategic architecture |
257
+
258
+ ## User Messaging Examples
259
+
260
+ ### Successful Delegation
261
+
262
+ ```
263
+ 🎭 explore('Delegating Grep (searching for 'authentication')')
264
+ 🎯 explore:gemini-3-flash('Find all auth implementations')
265
+ [Agent output: Found 15 authentication files...]
266
+ ```
267
+
268
+ ### Multi-Agent Parallel Execution
269
+
270
+ ```
271
+ 🎯 explore:gemini-3-flash('Find API endpoints')
272
+ 🎯 dewey:gemini-3-flash('Research JWT best practices')
273
+ 🎯 code-reviewer:sonnet('Review auth implementation')
274
+ [All agents execute in parallel, results aggregated]
275
+ ```
276
+
277
+ ### Strategic Consultation
278
+
279
+ ```
280
+ 🎯 delphi:gpt-5.2-medium('Architecture decision: WebSocket vs SSE')
281
+ [Delphi provides deep strategic analysis with trade-offs]
282
+ ```
283
+
284
+ ## Hook Benefits
285
+
286
+ 1. **Enforcement**: PreToolUse hooks ensure delegation patterns are followed
287
+ 2. **Transparency**: PostToolUse messaging shows which tools/agents are being used
288
+ 3. **Cost Awareness**: Model names in messages (gemini-3-flash, gpt-5.2-medium) indicate cost
289
+ 4. **Zero Overhead**: Hooks run in-process, no CLI spawning latency
290
+ 5. **Hard Boundaries**: Native subagents inherit explicit tool lists, enforced at Claude Code level
291
+ 6. **Fail-Safe**: Hooks fail open (allow on error) to prevent blocking workflow
292
+
293
+ ## Debugging Hooks
294
+
295
+ ```bash
296
+ # Test hook directly
297
+ echo '{"toolName": "Grep", "params": {"pattern": "auth"}}' | python3 stravinsky_mode.py
298
+ # Should output delegation message if ~/.stravinsky_mode exists
299
+
300
+ # View hook output in Claude Code logs
301
+ tail -f ~/.claude/logs/hooks.log
302
+
303
+ # Disable hook temporarily
304
+ # Edit .claude/settings.json, remove hook from matcher
305
+ ```
306
+
307
+ ## Next Steps
308
+
309
+ 1. **Test hooks**: Run `/stravinsky` command to activate mode, verify delegation enforcement
310
+ 2. **Monitor messaging**: Check that tool messages appear in stderr
311
+ 3. **Verify parallel execution**: TodoWrite → Task delegation should fire simultaneously
312
+ 4. **Cost optimization**: Track which agents are used most, optimize routing
313
+
314
+ ---
315
+
316
+ **Summary**: Stravinsky hooks provide transparent, enforced delegation with user-friendly messaging showing which specialist agent/tool is handling each task, with clear cost indicators via model names.