Skip to content

feat(learnings): add learn auto-extract for session transcripts#719

Merged
AlexMikhalev merged 1 commit intomainfrom
task/89-auto-extract
Mar 26, 2026
Merged

feat(learnings): add learn auto-extract for session transcripts#719
AlexMikhalev merged 1 commit intomainfrom
task/89-auto-extract

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

  • Adds auto_extract_corrections() function to capture.rs for pattern-based correction extraction
  • Detects failed bash commands followed by successful variants in JSONL session transcripts
  • Detects explicit correction phrases ("instead use", "should be", "correct way", etc.)
  • New CLI subcommand: learn auto-extract <transcript-path> with optional --save flag
  • Unit tests for extraction patterns

Test plan

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo fmt --all --check passes
  • cargo test --workspace passes
  • Manual test: run against a real session JSONL file

Refs #89

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

…transcripts

Implements automatic extraction of corrections from JSONL session transcripts:

- Add auto_extract_corrections() function that scans JSONL files
- Detects failed Bash commands followed by successful variants
- Identifies explicit correction phrases: 'instead use', 'should be',
  'correct way', 'use X not Y'
- Add CLI subcommand 'learn auto-extract <transcript-path>' with --save flag
- Export auto_extract_corrections in learnings/mod.rs
- Add comprehensive unit tests for pattern detection

Refs #89
@AlexMikhalev AlexMikhalev merged commit 08b21b3 into main Mar 26, 2026
18 of 22 checks passed
@AlexMikhalev AlexMikhalev deleted the task/89-auto-extract branch March 26, 2026 14:05
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.

1 participant