feat(capture): passive answer-memory for sessions - #489
Merged
Conversation
wire the session path into phase-d's receipt-gated auto-approve (#485) so the zero-friction loop runs end to end: ask a question in one session and the answer is saved with no human; a fresh session recalls it from memory without re-reading the project files. a new claude-code Stop hook runs `vouch capture answer`. capture.last_exchange pulls the turn's (question, answer) from the transcript; the answer is ingested as a content-addressed source; extract.extract_receipt_claims files a receipt-backed claim per quotable span; and each is self-approved only where proposals.approve already allows it (review.approver_role: trusted-agent or review.auto_approve_on_receipt, whose receipts verify by construction). with neither opt-in the claims stay pending — the review gate is honoured, never bypassed, and no parallel write path is added. quiet and idempotent by design: answers below a length floor (acknowledgements) are skipped, and an answer already ingested (same bytes) is not re-captured, so the every-turn Stop hook never duplicates or floods the kb. selection stays coarse — one claim per sentence, same stance as #485 — a later quality knob. the existing tool-activity page capture is untouched.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
makes the zero-friction memory loop run end to end: ask a question in one
session and the answer is saved with no human; a fresh session recalls it from
memory without re-reading the project files.
builds directly on #485 (phase-d receipt-gated auto-approve +
vouch ingest).the read path (
recall,context-hook) and the auto-approve path alreadyexisted — the only missing link was a passive session trigger, which this adds.
what changed
Stophook →vouch capture answer.capture.last_exchange(transcript_path)— pure extraction of the turn's(question, answer), same host-wrapper filtering as
first_user_prompt.capture.capture_answer(...)— ingests the answer as a content-addressedsource, files a receipt-backed claim per quotable span via
extract.extract_receipt_claims, and self-approves only whatproposals.approvealready allows (review.approver_role: trusted-agentorreview.auto_approve_on_receipt, whose receipts verify by construction).with neither opt-in the claims stay pending — no parallel write path, the
review gate holds.
acknowledgements skipped), so the every-turn Stop hook never duplicates or
floods the kb.
verification
drove the real two-session flow through the cli, not just unit tests: session 1
vouch capture answer→ 4 claims filed, 4 auto-approved, 0 pending;fresh-process
recall+context-hookinject the roadmap answer with 0 toolcalls. probes: re-fire → already-captured, short answer → answer-too-short. 12
new unit tests; full pytest + mypy + ruff green.
known limit
selection is coarse — one claim per sentence, same stance as #485. bounded by a
length floor and max-claims; smarter selection is a follow-up quality knob.