Add agent plugins documentation and registration system#5
Merged
Conversation
- Add comprehensive AGENT_PLUGINS.md with guide for creating plugins - Support external plugins via pip packages (entry points) and config file - Add `agentgit agents add/list/remove` CLI commands for plugin management - Update terminology from "format plugins" to "agent plugins" - Plugins can be registered via: - pip install (entry points auto-discovered) - ~/.config/agentgit/plugins.json config file - agentgit agents add command
btucker
commented
Dec 31, 2025
| - `agentgit_extract_operations(transcript)` - Extract `FileOperation` list | ||
| - `agentgit_enrich_operation(operation, transcript)` - Add prompt/context metadata | ||
| - `agentgit_discover_transcripts(project_path)` - Find transcripts for a project | ||
| - `agentgit_get_project_name(transcript_path)` - Decode project name from transcript location |
src/agentgit/cli.py
Outdated
|
|
||
| @agents.command("add") | ||
| @click.argument("plugin_spec") | ||
| def agents_add(plugin_spec: str) -> None: |
Owner
Author
There was a problem hiding this comment.
@claude The way I think this should work is you should pass a pip module & then it should install it with uv/pip
- `agentgit agents add <package>` now installs via uv/pip - `agentgit agents remove <package>` now uninstalls via uv/pip - Plugin packages tracked in ~/.agentgit/plugins.json - Entry points auto-discovered from installed packages - Prefers uv if available, falls back to pip
- Add documentation for enhancement hooks (turn_summary, prompt_summary, curate_turn_context) - Add claude_code_web to built-in plugins list - Add rules and llm enhancer plugins to built-in list - Update hooks table with enhancer plugin hooks
- Update test_cli.py: Use 'sessions' command instead of renamed 'discover' - Update test_claude_code.py: Use extract_deleted_paths from utils module - Update test_repo_id.py: Disable GPG signing for test commits - Remove duplicate 'test_repo_id 2.py' file (accidental copy)
Tests cover: - Plugin config read/write (get_plugins_config, save_plugins_config) - Pip/uv command selection (get_pip_command) - Package install/uninstall (install_plugin_package, uninstall_plugin_package) - Add/remove plugin workflow (add_plugin, remove_plugin) - Plugin listing (list_configured_plugins, list_installed_packages) - Entry point loading with error handling - Plugin manager reset functionality Coverage for plugins.py improved from 59% to 91%.
The workflow now: 1. Generates XML coverage report during tests 2. On PRs, compares coverage against the base branch 3. Fails if coverage drops below the base branch 4. Comments on the PR with coverage status This ensures PRs maintain or improve test coverage.
Coverage Report✅ Coverage: 80.12% (0.01%) |
The entry points documentation is already covered in AGENT_PLUGINS.md.
Coverage Report✅ Coverage: 80.12% (0.01%) |
- Change configuration format from JSON to YAML (~/.agentgit/config.yml) - Add PyYAML dependency - Restructure CLI: agentgit config agents instead of agentgit agents - Update plugins.py with get_config/save_config for root config management - Update all tests for new config format and CLI structure - Update documentation in AGENT_PLUGINS.md and CLAUDE.md
Coverage Report✅ Coverage: 80.19% (0.08%) |
- Create new settings.py module for global config management - Move CONFIG_PATH, get_config(), save_config() to settings.py - Keep plugin-specific get_plugins_config/save_plugins_config in plugins.py - Update tests to import config functions from settings module
Coverage Report✅ Coverage: 80.22% (0.11%) |
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.
agentgit agents add/list/removeCLI commands for plugin management