import type { DeepSimFixture } from "./types";

export type DeepSimFixtureKey = "investor" | "founder" | "market_entry";

export const DEEP_SIM_FIXTURES: Record<DeepSimFixtureKey, DeepSimFixture> = {
  investor: {
    key: "investor",
    id: "golden_investor_diligence_001",
    name: "Acme AI Series A Diligence",
    workflow: "investor_diligence",
    frozenAt: "2026-03-01T00:00:00Z",
    sourcePacket: {
      sources: [
        { type: "filing", ref: "10-K Q4 2025", summary: "14 months runway, $2.1M ARR, 34% QoQ growth." },
        { type: "interview", ref: "Founder interview 2026-02-15", summary: "Targeting $12M pre-money with 3 warm intros to tier-1 funds." },
        { type: "signal", ref: "Crunchbase 2026-02", summary: "Direct competitor Series A closed; two adjacent rounds remain active." },
        { type: "market", ref: "PitchBook AI Infrastructure Q1 2026", summary: "Deal count is down, but median round size is still rising." },
        { type: "product", ref: "GitHub commit velocity", summary: "1,847 commits in 90 days, 94% test pass rate, 3 integrations shipped." },
        { type: "social", ref: "LinkedIn engagement 2026-02", summary: "Three posts averaged 12K impressions and 2.1% engagement." },
        { type: "trust_node", ref: "Investor network map", summary: "Three warm intros across AI fund, seed-to-A fund, and operator angel." },
      ],
    },
    evidenceSummary: {
      sourceCount: 7,
      verifiedCount: 4,
      partialCount: 2,
      unverifiedCount: 1,
    },
    hcsn: {
      title: "Raise Timing Hierarchy",
      thesis: "Acme should raise now because evidence-grounded momentum plus active trust nodes outweigh the option value of waiting.",
      topDriverNodeId: "investor-trajectory-window",
      topInterventionNodeId: "investor-intervention-intros",
      topRiskNodeId: "investor-signal-pipeline",
      nodes: [
        {
          id: "investor-evidence-runway",
          level: "evidence",
          label: "10-K runway evidence",
          summary: "Q4 filing shows 14 months of runway and enough optionality to avoid a defensive raise.",
          confidence: 0.9,
          status: "grounded",
          sourceRefs: ["10-K Q4 2025"],
        },
        {
          id: "investor-evidence-network",
          level: "evidence",
          label: "Warm intro map",
          summary: "Three warm paths exist into target funds across different trust nodes.",
          confidence: 0.81,
          status: "grounded",
          sourceRefs: ["Investor network map", "Founder interview 2026-02-15"],
        },
        {
          id: "investor-observation-runway",
          level: "observation",
          label: "Runway is not forcing a raise",
          summary: "Capital timing can be selected strategically rather than defensively.",
          confidence: 0.84,
          status: "grounded",
          sourceRefs: ["10-K Q4 2025"],
        },
        {
          id: "investor-observation-window",
          level: "observation",
          label: "Q2 market window is still open",
          summary: "The market is mixed but still rewarding prepared teams with strong proof.",
          confidence: 0.63,
          status: "inferred",
          sourceRefs: ["PitchBook AI Infrastructure Q1 2026", "Crunchbase 2026-02"],
        },
        {
          id: "investor-signal-pipeline",
          level: "signal",
          label: "Enterprise proof is still thinner than the story",
          summary: "Pipeline conversion is the main unresolved risk in the raise-now thesis.",
          confidence: 0.61,
          status: "needs_review",
          sourceRefs: ["Founder interview 2026-02-15", "GitHub commit velocity"],
        },
        {
          id: "investor-chain-timing",
          level: "causal_chain",
          label: "Timing chain",
          summary: "Runway optionality plus an open market window means activated trust nodes can convert into financing leverage.",
          confidence: 0.7,
          status: "inferred",
          sourceRefs: ["10-K Q4 2025", "PitchBook AI Infrastructure Q1 2026", "Investor network map"],
        },
        {
          id: "investor-trajectory-window",
          level: "trajectory",
          label: "Raise-now trajectory",
          summary: "Current slope is positive if Acme converts trust leverage into meetings before the window cools.",
          confidence: 0.68,
          status: "projected",
          sourceRefs: ["Trajectory summary", "Deep Sim memo"],
        },
        {
          id: "investor-intervention-intros",
          level: "intervention",
          label: "Activate two intros this week",
          summary: "Immediate outreach is the highest-leverage intervention for turning network density into real diligence.",
          confidence: 0.82,
          status: "projected",
          sourceRefs: ["Intervention ladder"],
        },
        {
          id: "investor-loop-fundraise",
          level: "outcome_loop",
          label: "Fundraise outcome loop",
          summary: "The business loop to watch is whether meetings convert into partner conviction and better terms.",
          confidence: 0.66,
          status: "projected",
          sourceRefs: ["Forecast check 2026-06-01"],
        },
      ],
      edges: [
        {
          id: "investor-edge-1",
          from: "investor-evidence-runway",
          to: "investor-observation-runway",
          relationship: "supports",
          confidence: 0.9,
          explanation: "The filing grounds the claim that the company is not forced to raise immediately.",
        },
        {
          id: "investor-edge-2",
          from: "investor-evidence-network",
          to: "investor-chain-timing",
          relationship: "supports",
          confidence: 0.78,
          explanation: "Warm intros provide the access path that makes timing matter.",
        },
        {
          id: "investor-edge-3",
          from: "investor-observation-runway",
          to: "investor-chain-timing",
          relationship: "aggregates_into",
          confidence: 0.8,
          explanation: "Runway optionality is one causal precondition for selective timing.",
        },
        {
          id: "investor-edge-4",
          from: "investor-observation-window",
          to: "investor-chain-timing",
          relationship: "aggregates_into",
          confidence: 0.67,
          explanation: "The Q2 opening is the second causal precondition in the chain.",
        },
        {
          id: "investor-edge-5",
          from: "investor-signal-pipeline",
          to: "investor-trajectory-window",
          relationship: "constrains",
          confidence: 0.61,
          explanation: "Pipeline weakness is the main factor that could flatten the current slope.",
        },
        {
          id: "investor-edge-6",
          from: "investor-chain-timing",
          to: "investor-trajectory-window",
          relationship: "drives",
          confidence: 0.72,
          explanation: "The timing chain is what produces the raise-now recommendation.",
        },
        {
          id: "investor-edge-7",
          from: "investor-intervention-intros",
          to: "investor-trajectory-window",
          relationship: "adjusts",
          confidence: 0.82,
          explanation: "Fast intro activation should steepen the trajectory if the thesis is right.",
        },
        {
          id: "investor-edge-8",
          from: "investor-trajectory-window",
          to: "investor-loop-fundraise",
          relationship: "tests",
          confidence: 0.66,
          explanation: "The real scorekeeping loop is whether projected leverage becomes real financing outcomes.",
        },
      ],
    },
    memo: {
      question: "Should Acme AI raise a Series A now or wait 6 months?",
      recommendation:
        "Raise now, conditional on activating two trust-node intros this week and validating enterprise pipeline conversion before the first partner meetings.",
      confidence: 0.68,
      whatWouldChangeMyMind:
        "If target-fund feedback weakens materially or pipeline conversion slips below 15%, the timing thesis breaks and waiting becomes the better move.",
      topVariables: [
        {
          id: "raise-runway",
          name: "Burn rate runway",
          category: "constraint",
          weight: 0.18,
          currentValue: "14 months remaining",
          sensitivity: "high",
          dataCompleteness: 0.9,
          whatWouldChangeMyMind: "Runway drops under 10 months before a credible lead emerges.",
        },
        {
          id: "raise-window",
          name: "Market timing window",
          category: "market",
          weight: 0.16,
          currentValue: "Q2 opening before a tighter Q3",
          sensitivity: "high",
          dataCompleteness: 0.72,
          whatWouldChangeMyMind: "Comparable rounds reprice down materially in the next 30 days.",
        },
        {
          id: "raise-trust",
          name: "Trust-node density",
          category: "network",
          weight: 0.15,
          currentValue: "3 warm intros to target funds",
          sensitivity: "high",
          dataCompleteness: 0.83,
          whatWouldChangeMyMind: "Two of the three intros fail to convert into live partner conversations.",
        },
        {
          id: "raise-trajectory",
          name: "Product trajectory",
          category: "temporal",
          weight: 0.14,
          currentValue: "34% QoQ growth, strong shipping velocity",
          sensitivity: "medium",
          dataCompleteness: 0.88,
          whatWouldChangeMyMind: "Growth momentum drops while integration complexity rises.",
        },
        {
          id: "raise-velocity",
          name: "Founder execution velocity",
          category: "intrinsic",
          weight: 0.12,
          currentValue: "High credibility from prior build-and-exit path",
          sensitivity: "medium",
          dataCompleteness: 0.7,
          whatWouldChangeMyMind: "Reference calls show founder-led deals are masking team execution gaps.",
        },
      ],
      scenarios: [
        {
          id: "raise-now",
          title: "Raise Now",
          confidence: 0.68,
          keyAssumptions: ["Timing window stays open through Q2", "Warm intros convert into real diligence"],
          expectedOutcome: "Acme captures current market openness, uses trust leverage well, and raises before momentum gets priced against them.",
          risks: ["Pipeline quality is overstated", "Signal strength is still narrative-assisted"],
          interventionsNeeded: ["Activate two warm intros", "Publish benchmark-grade proof before meetings"],
        },
        {
          id: "wait-six-months",
          title: "Wait 6 Months",
          confidence: 0.45,
          keyAssumptions: ["Metrics strengthen faster than the market cools", "Team bandwidth supports another six months of selling and shipping"],
          expectedOutcome: "Acme enters a stronger round later, but risks losing the current timing advantage.",
          risks: ["Competitor lock-in", "Window closes before proof catches up"],
          interventionsNeeded: ["Build stronger enterprise evidence", "Preserve runway discipline"],
        },
        {
          id: "pivot-revenue",
          title: "Pivot to Revenue",
          confidence: 0.32,
          keyAssumptions: ["Capital gets materially harder", "Customer traction is better than investor pull"],
          expectedOutcome: "Acme optimizes for revenue durability, but gives up some network-effect acceleration.",
          risks: ["Missed category-defining timing", "Lower leverage in later financing"],
          interventionsNeeded: ["Aggressive upsell motion", "Revenue-centric storytelling"],
        },
      ],
      interventions: [
        {
          rank: 1,
          title: "Activate 2 warm intros this week",
          expectedDelta: "+12% trust leverage on the raise path",
          confidence: 0.82,
          category: "network",
          cost: "Founder time",
          timeframe: "This week",
          whatWouldConfirm: "Two target funds take meetings within 10 days.",
          whatWouldDeny: "Warm paths fail to produce real diligence activity.",
        },
        {
          rank: 2,
          title: "Ship a benchmark artifact before partner meetings",
          expectedDelta: "+8% evidence credibility",
          confidence: 0.72,
          category: "intrinsic",
          cost: "One focused sprint",
          timeframe: "7-10 days",
          whatWouldConfirm: "Artifact becomes a cited diligence asset.",
          whatWouldDeny: "Partners still treat the story as mainly narrative.",
        },
        {
          rank: 3,
          title: "Prepare a 6-month scenario memo as negotiation leverage",
          expectedDelta: "+5% optionality if the market softens",
          confidence: 0.61,
          category: "market",
          cost: "Strategy time",
          timeframe: "Before first partner meeting",
          whatWouldConfirm: "The fallback plan improves term confidence.",
          whatWouldDeny: "The market path stays clearly open and immediate.",
        },
      ],
      evidence: [
        {
          id: "acme-1",
          text: "Runway is long enough to choose timing rather than raise defensively.",
          confidence: 0.82,
          confidenceCategory: "high",
          sources: ["10-K Q4 2025"],
          contradictions: [],
          whatWouldChangeMyMind: "Cash burn accelerates materially before diligence starts.",
        },
        {
          id: "acme-2",
          text: "Warm intros matter because early-stage fund processes still compress around trusted entry points.",
          confidence: 0.67,
          confidenceCategory: "medium",
          sources: ["Investor network map", "Founder interview 2026-02-15"],
          contradictions: ["Warm intros can still fail if partner conviction is weak."],
          whatWouldChangeMyMind: "The intros do not create real partner engagement.",
        },
        {
          id: "acme-3",
          text: "The current market window is mixed rather than fully closed, which rewards prepared teams more than passive waiting.",
          confidence: 0.59,
          confidenceCategory: "medium",
          sources: ["PitchBook AI Infrastructure Q1 2026", "Crunchbase 2026-02"],
          contradictions: ["Deal count is down and repricing risk remains real."],
          whatWouldChangeMyMind: "Two comparable deals reprice down before Acme starts the round.",
        },
      ],
      counterModel: {
        id: "acme-counter",
        thesis: "The market cooldown makes timing moot, and stronger metrics six months from now would outweigh today's weaker narrative leverage.",
        confidence: 0.38,
        keyEvidence: [
          "Comparable deal counts are softer than a year ago.",
          "Trust-node strength may be masking a still-thin enterprise proof base.",
        ],
        keyAssumption: "The market will still reward later evidence more than current timing.",
        whatWouldValidate: "Two or more target funds pass while citing insufficient current proof.",
      },
      forecastCheckDate: "2026-06-01",
    },
  },
  founder: {
    key: "founder",
    id: "golden_founder_strategy_001",
    name: "NodeBench GTM Strategy",
    workflow: "founder_strategy",
    frozenAt: "2026-03-15T00:00:00Z",
    sourcePacket: {
      sources: [
        { type: "product", ref: "NodeBench MCP usage stats", summary: "289 tools, 950+ tests, 63 Convex domains, and 3 npm packages." },
        { type: "market", ref: "MCP ecosystem March 2026", summary: "MCP adoption is broad, but the ecosystem is fragmented and noisy." },
        { type: "social", ref: "LinkedIn posts Feb-Mar 2026", summary: "Daily posts show reach, but conversion into pilots is still thin." },
        { type: "signal", ref: "Inbound interest tracker", summary: "A small but real stream of founder, VC, and enterprise interest exists." },
        { type: "benchmark", ref: "DeepTrace eval results", summary: "The system has technical proof points worth productizing as sales assets." },
        { type: "trust_node", ref: "Network map", summary: "Trust amplification exists through Discord, X, and operator communities." },
      ],
    },
    evidenceSummary: {
      sourceCount: 6,
      verifiedCount: 3,
      partialCount: 2,
      unverifiedCount: 1,
    },
    hcsn: {
      title: "Distribution Wedge Hierarchy",
      thesis: "NodeBench should wedge through Claude Code power users because that audience minimizes distribution friction and sharpens proof-to-pilot conversion.",
      topDriverNodeId: "founder-trajectory-fit",
      topInterventionNodeId: "founder-intervention-preset",
      topRiskNodeId: "founder-signal-activation",
      nodes: [
        {
          id: "founder-evidence-usage",
          level: "evidence",
          label: "MCP usage and test proof",
          summary: "The product already has enough depth and proof to support a narrow high-trust wedge.",
          confidence: 0.78,
          status: "grounded",
          sourceRefs: ["NodeBench MCP usage stats", "DeepTrace eval results"],
        },
        {
          id: "founder-evidence-market",
          level: "evidence",
          label: "MCP market fragmentation",
          summary: "The ecosystem is broad, but quality is uneven and packaging clarity matters.",
          confidence: 0.69,
          status: "grounded",
          sourceRefs: ["MCP ecosystem March 2026"],
        },
        {
          id: "founder-observation-fit",
          level: "observation",
          label: "Best fit is MCP-native power users",
          summary: "The current strongest product-channel fit is inside existing Claude Code and MCP workflows.",
          confidence: 0.71,
          status: "inferred",
          sourceRefs: ["NodeBench MCP usage stats", "Inbound interest tracker"],
        },
        {
          id: "founder-observation-friction",
          level: "observation",
          label: "Broad adoption friction is still high",
          summary: "Time-to-first-value remains too slow for a broad self-serve wedge.",
          confidence: 0.74,
          status: "grounded",
          sourceRefs: ["LinkedIn posts Feb-Mar 2026", "Inbound interest tracker"],
        },
        {
          id: "founder-signal-activation",
          level: "signal",
          label: "Attention is not yet compounding into pilots",
          summary: "Reach exists, but the activation loop is still too thin to support a diffuse GTM motion.",
          confidence: 0.64,
          status: "needs_review",
          sourceRefs: ["LinkedIn posts Feb-Mar 2026", "Inbound interest tracker"],
        },
        {
          id: "founder-chain-wedge",
          level: "causal_chain",
          label: "Wedge chain",
          summary: "Strong proof plus low-friction distribution through existing workflows creates the shortest path to paying pilots.",
          confidence: 0.69,
          status: "inferred",
          sourceRefs: ["NodeBench MCP usage stats", "MCP ecosystem March 2026", "DeepTrace eval results"],
        },
        {
          id: "founder-trajectory-fit",
          level: "trajectory",
          label: "Power-user wedge trajectory",
          summary: "The steepest current slope comes from packaging NodeBench into an MCP-native decision-workbench preset.",
          confidence: 0.62,
          status: "projected",
          sourceRefs: ["Trajectory summary", "Deep Sim memo"],
        },
        {
          id: "founder-intervention-preset",
          level: "intervention",
          label: "Ship decision-workbench preset",
          summary: "A preset productizes the sharpest workflow and reduces setup ambiguity.",
          confidence: 0.74,
          status: "projected",
          sourceRefs: ["Intervention ladder"],
        },
        {
          id: "founder-loop-pilots",
          level: "outcome_loop",
          label: "Pilot conversion loop",
          summary: "The business loop to watch is whether demo clarity and preset packaging convert into paying pilots.",
          confidence: 0.67,
          status: "projected",
          sourceRefs: ["Forecast check 2026-06-15"],
        },
      ],
      edges: [
        {
          id: "founder-edge-1",
          from: "founder-evidence-usage",
          to: "founder-observation-fit",
          relationship: "supports",
          confidence: 0.77,
          explanation: "The current proof stack is already strongest for technical early adopters.",
        },
        {
          id: "founder-edge-2",
          from: "founder-evidence-market",
          to: "founder-observation-friction",
          relationship: "supports",
          confidence: 0.72,
          explanation: "Fragmentation increases packaging and onboarding demands.",
        },
        {
          id: "founder-edge-3",
          from: "founder-observation-fit",
          to: "founder-chain-wedge",
          relationship: "aggregates_into",
          confidence: 0.74,
          explanation: "Channel fit is one of the two main inputs into the wedge chain.",
        },
        {
          id: "founder-edge-4",
          from: "founder-observation-friction",
          to: "founder-chain-wedge",
          relationship: "aggregates_into",
          confidence: 0.75,
          explanation: "High broad-market friction pushes the strategy toward a narrower wedge.",
        },
        {
          id: "founder-edge-5",
          from: "founder-signal-activation",
          to: "founder-trajectory-fit",
          relationship: "constrains",
          confidence: 0.64,
          explanation: "Weak activation is the main reason the current motion is not compounding yet.",
        },
        {
          id: "founder-edge-6",
          from: "founder-chain-wedge",
          to: "founder-trajectory-fit",
          relationship: "drives",
          confidence: 0.7,
          explanation: "The wedge chain produces the recommendation to focus on MCP-native power users.",
        },
        {
          id: "founder-edge-7",
          from: "founder-intervention-preset",
          to: "founder-trajectory-fit",
          relationship: "adjusts",
          confidence: 0.74,
          explanation: "Packaging is the fastest intervention for increasing distribution fit and clarity.",
        },
        {
          id: "founder-edge-8",
          from: "founder-trajectory-fit",
          to: "founder-loop-pilots",
          relationship: "tests",
          confidence: 0.67,
          explanation: "The real outcome loop is whether the sharper wedge creates paying pilot conversion.",
        },
      ],
    },
    memo: {
      question: "What is NodeBench's best next distribution move to get 10 paying pilots in 90 days?",
      recommendation:
        "Focus on Claude Code power users who already use MCP servers. Package NodeBench as a decision-workbench preset inside the workflow they already have instead of asking them to adopt a new standalone behavior.",
      confidence: 0.62,
      whatWouldChangeMyMind:
        "If install-to-activation stays weak after direct power-user outreach, the wedge is too narrow and the product needs a more integrated SaaS packaging path.",
      topVariables: [
        {
          id: "gtm-friction",
          name: "Distribution friction",
          category: "market",
          weight: 0.22,
          currentValue: "High for net-new workflow adoption",
          sensitivity: "high",
          dataCompleteness: 0.76,
          whatWouldChangeMyMind: "Install and first-value time drops materially without concierge help.",
        },
        {
          id: "gtm-fit",
          name: "Product-channel fit",
          category: "intrinsic",
          weight: 0.19,
          currentValue: "Strongest inside MCP-native power-user workflows",
          sensitivity: "high",
          dataCompleteness: 0.72,
          whatWouldChangeMyMind: "Broader non-MCP audiences convert faster than expected.",
        },
        {
          id: "gtm-trust",
          name: "Trust-node activation rate",
          category: "network",
          weight: 0.16,
          currentValue: "Promising but under-systematized",
          sensitivity: "medium",
          dataCompleteness: 0.64,
          whatWouldChangeMyMind: "Cold channels outperform trusted-node introductions.",
        },
        {
          id: "gtm-ttfv",
          name: "Time to first value",
          category: "temporal",
          weight: 0.15,
          currentValue: "Still too high for broad self-serve conversion",
          sensitivity: "high",
          dataCompleteness: 0.68,
          whatWouldChangeMyMind: "A tighter preset gets first-value under 10 minutes consistently.",
        },
        {
          id: "gtm-bandwidth",
          name: "Team bandwidth",
          category: "constraint",
          weight: 0.14,
          currentValue: "Limited enough that wedge discipline matters",
          sensitivity: "medium",
          dataCompleteness: 0.8,
          whatWouldChangeMyMind: "Resourcing changes enough to support a wider GTM surface.",
        },
      ],
      scenarios: [
        {
          id: "mcp-first",
          title: "MCP-First Distribution",
          confidence: 0.62,
          keyAssumptions: ["Claude Code users adopt MCP tools with low friction", "A decision-workbench preset is legible immediately"],
          expectedOutcome: "A narrow but high-fit audience converts into pilots faster than a broad top-of-funnel push.",
          risks: ["Audience is too small", "Tool install remains intimidating"],
          interventionsNeeded: ["Ship a preset", "Show a 3-minute live workflow"],
        },
        {
          id: "content-inbound",
          title: "Content-Led Inbound",
          confidence: 0.48,
          keyAssumptions: ["Reach converts into demos", "Narrative depth becomes trust fast enough"],
          expectedOutcome: "Content keeps warming the market, but may stay too diffuse without a sharper wedge.",
          risks: ["High attention, low conversion", "Value still feels abstract"],
          interventionsNeeded: ["Sharper CTA", "Benchmark proof on landing"],
        },
        {
          id: "enterprise-direct",
          title: "Enterprise Direct Sales",
          confidence: 0.28,
          keyAssumptions: ["Enterprise buyers will evaluate a still-evolving system", "Procurement friction can be absorbed"],
          expectedOutcome: "Potentially larger deal size, but too much friction for the next 90-day target.",
          risks: ["Sales cycle mismatch", "Proof burden too high"],
          interventionsNeeded: ["Security packaging", "Clear ROI case study"],
        },
      ],
      interventions: [
        {
          rank: 1,
          title: "Publish `nodebench-mcp` with a decision-workbench preset",
          expectedDelta: "+15% distribution fit",
          confidence: 0.74,
          category: "market",
          cost: "Focused packaging sprint",
          timeframe: "This week",
          whatWouldConfirm: "Power users can get to first-value in one session.",
          whatWouldDeny: "Install friction remains high even with presets.",
        },
        {
          rank: 2,
          title: "Create a 3-minute demo showing the CEO workflow end-to-end",
          expectedDelta: "+10% clarity and conversion",
          confidence: 0.7,
          category: "intrinsic",
          cost: "Founding team prep",
          timeframe: "48 hours",
          whatWouldConfirm: "Prospects immediately understand what they would use it for.",
          whatWouldDeny: "Viewers still ask what the product does after the demo.",
        },
        {
          rank: 3,
          title: "Reach out to 5 Claude Code power users for beta feedback",
          expectedDelta: "+8% trust-node activation",
          confidence: 0.68,
          category: "network",
          cost: "Direct founder outreach",
          timeframe: "This week",
          whatWouldConfirm: "At least two become active pilot conversations.",
          whatWouldDeny: "Even high-fit users do not convert into serious usage.",
        },
        {
          rank: 4,
          title: "Submit to MCP directories and curated lists",
          expectedDelta: "+6% discovery volume",
          confidence: 0.56,
          category: "market",
          cost: "Distribution ops",
          timeframe: "1 week",
          whatWouldConfirm: "Referral traffic produces qualified product conversations.",
          whatWouldDeny: "Discovery rises but activation does not.",
        },
      ],
      evidence: [
        {
          id: "nodebench-1",
          text: "NodeBench already has enough technical proof to sell a narrower wedge without claiming a fully generalized agent platform.",
          confidence: 0.74,
          confidenceCategory: "high",
          sources: ["NodeBench MCP usage stats", "DeepTrace eval results"],
          contradictions: [],
          whatWouldChangeMyMind: "Core proof surfaces fail to resonate with target users in live demos.",
        },
        {
          id: "nodebench-2",
          text: "The MCP ecosystem is large, but fragmentation means clarity of packaging matters more than raw capability breadth.",
          confidence: 0.63,
          confidenceCategory: "medium",
          sources: ["MCP ecosystem March 2026"],
          contradictions: ["Breadth can still attract experimenters before buyers."],
          whatWouldChangeMyMind: "A broad product story converts better than a preset-led wedge.",
        },
        {
          id: "nodebench-3",
          text: "Current social proof creates attention, but attention alone has not yet become enough paying-pilot pull.",
          confidence: 0.59,
          confidenceCategory: "medium",
          sources: ["LinkedIn posts Feb-Mar 2026", "Inbound interest tracker"],
          contradictions: ["Trust signals may compound if the demo sharpens."],
          whatWouldChangeMyMind: "Content-driven demo requests accelerate without any packaging change.",
        },
      ],
      counterModel: {
        id: "nodebench-counter",
        thesis: "The MCP ecosystem is too fragmented; buyers will prefer a more integrated SaaS product over a repo-local tool wedge.",
        confidence: 0.35,
        keyEvidence: [
          "The ecosystem is crowded and uneven in quality.",
          "CLI-based onboarding remains a real friction point for many otherwise good users.",
        ],
        keyAssumption: "Users will not tolerate setup overhead even for high-value workflows.",
        whatWouldValidate: "Install rate stays low after packaging and outreach improve.",
      },
      forecastCheckDate: "2026-06-15",
    },
  },
  market_entry: {
    key: "market_entry",
    id: "golden_market_entry_001",
    name: "Market Entry Analysis — Southeast Asia B2B SaaS",
    workflow: "investor_diligence",
    frozenAt: "2026-03-10T00:00:00Z",
    sourcePacket: {
      sources: [
        { type: "market", ref: "Gartner SEA B2B SaaS Q1 2026", summary: "Southeast Asia B2B SaaS market growing 28% YoY, $4.2B TAM by 2028." },
        { type: "filing", ref: "Regulatory scan — 6 countries", summary: "Data residency laws vary: Singapore permissive, Indonesia strict, Vietnam evolving." },
        { type: "interview", ref: "Regional GM interviews (3)", summary: "Local presence required for enterprise sales; remote-only GTM fails above $50K ACV." },
        { type: "signal", ref: "Competitor mapping Q1 2026", summary: "Two funded competitors in Singapore, one bootstrapped in Jakarta, none in Vietnam." },
        { type: "benchmark", ref: "Localization cost model", summary: "Full localization for 4 languages estimated at $180K one-time, $40K/year maintenance." },
        { type: "trust_node", ref: "Partner channel scan", summary: "Three potential distribution partners identified; one with existing enterprise relationships." },
      ],
    },
    evidenceSummary: {
      sourceCount: 6,
      verifiedCount: 3,
      partialCount: 2,
      unverifiedCount: 1,
    },
    hcsn: {
      title: "Market Entry Hierarchy",
      thesis: "A partnership-led entry through Singapore positions the company to capture SEA enterprise demand while managing regulatory and localization risk.",
      topDriverNodeId: "entry-trajectory-partnership",
      topInterventionNodeId: "entry-intervention-partner",
      topRiskNodeId: "entry-signal-regulation",
      nodes: [
        {
          id: "entry-evidence-tam",
          level: "evidence",
          label: "SEA B2B SaaS TAM evidence",
          summary: "Market data confirms strong growth trajectory with $4.2B projected TAM.",
          confidence: 0.82,
          status: "grounded",
          sourceRefs: ["Gartner SEA B2B SaaS Q1 2026"],
        },
        {
          id: "entry-evidence-competitors",
          level: "evidence",
          label: "Competitor landscape",
          summary: "Limited direct competition outside Singapore leaves white space in 4 of 6 target markets.",
          confidence: 0.73,
          status: "grounded",
          sourceRefs: ["Competitor mapping Q1 2026"],
        },
        {
          id: "entry-observation-presence",
          level: "observation",
          label: "Local presence is non-negotiable",
          summary: "Enterprise buyers above $50K ACV require in-country teams for trust and compliance.",
          confidence: 0.79,
          status: "grounded",
          sourceRefs: ["Regional GM interviews (3)"],
        },
        {
          id: "entry-observation-localization",
          level: "observation",
          label: "Localization cost is front-loaded",
          summary: "One-time investment is significant but ongoing costs are manageable at scale.",
          confidence: 0.68,
          status: "inferred",
          sourceRefs: ["Localization cost model"],
        },
        {
          id: "entry-signal-regulation",
          level: "signal",
          label: "Regulatory fragmentation is the top risk",
          summary: "Data residency requirements differ across countries and are still evolving in 3 of 6 markets.",
          confidence: 0.58,
          status: "needs_review",
          sourceRefs: ["Regulatory scan — 6 countries"],
        },
        {
          id: "entry-chain-market",
          level: "causal_chain",
          label: "Market entry chain",
          summary: "Strong TAM plus competitor white space, filtered through regulatory and localization constraints, favors a staged partnership-led approach.",
          confidence: 0.65,
          status: "inferred",
          sourceRefs: ["Gartner SEA B2B SaaS Q1 2026", "Competitor mapping Q1 2026", "Regulatory scan — 6 countries"],
        },
        {
          id: "entry-trajectory-partnership",
          level: "trajectory",
          label: "Partnership-led entry trajectory",
          summary: "Entering through an established local partner in Singapore creates the fastest path to first revenue while managing compliance risk.",
          confidence: 0.61,
          status: "projected",
          sourceRefs: ["Trajectory summary", "Deep Sim memo"],
        },
        {
          id: "entry-intervention-partner",
          level: "intervention",
          label: "Sign distribution partnership in Singapore",
          summary: "A single strong partner collapses the go-to-market timeline from 9 months to 4.",
          confidence: 0.72,
          status: "projected",
          sourceRefs: ["Intervention ladder"],
        },
        {
          id: "entry-loop-revenue",
          level: "outcome_loop",
          label: "Regional revenue loop",
          summary: "The scorekeeping loop is whether Singapore revenue justifies expansion into Indonesia and Vietnam.",
          confidence: 0.59,
          status: "projected",
          sourceRefs: ["Forecast check 2026-09-01"],
        },
      ],
      edges: [
        {
          id: "entry-edge-1",
          from: "entry-evidence-tam",
          to: "entry-observation-presence",
          relationship: "supports",
          confidence: 0.8,
          explanation: "Large TAM validates the investment required for local presence.",
        },
        {
          id: "entry-edge-2",
          from: "entry-evidence-competitors",
          to: "entry-chain-market",
          relationship: "supports",
          confidence: 0.73,
          explanation: "Limited competition creates a timing window for entry.",
        },
        {
          id: "entry-edge-3",
          from: "entry-observation-presence",
          to: "entry-chain-market",
          relationship: "aggregates_into",
          confidence: 0.76,
          explanation: "Local presence requirement shapes the entry strategy toward partnerships.",
        },
        {
          id: "entry-edge-4",
          from: "entry-observation-localization",
          to: "entry-chain-market",
          relationship: "aggregates_into",
          confidence: 0.65,
          explanation: "Localization cost is a constraint but not a blocker for staged entry.",
        },
        {
          id: "entry-edge-5",
          from: "entry-signal-regulation",
          to: "entry-trajectory-partnership",
          relationship: "constrains",
          confidence: 0.58,
          explanation: "Regulatory fragmentation slows multi-country expansion and adds compliance cost.",
        },
        {
          id: "entry-edge-6",
          from: "entry-chain-market",
          to: "entry-trajectory-partnership",
          relationship: "drives",
          confidence: 0.67,
          explanation: "The market chain produces the partnership-led recommendation.",
        },
        {
          id: "entry-edge-7",
          from: "entry-intervention-partner",
          to: "entry-trajectory-partnership",
          relationship: "adjusts",
          confidence: 0.72,
          explanation: "A strong local partner is the single biggest accelerant to the entry timeline.",
        },
        {
          id: "entry-edge-8",
          from: "entry-trajectory-partnership",
          to: "entry-loop-revenue",
          relationship: "tests",
          confidence: 0.59,
          explanation: "Singapore revenue is the gate check before committing to broader SEA expansion.",
        },
      ],
    },
    memo: {
      question: "Should we enter Southeast Asia now, and if so, through which market and channel?",
      recommendation:
        "Enter through Singapore via a distribution partnership. Use it as a regulatory-friendly beachhead to prove unit economics before expanding to Indonesia and Vietnam in phases.",
      confidence: 0.61,
      whatWouldChangeMyMind:
        "If the Singapore partner pipeline fails to produce $200K ARR within 6 months, or if regulatory changes in Indonesia accelerate faster than expected, the staged approach needs re-evaluation.",
      topVariables: [
        {
          id: "entry-tam",
          name: "Market size and growth",
          category: "market",
          weight: 0.2,
          currentValue: "$4.2B TAM, 28% YoY growth",
          sensitivity: "medium",
          dataCompleteness: 0.82,
          whatWouldChangeMyMind: "Growth rate decelerates below 15% or TAM estimates get revised down.",
        },
        {
          id: "entry-regulation",
          name: "Regulatory complexity",
          category: "constraint",
          weight: 0.19,
          currentValue: "Fragmented across 6 countries, Singapore most permissive",
          sensitivity: "high",
          dataCompleteness: 0.64,
          whatWouldChangeMyMind: "Indonesia or Vietnam passes strict data localization before we establish presence.",
        },
        {
          id: "entry-localization",
          name: "Localization cost",
          category: "intrinsic",
          weight: 0.16,
          currentValue: "$180K one-time, $40K/year for 4 languages",
          sensitivity: "medium",
          dataCompleteness: 0.74,
          whatWouldChangeMyMind: "Actual localization costs exceed estimates by more than 40%.",
        },
        {
          id: "entry-density",
          name: "Competitor density",
          category: "market",
          weight: 0.15,
          currentValue: "Low outside Singapore, white space in 4 of 6 markets",
          sensitivity: "high",
          dataCompleteness: 0.73,
          whatWouldChangeMyMind: "A well-funded competitor announces SEA expansion before we establish presence.",
        },
        {
          id: "entry-partners",
          name: "Partnership availability",
          category: "network",
          weight: 0.14,
          currentValue: "3 potential partners, 1 with strong enterprise relationships",
          sensitivity: "high",
          dataCompleteness: 0.6,
          whatWouldChangeMyMind: "The top partner candidate signs an exclusive with a competitor.",
        },
      ],
      scenarios: [
        {
          id: "conservative-entry",
          title: "Conservative Entry",
          confidence: 0.61,
          keyAssumptions: ["Singapore partner converts pipeline", "Regulatory environment stays stable"],
          expectedOutcome: "Beachhead in Singapore generates $200K+ ARR within 6 months, justifying phased expansion.",
          risks: ["Singapore alone is too small to justify investment", "Partner underperforms"],
          interventionsNeeded: ["Sign distribution partner", "Localize for Singapore English + Bahasa"],
        },
        {
          id: "aggressive-expansion",
          title: "Aggressive Expansion",
          confidence: 0.38,
          keyAssumptions: ["Simultaneous multi-country launch captures timing window", "Localization can be parallelized"],
          expectedOutcome: "Faster market share capture, but significantly higher burn and regulatory exposure.",
          risks: ["Compliance failures in Indonesia", "Spread too thin across 4 markets", "Localization quality suffers"],
          interventionsNeeded: ["Hire 3 country managers simultaneously", "Engage regional legal firm"],
        },
        {
          id: "partnership-led",
          title: "Partnership-Led",
          confidence: 0.55,
          keyAssumptions: ["Distribution partner has real enterprise pull", "Revenue share model is sustainable"],
          expectedOutcome: "Lower upfront cost and faster time-to-revenue, but lower margins and less control.",
          risks: ["Partner misalignment on pricing", "Dependency on single channel", "Brand dilution"],
          interventionsNeeded: ["Negotiate exclusive terms", "Set quarterly review milestones"],
        },
      ],
      interventions: [
        {
          rank: 1,
          title: "Sign Singapore distribution partner within 30 days",
          expectedDelta: "+14% market entry speed",
          confidence: 0.72,
          category: "network",
          cost: "Revenue share + integration support",
          timeframe: "30 days",
          whatWouldConfirm: "Partner generates 5+ qualified enterprise leads in first quarter.",
          whatWouldDeny: "Partner pipeline stays below 3 leads after 60 days.",
        },
        {
          rank: 2,
          title: "Complete Bahasa and Vietnamese localization",
          expectedDelta: "+10% addressable market",
          confidence: 0.66,
          category: "intrinsic",
          cost: "$180K one-time",
          timeframe: "8 weeks",
          whatWouldConfirm: "Localized product passes user testing with <5% comprehension issues.",
          whatWouldDeny: "Users in target markets still prefer English-only competitor products.",
        },
        {
          rank: 3,
          title: "Hire regional GM based in Singapore",
          expectedDelta: "+8% enterprise conversion rate",
          confidence: 0.64,
          category: "constraint",
          cost: "$150K annual fully-loaded",
          timeframe: "60 days",
          whatWouldConfirm: "GM closes first enterprise deal within 90 days of hire.",
          whatWouldDeny: "Enterprise sales cycle exceeds 6 months even with local presence.",
        },
        {
          rank: 4,
          title: "Engage regional regulatory counsel",
          expectedDelta: "+6% compliance confidence",
          confidence: 0.58,
          category: "constraint",
          cost: "$30K retainer",
          timeframe: "2 weeks",
          whatWouldConfirm: "Clear compliance roadmap for top 3 target countries.",
          whatWouldDeny: "Regulatory landscape is too volatile for a fixed compliance strategy.",
        },
      ],
      evidence: [
        {
          id: "sea-1",
          text: "The SEA B2B SaaS market is growing fast enough to justify entry investment, especially with limited direct competition outside Singapore.",
          confidence: 0.76,
          confidenceCategory: "high",
          sources: ["Gartner SEA B2B SaaS Q1 2026", "Competitor mapping Q1 2026"],
          contradictions: [],
          whatWouldChangeMyMind: "Growth projections get revised below 15% or two new funded competitors announce entry.",
        },
        {
          id: "sea-2",
          text: "Local presence is required for enterprise deals above $50K ACV; remote-only GTM has consistently underperformed in this region.",
          confidence: 0.71,
          confidenceCategory: "high",
          sources: ["Regional GM interviews (3)"],
          contradictions: ["Some PLG companies have scaled without local teams in Singapore specifically."],
          whatWouldChangeMyMind: "A remote-first competitor demonstrates strong enterprise traction without local teams.",
        },
        {
          id: "sea-3",
          text: "Regulatory fragmentation is real but manageable through a staged approach starting in Singapore, the most permissive jurisdiction.",
          confidence: 0.55,
          confidenceCategory: "medium",
          sources: ["Regulatory scan — 6 countries"],
          contradictions: ["Indonesia's data residency laws could tighten before our planned entry."],
          whatWouldChangeMyMind: "Singapore introduces unexpected data sovereignty requirements.",
        },
      ],
      counterModel: {
        id: "sea-counter",
        thesis: "The SEA market is too fragmented and regulatory risk too high; the same resources would generate higher ROI in a single large market like India or Japan.",
        confidence: 0.36,
        keyEvidence: [
          "Six-country regulatory complexity multiplies compliance costs.",
          "Localization for 4 languages is expensive relative to a single-language market.",
        ],
        keyAssumption: "Regulatory fragmentation will not simplify meaningfully in the next 18 months.",
        whatWouldValidate: "Compliance costs in the first 6 months exceed projections by 50% or more.",
      },
      forecastCheckDate: "2026-09-01",
    },
  },
};

export const DEEP_SIM_FIXTURE_OPTIONS = [
  { key: "investor", label: "Investor Diligence" },
  { key: "founder", label: "Founder Strategy" },
  { key: "market_entry", label: "Market Entry Analysis" },
] as const;

export function coerceDeepSimFixtureKey(value: string | null | undefined): DeepSimFixtureKey {
  if (value === "founder") return "founder";
  if (value === "market_entry") return "market_entry";
  return "investor";
}

export function getDeepSimFixture(key: DeepSimFixtureKey): DeepSimFixture {
  return DEEP_SIM_FIXTURES[key];
}
