{
    "name": "Lara-Tech サッカーフォーメーション JSON",
    "version": 3,
    "description": "このJSONを https://lara-tech.ezic.info/soccer-formation の「JSONを反映」に貼り付けると、フォーメーション図が再現されます。AIはこの仕様に従って payload JSON を生成してください。",
    "pageUrl": "https://lara-tech.ezic.info/soccer-formation",
    "specUrl": "https://lara-tech.ezic.info/soccer-formation/spec",
    "coordinateSystem": {
        "origin": "左上を (x=0, y=0)、右下を (x=1, y=1) とするコート内の相対座標。",
        "range": "x, y はいずれも 0.0〜1.0 の小数。範囲外は自動でクランプされる。",
        "orientationNote": "pitchOrientation が \"portrait\"(縦) のとき、自チーム(home)のGKは下側 (y≈0.95)、攻撃方向は上(yが小さい方)。\"landscape\"(横) では描画時に90度回転する。",
        "awayNote": "相手チーム(away)は home と上下反転した配置(y → 1 - y)が基本。",
        "teamSize": "各チームは選手11人(id 1〜11)。一部だけ指定した場合は不足分が既定値で補完される。"
    },
    "enums": {
        "formation": [
            "4-4-2",
            "4-3-3",
            "4-2-3-1",
            "3-5-2",
            "3-4-3",
            "4-1-4-1",
            "5-3-2",
            "3-4-2-1",
            "4-1-2-3"
        ],
        "pitchMode": [
            "full",
            "half"
        ],
        "pitchOrientation": [
            "portrait",
            "landscape"
        ],
        "mascotStyle": [
            "kit",
            "circle"
        ],
        "activeTeam": [
            "home",
            "away"
        ],
        "colors": [
            {
                "name": "ブルー",
                "value": "#2563eb"
            },
            {
                "name": "レッド",
                "value": "#ef4444"
            },
            {
                "name": "オレンジ",
                "value": "#f97316"
            },
            {
                "name": "グリーン",
                "value": "#16a34a"
            },
            {
                "name": "イエロー",
                "value": "#facc15"
            },
            {
                "name": "ブラック",
                "value": "#111827"
            },
            {
                "name": "ホワイト",
                "value": "#f8fafc"
            },
            {
                "name": "ネイビー",
                "value": "#1e3a8a"
            }
        ]
    },
    "schema": {
        "type": "object",
        "fields": {
            "version": "整数。現行は 3。省略可。",
            "formation": "enums.formation のいずれか。基本配置のプリセット。",
            "pitchMode": "\"full\"(フルコート) または \"half\"(ハーフコート)。",
            "pitchOrientation": "\"portrait\"(縦) または \"landscape\"(横)。",
            "mascotStyle": "\"kit\"(ユニフォーム型) または \"circle\"(円形)。",
            "showNames": "真偽値。選手名の表示。",
            "showNumbers": "真偽値。背番号の表示。",
            "showHome": "真偽値。自チームの表示。",
            "showAway": "真偽値。相手チームの表示。",
            "showBall": "真偽値。ボールの表示。",
            "showTitle": "真偽値。タイトルの表示。",
            "showGrid": "真偽値。編集用グリッドの表示(画像/HTML書き出しには含まれない)。",
            "snapToGrid": "真偽値。グリッド吸着。",
            "allowMultilineNames": "真偽値。選手名の複数行入力を許可。",
            "title": "文字列。図のタイトル。",
            "activeTeam": "\"home\" または \"away\"。編集対象チーム。",
            "ball": "オブジェクト { x: 0〜1, y: 0〜1 }。ボール位置。",
            "teams": "オブジェクト { home: Player[], away: Player[] }。"
        },
        "player": {
            "id": "整数 1〜11。1 は必ずGK(ゴールキーパー)。",
            "name": "選手名(文字列、空可)。allowMultilineNames が false のとき改行は空白に変換される。",
            "subName": "候補名/サブ名(文字列、空可)。表示時は丸括弧付きで名前の下に表示される。",
            "number": "背番号。\"1\"〜\"99\" の文字列、または \"\"(非表示)。同一チーム内で重複した番号は自動的に空にされる。",
            "color": "ユニフォーム色。#rrggbb 形式の16進カラー。colors の value 推奨だが任意の色も可。",
            "x": "横位置。0.0(左端)〜1.0(右端)の小数。コート内の相対座標。",
            "y": "縦位置。0.0(上端)〜1.0(下端)の小数。portrait では自陣GKが下(y≈0.98)側。"
        }
    },
    "example": {
        "version": 3,
        "formation": "4-3-3",
        "pitchMode": "full",
        "pitchOrientation": "portrait",
        "mascotStyle": "kit",
        "showNames": true,
        "showNumbers": true,
        "showHome": true,
        "showAway": false,
        "showBall": false,
        "showTitle": true,
        "showGrid": false,
        "snapToGrid": false,
        "allowMultilineNames": false,
        "title": "2026 開幕スタメン",
        "activeTeam": "home",
        "ball": {
            "x": 0.5,
            "y": 0.5
        },
        "teams": {
            "home": [
                {
                    "id": 1,
                    "name": "権田",
                    "number": "1",
                    "color": "#facc15",
                    "x": 0.5,
                    "y": 0.9499999999999999555910790149937383830547332763671875
                },
                {
                    "id": 2,
                    "name": "山田",
                    "number": "2",
                    "color": "#f97316",
                    "x": 0.81999999999999995115018691649311222136020660400390625,
                    "y": 0.7399999999999999911182158029987476766109466552734375
                },
                {
                    "id": 3,
                    "name": "田中",
                    "number": "4",
                    "color": "#f97316",
                    "x": 0.59999999999999997779553950749686919152736663818359375,
                    "y": 0.7399999999999999911182158029987476766109466552734375
                },
                {
                    "id": 4,
                    "name": "佐藤",
                    "number": "5",
                    "color": "#f97316",
                    "x": 0.40000000000000002220446049250313080847263336181640625,
                    "y": 0.7399999999999999911182158029987476766109466552734375
                },
                {
                    "id": 5,
                    "name": "鈴木",
                    "number": "3",
                    "color": "#f97316",
                    "x": 0.179999999999999993338661852249060757458209991455078125,
                    "y": 0.7399999999999999911182158029987476766109466552734375
                },
                {
                    "id": 6,
                    "name": "高橋",
                    "number": "6",
                    "color": "#f97316",
                    "x": 0.7199999999999999733546474089962430298328399658203125,
                    "y": 0.5
                },
                {
                    "id": 7,
                    "name": "伊藤",
                    "number": "8",
                    "color": "#f97316",
                    "x": 0.5,
                    "y": 0.5
                },
                {
                    "id": 8,
                    "name": "渡辺",
                    "number": "7",
                    "color": "#f97316",
                    "x": 0.2800000000000000266453525910037569701671600341796875,
                    "y": 0.5
                },
                {
                    "id": 9,
                    "name": "中村",
                    "number": "11",
                    "color": "#f97316",
                    "x": 0.8000000000000000444089209850062616169452667236328125,
                    "y": 0.2200000000000000011102230246251565404236316680908203125
                },
                {
                    "id": 10,
                    "name": "小林",
                    "number": "9",
                    "color": "#f97316",
                    "x": 0.5,
                    "y": 0.179999999999999993338661852249060757458209991455078125
                },
                {
                    "id": 11,
                    "name": "加藤",
                    "number": "10",
                    "color": "#f97316",
                    "x": 0.200000000000000011102230246251565404236316680908203125,
                    "y": 0.2200000000000000011102230246251565404236316680908203125
                }
            ],
            "away": []
        }
    },
    "simpleFormat": {
        "description": "ページの「データ編集（テキスト連動）」ではJSONの他に、人が編集しやすい簡易形式も使える。図とテキストは双方向でリアルタイム連動する。",
        "headers": [
            "タイトル: <文字列>",
            "フォーメーション: <4-4-2 など enums.formation のいずれか>",
            "コート: <フル|ハーフ> / <縦|横>",
            "マスコット: <ユニフォーム|サークル>",
            "表示: <名前, 背番号, タイトル, 自チーム, 相手チーム, ボール, グリッド, 吸着, 複数行名前 のうち有効にする項目をカンマ区切り。すべて無効なら「なし」>",
            "ボール: <x>, <y>  (0〜1)"
        ],
        "playerLine": "[自チーム] / [相手チーム] セクション内に「枠番号: 背番号 名前 (候補名) 色 @x,y」を1行1選手で記述。背番号なしは「-」。色は色名(オレンジ等)または #rrggbb。候補名と座標は省略可。",
        "example": "タイトル: 開幕スタメン\nフォーメーション: 4-3-3\nコート: フル / 縦\nマスコット: ユニフォーム\n表示: 名前, 背番号, タイトル, 自チーム\nボール: 0.500, 0.500\n\n[自チーム]\n1: 1 権田 イエロー @0.500,0.950\n2: 2 山田 オレンジ @0.820,0.740"
    },
    "prompt": "あなたはサッカーのフォーメーション図データを作るアシスタントです。\n以下の【仕様】に厳密に従い、ユーザーの【指示】を表す JSON を **1つだけ** ```json コードブロックで出力してください。説明文や余計なテキストは出力しないでください。\n\n【仕様: Lara-Tech サッカーフォーメーション JSON】\n- 最上位はオブジェクト。主なキー:\n  - formation: 次のいずれか( 4-4-2 / 4-3-3 / 4-2-3-1 / 3-5-2 / 3-4-3 / 4-1-4-1 / 5-3-2 / 3-4-2-1 / 4-1-2-3 )\n  - pitchMode: \"full\" または \"half\"\n  - pitchOrientation: \"portrait\"(縦) または \"landscape\"(横)\n  - mascotStyle: \"kit\"(ユニフォーム型) または \"circle\"(円形)\n  - showNames / showNumbers / showHome / showAway / showBall / showTitle: 真偽値\n  - title: 文字列(図のタイトル)\n  - activeTeam: \"home\" または \"away\"\n  - ball: { \"x\": 0〜1, \"y\": 0〜1 }\n  - teams: { \"home\": [選手...], \"away\": [選手...] }\n- 選手オブジェクト: { \"id\":1〜11, \"name\":\"選手名\", \"number\":\"背番号(1〜99の文字列か空)\", \"color\":\"#rrggbb\", \"x\":0〜1, \"y\":0〜1 }\n  - id=1 は必ずGK。各チームは11人。\n  - x は横位置(0=左, 1=右)、y は縦位置(0=上, 1=下)。portrait では自チームGKを下(y≈0.95)に置き、上方向(yが小さい)が攻撃方向。\n  - 背番号は同一チーム内で重複させない。\n- 代表的な色: ブルー=#2563eb, レッド=#ef4444, オレンジ=#f97316, グリーン=#16a34a, イエロー=#facc15, ブラック=#111827, ホワイト=#f8fafc, ネイビー=#1e3a8a\n\n【指示】\n（ここに、フォーメーション・チーム名や選手名・ユニフォーム色・タイトルなど作りたい内容を書いてください。例: 「4-3-3でタイトルは\"開幕戦\"。自チームはオレンジ。GKは権田、FWは小林・中村・加藤」）\n\n完全な仕様(JSON): https://lara-tech.ezic.info/soccer-formation/spec"
}