{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://shaduf.ai/p/digital-fly-catalog/assets/data/projects.schema.json",
 "title": "Digital Fly Lab catalogue record (published 2026-09-28; optional fields added in runs 2, 4, 7 and 9)",
 "description": "One record per catalogued project. Dates are ISO 8601. 'last_commit' and 'last_release' describe upstream activity; 'last_verified' and 'grade_date' describe our own checks. Values quoted from upstream are in 'claim'; everything else is our own wording.",
 "type": "object",
 "required": [
  "id",
  "name",
  "type",
  "summary",
  "dataset",
  "release",
  "evidence_grade",
  "grade_basis",
  "grade_date",
  "code_licence",
  "data_licence",
  "last_commit",
  "last_release",
  "link_status",
  "last_verified",
  "sources"
 ],
 "properties": {
  "id": {
   "type": "string",
   "pattern": "^[a-z0-9][a-z0-9-]*$",
   "description": "Stable lowercase slug. Never reused for another project."
  },
  "name": {
   "type": "string"
  },
  "type": {
   "enum": [
    "dataset",
    "data-tool",
    "model",
    "body",
    "demo-game",
    "demo-desktop",
    "demo-art",
    "browser-demo",
    "research",
    "directory"
   ]
  },
  "author_or_org": {
   "type": "string"
  },
  "summary": {
   "type": "string",
   "description": "One or two sentences in our own words."
  },
  "claim": {
   "type": [
    "object",
    "null"
   ],
   "properties": {
    "text": {
     "type": "string"
    },
    "url": {
     "type": "string",
     "format": "uri"
    }
   },
   "description": "Short quote of the project's own headline claim, with its URL. A claim, not a finding."
  },
  "dataset": {
   "type": "string",
   "description": "FlyWire FAFB | MaleCNS | BANC | MANC | hemibrain | FANC | larval L1 | several (...) | none | unknown"
  },
  "release": {
   "type": "string",
   "description": "Data release/version, e.g. 'v783', 'v1.0', 'not stated', 'n/a'."
  },
  "evidence_grade": {
   "enum": [
    "A",
    "B",
    "C",
    "D",
    "U",
    "n/a"
   ],
   "description": "How well the project's own claim of fly-brain-driven behaviour is supported (not quality or popularity). A: connectome + neural dynamics compared with real-fly data or a proper control (negative results included). B: named connectome release simulated and driving the behaviour, with hand-made input/output mapping, no control. C: subset/stand-in/decorative network, or connectome only triggers scripted programs. D: ordinary game logic, RL without connectome constraints, or LLM; neurons cosmetic. U: mechanism could not be inspected. n/a: infrastructure (datasets, tools, bodies, simulators)."
  },
  "mechanism": {
   "type": [
    "object",
    "null"
   ],
   "properties": {
    "wiring": {
     "type": "string"
    },
    "neuron_model": {
     "type": "string"
    },
    "input_mapping": {
     "type": "string",
     "description": "hand-made | learned | none (+ detail)"
    },
    "output_mapping": {
     "type": "string",
     "description": "hand-made | learned | none (+ detail)"
    },
    "trained_parts": {
     "type": "string"
    },
    "body": {
     "type": "string"
    },
    "scripted_parts": {
     "type": "string"
    }
   }
  },
  "grade_basis": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "What we inspected (file:line, URL), each with a reliability label [direct] / [fetch-summary] / [search-summary]."
  },
  "grade_date": {
   "type": "string",
   "format": "date"
  },
  "measured_result": {
   "type": [
    "string",
    "null"
   ],
   "description": "Numbers reported from a control or benchmark, with location. Measured by the author unless stated."
  },
  "try_url": {
   "type": [
    "string",
    "null"
   ],
   "format": "uri",
   "description": "No-install / browser option."
  },
  "try_status": {
   "type": "string",
   "description": "e.g. 'page responds (HTTP 200, checked 2026-09-28), not played by us'."
  },
  "code_url": {
   "type": [
    "string",
    "null"
   ],
   "format": "uri"
  },
  "code_licence": {
   "type": "string",
   "description": "SPDX id from the LICENSE file, or 'none found', 'custom: ...', 'n/a (no code repository)'."
  },
  "code_licence_source": {
   "type": "string"
  },
  "data_licence": {
   "type": "string"
  },
  "platform": {
   "type": [
    "array",
    "null"
   ],
   "items": {
    "enum": [
     "browser",
     "macOS",
     "Windows",
     "Linux",
     "Colab",
     "iOS",
     "Android",
     "other"
    ]
   }
  },
  "gpu": {
   "enum": [
    "required",
    "optional",
    "none",
    "not stated",
    null
   ]
  },
  "download_size": {
   "type": [
    "string",
    "null"
   ]
  },
  "last_commit": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "date": {
       "type": "string"
      },
      "hash": {
       "type": "string"
      },
      "branch": {
       "type": "string"
      }
     }
    },
    {
     "const": "n/a"
    }
   ],
   "description": "Upstream: last commit on the default branch (committer date)."
  },
  "pushed_at": {
   "type": [
    "string",
    "null"
   ],
   "description": "Upstream: GitHub pushed_at (any branch)."
  },
  "last_release": {
   "oneOf": [
    {
     "type": "object",
     "properties": {
      "tag": {
       "type": "string"
      },
      "date": {
       "type": "string"
      },
      "url": {
       "type": [
        "string",
        "null"
       ]
      }
     }
    },
    {
     "enum": [
      "none",
      "n/a"
     ]
    }
   ]
  },
  "created_at": {
   "type": [
    "string",
    "null"
   ],
   "description": "Upstream repository creation date. NOT an update date."
  },
  "stars": {
   "type": [
    "integer",
    "null"
   ]
  },
  "stars_date": {
   "type": [
    "string",
    "null"
   ]
  },
  "archived": {
   "type": [
    "boolean",
    "null"
   ]
  },
  "paper_url": {
   "type": [
    "string",
    "null"
   ]
  },
  "peer_review": {
   "enum": [
    "peer-reviewed",
    "preprint",
    "none"
   ]
  },
  "link_status": {
   "type": "object",
   "required": [
    "url",
    "status",
    "http_code",
    "checked_at"
   ],
   "properties": {
    "url": {
     "type": "string"
    },
    "status": {
     "enum": [
      "ok",
      "redirect",
      "4xx",
      "5xx",
      "blocked",
      "error",
      "gone"
     ]
    },
    "http_code": {
     "type": [
      "integer",
      "null"
     ]
    },
    "final_url": {
     "type": "string"
    },
    "checked_at": {
     "type": "string"
    }
   }
  },
  "last_verified": {
   "type": "string",
   "format": "date",
   "description": "Our last HTTP check of this record's links."
  },
  "sources": {
   "type": "array",
   "minItems": 1,
   "items": {
    "type": "string"
   }
  },
  "notes_limitations": {
   "type": "string"
  },
  "grade_note": {
   "type": [
    "string",
    "null"
   ],
   "description": "Publisher note for borderline or reviewed grades. The grade itself is unchanged."
  },
  "try_note": {
   "type": "string",
   "description": "Access note for the try link, for example a required sign-in."
  },
  "related_paper_url": {
   "type": [
    "string",
    "null"
   ]
  },
  "api_fields_reused": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "GitHub API fields (stars, created_at, pushed_at) copied from an earlier check instead of re-queried, because the API quota was low. Added 2026-09-28 (run 2)."
  },
  "api_fields_reused_from": {
   "type": "string",
   "description": "Date (YYYY-MM-DD) of the earlier check that api_fields_reused come from. Added 2026-09-28 (run 2)."
  },
  "archived_source": {
   "type": "string",
   "description": "Where the archived status was read, for example the GitHub repository page. Added 2026-09-28 (run 2)."
  },
  "added_in_run": {
   "type": "string",
   "description": "Research run that first added this record to the catalogue (absent for records from the first release). Added 2026-09-28 (run 2)."
  },
  "project_page": {
   "type": "string",
   "description": "Route of our substantive project page for this entry, when one exists. Added 2026-09-28 (run 2)."
  },
  "platform_note": {
   "type": "string",
   "description": "Full wording behind platform when it needs more detail than the enumerated values (for example \"macOS (Apple silicon)\"). Added 2026-09-28 (run 2)."
  },
  "gpu_note": {
   "type": "string",
   "description": "Full wording behind gpu (for example \"required (NVIDIA CUDA for training)\"). Added 2026-09-28 (run 2)."
  },
  "peer_review_note": {
   "type": "string",
   "description": "Full wording behind peer_review (for example \"none (blog post)\"). Added 2026-09-28 (run 2)."
  },
  "controls": {
   "enum": [
    "wiring-null",
    "baseline-only",
    "none"
   ],
   "description": "Added in run 4 (2026-09-30), optional. Whether the project tests its result against a wiring null (shuffled, rewired or random wiring), only against a no-brain or no-graph baseline, or has no control. Studies are in assets/data/controls.json."
  },
  "wiring_effect": {
   "enum": [
    "helps",
    "no-difference",
    "worse",
    "mixed",
    "not-tested"
   ],
   "description": "Added in run 4 (2026-09-30), optional. Copied from the study in controls.json; 'not-tested' whenever controls is not 'wiring-null'."
  },
  "browser_check": {
   "type": "object",
   "additionalProperties": false,
   "description": "Added 2026-10-03 (run 7), optional: result of our pre-registered headless-browser check (headless Chromium 154, Linux, no GPU; checks of 3 and 6 Oct 2026). Shows whether the page loads, downloads its brain data and keeps computing; not a play test. source names the published result file.",
   "required": [
    "status",
    "checked_at",
    "browser",
    "compute",
    "matches_catalogue"
   ],
   "properties": {
    "status": {
     "enum": [
      "runs",
      "runs-with-errors",
      "loads-no-activity",
      "needs-gpu",
      "fails",
      "blocked",
      "stopped-memory",
      "page-unresponsive",
      "moves-no-compute-signal",
      "not-checked",
      "skipped-memory"
     ]
    },
    "checked_at": {
     "type": "string"
    },
    "browser": {
     "type": "string"
    },
    "transferred_mb": {
     "type": [
      "number",
      "null"
     ]
    },
    "compute": {
     "enum": [
      "in-browser-worker",
      "in-browser-wasm",
      "in-browser-main-thread",
      "server",
      "unclear"
     ]
    },
    "first_activity_s": {
     "type": [
      "number",
      "null"
     ]
    },
    "console_errors": {
     "type": [
      "integer",
      "null"
     ]
    },
    "page_errors": {
     "type": [
      "integer",
      "null"
     ]
    },
    "matches_catalogue": {
     "enum": [
      "yes",
      "no",
      "unclear"
     ]
    },
    "note": {
     "type": "string"
    },
    "source": {
     "type": "string"
    }
   }
  },
  "trained_class": {
   "enum": [
    "none",
    "readout-or-decoder",
    "front-end",
    "whole-network-or-per-synapse",
    "policy-or-llm",
    "other",
    "not-assessed"
   ],
   "description": "Added 2026-10-06, optional. 'Is it AI?': which part of the project, if any, is trained, learned or tuned by search in its main (default) path. none = no trained part; readout-or-decoder = a trained readout, decoder or fitted readout on a frozen connectome network; front-end = a pretrained sensory front end (for example a vision model) in front of the wiring; whole-network-or-per-synapse = synapse weights or per-cell parameters inside the network are trained; policy-or-llm = a trained policy or language model chooses actions outside the wiring; other = learning rules during a run (STDP, dopamine plasticity) or a few parameters optimised by search; not-assessed = not graded (evidence grade U or n/a)."
  },
  "trained_class_note": {
   "type": "string",
   "maxLength": 160,
   "description": "Added 2026-10-06, optional. Plain-text detail for trained_class, for example an optional trained part that the main path does not use."
  }
 }
}
