Before writing a single line of code:
tasks/lessons.md — avoid repeating past mistakestasks/todo.md — know current state and open itemsGitHub Actions → ALL automation that repeats or persists
(pipelines, watchdogs, feeds, digests, crons)
Claude Code → Implementation, debugging, one-off fixes
Local scripts → NEVER for anything that needs to run unattended
claude --dangerously-skip-permissions
Do NOT ask for permissions. Do not stop for confirmation. Execute every step to completion.
GET /repos/{owner}/{repo}/actions/runsGET /repos/{owner}/{repo}/actions/runs/{id}/jobsGET /admin/api/2023-10/products.jsontasks/todo.md FIRSTtasks/
todo.md # Current session plan + progress
lessons.md # Accumulated rules from past corrections
After ANY correction from Nick:
tasks/lessons.md:
## [DATE] — [SHORT LABEL]
MISTAKE: [what happened]
ROOT CAUSE: [why it happened]
RULE: [specific rule that prevents recurrence]
EdisonHaus repo secrets:
SHOPIFY_ACCESS_TOKEN [stored in GitHub Secrets]
ANTHROPIC_API_KEY [stored in GitHub Secrets]
CJ_API_KEY [stored in GitHub Secrets]
GH_PAT [stored in GitHub Secrets]
DwellPicks repo secrets:
ANTHROPIC_API_KEY [stored in GitHub Secrets]
GH_PAT [stored in GitHub Secrets]
GMAIL_APP_PASSWORD [stored in GitHub Secrets]
CJ API Auth (always use this endpoint — not email/password):
POST https://developers.cjdropshipping.com/api2.0/v1/authentication/getAccessToken
Body: { "apiKey": "[CJ_API_KEY]" }
.github/workflows/workflow_dispatch for manual triggers during testing[skip ci] suffix to avoid infinite loopsb3_product_pipeline.py → Mon & Thu 3am EST (CJ fetch → Shopify create → Claude describe/title)
b3_description_writer.py → Tue & Fri 5am EST (fill missing descriptions)
b3_title_cleaner.py → Wed 1:30am EST (rewrite CJ-format titles)
promo_feed_generator.py → Daily 12am EST (Google XML + Meta CSV → GitHub Pages)
b3_order_fulfiller.py → Hourly (route paid orders to CJ)
b3_ai_optimizer.py → Sun 9am UTC (rewrite weak descriptions)
watchdog.py → Every 30 min (health check all pipelines)
b3_daily_digest.py → 9am + 6pm EST (email status report)
Feed URLs (must stay live):
Google: https://viciousstudio-tech.github.io/edisonhaus-automation/feeds/google_feed.xml
Meta: https://viciousstudio-tech.github.io/edisonhaus-automation/feeds/meta_feed.csv
Pricing formula (NEVER modify without explicit instruction):
Cost < $5 → x2.5 | Cost < $15 → x2.2
Cost < $30 → x2.0 | Cost >= $30 → x1.8
Floor: $14.99 | Round to $x.99 | Skip if margin < 35%
Weekly pipeline → Sundays 8am UTC (15 articles via Claude AI)
Monitor → Every 6 hours (health check + alerts)
Affiliate tag: viciousstudio-20
ASIN Rule: ALL articles must link to real product ASINs (amazon.com/dp/ASIN). NEVER link to search results pages (amazon.com/s?k=). This is a hard block on commissions.
# b3_daily_digest.py must include ALL of these:
- 🛒 Orders (24h count + revenue)
- 💰 Revenue (all-time)
- 🔗 CJ API status (auth working Y/N)
- 🛍️ Google Merchant Center (last submission time + item count)
- 📌 Pinterest Catalog (last sync + shoppable pin count)
- 📘 Meta feed (last update + product count)
- ⚙️ GitHub Actions (last run status per workflow)
- 🚨 URGENT alerts (any errors, send immediately with 🚨 prefix)
After every session where something changed, output:
PROJECT BIBLE UPDATE — [DATE]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHANGED: [what changed — be specific]
STATUS: [new live state of affected system]
PENDING REMOVED: [items now complete]
PENDING ADDED: [new blockers or next steps discovered]
LESSONS ADDED: [any new rules added to tasks/lessons.md]
Product images must come from actual Amazon product listing pages. NEVER use stock photos or AI-generated images for product listings.
CLAUDE.md instruction: When compacting, preserve the full list of modified files, current test status, and any open error states.