1.4 KiB
1.4 KiB
last30days Implementation Tasks
Setup & Configuration
- Create directory structure
- Write SPEC.md
- Write TASKS.md
- Write SKILL.md with proper frontmatter
Core Library Modules
- scripts/lib/env.py - Environment and API key loading
- scripts/lib/dates.py - Date range and confidence utilities
- scripts/lib/cache.py - TTL-based caching
- scripts/lib/http.py - HTTP client with retry
- scripts/lib/models.py - Auto model selection
- scripts/lib/schema.py - Data structures
- scripts/lib/openai_reddit.py - OpenAI Responses API
- scripts/lib/xai_x.py - xAI Responses API
- scripts/lib/reddit_enrich.py - Reddit thread JSON fetcher
- scripts/lib/normalize.py - Schema normalization
- scripts/lib/score.py - Popularity scoring
- scripts/lib/dedupe.py - Near-duplicate detection
- scripts/lib/render.py - Output rendering
Main Script
- scripts/last30days.py - CLI orchestrator
Fixtures
- fixtures/openai_sample.json
- fixtures/xai_sample.json
- fixtures/reddit_thread_sample.json
- fixtures/models_openai_sample.json
- fixtures/models_xai_sample.json
Tests
- tests/test_dates.py
- tests/test_cache.py
- tests/test_models.py
- tests/test_score.py
- tests/test_dedupe.py
- tests/test_normalize.py
- tests/test_render.py
Validation
- Run tests in mock mode
- Demo --emit=compact
- Demo --emit=context
- Verify file tree