Skip to content

feat: knowledge-retrieval detection + init wizard UserPromptSubmit fix#17

Merged
CLCrawford-dev merged 2 commits intomainfrom
feat/knowledge-retrieval-hook
Feb 21, 2026
Merged

feat: knowledge-retrieval detection + init wizard UserPromptSubmit fix#17
CLCrawford-dev merged 2 commits intomainfrom
feat/knowledge-retrieval-hook

Conversation

@nTEG-dev
Copy link
Member

Summary

  • Adds Priority 0 knowledge-retrieval detection to auto-retrieve-hook.sh — routes "what's our process for X" / "recall how we handle Y" queries through GitMem search instead of passive scar injection
  • Fixes buildClaudeHooks() in init-wizard.js missing UserPromptSubmit event (plugin users had it via hooks.json, init wizard users did not)
  • Updates stale EXPECTED_TOOL_COUNTS in smoke tests (free 21→22, pro 26→27, dev 30→31) — drifted after archive_learning was ungated for free tier and graph_traverse was added

Test plan

  • 30-case ad-hoc hook classification test (13 route, 14 no_route, 3 edge)
  • Unit tests: 865/865 pass
  • Hook bash integration: 32/32 pass
  • Integration tests: 63/63 pass
  • Smoke-free: 4/4 pass (was 3/4 before tool count fix)
  • Init wizard dry-run: UserPromptSubmit present in generated settings
  • hooks.json ↔ buildClaudeHooks parity: 5/5 events match

🤖 Generated with Claude Code

Claude and others added 2 commits February 21, 2026 11:54
…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>
Routes institutional-memory queries ("what's our process for X",
"recall how we handle Y") through GitMem search instead of passive
scar injection. Fixes UserPromptSubmit missing from init wizard's
buildClaudeHooks(). Updates stale EXPECTED_TOOL_COUNTS (free 21→22,
pro 26→27, dev 30→31).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLCrawford-dev CLCrawford-dev merged commit a97ca34 into main Feb 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants