Maintenance Robot Architect

Automate orchestrator_service migration_steps for schemas, seeds, and column changes on boot.

Updated Dec 24, 2025
One-click install
npx skills add https://github.com/adriangmrraa/MultiAgents-Platform-ROI --skill maintenance-robot-architect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Maintenance Robot Architect
Source: https://github.com/adriangmrraa/MultiAgents-Platform-ROI/tree/main/.agent/skills/Maintenance_Robot_Architect
Command: npx skills add https://github.com/adriangmrraa/MultiAgents-Platform-ROI --skill maintenance-robot-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures that the orchestrator's automated database migration system applies required schema changes and seed data reliably on every fresh deployment, eliminating manual SQL steps and startup failures caused by missing tables, seeds, or columns.

Core Features & Use Cases

  • Idempotent Migrations: Enforces CREATE TABLE IF NOT EXISTS and seed inserts with ON CONFLICT handling to prevent duplicate operations.
  • Atomic Per-Step Execution: Executes each migration step as an individual transaction with soft-fail logging and continuation unless a critical table is missing.
  • Conditional Seeds & Safe Alters: Supports PL/pgSQL anonymous blocks for conditional inserts and uses guarded ALTER patterns to avoid errors when columns already exist.
  • Use Case: Add a new OAuth provider or a new column to an existing model and have the orchestrator apply the change automatically on startup without manual intervention.

Quick Start

Add a new SQL migration step to migration_steps in orchestrator_service/main.py following the idempotency and atomicity rules described.

Frequently Asked Questions about Maintenance Robot Architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate idempotent PostgreSQL migrations on application boot?

To automate idempotent PostgreSQL migrations on boot, you add SQL steps to the orchestrator's migration_steps, using CREATE TABLE IF NOT EXISTS and ON CONFLICT handling to ensure schemas and seeds apply safely without duplicate operations.

How do I run atomic database migration steps with soft-fail logging in SQL?

Running atomic database migration steps with soft-fail logging requires executing each step as an individual transaction, logging errors and continuing unless a critical table is missing, which prevents partial updates and startup failures.

What is the best way to insert conditional seed data in PostgreSQL without duplicates?

The best way to insert conditional seed data in PostgreSQL without duplicates is using PL/pgSQL anonymous blocks combined with ON CONFLICT handling, ensuring idempotent seed insertion on every deployment.

How do I safely alter existing tables to add columns without causing startup failures?

To safely alter existing tables and add columns without causing startup failures, use guarded ALTER patterns that check if columns already exist, preventing errors when the orchestrator applies changes automatically on startup.

Does this automated database migration approach work for zero-config self-hosted deployments?

Yes, this automated database migration approach works for zero-config self-hosted deployments by applying schema changes, seed data insertion, and column alterations directly on boot without requiring manual SQL intervention.

Why do my database seed inserts fail on repeated application startups?

Database seed inserts fail on repeated application startups because they lack idempotency; using ON CONFLICT handling and conditional PL/pgSQL logic ensures seed data insertion safely skips duplicates on subsequent boots.