codevira 1.7.1__tar.gz → 2.0.0rc1__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 (236) hide show
  1. {codevira-1.7.1 → codevira-2.0.0rc1}/CHANGELOG.md +394 -0
  2. {codevira-1.7.1/codevira.egg-info → codevira-2.0.0rc1}/PKG-INFO +110 -7
  3. {codevira-1.7.1 → codevira-2.0.0rc1}/README.md +109 -6
  4. codevira-2.0.0rc1/agents/qa/01-code-review.md +57 -0
  5. codevira-2.0.0rc1/agents/qa/02-adversarial-fix-review.md +57 -0
  6. codevira-2.0.0rc1/agents/qa/03-cross-module-impact.md +57 -0
  7. codevira-2.0.0rc1/agents/qa/06-doc-drift.md +47 -0
  8. codevira-2.0.0rc1/agents/qa/07-security-audit.md +73 -0
  9. codevira-2.0.0rc1/agents/qa/12-llm-redteam.md +53 -0
  10. codevira-2.0.0rc1/agents/qa/13-multi-ide-schema.md +62 -0
  11. codevira-2.0.0rc1/agents/qa/22-competitor-benchmark.md +70 -0
  12. codevira-2.0.0rc1/agents/qa/README.md +73 -0
  13. codevira-2.0.0rc1/agents/qa/tier2-scripts.md +242 -0
  14. codevira-2.0.0rc1/agents/qa/tier3-manual.md +167 -0
  15. {codevira-1.7.1 → codevira-2.0.0rc1/codevira.egg-info}/PKG-INFO +110 -7
  16. codevira-2.0.0rc1/codevira.egg-info/SOURCES.txt +229 -0
  17. codevira-2.0.0rc1/docs/alpha-tester-invites.md +124 -0
  18. codevira-2.0.0rc1/docs/demo/README.md +69 -0
  19. codevira-2.0.0rc1/docs/heroes/00-engine.md +388 -0
  20. codevira-2.0.0rc1/docs/heroes/01-decision-lock.md +271 -0
  21. codevira-2.0.0rc1/docs/heroes/02-anti-regression.md +269 -0
  22. codevira-2.0.0rc1/docs/heroes/03-scope-contract.md +272 -0
  23. codevira-2.0.0rc1/docs/heroes/04-blast-radius.md +298 -0
  24. codevira-2.0.0rc1/docs/heroes/05-cross-session.md +300 -0
  25. codevira-2.0.0rc1/docs/heroes/06-token-budget.md +292 -0
  26. codevira-2.0.0rc1/docs/heroes/07-live-style.md +272 -0
  27. codevira-2.0.0rc1/docs/heroes/08-decision-replay.md +295 -0
  28. codevira-2.0.0rc1/docs/heroes/09-intent-inference.md +257 -0
  29. codevira-2.0.0rc1/docs/heroes/10-ai-promotion.md +331 -0
  30. codevira-2.0.0rc1/docs/heroes/README.md +51 -0
  31. codevira-2.0.0rc1/docs/heroes/pillar-1-setup.md +392 -0
  32. codevira-2.0.0rc1/docs/hn-launch-day.md +224 -0
  33. codevira-2.0.0rc1/docs/local-pypi-https.md +184 -0
  34. codevira-2.0.0rc1/docs/qa-playbook.md +400 -0
  35. codevira-2.0.0rc1/docs/v2-completion-plan.md +211 -0
  36. codevira-2.0.0rc1/docs/v2-execution-log.md +2582 -0
  37. codevira-2.0.0rc1/docs/v2-master-plan.md +251 -0
  38. codevira-2.0.0rc1/docs/vs-other-memory-tools.md +110 -0
  39. codevira-2.0.0rc1/indexer/__init__.py +7 -0
  40. codevira-2.0.0rc1/indexer/_dedupe_migration.py +101 -0
  41. codevira-2.0.0rc1/indexer/_fork_safety.py +69 -0
  42. codevira-2.0.0rc1/indexer/_sqlite_util.py +84 -0
  43. codevira-2.0.0rc1/indexer/fix_history.py +626 -0
  44. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/global_db.py +54 -4
  45. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/index_codebase.py +349 -58
  46. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/outcome_tracker.py +89 -4
  47. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/sqlite_graph.py +296 -22
  48. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/__init__.py +1 -1
  49. codevira-2.0.0rc1/mcp_server/_ghost_check.py +88 -0
  50. codevira-2.0.0rc1/mcp_server/_project_inventory.py +276 -0
  51. codevira-2.0.0rc1/mcp_server/_prompts.py +82 -0
  52. codevira-2.0.0rc1/mcp_server/_repair_init.py +126 -0
  53. codevira-2.0.0rc1/mcp_server/_safe_crash.py +58 -0
  54. codevira-2.0.0rc1/mcp_server/agents_md.py +436 -0
  55. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/auto_init.py +69 -6
  56. codevira-2.0.0rc1/mcp_server/cli.py +1923 -0
  57. codevira-2.0.0rc1/mcp_server/cli_agents.py +220 -0
  58. codevira-2.0.0rc1/mcp_server/cli_budget.py +213 -0
  59. codevira-2.0.0rc1/mcp_server/cli_configure.py +855 -0
  60. codevira-2.0.0rc1/mcp_server/cli_hooks_admin.py +184 -0
  61. codevira-2.0.0rc1/mcp_server/cli_insights.py +337 -0
  62. codevira-2.0.0rc1/mcp_server/cli_projects.py +139 -0
  63. codevira-2.0.0rc1/mcp_server/cli_replay.py +136 -0
  64. codevira-2.0.0rc1/mcp_server/data/__pycache__/__init__.cpython-313.pyc +0 -0
  65. codevira-2.0.0rc1/mcp_server/data/hooks/post_tool_use.sh +37 -0
  66. codevira-2.0.0rc1/mcp_server/data/hooks/pre_tool_use.sh +57 -0
  67. codevira-2.0.0rc1/mcp_server/data/hooks/session_start.sh +41 -0
  68. codevira-2.0.0rc1/mcp_server/data/hooks/stop.sh +40 -0
  69. codevira-2.0.0rc1/mcp_server/data/hooks/user_prompt_submit.sh +42 -0
  70. codevira-2.0.0rc1/mcp_server/data/templates/agents_md.tmpl +3 -0
  71. codevira-2.0.0rc1/mcp_server/data/templates/canonical_block.md +81 -0
  72. codevira-2.0.0rc1/mcp_server/data/templates/claude_md.tmpl +3 -0
  73. codevira-2.0.0rc1/mcp_server/data/templates/copilot_instructions.tmpl +3 -0
  74. codevira-2.0.0rc1/mcp_server/data/templates/cursor_rules.mdc.tmpl +8 -0
  75. codevira-2.0.0rc1/mcp_server/data/templates/gemini_md.tmpl +3 -0
  76. codevira-2.0.0rc1/mcp_server/data/templates/windsurfrules.tmpl +3 -0
  77. codevira-2.0.0rc1/mcp_server/decision_replay.py +424 -0
  78. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/detect.py +76 -3
  79. codevira-2.0.0rc1/mcp_server/doctor.py +771 -0
  80. codevira-2.0.0rc1/mcp_server/engine/__init__.py +85 -0
  81. codevira-2.0.0rc1/mcp_server/engine/demo_policy.py +62 -0
  82. codevira-2.0.0rc1/mcp_server/engine/events.py +125 -0
  83. codevira-2.0.0rc1/mcp_server/engine/intent_classifier.py +214 -0
  84. codevira-2.0.0rc1/mcp_server/engine/policies/__init__.py +44 -0
  85. codevira-2.0.0rc1/mcp_server/engine/policies/_signature_detect.py +314 -0
  86. codevira-2.0.0rc1/mcp_server/engine/policies/ai_promotion.py +337 -0
  87. codevira-2.0.0rc1/mcp_server/engine/policies/anti_regression.py +190 -0
  88. codevira-2.0.0rc1/mcp_server/engine/policies/blast_radius.py +262 -0
  89. codevira-2.0.0rc1/mcp_server/engine/policies/cross_session.py +363 -0
  90. codevira-2.0.0rc1/mcp_server/engine/policies/decision_lock.py +255 -0
  91. codevira-2.0.0rc1/mcp_server/engine/policies/intent_inference.py +421 -0
  92. codevira-2.0.0rc1/mcp_server/engine/policies/live_style.py +445 -0
  93. codevira-2.0.0rc1/mcp_server/engine/policies/scope_contract.py +362 -0
  94. codevira-2.0.0rc1/mcp_server/engine/policies/token_budget.py +100 -0
  95. codevira-2.0.0rc1/mcp_server/engine/policy.py +160 -0
  96. codevira-2.0.0rc1/mcp_server/engine/promotion_score.py +208 -0
  97. codevira-2.0.0rc1/mcp_server/engine/runner.py +263 -0
  98. codevira-2.0.0rc1/mcp_server/engine/scope_contract.py +201 -0
  99. codevira-2.0.0rc1/mcp_server/engine/signals.py +436 -0
  100. codevira-2.0.0rc1/mcp_server/engine/token_meter.py +337 -0
  101. codevira-2.0.0rc1/mcp_server/engine/wiring/__init__.py +16 -0
  102. codevira-2.0.0rc1/mcp_server/engine/wiring/claude_code_hooks.py +368 -0
  103. codevira-2.0.0rc1/mcp_server/engine/wiring/mcp_dispatch.py +186 -0
  104. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/http_server.py +26 -0
  105. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/ide_inject.py +223 -7
  106. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/paths.py +98 -4
  107. codevira-2.0.0rc1/mcp_server/roadmap_drift.py +249 -0
  108. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/server.py +307 -11
  109. codevira-2.0.0rc1/mcp_server/setup_wizard.py +893 -0
  110. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/tools/graph.py +162 -6
  111. codevira-2.0.0rc1/mcp_server/tools/learning.py +575 -0
  112. codevira-2.0.0rc1/mcp_server/tools/playbook.py +205 -0
  113. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/tools/search.py +120 -5
  114. {codevira-1.7.1 → codevira-2.0.0rc1}/pyproject.toml +1 -1
  115. codevira-2.0.0rc1/tests/test__prompts.py +138 -0
  116. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_auto_init.py +75 -3
  117. codevira-2.0.0rc1/tests/test_call_edge_fk_safety.py +162 -0
  118. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_chunker.py +18 -7
  119. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_cli.py +305 -0
  120. codevira-2.0.0rc1/tests/test_cli_agents.py +375 -0
  121. codevira-2.0.0rc1/tests/test_cli_configure.py +1075 -0
  122. codevira-2.0.0rc1/tests/test_cli_insights.py +159 -0
  123. codevira-2.0.0rc1/tests/test_cli_projects.py +224 -0
  124. codevira-2.0.0rc1/tests/test_cli_replay.py +234 -0
  125. codevira-2.0.0rc1/tests/test_cli_version.py +51 -0
  126. codevira-2.0.0rc1/tests/test_dedupe_migration.py +249 -0
  127. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_detect.py +78 -11
  128. codevira-2.0.0rc1/tests/test_doctor.py +424 -0
  129. codevira-2.0.0rc1/tests/test_fk_safety_extended.py +178 -0
  130. codevira-2.0.0rc1/tests/test_fork_safety.py +206 -0
  131. codevira-2.0.0rc1/tests/test_ghost_check.py +116 -0
  132. codevira-2.0.0rc1/tests/test_hook_resilience.py +283 -0
  133. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_http_server.py +11 -4
  134. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_ide_inject.py +232 -8
  135. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_index_codebase.py +454 -0
  136. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_outcome_tracker.py +51 -0
  137. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_paths.py +119 -0
  138. codevira-2.0.0rc1/tests/test_record_decision.py +274 -0
  139. codevira-2.0.0rc1/tests/test_repair_init.py +191 -0
  140. codevira-2.0.0rc1/tests/test_retire_rule.py +271 -0
  141. codevira-2.0.0rc1/tests/test_roadmap_drift.py +385 -0
  142. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_server.py +134 -9
  143. codevira-2.0.0rc1/tests/test_setup_wizard.py +836 -0
  144. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_sqlite_graph.py +362 -0
  145. codevira-2.0.0rc1/tests/test_sqlite_util.py +115 -0
  146. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_tools_learning.py +307 -3
  147. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_tools_playbook.py +23 -10
  148. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_tools_search.py +20 -6
  149. codevira-2.0.0rc1/tests/test_watcher_circuit.py +124 -0
  150. codevira-1.7.1/codevira.egg-info/SOURCES.txt +0 -117
  151. codevira-1.7.1/indexer/__init__.py +0 -1
  152. codevira-1.7.1/mcp_server/cli.py +0 -964
  153. codevira-1.7.1/mcp_server/tools/learning.py +0 -244
  154. codevira-1.7.1/mcp_server/tools/playbook.py +0 -89
  155. {codevira-1.7.1 → codevira-2.0.0rc1}/LICENSE +0 -0
  156. {codevira-1.7.1 → codevira-2.0.0rc1}/MANIFEST.in +0 -0
  157. {codevira-1.7.1 → codevira-2.0.0rc1}/agents/builder.md +0 -0
  158. {codevira-1.7.1 → codevira-2.0.0rc1}/agents/developer.md +0 -0
  159. {codevira-1.7.1 → codevira-2.0.0rc1}/agents/documenter.md +0 -0
  160. {codevira-1.7.1 → codevira-2.0.0rc1}/agents/orchestrator.md +0 -0
  161. {codevira-1.7.1 → codevira-2.0.0rc1}/agents/planner.md +0 -0
  162. {codevira-1.7.1 → codevira-2.0.0rc1}/agents/reviewer.md +0 -0
  163. {codevira-1.7.1 → codevira-2.0.0rc1}/agents/tester.md +0 -0
  164. {codevira-1.7.1 → codevira-2.0.0rc1}/codevira.egg-info/dependency_links.txt +0 -0
  165. {codevira-1.7.1 → codevira-2.0.0rc1}/codevira.egg-info/entry_points.txt +0 -0
  166. {codevira-1.7.1 → codevira-2.0.0rc1}/codevira.egg-info/requires.txt +0 -0
  167. {codevira-1.7.1 → codevira-2.0.0rc1}/codevira.egg-info/top_level.txt +0 -0
  168. {codevira-1.7.1 → codevira-2.0.0rc1}/config.example.yaml +0 -0
  169. {codevira-1.7.1 → codevira-2.0.0rc1}/docs/how-i-built-persistent-memory-for-ai-agents.md +0 -0
  170. {codevira-1.7.1 → codevira-2.0.0rc1}/docs/linkedin-article-ai-agent-memory.md +0 -0
  171. {codevira-1.7.1 → codevira-2.0.0rc1}/docs/linkedin-post-ai-agent-memory.md +0 -0
  172. {codevira-1.7.1 → codevira-2.0.0rc1}/docs/medium-your-ai-coding-agent-has-amnesia.md +0 -0
  173. {codevira-1.7.1 → codevira-2.0.0rc1}/docs/roadmap.md +0 -0
  174. {codevira-1.7.1 → codevira-2.0.0rc1}/graph/_schema.yaml +0 -0
  175. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/chunker.py +0 -0
  176. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/graph_generator.py +0 -0
  177. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/rule_learner.py +0 -0
  178. {codevira-1.7.1 → codevira-2.0.0rc1}/indexer/treesitter_parser.py +0 -0
  179. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/__main__.py +0 -0
  180. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/crash_logger.py +0 -0
  181. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/__init__.py +0 -0
  182. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/agents/builder.md +0 -0
  183. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/agents/developer.md +0 -0
  184. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/agents/documenter.md +0 -0
  185. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/agents/orchestrator.md +0 -0
  186. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/agents/planner.md +0 -0
  187. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/agents/reviewer.md +0 -0
  188. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/agents/tester.md +0 -0
  189. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/config.example.yaml +0 -0
  190. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/coding-standards.md +0 -0
  191. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/engineering-excellence.md +0 -0
  192. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/git-cicd-governance.md +0 -0
  193. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/git_commits.md +0 -0
  194. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/incremental-updates.md +0 -0
  195. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/master_rule.md +0 -0
  196. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/multi-language.md +0 -0
  197. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/persistence.md +0 -0
  198. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/resilience-observability.md +0 -0
  199. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/smoke-testing.md +0 -0
  200. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/data/rules/testing-standards.md +0 -0
  201. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/gitignore.py +0 -0
  202. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/global_sync.py +0 -0
  203. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/launchd.py +0 -0
  204. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/log_retention.py +0 -0
  205. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/migrate.py +0 -0
  206. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/prompts.py +0 -0
  207. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/tools/__init__.py +0 -0
  208. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/tools/changesets.py +0 -0
  209. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/tools/code_reader.py +0 -0
  210. {codevira-1.7.1 → codevira-2.0.0rc1}/mcp_server/tools/roadmap.py +0 -0
  211. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/coding-standards.md +0 -0
  212. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/engineering-excellence.md +0 -0
  213. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/git-cicd-governance.md +0 -0
  214. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/git_commits.md +0 -0
  215. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/incremental-updates.md +0 -0
  216. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/master_rule.md +0 -0
  217. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/persistence.md +0 -0
  218. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/resilience-observability.md +0 -0
  219. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/smoke-testing.md +0 -0
  220. {codevira-1.7.1 → codevira-2.0.0rc1}/rules/testing-standards.md +0 -0
  221. {codevira-1.7.1 → codevira-2.0.0rc1}/setup.cfg +0 -0
  222. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_crash_logger.py +0 -0
  223. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_gitignore.py +0 -0
  224. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_global_db.py +0 -0
  225. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_global_sync.py +0 -0
  226. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_graph_generator.py +0 -0
  227. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_launchd.py +0 -0
  228. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_log_retention.py +0 -0
  229. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_migrate.py +0 -0
  230. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_prompts.py +0 -0
  231. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_rule_learner.py +0 -0
  232. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_tools_changesets.py +0 -0
  233. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_tools_code_reader.py +0 -0
  234. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_tools_graph.py +0 -0
  235. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_tools_roadmap.py +0 -0
  236. {codevira-1.7.1 → codevira-2.0.0rc1}/tests/test_treesitter_parser.py +0 -0
