Skip to content
CodeAncestry

Documentation · Reference

Portable records

Bioinformatics never forces everything into one file. FASTA carries sequence, GFF carries features, VCF carries variants. The same separation applies here. Examples below are abridged seeded records — the field names are the live schema, not an older draft.

genome.json

Lives in the repository. Describes what the project is composed of at one commit, and who it descends from. Identity is id, not genome_id. The source digest is treeDigest. A gene reference points at gene and allele accessions.

{
  "$schema": "https://codeancestry.com/schemas/genome/v0.1.json",
  "schemaVersion": "0.1",
  "id": "CAGENOME:01JKEYLIT7H2",
  "project": "CAPROJ:01JKEYLIT000",
  "name": "KEYLIT",
  "slug": "keylit",
  "tagline": "Learn piano. The next key is already glowing.",
  "generation": 0,
  "visibility": "public",
  "createdAt": "2026-08-28",
  "source": {
    "provider": "github",
    "repository": "uset82/keylit",
    "commit": "82c134bd1f",
    "treeDigest": "sha256:82c134bd1f4a",
    "defaultBranch": "main"
  },
  "parents": [],
  "genes": [
    {
      "gene": "CAGENE:MIDI-SCHEDULING",
      "allele": "CAALLELE:MIDI-SCHEDULING:2",
      "version": "1.2.0",
      "digest": "sha256:82c134bd",
      "expression": "active",
      "inheritance": "native",
      "confidence": 0.97,
      "evidence": [
        "CAEV:901",
        "CAEV:902"
      ],
      "anchors": [
        {
          "repository": "github:uset82/keylit",
          "commit": "82c134bd1f",
          "path": "src/midi-scheduling/index.ts",
          "symbols": []
        }
      ],
      "weight": 0.14
    },
    {
      "gene": "CAGENE:MIDI-DEVICE",
      "allele": "CAALLELE:MIDI-DEVICE:1",
      "version": "1.0.0",
      "digest": "sha256:27ad9017",
      "expression": "active",
      "inheritance": "native",
      "confidence": 0.94,
      "evidence": [
        "CAEV:901",
        "CAEV:903"
      ],
      "anchors": [
        {
          "repository": "github:uset82/keylit",
          "commit": "82c134bd1f",
          "path": "src/midi-device/index.ts",
          "symbols": []
        }
      ],
      "weight": 0.08
    }
  ],
  "agents": [
    "CAAGENT:KEYLIT:1"
  ],
  "licenses": {
    "spdxExpression": "MIT"
  },
  "lineageAssurance": "verified",
  "privacy": {
    "registryVisibility": "public",
    "sourceVisibility": "inherit-provider",
    "agentTelemetry": "metadata-only"
  },
  "attestations": [
    {
      "type": "slsa-provenance",
      "predicateType": "https://slsa.dev/provenance/v1",
      "subjectDigest": "sha256:82c134bd1f4a",
      "issuer": "https://github.com/uset82/keylit/.github/workflows/release.yml",
      "issuedAt": "2026-09-30",
      "verified": true
    },
    {
      "type": "cyclonedx-pedigree",
      "predicateType": "https://cyclonedx.org/specification/1.6",
      "subjectDigest": "sha256:82c134bd1f4a",
      "issuer": "cyclonedx-npm",
      "issuedAt": "2026-09-30",
      "verified": true
    }
  ]
}

A child declares what it inherited rather than silently copying it. That is the whole difference between a fork and a recorded descent. KEYLIT is generation 0 and has 0 parents; its children name it explicitly.

gene.json

Describes semantics separately from implementation. Ontology uses a dotted term, not a free-form class. Alleles carry their own digest, language, anchors and interfaces.

