codevira 3.1.0__tar.gz → 3.2.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 (273) hide show
  1. {codevira-3.1.0 → codevira-3.2.0}/CHANGELOG.md +234 -0
  2. {codevira-3.1.0/codevira.egg-info → codevira-3.2.0}/PKG-INFO +23 -1
  3. {codevira-3.1.0 → codevira-3.2.0}/README.md +22 -0
  4. {codevira-3.1.0 → codevira-3.2.0/codevira.egg-info}/PKG-INFO +23 -1
  5. {codevira-3.1.0 → codevira-3.2.0}/codevira.egg-info/SOURCES.txt +2 -0
  6. codevira-3.2.0/docs/release-notes/v3.1.1.md +200 -0
  7. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/__init__.py +1 -1
  8. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_sync.py +28 -0
  9. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/__init__.py +2 -0
  10. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/__init__.py +2 -0
  11. codevira-3.2.0/mcp_server/engine/policies/session_log_enforcer.py +349 -0
  12. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/graph/template.html +109 -1
  13. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/server.py +48 -3
  14. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/decisions_store.py +131 -0
  15. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/learning.py +28 -0
  16. codevira-3.2.0/mcp_server/tools/reflections.py +243 -0
  17. {codevira-3.1.0 → codevira-3.2.0}/pyproject.toml +1 -1
  18. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_graph.py +14 -0
  19. {codevira-3.1.0 → codevira-3.2.0}/tests/test_reflections.py +190 -1
  20. codevira-3.1.0/mcp_server/tools/reflections.py +0 -125
  21. {codevira-3.1.0 → codevira-3.2.0}/LICENSE +0 -0
  22. {codevira-3.1.0 → codevira-3.2.0}/MANIFEST.in +0 -0
  23. {codevira-3.1.0 → codevira-3.2.0}/agents/builder.md +0 -0
  24. {codevira-3.1.0 → codevira-3.2.0}/agents/developer.md +0 -0
  25. {codevira-3.1.0 → codevira-3.2.0}/agents/documenter.md +0 -0
  26. {codevira-3.1.0 → codevira-3.2.0}/agents/orchestrator.md +0 -0
  27. {codevira-3.1.0 → codevira-3.2.0}/agents/planner.md +0 -0
  28. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/01-code-review.md +0 -0
  29. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/02-adversarial-fix-review.md +0 -0
  30. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/03-cross-module-impact.md +0 -0
  31. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/06-doc-drift.md +0 -0
  32. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/07-security-audit.md +0 -0
  33. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/12-llm-redteam.md +0 -0
  34. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/13-multi-ide-schema.md +0 -0
  35. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/22-competitor-benchmark.md +0 -0
  36. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/README.md +0 -0
  37. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/tier2-scripts.md +0 -0
  38. {codevira-3.1.0 → codevira-3.2.0}/agents/qa/tier3-manual.md +0 -0
  39. {codevira-3.1.0 → codevira-3.2.0}/agents/reviewer.md +0 -0
  40. {codevira-3.1.0 → codevira-3.2.0}/agents/tester.md +0 -0
  41. {codevira-3.1.0 → codevira-3.2.0}/codevira.egg-info/dependency_links.txt +0 -0
  42. {codevira-3.1.0 → codevira-3.2.0}/codevira.egg-info/entry_points.txt +0 -0
  43. {codevira-3.1.0 → codevira-3.2.0}/codevira.egg-info/requires.txt +0 -0
  44. {codevira-3.1.0 → codevira-3.2.0}/codevira.egg-info/top_level.txt +0 -0
  45. {codevira-3.1.0 → codevira-3.2.0}/config.example.yaml +0 -0
  46. {codevira-3.1.0 → codevira-3.2.0}/docs/alpha-tester-invites.md +0 -0
  47. {codevira-3.1.0 → codevira-3.2.0}/docs/architecture.md +0 -0
  48. {codevira-3.1.0 → codevira-3.2.0}/docs/audit-2026-05-22.md +0 -0
  49. {codevira-3.1.0 → codevira-3.2.0}/docs/demo/README.md +0 -0
  50. {codevira-3.1.0 → codevira-3.2.0}/docs/foolproof-product-charter.md +0 -0
  51. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/00-engine.md +0 -0
  52. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/01-decision-lock.md +0 -0
  53. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/02-anti-regression.md +0 -0
  54. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/03-scope-contract.md +0 -0
  55. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/04-blast-radius.md +0 -0
  56. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/05-cross-session.md +0 -0
  57. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/06-token-budget.md +0 -0
  58. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/07-live-style.md +0 -0
  59. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/08-decision-replay.md +0 -0
  60. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/09-intent-inference.md +0 -0
  61. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/10-ai-promotion.md +0 -0
  62. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/README.md +0 -0
  63. {codevira-3.1.0 → codevira-3.2.0}/docs/heroes/pillar-1-setup.md +0 -0
  64. {codevira-3.1.0 → codevira-3.2.0}/docs/hn-launch-day.md +0 -0
  65. {codevira-3.1.0 → codevira-3.2.0}/docs/how-i-built-persistent-memory-for-ai-agents.md +0 -0
  66. {codevira-3.1.0 → codevira-3.2.0}/docs/internal/competitive-landscape.md +0 -0
  67. {codevira-3.1.0 → codevira-3.2.0}/docs/linkedin-article-ai-agent-memory.md +0 -0
  68. {codevira-3.1.0 → codevira-3.2.0}/docs/linkedin-post-ai-agent-memory.md +0 -0
  69. {codevira-3.1.0 → codevira-3.2.0}/docs/local-pypi-https.md +0 -0
  70. {codevira-3.1.0 → codevira-3.2.0}/docs/medium-your-ai-coding-agent-has-amnesia.md +0 -0
  71. {codevira-3.1.0 → codevira-3.2.0}/docs/morning-handoff-2026-05-22.md +0 -0
  72. {codevira-3.1.0 → codevira-3.2.0}/docs/plans/v2.1.2.md +0 -0
  73. {codevira-3.1.0 → codevira-3.2.0}/docs/plans/v2.1.3.md +0 -0
  74. {codevira-3.1.0 → codevira-3.2.0}/docs/plans/v2.2.0.md +0 -0
  75. {codevira-3.1.0 → codevira-3.2.0}/docs/plans/v3.0.0.md +0 -0
  76. {codevira-3.1.0 → codevira-3.2.0}/docs/qa-playbook.md +0 -0
  77. {codevira-3.1.0 → codevira-3.2.0}/docs/release-process.md +0 -0
  78. {codevira-3.1.0 → codevira-3.2.0}/docs/roadmap.md +0 -0
  79. {codevira-3.1.0 → codevira-3.2.0}/docs/surface-cuts-2026-05-22.md +0 -0
  80. {codevira-3.1.0 → codevira-3.2.0}/docs/troubleshooting/antigravity.md +0 -0
  81. {codevira-3.1.0 → codevira-3.2.0}/docs/v2-completion-plan.md +0 -0
  82. {codevira-3.1.0 → codevira-3.2.0}/docs/v2-execution-log.md +0 -0
  83. {codevira-3.1.0 → codevira-3.2.0}/docs/v2-master-plan.md +0 -0
  84. {codevira-3.1.0 → codevira-3.2.0}/docs/vs-other-memory-tools.md +0 -0
  85. {codevira-3.1.0 → codevira-3.2.0}/graph/_schema.yaml +0 -0
  86. {codevira-3.1.0 → codevira-3.2.0}/indexer/__init__.py +0 -0
  87. {codevira-3.1.0 → codevira-3.2.0}/indexer/_dedupe_migration.py +0 -0
  88. {codevira-3.1.0 → codevira-3.2.0}/indexer/_fork_safety.py +0 -0
  89. {codevira-3.1.0 → codevira-3.2.0}/indexer/_sqlite_util.py +0 -0
  90. {codevira-3.1.0 → codevira-3.2.0}/indexer/chunker.py +0 -0
  91. {codevira-3.1.0 → codevira-3.2.0}/indexer/fix_history.py +0 -0
  92. {codevira-3.1.0 → codevira-3.2.0}/indexer/global_db.py +0 -0
  93. {codevira-3.1.0 → codevira-3.2.0}/indexer/graph_generator.py +0 -0
  94. {codevira-3.1.0 → codevira-3.2.0}/indexer/index_codebase.py +0 -0
  95. {codevira-3.1.0 → codevira-3.2.0}/indexer/outcome_tracker.py +0 -0
  96. {codevira-3.1.0 → codevira-3.2.0}/indexer/sqlite_graph.py +0 -0
  97. {codevira-3.1.0 → codevira-3.2.0}/indexer/treesitter_parser.py +0 -0
  98. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/__main__.py +0 -0
  99. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/_ghost_check.py +0 -0
  100. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/_mcp_registry.py +0 -0
  101. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/_project_inventory.py +0 -0
  102. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/_prompts.py +0 -0
  103. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/_repair_init.py +0 -0
  104. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/_safe_crash.py +0 -0
  105. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/auto_init.py +0 -0
  106. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli.py +0 -0
  107. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_consensus.py +0 -0
  108. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_export.py +0 -0
  109. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_graph.py +0 -0
  110. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_hooks_admin.py +0 -0
  111. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_induce.py +0 -0
  112. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_init.py +0 -0
  113. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_projects.py +0 -0
  114. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_reflect.py +0 -0
  115. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_replay.py +0 -0
  116. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_uninstall.py +0 -0
  117. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/cli_working.py +0 -0
  118. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/crash_logger.py +0 -0
  119. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/__init__.py +0 -0
  120. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/affordances.yaml +0 -0
  121. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/agents/builder.md +0 -0
  122. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/agents/developer.md +0 -0
  123. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/agents/documenter.md +0 -0
  124. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/agents/orchestrator.md +0 -0
  125. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/agents/planner.md +0 -0
  126. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/agents/reviewer.md +0 -0
  127. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/agents/tester.md +0 -0
  128. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/config.example.yaml +0 -0
  129. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/hooks/post_tool_use.sh +0 -0
  130. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/hooks/pre_tool_use.sh +0 -0
  131. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/hooks/session_start.sh +0 -0
  132. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/hooks/stop.sh +0 -0
  133. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/hooks/user_prompt_submit.sh +0 -0
  134. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/prompts/reflection_v1.md +0 -0
  135. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/coding-standards-generic.md +0 -0
  136. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/coding-standards-go.md +0 -0
  137. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/coding-standards-typescript.md +0 -0
  138. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/coding-standards.md +0 -0
  139. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/engineering-excellence.md +0 -0
  140. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/git-cicd-governance.md +0 -0
  141. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/git_commits.md +0 -0
  142. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/incremental-updates.md +0 -0
  143. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/master_rule.md +0 -0
  144. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/multi-language.md +0 -0
  145. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/persistence.md +0 -0
  146. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/resilience-observability.md +0 -0
  147. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/smoke-testing.md +0 -0
  148. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/data/rules/testing-standards.md +0 -0
  149. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/decision_replay.py +0 -0
  150. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/detect.py +0 -0
  151. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/doctor.py +0 -0
  152. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/demo_policy.py +0 -0
  153. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/events.py +0 -0
  154. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/memory_fanout.py +0 -0
  155. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/_signature_detect.py +0 -0
  156. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/anti_regression.py +0 -0
  157. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/blast_radius.py +0 -0
  158. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/decision_lock.py +0 -0
  159. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/post_edit_refresh.py +0 -0
  160. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/relevance_inject.py +0 -0
  161. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policies/token_budget.py +0 -0
  162. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/policy.py +0 -0
  163. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/runner.py +0 -0
  164. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/signals.py +0 -0
  165. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/token_meter.py +0 -0
  166. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/wiring/__init__.py +0 -0
  167. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/wiring/claude_code_hooks.py +0 -0
  168. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/engine/wiring/mcp_dispatch.py +0 -0
  169. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/gitignore.py +0 -0
  170. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/global_sync.py +0 -0
  171. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/graph/__init__.py +0 -0
  172. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/http_server.py +0 -0
  173. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/ide_inject.py +0 -0
  174. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/launchd.py +0 -0
  175. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/log_retention.py +0 -0
  176. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/migrate.py +0 -0
  177. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/paths.py +0 -0
  178. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/prompts.py +0 -0
  179. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/roadmap_drift.py +0 -0
  180. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/setup_wizard.py +0 -0
  181. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/__init__.py +0 -0
  182. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/activity_store.py +0 -0
  183. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/agents_md_generator.py +0 -0
  184. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/atomic.py +0 -0
  185. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/config.py +0 -0
  186. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/consensus_store.py +0 -0
  187. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/digest.py +0 -0
  188. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/fts5_index.py +0 -0
  189. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/jsonl_store.py +0 -0
  190. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/manifest.py +0 -0
  191. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/origin.py +0 -0
  192. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/outcomes_writer.py +0 -0
  193. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/paths.py +0 -0
  194. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/reflections_store.py +0 -0
  195. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/sanitize.py +0 -0
  196. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/sessions_store.py +0 -0
  197. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/skills_store.py +0 -0
  198. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/token_estimator.py +0 -0
  199. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/storage/working_store.py +0 -0
  200. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/__init__.py +0 -0
  201. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/changesets.py +0 -0
  202. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/check_conflict.py +0 -0
  203. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/code_reader.py +0 -0
  204. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/consensus.py +0 -0
  205. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/graph.py +0 -0
  206. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/playbook.py +0 -0
  207. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/roadmap.py +0 -0
  208. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/search.py +0 -0
  209. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/skills.py +0 -0
  210. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/spatial.py +0 -0
  211. {codevira-3.1.0 → codevira-3.2.0}/mcp_server/tools/working.py +0 -0
  212. {codevira-3.1.0 → codevira-3.2.0}/rules/coding-standards.md +0 -0
  213. {codevira-3.1.0 → codevira-3.2.0}/rules/engineering-excellence.md +0 -0
  214. {codevira-3.1.0 → codevira-3.2.0}/rules/git-cicd-governance.md +0 -0
  215. {codevira-3.1.0 → codevira-3.2.0}/rules/git_commits.md +0 -0
  216. {codevira-3.1.0 → codevira-3.2.0}/rules/incremental-updates.md +0 -0
  217. {codevira-3.1.0 → codevira-3.2.0}/rules/master_rule.md +0 -0
  218. {codevira-3.1.0 → codevira-3.2.0}/rules/persistence.md +0 -0
  219. {codevira-3.1.0 → codevira-3.2.0}/rules/resilience-observability.md +0 -0
  220. {codevira-3.1.0 → codevira-3.2.0}/rules/smoke-testing.md +0 -0
  221. {codevira-3.1.0 → codevira-3.2.0}/rules/testing-standards.md +0 -0
  222. {codevira-3.1.0 → codevira-3.2.0}/setup.cfg +0 -0
  223. {codevira-3.1.0 → codevira-3.2.0}/tests/test__prompts.py +0 -0
  224. {codevira-3.1.0 → codevira-3.2.0}/tests/test_auto_init.py +0 -0
  225. {codevira-3.1.0 → codevira-3.2.0}/tests/test_call_edge_fk_safety.py +0 -0
  226. {codevira-3.1.0 → codevira-3.2.0}/tests/test_check_conflict.py +0 -0
  227. {codevira-3.1.0 → codevira-3.2.0}/tests/test_chunker.py +0 -0
  228. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_consensus.py +0 -0
  229. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_induce.py +0 -0
  230. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_projects.py +0 -0
  231. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_replay.py +0 -0
  232. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_uninstall.py +0 -0
  233. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_version.py +0 -0
  234. {codevira-3.1.0 → codevira-3.2.0}/tests/test_cli_working.py +0 -0
  235. {codevira-3.1.0 → codevira-3.2.0}/tests/test_consensus_handshake.py +0 -0
  236. {codevira-3.1.0 → codevira-3.2.0}/tests/test_crash_logger.py +0 -0
  237. {codevira-3.1.0 → codevira-3.2.0}/tests/test_dedupe_migration.py +0 -0
  238. {codevira-3.1.0 → codevira-3.2.0}/tests/test_detect.py +0 -0
  239. {codevira-3.1.0 → codevira-3.2.0}/tests/test_doctor.py +0 -0
  240. {codevira-3.1.0 → codevira-3.2.0}/tests/test_fk_safety_extended.py +0 -0
  241. {codevira-3.1.0 → codevira-3.2.0}/tests/test_fork_safety.py +0 -0
  242. {codevira-3.1.0 → codevira-3.2.0}/tests/test_ghost_check.py +0 -0
  243. {codevira-3.1.0 → codevira-3.2.0}/tests/test_gitignore.py +0 -0
  244. {codevira-3.1.0 → codevira-3.2.0}/tests/test_global_db.py +0 -0
  245. {codevira-3.1.0 → codevira-3.2.0}/tests/test_global_sync.py +0 -0
  246. {codevira-3.1.0 → codevira-3.2.0}/tests/test_graph_generator.py +0 -0
  247. {codevira-3.1.0 → codevira-3.2.0}/tests/test_hook_resilience.py +0 -0
  248. {codevira-3.1.0 → codevira-3.2.0}/tests/test_http_server.py +0 -0
  249. {codevira-3.1.0 → codevira-3.2.0}/tests/test_ide_inject.py +0 -0
  250. {codevira-3.1.0 → codevira-3.2.0}/tests/test_index_codebase.py +0 -0
  251. {codevira-3.1.0 → codevira-3.2.0}/tests/test_launchd.py +0 -0
  252. {codevira-3.1.0 → codevira-3.2.0}/tests/test_log_retention.py +0 -0
  253. {codevira-3.1.0 → codevira-3.2.0}/tests/test_migrate.py +0 -0
  254. {codevira-3.1.0 → codevira-3.2.0}/tests/test_outcome_tracker.py +0 -0
  255. {codevira-3.1.0 → codevira-3.2.0}/tests/test_paths.py +0 -0
  256. {codevira-3.1.0 → codevira-3.2.0}/tests/test_prompts.py +0 -0
  257. {codevira-3.1.0 → codevira-3.2.0}/tests/test_record_decision.py +0 -0
  258. {codevira-3.1.0 → codevira-3.2.0}/tests/test_repair_init.py +0 -0
  259. {codevira-3.1.0 → codevira-3.2.0}/tests/test_roadmap_drift.py +0 -0
  260. {codevira-3.1.0 → codevira-3.2.0}/tests/test_server.py +0 -0
  261. {codevira-3.1.0 → codevira-3.2.0}/tests/test_setup_wizard.py +0 -0
  262. {codevira-3.1.0 → codevira-3.2.0}/tests/test_sqlite_graph.py +0 -0
  263. {codevira-3.1.0 → codevira-3.2.0}/tests/test_sqlite_util.py +0 -0
  264. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_code_reader.py +0 -0
  265. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_graph.py +0 -0
  266. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_learning.py +0 -0
  267. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_playbook.py +0 -0
  268. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_roadmap.py +0 -0
  269. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_skills.py +0 -0
  270. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_spatial.py +0 -0
  271. {codevira-3.1.0 → codevira-3.2.0}/tests/test_tools_working.py +0 -0
  272. {codevira-3.1.0 → codevira-3.2.0}/tests/test_treesitter_parser.py +0 -0
  273. {codevira-3.1.0 → codevira-3.2.0}/tests/test_watcher_circuit.py +0 -0
