rationalevault 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. rationalevault-1.0.0/.env.example +13 -0
  2. rationalevault-1.0.0/.gitattributes +9 -0
  3. rationalevault-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
  4. rationalevault-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. rationalevault-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +14 -0
  6. rationalevault-1.0.0/.github/workflows/verify.yml +45 -0
  7. rationalevault-1.0.0/.gitignore +47 -0
  8. rationalevault-1.0.0/CHANGELOG.md +95 -0
  9. rationalevault-1.0.0/CONTRIBUTING.md +38 -0
  10. rationalevault-1.0.0/LICENSE +21 -0
  11. rationalevault-1.0.0/PKG-INFO +106 -0
  12. rationalevault-1.0.0/README.md +93 -0
  13. rationalevault-1.0.0/SECURITY.md +16 -0
  14. rationalevault-1.0.0/docker/postgres/docker-compose.yml +23 -0
  15. rationalevault-1.0.0/docs/AGENT_COMPILERS.md +119 -0
  16. rationalevault-1.0.0/docs/ARCHITECTURE.md +88 -0
  17. rationalevault-1.0.0/docs/COGNITIVE_HEAD.md +130 -0
  18. rationalevault-1.0.0/docs/CONTEXT_PLANNER.md +60 -0
  19. rationalevault-1.0.0/docs/EVENT_LEDGER.md +133 -0
  20. rationalevault-1.0.0/docs/KNOWLEDGE_COMPILER.md +65 -0
  21. rationalevault-1.0.0/docs/compilers.md +21 -0
  22. rationalevault-1.0.0/docs/concepts.md +14 -0
  23. rationalevault-1.0.0/docs/context.md +20 -0
  24. rationalevault-1.0.0/docs/evaluation-gates.md +22 -0
  25. rationalevault-1.0.0/docs/evaluation.md +16 -0
  26. rationalevault-1.0.0/docs/event-ledger.md +27 -0
  27. rationalevault-1.0.0/docs/graph.md +16 -0
  28. rationalevault-1.0.0/docs/knowledge.md +13 -0
  29. rationalevault-1.0.0/docs/memory.md +19 -0
  30. rationalevault-1.0.0/docs/philosophy.md +32 -0
  31. rationalevault-1.0.0/docs/quickstart.md +59 -0
  32. rationalevault-1.0.0/docs/release-checklist.md +58 -0
  33. rationalevault-1.0.0/docs/roadmap.md +27 -0
  34. rationalevault-1.0.0/examples/basic_memory/main.py +94 -0
  35. rationalevault-1.0.0/examples/first_experiment.md +237 -0
  36. rationalevault-1.0.0/examples/knowledge_synthesis/main.py +98 -0
  37. rationalevault-1.0.0/examples/multi_agent_handoff/main.py +72 -0
  38. rationalevault-1.0.0/examples/todo_api/implementation_plan.md +26 -0
  39. rationalevault-1.0.0/examples/todo_api/main.py +7 -0
  40. rationalevault-1.0.0/migrations/0001_initial.sql +82 -0
  41. rationalevault-1.0.0/migrations/0002_indexes.sql +38 -0
  42. rationalevault-1.0.0/pyproject.toml +35 -0
  43. rationalevault-1.0.0/rationalevault/__init__.py +5 -0
  44. rationalevault-1.0.0/rationalevault/cli/main.py +1085 -0
  45. rationalevault-1.0.0/rationalevault/cognitive_head/__init__.py +1 -0
  46. rationalevault-1.0.0/rationalevault/cognitive_head/compiler.py +260 -0
  47. rationalevault-1.0.0/rationalevault/cognitive_head/reducers.py +315 -0
  48. rationalevault-1.0.0/rationalevault/cognitive_head/snapshot.py +93 -0
  49. rationalevault-1.0.0/rationalevault/compilers/__init__.py +1 -0
  50. rationalevault-1.0.0/rationalevault/compilers/base.py +52 -0
  51. rationalevault-1.0.0/rationalevault/compilers/claude.py +217 -0
  52. rationalevault-1.0.0/rationalevault/compilers/claude_context.py +293 -0
  53. rationalevault-1.0.0/rationalevault/compilers/compiler_output.py +86 -0
  54. rationalevault-1.0.0/rationalevault/compilers/context_compiler_base.py +85 -0
  55. rationalevault-1.0.0/rationalevault/compilers/cursor_context.py +91 -0
  56. rationalevault-1.0.0/rationalevault/compilers/opencode_context.py +138 -0
  57. rationalevault-1.0.0/rationalevault/compilers/registry.py +79 -0
  58. rationalevault-1.0.0/rationalevault/db/__init__.py +1 -0
  59. rationalevault-1.0.0/rationalevault/db/base.py +60 -0
  60. rationalevault-1.0.0/rationalevault/db/connection.py +64 -0
  61. rationalevault-1.0.0/rationalevault/db/event_store.py +92 -0
  62. rationalevault-1.0.0/rationalevault/db/factory.py +44 -0
  63. rationalevault-1.0.0/rationalevault/db/postgres_store.py +179 -0
  64. rationalevault-1.0.0/rationalevault/db/sqlite_store.py +225 -0
  65. rationalevault-1.0.0/rationalevault/diagnostics/doctor.py +228 -0
  66. rationalevault-1.0.0/rationalevault/evaluation/__init__.py +1 -0
  67. rationalevault-1.0.0/rationalevault/evaluation/benchmark_schema.py +47 -0
  68. rationalevault-1.0.0/rationalevault/evaluation/compiler_benchmark_schema.py +96 -0
  69. rationalevault-1.0.0/rationalevault/evaluation/compiler_evaluator.py +407 -0
  70. rationalevault-1.0.0/rationalevault/evaluation/context_benchmark_schema.py +89 -0
  71. rationalevault-1.0.0/rationalevault/evaluation/context_evaluator.py +381 -0
  72. rationalevault-1.0.0/rationalevault/evaluation/continuity_benchmark_schema.py +142 -0
  73. rationalevault-1.0.0/rationalevault/evaluation/continuity_benchmarks/architecture_decisions.json +75 -0
  74. rationalevault-1.0.0/rationalevault/evaluation/continuity_benchmarks/contradiction_resolution.json +63 -0
  75. rationalevault-1.0.0/rationalevault/evaluation/continuity_benchmarks/cross_agent_full_cycle.json +101 -0
  76. rationalevault-1.0.0/rationalevault/evaluation/continuity_benchmarks/failure_recovery.json +68 -0
  77. rationalevault-1.0.0/rationalevault/evaluation/continuity_benchmarks/knowledge_accumulation.json +61 -0
  78. rationalevault-1.0.0/rationalevault/evaluation/continuity_benchmarks/multi_sprint_handoff.json +75 -0
  79. rationalevault-1.0.0/rationalevault/evaluation/continuity_evaluator.py +320 -0
  80. rationalevault-1.0.0/rationalevault/evaluation/continuity_metrics.py +294 -0
  81. rationalevault-1.0.0/rationalevault/evaluation/corpus_builder.py +160 -0
  82. rationalevault-1.0.0/rationalevault/evaluation/degradation_metrics.py +30 -0
  83. rationalevault-1.0.0/rationalevault/evaluation/evaluator.py +374 -0
  84. rationalevault-1.0.0/rationalevault/evaluation/failure_taxonomy.py +54 -0
  85. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_agents/corpus_manifest.json +28 -0
  86. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_agents/processed/session_001.json +26 -0
  87. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_agents/processed/session_002.json +26 -0
  88. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_agents/raw/session_001/handoff_001.md +9 -0
  89. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_agents/raw/session_001/session_metadata.json +5 -0
  90. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_agents/raw/session_002/handoff_001.md +9 -0
  91. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_agents/raw/session_002/session_metadata.json +5 -0
  92. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_world/relay_project_case.json +33 -0
  93. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_world/relay_validation_case.json +28 -0
  94. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/real_world/todo_api_case.json +24 -0
  95. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/adversarial_drift.json +12 -0
  96. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/f1a_scale_100.json +12 -0
  97. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/f1a_scale_1000.json +12 -0
  98. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/f1a_scale_10000.json +12 -0
  99. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/f1a_scale_50000.json +12 -0
  100. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/f1b_multihop_10.json +12 -0
  101. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/f1b_multihop_20.json +15 -0
  102. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/stress/f1b_multihop_50.json +18 -0
  103. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/synthetic/large_project.json +26 -0
  104. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/synthetic/medium_project.json +53 -0
  105. rationalevault-1.0.0/rationalevault/evaluation/handoff_cases/synthetic/small_project.json +26 -0
  106. rationalevault-1.0.0/rationalevault/evaluation/knowledge_cases/relay_project_case.json +89 -0
  107. rationalevault-1.0.0/rationalevault/evaluation/knowledge_cases/synthetic_small.json +31 -0
  108. rationalevault-1.0.0/rationalevault/evaluation/run_handoff_suite.py +1030 -0
  109. rationalevault-1.0.0/rationalevault/evaluation/thresholds.py +57 -0
  110. rationalevault-1.0.0/rationalevault/evaluation/validate_install.py +45 -0
  111. rationalevault-1.0.0/rationalevault/examples/__init__.py +1 -0
  112. rationalevault-1.0.0/rationalevault/examples/basic_memory.py +92 -0
  113. rationalevault-1.0.0/rationalevault/examples/knowledge_synthesis.py +96 -0
  114. rationalevault-1.0.0/rationalevault/examples/multi_agent_handoff.py +59 -0
  115. rationalevault-1.0.0/rationalevault/extraction/extractor.py +65 -0
  116. rationalevault-1.0.0/rationalevault/extraction/models.py +24 -0
  117. rationalevault-1.0.0/rationalevault/extraction/prompt.py +60 -0
  118. rationalevault-1.0.0/rationalevault/extraction/suggestor.py +85 -0
  119. rationalevault-1.0.0/rationalevault/extraction/validator.py +35 -0
  120. rationalevault-1.0.0/rationalevault/knowledge/__init__.py +1 -0
  121. rationalevault-1.0.0/rationalevault/knowledge/benchmark_schema.py +97 -0
  122. rationalevault-1.0.0/rationalevault/knowledge/context_compiler.py +413 -0
  123. rationalevault-1.0.0/rationalevault/knowledge/context_types.py +121 -0
  124. rationalevault-1.0.0/rationalevault/knowledge/evaluation.py +178 -0
  125. rationalevault-1.0.0/rationalevault/knowledge/evaluation_i5.py +269 -0
  126. rationalevault-1.0.0/rationalevault/knowledge/evaluator.py +473 -0
  127. rationalevault-1.0.0/rationalevault/knowledge/factory.py +37 -0
  128. rationalevault-1.0.0/rationalevault/knowledge/graph.py +467 -0
  129. rationalevault-1.0.0/rationalevault/knowledge/graph_evaluation.py +97 -0
  130. rationalevault-1.0.0/rationalevault/knowledge/knowledge_citation.py +177 -0
  131. rationalevault-1.0.0/rationalevault/knowledge/knowledge_retrieval.py +146 -0
  132. rationalevault-1.0.0/rationalevault/knowledge/lineage.py +124 -0
  133. rationalevault-1.0.0/rationalevault/knowledge/models.py +314 -0
  134. rationalevault-1.0.0/rationalevault/knowledge/relations.py +127 -0
  135. rationalevault-1.0.0/rationalevault/knowledge/store.py +329 -0
  136. rationalevault-1.0.0/rationalevault/knowledge/synthesizer.py +534 -0
  137. rationalevault-1.0.0/rationalevault/memory/base.py +25 -0
  138. rationalevault-1.0.0/rationalevault/memory/citation_builder.py +68 -0
  139. rationalevault-1.0.0/rationalevault/memory/compiler.py +31 -0
  140. rationalevault-1.0.0/rationalevault/memory/consolidation.py +111 -0
  141. rationalevault-1.0.0/rationalevault/memory/extractor.py +115 -0
  142. rationalevault-1.0.0/rationalevault/memory/factory.py +37 -0
  143. rationalevault-1.0.0/rationalevault/memory/lifecycle.py +55 -0
  144. rationalevault-1.0.0/rationalevault/memory/markdown_provider.py +95 -0
  145. rationalevault-1.0.0/rationalevault/memory/models.py +87 -0
  146. rationalevault-1.0.0/rationalevault/memory/query_analyzer.py +79 -0
  147. rationalevault-1.0.0/rationalevault/memory/ranking.py +83 -0
  148. rationalevault-1.0.0/rationalevault/memory/reference_tracker.py +45 -0
  149. rationalevault-1.0.0/rationalevault/memory/retrieval.py +92 -0
  150. rationalevault-1.0.0/rationalevault/memory/retrieval_audit.py +78 -0
  151. rationalevault-1.0.0/rationalevault/memory/retrieval_planner.py +128 -0
  152. rationalevault-1.0.0/rationalevault/memory/semantic_search.py +80 -0
  153. rationalevault-1.0.0/rationalevault/memory/sqlite_provider.py +175 -0
  154. rationalevault-1.0.0/rationalevault/memory/timing.py +22 -0
  155. rationalevault-1.0.0/rationalevault/schema/events.py +191 -0
  156. rationalevault-1.0.0/scripts/compile_validation.py +49 -0
  157. rationalevault-1.0.0/scripts/extract_events.py +148 -0
  158. rationalevault-1.0.0/scripts/generate_adapters.py +110 -0
  159. rationalevault-1.0.0/scripts/handoff_metrics.py +220 -0
  160. rationalevault-1.0.0/scripts/init_db.py +124 -0
  161. rationalevault-1.0.0/scripts/record_opencode_work.py +62 -0
  162. rationalevault-1.0.0/scripts/seed_demo.py +280 -0
  163. rationalevault-1.0.0/scripts/seed_validation.py +129 -0
  164. rationalevault-1.0.0/tests/conftest.py +33 -0
  165. rationalevault-1.0.0/tests/unit/__init__.py +1 -0
  166. rationalevault-1.0.0/tests/unit/test_claude_compiler.py +258 -0
  167. rationalevault-1.0.0/tests/unit/test_cognitive_head.py +308 -0
  168. rationalevault-1.0.0/tests/unit/test_context_compilers.py +735 -0
  169. rationalevault-1.0.0/tests/unit/test_context_evaluation.py +437 -0
  170. rationalevault-1.0.0/tests/unit/test_context_retrieval.py +494 -0
  171. rationalevault-1.0.0/tests/unit/test_continuity_validation.py +419 -0
  172. rationalevault-1.0.0/tests/unit/test_corpus.py +46 -0
  173. rationalevault-1.0.0/tests/unit/test_evaluation.py +98 -0
  174. rationalevault-1.0.0/tests/unit/test_event_store.py +326 -0
  175. rationalevault-1.0.0/tests/unit/test_extraction.py +106 -0
  176. rationalevault-1.0.0/tests/unit/test_graph_projection.py +251 -0
  177. rationalevault-1.0.0/tests/unit/test_integrity.py +50 -0
  178. rationalevault-1.0.0/tests/unit/test_knowledge_evaluation.py +546 -0
  179. rationalevault-1.0.0/tests/unit/test_knowledge_synthesis.py +431 -0
  180. rationalevault-1.0.0/tests/unit/test_memory_foundation.py +163 -0
  181. rationalevault-1.0.0/tests/unit/test_memory_intelligence.py +165 -0
  182. rationalevault-1.0.0/tests/unit/test_migration.py +70 -0
  183. rationalevault-1.0.0/tests/unit/test_reducers.py +361 -0
  184. rationalevault-1.0.0/tests/unit/test_release_hardening.py +58 -0
  185. rationalevault-1.0.0/tests/unit/test_retrieval_intelligence.py +154 -0
  186. rationalevault-1.0.0/tests/unit/test_sqlite_store.py +127 -0
  187. rationalevault-1.0.0/tests/unit/test_stress.py +48 -0
