{
  "schemaVersion": 1,
  "project": "Kinetix Nutrition",
  "verifiedOn": "2026-10-26",
  "sourceRevision": "bb05dc9ce14756de8601bac843c046d41945dac8",
  "sourceFiles": [
    {
      "file": "src/utils/macroEngine.ts",
      "sha256": "b299075debb5e5781bfa44d6ae89e12e189b00df14f091b991f49b9cb683c188"
    },
    {
      "file": "src/data/extraFoods.json",
      "sha256": "1bde22874658f1b9852b255e1ad2b88cb511dcdfb4addd465bf68cd8aac76684"
    },
    {
      "file": "src/data/nutritionDb.ts",
      "sha256": "50da1e6f23d869ad721f8ba82da3e2a039197d6391efd7ff15ffd13e058fa3e5"
    },
    {
      "file": "src/data/usdaReference.ts",
      "sha256": "8f54b38ddf484c8b7dfcc5c353578697b6162adca2f708834de2cd869a8a2cba"
    },
    {
      "file": "src/data/extraRecipes.ts",
      "sha256": "52dbc16c3393cf8bf8b4e16d2bbc8576f5044b383335872e96f7682ca9f47f66"
    },
    {
      "file": "src/utils/dietary.ts",
      "sha256": "145451baaf44d99223875a2c5b9a0e1f7f80dbf14064c814796da1c7eb84cc43"
    },
    {
      "file": "src/data/foodPolicies.json",
      "sha256": "bd2fe32f3b2c623f0022a59e9f7a7819a3813874dd4bc59e615406040cf8618b"
    },
    {
      "file": "src/utils/workspace.ts",
      "sha256": "819c4bb9be8b43351ecc2797a8f7d344583acbf7652da853210bff1d76708639"
    }
  ],
  "method": "Actual TypeScript calculation and workspace modules transpiled with the checkout’s TypeScript compiler and executed locally. Synthetic clock (25 October 2026), synthetic storage and synthetic food descriptions; all results asserted before capture.",
  "boundary": "Local deterministic source checks. No real user/browser data, AI calls, hosted database, clinical validation, image recognition accuracy or full security/load audit. Nutrition calculations use generic USDA reference foods; this does not measure an actual meal.",
  "verificationHarness": "/evidence/kinetix-verification-harness.mjs",
  "scenarios": [
    {
      "id": "unknown-food",
      "title": "Ask before estimating",
      "description": "An unknown dish produces a clarification request and no invented calories. A mixed known/unknown description cannot be committed as a partial log.",
      "why": "Uncertainty should stay visible instead of turning into an authoritative-looking number.",
      "steps": [
        {
          "title": "Unknown description rejected",
          "input": {
            "text": "unrecognized test dish",
            "slot": "lunch"
          },
          "result": {
            "items": [],
            "unresolved": [
              "unrecognized test dish: no supported food match. Choose a food from the catalogue or edit the description."
            ],
            "assumptions": []
          },
          "observed": [
            {
              "label": "Recognised foods",
              "value": "0"
            },
            {
              "label": "Clarifications",
              "value": "1"
            },
            {
              "label": "Generated nutrition values",
              "value": "None"
            }
          ]
        },
        {
          "title": "Mixed input cannot create a log",
          "input": {
            "text": "100g chicken, mystery dish"
          },
          "result": [],
          "observed": [
            {
              "label": "Loggable items",
              "value": "0"
            }
          ]
        }
      ]
    },
    {
      "id": "known-portion",
      "title": "Show the portion assumption",
      "description": "Supported gram quantities scale identified reference foods. Unit counts expose the convention before the person confirms.",
      "why": "A useful estimate connects a food match, portion and data source.",
      "steps": [
        {
          "title": "Known quantities parsed",
          "input": {
            "text": "200g chicken breast, 180g rice and 2 eggs",
            "slot": "lunch"
          },
          "result": {
            "items": [
              {
                "id": "nlp-1792929600000-0",
                "slot": "lunch",
                "name": "Chicken breast (cooked, roasted)",
                "foodId": "chicken_breast",
                "grams": 200,
                "calories": 330,
                "protein": 62,
                "carbs": 0,
                "fat": 7,
                "source": "nlp",
                "timestamp": "13:00"
              },
              {
                "id": "nlp-1792929600000-1",
                "slot": "lunch",
                "name": "White long-grain rice (cooked)",
                "foodId": "jasmine_rice",
                "grams": 180,
                "calories": 234,
                "protein": 5,
                "carbs": 51,
                "fat": 1,
                "source": "nlp",
                "timestamp": "13:00"
              },
              {
                "id": "nlp-1792929600000-2",
                "slot": "lunch",
                "name": "Whole egg (raw weight)",
                "foodId": "egg_whole",
                "grams": 100,
                "calories": 143,
                "protein": 13,
                "carbs": 1,
                "fat": 10,
                "source": "nlp",
                "timestamp": "13:00"
              }
            ],
            "unresolved": [],
            "assumptions": [
              "2 eggs: using 50 g per egg (50g)."
            ]
          },
          "observed": [
            {
              "label": "Chicken portion",
              "value": "200 g"
            },
            {
              "label": "Chicken estimate",
              "value": "330 kcal"
            },
            {
              "label": "Egg portion",
              "value": "100 g"
            },
            {
              "label": "Visible unit assumptions",
              "value": "1"
            }
          ]
        }
      ]
    },
    {
      "id": "personal-start",
      "title": "Keep samples separate",
      "description": "A new personal workspace starts on the current local date with empty logs and weight history. The demo deliberately has sample records.",
      "why": "A demo should never be mistaken for someone’s personal history.",
      "steps": [
        {
          "title": "Fresh personal workspace",
          "input": {
            "localDate": "2026-10-25",
            "mode": "personal"
          },
          "result": {
            "firstDate": "2026-10-25",
            "lastDate": "2026-10-31",
            "loggedMeals": 0,
            "weightEntries": 0,
            "waterMl": 0
          },
          "observed": [
            {
              "label": "First date",
              "value": "2026-10-25"
            },
            {
              "label": "Last date",
              "value": "2026-10-31"
            },
            {
              "label": "Logged meals",
              "value": "0"
            },
            {
              "label": "Weight entries",
              "value": "0"
            }
          ]
        },
        {
          "title": "Explicit demo workspace",
          "input": {
            "localDate": "2026-10-25",
            "mode": "demo"
          },
          "result": {
            "firstDaySampleLoggedMeals": 2,
            "sampleWeightEntries": 7
          },
          "observed": [
            {
              "label": "Sample logged meals",
              "value": "2"
            },
            {
              "label": "Sample weight entries",
              "value": "7"
            }
          ]
        }
      ]
    },
    {
      "id": "storage-recovery",
      "title": "Recover without overwriting",
      "description": "Malformed saved JSON is detected. Loading falls back safely and leaves the original data untouched.",
      "why": "A browser-storage failure should not erase the work that might still be recoverable.",
      "steps": [
        {
          "title": "Unreadable saved record",
          "input": {
            "key": "kinetix_personal_v2",
            "value": "{\"broken\":"
          },
          "result": {
            "saved": false,
            "notice": "Saved data could not be read. The original is preserved on this device. The account cloud copy will be checked.",
            "originalAfterLoad": "{\"broken\":",
            "weightEntries": 0
          },
          "observed": [
            {
              "label": "Saved state accepted",
              "value": "false"
            },
            {
              "label": "Original unchanged",
              "value": "true"
            },
            {
              "label": "Fallback weight entries",
              "value": "0"
            }
          ]
        }
      ]
    }
  ],
  "supplementaryChecks": 18
}
