codevira 1.8.0__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 (235) hide show
  1. {codevira-1.8.0 → codevira-2.0.0rc1}/CHANGELOG.md +173 -0
  2. {codevira-1.8.0/codevira.egg-info → codevira-2.0.0rc1}/PKG-INFO +90 -7
  3. {codevira-1.8.0 → codevira-2.0.0rc1}/README.md +89 -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.8.0 → codevira-2.0.0rc1/codevira.egg-info}/PKG-INFO +90 -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/qa-playbook.md +400 -0
  34. codevira-2.0.0rc1/docs/v2-completion-plan.md +211 -0
  35. codevira-2.0.0rc1/docs/v2-execution-log.md +2582 -0
  36. codevira-2.0.0rc1/docs/v2-master-plan.md +251 -0
  37. codevira-2.0.0rc1/docs/vs-other-memory-tools.md +110 -0
  38. codevira-2.0.0rc1/indexer/__init__.py +7 -0
  39. codevira-2.0.0rc1/indexer/_dedupe_migration.py +101 -0
  40. codevira-2.0.0rc1/indexer/_fork_safety.py +69 -0
  41. codevira-2.0.0rc1/indexer/_sqlite_util.py +84 -0
  42. codevira-2.0.0rc1/indexer/fix_history.py +626 -0
  43. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/global_db.py +35 -26
  44. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/index_codebase.py +265 -57
  45. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/outcome_tracker.py +89 -4
  46. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/sqlite_graph.py +211 -13
  47. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/__init__.py +1 -1
  48. codevira-2.0.0rc1/mcp_server/_ghost_check.py +88 -0
  49. codevira-2.0.0rc1/mcp_server/_project_inventory.py +276 -0
  50. codevira-2.0.0rc1/mcp_server/_prompts.py +82 -0
  51. codevira-2.0.0rc1/mcp_server/_repair_init.py +126 -0
  52. codevira-2.0.0rc1/mcp_server/_safe_crash.py +58 -0
  53. codevira-2.0.0rc1/mcp_server/agents_md.py +436 -0
  54. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/auto_init.py +69 -6
  55. codevira-2.0.0rc1/mcp_server/cli.py +1923 -0
  56. codevira-2.0.0rc1/mcp_server/cli_agents.py +220 -0
  57. codevira-2.0.0rc1/mcp_server/cli_budget.py +213 -0
  58. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/cli_configure.py +60 -10
  59. codevira-2.0.0rc1/mcp_server/cli_hooks_admin.py +184 -0
  60. codevira-2.0.0rc1/mcp_server/cli_insights.py +337 -0
  61. codevira-2.0.0rc1/mcp_server/cli_projects.py +139 -0
  62. codevira-2.0.0rc1/mcp_server/cli_replay.py +136 -0
  63. codevira-2.0.0rc1/mcp_server/data/__pycache__/__init__.cpython-313.pyc +0 -0
  64. codevira-2.0.0rc1/mcp_server/data/hooks/post_tool_use.sh +37 -0
  65. codevira-2.0.0rc1/mcp_server/data/hooks/pre_tool_use.sh +57 -0
  66. codevira-2.0.0rc1/mcp_server/data/hooks/session_start.sh +41 -0
  67. codevira-2.0.0rc1/mcp_server/data/hooks/stop.sh +40 -0
  68. codevira-2.0.0rc1/mcp_server/data/hooks/user_prompt_submit.sh +42 -0
  69. codevira-2.0.0rc1/mcp_server/data/templates/agents_md.tmpl +3 -0
  70. codevira-2.0.0rc1/mcp_server/data/templates/canonical_block.md +81 -0
  71. codevira-2.0.0rc1/mcp_server/data/templates/claude_md.tmpl +3 -0
  72. codevira-2.0.0rc1/mcp_server/data/templates/copilot_instructions.tmpl +3 -0
  73. codevira-2.0.0rc1/mcp_server/data/templates/cursor_rules.mdc.tmpl +8 -0
  74. codevira-2.0.0rc1/mcp_server/data/templates/gemini_md.tmpl +3 -0
  75. codevira-2.0.0rc1/mcp_server/data/templates/windsurfrules.tmpl +3 -0
  76. codevira-2.0.0rc1/mcp_server/decision_replay.py +424 -0
  77. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/detect.py +76 -3
  78. codevira-2.0.0rc1/mcp_server/doctor.py +771 -0
  79. codevira-2.0.0rc1/mcp_server/engine/__init__.py +85 -0
  80. codevira-2.0.0rc1/mcp_server/engine/demo_policy.py +62 -0
  81. codevira-2.0.0rc1/mcp_server/engine/events.py +125 -0
  82. codevira-2.0.0rc1/mcp_server/engine/intent_classifier.py +214 -0
  83. codevira-2.0.0rc1/mcp_server/engine/policies/__init__.py +44 -0
  84. codevira-2.0.0rc1/mcp_server/engine/policies/_signature_detect.py +314 -0
  85. codevira-2.0.0rc1/mcp_server/engine/policies/ai_promotion.py +337 -0
  86. codevira-2.0.0rc1/mcp_server/engine/policies/anti_regression.py +190 -0
  87. codevira-2.0.0rc1/mcp_server/engine/policies/blast_radius.py +262 -0
  88. codevira-2.0.0rc1/mcp_server/engine/policies/cross_session.py +363 -0
  89. codevira-2.0.0rc1/mcp_server/engine/policies/decision_lock.py +255 -0
  90. codevira-2.0.0rc1/mcp_server/engine/policies/intent_inference.py +421 -0
  91. codevira-2.0.0rc1/mcp_server/engine/policies/live_style.py +445 -0
  92. codevira-2.0.0rc1/mcp_server/engine/policies/scope_contract.py +362 -0
  93. codevira-2.0.0rc1/mcp_server/engine/policies/token_budget.py +100 -0
  94. codevira-2.0.0rc1/mcp_server/engine/policy.py +160 -0
  95. codevira-2.0.0rc1/mcp_server/engine/promotion_score.py +208 -0
  96. codevira-2.0.0rc1/mcp_server/engine/runner.py +263 -0
  97. codevira-2.0.0rc1/mcp_server/engine/scope_contract.py +201 -0
  98. codevira-2.0.0rc1/mcp_server/engine/signals.py +436 -0
  99. codevira-2.0.0rc1/mcp_server/engine/token_meter.py +337 -0
  100. codevira-2.0.0rc1/mcp_server/engine/wiring/__init__.py +16 -0
  101. codevira-2.0.0rc1/mcp_server/engine/wiring/claude_code_hooks.py +368 -0
  102. codevira-2.0.0rc1/mcp_server/engine/wiring/mcp_dispatch.py +186 -0
  103. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/http_server.py +26 -0
  104. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/ide_inject.py +223 -7
  105. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/paths.py +98 -4
  106. codevira-2.0.0rc1/mcp_server/roadmap_drift.py +249 -0
  107. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/server.py +300 -10
  108. codevira-2.0.0rc1/mcp_server/setup_wizard.py +893 -0
  109. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/tools/graph.py +162 -6
  110. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/tools/learning.py +259 -8
  111. codevira-2.0.0rc1/mcp_server/tools/playbook.py +205 -0
  112. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/tools/search.py +120 -5
  113. {codevira-1.8.0 → codevira-2.0.0rc1}/pyproject.toml +1 -1
  114. codevira-2.0.0rc1/tests/test__prompts.py +138 -0
  115. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_auto_init.py +75 -3
  116. codevira-2.0.0rc1/tests/test_call_edge_fk_safety.py +162 -0
  117. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_chunker.py +18 -7
  118. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_cli.py +285 -0
  119. codevira-2.0.0rc1/tests/test_cli_agents.py +375 -0
  120. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_cli_configure.py +59 -0
  121. codevira-2.0.0rc1/tests/test_cli_insights.py +159 -0
  122. codevira-2.0.0rc1/tests/test_cli_projects.py +224 -0
  123. codevira-2.0.0rc1/tests/test_cli_replay.py +234 -0
  124. codevira-2.0.0rc1/tests/test_cli_version.py +51 -0
  125. codevira-2.0.0rc1/tests/test_dedupe_migration.py +249 -0
  126. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_detect.py +78 -11
  127. codevira-2.0.0rc1/tests/test_doctor.py +424 -0
  128. codevira-2.0.0rc1/tests/test_fk_safety_extended.py +178 -0
  129. codevira-2.0.0rc1/tests/test_fork_safety.py +206 -0
  130. codevira-2.0.0rc1/tests/test_ghost_check.py +116 -0
  131. codevira-2.0.0rc1/tests/test_hook_resilience.py +283 -0
  132. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_http_server.py +11 -4
  133. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_ide_inject.py +232 -8
  134. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_index_codebase.py +270 -0
  135. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_outcome_tracker.py +51 -0
  136. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_paths.py +119 -0
  137. codevira-2.0.0rc1/tests/test_record_decision.py +274 -0
  138. codevira-2.0.0rc1/tests/test_repair_init.py +191 -0
  139. codevira-2.0.0rc1/tests/test_retire_rule.py +271 -0
  140. codevira-2.0.0rc1/tests/test_roadmap_drift.py +385 -0
  141. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_server.py +134 -9
  142. codevira-2.0.0rc1/tests/test_setup_wizard.py +836 -0
  143. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_sqlite_graph.py +90 -0
  144. codevira-2.0.0rc1/tests/test_sqlite_util.py +115 -0
  145. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_tools_learning.py +113 -0
  146. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_tools_playbook.py +23 -10
  147. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_tools_search.py +20 -6
  148. codevira-2.0.0rc1/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.0rc1}/LICENSE +0 -0
  154. {codevira-1.8.0 → codevira-2.0.0rc1}/MANIFEST.in +0 -0
  155. {codevira-1.8.0 → codevira-2.0.0rc1}/agents/builder.md +0 -0
  156. {codevira-1.8.0 → codevira-2.0.0rc1}/agents/developer.md +0 -0
  157. {codevira-1.8.0 → codevira-2.0.0rc1}/agents/documenter.md +0 -0
  158. {codevira-1.8.0 → codevira-2.0.0rc1}/agents/orchestrator.md +0 -0
  159. {codevira-1.8.0 → codevira-2.0.0rc1}/agents/planner.md +0 -0
  160. {codevira-1.8.0 → codevira-2.0.0rc1}/agents/reviewer.md +0 -0
  161. {codevira-1.8.0 → codevira-2.0.0rc1}/agents/tester.md +0 -0
  162. {codevira-1.8.0 → codevira-2.0.0rc1}/codevira.egg-info/dependency_links.txt +0 -0
  163. {codevira-1.8.0 → codevira-2.0.0rc1}/codevira.egg-info/entry_points.txt +0 -0
  164. {codevira-1.8.0 → codevira-2.0.0rc1}/codevira.egg-info/requires.txt +0 -0
  165. {codevira-1.8.0 → codevira-2.0.0rc1}/codevira.egg-info/top_level.txt +0 -0
  166. {codevira-1.8.0 → codevira-2.0.0rc1}/config.example.yaml +0 -0
  167. {codevira-1.8.0 → codevira-2.0.0rc1}/docs/how-i-built-persistent-memory-for-ai-agents.md +0 -0
  168. {codevira-1.8.0 → codevira-2.0.0rc1}/docs/linkedin-article-ai-agent-memory.md +0 -0
  169. {codevira-1.8.0 → codevira-2.0.0rc1}/docs/linkedin-post-ai-agent-memory.md +0 -0
  170. {codevira-1.8.0 → codevira-2.0.0rc1}/docs/local-pypi-https.md +0 -0
  171. {codevira-1.8.0 → codevira-2.0.0rc1}/docs/medium-your-ai-coding-agent-has-amnesia.md +0 -0
  172. {codevira-1.8.0 → codevira-2.0.0rc1}/docs/roadmap.md +0 -0
  173. {codevira-1.8.0 → codevira-2.0.0rc1}/graph/_schema.yaml +0 -0
  174. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/chunker.py +0 -0
  175. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/graph_generator.py +0 -0
  176. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/rule_learner.py +0 -0
  177. {codevira-1.8.0 → codevira-2.0.0rc1}/indexer/treesitter_parser.py +0 -0
  178. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/__main__.py +0 -0
  179. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/crash_logger.py +0 -0
  180. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/__init__.py +0 -0
  181. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/agents/builder.md +0 -0
  182. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/agents/developer.md +0 -0
  183. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/agents/documenter.md +0 -0
  184. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/agents/orchestrator.md +0 -0
  185. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/agents/planner.md +0 -0
  186. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/agents/reviewer.md +0 -0
  187. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/agents/tester.md +0 -0
  188. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/config.example.yaml +0 -0
  189. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/coding-standards.md +0 -0
  190. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/engineering-excellence.md +0 -0
  191. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/git-cicd-governance.md +0 -0
  192. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/git_commits.md +0 -0
  193. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/incremental-updates.md +0 -0
  194. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/master_rule.md +0 -0
  195. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/multi-language.md +0 -0
  196. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/persistence.md +0 -0
  197. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/resilience-observability.md +0 -0
  198. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/smoke-testing.md +0 -0
  199. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/data/rules/testing-standards.md +0 -0
  200. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/gitignore.py +0 -0
  201. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/global_sync.py +0 -0
  202. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/launchd.py +0 -0
  203. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/log_retention.py +0 -0
  204. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/migrate.py +0 -0
  205. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/prompts.py +0 -0
  206. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/tools/__init__.py +0 -0
  207. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/tools/changesets.py +0 -0
  208. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/tools/code_reader.py +0 -0
  209. {codevira-1.8.0 → codevira-2.0.0rc1}/mcp_server/tools/roadmap.py +0 -0
  210. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/coding-standards.md +0 -0
  211. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/engineering-excellence.md +0 -0
  212. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/git-cicd-governance.md +0 -0
  213. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/git_commits.md +0 -0
  214. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/incremental-updates.md +0 -0
  215. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/master_rule.md +0 -0
  216. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/persistence.md +0 -0
  217. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/resilience-observability.md +0 -0
  218. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/smoke-testing.md +0 -0
  219. {codevira-1.8.0 → codevira-2.0.0rc1}/rules/testing-standards.md +0 -0
  220. {codevira-1.8.0 → codevira-2.0.0rc1}/setup.cfg +0 -0
  221. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_crash_logger.py +0 -0
  222. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_gitignore.py +0 -0
  223. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_global_db.py +0 -0
  224. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_global_sync.py +0 -0
  225. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_graph_generator.py +0 -0
  226. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_launchd.py +0 -0
  227. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_log_retention.py +0 -0
  228. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_migrate.py +0 -0
  229. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_prompts.py +0 -0
  230. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_rule_learner.py +0 -0
  231. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_tools_changesets.py +0 -0
  232. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_tools_code_reader.py +0 -0
  233. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_tools_graph.py +0 -0
  234. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_tools_roadmap.py +0 -0
  235. {codevira-1.8.0 → codevira-2.0.0rc1}/tests/test_treesitter_parser.py +0 -0
