Loading...
Loading...
The drum sounds. Bear and Bloodhound gather for safe data movement. Use when migrating data that requires both careful movement and codebase understanding.
npx skill4agent add autumnsgrove/groveengine gathering-migrationgwgf# Find migration-related code and schemas
gf --agent search "table_name" # Find references to affected tables
gf --agent db # Find database-related code
gf --agent migrations # List existing migration files
# Commit completed migrations
gw git ship --write -a -m "feat: migrate description"SUMMON → ORGANIZE → EXECUTE → VALIDATE → COMPLETE
↓ ↲ ↲ ↲ ↓
Receive Dispatch Animals Verify Migration
Request Animals Work Data Complete"I'll mobilize a migration gathering for: [migration description]This will involve:
- 🐕 Bloodhound scouting the codebase
- Map data relationships
- Find all references to affected tables
- Identify integration points
- Document current patterns
- 🐻 Bear migrating the data
- Backup before moving
- Transform in batches
- Validate after each phase
- Verify complete migration
Proceed with the gathering?"
Bloodhound ──→ Bear
│ │
│ │
Scout Migrate
Territory Data"Sniffing out every trail, every connection..."
Phase: SCENT
- Identify source and destination
- Find all tables/collections involved
Phase: TRACK
- Trace foreign key relationships
- Find code that references the data
- Map dependencies
Phase: HUNT
- Deep dive into complex relationships
- Identify orphaned records
- Find edge cases
Phase: REPORT
- Document all findings
- Create relationship diagrams
- List all files that need updates
Phase: RETURN
- Hand off complete map to Bear
Output:
- Data relationship map
- List of affected files
- Migration risk assessment
- Edge case documentation"Waking from slumber, moving with strength..."
Phase: WAKE
- Create migration plan
- Set up tools
- Prepare rollback strategy
Phase: GATHER
- Backup all data
- Inventory data quality
- Document row counts
Phase: MOVE
- Transform data in batches
- Handle relationships carefully
- Process in correct order
Phase: HIBERNATE
- Verify row counts match
- Check data integrity
- Validate relationships
Phase: VERIFY
- Application tests pass
- Queries work correctly
- Performance acceptable
Output:
- Migrated data
- Validation reports
- Updated codebase-- Row count validation
SELECT
(SELECT COUNT(*) FROM old_table) as source_count,
(SELECT COUNT(*) FROM new_table) as dest_count;
-- Should be equal
-- Foreign key integrity
SELECT COUNT(*) as orphaned_records
FROM child_table c
LEFT JOIN parent_table p ON c.parent_id = p.id
WHERE p.id IS NULL;
-- Should be 0
-- Data sampling
SELECT * FROM new_table
ORDER BY RANDOM()
LIMIT 10;
-- Spot check transformation logic## 🌲 GATHERING MIGRATION COMPLETE
### Migration: [Description]
### Animals Mobilized
🐕 Bloodhound → 🐻 Bear
### Territory Mapped (Bloodhound)
- Tables affected: [count]
- Relationships found: [count]
- Code files referencing data: [count]
- Edge cases identified: [list]
### Data Moved (Bear)
- Records migrated: [count]
- Duration: [time]
- Batches processed: [count]
- Errors encountered: [count]
### Validation Results
- Row count match: ✅ [source] = [dest]
- Data integrity: ✅
- Foreign keys: ✅
- Application tests: ✅ [X/Y passing]
- Performance: ✅
### Rollback Status
- Backup retained at: [location]
- Rollback tested: ✅
- Rollback time: [estimated]
### Files Updated
- Migration scripts: [files]
- Application code: [files]
- Documentation: [files]
### Time Elapsed
[Duration]
_The data has found its new home._ 🌲