{
  "$schema": "https://codeancestry.com/schemas/gene/v0.1.json",
  "schemaVersion": "0.1",
  "id": "CAGENE:MIDI-SCHEDULING",
  "name": "MIDI Scheduling",
  "description": "Decides when an incoming MIDI event becomes an audible note. Owns the buffering strategy that trades input latency against dropout risk.",
  "ontology": {
    "term": "input.music.midi.scheduling",
    "tags": [
      "midi",
      "audio",
      "latency",
      "realtime"
    ]
  },
  "currentAllele": "CAALLELE:MIDI-SCHEDULING:5",
  "alleles": [
    {
      "id": "CAALLELE:MIDI-SCHEDULING:1",
      "number": 1,
      "version": "1.0.0",
      "digest": "sha256:27ad9016",
      "label": "Fixed 128-sample buffer",
      "summary": "The original. One buffer size for every device and every browser.",
      "parents": [],
      "originProject": "CAPROJ:01JKEYLIT000",
      "firstObservedAt": "2026-08-28",
      "language": "typescript",
      "anchors": [
        {
          "repository": "github:uset82/keylit",
          "commit": "27ad9016b4",
          "path": "src/midi/scheduler.ts",
          "symbols": [
            "MidiScheduler"
          ],
          "range": [
            1,
            148
          ]
        }
      ],
      "interfaces": {
        "inputs": [
          "midi-event"
        ],
        "outputs": [
          "scheduled-note-event"
        ]
      },
      "tests": [
        "midi-latency-suite-v1"
      ],
      "carriedBy": []
    },
    {
      "id": "CAALLELE:MIDI-SCHEDULING:2",
      "number": 2,
      "version": "1.2.0",
      "digest": "sha256:82c134bd",
      "label": "Device-aware buffer",
      "summary": "Buffer size chosen from the reported device class at connect time.",
      "parents": [
        "CAALLELE:MIDI-SCHEDULING:1"
      ],
      "originProject": "CAPROJ:01JKEYLIT000",
      "firstObservedAt": "2026-09-30",
      "language": "typescript",
      "anchors": [
        {
          "repository": "github:uset82/keylit",
          "commit": "82c134bd1f",
          "path": "src/midi/scheduler.ts",
          "symbols": [
            "MidiScheduler",
            "deviceProfile"
          ],
          "range": [
            1,
            212
          ]
        }
      ],
      "interfaces": {
        "inputs": [
          "midi-event",
          "device-descriptor"
        ],
        "outputs": [
          "scheduled-note-event"
        ]
      },
      "tests": [
        "midi-latency-suite-v3"
      ],
      "carriedBy": [
        "CAGENOME:01JKEYLIT7H2",
        "CAGENOME:01JSTUDIO8QK",
        "CAGENOME:01JACCESS2NV",
        "CAGENOME:01JPRODUCER3F"
      ]
    }
  ],
  "origin": {
    "project": "CAPROJ:01JKEYLIT000",
    "firstObservedCommit": "27ad9016b4",
    "firstObservedAt": "2026-08-28"
  },
  "license": {
    "spdx": "MIT"
  },
  "confidence": {
    "semanticBoundary": 0.97,
    "origin": 1
  },
  "stats": {
    "carrierCount": 8,
    "alleleCount": 5,
    "mutationCount": 3,
    "descendantProjects": 7
  }
}

agent-dna.json

Deliberately contains portable, consented information — never model weights, hidden reasoning or private memory. It records what an agent did, asserted, tested and shared, not everything it thought. Identity is id; the provider lives on identity.provider.

{
  "$schema": "https://codeancestry.com/schemas/agent-dna/v0.1.json",
  "schemaVersion": "0.1",
  "id": "CAAGENT:KEYLIT:1",
  "displayName": "KEYLIT Genome Agent",
  "generation": 0,
  "identity": {
    "provider": "codex",
    "providerAgentId": "codex-2026-09",
    "verification": "signed",
    "signingKey": "did:key:z6MkjKEYLIT0000000000000001"
  },
  "project": "CAPROJ:01JKEYLIT000",
  "genome": "CAGENOME:01JKEYLIT7H2",
  "capabilities": [
    "analyze-genome",
    "analyze-code",
    "run-tests",
    "review-lineage"
  ],
  "interfaces": {
    "mcp": true,
    "a2a": false
  },
  "tools": [
    {
      "name": "registry",
      "uri": "mcp://codeancestry/registry",
      "scope": "registry"
    },
    {
      "name": "github",
      "uri": "mcp://github/repo",
      "scope": "read-only"
    }
  ],
  "policies": {
    "canAutoMerge": false,
    "canPropagateMutations": false,
    "requiresHumanApproval": true,
    "requiresAttestation": true,
    "trustedRelations": [
      "child"
    ]
  },
  "authorizedMemory": {
    "mode": "summaries-only",
    "lineageSummaries": 1,
    "acceptedMutations": 0,
    "rejectedMutations": 2,
    "artifacts": [
      {
        "id": "CAMEM:101",
        "kind": "observation",
        "summary": "Ten capability boundaries confirmed by hand after the first automated pass.",
        "producedAt": "2026-09-30",
        "offeredTo": [],
        "signed": true
      }
    ]
  },
  "telemetry": {
    "mode": "metadata-only",
    "capturePrompts": false,
    "captureCompletions": false,
    "captureToolMetadata": true,
    "captureTokenMetrics": true
  },
  "knowledgeProduced": [],
  "trust": {
    "identityVerified": true,
    "outputsSigned": true,
    "privateReasoningStored": false,
    "reliability": 0.95
  }
}

