Skip to content

Heaney-Investments/opengov-garden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 OpenGov Garden

Universal DevOps automation toolkit for Supabase + Airflow + SQLite + Playwright stacks

Version License Claude Code

A comprehensive Claude Code plugin that provides multi-agent orchestration, database schema synchronization, service wiring validation, automated testing, and intelligent code review for modern data pipeline development.


🎯 What is Garden?

Garden is a multi-agent DevOps automation system that helps you:

  • πŸ”„ Synchronize SQLite and Supabase schemas automatically
  • πŸ” Audit database integrity and security compliance
  • πŸ§ͺ Test your code with comprehensive test orchestration
  • πŸ”Œ Validate service integrations and connectivity
  • πŸ“Š Generate resources following project conventions
  • ⬆️ Upgrade systems safely with automated migrations
  • πŸ› Debug issues with intelligent log analysis
  • βœ… Review code for quality and security

Key Features

✨ 8 Specialized Agents:

  • Audit Agent: System auditing and compliance checking
  • Schema Agent: Database schema synchronization
  • Debug Agent: Troubleshooting and error resolution
  • Review Agent: Code and configuration review
  • Scaffold Agent: Resource generation with conventions
  • Wire Agent: Service integration validation
  • Test Agent: Automated testing orchestration
  • Upgrade Agent: System version upgrades

🎯 68 CLI Commands organized into 12 categories

πŸ”Œ Supabase MCP Integration for local and remote instances

πŸ“ Config-Driven Architecture using YAML

πŸ—οΈ Scaffold Templates with automatic naming convention enforcement

πŸ§ͺ Comprehensive Testing framework (unit, integration, smoke, E2E)


πŸš€ Quick Start

Installation

Install from the Diatonic AI marketplace:

# Add Diatonic AI marketplace to Claude Code
# In .claude/settings.json:
{
  "extraKnownMarketplaces": {
    "diatonic-ai-plugins": {
      "source": {
        "source": "github",
        "owner": "Diatonic-AI",
        "repo": "opengov-garden"
      }
    }
  },
  "enabledPlugins": {
    "opengov-garden@diatonic-ai-plugins": true
  }
}

First Commands

# Test service connectivity
garden wire test all

# Check database schemas
garden db diff

# Run system audit
garden db audit

# Check for plugin updates
garden upgrade check

πŸ› οΈ Common Workflows

Database Operations

# Compare local and remote schemas
garden db diff --detailed

# Synchronize schemas (SQLite β†’ Postgres)
garden db sync

# Synchronize in reverse (Postgres β†’ SQLite)
garden db sync --direction postgres_to_sqlite

# Audit database integrity
garden db audit

# Deep audit with comprehensive checks
garden db audit --deep

# Validate schema best practices
garden db schema validate

# Generate migration from changes
garden db migration generate add_versioning --type schema

# Apply specific migration
garden db migration apply --migration 20260125_add_versioning

# List all migrations
garden db migration list --status pending

Service Connectivity

# Test all services
garden wire test all

# Test specific service
garden wire test supabase-mcp
garden wire test database --verbose
garden wire test airflow
garden wire test auth

# Map service dependencies
garden wire map

# Generate architecture diagram
garden wire map --format svg --output docs/architecture.svg

Testing

# Run unit tests
garden test unit

# Run unit tests with coverage
garden test unit --coverage

# Run integration tests
garden test integration

# Run smoke tests (critical paths)
garden test smoke

# Run E2E tests
garden test e2e

# Generate coverage report
garden test coverage --min-coverage 90

Debugging

# Analyze logs
garden debug logs --service api --filter error

# Trace specific error
garden debug trace err_20260125_143052

# Ping service
garden debug ping database

# Inspect system state
garden debug inspect --component database

Security & Compliance

# Scan for vulnerabilities
garden security scan --severity critical

# Check Supabase advisors
garden security advisors --type security

# Check compliance
garden compliance check

Resource Generation

# Generate database table
garden scaffold table opengov_vendors

# Generate Airflow DAG
garden scaffold dag opengov_extraction_prod

# Generate skill definition
garden scaffold skill analytics/vendors:report

# Generate test suite
garden scaffold test integration/test_vendor_sync

System Upgrades

# Check for updates
garden upgrade check

# Plan upgrade
garden upgrade plan --to 0.3.0

# Execute upgrade
garden upgrade apply --to 0.3.0

# Verify upgrade
garden upgrade verify

πŸ”§ Configuration

Environment Variables

Create .env file in plugin root:

# Supabase Configuration
SUPABASE_URL=http://localhost:54321
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
SUPABASE_PROJECT_ID=your-project-id

# Airflow Configuration (Optional)
AIRFLOW_HOME=${PWD}/airflow
AIRFLOW_API_URL=http://localhost:8080
AIRFLOW_USERNAME=admin
AIRFLOW_PASSWORD=admin

# Logging
LOG_LEVEL=INFO

Garden Configuration

Edit config/garden.yml for advanced configuration:

version: "0.2.0"

project:
  name: "your-project"
  root: "/path/to/project"