@@ -7,6 +7,240 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ---
9
9
 
10
+ ## [3.2.0] — 2026-06-01 — Engine enforcement, sampling, soft-expire
11
+
12
+ ### Added
13
+
14
+ - **`session_log_enforcer` policy** — closes the "before-you-finish"
15
+ honesty gap CLAUDE.md downgraded to honor-system in v3.1.1. Listens
16
+ on `SESSION_START` (records `{session_id, started_at, project_root}`
17
+ to `.codevira-cache/active_sessions.jsonl`) and `STOP` (counts
18
+ git commits since `started_at`, scans `.codevira/sessions.jsonl`
19
+ for any entry in the session window). If commits > 0 AND no
20
+ in-window log → emits `warn` via Claude Code's `systemMessage`
21
+ channel with a `write_session_log(...)` call template. Default
22
+ mode `warn`; opt-in `block` via `CODEVIRA_SESSION_LOG_ENFORCER_MODE=block`.
23
+ - Session log enforcer uses `git log --since=@<epoch>` rather than
24
+ the locale-dependent ISO form so the count is correct on machines
25
+ whose TZ is not UTC.
26
+ - **Graph viewer Q&A vocab expansion** — three new ask-the-graph
27
+ patterns: `who decided X` (groups by IDE, surfaces cross-tool
28
+ authorship), `when did we X` (chronological with first/last
29
+ dates), `compare X and Y` / `X vs Y` (side-by-side top match per
30
+ topic with outcome/protected badges).
31
+ - **`reflect()` real MCP `sampling/createMessage` path** — the v3.1.0
32
+ stub deferred the actual LLM call to v3.2. v3.2.0 ships
33
+ `reflect_async()` that calls
34
+ `server_session.create_message(...)` when the connected client
35
+ advertises sampling capability; persists the abstraction via
36
+ `reflections_store.append` when `dry_run=False`. Any failure
37
+ (no session, no capability, LLM error, malformed response)
38
+ gracefully degrades to the v3.1.0 stub shape with a
39
+ `sampling_error` diagnostic field for `codevira doctor`. The
40
+ sync `reflect()` is retained for CLI callers.
41
+ - **`do_not_revert` soft-expire** — long-lived locked decisions can
42
+ grow stale. `compute_dnr_soft_expire(decision, max_age_days=N)`
43
+ returns `{soft_expired, age_days, max_age_days, effective_ts}`
44
+ so consumers can surface "needs reaffirmation" without auto-
45
+ flipping the flag. Default threshold 180 days; override via
46
+ `CODEVIRA_DNR_SOFT_EXPIRE_DAYS` (0 = disabled). New MCP tool
47
+ `reaffirm_decision(decision_id)` resets the clock by appending
48
+ a `reaffirmed_at` amendment; the lineage is preserved in the
49
+ JSONL log.
50
+
51
+ ### Changed
52
+
53
+ - CLAUDE.md: removed the "Honest accounting (v3.1.x)" footnote that
54
+ explained the gap was on the honor system. Replaced with engine-
55
+ enforcement description + mode-switch documentation.
56
+
57
+ ---
58
+
59
+ ## [3.1.1] — 2026-05-30 — Hardening, viewer overhaul, G3, sync-observe-git
60
+
61
+ v3.1.1 is the hardening release that supersedes the brief 3.1.0
62
+ window. Same five memory subsystems, but the read/write surface
63
+ is tightened (secret scrubbing across every store), the viewer
64
+ graduates from "look at the graph" to "interrogate the memory"
65
+ (ranked search + Q&A + outcome lens + lineage trace), and the
66
+ last permanently-skipped gauntlet gate (G3 real-IDE smoke) ships
67
+ as a real check.
68
+
69
+ If you installed 3.1.0, `pip install --upgrade codevira` brings
70
+ you straight to 3.1.1. 3.1.0 is yanked: undocumented at release
71
+ time (this CHANGELOG entry didn't ship with it), superseded
72
+ without code regressions.
73
+
74
+ ### Memory hardening
75
+
76
+ - **Secret scrubbing across every store.** M8 (reflections) and
77
+ M3 (skills) already scrubbed; v3.1.1 brings parity to M2
78
+ (working) and to `decisions_store.record` (decision text +
79
+ context). One shared module: `mcp_server/storage/sanitize.py`.
80
+ Patterns: api-key, Bearer, password, AWS AKIA, long hex,
81
+ long base64. Scrub runs at the storage-write boundary so the
82
+ secret never lands on disk in committed surfaces.
83
+ - **`commit_session` path-traversal hardening.** Previously
84
+ `commit_session("../escape")` would write outside
85
+ `.codevira/working_archived/`. Now validates `session_id`
86
+ against `[A-Za-z0-9._-]+`; non-conforming inputs raise
87
+ `ValueError`.
88
+ - **`skills_store.record(triggers={"tags": "git"})` rejected.**
89
+ Previously a bare string would silently iterate as characters
90
+ and persist `["g", "i", "t"]`. Now raises `ValueError` pointing
91
+ the caller to wrap as a list.
92
+ - **BFS query-time crash fix.** `spatial._bfs_distances` now
93
+ catches `sqlite3.DatabaseError` raised inside the query loop
94
+ (not only at connect-time). A corrupt-bytes `graph.db` or a
95
+ schema with missing `edges` table falls back to neighborhood-
96
+ only mode instead of crashing `spatial_nearby`.
97
+ - **`skills_store.list_all(limit=0)` returns `[]`.** Previously
98
+ the for-loop did append-then-check, returning the first row
99
+ instead of empty.
100
+ - **`promote_skill_to_playbook` refuses archived skills.** A
101
+ low-value skill (5+ consecutive failures OR 90+ days unused)
102
+ is now refused unless `force=True` is passed. Previously
103
+ promoted silently and competed with active skills.
104
+ - **`origin.current_origin` normalizes agent_model.** Whitespace
105
+ and the literal strings `"null"` / `"None"` (any case) collapse
106
+ to `None`. Downstream consensus-check string compares no longer
107
+ see junk values.
108
+ - **Antigravity multi-target atomicity.** `inject_global_antigravity`
109
+ + `_inject_antigravity` now snapshot each target's pre-write
110
+ content. On any write failure, all successfully-written targets
111
+ are restored from snapshot. Either every target is stamped or
112
+ none — no asymmetric provenance state from a mid-iteration
113
+ failure.
114
+
115
+ ### Counter-decision discipline (schema change, back-compat)
116
+
117
+ `decisions_store.record` + `record_decision` MCP tool grew two
118
+ optional fields:
119
+
120
+ - `alternatives_considered: list[str]` — the strongest options
121
+ you rejected. Surfaces in the viewer's rich-detail panel.
122
+ - `would_re_examine_if: str` — the condition that should force
123
+ a re-examination. Pair with `do_not_revert=True` to turn the
124
+ one-way ratchet into a self-documenting precondition.
125
+
126
+ Both fields are optional, sanitized on write, and tolerated as
127
+ absent/null on read for legacy records.
128
+
129
+ ### `codevira graph` viewer overhaul
130
+
131
+ The viewer graduates from a passive force-layout to an active
132
+ interrogation tool. Major additions:
133
+
134
+ - **Ranked search panel.** Free-text queries now produce a
135
+ top-K ranked panel under the search box (BM25-ish: token
136
+ overlap + recency + protected boost). Each row: id, snippet,
137
+ outcome badge, protected lock, score. Click any row →
138
+ centers + selects + opens the rich detail panel.
139
+ - **Q&A intent detection** (no LLM dependency, pure regex).
140
+ Four shapes today: `what did we decide about X`, `why did
141
+ we pick X`, `what got reverted`, `what's protected`. Each
142
+ produces a synthesized answer with clickable decision-id
143
+ chips that jump in the graph.
144
+ - **Rich detail panel for decisions.** Surfaces the new
145
+ counter-decision fields (alternatives_considered as a list,
146
+ would_re_examine_if as an italic banner), context as a
147
+ scrollable block, outcome badge in the title, and the full
148
+ supersedes lineage chain (clickable predecessors + successors).
149
+ - **Outcome lens.** New "Outcome" choice in the lens dropdown.
150
+ Colors decisions by classification: `kept`=green, `modified`=
151
+ amber, `reverted`=coral, `unclassified`=gray. Legend shows
152
+ per-bucket counts.
153
+ - **Lineage trace mode.** Click "trace" in the lineage block on
154
+ any decision in a supersedes chain — everything dims, the
155
+ chain stays full opacity with extra-thick warning-colored
156
+ edges, camera fits to the chain. Esc exits.
157
+ - **`alternatives_considered` + `would_re_examine_if` surfaced**
158
+ in the rich detail panel.
159
+ - **Search debouncing** (120ms trailing-edge) so the ranked-
160
+ score pass doesn't lag on typing bursts at the 2000-node cap.
161
+
162
+ The viewer's underlying file split: `mcp_server/cli_graph.py`
163
+ shrank 84KB → 14KB by extracting the HTML/CSS/JS template into
164
+ `mcp_server/graph/template.html`. Public API unchanged.
165
+
166
+ ### `codevira sync` auto-classifies outcomes
167
+
168
+ Every `codevira sync` (manual or automatic) now runs
169
+ `observe-git` as a best-effort tail step. The outcome lens in
170
+ the viewer + the Q&A "what got reverted" surface now have real
171
+ data on every sync — previously stayed gray because outcome
172
+ classification was opt-in. Non-git projects degrade silently.
173
+
174
+ ### G3 — real-IDE smoke (the last stubbed gate)
175
+
176
+ `scripts/check_real_ide_smoke.sh` was a stub returning exit 2
177
+ ("skipped") since v2.0. Now ships a real implementation:
178
+
179
+ - Locates codevira on PATH (the same binary IDE configs invoke).
180
+ - For each detected IDE config (Claude Code, Claude Desktop,
181
+ Cursor, Windsurf, Antigravity — per-app + shared paths):
182
+ validates JSON; "empty file" treated as not-configured;
183
+ malformed JSON treated as hard fail.
184
+ - Verifies `codevira` (or `codevira-<safe_name>`) is registered;
185
+ reports `env.CODEVIRA_IDE` state (pre-v3.1.0 installs show
186
+ as missing with re-setup guidance).
187
+ - Spawns a real MCP stdio server (`codevira --project-dir <tmp>`),
188
+ runs initialize + tools/list. Thresholds: initialize 5s budget
189
+ (warm-load OK), tools/list 1s HARD (Claude Desktop disconnect
190
+ class), tool count ≥20.
191
+
192
+ Evidence file now records `G3_real_ide_smoke: true` for the
193
+ first time since v2.0.
194
+
195
+ ### Process / discipline
196
+
197
+ - **`test_cross_tool_universality` added to `make test-e2e`.**
198
+ Previously the procedural lock (D000010) said "run test-e2e
199
+ before changing engine policies." The gate only included
200
+ `test_first_contact` + `test_product_invariants`. A bump to
201
+ `_DEFAULT_MIN_SCORE` 0.10 → 0.25 broke the cross-tool wedge
202
+ silently because the test that catches it wasn't in the gate.
203
+ Reverted the bump; widened the gate; added a wedge-regression
204
+ unit test (`TestCrossToolWedgeRegression`) so the same class
205
+ of regression also fails at the fast unit-test layer.
206
+ - **`make release-verify-version` BSD sed fix.** The version
207
+ drift check used `sed -E 's/.*=\s*"([^"]+)".*/\1/'` which is
208
+ GNU-only; BSD sed (macOS default) doesn't recognize `\s` in
209
+ `-E`. Replaced with `= *` (literal space).
210
+ - **CLAUDE.md "MUST"/"SHOULD" honesty.** The
211
+ "before-you-finish" contract claimed `MUST call
212
+ write_session_log` but no engine layer enforced it. Downgraded
213
+ to STRONG RECOMMENDATION with explicit "engine enforcement on
214
+ roadmap" note.
215
+ - **AGENTS.md idempotency.** `agents_md_generator.regenerate`
216
+ now compares computed content vs existing and short-circuits
217
+ when identical (no write, no mtime bump). Kills the
218
+ perpetual uncommitted-drift loop where every codevira write
219
+ bumped AGENTS.md even when content didn't change.
220
+
221
+ ### Tests + suite
222
+
223
+ - Full project suite: 2538 → 2540 passing, 28 skipped, 0
224
+ failures.
225
+ - Widened `make test-e2e` gate: 39 → 43 passing.
226
+ - All 4 product fixes verified end-to-end through the fresh-
227
+ built wheel + against AgentStore's real memory.
228
+
229
+ ### Locked decisions honored
230
+
231
+ D000010 procedural gate ran on every engine-policy change.
232
+ D000001 (atomic disk writes) honored. D000012 (project-root
233
+ validation) honored.
234
+
235
+ ### Yanked
236
+
237
+ - **3.1.0 yanked 2026-05-30.** Same code shape; released
238
+ without this CHANGELOG entry. Process gap, not code gap.
239
+ Existing pins still work; new `pip install codevira` lands
240
+ on 3.1.1 directly.
241
+
242
+ ---
243
+
10
244
  ---
11
245
 
12
246
  ## [3.1.0] — Five memory subsystems + cross-IDE consensus
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: codevira
3
- Version: 3.1.0
3
+ Version: 3.2.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
@@ -141,6 +141,28 @@ every AI tool, on every project, on your local machine.**
141
141
 
142
142
  ---
143
143
 
144
+ ## What's new in v3.1.1 — hardening + interrogable memory
145
+
146
+ > 3.1.1 supersedes the briefly-published 3.1.0 (which shipped
147
+ > without this README/CHANGELOG entry). Same code shape; this
148
+ > release is the documented one. Brings five memory subsystems
149
+ > (M1–M9 from 3.1.0) plus the v3.1.1 hardening + viewer overhaul.
150
+
151
+ | Area | What you get |
152
+ |---|---|
153
+ | **Five memory subsystems** | Origin tagging (M1), working memory (M2), skill library with FTS5 ranking (M3), spatial memory + activity heatmap (M4), skill induction wired to outcomes (M5), cross-IDE consensus check + handshake (M6/M7), reflections (M8). 22 new MCP tools. |
154
+ | **Secret scrubbing everywhere** | Decisions, sessions, working memory, skills, reflections — every store scrubs api-key / Bearer / password / AWS AKIA / long hex / long base64 at the write boundary. One shared `mcp_server/storage/sanitize.py`. |
155
+ | **Counter-decision discipline** | `record_decision` now accepts `alternatives_considered: list[str]` and `would_re_examine_if: str` — losing options + invalidation trigger surface in the viewer's rich-detail panel. Optional + back-compat. |
156
+ | **Interrogable graph viewer** | `codevira graph` is no longer a passive force-layout. Free-text search → top-K ranked panel with score + outcome badge. Q&A intent detection ("what did we decide about X", "what got reverted", "what's protected"). Outcome lens (kept/modified/reverted). Lineage trace mode for supersession chains. |
157
+ | **Auto outcome classification** | `codevira sync` now runs `observe-git` as a best-effort tail step — outcomes flow into the viewer's outcome lens automatically. |
158
+ | **G3 real-IDE smoke** | The last permanently-skipped gauntlet gate now ships as a real check. Verifies codevira is registered in each detected IDE config + MCP `tools/list` round-trips in <1s. |
159
+ | **AGENTS.md no more churn** | `regenerate()` is now idempotent — no rewrite when content unchanged, no perpetual uncommitted-drift loop. |
160
+ | **4 silent bugs fixed** | `commit_session("../escape")` rejected; `triggers.tags="git"` rejected; `list_all(limit=0)` returns `[]`; spatial BFS catches query-time sqlite errors. |
161
+
162
+ Full v3.1.1 release notes: [CHANGELOG.md](CHANGELOG.md#311--2026-05-30--hardening-viewer-overhaul-g3-sync-observe-git).
163
+
164
+ ---
165
+
144
166
  ## What's new in v3.0.0 — audited, lean, opinionated
145
167
 
146
168
  > Major version. v3.0.0 is the biggest API contraction since v2.0
@@ -92,6 +92,28 @@ every AI tool, on every project, on your local machine.**
92
92
 
93
93
  ---
94
94
 
95
+ ## What's new in v3.1.1 — hardening + interrogable memory
96
+
97
+ > 3.1.1 supersedes the briefly-published 3.1.0 (which shipped
98
+ > without this README/CHANGELOG entry). Same code shape; this
99
+ > release is the documented one. Brings five memory subsystems
100
+ > (M1–M9 from 3.1.0) plus the v3.1.1 hardening + viewer overhaul.
101
+
102
+ | Area | What you get |
103
+ |---|---|
104
+ | **Five memory subsystems** | Origin tagging (M1), working memory (M2), skill library with FTS5 ranking (M3), spatial memory + activity heatmap (M4), skill induction wired to outcomes (M5), cross-IDE consensus check + handshake (M6/M7), reflections (M8). 22 new MCP tools. |
105
+ | **Secret scrubbing everywhere** | Decisions, sessions, working memory, skills, reflections — every store scrubs api-key / Bearer / password / AWS AKIA / long hex / long base64 at the write boundary. One shared `mcp_server/storage/sanitize.py`. |
106
+ | **Counter-decision discipline** | `record_decision` now accepts `alternatives_considered: list[str]` and `would_re_examine_if: str` — losing options + invalidation trigger surface in the viewer's rich-detail panel. Optional + back-compat. |
107
+ | **Interrogable graph viewer** | `codevira graph` is no longer a passive force-layout. Free-text search → top-K ranked panel with score + outcome badge. Q&A intent detection ("what did we decide about X", "what got reverted", "what's protected"). Outcome lens (kept/modified/reverted). Lineage trace mode for supersession chains. |
108
+ | **Auto outcome classification** | `codevira sync` now runs `observe-git` as a best-effort tail step — outcomes flow into the viewer's outcome lens automatically. |
109
+ | **G3 real-IDE smoke** | The last permanently-skipped gauntlet gate now ships as a real check. Verifies codevira is registered in each detected IDE config + MCP `tools/list` round-trips in <1s. |
110
+ | **AGENTS.md no more churn** | `regenerate()` is now idempotent — no rewrite when content unchanged, no perpetual uncommitted-drift loop. |
111
+ | **4 silent bugs fixed** | `commit_session("../escape")` rejected; `triggers.tags="git"` rejected; `list_all(limit=0)` returns `[]`; spatial BFS catches query-time sqlite errors. |
112
+
113
+ Full v3.1.1 release notes: [CHANGELOG.md](CHANGELOG.md#311--2026-05-30--hardening-viewer-overhaul-g3-sync-observe-git).
114
+
115
+ ---
116
+
95
117
  ## What's new in v3.0.0 — audited, lean, opinionated
96
118
 
97
119
  > Major version. v3.0.0 is the biggest API contraction since v2.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: codevira
3
- Version: 3.1.0
3
+ Version: 3.2.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
@@ -141,6 +141,28 @@ every AI tool, on every project, on your local machine.**
141
141
 
142
142
  ---
143
143
 
144
+ ## What's new in v3.1.1 — hardening + interrogable memory
145
+
146
+ > 3.1.1 supersedes the briefly-published 3.1.0 (which shipped
147
+ > without this README/CHANGELOG entry). Same code shape; this
148
+ > release is the documented one. Brings five memory subsystems
149
+ > (M1–M9 from 3.1.0) plus the v3.1.1 hardening + viewer overhaul.
150
+
151
+ | Area | What you get |
152
+ |---|---|
153
+ | **Five memory subsystems** | Origin tagging (M1), working memory (M2), skill library with FTS5 ranking (M3), spatial memory + activity heatmap (M4), skill induction wired to outcomes (M5), cross-IDE consensus check + handshake (M6/M7), reflections (M8). 22 new MCP tools. |
154
+ | **Secret scrubbing everywhere** | Decisions, sessions, working memory, skills, reflections — every store scrubs api-key / Bearer / password / AWS AKIA / long hex / long base64 at the write boundary. One shared `mcp_server/storage/sanitize.py`. |
155
+ | **Counter-decision discipline** | `record_decision` now accepts `alternatives_considered: list[str]` and `would_re_examine_if: str` — losing options + invalidation trigger surface in the viewer's rich-detail panel. Optional + back-compat. |
156
+ | **Interrogable graph viewer** | `codevira graph` is no longer a passive force-layout. Free-text search → top-K ranked panel with score + outcome badge. Q&A intent detection ("what did we decide about X", "what got reverted", "what's protected"). Outcome lens (kept/modified/reverted). Lineage trace mode for supersession chains. |
157
+ | **Auto outcome classification** | `codevira sync` now runs `observe-git` as a best-effort tail step — outcomes flow into the viewer's outcome lens automatically. |
158
+ | **G3 real-IDE smoke** | The last permanently-skipped gauntlet gate now ships as a real check. Verifies codevira is registered in each detected IDE config + MCP `tools/list` round-trips in <1s. |
159
+ | **AGENTS.md no more churn** | `regenerate()` is now idempotent — no rewrite when content unchanged, no perpetual uncommitted-drift loop. |
160
+ | **4 silent bugs fixed** | `commit_session("../escape")` rejected; `triggers.tags="git"` rejected; `list_all(limit=0)` returns `[]`; spatial BFS catches query-time sqlite errors. |
161
+
162
+ Full v3.1.1 release notes: [CHANGELOG.md](CHANGELOG.md#311--2026-05-30--hardening-viewer-overhaul-g3-sync-observe-git).
163
+
164
+ ---
165
+
144
166
  ## What's new in v3.0.0 — audited, lean, opinionated
145
167
 
146
168
  > Major version. v3.0.0 is the biggest API contraction since v2.0
@@ -66,6 +66,7 @@ docs/plans/v2.1.2.md
66
66
  docs/plans/v2.1.3.md
67
67
  docs/plans/v2.2.0.md
68
68
  docs/plans/v3.0.0.md
69
+ docs/release-notes/v3.1.1.md
69
70
  docs/troubleshooting/antigravity.md
70
71
  graph/_schema.yaml
71
72
  indexer/__init__.py
@@ -163,6 +164,7 @@ mcp_server/engine/policies/blast_radius.py
163
164
  mcp_server/engine/policies/decision_lock.py
164
165
  mcp_server/engine/policies/post_edit_refresh.py
165
166
  mcp_server/engine/policies/relevance_inject.py
167
+ mcp_server/engine/policies/session_log_enforcer.py
166
168
  mcp_server/engine/policies/token_budget.py
167
169
  mcp_server/engine/wiring/__init__.py
168
170
  mcp_server/engine/wiring/claude_code_hooks.py
@@ -0,0 +1,200 @@
1
+ # Codevira v3.1.1 — release notes
2
+
3
+ **Released:** 2026-05-30
4
+ **Supersedes:** 3.1.0 (yanked — released without this notes/CHANGELOG
5
+ entry; same code shape, the only difference is documentation
6
+ discipline)
7
+ **Install:** `pipx install --upgrade codevira` or
8
+ `pip install codevira==3.1.1`
9
+
10
+ ---
11
+
12
+ ## TL;DR
13
+
14
+ v3.1.1 finishes what 3.1.0 started. Five memory subsystems (M1–M9)
15
+ shipped in 3.1.0; v3.1.1 adds the hardening sweep on top:
16
+
17
+ - Every store now scrubs secrets at the write boundary
18
+ - The graph viewer learned to **answer questions** (ranked search +
19
+ Q&A + outcome lens + lineage trace)
20
+ - The release gauntlet's last permanently-skipped gate (G3) ships
21
+ as a real check
22
+ - `codevira sync` now classifies outcomes automatically (the
23
+ viewer's outcome lens lights up on real projects)
24
+ - 4 silent bugs (path traversal, type coercion, off-by-one, spatial
25
+ BFS crash) are fixed
26
+ - A schema addition lets every new decision carry its
27
+ *alternatives_considered* and *would_re_examine_if* — turning
28
+ `do_not_revert` from a one-way ratchet into a self-documented
29
+ precondition
30
+
31
+ Full per-line history is in [CHANGELOG.md](../../CHANGELOG.md#311--2026-05-30--hardening-viewer-overhaul-g3-sync-observe-git).
32
+
33
+ ---
34
+
35
+ ## Upgrading from 3.0.x or 3.1.0
36
+
37
+ ```bash
38
+ pipx upgrade codevira # or `pip install --upgrade codevira`
39
+ codevira --version # should report 3.1.1
40
+ codevira setup # re-stamps env.CODEVIRA_IDE into every IDE
41
+ codevira sync # one-shot: rebuilds indexes + classifies outcomes
42
+ ```
43
+
44
+ That's it. The wire format is back-compat:
45
+
46
+ - **v3.0.x records** (no `origin` field) keep loading; readers treat
47
+ them as `ide="unknown"`.
48
+ - **3.1.0 records** that wrote *with* `origin` continue loading.
49
+ - **Counter-decision fields** (`alternatives_considered`,
50
+ `would_re_examine_if`) are optional on every legacy decision —
51
+ populate them on new writes when you have the context.
52
+
53
+ The one user-visible change after `setup`: existing IDE configs gain
54
+ `env.CODEVIRA_IDE` so cross-IDE consensus checks can attribute
55
+ writes. Without this, every decision shows up as `ide=unknown`.
56
+
57
+ ---
58
+
59
+ ## The new things you'll notice
60
+
61
+ ### `codevira graph` is interactive now
62
+
63
+ Open the rendered HTML, then:
64
+
65
+ - **Type in the search box** — top-K matches appear ranked below.
66
+ Token grammar: `tag:auth ide:cursor kind:decision protected:true
67
+ since:2026-01-01 until:2026-04-01`.
68
+ - **Ask the graph in plain English**:
69
+ - "what did we decide about auth?"
70
+ - "why did we pick bcrypt?"
71
+ - "what got reverted?"
72
+ - "what's protected?"
73
+ - **Switch the Lens dropdown** to "Outcome" — color decisions by
74
+ classified result. Run `codevira sync` first so outcomes are
75
+ populated.
76
+ - **Click any decision** — rich detail panel shows
77
+ alternatives_considered, would_re_examine_if, lineage chain,
78
+ outcome badge.
79
+ - **Click "trace" on a lineage** — graph dims, the supersession
80
+ chain is highlighted, camera fits to it.
81
+
82
+ Press `?` in the viewer for the full key+gesture cheatsheet.
83
+
84
+ ### `record_decision` accepts losers + invalidation triggers
85
+
86
+ ```python
87
+ record_decision(
88
+ decision="Use bcrypt for password hashing",
89
+ do_not_revert=True,
90
+ alternatives_considered=[
91
+ "argon2id (rejected: heavier on cheap mobile clients)",
92
+ "scrypt (rejected: less well-vetted in our ecosystem)",
93
+ ],
94
+ would_re_examine_if=(
95
+ "if argon2id native bindings ship in the stdlib OR "
96
+ "if we move off mobile clients"
97
+ ),
98
+ )
99
+ ```
100
+
101
+ Future sessions see WHY the decision won and the rule for revisiting
102
+ it — instead of just the winner. The viewer's rich-detail panel
103
+ surfaces both fields. Empty values are fine; populate when you have
104
+ the context.
105
+
106
+ ### Secrets never land on disk
107
+
108
+ If you accidentally paste a curl example into a decision, working
109
+ memory note, session log, skill procedure, or reflection:
110
+
111
+ ```
112
+ record_decision(decision="see api_key=hunter2-deadbeefcafe for /v1/things")
113
+ ```
114
+
115
+ The on-disk record reads `see <redacted:api-key> for /v1/things`.
116
+ Six pattern families are scrubbed: api-key, Bearer, password, AWS
117
+ AKIA, long hex, long base64. Shared scrubber in
118
+ `mcp_server/storage/sanitize.py`.
119
+
120
+ ### `codevira sync` quietly does more work
121
+
122
+ Every `sync` now runs `observe-git` as a best-effort tail step:
123
+
124
+ ```
125
+ ✓ AGENTS.md regenerated (5,137 bytes)
126
+ ✓ observe-git (8 kept · 13 modified · 2 reverted · 6 unclassified,
127
+ 23 new outcome(s))
128
+ ```
129
+
130
+ The outcome counts populate the viewer's outcome lens + the Q&A
131
+ "what got reverted" surface. Non-git projects degrade silently.
132
+
133
+ ### G3 real-IDE smoke
134
+
135
+ `scripts/check_real_ide_smoke.sh` was a stub for half a year. Now
136
+ it runs the real check during `make release-gauntlet`:
137
+
138
+ - Finds every IDE config on the machine
139
+ - Verifies codevira is registered in each
140
+ - Spawns an MCP stdio server, runs initialize + tools/list
141
+ - Asserts tools/list <1s (the Claude Desktop disconnect class)
142
+
143
+ Run it standalone any time: `scripts/check_real_ide_smoke.sh`.
144
+
145
+ ---
146
+
147
+ ## Bugs fixed (real ones)
148
+
149
+ 1. `working_store.commit_session("../escape")` would write outside
150
+ `.codevira/working_archived/`. Now raises `ValueError`.
151
+ 2. `skills_store.record(triggers={"tags": "git"})` silently stored
152
+ `["g", "i", "t"]`. Now raises `ValueError` pointing to wrap as
153
+ a list.
154
+ 3. `skills_store.list_all(limit=0)` returned the first row (append-
155
+ then-check off-by-one). Now returns `[]`.
156
+ 4. `spatial._bfs_distances` crashed on corrupt/schema-missing
157
+ `graph.db` (only caught connect-time errors). Now catches
158
+ query-time `sqlite3.DatabaseError` and falls back to
159
+ neighborhood-only mode.
160
+ 5. `promote_skill_to_playbook` silently allowed archived (low-value)
161
+ skills. Now refuses unless `force=True`.
162
+ 6. `origin.current_origin` passed `"null"` / `" "` strings through
163
+ verbatim as `agent_model`. Now normalizes to `None`.
164
+ 7. `inject_global_antigravity` left partial state when target #2
165
+ failed mid-iteration. Now snapshots + rolls back.
166
+
167
+ ---
168
+
169
+ ## Honest process notes
170
+
171
+ - **3.1.0 yanked**, 3.1.1 ships in its place. 3.1.0 was published
172
+ before this CHANGELOG/README entry existed. Same code; pure
173
+ documentation discipline gap.
174
+ - **A bug almost shipped.** Mid-session a tweak to
175
+ `_DEFAULT_MIN_SCORE` (0.10 → 0.25) silently broke the cross-tool
176
+ wedge — single-FTS-match decisions stopped surfacing to other
177
+ IDEs. The `make test-e2e` gate ran (per D000010's procedural
178
+ lock) but didn't include `test_cross_tool_universality.py`. A
179
+ full `pytest tests/` (no ignores) before publish caught it.
180
+ Reverted the threshold; widened the gate; added a unit-level
181
+ wedge-regression test so the same class of regression also fails
182
+ fast.
183
+ - **CLAUDE.md's "MUST" downgrade.** The "before-you-finish" contract
184
+ in CLAUDE.md said `MUST call write_session_log`. The engine
185
+ didn't enforce it. Downgraded to STRONG RECOMMENDATION with an
186
+ "engine enforcement on roadmap" note. Honesty > confidence
187
+ theater.
188
+
189
+ ---
190
+
191
+ ## What's next (v3.2.0 outline, subject to change)
192
+
193
+ - Real MCP `sampling/createMessage` in `reflect()` (today returns
194
+ a stubbed `sampling_supported: False`).
195
+ - Q&A vocabulary expansion: "who decided X", "when did we X",
196
+ "compare X and Y", lineage queries.
197
+ - Recency-decay on relevance scoring (was attempted in 3.1.x but
198
+ reverted — needs measurement infrastructure first).
199
+ - `do_not_revert` auto-soft-expire after N months unless
200
+ re-affirmed via `apply_outcome("still valid")`.
@@ -14,4 +14,4 @@ internals — internal APIs may change between minor versions.
14
14
  from mcp_server.cli import main
15
15
 
16
16
  __all__ = ["main"]
17
- __version__ = "3.1.0"
17
+ __version__ = "3.2.0"
@@ -103,6 +103,34 @@ def cmd_sync(*, dry_run: bool = False, verbose: bool = False) -> int:
103
103
  print(f" ✗ AGENTS.md regenerate failed: {exc}", file=sys.stderr)
104
104
  return 1
105
105
 
106
+ # v3.1.x: opt-in outcome classification. If the project has a git
107
+ # working tree, run observe-git so the decisions get outcome
108
+ # tags (kept/modified/reverted) — this drives the v3.1.x outcome
109
+ # lens + Q&A "what got reverted" features. Best-effort; we never
110
+ # fail the sync on git troubles (project might not be a git repo
111
+ # at all, which is fine).
112
+ try:
113
+ from mcp_server.storage import outcomes_writer
114
+
115
+ summary = outcomes_writer.observe_all()
116
+ if "error" in summary:
117
+ if verbose:
118
+ print(f" ⓘ observe-git skipped: {summary['error']}")
119
+ else:
120
+ counts = (
121
+ f"{summary.get('kept', 0)} kept · "
122
+ f"{summary.get('modified', 0)} modified · "
123
+ f"{summary.get('reverted', 0)} reverted · "
124
+ f"{summary.get('unclassified', 0)} unclassified"
125
+ )
126
+ print(
127
+ f" ✓ observe-git ({counts}, "
128
+ f"{summary.get('outcomes_appended', 0)} new outcome(s))"
129
+ )
130
+ except Exception as exc: # noqa: BLE001 — never block sync on outcome wiring
131
+ if verbose:
132
+ print(f" ⓘ observe-git skipped: {exc}", file=sys.stderr)
133
+
106
134
  print()
107
135
  print(" ✓ Sync complete.")
108
136
  print()
@@ -50,6 +50,7 @@ def register_default_policies() -> None:
50
50
  from mcp_server.engine.policies.decision_lock import DecisionLock
51
51
  from mcp_server.engine.policies.post_edit_refresh import PostEditGraphRefresh
52
52
  from mcp_server.engine.policies.relevance_inject import RelevanceInject
53
+ from mcp_server.engine.policies.session_log_enforcer import SessionLogEnforcer
53
54
  from mcp_server.engine.policies.token_budget import TokenBudgetPersist
54
55
 
55
56
  # v2.2.0+ surface cut (2026-05-22 audit): LiveStyleEnforcement,
@@ -64,6 +65,7 @@ def register_default_policies() -> None:
64
65
  TokenBudgetPersist, # Hero 6
65
66
  AntiRegression, # Hero 2
66
67
  PostEditGraphRefresh, # v2.1.2 Item 4
68
+ SessionLogEnforcer, # v3.2.0 hook-layer enforcement of write_session_log
67
69
  ):
68
70
  if not policy_cls.enabled_by_default:
69
71
  continue # opt-in only — caller registers manually
@@ -34,6 +34,7 @@ from mcp_server.engine.policies.anti_regression import AntiRegression
34
34
  from mcp_server.engine.policies.blast_radius import BlastRadiusVeto
35
35
  from mcp_server.engine.policies.decision_lock import DecisionLock
36
36
  from mcp_server.engine.policies.relevance_inject import RelevanceInject
37
+ from mcp_server.engine.policies.session_log_enforcer import SessionLogEnforcer
37
38
  from mcp_server.engine.policies.token_budget import TokenBudgetPersist
38
39
 
39
40
  __all__ = [
@@ -41,5 +42,6 @@ __all__ = [
41
42
  "BlastRadiusVeto",
42
43
  "DecisionLock",
43
44
  "RelevanceInject",
45
+ "SessionLogEnforcer",
44
46
  "TokenBudgetPersist",
45
47
  ]