{
  "schemaVersion": "1",
  "platform": {
    "name": "CommonSense Marketplace",
    "url": "https://commonsc.io",
    "lastUpdated": "2026-06-07",
    "status": "https://status.commonsc.io"
  },
  "schemas": {
    "manifest": "https://api.commonsc.io/schemas/manifest.schema.json",
    "genomicIo": "https://api.commonsc.io/schemas/genomic-io.schema.json",
    "result": "https://api.commonsc.io/schemas/result.schema.json",
    "gateResult": "https://api.commonsc.io/schemas/gate-result.schema.json",
    "discovery": "https://api.commonsc.io/schemas/discovery.schema.json"
  },
  "tiers": [
    {
      "id": "pyodide",
      "available": true,
      "interpreter": { "name": "pyodide", "version": "0.26.2" },
      "constraints": {
        "memoryMiBMax": 512,
        "wallSecondsMax": 30,
        "diskMiBMax": 64,
        "networkAllowed": false,
        "subprocessAllowed": false,
        "fsReadAllowlist": ["/input"],
        "fsWriteAllowlist": ["/output"]
      }
    },
    {
      "id": "webr",
      "available": false,
      "etaIsoMonth": "2027-01"
    },
    {
      "id": "container",
      "available": false,
      "etaIsoMonth": "2027-Q2"
    }
  ],
  "api": {
    "base": "https://api.commonsc.io",
    "endpoints": {
      "publisherRegister": {
        "method": "POST",
        "path": "/publisher/register",
        "auth": "none",
        "responseSchemaRef": "https://api.commonsc.io/schemas/api/publisher-register.response.schema.json"
      },
      "algorithmsValidate": {
        "method": "POST",
        "path": "/algorithms/validate",
        "auth": "none",
        "responseSchemaRef": "https://api.commonsc.io/schemas/gate-result.schema.json"
      },
      "algorithmsPublish": {
        "method": "POST",
        "path": "/algorithms/publish",
        "auth": "ed25519-signature"
      },
      "algorithmsStatus": {
        "method": "GET",
        "path": "/algorithms/{submissionId}/status",
        "auth": "none"
      },
      "catalogIndex": {
        "method": "GET",
        "path": "https://api.commonsc.io/registry/index.json",
        "auth": "none"
      },
      "evidenceLookup": {
        "method": "GET",
        "path": "/evidence?q={trait}",
        "auth": "none",
        "description": "GWAS Catalog evidence triage per trait. Query BEFORE authoring a test: ground it in real evidence and pick a citation that will resolve at publish. Evidence triage, NOT clinical validity.",
        "query": {
          "q": "free-text trait to search, e.g. 'eye color' (required)",
          "limit": "max results, default 10, cap 50 (optional)",
          "include_medical": "default true; set false to exclude medical-flagged traits (optional)"
        },
        "response": {
          "count": "number of results",
          "results": [
            {
              "trait": "ontology-mapped trait label",
              "tier": "strong | moderate | limited (evidence triage, NOT clinical validity)",
              "portability": "european_only | multi_ancestry | non_european | unknown (who the evidence applies to; carry the caveat into your result)",
              "pmid": "PubMed id of the primary study — cite as {type:'pubmed', id} in manifest.references; the publish gate resolves it, so use this, not a guess",
              "study_url": "GWAS Catalog study page (fallback citation)",
              "n_studies": "how many studies back this trait",
              "summary_stats": "boolean — whether genome-wide per-variant stats exist (needed for a real polygenic score; top hits alone are not)",
              "caveats": "array of plain-language warnings to surface in the result",
              "medical": "true for disease/clinical/biomarker/pharmacogenomic traits — OUT OF SCOPE, do not build; CommonSense is trait/wellness/curiosity only"
            }
          ]
        }
      }
    },
    "rateLimits": {
      "publisherRegister": "5 / hour / IP",
      "algorithmsValidate": "60 / hour / publisher",
      "algorithmsPublish": "10 / day / publisher",
      "algorithmsStatus": "120 / hour / publisher"
    }
  },
  "authentication": {
    "scheme": "ed25519-signature",
    "registration": "https://commonsc.io/publisher/register",
    "form": "Per submission: sign the canonical manifest (checksum + signatures blanked) with your registered ed25519 private key and send it as the `x-commonsc-publisher-sig` header alongside `x-commonsc-key-id`. The marketplace verifies it against the public key you registered and rejects anything that doesn't match."
  },
  "fixtures": {
    "syntheticVariantSet23andme": "https://api.commonsc.io/fixtures/synthetic-23andme.json",
    "syntheticVariantSetAncestry": "https://api.commonsc.io/fixtures/synthetic-ancestry.json",
    "syntheticVariantSetVcf": "https://api.commonsc.io/fixtures/synthetic-vcf.json"
  },
  "docs": {
    "humanGuide": "https://commonsc.io/contribute",
    "machineGuide": "https://commonsc.io/llms.txt",
    "blockGallery": "https://commonsc.io/blocks.html",
    "examples": "https://github.com/druidalabs/commonsc-marketplace-/tree/main/algorithms"
  },
  "review": {
    "queue": "human-in-the-loop",
    "slaHours": 48,
    "policy": "https://commonsc.io/review-policy"
  }
}
