feat(marketplace): command consolidation + 8 new plugins (v8.1.0 → v9.0.0) [BREAKING]
Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action> sub-command pattern. Git-flow consolidated from 8→5 commands (commit variants absorbed into --push/--merge/--sync flags). Dispatch files, name: frontmatter, and cross-reference updates for all plugins. Phase 2: Design documents for 8 new plugins in docs/designs/. Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate, saas-react-platform, saas-test-pilot, data-seed, ops-release-manager, ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents, skills, README, and claude-md-integration. Marketplace grows from 12→20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
70
plugins/data-seed/commands/seed-apply.md
Normal file
70
plugins/data-seed/commands/seed-apply.md
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
name: seed apply
|
||||
---
|
||||
|
||||
# /seed apply - Apply Seed Data
|
||||
|
||||
## Skills to Load
|
||||
- skills/profile-management.md
|
||||
- skills/visual-header.md
|
||||
|
||||
## Visual Output
|
||||
|
||||
Display header: `DATA-SEED - Apply`
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/seed apply [--profile <name>] [--target <database|file>] [--clean] [--dry-run]
|
||||
```
|
||||
|
||||
## Workflow
|
||||
|
||||
### 1. Locate Seed Data
|
||||
- Look for generated seed files in configured output directory
|
||||
- If no seed data found, prompt user to run `/seed generate` first
|
||||
- Display available seed datasets with timestamps and profiles
|
||||
|
||||
### 2. Determine Target
|
||||
- `--target database`: Apply directly to connected database via SQL execution
|
||||
- `--target file` (default): Write fixture files for framework consumption
|
||||
- Auto-detect framework for file output:
|
||||
- Django: `fixtures/` directory as JSON fixtures compatible with `loaddata`
|
||||
- SQLAlchemy: Python factory files or SQL insert scripts
|
||||
- Prisma: `prisma/seed.ts` compatible format
|
||||
- Generic: SQL insert statements or CSV files
|
||||
|
||||
### 3. Pre-Apply Validation
|
||||
- If targeting database: verify connection, check table existence
|
||||
- If `--clean` specified: generate TRUNCATE/DELETE statements for affected tables (respecting FK order)
|
||||
- Display execution plan showing table order, row counts, and clean operations
|
||||
- If `--dry-run`: display plan and exit without applying
|
||||
|
||||
### 4. Apply Data
|
||||
- Execute in dependency order (parents before children)
|
||||
- If targeting database: wrap in transaction, rollback on error
|
||||
- If targeting files: write all files atomically
|
||||
- Track progress: display per-table status during application
|
||||
|
||||
### 5. Post-Apply Summary
|
||||
- Report rows inserted per table
|
||||
- Report any errors or skipped rows
|
||||
- Display total execution time
|
||||
- If database target: verify row counts match expectations
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
/seed apply # Write fixture files (default)
|
||||
/seed apply --target database # Insert directly into database
|
||||
/seed apply --profile small --clean # Clean + apply small dataset
|
||||
/seed apply --dry-run # Preview without applying
|
||||
/seed apply --target database --clean # Truncate then seed database
|
||||
```
|
||||
|
||||
## Safety
|
||||
|
||||
- Database operations always use transactions
|
||||
- `--clean` requires explicit confirmation before executing TRUNCATE
|
||||
- Never drops tables or modifies schema — seed data only
|
||||
- `--dry-run` is always safe and produces no side effects
|
||||
Reference in New Issue
Block a user