feat: agent-learner v2 Phase 2 — adapter rewrite + bootstrap CLI#4
Merged
cafitac merged 3 commits intofeature/agent-learner-v2-corefrom Apr 27, 2026
Merged
Conversation
- Add .gitignore for runtime dirs (.agent-learner/, .codex/, .hermit/) - Add hermit adapter: install_hermit_hooks() (OnStop hook) + emit_session_event() - Refactor claude adapter: add install_claude_hooks() (lightweight Stop hook) - Refactor codex adapter: add install_codex_hooks() (lightweight Stop hook) - Update bootstrap CLI: auto-detect harnesses via --adapters auto, restore default to codex,claude for backward compat - 24 new tests (hermit/claude/codex adapter + bootstrap), 150 total passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 'hermit' to choices for capture-event, process-events, review-candidates --adapter - Add 'process' as alias for 'process-events' command (adapters use agent-learner process) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add common.upsert_hook() and is_agent_learner_hook() shared by all adapters - Remove ~60 lines of duplicated hook upsert logic across hermit/claude/codex adapters - Remove _is_agent_learner_hook duplicate (3 identical copies → common.py) - Remove dead scope param from _hermit_settings_path, inline one-shot helper - Remove mid-file import json as _json from codex.py - Replace defensive getattr(args, hermit_scope) with direct args.hermit_scope 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
.gitignorefor runtime dirs (.agent-learner/,.codex/,.hermit/)adapters/hermit.py:install_hermit_hooks()(OnStop hook) +emit_session_event()adapters/claude.py: add lightweightinstall_claude_hooks()(Stop hook, preserves existing heavy installer)adapters/codex.py: add lightweightinstall_codex_hooks()(Stop hook, preserves existing heavy installer)--adapters autofor harness auto-detection; default restored tocodex,claudefor backward compatTest plan
Next
Phase 3: Hermit integration —
HookEvent.ON_STOP+ AgentSession wiring +agent-learned.mdinjection (hermit-agent repo)🤖 Generated with Claude Code