Skip to content

feat(plugin): wire auto-learning pattern detector into stop hook#937

Merged
JeremyDev87 merged 1 commit intomasterfrom
feat/auto-learning-stop-hook-929
Mar 25, 2026
Merged

feat(plugin): wire auto-learning pattern detector into stop hook#937
JeremyDev87 merged 1 commit intomasterfrom
feat/auto-learning-stop-hook-929

Conversation

@JeremyDev87
Copy link
Owner

Summary

  • Wire PatternDetector and RuleSuggester into the Stop hook to activate dead auto-learning code
  • After stats finalize, detect repeated failure patterns from HistoryDB and generate rule suggestions
  • Append suggestions to systemMessage so users see actionable guidance at session end
  • All analysis wrapped in try/except to never block session stop

Test plan

  • test_suggestions_included_in_summary — verifies suggestions appear in systemMessage
  • test_no_suggestions_when_no_patterns — verifies no suggestions section when no patterns
  • test_analysis_failure_does_not_block_stop — verifies hook exits cleanly on analysis error
  • Full test suite: 143 passed, 0 failed
  • CI checks: lint, format, typecheck, test:coverage, circular, build — all passed

Closes #929

- Call PatternDetector.detect_patterns() after stats finalize in stop hook
- Pass detected patterns to RuleSuggester.suggest_rules() for draft rules
- Append suggestions to systemMessage so users see them at session end
- Wrap all analysis in try/except to never block session stop
- Add integration tests for suggestions, no-patterns, and failure cases

Closes #929
@vercel
Copy link

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Mar 25, 2026 4:30am

@JeremyDev87 JeremyDev87 self-assigned this Mar 25, 2026
@JeremyDev87 JeremyDev87 merged commit 9c660c3 into master Mar 25, 2026
25 checks passed
@JeremyDev87 JeremyDev87 deleted the feat/auto-learning-stop-hook-929 branch March 25, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Wire auto-learning pattern detector into Stop hook

1 participant