A comprehensive competitor analysis tool built for HeroForge.ai to analyze Aloa.co and other competitors, with advanced MCP integration, context management, and future SEO capabilities.
This system is designed to:
- Scrape competitor websites (starting with Aloa.co) using Playwright MCP
- Analyze messaging, CTAs, value propositions, and positioning
- Compare competitors with HeroForge.ai's positioning
- Generate copy recommendations and strategic insights
- Track SEO elements for future optimization
- Prevent context overflow and hallucination through smart management
- MCP Servers: Playwright (primary), Sequential Thinking, Task delegation
- Agents: Scraper, Analyzer, Curator, Orchestrator
- Context Management: Automatic checkpointing at 70% usage
- Activity Logging: Complete audit trail in JSONL format
aloa-scraper/
βββ .claude/ # Claude Code configuration
β βββ CLAUDE.md # MCP usage rules & context management
β βββ AGENT_ACTIVITY_LOG.jsonl # Real-time activity tracking
β βββ agents/ # Agent definitions
βββ src/ # Source code
β βββ scrapers/ # Playwright MCP integration
β βββ analyzers/ # Competitive & SEO analysis
β βββ orchestrator/ # Context & state management
βββ data/ # Data storage
β βββ input/ # URLs to scrape
β βββ raw/ # Raw scraped content
β βββ processed/ # Processed data
β βββ analysis/ # Analysis results
βββ state/ # State management
β βββ progress.json # Scraping progress
β βββ current_session.json # Session state
β βββ checkpoints/ # Context checkpoints
βββ scripts/ # Execution scripts
# Install Python dependencies
pip install pandas openpyxl
# Ensure Claude Code is running with MCP servers enabled# Check current progress
python scripts/run_scraper.py
# This will show:
# - URLs to scrape
# - Playwright MCP commands
# - Context usage
# - Progress trackingUse the generated Playwright MCP commands:
# Navigate to URL
mcp__puppeteer__puppeteer_navigate(url="https://aloa.co/")
# Extract content
mcp__puppeteer__puppeteer_evaluate(script=extraction_script)
# Capture screenshot
mcp__puppeteer__puppeteer_screenshot(name="aloa_home")# After scraping, run competitive analysis
python scripts/run_scraper.py # Will auto-detect completion and run analysis- Batched Processing: 5 URLs at a time
- Context-Aware: Monitors token usage
- Auto-Checkpointing: Saves state at 70% context
- Error Recovery: Resumes from last checkpoint
- Messaging Comparison: Aloa vs HeroForge
- Gap Identification: Missing elements and opportunities
- Copy Adaptation: Transform competitor copy for HeroForge
- Strategic Recommendations: Positioning and differentiation
- Keyword Extraction: Primary and secondary keywords
- Content Structure: H1s, meta descriptions, content length
- Technical SEO: Schema, speed, internal linking
- Recommendations: SEO improvements for HeroForge
- Real-time Monitoring: Track context usage
- Automatic Checkpointing: Save state before overflow
- Memory Optimization: Offload raw data, keep patterns
- Recovery System: Resume from any checkpoint
- Navigates to URLs using Playwright MCP
- Extracts content with JavaScript
- Saves raw data immediately
- Updates progress tracking
- Loads data from files (not memory)
- Uses Sequential Thinking MCP for patterns
- Generates competitive insights
- Creates SEO recommendations
- Monitors all operations
- Manages context window
- Coordinates agent handoffs
- Prevents hallucination
{
"url": "https://aloa.co/",
"hero": ["Transform Your Business with AI"],
"ctas": ["Start Free Trial", "Book Demo"],
"value_props": ["10x faster", "Enterprise-grade"],
"all_text": "..."
}{
"gaps_opportunities": {
"differentiation_opportunities": [
"Word-of-mouth growth emphasis",
"Rapid generation vs custom development"
]
},
"copy_adaptations": {
"hero_headlines": ["Generate AI Apps in Days"],
"ctas": ["Start Generating Now"]
}
}{
"keyword_analysis": {
"primary_keywords": ["ai", "development"],
"keyword_gaps": ["rapid generation", "word-of-mouth"]
},
"recommendations": {
"title_tags": ["HeroForge - AI App Generator"],
"meta_descriptions": ["Generate AI apps in days..."]
}
}- Verification Required: All claims must reference files
- Activity Logging: Every action logged with timestamp
- State Checking: Verify progress before claiming completion
- File Validation: Check output files exist before proceeding
Monitor in real-time:
# Watch activity log
tail -f .claude/AGENT_ACTIVITY_LOG.jsonl | jq '.'
# Check progress
cat state/progress.json | jq '.'
# Monitor context usage
cat state/current_session.json | jq '.context_usage'Edit data/input/aloa_urls.json:
{
"urls": [
{
"url": "https://aloa.co/",
"category": "landing",
"status": "pending"
}
]
}See .claude/CLAUDE.md for:
- MCP server priorities
- Batching strategies
- Context thresholds
- Recovery procedures
# Start monitoring
watch -n 5 'python scripts/monitor.py'Shows:
- Current agent activity
- Context usage percentage
- URLs completed
- Errors and warnings
# Find latest checkpoint
ls -t state/checkpoints/ | head -1
# Resume from checkpoint
python scripts/run_scraper.py --resume checkpoint_001- β Aloa.co scraping
- β Competitive analysis
- β Basic SEO analysis
- β Context management
- Multiple competitor support
- Advanced SEO tracking
- Backlink analysis
- Content gap analysis
- Frontend dashboard
- API for programmatic access
- Automated monitoring
- AI-powered insights
- Speed: "Days not months" positioning
- Growth: Built-in word-of-mouth features
- Accessibility: No technical team required
- Completeness: Full-stack from day one
- Implement top CTAs from analysis
- Test adapted hero headlines
- Create comparison pages
- Build speed-focused case studies
For issues or questions:
- Check
.claude/AGENT_ACTIVITY_LOG.jsonlfor errors - Review
state/progress.jsonfor status - Verify checkpoints in
state/checkpoints/ - Run recovery script if needed
Built with Claude Code MCP integration for maximum efficiency and reliability π