@@ -11,6 +11,179 @@ 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
+
14
187
  ---
15
188
 
16
189
  ## [1.8.0] — 2026-04-23 — Memory Sharpening + Config UX
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: codevira
3
- Version: 1.8.0
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.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.
@@ -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
 
@@ -576,7 +630,28 @@ The `search_codebase` tool will be hidden from your AI agent; all other tools wo
576
630
 
577
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?
578
632
 
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)
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.
580
655
 
581
656
  ---
582
657
 
@@ -600,6 +675,14 @@ Common questions about setup, usage, architecture, and troubleshooting — see [
600
675
 
601
676
  See what's built, what's next, and the long-term vision — see [ROADMAP.md](ROADMAP.md).
602
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
+
603
686
  ## License
604
687
 
605
688
  MIT — free to use, modify, and distribute.
@@ -2,10 +2,11 @@
2
2
 
3
3
  > **One memory layer for every AI coding tool you use.** Switch between Claude Code, Cursor, Windsurf, and Antigravity without losing context, decisions, or progress.
4
4
 
5
- [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
5
+ [![PyPI version](https://img.shields.io/pypi/v/codevira?color=orange)](https://pypi.org/project/codevira/)
6
+ [![Python](https://img.shields.io/pypi/pyversions/codevira?color=blue)](https://pypi.org/project/codevira/)
7
+ [![Downloads](https://static.pepy.tech/badge/codevira)](https://pepy.tech/project/codevira)
6
8
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
7
9
  [![MCP](https://img.shields.io/badge/protocol-MCP-purple)](https://modelcontextprotocol.io)
8
- [![Version](https://img.shields.io/badge/version-1.8.0-orange)](CHANGELOG.md)
9
10
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](CONTRIBUTING.md)
10
11
 
11
12
  **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.
@@ -34,6 +35,43 @@ Your AI agent reads the same 12 files every session before doing any actual work
34
35
 
35
36
  ---
36
37
 
38
+ ## What's new in v2.0
39
+
40
+ > 30-second demo: **[docs/demo/codevira-demo.mp4](docs/demo/codevira-demo.mp4)**
41
+
42
+ 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).
43
+
44
+ | # | Hero | What it does | Trigger |
45
+ |---|---|---|---|
46
+ | 4 | **Blast-Radius Veto** | Block edits to files with N+ callers without explicit acknowledgment | before Edit/Write |
47
+ | 1 | **Decision Lock** | Refuse edits to files marked `do_not_revert` | before Edit/Write |
48
+ | 2 | **Anti-Regression Memory** | Block edits that re-introduce previously-fixed bugs | before Edit/Write |
49
+ | 3 | **Scope Contract Lock** *(off-by-default)* | Refuse edits to files outside what your prompt asked for | prompt → enforce on Edit |
50
+ | 5 | **Cross-Session Consistency** | Inject related past decisions when you submit a prompt | prompt submit |
51
+ | 9 | **Proactive Intent Inference** | Pre-fetch fixes/decisions/blast-radius for the AI's first turn | prompt submit |
52
+ | 6 | **Token Budget Live View** | Track AI token spend per session; `codevira budget` shows breakdown | every tool call |
53
+ | 7 | **Live Style Enforcement** | Warn on snake_case/camelCase/quote-style violations vs your project's preferences | after Edit/Write |
54
+ | 10 | **AI Promotion Score** | Auto-score decisions by outcome history; `codevira insights` weekly digest | session start |
55
+ | 8 | **Decision Replay** | Browse decision timeline as terminal / markdown / HTML; MCP resource for Claude Desktop; `codevira replay` CLI | on demand |
56
+
57
+ All 10 work behind the scenes by default. No new vocabulary to learn.
58
+
59
+ ### v2.0 CLI surface
60
+
61
+ ```text
62
+ codevira setup # one-prompt setup; replaces `register`
63
+ codevira doctor # health check with ✓/⚠/✗ + exact fix commands
64
+ codevira agents # regen per-IDE nudge files (CLAUDE.md, AGENTS.md, etc.)
65
+ codevira hooks install # install Claude Code lifecycle hooks
66
+ codevira budget # token-spend per session (Hero 6)
67
+ codevira insights # stable / reverted decisions (Hero 10)
68
+ codevira replay # browse decision timeline (Hero 8)
69
+ ```
70
+
71
+ For the honest "vs Mem0 / claude-mem / MemPalace" comparison see **[docs/vs-other-memory-tools.md](docs/vs-other-memory-tools.md)**.
72
+
73
+ ---
74
+
37
75
  ## How It Works
38
76
 
39
77
  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:
@@ -78,13 +116,29 @@ pip install codevira
78
116
 
79
117
  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.
80
118
 
81
- ### 2. Register with your AI tools
119
+ ### 2. Set up every AI tool you have
82
120
 
83
121
  ```bash
84
- codevira register
122
+ codevira setup
85
123
  ```
86
124
 
87
- 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.
125
+ This one-prompt v2.0 command:
126
+ - Detects every AI tool installed on your machine (Claude Code, Cursor, Windsurf, Antigravity, Codex CLI, GitHub Copilot, Claude Desktop, Continue, Aider, Roo Code, Cline)
127
+ - 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`)
128
+ - Installs Claude Code lifecycle hooks (SessionStart, PreToolUse, PostToolUse, UserPromptSubmit, Stop) — turns codevira from passive memory into the **AI guardian** described above
129
+ - Injects MCP server config into each detected tool
130
+
131
+ Idempotent — re-run any time to re-sync. Use `--dry-run` to preview, `--ide=claude` to limit to one tool.
132
+
133
+ > **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.
134
+
135
+ ### 2.5 Verify the install (optional but recommended)
136
+
137
+ ```bash
138
+ codevira doctor
139
+ ```
140
+
141
+ Runs 9 health checks, prints `✓` / `⚠` / `✗` per check, and shows the **exact command** to fix anything that's not green. Read-only — never modifies anything.
88
142
 
89
143
  ### 3. Start using
90
144
 
@@ -537,7 +591,28 @@ The `search_codebase` tool will be hidden from your AI agent; all other tools wo
537
591
 
538
592
  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?
539
593
 
540
- 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)
594
+ Read the full write-up: [How We Built Persistent Memory for AI Coding Agents](docs/how-i-built-persistent-memory-for-ai-agents.md)
595
+
596
+ ### Honest token-cost positioning
597
+
598
+ The "92% reduction" number was measured for **structural orientation queries**
599
+ (reading a `get_node` summary vs. reading the full source file) on a Python codebase
600
+ with well-populated graph nodes. It's **not** a per-session, per-prompt, or
601
+ per-conversation savings number — and the gross savings always need to be
602
+ weighed against codevira's own per-prompt context-injection cost
603
+ (~1 KB on every `UserPromptSubmit` when relevant prior decisions exist) and
604
+ one-time setup cost (recording the decisions in the first place).
605
+
606
+ For short-to-medium sessions, expect rough neutrality on token cost. The real
607
+ wins are over **weeks of work on the same project** (cross-session decision
608
+ queries amortize the setup cost) and in **automation and cross-tool continuity**
609
+ (decisions recorded in Claude Code are visible in Cursor / Windsurf / next
610
+ session without you doing anything).
611
+
612
+ To minimise the per-prompt overhead, set
613
+ `project: { cross_session_mode: off }` in `.codevira/config.yaml`, or export
614
+ `CODEVIRA_CROSS_SESSION_MODE=off` in your shell. The injection is opt-out, not
615
+ on-by-default-with-no-escape.
541
616
 
542
617
  ---
543
618
 
@@ -561,6 +636,14 @@ Common questions about setup, usage, architecture, and troubleshooting — see [
561
636
 
562
637
  See what's built, what's next, and the long-term vision — see [ROADMAP.md](ROADMAP.md).
563
638
 
639
+ ## Star History
640
+
641
+ If Codevira saves you tokens or sanity, a star helps other developers find it. Tracking growth keeps me focused on what's working.
642
+
643
+ <a href="https://star-history.com/#sachinshelke/codevira&Date">
644
+ <img src="https://api.star-history.com/svg?repos=sachinshelke/codevira&type=Date" alt="Star History Chart" width="600"/>
645
+ </a>
646
+
564
647
  ## License
565
648
 
566
649
  MIT — free to use, modify, and distribute.
@@ -0,0 +1,57 @@
1
+ # QA Angle 01 — Code Review
2
+
3
+ **Subagent type:** Explore
4
+ **Time-box:** 30 min
5
+ **Catches:** Implementation bugs, dead code, type errors, error-handling gaps
6
+
7
+ ## Prompt
8
+
9
+ ```
10
+ You are a senior code reviewer auditing {scope}.
11
+
12
+ For each file, look for:
13
+
14
+ 1. **Real bugs** — logic errors, wrong field names, off-by-one, missing
15
+ error handling, incorrect parameter use. Cite file:line.
16
+
17
+ 2. **Dead code** — unreachable branches, unused parameters, vestigial
18
+ functions. Cite file:line.
19
+
20
+ 3. **Type errors** — annotation mismatches, missing Optional handling,
21
+ untyped public APIs. Cite file:line.
22
+
23
+ 4. **Error-handling gaps** — try/except that's too broad, exceptions
24
+ swallowed silently, missing finally/cleanup, errors reported via
25
+ wrong channel (stdout vs stderr vs raise).
26
+
27
+ 5. **Concurrency issues** — shared state mutated without lock, lock
28
+ ordering risks, atomicity gaps.
29
+
30
+ 6. **Performance smells** — O(n²) loops, repeated SQL queries that
31
+ could batch, missing caches, eager loads that could be lazy.
32
+
33
+ 7. **API surface concerns** — public functions without docstrings,
34
+ ambiguous parameter names, defaults that could mislead.
35
+
36
+ For each finding, output:
37
+ **[SEVERITY]** {file:line}: {one-sentence description}
38
+ Suggested fix: {specific change}
39
+ Reasoning: {1-2 sentences why this matters}
40
+
41
+ Severities: P0 (broken; would ship a real bug), P1 (latent; bites
42
+ later), P2 (smell; backlog).
43
+
44
+ Cap output at 1500 words. Be merciless about real findings; skip
45
+ nits.
46
+ ```
47
+
48
+ ## Trigger
49
+
50
+ Before alpha ship of any hero. Also: any commit touching engine core
51
+ or wiring layer.
52
+
53
+ ## Expected output shape
54
+
55
+ A markdown report with severity-tagged findings. Should produce
56
+ ≥1 P2 even on clean code (style/polish); P0/P1 indicate real issues
57
+ to fix this round.
@@ -0,0 +1,57 @@
1
+ # QA Angle 02 — Adversarial Fix Review
2
+
3
+ **Subagent type:** Explore
4
+ **Time-box:** 30 min
5
+ **Catches:** Bugs introduced BY the fix code itself
6
+
7
+ ## Prompt
8
+
9
+ ```
10
+ You are a security-minded reviewer specifically auditing the FIXES
11
+ just made in {scope}. Don't review the original feature — review the
12
+ fix code with hostile intent. Your goal: find ways to break each fix.
13
+
14
+ For each fix, ask:
15
+
16
+ 1. **Off-by-one / boundary errors** — what if the input is at the exact
17
+ boundary the fix checks? One above? One below? Empty? Maximum size?
18
+
19
+ 2. **Encoding / parsing assumptions** — what if user content contains
20
+ the literal markers/tokens the fix uses for parsing? What if it's
21
+ nested? What if it has escapes?
22
+
23
+ 3. **Type confusion** — what if the input is a list when the fix expects
24
+ a dict? Bytes when it expects str? None when expects int?
25
+
26
+ 4. **State assumptions** — does the fix assume single-threaded? Single
27
+ project? No prior state? What breaks if those don't hold?
28
+
29
+ 5. **Unicode / non-ASCII** — Unicode normalization, RTL text, emojis
30
+ in identifiers, zero-width spaces, BIDI overrides.
31
+
32
+ 6. **Resource exhaustion** — can a malicious input cause CPU spike,
33
+ memory blow, file descriptor leak, lock starvation?
34
+
35
+ 7. **The fix's own bugs** — does the fix's regex have edge cases?
36
+ Does its error path itself have bugs? What if the fix is invoked
37
+ recursively?
38
+
39
+ For each finding:
40
+ **[SEVERITY]** {file:line}: {attack scenario}
41
+ Concrete input that breaks it: {actual code/data}
42
+ Suggested fix: {specific change}
43
+
44
+ Be specific. "Could be exploited" is not a finding; "input X causes
45
+ behavior Y because of code Z" is.
46
+ ```
47
+
48
+ ## Trigger
49
+
50
+ Within 1 hour of merging any P0/P1 fix. Catches "fixes have their
51
+ own bugs" — Round 2's primary discovery angle.
52
+
53
+ ## Expected output
54
+
55
+ 3–5 findings on a typical fix sprint. Pure code review tools rarely
56
+ catch these because they require thinking adversarially about WHAT
57
+ the fix does, not just whether it's syntactically correct.
@@ -0,0 +1,57 @@
1
+ # QA Angle 03 — Cross-Module Impact
2
+
3
+ **Subagent type:** Explore
4
+ **Time-box:** 30 min
5
+ **Catches:** Regressions in OTHER subsystems caused by the new code
6
+
7
+ ## Prompt
8
+
9
+ ```
10
+ You are reviewing whether {scope} (the NEW code) breaks or degrades
11
+ any EXISTING functionality. Pre-{scope} behavior is the baseline.
12
+
13
+ Walk through 3 user workflows mentally, comparing pre vs post:
14
+
15
+ 1. **First-time install** —
16
+ pipx install codevira → codevira register → codevira configure
17
+ - What's the diff in observable behavior?
18
+ - Does any new module load eagerly that wasn't there before?
19
+ - Any new failure modes added to first-call latency?
20
+
21
+ 2. **Existing user upgrade** —
22
+ v1.8.0 user runs pipx upgrade codevira → opens their IDE
23
+ - Does existing data migrate cleanly?
24
+ - Does existing IDE config still work?
25
+ - Any breaking change to public APIs?
26
+
27
+ 3. **Daily-use** —
28
+ AI agent calls existing tools (get_node, get_impact, search_decisions)
29
+ - Has the dispatch path slowed?
30
+ - Has the response shape changed?
31
+ - Any new error path that didn't exist before?
32
+
33
+ For each potential regression:
34
+ **[IMPACT]** {file:line}: {what changes}
35
+ Severity: {how badly does it bite the user}
36
+ Mitigation: {fix or document}
37
+
38
+ Specifically check:
39
+ - Module-level imports — is anything new imported eagerly?
40
+ - Module-level state — does new code mutate global state existing
41
+ modules depend on?
42
+ - Shared resources — files, sockets, locks, caches now contended?
43
+ - Existing tests — do any pass only by accident now?
44
+ - Crash/error paths — does new code change what gets logged where?
45
+
46
+ Cap at 1000 words.
47
+ ```
48
+
49
+ ## Trigger
50
+
51
+ Any architectural addition (new module, new daemon, new dispatch path).
52
+ Not needed for pure bug fixes within an existing module.
53
+
54
+ ## Expected output
55
+
56
+ Often clean (0 findings) when new code is well-isolated. When it finds
57
+ something, it's typically a hot-path slowdown or a global-state hazard.