{
  "familyId": "math.area.basic",
  "version": 1,
  "status": "draft",
  "name": "基本平面面積：矩形、正方形、三角形",
  "scope": [
    "單一矩形長乘寬",
    "單一正方形邊長平方",
    "三角形已確認對應底与垂直高，底乘高除以 2"
  ],
  "exclusions": [
    "圓與扇形",
    "複合或組合塗色",
    "估圖推定高或垂直",
    "混合長度單位換算",
    "周長問題套面積公式"
  ],
  "parameterSchema": {
    "shape": {
      "enum": [
        "rectangle",
        "square",
        "triangle"
      ]
    },
    "length": {
      "type": "positive-rational-string",
      "requiredWhen": "rectangle"
    },
    "width": {
      "type": "positive-rational-string",
      "requiredWhen": "rectangle"
    },
    "side": {
      "type": "positive-rational-string",
      "requiredWhen": "square"
    },
    "base": {
      "type": "positive-rational-string",
      "requiredWhen": "triangle"
    },
    "height": {
      "type": "positive-rational-string",
      "requiredWhen": "triangle"
    },
    "heightConfirmed": {
      "const": true,
      "requiredWhen": "triangle"
    },
    "unit": {
      "enum": [
        "mm",
        "cm",
        "m"
      ]
    },
    "confirmed": {
      "const": true
    },
    "mixedUnits": {
      "type": "boolean",
      "optional": true,
      "allowed": false
    },
    "claimedAnswer": {
      "type": "rational-string",
      "optional": true
    }
  },
  "methods": [
    {
      "methodId": "area.rectangle",
      "version": 1,
      "applicability": "rectangle 單一形狀，必要長度為正且同一已確認單位；三角形另需底高垂直對應證據",
      "steps": [
        {
          "id": "s1",
          "stage": 0,
          "title": "辨認圖形與尺寸",
          "instruction": "找出形狀、必要尺寸與長度單位。",
          "hint": "圖看起來像正方形或高，不代表條件已成立。",
          "check": "shape及必要facts已確認",
          "answerExposure": "none"
        },
        {
          "id": "s2",
          "stage": 1,
          "title": "選定面積公式",
          "instruction": "固定公式 length*width，尺寸代入原位置。",
          "hint": "三角形只取對應底的垂直高。",
          "check": "公式適用；三角形高确认；所有長度>0",
          "answerExposure": "none"
        },
        {
          "id": "s3",
          "stage": 2,
          "title": "計算面積",
          "instruction": "使用精確分數計算，三角形最後除以 2。",
          "hint": "平方單位是面積，不能寫成長度單位。",
          "check": "獨立計算一致、單位平方",
          "answerExposure": "partial"
        },
        {
          "id": "s4",
          "stage": 3,
          "title": "核對結果",
          "instruction": "檢查數值、單位與原尺寸一致。",
          "hint": "三角形面積是同底同高矩形的一半。",
          "check": "合理範圍和claimedAnswer一致",
          "answerExposure": "final-after-confirmation"
        }
      ],
      "validatorRefs": [
        "facts.confirmed.v1",
        "shape.supported.v1",
        "dimensions.positive.v1",
        "unit.area.v1",
        "rational.area.v1",
        "claimed-answer.v1"
      ],
      "diagramRefs": [
        "area.rectangle.labelled"
      ]
    },
    {
      "methodId": "area.square",
      "version": 1,
      "applicability": "square 單一形狀，必要長度為正且同一已確認單位；三角形另需底高垂直對應證據",
      "steps": [
        {
          "id": "s1",
          "stage": 0,
          "title": "辨認圖形與尺寸",
          "instruction": "找出形狀、必要尺寸與長度單位。",
          "hint": "圖看起來像正方形或高，不代表條件已成立。",
          "check": "shape及必要facts已確認",
          "answerExposure": "none"
        },
        {
          "id": "s2",
          "stage": 1,
          "title": "選定面積公式",
          "instruction": "固定公式 side*side，尺寸代入原位置。",
          "hint": "三角形只取對應底的垂直高。",
          "check": "公式適用；三角形高确认；所有長度>0",
          "answerExposure": "none"
        },
        {
          "id": "s3",
          "stage": 2,
          "title": "計算面積",
          "instruction": "使用精確分數計算，三角形最後除以 2。",
          "hint": "平方單位是面積，不能寫成長度單位。",
          "check": "獨立計算一致、單位平方",
          "answerExposure": "partial"
        },
        {
          "id": "s4",
          "stage": 3,
          "title": "核對結果",
          "instruction": "檢查數值、單位與原尺寸一致。",
          "hint": "三角形面積是同底同高矩形的一半。",
          "check": "合理範圍和claimedAnswer一致",
          "answerExposure": "final-after-confirmation"
        }
      ],
      "validatorRefs": [
        "facts.confirmed.v1",
        "shape.supported.v1",
        "dimensions.positive.v1",
        "unit.area.v1",
        "rational.area.v1",
        "claimed-answer.v1"
      ],
      "diagramRefs": [
        "area.square.labelled"
      ]
    },
    {
      "methodId": "area.triangle",
      "version": 1,
      "applicability": "triangle 單一形狀，必要長度為正且同一已確認單位；三角形另需底高垂直對應證據",
      "steps": [
        {
          "id": "s1",
          "stage": 0,
          "title": "辨認圖形與尺寸",
          "instruction": "找出形狀、必要尺寸與長度單位。",
          "hint": "圖看起來像正方形或高，不代表條件已成立。",
          "check": "shape及必要facts已確認",
          "answerExposure": "none"
        },
        {
          "id": "s2",
          "stage": 1,
          "title": "選定面積公式",
          "instruction": "固定公式 base*height/2，尺寸代入原位置。",
          "hint": "三角形只取對應底的垂直高。",
          "check": "公式適用；三角形高确认；所有長度>0",
          "answerExposure": "none"
        },
        {
          "id": "s3",
          "stage": 2,
          "title": "計算面積",
          "instruction": "使用精確分數計算，三角形最後除以 2。",
          "hint": "平方單位是面積，不能寫成長度單位。",
          "check": "獨立計算一致、單位平方",
          "answerExposure": "partial"
        },
        {
          "id": "s4",
          "stage": 3,
          "title": "核對結果",
          "instruction": "檢查數值、單位與原尺寸一致。",
          "hint": "三角形面積是同底同高矩形的一半。",
          "check": "合理範圍和claimedAnswer一致",
          "answerExposure": "final-after-confirmation"
        }
      ],
      "validatorRefs": [
        "facts.confirmed.v1",
        "shape.supported.v1",
        "dimensions.positive.v1",
        "unit.area.v1",
        "rational.area.v1",
        "claimed-answer.v1",
        "triangle.altitude-confirmed.v1"
      ],
      "diagramRefs": [
        "area.triangle.labelled"
      ]
    }
  ],
  "svgTemplateSpecs": [
    {
      "templateId": "area.rectangle.labelled",
      "version": 1,
      "parameters": [
        "length",
        "width",
        "unit",
        "verifiedTrace"
      ],
      "domainGuards": [
        "正長度且同一單位",
        "事實與已核對trace同源"
      ],
      "primitives": [
        "rect",
        "line",
        "text"
      ],
      "revealSequence": [
        "圖形及已確認尺寸",
        "公式涉及邊線",
        "計算當前步",
        "確認後揭露面積及平方單位"
      ],
      "fallback": "條件不清顯示待確認標註，不算面積；極端比例採明示非比例示意，原題圖結構不同回原圖標註",
      "geometry": "示意圖，非比例；三角形以底 A=(0,0), B=(1,0), 頂 C=(0.4,1)，垂足 H=(0.4,0)，AHB 共線，CH 垂直 AB；座標僅供示意，不參與數學計算",
      "sourceBinding": "尺寸标签引用原factId，面积引用trace；不從SVG座標反推實際長度",
      "security": [
        "白名單圖元",
        "文字escape",
        "禁script、foreignObject、event handlers、外部url"
      ]
    },
    {
      "templateId": "area.square.labelled",
      "version": 1,
      "parameters": [
        "side",
        "unit",
        "verifiedTrace"
      ],
      "domainGuards": [
        "正長度且同一單位",
        "事實與已核對trace同源"
      ],
      "primitives": [
        "rect",
        "line",
        "text"
      ],
      "revealSequence": [
        "圖形及已確認尺寸",
        "公式涉及邊線",
        "計算當前步",
        "確認後揭露面積及平方單位"
      ],
      "fallback": "條件不清顯示待確認標註，不算面積；極端比例採明示非比例示意，原題圖結構不同回原圖標註",
      "geometry": "示意圖，非比例；三角形以底 A=(0,0), B=(1,0), 頂 C=(0.4,1)，垂足 H=(0.4,0)，AHB 共線，CH 垂直 AB；座標僅供示意，不參與數學計算",
      "sourceBinding": "尺寸标签引用原factId，面积引用trace；不從SVG座標反推實際長度",
      "security": [
        "白名單圖元",
        "文字escape",
        "禁script、foreignObject、event handlers、外部url"
      ]
    },
    {
      "templateId": "area.triangle.labelled",
      "version": 1,
      "parameters": [
        "base",
        "height",
        "unit",
        "verifiedTrace"
      ],
      "domainGuards": [
        "正長度且同一單位",
        "事實與已核對trace同源",
        "heightConfirmed=true 且高對應底",
        "僅示意標準銳角三角形；原題直角/鈍角/外高需專用模板或原圖標註，不擅改形狀"
      ],
      "primitives": [
        "polygon",
        "line",
        "text",
        "circle",
        "path"
      ],
      "revealSequence": [
        "圖形及已確認尺寸",
        "公式涉及邊線",
        "底與垂直高、直角記號；外形不是證據",
        "計算當前步",
        "確認後揭露面積及平方單位"
      ],
      "fallback": "條件不清顯示待確認標註，不算面積；極端比例採明示非比例示意，原題圖結構不同回原圖標註",
      "geometry": "示意圖，非比例；三角形以底 A=(0,0), B=(1,0), 頂 C=(0.4,1)，垂足 H=(0.4,0)，AHB 共線，CH 垂直 AB；座標僅供示意，不參與數學計算",
      "sourceBinding": "尺寸标签引用原factId，面积引用trace；不從SVG座標反推實際長度",
      "security": [
        "白名單圖元",
        "文字escape",
        "禁script、foreignObject、event handlers、外部url"
      ]
    }
  ],
  "review": {
    "humanTeacherReviewed": false,
    "machineCheckStatus": "author-exact-arithmetic-checked; independent-main-validation-pending",
    "publicationEligibility": "draft-only",
    "source": "original-authored",
    "noStudentData": true
  },
  "validationPolicy": {
    "facts": "all required dimensions and shape supported by text/mark or confirmation; no inference from appearance",
    "arithmetic": "exact positive rationals; area=length*width / side*side / base*height/2",
    "unit": "same confirmed length unit -> that unit squared; missing/unknown/mixed -> confirm; no implicit conversion",
    "range": "single-shape area positive; triangle area <= bounding base*height; does not validate arbitrary shaded region",
    "claimedAnswer": "unequal numeric claimedAnswer -> block with null answer",
    "release": "draft only until teacher/content approval"
  },
  "answerProjection": {
    "studentBeforeCompletion": "current prompt, confirmed facts and revealed diagram layers only",
    "private": "expected answers, held-out cases and validator traces"
  }
}
