**Follow:** `_common.guardrails.md`
Synchronizes generated projects with mothership improvements, applying template updates and managing breaking changes while preserving customizations.
/plugin marketplace add KreativReason/merged-end-to-end-ai-dpp---e2e-cli/plugin install kreativreason-e2e-pipeline@kreativreason-marketplaceFollow: _common.guardrails.md
Manage updates and synchronization between mothership pipeline and generated projects, applying template improvements and handling breaking changes.
project_path: Path to generated project directorymode: "check" | "preview" | "apply"mothership_path: Path to mothership pipeline (default: auto-detect from mothership/connection.json)mothership/connection.json (for version tracking and mothership location)mothership/CHANGELOG.md (for available updates)docs/adr/mothership.json (for inherited ADR decisions)templates/agents/project-specific/ (for latest agent templates)app/models.py (for validation schema)Synchronize generated projects with mothership improvements, applying template updates, fixing bugs, and managing breaking changes while preserving project customizations.
MigrationResultModel in app/models.pyCheck for available mothership updates without making changes.
{
"artifact_type": "migration_check",
"status": "complete",
"validation": "passed",
"approval_required": false,
"next_phase": "migration_preview",
"data": {
"project_name": "string",
"project_version": "1.0.0",
"mothership_version": "1.2.0",
"last_sync": "2025-10-16T15:05:42Z",
"updates_available": true,
"update_summary": {
"total_updates": 3,
"non_breaking": 2,
"breaking": 1,
"security": 0
},
"available_updates": [
{
"version": "1.1.0",
"date": "2025-10-16",
"type": "non-breaking",
"changelog_entry": "ADR-0011: Added agent system templates",
"affected_files": [
"agents/_common.guardrails.md",
"agents/Feature.agent.md"
]
},
{
"version": "1.2.0",
"date": "2025-10-16",
"type": "breaking",
"changelog_entry": "ADR-0012: Migration agent and update protocol",
"affected_files": [
"mothership/connection.json"
],
"migration_required": true
}
],
"recommendation": "Run migration preview to see detailed changes"
}
}
Preview changes that would be applied without executing them.
{
"artifact_type": "migration_preview",
"status": "complete",
"validation": "passed",
"approval_required": true,
"approvers": ["Cynthia", "Usama"],
"next_phase": "migration_apply",
"data": {
"project_name": "string",
"from_version": "1.0.0",
"to_version": "1.2.0",
"preview_date": "2025-10-16T19:00:00Z",
"changes": [
{
"file_path": "agents/_common.guardrails.md",
"action": "update",
"type": "template_refresh",
"diff_summary": "Added formula preservation section (lines 45-67)",
"backup_created": true,
"custom_modifications_detected": false
},
{
"file_path": "mothership/connection.json",
"action": "migrate",
"type": "breaking_change",
"migration_script": "scripts/migrations/v1.2.0_connection_schema.py",
"custom_modifications_detected": true,
"preservation_strategy": "Merge mothership updates with project customizations"
}
],
"migration_scripts": [
{
"version": "1.2.0",
"script_path": "scripts/migrations/v1.2.0_connection_schema.py",
"description": "Add reporting configuration to connection.json",
"estimated_runtime": "< 1 second"
}
],
"backup_plan": {
"backup_directory": "mothership/backups/pre-migration-1.2.0-20251016",
"files_to_backup": [
"agents/_common.guardrails.md",
"mothership/connection.json"
]
},
"risk_assessment": {
"level": "low",
"breaking_changes": 1,
"custom_modifications": 1,
"rollback_available": true
},
"approval_checklist": [
"Review diff_summary for each file change",
"Verify migration scripts are safe to execute",
"Confirm custom modifications will be preserved",
"Check backup plan is adequate",
"Approve breaking changes if acceptable"
]
}
}
Execute migration plan and apply updates to project.
{
"artifact_type": "migration_applied",
"status": "complete",
"validation": "passed",
"approval_required": false,
"next_phase": "development",
"data": {
"project_name": "string",
"from_version": "1.0.0",
"to_version": "1.2.0",
"applied_at": "2025-10-16T19:15:00Z",
"changes_applied": [
{
"file_path": "agents/_common.guardrails.md",
"action": "updated",
"status": "success",
"backup_path": "mothership/backups/pre-migration-1.2.0-20251016/_common.guardrails.md"
},
{
"file_path": "mothership/connection.json",
"action": "migrated",
"status": "success",
"migration_script": "scripts/migrations/v1.2.0_connection_schema.py",
"backup_path": "mothership/backups/pre-migration-1.2.0-20251016/connection.json"
}
],
"migration_results": [
{
"version": "1.2.0",
"script": "scripts/migrations/v1.2.0_connection_schema.py",
"status": "success",
"output": "Added reporting configuration. Custom fields preserved."
}
],
"validation_results": {
"structure_valid": true,
"pydantic_valid": true,
"custom_modifications_preserved": true,
"critical_rules_maintained": true
},
"sync_status": {
"last_sync": "2025-10-16T19:15:00Z",
"current_version": "1.2.0",
"sync_successful": true
},
"rollback_instructions": [
"Backup available at: mothership/backups/pre-migration-1.2.0-20251016/",
"To rollback: cp mothership/backups/pre-migration-1.2.0-20251016/* ./",
"Then update connection.json version to 1.0.0"
],
"post_migration_actions": [
"Review updated files for any needed adjustments",
"Run tests to ensure project still works correctly",
"Commit changes to version control",
"Update team on new mothership features available"
]
}
}
Action: Auto-apply with backup
Action: Require migration script + approval
Action: Flag for immediate attention, may auto-apply
{
"error": {
"code": "TEMPLATE_CONFLICT",
"message": "Custom modifications detected in template file",
"details": [
"File: agents/Feature.agent.md has custom modifications",
"Lines 45-67 differ from mothership template",
"Manual merge required"
],
"artifact": "migration",
"remediation": "Review custom modifications and choose merge strategy: 'keep-custom', 'use-template', or 'manual-merge'"
}
}
{
"error": {
"code": "VERSION_MISMATCH",
"message": "Project version ahead of mothership",
"details": [
"Project version: 1.5.0",
"Mothership version: 1.2.0",
"Project may have been forked or manually modified"
],
"artifact": "migration",
"remediation": "Reset project to mothership version or contribute changes back to mothership"
}
}
{
"error": {
"code": "MIGRATION_FAILED",
"message": "Migration script execution failed",
"details": [
"Script: scripts/migrations/v1.2.0_connection_schema.py",
"Error: KeyError: 'mothership_version'",
"Backup available at: mothership/backups/pre-migration-1.2.0-20251016/"
],
"artifact": "migration",
"remediation": "Restore from backup, review migration script, contact mothership maintainer"
}
}
Use @agents/Migration.agent.md
project_path: /Users/hermannrohr/Documents/generated-projects/richtungswechsel-roi-tracker---saas-migration/
mode: "check"
Use @agents/Migration.agent.md
project_path: /Users/hermannrohr/Documents/generated-projects/richtungswechsel-roi-tracker---saas-migration/
mode: "preview"
Use @agents/Migration.agent.md
project_path: /Users/hermannrohr/Documents/generated-projects/richtungswechsel-roi-tracker---saas-migration/
mode: "apply"
After successful preview generation, this agent requires approval from:
Apply mode requires pre-approval of preview. Check mode does not require approval.
Use this agent to verify that a Python Agent SDK application is properly configured, follows SDK best practices and documentation recommendations, and is ready for deployment or testing. This agent should be invoked after a Python Agent SDK app has been created or modified.
Use this agent to verify that a TypeScript Agent SDK application is properly configured, follows SDK best practices and documentation recommendations, and is ready for deployment or testing. This agent should be invoked after a TypeScript Agent SDK app has been created or modified.