{
  "name": "Fleet Dispatcher - WF-5 DocsHandler",
  "nodes": [
    {
      "id": "wf5-input-001",
      "name": "Input",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1,
      "position": [
        250,
        300
      ],
      "parameters": {}
    },
    {
      "id": "wf5-doc-generator-001",
      "name": "Doc Generator",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        500,
        200
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ $env.AURA_SKILLS_URL }}/call",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.MCP_API_TOKEN }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"tool_name\": \"doc_generator\", \"args\": {\"project_root\": \".\"}}",
        "options": {
          "timeout": 60000
        }
      }
    },
    {
      "id": "wf5-linter-enforcer-001",
      "name": "Linter Enforcer",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        500,
        400
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ $env.AURA_SKILLS_URL }}/call",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.MCP_API_TOKEN }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"tool_name\": \"linter_enforcer\", \"args\": {\"project_root\": \".\"}}",
        "options": {
          "timeout": 60000
        }
      }
    },
    {
      "id": "wf5-merge-001",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        750,
        300
      ],
      "parameters": {
        "mode": "combine",
        "combinationMode": "mergeByPosition",
        "options": {}
      }
    },
    {
      "id": "wf5-set-001",
      "name": "Build Context",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1000,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "wf5-assign-skills-output",
              "name": "skills_output",
              "value": "={{ JSON.stringify($json) }}",
              "type": "string"
            },
            {
              "id": "wf5-assign-analyst-context",
              "name": "analyst_context",
              "value": "={{ JSON.stringify({issue_number: $node[\"Input\"].json.issue_number, issue_type: $node[\"Input\"].json.issue_type, title: $node[\"Input\"].json.title, body: $node[\"Input\"].json.body, skills_output: $json}) }}",
              "type": "string"
            }
          ]
        },
        "include": "all",
        "options": {}
      }
    },
    {
      "id": "wf5-execute-wf6-001",
      "name": "Execute WF-6",
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.1,
      "position": [
        1250,
        300
      ],
      "parameters": {
        "workflowId": "WF-6-code-gen-pr-push",
        "options": {
          "waitForSubWorkflow": true
        }
      }
    }
  ],
  "connections": {
    "Input": {
      "main": [
        [
          {
            "node": "Doc Generator",
            "type": "main",
            "index": 0
          },
          {
            "node": "Linter Enforcer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Doc Generator": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Linter Enforcer": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Build Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Context": {
      "main": [
        [
          {
            "node": "Execute WF-6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "id": "396cc43e-81a5-41cb-96d7-4d1650a95190"
}