codevira 1.8.0__tar.gz → 2.0.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.
Files changed (235) hide show
  1. {codevira-1.8.0 → codevira-2.0.0}/CHANGELOG.md +291 -0
  2. {codevira-1.8.0/codevira.egg-info → codevira-2.0.0}/PKG-INFO +198 -46
  3. {codevira-1.8.0 → codevira-2.0.0}/README.md +195 -43
  4. codevira-2.0.0/agents/qa/01-code-review.md +57 -0
  5. codevira-2.0.0/agents/qa/02-adversarial-fix-review.md +57 -0
  6. codevira-2.0.0/agents/qa/03-cross-module-impact.md +57 -0
  7. codevira-2.0.0/agents/qa/06-doc-drift.md +47 -0
  8. codevira-2.0.0/agents/qa/07-security-audit.md +73 -0
  9. codevira-2.0.0/agents/qa/12-llm-redteam.md +53 -0
  10. codevira-2.0.0/agents/qa/13-multi-ide-schema.md +62 -0
  11. codevira-2.0.0/agents/qa/22-competitor-benchmark.md +70 -0
  12. codevira-2.0.0/agents/qa/README.md +73 -0
  13. codevira-2.0.0/agents/qa/tier2-scripts.md +242 -0
  14. codevira-2.0.0/agents/qa/tier3-manual.md +167 -0
  15. {codevira-1.8.0 → codevira-2.0.0/codevira.egg-info}/PKG-INFO +198 -46
  16. codevira-2.0.0/codevira.egg-info/SOURCES.txt +229 -0
  17. codevira-2.0.0/docs/alpha-tester-invites.md +124 -0
  18. codevira-2.0.0/docs/demo/README.md +69 -0
  19. codevira-2.0.0/docs/heroes/00-engine.md +388 -0
  20. codevira-2.0.0/docs/heroes/01-decision-lock.md +271 -0
  21. codevira-2.0.0/docs/heroes/02-anti-regression.md +269 -0
  22. codevira-2.0.0/docs/heroes/03-scope-contract.md +272 -0
  23. codevira-2.0.0/docs/heroes/04-blast-radius.md +298 -0
  24. codevira-2.0.0/docs/heroes/05-cross-session.md +300 -0
  25. codevira-2.0.0/docs/heroes/06-token-budget.md +292 -0
  26. codevira-2.0.0/docs/heroes/07-live-style.md +272 -0
  27. codevira-2.0.0/docs/heroes/08-decision-replay.md +295 -0
  28. codevira-2.0.0/docs/heroes/09-intent-inference.md +257 -0
  29. codevira-2.0.0/docs/heroes/10-ai-promotion.md +331 -0
  30. codevira-2.0.0/docs/heroes/README.md +51 -0
  31. codevira-2.0.0/docs/heroes/pillar-1-setup.md +392 -0
  32. codevira-2.0.0/docs/hn-launch-day.md +224 -0
  33. codevira-2.0.0/docs/qa-playbook.md +400 -0
  34. codevira-2.0.0/docs/v2-completion-plan.md +211 -0
  35. codevira-2.0.0/docs/v2-execution-log.md +2582 -0
  36. codevira-2.0.0/docs/v2-master-plan.md +251 -0
  37. codevira-2.0.0/docs/vs-other-memory-tools.md +110 -0
  38. codevira-2.0.0/indexer/__init__.py +7 -0
  39. codevira-2.0.0/indexer/_dedupe_migration.py +101 -0
  40. codevira-2.0.0/indexer/_fork_safety.py +69 -0
  41. codevira-2.0.0/indexer/_sqlite_util.py +84 -0
  42. codevira-2.0.0/indexer/fix_history.py +626 -0
  43. {codevira-1.8.0 → codevira-2.0.0}/indexer/global_db.py +35 -26
  44. {codevira-1.8.0 → codevira-2.0.0}/indexer/index_codebase.py +265 -57
  45. {codevira-1.8.0 → codevira-2.0.0}/indexer/outcome_tracker.py +89 -4
  46. {codevira-1.8.0 → codevira-2.0.0}/indexer/sqlite_graph.py +211 -13
  47. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/__init__.py +1 -1
  48. codevira-2.0.0/mcp_server/_ghost_check.py +88 -0
  49. codevira-2.0.0/mcp_server/_project_inventory.py +276 -0
  50. codevira-2.0.0/mcp_server/_prompts.py +82 -0
  51. codevira-2.0.0/mcp_server/_repair_init.py +126 -0
  52. codevira-2.0.0/mcp_server/_safe_crash.py +58 -0
  53. codevira-2.0.0/mcp_server/agents_md.py +436 -0
  54. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/auto_init.py +69 -6
  55. codevira-2.0.0/mcp_server/cli.py +1923 -0
  56. codevira-2.0.0/mcp_server/cli_agents.py +220 -0
  57. codevira-2.0.0/mcp_server/cli_budget.py +213 -0
  58. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/cli_configure.py +60 -10
  59. codevira-2.0.0/mcp_server/cli_hooks_admin.py +184 -0
  60. codevira-2.0.0/mcp_server/cli_insights.py +337 -0
  61. codevira-2.0.0/mcp_server/cli_projects.py +139 -0
  62. codevira-2.0.0/mcp_server/cli_replay.py +136 -0
  63. codevira-2.0.0/mcp_server/data/__pycache__/__init__.cpython-313.pyc +0 -0
  64. codevira-2.0.0/mcp_server/data/hooks/post_tool_use.sh +37 -0
  65. codevira-2.0.0/mcp_server/data/hooks/pre_tool_use.sh +57 -0
  66. codevira-2.0.0/mcp_server/data/hooks/session_start.sh +41 -0
  67. codevira-2.0.0/mcp_server/data/hooks/stop.sh +40 -0
  68. codevira-2.0.0/mcp_server/data/hooks/user_prompt_submit.sh +42 -0
  69. codevira-2.0.0/mcp_server/data/templates/agents_md.tmpl +3 -0
  70. codevira-2.0.0/mcp_server/data/templates/canonical_block.md +81 -0
  71. codevira-2.0.0/mcp_server/data/templates/claude_md.tmpl +3 -0
  72. codevira-2.0.0/mcp_server/data/templates/copilot_instructions.tmpl +3 -0
  73. codevira-2.0.0/mcp_server/data/templates/cursor_rules.mdc.tmpl +8 -0
  74. codevira-2.0.0/mcp_server/data/templates/gemini_md.tmpl +3 -0
  75. codevira-2.0.0/mcp_server/data/templates/windsurfrules.tmpl +3 -0
  76. codevira-2.0.0/mcp_server/decision_replay.py +424 -0
  77. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/detect.py +76 -3
  78. codevira-2.0.0/mcp_server/doctor.py +771 -0
  79. codevira-2.0.0/mcp_server/engine/__init__.py +85 -0
  80. codevira-2.0.0/mcp_server/engine/demo_policy.py +62 -0
  81. codevira-2.0.0/mcp_server/engine/events.py +125 -0
  82. codevira-2.0.0/mcp_server/engine/intent_classifier.py +214 -0
  83. codevira-2.0.0/mcp_server/engine/policies/__init__.py +44 -0
  84. codevira-2.0.0/mcp_server/engine/policies/_signature_detect.py +314 -0
  85. codevira-2.0.0/mcp_server/engine/policies/ai_promotion.py +337 -0
  86. codevira-2.0.0/mcp_server/engine/policies/anti_regression.py +190 -0
  87. codevira-2.0.0/mcp_server/engine/policies/blast_radius.py +262 -0
  88. codevira-2.0.0/mcp_server/engine/policies/cross_session.py +363 -0
  89. codevira-2.0.0/mcp_server/engine/policies/decision_lock.py +255 -0
  90. codevira-2.0.0/mcp_server/engine/policies/intent_inference.py +421 -0
  91. codevira-2.0.0/mcp_server/engine/policies/live_style.py +445 -0
  92. codevira-2.0.0/mcp_server/engine/policies/scope_contract.py +362 -0
  93. codevira-2.0.0/mcp_server/engine/policies/token_budget.py +100 -0
  94. codevira-2.0.0/mcp_server/engine/policy.py +160 -0
  95. codevira-2.0.0/mcp_server/engine/promotion_score.py +208 -0
  96. codevira-2.0.0/mcp_server/engine/runner.py +263 -0
  97. codevira-2.0.0/mcp_server/engine/scope_contract.py +201 -0
  98. codevira-2.0.0/mcp_server/engine/signals.py +436 -0
  99. codevira-2.0.0/mcp_server/engine/token_meter.py +337 -0
  100. codevira-2.0.0/mcp_server/engine/wiring/__init__.py +16 -0
  101. codevira-2.0.0/mcp_server/engine/wiring/claude_code_hooks.py +368 -0
  102. codevira-2.0.0/mcp_server/engine/wiring/mcp_dispatch.py +186 -0
  103. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/http_server.py +26 -0
  104. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/ide_inject.py +223 -7
  105. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/paths.py +98 -4
  106. codevira-2.0.0/mcp_server/roadmap_drift.py +249 -0
  107. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/server.py +300 -10
  108. codevira-2.0.0/mcp_server/setup_wizard.py +893 -0
  109. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/tools/graph.py +162 -6
  110. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/tools/learning.py +259 -8
  111. codevira-2.0.0/mcp_server/tools/playbook.py +205 -0
  112. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/tools/search.py +120 -5
  113. {codevira-1.8.0 → codevira-2.0.0}/pyproject.toml +3 -3
  114. codevira-2.0.0/tests/test__prompts.py +138 -0
  115. {codevira-1.8.0 → codevira-2.0.0}/tests/test_auto_init.py +75 -3
  116. codevira-2.0.0/tests/test_call_edge_fk_safety.py +162 -0
  117. {codevira-1.8.0 → codevira-2.0.0}/tests/test_chunker.py +18 -7
  118. {codevira-1.8.0 → codevira-2.0.0}/tests/test_cli.py +285 -0
  119. codevira-2.0.0/tests/test_cli_agents.py +375 -0
  120. {codevira-1.8.0 → codevira-2.0.0}/tests/test_cli_configure.py +59 -0
  121. codevira-2.0.0/tests/test_cli_insights.py +159 -0
  122. codevira-2.0.0/tests/test_cli_projects.py +224 -0
  123. codevira-2.0.0/tests/test_cli_replay.py +234 -0
  124. codevira-2.0.0/tests/test_cli_version.py +51 -0
  125. codevira-2.0.0/tests/test_dedupe_migration.py +249 -0
  126. {codevira-1.8.0 → codevira-2.0.0}/tests/test_detect.py +78 -11
  127. codevira-2.0.0/tests/test_doctor.py +424 -0
  128. codevira-2.0.0/tests/test_fk_safety_extended.py +178 -0
  129. codevira-2.0.0/tests/test_fork_safety.py +206 -0
  130. codevira-2.0.0/tests/test_ghost_check.py +116 -0
  131. codevira-2.0.0/tests/test_hook_resilience.py +283 -0
  132. {codevira-1.8.0 → codevira-2.0.0}/tests/test_http_server.py +11 -4
  133. {codevira-1.8.0 → codevira-2.0.0}/tests/test_ide_inject.py +232 -8
  134. {codevira-1.8.0 → codevira-2.0.0}/tests/test_index_codebase.py +270 -0
  135. {codevira-1.8.0 → codevira-2.0.0}/tests/test_outcome_tracker.py +51 -0
  136. {codevira-1.8.0 → codevira-2.0.0}/tests/test_paths.py +119 -0
  137. codevira-2.0.0/tests/test_record_decision.py +274 -0
  138. codevira-2.0.0/tests/test_repair_init.py +191 -0
  139. codevira-2.0.0/tests/test_retire_rule.py +271 -0
  140. codevira-2.0.0/tests/test_roadmap_drift.py +385 -0
  141. {codevira-1.8.0 → codevira-2.0.0}/tests/test_server.py +134 -9
  142. codevira-2.0.0/tests/test_setup_wizard.py +836 -0
  143. {codevira-1.8.0 → codevira-2.0.0}/tests/test_sqlite_graph.py +90 -0
  144. codevira-2.0.0/tests/test_sqlite_util.py +115 -0
  145. {codevira-1.8.0 → codevira-2.0.0}/tests/test_tools_learning.py +113 -0
  146. {codevira-1.8.0 → codevira-2.0.0}/tests/test_tools_playbook.py +23 -10
  147. {codevira-1.8.0 → codevira-2.0.0}/tests/test_tools_search.py +20 -6
  148. codevira-2.0.0/tests/test_watcher_circuit.py +124 -0
  149. codevira-1.8.0/codevira.egg-info/SOURCES.txt +0 -120
  150. codevira-1.8.0/indexer/__init__.py +0 -1
  151. codevira-1.8.0/mcp_server/cli.py +0 -1019
  152. codevira-1.8.0/mcp_server/tools/playbook.py +0 -89
  153. {codevira-1.8.0 → codevira-2.0.0}/LICENSE +0 -0
  154. {codevira-1.8.0 → codevira-2.0.0}/MANIFEST.in +0 -0
  155. {codevira-1.8.0 → codevira-2.0.0}/agents/builder.md +0 -0
  156. {codevira-1.8.0 → codevira-2.0.0}/agents/developer.md +0 -0
  157. {codevira-1.8.0 → codevira-2.0.0}/agents/documenter.md +0 -0
  158. {codevira-1.8.0 → codevira-2.0.0}/agents/orchestrator.md +0 -0
  159. {codevira-1.8.0 → codevira-2.0.0}/agents/planner.md +0 -0
  160. {codevira-1.8.0 → codevira-2.0.0}/agents/reviewer.md +0 -0
  161. {codevira-1.8.0 → codevira-2.0.0}/agents/tester.md +0 -0
  162. {codevira-1.8.0 → codevira-2.0.0}/codevira.egg-info/dependency_links.txt +0 -0
  163. {codevira-1.8.0 → codevira-2.0.0}/codevira.egg-info/entry_points.txt +0 -0
  164. {codevira-1.8.0 → codevira-2.0.0}/codevira.egg-info/requires.txt +0 -0
  165. {codevira-1.8.0 → codevira-2.0.0}/codevira.egg-info/top_level.txt +0 -0
  166. {codevira-1.8.0 → codevira-2.0.0}/config.example.yaml +0 -0
  167. {codevira-1.8.0 → codevira-2.0.0}/docs/how-i-built-persistent-memory-for-ai-agents.md +0 -0
  168. {codevira-1.8.0 → codevira-2.0.0}/docs/linkedin-article-ai-agent-memory.md +0 -0
  169. {codevira-1.8.0 → codevira-2.0.0}/docs/linkedin-post-ai-agent-memory.md +0 -0
  170. {codevira-1.8.0 → codevira-2.0.0}/docs/local-pypi-https.md +0 -0
  171. {codevira-1.8.0 → codevira-2.0.0}/docs/medium-your-ai-coding-agent-has-amnesia.md +0 -0
  172. {codevira-1.8.0 → codevira-2.0.0}/docs/roadmap.md +0 -0
  173. {codevira-1.8.0 → codevira-2.0.0}/graph/_schema.yaml +0 -0
  174. {codevira-1.8.0 → codevira-2.0.0}/indexer/chunker.py +0 -0
  175. {codevira-1.8.0 → codevira-2.0.0}/indexer/graph_generator.py +0 -0
  176. {codevira-1.8.0 → codevira-2.0.0}/indexer/rule_learner.py +0 -0
  177. {codevira-1.8.0 → codevira-2.0.0}/indexer/treesitter_parser.py +0 -0
  178. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/__main__.py +0 -0
  179. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/crash_logger.py +0 -0
  180. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/__init__.py +0 -0
  181. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/agents/builder.md +0 -0
  182. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/agents/developer.md +0 -0
  183. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/agents/documenter.md +0 -0
  184. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/agents/orchestrator.md +0 -0
  185. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/agents/planner.md +0 -0
  186. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/agents/reviewer.md +0 -0
  187. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/agents/tester.md +0 -0
  188. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/config.example.yaml +0 -0
  189. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/coding-standards.md +0 -0
  190. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/engineering-excellence.md +0 -0
  191. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/git-cicd-governance.md +0 -0
  192. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/git_commits.md +0 -0
  193. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/incremental-updates.md +0 -0
  194. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/master_rule.md +0 -0
  195. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/multi-language.md +0 -0
  196. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/persistence.md +0 -0
  197. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/resilience-observability.md +0 -0
  198. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/smoke-testing.md +0 -0
  199. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/data/rules/testing-standards.md +0 -0
  200. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/gitignore.py +0 -0
  201. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/global_sync.py +0 -0
  202. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/launchd.py +0 -0
  203. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/log_retention.py +0 -0
  204. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/migrate.py +0 -0
  205. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/prompts.py +0 -0
  206. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/tools/__init__.py +0 -0
  207. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/tools/changesets.py +0 -0
  208. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/tools/code_reader.py +0 -0
  209. {codevira-1.8.0 → codevira-2.0.0}/mcp_server/tools/roadmap.py +0 -0
  210. {codevira-1.8.0 → codevira-2.0.0}/rules/coding-standards.md +0 -0
  211. {codevira-1.8.0 → codevira-2.0.0}/rules/engineering-excellence.md +0 -0
  212. {codevira-1.8.0 → codevira-2.0.0}/rules/git-cicd-governance.md +0 -0
  213. {codevira-1.8.0 → codevira-2.0.0}/rules/git_commits.md +0 -0
  214. {codevira-1.8.0 → codevira-2.0.0}/rules/incremental-updates.md +0 -0
  215. {codevira-1.8.0 → codevira-2.0.0}/rules/master_rule.md +0 -0
  216. {codevira-1.8.0 → codevira-2.0.0}/rules/persistence.md +0 -0
  217. {codevira-1.8.0 → codevira-2.0.0}/rules/resilience-observability.md +0 -0
  218. {codevira-1.8.0 → codevira-2.0.0}/rules/smoke-testing.md +0 -0
  219. {codevira-1.8.0 → codevira-2.0.0}/rules/testing-standards.md +0 -0
  220. {codevira-1.8.0 → codevira-2.0.0}/setup.cfg +0 -0
  221. {codevira-1.8.0 → codevira-2.0.0}/tests/test_crash_logger.py +0 -0
  222. {codevira-1.8.0 → codevira-2.0.0}/tests/test_gitignore.py +0 -0
  223. {codevira-1.8.0 → codevira-2.0.0}/tests/test_global_db.py +0 -0
  224. {codevira-1.8.0 → codevira-2.0.0}/tests/test_global_sync.py +0 -0
  225. {codevira-1.8.0 → codevira-2.0.0}/tests/test_graph_generator.py +0 -0
  226. {codevira-1.8.0 → codevira-2.0.0}/tests/test_launchd.py +0 -0
  227. {codevira-1.8.0 → codevira-2.0.0}/tests/test_log_retention.py +0 -0
  228. {codevira-1.8.0 → codevira-2.0.0}/tests/test_migrate.py +0 -0
  229. {codevira-1.8.0 → codevira-2.0.0}/tests/test_prompts.py +0 -0
  230. {codevira-1.8.0 → codevira-2.0.0}/tests/test_rule_learner.py +0 -0
  231. {codevira-1.8.0 → codevira-2.0.0}/tests/test_tools_changesets.py +0 -0
  232. {codevira-1.8.0 → codevira-2.0.0}/tests/test_tools_code_reader.py +0 -0
  233. {codevira-1.8.0 → codevira-2.0.0}/tests/test_tools_graph.py +0 -0
  234. {codevira-1.8.0 → codevira-2.0.0}/tests/test_tools_roadmap.py +0 -0
  235. {codevira-1.8.0 → codevira-2.0.0}/tests/test_treesitter_parser.py +0 -0
