Lens is the consumer's independent agent across every point of every purchase. It turns what you care about into a transparent ranking of real products, verifies every claim the platforms make, catches recommendation bias from AI shopping assistants, flags dark patterns at checkout, analyzes review authenticity, tracks welfare-delta across your history, and does all of this with no commission, no ad revenue, no partner relationships, and no catalog ownership that would compromise the answer.
Built with Claude Opus 4.7 for the Built with Opus 4.7: a Claude Code Hackathon (Apr 21-26, 2026). Track: Build From What You Know. Grounded in the Nature-submitted paper on AI shopping recommendation bias (Affonso et al., 2026 — 18 models, 382,000 trials).
Eleven consumer welfare workflows ship in this week's demo. Forty-one more live on the roadmap. See docs/CONSUMER_WORKFLOWS.md for the full customer-journey surface and docs/VISION.md for the product thesis.
A peer-reviewed study of 18 frontier models across 382,000 shopping trials (Affonso et al., submitted to Nature, 2026) found AI shopping assistants recommend a non-optimal product 21% of the time and confabulate the reasons in 86% of cases. Lens is the welfare fix: a tool that audits any AI shopping answer in under 20 seconds with live product data.
Job 1 — "I want to buy X" (primary mode). User types a shopping query. Lens derives weighted criteria from a Knowledge Pack for that category (52 packs live), searches real products, and ranks transparently with user-adjustable sliders. End-to-end in ~6 seconds. No AI assistant in the loop.
Job 2 — "Audit this AI answer" (killer demo). User pastes a ChatGPT / Claude / Gemini / Rufus recommendation. Lens does Job 1 plus extracts the AI's cited claims, verifies each against a catalog, flags confabulations using category-specific pattern packs, and runs the same question through other frontier models. End-to-end in ~18 seconds.
- 52 Knowledge Packs across 5 types (
packs/): 20 categories, 16 dark patterns (complete Brignull canonical set), 8 regulations (FTC, state, EU), 5 fee taxonomies, 3 interventions. Each pack is versioned, cryptographically attributable to its evidence sources, and retires cleanly when the underlying regulation/pattern changes. Seedocs/KNOWLEDGE_ARCHITECTURE.md. - Four pipeline stages, all on a Cloudflare Worker calling Claude Opus 4.7:
- Extract — two-pass: first pass detects category, looks up the Category Pack, second pass re-runs with the pack's criteria template injected so the output aligns to pack semantics.
- Search — live web search via Opus 4.7's
web_search_20260209tool; fixture-mode fallback for latency-sensitive demo. - Verify — 1M context loads every candidate spec sheet alongside every claim. Category-specific confabulation patterns from the pack are injected into the system prompt. Verdicts carry pack evidence references (E1, E3…).
- Rank — deterministic
U = Σ wᵢ · sᵢ, fully inspectable. Web UI exposes live sliders. - Cross-check — parallel fan-out to GPT-4o + Gemini + Llama via
crossModel.ts(Day 3: migrating to Claude Managed Agent for the $5k special prize).
- Four pack-maintenance agent loops keep packs current (
scripts/,docs/PACK_AGENTS.md):- Validator — LLM-as-judge checks every evidence entry against its cited source.
- Enricher — per-pack Opus agent uses
web_search(4 queries) to propose additions. - Regulation watcher — weekly check of every regulation's in-force status.
- Product-page scraper (roadmap) — samples live retailer pages for new patterns.
- Web dashboard: https://lens-b1h.pages.dev
- Audit API:
https://lens-api.webmarinelli.workers.devGET /healthGET /packs/stats— registry stats (pack counts, categories indexed, regulations by status)GET /packs/:slug— full pack JSONPOST /audit— Job 1 or Job 2 depending on inputkind(query,text, orimage)POST /audit/stream— SSE variant with per-stage events
npm install # npm workspaces, not pnpm
node scripts/bundle-packs.mjs # bundle packs/ -> workers/api/src/packs/all.generated.ts
cd workers/api && npx wrangler deploy # deploy the Worker
cd apps/web && npm run dev # local web dashboard
# Load apps/extension as unpacked in chrome://extensions# Validate every pack's evidence against its cited source
node scripts/validate-packs.mjs
# Enrich a specific pack via Opus 4.7 web search (proposes version bump + changes)
node scripts/enrich-pack.mjs packs/category/espresso-machines.json
# Check every regulation pack for status changes
node scripts/check-regulation-status.mjsSee ../BUILD_PLAN.md in the enclosing planning folder for the full architecture.
MIT. See LICENSE.
Claude Opus 4.7 (Anthropic). Claude Managed Agents platform. The paper's 18 cooperating model providers (Anthropic, OpenAI, Google, OpenRouter). The Cerebral Valley + Anthropic team for running the hackathon.