# GENOMA Extension Program Theory

## 1. <Initial Interpretation>

The extension family is a set of <operator tools> for turning live web pages into <prompt genetic material>.

The real-world activity:

`<operator> [captures] <page evidence>`

`<page evidence> [transcribes into] <codons>`

`<codons> [mutate / cross / compile into] <phenotypes>`

`<operator> [selects] <lineage>`

The main failure to avoid is <erosion>: random page damage that looks like mutation but destroys inherited design value.

## 2. <Theory Skeleton>

<entities>
- <F0 page>
- <evidence anchor>
- <prompt codon>
- <operation codon>
- <child phenotype>
- <program text artifact>
- <selection pressure>
- <lineage state>
- <mobile preview>
- <desktop extension runtime>

[operations]
- [capture]
- [anchor]
- [encode]
- [bind]
- [mutate]
- [patch]
- [compile]
- [express]
- [compare]
- [select]
- [export]

<constraints>
- Chrome extensions are desktop runtime tools; mobile browsers should receive previews, docs, and standalone artifacts.
- A page mutation must preserve structure first and vary second.
- A codon must be a control surface, not just a label.
- A phenotype must be visible, reversible, and comparable.

<invariants>
- <mutation> is not automatically <improvement>.
- <fitness> is defined by <selection pressure>.
- <source design> is inherited material, not disposable substrate.
- <lineage> must remain inspectable.

## 3. <Extension Codon Assessment>

### <GENOMA Prompt Genetics>

<purpose>: current integrated extension.

<dominant codons>
- <RSN>: reason from page evidence into prompt controls.
- <EVD>: keep DOM evidence nested under active prompt codons.
- <OUT>: produce visible artifacts and live page traces.
- <FIT>: preserve source design while enabling variation.
- <MUT>: mutate codons, not whole pages blindly.
- <SEL>: select F1 offspring back into the active genome.

[best-use]: demo the full capture -> cross -> select -> inherit loop.

<mobile stance>: phone-readable panel preview only; real side panel requires desktop Chrome/Edge.

### <GENOMA Actual Page Mutator v10>

<purpose>: local-first selector-bound patching.

<dominant codons>
- <ENT>: anchored structural entities.
- <TXT>: contained text traits.
- <ACT>: interactive affordances.
- <INV>: safety invariants.
- <STY>: broad style influence without replacing structure.

[best-use]: developer thinking about reversible real-page patches without needing an API key.

<risk>: highest erosion risk if whole-page patching is used too casually.

<mobile stance>: useful as a readable panel preview; actual patching requires desktop extension runtime.

### <GENOMA Codon Console v11>

<purpose>: LLM-first operating map.

<dominant codons>
- <MAP>: compress page into 8-12 semantic operating codons.
- <BIND>: select one codon as the current work unit.
- <PATCH>: plan selector-bound patches.
- <UNDO>: preserve reversibility.

[best-use]: developers and researchers who want to inspect the model's operating map before applying a patch.

<risk>: depends on model quality; weak models may return vague codons.

<mobile stance>: panel preview and README are mobile-readable; patching requires desktop extension runtime.

### <GENOMA Phenotype Breeder v12>

<purpose>: express child UI over an F0 baseline.

<dominant codons>
- <RSN>: page -> prompt genome -> child phenotype.
- <EVD>: current page remains the baseline oracle.
- <STY>: inherited style traits.
- <FLR>: child overlay can be cleared.
- <MUT>: bound codon mutation.
- <SEL>: select child as next generation.

[best-use]: demonstrating that whole-page patching is not the center; the child phenotype is the experiment.

<mobile stance>: conceptual preview on phone; original/child/diff requires desktop extension runtime.

### <GENOMA Phenotype Breeder v12.1>

<purpose>: v12 variant with reasoning-route emphasis.

<dominant codons>
- <F0>: baseline page evidence.
- <CHILD>: generated phenotype.
- <DIFF>: comparison mode.
- <NEXT>: next-generation selection.

[best-use]: compare with v12 when testing model routing and next-generation selection.

<mobile stance>: phone can inspect the panel surface; extension behavior is desktop-only.

### <GENOMA Prompt Genome Compiler v13>

<purpose>: compile prompt genome into standalone program text.

<dominant codons>
- <PROMPT>: prompt genome is the main artifact.
- <OPS>: operation genome is secondary evidence.
- <CODE>: compiled program text / HTML.
- <NEXT>: selected artifact can become next prompt genome.

[best-use]: avoid live page damage by compiling into separate artifacts.

<mobile stance>: strong mobile path because the artifact page can be opened directly.

### <GENOMA Prompt Genome Compiler v14>

<purpose>: filmable, more-with-less compiler surface.

<dominant codons>
- <F0>: captured source evidence.
- <GENOME>: compact prompt genome.
- <PROGRAM>: compiled program text.
- <ARTIFACT>: standalone HTML/CSS phenotype.

[best-use]: public demo and phone-readable artifact path.

<mobile stance>: strongest mobile candidate. Use the artifact page as the phone-facing output, while the extension remains the desktop authoring tool.

## 4. <Operational Description>

`<desktop browser> [loads unpacked] <extension folder>`

`<phone browser> [opens] <index links / panel previews / artifact pages>`

`<F0 page> [captures into] <evidence packet>`

`<evidence packet> [encodes into] <prompt genome>`

`<prompt genome> [varies into] <candidate genomes>`

`<candidate genomes> [express into] <phenotypes>`

`<phenotypes> [compete under] <selection pressure>`

`<selected phenotype> [inherits into] <next genome>`

## 5. <Failure Description>

<failure>: extension breaks source page design.

[response]: prefer trace overlays, child overlays, artifact compilation, and undoable selector-bound patches.

<failure>: mobile user cannot use Chrome extension.

[response]: expose panel previews, README theory, and artifact pages from `index.html`.

<failure>: main index becomes cluttered.

[response]: keep extension family in one bounded section below the main page grid.

<failure>: codons become metaphors with no operational force.

[response]: each codon must control an operation: mutate, patch, compile, express, compare, or select.

## 6. <Change Test>

If the project becomes a professional design tool:
- Add explicit fitness rubrics.
- Add visual parent/child diff reports.
- Add selected-lineage history.

If the project becomes a mobile-first demo:
- Promote v14 artifacts.
- Add generated static demos for each extension.
- Keep extension installation instructions secondary.

If the project becomes an engineering tool:
- Preserve JSON export/import.
- Add deterministic seeds.
- Add patch dry-run and rollback logs.

## 7. <Implementation Plan>

- Keep `index.html` as the public hub.
- Keep `GENOMA_EXTENSION_PROGRAM_THEORY.md` as the theory ledger.
- Keep desktop extension folders linked, not embedded.
- Prefer v14 artifacts for phone-facing demonstrations.
- Treat actual page mutation as the riskiest operation and keep it reversible.

## 8. <Residual Human Theory>

The code cannot know what <better> means.

The operator must define:
- <selection pressure>
- <acceptable mutation>
- <preserved source value>
- <when a child phenotype deserves inheritance>

GENOMA is strongest when it shows this loop clearly:

`capture -> vary -> compare -> select -> inherit`
