{
  "$schema": "https://www.cuddler.dev/standards/document-role/process/v1.0.0/questionnaire.schema.json",
  "questionnaireId": "draft-follow-up",
  "title": "Draft Follow-Up",
  "summary": "Produce the first reply after the workflow context is complete.",
  "instructions": "# Draft Follow-Up\n\nUse the captured context to draft a concise first reply that confirms the request, proposes the next step, and flags any missing information.",
  "format": "markdown",
  "entryQuestionId": "reply-tone",
  "questions": [
    {
      "questionId": "reply-tone",
      "title": "What tone should the reply use?",
      "answerType": "select-one",
      "outputKey": "replyTone",
      "options": [
        {
          "value": "warm",
          "label": "Warm",
          "description": "Friendly and conversational."
        },
        {
          "value": "direct",
          "label": "Direct",
          "description": "Short and operational."
        },
        {
          "value": "formal",
          "label": "Formal",
          "description": "Polished and professional."
        }
      ],
      "conversation": [
        {
          "messages": [
            {
              "role": "system",
              "content": "You are running the Draft Follow-Up workflow step."
            },
            {
              "role": "assistant",
              "content": "Choose the reply tone: warm, direct, or formal."
            },
            {
              "role": "user",
              "content": "warm"
            }
          ]
        }
      ],
      "routing": {
        "default": {
          "nextQuestionId": "follow-up-focus"
        }
      },
      "for-ai": [
        {
          "instruction": "Use this guidance when evaluating the completed conversation for this question.",
          "input": "",
          "output": "Return the selected reply tone as one of warm, direct, or formal."
        }
      ]
    },
    {
      "questionId": "follow-up-focus",
      "title": "What should the reply focus on?",
      "answerType": "long-text",
      "outputKey": "followUpFocus",
      "conversation": [
        {
          "messages": [
            {
              "role": "system",
              "content": "You are running the Draft Follow-Up workflow step."
            },
            {
              "role": "assistant",
              "content": "What should the reply emphasize first?"
            },
            {
              "role": "user",
              "content": "Confirm we can help, propose a short intake call, and summarize the open questions."
            }
          ]
        }
      ],
      "routing": {
        "default": {
          "nextQuestionId": "missing-information"
        }
      },
      "for-ai": [
        {
          "instruction": "Use this guidance when evaluating the completed conversation for this question.",
          "input": "",
          "output": "Return the normalized drafting focus for the first reply based on the completed conversation."
        }
      ]
    },
    {
      "questionId": "missing-information",
      "title": "Which follow-up items still need answers?",
      "answerType": "select-many",
      "outputKey": "missingInformation",
      "options": [
        {
          "value": "deadline",
          "label": "Deadline",
          "description": "The requested deadline still needs confirmation."
        },
        {
          "value": "attachments",
          "label": "Attachments",
          "description": "Supporting files or examples are still needed."
        },
        {
          "value": "contact-details",
          "label": "Contact details",
          "description": "The sponsor or point of contact still needs confirmation."
        },
        {
          "value": "scope",
          "label": "Scope",
          "description": "The scope or boundaries still need clarification."
        },
        {
          "value": "none",
          "label": "None",
          "description": "No follow-up items remain open."
        }
      ],
      "conversation": [
        {
          "messages": [
            {
              "role": "system",
              "content": "You are running the Draft Follow-Up workflow step."
            },
            {
              "role": "assistant",
              "content": "Select every follow-up item that still needs an answer."
            },
            {
              "role": "user",
              "content": "deadline, contact-details, scope"
            }
          ]
        }
      ],
      "routing": {
        "default": {
          "complete": true
        }
      },
      "for-ai": [
        {
          "instruction": "Use this guidance when evaluating the completed conversation for this question.",
          "input": "",
          "output": "Return the normalized set of remaining follow-up items from the completed conversation. Use an empty set only when none applies."
        }
      ]
    }
  ]
}
