{
  "name": "Assess GitHub bus-factor risk in GitHub with Claude, tickets and Slack",
  "nodes": [
    {
      "id": "1afe3a83-ef42-4fdc-b5f5-462dc1a8dfb1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        -384
      ],
      "parameters": {
        "width": 480,
        "height": 1392,
        "content": "## AI Code Ownership & Bus-Factor Intelligence Engine\n\n### How it works\n\nThis workflow ingests GitHub push events, pull-request merges, and a periodic contributor-stats baseline scan, normalizes them into a shared ownership-signal format, and stores them in a temporary ownership buffer. On a scheduled batch window, it retrieves recent buffered signals, computes commit-concentration scores per repo/component, and pre-clusters them into clearly healthy, clearly critical, or ambiguous groups. Claude is only used to judge the ambiguous groups (borderline ownership concentration where context matters); clear cases pass straight through. The resolved clusters are turned into knowledge-transfer/documentation tasks, pushed into a ticketing system, and announced to engineering leadership in Slack.\n\n### Setup steps\n\n- Configure GitHub webhooks (push and pull_request events) on the relevant repositories to point at the two webhook triggers below.\n- Add a GitHub API credential (header auth / PAT) to the Fetch Org Repositories and Fetch Contributor Stats HTTP Request nodes, and set your org name in the repositories URL.\n- Review and adapt each normalization Code node so the incoming payload shapes map to the same canonical fields: source, repo, component, contributor, commit counts, and timestamp.\n- Add credentials and endpoint details for the ownership-signal buffer API used by the store and fetch HTTP Request nodes.\n- Set the Cron/baseline schedule to how often you want a full contributor-stats scan, and set the batch-window schedule to how often you want risk scoring to run (e.g. weekly).\n- Adjust the thresholds in Compute Bus-Factor Risk Scores to match your org's risk appetite (contributor count, commit concentration cutoffs).\n- Configure Anthropic credentials for the Claude risk-assessment agent and select the intended model in the Anthropic chat model sub-node.\n- Add ticketing-system API credentials and adjust the create/update endpoint, payload, and task matching fields.\n- Connect Slack credentials and choose the channel that should receive bus-factor task notifications."
      },
      "typeVersion": 1
    },
    {
      "id": "106d2c1a-f68d-4c99-b3bd-323fa933ceb7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        -352
      ],
      "parameters": {
        "color": 3,
        "width": 496,
        "height": 320,
        "content": "## Push event intake\n\nReceives GitHub push webhooks and normalizes each commit into the shared ownership-signal format before sending it into the common ingestion stream."
      },
      "typeVersion": 1
    },
    {
      "id": "c9a102d9-fb3e-4306-ad35-f5f3793f1df3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 496,
        "height": 304,
        "content": "## Pull request intake\n\nReceives pull_request (merged) webhooks and converts author/reviewer activity into the workflow's canonical ownership-signal structure."
      },
      "typeVersion": 1
    },
    {
      "id": "b5e0fd88-7618-4503-92d3-3576555c8298",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        320
      ],
      "parameters": {
        "color": 3,
        "width": 496,
        "height": 352,
        "content": "## Contributor baseline intake\n\nOn a schedule, pulls the org's repository list and per-repo contributor stats from GitHub, then normalizes them so they can be scored together with the event-driven signals."
      },
      "typeVersion": 1
    },
    {
      "id": "c49db549-8910-4cb2-bc35-a47ee26b5457",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 752,
        "content": "## Buffer normalized signals\n\nCombines the normalized ownership signals from all three intake lanes and posts each into the external buffer service for later batch processing."
      },
      "typeVersion": 1
    },
    {
      "id": "e1724d03-e6f8-4ccc-a58f-28d948fad5dc",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        192
      ],
      "parameters": {
        "color": 4,
        "width": 496,
        "height": 320,
        "content": "## Fetch batch window\n\nStarts the scheduled risk-analysis cycle and retrieves ownership signals accumulated in the buffer during the most recent processing window."
      },
      "typeVersion": 1
    },
    {
      "id": "3a91186b-b5e7-4b76-980c-760a0b04de02",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        176
      ],
      "parameters": {
        "color": 6,
        "width": 480,
        "height": 336,
        "content": "## Score and route\n\nGroups buffered signals by repo/component, computes commit-concentration and active-contributor counts, and routes ambiguous cases toward AI review while sending clear-cut healthy or critical cases down the direct path."
      },
      "typeVersion": 1
    },
    {
      "id": "b9794d2a-777b-46ae-9c30-a317fdd1253b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2368,
        -48
      ],
      "parameters": {
        "color": 4,
        "width": 624,
        "height": 640,
        "content": "## Resolve ambiguous clusters\n\nUses a Claude-powered agent to judge borderline ownership-concentration clusters (context matters: is this a real bus-factor risk or an acceptable low-churn component?), then applies the AI result back to the workflow's cluster structure."
      },
      "typeVersion": 1
    },
    {
      "id": "5b94eadf-f43c-4d43-be29-8428b6aae88d",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2304,
        624
      ],
      "parameters": {
        "color": 6,
        "height": 464,
        "content": "## Pass clear clusters\n\nHandles clusters that were already unambiguous (clearly healthy or clearly critical), preserving them without sending them through the AI resolution branch."
      },
      "typeVersion": 1
    },
    {
      "id": "9e7c0e34-8b55-460e-a89a-16f09c577b1e",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3040,
        144
      ],
      "parameters": {
        "color": 6,
        "height": 368,
        "content": "## Merge risk outputs\n\nRecombines the AI-resolved ambiguous clusters and the directly passed clear clusters into one unified risk-result stream."
      },
      "typeVersion": 1
    },
    {
      "id": "66ccb9ef-3c0d-4904-8b14-6c4ad408a7f0",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2736,
        -384
      ],
      "parameters": {
        "color": 6,
        "width": 736,
        "height": 304,
        "content": "## Create tasks and notify\n\nBuilds knowledge-transfer/documentation tasks from the critical-risk clusters, creates or updates them in the ticketing system, and notifies engineering leadership in Slack."
      },
      "typeVersion": 1
    },
    {
      "id": "46afd4d3-a078-41de-867a-fc43b8be6330",
      "name": "On GitHub Push Event",
      "type": "n8n-nodes-base.webhook",
      "position": [
        80,
        -192
      ],
      "parameters": {
        "path": "github/push",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "d9408a47-bf97-49dd-a125-c04e1171ad2f",
      "name": "On Pull Request Merged",
      "type": "n8n-nodes-base.webhook",
      "position": [
        80,
        160
      ],
      "parameters": {
        "path": "github/pull-request",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "a2440155-6b10-4b69-a7e2-a89b4ba3d9be",
      "name": "Every Contributor Baseline Scan",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        80,
        512
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a22ae86b-3868-469e-a660-5f12db6aa9c5",
      "name": "Normalize Push Signal",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        -192
      ],
      "parameters": {
        "jsCode": "const results = [];\nfor (const item of $input.all()) {\n  const b = item.json.body || item.json;\n  const repo = (b.repository && (b.repository.full_name || b.repository.name)) || '';\n  const commits = b.commits || [];\n  for (const c of commits) {\n    const files = [...(c.added || []), ...(c.modified || []), ...(c.removed || [])];\n    results.push({\n      json: {\n        source: 'push',\n        repo,\n        component: files[0] || 'unknown',\n        filesChanged: files,\n        contributor: (c.author && (c.author.username || c.author.email || c.author.name)) || 'unknown',\n        commitId: c.id || '',\n        message: c.message || '',\n        timestamp: c.timestamp || new Date().toISOString()\n      }\n    });\n  }\n}\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "4957bf25-0e0d-417a-8a09-d49bdf7d8f03",
      "name": "Normalize Review Signal",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        160
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const b = $input.item.json.body || $input.item.json;\nconst pr = b.pull_request || {};\n\nreturn {\n  json: {\n    source: 'review',\n    repo: (b.repository && (b.repository.full_name || b.repository.name)) || '',\n    component: (pr.changed_files_sample && pr.changed_files_sample[0]) || pr.title || 'unknown',\n    contributor: (pr.user && pr.user.login) || 'unknown',\n    reviewers: (pr.requested_reviewers || []).map(r => r.login),\n    mergedBy: (pr.merged_by && pr.merged_by.login) || '',\n    prNumber: pr.number || '',\n    timestamp: pr.merged_at || new Date().toISOString()\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "368ed9ec-df9b-49ae-892d-60d519628b95",
      "name": "Fetch Org Repositories",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        480
      ],
      "parameters": {
        "url": "https://api.github.com/orgs/your-org/repos",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "eef42d79-d60a-4dec-ae4d-e7a97140686c",
      "name": "Fetch Contributor Stats",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        576,
        432
      ],
      "parameters": {
        "url": "=https://api.github.com/repos/{{ $json.full_name }}/stats/contributors",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "8a107006-79b7-4188-8043-c55b58d167d9",
      "name": "Normalize Contributor Signal",
      "type": "n8n-nodes-base.code",
      "position": [
        768,
        432
      ],
      "parameters": {
        "jsCode": "const results = [];\nfor (const item of $input.all()) {\n  const repoFullName = item.json.full_name || item.json.repo || '';\n  const stats = item.json.body || item.json || [];\n  const list = Array.isArray(stats) ? stats : (stats.contributors || []);\n  for (const c of list) {\n    results.push({\n      json: {\n        source: 'baseline',\n        repo: repoFullName,\n        component: repoFullName,\n        contributor: (c.author && c.author.login) || 'unknown',\n        totalCommits: c.total || 0,\n        lastCommitWeek: (c.weeks && c.weeks.length) ? c.weeks[c.weeks.length - 1].w : null,\n        timestamp: new Date().toISOString()\n      }\n    });\n  }\n}\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "0d54fd26-d9cb-4936-8c28-b406f23c2a4d",
      "name": "Merge Normalized Ownership Signals",
      "type": "n8n-nodes-base.merge",
      "position": [
        704,
        80
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "cc6d786a-390c-4cf9-8988-ebaff0bc2086",
      "name": "Post Signal to Ownership Buffer",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        992,
        80
      ],
      "parameters": {
        "url": "https://api.ownership-buffer.example.com/v1/signals",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ JSON.stringify($json) }}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "557b8128-ac4b-404e-9398-39a7f77c7562",
      "name": "Every Batch Processing Window",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1344,
        352
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c84ebfa4-9a38-48f0-9db7-924ac2be0b33",
      "name": "Fetch Buffered Ownership Signals",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1648,
        352
      ],
      "parameters": {
        "url": "https://api.ownership-buffer.example.com/v1/signals/window",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "82abe6cb-8c3b-4ba2-944f-f17d1475e5ac",
      "name": "Compute Bus-Factor Risk Scores",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        352
      ],
      "parameters": {
        "jsCode": "// Pull the signal list out of whatever the buffer API returned\nconst signals = ($input.first().json.signals || $input.first().json || []);\nconst list = Array.isArray(signals) ? signals : [];\n\nfunction clusterKey(s) {\n  return [(s.repo || '').toLowerCase(), (s.component || '').toLowerCase()].join('|');\n}\n\nconst groups = {};\nfor (const s of list) {\n  const key = clusterKey(s);\n  if (!groups[key]) groups[key] = [];\n  groups[key].push(s);\n}\n\nconst clearClusters = [];\nconst ambiguousClusters = [];\n\nfor (const key of Object.keys(groups)) {\n  const members = groups[key];\n  const contributorCommits = {};\n  for (const m of members) {\n    const c = m.contributor || 'unknown';\n    contributorCommits[c] = (contributorCommits[c] || 0) + (m.totalCommits || 1);\n  }\n  const contributors = Object.keys(contributorCommits);\n  const totalCommits = Object.values(contributorCommits).reduce((a, b) => a + b, 0);\n  const topContributor = contributors.reduce((top, c) => contributorCommits[c] > (contributorCommits[top] || 0) ? c : top, contributors[0]);\n  const topShare = totalCommits > 0 ? contributorCommits[topContributor] / totalCommits : 0;\n\n  const cluster = {\n    clusterKey: key,\n    repo: members[0].repo,\n    component: members[0].component,\n    contributors,\n    contributorCommits,\n    topContributor,\n    topShare,\n    members\n  };\n\n  // Clearly healthy: 3+ active contributors, no single owner above 60% of commits\n  if (contributors.length >= 3 && topShare < 0.6) {\n    clearClusters.push({ ...cluster, resolution: 'healthy' });\n    continue;\n  }\n  // Clearly critical: single contributor, or one owner has 90%+ of commits\n  if (contributors.length === 1 || topShare >= 0.9) {\n    clearClusters.push({ ...cluster, resolution: 'critical-risk' });\n    continue;\n  }\n  // Otherwise ambiguous - e.g. 2 contributors with 60-90% concentration - let Claude judge context\n  ambiguousClusters.push(cluster);\n}\n\nreturn [{\n  json: {\n    windowTimestamp: new Date().toISOString(),\n    clearClusters,\n    ambiguousClusters,\n    hasAmbiguous: ambiguousClusters.length > 0\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "477c71c3-9bbc-4db5-9e97-7ba31a6ad7f6",
      "name": "Check for Ambiguous Clusters",
      "type": "n8n-nodes-base.if",
      "position": [
        2192,
        352
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.hasAmbiguous }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7f7fcf19-059d-48c7-a6f0-f4b57d7229e2",
      "name": "AI Bus-Factor Risk Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2416,
        160
      ],
      "parameters": {
        "text": "=You are a staff engineer assessing code ownership and bus-factor risk.\n\nBelow are components where ownership is concentrated among only one or two active contributors, but the concentration level alone isn't enough to classify them automatically:\n\n{{ JSON.stringify($json.ambiguousClusters, null, 2) }}\n\nFor each cluster, decide whether this represents a genuine bus-factor risk that warrants a knowledge-transfer or documentation task, or whether it's acceptable as-is (for example, a stable, low-churn component, or one where the secondary contributors are simply less active but still present and capable). Base this on contributor count, commit concentration, and the component's apparent criticality from its repo/path/name.\n\nReturn a JSON object with EXACTLY this shape:\n{\n  \"resolvedClusters\": [\n    {\n      \"clusterKey\": \"string, matching input exactly\",\n      \"resolution\": \"critical-risk\" or \"acceptable\",\n      \"recommendedAction\": \"one short phrase, e.g. 'pair programming session' or 'no action needed'\",\n      \"reasoning\": \"one short sentence\"\n    }\n  ]\n}\n\nReturn ONLY the JSON. No markdown, no explanation.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "4136563d-f127-4afc-bb51-5b067e03da4e",
      "name": "Claude Bus-Factor Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        2672,
        448
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514"
        },
        "options": {
          "temperature": 0.1
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "54dfdb44-47e7-4aad-ba75-c444e5590c34",
      "name": "Apply AI Risk Resolution",
      "type": "n8n-nodes-base.code",
      "position": [
        2864,
        240
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const item = $input.item.json;\nconst upstream = $('Check for Ambiguous Clusters').first().json;\n\nlet resolved = [];\ntry {\n  const rawText = item.output || item.text || item.response || '{}';\n  const clean = rawText.replace(/```json|```/g, '').trim();\n  const parsed = JSON.parse(clean);\n  resolved = parsed.resolvedClusters || [];\n} catch (e) {\n  // Fallback: if parsing fails, flag every ambiguous cluster as critical-risk (safer than silently dismissing a real bus-factor risk)\n  resolved = (upstream.ambiguousClusters || []).map(c => ({\n    clusterKey: c.clusterKey,\n    resolution: 'critical-risk',\n    recommendedAction: 'manual review',\n    reasoning: 'AI risk assessment unavailable this cycle; flagged as risk as a safety default.'\n  }));\n}\n\nconst resolutionByKey = {};\nfor (const r of resolved) resolutionByKey[r.clusterKey] = r;\n\nconst finalizedAmbiguous = (upstream.ambiguousClusters || []).map(c => {\n  const r = resolutionByKey[c.clusterKey];\n  return {\n    ...c,\n    resolution: r ? r.resolution : 'critical-risk',\n    recommendedAction: r ? r.recommendedAction : 'manual review',\n    aiReasoning: r ? r.reasoning : ''\n  };\n});\n\nreturn { json: { windowTimestamp: upstream.windowTimestamp, clusters: [...upstream.clearClusters, ...finalizedAmbiguous] } };"
      },
      "typeVersion": 2
    },
    {
      "id": "11dd30d7-54b0-4f5a-876c-361105e52663",
      "name": "Pass Clear Risk Clusters",
      "type": "n8n-nodes-base.code",
      "position": [
        2352,
        896
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const item = $input.item.json;\nreturn { json: { windowTimestamp: item.windowTimestamp, clusters: item.clearClusters } };"
      },
      "typeVersion": 2
    },
    {
      "id": "5457469a-2707-4136-8923-08eddd1757af",
      "name": "Merge Risk Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        3088,
        352
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "cd35cbb8-a168-4c7d-89ea-c82a0fbd4ba6",
      "name": "Build Knowledge-Transfer Tasks",
      "type": "n8n-nodes-base.code",
      "position": [
        2784,
        -256
      ],
      "parameters": {
        "jsCode": "const allClusters = [];\nfor (const item of $input.all()) {\n  for (const c of (item.json.clusters || [])) allClusters.push(c);\n}\n\nconst tasks = allClusters\n  .filter(c => c.resolution === 'critical-risk')\n  .map((c, idx) => ({\n    taskId: `${(c.repo || 'unknown').replace(/\\//g, '-')}-${(c.component || 'component').replace(/[\\\\/]/g, '-')}-${idx}`,\n    title: `Bus-factor risk: ${c.component || 'component'} in ${c.repo || 'unknown repo'}`,\n    repo: c.repo || '',\n    component: c.component || '',\n    topContributor: c.topContributor || '',\n    topShare: c.topShare || null,\n    contributorCount: (c.contributors || []).length,\n    recommendedAction: c.recommendedAction || 'knowledge transfer / documentation',\n    aiReasoning: c.aiReasoning || '',\n    priority: ((c.topShare || 0) >= 0.9 || (c.contributors || []).length === 1) ? 'high' : 'medium'\n  }));\n\nreturn [{ json: { windowTimestamp: new Date().toISOString(), tasks } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "1e3d72a5-5752-4e41-9ba8-10e6b63162a7",
      "name": "Post to Ticketing System",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3056,
        -256
      ],
      "parameters": {
        "url": "https://api.ticketing-system.example.com/v1/tasks/bulk-upsert",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ JSON.stringify({ tasks: $json.tasks }) }}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "8f40f8e0-00f8-46da-a118-f669c91ad6e7",
      "name": "Send Slack Notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        3328,
        -256
      ],
      "parameters": {
        "text": "=Bus-factor analysis {{ $json.windowTimestamp }}: {{ $json.tasks.length }} knowledge-transfer task(s) created for critical-risk components. Review in the ticketing system.",
        "select": "channel",
        "channelId": "code-ownership-alerts",
        "otherOptions": {}
      },
      "typeVersion": 2.2
    }
  ],
  "connections": {
    "Merge Risk Results": {
      "main": [
        [
          {
            "node": "Build Knowledge-Transfer Tasks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On GitHub Push Event": {
      "main": [
        [
          {
            "node": "Normalize Push Signal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Push Signal": {
      "main": [
        [
          {
            "node": "Merge Normalized Ownership Signals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Org Repositories": {
      "main": [
        [
          {
            "node": "Fetch Contributor Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Pull Request Merged": {
      "main": [
        [
          {
            "node": "Normalize Review Signal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude Bus-Factor Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Bus-Factor Risk Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Contributor Stats": {
      "main": [
        [
          {
            "node": "Normalize Contributor Signal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Review Signal": {
      "main": [
        [
          {
            "node": "Merge Normalized Ownership Signals",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "AI Bus-Factor Risk Agent": {
      "main": [
        [
          {
            "node": "Apply AI Risk Resolution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply AI Risk Resolution": {
      "main": [
        [
          {
            "node": "Merge Risk Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pass Clear Risk Clusters": {
      "main": [
        [
          {
            "node": "Merge Risk Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Post to Ticketing System": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Ambiguous Clusters": {
      "main": [
        [
          {
            "node": "AI Bus-Factor Risk Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Pass Clear Risk Clusters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Contributor Signal": {
      "main": [
        [
          {
            "node": "Merge Normalized Ownership Signals",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Every Batch Processing Window": {
      "main": [
        [
          {
            "node": "Fetch Buffered Ownership Signals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Knowledge-Transfer Tasks": {
      "main": [
        [
          {
            "node": "Post to Ticketing System",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compute Bus-Factor Risk Scores": {
      "main": [
        [
          {
            "node": "Check for Ambiguous Clusters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every Contributor Baseline Scan": {
      "main": [
        [
          {
            "node": "Fetch Org Repositories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Buffered Ownership Signals": {
      "main": [
        [
          {
            "node": "Compute Bus-Factor Risk Scores",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Normalized Ownership Signals": {
      "main": [
        [
          {
            "node": "Post Signal to Ownership Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "meta": {
    "instanceId": null
  },
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  }
}