From c5bad996a72ccb9fad4964095a96472d446f91a0 Mon Sep 17 00:00:00 2001 From: Anto01 Date: Sat, 11 Apr 2026 10:58:56 -0400 Subject: [PATCH] feat: enable reinforcement on live capture The Stop hook now sends reinforce=true so the token-overlap matcher runs on every captured interaction. Memory confidence will accumulate signal from organic Claude Code use. Co-Authored-By: Claude Opus 4.6 --- deploy/hooks/capture_stop.py | 4 ++-- tests/test_capture_stop.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/hooks/capture_stop.py b/deploy/hooks/capture_stop.py index 5661681..0cd3877 100644 --- a/deploy/hooks/capture_stop.py +++ b/deploy/hooks/capture_stop.py @@ -3,7 +3,7 @@ Reads the Stop hook JSON from stdin, extracts the last user prompt from the transcript JSONL, and POSTs to the AtoCore /interactions -endpoint in conservative mode (reinforce=false, no extraction). +endpoint with reinforcement enabled (no extraction). Fail-open: always exits 0, logs errors to stderr only. @@ -81,7 +81,7 @@ def _capture() -> None: "client": "claude-code", "session_id": session_id, "project": project, - "reinforce": False, + "reinforce": True, } body = json.dumps(payload, ensure_ascii=True).encode("utf-8") diff --git a/tests/test_capture_stop.py b/tests/test_capture_stop.py index 2fcd481..3fbf375 100644 --- a/tests/test_capture_stop.py +++ b/tests/test_capture_stop.py @@ -183,7 +183,7 @@ class TestCapture: assert body["prompt"] == "Please explain how the backup system works in detail" assert body["client"] == "claude-code" assert body["session_id"] == "test-session-123" - assert body["reinforce"] is False + assert body["reinforce"] is True @mock.patch("capture_stop.urllib.request.urlopen") def test_skips_when_disabled(self, mock_urlopen, tmp_path):