{
  "schema_version": "PipelineManifestV1",
  "mode": "shadow",
  "run_id": "cc9ef366-3555-4c88-aad6-e3f1d91f6740",
  "execution_scope": "prepare_only",
  "outcome": "requirements_ready",
  "status": "completed",
  "started_at": "2026-07-10T19:59:02.514Z",
  "completed_at": "2026-07-10T20:01:20.481Z",
  "mh_os_root": "/opt/aimatch/app",
  "artifact_root": "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740",
  "sidecar_root": "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2",
  "previous_sidecar_archive": null,
  "models": {
    "context": {
      "model": "gemini-3.5-flash",
      "effort": "low"
    },
    "roles": {
      "model": "gemini-3.5-flash",
      "effort": "low"
    },
    "brief": {
      "model": "gemini-3.5-flash",
      "effort": "medium"
    },
    "qc": {
      "model": "gemini-3.5-flash",
      "effort": "medium"
    },
    "requirements": {
      "model": "gemini-3.5-flash",
      "effort": "medium"
    },
    "searchPlan": {
      "model": "gemini-3.5-flash",
      "effort": "low"
    },
    "candidateEval": {
      "model": "gemini-3.5-flash",
      "effort": "medium"
    },
    "fallback": {
      "model": "gemini-3.5-flash",
      "effort": "medium"
    }
  },
  "stages": [
    {
      "name": "inputs",
      "status": "completed",
      "started_at": "2026-07-10T19:59:02.514Z",
      "completed_at": "2026-07-10T19:59:02.516Z",
      "input_files": [],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/transcript.md"
      ],
      "attempts": [],
      "error": null
    },
    {
      "name": "hubspot-context",
      "status": "completed",
      "started_at": "2026-07-10T19:59:02.516Z",
      "completed_at": "2026-07-10T19:59:02.738Z",
      "input_files": [],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/hubspot-context.json"
      ],
      "attempts": [],
      "error": null
    },
    {
      "name": "context-distillation",
      "status": "completed",
      "started_at": "2026-07-10T19:59:02.927Z",
      "completed_at": "2026-07-10T19:59:12.583Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/transcript.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/hubspot-context.json"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/context/context.json",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/context-md"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "context-distillation",
          "model": "gemini-3.5-flash",
          "effort": "low",
          "prompt_version": "context-distillation:v2-hubspot-context",
          "raw_response_id": "B09Rasy_A7PWjMcPvM3tuQw",
          "request_id": null,
          "latency_ms": 9656,
          "usage": {
            "input_tokens": 3517,
            "output_tokens": 2301,
            "total_tokens": 5818
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    },
    {
      "name": "budget-decision",
      "status": "completed",
      "started_at": "2026-07-10T19:59:12.586Z",
      "completed_at": "2026-07-10T19:59:19.213Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/context/context.json",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/context-md/budget.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/transcript.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/hubspot-context.json"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/budget/budget-decision.json"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "budget-decision",
          "model": "gemini-3.5-flash",
          "effort": "low",
          "prompt_version": "budget-decision:v3-per-role-scope-policy",
          "raw_response_id": "EE9Raqa0Ka3UjMcPg4CumAo",
          "request_id": null,
          "latency_ms": 6625,
          "usage": {
            "input_tokens": 5474,
            "output_tokens": 1018,
            "total_tokens": 6492,
            "cache_read_input_tokens": 2786
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    },
    {
      "name": "role-detection",
      "status": "completed",
      "started_at": "2026-07-10T19:59:19.215Z",
      "completed_at": "2026-07-10T19:59:30.623Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/call-evidence-packet.md"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/roles-detected.json"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "role-detection",
          "model": "gemini-3.5-flash",
          "effort": "low",
          "prompt_version": "role-detection:v2-active-gate",
          "raw_response_id": "F09RauSRE_bQjMcPlNLEuQo",
          "request_id": null,
          "latency_ms": 11407,
          "usage": {
            "input_tokens": 4359,
            "output_tokens": 254,
            "total_tokens": 4613
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    },
    {
      "name": "lead-recap-draft",
      "status": "completed",
      "started_at": "2026-07-10T19:59:30.624Z",
      "completed_at": "2026-07-10T19:59:30.625Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/context/context.json",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/roles-detected.json",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/active-roles.json"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/lead-recap/skipped.json"
      ],
      "attempts": [],
      "error": null
    },
    {
      "name": "brief:growth-marketer",
      "status": "completed",
      "started_at": "2026-07-10T19:59:30.626Z",
      "completed_at": "2026-07-10T19:59:59.593Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/call-evidence-packet.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/brief-template-rules-packet.md"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/brief.json",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/job-brief.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/internal-notes.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/formData.json"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "brief:growth-marketer",
          "model": "gemini-3.5-flash",
          "effort": "medium",
          "prompt_version": "role-brief:v3-compact-prefix",
          "raw_response_id": "Ik9RapXcKqfQjMcPtaGEsAg",
          "request_id": null,
          "latency_ms": 28967,
          "usage": {
            "input_tokens": 5618,
            "output_tokens": 911,
            "thoughts_tokens": 1589,
            "total_tokens": 8118
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    },
    {
      "name": "granola-brief:growth-marketer",
      "status": "completed",
      "started_at": "2026-07-10T19:59:59.595Z",
      "completed_at": "2026-07-10T20:00:28.052Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/call-evidence-packet.md",
        "/opt/aimatch/app/aimatch/playbooks/granola-brief-template.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/job-brief.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/internal-notes.md"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/granola-brief.json",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/granola-brief.md"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "granola-brief:growth-marketer",
          "model": "gemini-3.5-flash",
          "effort": "medium",
          "prompt_version": "granola-brief:v1-prefix",
          "raw_response_id": "P09RauH_KaDUjMcPsOX22Aw",
          "request_id": null,
          "latency_ms": 28456,
          "usage": {
            "input_tokens": 6221,
            "output_tokens": 1059,
            "thoughts_tokens": 3079,
            "total_tokens": 10359
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    },
    {
      "name": "brief-qc:growth-marketer",
      "status": "completed",
      "started_at": "2026-07-10T20:00:28.054Z",
      "completed_at": "2026-07-10T20:00:37.056Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/call-evidence-packet.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/role-brief-internal-packet.md"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/brief-qc.json",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/brief-qc.md"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "brief-qc:growth-marketer",
          "model": "gemini-3.5-flash",
          "effort": "medium",
          "prompt_version": "brief-qc:v1-prefix",
          "raw_response_id": "XE9RauvQCabVjMcPn__oqAw",
          "request_id": null,
          "latency_ms": 9002,
          "usage": {
            "input_tokens": 4780,
            "output_tokens": 98,
            "thoughts_tokens": 1189,
            "total_tokens": 6067
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    },
    {
      "name": "requirements:growth-marketer",
      "status": "completed",
      "started_at": "2026-07-10T20:00:37.058Z",
      "completed_at": "2026-07-10T20:00:58.042Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/inputs/call-evidence-packet.md",
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/role-brief-internal-packet.md"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/classified-requirements.json"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "requirements:growth-marketer",
          "model": "gemini-3.5-flash",
          "effort": "medium",
          "prompt_version": "requirements:v1-prefix",
          "raw_response_id": "ZU9Raq29CebTjMcPtI3fqQg",
          "request_id": null,
          "latency_ms": 20984,
          "usage": {
            "input_tokens": 4799,
            "output_tokens": 718,
            "thoughts_tokens": 1437,
            "total_tokens": 6954
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    },
    {
      "name": "search-plan:growth-marketer",
      "status": "completed",
      "started_at": "2026-07-10T20:00:58.044Z",
      "completed_at": "2026-07-10T20:01:20.478Z",
      "input_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/classified-requirements.json"
      ],
      "output_files": [
        "/var/lib/aimatch/artifacts/cc9ef366-3555-4c88-aad6-e3f1d91f6740/api-v2/roles/growth-marketer/search-plan.json"
      ],
      "attempts": [
        {
          "provider": "gemini",
          "stage": "search-plan:growth-marketer",
          "model": "gemini-3.5-flash",
          "effort": "low",
          "prompt_version": "search-plan:v1",
          "raw_response_id": "ek9RaqmXCILVjMcP_JStqAw",
          "request_id": null,
          "latency_ms": 22433,
          "usage": {
            "input_tokens": 1400,
            "output_tokens": 215,
            "total_tokens": 1615
          },
          "validation": {
            "ok": true,
            "errors": []
          }
        }
      ],
      "error": null
    }
  ],
  "errors": [],
  "usage": {
    "attempts": 8,
    "input_tokens": 36168,
    "output_tokens": 6574,
    "thoughts_tokens": 7294,
    "output_billable_tokens": 13868,
    "total_tokens": 50036,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 2786,
    "uncached_input_tokens": 33382,
    "latency_ms": 137530
  },
  "cost": {
    "schema_version": "LlmCostSummaryV1",
    "currency": "USD",
    "pricing_source": "https://platform.claude.com/docs/en/about-claude/pricing; https://ai.google.dev/gemini-api/docs/pricing; https://openrouter.ai/z-ai/glm-5.2/api; https://developers.openai.com/api/docs/models/gpt-5.5; https://developers.openai.com/api/docs/models/gpt-5.4-mini",
    "pricing_source_checked_at": "2026-07-10T20:01:20.480Z",
    "pricing_notes": [
      "Gemini 3.5 Flash defaults use Google Gemini API paid-tier standard rates: input $1.50/1M, output including thinking $9.00/1M, cached context $0.15/1M.",
      "GLM 5.2 through OpenRouter defaults use the live model-catalog rates checked July 10, 2026: input $0.42/1M, output including reasoning $1.32/1M, cached input $0.078/1M.",
      "Claude Haiku 4.5 defaults use input $1/1M, output $5/1M, 5m cache write $1.25/1M, 1h cache write $2/1M, and cache read $0.10/1M.",
      "Claude Sonnet 4.6 defaults use input $3/1M, output $15/1M, 5m cache write $3.75/1M, 1h cache write $6/1M, and cache read $0.30/1M.",
      "Claude Opus 4.8 defaults use input $5/1M, output $25/1M, 5m cache write $6.25/1M, 1h cache write $10/1M, and cache read $0.50/1M.",
      "OpenAI GPT-5.5 defaults use input $5/1M, output including reasoning $30/1M, and cached input $0.50/1M.",
      "OpenAI GPT-5.4 mini defaults use input $0.75/1M, output including reasoning $4.50/1M, and cached input $0.075/1M.",
      "Gemini, OpenAI, and OpenRouter report cached input as a subset of input tokens; direct Anthropic reports uncached, cache-write, and cache-read tokens separately.",
      "Rates can be overridden with AIMATCH_API_V2_COST_*_USD_PER_1M environment variables."
    ],
    "input_cost_usd": 0.050073,
    "output_cost_usd": 0.124812,
    "cache_creation_cost_usd": 0,
    "cache_read_cost_usd": 0.000418,
    "total_cost_usd": 0.175303,
    "by_model": [
      {
        "provider": "gemini",
        "model": "gemini-3.5-flash",
        "attempts": 8,
        "input_tokens": 36168,
        "cache_read_input_tokens": 2786,
        "cache_creation_input_tokens": 0,
        "output_tokens": 6574,
        "thoughts_tokens": 7294,
        "uncached_input_tokens": 33382,
        "output_billable_tokens": 13868,
        "input_usd_per_1m_tokens": 1.5,
        "output_usd_per_1m_tokens": 9,
        "cache_read_usd_per_1m_tokens": 0.15,
        "cache_creation_usd_per_1m_tokens": 0.15,
        "cost_usd": 0.175303
      }
    ]
  }
}