Complete implementation of the agent distribution framework including: CORE INFRASTRUCTURE: - AgentRegistry: Agent discovery, categorization, and dependency management - AgentInstaller: Agent installation, updates, and removal with safety measures - ProjectInitializer: Template-based project initialization with agent integration - CLI Tool: Comprehensive kaizen-agentic command-line interface DISTRIBUTION FEATURES: - Python package distribution with console script entry point - Agent categorization (project-management, development-process, code-quality, etc.) - Project templates (python-basic, python-web, python-cli, python-data, comprehensive) - Dependency resolution and validation - Idempotent operations with backup and rollback support CLI COMMANDS: - kaizen-agentic init: Initialize new projects with agents - kaizen-agentic install/update/remove: Manage agents in existing projects - kaizen-agentic list/status/validate: Discovery and maintenance - kaizen-agentic templates: Project template management INTEGRATION & DOCUMENTATION: - Makefile targets for agent management (list-agents, update-agents, etc.) - Automatic Claude Code configuration updates (CLAUDE.md) - Comprehensive documentation (GETTING_STARTED, AGENT_DISTRIBUTION, CLI_CHEAT_SHEET) - Multi-language build system integration examples - Complete test coverage for all components PACKAGE STRUCTURE: - Console script: kaizen-agentic command available globally - Package data: All agents included for distribution - Dependencies: click, pyyaml for CLI and parsing - Testing: Comprehensive test suite for registry and installer This enables sharing specialized AI agents across projects with easy installation, updates, and management through both CLI and integrated Makefile targets. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
9.7 KiB
Agent Distribution Guide
This guide explains how to use the Kaizen Agentic agent distribution system to share specialized agents across projects.
Overview
The Kaizen Agentic framework provides a comprehensive system for distributing and managing AI agents across multiple projects. This enables:
- Reusable Agents: Share specialized agents between projects
- Consistent Workflows: Maintain the same development patterns across teams
- Easy Updates: Update agents across all projects from a central registry
- Template-Based Initialization: Start new projects with predefined agent collections
Installation
Install the Kaizen Agentic package:
pip install kaizen-agentic
This provides the kaizen-agentic CLI tool for managing agents.
CLI Commands
List Available Agents
# List all available agents
kaizen-agentic list
# List agents by category
kaizen-agentic list --category project-management
# List with detailed information
kaizen-agentic list --verbose
Initialize New Projects
# Initialize with default Python template
kaizen-agentic init my-project
# Use specific template
kaizen-agentic init web-app --template python-web
# Use custom agent selection
kaizen-agentic init data-project --agents todo-keeper,datamodel-optimization,testing-efficiency
# Initialize in specific directory
kaizen-agentic init my-project --parent-dir ~/projects
Install Agents in Existing Projects
# Install specific agents
kaizen-agentic install todo-keeper changelog-keeper
# Install to specific directory
kaizen-agentic install tdd-workflow --target ~/my-project
# Install without backup
kaizen-agentic install code-refactoring --no-backup
# Install without updating documentation
kaizen-agentic install testing-efficiency --no-docs
Manage Installed Agents
# List installed agents
kaizen-agentic status
# Update all installed agents
kaizen-agentic update
# Update specific agents
kaizen-agentic update todo-keeper changelog-keeper
# Remove agents
kaizen-agentic remove old-agent-name
# Validate agents
kaizen-agentic validate
Project Templates
# List available templates
kaizen-agentic templates
# Available templates:
# - python-basic: Basic Python project setup
# - python-web: Web application development
# - python-cli: Command-line tool development
# - python-data: Data science and analysis
# - comprehensive: All available agents
Project Structure
When you install agents, they're organized in your project as follows:
my-project/
├── agents/ # Installed agent definitions
│ ├── agent-todo-keeper.md
│ ├── agent-changelog-keeper.md
│ └── agent-tdd-workflow.md
├── src/
├── tests/
├── CLAUDE.md # Updated with agent information
├── Makefile # Enhanced with agent targets
└── pyproject.toml
Agent Categories
Agents are organized into categories for easy discovery:
Project Management
todo-keeper: Manages TODO.md files following Keep a Todofile formatchangelog-keeper: Maintains CHANGELOG.md files following Keep a Changelog formatcontributing-keeper: Creates and updates CONTRIBUTING.md filesproject-assistant: General project management and coordination
Development Process
tdd-workflow: Test-driven development workflow guidancerequirements-engineering: Requirements analysis and documentationtest-maintenance: Test suite maintenance and optimizationpriority-evaluation: Feature and task prioritization
Code Quality
code-refactoring: Code improvement and refactoring guidanceagent-optimization: Agent definition optimization and improvementdatamodel-optimization: Data model design and optimizationtooling-optimization: Development tool configuration and optimization
Infrastructure
setup-repository: Repository initialization and standards complianceclaude-documentation: Claude Code configuration and documentationtesting-efficiency: Testing infrastructure optimizationwisdom-encouragement: Development philosophy and best practices
Usage Patterns
New Project Setup
-
Initialize Project:
kaizen-agentic init my-web-app --template python-web cd my-web-app -
Set Up Development Environment:
make setup-complete source .venv/bin/activate -
Start Development:
make test # Run tests make lint # Check code quality make format # Format code
Adding Agents to Existing Project
-
Install Needed Agents:
kaizen-agentic install todo-keeper changelog-keeper -
Verify Installation:
kaizen-agentic status kaizen-agentic validate -
Use Agents:
- Reference agents in Claude Code conversations
- Use agent-specific Makefile targets
- Follow agent-guided workflows
Maintaining Agent Updates
-
Check for Updates:
kaizen-agentic status -
Update All Agents:
kaizen-agentic update -
Validate After Update:
kaizen-agentic validate
Integration with Development Tools
Claude Code Integration
Agents automatically integrate with Claude Code:
- CLAUDE.md: Updated with agent descriptions and usage
- Agent References: Use agents by name in Claude conversations
- Workflow Integration: Agents guide Claude Code interactions
Makefile Integration
The CLI automatically adds agent management targets:
make list-agents # List installed agents
make update-agents # Update to latest versions
make validate-agents # Validate agent definitions
Documentation Integration
Agents automatically update project documentation:
- README.md: Enhanced with agent information
- CONTRIBUTING.md: Updated with agent-assisted workflows
- CLAUDE.md: Complete agent catalog and usage instructions
Advanced Usage
Custom Agent Templates
Create custom templates by modifying the registry:
from kaizen_agentic import AgentRegistry
registry = AgentRegistry("path/to/agents")
# Add custom template
custom_template = {
"my-template": [
"todo-keeper",
"custom-agent",
"code-refactoring"
]
}
templates = registry.get_agent_templates()
templates.update(custom_template)
Programmatic Agent Management
Use the Python API for custom integrations:
from kaizen_agentic import AgentInstaller, AgentRegistry, InstallationConfig
from pathlib import Path
# Set up registry and installer
registry = AgentRegistry("agents/")
installer = AgentInstaller(registry)
# Configure installation
config = InstallationConfig(
target_dir=Path("my-project"),
claude_config_path=Path("my-project/CLAUDE.md"),
update_docs=True
)
# Install agents
results = installer.install_agents(["todo-keeper", "tdd-workflow"], config)
Agent Development
Create new agents by following the standard format:
---
name: my-custom-agent
description: Custom agent for specific needs
model: inherit
---
# My Custom Agent
## Instructions
[Agent instructions and capabilities]
## Authority and Scope
[What the agent can and cannot do]
## Response Guidelines
[How the agent should respond and behave]
Best Practices
Agent Selection
- Start Small: Begin with basic agents (todo-keeper, changelog-keeper)
- Add Gradually: Introduce more specialized agents as needed
- Match Project Type: Use appropriate templates for your project type
- Consider Dependencies: Let the system resolve agent dependencies
Maintenance
- Regular Updates: Update agents monthly or before major releases
- Validation: Always validate after updates or changes
- Backup: Keep backups when experimenting with new agents
- Documentation: Keep CLAUDE.md and project docs updated
Team Coordination
- Shared Templates: Agree on standard templates for your team
- Agent Standards: Establish which agents are required/optional
- Update Schedules: Coordinate agent updates across team projects
- Training: Ensure team members understand agent capabilities
Troubleshooting
Common Issues
Agent Not Found:
# Check available agents
kaizen-agentic list
# Validate registry
kaizen-agentic validate
Installation Failures:
# Check target directory permissions
# Verify agent file integrity
kaizen-agentic validate --target /path/to/project
Update Problems:
# Force reinstall
kaizen-agentic remove problematic-agent
kaizen-agentic install problematic-agent
Getting Help
- Validate Configuration: Use
kaizen-agentic validate - Check Status: Use
kaizen-agentic status - Review Logs: Check command output for error details
- Community Support: Refer to project documentation and issues
Migration Guide
From Manual Agent Management
If you're currently managing agents manually:
-
Inventory Current Agents:
ls agents/agent-*.md -
Install Package:
pip install kaizen-agentic -
Validate Current Setup:
kaizen-agentic validate -
Update to Standard Agents:
kaizen-agentic update
Between Versions
When updating Kaizen Agentic versions:
-
Backup Current Agents:
cp -r agents/ agents_backup/ -
Update Package:
pip install --upgrade kaizen-agentic -
Update Agents:
kaizen-agentic update -
Validate:
kaizen-agentic validate
This distribution system makes it easy to share and maintain consistent development workflows across all your projects using specialized AI agents.