Add bounded automatic lifecycle memory capture - #59
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (36)
📝 WalkthroughWalkthroughThe CLI now supports strict automatic memory capture and lifecycle hooks for Codex and Claude Code. The change adds validation, hook installation, generated guidance, plugin packaging, skills-only distribution, compatibility updates, and expanded package and acceptance tests. ChangesLifecycle capture integration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant CodexOrClaude as Codex or Claude Code
participant HookScript as Harness hook script
participant TreeRingCLI as Tree Ring CLI
participant SQLite as SQLite memory store
CodexOrClaude->>HookScript: Send lifecycle event
HookScript->>TreeRingCLI: Forward JSON to integrations hook
TreeRingCLI->>CodexOrClaude: Return recall context or capture checkpoint
CodexOrClaude->>TreeRingCLI: Submit validated capture candidate
TreeRingCLI->>SQLite: Store agent-scoped memory
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Clippy (1.97.1)Clippy execution failed Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Verification
High-level PR Summary
This PR adds native lifecycle hooks for Codex and Claude that perform bounded automatic memory capture at session and subagent start/stop events. Start hooks execute receipt-backed recall, while stop hooks enforce a single agent-mediated checkpoint allowing zero to three strict, normal-sensitivity automatic captures through a new
tree-ring capturecommand. The implementation includes lifecycle event parsing that deliberately ignores transcripts and sensitive fields, agent-scoped capture constraints that reject sensitive data and unsupported rings, updated plugin manifests bumping Tree Ring Memory to version 0.15.5, and comprehensive hook validation ensuring the lifecycle bridge never scrapes transcripts or runs background recorders.⏱️ Estimated Review Time: 1-3 hours
💡 Review Order Suggestion
README.mdCargo.tomlCargo.lockcrates/tree-ring-memory-cli/Cargo.tomlcrates/tree-ring-memory-cli/src/actions/remember.rscrates/tree-ring-memory-cli/src/activation/lifecycle.rscrates/tree-ring-memory-cli/src/activation/preflight.rscrates/tree-ring-memory-cli/src/activation/adapters.rscrates/tree-ring-memory-cli/src/activation/bridge.rscrates/tree-ring-memory-cli/src/activation/manifest.rscrates/tree-ring-memory-cli/src/activation/mod.rscrates/tree-ring-memory-cli/src/activation/launcher.rscrates/tree-ring-memory-cli/src/main.rscrates/tree-ring-memory-cli/src/agent_awareness.rscrates/tree-ring-memory-cli/tests/harness_activation_acceptance.rsplugins/tree-ring-memory/hooks/codex-hooks.jsonplugins/tree-ring-memory/hooks/codex-hook.shplugins/tree-ring-memory/hooks/claude-hooks.jsonplugins/tree-ring-memory/hooks/claude-hook.shplugins/tree-ring-memory/commands/tree-ring-capture.mdplugins/tree-ring-memory/.codex-plugin/plugin.jsonplugins/tree-ring-memory/.claude-plugin/plugin.jsonplugins/tree-ring-memory/README.mdplugins/tree-ring-memory/PRIVACY.mdplugins/tree-ring-memory/SECURITY.mdplugins/tree-ring-memory/TERMS.mdplugins/tree-ring-memory/skills/tree-ring-memory/SKILL.mdplugins/tree-ring-memory/packaging/build-codex-skills-only.pyplugins/tree-ring-memory/packaging/codex-skills-only/.codex-plugin/plugin.jsonskills/tree-ring-memory/SKILL.mddocs/integrations/agent-skill.mddocs/launch/tree-ring-memory-framework.mddocs/protocol/harness-activation.mdfixtures/harness-activation/codex.jsonfixtures/harness-activation/claude-code.json.claude-plugin/marketplace.jsonscripts/validate-plugin-packages.pySummary by CodeRabbit
tree-ring capturecommand and lifecycle hook integration command.