Skip to content

Files

Latest commit

0f48d98 · May 9, 2026

History

History
119 lines (83 loc) · 6.54 KB

File metadata and controls

119 lines (83 loc) · 6.54 KB

Roadmap

Concise phase-by-phase plan to v1 on the Chrome Web Store. Mirrors the detailed planning doc the team uses internally; update this when a phase ships.

Phase 0 — Cleanup & honest baseline ✅

  • Archived dead Python detectors and over-claimed CLIP docs to archive/.
  • Rewrote README.md, added ARCHITECTURE.md, ROADMAP.md, CHANGELOG.md, AGENTS.md.
  • Repo root is empty of source code, ready for the Vite project in Phase 1.

Phase 1 — Build system & extension shell ✅

Goal: Vite + CRXJS + TypeScript + React + Tailwind project at the repo root that loads as an unpacked extension and reproduces the v0.1 click-to-scan flow without ML (mock results only). CI green.

  • npm init + Vite + @crxjs/vite-plugin + React + TypeScript + Tailwind.
  • manifest.config.ts with the minimum-viable permission set (no <all_urls>).
  • Port v0.1 popup/options/content/background to TS + React.
  • Add offscreen.html + offscreen TS entry (no model wired in yet).
  • GitHub Actions: typecheck + ESLint + Vitest + Vite build on every PR.
  • A loadable dist/ that surfaces a "MOCK" badge on visible images.

Phase 2 — Real local image detection

Goal: Browser-side ONNX inference replaces mock; works on auth-gated images that v0.1 couldn't reach.

Detailed step-by-step is in IMPLEMENTATION.md §3. Don't restate decisions there.

  • Default model: Organika/sdxl-detector at q8 — locked. Benchmark deferred to Phase 2.5.
  • Integrate @huggingface/transformers in offscreen document. WebGPU with WASM fallback (device: 'auto').
  • Pin to a specific model revision hash. GitHub Releases fallback via scripts/mirror-model.sh.
  • Hybrid image fetch: canvas first; on SecurityError fall back to fetch(src, {credentials:'include'}) from the background SW.
  • IndexedDB cache keyed by SHA-256(bytes) + modelId + provider. 7-day TTL.
  • Confidence threshold slider in Options. Default 0.55 for images. Below band → "Uncertain" badge.
  • First-scan UX: progress bar in popup ("Loading detector — one-time, ~22 MB").
  • Power-user localImageModel override in Options.

Phase 2.5 — Local image model benchmark

Goal: Replace Organika/sdxl-detector with the best-performing model under 100 MB on a maintainer-curated test set. Run after Phase 2 ships and is in real use.

Detailed scaffold in IMPLEMENTATION.md §4.

  • Maintainer curates ~30 known-AI + ~30 known-real images into bench/fixtures/.
  • Agent runs npm run bench against 3-4 candidates.
  • Output: bench/results/YYYY-MM-DD.md with accuracy/F1/size table + recommendation.
  • Maintainer reviews; if approved, default model + revision SHA bumped, GH Releases mirror updated.

Phase 3 — Real local text detection

Goal: "Detect AI in selection" works for arbitrary text.

Detailed step-by-step in IMPLEMENTATION.md §5.

  • Default model: Hello-SimpleAI/chatgpt-detector-roberta at q8 (~32 MB). Document the known weakness on Claude/Gemini-generated text.
  • UX: right-click context menu + popup button on selected text. Toast only — no in-page highlights for v1.
  • Min selection: 100 characters. Below → "Selection too short" toast.
  • Default text threshold: 0.70 (more conservative than image's 0.55) — biases toward "Uncertain".
  • Sliding-window aggregation for long passages: 512-token chunks with 64-token overlap, mean of per-chunk probabilities.
  • Skip selections whose activeElement is <input> or <textarea>.

Phase 4 — BYO API key boost mode

Goal: Users with a Gemini/OpenAI/HF key get materially higher accuracy.

Detailed step-by-step in IMPLEMENTATION.md §6.

  • Provider adapters under src/detectors/{image,text}/{gemini,openai,hf}.ts. All implement same ClassificationResult shape.
  • LLM image classification uses structured JSON output (Gemini responseSchema, OpenAI response_format: json_schema). HF uses real classifier endpoints.
  • Boost-mode failure → fall back to local with visible toast (locked default): "Boost failed (rate limited) — using local model".
  • Client-side rate limiting: 10 RPM per provider, queue and trickle, settings override.
  • Cache BYO results separately by provider in cache key.
  • Options page: provider picker, masked key input, "Test" button, per-provider quota hint, fallback toggle, rate-limit input.
  • Result UI tags the source: Gemini · 94% vs Local · 87%.

Phase 5 — UX polish

Goal: The product feels designed, not assembled.

  • Refreshed badge / pill design. Light + dark theme aware. Accessible contrast.
  • Popup main view: thumbnails of recent results, per-item "Why?" popover with raw scores, per-item "Mark wrong" feedback (stored locally for now).
  • Right-click context menu items: "Analyze this image" (single-image mode), "Detect AI in selection".
  • Keyboard shortcut: Cmd/Ctrl+Shift+A to scan visible images.
  • Light/dark theme detection.

Phase 6 — Privacy, legal, Web Store prep

Goal: Listing-ready.

  • Privacy policy hosted on GitHub Pages.
  • Single-purpose statement.
  • Permission justifications.
  • Promo art: 1280×800 hero, 440×280 small tile, 5 screenshots, optional 30-sec demo MP4.
  • Store description (short + detailed).

Phase 7 — Release pipeline & post-launch

Goal: One-command shipping. Real users can file issues.

  • GitHub Action: tag-triggered build → zip → upload to Chrome Web Store via chrome-webstore-upload-cli as draft.
  • npm version patch/minor/major to bump.
  • Opt-in Sentry error reporting.
  • Issue templates + FEEDBACK.md.

Out of scope for v1

These are intentionally deferred so v1 can ship in ~3–4 weeks:

  • Hosted backend / our own inference API
  • User accounts, auth, payments
  • Anonymous telemetry (will revisit if real usage data becomes useful)
  • A docs site (the archived Sphinx site is not coming back unless real users ask)
  • Mobile / Firefox / Safari ports
  • Provenance signals beyond the model (C2PA / EXIF / watermark detection)

Honest risks

  • Local-model accuracy degrades over time as new generators ship. Plan to re-benchmark every ~3 months and bump the local model.
  • Text detection has well-documented false-positive issues on non-native English writing and templated text. Default to "Uncertain" liberally.
  • Boost-mode UX has a one-time friction cliff (find a key, paste it). Worth it for power users; we won't push it on casuals.