codevira 3.5.0__tar.gz → 3.7.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 (312) hide show
  1. {codevira-3.5.0 → codevira-3.7.0}/CHANGELOG.md +176 -1
  2. {codevira-3.5.0/codevira.egg-info → codevira-3.7.0}/PKG-INFO +56 -18
  3. {codevira-3.5.0 → codevira-3.7.0}/README.md +55 -17
  4. {codevira-3.5.0 → codevira-3.7.0/codevira.egg-info}/PKG-INFO +56 -18
  5. {codevira-3.5.0 → codevira-3.7.0}/codevira.egg-info/SOURCES.txt +18 -0
  6. {codevira-3.5.0 → codevira-3.7.0}/docs/architecture.md +21 -12
  7. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/02-anti-regression.md +1 -1
  8. codevira-3.7.0/docs/plans/opt-in-activation.md +236 -0
  9. {codevira-3.5.0 → codevira-3.7.0}/docs/roadmap.md +22 -23
  10. {codevira-3.5.0 → codevira-3.7.0}/docs/vs-other-memory-tools.md +10 -12
  11. {codevira-3.5.0 → codevira-3.7.0}/indexer/fix_history.py +115 -0
  12. {codevira-3.5.0 → codevira-3.7.0}/indexer/graph_generator.py +23 -1
  13. {codevira-3.5.0 → codevira-3.7.0}/indexer/index_codebase.py +56 -12
  14. {codevira-3.5.0 → codevira-3.7.0}/indexer/sqlite_graph.py +44 -0
  15. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/__init__.py +1 -1
  16. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/_repair_init.py +15 -0
  17. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/auto_init.py +14 -0
  18. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli.py +175 -2
  19. codevira-3.7.0/mcp_server/cli_repair.py +224 -0
  20. codevira-3.7.0/mcp_server/cli_search.py +132 -0
  21. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/doctor.py +51 -0
  22. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/memory_fanout.py +27 -1
  23. codevira-3.7.0/mcp_server/engine/policies/_region_detect.py +177 -0
  24. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/decision_lock.py +125 -13
  25. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/signals.py +3 -0
  26. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/wiring/claude_code_hooks.py +23 -0
  27. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/global_sync.py +9 -0
  28. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/graph/template.html +31 -0
  29. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ide_inject.py +72 -6
  30. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/migrate.py +179 -0
  31. codevira-3.7.0/mcp_server/opt_in.py +290 -0
  32. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/paths.py +75 -4
  33. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/project_binding.py +46 -3
  34. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/server.py +173 -6
  35. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/agents_md_generator.py +21 -3
  36. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/decisions_store.py +314 -6
  37. codevira-3.7.0/mcp_server/storage/id_repair.py +305 -0
  38. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/jsonl_store.py +115 -50
  39. codevira-3.7.0/mcp_server/storage/reconcile.py +196 -0
  40. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/check_conflict.py +21 -99
  41. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/graph.py +54 -0
  42. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/learning.py +150 -5
  43. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/roadmap.py +8 -0
  44. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/search.py +19 -1
  45. {codevira-3.5.0 → codevira-3.7.0}/pyproject.toml +1 -1
  46. {codevira-3.5.0 → codevira-3.7.0}/tests/test_auto_init.py +78 -2
  47. {codevira-3.5.0 → codevira-3.7.0}/tests/test_binding_e2e.py +12 -9
  48. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_graph.py +25 -0
  49. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_projects.py +15 -6
  50. codevira-3.7.0/tests/test_cli_search.py +117 -0
  51. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_transfer.py +5 -0
  52. codevira-3.7.0/tests/test_cross_project_search.py +225 -0
  53. codevira-3.7.0/tests/test_decisions_store.py +113 -0
  54. {codevira-3.5.0 → codevira-3.7.0}/tests/test_doctor.py +34 -0
  55. {codevira-3.5.0 → codevira-3.7.0}/tests/test_global_sync.py +40 -0
  56. {codevira-3.5.0 → codevira-3.7.0}/tests/test_graph_generator.py +66 -0
  57. {codevira-3.5.0 → codevira-3.7.0}/tests/test_http_server.py +13 -1
  58. codevira-3.7.0/tests/test_id_repair.py +211 -0
  59. {codevira-3.5.0 → codevira-3.7.0}/tests/test_ide_inject.py +125 -35
  60. {codevira-3.5.0 → codevira-3.7.0}/tests/test_index_codebase.py +28 -0
  61. codevira-3.7.0/tests/test_opt_in.py +456 -0
  62. {codevira-3.5.0 → codevira-3.7.0}/tests/test_paths.py +119 -0
  63. codevira-3.7.0/tests/test_phase27_quality_fixes.py +139 -0
  64. {codevira-3.5.0 → codevira-3.7.0}/tests/test_project_binding.py +40 -0
  65. codevira-3.7.0/tests/test_reconcile.py +101 -0
  66. codevira-3.7.0/tests/test_registration_heal.py +90 -0
  67. codevira-3.7.0/tests/test_repair_ids.py +278 -0
  68. {codevira-3.5.0 → codevira-3.7.0}/tests/test_repair_init.py +62 -3
  69. {codevira-3.5.0 → codevira-3.7.0}/tests/test_server.py +58 -1
  70. {codevira-3.5.0 → codevira-3.7.0}/tests/test_sqlite_graph.py +46 -0
  71. codevira-3.7.0/tests/test_startup_migrations.py +77 -0
  72. codevira-3.7.0/tests/test_supersede_on_write.py +105 -0
  73. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_graph.py +67 -0
  74. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_learning.py +88 -0
  75. {codevira-3.5.0 → codevira-3.7.0}/LICENSE +0 -0
  76. {codevira-3.5.0 → codevira-3.7.0}/MANIFEST.in +0 -0
  77. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/01-code-review.md +0 -0
  78. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/02-adversarial-fix-review.md +0 -0
  79. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/03-cross-module-impact.md +0 -0
  80. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/06-doc-drift.md +0 -0
  81. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/07-security-audit.md +0 -0
  82. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/12-llm-redteam.md +0 -0
  83. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/13-multi-ide-schema.md +0 -0
  84. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/22-competitor-benchmark.md +0 -0
  85. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/README.md +0 -0
  86. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/tier2-scripts.md +0 -0
  87. {codevira-3.5.0 → codevira-3.7.0}/agents/qa/tier3-manual.md +0 -0
  88. {codevira-3.5.0 → codevira-3.7.0}/codevira.egg-info/dependency_links.txt +0 -0
  89. {codevira-3.5.0 → codevira-3.7.0}/codevira.egg-info/entry_points.txt +0 -0
  90. {codevira-3.5.0 → codevira-3.7.0}/codevira.egg-info/requires.txt +0 -0
  91. {codevira-3.5.0 → codevira-3.7.0}/codevira.egg-info/top_level.txt +0 -0
  92. {codevira-3.5.0 → codevira-3.7.0}/config.example.yaml +0 -0
  93. {codevira-3.5.0 → codevira-3.7.0}/docs/alpha-tester-invites.md +0 -0
  94. {codevira-3.5.0 → codevira-3.7.0}/docs/audit-2026-05-22.md +0 -0
  95. {codevira-3.5.0 → codevira-3.7.0}/docs/demo/README.md +0 -0
  96. {codevira-3.5.0 → codevira-3.7.0}/docs/foolproof-product-charter.md +0 -0
  97. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/00-engine.md +0 -0
  98. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/01-decision-lock.md +0 -0
  99. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/03-scope-contract.md +0 -0
  100. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/04-blast-radius.md +0 -0
  101. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/05-cross-session.md +0 -0
  102. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/06-token-budget.md +0 -0
  103. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/07-live-style.md +0 -0
  104. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/08-decision-replay.md +0 -0
  105. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/09-intent-inference.md +0 -0
  106. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/10-ai-promotion.md +0 -0
  107. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/README.md +0 -0
  108. {codevira-3.5.0 → codevira-3.7.0}/docs/heroes/pillar-1-setup.md +0 -0
  109. {codevira-3.5.0 → codevira-3.7.0}/docs/hn-launch-day.md +0 -0
  110. {codevira-3.5.0 → codevira-3.7.0}/docs/how-i-built-persistent-memory-for-ai-agents.md +0 -0
  111. {codevira-3.5.0 → codevira-3.7.0}/docs/internal/competitive-landscape.md +0 -0
  112. {codevira-3.5.0 → codevira-3.7.0}/docs/linkedin-article-ai-agent-memory.md +0 -0
  113. {codevira-3.5.0 → codevira-3.7.0}/docs/linkedin-post-ai-agent-memory.md +0 -0
  114. {codevira-3.5.0 → codevira-3.7.0}/docs/local-pypi-https.md +0 -0
  115. {codevira-3.5.0 → codevira-3.7.0}/docs/medium-your-ai-coding-agent-has-amnesia.md +0 -0
  116. {codevira-3.5.0 → codevira-3.7.0}/docs/morning-handoff-2026-05-22.md +0 -0
  117. {codevira-3.5.0 → codevira-3.7.0}/docs/plans/v2.1.2.md +0 -0
  118. {codevira-3.5.0 → codevira-3.7.0}/docs/plans/v2.1.3.md +0 -0
  119. {codevira-3.5.0 → codevira-3.7.0}/docs/plans/v2.2.0.md +0 -0
  120. {codevira-3.5.0 → codevira-3.7.0}/docs/plans/v3.0.0.md +0 -0
  121. {codevira-3.5.0 → codevira-3.7.0}/docs/qa-playbook.md +0 -0
  122. {codevira-3.5.0 → codevira-3.7.0}/docs/release-notes/v3.1.1.md +0 -0
  123. {codevira-3.5.0 → codevira-3.7.0}/docs/release-process.md +0 -0
  124. {codevira-3.5.0 → codevira-3.7.0}/docs/surface-cuts-2026-05-22.md +0 -0
  125. {codevira-3.5.0 → codevira-3.7.0}/docs/troubleshooting/antigravity.md +0 -0
  126. {codevira-3.5.0 → codevira-3.7.0}/docs/v2-completion-plan.md +0 -0
  127. {codevira-3.5.0 → codevira-3.7.0}/docs/v2-execution-log.md +0 -0
  128. {codevira-3.5.0 → codevira-3.7.0}/docs/v2-master-plan.md +0 -0
  129. {codevira-3.5.0 → codevira-3.7.0}/graph/_schema.yaml +0 -0
  130. {codevira-3.5.0 → codevira-3.7.0}/indexer/__init__.py +0 -0
  131. {codevira-3.5.0 → codevira-3.7.0}/indexer/_dedupe_migration.py +0 -0
  132. {codevira-3.5.0 → codevira-3.7.0}/indexer/_fork_safety.py +0 -0
  133. {codevira-3.5.0 → codevira-3.7.0}/indexer/_sqlite_util.py +0 -0
  134. {codevira-3.5.0 → codevira-3.7.0}/indexer/chunker.py +0 -0
  135. {codevira-3.5.0 → codevira-3.7.0}/indexer/global_db.py +0 -0
  136. {codevira-3.5.0 → codevira-3.7.0}/indexer/outcome_classifier.py +0 -0
  137. {codevira-3.5.0 → codevira-3.7.0}/indexer/outcome_tracker.py +0 -0
  138. {codevira-3.5.0 → codevira-3.7.0}/indexer/treesitter_parser.py +0 -0
  139. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/__main__.py +0 -0
  140. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/_ghost_check.py +0 -0
  141. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/_mcp_registry.py +0 -0
  142. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/_project_inventory.py +0 -0
  143. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/_prompts.py +0 -0
  144. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/_safe_crash.py +0 -0
  145. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_consensus.py +0 -0
  146. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_eval.py +0 -0
  147. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_export.py +0 -0
  148. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_graph.py +0 -0
  149. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_hooks_admin.py +0 -0
  150. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_induce.py +0 -0
  151. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_init.py +0 -0
  152. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_projects.py +0 -0
  153. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_reflect.py +0 -0
  154. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_replay.py +0 -0
  155. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_sync.py +0 -0
  156. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_transfer.py +0 -0
  157. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_uninstall.py +0 -0
  158. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/cli_working.py +0 -0
  159. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/crash_logger.py +0 -0
  160. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/__init__.py +0 -0
  161. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/affordances.yaml +0 -0
  162. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/config.example.yaml +0 -0
  163. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/hooks/post_tool_use.sh +0 -0
  164. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/hooks/pre_tool_use.sh +0 -0
  165. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/hooks/session_start.sh +0 -0
  166. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/hooks/stop.sh +0 -0
  167. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/hooks/user_prompt_submit.sh +0 -0
  168. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/prompts/reflection_v1.md +0 -0
  169. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/coding-standards-generic.md +0 -0
  170. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/coding-standards-go.md +0 -0
  171. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/coding-standards-typescript.md +0 -0
  172. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/coding-standards.md +0 -0
  173. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/engineering-excellence.md +0 -0
  174. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/git-cicd-governance.md +0 -0
  175. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/git_commits.md +0 -0
  176. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/incremental-updates.md +0 -0
  177. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/master_rule.md +0 -0
  178. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/multi-language.md +0 -0
  179. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/persistence.md +0 -0
  180. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/resilience-observability.md +0 -0
  181. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/smoke-testing.md +0 -0
  182. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/data/rules/testing-standards.md +0 -0
  183. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/decision_replay.py +0 -0
  184. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/detect.py +0 -0
  185. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/__init__.py +0 -0
  186. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/demo_policy.py +0 -0
  187. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/events.py +0 -0
  188. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/__init__.py +0 -0
  189. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/_signature_detect.py +0 -0
  190. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/anti_regression.py +0 -0
  191. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/blast_radius.py +0 -0
  192. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/post_edit_refresh.py +0 -0
  193. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/prompt_capture.py +0 -0
  194. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/relevance_inject.py +0 -0
  195. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/session_log_enforcer.py +0 -0
  196. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policies/token_budget.py +0 -0
  197. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/policy.py +0 -0
  198. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/runner.py +0 -0
  199. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/token_meter.py +0 -0
  200. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/wiring/__init__.py +0 -0
  201. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/wiring/_diff_envelope.py +0 -0
  202. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/engine/wiring/mcp_dispatch.py +0 -0
  203. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/eval/__init__.py +0 -0
  204. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/eval/composite.py +0 -0
  205. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/eval/judge.py +0 -0
  206. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/eval/relevance.py +0 -0
  207. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/eval/report.py +0 -0
  208. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/eval/weight_tuner.py +0 -0
  209. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/gitignore.py +0 -0
  210. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/graph/__init__.py +0 -0
  211. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/http_server.py +0 -0
  212. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ingest/__init__.py +0 -0
  213. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ingest/claude_code.py +0 -0
  214. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ingest/codex.py +0 -0
  215. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ingest/gemini.py +0 -0
  216. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ingest/heuristics.py +0 -0
  217. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ingest/models.py +0 -0
  218. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/ingest/scan.py +0 -0
  219. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/launchd.py +0 -0
  220. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/log_retention.py +0 -0
  221. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/prompts.py +0 -0
  222. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/roadmap_drift.py +0 -0
  223. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/setup_wizard.py +0 -0
  224. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/__init__.py +0 -0
  225. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/activity_store.py +0 -0
  226. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/atomic.py +0 -0
  227. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/config.py +0 -0
  228. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/consensus_store.py +0 -0
  229. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/digest.py +0 -0
  230. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/fts5_index.py +0 -0
  231. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/learned_weights.py +0 -0
  232. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/manifest.py +0 -0
  233. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/origin.py +0 -0
  234. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/outcomes_writer.py +0 -0
  235. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/paths.py +0 -0
  236. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/reflections_store.py +0 -0
  237. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/sanitize.py +0 -0
  238. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/sessions_store.py +0 -0
  239. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/skills_store.py +0 -0
  240. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/synonyms.py +0 -0
  241. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/token_estimator.py +0 -0
  242. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/storage/working_store.py +0 -0
  243. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/__init__.py +0 -0
  244. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/changesets.py +0 -0
  245. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/code_reader.py +0 -0
  246. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/consensus.py +0 -0
  247. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/playbook.py +0 -0
  248. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/preferences.py +0 -0
  249. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/reflections.py +0 -0
  250. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/skills.py +0 -0
  251. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/spatial.py +0 -0
  252. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/tools/working.py +0 -0
  253. {codevira-3.5.0 → codevira-3.7.0}/mcp_server/update_check.py +0 -0
  254. {codevira-3.5.0 → codevira-3.7.0}/rules/coding-standards.md +0 -0
  255. {codevira-3.5.0 → codevira-3.7.0}/rules/engineering-excellence.md +0 -0
  256. {codevira-3.5.0 → codevira-3.7.0}/rules/git-cicd-governance.md +0 -0
  257. {codevira-3.5.0 → codevira-3.7.0}/rules/git_commits.md +0 -0
  258. {codevira-3.5.0 → codevira-3.7.0}/rules/incremental-updates.md +0 -0
  259. {codevira-3.5.0 → codevira-3.7.0}/rules/master_rule.md +0 -0
  260. {codevira-3.5.0 → codevira-3.7.0}/rules/persistence.md +0 -0
  261. {codevira-3.5.0 → codevira-3.7.0}/rules/resilience-observability.md +0 -0
  262. {codevira-3.5.0 → codevira-3.7.0}/rules/smoke-testing.md +0 -0
  263. {codevira-3.5.0 → codevira-3.7.0}/rules/testing-standards.md +0 -0
  264. {codevira-3.5.0 → codevira-3.7.0}/setup.cfg +0 -0
  265. {codevira-3.5.0 → codevira-3.7.0}/tests/test__prompts.py +0 -0
  266. {codevira-3.5.0 → codevira-3.7.0}/tests/test_call_edge_fk_safety.py +0 -0
  267. {codevira-3.5.0 → codevira-3.7.0}/tests/test_check_conflict.py +0 -0
  268. {codevira-3.5.0 → codevira-3.7.0}/tests/test_chunker.py +0 -0
  269. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_consensus.py +0 -0
  270. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_export.py +0 -0
  271. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_induce.py +0 -0
  272. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_replay.py +0 -0
  273. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_uninstall.py +0 -0
  274. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_version.py +0 -0
  275. {codevira-3.5.0 → codevira-3.7.0}/tests/test_cli_working.py +0 -0
  276. {codevira-3.5.0 → codevira-3.7.0}/tests/test_consensus_handshake.py +0 -0
  277. {codevira-3.5.0 → codevira-3.7.0}/tests/test_crash_logger.py +0 -0
  278. {codevira-3.5.0 → codevira-3.7.0}/tests/test_dedupe_migration.py +0 -0
  279. {codevira-3.5.0 → codevira-3.7.0}/tests/test_detect.py +0 -0
  280. {codevira-3.5.0 → codevira-3.7.0}/tests/test_e1_summary_first.py +0 -0
  281. {codevira-3.5.0 → codevira-3.7.0}/tests/test_eval_e3.py +0 -0
  282. {codevira-3.5.0 → codevira-3.7.0}/tests/test_fk_safety_extended.py +0 -0
  283. {codevira-3.5.0 → codevira-3.7.0}/tests/test_fork_safety.py +0 -0
  284. {codevira-3.5.0 → codevira-3.7.0}/tests/test_ghost_check.py +0 -0
  285. {codevira-3.5.0 → codevira-3.7.0}/tests/test_gitignore.py +0 -0
  286. {codevira-3.5.0 → codevira-3.7.0}/tests/test_global_db.py +0 -0
  287. {codevira-3.5.0 → codevira-3.7.0}/tests/test_hook_resilience.py +0 -0
  288. {codevira-3.5.0 → codevira-3.7.0}/tests/test_ingest_e2.py +0 -0
  289. {codevira-3.5.0 → codevira-3.7.0}/tests/test_launchd.py +0 -0
  290. {codevira-3.5.0 → codevira-3.7.0}/tests/test_log_retention.py +0 -0
  291. {codevira-3.5.0 → codevira-3.7.0}/tests/test_managed_files_e4.py +0 -0
  292. {codevira-3.5.0 → codevira-3.7.0}/tests/test_migrate.py +0 -0
  293. {codevira-3.5.0 → codevira-3.7.0}/tests/test_outcome_reconcile_p17.py +0 -0
  294. {codevira-3.5.0 → codevira-3.7.0}/tests/test_outcome_tracker.py +0 -0
  295. {codevira-3.5.0 → codevira-3.7.0}/tests/test_preferences_tools.py +0 -0
  296. {codevira-3.5.0 → codevira-3.7.0}/tests/test_prompts.py +0 -0
  297. {codevira-3.5.0 → codevira-3.7.0}/tests/test_record_decision.py +0 -0
  298. {codevira-3.5.0 → codevira-3.7.0}/tests/test_reflections.py +0 -0
  299. {codevira-3.5.0 → codevira-3.7.0}/tests/test_roadmap_drift.py +0 -0
  300. {codevira-3.5.0 → codevira-3.7.0}/tests/test_setup_wizard.py +0 -0
  301. {codevira-3.5.0 → codevira-3.7.0}/tests/test_sqlite_util.py +0 -0
  302. {codevira-3.5.0 → codevira-3.7.0}/tests/test_synonym_widening_e5.py +0 -0
  303. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_code_reader.py +0 -0
  304. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_playbook.py +0 -0
  305. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_roadmap.py +0 -0
  306. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_skills.py +0 -0
  307. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_spatial.py +0 -0
  308. {codevira-3.5.0 → codevira-3.7.0}/tests/test_tools_working.py +0 -0
  309. {codevira-3.5.0 → codevira-3.7.0}/tests/test_treesitter_parser.py +0 -0
  310. {codevira-3.5.0 → codevira-3.7.0}/tests/test_update_check.py +0 -0
  311. {codevira-3.5.0 → codevira-3.7.0}/tests/test_watcher_circuit.py +0 -0
  312. {codevira-3.5.0 → codevira-3.7.0}/tests/test_weight_tuning_p13.py +0 -0
