Skip to content

Releases: youtube-jocoding/funnel-optimize

v0.2.0 — two tracks + six gates

Choose a tag to compare

@youtube-jocoding youtube-jocoding released this 05 Jul 06:25
b8eff9d

Ground-up rework of the operating model, distilled from 15 real operating cycles (18k+ users). v1 produced one experiment per cycle; the field data showed most revenue-relevant improvements came from repairing defects real users hit — and forced experiments died unjudgeable. v2 encodes that.

Highlights

  • Two tracks: an always-on session-replay repair loop (Phase R) + a gated experiment track
  • Six gates: G0 analyzed==deployed · G1 measurement-integrity audit · G2 bottleneck router · G3 method fit (sample volume picks randomized A/B vs pre-registered pre/post) · G4 ship on real revenue only · G5 judgment-window discipline
  • Phase R scripts shipped: audit-replays.mjs (deterministic DOM audit of real sessions at each user's recorded viewport, verified-fixed/regression tracking, zero API cost), analyze-replays.mjs (video + high-DPI stills → Gemini), fully config-driven — no project hardcodes
  • Self-contained skill: SKILL.md + 4 reference docs (operate-mode, replay-repair-loop, experiment-design, learnings) travel together on install
  • 45 distilled lessons with evidence + generalized form
  • New optional config: revenue_truth, i18n.primary_locale/primary_script_regex, project.url_pattern, replay.prompt_context

Install / upgrade

/plugin marketplace add youtube-jocoding/funnel-optimize
/plugin install funnel-optimize@funnel-optimize

Manual: see the README quickstart — note the skill copy is now cp -r (the whole skill directory, not just SKILL.md).

Phase R extras (optional): npm i -D playwright-core && npx playwright install chromium, GEMINI_API_KEY for the vision pass (R-1 needs no key).

Full changelog: https://github.com/youtube-jocoding/funnel-optimize/blob/main/CHANGELOG.md

v0.1.1 — Claude Code plugin marketplace support

Choose a tag to compare

@youtube-jocoding youtube-jocoding released this 03 May 08:04

Adds one-line install via Claude Code plugin marketplace:

/plugin marketplace add youtube-jocoding/funnel-optimize
/plugin install funnel-optimize@funnel-optimize

Then run /funnel-discover (one-time) and /funnel-optimize (weekly).

What's new

  • .claude-plugin/plugin.json + marketplace.json: makes the repo /plugin-installable
  • Skill moved to skills/funnel-optimize/SKILL.md (Claude Code plugin convention)
  • README badges (release version, GitHub stars, PRs welcome)
  • README 'Install in Claude Code' section above manual quickstart

Manual git clone install still works — see updated README.

Full changelog

https://github.com/youtube-jocoding/funnel-optimize/blob/main/CHANGELOG.md#011--2026-05-03

v0.1.0 — first public release

Choose a tag to compare

@youtube-jocoding youtube-jocoding released this 03 May 07:56

Changelog

All notable changes to funnel-optimize will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

0.1.0 — 2026-05-03

First public release. Extracted from animalface.site's funnel automation, generalized for any PostHog + Claude Code project.

Added

  • Discovery mode (scripts/discover.mjs) — 4-phase first-time setup:
    • D-1: Project analysis (framework / language / payment libraries / active components)
    • D-2: PostHog event catalog dump (top by volume / revenue-related / activation-related)
    • D-3: KPI interview prompt generation (for Claude Code to ask user 6 questions)
    • D-4: funnel-config.json auto-generation from interview answers
  • Operate mode — 7-Phase weekly pipeline:
    • Phase 1: collect-data.mjs + evaluate-experiment.mjs
    • Phase 2: Diagnostic analysis (Claude reads snapshot, writes report)
    • Phase 3: Triple-Agent experiment design (Claude + Codex + Gemini in parallel)
      • Layer 1: compare-proposals.mjs automated scoring (100 points across 8 dimensions)
      • Layer 2: synthesize-winner.sh AI PM judgment (6 dimensions, can flip Layer 1)
    • Phase 4: implement-experiment.mjs (apply code + create PostHog flag + auto-rollback)
    • Phase 5/5-C: Result analysis + code cleanup (remove useExperiment())
    • Phase 7: archive.mjs + git commit + PR
  • Triple-Agent orchestration with optional CLI fallback:
    • Claude required (orchestrator hard-fails without it)
    • Codex/Gemini optional — auto-skipped with [INFO] log if not installed
  • Security scanner in lib.mjs scanForSecurityIssues():
    • Detects eval/Function/innerHTML/document.cookie/script-tag/Stripe-key patterns
    • Domain whitelist configurable via funnel-config.json guardrails.allowed_domains_for_redirects
  • Guardrail validator in lib.mjs validateGuardrails():
    • File whitelist with glob pattern support (src/components/*.tsx, src/**/*.tsx)
    • Dark pattern detection (fake urgency, fake social proof, deceptive buttons)
    • Max code changes limit
  • Cumulative learning via feedback-loop.mjs --ingest:
    • Records Kill/Ship outcomes to .funnel-state/patterns.json
    • Past patterns auto-injected into next week's agent prompts
  • Skill packaging for Claude Code (skill/SKILL.md)
    • /funnel-discover and /funnel-optimize slash commands
  • Docs — README, architecture, discovery-mode, operate-mode, customization, learnings, FAQ, CONTRIBUTING
  • Case studyexamples/animalface/ with 7-week retrospective (18,000 users, 5 experiments killed, 1 ship-and-revert, 1 success signal)

Validated by dogfood

Three rounds of validation against the original animalface.site project caught and fixed real bugs before public release:

  • collect-data.mjs healthRollup heuristicfunnel.steps.slice(4) fallback misclassified offerwall_redirect (auto-redirect) as user activation, inflating "activated" rate to 73% instead of correct 1.7%. Fix: prefer value_metrics.lir.events (activation events by definition) as fallback.
  • compare-proposals.mjs i18n coverage check — Hardcoded ko/en/ja language patterns caused false "Limited i18n coverage" warnings for OSS users with different language sets. Fix: read config.project.languages from funnel-config.json; skip check entirely for unconfigured projects.
  • discover.mjs payment library detection — Only inspected frontend package.json, missing payment SDKs in backend Cloud Run / API services. Fix: scan backend/, server/, api/, cloudrun/, functions/ directories + .env.example / Dockerfile / cloudrun.yaml for STRIPE_/IAMPORT_/TOSS_/PORTONE_/PAYPAL_ prefixes.
  • Layer 2 AI PM judgment validated — caught a Skip-the-Wait dark pattern that Layer 1 (automated scoring 85/100) missed, demonstrating the strategic value of two-stage evaluation.

Limitations

  • PostHog only — Mixpanel / Amplitude / GA4 adapters not yet implemented (v0.2 candidate)
  • No npm package — install via git clone + cp scripts/
  • No GitHub Action — automation triggered manually via Claude Code or cron

Roadmap

  • v0.2: Plugin interface for data sources (Mixpanel, Amplitude, GA4)
  • v0.3: npm package + CLI installer
  • v0.4: GitHub Action for weekly automation