| name | seed-workflow |
| description | Validate, seed, and verify content in Holochain DHT. Use when seeding content, running validation, checking seed statistics, managing snapshots, or troubleshooting seeding issues. |
| metadata | {"sourceRuntime":"claude","master":"package","governance":"epr:elohim-agent/skills/seed-workflow"} |
Content Seeding Workflow
This skill manages the complete content seeding pipeline for the Elohim project - from validation through seeding to verification.
Pipeline Overview
┌──────────────────────────────────────────────────────────────┐
│ Seeding Pipeline │
├──────────────────────────────────────────────────────────────┤
│ │
│ 1. VALIDATE Schema + metadata validation │
│ ↓ │
│ 2. DRY-RUN Preview without writing │
│ ↓ │
│ 3. SEED Write to Holochain DHT │
│ ↓ │
│ 4. VERIFY Post-seed validation │
│ │
│ Source: genesis/data/lamad/ → Target: Holochain DHT │
│ │
└──────────────────────────────────────────────────────────────┘
Quick Reference
Complete Workflow (Recommended)
cd /projects/elohim/genesis/seeder
npm run validate
npm run seed:dry-run
npm run seed
npm run stats
Environment-Specific Commands
| Environment | Seed Command | Stats Command |
|---|
| Local | npm run seed | npm run stats |
| Dev | npm run seed:dev | npm run stats:dev |
| Production | (via CI only) | npm run stats:prod |
Detailed Commands
Validation
npm run validate
npm run validate:verbose
npx tsx src/schema-validation.ts ../data/lamad/content --verbose
What validation checks:
- Required fields:
id, title
- Format hints:
contentFormat, contentType
- Blob references:
blobHash integrity
- JSON syntax errors
Seeding
npm run seed
npm run seed:validate
npm run seed:dry-run
npm run seed:dna-only
npm run seed:blobs-only
Statistics & Verification
npm run stats
npm run stats:dev
npm run stats:prod
Migration & Recovery
npm run migrate
npm run migrate:dry-run
npm run migrate:verify
Snapshot Management
npm run snapshot:create
npm run snapshot:save
npm run snapshot:restore
npm run snapshot:list
npm run snapshot:status
npm run snapshot:clean
Data Directory Structure
genesis/data/lamad/
├── content/ # ContentNode JSON files
│ ├── manifesto.json
│ ├── governance-epic.json
│ └── ...
├── paths/ # Learning path definitions
│ ├── index.json
│ ├── elohim-protocol.json
│ └── ...
├── assessments/ # Quiz/assessment files
│ └── ...
├── graph/ # Visualization data
│ └── ...
└── perseus/ # Interactive quiz format
└── ...
Environment Configuration
Local Development
npm run seed
Dev Environment
npm run seed:dev
export DOORWAY_URL='https://doorway-alpha.elohim.host'
export DOORWAY_API_KEY='dev-elohim-auth-2024'
export HOLOCHAIN_ADMIN_URL='wss://doorway-alpha.elohim.host?apiKey=dev-elohim-auth-2024'
npm run seed
Production
Production seeding is done via CI pipeline only. Use stats:prod for read-only verification.
Troubleshooting
Validation Failures
Missing required field:
ERROR: content/some-file.json missing required field 'id'
Fix: Add the missing field to the JSON file.
Invalid JSON:
ERROR: content/some-file.json - Unexpected token
Fix: Check JSON syntax (trailing commas, missing quotes).
Connection Issues
WebSocket timeout:
curl http://localhost:8888/health
hc sandbox call --running $(cat /projects/elohim/holochain/local-dev/.hc_ports | grep admin_port | grep -o '[0-9]*') list-apps
Auth failure (remote):
echo $DOORWAY_API_KEY
curl -H "X-API-Key: $DOORWAY_API_KEY" https://doorway-alpha.elohim.host/health
Partial Seed Failures
If seeding fails partway through:
npm run stats
npm run seed
npm run snapshot:restore
npm run seed
Large Seed Operations
For bulk seeding:
npm run snapshot:create
npm run seed:dna-only
npm run seed:blobs-only
Pre-Seed Validation with hc-rna
For comprehensive schema validation using the Rust tooling:
cd /projects/elohim/holochain/rna/rust
RUSTFLAGS="" cargo run --features cli --bin hc-rna-fixtures -- \
-f /projects/elohim/genesis/data/lamad/content \
--analyze
RUSTFLAGS="" cargo run --features cli --bin hc-rna-fixtures -- \
-f /projects/elohim/genesis/data/lamad/paths \
--analyze
Key Files
| File | Purpose |
|---|
genesis/seeder/src/seed-production.ts | Main seeding orchestrator |
genesis/seeder/src/schema-validation.ts | JSON schema validation |
genesis/seeder/src/verification.ts | Post-seed verification |
genesis/seeder/src/snapshot.ts | Snapshot management |
genesis/seeder/src/doorway-client.ts | HTTP client for doorway |
genesis/seeder/src/storage-client.ts | Blob upload client |
Common Workflows
Add New Content
npm run validate
npm run seed:dry-run
npm run seed
Update Existing Content
npm run validate
npm run seed
npm run stats
Disaster Recovery
npm run snapshot:list
npm run snapshot:restore
npm run stats