@@ -7,7 +7,182 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
- ## [Unreleased]
10
+ ## [3.7.0] — 2026-07-16
11
+
12
+ ### Changed — opt-in project tracking (no more silent auto-adopt)
13
+
14
+ Codevira now tracks **only projects you explicitly `codevira init`**. With a
15
+ single global MCP registration its tools are available in every IDE window — but
16
+ previously *any* project you merely opened got a data dir and started being
17
+ tracked (the graph-read path alone — e.g. `get_impact` before an edit — adopted
18
+ it, which is how `~/.codevira/projects/` filled with dirs you never chose).
19
+
20
+ - **Un-init'd projects are inert.** Read tools return an empty payload + a
21
+ "run `codevira init`" hint; write tools refuse with the same hint; the engine
22
+ hooks (blast-radius, prompt-capture, memory fan-out) don't fire; nothing is
23
+ written — no `~/.codevira/projects/<key>/` dir, no `global.db` row, no
24
+ `.codevira-cache/`.
25
+ - **Existing tracked projects keep working, zero migration.** A committed
26
+ in-repo `.codevira/config.yaml` (or its centralized equivalent) grandfathers
27
+ a project in. The marker travels via git, so teammates and other IDEs inherit
28
+ the opt-in.
29
+ - **`codevira init`** is the one-time, per-project opt-in.
30
+ - **Escape hatch:** `CODEVIRA_AUTO_ADOPT=1` restores the pre-3.7 behavior (track
31
+ every project you open); `=0` is strict (refuse without hints). Default is
32
+ `hint`.
33
+
34
+ ### Fixed
35
+ - **Decision-id drift within a process (D000118).** `get_project_root()`
36
+ re-resolved from `cwd` on every call, so a `cwd` change between `record()`
37
+ and `search()` in one process bound them to two different `.codevira` stores —
38
+ each minting ids independently (non-monotonic / duplicate ids, and a
39
+ just-recorded decision missing from search). The resolved root is now pinned
40
+ for the request; a later drift logs a WARN but the pin wins.
41
+ - **Activity heatmap blind to some edits.** `NotebookEdit` (`notebook_path`) and
42
+ camelCase MCP tools logged `<unknown>` instead of the file they touched; the
43
+ edit-path resolver now covers the full key set.
44
+ - **Anti-Regression fix-history went stale on long-lived servers.** The git
45
+ `fix:`-commit scan ran once at startup; it now self-freshens (HEAD-gated) on
46
+ read, so `fix:` commits made after boot are seen without a restart.
47
+
48
+ ### Added — memory freshness (stale decisions no longer block you)
49
+ - **`mark_decision_outdated(id, reason)`** — tombstone a decision that's simply
50
+ no longer true so it stops surfacing in `get_session_context` /
51
+ `search_decisions` / `list_decisions`, without deleting it (reversible via
52
+ `set_decision_flag(is_outdated=false)`).
53
+ - **Freshness ranking on read.** `get_session_context` now hides superseded,
54
+ outdated, and `outcome=reverted` decisions from `recent_decisions`.
55
+ - **Supersede-on-write.** `record_decision` now *supersedes* a strong,
56
+ unprotected near-duplicate instead of appending a parallel twin (the way
57
+ stale twins used to accumulate). Protected (`do_not_revert`) near-duplicates
58
+ are never auto-superseded — the conflict is surfaced for you to act on.
59
+ Opt out with `force=True` or `CODEVIRA_SUPERSEDE_ON_RECORD=0`.
60
+
61
+ ### Added — cross-engineer, one repo
62
+ - **Deterministic decision-id collision repair.** When two engineers on two
63
+ branches both mint the same id, `git merge` combines the appended lines
64
+ cleanly and one decision used to be silently shadowed on read. New:
65
+ - `read_merged` now WARNS on a base-id collision instead of hiding it.
66
+ - **`codevira repair-ids [--apply] [--semantic]`** — deterministic repair:
67
+ the earliest writer keeps the id; the loser gets a content-derived id;
68
+ byte-identical duplicates are dropped. `--semantic` also *reports*
69
+ near-duplicate decisions (different ids, similar text) for review — never
70
+ auto-merged. Idempotent; converges (a fixed point, so it can't oscillate).
71
+ - **git merge driver** (`codevira merge-driver`) registered by `codevira init`
72
+ via `.gitattributes` + git config, so collisions resolve automatically on
73
+ `git merge` / rebase — both engineers converge to byte-identical output.
74
+
75
+ ### Added — one MCP registration for all your projects
76
+ - **Single user-scope registration by default.** `codevira init` now registers
77
+ ONE user-scope MCP server instead of a per-project entry, so N projects no
78
+ longer create N codevira servers in your IDE. The single server resolves the
79
+ active project from the MCP client's workspace roots at runtime. IDEs that
80
+ can't do project-agnostic config (Claude Desktop, Antigravity) still get a
81
+ per-project entry. Opt back with `codevira init --per-project` or
82
+ `CODEVIRA_INIT_PER_PROJECT=1`.
83
+ - **Per-request project-root pin.** The project-root pin is now a `ContextVar`
84
+ — scoped per request instead of process-global, so it can't leak across
85
+ requests. (Each IDE window already runs its own codevira process bound to its
86
+ workspace; one process serving many projects *concurrently* also needs the
87
+ explicit override to be per-request, which is a follow-on.)
88
+
89
+ ### Added — automatic, non-breaking upgrade (self-heal, zero manual steps)
90
+ - **Startup self-heal.** `migrate.run_startup_migrations()` runs at server
91
+ startup: version/ledger-gated (each step runs at most once), lock-protected
92
+ (concurrent IDE processes can't race), backup-first, and failure-isolated (it
93
+ can never block startup). Users never run a manual command after upgrading.
94
+ - **Pre-3.7 id collisions are repaired automatically** — backup to
95
+ `decisions.jsonl.bak-pre-v370`, then the deterministic repair, through the
96
+ same exclusive lock + atomic replace a normal append uses (safe during
97
+ active use — a concurrent `record_decision` is serialized, not lost).
98
+ - **The decision-log merge driver self-installs.**
99
+ - **A stale per-project MCP entry is removed** — but only when a global entry
100
+ already exists, so a per-project-only user is never orphaned
101
+ (`heal_stale_registration`, surgical + atomic; other `mcpServers` preserved).
102
+ `codevira init` global-mode also removes it right after writing the global
103
+ entry, so re-init never leaves a duplicate.
104
+ - **`doctor` gains a `decision_collisions` check** that surfaces any collision
105
+ the one-time startup heal wouldn't re-catch (18 checks total).
106
+ - **AGENTS.md carries a branded, token-guard usage line** — steers the agent to
107
+ the codevira MCP tools and away from reading `.codevira/*.jsonl` directly
108
+ (which would cost tens of thousands of tokens). The 5 KB block cap is now a
109
+ hard cap.
110
+ - Fixed a `clean`-path bug: per-project Claude cleanup targeted
111
+ `.claude/settings.json`, but the MCP entry lives in `.mcp.json`.
112
+
113
+ ### Internal
114
+ - Extracted the shared decision-similarity core (`storage/reconcile.py`) used by
115
+ `check_conflict`, `consensus`, supersede-on-write, and the cross-engineer
116
+ reconcile — single source of truth for the Jaccard/overlap classification.
117
+
118
+ ---
119
+
120
+ ## [3.6.0] — 2026-06-27
121
+
122
+ ### Added
123
+ - **Symbol / region-level decision locking.** A `do_not_revert` decision can now
124
+ be scoped to a single function or class via a new optional `symbol` argument
125
+ on `record_decision` (e.g. `record_decision(decision=…, file_path="auth.py",
126
+ symbol="login")`). The content-aware lock then blocks only edits that land
127
+ *inside* that symbol; an edit elsewhere in the same file downgrades to a warn
128
+ (it can't revert the protected region). At PRE_TOOL_USE the file still holds
129
+ the edit's `before` text, so the enclosing symbol is resolved by AST
130
+ (Python) / tree-sitter (TS/JS/Go/Rust) without needing the graph indexed.
131
+ Decisions with no `symbol` stay file-scoped — existing behavior is unchanged,
132
+ and the file is only parsed when a locked decision is actually symbol-scoped
133
+ (zero added cost for the common case). Restore strict file-level blocking
134
+ with `CODEVIRA_DECISION_LOCK_CONTENT_AWARE=0`.
135
+ - **`codevira search` CLI.** Decision search is no longer MCP-only — search
136
+ from the terminal: `codevira search "retry policy"` (rich table),
137
+ `--all-projects` to search every registered repo, `--json` for a
138
+ machine-readable payload, plus `--limit` / `--full`.
139
+ - **Cross-project decision search.** `search_decisions(query, all_projects=true)`
140
+ now searches *every* registered project's decision store — not just the
141
+ current one — each result tagged with the `project` + `project_path` it came
142
+ from. Recall how you solved something in another repo without leaving this
143
+ one. Reuses the same per-project FTS5 search (identical per-project ranking +
144
+ superseded filtering); the union is **interleaved by per-project rank** (raw
145
+ BM25 scores aren't comparable across repos, so each project's best gets fair
146
+ representation). Skips moved/ghost projects and invalid roots, dedups by
147
+ resolved path, caps the fan-out, and one project erroring never sinks the
148
+ search. Default `all_projects=false` keeps the current-project behavior
149
+ byte-for-byte unchanged.
150
+ - **`codevira status` shows activity counts.** Beyond Graph Nodes (a flat file
151
+ count), the panel now reports Symbols, Edges, and Decisions — counts that
152
+ move as you edit code and record decisions, so status reflects progress
153
+ instead of a number that barely changes.
154
+
155
+ ### Fixed
156
+ - **Anti-Regression fix-history is now populated.** `scan_git_log()` is wired
157
+ into the startup daemon thread, so the fix-history DB the hero reads is
158
+ actually built (it previously had no production caller). Gated by
159
+ `CODEVIRA_NO_GIT_SCAN`; runs only at startup.
160
+ - **Native edits reach working memory.** `memory_fanout` now also fires from the
161
+ Claude Code hook path, so native `Edit`/`Write`/`Bash` populate working
162
+ memory — not just codevira's own MCP tool calls.
163
+ - **Decision-ID minting is collision-safe.** Next-ID generation now scans the
164
+ full store for `max(id) + 1` instead of trusting the last/tail record, so a
165
+ rewrite that leaves a lower id at the tail (junk cleanup, compact,
166
+ cross-project repair) can no longer re-issue an existing id and clobber a
167
+ record (including `do_not_revert` decisions).
168
+ - **`codevira index --full` now truly rebuilds the graph.** The graph-only
169
+ index path (the only path since v2.2.0) called the incremental
170
+ `generate_graph_sqlite`, whose file-node loop is add-if-absent — so a
171
+ re-index of an already-built project added 0 new nodes and printed a
172
+ confusing `Graph built: 0 nodes, N edges`. `--full` now clears the graph
173
+ first (new FK-cascading `SQLiteGraph.clear()`) and the result reports the
174
+ real `nodes_total`, so the count is honest and node metadata is refreshed.
175
+ - **Dropped the misleading "Semantic search unavailable — reinstall codevira"
176
+ notice.** Semantic code search (chromadb / torch) was removed in v2.2.0 and
177
+ is on hold (D0000PV / D0000XY); `_check_search_deps()` is hardcoded `False`,
178
+ so that notice printed on *every* index and pointed users at an upgrade that
179
+ could never restore it. Graph-only is the normal, complete result.
180
+ - **Graph node count now tracks the filesystem.** Indexing was add-if-absent
181
+ and never pruned nodes for deleted files, so the graph — and `codevira
182
+ status`'s node count — only ever grew; it never shrank when you removed a
183
+ file. A new FK-cascading `SQLiteGraph.remove_node` plus a prune pass in
184
+ `generate_graph_sqlite` now drop nodes whose source file is gone, so the
185
+ count reflects reality on every index.
11
186
 
12
187
  ## [3.5.0] — 2026-06-19
13
188
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: codevira
3
- Version: 3.5.0
3
+ Version: 3.7.0
4
4
  Summary: Cross-IDE decision enforcement for AI coding agents. 1 MB per project, in your repo, no cloud, no vectors. Claude Code, Cursor, Windsurf, Antigravity, Codex all share the same in-repo memory; hooks block AI tool calls that violate prior decisions. MIT, local-first.
5
5
  Author-email: Sachin Shelke <sachin.worldnet@gmail.com>
6
6
  License: MIT
@@ -47,7 +47,11 @@ Requires-Dist: mypy>=1.10; extra == "dev"
47
47
  Requires-Dist: types-PyYAML; extra == "dev"
48
48
  Requires-Dist: pre-commit>=3.5; extra == "dev"
49
49
 
50
- # Codevira
50
+ <p align="center">
51
+ <img src="https://raw.githubusercontent.com/sachinshelke/codevira/main/website/assets/logo.png" alt="Codevira" width="140" height="140">
52
+ </p>
53
+
54
+ <h1 align="center">Codevira</h1>
51
55
 
52
56
  > **Cross-IDE decision memory for AI coding agents.** One in-repo memory
53
57
  > layer that every AI tool you use can read — plus PreToolUse hooks that
@@ -160,11 +164,18 @@ Then commit `.codevira/` + `AGENTS.md` + `.gitignore` to git so your
160
164
  teammates inherit the project memory. Open any IDE; codevira's MCP
161
165
  server is ready.
162
166
 
167
+ > **Opt-in tracking (v3.7.0).** `codevira init` is the explicit opt-in:
168
+ > codevira tracks **only** projects you've `init`-ed. A project you merely
169
+ > open — but never `init` — stays inert (its tools return a "run `codevira
170
+ > init`" hint and nothing is written), so `~/.codevira/projects/` never fills
171
+ > with projects you didn't choose. Set `CODEVIRA_AUTO_ADOPT=1` to track every
172
+ > project you open instead.
173
+
163
174
  **Verify:**
164
175
 
165
176
  ```bash
166
- codevira doctor # 11-ish health checks, ✓/⚠/✗
167
- codevira list-decisions # any decisions recorded yet?
177
+ codevira doctor # 18 health checks, ✓/⚠/✗
178
+ codevira replay # browse the decisions timeline (any recorded yet?)
168
179
  codevira sync # regen AGENTS.md from current decisions.jsonl
169
180
  ```
170
181
 
@@ -205,7 +216,7 @@ Flags:
205
216
 
206
217
  ### What `codevira doctor` reports
207
218
 
208
- 11 health checks in one run, each with a concrete `fix_command` for
219
+ 18 health checks in one run, each with a concrete `fix_command` for
209
220
  any WARN or FAIL. Read-only — never modifies anything.
210
221
 
211
222
  ```text
@@ -215,6 +226,7 @@ Codevira health check
215
226
  ✓ python_version Python 3.13 (≥ 3.10 required)
216
227
  ✓ codevira_data_dir /Users/you/.codevira exists and is writable
217
228
  ✓ project_root /Users/you/Projects/my-project is a valid project root
229
+ ✓ project_binding resolved from workspace → /Users/you/Projects/my-project
218
230
  ✓ codevira_dir .codevira/ present (4 decision(s))
219
231
  ✓ agents_md_size AGENTS.md is 1,234 bytes (≤10 KB safety threshold)
220
232
  ✓ graph_db graph.db has all 4 expected tables
@@ -224,14 +236,17 @@ Codevira health check
224
236
  ✓ watcher_circuit watcher circuit clean (no recent failures)
225
237
  ✓ engine_kill_switch engine ON (default; CODEVIRA_ENGINE not set)
226
238
  ✓ claude_mcp_visibility codevira visible to Claude Code
239
+ ✓ mcp_running_versions in-memory server matches installed wheel
240
+ ✓ ghost_projects no stale project registrations
227
241
  ✓ crash_log_size no crash log (clean state)
242
+ ✓ merge_driver decision-log merge driver configured
228
243
  ────────────────────────────────────────────────────────────
229
- summary: 13 pass · 0 warn · 0 fail
244
+ summary: 17 pass · 0 warn · 0 fail
230
245
  ```
231
246
 
232
247
  ### Daily-use commands
233
248
 
234
- The CLI surface is 23 commands (the daily-use ones below):
249
+ The CLI surface is 26 commands (the daily-use ones below):
235
250
 
236
251
  | Command | What it does |
237
252
  |---|---|
@@ -242,8 +257,10 @@ The CLI surface is 23 commands (the daily-use ones below):
242
257
  | `codevira projects` | List tracked projects with staleness (`today` / `5d ago` / `stale 45d`); `projects archive <name>` drops one from the registry |
243
258
  | `codevira index` | Build / refresh the code graph cache |
244
259
  | `codevira sync` | Regenerate AGENTS.md + manifest + digest from `decisions.jsonl` |
260
+ | `codevira repair-ids` | **v3.7** — detect/repair cross-engineer decision-id collisions (`--apply` to rewrite; `--semantic` also reports near-duplicate decisions for review) |
245
261
  | `codevira observe-git` | Classify past decisions as kept/modified/reverted from git history |
246
262
  | `codevira replay` | Browse the decisions timeline (terminal / markdown / HTML) |
263
+ | `codevira search <query>` | Search decisions from the terminal (FTS5/BM25); `--all-projects` searches every registered repo, `--json` for scripts |
247
264
  | `codevira clean` | Remove orphaned project data |
248
265
  | `codevira reset` | Destructive cleanup (auto-exports decisions first) |
249
266
  | `codevira export` | Standalone decision backup (JSON / SQL); `export setup` bundles project memory + global learning for machine transfer |
@@ -279,6 +296,23 @@ versions. User content outside the codevira markers stays.
279
296
 
280
297
  ---
281
298
 
299
+ ## What's new in v3.7.0 — fresh memory, shared repos, one registration
300
+
301
+ > Three things users asked for: memory that *updates* instead of piling up
302
+ > stale decisions, memory that survives *two engineers on one repo*, and *one*
303
+ > MCP entry instead of one-per-project. All model-free, all local.
304
+
305
+ | Area | What you get |
306
+ |---|---|
307
+ | **Memory stays fresh** | `record_decision` now **supersedes** a strong, unprotected near-duplicate instead of appending a parallel twin, so stale copies stop accumulating. `get_session_context` hides superseded / outdated / reverted decisions. New `mark_decision_outdated(id)` retires a decision that's simply no longer true (reversible). Protected `do_not_revert` decisions are never auto-retired — the conflict is surfaced. |
308
+ | **Two engineers, one repo** | Decision ids used to collide silently when two branches merged (one decision shadowed on read). Now `read_merged` warns, `codevira repair-ids [--apply]` deterministically repairs (earliest writer keeps the id; losers get content-derived ids; a *fixed point*, so it can't oscillate), and a git **merge driver** — installed by `codevira init` — resolves collisions automatically on `git merge`. `--semantic` also reports near-duplicate decisions for review (never auto-merged). |
309
+ | **One MCP for all projects** | `codevira init` registers **one** user-scope server by default instead of one-per-project; it resolves the active project from the MCP client's workspace roots at runtime, so N projects no longer mean N entries in your IDE. Opt back with `--per-project`. The project-root pin is now per-request (`ContextVar`) so it can't leak across requests. |
310
+ | **Fixes** | Decision-id drift within a process (D000118) — record/search no longer split across two stores. `NotebookEdit` / camelCase edits no longer log `<unknown>` to the activity heatmap. Anti-Regression fix-history self-freshens on read instead of going stale until restart. |
311
+
312
+ Full v3.7.0 release notes: [CHANGELOG.md](CHANGELOG.md#370--2026-07-10).
313
+
314
+ ---
315
+
282
316
  ## What's new in v3.5.0 — the read side gets intelligent
283
317
 
284
318
  > Codevira's leverage is the **read** side: does it surface the *right*
@@ -372,7 +406,7 @@ data:
372
406
  The agent always asks for what it needs, in the size it needs.
373
407
 
374
408
  **Shrink the tool surface itself.** The advertised MCP `tools/list` is a
375
- fixed per-session cost (~8K tokens for the full 50-tool surface). Set
409
+ fixed per-session cost (~8K tokens for the full 51-tool surface). Set
376
410
  `CODEVIRA_TOOL_PROFILE=lean` in the MCP server's `env` block to advertise
377
411
  only the 12 daily-driver tools (~71% smaller); hidden tools still work
378
412
  when called explicitly. Bigger wins usually come from disabling MCP
@@ -382,10 +416,11 @@ servers you aren't actively using.
382
416
 
383
417
  ## MCP Tools
384
418
 
385
- **50 tools** surfaced to AI clients via `tools/list` (token-optimized,
419
+ **51 tools** surfaced to AI clients via `tools/list` (token-optimized,
386
420
  summary-first): the core decision/roadmap/graph surface plus the
387
421
  v3.1.0 memory subsystems (working memory, skills, spatial, consensus,
388
- reflections), the v3.3.0 preference tools, and v3.5.0's `expand`. One additional admin
422
+ reflections), the v3.3.0 preference tools, v3.5.0's `expand`, and v3.7.0's
423
+ `mark_decision_outdated`. One additional admin
389
424
  tool (`refresh_graph`) is registered but hidden from `tools/list`
390
425
  because it runs automatically in the background — humans invoke it via
391
426
  `codevira sync`. Set `CODEVIRA_TOOL_PROFILE=lean` to advertise only
@@ -398,7 +433,8 @@ kill list.
398
433
  | Tool | Description |
399
434
  |---|---|
400
435
  | `get_session_context` | **THE main "catch me up" call.** Returns ~500 tokens: current phase, next action, recent decisions, top tags, last session brief. |
401
- | `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. |
436
+ | `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. **`all_projects=true`** (v3.6) searches every registered repo, tagging each result with its project. |
437
+ | `record_decision(decision, …)` | Record a decision; `do_not_revert=true` locks it. **`symbol="login"`** (v3.6) scopes the lock to one function/class — edits elsewhere in the file warn instead of block. |
402
438
  | `list_decisions` | Paginate / filter: `since_date`, `file_pattern`, `protected_only`, `tags`, `include_superseded`. |
403
439
  | `list_tags` | Enumerate all tags with decision counts. |
404
440
  | `get_history(file_path)` | Recent decisions touching a file. |
@@ -410,8 +446,9 @@ kill list.
410
446
  |---|---|
411
447
  | `record_decision` | Capture an architectural decision. Optional `do_not_revert=true` triggers hard enforcement at the Claude Code PreToolUse hook. Supports `tags`, `force`, `session_id`. |
412
448
  | `supersede_decision(old_id, new_decision, reason)` | Retire an old decision and link to its replacement. Audit trail preserved. |
449
+ | `mark_decision_outdated(decision_id, reason)` | **v3.7** — tombstone a decision that's no longer true (with no successor) so it stops surfacing. Reversible via `set_decision_flag(is_outdated=false)`. |
413
450
  | `reaffirm_decision(decision_id)` | Re-confirm a soft-expired `do_not_revert` lock is still wanted. |
414
- | `set_decision_flag(decision_id, ...)` | Toggle `do_not_revert` / tags on an existing decision. |
451
+ | `set_decision_flag(decision_id, ...)` | Toggle `do_not_revert` / tags / `is_outdated` on an existing decision. |
415
452
  | `write_session_log` | Structured session record. |
416
453
 
417
454
  ### Roadmap
@@ -495,7 +532,7 @@ the install lean (v2.3.0 may re-add specific grammars on demand).
495
532
  | `do_not_revert` enforcement at Claude Code PreToolUse | Symbol tools (`get_signature` / `get_code`) cover Python / TS / JS / Go / Rust; for other languages the AI `Read`s the file directly (the legacy `[all-languages]` grammar pack was removed in v2.2.0) |
496
533
  | FTS5 decision search with BM25 ranking | Real-time multi-machine sync — by design, codevira is local-first; for team sharing, commit `.codevira/` to git |
497
534
  | Per-project + cross-machine project inventory (`global.db`) | Web UI for browsing decisions — use the `codevira://decisions` MCP resource in Claude Desktop, or `codevira replay --format html` for a static file |
498
- | All 50 surfaced MCP tools + 23 CLI commands + 8 engine policies | The HTTP server (`codevira serve`) is single-project per launch — for daily use, stick with stdio via `codevira setup` |
535
+ | All 51 surfaced MCP tools + 26 CLI commands + 8 engine policies | The HTTP server (`codevira serve`) is single-project per launch — for daily use, stick with stdio via `codevira setup` |
499
536
  | Concurrent-safe storage layer (Posix `fcntl.flock` + Windows sentinel fallback). Proven against 50-thread + 20-subprocess stress + 29-attack chaos harness | The cross-process file-lock contract has been exercised on macOS + Linux CI; the Windows sentinel-file fallback is verified via unit-test simulation but hasn't been load-tested on real Windows yet |
500
537
  | Code graph data store is functional but the v3.0.0 spec target (`<project>/.codevira-cache/graph.sqlite`) and the actual location (`<data_dir>/graph/graph.db`) drifted during the surface-cut audit. Tracked for v3.1 reconciliation | n/a (functional today; spec-truthfulness gap only) |
501
538
 
@@ -531,11 +568,12 @@ Common questions about setup, usage, architecture, and troubleshooting
531
568
 
532
569
  ## Roadmap
533
570
 
534
- **Current release:** **v3.5.0** — the read side gets intelligent:
535
- summary-first decisions + `expand`, a content-aware decision lock,
536
- read-only session-transcript ingest, a self-derived relevance eval +
537
- learned weight tuning, multi-file managed memory, and opt-in synonym
538
- recall — all with no new runtime dependencies.
571
+ **Current release:** **v3.7.0** — fresh memory, shared repos, one
572
+ registration: supersede-on-write + freshness-ranked reads +
573
+ `mark_decision_outdated` (stale decisions stop piling up), deterministic
574
+ cross-engineer decision-id collision repair (`repair-ids` + a git merge
575
+ driver), and one user-scope MCP registration for all your projects — all
576
+ model-free, all local.
539
577
 
540
578
  **Next up** (directional, not dated):
541
579
 
@@ -1,4 +1,8 @@
1
- # Codevira
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/sachinshelke/codevira/main/website/assets/logo.png" alt="Codevira" width="140" height="140">
3
+ </p>
4
+
5
+ <h1 align="center">Codevira</h1>
2
6
 
3
7
  > **Cross-IDE decision memory for AI coding agents.** One in-repo memory
4
8
  > layer that every AI tool you use can read — plus PreToolUse hooks that
@@ -111,11 +115,18 @@ Then commit `.codevira/` + `AGENTS.md` + `.gitignore` to git so your
111
115
  teammates inherit the project memory. Open any IDE; codevira's MCP
112
116
  server is ready.
113
117
 
118
+ > **Opt-in tracking (v3.7.0).** `codevira init` is the explicit opt-in:
119
+ > codevira tracks **only** projects you've `init`-ed. A project you merely
120
+ > open — but never `init` — stays inert (its tools return a "run `codevira
121
+ > init`" hint and nothing is written), so `~/.codevira/projects/` never fills
122
+ > with projects you didn't choose. Set `CODEVIRA_AUTO_ADOPT=1` to track every
123
+ > project you open instead.
124
+
114
125
  **Verify:**
115
126
 
116
127
  ```bash
117
- codevira doctor # 11-ish health checks, ✓/⚠/✗
118
- codevira list-decisions # any decisions recorded yet?
128
+ codevira doctor # 18 health checks, ✓/⚠/✗
129
+ codevira replay # browse the decisions timeline (any recorded yet?)
119
130
  codevira sync # regen AGENTS.md from current decisions.jsonl
120
131
  ```
121
132
 
@@ -156,7 +167,7 @@ Flags:
156
167
 
157
168
  ### What `codevira doctor` reports
158
169
 
159
- 11 health checks in one run, each with a concrete `fix_command` for
170
+ 18 health checks in one run, each with a concrete `fix_command` for
160
171
  any WARN or FAIL. Read-only — never modifies anything.
161
172
 
162
173
  ```text
@@ -166,6 +177,7 @@ Codevira health check
166
177
  ✓ python_version Python 3.13 (≥ 3.10 required)
167
178
  ✓ codevira_data_dir /Users/you/.codevira exists and is writable
168
179
  ✓ project_root /Users/you/Projects/my-project is a valid project root
180
+ ✓ project_binding resolved from workspace → /Users/you/Projects/my-project
169
181
  ✓ codevira_dir .codevira/ present (4 decision(s))
170
182
  ✓ agents_md_size AGENTS.md is 1,234 bytes (≤10 KB safety threshold)
171
183
  ✓ graph_db graph.db has all 4 expected tables
@@ -175,14 +187,17 @@ Codevira health check
175
187
  ✓ watcher_circuit watcher circuit clean (no recent failures)
176
188
  ✓ engine_kill_switch engine ON (default; CODEVIRA_ENGINE not set)
177
189
  ✓ claude_mcp_visibility codevira visible to Claude Code
190
+ ✓ mcp_running_versions in-memory server matches installed wheel
191
+ ✓ ghost_projects no stale project registrations
178
192
  ✓ crash_log_size no crash log (clean state)
193
+ ✓ merge_driver decision-log merge driver configured
179
194
  ────────────────────────────────────────────────────────────
180
- summary: 13 pass · 0 warn · 0 fail
195
+ summary: 17 pass · 0 warn · 0 fail
181
196
  ```
182
197
 
183
198
  ### Daily-use commands
184
199
 
185
- The CLI surface is 23 commands (the daily-use ones below):
200
+ The CLI surface is 26 commands (the daily-use ones below):
186
201
 
187
202
  | Command | What it does |
188
203
  |---|---|
@@ -193,8 +208,10 @@ The CLI surface is 23 commands (the daily-use ones below):
193
208
  | `codevira projects` | List tracked projects with staleness (`today` / `5d ago` / `stale 45d`); `projects archive <name>` drops one from the registry |
194
209
  | `codevira index` | Build / refresh the code graph cache |
195
210
  | `codevira sync` | Regenerate AGENTS.md + manifest + digest from `decisions.jsonl` |
211
+ | `codevira repair-ids` | **v3.7** — detect/repair cross-engineer decision-id collisions (`--apply` to rewrite; `--semantic` also reports near-duplicate decisions for review) |
196
212
  | `codevira observe-git` | Classify past decisions as kept/modified/reverted from git history |
197
213
  | `codevira replay` | Browse the decisions timeline (terminal / markdown / HTML) |
214
+ | `codevira search <query>` | Search decisions from the terminal (FTS5/BM25); `--all-projects` searches every registered repo, `--json` for scripts |
198
215
  | `codevira clean` | Remove orphaned project data |
199
216
  | `codevira reset` | Destructive cleanup (auto-exports decisions first) |
200
217
  | `codevira export` | Standalone decision backup (JSON / SQL); `export setup` bundles project memory + global learning for machine transfer |
@@ -230,6 +247,23 @@ versions. User content outside the codevira markers stays.
230
247
 
231
248
  ---
232
249
 
250
+ ## What's new in v3.7.0 — fresh memory, shared repos, one registration
251
+
252
+ > Three things users asked for: memory that *updates* instead of piling up
253
+ > stale decisions, memory that survives *two engineers on one repo*, and *one*
254
+ > MCP entry instead of one-per-project. All model-free, all local.
255
+
256
+ | Area | What you get |
257
+ |---|---|
258
+ | **Memory stays fresh** | `record_decision` now **supersedes** a strong, unprotected near-duplicate instead of appending a parallel twin, so stale copies stop accumulating. `get_session_context` hides superseded / outdated / reverted decisions. New `mark_decision_outdated(id)` retires a decision that's simply no longer true (reversible). Protected `do_not_revert` decisions are never auto-retired — the conflict is surfaced. |
259
+ | **Two engineers, one repo** | Decision ids used to collide silently when two branches merged (one decision shadowed on read). Now `read_merged` warns, `codevira repair-ids [--apply]` deterministically repairs (earliest writer keeps the id; losers get content-derived ids; a *fixed point*, so it can't oscillate), and a git **merge driver** — installed by `codevira init` — resolves collisions automatically on `git merge`. `--semantic` also reports near-duplicate decisions for review (never auto-merged). |
260
+ | **One MCP for all projects** | `codevira init` registers **one** user-scope server by default instead of one-per-project; it resolves the active project from the MCP client's workspace roots at runtime, so N projects no longer mean N entries in your IDE. Opt back with `--per-project`. The project-root pin is now per-request (`ContextVar`) so it can't leak across requests. |
261
+ | **Fixes** | Decision-id drift within a process (D000118) — record/search no longer split across two stores. `NotebookEdit` / camelCase edits no longer log `<unknown>` to the activity heatmap. Anti-Regression fix-history self-freshens on read instead of going stale until restart. |
262
+
263
+ Full v3.7.0 release notes: [CHANGELOG.md](CHANGELOG.md#370--2026-07-10).
264
+
265
+ ---
266
+
233
267
  ## What's new in v3.5.0 — the read side gets intelligent
234
268
 
235
269
  > Codevira's leverage is the **read** side: does it surface the *right*
@@ -323,7 +357,7 @@ data:
323
357
  The agent always asks for what it needs, in the size it needs.
324
358
 
325
359
  **Shrink the tool surface itself.** The advertised MCP `tools/list` is a
326
- fixed per-session cost (~8K tokens for the full 50-tool surface). Set
360
+ fixed per-session cost (~8K tokens for the full 51-tool surface). Set
327
361
  `CODEVIRA_TOOL_PROFILE=lean` in the MCP server's `env` block to advertise
328
362
  only the 12 daily-driver tools (~71% smaller); hidden tools still work
329
363
  when called explicitly. Bigger wins usually come from disabling MCP
@@ -333,10 +367,11 @@ servers you aren't actively using.
333
367
 
334
368
  ## MCP Tools
335
369
 
336
- **50 tools** surfaced to AI clients via `tools/list` (token-optimized,
370
+ **51 tools** surfaced to AI clients via `tools/list` (token-optimized,
337
371
  summary-first): the core decision/roadmap/graph surface plus the
338
372
  v3.1.0 memory subsystems (working memory, skills, spatial, consensus,
339
- reflections), the v3.3.0 preference tools, and v3.5.0's `expand`. One additional admin
373
+ reflections), the v3.3.0 preference tools, v3.5.0's `expand`, and v3.7.0's
374
+ `mark_decision_outdated`. One additional admin
340
375
  tool (`refresh_graph`) is registered but hidden from `tools/list`
341
376
  because it runs automatically in the background — humans invoke it via
342
377
  `codevira sync`. Set `CODEVIRA_TOOL_PROFILE=lean` to advertise only
@@ -349,7 +384,8 @@ kill list.
349
384
  | Tool | Description |
350
385
  |---|---|
351
386
  | `get_session_context` | **THE main "catch me up" call.** Returns ~500 tokens: current phase, next action, recent decisions, top tags, last session brief. |
352
- | `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. |
387
+ | `search_decisions(query)` | FTS5 BM25 search over `decisions.jsonl`. Default: top 5 truncated; pass `full=true` or `summary_only=true`. **`all_projects=true`** (v3.6) searches every registered repo, tagging each result with its project. |
388
+ | `record_decision(decision, …)` | Record a decision; `do_not_revert=true` locks it. **`symbol="login"`** (v3.6) scopes the lock to one function/class — edits elsewhere in the file warn instead of block. |
353
389
  | `list_decisions` | Paginate / filter: `since_date`, `file_pattern`, `protected_only`, `tags`, `include_superseded`. |
354
390
  | `list_tags` | Enumerate all tags with decision counts. |
355
391
  | `get_history(file_path)` | Recent decisions touching a file. |
@@ -361,8 +397,9 @@ kill list.
361
397
  |---|---|
362
398
  | `record_decision` | Capture an architectural decision. Optional `do_not_revert=true` triggers hard enforcement at the Claude Code PreToolUse hook. Supports `tags`, `force`, `session_id`. |
363
399
  | `supersede_decision(old_id, new_decision, reason)` | Retire an old decision and link to its replacement. Audit trail preserved. |
400
+ | `mark_decision_outdated(decision_id, reason)` | **v3.7** — tombstone a decision that's no longer true (with no successor) so it stops surfacing. Reversible via `set_decision_flag(is_outdated=false)`. |
364
401
  | `reaffirm_decision(decision_id)` | Re-confirm a soft-expired `do_not_revert` lock is still wanted. |
365
- | `set_decision_flag(decision_id, ...)` | Toggle `do_not_revert` / tags on an existing decision. |
402
+ | `set_decision_flag(decision_id, ...)` | Toggle `do_not_revert` / tags / `is_outdated` on an existing decision. |
366
403
  | `write_session_log` | Structured session record. |
367
404
 
368
405
  ### Roadmap
@@ -446,7 +483,7 @@ the install lean (v2.3.0 may re-add specific grammars on demand).
446
483
  | `do_not_revert` enforcement at Claude Code PreToolUse | Symbol tools (`get_signature` / `get_code`) cover Python / TS / JS / Go / Rust; for other languages the AI `Read`s the file directly (the legacy `[all-languages]` grammar pack was removed in v2.2.0) |
447
484
  | FTS5 decision search with BM25 ranking | Real-time multi-machine sync — by design, codevira is local-first; for team sharing, commit `.codevira/` to git |
448
485
  | Per-project + cross-machine project inventory (`global.db`) | Web UI for browsing decisions — use the `codevira://decisions` MCP resource in Claude Desktop, or `codevira replay --format html` for a static file |
449
- | All 50 surfaced MCP tools + 23 CLI commands + 8 engine policies | The HTTP server (`codevira serve`) is single-project per launch — for daily use, stick with stdio via `codevira setup` |
486
+ | All 51 surfaced MCP tools + 26 CLI commands + 8 engine policies | The HTTP server (`codevira serve`) is single-project per launch — for daily use, stick with stdio via `codevira setup` |
450
487
  | Concurrent-safe storage layer (Posix `fcntl.flock` + Windows sentinel fallback). Proven against 50-thread + 20-subprocess stress + 29-attack chaos harness | The cross-process file-lock contract has been exercised on macOS + Linux CI; the Windows sentinel-file fallback is verified via unit-test simulation but hasn't been load-tested on real Windows yet |
451
488
  | Code graph data store is functional but the v3.0.0 spec target (`<project>/.codevira-cache/graph.sqlite`) and the actual location (`<data_dir>/graph/graph.db`) drifted during the surface-cut audit. Tracked for v3.1 reconciliation | n/a (functional today; spec-truthfulness gap only) |
452
489
 
@@ -482,11 +519,12 @@ Common questions about setup, usage, architecture, and troubleshooting
482
519
 
483
520
  ## Roadmap
484
521
 
485
- **Current release:** **v3.5.0** — the read side gets intelligent:
486
- summary-first decisions + `expand`, a content-aware decision lock,
487
- read-only session-transcript ingest, a self-derived relevance eval +
488
- learned weight tuning, multi-file managed memory, and opt-in synonym
489
- recall — all with no new runtime dependencies.
522
+ **Current release:** **v3.7.0** — fresh memory, shared repos, one
523
+ registration: supersede-on-write + freshness-ranked reads +
524
+ `mark_decision_outdated` (stale decisions stop piling up), deterministic
525
+ cross-engineer decision-id collision repair (`repair-ids` + a git merge
526
+ driver), and one user-scope MCP registration for all your projects — all
527
+ model-free, all local.
490
528
 
491
529
  **Next up** (directional, not dated):
492
530