Skip to content

Latest commit

 

History

History
395 lines (289 loc) · 9.66 KB

File metadata and controls

395 lines (289 loc) · 9.66 KB

VersionGuard Integration Plan

Team Brain Agent Integration Strategy

This document outlines how VersionGuard integrates with existing Team Brain agents, tools, and workflows.


Table of Contents

  1. Integration Goals
  2. Agent-Specific Integrations
  3. Workflow Integration Points
  4. Tool Interoperability
  5. Communication Patterns
  6. Deployment Scenarios

Integration Goals

Primary Objectives

  1. Prevent Time Waste: Catch version incompatibilities BEFORE development starts
  2. Automated Checking: Integrate with build pipelines and pre-commit hooks
  3. Team Awareness: Alert relevant agents when issues are detected
  4. Standardized Reporting: Consistent output format for all consumers

Success Metrics

Metric Target
Time Saved per Session 30+ minutes
False Positive Rate <5%
Integration Adoption 100% of build agents
Detection Accuracy >95%

Agent-Specific Integrations

IRIS (Desktop Development Specialist)

Integration Priority: HIGHEST (requested this tool)

Use Cases:

  1. Pre-development environment validation
  2. New package installation checks
  3. Full-stack project health monitoring

Integration Points:

# IRIS Pre-Session Check
from versionguard import VersionGuard, CompatibilityStatus
from pathlib import Path

def iris_startup_check(project: str) -> bool:
    """Run before starting any development session."""
    guard = VersionGuard(Path(project))
    guard.scan_project()
    guard.check_compatibility()
    report = guard.generate_report()
    
    if report.status == CompatibilityStatus.INCOMPATIBLE:
        # CRITICAL: Do not proceed
        return False
    return True

Workflow:

  1. IRIS receives development task
  2. Run versionguard scan ./project
  3. If INCOMPATIBLE → Stop, notify FORGE via Synapse
  4. If COMPATIBLE/WARNING → Proceed with awareness

NEXUS (VS Code Agent)

Integration Priority: HIGH

Use Cases:

  1. Workspace task integration
  2. Real-time file monitoring
  3. Extension recommendations

VS Code Tasks Integration:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "VersionGuard: Check Compatibility",
            "type": "shell",
            "command": "python",
            "args": ["${workspaceFolder}/tools/versionguard.py", "scan", "."],
            "group": "build",
            "presentation": {
                "reveal": "always",
                "panel": "new"
            },
            "problemMatcher": []
        }
    ]
}

Extension Integration:

  • Add to workspace recommendations
  • Include in debugging prerequisites

BOLT (Executor Agent)

Integration Priority: HIGH

Use Cases:

  1. Build pipeline gating
  2. Automated dependency audits
  3. CI/CD integration

Pipeline Integration:

#!/bin/bash
# build.sh - BOLT execution script

echo "[BOLT] Step 1: Version Compatibility Check"
python versionguard.py scan . --json -o .versionguard.json

if grep -q '"status": "incompatible"' .versionguard.json; then
    echo "[BOLT] FAILED: Version incompatibilities detected"
    python versionguard.py scan .
    exit 1
fi

echo "[BOLT] Version check passed"
# Continue with build...

CLIO (Trophy Keeper)

Integration Priority: MEDIUM

Use Cases:

  1. Track "Clean Stack" achievements
  2. Monitor version hygiene across projects
  3. Generate compatibility reports for reviews

Trophy Integration:

# CLIO Trophy Check
from versionguard import VersionGuard, CompatibilityStatus

def check_clean_stack_trophy(project_path: str) -> dict:
    """Check if project qualifies for Clean Stack trophy."""
    guard = VersionGuard(Path(project_path))
    guard.scan_project()
    guard.check_compatibility()
    report = guard.generate_report()
    
    trophy_data = {
        "trophy_id": "CLEAN_STACK",
        "eligible": report.status == CompatibilityStatus.COMPATIBLE,
        "frontend_deps": len(guard.frontend_deps),
        "backend_deps": len(guard.backend_deps),
        "issues_found": len(guard.issues)
    }
    
    return trophy_data

FORGE (Orchestrator)

Integration Priority: MEDIUM

Use Cases:

  1. Pre-task validation
  2. Tool request coordination
  3. Status reporting

Orchestration Integration:

# FORGE Task Validation
def validate_task_environment(task: dict) -> bool:
    """Validate project environment before assigning task."""
    project_path = task.get("project_path")
    
    if project_path:
        guard = VersionGuard(Path(project_path))
        guard.scan_project()
        issues = guard.check_compatibility()
        
        if any(i.severity.value == "critical" for i in issues):
            # Block task assignment
            return False
    
    return True