@@ -11,6 +11,297 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ### Planned for v2.1
15
+
16
+ See [ROADMAP.md](ROADMAP.md#-v21--honest-known-limitations-from-the-rc5-audit-2026-05-13).
17
+
18
+ - **Multi-language `get_signature` / `get_code`** — wire tree-sitter (already
19
+ used for graph indexing) into these tools so non-Python projects stop
20
+ getting "Python-only by design".
21
+ - **`record_decisions_batch` API** — compress 50× ~800 B per-call overhead
22
+ into one round-trip.
23
+ - **CLI naming clarity** — pick a canonical hierarchy among `init` / `setup` /
24
+ `register` / `configure`; add a `codevira inspect` umbrella; deprecate one
25
+ of `--project-dir` (global) / `--project PATH` (per-subcommand) on a
26
+ v2.1 → v2.2 cycle.
27
+
28
+ ---
29
+
30
+ ## [2.0.0] — 2026-05-14 — First public 2.0 release
31
+
32
+ The 2.0 release moves codevira from "memory layer for one developer in one IDE" to
33
+ "active guardian for every AI coding tool you use, on every project, on your local
34
+ machine." Five internal iterations (rc1..rc5 in dev tags) plus a same-day public
35
+ release-candidate cycle (`2.0.0rc1`) of dogfood + audit + product-credibility
36
+ work consolidate into 2.0.0. **Full changelog: [RELEASE_NOTES.md](RELEASE_NOTES.md).**
37
+
38
+ ### Added
39
+
40
+ - **All 10 hero policies** — active guardian engine intercepts every AI tool
41
+ call (Edit, Write, prompt submit, session start) and routes through
42
+ registered policies (Decision Lock, Anti-Regression, Scope Contract,
43
+ Blast-Radius Veto, Cross-Session Consistency, Token Budget, Live Style
44
+ Enforcement, Decision Replay, Proactive Intent Inference, AI Promotion
45
+ Score).
46
+ - **`codevira setup`** — one-prompt installer that detects every AI tool
47
+ on the machine (Claude Code, Cursor, Windsurf, Antigravity, OpenAI Codex,
48
+ GitHub Copilot, Continue.dev, Aider) and configures all of them at once.
49
+ - **`codevira projects`** — canonical inventory with `tracked / ghost /
50
+ orphan / stale` classification (`--json` for scripting; `--ghosts-only`
51
+ pairs with `clean --ghosts`).
52
+ - **`codevira hooks list / uninstall`** — admin commands for Claude Code
53
+ lifecycle hooks; surgical install + clean removal.
54
+ - **`codevira clean --ghosts`** — surgical removal of incomplete project
55
+ data dirs without touching tracked projects.
56
+ - **`codevira init --single-language`** — opt-out flag for the new
57
+ index-everything default.
58
+ - **`codevira engine` subcommand** — internal hook dispatcher; surfaces in
59
+ `--help` so the lifecycle hooks can call it.
60
+ - **4 new doctor checks** — `claude_mcp_visibility`, `codeindex_freshness`,
61
+ `semantic_search_health`, `ghost_projects` (total 14 per run).
62
+ - **Per-project config opt-out for cross-session injection** —
63
+ `.codevira/config.yaml: project: { cross_session_mode: off }` disables
64
+ the per-prompt context block without touching env vars.
65
+
66
+ ### Changed
67
+
68
+ - **`codevira init` default** — indexes every common source/config/docs
69
+ extension (~75 total: `.py`, `.ts`, `.go`, `.yaml`, `.toml`, `.md`,
70
+ `.html`, `.sql`, `.proto`, …) instead of narrowing to one language.
71
+ - **`codevira agents` default** — renders nudge files for **detected** IDEs
72
+ only; `--ide=all` opt-in for the legacy "render for every supported IDE"
73
+ behavior.
74
+ - **`codevira doctor`** — now genuinely read-only; snapshots the projects
75
+ dir at entry and removes any new dirs at exit.
76
+ - **`search_codebase`** — graceful structural fallback (filename + symbol
77
+ substring) when the semantic index is unavailable, with the correct
78
+ `fix_command` instead of a misleading "reinstall codevira" hint.
79
+ - **`get_node` / `get_impact` / `query_graph`** — three-case error
80
+ differentiation: "no graph DB" / "graph empty" / "file not in populated
81
+ graph", each with its own `fix_command`.
82
+ - **`get_decision_confidence`** — exposes `decisions_in_db_total` and
83
+ `decisions_eligible_for_outcomes` plus a four-state interpretation so
84
+ users understand WHY their `total_decisions` may be zero. Outcome
85
+ tracker also classifies file-less decisions via mention-extraction.
86
+ - **Playbooks** — project-scoped first
87
+ (`<data_dir>/playbooks/` or `<project>/.codevira/playbooks/`); bundled
88
+ Python defaults are skipped with a clear warning when project language
89
+ ≠ Python.
90
+ - **`register_project`** uses `ON CONFLICT … COALESCE(excluded.git_remote,
91
+ projects.git_remote)` — subsequent registrations can't silently clear
92
+ the `git_remote` column.
93
+ - **Auto-init self-heal** runs SYNCHRONOUSLY in the calling thread of every
94
+ CLI invocation — daemon thread death no longer leaves ghost data dirs.
95
+ - **Default install** includes ChromaDB + sentence-transformers (no
96
+ `[search]` extra needed for semantic search).
97
+ - **README "92% reduction" claim** qualified with honest scope, per-prompt
98
+ cost, and amortization curve.
99
+ - **`register` deprecation** now names the removal version (v2.1).
100
+
101
+ ### Fixed
102
+
103
+ - macOS Apple Silicon **fork-safety segfault on first `codevira index`**
104
+ (auto-applied at indexer import).
105
+ - **Setup interactive prompt** silent-fail on unexpected input — replaced
106
+ with a shared `_prompts.confirm` helper that retries, flushes stdout,
107
+ and handles `KeyboardInterrupt` cleanly.
108
+ - Three **`status --global` UI typos** that always rendered 0/0/0
109
+ regardless of actual `global.db` state.
110
+ - Four **FK race conditions** in the watcher pipeline.
111
+ - **Python `None` leaked into argparse choices** for `agents --ide` and
112
+ `budget` positional.
113
+ - Several **silent argument clamps** in `replay --since`, `insights --since`,
114
+ and `insights --top` now print visible warnings.
115
+
116
+ ### Tests
117
+
118
+ - 2395 / 2395 passing (deterministic).
119
+ - ~1091 net new tests since v1.8.0 (mostly from the v2.0 hero policies +
120
+ audit-driven regression coverage).
121
+
122
+ ### Note on internal v1.8.1 + 2.0.0rc1
123
+
124
+ A v1.8.1 production hotfix existed in dev tags but was never published to
125
+ PyPI; its fixes are folded into 2.0.0. A `2.0.0rc1` was briefly published
126
+ on PyPI (2026-05-14) as a same-day public release candidate; the code is
127
+ identical to 2.0.0. Anyone who installed `codevira==2.0.0rc1` can
128
+ `pipx install --upgrade codevira` to move to 2.0.0 final.
129
+
130
+ ---
131
+
132
+ ## [Original v1.9 plan, deferred]
133
+
134
+ - **Interactive checkbox UI for `codevira configure`**. The current
135
+ prompt asks users to type comma-separated indices ("1,3,5") into a
136
+ numbered list — fine for 3–5 items, awkward for 15+. v1.9 will add
137
+ arrow-key navigation + space-to-toggle multi-select, matching the
138
+ UX of `npm create vite`, `gh repo create`, etc.
139
+
140
+ **Design (opt-in dependency):**
141
+ - Default install (`pip install codevira`) keeps the current numbered
142
+ prompt — zero new dependencies, zero new failure modes.
143
+ - `pip install codevira[ui]` pulls `questionary` (~3 MB). When
144
+ importable AND `sys.stdin.isatty()` AND `os.environ.get("TERM")
145
+ != "dumb"`, `prompt_multi_select` switches to the checkbox UI.
146
+ - `--dirs` and `--extensions` flags continue to work for both paths
147
+ (CI / scripts / non-interactive use).
148
+
149
+ **Why deferred from v1.8.1:** v1.8.1 is a pure crash hotfix; mixing
150
+ in a UX feature would slow the release and complicate testing. The
151
+ numbered prompt has shipped since v1.8.0 and works fine — this is
152
+ polish, not a fix.
153
+
154
+ **Implementation notes for whoever picks this up:**
155
+ - Site: `mcp_server/cli_configure.py:prompt_multi_select` (line ~176)
156
+ - Add `[ui]` extra in `pyproject.toml` with `questionary>=2.0`
157
+ - TTY detection already exists (`NonInteractiveError` raised on
158
+ `not sys.stdin.isatty()`); extend it to also branch on
159
+ questionary availability
160
+ - Test surface: split into two test classes — one mocks `input()`
161
+ (current behavior), one mocks `questionary.checkbox()`. Skip the
162
+ questionary tests when not installed.
163
+ - Accessibility: keep the numbered prompt for screen-reader users;
164
+ document `CODEVIRA_DISABLE_TUI=1` env var as the override.
165
+ - No schema changes, no public-API changes.
166
+
167
+ ### Other v1.9 candidates (no design yet)
168
+
169
+ - Watcher restart circuit breaker (deferred from v1.8.1 — see "Out of
170
+ scope" below).
171
+ - Refactor `_enable_wal_with_retry` into a shared `indexer/_sqlite_util.py`
172
+ (deferred from v1.8.1).
173
+ - Watcher hot-reload of `config.yaml` on disk changes.
174
+ - `crash_logger` size cap or rotation (currently grows unbounded).
175
+
176
+ ---
177
+
178
+ ## [1.8.1] — 2026-05-02 — Production Hotfix from Real-World Crash Logs
179
+
180
+ Pure bug-fix release. No new features, no schema changes, no public-API
181
+ changes. Motivated by a real production failure on the maintainer's
182
+ machine: **43 crashes in 70 minutes** logged by `crash_logger` between
183
+ 07:37 and 08:47 on 2026-04-24, all under
184
+ `WHERE: background watcher: incremental reindex`.
185
+
186
+ Breakdown:
187
+ - **41 × `InterruptedError` (EINTR, errno 4)** in
188
+ `_get_changed_files`'s rglob walk, all walking
189
+ `~/Library/Group Containers/...` (WhatsApp, Office, etc.) and
190
+ `~/Library/Containers/...` (TextEdit, mediaanalysisd, …).
191
+ - **2 × `OperationalError("database is locked")`** in
192
+ `SQLiteGraph.add_symbol` and `remove_symbols_for_file`.
193
+
194
+ Root cause: a rogue project data dir with
195
+ `metadata.json.original_path = "/Users/sachin"` (the user's `$HOME`).
196
+ `auto_detect_project` saw `Library`, `Downloads`, `Documents`, `go` as
197
+ "subdirs", and the watcher then walked huge unrelated trees. v1.8.0's
198
+ bootstrap (`cmd_configure`, `auto_init`) didn't refuse `$HOME`, and
199
+ neither did `cmd_init`.
200
+
201
+ ### Fixed
202
+
203
+ - **Refuse `$HOME` and system top-levels as a project root** (the
204
+ critical fix — eliminates 41 of the 43 production crashes by
205
+ preventing the rogue project from forming). New helper
206
+ `mcp_server.paths.is_invalid_project_root()` rejects `$HOME`, `/`,
207
+ `/Users`, `/home`, `/tmp`, `/private/tmp`, `/var`, `/private/var`,
208
+ `/etc`, `/opt` (plus the macOS-resolved `/private/etc` and
209
+ `/System/Volumes/Data/home` forms). Wired into TEN distinct sites
210
+ covering every state-creating path the codebase exposes:
211
+ - **CLI entry points (6):** `cmd_configure`, `cmd_init`, `cmd_index`,
212
+ `cmd_register`, `cmd_serve` (refuses both regular serve AND
213
+ `--install-service`; `--uninstall-service` is exempt so users can
214
+ always remove old launchd plists), `auto_init._run_background_init`.
215
+ - **MCP server entry points (2):** `mcp_server.server.main()` (stdio
216
+ transport) and `mcp_server.http_server.run_http_server()` (HTTP
217
+ transport). Both are reachable directly via `python -m`, not just
218
+ through the CLI.
219
+ - **Direct module entry (1):** `indexer.index_codebase.__main__`
220
+ (`python -m indexer.index_codebase --full | --watch | (default)`)
221
+ — this is a separate CLI surface from the `codevira` binary;
222
+ pre-revalidation it bypassed `cli.cmd_index`'s guard entirely.
223
+ `--status` is exempt (read-only, bails on missing graph.db).
224
+ - **Defense-in-depth (1):** `indexer.index_codebase.start_background_watcher`
225
+ refuses to start the watcher even if a programmatic caller bypasses
226
+ every entry-point guard above. Returns `None`; both `cmd_watch` and
227
+ `server.main` handle `None` correctly.
228
+
229
+ The `server.main()` and `run_http_server` guards are the most critical
230
+ — without them, a user upgrading from v1.8.0 *without* first running
231
+ `clean --orphans` would still hit the original crash mode: their
232
+ leftover rogue `config.yaml` would drive `start_background_watcher`
233
+ into walking `~/Library/Group Containers/...`, which is exactly where
234
+ the 41 production `InterruptedError` crashes came from. The
235
+ `start_background_watcher` defense-in-depth guard is a belt-and-braces
236
+ fallback — even if all entry-point guards regressed, the watcher
237
+ itself cannot start with an invalid project root.
238
+
239
+ `cmd_index`, `cmd_register`, `cmd_serve --install-service` close
240
+ defense-in-depth holes that pre-revalidation could have leaked state
241
+ on disk: silent dead-weight `mkdir` of
242
+ `~/.codevira/projects/<HOME_slug>/{graph,codeindex}/`, IDE configs
243
+ pinned to broken paths, and persistent launchd plists pointing at
244
+ `$HOME`. Pre-release revalidation across three rounds walked every
245
+ CLI sub-command, the stdio/HTTP server entry, the launchd
246
+ `--install-service` path, the `start_background_watcher` direct call
247
+ path, and the production-replay scenario (synthetic v1.8.0 leftover
248
+ rogue + `codevira` from `$HOME`). All paths refuse cleanly with zero
249
+ new crashes; legitimate projects untouched.
250
+
251
+ `auto_init` sets `_progress["status"] = "error"` so the MCP server
252
+ stops looping on retries.
253
+
254
+ - **`SQLiteGraph` WAL with retry — port of the v1.8.0 GlobalDB fix**
255
+ (eliminates the 2 of 43 `database is locked` crashes). v1.8.0 fixed
256
+ the same race for `GlobalDB` after round 3 of binocular review;
257
+ `SQLiteGraph` was missed. `__init__` now opens with `timeout=30`,
258
+ enables WAL via the same retry loop pattern, and sets
259
+ `PRAGMA busy_timeout=30000` for subsequent writes.
260
+
261
+ - **`_get_changed_files` and `cmd_full_rebuild` rglob loops tolerate
262
+ `OSError`** (defense-in-depth — even on legitimate projects,
263
+ transient `EINTR`, `PermissionError`, or "directory changed during
264
+ iteration" should not kill the whole reindex). Per-watch-dir scope
265
+ matches `watchdog.Observer`'s thread-per-watch model: the
266
+ microsecond-spaced parallel-thread crashes (3 within 6μs at
267
+ 08:15:29 and 08:26:04 in the production log) confirm this is the
268
+ right granularity. `InterruptedError` is a subclass of `OSError`, so
269
+ the broader catch covers EINTR plus other transient walk failures.
270
+
271
+ ### Added
272
+
273
+ - **`codevira clean --orphans`** — recovery path for users already hit
274
+ by the `$HOME`-bootstrap bug on v1.8.0. Walks
275
+ `~/.codevira/projects/*/metadata.json`; for each entry whose
276
+ `original_path` is rejected by `is_invalid_project_root()` OR no
277
+ longer exists on disk, removes the data dir and deletes the matching
278
+ row from `~/.codevira/global.db`. Reuses the existing `--dry-run`
279
+ and `-y/--yes` flags. Without this, affected users would need to
280
+ `rm -rf` and run raw sqlite by hand.
281
+
282
+ - **Denylist macOS/Linux/cloud-sync user-data dirs in
283
+ `auto_detect_project`** (defense-in-depth). `_SKIP_DIRS` extended
284
+ with `Library`, `Downloads`, `Music`, `Movies`, `Pictures`,
285
+ `Desktop`, `Public`, `Applications`, `Videos`, `Templates`, plus
286
+ cloud-sync top-levels (`Dropbox`, `iCloud Drive`, `OneDrive`,
287
+ `Google Drive`, `Box`). Even if `is_invalid_project_root` somehow
288
+ misses (e.g. a user passes `--project-dir` to a `$HOME`-shaped
289
+ layout), these never show up in `watched_dirs`. A user who
290
+ legitimately has a project named e.g. `Library` can still pass
291
+ `codevira configure --dirs Library` to opt in.
292
+
293
+ ### Out of scope (deferred to v1.9)
294
+
295
+ - **Watcher restart circuit breaker.** Crash log shows ~60s gaps
296
+ between EINTR crashes — no backoff. Adding a circuit breaker is real
297
+ design work; the rglob `OSError` tolerance closes the immediate
298
+ hole.
299
+ - **Refactoring `_enable_wal_with_retry` to a shared util.** 25 lines
300
+ of duplication for one patch cycle is the right call; touching
301
+ `GlobalDB`'s tested-in-v1.8.0 code is higher risk.
302
+ - **`crash_logger` size cap or rotation.** Log file is ~97KB now; will
303
+ grow unbounded over time. Out of scope for hotfix; flagged for v1.9.
304
+
14
305
  ---
15
306
 
16
307
  ## [1.8.0] — 2026-04-23 — Memory Sharpening + Config UX
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: codevira
3
- Version: 1.8.0
4
- Summary: Persistent adaptive memory for AI coding agents MCP server with context graph, semantic search, adaptive learning, roadmap tracking, and cross-tool continuity.
3
+ Version: 2.0.0
4
+ Summary: Stop re-explaining your project to AI agents every session. Codevira gives Claude Code, Cursor, Windsurf, and Antigravity shared persistent memory of your codebase — locally, no signup, MIT-licensed. One install configures every AI tool.
5
5
  Author-email: Sachin Shelke <sachin.worldnet@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/sachinshelke/codevira
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/sachinshelke/codevira
9
9
  Project-URL: Issues, https://github.com/sachinshelke/codevira/issues
10
10
  Project-URL: Changelog, https://github.com/sachinshelke/codevira/blob/main/CHANGELOG.md
11
11
  Keywords: mcp,model-context-protocol,ai-agents,llm,developer-tools,claude,cursor,windsurf,code-intelligence,semantic-search,context-graph,chromadb,agentic,coding-assistant,knowledge-graph
12
- Classifier: Development Status :: 4 - Beta
12
+ Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
@@ -41,15 +41,26 @@ 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.8.0-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.
51
52
 
52
- **Works with:** Claude Code · Claude Desktop · Cursor · Windsurf · Google Antigravity · any MCP-compatible AI tool
53
+ **Works with:** Claude Code · Claude Desktop · Cursor · Windsurf · Google Antigravity · OpenAI Codex · GitHub Copilot · Continue.dev · Aider · any MCP-compatible AI tool
54
+
55
+ ---
56
+
57
+ ## What you get
58
+
59
+ * 🧠 **One brain across every AI tool.** A decision you log in Claude Code shows up in Cursor. Style preferences learned in one session enforce in the next. No per-tool re-onboarding.
60
+ * 🛡️ **Active guardrails, not passive notes.** Codevira intercepts every AI tool call (`Edit`, `Write`, prompt submit, session start). Decisions you mark `do_not_revert` block silent regressions. Out-of-scope edits get warned. The AI literally *cannot* undo your protected choices without surfacing the conflict to you first.
61
+ * ⚡ **Zero-friction setup.** `pipx install codevira && codevira setup` — auto-detects every AI tool you have and configures all of them. No JSON to hand-edit, no per-IDE script, no team server to spin up.
62
+ * 🔒 **Local-first, MIT-licensed.** Your decisions, code graph, and learned preferences live in `~/.codevira/` on your machine. No cloud, no account, no telemetry, no SaaS.
63
+ * 📊 **Honest measurement.** `codevira insights` shows which past decisions held up vs got reverted across your real git history. `codevira budget` reports per-session AI token spend. You can audit what the memory layer is actually costing and earning.
53
64
 
54
65
  ---
55
66
 
@@ -73,13 +84,50 @@ Your AI agent reads the same 12 files every session before doing any actual work
73
84
 
74
85
  ---
75
86
 
87
+ ## What's new in v2.0
88
+
89
+ > 30-second demo: **[docs/demo/codevira-demo.mp4](docs/demo/codevira-demo.mp4)**
90
+
91
+ 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).
92
+
93
+ | # | Hero | What it does | Trigger |
94
+ |---|---|---|---|
95
+ | 4 | **Blast-Radius Veto** | Block edits to files with N+ callers without explicit acknowledgment | before Edit/Write |
96
+ | 1 | **Decision Lock** | Refuse edits to files marked `do_not_revert` | before Edit/Write |
97
+ | 2 | **Anti-Regression Memory** | Block edits that re-introduce previously-fixed bugs | before Edit/Write |
98
+ | 3 | **Scope Contract Lock** *(off-by-default)* | Refuse edits to files outside what your prompt asked for | prompt → enforce on Edit |
99
+ | 5 | **Cross-Session Consistency** | Inject related past decisions when you submit a prompt | prompt submit |
100
+ | 9 | **Proactive Intent Inference** | Pre-fetch fixes/decisions/blast-radius for the AI's first turn | prompt submit |
101
+ | 6 | **Token Budget Live View** | Track AI token spend per session; `codevira budget` shows breakdown | every tool call |
102
+ | 7 | **Live Style Enforcement** | Warn on snake_case/camelCase/quote-style violations vs your project's preferences | after Edit/Write |
103
+ | 10 | **AI Promotion Score** | Auto-score decisions by outcome history; `codevira insights` weekly digest | session start |
104
+ | 8 | **Decision Replay** | Browse decision timeline as terminal / markdown / HTML; MCP resource for Claude Desktop; `codevira replay` CLI | on demand |
105
+
106
+ All 10 work behind the scenes by default. No new vocabulary to learn.
107
+
108
+ ### v2.0 CLI surface
109
+
110
+ ```text
111
+ codevira setup # one-prompt setup; replaces `register`
112
+ codevira doctor # health check with ✓/⚠/✗ + exact fix commands
113
+ codevira agents # regen per-IDE nudge files (CLAUDE.md, AGENTS.md, etc.)
114
+ codevira hooks install # install Claude Code lifecycle hooks
115
+ codevira budget # token-spend per session (Hero 6)
116
+ codevira insights # stable / reverted decisions (Hero 10)
117
+ codevira replay # browse decision timeline (Hero 8)
118
+ ```
119
+
120
+ For the honest "vs Mem0 / claude-mem / MemPalace" comparison see **[docs/vs-other-memory-tools.md](docs/vs-other-memory-tools.md)**.
121
+
122
+ ---
123
+
76
124
  ## How It Works
77
125
 
78
126
  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:
79
127
 
80
128
  | Capability | What it means for you |
81
129
  |---|---|
82
- | **Zero-config setup** | `pipx install codevira && codevira register` — that's it. No prompts, no JSON editing. Auto-detects language, source dirs, and IDE configs |
130
+ | **Zero-config setup** | `pipx install codevira && codevira setup` — that's it. No prompts, no JSON editing. Auto-detects every installed AI tool and configures all of them |
83
131
  | **Cross-tool continuity** | One `get_session_context()` call brings any AI agent up to speed in ~800 tokens — works identically in Claude Code, Cursor, Windsurf, Antigravity |
84
132
  | **Decision protection** | `do_not_revert` flags + searchable decision log stop AI agents from undoing past architectural choices |
85
133
  | **Context graph** | Every source file has a node: role, rules, dependencies, stability, blast radius. AI calls `get_node(path)` instead of re-reading the file |
@@ -103,73 +151,148 @@ The agent always asks for what it needs, in the size it needs.
103
151
 
104
152
  ---
105
153
 
106
- ## Quick Start
107
-
108
- ### 1. Install
154
+ ## Quick Start — three commands
109
155
 
110
156
  ```bash
111
- # Recommended: global install via pipx (isolated, works everywhere)
157
+ # 1. Install
112
158
  pipx install codevira
113
159
 
114
- # Alternative: pip install
115
- pip install codevira
116
- ```
117
-
118
- 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.
160
+ # 2. Connect every AI tool you have (idempotent — safe to re-run)
161
+ codevira setup
119
162
 
120
- ### 2. Register with your AI tools
163
+ # 3. (Optional) Verify the install
164
+ codevira doctor
165
+ ```
121
166
 
122
- ```bash
123
- codevira register
167
+ That's it. Open any project in your AI tool — codevira auto-initializes on
168
+ the first MCP tool call. No per-project `codevira init` needed.
169
+
170
+ **Try it.** Ask your AI agent: *"Use `get_session_context` to brief me on this project."*
171
+ You'll get a structured project state in one tool call instead of the AI
172
+ re-reading docs.
173
+
174
+ ### What `codevira setup` actually does
175
+
176
+ The one command above replaces what used to take 5+ steps in v1.x:
177
+
178
+ * **Detects every installed AI tool** — Claude Code, Claude Desktop, Cursor,
179
+ Windsurf, Antigravity, Codex CLI, GitHub Copilot, Continue.dev, Aider.
180
+ * **Injects MCP server config** into each tool's config file (per-IDE schema
181
+ handled automatically — no JSON to hand-edit).
182
+ * **Writes per-IDE nudge files** so each AI tool knows codevira exists:
183
+ `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/codevira.mdc`, `.windsurfrules`,
184
+ `GEMINI.md`, `.github/copilot-instructions.md` — only for IDEs you actually
185
+ have installed.
186
+ * **Installs Claude Code lifecycle hooks** (`SessionStart`, `PreToolUse`,
187
+ `PostToolUse`, `UserPromptSubmit`, `Stop`) — turns codevira from passive
188
+ memory into the **active guardian** that intercepts every AI tool call.
189
+
190
+ Use `--dry-run` to preview without writing anything. Use `--ide=claude` to
191
+ limit to one tool. Use `-y` to skip the confirmation prompt (handy in scripts).
192
+
193
+ ### Already on v1.x?
194
+
195
+ `pipx install --upgrade codevira` then `codevira setup`. Three default
196
+ behaviors changed (all opt-out-able for legacy compatibility) — see
197
+ [MIGRATING.md](MIGRATING.md) for the full upgrade guide. No data loss; your
198
+ existing `~/.codevira/global.db` migrates safely.
199
+
200
+ ### What `codevira doctor` reports
201
+
202
+ 14 health checks in one run, each with a concrete `fix_command` for any
203
+ WARN or FAIL. Read-only — never modifies anything. Use it whenever
204
+ something feels off.
205
+
206
+ ```text
207
+ $ codevira doctor
208
+ Codevira health check
209
+ ────────────────────────────────────────────────────────────
210
+ ✓ python_version Python 3.13 (≥ 3.10 required)
211
+ ✓ codevira_data_dir /Users/you/.codevira exists and is writable
212
+ ✓ graph_db graph.db has all 4 expected tables
213
+ ✓ global_db /Users/you/.codevira/global.db opens cleanly
214
+ ✓ detected_ides 5 AI tool(s) detected
215
+ ✓ claude_mcp_visibility codevira visible to Claude Code (✓ Connected)
216
+ ✓ ghost_projects 12 project(s) tracked — none are ghost dirs
217
+ ... (and 7 more checks)
218
+ ────────────────────────────────────────────────────────────
219
+ summary: 14 pass · 0 warn · 0 fail
124
220
  ```
125
221
 
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.
222
+ ### Daily-use commands you'll actually run
127
223
 
128
- ### 3. Start using
224
+ | Command | What it does |
225
+ |---|---|
226
+ | `codevira setup` | Re-sync IDE configs (after installing a new AI tool, etc.) |
227
+ | `codevira doctor` | Health check |
228
+ | `codevira projects` | List every project codevira knows about on this machine |
229
+ | `codevira projects --ghosts-only` | Find half-initialised project dirs |
230
+ | `codevira clean --ghosts` | Remove ghost dirs (preserves real ones) |
231
+ | `codevira insights` | Stable + reverted decisions across past sessions |
232
+ | `codevira replay` | Decisions timeline (terminal / markdown / html output) |
233
+ | `codevira budget` | Per-session token usage |
234
+ | `codevira hooks list` | Show installed Claude Code lifecycle hooks |
235
+
236
+ Run `codevira --help` for the full subcommand list.
129
237
 
130
- Open any project in your AI tool. On the first MCP tool call, Codevira **auto-initializes**:
131
- - Detects language, source directories, and file extensions from project markers
132
- - Creates the context graph and roadmap
133
- - Installs a `post-commit` git hook for automatic reindexing
238
+ ### Customizing what's indexed
134
239
 
135
- No explicit `codevira init` needed everything happens on demand.
240
+ By default codevira indexes every common source / config / docs extension
241
+ (~75 total: `.py`, `.ts`, `.go`, `.yaml`, `.md`, `.html`, `.sql`, `.proto`,
242
+ …). For most projects this is what you want. To narrow or widen:
136
243
 
137
- > **Note:** `codevira init` is still available for explicit per-project setup with custom settings.
244
+ ```bash
245
+ # Interactive picker — shows discovered dirs + extensions with file counts
246
+ codevira configure
138
247
 
139
- ### 4. Verify
248
+ # Non-interactive (CI / scripts)
249
+ codevira configure --dirs src,packages,apps --extensions .py,.ts --no-reindex
140
250
 
141
- Ask your AI agent to call `get_roadmap()` — it should return your current phase and next action.
251
+ # Restore legacy single-language behavior on init
252
+ codevira init --single-language
253
+ ```
142
254
 
143
- > **Note:** Restart your AI tool after running `codevira register` to pick up the new MCP config.
255
+ After changing watched directories, **restart your AI tool** running
256
+ watchers snapshot the dir set at boot.
144
257
 
145
- ### Customizing what's indexed
258
+ ### Reducing per-prompt context overhead
146
259
 
147
- 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.
260
+ Codevira's Cross-Session Consistency policy injects ~1 KB of relevant prior
261
+ decisions into each `UserPromptSubmit` event. To disable per-project:
148
262
 
149
- ```bash
150
- cd your-project
151
- codevira configure
263
+ ```yaml
264
+ # .codevira/config.yaml
265
+ project:
266
+ cross_session_mode: off # disable injection entirely
267
+ cross_session_max_inject: 2 # OR keep it but cap at 2 entries (default 5)
152
268
  ```
153
269
 
154
- 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.
270
+ Or system-wide via env: `export CODEVIRA_CROSS_SESSION_MODE=off`.
271
+
272
+ ### Uninstall
273
+
274
+ See [Uninstall / Reset](#uninstall--reset) below for the full set of
275
+ options (`--all`, `--dry-run`, `--orphans`, `--ghosts`, `--legacy`).
276
+ Quick path:
155
277
 
156
- **Non-interactive** (useful in scripts or CI):
157
278
  ```bash
158
- codevira configure --dirs src,packages,apps --extensions .py,.ts,.tsx --no-reindex
279
+ codevira clean # remove ~/.codevira/, IDE configs, services
280
+ codevira hooks uninstall # remove Claude Code lifecycle hook scripts
281
+ pipx uninstall codevira # remove the binary
159
282
  ```
160
283
 
161
- After changing watched directories, **restart your AI tool** — running watchers snapshot the dir set at boot.
284
+ ---
162
285
 
163
- ### Manual config (only if auto-inject didn't detect your tool)
286
+ ## Manual installation only if `codevira setup` doesn't detect your tool
164
287
 
165
288
  Codevira supports two transports. Use the right one for your client:
166
289
 
167
290
  | Client | Transport | Config file |
168
291
  |--------|-----------|-------------|
169
292
  | Claude Desktop (app) | stdio | `~/Library/Application Support/Claude/claude_desktop_config.json` |
170
- | Claude Code (CLI) | stdio or HTTP | `.claude/settings.json` |
171
- | Cursor | stdio | `.cursor/mcp.json` |
172
- | Windsurf | stdio | `.windsurf/mcp.json` |
293
+ | Claude Code (CLI) | stdio | `~/.claude.json` (user scope — `mcpServers` section) |
294
+ | Cursor | stdio | `~/.cursor/mcp.json` |
295
+ | Windsurf | stdio | `~/.codeium/windsurf/mcp_config.json` |
173
296
  | Google Antigravity | stdio | `~/.gemini/antigravity/mcp_config.json` |
174
297
 
175
298
  **Stdio transport** — Claude Desktop, Cursor, Windsurf (`.claude/settings.json` / `.cursor/mcp.json` / `.windsurf/mcp.json`):
@@ -199,7 +322,7 @@ Codevira supports two transports. Use the right one for your client:
199
322
 
200
323
  > Tip: find the full binary path with `which codevira`
201
324
 
202
- **HTTP/HTTPS transport** — *Preview in v1.7, single-project only.* The HTTP server binds to one project at startup and cannot switch contexts per request. **Multi-project HTTPS is planned for v1.8.** For multi-project work today, use stdio via `codevira register` (above).
325
+ **HTTP/HTTPS transport** — *Preview only.* The HTTP server binds to one project at startup and cannot switch contexts per request. Multi-project HTTPS is still on the roadmap (see [ROADMAP.md](ROADMAP.md)). For multi-project work today, use stdio via `codevira setup` (above) — `setup` is the v2.0 successor to the now-deprecated `codevira register`.
203
326
 
204
327
  First start the HTTP server in a terminal:
205
328
  ```bash
@@ -340,7 +463,7 @@ codevira clean --dry-run # preview what would be removed
340
463
  ```mermaid
341
464
  flowchart LR
342
465
 
343
- A["pipx install codevira"] --> B["codevira register"]
466
+ A["pipx install codevira"] --> B["codevira setup"]
344
467
  B --> C["Open project in\nClaude Code / Cursor /\nWindsurf / Antigravity"]
345
468
  C --> D["First MCP tool call\ntriggers auto-init"]
346
469
  D --> E["✓ Config written\n✓ Graph built\n✓ Roadmap created\n✓ Ready"]
@@ -576,7 +699,28 @@ The `search_codebase` tool will be hidden from your AI agent; all other tools wo
576
699
 
577
700
  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?
578
701
 
579
- 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)
702
+ Read the full write-up: [How We Built Persistent Memory for AI Coding Agents](docs/how-i-built-persistent-memory-for-ai-agents.md)
703
+
704
+ ### Honest token-cost positioning
705
+
706
+ The "92% reduction" number was measured for **structural orientation queries**
707
+ (reading a `get_node` summary vs. reading the full source file) on a Python codebase
708
+ with well-populated graph nodes. It's **not** a per-session, per-prompt, or
709
+ per-conversation savings number — and the gross savings always need to be
710
+ weighed against codevira's own per-prompt context-injection cost
711
+ (~1 KB on every `UserPromptSubmit` when relevant prior decisions exist) and
712
+ one-time setup cost (recording the decisions in the first place).
713
+
714
+ For short-to-medium sessions, expect rough neutrality on token cost. The real
715
+ wins are over **weeks of work on the same project** (cross-session decision
716
+ queries amortize the setup cost) and in **automation and cross-tool continuity**
717
+ (decisions recorded in Claude Code are visible in Cursor / Windsurf / next
718
+ session without you doing anything).
719
+
720
+ To minimise the per-prompt overhead, set
721
+ `project: { cross_session_mode: off }` in `.codevira/config.yaml`, or export
722
+ `CODEVIRA_CROSS_SESSION_MODE=off` in your shell. The injection is opt-out, not
723
+ on-by-default-with-no-escape.
580
724
 
581
725
  ---
582
726
 
@@ -600,6 +744,14 @@ Common questions about setup, usage, architecture, and troubleshooting — see [
600
744
 
601
745
  See what's built, what's next, and the long-term vision — see [ROADMAP.md](ROADMAP.md).
602
746
 
747
+ ## Star History
748
+
749
+ If Codevira saves you tokens or sanity, a star helps other developers find it. Tracking growth keeps me focused on what's working.
750
+
751
+ <a href="https://star-history.com/#sachinshelke/codevira&Date">
752
+ <img src="https://api.star-history.com/svg?repos=sachinshelke/codevira&type=Date" alt="Star History Chart" width="600"/>
753
+ </a>
754
+
603
755
  ## License
604
756
 
605
757
  MIT — free to use, modify, and distribute.