Overview
Implement a plugin-based architecture for the initialization workflow to allow extensibility without modifying core code.
Current Limitations
- Adding new init features requires modifying
init_project.py
- Hard to customize init workflow per project
- Tight coupling between init phases
- Users can't add custom init steps
Proposed Architecture
Plugin Interface
class InitPlugin(ABC):
@property
def name(self) -> str:
"""Plugin name"""
pass
@property
def phase(self) -> str:
"""Init phase (validate, detect, populate, generate, verify)"""
pass
@property
def dependencies(self) -> List[str]:
"""Required plugins that must run first"""
pass
def execute(self, context: InitContext) -> InitResult:
"""Execute plugin logic"""
pass
Built-in Plugins
config-validator - Validate configuration files
tech-stack-detector - Detect languages, frameworks, libraries
context7-cache-populator - Pre-populate documentation cache
expert-generator - Auto-generate experts from knowledge
project-structure-validator - Validate directory structure
Plugin Registration
# In init_project.py
orchestrator = InitOrchestrator(project_root)
orchestrator.register_plugin(ConfigValidatorPlugin())
orchestrator.register_plugin(TechStackDetectorPlugin())
orchestrator.register_plugin(ExpertGeneratorPlugin())
result = orchestrator.run()
User Custom Plugins
# In .tapps-agents/plugins/custom_init.py
class CustomInitPlugin(InitPlugin):
name = "custom-setup"
phase = "generate"
dependencies = ["tech-stack-detector"]
def execute(self, context):
# Custom init logic
return InitResult(success=True)
Benefits
- Extensibility - Add new features without modifying core
- Customization - Users can add project-specific init steps
- Testability - Each plugin is independently testable
- Dependency Management - Clear plugin dependencies
- Reusability - Plugins can be shared across projects
Implementation Plan
- Define
InitPlugin base class
- Define
InitContext and InitResult classes
- Create
InitOrchestrator for plugin execution
- Convert existing init steps to plugins
- Add plugin discovery mechanism
- Support user-defined plugins
- Add configuration for enabling/disabling plugins
- Add documentation and examples
Configuration Example
# .tapps-agents/init-config.yaml
init:
plugins:
- name: config-validator
enabled: true
- name: tech-stack-detector
enabled: true
- name: expert-generator
enabled: ${AUTO_EXPERTS}
- name: custom-setup
enabled: true
path: .tapps-agents/plugins/custom_init.py
Success Criteria
Dependencies
Priority
Medium - Valuable for extensibility, implement after basic refactoring.
Overview
Implement a plugin-based architecture for the initialization workflow to allow extensibility without modifying core code.
Current Limitations
init_project.pyProposed Architecture
Plugin Interface
Built-in Plugins
config-validator- Validate configuration filestech-stack-detector- Detect languages, frameworks, librariescontext7-cache-populator- Pre-populate documentation cacheexpert-generator- Auto-generate experts from knowledgeproject-structure-validator- Validate directory structurePlugin Registration
User Custom Plugins
Benefits
Implementation Plan
InitPluginbase classInitContextandInitResultclassesInitOrchestratorfor plugin executionConfiguration Example
Success Criteria
Dependencies
Priority
Medium - Valuable for extensibility, implement after basic refactoring.