Skip to content
CodeAncestry

Working paper · v0.1 · 28 August 2026

CodeAncestry

A Living Lineage Protocol for Software Genomes, Agent Inheritance, and Evolutionary Software Ecosystems

Working concept · not peer-reviewed · no experimental results

  • software lineage
  • capability genomes
  • provenance
  • agent identity
  • typed inheritance

Canonical text of the concept paper. A typeset PDF is not in this repository. The protocol this argument describes is the working site — specification, KEYLIT family.

Abstract

Software already reproduces. Forks, ports, rewrites and agent refactors move capabilities between projects every day. Git records the diff and loses the descent: which capabilities were inherited, why they exist, what a child changed, and what its agents learned. This paper proposes CodeAncestry as a semantic lineage layer above Git — not a host, not an SBOM, and not a literal genetics engine. The objects are genomes, capability genes, alleles, typed lineage edges, mutations with evidence, and portable agent identity. The contribution is the combination of those objects with a propagation protocol that never adopts automatically. Biology is the interface metaphor. Underneath it are commits, digests, manifests, signatures, tests and policy. The argument is illustrated on a seeded eight-project family, KEYLIT, which is a specimen, not a result.

  1. 01A semantic lineage layer above Git: genomes, capability genes, alleles, typed edges, and mutations with evidence.
  2. 02Four reproduction modes — fork, remix, cover, mashup — that keep descent after the code has changed.
  3. 03A seven-step propagation protocol that never adopts because an agent was confident.
  4. 04A seeded KEYLIT specimen that holds two clocks at once: project time and gene time.

1Origin

The idea started as a practical question about one project. KEYLIT is a browser piano tutor: Web MIDI, sampled audio, a lesson engine, a tool surface for agents. Once it existed, the obvious next things were children — a version for small hands, a studio, a classroom, an edition playable without sight. GitHub can fork the repository. It cannot keep saying, years later, which capabilities those children still carry, which they rewrote, and which improvements should be offered back.

Music already has language for this: original, remix, cover, mashup. Software does not. A GitHub template starts a new history. A fork preserves commits and still loses the semantic claim — that this capability came from that project, under this evidence. The stronger version of a fork is a living lineage: every application knows its parent, the version it was born from, what it inherited, what it changed, which changes it should keep inheriting, and which new abilities it developed.

Adding an agent to every generation changed the problem again. The lineage is then not only a history of repositories. Each project can carry a machine-readable genome, each capability can have ancestry, each mutation can carry evidence, and each project agent can offer a discovery to its relatives. Relatives decide. Nothing merges because an agent was confident.

2What Git loses

Git is the source of truth for bytes. It is not a genealogy. Two repositories that share no forge relationship can still share a capability. Two repositories that do share a fork edge can have rewritten every inherited gene. Cross-forge families recovered from shared commits already show that the platform-native fork graph is an incomplete pedigree.

Software product-line research has long treated families of related products built from common assets. Research on software evolution has long treated change as a continuing process. Neither gives a maintainer a record they can point at and say: this allele of MIDI scheduling started here, travelled there, mutated under this measurement, and was offered upstream with this attestation.

Software todayBuild → Ship → Maintain → Rewrite → Die

The claim of this paperBirth → Inherit → Adapt → Learn → Reproduce → Evolve

The second sequence is a human-facing abstraction, not a compiler. The pyramid from the original sketch is one picture of descent. The data model is a temporal directed graph with typed provenance edges. Hybrids have two parents. A descendant can offer a change to an ancestor. Those edges are first-class, not errors.

3Four reproduction modes

Music already names the relationship between a work and what comes after it. The protocol borrows those names so a child is not only “a fork.” Each mode is a different inheritance contract. None of them is implemented as a product button on this site. They are the kinds of descent the records are meant to hold.

Fork

Almost everything.

The same application, with named changes. Closest to a GitHub fork, except the child keeps a typed parent edge.

Remix

The important engines; the experience is rewritten.

Turn KEYLIT into a children’s piano game. MIDI and lessons stay. The interface does not.

Cover

The idea, the tests, the capability names — not the source.

Rebuild KEYLIT as a native iPad application. Homology without identity. That is the BLAST problem.

Mashup

Selected genes from two or more parents.

A hybrid has two parents. Junior Music Tutor is the seeded example. Recombination is a first-class edge, not an error.