@@ -11,6 +11,400 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ### Planned for v1.9
15
+
16
+ - **Interactive checkbox UI for `codevira configure`**. The current
17
+ prompt asks users to type comma-separated indices ("1,3,5") into a
18
+ numbered list — fine for 3–5 items, awkward for 15+. v1.9 will add
19
+ arrow-key navigation + space-to-toggle multi-select, matching the
20
+ UX of `npm create vite`, `gh repo create`, etc.
21
+
22
+ **Design (opt-in dependency):**
23
+ - Default install (`pip install codevira`) keeps the current numbered
24
+ prompt — zero new dependencies, zero new failure modes.
25
+ - `pip install codevira[ui]` pulls `questionary` (~3 MB). When
26
+ importable AND `sys.stdin.isatty()` AND `os.environ.get("TERM")
27
+ != "dumb"`, `prompt_multi_select` switches to the checkbox UI.
28
+ - `--dirs` and `--extensions` flags continue to work for both paths
29
+ (CI / scripts / non-interactive use).
30
+
31
+ **Why deferred from v1.8.1:** v1.8.1 is a pure crash hotfix; mixing
32
+ in a UX feature would slow the release and complicate testing. The
33
+ numbered prompt has shipped since v1.8.0 and works fine — this is
34
+ polish, not a fix.
35
+
36
+ **Implementation notes for whoever picks this up:**
37
+ - Site: `mcp_server/cli_configure.py:prompt_multi_select` (line ~176)
38
+ - Add `[ui]` extra in `pyproject.toml` with `questionary>=2.0`
39
+ - TTY detection already exists (`NonInteractiveError` raised on
40
+ `not sys.stdin.isatty()`); extend it to also branch on
41
+ questionary availability
42
+ - Test surface: split into two test classes — one mocks `input()`
43
+ (current behavior), one mocks `questionary.checkbox()`. Skip the
44
+ questionary tests when not installed.
45
+ - Accessibility: keep the numbered prompt for screen-reader users;
46
+ document `CODEVIRA_DISABLE_TUI=1` env var as the override.
47
+ - No schema changes, no public-API changes.
48
+
49
+ ### Other v1.9 candidates (no design yet)
50
+
51
+ - Watcher restart circuit breaker (deferred from v1.8.1 — see "Out of
52
+ scope" below).
53
+ - Refactor `_enable_wal_with_retry` into a shared `indexer/_sqlite_util.py`
54
+ (deferred from v1.8.1).
55
+ - Watcher hot-reload of `config.yaml` on disk changes.
56
+ - `crash_logger` size cap or rotation (currently grows unbounded).
57
+
58
+ ---
59
+
60
+ ## [1.8.1] — 2026-05-02 — Production Hotfix from Real-World Crash Logs
61
+
62
+ Pure bug-fix release. No new features, no schema changes, no public-API
63
+ changes. Motivated by a real production failure on the maintainer's
64
+ machine: **43 crashes in 70 minutes** logged by `crash_logger` between
65
+ 07:37 and 08:47 on 2026-04-24, all under
66
+ `WHERE: background watcher: incremental reindex`.
67
+
68
+ Breakdown:
69
+ - **41 × `InterruptedError` (EINTR, errno 4)** in
70
+ `_get_changed_files`'s rglob walk, all walking
71
+ `~/Library/Group Containers/...` (WhatsApp, Office, etc.) and
72
+ `~/Library/Containers/...` (TextEdit, mediaanalysisd, …).
73
+ - **2 × `OperationalError("database is locked")`** in
74
+ `SQLiteGraph.add_symbol` and `remove_symbols_for_file`.
75
+
76
+ Root cause: a rogue project data dir with
77
+ `metadata.json.original_path = "/Users/sachin"` (the user's `$HOME`).
78
+ `auto_detect_project` saw `Library`, `Downloads`, `Documents`, `go` as
79
+ "subdirs", and the watcher then walked huge unrelated trees. v1.8.0's
80
+ bootstrap (`cmd_configure`, `auto_init`) didn't refuse `$HOME`, and
81
+ neither did `cmd_init`.
82
+
83
+ ### Fixed
84
+
85
+ - **Refuse `$HOME` and system top-levels as a project root** (the
86
+ critical fix — eliminates 41 of the 43 production crashes by
87
+ preventing the rogue project from forming). New helper
88
+ `mcp_server.paths.is_invalid_project_root()` rejects `$HOME`, `/`,
89
+ `/Users`, `/home`, `/tmp`, `/private/tmp`, `/var`, `/private/var`,
90
+ `/etc`, `/opt` (plus the macOS-resolved `/private/etc` and
91
+ `/System/Volumes/Data/home` forms). Wired into TEN distinct sites
92
+ covering every state-creating path the codebase exposes:
93
+ - **CLI entry points (6):** `cmd_configure`, `cmd_init`, `cmd_index`,
94
+ `cmd_register`, `cmd_serve` (refuses both regular serve AND
95
+ `--install-service`; `--uninstall-service` is exempt so users can
96
+ always remove old launchd plists), `auto_init._run_background_init`.
97
+ - **MCP server entry points (2):** `mcp_server.server.main()` (stdio
98
+ transport) and `mcp_server.http_server.run_http_server()` (HTTP
99
+ transport). Both are reachable directly via `python -m`, not just
100
+ through the CLI.
101
+ - **Direct module entry (1):** `indexer.index_codebase.__main__`
102
+ (`python -m indexer.index_codebase --full | --watch | (default)`)
103
+ — this is a separate CLI surface from the `codevira` binary;
104
+ pre-revalidation it bypassed `cli.cmd_index`'s guard entirely.
105
+ `--status` is exempt (read-only, bails on missing graph.db).
106
+ - **Defense-in-depth (1):** `indexer.index_codebase.start_background_watcher`
107
+ refuses to start the watcher even if a programmatic caller bypasses
108
+ every entry-point guard above. Returns `None`; both `cmd_watch` and
109
+ `server.main` handle `None` correctly.
110
+
111
+ The `server.main()` and `run_http_server` guards are the most critical
112
+ — without them, a user upgrading from v1.8.0 *without* first running
113
+ `clean --orphans` would still hit the original crash mode: their
114
+ leftover rogue `config.yaml` would drive `start_background_watcher`
115
+ into walking `~/Library/Group Containers/...`, which is exactly where
116
+ the 41 production `InterruptedError` crashes came from. The
117
+ `start_background_watcher` defense-in-depth guard is a belt-and-braces
118
+ fallback — even if all entry-point guards regressed, the watcher
119
+ itself cannot start with an invalid project root.
120
+
121
+ `cmd_index`, `cmd_register`, `cmd_serve --install-service` close
122
+ defense-in-depth holes that pre-revalidation could have leaked state
123
+ on disk: silent dead-weight `mkdir` of
124
+ `~/.codevira/projects/<HOME_slug>/{graph,codeindex}/`, IDE configs
125
+ pinned to broken paths, and persistent launchd plists pointing at
126
+ `$HOME`. Pre-release revalidation across three rounds walked every
127
+ CLI sub-command, the stdio/HTTP server entry, the launchd
128
+ `--install-service` path, the `start_background_watcher` direct call
129
+ path, and the production-replay scenario (synthetic v1.8.0 leftover
130
+ rogue + `codevira` from `$HOME`). All paths refuse cleanly with zero
131
+ new crashes; legitimate projects untouched.
132
+
133
+ `auto_init` sets `_progress["status"] = "error"` so the MCP server
134
+ stops looping on retries.
135
+
136
+ - **`SQLiteGraph` WAL with retry — port of the v1.8.0 GlobalDB fix**
137
+ (eliminates the 2 of 43 `database is locked` crashes). v1.8.0 fixed
138
+ the same race for `GlobalDB` after round 3 of binocular review;
139
+ `SQLiteGraph` was missed. `__init__` now opens with `timeout=30`,
140
+ enables WAL via the same retry loop pattern, and sets
141
+ `PRAGMA busy_timeout=30000` for subsequent writes.
142
+
143
+ - **`_get_changed_files` and `cmd_full_rebuild` rglob loops tolerate
144
+ `OSError`** (defense-in-depth — even on legitimate projects,
145
+ transient `EINTR`, `PermissionError`, or "directory changed during
146
+ iteration" should not kill the whole reindex). Per-watch-dir scope
147
+ matches `watchdog.Observer`'s thread-per-watch model: the
148
+ microsecond-spaced parallel-thread crashes (3 within 6μs at
149
+ 08:15:29 and 08:26:04 in the production log) confirm this is the
150
+ right granularity. `InterruptedError` is a subclass of `OSError`, so
151
+ the broader catch covers EINTR plus other transient walk failures.
152
+
153
+ ### Added
154
+
155
+ - **`codevira clean --orphans`** — recovery path for users already hit
156
+ by the `$HOME`-bootstrap bug on v1.8.0. Walks
157
+ `~/.codevira/projects/*/metadata.json`; for each entry whose
158
+ `original_path` is rejected by `is_invalid_project_root()` OR no
159
+ longer exists on disk, removes the data dir and deletes the matching
160
+ row from `~/.codevira/global.db`. Reuses the existing `--dry-run`
161
+ and `-y/--yes` flags. Without this, affected users would need to
162
+ `rm -rf` and run raw sqlite by hand.
163
+
164
+ - **Denylist macOS/Linux/cloud-sync user-data dirs in
165
+ `auto_detect_project`** (defense-in-depth). `_SKIP_DIRS` extended
166
+ with `Library`, `Downloads`, `Music`, `Movies`, `Pictures`,
167
+ `Desktop`, `Public`, `Applications`, `Videos`, `Templates`, plus
168
+ cloud-sync top-levels (`Dropbox`, `iCloud Drive`, `OneDrive`,
169
+ `Google Drive`, `Box`). Even if `is_invalid_project_root` somehow
170
+ misses (e.g. a user passes `--project-dir` to a `$HOME`-shaped
171
+ layout), these never show up in `watched_dirs`. A user who
172
+ legitimately has a project named e.g. `Library` can still pass
173
+ `codevira configure --dirs Library` to opt in.
174
+
175
+ ### Out of scope (deferred to v1.9)
176
+
177
+ - **Watcher restart circuit breaker.** Crash log shows ~60s gaps
178
+ between EINTR crashes — no backoff. Adding a circuit breaker is real
179
+ design work; the rglob `OSError` tolerance closes the immediate
180
+ hole.
181
+ - **Refactoring `_enable_wal_with_retry` to a shared util.** 25 lines
182
+ of duplication for one patch cycle is the right call; touching
183
+ `GlobalDB`'s tested-in-v1.8.0 code is higher risk.
184
+ - **`crash_logger` size cap or rotation.** Log file is ~97KB now; will
185
+ grow unbounded over time. Out of scope for hotfix; flagged for v1.9.
186
+
187
+ ---
188
+
189
+ ## [1.8.0] — 2026-04-23 — Memory Sharpening + Config UX
190
+
191
+ Three internal improvements that make the memory we already capture **sharper**,
192
+ without making it heavier. Zero new MCP tools. Zero new tables. The public API
193
+ shape changes only one thing: `get_session_context()` gains a `focus_source`
194
+ field (~10 tokens, additive, backwards-compatible).
195
+
196
+ The problem this release solves:
197
+ - `get_session_context()` returned the 3 newest decisions by timestamp —
198
+ regardless of whether they had anything to do with the current task.
199
+ - `search_decisions()` ordered purely by recency — a `file_path` match
200
+ was no better than a match buried in an unrelated session summary.
201
+ - `log_session()` inserted every decision unconditionally — a day of
202
+ iterative agent work logged the same intent 5+ times.
203
+
204
+ ### Fixed
205
+
206
+ - **MCP `serverInfo.version` reported the MCP library version, not codevira's**
207
+ (pre-existing bug, surfaced during v1.8 install verification on Python
208
+ 3.13). `Server("codevira")` was constructed without a `version=` argument,
209
+ so the framework defaulted to its own pip-package version (e.g. `1.27.0`)
210
+ in the JSON-RPC `initialize` handshake response. Clients use this field
211
+ for telemetry and version gating, so the wrong value misled them.
212
+ One-line fix: `Server("codevira", version=__version__)`.
213
+ - **`get_session_context()` read the wrong dict key** (pre-existing bug).
214
+ `list_open_changesets()` returns `{"open_changesets": [...], ...}`, but
215
+ `get_session_context` looked for `"changesets"`. The `open_changesets`
216
+ field in the session-context response was **always empty** in production.
217
+ Tests didn't catch it because mocks used the same wrong key.
218
+
219
+ - **`GlobalDB` concurrent-open race condition** (pre-existing bug — latent
220
+ since v1.6's centralized storage introduced shared `~/.codevira/global.db`).
221
+ `PRAGMA journal_mode=WAL` requires an exclusive lock and — unlike normal
222
+ SQL — does NOT honour `sqlite3`'s `busy_timeout`. When multiple processes
223
+ or threads opened the same fresh database concurrently (e.g. several
224
+ projects' first-ever `codevira register` running in parallel, or the
225
+ `global_sync` background export racing the MCP server thread), one or
226
+ more would raise `OperationalError('database is locked')` and silently
227
+ fail to register. The test `test_concurrent_access_from_threads` was
228
+ flaky at 60% failure rate, hinting at the real issue. Fixed with WAL-
229
+ enable retry loop + short-circuit when WAL is already active. Stability
230
+ verified at 20/20 passes across 20 test runs.
231
+
232
+ ### Changed
233
+
234
+ - **Focus-weighted `recent_decisions` in `get_session_context()`**. Instead
235
+ of chronological "newest 3", decisions are now ranked by what the agent
236
+ is currently focused on:
237
+ 1. Open changeset with `files_pending` → focus = first file path of the
238
+ most-recently-created changeset.
239
+ 2. Strong `current_phase.next_action` signal → focus = extracted keywords
240
+ (rejects short or stop-list-only actions like "continue work").
241
+ 3. Otherwise → chronological fallback (unchanged behaviour).
242
+ If focus returns fewer than 3, the list pads with `get_recent_decisions()`.
243
+ New response field `focus_source` (`"open_changeset:<id>"`, `"next_action"`,
244
+ or `null`) lets the agent see *why* it got these decisions.
245
+
246
+ - **Smarter `search_decisions()` ranking**. SQL now adds `file_path` to both
247
+ the WHERE clause and a CASE-based ORDER BY:
248
+ `file_path match (0) > decision text (1) > context (2) > summary-only (3)`,
249
+ then newest first within each tier. Searching for `"src/auth.py"` now
250
+ surfaces file-path matches even when the decision text doesn't mention
251
+ the path.
252
+
253
+ - **Decision dedup on write**. `log_session()` now skips a new decision
254
+ if it has a `file_path` and its token-set overlaps ≥ 80% with any of
255
+ the 5 most recent decisions for that same file. The session row is
256
+ always created; only redundant *decisions* are dropped. Short
257
+ decisions (< 3 tokens) and decisions without `file_path` are always
258
+ inserted.
259
+
260
+ ### Added
261
+
262
+ - `focus_source` field on `get_session_context()` response (≈10 tokens).
263
+ - `mcp_server.tools.learning._infer_focus()` — pure helper, module-private.
264
+ - `indexer.sqlite_graph._is_duplicate()` — pure token-overlap helper,
265
+ module-private, independently testable.
266
+ - **`codevira configure`** — new CLI subcommand. Scans your project
267
+ (gitignore-aware via existing `discover_source_files()`), shows discovered
268
+ directories and file extensions with counts, lets you pick via a numbered-
269
+ list prompt, writes the choices back to `.codevira/config.yaml`, and offers
270
+ to rebuild the index. Non-interactive:
271
+ `codevira configure --dirs src,lib --extensions .py,.ts --no-reindex`.
272
+ Solves the AgentStore-style "0 chunks indexed" case where
273
+ `auto_detect_project()` mis-guesses a monorepo layout.
274
+ When `config.yaml` is missing (normal state after `codevira register` but
275
+ before the first MCP tool call), `configure` auto-bootstraps it in full
276
+ parity with `auto_init`'s first-init path: writes `metadata.json` (rename-
277
+ resilient lookup via `git_remote`) and registers the project in
278
+ `~/.codevira/global.db` for cross-project intelligence. Missing these on
279
+ earlier drafts would have left the project invisible to rename-resilient
280
+ path lookup and absent from global memory until the first session log.
281
+ - **Zero-chunks safety hint at index time.** When `codevira index --full` or
282
+ `codevira index` (incremental, project-wide) matches no files against your
283
+ `watched_dirs` + `file_extensions`, the indexer now prints a one-line
284
+ remedy pointing at `codevira configure`. Output goes to **stderr** (not
285
+ stdout) so the hint never leaks into the MCP JSON-RPC wire when
286
+ `start_background_full_index` runs during auto_init inside the MCP server
287
+ process. Also logged at WARNING level so background invocations
288
+ (auto-init, launchd watcher) leave a trace regardless of terminal
289
+ capture. Does NOT fire for caller-scoped incremental runs (e.g. the
290
+ `refresh_index` MCP tool targeting a specific file) — zero matches there
291
+ is the caller's choice, not a misconfiguration.
292
+ - `codevira register` success banner now nudges toward `codevira configure`.
293
+
294
+ ### Internal
295
+
296
+ - 87 new tests:
297
+ - 34 for v1.8 memory sharpening (focus inference priority rules, ranking
298
+ tier ordering, dedup threshold behaviour, session-row-always-created
299
+ invariant, NULL file_path fallback, session_id filtering + new ranking SQL)
300
+ - 43 for `codevira configure` (scan_project with centralized-mode
301
+ decoupling + skip_dirs honoring, multi-select prompt incl. non-TTY
302
+ fallback + Ctrl+C clean-abort, config writer preserve/dedupe/idempotency,
303
+ orchestrator edge cases incl. bootstrap on missing config, dry-run disk
304
+ safety, corrupt-YAML handling, empty-extensions safety, PermissionError
305
+ friendly wrapper, `--dirs`/`--extensions` normalization)
306
+ - 10 for the zero-chunks hint (unit tests of the helper proving it writes
307
+ to stderr not stdout + integration tests proving it fires ONLY for full
308
+ or project-wide-incremental scans, not caller-scoped or normal "no files
309
+ changed")
310
+ - Full test suite: **1,398 passing, 0 deterministic failures** (up from
311
+ 1,306 at v1.7.1 → +92). The two "pre-existing watchdog failures" that
312
+ haunted earlier drafts of this CHANGELOG turned out to be an environment
313
+ issue in a single dev machine (system Python 3.9 without `watchdog`);
314
+ the pipx-installed v1.8.0 environment has all required deps. The one
315
+ pre-existing flaky test (`test_concurrent_access_from_threads`) is now
316
+ fixed by the `GlobalDB` WAL-enable retry loop described above.
317
+
318
+ ### Verified environments
319
+
320
+ - **macOS (APFS)** + Python 3.9 system + Python 3.11 pipx: full regression
321
+ passes; all interactive + non-interactive flows manually verified on three
322
+ real projects (AgentStore, UDAP, ToolsConnector).
323
+ - **Cross-process + thread concurrency**: stress-tested (12 threads × 20
324
+ writes, 8 subprocesses × 25 writes, 100 concurrent-read/write cycles) —
325
+ 0 errors, 0 data loss.
326
+
327
+ ### Unverified environments / known gaps (candidates for v1.8.1 or v1.9)
328
+
329
+ - **Windows**: `os.replace` atomicity weakens when the destination is open
330
+ by another process. If a Windows user has Claude Code reading
331
+ `config.yaml` at the moment `codevira configure` writes it, the write
332
+ may fail with `PermissionError`. Pre-existing risk; v1.8 does not fix
333
+ and does not regress. Windows smoke-testing is a v1.9 scope item.
334
+ - **Network filesystems (NFS, SMB)**: atomic-replace guarantees are weaker
335
+ on network FS. Unlikely in solo-dev environments (codevira's target);
336
+ possible in enterprise setups.
337
+ - **Python 3.10, 3.12**: The APIs `codevira configure` uses are stable
338
+ across 3.10+. Syntax-verified against 3.10+. **Python 3.13.7
339
+ empirically verified** during v1.8 install validation (full pipx
340
+ install + MCP handshake working). 3.10 and 3.12 are syntax-verified
341
+ only. CI on all Python versions is a v1.8.x task.
342
+ - **Case-insensitive filesystem slugs**: On macOS APFS (default), paths
343
+ differing only in case (`~/Documents` vs `~/documents`) produce
344
+ different slugs for the same physical directory, creating split state.
345
+ Pre-existing since v1.5 — fixing requires a migration step for existing
346
+ users and is scoped to v1.9.
347
+ - **Interactive TTY automated coverage**: The interactive prompt flow is
348
+ tested via mocked stdin + `sys.stdin.isatty`. A real terminal session
349
+ was manually verified during development; automated TTY testing (via
350
+ pexpect or similar) is a v1.8.x nice-to-have.
351
+ - **MCP client post-upgrade reload**: `codevira register` writes config;
352
+ each MCP client (Claude Code, Cursor, Windsurf, Antigravity, Claude
353
+ Desktop) needs to reload to see changes. Verified for Claude Code.
354
+ Other clients may have edge cases that surface post-release.
355
+
356
+ ### Known test flake (NOT v1.8; pre-existing)
357
+
358
+ - `test_chunk_error_continues_to_next_file` fails ~3/10 times in the full
359
+ suite on Python 3.9 (system) due to a chromadb+pydantic version
360
+ incompatibility raising `TypeError` during `import chromadb`, which
361
+ `_check_search_deps()` doesn't catch (it only catches `ImportError`).
362
+ **Not introduced by v1.8 and not touched by v1.8 code paths** — verified
363
+ by measuring the same 3/10 flake rate on clean v1.7.1. v1.8 deliberately
364
+ does not widen the exception catch because it would silently mask real
365
+ dep issues; a proper fix belongs in a targeted follow-up PR with its own
366
+ test coverage. Does not affect production users — the condition requires
367
+ a specific dev environment (Py 3.9 + mismatched chromadb/pydantic).
368
+ - Regression guards added by the binocular review pass:
369
+ - `test_centralized_mode_data_dir_and_project_root_decoupled` — catches
370
+ the production bug where `data_dir.parent` was used where
371
+ `get_project_root()` was required (centralized mode v1.6+).
372
+ - `test_bootstraps_config_when_missing` — catches the workflow where
373
+ `codevira register` was run but config.yaml hasn't been written yet
374
+ (auto_init hadn't fired because no MCP tool call had happened).
375
+ - `test_bootstrap_respects_dry_run` — catches bootstrap writing disk
376
+ during `--dry-run`.
377
+ - `test_fires_on_stderr_when_not_quiet` — catches zero-chunks hint
378
+ leaking to stdout, which would corrupt the MCP JSON-RPC wire in stdio
379
+ mode.
380
+ - `test_empty_extensions_non_interactive_errors_exit_2` — catches
381
+ `--extensions ""` being silently accepted, which would write an empty
382
+ `file_extensions: []` and re-create the zero-chunks bug.
383
+ - `test_ctrl_c_in_prompt_returns_exit_0` — catches KeyboardInterrupt
384
+ propagating a traceback to the user.
385
+ - `test_permission_error_on_write_exits_1` — catches PermissionError /
386
+ OSError propagating a traceback when config.yaml isn't writable.
387
+ - `test_honors_user_skip_dirs_from_config` — catches scan_project
388
+ ignoring the user's explicit skip_dirs in config.yaml.
389
+
390
+ ### Known limitations
391
+
392
+ - A running file-watcher or live MCP server session won't pick up config
393
+ changes until it restarts (the watcher snapshots `watched_dirs` at boot).
394
+ Restart your AI tool after `codevira configure` to apply changes.
395
+ - `yaml.safe_dump` doesn't preserve comments in `config.yaml`. First-time
396
+ configs are auto-generated and have no comments; users who hand-edited
397
+ may see formatting normalized after `codevira configure` rewrites the file.
398
+
399
+ ### Unchanged (intentionally)
400
+
401
+ - No new MCP tools. No new tables. No schema migration.
402
+ - `search_decisions()` method signature unchanged.
403
+ - `log_session()` method signature unchanged.
404
+ - `get_session_context()` keys are additive — no removals.
405
+ - `auto_init.py`, `detect.py`, `gitignore.py`, and `metadata.json` writer
406
+ untouched; `codevira configure` reuses all existing detection machinery.
407
+
14
408
  ---
15
409
 
16
410
  ## [1.7.1] — 2026-04-22 — Search Timeout Fix & Version Display
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: codevira
3
- Version: 1.7.1
3
+ Version: 2.0.0rc1
4
4
  Summary: Persistent adaptive memory for AI coding agents — MCP server with context graph, semantic search, adaptive learning, roadmap tracking, and cross-tool continuity.
5
5
  Author-email: Sachin Shelke <sachin.worldnet@gmail.com>
6
6
  License: MIT
@@ -41,10 +41,11 @@ Provides-Extra: all
41
41
 
42
42
  > **One memory layer for every AI coding tool you use.** Switch between Claude Code, Cursor, Windsurf, and Antigravity without losing context, decisions, or progress.
43
43
 
44
- [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
44
+ [![PyPI version](https://img.shields.io/pypi/v/codevira?color=orange)](https://pypi.org/project/codevira/)
45
+ [![Python](https://img.shields.io/pypi/pyversions/codevira?color=blue)](https://pypi.org/project/codevira/)
46
+ [![Downloads](https://static.pepy.tech/badge/codevira)](https://pepy.tech/project/codevira)
45
47
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
46
48
  [![MCP](https://img.shields.io/badge/protocol-MCP-purple)](https://modelcontextprotocol.io)
47
- [![Version](https://img.shields.io/badge/version-1.7.1-orange)](CHANGELOG.md)
48
49
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](CONTRIBUTING.md)
49
50
 
50
51
  **Built for solo developers** working on local projects with AI agents. Codevira gives every AI tool you use access to the same persistent project memory — so you stop re-explaining your codebase every session, stop losing carefully-made decisions, and stop burning tokens on re-discovery.
@@ -73,6 +74,43 @@ Your AI agent reads the same 12 files every session before doing any actual work
73
74
 
74
75
  ---
75
76
 
77
+ ## What's new in v2.0
78
+
79
+ > 30-second demo: **[docs/demo/codevira-demo.mp4](docs/demo/codevira-demo.mp4)**
80
+
81
+ v2.0 ships **10 AI-guardian capabilities** that work together as a single engine intercepting every AI tool call (Edit, Write, prompt submit, session start). They turn the persistent memory layer from passive (the AI looks things up) into active (codevira protects you when the AI is about to do something inconsistent with your project's history).
82
+
83
+ | # | Hero | What it does | Trigger |
84
+ |---|---|---|---|
85
+ | 4 | **Blast-Radius Veto** | Block edits to files with N+ callers without explicit acknowledgment | before Edit/Write |
86
+ | 1 | **Decision Lock** | Refuse edits to files marked `do_not_revert` | before Edit/Write |
87
+ | 2 | **Anti-Regression Memory** | Block edits that re-introduce previously-fixed bugs | before Edit/Write |
88
+ | 3 | **Scope Contract Lock** *(off-by-default)* | Refuse edits to files outside what your prompt asked for | prompt → enforce on Edit |
89
+ | 5 | **Cross-Session Consistency** | Inject related past decisions when you submit a prompt | prompt submit |
90
+ | 9 | **Proactive Intent Inference** | Pre-fetch fixes/decisions/blast-radius for the AI's first turn | prompt submit |
91
+ | 6 | **Token Budget Live View** | Track AI token spend per session; `codevira budget` shows breakdown | every tool call |
92
+ | 7 | **Live Style Enforcement** | Warn on snake_case/camelCase/quote-style violations vs your project's preferences | after Edit/Write |
93
+ | 10 | **AI Promotion Score** | Auto-score decisions by outcome history; `codevira insights` weekly digest | session start |
94
+ | 8 | **Decision Replay** | Browse decision timeline as terminal / markdown / HTML; MCP resource for Claude Desktop; `codevira replay` CLI | on demand |
95
+
96
+ All 10 work behind the scenes by default. No new vocabulary to learn.
97
+
98
+ ### v2.0 CLI surface
99
+
100
+ ```text
101
+ codevira setup # one-prompt setup; replaces `register`
102
+ codevira doctor # health check with ✓/⚠/✗ + exact fix commands
103
+ codevira agents # regen per-IDE nudge files (CLAUDE.md, AGENTS.md, etc.)
104
+ codevira hooks install # install Claude Code lifecycle hooks
105
+ codevira budget # token-spend per session (Hero 6)
106
+ codevira insights # stable / reverted decisions (Hero 10)
107
+ codevira replay # browse decision timeline (Hero 8)
108
+ ```
109
+
110
+ For the honest "vs Mem0 / claude-mem / MemPalace" comparison see **[docs/vs-other-memory-tools.md](docs/vs-other-memory-tools.md)**.
111
+
112
+ ---
113
+
76
114
  ## How It Works
77
115
 
78
116
  Codevira is a [Model Context Protocol](https://modelcontextprotocol.io) server that runs locally and gives any AI tool a structured, queryable memory of your codebase:
@@ -117,13 +155,29 @@ pip install codevira
117
155
 
118
156
  Installs the full toolkit (23 AI-facing MCP tools + 12 admin/CLI tools) out of the box. Semantic search downloads a ~90MB embedding model on first use.
119
157
 
120
- ### 2. Register with your AI tools
158
+ ### 2. Set up every AI tool you have
121
159
 
122
160
  ```bash
123
- codevira register
161
+ codevira setup
124
162
  ```
125
163
 
126
- This one-time global command injects Codevira's MCP config into all detected AI tools — Claude Code, Cursor, Windsurf, Claude Desktop, and Google Antigravity. Run it from anywhere; no project directory needed.
164
+ This one-prompt v2.0 command:
165
+ - Detects every AI tool installed on your machine (Claude Code, Cursor, Windsurf, Antigravity, Codex CLI, GitHub Copilot, Claude Desktop, Continue, Aider, Roo Code, Cline)
166
+ - Writes per-IDE nudge files so each tool knows codevira exists (`CLAUDE.md`, `AGENTS.md`, `.cursor/rules/codevira.mdc`, `.windsurfrules`, `GEMINI.md`, `.github/copilot-instructions.md`)
167
+ - Installs Claude Code lifecycle hooks (SessionStart, PreToolUse, PostToolUse, UserPromptSubmit, Stop) — turns codevira from passive memory into the **AI guardian** described above
168
+ - Injects MCP server config into each detected tool
169
+
170
+ Idempotent — re-run any time to re-sync. Use `--dry-run` to preview, `--ide=claude` to limit to one tool.
171
+
172
+ > **Migrating from v1.x?** If you've been using `codevira register`, switch to `codevira setup` — register only injects MCP server config; setup ALSO writes the nudge files + lifecycle hooks that power the v2.0 hero capabilities.
173
+
174
+ ### 2.5 Verify the install (optional but recommended)
175
+
176
+ ```bash
177
+ codevira doctor
178
+ ```
179
+
180
+ Runs 9 health checks, prints `✓` / `⚠` / `✗` per check, and shows the **exact command** to fix anything that's not green. Read-only — never modifies anything.
127
181
 
128
182
  ### 3. Start using
129
183
 
@@ -142,6 +196,24 @@ Ask your AI agent to call `get_roadmap()` — it should return your current phas
142
196
 
143
197
  > **Note:** Restart your AI tool after running `codevira register` to pick up the new MCP config.
144
198
 
199
+ ### Customizing what's indexed
200
+
201
+ Codevira tries to auto-detect your project's source layout, but monorepo or non-standard layouts sometimes slip through — you'll notice when `codevira index --full` reports `0 chunks indexed` and prints a hint pointing you here.
202
+
203
+ ```bash
204
+ cd your-project
205
+ codevira configure
206
+ ```
207
+
208
+ Scans your project (gitignore-aware), shows discovered directories and extensions with file counts, and lets you pick which to watch via a numbered-list prompt. It writes your choices back to `.codevira/config.yaml` and offers to rebuild the index.
209
+
210
+ **Non-interactive** (useful in scripts or CI):
211
+ ```bash
212
+ codevira configure --dirs src,packages,apps --extensions .py,.ts,.tsx --no-reindex
213
+ ```
214
+
215
+ After changing watched directories, **restart your AI tool** — running watchers snapshot the dir set at boot.
216
+
145
217
  ### Manual config (only if auto-inject didn't detect your tool)
146
218
 
147
219
  Codevira supports two transports. Use the right one for your client:
@@ -558,7 +630,28 @@ The `search_codebase` tool will be hidden from your AI agent; all other tools wo
558
630
 
559
631
  Want to understand the full story behind why this was built, the design decisions, what didn't work, and how it compares to other tools in the ecosystem?
560
632
 
561
- Read the full write-up: [How We Cut AI Coding Agent Token Usage by 92%](docs/how-i-built-persistent-memory-for-ai-agents.md)
633
+ Read the full write-up: [How We Built Persistent Memory for AI Coding Agents](docs/how-i-built-persistent-memory-for-ai-agents.md)
634
+
635
+ ### Honest token-cost positioning
636
+
637
+ The "92% reduction" number was measured for **structural orientation queries**
638
+ (reading a `get_node` summary vs. reading the full source file) on a Python codebase
639
+ with well-populated graph nodes. It's **not** a per-session, per-prompt, or
640
+ per-conversation savings number — and the gross savings always need to be
641
+ weighed against codevira's own per-prompt context-injection cost
642
+ (~1 KB on every `UserPromptSubmit` when relevant prior decisions exist) and
643
+ one-time setup cost (recording the decisions in the first place).
644
+
645
+ For short-to-medium sessions, expect rough neutrality on token cost. The real
646
+ wins are over **weeks of work on the same project** (cross-session decision
647
+ queries amortize the setup cost) and in **automation and cross-tool continuity**
648
+ (decisions recorded in Claude Code are visible in Cursor / Windsurf / next
649
+ session without you doing anything).
650
+
651
+ To minimise the per-prompt overhead, set
652
+ `project: { cross_session_mode: off }` in `.codevira/config.yaml`, or export
653
+ `CODEVIRA_CROSS_SESSION_MODE=off` in your shell. The injection is opt-out, not
654
+ on-by-default-with-no-escape.
562
655
 
563
656
  ---
564
657
 
@@ -570,6 +663,8 @@ Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the full
570
663
  **Requesting a feature?** [Open a feature request](https://github.com/sachinshelke/codevira/issues/new?template=feature_request.md)
571
664
  **Found a security issue?** Read [SECURITY.md](SECURITY.md) — please don't use public issues for vulnerabilities.
572
665
 
666
+ **Testing a release candidate locally?** See [docs/local-pypi-https.md](docs/local-pypi-https.md) for setting up a Docker-based HTTPS PyPI registry that mirrors the real PyPI install flow without touching public PyPI.
667
+
573
668
  ---
574
669
 
575
670
  ## FAQ
@@ -580,6 +675,14 @@ Common questions about setup, usage, architecture, and troubleshooting — see [
580
675
 
581
676
  See what's built, what's next, and the long-term vision — see [ROADMAP.md](ROADMAP.md).
582
677
 
678
+ ## Star History
679
+
680
+ If Codevira saves you tokens or sanity, a star helps other developers find it. Tracking growth keeps me focused on what's working.
681
+
682
+ <a href="https://star-history.com/#sachinshelke/codevira&Date">
683
+ <img src="https://api.star-history.com/svg?repos=sachinshelke/codevira&type=Date" alt="Star History Chart" width="600"/>
684
+ </a>
685
+
583
686
  ## License
584
687
 
585
688
  MIT — free to use, modify, and distribute.