{
  "id": "flapbase:mail-check",
  "source": "flapbase",
  "readOnly": true,
  "name": "メール到達可能性の点検",
  "purpose": "SPF・DKIM・DMARC の点検、設定の下書き、人による DNS 設定と反映の確認",
  "shape": "operation",
  "steps": [
    {
      "key": "inspect",
      "title": "初回の点検",
      "kind": "task",
      "phase": null,
      "stepRef": null,
      "acceptance": "assignee",
      "deliverableKinds": [],
      "performer": "agent",
      "agentPermission": "execute",
      "automation": {
        "executor": "agent",
        "approval": "conditional",
        "trigger": "manual"
      },
      "procedure": {
        "what": "初回の点検",
        "how": "対象のドメインを mail_check で点検し、SPF・DKIM・DMARC の判定と実際の値、DMARC の方針を読む。",
        "verify": "3項目の判定と実際の値があり、照会失敗と設定なしを区別できる",
        "tools": [
          "mail_check"
        ]
      },
      "startOffsetDays": null,
      "dueOffsetDays": null
    },
    {
      "key": "draft",
      "title": "足りない設定と入れる値をまとめる",
      "kind": "task",
      "phase": null,
      "stepRef": null,
      "acceptance": "human_acceptance",
      "deliverableKinds": [],
      "performer": "agent",
      "agentPermission": "draft",
      "automation": {
        "executor": "agent",
        "approval": "each_time",
        "trigger": "proposal_approval"
      },
      "procedure": {
        "what": "足りない設定と入れる値をまとめる",
        "how": "点検の結果と flapbase-mail-check の手順から、足りない設定と DNS に入れる値をまとめる。DKIM と SPF の具体値は、利用するサービスの公式の指定が分かるまで作らない。",
        "verify": "DMARC がない場合の TXT・_dmarc・v=DMARC1; p=none と、公式の指定の確認が必要な設定が分かる",
        "tools": []
      },
      "startOffsetDays": null,
      "dueOffsetDays": null
    },
    {
      "key": "configure",
      "title": "DNS の管理画面に入れる",
      "kind": "task",
      "phase": null,
      "stepRef": null,
      "acceptance": "human_acceptance",
      "deliverableKinds": [],
      "performer": "human",
      "agentPermission": "propose",
      "automation": {
        "executor": "human",
        "approval": "each_time",
        "trigger": "manual"
      },
      "procedure": {
        "what": "DNS の管理画面に入れる",
        "how": "人が DNS の管理画面を開き、公式の指定と下書きを確認して設定を入れる。",
        "verify": "人が設定を入力し、対象のドメインと値を確認した",
        "tools": []
      },
      "startOffsetDays": null,
      "dueOffsetDays": null
    },
    {
      "key": "verify",
      "title": "入れたあとに読み直して確かめる",
      "kind": "task",
      "phase": null,
      "stepRef": null,
      "acceptance": "assignee",
      "deliverableKinds": [],
      "performer": "agent",
      "agentPermission": "execute",
      "automation": {
        "executor": "agent",
        "approval": "conditional",
        "trigger": "manual"
      },
      "procedure": {
        "what": "入れたあとに読み直して確かめる",
        "how": "同じドメインを mail_check で読み直す。反映していない場合は DNS の反映を待ち、設定なしと照会失敗を区別する。",
        "verify": "入力した値と公開された値を比べ、反映の有無が分かる",
        "tools": [
          "mail_check"
        ]
      },
      "startOffsetDays": null,
      "dueOffsetDays": null
    },
    {
      "key": "watch",
      "title": "定期の点検",
      "kind": "task",
      "phase": null,
      "stepRef": null,
      "acceptance": "assignee",
      "deliverableKinds": [],
      "performer": "agent",
      "agentPermission": "execute",
      "automation": {
        "executor": "agent",
        "approval": "conditional",
        "trigger": "manual"
      },
      "procedure": {
        "what": "定期の点検",
        "how": "30日ごとに同じドメインを mail_check で読み直し、前回の結果と比べる。変わった時だけ知らせる。",
        "verify": "前回と変わった項目があれば知らせが届き、変わらなければ何も届かない",
        "tools": [
          "mail_check"
        ]
      },
      "startOffsetDays": null,
      "dueOffsetDays": null
    }
  ],
  "transitions": [
    {
      "source": "inspect",
      "target": "draft",
      "kind": "next"
    },
    {
      "source": "draft",
      "target": "configure",
      "kind": "next"
    },
    {
      "source": "configure",
      "target": "verify",
      "kind": "next"
    },
    {
      "source": "verify",
      "target": "watch",
      "kind": "next"
    }
  ],
  "origin": {
    "kind": "flapbase",
    "patternId": "mail-check"
  },
  "version": 1,
  "createdAt": null,
  "archivedAt": null
}
