{
  "id": "customer-history-2026-09-29",
  "title": "Work an expansion opportunity like an employee",
  "recorded_at": "2026-09-29",
  "environment": "Synthetic tenant and stored CRM mirror rows; actual Employee loader, assessment, review service and operating-state SQL",
  "prompt": "Work on customer expansion this week. Check our existing records and relationship history, choose one useful next step, do the internal work you can do without spending or contacting anyone, and bring me only the decision that needs my judgment.",
  "input": {
    "goal": {
      "objective": "Find a useful expansion conversation",
      "relationship_types": [
        "expansion"
      ],
      "success_definition": "Customer agrees to discuss a concrete next step",
      "horizon_days": 30,
      "exclusions": []
    },
    "owner_mandate": {
      "capabilities": [
        "context.read",
        "work.prepare"
      ],
      "spend_limit_usd": 0,
      "external_actions": "none",
      "daily_action_limit": 2,
      "expires_in_days": 30,
      "review_cadence_days": 7
    },
    "stored_sources": {
      "company": "Harbor Health Demo is in a native TipOff customer list",
      "signal": {
        "workspace_id": "55555555-5555-4555-8555-555555555555",
        "id": 1,
        "account_id": 1,
        "title": "Opened a new clinical operations team",
        "source_url": "https://harbor-health.example/news/operations-team",
        "posted_at": "2026-09-28T10:00:00Z"
      },
      "team_note": {
        "workspace_id": "55555555-5555-4555-8555-555555555555",
        "id": 8,
        "domain": "harbor-health.example",
        "note": "Account owner says the new team is reviewing its workflow.",
        "created_at": "2026-09-28T09:00:00Z"
      },
      "crm_activity": {
        "workspace_id": "55555555-5555-4555-8555-555555555555",
        "id": 21,
        "account_id": 1,
        "provider": "salesforce",
        "kind": "call",
        "direction": "outbound",
        "automated": false,
        "occurred_at": "2026-09-27T09:00:00Z",
        "synced_at": "2026-09-28T11:00:00Z"
      },
      "crm_deal": {
        "workspace_id": "55555555-5555-4555-8555-555555555555",
        "account_id": 1,
        "sf_opp_id": "006123456789ABCDE",
        "is_closed": true,
        "is_won": true,
        "closed_at": "2026-09-20T10:00:00Z",
        "synced_at": "2026-09-28T11:00:00Z"
      }
    }
  },
  "output": {
    "employee_update": "I found one customer expansion candidate: Harbor Health Demo. I reviewed its saved relationship history, recorded the provisional opportunity, and scheduled another internal review. I need the account owner to confirm the customer's current need and what they bought before a proposal or outreach.",
    "company": "Harbor Health Demo",
    "relationship_type": "expansion",
    "why_now": "A known customer has recent evidence (2026-09-28): Opened a new clinical operations team",
    "next_step": "Ask the account owner what the prior won deal covered and whether the new team has the same unresolved need. If confirmed, prepare a scoped expansion conversation; keep this customer out of acquisition outreach.",
    "relationship_warmth": "unknown",
    "account_history": [
      {
        "kind": "activity",
        "label": "outbound call",
        "provider": "salesforce",
        "recordId": "21",
        "evidenceRef": "workspace:55555555-5555-4555-8555-555555555555:crm_activity:21",
        "observedAt": "2026-09-27T09:00:00.000Z",
        "syncedAt": "2026-09-28T11:00:00.000Z",
        "timeBasis": "activity_time",
        "mirrorCurrent": true
      },
      {
        "kind": "deal",
        "label": "Closed-won opportunity",
        "provider": "salesforce",
        "outcome": "won",
        "recordId": "006123456789ABCDE",
        "evidenceRef": "workspace:55555555-5555-4555-8555-555555555555:sf_opportunity:006123456789ABCDE",
        "observedAt": "2026-09-20T10:00:00.000Z",
        "syncedAt": "2026-09-28T11:00:00.000Z",
        "timeBasis": "opportunity_last_modified",
        "mirrorCurrent": true
      }
    ],
    "history_assessment": {
      "key": "commercial_history",
      "label": "Recorded account work and deal history",
      "state": "partial",
      "reason": "Dated CRM activity or closed-deal metadata is available for the selected company. Salesforce deal timestamps are last-modified dates. This does not establish why a customer bought, what was delivered or whether contact is permitted.",
      "evidenceRefs": [
        "workspace:55555555-5555-4555-8555-555555555555:crm_activity:21",
        "workspace:55555555-5555-4555-8555-555555555555:sf_opportunity:006123456789ABCDE"
      ]
    },
    "owner_decision": {
      "key": "commercial_basis",
      "question": "What did this customer buy, which outcomes have they actually achieved, and what unresolved need makes expansion useful now?",
      "decisionImpact": "Changes whether to propose expansion, resolve a service issue, or wait.",
      "sources": [
        "people",
        "crm",
        "calls",
        "shared_documents"
      ],
      "minimalScope": "For one selected company, start with native TipOff records and up to three dated examples. An authorized owner can supply an answer or approved excerpts. An external CRM is optional; no full CRM or document-library access is required."
    },
    "other_open_questions": [
      {
        "key": "decision_context",
        "question": "Who owns this relationship and decision, which stakeholders matter, and what contact restrictions, open commitments or exclusions must be respected?"
      },
      {
        "key": "feasibility_and_proof",
        "question": "What result can we credibly help deliver, which evidence may we use, and what capacity, service, pricing or timing constraint could make this proposal fail?"
      }
    ],
    "saved_work": {
      "operating_version": 4,
      "review_count": 1,
      "opportunity_count": 1,
      "review_summary": "Prepared 1 provisional opportunity for owner review. Next owner decision: What did this customer buy, which outcomes have they actually achieved, and what unresolved need makes expansion useful now? Verify evidence and authority before external action. Business progress remains unverified.",
      "schedule": {
        "enabled": true,
        "every_days": 7,
        "mission": "employee.business_review",
        "status": "active"
      },
      "command_receipts": 4
    },
    "buying_reason_state": "unknown",
    "proof_state": "unknown",
    "decision_scope": "internal_preparation_only"
  },
  "execution": {
    "provider_calls": 0,
    "credits_spent": 0,
    "messages_sent": 0,
    "verified_business_outcomes": 0,
    "state_changes": [
      "charter saved",
      "internal preparation mandate saved",
      "provisional review and opportunity saved",
      "weekly review schedule activated"
    ]
  },
  "limitations": "Synthetic stored records. The displayed natural-language request was translated into the shown structured goal and mandate by the test, not parsed by a live model. The update is formatted from the tested structured output. The CRM activity only proves a logged outbound call, not a conversation. Salesforce's closed-at mirror field is LastModifiedDate, not a verified contract date. The deal status does not explain what was bought or delivered. The scheduled review has not run. No live provider, customer reply, external action or business outcome was tested.",
  "reproduction": "npm run demo:record"
}