Telemetry defaults to metadata only. Full prompt and completion capture is technically possible and stays opt-in. trust.privateReasoningStored is typed as literally false, so the schema itself forbids storing it.

mutation.cavcf

A VCF-inspired variant call. The reference and alternate are content digests, not source text — the format must not become a vehicle for embedding proprietary code. Columns follow the VCF convention: CHROM POS ID REF ALT QUAL FILTER INFO. CHROM is the gene; POS is the reference allele.

Generated from CAMUT:882 (M-83F12), the mutation this site exists to explain.

##fileformat=CAVCF/v0.1
##fileDate=2027-01-18
##source=CodeAncestry
##gene=CAGENE:MIDI-SCHEDULING
##reference=CAALLELE:MIDI-SCHEDULING:4
##INFO=<ID=STATE,Number=1,Type=String,Description="Mutation lifecycle state">
##INFO=<ID=KIND,Number=1,Type=String,Description="optimization|feature|fix|refactor|security|accessibility">
##INFO=<ID=ORIGIN,Number=1,Type=String,Description="Origin genome accession">
##INFO=<ID=GEN,Number=1,Type=Integer,Description="Origin generation">
##INFO=<ID=PROPOSED,Number=1,Type=String,Description="Proposing agent accession">
##INFO=<ID=COMMIT,Number=1,Type=String,Description="Source commit">
##INFO=<ID=SYMBOLS,Number=1,Type=Integer,Description="Symbols changed">
##INFO=<ID=APIBREAKS,Number=1,Type=Integer,Description="Public API breaks">
##INFO=<ID=CONF,Number=1,Type=Float,Description="Record confidence 0-1">
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
CAGENE:MIDI-SCHEDULING	CAALLELE:MIDI-SCHEDULING:4	CAMUT:882	sha256:c31f7ba9	sha256:b551d07c	97	maintainerApproved	STATE=offered-to-relatives;KIND=optimization;ORIGIN=CAGENOME:01JKIDSES5TC;GEN=2;PROPOSED=CAAGENT:KIDSES:12;COMMIT=e91d4c7a03;SYMBOLS=2;APIBREAKS=0;CONF=0.97

features.jsonl

GFF-inspired locus records. One JSON object per line maps a source path and range onto a gene, an allele, an inheritance mode and the evidence that supports the annotation. KEYLIT currently yields 10 feature lines from its genome anchors. Three of them:

{"seqid":"uset82/keylit","source":"codeancestry","type":"gene","path":"src/midi-scheduling/index.ts","start":1,"end":1,"strand":".","gene":"CAGENE:MIDI-SCHEDULING","allele":"CAALLELE:MIDI-SCHEDULING:2","inheritance":"native","expression":"active","evidence":["CAEV:901","CAEV:902"],"commit":"82c134bd1f","symbols":[],"score":0.97}
{"seqid":"uset82/keylit","source":"codeancestry","type":"gene","path":"src/midi-device/index.ts","start":1,"end":1,"strand":".","gene":"CAGENE:MIDI-DEVICE","allele":"CAALLELE:MIDI-DEVICE:1","inheritance":"native","expression":"active","evidence":["CAEV:901","CAEV:903"],"commit":"82c134bd1f","symbols":[],"score":0.94}
{"seqid":"uset82/keylit","source":"codeancestry","type":"gene","path":"src/audio-engine/index.ts","start":1,"end":1,"strand":".","gene":"CAGENE:AUDIO-ENGINE","allele":"CAALLELE:AUDIO-ENGINE:1","inheritance":"native","expression":"active","evidence":["CAEV:902","CAEV:907"],"commit":"82c134bd1f","symbols":[],"score":0.95}

Validation

Schemas are JSON Schema Draft 2020-12, served from /schemas/<name>/v0.1.json. Identifiers are content-addressed where possible, so a lineage record survives a repository being renamed or moved. The NCBI-style export package on each project page bundles these files with evidence, attestations and a README.