feat: agent-learner v2 Phase 1 — core implementation#3
Merged
Conversation
- Add ModelPerf dataclass + v2 fields to LearningRule (success_count, fail_count, needs_review, verify_cmd, model_performance, harness) - Add LearnerLLM protocol + ConfiguredLearnerLLM with timeout enforcement - Add AutoLearningPipeline: session processing, model-aware performance tracking, auto-promote, auto-deprecation - Add fanout.py: agent-learned.md generation + inject_dirs fan-out with thread lock and skip-on-identical - Add adapter/harness filter to RetrievalRequest + retrieve_rules - 47 new tests, 126 total passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…iew, verify_cmd) in lifecycle.py Without this, rules lose harness tagging after index rebuild, causing adapter-filtered retrieval to silently fall back to universal for all rules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Inline _fanout_inner into fanout_agent_learned (single call site) - Remove unused asdict import in pipeline_auto.py - Remove redundant Path() wrapping in llm.py (already Path) - Fix type annotations: should_inject_rule/score_rule accept RuleIndexEntry - Simplify _build_prompt failure branch (direct string concat) - Fix PEP 8 blank line spacing in retrieval.py Co-Authored-By: Claude Sonnet 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
ModelPerfdataclass + v2 performance tracking fields toLearningRule(success_count, fail_count, needs_review, verify_cmd, model_performance, harness)LearnerLLMprotocol +ConfiguredLearnerLLMwith config loading and timeout enforcementAutoLearningPipeline: session processing, model-aware performance tracking, auto-promote, auto-deprecationfanout.py:agent-learned.mdgeneration + inject_dirs fan-out with thread lock and skip-on-identicaladapter/harness filter toRetrievalRequest+retrieve_rulesTest plan
Next
Phase 2: adapter rewrite (Hermit/Claude/Codex Stop hook installation + bootstrap CLI)
🤖 Generated with Claude Code