A cover is the mode that Git handles worst. Two implementations can be the same capability without sharing a commit. A mashup is the mode a tree cannot draw: two parents, one child. The registry is a DAG because those cases are ordinary.

4The model

A gene is a stable semantic capability — MIDI scheduling, sample playback, adaptive lesson scoring. It is not a file and not a function. One capability may span many files; one utility file may serve ten capabilities. The logical gene identifier stays stable when the implementation is rewritten or ported.

An allele is one implementation of that capability. Two distant descendants can carry functionally related alleles even when language, path and version number differ. That is why allele is a better concept than version. A mutation is one capability changing, with the measurement that justified it. A genome is the versioned composition of a project at a point in its history.

Agent DNA is not model weights, hidden reasoning, or a chat log. It is a portable, auditable manifest: identity, permitted tools, policies, public decision memories, trusted relatives, and signed observations. MCP can expose the registry to agents. A2A can carry typed tasks between them. Neither creates safe inheritance. The policy layer is this protocol.

Declared ancestry and inferred ancestry are separate. A maintainer saying this project is a child of KEYLIT is a first-class assertion. A model proposing the same edge is supporting evidence until a test or a human says otherwise. Fitness is a vector under a named environment, never one number that ranks a gene as better.

Drawing diagram…

Projects, knowledge and evidence sit above Git; they do not replace it.
Diagram source
flowchart TB
  Layer["CodeAncestry layer"]
  Knowledge["Knowledge · fitness · phenotypes"]
  Evidence["Evidence · attestations · policy"]
  Git["Git · commits, trees, blobs"]
  Layer --> Knowledge --> Evidence --> Git
Figure 1Every claim in the registry is supposed to rest on something underneath it. Git remains the source of truth for the code.

5Propagation

A mutation never spreads because a related agent recommends it. The biological metaphor stops where software safety begins. The steps are the same ones the live protocol implements:

  1. 01Discover. An agent or a human notices a change worth describing.
  2. 02Describe. The change is written down as a typed mutation record.
  3. 03Attest. Claims are signed and bound to immutable digests.
  4. 04Sandbox. The mutation is applied in an isolated environment.
  5. 05Test. The relative’s own test suite runs against it.
  6. 06Evaluate. A fitness vector is measured, not a single score.
  7. 07Decide. A policy or a maintainer adopts, rejects or quarantines.

Drawing diagram…

The seven-step propagation protocol implemented by the mutation records.
Diagram source
flowchart LR
  Discover --> Describe --> Attest --> Sandbox --> Test --> Evaluate --> Decide
  Decide --> Adopt
  Decide --> Reject
  Decide --> Quarantine
Figure 2Discover through decide. Adopt, reject and quarantine are the only terminals. Notify relatives is optional and never implied by adopt.

Existing provenance standards are the skeleton, not the competition. W3C PROV already talks in entities, activities and agents. SLSA and in-toto already bind artifacts to how they were produced. CycloneDX already models component pedigree. Recording that software has ancestors is therefore not, on its own, a contribution. The distinctive claim is semantic capability lineage, agent identity, mutation evaluation, bidirectional offers, and a human-facing evolutionary record — built on those formats, not instead of them.

6KEYLIT specimen

The working site is seeded with one family of eight projects. No live repository is read. The numbers on the registry screens are the numbers in the fixtures. That is enough to hold the two clocks the Human Genome Project made ordinary: project time (when a genome was born) and gene time (when a capability changed). They are not the same clock.

MIDI Scheduling is the worked example. Allele 1 is a fixed 128-sample buffer, observed in KEYLIT on 28 August 2026. Allele 5 is an adaptive buffer, observed in KEYLIT Kids ES on 18 January 2027 — four generations of project time later, and still the same gene. Mutation M-83F12 is the record of that change. It has been offered upstream. It has not been adopted by the ancestor. Maintainer approval is the missing rung, and the page will not pretend otherwise.

Drawing diagram…

KEYLIT descent, a recombination, and an offer back to the ancestor.
Diagram source
flowchart TB
  K["KEYLIT"]
  Kids["KEYLIT Kids"]
  Studio["KEYLIT Studio"]
  KidsES["KEYLIT Kids ES"]
  Tutor["Junior Music Tutor"]
  K -->|DERIVED_FROM| Kids
  K -->|DERIVED_FROM| Studio
  Kids -->|DERIVED_FROM| KidsES
  KidsES -->|RECOMBINED_FROM| Tutor
  Studio -->|RECOMBINED_FROM| Tutor
  KidsES -->|PROPOSED_TO| K