@@ -0,0 +1,13 @@
1
+ # RationaleVault — Environment Configuration
2
+ # Copy to .env and adjust values for your environment.
3
+
4
+ # ── PostgreSQL ────────────────────────────────────────────────────────────────
5
+ RELAY_DB_HOST=localhost
6
+ RELAY_DB_PORT=5432
7
+ RELAY_DB_NAME=relay
8
+ RELAY_DB_USER=relay
9
+ RELAY_DB_PASSWORD=relay
10
+
11
+ # ── Testing ───────────────────────────────────────────────────────────────────
12
+ # Set to "1" to run tests that require a live PostgreSQL database.
13
+ RELAY_DB_TEST_ENABLED=0
@@ -0,0 +1,9 @@
1
+ # Normalize line endings to LF in the repository
2
+ * text=auto eol=lf
3
+
4
+ # Binary files
5
+ *.whl binary
6
+ *.tar.gz binary
7
+ *.png binary
8
+ *.jpg binary
9
+ *.db binary
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve RationaleVault
4
+ title: '[BUG] '
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **Reproduction Steps**
14
+ 1. Run command '...'
15
+ 2. Code configuration '...'
16
+ 3. See error '...'
17
+
18
+ **System Diagnostics (Required)**
19
+ Please run the diagnostics tool and attach the output below:
20
+ ```bash
21
+ rationalevault doctor
22
+ ```
23
+
24
+ **Environment details:**
25
+ - OS: [e.g. macOS, Windows, Linux]
26
+ - Python version: [e.g. 3.12]
27
+ - RationaleVault version: [e.g. 1.0.0rc2]
28
+ - Database backend: [SQLite, PostgreSQL]
29
+
30
+ **Additional context**
31
+ Add any other context or logs about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea or enhancement for RationaleVault
4
+ title: '[FEATURE] '
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex: "I'm frustrated when..."
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or mockups about the feature request here.
@@ -0,0 +1,14 @@
1
+ ## Description
2
+ Provide a summary of the changes and the problem solved.
3
+
4
+ ## Related Issues
5
+ Fixes #[issue-number]
6
+
7
+ ## Verification Checklist
8
+ All submissions must pass the following release gates:
9
+
10
+ - [ ] **pytest passes**: All 283 unit and integration tests run successfully.
11
+ - [ ] **rationalevault doctor passes**: The diagnostics suite verifies database connections and projection chains.
12
+ - [ ] **rationalevault evaluate passes**: The evaluation pipeline successfully verifies exit gates.
13
+ - [ ] **Wheel build check**: `python -m build` compiles the project correctly without errors.
14
+ - [ ] **Documentation updated**: Any interface or logic changes are documented in the `docs/` folder.
@@ -0,0 +1,45 @@
1
+ name: Verify
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+
9
+ jobs:
10
+ verify:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: '3.12'
18
+ - name: Install dependencies
19
+ run: |
20
+ python -m pip install --upgrade pip
21
+ pip install build
22
+ pip install -e ".[dev]"
23
+ - name: Run pytest
24
+ run: pytest
25
+ - name: Run rationalevault doctor (editable)
26
+ run: python -m rationalevault.cli.main doctor
27
+ - name: Run rationalevault evaluate
28
+ run: python -m rationalevault.cli.main evaluate
29
+ - name: Build package wheel
30
+ run: python -m build
31
+ - name: Install from wheel
32
+ run: |
33
+ pip uninstall -y rationalevault
34
+ pip install dist/*.whl
35
+ - name: Run installed doctor (CWD-agnostic verification)
36
+ run: |
37
+ cd /tmp
38
+ rationalevault doctor
39
+ - name: Run installed evaluate (CWD-agnostic verification)
40
+ run: |
41
+ cd /tmp
42
+ rationalevault evaluate
43
+ - name: Verify release manifest version
44
+ run: |
45
+ python -c "import json; manifest = json.load(open('.rationalevault/reports/release_manifest.json')); assert manifest['rationalevault_version'] == '1.0.0', f'Invalid version: {manifest[\"rationalevault_version\"]}'; assert manifest['schema_version'] == '1.0', f'Invalid schema: {manifest[\"schema_version\"]}'"
@@ -0,0 +1,47 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ .Python
7
+ *.egg
8
+ *.egg-info/
9
+ dist/
10
+ build/
11
+ .eggs/
12
+ pip-wheel-metadata/
13
+
14
+ # Virtual environments
15
+ .venv/
16
+ venv/
17
+ env/
18
+ ENV/
19
+
20
+ # Testing
21
+ .pytest_cache/
22
+ .coverage
23
+ htmlcov/
24
+ .tox/
25
+
26
+ # Environment
27
+ .env
28
+ .env.local
29
+
30
+ # IDE
31
+ .vscode/
32
+ .idea/
33
+ *.swp
34
+ *.swo
35
+ .DS_Store
36
+
37
+ # Docker volumes (local data)
38
+ docker/postgres/data/
39
+
40
+ # RationaleVault scratch
41
+ scratch/
42
+
43
+ # RationaleVault runtime data (generated — do not commit)
44
+ .relay/
45
+ .rationalevault/
46
+ rationalevault/evaluation/reports/
47
+
@@ -0,0 +1,95 @@
1
+ # Changelog
2
+
3
+ All notable changes to RationaleVault will be documented in this file.
4
+ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+
6
+ ---
7
+
8
+ ## [1.0.0] — 2026-06-22
9
+
10
+ ### Added
11
+ - Renamed the entire project package namespace from `relay` to `rationalevault`.
12
+ - Created dual entrypoint and unified CLI binary `rationalevault` as the sole public command.
13
+ - Integrated examples directly into the package (`rationalevault.examples`) so they can be run from any CWD.
14
+
15
+ ### Fixed
16
+ - Fixed CWD-sensitive asset loading in `rationalevault doctor` and `rationalevault evaluate` by utilizing `importlib.resources` instead of relative workspace paths. This allows running active diagnostics and evaluations on arbitrary directories after wheel installation.
17
+
18
+ ---
19
+
20
+ ## [1.0.0rc2] — 2026-06-22
21
+
22
+ ### Changed
23
+ - Centralized package and schema version into `relay/__init__.py`.
24
+ - Formatted version as PEP 440-compliant `1.0.0rc2`.
25
+ - `rationalevault doctor` and `rationalevault evaluate` now both consume the central `__version__` and `SCHEMA_VERSION` constants.
26
+
27
+ ---
28
+
29
+ ## [1.0.0rc1] — 2026-06-22
30
+
31
+ ### Sprint I8 — Release Hardening
32
+ - **Unified Evaluation Framework**: Single CLI entry point (`rationalevault evaluate`) that validates Memory, Knowledge, Context, Compilers, Continuity, Graph, and Examples in a single pass.
33
+ - **Active Diagnostics**: `rationalevault doctor` checks storage connection pools, evaluation assets, compiler adapters, and runs an end-to-end **Projection Chain Verification** (Event → Memory → Knowledge → Graph → Context → Compiler).
34
+ - **Release Manifest**: Outputs a machine-readable `release_manifest.json` snapshot at `.relay/reports/release_manifest.json` and a markdown summary at `.relay/reports/report.md`.
35
+ - **Installation Validator**: `relay.evaluation.validate_install` performs critical import verification across all pipeline stages.
36
+
37
+ ### Sprint I7.5 — Knowledge Graph Projection
38
+ - **GraphProjection**: Deterministic, SHA-256-identified graph projection over all synthesized KnowledgeObjects and KnowledgeRelations.
39
+ - **Graph Evaluation**: Node coverage, edge coverage, referential integrity, determinism, orphan percentage, and connected component metrics with exit gate validation.
40
+ - **Graph Exports**: Mermaid, NetworkX, and GraphML serialization formats.
41
+ - **`rationalevault graph`** CLI subcommand: `build`, `stats`, `show`, `path`, `neighbors`.
42
+
43
+ ### Sprint I7 — Multi-Agent Continuity Validation
44
+ - **Continuity Benchmarks**: Structured benchmark schema for agent handoff verification with artifact canonical/alias matching.
45
+ - **Corpus Builder**: Automated handoff corpus generation from conversation transcripts.
46
+ - **Continuity Evaluator**: Goal recall, decision recall, task recall, context gain, and rationale recall metrics.
47
+ - **`rationalevault context`** CLI subcommand with `--evaluate` mode for continuity analysis.
48
+
49
+ ### Sprint I6–I6.5 — Agent Compiler Framework
50
+ - **Agent Compiler Registry**: Abstract compiler interface (`ContextCompilerBase`) and plugin registry for Claude, OpenCode, and Cursor adapters.
51
+ - **Claude Compiler**: Produces structured markdown with open questions, active tasks, decisions, and a resumption prompt.
52
+ - **OpenCode Compiler**: YAML-structured output optimized for structured agent contexts.
53
+ - **Cursor Compiler**: Context-aware output for IDE-integrated agents.
54
+ - **Compiler Evaluator**: Section coverage, keyword coverage, determinism, and compression ratio evaluation.
55
+
56
+ ### Sprint I5–I5.5 — Context Construction
57
+ - **Context Compiler**: Query-intent-aware profile-based slot allocation blending events, memories, and knowledge into unified `ContextPackage`.
58
+ - **Query Profiles**: `context_construction`, `knowledge_review`, `decision_audit`, `default`, `diagnostic`.
59
+ - **Retrieval Profile Planner**: Slot budget allocation across source types for each profile.
60
+ - **Context Evaluation**: Completeness, source traceability, source balance, precision, redundancy, and timing budget metrics.
61
+ - **`rationalevault context`** CLI subcommand.
62
+
63
+ ### Sprint I4–I4.5 — Knowledge Synthesis & Evaluation
64
+ - **Knowledge Synthesizer**: Derives structured `KnowledgeObject` instances (architecture principles, project invariants, implementation patterns, constraints, lessons learned) from memory records.
65
+ - **Knowledge Provider**: SQLite-backed persistent knowledge store.
66
+ - **Knowledge Evaluation**: Density, coverage, provenance percentage, contradiction detection, freshness, stability, and determinism metrics.
67
+ - **Knowledge Benchmark Schema**: Structured benchmark format for precision, semantic recall, identity recall, F1, and type coverage.
68
+ - **`rationalevault knowledge`** CLI subcommand.
69
+
70
+ ### Sprint I3–I3.5 — Retrieval Intelligence
71
+ - **Ranked Retrieval**: Multi-factor retrieval scoring (priority, recency, reference count, confidence, lifecycle penalty).
72
+ - **Query Intent Analysis**: Automatic query profiling with intent-based source weighting.
73
+ - **Citation Builder**: Structured `MemoryCitation` with full retrieval path and reason codes.
74
+ - **Retrieval Benchmarks**: Precision@K, Recall@K, NDCG, and MRR metrics with benchmark-driven evaluation.
75
+ - **`rationalevault memory search`** CLI subcommand.
76
+
77
+ ### Sprint I1–I2 — Memory Foundation & Intelligence
78
+ - **Event Ledger**: Append-only event store with SQLite and PostgreSQL backends. Events carry project ID, stream ID, type, payload, metadata, and parent linkage.
79
+ - **Event Schema**: Typed event system (`EventType` enum) covering all project lifecycle events.
80
+ - **Memory Extraction**: Deterministic `MemoryRecord` derivation from events with SHA-256-based IDs (idempotent re-extraction).
81
+ - **Memory Consolidation**: Duplicate cluster detection and consolidation candidate emission.
82
+ - **Memory Intelligence**: Reference counting, recency tracking, lifecycle status management.
83
+ - **Cognitive Head**: Append-only projection of agent task/decision/question state from the event stream.
84
+ - **`rationalevault init`**, **`rationalevault memory`**, **`rationalevault doctor`** CLI subcommands.
85
+
86
+ ---
87
+
88
+ ## [0.1.0] — 2026-06-01 (Sprint A + B + D)
89
+
90
+ ### Initial Release
91
+ - Event-sourced event store with SQLite backend.
92
+ - Basic memory extraction and consolidation scaffold.
93
+ - CLI initialization (`rationalevault init`) with YAML protocol, skill, and handoff checklist templates.
94
+ - Platform adapter installation (`rationalevault install --platform claude|cursor|opencode|copilot`).
95
+ - Docker PostgreSQL environment configuration.
@@ -0,0 +1,38 @@
1
+ # Contributing to RationaleVault
2
+
3
+ Thank you for your interest in contributing to RationaleVault!
4
+
5
+ ---
6
+
7
+ ## Architecture Freeze Rules
8
+ - We prioritize stability, documentation, and quality control.
9
+ - No new runtime capabilities or schema extensions can be introduced without a formal proposal and consensus.
10
+
11
+ ## Setting Up Your Development Environment
12
+
13
+ 1. Clone the repository and navigate to the directory:
14
+ ```bash
15
+ git clone https://github.com/your-username/RationaleVault.git
16
+ cd RationaleVault
17
+ ```
18
+ 2. Create and activate a virtual environment:
19
+ ```bash
20
+ python -m venv venv
21
+ source venv/bin/activate # On Windows: venv\Scripts\activate
22
+ ```
23
+ 3. Install dependencies in editable mode:
24
+ ```bash
25
+ pip install -e ".[dev]"
26
+ ```
27
+
28
+ ## Development Guidelines
29
+
30
+ - **Write Unit Tests**: Every bug fix or change must include corresponding unit tests in the `tests/` directory.
31
+ - **Run Quality Checks**:
32
+ Before submitting a PR, verify all components are fully functional:
33
+ ```bash
34
+ pytest
35
+ rationalevault doctor
36
+ rationalevault evaluate
37
+ ```
38
+ - **central versioning**: Respect the centralized versioning schema in `rationalevault/__init__.py`.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RationaleVault Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: rationalevault
3
+ Version: 1.0.0
4
+ Summary: RationaleVault — Event-sourced cognitive continuity and memory layer for multi-agent AI workflows
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.12
7
+ Requires-Dist: psycopg[binary]>=3.1
8
+ Requires-Dist: python-dotenv>=1.0
9
+ Provides-Extra: dev
10
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
11
+ Requires-Dist: pytest>=8.0; extra == 'dev'
12
+ Description-Content-Type: text/markdown
13
+
14
+ # RationaleVault (v1.0.0)
15
+
16
+ **Event-sourced cognitive continuity and memory layer for multi-agent AI workflows.**
17
+
18
+ RationaleVault enables any AI agent — Claude, OpenCode, ChatGPT, Cursor, Copilot — to resume work on a project with full context continuity, within 30 seconds, without manual summarization.
19
+
20
+ ---
21
+
22
+ ## Why RationaleVault Exists
23
+
24
+ LLM agents lose context. As projects evolve over weeks or months, they accumulate decisions, lessons, failures, architectural constraints, and rationale. Standard RAG tools and vector databases fail to preserve these because they lack structural temporal order, resulting in context drift, memory duplication, and decision degradation.
25
+
26
+ RationaleVault provides an event-sourced cognitive continuity layer. By treating events as the immutable source of truth and compiling memory, knowledge, and graphs as deterministic projections, RationaleVault ensures agents can reconstruct state and continue work with zero cognitive loss.
27
+
28
+ ## What RationaleVault Is Not
29
+
30
+ To understand RationaleVault, it is helpful to clarify what it is not:
31
+ - **Not a vector database**: RationaleVault uses structured keyword, domain, and profile-based slot allocation for deterministic context compilation.
32
+ - **Not a graph database**: The knowledge graph in RationaleVault is a derived view (a projection), not a storage database.
33
+ - **Not a workflow engine**: RationaleVault does not execute agent loops or handle tasks; it provides cognitive memory infrastructure.
34
+ - **Not an agent framework**: RationaleVault is agent-agnostic and interfaces via standardized compiler adapters.
35
+ - **Not a memory database**: RationaleVault is event-sourced; the immutable event ledger is the sole source of truth.
36
+
37
+ ---
38
+
39
+ ## Architecture Flow
40
+
41
+ Every layer of RationaleVault has an implementation, evaluation metrics, and validation exit gates.
42
+
43
+ ```text
44
+ Events (Ledger)
45
+
46
+ Memory Extraction (Provenance / Deduplication)
47
+
48
+ Memory Intelligence (Reference Counts / Recency)
49
+
50
+ Retrieval Intelligence (Ranking & Keywords)
51
+
52
+ Knowledge Synthesis (Synthesized Facts & Contradictions)
53
+
54
+ Knowledge Evaluation (Density & Precision Gates)
55
+
56
+ Knowledge Graph Projection (Nodes & Edge Integrity)
57
+
58
+ Context Construction (Profile Slot Allocation Blending)
59
+
60
+ Context Evaluation (Completeness & Traceability)
61
+
62
+ Agent Compilers (Prompt Serialization / Adapters)
63
+
64
+ Continuity Validation (Handoff Integrity Verification)
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Quick Start
70
+
71
+ ### 1. Install RationaleVault
72
+
73
+ Install RationaleVault in editable developer mode:
74
+ ```bash
75
+ pip install -e ".[dev]"
76
+ ```
77
+
78
+ ### 2. Verify Installation
79
+
80
+ Run the system diagnostics tool to verify that the environment, active databases, registry, and projection chains are fully functional:
81
+ ```bash
82
+ rationalevault doctor
83
+ ```
84
+
85
+ ### 3. Run the Unified Evaluation Suite
86
+
87
+ Execute the full evaluation pipeline, checking all exit gates (Memory, Knowledge, Context, Compilers, Continuity, Graph, and Examples):
88
+ ```bash
89
+ rationalevault evaluate
90
+ ```
91
+
92
+ This generates a PEP 440-compliant release manifest at `.rationalevault/reports/release_manifest.json` and a markdown summary at `.rationalevault/reports/report.md`.
93
+
94
+ ### 4. Run tests
95
+ ```bash
96
+ pytest
97
+ ```
98
+ All 283 tests will run (269 pass; 14 are skipped as they require a live PostgreSQL database connection).
99
+
100
+ ---
101
+
102
+ ## Design Principles
103
+ - **Ledger Invariance**: `event_sequence` is the only authoritative ordering key.
104
+ - **Determinism**: Same events always project to the identical memory, knowledge, and graph states.
105
+ - **Provenance Traceability**: Every context citation must trace back to original event ledger records.
106
+ - **Zero-Dependency Core**: Standard configuration runs local-first on SQLite with zero external database setup.
@@ -0,0 +1,93 @@
1
+ # RationaleVault (v1.0.0)
2
+
3
+ **Event-sourced cognitive continuity and memory layer for multi-agent AI workflows.**
4
+
5
+ RationaleVault enables any AI agent — Claude, OpenCode, ChatGPT, Cursor, Copilot — to resume work on a project with full context continuity, within 30 seconds, without manual summarization.
6
+
7
+ ---
8
+
9
+ ## Why RationaleVault Exists
10
+
11
+ LLM agents lose context. As projects evolve over weeks or months, they accumulate decisions, lessons, failures, architectural constraints, and rationale. Standard RAG tools and vector databases fail to preserve these because they lack structural temporal order, resulting in context drift, memory duplication, and decision degradation.
12
+
13
+ RationaleVault provides an event-sourced cognitive continuity layer. By treating events as the immutable source of truth and compiling memory, knowledge, and graphs as deterministic projections, RationaleVault ensures agents can reconstruct state and continue work with zero cognitive loss.
14
+
15
+ ## What RationaleVault Is Not
16
+
17
+ To understand RationaleVault, it is helpful to clarify what it is not:
18
+ - **Not a vector database**: RationaleVault uses structured keyword, domain, and profile-based slot allocation for deterministic context compilation.
19
+ - **Not a graph database**: The knowledge graph in RationaleVault is a derived view (a projection), not a storage database.
20
+ - **Not a workflow engine**: RationaleVault does not execute agent loops or handle tasks; it provides cognitive memory infrastructure.
21
+ - **Not an agent framework**: RationaleVault is agent-agnostic and interfaces via standardized compiler adapters.
22
+ - **Not a memory database**: RationaleVault is event-sourced; the immutable event ledger is the sole source of truth.
23
+
24
+ ---
25
+
26
+ ## Architecture Flow
27
+
28
+ Every layer of RationaleVault has an implementation, evaluation metrics, and validation exit gates.
29
+
30
+ ```text
31
+ Events (Ledger)
32
+
33
+ Memory Extraction (Provenance / Deduplication)
34
+
35
+ Memory Intelligence (Reference Counts / Recency)
36
+
37
+ Retrieval Intelligence (Ranking & Keywords)
38
+
39
+ Knowledge Synthesis (Synthesized Facts & Contradictions)
40
+
41
+ Knowledge Evaluation (Density & Precision Gates)
42
+
43
+ Knowledge Graph Projection (Nodes & Edge Integrity)
44
+
45
+ Context Construction (Profile Slot Allocation Blending)
46
+
47
+ Context Evaluation (Completeness & Traceability)
48
+
49
+ Agent Compilers (Prompt Serialization / Adapters)
50
+
51
+ Continuity Validation (Handoff Integrity Verification)
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Quick Start
57
+
58
+ ### 1. Install RationaleVault
59
+
60
+ Install RationaleVault in editable developer mode:
61
+ ```bash
62
+ pip install -e ".[dev]"
63
+ ```
64
+
65
+ ### 2. Verify Installation
66
+
67
+ Run the system diagnostics tool to verify that the environment, active databases, registry, and projection chains are fully functional:
68
+ ```bash
69
+ rationalevault doctor
70
+ ```
71
+
72
+ ### 3. Run the Unified Evaluation Suite
73
+
74
+ Execute the full evaluation pipeline, checking all exit gates (Memory, Knowledge, Context, Compilers, Continuity, Graph, and Examples):
75
+ ```bash
76
+ rationalevault evaluate
77
+ ```
78
+
79
+ This generates a PEP 440-compliant release manifest at `.rationalevault/reports/release_manifest.json` and a markdown summary at `.rationalevault/reports/report.md`.
80
+
81
+ ### 4. Run tests
82
+ ```bash
83
+ pytest
84
+ ```
85
+ All 283 tests will run (269 pass; 14 are skipped as they require a live PostgreSQL database connection).
86
+
87
+ ---
88
+
89
+ ## Design Principles
90
+ - **Ledger Invariance**: `event_sequence` is the only authoritative ordering key.
91
+ - **Determinism**: Same events always project to the identical memory, knowledge, and graph states.
92
+ - **Provenance Traceability**: Every context citation must trace back to original event ledger records.
93
+ - **Zero-Dependency Core**: Standard configuration runs local-first on SQLite with zero external database setup.
@@ -0,0 +1,16 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Only the latest release versions of RationaleVault are supported with security updates.
6
+
7
+ | Version | Supported |
8
+ | --- | --- |
9
+ | 1.0.x | :white_check_mark: |
10
+ | < 1.0.0 | :x: |
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ If you discover a security vulnerability in RationaleVault, please do **not** open a public issue. Instead, report the vulnerability by emailing the maintainers directly at security@example.com.
15
+
16
+ We will acknowledge receipt of your vulnerability report within 48 hours and work with you to resolve the issue before releasing details publicly.
@@ -0,0 +1,23 @@
1
+ services:
2
+ postgres:
3
+ image: postgres:17
4
+ container_name: relay_postgres
5
+ environment:
6
+ POSTGRES_DB: relay
7
+ POSTGRES_USER: relay
8
+ POSTGRES_PASSWORD: relay
9
+ ports:
10
+ - "5432:5432"
11
+ volumes:
12
+ - relay_postgres_data:/var/lib/postgresql/data
13
+ healthcheck:
14
+ test: ["CMD-SHELL", "pg_isready -U relay -d relay"]
15
+ interval: 5s
16
+ timeout: 5s
17
+ retries: 10
18
+ start_period: 10s
19
+ restart: unless-stopped
20
+
21
+ volumes:
22
+ relay_postgres_data:
23
+ name: relay_postgres_data