feat: reflect_scars tool + default execution_successful at close#16
Merged
CLCrawford-dev merged 1 commit intomainfrom Feb 21, 2026
Merged
Conversation
…ion close Close the scar enforcement gap where agents confirm scars (APPLYING) but never report outcomes, causing 80% null execution_successful in scar_usage. Option A: session_close defaults execution_successful based on confirm_scars decision (APPLYING→true, unmentioned→false). Option B: new reflect_scars tool (gitmem-rf/gm-reflect) for end-of-session OBEYED/REFUTED evidence, bridged into scar_usage with priority over defaults. Refs: OD-772 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
session_closenow defaultsexecution_successfulbased onconfirm_scarsdecision — APPLYING scars default totrue, unmentioned scars default tofalse. Fixes the 80% null rate inscar_usagerecords.reflect_scarstool (gitmem-rf/gm-reflect) for end-of-session OBEYED/REFUTED evidence with minimum evidence thresholds. Reflections are bridged intoscar_usageat close with priority over Option A defaults.Changes
src/tools/reflect-scars.tssrc/tools/session-close.tsscar_usage; defaultsexecution_successfulsrc/tools/definitions.tsgitmem-rf/gm-reflectaliasessrc/server.tssrc/services/session-state.tsaddReflections()/getReflections()src/services/metrics.tsreflect_scarsin ToolName + performance targetsrc/types/index.tsScarReflection,ReflectScarsParams,ReflectScarsResulttypesTest plan
tscclean)session_start→recall→confirm_scars→ work →reflect_scars→session_close— verifyscar_usagerecords haveexecution_successfulpopulatedreflect_scarsis NOT calledRefs: OD-772
🤖 Generated with Claude Code