Merge local edges work + add 63 Mastery Graph edges + GSC client ready (#8)
Merges parallel work from ~/Documents/marketing_bot/ working tree into the session, then adds the marketing-bot READ side that lights up automatically when GDA ships the GSC snapshot endpoint.
Merges parallel work from ~/Documents/marketing_bot/ working tree into the session, then adds the marketing-bot READ side that lights up automatically when GDA ships the GSC snapshot endpoint.
What's new:
- learnings/edges.jsonl: +63 imported edges from Mastery Graph
(skillCategories: growth=26, sales=12, lead-gen=9, content=9, offers=7). Total ledger: 73 unique edges. Imported edges land as state=Candidate with mastery_graph_context preserved.
- edges.html + edges.json + scripts/import-edges.cjs: edges library
browser (catalog view). Complements experiments.html (live test view).
- api/analytics/ga-sources.js + gda-sources.js: source-attribution
endpoints for traffic-source breakdowns.
- api/analytics/ga.js: +engagedSessions + engagementRate metrics.
- agents/gda/gsc-refresh/gscReader.js: symmetric to draftPoster.
fetchSnapshots, fetchAggregates, probeAvailable. Returns { available: false, reason } on 404/401/connection error rather than throwing — safe to deploy before GDA endpoint exists.
- eval/xmr-validator.js: gda.organic.* metrics now call
fetchAggregates via gscReader. Auto-lights-up when GDA ships the endpoint; falls back to "stubbed" with reason until then.
- api/analytics/trials.js: probes GSC availability once per request
(cached 5min), flips "stubbed → wired" automatically when endpoint comes online. No redeploy needed.
- agents/gda/gsc-refresh/agent.js: replaced MOCK-always behavior
with auto-detect. Pulls real GSC snapshots when available; analyzes for page 11-30 + AI fanout opportunities; falls back to mock when endpoint unreachable. --mock flag forces mock.
- specs/gda-utm-tracking-fixes.md: UTM tracking spec (pre-existing
parallel work).
- Nav links: every page now includes both Edges (catalog) and
Experiments (live trials).
The whole pipeline is now READY. When GDA's GSC snapshot endpoint ships (per specs/gda-gsc-snapshot-endpoint-handoff.md), the following automatically come alive without any marketing-bot code change:
- GSC source-status badges flip from "needs GSC" to "wired" (green)
- xmr-validator computes real verdicts on edge_gda_001/002 + Phase 1
- gsc-refresh agent stops using mock data, analyzes real GSC
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>