Workflow Integration Points

1. Pre-Development Check

Trigger: Agent starts development session Action: Run compatibility scan Output: Pass/Fail with detailed report

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│ Agent starts    │────▶│ VersionGuard     │────▶│ Proceed or      │
│ development     │     │ scan             │     │ Block           │
└─────────────────┘     └──────────────────┘     └─────────────────┘

2. Package Installation

Trigger: Before npm install or pip install Action: Validate new packages against existing Output: Compatibility assessment

3. Build Pipeline

Trigger: CI/CD pipeline start Action: Automated scan and gate Output: Exit code (0=pass, 1=fail)

4. Code Review

Trigger: PR/MR submission Action: Check if dependency changes introduce issues Output: Review comment or annotation


Tool Interoperability

Works With:

Tool Integration Type Use Case
SynapseLink Alert destination Notify team of issues
TokenTracker Metrics Track scan costs
TaskFlow Workflow Pre-task validation
DevSnapshot Context Include in snapshots
ConversationAuditor Verification Audit version claims

SynapseLink Alert Integration

from synapselink import quick_send
from versionguard import VersionGuard, CompatibilityStatus

def check_and_alert(project_path: str):
    guard = VersionGuard(Path(project_path))
    guard.scan_project()
    guard.check_compatibility()
    report = guard.generate_report()
    
    if report.status == CompatibilityStatus.INCOMPATIBLE:
        quick_send(
            recipients="FORGE,IRIS,BOLT",
            subject="Version Incompatibility Detected",
            body=f"Project: {project_path}\n\n{report.summary}\n\n" + 
                 "\n".join(f"- {i.package}: {i.message}" for i in guard.issues),
            priority="HIGH"
        )

DevSnapshot Integration

from devsnapshot import DevSnapshot
from versionguard import VersionGuard

def create_enhanced_snapshot(project_path: str):
    # Create development snapshot
    snapshot = DevSnapshot(project_path)
    
    # Add version compatibility data
    guard = VersionGuard(Path(project_path))
    guard.scan_project()
    guard.check_compatibility()
    
    snapshot.add_metadata({
        "version_check": guard.generate_report().to_dict()
    })
    
    return snapshot.save()

Communication Patterns

Alert Formats

Critical Issue Alert:

[VERSIONGUARD] CRITICAL INCOMPATIBILITY DETECTED

Project: /path/to/project
Status: INCOMPATIBLE

Issues:
- socket.io: Socket.IO client v4.7.2 is incompatible with server v5.8.0

Action Required: Resolve before development

Recommendations:
- Use socket.io-client v4 with python-socketio v4

Warning Alert:

[VERSIONGUARD] Warning: Potential Compatibility Issues

Project: /path/to/project
Status: WARNING

Warnings:
- pydantic: Pydantic v2.0.0 - major API changes between versions

Review recommended before proceeding.

Log Formats

[2026-01-24 14:30:00] [VERSIONGUARD] Scanning /project...
[2026-01-24 14:30:01] [VERSIONGUARD] Found 12 frontend, 5 backend deps
[2026-01-24 14:30:01] [VERSIONGUARD] Checking compatibility...
[2026-01-24 14:30:01] [VERSIONGUARD] Status: COMPATIBLE

Deployment Scenarios

Scenario 1: Single Project

# Clone VersionGuard to tools directory
cd my-project
git clone https://github.com/DonkRonk17/VersionGuard.git tools/versionguard

# Run check
python tools/versionguard/versionguard.py scan .

Scenario 2: Team-Wide Deployment

# Clone to shared location
git clone https://github.com/DonkRonk17/VersionGuard.git /shared/tools/VersionGuard

# Add alias
echo 'alias versionguard="python /shared/tools/VersionGuard/versionguard.py"' >> ~/.bashrc

# Usage
versionguard scan ./any-project

Scenario 3: CI/CD Pipeline

# .github/workflows/version-check.yml
- name: Clone VersionGuard
  run: git clone https://github.com/DonkRonk17/VersionGuard.git .versionguard

- name: Run Check
  run: python .versionguard/versionguard.py scan . --json -o report.json

Implementation Checklist

  • Deploy VersionGuard to shared tools location
  • Configure IRIS pre-development hook
  • Add NEXUS VS Code tasks
  • Integrate BOLT build pipeline
  • Set up SynapseLink alerts
  • Train agents on usage
  • Document in MEMORY_CORE

VersionGuard - Pre-validate. Don't waste time.