Exportable AI-augmented research infrastructure for reproducible research projects
This system provides a portable, modular AI support infrastructure designed for mixed-language research repositories (R, Python, etc.). It separates AI support functionality from core research reproducibility, enabling easy migration between projects while maintaining scientific rigor.
- Storage/Logic Separation: Memory artifacts remain project-specific; memory logic is portable
- Minimal Target Disruption: Light integration with existing
config.yml,flow.R, and VSCode configurations - Mandatory Assessment: Built-in migration impact analysis prevents disruption
- Component Modularity: Export only the components you need (personas, memory, tasks, etc.)
Location: personas/
Priority: Highest
Exportable: ✅
Specialized AI personas for different research roles:
developer.md- Backend systems and reproducible infrastructureproject_manager.md- Strategic oversight and coordinationcasenote_analyst.md- Domain-specific case note analysisdata_engineer.md- Data pipeline architectureresearch_scientist.md- Scientific methodology and analysis- And 7 more specialized personas...
Integration Points:
.github/copilot-instructions.md(dynamic context switching).copilot-persona(active persona tracking)- VSCode tasks for persona activation
Location: core/
Priority: High
Exportable: ✅
Dynamic AI context management system:
- Automatic persona switching via
dynamic-context-builder.R - Context status monitoring and validation
- GitHub Copilot instruction updates with file mapping
- Cross-session context preservation
- Portable persona switching with auto-detection
Key Files:
core/base-instructions.md- Core AI behavioral guidelinesdynamic-context-builder.R- Core context building engine (63KB)- Context management scripts in
scripts/
Location: scripts/ (logic) + memory/ (storage)
Priority: Medium
Exportable: ✅ (logic only)
Storage/Logic Separation:
- Exportable Logic: Memory management functions, validation, integration
- Project-Specific Storage: Actual memory files (
memory-ai.md,memory-human.md, etc.)
This design allows memory functionality to be portable while keeping project memories isolated.
Location: scripts/tests/
Priority: Medium
Exportable: ✅
Comprehensive testing suite for AI support system components:
- Individual component tests (personas, memory, context)
- Integration tests (cross-component functionality)
- Automated test runner with detailed reporting
- VSCode task integration for easy execution
Test Coverage:
- Persona activation and switching
- Context management system integrity
- Mini-EDA system functionality
- Memory system operations
- Cross-component integration validation
Location: vscode/
Priority: Medium
Exportable: ✅
Pre-configured VSCode tasks for:
- Persona activation (12 specialized personas)
- Memory system management
- Context status monitoring
- System validation and testing
- Pre-migration Check: Validates target repository compatibility
- Impact Assessment: Detailed analysis of changes and potential conflicts
- Manual Review: Human approval required before proceeding
- Guided Installation: Step-by-step installation with validation
- Post-migration Testing: Ensures all components work correctly
- Automatic compatibility detection
- Smart conflict resolution
- Adaptive integration based on target repo structure
- Built-in rollback capability
Primary Target: Mixed-language research repositories (RAnalysisSkeleton-style)
Required Structure:
config.ymlflow.RREADME.md
Optional Enhancements:
.vscode/tasks.json.github/directory- Existing AI support (will be assessed for conflicts)
Minimal Disruption Approach:
config.yml: Additions only (newai_supportsection)flow.R: Optional minimal modifications.vscode/tasks.json: Task additions only- New directories:
ai-support-system/,ai/(if needed)
# Export just the persona system to another repo
export_ai_components(
components = "personas",
target_repo = "path/to/target",
mode = "manual" # Triggers mandatory assessment
)# Migrate entire AI support system
migrate_ai_support(
from = "case-note-simulator",
to = "aim-2025-sandbox",
mode = "ai_assisted",
components = c("personas", "context", "memory", "vscode")
)- Assessment: Run compatibility check on target repository
- Selection: Choose components to export (personas, memory, tasks, etc.)
- Review: Examine impact assessment (mandatory for manual mode)
- Install: Execute migration with chosen method
- Validate: Confirm all components work in target environment
commands.md- Essential commands for AI system operationscontext-system.md- AI context management and persona system guidemcp-setup/- Model Context Protocol setup instructionstesting-guide.md- Testing framework documentation
- Load system:
source('ai/scripts/ai-context-management.R') - Check status:
show_context_status() - Switch persona:
activate_project_manager()(or other persona) - Get help: See
ai/docs/commands.md
ai/
├── ai-support-config.yml # Main configuration
├── README.md # This file
├── core/ # Context management
├── personas/ # AI personas (12 specialized)
│ ├── developer.md
│ ├── project-manager.md
│ └── ...
├── scripts/ # Portable logic
│ ├── dynamic-context-builder.R # Core context building engine
│ ├── ai-context-management.R # Persona switching with auto-detection
│ ├── ai-memory-functions.R # Memory system with storage/logic separation
│ ├── tests/ # Testing & verification
│ └── wrappers/ # VSCode task wrapper scripts
├── memory/ # Project memory system
├── project/ # Project-specific context
├── templates/ # Templates and examples
├── vscode/ # VSCode integration
└── docs/ # User Documentation
├── commands.md # Command reference
├── context-system.md # Context management guide
├── mcp-setup/ # MCP setup instructions
└── testing-guide.md # Testing documentation
This system embodies the principle that AI support infrastructure should be as portable and reusable as research methodology itself. By separating concerns and maintaining minimal integration footprints, researchers can evolve their AI-augmented workflows across projects while preserving the scientific integrity of their core research processes.
This AI support system is designed for portable migration between research projects while maintaining scientific rigor.