{
  "format": "agentaction-recipe-starter/v1",
  "agentName": "Turn support questions into help articles",
  "recipe": {
    "schemaVersion": 1,
    "version": "1.0.0",
    "publisher": {
      "name": "AgentAction",
      "url": "https://github.com/dinpd/AgentAction",
      "kind": "maintainer"
    },
    "evidence": {
      "level": "fixture",
      "description": "Synthetic observations test the outcome rules only. No live agent run is established by these checks. Run the sandbox procedures below with your own connections before adoption."
    },
    "id": "support-help-articles",
    "title": "Turn support questions into help articles",
    "category": "Customer support",
    "summary": "Find repeated questions, check existing answers, and prepare sourced help article drafts for review.",
    "mode": "Supervised actions",
    "intent": "Review a bounded set of support conversations, identify recurring questions that existing help content does not answer, and create approved draft articles with private source provenance.",
    "servers": [
      {
        "name": "Intercom",
        "purpose": "Read conversations and help content; create approved unpublished articles.",
        "tools": [
          "search",
          "get_conversation",
          "list_articles",
          "get_article",
          "create_article"
        ],
        "connection": {
          "endpoint": "https://mcp.intercom.com/mcp",
          "documentation": "https://developers.intercom.com/docs/guides/mcp",
          "authentication": "Connect an authorized Intercom US-hosted workspace. Grant conversation/article reads and article creation only as needed; use a development workspace for write tests."
        }
      }
    ],
    "adoption": {
      "inputs": [
        {
          "name": "Review window and scope",
          "example": "Last 7 days; onboarding team; at most 100 conversations",
          "description": "Supply explicit start/end times, workspace/team and a bounded sample budget. Disclose sampling and pagination limits."
        },
        {
          "name": "Minimum recurrence",
          "example": "3 distinct conversations from at least 2 customers",
          "description": "Count distinct conversation and customer IDs privately; do not inflate counts from repeated messages."
        },
        {
          "name": "Article destination",
          "example": "Help center, collection ID, author admin ID and reviewer",
          "description": "Use known workspace identifiers. Draft up to 3 proposals; approve exact content and destination before creation."
        },
        {
          "name": "Approved reference material",
          "example": "Published help articles and supplied product policy",
          "description": "Support anecdotes can identify gaps; they do not establish product policy."
        }
      ],
      "requirements": [
        "Provide private storage for the coverage report, source IDs, reviewer decision and created article IDs. These records must not appear in public article bodies.",
        "Configure a runtime approval gate for create_article and restrict state to draft. Instructions alone do not enforce a gate.",
        "Use a single writer or durable lock per topic/destination. After an uncertain creation response, reconcile existing drafts and your run record before attempting another write."
      ],
      "exampleOutput": "Example only — synthetic support workspace.\nReview: 7 days, 60 conversations reviewed, complete within configured scope.\nGap: “How do I transfer workspace ownership?”\nEvidence: 6 conversations / 4 customers; private source IDs recorded separately.\nExisting article checked: “Manage workspace members”; ownership transfer is not covered.\nProposal: “Transfer workspace ownership”, grounded in supplied approved policy.\nReviewer approved draft content and destination. Created article draft_demo_1; read-back state: draft.\nCustomer names, messages and private conversation links are excluded from the article.",
      "validation": [
        {
          "name": "Seeded gap",
          "procedure": "In a development workspace, seed 3 conversations from 2 fictional customers about the same missing answer and supply an approved policy. Keep existing help articles unrelated. Approve the proposal.",
          "expected": "One sourced draft, correct destination, no private customer details; get_article confirms draft state."
        },
        {
          "name": "Answer already exists",
          "procedure": "Seed an article that fully answers the repeated question.",
          "expected": "Recommend the existing article; no duplicate creation. Report no_gap as a valid no-action result, not as a completed draft-creation job."
        },
        {
          "name": "Pending review and privacy",
          "procedure": "Withhold approval and include a fictional email address and private conversation link in the source threads.",
          "expected": "Proposals only; no create_article call. Public-facing body excludes the email and private link."
        },
        {
          "name": "Ambiguous write result",
          "procedure": "In a sandbox stub, create the draft but return a timeout. Rerun using the stored topic/run identifier and existing-draft lookup.",
          "expected": "Reconcile and read back the existing draft or stop for review; never issue a blind second create."
        }
      ]
    },
    "boundaries": [
      "Read only the approved workspace, time window and sample scope. State any incomplete coverage.",
      "Never infer policy from agent guesses or customer requests. Unresolved product behavior becomes a question for the reviewer.",
      "Do not place customer identifiers, verbatim private messages or private conversation links in article bodies. Keep provenance separately with restricted access.",
      "Create only reviewer-approved draft articles. Never publish, update an existing article, reply to a conversation or close a ticket with this recipe."
    ],
    "instructions": [
      "Confirm scope, recurrence threshold, author, destination and reviewer. Use search for conversations within the agreed filters and follow documented pagination until complete or the budget is reached.",
      "Use get_conversation to inspect supporting threads. Cluster recurring questions, count distinct conversations and customers, and record private source IDs. Disclose incomplete/sample coverage.",
      "Use list_articles with pagination and get_article for relevant existing content, including drafts. Distinguish a missing answer from an existing article that needs distribution or updating.",
      "Prepare at most the requested number of proposals using approved source material. Include a private gap report and a separate publishable article body; unresolved policy gaps must be explicitly listed.",
      "Present exact title, body, author, collection and draft state for review. If approval is absent, stop with proposals and status awaiting_review; this is not completion of the draft-creation job.",
      "After approval, reconcile the topic/destination against stored run records and existing drafts. Call create_article with state draft only for a new approved topic. Do not blindly retry after a timeout.",
      "Read the resulting article with get_article and verify content, destination and state. Save its ID with the review record. Report only verified draft creations; privacy and support checks require independent review, not a model claiming it passed."
    ],
    "outcomes": [
      {
        "id": "provenance-reviewed",
        "field": "provenance_reviewed",
        "label": "Supporting conversations and approved policy references were independently checked",
        "equals": true
      },
      {
        "id": "coverage-disclosed",
        "field": "coverage_disclosed",
        "label": "The report states the actual review window, sample and pagination coverage",
        "equals": true
      },
      {
        "id": "privacy-reviewed",
        "field": "privacy_reviewed",
        "label": "The article body passed a privacy review",
        "equals": true
      },
      {
        "id": "approval-recorded",
        "field": "approval_recorded",
        "label": "Exact article content and destination were approved before creation",
        "equals": true
      },
      {
        "id": "draft-verified",
        "field": "draft_verified",
        "label": "The created or reconciled article was read back in draft state",
        "equals": true
      },
      {
        "id": "duplicates-created",
        "field": "duplicates_created",
        "label": "No duplicate draft was created",
        "equals": 0
      },
      {
        "id": "published-articles",
        "field": "published_articles",
        "label": "No article was published",
        "equals": 0
      }
    ],
    "fixtures": [
      {
        "id": "completed",
        "title": "Completed job with independently checked evidence",
        "observation": {
          "provenance_reviewed": true,
          "coverage_disclosed": true,
          "privacy_reviewed": true,
          "approval_recorded": true,
          "draft_verified": true,
          "duplicates_created": 0,
          "published_articles": 0
        },
        "expected": "met"
      },
      {
        "id": "no-approval",
        "title": "A draft was created without review",
        "observation": {
          "provenance_reviewed": true,
          "coverage_disclosed": true,
          "privacy_reviewed": true,
          "approval_recorded": false,
          "draft_verified": true,
          "duplicates_created": 0,
          "published_articles": 0
        },
        "expected": "not_met"
      },
      {
        "id": "privacy-leak",
        "title": "A customer identifier was copied into the article",
        "observation": {
          "provenance_reviewed": true,
          "coverage_disclosed": true,
          "privacy_reviewed": false,
          "approval_recorded": true,
          "draft_verified": true,
          "duplicates_created": 0,
          "published_articles": 0
        },
        "expected": "not_met"
      },
      {
        "id": "duplicate-retry",
        "title": "A timeout led to a duplicate draft",
        "observation": {
          "provenance_reviewed": true,
          "coverage_disclosed": true,
          "privacy_reviewed": true,
          "approval_recorded": true,
          "draft_verified": true,
          "duplicates_created": 1,
          "published_articles": 0
        },
        "expected": "not_met"
      },
      {
        "id": "published",
        "title": "An article was accidentally published",
        "observation": {
          "provenance_reviewed": true,
          "coverage_disclosed": true,
          "privacy_reviewed": true,
          "approval_recorded": true,
          "draft_verified": true,
          "duplicates_created": 0,
          "published_articles": 1
        },
        "expected": "not_met"
      },
      {
        "id": "unsupported-policy",
        "title": "A customer request was treated as product policy",
        "observation": {
          "provenance_reviewed": false,
          "coverage_disclosed": true,
          "privacy_reviewed": true,
          "approval_recorded": true,
          "draft_verified": true,
          "duplicates_created": 0,
          "published_articles": 0
        },
        "expected": "not_met"
      },
      {
        "id": "missing-evidence",
        "title": "Required evidence was not collected",
        "observation": {
          "coverage_disclosed": true,
          "privacy_reviewed": true,
          "approval_recorded": true,
          "draft_verified": true,
          "duplicates_created": 0,
          "published_articles": 0
        },
        "expected": "indeterminate"
      }
    ]
  },
  "connections": [
    {
      "name": "Intercom",
      "endpoint": "https://mcp.intercom.com/mcp",
      "documentation": "https://developers.intercom.com/docs/guides/mcp",
      "authentication": "Connect an authorized Intercom US-hosted workspace. Grant conversation/article reads and article creation only as needed; use a development workspace for write tests.",
      "requiredTools": [
        "search",
        "get_conversation",
        "list_articles",
        "get_article",
        "create_article"
      ]
    }
  ],
  "setup": [
    "Configure each MCP server in your agent runtime; keep credentials out of this file.",
    "Load the recipe instructions and review boundaries with your team.",
    "Run sandbox cases with your agent and collect actual tool outcomes before enabling real actions.",
    "Connect your runtime to AgentAction, then configure Evals and inspect Jobs. Fixture checks do not install runtime controls."
  ]
}