Ralph JusticeHub Storyteller
Autonomous content creation system for JusticeHub stories using the Ralph Wiggum methodology.
Overview
This skill implements an iterative AI content pipeline that generates story ideas, drafts articles, and creates social content for JusticeHub's unified story feed. It follows the "Ralph Wiggum pattern" - autonomous loops with git-based persistence.
Content Pipeline
Input Agents Ralph Storyteller Output
───────────────────── ───────────────────── ─────────────────────
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ TrendScout │───────────▶│ │───────────▶│ Story Ideas │
│ (ACT topics) │ │ │ │ (briefs/) │
└─────────────────┘ │ │ └─────────────────┘
│ │
┌─────────────────┐ │ Ralph │ ┌─────────────────┐
│ CommunityPulse │───────────▶│ Storyteller │───────────▶│ Draft Articles │
│ (stories DB) │ │ │ │ (drafts/) │
└─────────────────┘ │ │ └─────────────────┘
│ │
┌─────────────────┐ │ │ ┌─────────────────┐
│ ResearchAgent │───────────▶│ │───────────▶│ Social Content │
│ (web sources) │ └─────────────────┘ │ (social/) │
└─────────────────┘ └─────────────────┘
Story Categories
JusticeHub uses a growth metaphor for content organization:
- •Seeds 🌱 - New initiatives, early ideas, announcements
- •Growth 🌿 - Developing programs, progress updates, expanding impact
- •Harvest 🌾 - Results, outcomes, success stories, impact data
- •Roots 🌳 - Foundational work, histories, cultural knowledge
- •Voices 🗣️ - Community voices (from Empathy Ledger integration)
Commands
/ralph-stories-init
Initialize a new content project. Creates:
- •
ralph/stories-prd.json- Content production requirements - •
ralph/stories-progress.txt- Progress log - •
ralph/stories.db- SQLite database for content pipeline
/ralph-stories
Launch the autonomous storytelling loop. Ralph will:
- •Read current PRD and identify highest priority incomplete task
- •Gather context from input agents
- •Generate content (ideas, drafts, or social snippets)
- •Self-review against JusticeHub brand guidelines
- •Commit progress to git
- •Log learnings and continue
/ralph-stories-status
Check current progress, pending tasks, and content statistics.
/ralph-stories-review
Human review checkpoint. Presents generated content for approval before publishing.
Content Types
Story Ideas (briefs/)
{
"id": "brief-001",
"title": "Youth Voices in Justice Reform",
"category": "seeds",
"angle": "First-person perspectives from program participants",
"sources": ["program_data", "community_interviews"],
"target_length": "800-1200 words",
"key_themes": ["youth empowerment", "systemic change", "lived experience"],
"suggested_interviewees": ["Program participant", "Youth worker"],
"status": "approved"
}
Draft Articles (drafts/)
Full article drafts with metadata ready for human review and Supabase upload.
Social Content (social/)
{
"story_id": "article-123",
"platform": "linkedin",
"content": "Quote or summary text...",
"hashtags": ["#JusticeReform", "#ACT", "#CommunityVoices"],
"image_suggestion": "Featured image from article",
"scheduled_date": "2025-01-15"
}
Database Schema
-- Input tables (populated by agents) CREATE TABLE trends ( id INTEGER PRIMARY KEY, topic TEXT, relevance_score REAL, source TEXT, captured_at DATETIME, notes TEXT ); CREATE TABLE community_signals ( id INTEGER PRIMARY KEY, signal_type TEXT, -- 'story_gap', 'trending_topic', 'community_request' description TEXT, category TEXT, -- seeds, growth, harvest, roots priority INTEGER, source TEXT, captured_at DATETIME ); CREATE TABLE research_findings ( id INTEGER PRIMARY KEY, topic TEXT, summary TEXT, sources TEXT, -- JSON array of URLs relevance TEXT, captured_at DATETIME ); -- Output tables (generated by Ralph) CREATE TABLE story_briefs ( id INTEGER PRIMARY KEY, title TEXT, category TEXT, brief_json TEXT, status TEXT, -- draft, reviewed, approved, rejected created_at DATETIME, reviewed_at DATETIME ); CREATE TABLE article_drafts ( id INTEGER PRIMARY KEY, brief_id INTEGER, title TEXT, slug TEXT, content TEXT, excerpt TEXT, category TEXT, tags TEXT, -- JSON array status TEXT, -- draft, review, approved, published created_at DATETIME, FOREIGN KEY (brief_id) REFERENCES story_briefs(id) ); CREATE TABLE social_content ( id INTEGER PRIMARY KEY, article_id INTEGER, platform TEXT, content TEXT, hashtags TEXT, status TEXT, scheduled_for DATETIME, created_at DATETIME, FOREIGN KEY (article_id) REFERENCES article_drafts(id) ); -- Learning & progress CREATE TABLE learnings ( id INTEGER PRIMARY KEY, iteration INTEGER, task_type TEXT, learning TEXT, created_at DATETIME );
Integration with JusticeHub
Publishing Flow
- •Ralph generates draft →
article_draftstable - •Human reviews via
/ralph-stories-review - •Approved content exports to JusticeHub format
- •Upload script inserts into Supabase
articlesorblog_poststable
Empathy Ledger Respect
- •Ralph NEVER generates content that mimics Empathy Ledger voices
- •Voices category content is ONLY curated from existing consented stories
- •All generated content clearly attributed to JusticeHub editorial
Brand Alignment
Ralph uses the justicehub-brand-alignment skill for:
- •Tone and voice consistency
- •Terminology guidelines
- •Cultural sensitivity review
- •First Nations acknowledgment protocols
Configuration
{
"content_focus": ["justice_reform", "community_programs", "youth_empowerment"],
"target_audience": "community_members, stakeholders, funders",
"publishing_cadence": "2-3 articles per week",
"social_platforms": ["linkedin", "twitter", "facebook"],
"auto_publish": false,
"require_human_review": true
}
Example PRD
{
"project": "JusticeHub Q1 2025 Content",
"description": "Content pipeline for first quarter storytelling",
"features": [
{
"id": "seeds-youth-program",
"priority": 1,
"type": "article",
"category": "seeds",
"title": "New Youth Mentorship Program Launch",
"brief": "Announce the new mentorship initiative partnering with local schools",
"passes": false
},
{
"id": "harvest-2024-impact",
"priority": 2,
"type": "article",
"category": "harvest",
"title": "2024 Impact Report Highlights",
"brief": "Summarize key achievements from annual impact data",
"passes": false
},
{
"id": "social-campaign-jan",
"priority": 3,
"type": "social_campaign",
"title": "January Social Media Content",
"brief": "Create 8 social posts from recent articles",
"passes": false
}
]
}
Usage
# Initialize new content project claude /ralph-stories-init # Start autonomous content generation claude /ralph-stories # Check progress claude /ralph-stories-status # Review generated content claude /ralph-stories-review
Safety & Governance
- •Human-in-the-loop: All content requires human approval before publishing
- •Cultural review: First Nations content flagged for community review
- •No impersonation: Ralph never writes as if from community members
- •Transparent attribution: All AI-generated content clearly marked
- •Git history: Full audit trail of all generated content