feat: add MineRatings.ts and ReflectionCapture hook — learning pipeline#735
Closed
nbost130 wants to merge 2 commits intodanielmiessler:mainfrom
Closed
feat: add MineRatings.ts and ReflectionCapture hook — learning pipeline#735nbost130 wants to merge 2 commits intodanielmiessler:mainfrom
nbost130 wants to merge 2 commits intodanielmiessler:mainfrom
Conversation
Reads implicit/explicit rating data from RatingCapture hook, clusters low/high ratings, uses Haiku inference to extract actionable patterns, and generates draft steering rules in Statement/Bad/Correct format. Features: - High-water-mark tracking (only analyzes new ratings by default) - Draft steering rule auto-generation from patterns - Failure capture enrichment for low ratings - --all, --dry-run, --since N flags Co-Authored-By: Claude <noreply@anthropic.com>
…tions SessionEnd hook that scans transcripts for Algorithm LEARN phase content (Q1/Q2/Q3 reflections and LEARNING line), writing structured JSONL to algorithm-reflections.jsonl. Feeds MineReflections downstream analysis. - Extracts Q1 (Self), Q2 (Algorithm), Q3 (AI) reflection fields - Supports both "Q1 (Self):" and "Q1 — Self:" output formats - Deduplicates by session_id to prevent double writes - Reads AlgorithmTracker state for criteria counts and effort level - Tested against real transcripts with verified extraction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks
4 tasks
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
Two additions that complete the PAI learning feedback pipeline: automated rating mining and automated LEARN phase reflection capture.
1.
Tools/MineRatings.ts— Rating Pattern ExtractionNew Bun CLI tool that mines
ratings.jsonl+ failure captures for actionable behavioral patterns. Closes the feedback loop between rating capture and corrective action.RatingCapture.hook.ts2.
ReflectionCapture.hook.ts— Auto-Capture LEARN ReflectionsNew SessionEnd hook that scans transcripts for Algorithm LEARN phase content and writes structured JSONL to
algorithm-reflections.jsonl, feeding MineReflections downstream analysis.**Q1 (Self):**andQ1 — Self:output formatsPipeline Flow
Test plan
--dry-runmode verified against real ratings data🤖 Generated with Claude Code