{
  "name": "Train and deploy ML models with Claude and Slack approval",
  "nodes": [
    {
      "id": "874019bc-a6b2-4fa5-8468-77266a7be43f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5520,
        928
      ],
      "parameters": {
        "width": 1100,
        "height": 1304,
        "content": "## 🤖 Autonomous MLOps Pipeline\n\n**Trigger a full end-to-end machine learning cycle from a single webhook call.**\n\nClaude AI plans the strategy, cleans your data, engineers features, trains 3 models he"
      }
    },
    {
      "id": "2b566773-44cd-4255-8a83-8949ff44ad18",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6800,
        1408
      ],
      "parameters": {
        "width": 956,
        "height": 80,
        "content": "### Phase 1 — Orchestration & Strategy\n`Webhook` → `Claude Sonnet` plans ML strategy → `Supabase` audit log"
      }
    },
    {
      "id": "7fcb4e3a-f171-406f-9570-6f98870a891e",
      "name": "P1: Receive MLOps Job",
      "type": "n8n-nodes-base.webhook",
      "position": [
        6864,
        1616
      ]
    },
    {
      "id": "af15b85b-a1b1-45e5-a228-bbcd0267bb8d",
      "name": "P1: Plan ML Strategy",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        7072,
        1616
      ]
    },
    {
      "id": "1f902e16-0c8d-4544-8ad6-032c4bc470b1",
      "name": "P1: Anthropic Sonnet",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        7072,
        1808
      ]
    },
    {
      "id": "efcf1add-b60f-43c7-837e-6ff69b75b725",
      "name": "P1: Parse Strategy",
      "type": "n8n-nodes-base.code",
      "position": [
        7360,
        1616
      ]
    },
    {
      "id": "03951aa4-1e28-4caf-90df-aca7e2808408",
      "name": "P1: Log Strategy",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7584,
        1616
      ]
    },
    {
      "id": "62f443d2-1562-407c-bfb6-d6db39728757",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7808,
        1408
      ],
      "parameters": {
        "width": 660,
        "height": 80,
        "content": "### Phase 2 — Data Engineering\n`HTTP Request` fetches CSV → `Code` parses + cleans + encodes → `Supabase` audit log"
      }
    },
    {
      "id": "c0cbdec9-6fe4-4ec2-a703-569184cfbab4",
      "name": "P2: Log Data Eng",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        8064,
        1616
      ]
    },
    {
      "id": "27d37c92-5bf3-4d18-b7e3-91bbb5fd63c0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8512,
        1408
      ],
      "parameters": {
        "width": 924,
        "height": 80,
        "content": "### Phase 3 — Feature Engineering\n`Claude Haiku` approves feature plan → `Code` engineers FamilySize, IsAlone, TitleEncoded → `Supabase` audit log"
      }
    },
    {
      "id": "b92d76b4-9cdd-4f4a-bfb3-5380a28753e3",
      "name": "P3: Reason About Features",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        8560,
        1616
      ]
    },
    {
      "id": "aee2ef0d-c1e1-41d6-b88b-a9c1a9e47b6e",
      "name": "P3: Anthropic Haiku",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        8560,
        1792
      ]
    },
    {
      "id": "2cf42398-c4df-4781-a459-0270b8a09030",
      "name": "P3: Parse Feature Plan",
      "type": "n8n-nodes-base.code",
      "position": [
        8880,
        1616
      ]
    },
    {
      "id": "af43c97a-251b-419f-a01d-2a69a90014ed",
      "name": "P3: Engineer Features",
      "type": "n8n-nodes-base.code",
      "position": [
        9072,
        1616
      ]
    },
    {
      "id": "36569900-b3d4-468c-b8ef-6048045cf799",
      "name": "P3: Log Feature Eng",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        9296,
        1616
      ]
    },
    {
      "id": "e62131bf-706e-4445-9ee2-f4e9fe61389d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        9472,
        1408
      ],
      "parameters": {
        "width": 1060,
        "height": 80,
        "content": "### Phase 4 — Training & Evaluation\n`Code` trains Logistic Regression + Random Forest + XGBoost → `Claude Sonnet` judges winner by F1 score → `Supabase` audit log"
      }
    },
    {
      "id": "ce1db2b8-6a2b-4a56-97f2-86f4044b505e",
      "name": "P4: Setup Algorithms",
      "type": "n8n-nodes-base.code",
      "position": [
        9504,
        1616
      ]
    },
    {
      "id": "f0bec516-fdd9-4b95-a27b-eaab6d12651c",
      "name": "P4: Train All Models",
      "type": "n8n-nodes-base.code",
      "position": [
        9728,
        1616
      ]
    },
    {
      "id": "dd1ad86a-9469-4eb7-890f-706fb1cf9de9",
      "name": "P4: LLM Judge Best Model",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        9888,
        1616
      ]
    },
    {
      "id": "952afba0-febf-424d-ae1c-8990f240e404",
      "name": "P4: Anthropic Sonnet Judge",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        9888,
        1792
      ]
    },
    {
      "id": "38cd85dd-8565-4607-99dc-dabcc462fb7d",
      "name": "P4: Parse Judge Verdict",
      "type": "n8n-nodes-base.code",
      "position": [
        10176,
        1616
      ]
    },
    {
      "id": "971117dd-c2ea-4031-a8eb-be5b994f819f",
      "name": "P4: Log Training",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        10384,
        1616
      ]
    },
    {
      "id": "b0f56987-47b9-4e53-a779-09b2b163a734",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        10576,
        1408
      ],
      "parameters": {
        "width": 936,
        "height": 116,
        "content": "### Phase 5 — HITL Deployment\n`Claude Sonnet` writes MODEL_CARD.md → `Slack` posts approval request to human → `Supabase` audit log\n\n> 💡 Add a Webhook + If node after the Slack message to handle the h"
      }
    },
    {
      "id": "c41e615a-34da-440b-aa98-1a1967663cbb",
      "name": "P5: Generate Model Card",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        10608,
        1616
      ]
    },
    {
      "id": "feceb4a1-5121-4a3c-be70-0335c852ae7c",
      "name": "P5: Anthropic Sonnet Card",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        10608,
        1792
      ]
    },
    {
      "id": "62091e00-e3ed-48cc-9e1c-617b25525571",
      "name": "P5: Assemble Deployment Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        10832,
        1616
      ]
    },
    {
      "id": "b3c654ae-9026-4922-9da3-7707c8c1ddbc",
      "name": "P5: Send Slack Approval",
      "type": "n8n-nodes-base.slack",
      "position": [
        11056,
        1616
      ]
    },
    {
      "id": "b3e57af3-b2f5-4575-981d-fb321530016f",
      "name": "P5: Log Pipeline Complete",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        11264,
        1616
      ]
    },
    {
      "id": "20b42d3e-7c68-4727-9c8c-d2ae274d7389",
      "name": "P2: Fetch CSV",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7856,
        1616
      ]
    },
    {
      "id": "6c0989bf-1806-4cdc-a7dc-798eb72eeebd",
      "name": "P2: Clean Data",
      "type": "n8n-nodes-base.code",
      "position": [
        8288,
        1616
      ]
    }
  ],
  "connections": {
    "P2: Fetch CSV": {
      "main": [
        [
          {
            "node": "P2: Clean Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P2: Clean Data": {
      "main": [
        [
          {
            "node": "P2: Log Data Eng",
            "type": "main",
            "index": 0
          },
          {
            "node": "P3: Reason About Features",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P1: Parse Strategy": {
      "main": [
        [
          {
            "node": "P1: Log Strategy",
            "type": "main",
            "index": 0
          },
          {
            "node": "P2: Fetch CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P3: Anthropic Haiku": {
      "ai_languageModel": [
        [
          {
            "node": "P3: Reason About Features",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "P1: Anthropic Sonnet": {
      "ai_languageModel": [
        [
          {
            "node": "P1: Plan ML Strategy",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "P1: Plan ML Strategy": {
      "main": [
        [
          {
            "node": "P1: Parse Strategy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P4: Setup Algorithms": {
      "main": [
        [
          {
            "node": "P4: Train All Models",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P4: Train All Models": {
      "main": [
        [
          {
            "node": "P4: LLM Judge Best Model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P1: Receive MLOps Job": {
      "main": [
        [
          {
            "node": "P1: Plan ML Strategy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P3: Engineer Features": {
      "main": [
        [
          {
            "node": "P3: Log Feature Eng",
            "type": "main",
            "index": 0
          },
          {
            "node": "P4: Setup Algorithms",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P3: Parse Feature Plan": {
      "main": [
        [
          {
            "node": "P3: Engineer Features",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P4: Parse Judge Verdict": {
      "main": [
        [
          {
            "node": "P4: Log Training",
            "type": "main",
            "index": 0
          },
          {
            "node": "P5: Generate Model Card",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P5: Generate Model Card": {
      "main": [
        [
          {
            "node": "P5: Assemble Deployment Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P4: LLM Judge Best Model": {
      "main": [
        [
          {
            "node": "P4: Parse Judge Verdict",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P3: Reason About Features": {
      "main": [
        [
          {
            "node": "P3: Parse Feature Plan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "P5: Anthropic Sonnet Card": {
      "ai_languageModel": [
        [
          {
            "node": "P5: Generate Model Card",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "P4: Anthropic Sonnet Judge": {
      "ai_languageModel": [
        [
          {
            "node": "P4: LLM Judge Best Model",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "P5: Assemble Deployment Payload": {
      "main": [
        [
          {
            "node": "P5: Send Slack Approval",
            "type": "main",
            "index": 0
          },
          {
            "node": "P5: Log Pipeline Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}