Figure 3Descent in the seeded family, plus one upstream offer. The hybrid Junior Music Tutor has two parents. See the live graph at /family/keylit.

Project time

When each genome in the seeded family was created.

  1. 2026-08-28

    KEYLIT

    Generation 0

  2. 2026-10-22

    KEYLIT Studio

    Generation 1

  3. 2026-11-02

    KEYLIT Kids

    Generation 1

  4. 2026-11-30

    Music Producer

    Generation 2

  5. 2026-12-01

    KEYLIT Accessibility

    Generation 1

  6. 2026-12-15

    KEYLIT Kids ES

    Generation 2

  7. 2027-02-08

    KEYLIT Classroom

    Generation 2

  8. 2027-03-22

    Junior Music Tutor

    Generation 3 · hybrid

Gene time · MIDI Scheduling

Alleles of MIDI-SCHEDULING (Gene accession CAGENE:MIDI-SCHEDULING). The adaptive buffer arrives after generation zero.

  1. 2026-08-28

    Fixed 128-sample buffer · allele 1

    1.0.0 · typescript

  2. 2026-09-30

    Device-aware buffer · allele 2

    1.2.0 · typescript

  3. 2026-11-12

    Forgiving window for small hands · allele 3

    1.3.0 · typescript · CAMUT:604

  4. 2026-12-20

    Forgiving window, tuned for slower networks · allele 4

    1.4.0 · typescript · CAMUT:731

  5. 2027-01-18

    Adaptive buffer · allele 5

    2.0.0 · typescript · CAMUT:882

Figure 4 is the dual timeline as lists, not as a picture. Project time and gene time share dates and disagree about what those dates mean.

8Open questions

This is a working concept, not a closed theory. The model is designed to keep the following visible rather than paper them over.

  1. 01

    Where does a gene start and stop?

    A capability is not a file. Drawing a semantic boundary that two maintainers would agree on is still a research problem. The registry records confidence in that boundary; it does not pretend the boundary is natural.

  2. 02

    When are two implementations the same allele?

    Ports, rewrites and language changes can implement the same capability. Homology without identity is the BLAST problem. Fingerprints help; they do not decide.

  3. 03

    What is a fair coordinate system?

    Software has no chromosome. Repository, semantic and temporal axes are three readings of the same genome. None of them is the genome.

  4. 04

    How far can inference go without becoming a claim?

    A model can propose a parent edge. Promoting that proposal to verified descent without a test or a human is how registries become fiction. The evidence threshold exists because this question is unsettled.

  5. 05

    How does horizontal transfer stay legal?

    Copying a capability between unrelated families is easy technically and often restricted legally. An unknown license is unknown, not reusable. Compatible-enough at scale is unsolved.

  6. 06

    What may an agent remember?

    The registry records what an agent did, asserted, tested and shared. It never owns model internals. The line between a public decision record and a private trace is a product decision, not a solved one.

  7. 07

    Can fitness ever be one number?

    No scientifically meaningful software equivalent of a universally stronger gene exists. Aggregates are policy views. The open question is how to keep those views from being mistaken for the record.

9Limits

Nothing on this site has been measured against a live corpus. There is no GitHub App, no write integration, no sandbox that actually executes a stranger’s patch, and no claim that agents have learned across a family in production. The KEYLIT numbers are fixture numbers. A later paper can become a protocol specification — genome.json, agent-dna.json, mutation records, accession rules, the messages an ancestor and a descendant exchange. That paper does not exist until the objects stop being illustrative.

The long horizon is still the one the origin thread stated: in a few decades a machine should be able to ask who its ancestors were and get an answer with evidence attached. The work that has to happen first is narrower. Connect a repository. Propose genes. Record a child. Offer one mutation. Run the adopter’s tests. Decide in public.

Vocabulary is a constraint, not a style guide. Use lineage, variant, capability, fitness under environment X. Never bloodline, purity, dominant, superior genes. The full rule is on the language and ethics page.

How to cite

CodeAncestry. (2026). A living lineage protocol for software genomes, agent inheritance, and evolutionary software ecosystems (Working paper v0.1). https://codeancestry.com/research

Continue in the protocol specification.