databases:
  sqlite:
    - name: "main"
      path: "data/main.db"
      schema: "main"
      wal_mode: true

  supabase:
    project_id: "${SUPABASE_PROJECT_ID}"
    schemas: ["public", "custom"]

mcp_servers:
  supabase_local:
    enabled: true
    command: npx
    args: ["@modelcontextprotocol/server-supabase"]

  supabase_remote:
    enabled: true
    use_claude_mcp: true

agents:
  enabled:
    - audit-agent
    - schema-agent
    - debug-agent
    - review-agent
    - scaffold-agent
    - wire-agent
    - test-agent
    - upgrade-agent

πŸ€– Agent Details

Audit Agent

Purpose: Proactive system health monitoring

Capabilities:

  • Database integrity checks (PRAGMA integrity_check)
  • Orphaned index detection
  • Security vulnerability scanning
  • Performance bottleneck identification
  • Compliance validation

Schedule: Every 6 hours + on-demand

Schema Agent

Purpose: Database schema consistency

Capabilities:

  • Schema diffing (SQLite ↔ Supabase)
  • Migration generation
  • Safe migration application
  • Foreign key verification

MCP Integration: list_tables, apply_migration, list_migrations

Debug Agent

Purpose: Fast issue resolution

Capabilities:

  • Log pattern analysis
  • Stack trace interpretation
  • Connectivity testing
  • Root cause identification

MCP Integration: get_logs for all Supabase services

Wire Agent

Purpose: Service integration confidence

Capabilities:

  • Connectivity testing
  • Health check execution
  • Dependency mapping
  • Architecture diagram generation

Triggers: On startup, before deploy, on-demand

Test Agent

Purpose: Comprehensive quality validation

Test Types:

  • Unit: Fast, isolated, mocked
  • Integration: Multi-component, real connections
  • Smoke: Critical paths, quick validation
  • E2E: Full workflows, browser automation

Coverage Threshold: 80%

Scaffold Agent

Purpose: Consistent resource generation

Templates:

  • Database tables
  • Airflow DAGs
  • Skill definitions
  • Agent prompts
  • Test suites
  • Migrations

Review Agent

Purpose: Code quality assurance

Capabilities:

  • Skill validation
  • Migration safety review
  • DAG validation
  • Code linting

Upgrade Agent

Purpose: Safe system evolution

Features:

  • Automatic backups
  • Migration automation
  • Rollback on failure
  • Verification checks

πŸ“š Documentation


πŸ“Š Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     CLI Interface Layer                      β”‚
β”‚  garden [command] [subcommand] [options]                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Agent Orchestration Layer                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚  Audit  β”‚  β”‚ Schema  β”‚  β”‚  Debug  β”‚  β”‚ Review  β”‚       β”‚
β”‚  β”‚  Agent  β”‚  β”‚  Agent  β”‚  β”‚  Agent  β”‚  β”‚  Agent  β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚Scaffold β”‚  β”‚ Upgrade β”‚  β”‚  Wire   β”‚  β”‚  Test   β”‚       β”‚
β”‚  β”‚  Agent  β”‚  β”‚  Agent  β”‚  β”‚  Agent  β”‚  β”‚  Agent  β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Integration Layer                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚   Supabase   β”‚  β”‚   Airflow    β”‚  β”‚   SQLite     β”‚      β”‚
β”‚  β”‚  MCP Local   β”‚  β”‚     API      β”‚  β”‚   Direct     β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

See ARCHITECTURE.md for detailed architecture documentation.


πŸŽ“ Use Cases

Development Workflow

# 1. Start services
garden wire test all

# 2. Make schema changes
# ... edit schema ...

# 3. Compare with remote
garden db diff

# 4. Generate migration
garden db migration generate sync_local_changes

# 5. Apply migration
garden db migration apply

# 6. Run tests
garden test unit
garden test integration

# 7. Pre-commit checks
garden compliance check

Production Deployment

# 1. Connectivity validation
garden wire test all

# 2. Security audit
garden security scan --severity critical

# 3. Database audit
garden db audit --deep

# 4. Smoke tests
garden test smoke --environment production

# 5. Deploy
# ... deployment ...

# 6. Verification
garden upgrade verify

πŸ” Troubleshooting

MCP Server Not Connected

# Test MCP connectivity
garden wire test supabase-mcp

# If failed, check Supabase:
supabase status

# Start if needed:
supabase start

Database Locked Errors

# Inspect database
garden debug inspect --component database

# Enable WAL mode in connections

Agent Execution Failures

# Check logs
garden debug logs --filter "agent"

# Verify configuration
garden compliance check

🀝 Contributing

We welcome contributions!

  1. Fork the repository
  2. Create a feature branch
  3. Follow naming conventions
  4. Add tests
  5. Update documentation
  6. Submit a pull request

πŸ“„ License

MIT License - see LICENSE file


πŸ™ Acknowledgments

Built with:


πŸ“ž Support


Version: 0.2.0 Last Updated: 2026-01-26 Maintained By: Diatonic AI

About

Universal DevOps automation toolkit for Supabase+Airflow+SQLite+Playwright stacks. Claude Code plugin marketplace providing service orchestration, schema sync, wiring validation, and gap analysis.

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors