JAEGIS Agent File Organization System
Automated File Placement and Directory Structure Management
System Overview
🗂️ AUTOMATED FILE ORGANIZATION ARCHITECTURE
File Organization Manager
class JAEGISFileOrganizationManager:
def __init__(self):
"""
Automated file organization and deployment system for JAEGIS agents
"""
print("🗂️ JAEGIS File Organization System: INITIALIZING")
# Define JAEGIS directory structure
self.jaegis_structure = {
'base_path': 'JAEGIS-METHOD-v2.0/v2.1.0/JAEGIS/JAEGIS-METHOD/JAEGIS-agent',
'directories': {
'personas': {
'path': 'personas/',
'file_types': ['.md'],
'naming_convention': '{agent-name}.md',
'description': 'Agent personality and behavior definitions'
},
'tasks': {
'path': 'tasks/',
'file_types': ['.md'],
'naming_convention': '{task-name}.md',
'description': 'Task workflow and capability definitions'
},
'templates': {
'path': 'templates/',
'file_types': ['.md'],
'naming_convention': '{template-name}.md',
'description': 'Reusable template frameworks'
},
'checklists': {
'path': 'checklists/',
'file_types': ['.md'],
'naming_convention': '{checklist-name}.md',
'description': 'Quality assurance and validation checklists'
},
'data': {
'path': 'data/',
'file_types': ['.md', '.json', '.yaml'],
'naming_convention': '{data-name}.{extension}',
'description': 'Reference data and configuration files'
}
}
}
# Initialize file deployment system
self.deployment_system = FileDeploymentSystem(self.jaegis_structure)
print(" ✅ Directory structure mapping: LOADED")
print(" ✅ File deployment system: READY")
print(" ✅ Path resolution engine: ACTIVE")
def organize_agent_files(self, agent_generation_result):
"""
Organize and deploy all files for a generated agent
"""
print(f"🚀 Organizing files for agent: {agent_generation_result['agent_name']}")
organization_plan = self.create_organization_plan(agent_generation_result)
deployment_result = self.execute_file_deployment(organization_plan)
validation_result = self.validate_file_placement(deployment_result)
return {
'organization_successful': validation_result['all_files_placed'],
'files_deployed': deployment_result['deployed_files'],
'deployment_summary': deployment_result['summary'],
'validation_report': validation_result
}
def create_organization_plan(self, agent_generation_result):
"""
Create comprehensive file organization plan
"""
organization_plan = {
'agent_name': agent_generation_result['agent_name'],
'file_mappings': [],
'directory_operations': [],
'validation_requirements': []
}
# Map persona files
if 'persona_files' in agent_generation_result:
for persona_file in agent_generation_result['persona_files']:
file_mapping = self.create_file_mapping(
persona_file, 'personas', agent_generation_result['agent_name']
)
organization_plan['file_mappings'].append(file_mapping)
# Map task files
if 'task_files' in agent_generation_result:
for task_file in agent_generation_result['task_files']:
file_mapping = self.create_file_mapping(
task_file, 'tasks', task_file['task_name']
)
organization_plan['file_mappings'].append(file_mapping)
# Map template files
if 'template_files' in agent_generation_result:
for template_file in agent_generation_result['template_files']:
file_mapping = self.create_file_mapping(
template_file, 'templates', template_file['template_name']
)
organization_plan['file_mappings'].append(file_mapping)
# Map checklist files
if 'checklist_files' in agent_generation_result:
for checklist_file in agent_generation_result['checklist_files']:
file_mapping = self.create_file_mapping(
checklist_file, 'checklists', checklist_file['checklist_name']
)
organization_plan['file_mappings'].append(file_mapping)
# Map data files
if 'data_files' in agent_generation_result:
for data_file in agent_generation_result['data_files']:
file_mapping = self.create_file_mapping(
data_file, 'data', data_file['data_name']
)
organization_plan['file_mappings'].append(file_mapping)
return organization_plan
def create_file_mapping(self, file_data, directory_type, file_identifier):
"""
Create individual file mapping with path resolution
"""
directory_config = self.jaegis_structure['directories'][directory_type]
# Generate target filename
if directory_type == 'personas':
target_filename = f"{file_identifier.lower().replace(' ', '-')}.md"
elif directory_type == 'tasks':
target_filename = f"{file_identifier.lower().replace(' ', '-')}.md"
elif directory_type == 'templates':
target_filename = f"{file_identifier.lower().replace(' ', '-')}-template.md"
elif directory_type == 'checklists':
target_filename = f"{file_identifier.lower().replace(' ', '-')}-checklist.md"
elif directory_type == 'data':
extension = file_data.get('file_extension', 'md')
target_filename = f"{file_identifier.lower().replace(' ', '-')}.{extension}"
# Create full target path
target_path = os.path.join(
self.jaegis_structure['base_path'],
directory_config['path'],
target_filename
)
return {
'source_content': file_data['content'],
'target_path': target_path,
'target_filename': target_filename,
'directory_type': directory_type,
'file_identifier': file_identifier,
'content_length': len(file_data['content']),
'deployment_priority': self.get_deployment_priority(directory_type)
}
def get_deployment_priority(self, directory_type):
"""
Get deployment priority for different file types
"""
priority_map = {
'personas': 1, # Deploy personas first
'tasks': 2, # Then tasks
'templates': 3, # Then templates
'checklists': 4, # Then checklists
'data': 5 # Finally data files
}
return priority_map.get(directory_type, 10)File Deployment System
Path Resolution Engine
🔧 INTEGRATION WITH AGENT BUILDER ENHANCEMENT SQUAD
Enhanced Workflow Orchestrator Agent Integration
Automated Directory Structure Creation
File Validation and Quality Assurance
PreviousJAEGIS Agent Activation Logic System ImplementationNextJAEGIS Agent Squad Auto-Loading System
Last updated