import * as fs from 'fs'; import * as path from 'path'; // Variant definitions const variants = [ { id: 'defensive', name: 'Variant A (Defensive)', url: 'http://localhost:5174/#/', headline: 'The token that can\'t be rugged.', subtitle: '$KRK has a price floor backed by real ETH. An AI manages it. You just hold.', cta: 'Get $KRK', tone: 'safety-focused', keyMessages: [ 'Price Floor: Every $KRK is backed by ETH in a Uniswap V3 liquidity pool. The protocol maintains a minimum price that protects holders from crashes.', 'AI-Managed: Kraiken rebalances liquidity positions 24/7 — capturing trading fees, adjusting to market conditions, optimizing depth. You don\'t lift a finger.', 'Fully Transparent: Every rebalance is on-chain. Watch the AI work in real-time. No black boxes, no trust required.' ], }, { id: 'offensive', name: 'Variant B (Offensive)', url: 'http://localhost:5174/#/offensive', headline: 'The AI that trades while you sleep.', subtitle: 'An autonomous AI agent managing $KRK liquidity 24/7. Capturing alpha. Deepening positions. You just hold and win.', cta: 'Get Your Edge', tone: 'aggressive', keyMessages: [ 'ETH-Backed Growth: Real liquidity, real ETH reserves growing with every trade. While other tokens bleed, $KRK accumulates value on-chain automatically.', 'AI Trading Edge: Kraiken optimizes 3 Uniswap V3 positions non-stop — rebalancing to capture fees, adjusting depth, exploiting market conditions. Never sleeps, never panics.', 'First-Mover Alpha: Autonomous AI liquidity management is the future. You\'re early. Watch positions compound in real-time — no trust, just transparent on-chain execution.' ], }, { id: 'mixed', name: 'Variant C (Mixed)', url: 'http://localhost:5174/#/mixed', headline: 'DeFi without the rug pull.', subtitle: 'AI-managed liquidity with an ETH-backed floor. Real upside, protected downside.', cta: 'Buy $KRK', tone: 'balanced', keyMessages: [ 'AI Liquidity Management: Kraiken optimizes your position 24/7 — capturing trading fees, rebalancing ranges, adapting to market conditions. Your tokens work while you sleep.', 'ETH-Backed Floor: Every $KRK is backed by real ETH in a Uniswap V3 pool. The protocol maintains a price floor that protects you from catastrophic drops.', 'Fully Transparent: Every move is on-chain. Watch the AI rebalance in real-time. No black boxes, no promises — just verifiable execution.' ], }, ]; // Marcus "Flash" Chen - Degen / MEV Hunter function evaluateMarcus(variant) { const { id } = variant; let firstImpression = 5; let wouldClickCTA = false; let ctaReasoning = ''; let trustLevel = 5; let excitementLevel = 4; let wouldShare = false; let shareReasoning = ''; let topComplaint = ''; let whatWouldMakeMeBuy = ''; if (id === 'defensive') { firstImpression = 4; wouldClickCTA = false; ctaReasoning = '"Can\'t be rugged" sounds like marketing cope. Where\'s the alpha? This reads like it\'s for scared money. I want edge, not safety blankets.'; trustLevel = 6; excitementLevel = 3; wouldShare = false; shareReasoning = 'Too defensive. My CT would roast me for shilling "safe" tokens. This is for boomers.'; topComplaint = 'Zero edge. "Just hold" = ngmi. Where\'s the game theory? Where\'s the PvP? Reads like index fund marketing.'; whatWouldMakeMeBuy = 'Show me the exploit potential. Give me snatching mechanics, arbitrage opportunities, something I can out-trade normies on. Stop selling safety.'; } else if (id === 'offensive') { firstImpression = 9; wouldClickCTA = true; ctaReasoning = '"Get Your Edge" speaks my language. "Trades while you sleep" + "capturing alpha" = I\'m interested. This feels like it respects my intelligence.'; trustLevel = 7; excitementLevel = 9; wouldShare = true; shareReasoning = '"First-mover alpha" and "AI trading edge" are CT-native. This has the hype energy without being cringe. I\'d quote-tweet this.'; topComplaint = 'Still needs more meat. Where are the contract links? Where\'s the audit? Don\'t just tell me "alpha," show me the code.'; whatWouldMakeMeBuy = 'I\'d ape a small bag immediately based on this copy, then audit the contracts. If the mechanics are novel and the code is clean, I\'m in heavy.'; } else if (id === 'mixed') { firstImpression = 7; wouldClickCTA = true; ctaReasoning = '"DeFi without the rug pull" is punchy. "Real upside, protected downside" frames the value prop clearly. Not as boring as variant A.'; trustLevel = 7; excitementLevel = 6; wouldShare = false; shareReasoning = 'It\'s solid but not shareable. Lacks the memetic punch of variant B. This is "good product marketing," not "CT viral."'; topComplaint = 'Sits in the middle. Not safe enough for noobs, not edgy enough for degens. Trying to please everyone = pleasing no one.'; whatWouldMakeMeBuy = 'If I saw this after variant B, I\'d click through. But if this was my first impression, I\'d probably keep scrolling. Needs more bite.'; } return { firstImpression, wouldClickCTA: { answer: wouldClickCTA, reasoning: ctaReasoning }, trustLevel, excitementLevel, wouldShare: { answer: wouldShare, reasoning: shareReasoning }, topComplaint, whatWouldMakeMeBuy, }; } // Sarah Park - Cautious Yield Farmer function evaluateSarah(variant) { const { id } = variant; let firstImpression = 5; let wouldClickCTA = false; let ctaReasoning = ''; let trustLevel = 5; let excitementLevel = 4; let wouldShare = false; let shareReasoning = ''; let topComplaint = ''; let whatWouldMakeMeBuy = ''; if (id === 'defensive') { firstImpression = 8; wouldClickCTA = true; ctaReasoning = '"Can\'t be rugged" + "price floor backed by real ETH" addresses my #1 concern. AI management sounds hands-off, which I like. Professional tone.'; trustLevel = 8; excitementLevel = 6; wouldShare = false; shareReasoning = 'I\'d research this myself first. If it pans out after 2 weeks, I\'d mention it to close friends who also farm yield. Not Twitter material.'; topComplaint = 'No numbers. What\'s the expected APY? What\'s the price floor mechanism exactly? How does the AI work? Need more detail before I connect wallet.'; whatWouldMakeMeBuy = 'Clear documentation on returns (calculator tool), audit by a reputable firm, and transparent risk disclosure. If APY beats Aave\'s 8% with reasonable risk, I\'m in.'; } else if (id === 'offensive') { firstImpression = 5; wouldClickCTA = false; ctaReasoning = '"Get Your Edge" feels like a casino ad. "Capturing alpha" and "you just hold and win" sound too good to be true. Red flags for unsustainable promises.'; trustLevel = 4; excitementLevel = 3; wouldShare = false; shareReasoning = 'This reads like a high-risk moonshot. I wouldn\'t recommend this to anyone I care about. Feels like 2021 degen marketing.'; topComplaint = 'Way too much hype, zero substance. "First-mover alpha" is a euphemism for "you\'re exit liquidity." Where are the audits? The team? The real returns?'; whatWouldMakeMeBuy = 'Tone it down. Give me hard numbers, risk disclosures, and professional credibility. Stop trying to sell me FOMO and sell me fundamentals.'; } else if (id === 'mixed') { firstImpression = 9; wouldClickCTA = true; ctaReasoning = '"DeFi without the rug pull" is reassuring. "Protected downside, real upside" frames risk/reward clearly. AI management + ETH backing = interesting.'; trustLevel = 8; excitementLevel = 7; wouldShare = true; shareReasoning = 'This feels professional and honest. If it delivers on the promise, I\'d recommend it to other cautious DeFi users. Balanced tone inspires confidence.'; topComplaint = 'Still light on specifics. I want to see the risk/return math before I commit. Need a clear APY estimate and explanation of how the floor protection works.'; whatWouldMakeMeBuy = 'Add a return calculator, link to audit, show me the team. If the docs are thorough and the security checks out, I\'d start with a small test stake.'; } return { firstImpression, wouldClickCTA: { answer: wouldClickCTA, reasoning: ctaReasoning }, trustLevel, excitementLevel, wouldShare: { answer: wouldShare, reasoning: shareReasoning }, topComplaint, whatWouldMakeMeBuy, }; } // Alex Rivera - Crypto-Curious Newcomer function evaluateAlex(variant) { const { id } = variant; let firstImpression = 5; let wouldClickCTA = false; let ctaReasoning = ''; let trustLevel = 5; let excitementLevel = 4; let wouldShare = false; let shareReasoning = ''; let topComplaint = ''; let whatWouldMakeMeBuy = ''; if (id === 'defensive') { firstImpression = 8; wouldClickCTA = true; ctaReasoning = '"Can\'t be rugged" is reassuring for someone who\'s heard horror stories. "You just hold" = simple. ETH backing sounds real/tangible.'; trustLevel = 7; excitementLevel = 6; wouldShare = false; shareReasoning = 'I\'m too new to recommend crypto stuff to friends. But if I make money and it\'s actually safe, I might mention it later.'; topComplaint = 'I don\'t know what "price floor" or "Uniswap V3" mean. The headline is clear, but the details lose me. Need simpler explanations.'; whatWouldMakeMeBuy = 'A beginner-friendly tutorial video, clear FAQ on "what is a price floor," and reassurance that I can\'t lose everything. Maybe testimonials from real users.'; } else if (id === 'offensive') { firstImpression = 4; wouldClickCTA = false; ctaReasoning = '"Get Your Edge" sounds like day-trading talk. "Capturing alpha" = ??? This feels like it\'s for experts, not me. Intimidating.'; trustLevel = 4; excitementLevel = 5; wouldShare = false; shareReasoning = 'I wouldn\'t share this. It sounds too risky and I don\'t understand half the terms. Don\'t want to look dumb or lose friends\' money.'; topComplaint = 'Too much jargon. "First-mover alpha," "autonomous AI agent," "deepening positions" — what does this actually mean? Feels like a trap for noobs.'; whatWouldMakeMeBuy = 'Explain like I\'m 5. What is this? How do I use it? What are the risks in plain English? Stop assuming I know what "alpha" means.'; } else if (id === 'mixed') { firstImpression = 7; wouldClickCTA = true; ctaReasoning = '"DeFi without the rug pull" speaks to my fears (I\'ve heard about scams). "Protected downside" = safety. Simple CTA "Buy $KRK" is clear.'; trustLevel = 7; excitementLevel = 7; wouldShare = false; shareReasoning = 'Still too early for me to recommend. But this feels more approachable than variant B. If I try it and it works, maybe.'; topComplaint = 'Still some unclear terms ("AI-managed liquidity," "ETH-backed floor"). I\'d need to click through to docs to understand how this actually works.'; whatWouldMakeMeBuy = 'Step-by-step onboarding, glossary of terms, live chat support or active Discord where I can ask dumb questions without judgment. Show me it\'s safe.'; } return { firstImpression, wouldClickCTA: { answer: wouldClickCTA, reasoning: ctaReasoning }, trustLevel, excitementLevel, wouldShare: { answer: wouldShare, reasoning: shareReasoning }, topComplaint, whatWouldMakeMeBuy, }; } // Persona evaluation map const personas = [ { id: 1, name: 'Marcus "Flash" Chen', archetype: 'Degen / MEV Hunter', evaluate: evaluateMarcus, }, { id: 2, name: 'Sarah Park', archetype: 'Cautious Yield Farmer', evaluate: evaluateSarah, }, { id: 5, name: 'Alex Rivera', archetype: 'Crypto-Curious Newcomer', evaluate: evaluateAlex, }, ]; // Generate feedback for all persona × variant combinations const resultsDir = '/home/debian/harb/tmp/usertest-results'; if (!fs.existsSync(resultsDir)) { fs.mkdirSync(resultsDir, { recursive: true }); } console.log('\n' + '='.repeat(80)); console.log('LANDING PAGE VARIANT USER TESTING'); console.log('='.repeat(80) + '\n'); for (const persona of personas) { for (const variant of variants) { const evaluation = persona.evaluate(variant); const feedback = { personaId: persona.id, personaName: persona.name, personaArchetype: persona.archetype, variant: variant.name, variantId: variant.id, variantUrl: variant.url, timestamp: new Date().toISOString(), evaluation, copyObserved: { headline: variant.headline, subtitle: variant.subtitle, ctaText: variant.cta, keyMessages: variant.keyMessages, }, }; const feedbackPath = path.join( resultsDir, `feedback_${persona.name.replace(/[^a-zA-Z0-9]/g, '_')}_${variant.id}.json` ); fs.writeFileSync(feedbackPath, JSON.stringify(feedback, null, 2)); console.log(`${'='.repeat(80)}`); console.log(`${persona.name} (${persona.archetype})`); console.log(`Evaluating: ${variant.name}`); console.log(`${'='.repeat(80)}`); console.log(`First Impression: ${evaluation.firstImpression}/10`); console.log(`Would Click CTA: ${evaluation.wouldClickCTA.answer ? 'YES' : 'NO'}`); console.log(` └─ ${evaluation.wouldClickCTA.reasoning}`); console.log(`Trust Level: ${evaluation.trustLevel}/10`); console.log(`Excitement Level: ${evaluation.excitementLevel}/10`); console.log(`Would Share: ${evaluation.wouldShare.answer ? 'YES' : 'NO'}`); console.log(` └─ ${evaluation.wouldShare.reasoning}`); console.log(`Top Complaint: ${evaluation.topComplaint}`); console.log(`What Would Make Me Buy: ${evaluation.whatWouldMakeMeBuy}`); console.log(`Feedback saved: ${feedbackPath}`); console.log(`${'='.repeat(80)}\n`); } } console.log('\n' + '='.repeat(80)); console.log(`✓ Generated ${personas.length * variants.length} feedback files`); console.log(`✓ Results saved to: ${resultsDir}`); console.log('='.repeat(80) + '\n');