diff --git a/ARCHITECTURE.adoc b/ARCHITECTURE.adoc
new file mode 100644
index 0000000..1c0a7a6
--- /dev/null
+++ b/ARCHITECTURE.adoc
@@ -0,0 +1,48 @@
+== Architecture
+
+=== Overview
+
+This repository follows a modular, maintainable architecture designed
+for clarity, scalability, and long-term sustainability.
+
+=== Directory Structure
+
+....
+.
+├── src/ # Source code
+├── tests/ # Test suites
+├── docs/ # Documentation
+├── scripts/ # Utility scripts
+├── config/ # Configuration files
+├── LICENSE # License file
+├── LICENSES/ # Full license texts
+└── README.adoc # Project documentation
+....
+
+=== Design Principles
+
+* *Separation of Concerns*: Each module has a single responsibility
+* *Testability*: Code is written to be easily testable
+* *Documentation*: All public APIs are documented
+* *Configuration*: Environment-specific settings are externalized
+
+=== Dependencies
+
+* External dependencies are minimized and clearly declared
+* Version pinning is used for reproducibility
+
+=== Security Considerations
+
+* Sensitive data is never committed to the repository
+* Secrets are managed through environment variables or secure vaults
+* Regular dependency audits are performed
+
+=== Maintainability
+
+* Code follows consistent style guidelines
+* Pull requests require review and CI checks
+* Issues and discussions are tracked transparently
+
+'''''
+
+_Last updated: 2026-07-18_
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
deleted file mode 100644
index 607e3d8..0000000
--- a/ARCHITECTURE.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Architecture
-
-## Overview
-
-This repository follows a modular, maintainable architecture designed for clarity, scalability, and long-term sustainability.
-
-## Directory Structure
-
-```
-.
-├── src/ # Source code
-├── tests/ # Test suites
-├── docs/ # Documentation
-├── scripts/ # Utility scripts
-├── config/ # Configuration files
-├── LICENSE # License file
-├── LICENSES/ # Full license texts
-└── README.adoc # Project documentation
-```
-
-## Design Principles
-
-- **Separation of Concerns**: Each module has a single responsibility
-- **Testability**: Code is written to be easily testable
-- **Documentation**: All public APIs are documented
-- **Configuration**: Environment-specific settings are externalized
-
-## Dependencies
-
-- External dependencies are minimized and clearly declared
-- Version pinning is used for reproducibility
-
-## Security Considerations
-
-- Sensitive data is never committed to the repository
-- Secrets are managed through environment variables or secure vaults
-- Regular dependency audits are performed
-
-## Maintainability
-
-- Code follows consistent style guidelines
-- Pull requests require review and CI checks
-- Issues and discussions are tracked transparently
-
----
-
-*Last updated: 2026-07-18*
diff --git a/CODE_OF_CONDUCT.adoc b/CODE_OF_CONDUCT.adoc
new file mode 100644
index 0000000..ff3f3db
--- /dev/null
+++ b/CODE_OF_CONDUCT.adoc
@@ -0,0 +1,339 @@
+== Code of Conduct
+
+=== Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in
+Squisher Corpus a harassment-free experience for everyone, regardless of
+age, body size, visible or invisible disability, ethnicity, sex
+characteristics, gender identity and expression, level of experience,
+education, socio-economic status, nationality, personal appearance,
+race, caste, colour, religion, or sexual identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open,
+welcoming, diverse, inclusive, and healthy community.
+
+We recognise that a thriving open source community requires
+*psychological safety* — an environment where people can contribute, ask
+questions, make mistakes, and learn without fear of ridicule or
+retaliation.
+
+'''''
+
+=== Our Standards
+
+==== Expected Behaviour
+
+The following behaviours contribute to a positive environment:
+
+*Communication* - Using welcoming and inclusive language - Being
+respectful of differing viewpoints and experiences - Giving and
+gracefully accepting constructive feedback - Assuming good intent while
+addressing impact - Communicating clearly and patiently, especially with
+newcomers
+
+*Collaboration* - Focusing on what is best for the community - Showing
+empathy and kindness toward other community members - Being
+collaborative rather than competitive - Mentoring and supporting less
+experienced contributors - Celebrating others’ contributions and
+successes
+
+*Professionalism* - Accepting responsibility and apologising to those
+affected by our mistakes - Learning from the experience and avoiding
+repetition - Respecting others’ time and attention - Staying on topic in
+project spaces - Following project guidelines and conventions
+
+*Accessibility* - Using plain language and avoiding unnecessary jargon -
+Providing alt text for images and transcripts for audio/video - Being
+patient with those using assistive technologies - Accommodating
+different communication styles and needs - Recognising that not everyone
+communicates the same way
+
+==== Unacceptable Behaviour
+
+The following behaviours are considered harassment and are unacceptable:
+
+*Harassment* - The use of sexualised language or imagery, and sexual
+attention or advances of any kind - Trolling, insulting or derogatory
+comments, and personal or political attacks - Public or private
+harassment - Deliberate intimidation, stalking, or following (online or
+in-person) - Unwelcome physical contact or simulated physical contact
+(e.g., emoji) - Sustained disruption of talks, events, or online
+discussions
+
+*Discrimination* - Discriminatory jokes and language - Posting or
+threatening to post others’ personally identifying information
+("`doxing`") - Advocating for, or encouraging, any of the above
+behaviour - Microaggressions — subtle, often unintentional,
+discriminatory comments or actions
+
+*Professional Misconduct* - Publishing others’ private information
+without explicit permission - Misrepresenting affiliation or
+contributions - Plagiarism or claiming credit for others’ work -
+Retaliating against anyone who reports a Code of Conduct violation -
+Other conduct which could reasonably be considered inappropriate in a
+professional setting
+
+==== Grey Areas
+
+Some situations require judgement. When uncertain:
+
+* *Intent vs Impact*: Good intentions do not excuse harmful impact.
+Focus on making things right.
+* *Power Dynamics*: Those with more power (maintainers, employers,
+experienced contributors) must be especially mindful of their impact.
+* *Cultural Differences*: What’s acceptable varies by culture. When in
+doubt, err on the side of caution and ask.
+* *Humour*: Jokes at others’ expense are rarely funny to everyone. Punch
+up, not down.
+
+'''''
+
+=== Scope
+
+This Code of Conduct applies within all community spaces, including:
+
+*Online Spaces* - Repository discussions, issues, and pull/merge
+requests - Project chat channels (Matrix, Discord, Slack, IRC) - Mailing
+lists and forums - Social media when representing the project - Video
+calls and virtual meetings
+
+*In-Person Spaces* - Conferences, meetups, and events - Workshops and
+training sessions - Any gathering where you represent the project
+
+*Representation* This Code of Conduct also applies when an individual is
+officially representing the community in public spaces. Examples
+include:
+
+* Using an official project email address
+* Posting via an official social media account
+* Acting as an appointed representative at an event
+* Speaking on behalf of the project
+
+'''''
+
+=== Enforcement
+
+==== Reporting
+
+If you experience or witness unacceptable behaviour, or have any other
+concerns, please report it as soon as possible.
+
+*How to Report*
+
+[width="99%",cols="30%,33%,37%",options="header",]
+|===
+|Method |Details |Best For
+|*Email* |j.d.a.jewell@open.ac.uk |Detailed reports, sensitive matters
+
+|*Private Message* |Contact any maintainer directly |Quick questions,
+minor issues
+
+|*Anonymous Form* |[Link to form if available] |When you need anonymity
+|===
+
+*What to Include*
+
+* Your contact information (unless anonymous)
+* Names/usernames of those involved
+* Description of what happened
+* When and where it occurred
+* Any witnesses
+* Any supporting evidence (screenshots, links)
+* How you would like us to respond (if you have a preference)
+
+*What Happens Next*
+
+[arabic]
+. You will receive acknowledgment within *48 hours*
+. The maintainers will review the report
+. We may ask for additional information
+. We will determine appropriate action
+. We will inform you of the outcome (respecting others’ privacy)
+
+==== Confidentiality
+
+All reports will be handled with discretion:
+
+* Reporter identity is protected by default
+* Details are shared only with those who need to know
+* We will ask before naming you in any communication
+* Anonymous reports are accepted and investigated
+
+==== Conflicts of Interest
+
+If a maintainers member is involved in an incident:
+
+* They will recuse themselves from the process
+* Another maintainer or external party will handle the report
+* We will disclose any potential conflicts
+
+'''''
+
+=== Enforcement Guidelines
+
+The maintainers will follow these guidelines in determining
+consequences:
+
+==== 1. Correction
+
+*Community Impact*: Use of inappropriate language or other behaviour
+deemed unprofessional or unwelcome.
+
+*Consequence*: A private, written warning providing clarity around the
+nature of the violation and an explanation of why the behaviour was
+inappropriate. A public apology may be requested.
+
+*Duration*: Immediate
+
+==== 2. Warning
+
+*Community Impact*: A violation through a single incident or series of
+actions.
+
+*Consequence*: A warning with consequences for continued behaviour. No
+interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, for a specified period. This
+includes avoiding interactions in community spaces as well as external
+channels like social media. Violating these terms may lead to a
+temporary or permanent ban.
+
+*Duration*: 1-4 weeks
+
+==== 3. Temporary Ban
+
+*Community Impact*: A serious violation of community standards,
+including sustained inappropriate behaviour.
+
+*Consequence*: A temporary ban from any sort of interaction or public
+communication with the community for a specified period. No public or
+private interaction with the people involved, including unsolicited
+interaction with those enforcing the Code of Conduct, is allowed during
+this period. Violating these terms may lead to a permanent ban.
+
+*Duration*: 1-6 months
+
+==== 4. Permanent Ban
+
+*Community Impact*: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behaviour, harassment of an
+individual, or aggression toward or disparagement of classes of
+individuals.
+
+*Consequence*: A permanent ban from any sort of public interaction
+within the community.
+
+*Duration*: Permanent (with appeal rights after 12 months)
+
+==== Enforcement Across Perimeters
+
+For contributors with elevated access (Perimeter 2 or 1):
+
+[cols=",",options="header",]
+|===
+|Level |Additional Consequence
+|Correction |Noted in contributor record
+|Warning |Access privileges may be temporarily reduced
+|Temporary Ban |Access reduced to Perimeter 3 for ban duration
+|Permanent Ban |All access revoked
+|===
+
+'''''
+
+=== Appeals
+
+If you believe an enforcement decision was made in error:
+
+[arabic]
+. *Wait 7 days* after the decision (cooling-off period)
+. *Email* j.d.a.jewell@open.ac.uk with subject line "`Appeal: [Original
+Report ID]`"
+. *Explain* why you believe the decision should be reconsidered
+. *Provide* any new information not previously available
+
+*Appeals Process*
+
+* Appeals are reviewed by a different maintainers member than the
+original
+* You will receive a response within 14 days
+* The appeals decision is final
+* You may only appeal once per incident
+
+*Grounds for Appeal*
+
+* Procedural errors in the original investigation
+* New evidence not previously available
+* Disproportionate response to the violation
+* Misunderstanding of facts
+
+'''''
+
+=== Supporting Those Who Report
+
+We are committed to supporting those who report violations:
+
+*We Will* - Believe and take all reports seriously - Respect your
+privacy and confidentiality preferences - Keep you informed of progress
+(if you wish) - Take steps to protect you from retaliation - Provide
+resources if you need support
+
+*We Will Not* - Require you to confront the person directly - Dismiss
+reports without investigation - Reveal your identity without consent -
+Tolerate retaliation against reporters - Rush you to make decisions
+
+'''''
+
+=== Prevention
+
+Beyond enforcement, we actively work to prevent issues:
+
+*Onboarding* - All contributors are expected to read this Code of
+Conduct - Perimeter 2 applicants must confirm they’ve read and
+understood it - Maintainers receive additional training on enforcement
+
+*Culture* - We model the behaviour we expect - We intervene early when
+we see potential issues - We thank people for positive contributions -
+We create opportunities for diverse voices
+
+*Review* - This Code of Conduct is reviewed annually - Community
+feedback is welcomed - Changes are communicated clearly
+
+'''''
+
+=== Acknowledgments
+
+This Code of Conduct is adapted from:
+
+* https://www.contributor-covenant.org/[Contributor Covenant], version
+2.1
+* https://www.djangoproject.com/conduct/[Django Code of Conduct]
+* https://www.rust-lang.org/policies/code-of-conduct[Rust Code of
+Conduct]
+* https://www.python.org/psf/conduct/[Python Community Code of Conduct]
+
+We thank these communities for their leadership in creating welcoming
+spaces.
+
+'''''
+
+=== Questions?
+
+If you have questions about this Code of Conduct:
+
+* Open a
+https://github.com/hyperpolymath/squisher-corpus/discussions[Discussion]
+(for general questions)
+* Email j.d.a.jewell@open.ac.uk (for private questions)
+* Contact any maintainer directly
+
+'''''
+
+=== Summary
+
+*Be kind. Be respectful. Be collaborative.*
+
+We’re all here because we care about this project. Let’s make it a place
+where everyone can do their best work.
+
+'''''
+
+Last updated: 2026 · Based on Contributor Covenant 2.1
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index 8267cd4..0000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,327 +0,0 @@
-# Code of Conduct
-
-
-
-## Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in Squisher Corpus a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
-
-We recognise that a thriving open source community requires **psychological safety** — an environment where people can contribute, ask questions, make mistakes, and learn without fear of ridicule or retaliation.
-
----
-
-## Our Standards
-
-### Expected Behaviour
-
-The following behaviours contribute to a positive environment:
-
-**Communication**
-- Using welcoming and inclusive language
-- Being respectful of differing viewpoints and experiences
-- Giving and gracefully accepting constructive feedback
-- Assuming good intent while addressing impact
-- Communicating clearly and patiently, especially with newcomers
-
-**Collaboration**
-- Focusing on what is best for the community
-- Showing empathy and kindness toward other community members
-- Being collaborative rather than competitive
-- Mentoring and supporting less experienced contributors
-- Celebrating others' contributions and successes
-
-**Professionalism**
-- Accepting responsibility and apologising to those affected by our mistakes
-- Learning from the experience and avoiding repetition
-- Respecting others' time and attention
-- Staying on topic in project spaces
-- Following project guidelines and conventions
-
-**Accessibility**
-- Using plain language and avoiding unnecessary jargon
-- Providing alt text for images and transcripts for audio/video
-- Being patient with those using assistive technologies
-- Accommodating different communication styles and needs
-- Recognising that not everyone communicates the same way
-
-### Unacceptable Behaviour
-
-The following behaviours are considered harassment and are unacceptable:
-
-**Harassment**
-- The use of sexualised language or imagery, and sexual attention or advances of any kind
-- Trolling, insulting or derogatory comments, and personal or political attacks
-- Public or private harassment
-- Deliberate intimidation, stalking, or following (online or in-person)
-- Unwelcome physical contact or simulated physical contact (e.g., emoji)
-- Sustained disruption of talks, events, or online discussions
-
-**Discrimination**
-- Discriminatory jokes and language
-- Posting or threatening to post others' personally identifying information ("doxing")
-- Advocating for, or encouraging, any of the above behaviour
-- Microaggressions — subtle, often unintentional, discriminatory comments or actions
-
-**Professional Misconduct**
-- Publishing others' private information without explicit permission
-- Misrepresenting affiliation or contributions
-- Plagiarism or claiming credit for others' work
-- Retaliating against anyone who reports a Code of Conduct violation
-- Other conduct which could reasonably be considered inappropriate in a professional setting
-
-### Grey Areas
-
-Some situations require judgement. When uncertain:
-
-- **Intent vs Impact**: Good intentions do not excuse harmful impact. Focus on making things right.
-- **Power Dynamics**: Those with more power (maintainers, employers, experienced contributors) must be especially mindful of their impact.
-- **Cultural Differences**: What's acceptable varies by culture. When in doubt, err on the side of caution and ask.
-- **Humour**: Jokes at others' expense are rarely funny to everyone. Punch up, not down.
-
----
-
-## Scope
-
-This Code of Conduct applies within all community spaces, including:
-
-**Online Spaces**
-- Repository discussions, issues, and pull/merge requests
-- Project chat channels (Matrix, Discord, Slack, IRC)
-- Mailing lists and forums
-- Social media when representing the project
-- Video calls and virtual meetings
-
-**In-Person Spaces**
-- Conferences, meetups, and events
-- Workshops and training sessions
-- Any gathering where you represent the project
-
-**Representation**
-This Code of Conduct also applies when an individual is officially representing the community in public spaces. Examples include:
-
-- Using an official project email address
-- Posting via an official social media account
-- Acting as an appointed representative at an event
-- Speaking on behalf of the project
-
----
-
-## Enforcement
-
-### Reporting
-
-If you experience or witness unacceptable behaviour, or have any other concerns, please report it as soon as possible.
-
-**How to Report**
-
-| Method | Details | Best For |
-|--------|---------|----------|
-| **Email** | j.d.a.jewell@open.ac.uk | Detailed reports, sensitive matters |
-| **Private Message** | Contact any maintainer directly | Quick questions, minor issues |
-| **Anonymous Form** | [Link to form if available] | When you need anonymity |
-
-**What to Include**
-
-- Your contact information (unless anonymous)
-- Names/usernames of those involved
-- Description of what happened
-- When and where it occurred
-- Any witnesses
-- Any supporting evidence (screenshots, links)
-- How you would like us to respond (if you have a preference)
-
-**What Happens Next**
-
-1. You will receive acknowledgment within **48 hours**
-2. The maintainers will review the report
-3. We may ask for additional information
-4. We will determine appropriate action
-5. We will inform you of the outcome (respecting others' privacy)
-
-### Confidentiality
-
-All reports will be handled with discretion:
-
-- Reporter identity is protected by default
-- Details are shared only with those who need to know
-- We will ask before naming you in any communication
-- Anonymous reports are accepted and investigated
-
-### Conflicts of Interest
-
-If a maintainers member is involved in an incident:
-
-- They will recuse themselves from the process
-- Another maintainer or external party will handle the report
-- We will disclose any potential conflicts
-
----
-
-## Enforcement Guidelines
-
-The maintainers will follow these guidelines in determining consequences:
-
-### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome.
-
-**Consequence**: A private, written warning providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested.
-
-**Duration**: Immediate
-
-### 2. Warning
-
-**Community Impact**: A violation through a single incident or series of actions.
-
-**Consequence**: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
-
-**Duration**: 1-4 weeks
-
-### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including sustained inappropriate behaviour.
-
-**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
-
-**Duration**: 1-6 months
-
-### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within the community.
-
-**Duration**: Permanent (with appeal rights after 12 months)
-
-### Enforcement Across Perimeters
-
-For contributors with elevated access (Perimeter 2 or 1):
-
-| Level | Additional Consequence |
-|-------|----------------------|
-| Correction | Noted in contributor record |
-| Warning | Access privileges may be temporarily reduced |
-| Temporary Ban | Access reduced to Perimeter 3 for ban duration |
-| Permanent Ban | All access revoked |
-
----
-
-## Appeals
-
-If you believe an enforcement decision was made in error:
-
-1. **Wait 7 days** after the decision (cooling-off period)
-2. **Email** j.d.a.jewell@open.ac.uk with subject line "Appeal: [Original Report ID]"
-3. **Explain** why you believe the decision should be reconsidered
-4. **Provide** any new information not previously available
-
-**Appeals Process**
-
-- Appeals are reviewed by a different maintainers member than the original
-- You will receive a response within 14 days
-- The appeals decision is final
-- You may only appeal once per incident
-
-**Grounds for Appeal**
-
-- Procedural errors in the original investigation
-- New evidence not previously available
-- Disproportionate response to the violation
-- Misunderstanding of facts
-
----
-
-## Supporting Those Who Report
-
-We are committed to supporting those who report violations:
-
-**We Will**
-- Believe and take all reports seriously
-- Respect your privacy and confidentiality preferences
-- Keep you informed of progress (if you wish)
-- Take steps to protect you from retaliation
-- Provide resources if you need support
-
-**We Will Not**
-- Require you to confront the person directly
-- Dismiss reports without investigation
-- Reveal your identity without consent
-- Tolerate retaliation against reporters
-- Rush you to make decisions
-
----
-
-## Prevention
-
-Beyond enforcement, we actively work to prevent issues:
-
-**Onboarding**
-- All contributors are expected to read this Code of Conduct
-- Perimeter 2 applicants must confirm they've read and understood it
-- Maintainers receive additional training on enforcement
-
-**Culture**
-- We model the behaviour we expect
-- We intervene early when we see potential issues
-- We thank people for positive contributions
-- We create opportunities for diverse voices
-
-**Review**
-- This Code of Conduct is reviewed annually
-- Community feedback is welcomed
-- Changes are communicated clearly
-
----
-
-## Acknowledgments
-
-This Code of Conduct is adapted from:
-
-- [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1
-- [Django Code of Conduct](https://www.djangoproject.com/conduct/)
-- [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct)
-- [Python Community Code of Conduct](https://www.python.org/psf/conduct/)
-
-We thank these communities for their leadership in creating welcoming spaces.
-
----
-
-## Questions?
-
-If you have questions about this Code of Conduct:
-
-- Open a [Discussion](https://github.com/hyperpolymath/squisher-corpus/discussions) (for general questions)
-- Email j.d.a.jewell@open.ac.uk (for private questions)
-- Contact any maintainer directly
-
----
-
-## Summary
-
-**Be kind. Be respectful. Be collaborative.**
-
-We're all here because we care about this project. Let's make it a place where everyone can do their best work.
-
----
-
-Last updated: 2026 · Based on Contributor Covenant 2.1
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
new file mode 100644
index 0000000..42ffa5a
--- /dev/null
+++ b/CONTRIBUTING.adoc
@@ -0,0 +1,51 @@
+== Contributing to protocol-squisher
+
+Thanks for your interest. This repository follows the Hyperpolymath
+estate standards defined in
+https://github.com/hyperpolymath/standards[hyperpolymath/standards].
+
+=== Licence
+
+This project is licensed under *MPL-2.0*. By contributing you agree that
+your contributions are licensed under the same terms. Every source file
+carries an `+SPDX-License-Identifier+` header; keep it when editing, and
+add one to any new file.
+
+=== Development environment
+
+Use the toolchain declared by this repository.
+
+=== Machine-readable artefacts
+
+This repo carries `+.machine_readable/+` A2ML files (`+STATE.a2ml+`,
+`+META.a2ml+`, `+ECOSYSTEM.a2ml+`, `+AGENTIC.a2ml+`, `+NEUROSYM.a2ml+`,
+`+PLAYBOOK.a2ml+`). If your change alters project state, architecture,
+or operational steps, update the corresponding file in the same PR — CI
+validates them.
+
+=== Language policy
+
+The estate restricts which languages may be used. In particular Python,
+Go, TypeScript, ReScript, V-lang, Java/Kotlin, Swift and Makefiles are
+*not* accepted in new code; AffineScript, Rust/SPARK, Zig, Deno, Gleam,
+Elixir, Haskell, Idris2, Agda, Julia and OCaml are. CI enforces this, so
+check the policy in `+hyperpolymath/standards+` before introducing a new
+language.
+
+=== Documentation format
+
+Docs are AsciiDoc (`+.adoc+`) by default, including `+README.adoc+`. The
+GitHub-required community-health files stay Markdown: `+SECURITY.md+`,
+`+CONTRIBUTING.md+`, `+CODE_OF_CONDUCT.md+`, `+CHANGELOG.md+`. Do not
+add a `+.md+` duplicate of a doc that already exists as `+.adoc+`.
+
+=== Pull requests
+
+[arabic]
+. Branch from `+main+` — do not push to `+main+` directly; branch
+protection requires review and passing checks.
+. Keep the change focused, and explain _why_ in the PR body.
+. Make sure governance CI is green. It checks documentation presence,
+packaging policy, secrets, licence consistency and workflow security.
+. Security issues: follow `+SECURITY.md+` — report privately, never in a
+public issue.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 7138d62..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-# Contributing to protocol-squisher
-
-Thanks for your interest. This repository follows the Hyperpolymath estate
-standards defined in [hyperpolymath/standards](https://github.com/hyperpolymath/standards).
-
-## Licence
-
-This project is licensed under **MPL-2.0**. By contributing you agree that
-your contributions are licensed under the same terms. Every source file
-carries an `SPDX-License-Identifier` header; keep it when editing, and add
-one to any new file.
-
-## Development environment
-
-Use the toolchain declared by this repository.
-
-## Machine-readable artefacts
-
-This repo carries `.machine_readable/` A2ML files (`STATE.a2ml`,
-`META.a2ml`, `ECOSYSTEM.a2ml`, `AGENTIC.a2ml`, `NEUROSYM.a2ml`,
-`PLAYBOOK.a2ml`). If your change alters project state, architecture, or
-operational steps, update the corresponding file in the same PR — CI
-validates them.
-
-## Language policy
-
-The estate restricts which languages may be used. In particular Python, Go,
-TypeScript, ReScript, V-lang, Java/Kotlin, Swift and Makefiles are **not**
-accepted in new code; AffineScript, Rust/SPARK, Zig, Deno, Gleam, Elixir,
-Haskell, Idris2, Agda, Julia and OCaml are. CI enforces this, so check the
-policy in `hyperpolymath/standards` before introducing a new language.
-
-## Documentation format
-
-Docs are AsciiDoc (`.adoc`) by default, including `README.adoc`. The
-GitHub-required community-health files stay Markdown: `SECURITY.md`,
-`CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `CHANGELOG.md`. Do not add a `.md`
-duplicate of a doc that already exists as `.adoc`.
-
-## Pull requests
-
-1. Branch from `main` — do not push to `main` directly; branch protection
- requires review and passing checks.
-2. Keep the change focused, and explain *why* in the PR body.
-3. Make sure governance CI is green. It checks documentation presence,
- packaging policy, secrets, licence consistency and workflow security.
-4. Security issues: follow `SECURITY.md` — report privately, never in a
- public issue.
diff --git a/GOVERNANCE.adoc b/GOVERNANCE.adoc
new file mode 100644
index 0000000..9b836fb
--- /dev/null
+++ b/GOVERNANCE.adoc
@@ -0,0 +1,60 @@
+== Governance
+
+=== Overview
+
+This project is governed by the following principles and structures to
+ensure transparent, inclusive, and effective decision-making.
+
+=== Roles and Responsibilities
+
+==== Maintainers
+
+Maintainers are responsible for: - Reviewing and merging pull requests -
+Managing releases and versioning - Ensuring code quality and standards -
+Triaging issues and bug reports - Community engagement and support
+
+==== Contributors
+
+Contributors are expected to: - Follow the code of conduct - Submit
+well-documented pull requests - Write tests for new functionality -
+Maintain existing tests - Update documentation as needed
+
+=== Decision Making
+
+==== Minor Changes
+
+* Can be made by any maintainer
+* Include bug fixes, documentation updates, dependency updates
+
+==== Major Changes
+
+* Require discussion in issues or pull requests
+* Include new features, architectural changes, API changes
+* Need approval from at least 2 maintainers
+
+==== Breaking Changes
+
+* Require RFC (Request for Comments) process
+* Need approval from majority of maintainers
+* Must include migration guide
+
+=== Code of Conduct
+
+All participants are expected to follow our Code of Conduct. Violations
+can be reported to the maintainers.
+
+=== Communication
+
+* *Issues*: For bug reports and feature requests
+* *Discussions*: For questions and general discussion
+* *Pull Requests*: For code contributions
+
+=== Licensing
+
+All contributions are made under the terms of the repository’s LICENSE
+file. By submitting a pull request, you agree to license your
+contributions accordingly.
+
+'''''
+
+_Last updated: 2026-07-18_
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
deleted file mode 100644
index e27364c..0000000
--- a/GOVERNANCE.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Governance
-
-## Overview
-
-This project is governed by the following principles and structures to ensure transparent, inclusive, and effective decision-making.
-
-## Roles and Responsibilities
-
-### Maintainers
-
-Maintainers are responsible for:
-- Reviewing and merging pull requests
-- Managing releases and versioning
-- Ensuring code quality and standards
-- Triaging issues and bug reports
-- Community engagement and support
-
-### Contributors
-
-Contributors are expected to:
-- Follow the code of conduct
-- Submit well-documented pull requests
-- Write tests for new functionality
-- Maintain existing tests
-- Update documentation as needed
-
-## Decision Making
-
-### Minor Changes
-- Can be made by any maintainer
-- Include bug fixes, documentation updates, dependency updates
-
-### Major Changes
-- Require discussion in issues or pull requests
-- Include new features, architectural changes, API changes
-- Need approval from at least 2 maintainers
-
-### Breaking Changes
-- Require RFC (Request for Comments) process
-- Need approval from majority of maintainers
-- Must include migration guide
-
-## Code of Conduct
-
-All participants are expected to follow our Code of Conduct. Violations can be reported to the maintainers.
-
-## Communication
-
-- **Issues**: For bug reports and feature requests
-- **Discussions**: For questions and general discussion
-- **Pull Requests**: For code contributions
-
-## Licensing
-
-All contributions are made under the terms of the repository's LICENSE file.
-By submitting a pull request, you agree to license your contributions accordingly.
-
----
-
-*Last updated: 2026-07-18*
diff --git a/SECURITY.adoc b/SECURITY.adoc
new file mode 100644
index 0000000..a70675b
--- /dev/null
+++ b/SECURITY.adoc
@@ -0,0 +1,464 @@
+== Security Policy
+
+TEMPLATE INSTRUCTIONS (delete this block before publishing) Replace all
+\{\{PLACEHOLDER}} values with your information: Squisher Corpus - Your
+project name hyperpolymath - GitHub username or org (e.g.,
+hyperpolymath) squisher-corpus - Repository name j.d.a.jewell@open.ac.uk
+- Security contact email TBD - Your PGP key fingerprint (40 chars, no
+spaces) https://github.com/hyperpolymath.gpg - URL to your public PGP
+key github.com/hyperpolymath/squisher-corpus - Your website/domain 2026
+- Current year for copyright
+
+Optional: Remove sections that don’t apply (e.g., PGP if you don’t use
+it) –>
+
+We take security seriously. We appreciate your efforts to responsibly
+disclose vulnerabilities and will make every effort to acknowledge your
+contributions.
+
+=== Table of Contents
+
+* link:#reporting-a-vulnerability[Reporting a Vulnerability]
+* link:#what-to-include[What to Include]
+* link:#response-timeline[Response Timeline]
+* link:#disclosure-policy[Disclosure Policy]
+* link:#scope[Scope]
+* link:#safe-harbour[Safe Harbour]
+* link:#recognition[Recognition]
+* link:#security-updates[Security Updates]
+* link:#security-best-practices[Security Best Practices]
+
+'''''
+
+=== Reporting a Vulnerability
+
+==== Preferred Method: GitHub Security Advisories
+
+The preferred method for reporting security vulnerabilities is through
+GitHub’s Security Advisory feature:
+
+[arabic]
+. Navigate to
+https://github.com/hyperpolymath/protocol-squisher/security/advisories/new[Report
+a Vulnerability]
+. Click *"`Report a vulnerability`"*
+. Complete the form with as much detail as possible
+. Submit — we’ll receive a private notification
+
+This method ensures:
+
+* End-to-end encryption of your report
+* Private discussion space for collaboration
+* Coordinated disclosure tooling
+* Automatic credit when the advisory is published
+
+==== Alternative: Encrypted Email
+
+If you cannot use GitHub Security Advisories, you may email us directly:
+
+[width="100%",cols="50%,50%",]
+|===
+|*Email* |j.d.a.jewell@open.ac.uk
+|*PGP Key* |https://github.com/hyperpolymath.gpg[Download Public Key]
+|*Fingerprint* |`+TBD+`
+|===
+
+[source,bash]
+----
+# Import our PGP key
+curl -sSL https://github.com/hyperpolymath.gpg | gpg --import
+
+# Verify fingerprint
+gpg --fingerprint j.d.a.jewell@open.ac.uk
+
+# Encrypt your report
+gpg --armor --encrypt --recipient j.d.a.jewell@open.ac.uk report.txt
+----
+
+____
+*⚠️ Important:* Do not report security vulnerabilities through public
+GitHub issues, pull requests, discussions, or social media.
+____
+
+'''''
+
+=== What to Include
+
+A good vulnerability report helps us understand and reproduce the issue
+quickly.
+
+==== Required Information
+
+* *Description*: Clear explanation of the vulnerability
+* *Impact*: What an attacker could achieve (confidentiality, integrity,
+availability)
+* *Affected versions*: Which versions/commits are affected
+* *Reproduction steps*: Detailed steps to reproduce the issue
+
+==== Helpful Additional Information
+
+* *Proof of concept*: Code, scripts, or screenshots demonstrating the
+vulnerability
+* *Attack scenario*: Realistic attack scenario showing exploitability
+* *CVSS score*: Your assessment of severity (use
+https://www.first.org/cvss/calculator/3.1[CVSS 3.1 Calculator])
+* *CWE ID*: Common Weakness Enumeration identifier if known
+* *Suggested fix*: If you have ideas for remediation
+* *References*: Links to related vulnerabilities, research, or
+advisories
+
+==== Example Report Structure
+
+[source,markdown]
+----
+## Summary
+[One-sentence description of the vulnerability]
+
+## Vulnerability Type
+[e.g., SQL Injection, XSS, SSRF, Path Traversal, etc.]
+
+## Affected Component
+[File path, function name, API endpoint, etc.]
+
+## Affected Versions
+[Version range or specific commits]
+
+## Severity Assessment
+- CVSS 3.1 Score: [X.X]
+- CVSS Vector: [CVSS:3.1/AV:X/AC:X/PR:X/UI:X/S:X/C:X/I:X/A:X]
+
+## Description
+[Detailed technical description]
+
+## Steps to Reproduce
+1. [First step]
+2. [Second step]
+3. [...]
+
+## Proof of Concept
+[Code, curl commands, screenshots, etc.]
+
+## Impact
+[What can an attacker achieve?]
+
+## Suggested Remediation
+[Optional: your ideas for fixing]
+
+## References
+[Links to related issues, CVEs, research]
+----
+
+'''''
+
+=== Response Timeline
+
+We commit to the following response times:
+
+[width="100%",cols="24%,35%,41%",options="header",]
+|===
+|Stage |Timeframe |Description
+|*Initial Response* |48 hours |We acknowledge receipt and confirm we’re
+investigating
+
+|*Triage* |7 days |We assess severity, confirm the vulnerability, and
+estimate timeline
+
+|*Status Update* |Every 7 days |Regular updates on remediation progress
+
+|*Resolution* |90 days |Target for fix development and release (complex
+issues may take longer)
+
+|*Disclosure* |90 days |Public disclosure after fix is available
+(coordinated with you)
+|===
+
+____
+*Note:* These are targets, not guarantees. Complex vulnerabilities may
+require more time. We’ll communicate openly about any delays.
+____
+
+'''''
+
+=== Disclosure Policy
+
+We follow *coordinated disclosure* (also known as responsible
+disclosure):
+
+[arabic]
+. *You report* the vulnerability privately
+. *We acknowledge* and begin investigation
+. *We develop* a fix and prepare a release
+. *We coordinate* disclosure timing with you
+. *We publish* security advisory and fix simultaneously
+. *You may publish* your research after disclosure
+
+==== Our Commitments
+
+* We will not take legal action against researchers who follow this
+policy
+* We will work with you to understand and resolve the issue
+* We will credit you in the security advisory (unless you prefer
+anonymity)
+* We will notify you before public disclosure
+* We will publish advisories with sufficient detail for users to assess
+risk
+
+==== Your Commitments
+
+* Report vulnerabilities promptly after discovery
+* Give us reasonable time to address the issue before disclosure
+* Do not access, modify, or delete data beyond what’s necessary to
+demonstrate the vulnerability
+* Do not degrade service availability (no DoS testing on production)
+* Do not share vulnerability details with others until coordinated
+disclosure
+
+==== Disclosure Timeline
+
+....
+Day 0 You report vulnerability
+Day 1-2 We acknowledge receipt
+Day 7 We confirm vulnerability and share initial assessment
+Day 7-90 We develop and test fix
+Day 90 Coordinated public disclosure
+ (earlier if fix is ready; later by mutual agreement)
+....
+
+If we cannot reach agreement on disclosure timing, we default to 90 days
+from your initial report.
+
+'''''
+
+=== Scope
+
+==== In Scope ✅
+
+The following are within scope for security research:
+
+* This repository (`+hyperpolymath/protocol-squisher+`) and all its code
+* Official releases and packages published from this repository
+* Documentation that could lead to security issues
+* Build and deployment configurations in this repository
+* Dependencies (report here, we’ll coordinate with upstream)
+
+==== Out of Scope ❌
+
+The following are *not* in scope:
+
+* Third-party services we integrate with (report directly to them)
+* Social engineering attacks against maintainers
+* Physical security
+* Denial of service attacks against production infrastructure
+* Spam, phishing, or other non-technical attacks
+* Issues already reported or publicly known
+* Theoretical vulnerabilities without proof of concept
+
+==== Qualifying Vulnerabilities
+
+We’re particularly interested in:
+
+* Remote code execution
+* SQL injection, command injection, code injection
+* Authentication/authorisation bypass
+* Cross-site scripting (XSS) and cross-site request forgery (CSRF)
+* Server-side request forgery (SSRF)
+* Path traversal / local file inclusion
+* Information disclosure (credentials, PII, secrets)
+* Cryptographic weaknesses
+* Deserialisation vulnerabilities
+* Memory safety issues (buffer overflows, use-after-free, etc.)
+* Supply chain vulnerabilities (dependency confusion, etc.)
+* Significant logic flaws
+
+==== Non-Qualifying Issues
+
+The following generally do not qualify as security vulnerabilities:
+
+* Missing security headers on non-sensitive pages
+* Clickjacking on pages without sensitive actions
+* Self-XSS (requires victim to paste code)
+* Missing rate limiting (unless it enables a specific attack)
+* Username/email enumeration (unless high-risk context)
+* Missing cookie flags on non-sensitive cookies
+* Software version disclosure
+* Verbose error messages (unless exposing secrets)
+* Best practice deviations without demonstrable impact
+
+'''''
+
+=== Safe Harbour
+
+We support security research conducted in good faith.
+
+==== Our Promise
+
+If you conduct security research in accordance with this policy:
+
+* ✅ We will not initiate legal action against you
+* ✅ We will not report your activity to law enforcement
+* ✅ We will work with you in good faith to resolve issues
+* ✅ We consider your research authorised under the Computer Fraud and
+Abuse Act (CFAA), UK Computer Misuse Act, and similar laws
+* ✅ We waive any potential claim against you for circumvention of
+security controls
+
+==== Good Faith Requirements
+
+To qualify for safe harbour, you must:
+
+* Comply with this security policy
+* Report vulnerabilities promptly
+* Avoid privacy violations (do not access others’ data)
+* Avoid service degradation (no destructive testing)
+* Not exploit vulnerabilities beyond proof-of-concept
+* Not use vulnerabilities for profit (beyond bug bounties where offered)
+
+____
+*⚠️ Important:* This safe harbour does not extend to third-party
+systems. Always check their policies before testing.
+____
+
+'''''
+
+=== Recognition
+
+We believe in recognising security researchers who help us improve.
+
+==== Hall of Fame
+
+Researchers who report valid vulnerabilities will be acknowledged in our
+link:SECURITY-ACKNOWLEDGMENTS.md[Security Acknowledgments] (unless they
+prefer anonymity).
+
+Recognition includes:
+
+* Your name (or chosen alias)
+* Link to your website/profile (optional)
+* Brief description of the vulnerability class
+* Date of report
+
+==== What We Offer
+
+* ✅ Public credit in security advisories
+* ✅ Acknowledgment in release notes
+* ✅ Entry in our Hall of Fame
+* ✅ Reference/recommendation letter upon request (for significant
+findings)
+
+==== What We Don’t Currently Offer
+
+* ❌ Monetary bug bounties
+* ❌ Hardware or swag
+* ❌ Paid security research contracts
+
+____
+*Note:* We’re a community project with limited resources. Your
+contributions help everyone who uses this software.
+____
+
+'''''
+
+=== Security Updates
+
+==== Receiving Updates
+
+To stay informed about security updates:
+
+* *Watch this repository*: Click "`Watch`" → "`Custom`" → Select
+"`Security alerts`"
+* *GitHub Security Advisories*: Published at
+https://github.com/hyperpolymath/protocol-squisher/security/advisories[Security
+Advisories]
+* *Release notes*: Security fixes noted in link:CHANGELOG.md[CHANGELOG]
+
+==== Update Policy
+
+[cols=",",options="header",]
+|===
+|Severity |Response
+|*Critical/High* |Patch release as soon as fix is ready
+|*Medium* |Included in next scheduled release (or earlier)
+|*Low* |Included in next scheduled release
+|===
+
+==== Supported Versions
+
+[cols=",,",options="header",]
+|===
+|Version |Supported |Notes
+|`+main+` branch |✅ Yes |Latest development
+|Latest release |✅ Yes |Current stable
+|Previous minor release |✅ Yes |Security fixes backported
+|Older versions |❌ No |Please upgrade
+|===
+
+'''''
+
+=== Security Best Practices
+
+When using Protocol Squisher, we recommend:
+
+==== General
+
+* Keep dependencies up to date
+* Use the latest stable release
+* Subscribe to security notifications
+* Review configuration against security documentation
+* Follow principle of least privilege
+
+==== For Contributors
+
+* Never commit secrets, credentials, or API keys
+* Use signed commits (`+git config commit.gpgsign true+`)
+* Review dependencies before adding them
+* Run security linters locally before pushing
+* Report any concerns about existing code
+
+'''''
+
+=== Additional Resources
+
+* https://github.com/hyperpolymath.gpg[Our PGP Public Key]
+* https://github.com/hyperpolymath/protocol-squisher/security/advisories[Security
+Advisories]
+* link:CHANGELOG.md[Changelog]
+* link:CONTRIBUTING.md[Contributing Guidelines]
+* https://cve.mitre.org/[CVE Database]
+* https://www.first.org/cvss/calculator/3.1[CVSS Calculator]
+
+'''''
+
+=== Contact
+
+[width="100%",cols="50%,50%",options="header",]
+|===
+|Purpose |Contact
+|*Security issues*
+|https://github.com/hyperpolymath/protocol-squisher/security/advisories/new[Report
+via GitHub] or j.d.a.jewell@open.ac.uk
+
+|*General questions*
+|https://github.com/hyperpolymath/protocol-squisher/discussions[GitHub
+Discussions]
+
+|*Other enquiries* |See link:README.md[README] for contact information
+|===
+
+'''''
+
+=== Policy Changes
+
+This security policy may be updated from time to time. Significant
+changes will be:
+
+* Committed to this repository with a clear commit message
+* Noted in the changelog
+* Announced via GitHub Discussions (for major changes)
+
+'''''
+
+_Thank you for helping keep Protocol Squisher and its users safe._ 🛡️
+
+'''''
+
+Last updated: 2026 · Policy version: 1.0.0
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index ed58418..0000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,402 +0,0 @@
-# Security Policy
-
-TEMPLATE INSTRUCTIONS (delete this block before publishing)
-Replace all {{PLACEHOLDER}} values with your information:
- Squisher Corpus - Your project name
- hyperpolymath - GitHub username or org (e.g., hyperpolymath)
- squisher-corpus - Repository name
- j.d.a.jewell@open.ac.uk - Security contact email
- TBD - Your PGP key fingerprint (40 chars, no spaces)
- https://github.com/hyperpolymath.gpg - URL to your public PGP key
- github.com/hyperpolymath/squisher-corpus - Your website/domain
- 2026 - Current year for copyright
-
-Optional: Remove sections that don't apply (e.g., PGP if you don't use it)
--->
-
-We take security seriously. We appreciate your efforts to responsibly disclose vulnerabilities and will make every effort to acknowledge your contributions.
-
-## Table of Contents
-
-- [Reporting a Vulnerability](#reporting-a-vulnerability)
-- [What to Include](#what-to-include)
-- [Response Timeline](#response-timeline)
-- [Disclosure Policy](#disclosure-policy)
-- [Scope](#scope)
-- [Safe Harbour](#safe-harbour)
-- [Recognition](#recognition)
-- [Security Updates](#security-updates)
-- [Security Best Practices](#security-best-practices)
-
----
-
-## Reporting a Vulnerability
-
-### Preferred Method: GitHub Security Advisories
-
-The preferred method for reporting security vulnerabilities is through GitHub's Security Advisory feature:
-
-1. Navigate to [Report a Vulnerability](https://github.com/hyperpolymath/protocol-squisher/security/advisories/new)
-2. Click **"Report a vulnerability"**
-3. Complete the form with as much detail as possible
-4. Submit — we'll receive a private notification
-
-This method ensures:
-
-- End-to-end encryption of your report
-- Private discussion space for collaboration
-- Coordinated disclosure tooling
-- Automatic credit when the advisory is published
-
-### Alternative: Encrypted Email
-
-If you cannot use GitHub Security Advisories, you may email us directly:
-
-| | |
-|---|---|
-| **Email** | j.d.a.jewell@open.ac.uk |
-| **PGP Key** | [Download Public Key](https://github.com/hyperpolymath.gpg) |
-| **Fingerprint** | `TBD` |
-
-```bash
-# Import our PGP key
-curl -sSL https://github.com/hyperpolymath.gpg | gpg --import
-
-# Verify fingerprint
-gpg --fingerprint j.d.a.jewell@open.ac.uk
-
-# Encrypt your report
-gpg --armor --encrypt --recipient j.d.a.jewell@open.ac.uk report.txt
-```
-
-> **⚠️ Important:** Do not report security vulnerabilities through public GitHub issues, pull requests, discussions, or social media.
-
----
-
-## What to Include
-
-A good vulnerability report helps us understand and reproduce the issue quickly.
-
-### Required Information
-
-- **Description**: Clear explanation of the vulnerability
-- **Impact**: What an attacker could achieve (confidentiality, integrity, availability)
-- **Affected versions**: Which versions/commits are affected
-- **Reproduction steps**: Detailed steps to reproduce the issue
-
-### Helpful Additional Information
-
-- **Proof of concept**: Code, scripts, or screenshots demonstrating the vulnerability
-- **Attack scenario**: Realistic attack scenario showing exploitability
-- **CVSS score**: Your assessment of severity (use [CVSS 3.1 Calculator](https://www.first.org/cvss/calculator/3.1))
-- **CWE ID**: Common Weakness Enumeration identifier if known
-- **Suggested fix**: If you have ideas for remediation
-- **References**: Links to related vulnerabilities, research, or advisories
-
-### Example Report Structure
-
-```markdown
-## Summary
-[One-sentence description of the vulnerability]
-
-## Vulnerability Type
-[e.g., SQL Injection, XSS, SSRF, Path Traversal, etc.]
-
-## Affected Component
-[File path, function name, API endpoint, etc.]
-
-## Affected Versions
-[Version range or specific commits]
-
-## Severity Assessment
-- CVSS 3.1 Score: [X.X]
-- CVSS Vector: [CVSS:3.1/AV:X/AC:X/PR:X/UI:X/S:X/C:X/I:X/A:X]
-
-## Description
-[Detailed technical description]
-
-## Steps to Reproduce
-1. [First step]
-2. [Second step]
-3. [...]
-
-## Proof of Concept
-[Code, curl commands, screenshots, etc.]
-
-## Impact
-[What can an attacker achieve?]
-
-## Suggested Remediation
-[Optional: your ideas for fixing]
-
-## References
-[Links to related issues, CVEs, research]
-```
-
----
-
-## Response Timeline
-
-We commit to the following response times:
-
-| Stage | Timeframe | Description |
-|-------|-----------|-------------|
-| **Initial Response** | 48 hours | We acknowledge receipt and confirm we're investigating |
-| **Triage** | 7 days | We assess severity, confirm the vulnerability, and estimate timeline |
-| **Status Update** | Every 7 days | Regular updates on remediation progress |
-| **Resolution** | 90 days | Target for fix development and release (complex issues may take longer) |
-| **Disclosure** | 90 days | Public disclosure after fix is available (coordinated with you) |
-
-> **Note:** These are targets, not guarantees. Complex vulnerabilities may require more time. We'll communicate openly about any delays.
-
----
-
-## Disclosure Policy
-
-We follow **coordinated disclosure** (also known as responsible disclosure):
-
-1. **You report** the vulnerability privately
-2. **We acknowledge** and begin investigation
-3. **We develop** a fix and prepare a release
-4. **We coordinate** disclosure timing with you
-5. **We publish** security advisory and fix simultaneously
-6. **You may publish** your research after disclosure
-
-### Our Commitments
-
-- We will not take legal action against researchers who follow this policy
-- We will work with you to understand and resolve the issue
-- We will credit you in the security advisory (unless you prefer anonymity)
-- We will notify you before public disclosure
-- We will publish advisories with sufficient detail for users to assess risk
-
-### Your Commitments
-
-- Report vulnerabilities promptly after discovery
-- Give us reasonable time to address the issue before disclosure
-- Do not access, modify, or delete data beyond what's necessary to demonstrate the vulnerability
-- Do not degrade service availability (no DoS testing on production)
-- Do not share vulnerability details with others until coordinated disclosure
-
-### Disclosure Timeline
-
-```
-Day 0 You report vulnerability
-Day 1-2 We acknowledge receipt
-Day 7 We confirm vulnerability and share initial assessment
-Day 7-90 We develop and test fix
-Day 90 Coordinated public disclosure
- (earlier if fix is ready; later by mutual agreement)
-```
-
-If we cannot reach agreement on disclosure timing, we default to 90 days from your initial report.
-
----
-
-## Scope
-
-### In Scope ✅
-
-The following are within scope for security research:
-
-- This repository (`hyperpolymath/protocol-squisher`) and all its code
-- Official releases and packages published from this repository
-- Documentation that could lead to security issues
-- Build and deployment configurations in this repository
-- Dependencies (report here, we'll coordinate with upstream)
-
-### Out of Scope ❌
-
-The following are **not** in scope:
-
-- Third-party services we integrate with (report directly to them)
-- Social engineering attacks against maintainers
-- Physical security
-- Denial of service attacks against production infrastructure
-- Spam, phishing, or other non-technical attacks
-- Issues already reported or publicly known
-- Theoretical vulnerabilities without proof of concept
-
-### Qualifying Vulnerabilities
-
-We're particularly interested in:
-
-- Remote code execution
-- SQL injection, command injection, code injection
-- Authentication/authorisation bypass
-- Cross-site scripting (XSS) and cross-site request forgery (CSRF)
-- Server-side request forgery (SSRF)
-- Path traversal / local file inclusion
-- Information disclosure (credentials, PII, secrets)
-- Cryptographic weaknesses
-- Deserialisation vulnerabilities
-- Memory safety issues (buffer overflows, use-after-free, etc.)
-- Supply chain vulnerabilities (dependency confusion, etc.)
-- Significant logic flaws
-
-### Non-Qualifying Issues
-
-The following generally do not qualify as security vulnerabilities:
-
-- Missing security headers on non-sensitive pages
-- Clickjacking on pages without sensitive actions
-- Self-XSS (requires victim to paste code)
-- Missing rate limiting (unless it enables a specific attack)
-- Username/email enumeration (unless high-risk context)
-- Missing cookie flags on non-sensitive cookies
-- Software version disclosure
-- Verbose error messages (unless exposing secrets)
-- Best practice deviations without demonstrable impact
-
----
-
-## Safe Harbour
-
-We support security research conducted in good faith.
-
-### Our Promise
-
-If you conduct security research in accordance with this policy:
-
-- ✅ We will not initiate legal action against you
-- ✅ We will not report your activity to law enforcement
-- ✅ We will work with you in good faith to resolve issues
-- ✅ We consider your research authorised under the Computer Fraud and Abuse Act (CFAA), UK Computer Misuse Act, and similar laws
-- ✅ We waive any potential claim against you for circumvention of security controls
-
-### Good Faith Requirements
-
-To qualify for safe harbour, you must:
-
-- Comply with this security policy
-- Report vulnerabilities promptly
-- Avoid privacy violations (do not access others' data)
-- Avoid service degradation (no destructive testing)
-- Not exploit vulnerabilities beyond proof-of-concept
-- Not use vulnerabilities for profit (beyond bug bounties where offered)
-
-> **⚠️ Important:** This safe harbour does not extend to third-party systems. Always check their policies before testing.
-
----
-
-## Recognition
-
-We believe in recognising security researchers who help us improve.
-
-### Hall of Fame
-
-Researchers who report valid vulnerabilities will be acknowledged in our [Security Acknowledgments](SECURITY-ACKNOWLEDGMENTS.md) (unless they prefer anonymity).
-
-Recognition includes:
-
-- Your name (or chosen alias)
-- Link to your website/profile (optional)
-- Brief description of the vulnerability class
-- Date of report
-
-### What We Offer
-
-- ✅ Public credit in security advisories
-- ✅ Acknowledgment in release notes
-- ✅ Entry in our Hall of Fame
-- ✅ Reference/recommendation letter upon request (for significant findings)
-
-### What We Don't Currently Offer
-
-- ❌ Monetary bug bounties
-- ❌ Hardware or swag
-- ❌ Paid security research contracts
-
-> **Note:** We're a community project with limited resources. Your contributions help everyone who uses this software.
-
----
-
-## Security Updates
-
-### Receiving Updates
-
-To stay informed about security updates:
-
-- **Watch this repository**: Click "Watch" → "Custom" → Select "Security alerts"
-- **GitHub Security Advisories**: Published at [Security Advisories](https://github.com/hyperpolymath/protocol-squisher/security/advisories)
-- **Release notes**: Security fixes noted in [CHANGELOG](CHANGELOG.md)
-
-### Update Policy
-
-| Severity | Response |
-|----------|----------|
-| **Critical/High** | Patch release as soon as fix is ready |
-| **Medium** | Included in next scheduled release (or earlier) |
-| **Low** | Included in next scheduled release |
-
-### Supported Versions
-
-
-
-| Version | Supported | Notes |
-|---------|-----------|-------|
-| `main` branch | ✅ Yes | Latest development |
-| Latest release | ✅ Yes | Current stable |
-| Previous minor release | ✅ Yes | Security fixes backported |
-| Older versions | ❌ No | Please upgrade |
-
----
-
-## Security Best Practices
-
-When using Protocol Squisher, we recommend:
-
-### General
-
-- Keep dependencies up to date
-- Use the latest stable release
-- Subscribe to security notifications
-- Review configuration against security documentation
-- Follow principle of least privilege
-
-### For Contributors
-
-- Never commit secrets, credentials, or API keys
-- Use signed commits (`git config commit.gpgsign true`)
-- Review dependencies before adding them
-- Run security linters locally before pushing
-- Report any concerns about existing code
-
----
-
-## Additional Resources
-
-- [Our PGP Public Key](https://github.com/hyperpolymath.gpg)
-- [Security Advisories](https://github.com/hyperpolymath/protocol-squisher/security/advisories)
-- [Changelog](CHANGELOG.md)
-- [Contributing Guidelines](CONTRIBUTING.md)
-- [CVE Database](https://cve.mitre.org/)
-- [CVSS Calculator](https://www.first.org/cvss/calculator/3.1)
-
----
-
-## Contact
-
-| Purpose | Contact |
-|---------|---------|
-| **Security issues** | [Report via GitHub](https://github.com/hyperpolymath/protocol-squisher/security/advisories/new) or j.d.a.jewell@open.ac.uk |
-| **General questions** | [GitHub Discussions](https://github.com/hyperpolymath/protocol-squisher/discussions) |
-| **Other enquiries** | See [README](README.md) for contact information |
-
----
-
-## Policy Changes
-
-This security policy may be updated from time to time. Significant changes will be:
-
-- Committed to this repository with a clear commit message
-- Noted in the changelog
-- Announced via GitHub Discussions (for major changes)
-
----
-
-*Thank you for helping keep Protocol Squisher and its users safe.* 🛡️
-
----
-
-Last updated: 2026 · Policy version: 1.0.0
diff --git a/provenance/.meta/REQUIRED-FILES.adoc b/provenance/.meta/REQUIRED-FILES.adoc
new file mode 100644
index 0000000..3a85933
--- /dev/null
+++ b/provenance/.meta/REQUIRED-FILES.adoc
@@ -0,0 +1,58 @@
+== Required Repository Files
+
+The following files *MUST* be present and kept up-to-date in every
+repository:
+
+=== Mandatory Dotfiles
+
+[cols=",",options="header",]
+|===
+|File |Purpose
+|`+.gitignore+` |Exclude build artifacts, secrets, and temp files
+|`+.gitattributes+` |Enforce LF line endings and diff settings
+|`+.editorconfig+` |Consistent editor settings across IDEs
+|`+.tool-versions+` |asdf version pinning for reproducible builds
+|===
+
+=== Mandatory SCM Files
+
+[cols=",",options="header",]
+|===
+|File |Purpose
+|`+META.scm+` |Architecture decisions, development practices
+|`+STATE.scm+` |Project state, phase, milestones
+|`+ECOSYSTEM.scm+` |Ecosystem positioning, related projects
+|`+PLAYBOOK.scm+` |Executable plans, procedures
+|`+AGENTIC.scm+` |AI agent operational gating
+|`+NEUROSYM.scm+` |Symbolic semantics, proof obligations
+|===
+
+=== Build System
+
+[cols=",",options="header",]
+|===
+|File |Purpose
+|`+justfile+` |Task runner (replaces Makefile)
+|`+Mustfile+` |Deployment state contract
+|===
+
+*IMPORTANT*: Makefiles are FORBIDDEN. Use `+just+` for all tasks.
+
+=== Validation
+
+These files are checked by: - CI workflow validation - Pre-commit hooks
+(when configured) - Repository standardization scripts
+
+=== Updates
+
+When updating these files: 1. Use templates from `+rsr-template-repo+`
+as reference 2. Ensure SPDX license header is present 3. Test changes
+locally before pushing 4. Keep language-specific sections relevant to
+the repo
+
+=== See Also
+
+* https://github.com/hyperpolymath/rhodium-standard-repositories[RSR
+(Rhodium Standard Repositories)]
+* https://github.com/hyperpolymath/mustfile[Mustfile Specification]
+* https://github.com/hyperpolymath/meta-scm[SCM Format Family]
diff --git a/provenance/.meta/REQUIRED-FILES.md b/provenance/.meta/REQUIRED-FILES.md
deleted file mode 100644
index 106daa9..0000000
--- a/provenance/.meta/REQUIRED-FILES.md
+++ /dev/null
@@ -1,57 +0,0 @@
-
-# Required Repository Files
-
-The following files **MUST** be present and kept up-to-date in every repository:
-
-## Mandatory Dotfiles
-
-| File | Purpose |
-|------|---------|
-| `.gitignore` | Exclude build artifacts, secrets, and temp files |
-| `.gitattributes` | Enforce LF line endings and diff settings |
-| `.editorconfig` | Consistent editor settings across IDEs |
-| `.tool-versions` | asdf version pinning for reproducible builds |
-
-## Mandatory SCM Files
-
-| File | Purpose |
-|------|---------|
-| `META.scm` | Architecture decisions, development practices |
-| `STATE.scm` | Project state, phase, milestones |
-| `ECOSYSTEM.scm` | Ecosystem positioning, related projects |
-| `PLAYBOOK.scm` | Executable plans, procedures |
-| `AGENTIC.scm` | AI agent operational gating |
-| `NEUROSYM.scm` | Symbolic semantics, proof obligations |
-
-## Build System
-
-| File | Purpose |
-|------|---------|
-| `justfile` | Task runner (replaces Makefile) |
-| `Mustfile` | Deployment state contract |
-
-**IMPORTANT**: Makefiles are FORBIDDEN. Use `just` for all tasks.
-
-## Validation
-
-These files are checked by:
-- CI workflow validation
-- Pre-commit hooks (when configured)
-- Repository standardization scripts
-
-## Updates
-
-When updating these files:
-1. Use templates from `rsr-template-repo` as reference
-2. Ensure SPDX license header is present
-3. Test changes locally before pushing
-4. Keep language-specific sections relevant to the repo
-
-## See Also
-
-- [RSR (Rhodium Standard Repositories)](https://github.com/hyperpolymath/rhodium-standard-repositories)
-- [Mustfile Specification](https://github.com/hyperpolymath/mustfile)
-- [SCM Format Family](https://github.com/hyperpolymath/meta-scm)
diff --git a/provenance/.seambot/seam-analysis.adoc b/provenance/.seambot/seam-analysis.adoc
new file mode 100644
index 0000000..91f2a0a
--- /dev/null
+++ b/provenance/.seambot/seam-analysis.adoc
@@ -0,0 +1,151 @@
+== SPDX-License-Identifier: CC-BY-SA-4.0
+
+== seambot Seam Analysis for protocol-squisher
+
+=== Integration Seams Identified
+
+==== Seam 1: ephapax IR ↔ Rust Analyzer
+
+*Location*:
+`+crates/protocol-squisher-rust-analyzer/src/ephapax_bridge.rs+`
+*Status*: ✓ SEALED *Quality*: SMOOTH - Transport class mapping: complete
+(14/14 primitive types) - Tests: 24/24 passing - Zero-copy detection:
+working - Unsafe conversion detection: working
+
+==== Seam 2: ephapax IR ↔ Python Analyzer
+
+*Location*:
+`+crates/protocol-squisher-python-analyzer/src/ephapax_bridge.rs+`
+*Status*: ✓ SEALED *Quality*: SMOOTH - Transport class mapping: complete
+(14/14 primitive types) - Tests: 23/23 passing - Pydantic introspection:
+working - PyRust interop analysis: working
+
+==== Seam 3: Compatibility Engine ↔ Analyzers
+
+*Location*: `+crates/protocol-squisher-compat/src/ephapax_engine.rs+`
+*Status*: ✓ SEALED *Quality*: SHINING - Schema-level analysis: working -
+Field-level tracking: accurate - Quality metrics: production-ready
+predicates working - Tests: 31/31 passing
+
+==== Seam 4: PyO3 Codegen ↔ Compatibility Engine
+
+*Location*:
+`+crates/protocol-squisher-pyo3-codegen/src/optimized_gen.rs+` *Status*:
+✓ SEALED *Quality*: SHINING - Transport-class-aware generation: working
+- Concorde → direct bindings: zero overhead - Wheelbarrow → JSON
+fallback: with warnings - Tests: 33/33 passing
+
+==== Seam 5: JSON Fallback ↔ Compatibility Engine
+
+*Location*:
+`+crates/protocol-squisher-json-fallback/src/ephapax_fallback.rs+`
+*Status*: ✓ SEALED *Quality*: SMOOTH - Selective JSON fallback: only
+Wheelbarrow fields - Error handling: comprehensive (4 error types) -
+Fallback statistics: accurate - Tests: 20/20 passing
+
+==== Seam 6: Integration Tests ↔ Full Pipeline
+
+*Location*: `+crates/protocol-squisher-integration-tests/src/lib.rs+`
+*Status*: ✓ SEALED *Quality*: SHINING - End-to-end validation: 7
+scenarios - Transport class consistency: verified - Quality-driven
+decisions: validated - Invariant: "`If it compiles, it carries`" ✓
+
+=== Seam Analysis Summary
+
+*Total Seams*: 6 *Sealed*: 6 (100%) *Smooth*: 4 (67%) *Shining*: 2 (33%)
+
+=== Quality Metrics
+
+[cols=",,,",options="header",]
+|===
+|Metric |Value |Target |Status
+|Test Coverage |91 tests |- |✓
+|Component Integration |6/6 |6/6 |✓
+|Transport Class Consistency |100% |100% |✓
+|Zero-Copy Paths |Working |Yes |✓
+|JSON Fallback |Working |Yes |✓
+|Quality Predicates |Accurate |Yes |✓
+|===
+
+=== Seam Health Status
+
+....
+ephapax IR
+ ↓ [SEALED, SMOOTH]
+Rust Analyzer ←→ Python Analyzer
+ ↓ [SEALED, SMOOTH] ↓ [SEALED, SMOOTH]
+ Compatibility Engine
+ ↓ [SEALED, SHINING]
+ PyO3 Codegen ←→ JSON Fallback
+ ↓ [SEALED, SHINING] ↓ [SEALED, SMOOTH]
+ Integration Tests
+ ✓ COMPLETE
+....
+
+=== Ongoing Seam Monitoring
+
+==== Daily Checks
+
+* [ ] Run all integration tests
+* [ ] Verify transport class consistency
+* [ ] Check quality metrics accuracy
+* [ ] Validate zero-copy paths
+* [ ] Test JSON fallback error handling
+
+==== Weekly Analysis
+
+* [ ] Review seam test coverage
+* [ ] Analyze failure patterns
+* [ ] Check for new integration points
+* [ ] Validate performance metrics
+* [ ] Update seam documentation
+
+==== Monthly Review
+
+* [ ] Comprehensive seam audit
+* [ ] Performance optimization review
+* [ ] Quality gate adjustments
+* [ ] New seam identification
+* [ ] Refactoring recommendations
+
+=== Seam Improvement Actions
+
+==== To Smooth
+
+[arabic]
+. [line-through]#ephapax IR bridges# ✓ DONE
+. [line-through]#Compatibility engine# ✓ DONE
+. [line-through]#PyO3 codegen# ✓ DONE
+. [line-through]#JSON fallback# ✓ DONE
+
+==== To Shine
+
+[arabic]
+. [line-through]#Compatibility engine# ✓ DONE
+. [line-through]#PyO3 codegen# ✓ DONE
+. Integration tests (CURRENT)
+. End-user documentation (TODO)
+
+=== Invariants Monitored
+
+[arabic]
+. *"`If it compiles, it carries`"* - ✓ Validated
+* All fields accounted for: zero-copy + JSON fallback = total
+* No fields dropped or unhandled
+. *Transport class consistency* - ✓ Validated
+* All components agree on transport classes
+* Concorde/Business/Wheelbarrow correctly identified
+. *Quality metrics accuracy* - ✓ Validated
+* Production readiness: >90% safe
+* Needs optimization: >20% JSON fallback
+* Zero-copy percentage: accurate
+
+=== Next Steps
+
+[arabic]
+. ✓ Create seambot workflow
+. ✓ Configure seam monitoring
+. ⏳ Run daily seam analysis
+. ⏳ Generate seam health reports
+. ⏳ Automate seam smoothing
+. ⏳ Automate seam shining
diff --git a/provenance/.seambot/seam-analysis.md b/provenance/.seambot/seam-analysis.md
deleted file mode 100644
index d29c5a0..0000000
--- a/provenance/.seambot/seam-analysis.md
+++ /dev/null
@@ -1,156 +0,0 @@
-
-# SPDX-License-Identifier: CC-BY-SA-4.0
-# seambot Seam Analysis for protocol-squisher
-
-## Integration Seams Identified
-
-### Seam 1: ephapax IR ↔ Rust Analyzer
-**Location**: `crates/protocol-squisher-rust-analyzer/src/ephapax_bridge.rs`
-**Status**: ✓ SEALED
-**Quality**: SMOOTH
-- Transport class mapping: complete (14/14 primitive types)
-- Tests: 24/24 passing
-- Zero-copy detection: working
-- Unsafe conversion detection: working
-
-### Seam 2: ephapax IR ↔ Python Analyzer
-**Location**: `crates/protocol-squisher-python-analyzer/src/ephapax_bridge.rs`
-**Status**: ✓ SEALED
-**Quality**: SMOOTH
-- Transport class mapping: complete (14/14 primitive types)
-- Tests: 23/23 passing
-- Pydantic introspection: working
-- PyRust interop analysis: working
-
-### Seam 3: Compatibility Engine ↔ Analyzers
-**Location**: `crates/protocol-squisher-compat/src/ephapax_engine.rs`
-**Status**: ✓ SEALED
-**Quality**: SHINING
-- Schema-level analysis: working
-- Field-level tracking: accurate
-- Quality metrics: production-ready predicates working
-- Tests: 31/31 passing
-
-### Seam 4: PyO3 Codegen ↔ Compatibility Engine
-**Location**: `crates/protocol-squisher-pyo3-codegen/src/optimized_gen.rs`
-**Status**: ✓ SEALED
-**Quality**: SHINING
-- Transport-class-aware generation: working
-- Concorde → direct bindings: zero overhead
-- Wheelbarrow → JSON fallback: with warnings
-- Tests: 33/33 passing
-
-### Seam 5: JSON Fallback ↔ Compatibility Engine
-**Location**: `crates/protocol-squisher-json-fallback/src/ephapax_fallback.rs`
-**Status**: ✓ SEALED
-**Quality**: SMOOTH
-- Selective JSON fallback: only Wheelbarrow fields
-- Error handling: comprehensive (4 error types)
-- Fallback statistics: accurate
-- Tests: 20/20 passing
-
-### Seam 6: Integration Tests ↔ Full Pipeline
-**Location**: `crates/protocol-squisher-integration-tests/src/lib.rs`
-**Status**: ✓ SEALED
-**Quality**: SHINING
-- End-to-end validation: 7 scenarios
-- Transport class consistency: verified
-- Quality-driven decisions: validated
-- Invariant: "If it compiles, it carries" ✓
-
-## Seam Analysis Summary
-
-**Total Seams**: 6
-**Sealed**: 6 (100%)
-**Smooth**: 4 (67%)
-**Shining**: 2 (33%)
-
-## Quality Metrics
-
-| Metric | Value | Target | Status |
-|--------|-------|--------|--------|
-| Test Coverage | 91 tests | - | ✓ |
-| Component Integration | 6/6 | 6/6 | ✓ |
-| Transport Class Consistency | 100% | 100% | ✓ |
-| Zero-Copy Paths | Working | Yes | ✓ |
-| JSON Fallback | Working | Yes | ✓ |
-| Quality Predicates | Accurate | Yes | ✓ |
-
-## Seam Health Status
-
-```
-ephapax IR
- ↓ [SEALED, SMOOTH]
-Rust Analyzer ←→ Python Analyzer
- ↓ [SEALED, SMOOTH] ↓ [SEALED, SMOOTH]
- Compatibility Engine
- ↓ [SEALED, SHINING]
- PyO3 Codegen ←→ JSON Fallback
- ↓ [SEALED, SHINING] ↓ [SEALED, SMOOTH]
- Integration Tests
- ✓ COMPLETE
-```
-
-## Ongoing Seam Monitoring
-
-### Daily Checks
-- [ ] Run all integration tests
-- [ ] Verify transport class consistency
-- [ ] Check quality metrics accuracy
-- [ ] Validate zero-copy paths
-- [ ] Test JSON fallback error handling
-
-### Weekly Analysis
-- [ ] Review seam test coverage
-- [ ] Analyze failure patterns
-- [ ] Check for new integration points
-- [ ] Validate performance metrics
-- [ ] Update seam documentation
-
-### Monthly Review
-- [ ] Comprehensive seam audit
-- [ ] Performance optimization review
-- [ ] Quality gate adjustments
-- [ ] New seam identification
-- [ ] Refactoring recommendations
-
-## Seam Improvement Actions
-
-### To Smooth
-1. ~~ephapax IR bridges~~ ✓ DONE
-2. ~~Compatibility engine~~ ✓ DONE
-3. ~~PyO3 codegen~~ ✓ DONE
-4. ~~JSON fallback~~ ✓ DONE
-
-### To Shine
-1. ~~Compatibility engine~~ ✓ DONE
-2. ~~PyO3 codegen~~ ✓ DONE
-3. Integration tests (CURRENT)
-4. End-user documentation (TODO)
-
-## Invariants Monitored
-
-1. **"If it compiles, it carries"** - ✓ Validated
- - All fields accounted for: zero-copy + JSON fallback = total
- - No fields dropped or unhandled
-
-2. **Transport class consistency** - ✓ Validated
- - All components agree on transport classes
- - Concorde/Business/Wheelbarrow correctly identified
-
-3. **Quality metrics accuracy** - ✓ Validated
- - Production readiness: >90% safe
- - Needs optimization: >20% JSON fallback
- - Zero-copy percentage: accurate
-
-## Next Steps
-
-1. ✓ Create seambot workflow
-2. ✓ Configure seam monitoring
-3. ⏳ Run daily seam analysis
-4. ⏳ Generate seam health reports
-5. ⏳ Automate seam smoothing
-6. ⏳ Automate seam shining
diff --git a/provenance/BENCHMARK-SUITE-SUMMARY.adoc b/provenance/BENCHMARK-SUITE-SUMMARY.adoc
new file mode 100644
index 0000000..07dba1b
--- /dev/null
+++ b/provenance/BENCHMARK-SUITE-SUMMARY.adoc
@@ -0,0 +1,386 @@
+== Benchmark Suite Summary
+
+This document summarizes the comprehensive benchmarking suite created
+for protocol-squisher.
+
+=== Overview
+
+Created a complete performance validation framework with *4 benchmark
+suites* covering: - Transport class overhead validation - Container
+operation patterns - Generated vs handwritten code comparison -
+Optimizer effectiveness
+
+=== Files Created
+
+==== Benchmark Implementations
+
+[arabic]
+. *`+benches/transport_classes.rs+`* (320 lines)
+* Validates all four transport classes against target overhead
+* Concorde: i64 identity, str borrowing, f64 pass-through
+* Business: Safe widening conversions (i32→i64, f32→f64)
+* Economy: Vec conversions, Option handling, String cloning
+* Wheelbarrow: JSON serialization fallback
+. *`+benches/container_operations.rs+`* (420 lines)
+* Tests realistic container patterns at scale
+* Vec: Direct access, element widening, complex cloning, nesting
+* Option: Map operations, unwrapping, conversions
+* HashMap: Lookups, value widening, map→vec conversion
+* Nested: Vec, Option, HashMap
+. *`+benches/generated_vs_handwritten.rs+`* (430 lines)
+* Compares three implementation approaches:
+** Raw Rust (theoretical maximum)
+** Handwritten PyO3 FFI (baseline)
+** Generated code (what protocol-squisher produces)
+* Tests Point/User structs, Vec operations, API response serialization
+. *`+benches/optimizer_bench.rs+`* (already existed)
+* Original optimizer comparison benchmarks
+
+==== Documentation
+
+[arabic, start=5]
+. *`+benches/README.md+`* (450 lines)
+* Comprehensive benchmark suite documentation
+* How to run benchmarks (full, partial, parameterized)
+* Performance targets and expectations
+* Benchmark development guide
+* CI integration examples
+. *`+docs/BENCHMARK-RESULTS.md+`* (650 lines)
+* Detailed results interpretation guide
+* Understanding Criterion output (terminal and HTML)
+* Transport class validation criteria
+* Container operation scaling expectations
+* Troubleshooting performance issues
+* Regression detection and baselines
+. *`+docs/BENCHMARK-QUICKSTART.md+`* (350 lines)
+* 5-minute quick start guide
+* TL;DR commands
+* Common use cases
+* Interpreting results
+* Troubleshooting cheat sheet
+
+==== Scripts
+
+[arabic, start=8]
+. *`+scripts/run-benchmarks.sh+`* (260 lines, executable)
+* Convenience wrapper around cargo bench
+* Options: –all, –transport, –containers, –generated, –optimizer
+* Quick mode (–quick) for development
+* Baseline creation and comparison (–baseline, –compare)
+* Summary generation (–summary)
+* Auto-open HTML reports (–view)
+
+==== Updates
+
+[arabic, start=9]
+. *`+Cargo.toml+`*
+* Added three new `+[[bench]]+` entries
+* Already had criterion configured with html_reports
+. *`+README.adoc+`*
+* Added "`Performance`" section to documentation links
+* Links to quick start, full guide, and interpretation docs
+
+=== Performance Targets
+
+The suite validates these performance claims:
+
+[cols=",,",options="header",]
+|===
+|Transport Class |Target Latency |Operations Tested
+|*Concorde* |1-2ns |Zero-copy, pointer passing
+|*Business Class* |10-20ns |Safe widening (i32→i64)
+|*Economy* |50-100ns |Allocation (Vec, String)
+|*Wheelbarrow* |100-1000ns |JSON serialization
+|===
+
+=== Benchmark Coverage
+
+==== Transport Classes
+
+* ✅ Concorde: 3 benchmarks (i64, str, f64)
+* ✅ Business: 4 benchmarks (i32→i64, f32→f64, u32→u64, struct)
+* ✅ Economy: 8 benchmarks (Vec sizes, Option, String, flatten)
+* ✅ Wheelbarrow: 2 benchmarks (manual lossy, JSON roundtrip)
+
+==== Container Operations
+
+* ✅ Vec: 6 benchmark groups (access, widen, clone, flatten) × 4 sizes
+* ✅ Option: 7 benchmarks (map, unwrap, to_result, flatten)
+* ✅ HashMap: 5 benchmarks (lookup, widen, to_vec, complex)
+* ✅ Nested: 4 benchmarks (Vec, Option, etc.)
+
+==== Code Comparison
+
+* ✅ Point: 6 benchmarks (raw/handwritten/generated × create/access)
+* ✅ User: 6 benchmarks (raw/handwritten/generated × create/access)
+* ✅ Vec: 9 benchmarks (raw/handwritten/generated × 3 sizes)
+* ✅ Complex: 3 benchmarks (clone/convert/JSON fallback)
+
+*Total: ~60 individual benchmark functions*
+
+=== Running the Suite
+
+==== Quick Start
+
+[source,bash]
+----
+# Single fast benchmark (~1 second)
+cargo bench --bench transport_classes Concorde/i64_identity
+
+# Full transport class suite (~3 minutes)
+cargo bench --bench transport_classes
+
+# All benchmarks (~10-15 minutes)
+cargo bench
+
+# With script (recommended)
+./scripts/run-benchmarks.sh --all --view
+----
+
+==== Development Workflow
+
+[source,bash]
+----
+# Before changes: establish baseline
+./scripts/run-benchmarks.sh --all --baseline main
+
+# After changes: compare
+./scripts/run-benchmarks.sh --all --compare main
+
+# Quick validation during development
+./scripts/run-benchmarks.sh --quick --transport
+----
+
+==== CI Integration
+
+[source,yaml]
+----
+# .github/workflows/benchmarks.yml
+name: Performance
+on: [push, pull_request]
+jobs:
+ benchmark:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - run: cargo bench --no-fail-fast
+ - uses: actions/upload-artifact@v4
+ with:
+ name: benchmarks
+ path: target/criterion/
+----
+
+=== Output Formats
+
+==== Terminal
+
+....
+Concorde/i64_identity time: [1.2345 ns 1.2678 ns 1.3012 ns]
+ change: [-5.12% -2.35% +0.89%] (p = 0.42 > 0.05)
+ No change in performance detected.
+....
+
+==== HTML Reports
+
+* Interactive violin plots
+* Statistical analysis (mean, median, outliers)
+* Historical comparison charts
+* PDF estimates of measurement distribution
+
+Location: `+target/criterion/report/index.html+`
+
+==== Summary Reports
+
+[source,bash]
+----
+./scripts/run-benchmarks.sh --all --summary
+
+# Creates: benchmark-reports/summary-TIMESTAMP.txt
+----
+
+=== Expected Results Validation
+
+==== Concorde (Zero-Copy)
+
+....
+✅ i64_identity: 1.2 ns (< 2ns target)
+✅ str_borrow: 1.5 ns (< 2ns target)
+✅ f64_identity: 0.9 ns (< 2ns target)
+....
+
+==== Business Class (Safe Widening)
+
+....
+✅ i32_to_i64: 8.7 ns (< 20ns target)
+✅ f32_to_f64: 9.2 ns (< 20ns target)
+✅ struct_widen: 15.3 ns (< 20ns target)
+....
+
+==== Economy (Allocation)
+
+....
+✅ vec_i32_to_i64/10: 67 ns (< 100ns target)
+✅ string_clone: 42 ns (< 100ns target)
+✅ option_some: 7 ns (< 100ns target)
+....
+
+==== Wheelbarrow (JSON Fallback)
+
+....
+✅ manual_lossy: 234 ns (< 1000ns target)
+✅ json_roundtrip: 1543 ns (< 1000ns target)
+....
+
+=== Key Features
+
+==== Realistic Test Data
+
+* Small, medium, large sizes (10, 100, 1K, 10K elements)
+* Complex nested structures
+* Real-world patterns (User struct, API response)
+
+==== Statistical Rigor
+
+* Criterion.rs automatic outlier detection
+* 95% confidence intervals
+* Statistical significance testing (p-values)
+* Multiple samples per measurement (100-500)
+
+==== Regression Detection
+
+* Baseline comparison
+* Historical trending (HTML reports)
+* Automatic change detection (±5% threshold)
+
+==== Developer-Friendly
+
+* Color-coded terminal output
+* Interactive HTML visualizations
+* Quick mode for rapid iteration
+* Selective benchmark running
+
+=== Troubleshooting
+
+==== Common Issues
+
+[width="100%",cols="42%,58%",options="header",]
+|===
+|Issue |Solution
+|Times are 10x higher |Check release mode (`+cargo bench+`)
+|High variance (>20%) |Close background apps, disable CPU freq scaling
+|Compilation fails |Update Rust (`+rustup update+`)
+|Can’t find reports |Check `+target/criterion/report/+`
+|===
+
+==== Performance Tips
+
+[arabic]
+. *Reduce noise*: Close apps, disable frequency scaling
+. *Increase samples*: `+--sample-size 1000+` for precision
+. *Use baselines*: Track changes over time
+. *Check p-values*: Ignore changes with p > 0.05
+
+=== Integration Points
+
+==== With Existing Tests
+
+* Benchmarks use same structs as unit tests where possible
+* Validates actual codegen output (not mock data)
+* Property tests ensure correctness, benchmarks measure speed
+
+==== With Documentation
+
+* README.adoc links to benchmark docs
+* CLI guide references performance characteristics
+* Optimization guide uses benchmark results
+
+==== With CI/CD
+
+* Can run in GitHub Actions
+* Artifacts uploaded for comparison
+* Regression detection in PRs
+
+=== Future Enhancements
+
+==== Potential Additions
+
+* [ ] Memory usage benchmarks (heap allocations)
+* [ ] Throughput measurements (ops/sec)
+* [ ] Cache miss analysis (perf integration)
+* [ ] Comparison with other tools (manual FFI, PyO3 code)
+* [ ] Flamegraph generation (profiling)
+
+==== Advanced Features
+
+* [ ] Automated regression comments on PRs
+* [ ] Performance dashboard (historical trends)
+* [ ] Comparative benchmarks (vs competitors)
+* [ ] Platform-specific optimizations (x86 vs ARM)
+
+=== Validation Status
+
+==== Compilation
+
+✅ All benchmarks compile without errors ✅ Only minor dead code
+warnings (suppressed with `+#[allow(dead_code)]+`)
+
+==== Documentation
+
+✅ Quick start guide (5-minute setup) ✅ Comprehensive README (450
+lines) ✅ Results interpretation (650 lines) ✅ Script help text and
+usage examples
+
+==== Completeness
+
+✅ All 4 transport classes covered ✅ Common container patterns tested
+✅ Generated vs baseline comparisons ✅ Multiple data sizes ✅ Realistic
+test cases
+
+=== Maintenance
+
+==== Regular Tasks
+
+* Run benchmarks before releases
+* Compare against previous baselines
+* Update targets if architecture changes
+* Review HTML reports for trends
+
+==== When to Re-benchmark
+
+* After optimizer changes
+* After codegen modifications
+* Before major releases
+* When adding new transport paths
+
+=== Summary
+
+Created a production-ready benchmark suite that: - ✅ Validates all
+performance claims - ✅ Covers realistic use cases - ✅ Provides clear,
+actionable results - ✅ Integrates with development workflow - ✅
+Supports regression detection - ✅ Includes comprehensive documentation
+
+*Total effort*: ~2000 lines of benchmarks + 1450 lines of documentation
++ tooling
+
+*Time to run*: 10-15 minutes (full suite), 1-3 minutes (individual
+suites), 30 seconds (quick mode)
+
+*Output*: Terminal summaries + Interactive HTML reports + CSV data
+
+*Ready for*: Development use, CI integration, performance validation,
+public release
+
+'''''
+
+*Quick Start:*
+
+[source,bash]
+----
+cargo bench --bench transport_classes Concorde
+firefox target/criterion/report/index.html
+----
+
+*Full Documentation:* - `+docs/BENCHMARK-QUICKSTART.md+` - Start here -
+`+benches/README.md+` - Complete reference -
+`+docs/BENCHMARK-RESULTS.md+` - Interpretation guide
diff --git a/provenance/BENCHMARK-SUITE-SUMMARY.md b/provenance/BENCHMARK-SUITE-SUMMARY.md
deleted file mode 100644
index 81e2ea6..0000000
--- a/provenance/BENCHMARK-SUITE-SUMMARY.md
+++ /dev/null
@@ -1,358 +0,0 @@
-
-# Benchmark Suite Summary
-
-This document summarizes the comprehensive benchmarking suite created for protocol-squisher.
-
-## Overview
-
-Created a complete performance validation framework with **4 benchmark suites** covering:
-- Transport class overhead validation
-- Container operation patterns
-- Generated vs handwritten code comparison
-- Optimizer effectiveness
-
-## Files Created
-
-### Benchmark Implementations
-
-1. **`benches/transport_classes.rs`** (320 lines)
- - Validates all four transport classes against target overhead
- - Concorde: i64 identity, str borrowing, f64 pass-through
- - Business: Safe widening conversions (i32→i64, f32→f64)
- - Economy: Vec conversions, Option handling, String cloning
- - Wheelbarrow: JSON serialization fallback
-
-2. **`benches/container_operations.rs`** (420 lines)
- - Tests realistic container patterns at scale
- - Vec: Direct access, element widening, complex cloning, nesting
- - Option: Map operations, unwrapping, conversions
- - HashMap: Lookups, value widening, map→vec conversion
- - Nested: Vec>, Option>, HashMap>
-
-3. **`benches/generated_vs_handwritten.rs`** (430 lines)
- - Compares three implementation approaches:
- - Raw Rust (theoretical maximum)
- - Handwritten PyO3 FFI (baseline)
- - Generated code (what protocol-squisher produces)
- - Tests Point/User structs, Vec operations, API response serialization
-
-4. **`benches/optimizer_bench.rs`** (already existed)
- - Original optimizer comparison benchmarks
-
-### Documentation
-
-5. **`benches/README.md`** (450 lines)
- - Comprehensive benchmark suite documentation
- - How to run benchmarks (full, partial, parameterized)
- - Performance targets and expectations
- - Benchmark development guide
- - CI integration examples
-
-6. **`docs/BENCHMARK-RESULTS.md`** (650 lines)
- - Detailed results interpretation guide
- - Understanding Criterion output (terminal and HTML)
- - Transport class validation criteria
- - Container operation scaling expectations
- - Troubleshooting performance issues
- - Regression detection and baselines
-
-7. **`docs/BENCHMARK-QUICKSTART.md`** (350 lines)
- - 5-minute quick start guide
- - TL;DR commands
- - Common use cases
- - Interpreting results
- - Troubleshooting cheat sheet
-
-### Scripts
-
-8. **`scripts/run-benchmarks.sh`** (260 lines, executable)
- - Convenience wrapper around cargo bench
- - Options: --all, --transport, --containers, --generated, --optimizer
- - Quick mode (--quick) for development
- - Baseline creation and comparison (--baseline, --compare)
- - Summary generation (--summary)
- - Auto-open HTML reports (--view)
-
-### Updates
-
-9. **`Cargo.toml`**
- - Added three new `[[bench]]` entries
- - Already had criterion configured with html_reports
-
-10. **`README.adoc`**
- - Added "Performance" section to documentation links
- - Links to quick start, full guide, and interpretation docs
-
-## Performance Targets
-
-The suite validates these performance claims:
-
-| Transport Class | Target Latency | Operations Tested |
-|-----------------|----------------|-------------------|
-| **Concorde** | 1-2ns | Zero-copy, pointer passing |
-| **Business Class** | 10-20ns | Safe widening (i32→i64) |
-| **Economy** | 50-100ns | Allocation (Vec, String) |
-| **Wheelbarrow** | 100-1000ns | JSON serialization |
-
-## Benchmark Coverage
-
-### Transport Classes
-- ✅ Concorde: 3 benchmarks (i64, str, f64)
-- ✅ Business: 4 benchmarks (i32→i64, f32→f64, u32→u64, struct)
-- ✅ Economy: 8 benchmarks (Vec sizes, Option, String, flatten)
-- ✅ Wheelbarrow: 2 benchmarks (manual lossy, JSON roundtrip)
-
-### Container Operations
-- ✅ Vec: 6 benchmark groups (access, widen, clone, flatten) × 4 sizes
-- ✅ Option: 7 benchmarks (map, unwrap, to_result, flatten)
-- ✅ HashMap: 5 benchmarks (lookup, widen, to_vec, complex)
-- ✅ Nested: 4 benchmarks (Vec, Option, etc.)
-
-### Code Comparison
-- ✅ Point: 6 benchmarks (raw/handwritten/generated × create/access)
-- ✅ User: 6 benchmarks (raw/handwritten/generated × create/access)
-- ✅ Vec: 9 benchmarks (raw/handwritten/generated × 3 sizes)
-- ✅ Complex: 3 benchmarks (clone/convert/JSON fallback)
-
-**Total: ~60 individual benchmark functions**
-
-## Running the Suite
-
-### Quick Start
-```bash
-# Single fast benchmark (~1 second)
-cargo bench --bench transport_classes Concorde/i64_identity
-
-# Full transport class suite (~3 minutes)
-cargo bench --bench transport_classes
-
-# All benchmarks (~10-15 minutes)
-cargo bench
-
-# With script (recommended)
-./scripts/run-benchmarks.sh --all --view
-```
-
-### Development Workflow
-```bash
-# Before changes: establish baseline
-./scripts/run-benchmarks.sh --all --baseline main
-
-# After changes: compare
-./scripts/run-benchmarks.sh --all --compare main
-
-# Quick validation during development
-./scripts/run-benchmarks.sh --quick --transport
-```
-
-### CI Integration
-```yaml
-# .github/workflows/benchmarks.yml
-name: Performance
-on: [push, pull_request]
-jobs:
- benchmark:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: dtolnay/rust-toolchain@stable
- - run: cargo bench --no-fail-fast
- - uses: actions/upload-artifact@v4
- with:
- name: benchmarks
- path: target/criterion/
-```
-
-## Output Formats
-
-### Terminal
-```
-Concorde/i64_identity time: [1.2345 ns 1.2678 ns 1.3012 ns]
- change: [-5.12% -2.35% +0.89%] (p = 0.42 > 0.05)
- No change in performance detected.
-```
-
-### HTML Reports
-- Interactive violin plots
-- Statistical analysis (mean, median, outliers)
-- Historical comparison charts
-- PDF estimates of measurement distribution
-
-Location: `target/criterion/report/index.html`
-
-### Summary Reports
-```bash
-./scripts/run-benchmarks.sh --all --summary
-
-# Creates: benchmark-reports/summary-TIMESTAMP.txt
-```
-
-## Expected Results Validation
-
-### Concorde (Zero-Copy)
-```
-✅ i64_identity: 1.2 ns (< 2ns target)
-✅ str_borrow: 1.5 ns (< 2ns target)
-✅ f64_identity: 0.9 ns (< 2ns target)
-```
-
-### Business Class (Safe Widening)
-```
-✅ i32_to_i64: 8.7 ns (< 20ns target)
-✅ f32_to_f64: 9.2 ns (< 20ns target)
-✅ struct_widen: 15.3 ns (< 20ns target)
-```
-
-### Economy (Allocation)
-```
-✅ vec_i32_to_i64/10: 67 ns (< 100ns target)
-✅ string_clone: 42 ns (< 100ns target)
-✅ option_some: 7 ns (< 100ns target)
-```
-
-### Wheelbarrow (JSON Fallback)
-```
-✅ manual_lossy: 234 ns (< 1000ns target)
-✅ json_roundtrip: 1543 ns (< 1000ns target)
-```
-
-## Key Features
-
-### Realistic Test Data
-- Small, medium, large sizes (10, 100, 1K, 10K elements)
-- Complex nested structures
-- Real-world patterns (User struct, API response)
-
-### Statistical Rigor
-- Criterion.rs automatic outlier detection
-- 95% confidence intervals
-- Statistical significance testing (p-values)
-- Multiple samples per measurement (100-500)
-
-### Regression Detection
-- Baseline comparison
-- Historical trending (HTML reports)
-- Automatic change detection (±5% threshold)
-
-### Developer-Friendly
-- Color-coded terminal output
-- Interactive HTML visualizations
-- Quick mode for rapid iteration
-- Selective benchmark running
-
-## Troubleshooting
-
-### Common Issues
-
-| Issue | Solution |
-|-------|----------|
-| Times are 10x higher | Check release mode (`cargo bench`) |
-| High variance (>20%) | Close background apps, disable CPU freq scaling |
-| Compilation fails | Update Rust (`rustup update`) |
-| Can't find reports | Check `target/criterion/report/` |
-
-### Performance Tips
-
-1. **Reduce noise**: Close apps, disable frequency scaling
-2. **Increase samples**: `--sample-size 1000` for precision
-3. **Use baselines**: Track changes over time
-4. **Check p-values**: Ignore changes with p > 0.05
-
-## Integration Points
-
-### With Existing Tests
-- Benchmarks use same structs as unit tests where possible
-- Validates actual codegen output (not mock data)
-- Property tests ensure correctness, benchmarks measure speed
-
-### With Documentation
-- README.adoc links to benchmark docs
-- CLI guide references performance characteristics
-- Optimization guide uses benchmark results
-
-### With CI/CD
-- Can run in GitHub Actions
-- Artifacts uploaded for comparison
-- Regression detection in PRs
-
-## Future Enhancements
-
-### Potential Additions
-- [ ] Memory usage benchmarks (heap allocations)
-- [ ] Throughput measurements (ops/sec)
-- [ ] Cache miss analysis (perf integration)
-- [ ] Comparison with other tools (manual FFI, PyO3 code)
-- [ ] Flamegraph generation (profiling)
-
-### Advanced Features
-- [ ] Automated regression comments on PRs
-- [ ] Performance dashboard (historical trends)
-- [ ] Comparative benchmarks (vs competitors)
-- [ ] Platform-specific optimizations (x86 vs ARM)
-
-## Validation Status
-
-### Compilation
-✅ All benchmarks compile without errors
-✅ Only minor dead code warnings (suppressed with `#[allow(dead_code)]`)
-
-### Documentation
-✅ Quick start guide (5-minute setup)
-✅ Comprehensive README (450 lines)
-✅ Results interpretation (650 lines)
-✅ Script help text and usage examples
-
-### Completeness
-✅ All 4 transport classes covered
-✅ Common container patterns tested
-✅ Generated vs baseline comparisons
-✅ Multiple data sizes
-✅ Realistic test cases
-
-## Maintenance
-
-### Regular Tasks
-- Run benchmarks before releases
-- Compare against previous baselines
-- Update targets if architecture changes
-- Review HTML reports for trends
-
-### When to Re-benchmark
-- After optimizer changes
-- After codegen modifications
-- Before major releases
-- When adding new transport paths
-
-## Summary
-
-Created a production-ready benchmark suite that:
-- ✅ Validates all performance claims
-- ✅ Covers realistic use cases
-- ✅ Provides clear, actionable results
-- ✅ Integrates with development workflow
-- ✅ Supports regression detection
-- ✅ Includes comprehensive documentation
-
-**Total effort**: ~2000 lines of benchmarks + 1450 lines of documentation + tooling
-
-**Time to run**: 10-15 minutes (full suite), 1-3 minutes (individual suites), 30 seconds (quick mode)
-
-**Output**: Terminal summaries + Interactive HTML reports + CSV data
-
-**Ready for**: Development use, CI integration, performance validation, public release
-
----
-
-**Quick Start:**
-```bash
-cargo bench --bench transport_classes Concorde
-firefox target/criterion/report/index.html
-```
-
-**Full Documentation:**
-- `docs/BENCHMARK-QUICKSTART.md` - Start here
-- `benches/README.md` - Complete reference
-- `docs/BENCHMARK-RESULTS.md` - Interpretation guide
diff --git a/provenance/CHANGELOG.adoc b/provenance/CHANGELOG.adoc
new file mode 100644
index 0000000..d4d3e27
--- /dev/null
+++ b/provenance/CHANGELOG.adoc
@@ -0,0 +1,192 @@
+== Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on https://keepachangelog.com/en/1.1.0/[Keep a
+Changelog], and this project adheres to
+https://semver.org/spec/v2.0.0.html[Semantic Versioning].
+
+=== [Unreleased]
+
+==== Planned
+
+* Phase 4c: Constraint evaluation API (`+Constraint::evaluate()+` for
+live data)
+* Phase 4d: Bidirectional analysis as first-class top-level API
+* Phase 4e: `+protocol-squisher-server+` crate (axum HTTP/JSON API)
+
+=== [1.2.0] - 2026-02-28
+
+==== Added
+
+* *`+SchemaAnalyzer+` trait* defined in `+protocol-squisher-ir+` —
+universal interface for all analyzers with `+analyzer_name()+`,
+`+supported_extensions()+`, `+analyze_file()+`, `+analyze_str()+`
+* *Trait implemented across all 13 analyzers* (Rust, Python, JSON
+Schema, Protobuf, Avro, Thrift, Bebop, Cap’n Proto, FlatBuffers,
+MessagePack, ReScript, GraphQL, TOML)
+* *Public library API* — all 13 analyzers, compat, meta-analysis,
+optimizer, json-fallback, and pyo3-codegen re-exported from root
+`+protocol_squisher::*+` crate
+* *`+all_analyzers()+` registry* — returns all 13 analyzers as
+type-erased trait objects for dynamic dispatch (PanLL integration, CLI
+auto-detection)
+* *`+protocol_squisher::prelude+`* — convenience re-exports
+(`+IrSchema+`, `+SchemaAnalyzer+`)
+* *`+AnalyzerError+` wrapper* — type-erased error for the
+`+all_analyzers()+` registry
+* 13 new `+test_schema_analyzer_trait+` tests + 3 library API tests (937
+total)
+
+==== Changed
+
+* Root `+Cargo.toml+` now depends on all 13 analyzer crates (was only 6)
+* `+JsonSchemaAnalyzer+` converter uses `+AtomicUsize+` instead of
+`+Cell+` for `+Sync+` safety
+* Test count: 921 → 937 (16 new tests)
+
+=== [1.1.1] - 2026-02-28
+
+==== Added
+
+* *ROADMAP.adoc rewrite*: Phases 4-6 documenting PanLL substrate
+integration, ProtocolModule design, and Five-Pillar developer suite
+convergence
+* *Five-Pillar architecture*: Languages, Databases, Protocols,
+Containers, Quality — identified Quality/Observability as the missing
+fifth pillar
+* *Three-pane mapping*: Documented how protocol-squisher concepts map to
+PanLL’s Pane-L (Symbolic), Pane-N (Neural), Pane-W (World)
+
+==== Changed
+
+* Synchronized all 16 non-Cargo version/metadata files to v1.1.0
+(Justfile, README.adoc, STATE.scm, TOPOLOGY.md, HN-ANNOUNCEMENT.md,
+METRICS.md, ephapax-ir.ipkg, ephapax-ir-ffi.ipkg, lakefile.lean,
+mix.exs, seambot config.toml, AGENTIC.scm, ECOSYSTEM.scm, NEUROSYM.scm,
+PLAYBOOK.scm, SECURITY-REQUIREMENTS.scm)
+* Applied `+cargo fmt+` across all crates
+* Updated critical-next-actions to target Phase 4 work
+
+==== Security
+
+* panic-attack suite (assail + assault + abduct + adjudicate): *PASS*
+verdict
+* cargo audit: 0 vulnerabilities / 275 dependencies
+* All 921 tests passing, cargo clippy clean
+
+=== [1.1.0] - 2026-02-28
+
+==== Added
+
+* *GraphQL analyzer* (`+protocol-squisher-graphql-analyzer+`): SDL
+parser with type/enum/union/input/ interface/scalar support, transport
+compatibility bridge (+15 tests)
+* *TOML analyzer* (`+protocol-squisher-toml-analyzer+`): structural type
+inference from TOML documents, nested tables, array of tables, transport
+compatibility bridge (+13 tests)
+* *Security bridge hardening*: `+NegotiationResult+`,
+`+SecurityAuditEntry+` (JSONL), `+ProtocolCapabilities+` trait,
+`+validate_security_requirements()+`, `+downgrade_risk()+`,
+`+negotiate()+` (+10 tests)
+* *Enterprise hardening*: `+AuditQuery+`/`+AuditStats+`,
+`+PolicyViolation+`/`+PolicyReport+`,
+`+MigrationRisk+`/`+RollbackPlan+`, registry
+`+search()+`/`+list_versions()+`, marketplace
+`+validate_listing()+`/`+popularity_score()+` (+16 tests)
+* *Distributed hardening*: `+JobQueue+` (priority queue),
+`+ProgressTracker+` (atomic counters), `+RetryPolicy+` with backoff,
+`+run_batch_with_retry()+`, `+DistributedStats+` (+7 tests)
+* *Performance hardening*: SIMD
+`+find_byte()+`/`+sum_u32()+`/`+xor_bytes()+`, `+ChunkedProcessor+` with
+`+StreamStats+`, `+HardwareProfile+` detection, `+LazySchema+` deferred
+parsing (+12 tests)
+* *ECHIDNA bridge*: 30-backend cross-prover, CLI-integrated, offline
+fallback
+* *VeriSimDB integration*: analysis persistence, InMemory fallback,
+CLI-integrated
+* *Integration pipeline*: `+integration.rs+` facade wiring ECHIDNA +
+VeriSimDB into CLI commands
+* *Coq proofs*: `+ConcordeSafety.v+`, `+CarriesInvariant.v+`
+* *Isabelle proofs*: `+WheelbarrowNecessity.thy+`
+* *Z3/SMT proofs*: transport class exhaustiveness verification, Concorde
+constraint checking
+* *Agda proofs*: OptimizationSoundness, extended CarriesInvariant and
+WheelbarrowNecessity
+* *Benchmark baseline*: 73 criterion benchmarks across 4 suites
+* *RSR workflows*: mirror.yml (6-forge), instant-sync.yml,
+guix-nix-policy.yml, rsr-antipattern.yml, npm-bun-blocker.yml
+
+==== Fixed
+
+* Replaced 2 postulates in `+WheelbarrowNecessity.agda+` with
+constructive proofs
+* Filled `+{!!}+` hole in `+CarriesInvariant.agda+` with simultaneous
+with-matching
+* Synchronized all non-Cargo version files to 1.0.0
+* Fixed author email in Idris2 ipkg files
+* Fixed SPDX header in root Justfile
+
+==== Changed
+
+* Test count: 742 → 921 (179 new tests)
+* Protocol analyzers: 11 → 13 (added GraphQL and TOML)
+* Formal proofs: Agda+Lean → Agda+Lean+Coq+Isabelle+Z3 (5 proof systems)
+* All Phase 3 modules hardened from scaffolds to functional
+implementations
+
+=== [1.0.0] - 2026-02-28
+
+==== Added
+
+* *11 protocol analyzers*: Rust, Python, JSON Schema, Protobuf, Bebop,
+FlatBuffers, MessagePack, Avro, Cap’n Proto, Thrift, ReScript
+* *Canonical IR* (ephapax): universal intermediate representation with
+Idris2 dependent type foundations
+* *Compatibility engine*: automatic transport class scoring (Concorde,
+Business, Economy, Wheelbarrow) for any format pair
+* *JSON fallback*: guaranteed Wheelbarrow-class transport for all format
+pairs
+* *PyO3 code generation*: automatic Rust-Python binding generation
+* *Optimizer*: Concorde-class adapter suggestions with zero-copy
+detection
+* *CLI tool* (`+protocol-squisher+`): subcommands for
+`+analyze-schema+`, `+check+`, `+optimize+`, `+generate+`,
+`+optimize-ai+`, `+diversity-report+`, and `+synthesize+`
+* *Property-based testing*: 829 tests across all crates
+* *Formal verification*: Concorde Safety and Container Propagation
+theorems fully proven in Agda; Concorde Safety cross-validated in Lean
+* *Diversity spectrum meta-analysis*: squishability rankings across all
+11 protocols
+* *Benchmark suite*: transport class overhead validation with Criterion
+* *miniKanren adapter synthesis*: constraint-based search for optimal
+adapters
+* *Enterprise scaffolding*: schema registry, version migration, audit
+logging, governance
+* *Security bridge*: TLS/Noise/WireGuard protocol family translation
+with property verification
+* *Distributed squishing*: rayon-based parallel scheduler with batch
+config and partitioning
+* *Performance primitives*: zero-copy paths, lazy deserialization,
+streaming, byte comparison
+
+==== Known Limitations
+
+* Coq, Isabelle, and Z3 proofs are initial (not yet verified with actual
+provers)
+* JSON serialization axioms in CarriesInvariant.agda are postulated
+(justified runtime assumption)
+* Security bridge, enterprise features, and distributed squishing are
+functional scaffolds but not production-hardened
+* IDE plugins, web playground, and adapter marketplace do not exist yet
+
+=== [0.1.0] - 2025-12-01
+
+==== Added
+
+* Initial implementation with Rust and Python analyzers
+* Core IR design and type system
+* Compatibility engine with transport class scoring
+* JSON fallback path
+* Basic CLI tool
+* Property-based tests
diff --git a/provenance/CHANGELOG.md b/provenance/CHANGELOG.md
deleted file mode 100644
index b686857..0000000
--- a/provenance/CHANGELOG.md
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-# Changelog
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
-and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-## [Unreleased]
-
-### Planned
-
-- Phase 4c: Constraint evaluation API (`Constraint::evaluate()` for live data)
-- Phase 4d: Bidirectional analysis as first-class top-level API
-- Phase 4e: `protocol-squisher-server` crate (axum HTTP/JSON API)
-
-## [1.2.0] - 2026-02-28
-
-### Added
-
-- **`SchemaAnalyzer` trait** defined in `protocol-squisher-ir` — universal interface for all
- analyzers with `analyzer_name()`, `supported_extensions()`, `analyze_file()`, `analyze_str()`
-- **Trait implemented across all 13 analyzers** (Rust, Python, JSON Schema, Protobuf, Avro,
- Thrift, Bebop, Cap'n Proto, FlatBuffers, MessagePack, ReScript, GraphQL, TOML)
-- **Public library API** — all 13 analyzers, compat, meta-analysis, optimizer, json-fallback,
- and pyo3-codegen re-exported from root `protocol_squisher::*` crate
-- **`all_analyzers()` registry** — returns all 13 analyzers as type-erased trait objects for
- dynamic dispatch (PanLL integration, CLI auto-detection)
-- **`protocol_squisher::prelude`** — convenience re-exports (`IrSchema`, `SchemaAnalyzer`)
-- **`AnalyzerError` wrapper** — type-erased error for the `all_analyzers()` registry
-- 13 new `test_schema_analyzer_trait` tests + 3 library API tests (937 total)
-
-### Changed
-
-- Root `Cargo.toml` now depends on all 13 analyzer crates (was only 6)
-- `JsonSchemaAnalyzer` converter uses `AtomicUsize` instead of `Cell` for `Sync` safety
-- Test count: 921 → 937 (16 new tests)
-
-## [1.1.1] - 2026-02-28
-
-### Added
-
-- **ROADMAP.adoc rewrite**: Phases 4-6 documenting PanLL substrate integration,
- ProtocolModule design, and Five-Pillar developer suite convergence
-- **Five-Pillar architecture**: Languages, Databases, Protocols, Containers, Quality —
- identified Quality/Observability as the missing fifth pillar
-- **Three-pane mapping**: Documented how protocol-squisher concepts map to PanLL's
- Pane-L (Symbolic), Pane-N (Neural), Pane-W (World)
-
-### Changed
-
-- Synchronized all 16 non-Cargo version/metadata files to v1.1.0
- (Justfile, README.adoc, STATE.scm, TOPOLOGY.md, HN-ANNOUNCEMENT.md, METRICS.md,
- ephapax-ir.ipkg, ephapax-ir-ffi.ipkg, lakefile.lean, mix.exs, seambot config.toml,
- AGENTIC.scm, ECOSYSTEM.scm, NEUROSYM.scm, PLAYBOOK.scm, SECURITY-REQUIREMENTS.scm)
-- Applied `cargo fmt` across all crates
-- Updated critical-next-actions to target Phase 4 work
-
-### Security
-
-- panic-attack suite (assail + assault + abduct + adjudicate): **PASS** verdict
-- cargo audit: 0 vulnerabilities / 275 dependencies
-- All 921 tests passing, cargo clippy clean
-
-## [1.1.0] - 2026-02-28
-
-### Added
-
-- **GraphQL analyzer** (`protocol-squisher-graphql-analyzer`): SDL parser with type/enum/union/input/
- interface/scalar support, transport compatibility bridge (+15 tests)
-- **TOML analyzer** (`protocol-squisher-toml-analyzer`): structural type inference from TOML documents,
- nested tables, array of tables, transport compatibility bridge (+13 tests)
-- **Security bridge hardening**: `NegotiationResult`, `SecurityAuditEntry` (JSONL), `ProtocolCapabilities`
- trait, `validate_security_requirements()`, `downgrade_risk()`, `negotiate()` (+10 tests)
-- **Enterprise hardening**: `AuditQuery`/`AuditStats`, `PolicyViolation`/`PolicyReport`,
- `MigrationRisk`/`RollbackPlan`, registry `search()`/`list_versions()`, marketplace
- `validate_listing()`/`popularity_score()` (+16 tests)
-- **Distributed hardening**: `JobQueue` (priority queue), `ProgressTracker` (atomic counters),
- `RetryPolicy` with backoff, `run_batch_with_retry()`, `DistributedStats` (+7 tests)
-- **Performance hardening**: SIMD `find_byte()`/`sum_u32()`/`xor_bytes()`, `ChunkedProcessor`
- with `StreamStats`, `HardwareProfile` detection, `LazySchema` deferred parsing (+12 tests)
-- **ECHIDNA bridge**: 30-backend cross-prover, CLI-integrated, offline fallback
-- **VeriSimDB integration**: analysis persistence, InMemory fallback, CLI-integrated
-- **Integration pipeline**: `integration.rs` facade wiring ECHIDNA + VeriSimDB into CLI commands
-- **Coq proofs**: `ConcordeSafety.v`, `CarriesInvariant.v`
-- **Isabelle proofs**: `WheelbarrowNecessity.thy`
-- **Z3/SMT proofs**: transport class exhaustiveness verification, Concorde constraint checking
-- **Agda proofs**: OptimizationSoundness, extended CarriesInvariant and WheelbarrowNecessity
-- **Benchmark baseline**: 73 criterion benchmarks across 4 suites
-- **RSR workflows**: mirror.yml (6-forge), instant-sync.yml, guix-nix-policy.yml,
- rsr-antipattern.yml, npm-bun-blocker.yml
-
-### Fixed
-
-- Replaced 2 postulates in `WheelbarrowNecessity.agda` with constructive proofs
-- Filled `{!!}` hole in `CarriesInvariant.agda` with simultaneous with-matching
-- Synchronized all non-Cargo version files to 1.0.0
-- Fixed author email in Idris2 ipkg files
-- Fixed SPDX header in root Justfile
-
-### Changed
-
-- Test count: 742 → 921 (179 new tests)
-- Protocol analyzers: 11 → 13 (added GraphQL and TOML)
-- Formal proofs: Agda+Lean → Agda+Lean+Coq+Isabelle+Z3 (5 proof systems)
-- All Phase 3 modules hardened from scaffolds to functional implementations
-
-## [1.0.0] - 2026-02-28
-
-### Added
-
-- **11 protocol analyzers**: Rust, Python, JSON Schema, Protobuf, Bebop, FlatBuffers,
- MessagePack, Avro, Cap'n Proto, Thrift, ReScript
-- **Canonical IR** (ephapax): universal intermediate representation with Idris2 dependent
- type foundations
-- **Compatibility engine**: automatic transport class scoring (Concorde, Business, Economy,
- Wheelbarrow) for any format pair
-- **JSON fallback**: guaranteed Wheelbarrow-class transport for all format pairs
-- **PyO3 code generation**: automatic Rust-Python binding generation
-- **Optimizer**: Concorde-class adapter suggestions with zero-copy detection
-- **CLI tool** (`protocol-squisher`): subcommands for `analyze-schema`, `check`, `optimize`,
- `generate`, `optimize-ai`, `diversity-report`, and `synthesize`
-- **Property-based testing**: 829 tests across all crates
-- **Formal verification**: Concorde Safety and Container Propagation theorems fully proven
- in Agda; Concorde Safety cross-validated in Lean
-- **Diversity spectrum meta-analysis**: squishability rankings across all 11 protocols
-- **Benchmark suite**: transport class overhead validation with Criterion
-- **miniKanren adapter synthesis**: constraint-based search for optimal adapters
-- **Enterprise scaffolding**: schema registry, version migration, audit logging, governance
-- **Security bridge**: TLS/Noise/WireGuard protocol family translation with property verification
-- **Distributed squishing**: rayon-based parallel scheduler with batch config and partitioning
-- **Performance primitives**: zero-copy paths, lazy deserialization, streaming, byte comparison
-
-### Known Limitations
-
-- Coq, Isabelle, and Z3 proofs are initial (not yet verified with actual provers)
-- JSON serialization axioms in CarriesInvariant.agda are postulated (justified runtime assumption)
-- Security bridge, enterprise features, and distributed squishing are functional scaffolds
- but not production-hardened
-- IDE plugins, web playground, and adapter marketplace do not exist yet
-
-## [0.1.0] - 2025-12-01
-
-### Added
-
-- Initial implementation with Rust and Python analyzers
-- Core IR design and type system
-- Compatibility engine with transport class scoring
-- JSON fallback path
-- Basic CLI tool
-- Property-based tests
diff --git a/provenance/CODE_OF_CONDUCT.adoc b/provenance/CODE_OF_CONDUCT.adoc
new file mode 100644
index 0000000..a49ab65
--- /dev/null
+++ b/provenance/CODE_OF_CONDUCT.adoc
@@ -0,0 +1,339 @@
+== Code of Conduct
+
+=== Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in
+Protocol Squisher a harassment-free experience for everyone, regardless
+of age, body size, visible or invisible disability, ethnicity, sex
+characteristics, gender identity and expression, level of experience,
+education, socio-economic status, nationality, personal appearance,
+race, caste, colour, religion, or sexual identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open,
+welcoming, diverse, inclusive, and healthy community.
+
+We recognise that a thriving open source community requires
+*psychological safety* — an environment where people can contribute, ask
+questions, make mistakes, and learn without fear of ridicule or
+retaliation.
+
+'''''
+
+=== Our Standards
+
+==== Expected Behaviour
+
+The following behaviours contribute to a positive environment:
+
+*Communication* - Using welcoming and inclusive language - Being
+respectful of differing viewpoints and experiences - Giving and
+gracefully accepting constructive feedback - Assuming good intent while
+addressing impact - Communicating clearly and patiently, especially with
+newcomers
+
+*Collaboration* - Focusing on what is best for the community - Showing
+empathy and kindness toward other community members - Being
+collaborative rather than competitive - Mentoring and supporting less
+experienced contributors - Celebrating others’ contributions and
+successes
+
+*Professionalism* - Accepting responsibility and apologising to those
+affected by our mistakes - Learning from the experience and avoiding
+repetition - Respecting others’ time and attention - Staying on topic in
+project spaces - Following project guidelines and conventions
+
+*Accessibility* - Using plain language and avoiding unnecessary jargon -
+Providing alt text for images and transcripts for audio/video - Being
+patient with those using assistive technologies - Accommodating
+different communication styles and needs - Recognising that not everyone
+communicates the same way
+
+==== Unacceptable Behaviour
+
+The following behaviours are considered harassment and are unacceptable:
+
+*Harassment* - The use of sexualised language or imagery, and sexual
+attention or advances of any kind - Trolling, insulting or derogatory
+comments, and personal or political attacks - Public or private
+harassment - Deliberate intimidation, stalking, or following (online or
+in-person) - Unwelcome physical contact or simulated physical contact
+(e.g., emoji) - Sustained disruption of talks, events, or online
+discussions
+
+*Discrimination* - Discriminatory jokes and language - Posting or
+threatening to post others’ personally identifying information
+("`doxing`") - Advocating for, or encouraging, any of the above
+behaviour - Microaggressions — subtle, often unintentional,
+discriminatory comments or actions
+
+*Professional Misconduct* - Publishing others’ private information
+without explicit permission - Misrepresenting affiliation or
+contributions - Plagiarism or claiming credit for others’ work -
+Retaliating against anyone who reports a Code of Conduct violation -
+Other conduct which could reasonably be considered inappropriate in a
+professional setting
+
+==== Grey Areas
+
+Some situations require judgement. When uncertain:
+
+* *Intent vs Impact*: Good intentions do not excuse harmful impact.
+Focus on making things right.
+* *Power Dynamics*: Those with more power (maintainers, employers,
+experienced contributors) must be especially mindful of their impact.
+* *Cultural Differences*: What’s acceptable varies by culture. When in
+doubt, err on the side of caution and ask.
+* *Humour*: Jokes at others’ expense are rarely funny to everyone. Punch
+up, not down.
+
+'''''
+
+=== Scope
+
+This Code of Conduct applies within all community spaces, including:
+
+*Online Spaces* - Repository discussions, issues, and pull/merge
+requests - Project chat channels (Matrix, Discord, Slack, IRC) - Mailing
+lists and forums - Social media when representing the project - Video
+calls and virtual meetings
+
+*In-Person Spaces* - Conferences, meetups, and events - Workshops and
+training sessions - Any gathering where you represent the project
+
+*Representation* This Code of Conduct also applies when an individual is
+officially representing the community in public spaces. Examples
+include:
+
+* Using an official project email address
+* Posting via an official social media account
+* Acting as an appointed representative at an event
+* Speaking on behalf of the project
+
+'''''
+
+=== Enforcement
+
+==== Reporting
+
+If you experience or witness unacceptable behaviour, or have any other
+concerns, please report it as soon as possible.
+
+*How to Report*
+
+[width="99%",cols="30%,33%,37%",options="header",]
+|===
+|Method |Details |Best For
+|*Email* |\{\{CONDUCT_EMAIL}} |Detailed reports, sensitive matters
+
+|*Private Message* |Contact any maintainer directly |Quick questions,
+minor issues
+
+|*Anonymous Form* |[Link to form if available] |When you need anonymity
+|===
+
+*What to Include*
+
+* Your contact information (unless anonymous)
+* Names/usernames of those involved
+* Description of what happened
+* When and where it occurred
+* Any witnesses
+* Any supporting evidence (screenshots, links)
+* How you would like us to respond (if you have a preference)
+
+*What Happens Next*
+
+[arabic]
+. You will receive acknowledgment within *\{\{RESPONSE_TIME}}*
+. The \{\{CONDUCT_TEAM}} will review the report
+. We may ask for additional information
+. We will determine appropriate action
+. We will inform you of the outcome (respecting others’ privacy)
+
+==== Confidentiality
+
+All reports will be handled with discretion:
+
+* Reporter identity is protected by default
+* Details are shared only with those who need to know
+* We will ask before naming you in any communication
+* Anonymous reports are accepted and investigated
+
+==== Conflicts of Interest
+
+If a \{\{CONDUCT_TEAM}} member is involved in an incident:
+
+* They will recuse themselves from the process
+* Another maintainer or external party will handle the report
+* We will disclose any potential conflicts
+
+'''''
+
+=== Enforcement Guidelines
+
+The \{\{CONDUCT_TEAM}} will follow these guidelines in determining
+consequences:
+
+==== 1. Correction
+
+*Community Impact*: Use of inappropriate language or other behaviour
+deemed unprofessional or unwelcome.
+
+*Consequence*: A private, written warning providing clarity around the
+nature of the violation and an explanation of why the behaviour was
+inappropriate. A public apology may be requested.
+
+*Duration*: Immediate
+
+==== 2. Warning
+
+*Community Impact*: A violation through a single incident or series of
+actions.
+
+*Consequence*: A warning with consequences for continued behaviour. No
+interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, for a specified period. This
+includes avoiding interactions in community spaces as well as external
+channels like social media. Violating these terms may lead to a
+temporary or permanent ban.
+
+*Duration*: 1-4 weeks
+
+==== 3. Temporary Ban
+
+*Community Impact*: A serious violation of community standards,
+including sustained inappropriate behaviour.
+
+*Consequence*: A temporary ban from any sort of interaction or public
+communication with the community for a specified period. No public or
+private interaction with the people involved, including unsolicited
+interaction with those enforcing the Code of Conduct, is allowed during
+this period. Violating these terms may lead to a permanent ban.
+
+*Duration*: 1-6 months
+
+==== 4. Permanent Ban
+
+*Community Impact*: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behaviour, harassment of an
+individual, or aggression toward or disparagement of classes of
+individuals.
+
+*Consequence*: A permanent ban from any sort of public interaction
+within the community.
+
+*Duration*: Permanent (with appeal rights after 12 months)
+
+==== Enforcement Across Perimeters
+
+For contributors with elevated access (Perimeter 2 or 1):
+
+[cols=",",options="header",]
+|===
+|Level |Additional Consequence
+|Correction |Noted in contributor record
+|Warning |Access privileges may be temporarily reduced
+|Temporary Ban |Access reduced to Perimeter 3 for ban duration
+|Permanent Ban |All access revoked
+|===
+
+'''''
+
+=== Appeals
+
+If you believe an enforcement decision was made in error:
+
+[arabic]
+. *Wait 7 days* after the decision (cooling-off period)
+. *Email* \{\{CONDUCT_EMAIL}} with subject line "`Appeal: [Original
+Report ID]`"
+. *Explain* why you believe the decision should be reconsidered
+. *Provide* any new information not previously available
+
+*Appeals Process*
+
+* Appeals are reviewed by a different \{\{CONDUCT_TEAM}} member than the
+original
+* You will receive a response within 14 days
+* The appeals decision is final
+* You may only appeal once per incident
+
+*Grounds for Appeal*
+
+* Procedural errors in the original investigation
+* New evidence not previously available
+* Disproportionate response to the violation
+* Misunderstanding of facts
+
+'''''
+
+=== Supporting Those Who Report
+
+We are committed to supporting those who report violations:
+
+*We Will* - Believe and take all reports seriously - Respect your
+privacy and confidentiality preferences - Keep you informed of progress
+(if you wish) - Take steps to protect you from retaliation - Provide
+resources if you need support
+
+*We Will Not* - Require you to confront the person directly - Dismiss
+reports without investigation - Reveal your identity without consent -
+Tolerate retaliation against reporters - Rush you to make decisions
+
+'''''
+
+=== Prevention
+
+Beyond enforcement, we actively work to prevent issues:
+
+*Onboarding* - All contributors are expected to read this Code of
+Conduct - Perimeter 2 applicants must confirm they’ve read and
+understood it - Maintainers receive additional training on enforcement
+
+*Culture* - We model the behaviour we expect - We intervene early when
+we see potential issues - We thank people for positive contributions -
+We create opportunities for diverse voices
+
+*Review* - This Code of Conduct is reviewed annually - Community
+feedback is welcomed - Changes are communicated clearly
+
+'''''
+
+=== Acknowledgments
+
+This Code of Conduct is adapted from:
+
+* https://www.contributor-covenant.org/[Contributor Covenant], version
+2.1
+* https://www.djangoproject.com/conduct/[Django Code of Conduct]
+* https://www.rust-lang.org/policies/code-of-conduct[Rust Code of
+Conduct]
+* https://www.python.org/psf/conduct/[Python Community Code of Conduct]
+
+We thank these communities for their leadership in creating welcoming
+spaces.
+
+'''''
+
+=== Questions?
+
+If you have questions about this Code of Conduct:
+
+* Open a
+https://github.com/hyperpolymath/protocol-squisher/discussions[Discussion]
+(for general questions)
+* Email \{\{CONDUCT_EMAIL}} (for private questions)
+* Contact any maintainer directly
+
+'''''
+
+=== Summary
+
+*Be kind. Be respectful. Be collaborative.*
+
+We’re all here because we care about this project. Let’s make it a place
+where everyone can do their best work.
+
+'''''
+
+Last updated: 2026 · Based on Contributor Covenant 2.1
diff --git a/provenance/CODE_OF_CONDUCT.md b/provenance/CODE_OF_CONDUCT.md
deleted file mode 100644
index d850d30..0000000
--- a/provenance/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,331 +0,0 @@
-
-# Code of Conduct
-
-
-
-## Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in Protocol Squisher a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
-
-We recognise that a thriving open source community requires **psychological safety** — an environment where people can contribute, ask questions, make mistakes, and learn without fear of ridicule or retaliation.
-
----
-
-## Our Standards
-
-### Expected Behaviour
-
-The following behaviours contribute to a positive environment:
-
-**Communication**
-- Using welcoming and inclusive language
-- Being respectful of differing viewpoints and experiences
-- Giving and gracefully accepting constructive feedback
-- Assuming good intent while addressing impact
-- Communicating clearly and patiently, especially with newcomers
-
-**Collaboration**
-- Focusing on what is best for the community
-- Showing empathy and kindness toward other community members
-- Being collaborative rather than competitive
-- Mentoring and supporting less experienced contributors
-- Celebrating others' contributions and successes
-
-**Professionalism**
-- Accepting responsibility and apologising to those affected by our mistakes
-- Learning from the experience and avoiding repetition
-- Respecting others' time and attention
-- Staying on topic in project spaces
-- Following project guidelines and conventions
-
-**Accessibility**
-- Using plain language and avoiding unnecessary jargon
-- Providing alt text for images and transcripts for audio/video
-- Being patient with those using assistive technologies
-- Accommodating different communication styles and needs
-- Recognising that not everyone communicates the same way
-
-### Unacceptable Behaviour
-
-The following behaviours are considered harassment and are unacceptable:
-
-**Harassment**
-- The use of sexualised language or imagery, and sexual attention or advances of any kind
-- Trolling, insulting or derogatory comments, and personal or political attacks
-- Public or private harassment
-- Deliberate intimidation, stalking, or following (online or in-person)
-- Unwelcome physical contact or simulated physical contact (e.g., emoji)
-- Sustained disruption of talks, events, or online discussions
-
-**Discrimination**
-- Discriminatory jokes and language
-- Posting or threatening to post others' personally identifying information ("doxing")
-- Advocating for, or encouraging, any of the above behaviour
-- Microaggressions — subtle, often unintentional, discriminatory comments or actions
-
-**Professional Misconduct**
-- Publishing others' private information without explicit permission
-- Misrepresenting affiliation or contributions
-- Plagiarism or claiming credit for others' work
-- Retaliating against anyone who reports a Code of Conduct violation
-- Other conduct which could reasonably be considered inappropriate in a professional setting
-
-### Grey Areas
-
-Some situations require judgement. When uncertain:
-
-- **Intent vs Impact**: Good intentions do not excuse harmful impact. Focus on making things right.
-- **Power Dynamics**: Those with more power (maintainers, employers, experienced contributors) must be especially mindful of their impact.
-- **Cultural Differences**: What's acceptable varies by culture. When in doubt, err on the side of caution and ask.
-- **Humour**: Jokes at others' expense are rarely funny to everyone. Punch up, not down.
-
----
-
-## Scope
-
-This Code of Conduct applies within all community spaces, including:
-
-**Online Spaces**
-- Repository discussions, issues, and pull/merge requests
-- Project chat channels (Matrix, Discord, Slack, IRC)
-- Mailing lists and forums
-- Social media when representing the project
-- Video calls and virtual meetings
-
-**In-Person Spaces**
-- Conferences, meetups, and events
-- Workshops and training sessions
-- Any gathering where you represent the project
-
-**Representation**
-This Code of Conduct also applies when an individual is officially representing the community in public spaces. Examples include:
-
-- Using an official project email address
-- Posting via an official social media account
-- Acting as an appointed representative at an event
-- Speaking on behalf of the project
-
----
-
-## Enforcement
-
-### Reporting
-
-If you experience or witness unacceptable behaviour, or have any other concerns, please report it as soon as possible.
-
-**How to Report**
-
-| Method | Details | Best For |
-|--------|---------|----------|
-| **Email** | {{CONDUCT_EMAIL}} | Detailed reports, sensitive matters |
-| **Private Message** | Contact any maintainer directly | Quick questions, minor issues |
-| **Anonymous Form** | [Link to form if available] | When you need anonymity |
-
-**What to Include**
-
-- Your contact information (unless anonymous)
-- Names/usernames of those involved
-- Description of what happened
-- When and where it occurred
-- Any witnesses
-- Any supporting evidence (screenshots, links)
-- How you would like us to respond (if you have a preference)
-
-**What Happens Next**
-
-1. You will receive acknowledgment within **{{RESPONSE_TIME}}**
-2. The {{CONDUCT_TEAM}} will review the report
-3. We may ask for additional information
-4. We will determine appropriate action
-5. We will inform you of the outcome (respecting others' privacy)
-
-### Confidentiality
-
-All reports will be handled with discretion:
-
-- Reporter identity is protected by default
-- Details are shared only with those who need to know
-- We will ask before naming you in any communication
-- Anonymous reports are accepted and investigated
-
-### Conflicts of Interest
-
-If a {{CONDUCT_TEAM}} member is involved in an incident:
-
-- They will recuse themselves from the process
-- Another maintainer or external party will handle the report
-- We will disclose any potential conflicts
-
----
-
-## Enforcement Guidelines
-
-The {{CONDUCT_TEAM}} will follow these guidelines in determining consequences:
-
-### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome.
-
-**Consequence**: A private, written warning providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested.
-
-**Duration**: Immediate
-
-### 2. Warning
-
-**Community Impact**: A violation through a single incident or series of actions.
-
-**Consequence**: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
-
-**Duration**: 1-4 weeks
-
-### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including sustained inappropriate behaviour.
-
-**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
-
-**Duration**: 1-6 months
-
-### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within the community.
-
-**Duration**: Permanent (with appeal rights after 12 months)
-
-### Enforcement Across Perimeters
-
-For contributors with elevated access (Perimeter 2 or 1):
-
-| Level | Additional Consequence |
-|-------|----------------------|
-| Correction | Noted in contributor record |
-| Warning | Access privileges may be temporarily reduced |
-| Temporary Ban | Access reduced to Perimeter 3 for ban duration |
-| Permanent Ban | All access revoked |
-
----
-
-## Appeals
-
-If you believe an enforcement decision was made in error:
-
-1. **Wait 7 days** after the decision (cooling-off period)
-2. **Email** {{CONDUCT_EMAIL}} with subject line "Appeal: [Original Report ID]"
-3. **Explain** why you believe the decision should be reconsidered
-4. **Provide** any new information not previously available
-
-**Appeals Process**
-
-- Appeals are reviewed by a different {{CONDUCT_TEAM}} member than the original
-- You will receive a response within 14 days
-- The appeals decision is final
-- You may only appeal once per incident
-
-**Grounds for Appeal**
-
-- Procedural errors in the original investigation
-- New evidence not previously available
-- Disproportionate response to the violation
-- Misunderstanding of facts
-
----
-
-## Supporting Those Who Report
-
-We are committed to supporting those who report violations:
-
-**We Will**
-- Believe and take all reports seriously
-- Respect your privacy and confidentiality preferences
-- Keep you informed of progress (if you wish)
-- Take steps to protect you from retaliation
-- Provide resources if you need support
-
-**We Will Not**
-- Require you to confront the person directly
-- Dismiss reports without investigation
-- Reveal your identity without consent
-- Tolerate retaliation against reporters
-- Rush you to make decisions
-
----
-
-## Prevention
-
-Beyond enforcement, we actively work to prevent issues:
-
-**Onboarding**
-- All contributors are expected to read this Code of Conduct
-- Perimeter 2 applicants must confirm they've read and understood it
-- Maintainers receive additional training on enforcement
-
-**Culture**
-- We model the behaviour we expect
-- We intervene early when we see potential issues
-- We thank people for positive contributions
-- We create opportunities for diverse voices
-
-**Review**
-- This Code of Conduct is reviewed annually
-- Community feedback is welcomed
-- Changes are communicated clearly
-
----
-
-## Acknowledgments
-
-This Code of Conduct is adapted from:
-
-- [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1
-- [Django Code of Conduct](https://www.djangoproject.com/conduct/)
-- [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct)
-- [Python Community Code of Conduct](https://www.python.org/psf/conduct/)
-
-We thank these communities for their leadership in creating welcoming spaces.
-
----
-
-## Questions?
-
-If you have questions about this Code of Conduct:
-
-- Open a [Discussion](https://github.com/hyperpolymath/protocol-squisher/discussions) (for general questions)
-- Email {{CONDUCT_EMAIL}} (for private questions)
-- Contact any maintainer directly
-
----
-
-## Summary
-
-**Be kind. Be respectful. Be collaborative.**
-
-We're all here because we care about this project. Let's make it a place where everyone can do their best work.
-
----
-
-Last updated: 2026 · Based on Contributor Covenant 2.1
diff --git a/provenance/CONTRIBUTING.adoc b/provenance/CONTRIBUTING.adoc
new file mode 100644
index 0000000..79778e1
--- /dev/null
+++ b/provenance/CONTRIBUTING.adoc
@@ -0,0 +1,109 @@
+== Clone the repository
+
+git clone https://github.com/hyperpolymath/protocol-squisher.git cd
+protocol-squisher
+
+== Using Nix (recommended for reproducibility)
+
+nix develop
+
+== Or using toolbox/distrobox
+
+toolbox create protocol-squisher-dev toolbox enter protocol-squisher-dev
+# Install dependencies manually
+
+== Verify setup
+
+just check # or: cargo check / mix compile / etc. just test # Run test
+suite
+
+....
+
+### Repository Structure
+....
+
+protocol-squisher/ ├── src/ # Source code (Perimeter 1-2) ├── lib/ #
+Library code (Perimeter 1-2) ├── extensions/ # Extensions (Perimeter 2)
+├── plugins/ # Plugins (Perimeter 2) ├── tools/ # Tooling (Perimeter 2)
+├── docs/ # Documentation (Perimeter 3) │ ├── architecture/ # ADRs,
+specs (Perimeter 2) │ └── proposals/ # RFCs (Perimeter 3) ├── examples/
+# Examples (Perimeter 3) ├── spec/ # Spec tests (Perimeter 3) ├── tests/
+# Test suite (Perimeter 2-3) ├── .well-known/ # Protocol files
+(Perimeter 1-3) ├── .github/ # GitHub config (Perimeter 1) │ ├──
+ISSUE_TEMPLATE/ │ └── workflows/ ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md
+├── CONTRIBUTING.md # This file ├── GOVERNANCE.md ├── LICENSE ├──
+MAINTAINERS.md ├── README.adoc ├── SECURITY.md ├── flake.nix # Nix flake
+(Perimeter 1) └── Justfile # Task runner (Perimeter 1)
+
+....
+
+---
+
+## How to Contribute
+
+### Reporting Bugs
+
+**Before reporting**:
+1. Search existing issues
+2. Check if it's already fixed in `main`
+3. Determine which perimeter the bug affects
+
+**When reporting**:
+
+Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include:
+
+- Clear, descriptive title
+- Environment details (OS, versions, toolchain)
+- Steps to reproduce
+- Expected vs actual behaviour
+- Logs, screenshots, or minimal reproduction
+
+### Suggesting Features
+
+**Before suggesting**:
+1. Check the [roadmap](ROADMAP.md) if available
+2. Search existing issues and discussions
+3. Consider which perimeter the feature belongs to
+
+**When suggesting**:
+
+Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include:
+
+- Problem statement (what pain point does this solve?)
+- Proposed solution
+- Alternatives considered
+- Which perimeter this affects
+
+### Your First Contribution
+
+Look for issues labelled:
+
+- [`good first issue`](https://github.com/hyperpolymath/protocol-squisher/labels/good%20first%20issue) — Simple Perimeter 3 tasks
+- [`help wanted`](https://github.com/hyperpolymath/protocol-squisher/labels/help%20wanted) — Community help needed
+- [`documentation`](https://github.com/hyperpolymath/protocol-squisher/labels/documentation) — Docs improvements
+- [`perimeter-3`](https://github.com/hyperpolymath/protocol-squisher/labels/perimeter-3) — Community sandbox scope
+
+---
+
+## Development Workflow
+
+### Branch Naming
+....
+
+docs/short-description # Documentation (P3) test/what-added # Test
+additions (P3) feat/short-description # New features (P2)
+fix/issue-number-description # Bug fixes (P2) refactor/what-changed #
+Code improvements (P2) security/what-fixed # Security fixes (P1-2)
+
+....
+
+### Commit Messages
+
+We follow [Conventional Commits](https://www.conventionalcommits.org/):
+....
+
+():
+
+{empty}[optional body]
+
+{empty}[optional footer]
diff --git a/provenance/CONTRIBUTING.md b/provenance/CONTRIBUTING.md
deleted file mode 100644
index a0d4bf6..0000000
--- a/provenance/CONTRIBUTING.md
+++ /dev/null
@@ -1,120 +0,0 @@
-
-# Clone the repository
-git clone https://github.com/hyperpolymath/protocol-squisher.git
-cd protocol-squisher
-
-# Using Nix (recommended for reproducibility)
-nix develop
-
-# Or using toolbox/distrobox
-toolbox create protocol-squisher-dev
-toolbox enter protocol-squisher-dev
-# Install dependencies manually
-
-# Verify setup
-just check # or: cargo check / mix compile / etc.
-just test # Run test suite
-```
-
-### Repository Structure
-```
-protocol-squisher/
-├── src/ # Source code (Perimeter 1-2)
-├── lib/ # Library code (Perimeter 1-2)
-├── extensions/ # Extensions (Perimeter 2)
-├── plugins/ # Plugins (Perimeter 2)
-├── tools/ # Tooling (Perimeter 2)
-├── docs/ # Documentation (Perimeter 3)
-│ ├── architecture/ # ADRs, specs (Perimeter 2)
-│ └── proposals/ # RFCs (Perimeter 3)
-├── examples/ # Examples (Perimeter 3)
-├── spec/ # Spec tests (Perimeter 3)
-├── tests/ # Test suite (Perimeter 2-3)
-├── .well-known/ # Protocol files (Perimeter 1-3)
-├── .github/ # GitHub config (Perimeter 1)
-│ ├── ISSUE_TEMPLATE/
-│ └── workflows/
-├── CHANGELOG.md
-├── CODE_OF_CONDUCT.md
-├── CONTRIBUTING.md # This file
-├── GOVERNANCE.md
-├── LICENSE
-├── MAINTAINERS.md
-├── README.adoc
-├── SECURITY.md
-├── flake.nix # Nix flake (Perimeter 1)
-└── Justfile # Task runner (Perimeter 1)
-```
-
----
-
-## How to Contribute
-
-### Reporting Bugs
-
-**Before reporting**:
-1. Search existing issues
-2. Check if it's already fixed in `main`
-3. Determine which perimeter the bug affects
-
-**When reporting**:
-
-Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include:
-
-- Clear, descriptive title
-- Environment details (OS, versions, toolchain)
-- Steps to reproduce
-- Expected vs actual behaviour
-- Logs, screenshots, or minimal reproduction
-
-### Suggesting Features
-
-**Before suggesting**:
-1. Check the [roadmap](ROADMAP.md) if available
-2. Search existing issues and discussions
-3. Consider which perimeter the feature belongs to
-
-**When suggesting**:
-
-Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include:
-
-- Problem statement (what pain point does this solve?)
-- Proposed solution
-- Alternatives considered
-- Which perimeter this affects
-
-### Your First Contribution
-
-Look for issues labelled:
-
-- [`good first issue`](https://github.com/hyperpolymath/protocol-squisher/labels/good%20first%20issue) — Simple Perimeter 3 tasks
-- [`help wanted`](https://github.com/hyperpolymath/protocol-squisher/labels/help%20wanted) — Community help needed
-- [`documentation`](https://github.com/hyperpolymath/protocol-squisher/labels/documentation) — Docs improvements
-- [`perimeter-3`](https://github.com/hyperpolymath/protocol-squisher/labels/perimeter-3) — Community sandbox scope
-
----
-
-## Development Workflow
-
-### Branch Naming
-```
-docs/short-description # Documentation (P3)
-test/what-added # Test additions (P3)
-feat/short-description # New features (P2)
-fix/issue-number-description # Bug fixes (P2)
-refactor/what-changed # Code improvements (P2)
-security/what-fixed # Security fixes (P1-2)
-```
-
-### Commit Messages
-
-We follow [Conventional Commits](https://www.conventionalcommits.org/):
-```
-():
-
-[optional body]
-
-[optional footer]
diff --git a/provenance/DIVERSITY-ANALYSIS.adoc b/provenance/DIVERSITY-ANALYSIS.adoc
new file mode 100644
index 0000000..8885980
--- /dev/null
+++ b/provenance/DIVERSITY-ANALYSIS.adoc
@@ -0,0 +1,1230 @@
+== Protocol Squisher Diversity Spectrum Meta-Analysis
+
+*Generated:* 2026-02-04 *Analyzers:* 11 protocols (Rust, Python, JSON
+Schema, Protobuf, Bebop, FlatBuffers, MessagePack, Avro, Cap’n Proto,
+Thrift, ReScript)
+
+=== Executive Summary
+
+This report presents a comprehensive analysis of the design philosophy
+spectrum in protocol serialization formats and their impact on
+"`squishability`" - the ability to optimize data transfer through
+transport class selection. We analyze 11 distinct protocols ranging from
+ultra-optimized zero-copy formats to schema-less dynamic approaches.
+
+*Key Finding:* Schema evolution protocols (Avro, Thrift) create the MOST
+squishing opportunities due to backward compatibility bloat, while
+zero-copy protocols (FlatBuffers, Cap’n Proto) are already optimized and
+offer minimal squishing opportunities.
+
+'''''
+
+=== 1. Protocol Spectrum Classification
+
+==== A. Ultra-Optimized Zero-Copy (Already Optimal)
+
+*Protocols:* FlatBuffers, Cap’n Proto
+
+*Design Philosophy:* - Direct memory access without deserialization -
+Fixed memory layouts with pointer arithmetic - Trade schema flexibility
+for maximum performance - Designed to be "`unsquishable`" (already at
+theoretical optimum)
+
+*Characteristics:* - Zero heap allocations for primitives -
+Pointer-based navigation - Fixed struct layouts (Concorde class by
+default) - Tables/dynamic types fall back to Economy class
+
+*Squishability Prediction:* *LOW (0.1-0.3)* - Already optimized, little
+room for improvement
+
+'''''
+
+==== B. Modern Performant (Balanced)
+
+*Protocols:* Bebop, Protobuf
+
+*Design Philosophy:* - Schema-based with field numbers - Efficient
+binary encoding - Some schema evolution support - Balance between
+performance and flexibility
+
+*Characteristics:* - Field numbers enable backward compatibility -
+Optional fields create optimization opportunities - Variable-length
+encoding (protobuf) vs fixed-width (bebop) - Moderate zero-copy
+opportunities
+
+*Bebop Specifics:* - Modern clean syntax - Fixed-width encoding (faster,
+more predictable) - Structs vs messages (stack vs heap) - Optional
+fields with `+?+` syntax
+
+*Protobuf Specifics:* - Variable-length encoding (varint, zigzag) - All
+fields implicitly optional (proto3) - Field numbers 1-15 use 1 byte tag
+
+*Squishability Prediction:* *MEDIUM-HIGH (0.5-0.7)* - Many optimization
+opportunities from optional fields and type choices
+
+'''''
+
+==== C. Schema Evolution Focus (Most Squishable)
+
+*Protocols:* Avro, Thrift
+
+*Design Philosophy:* - Strong backward/forward compatibility guarantees
+- Reader/writer schema separation - Name-based field resolution (Avro)
+or optional field numbers (Thrift) - Designed for long-term schema
+evolution
+
+*Characteristics:* - Heavy use of union types for optionality - Default
+values for backward compatibility - Deprecated fields remain in schema -
+Schema bloat accumulates over time
+
+*Avro Specifics:* - Schema travels with data - Union types for null
+handling: `+["null", "type"]+` - No field numbers - matched by name -
+Map keys always strings
+
+*Thrift Specifics:* - Multiple encoding formats (Binary, Compact, JSON)
+- Optional/required/default field modifiers - Field numbers like
+Protobuf - Service definitions (RPC focus)
+
+*Squishability Prediction:* *HIGHEST (0.7-0.9)* - Backward compatibility
+creates significant optimization opportunities
+
+'''''
+
+==== D. Dynamic/Schema-less (Limited Squishing)
+
+*Protocols:* MessagePack, JSON Schema
+
+*Design Philosophy:* - Flexibility over performance - Runtime type
+detection - Self-describing data - No compile-time schema validation
+
+*Characteristics:* - Type tags in serialized data - No field ordering
+guarantees - String keys (high overhead) - Heap allocation for all
+values
+
+*MessagePack Specifics:* - Binary JSON alternative - More compact than
+JSON but still dynamic - Type tags for every value - Popular in dynamic
+language ecosystems
+
+*JSON Schema Specifics:* - Human-readable - Ubiquitous but inefficient -
+String-based everything - No type safety
+
+*Squishability Prediction:* *LOW-MEDIUM (0.3-0.5)* - Dynamic typing
+requires Wheelbarrow class for most transfers
+
+'''''
+
+==== E. Language-Native (Variable)
+
+*Protocols:* Rust (serde), Python (Pydantic), ReScript
+
+*Design Philosophy:* - Leverage language type systems - Compile-time
+safety - Native idioms and patterns - Zero external schema files
+
+*Characteristics:* - Type inference from language definitions -
+Attribute-based configuration - Language-specific optimizations -
+Cross-language compatibility varies
+
+*Rust (serde) Specifics:* - Zero-cost abstractions - Borrowed vs owned
+types (`+&str+` vs `+String+`, `+&[T]+` vs `+Vec+`) - Trait-based
+serialization - High squishability within Rust ecosystem
+
+*Python (Pydantic) Specifics:* - Runtime validation - Type hints for
+schema - Dynamic but validated - Lower performance than static
+alternatives
+
+*ReScript Specifics:* - Compiles to JavaScript - OCaml-style type system
+- Excellent type inference - JSON-based serialization
+
+*Squishability Prediction:* *VARIABLE (0.4-0.8)* - Depends on type
+system richness and zero-copy support
+
+'''''
+
+=== 2. Squishability Scores by Protocol
+
+==== Scoring Methodology
+
+Squishability score (0.0-1.0) calculated as weighted average of field
+transport classes: - *Concorde* (zero-copy): 1.0 weight - *Business*
+(safe widening): 0.8 weight - *Economy* (allocation): 0.4 weight -
+*Wheelbarrow* (JSON fallback): 0.1 weight
+
+Formula:
+`+score = (concorde×1.0 + business×0.8 + economy×0.4 + wheelbarrow×0.1) / total_fields+`
+
+==== Predicted Scores
+
+[width="100%",cols="10%,11%,8%,18%,17%,28%,8%",options="header",]
+|===
+|Rank |Protocol |Score |Zero-Copy Opps |Business Opps |Wheelbarrow
+Fallbacks |Notes
+|1 |*Avro* |0.85 |Low (unions) |Very High (evolution bloat) |Low |Schema
+evolution creates most opportunities
+
+|2 |*Thrift* |0.82 |Low (optional) |Very High (deprecated fields) |Low
+|RPC focus adds metadata overhead
+
+|3 |*Rust (serde)* |0.75 |High (`+&str+`, `+&[T]+`) |Medium (type
+choice) |Low |Within Rust ecosystem only
+
+|4 |*Protobuf* |0.68 |Medium (repeated) |High (optional fields) |Low
+|Proto3 all fields optional
+
+|5 |*Bebop* |0.62 |Medium (structs) |Medium (messages) |Low |Modern
+design, less bloat
+
+|6 |*ReScript* |0.58 |Low (JS interop) |Medium (variants) |Medium
+|Compiles to JS, limited zero-copy
+
+|7 |*MessagePack* |0.45 |Very Low |Low (type tags) |High |Dynamic typing
+blocker
+
+|8 |*Python (Pydantic)* |0.42 |Very Low |Medium (validation) |High
+|Runtime validation overhead
+
+|9 |*JSON Schema* |0.35 |None |Very Low |Very High |Baseline fallback
+format
+
+|10 |*FlatBuffers* |0.25 |Very High (struct) |Very Low (already optimal)
+|Very Low |Already optimized, unsquishable
+
+|11 |*Cap’n Proto* |0.18 |Extreme (all) |Very Low (already optimal)
+|None |Theoretical optimum, nothing to squish
+|===
+
+==== Score Interpretation
+
+* *0.8-1.0 (Highly Squishable):* Schema evolution protocols with
+backward compatibility bloat
+* *0.6-0.8 (Moderately Squishable):* Balanced protocols with
+optimization opportunities
+* *0.4-0.6 (Somewhat Squishable):* Language-native or dynamic protocols
+* *0.2-0.4 (Minimally Squishable):* Already-optimized or baseline
+protocols
+* *0.0-0.2 (Unsquishable):* Theoretical optimum, no improvements
+possible
+
+'''''
+
+=== 3. Pattern Frequency Analysis
+
+==== Common Patterns Across Protocols
+
+Based on 100+ example schemas analyzed across all 11 protocols:
+
+[width="100%",cols="16%,18%,26%,40%",options="header",]
+|===
+|Pattern |Frequency |Most Common In |Enables Transport Class
+|*Safe Widening* |72% |Protobuf, Bebop, Avro (int32→int64) |Business
+
+|*Unnecessary Optional* |68% |Avro, Thrift (backward compat) |Business
+
+|*Overprecision Float* |45% |All protocols (f64 when f32 sufficient)
+|Business
+
+|*Repeated Copyable* |38% |Protobuf, FlatBuffers (Vec)
+|Concorde/Business
+
+|*String→Enum* |35% |JSON Schema, MessagePack |Business
+
+|*Unnecessary Nesting* |28% |Avro, Thrift (deep hierarchies)
+|Economy→Business
+
+|*Deprecated Fields* |52% |Avro, Thrift (schema evolution) |Varies
+
+|*Zero-Copy Candidate* |15% |FlatBuffers, Cap’n Proto, Rust |Concorde
+|===
+
+==== Pattern Deep Dive
+
+===== A. Safe Widening (72% occurrence)
+
+*What:* Numeric type can be safely widened without loss of precision
+*Example:* `+int32+` → `+int64+`, `+float32+` → `+float64+`
+
+*Most Common Scenarios:* 1. *ID fields:* Often defined as `+int32+` but
+could be `+int64+` for future-proofing 2. *Timestamp fields:* `+int32+`
+unix timestamp → `+int64+` milliseconds 3. *Counter fields:* `+uint32+`
+→ `+uint64+` for high-volume systems
+
+*Transport Impact:* Business class (98% fidelity, 5% overhead)
+
+*Evidence from Protocols:* - *Protobuf:* `+int32 user_id+` →
+`+int64 user_id+` (common in schema migrations) - *Bebop:*
+`+int32 count+` → `+int64 count+` (server-side widening) - *Avro:*
+`+int+` (32-bit) → `+long+` (64-bit) compatible by schema evolution
+rules
+
+'''''
+
+===== B. Unnecessary Optional Fields (68% occurrence)
+
+*What:* Fields marked optional but always present in practice *Example:*
+`+optional string email+` that’s always populated
+
+*Most Common Scenarios:* 1. *Required-in-practice fields:* Email,
+username, created_at 2. *Backward compatibility artifact:* Field was
+optional in v1, required in v2 3. *Default value available:* Could use
+default instead of Option
+
+*Transport Impact:* Business class (avoid Option allocation)
+
+*Evidence from Protocols:* - *Avro:* `+["null", "string"]+` union (53%
+of nullable fields never null in production) - *Thrift:* `+optional+`
+modifier (42% never null based on runtime tracing) - *Protobuf proto3:*
+All fields optional (67% always present)
+
+*Blocker:* Optional handling prevents Concorde class zero-copy
+
+'''''
+
+===== C. Overprecision Float (45% occurrence)
+
+*What:* Using 64-bit float when 32-bit sufficient *Example:* Percentages
+(0-100) stored as `+f64+` instead of `+f32+`
+
+*Most Common Scenarios:* 1. *Percentages:* 0.0-100.0 (6 decimal places
+sufficient) 2. *Currency:* Cent precision (f32 handles up to $16M with
+cent precision) 3. *Geographic coordinates:* Meter precision (f32 = ~1cm
+accuracy)
+
+*Transport Impact:* Business class (half the memory, same precision)
+
+*Evidence:* - *JSON Schema:* Default `+number+` type (f64) for all
+numeric values - *Protobuf:* `+double+` common where `+float+`
+sufficient - *MessagePack:* Float64 type used for all decimals
+
+*Savings:* 8 bytes → 4 bytes per field, 2x throughput for float-heavy
+data
+
+'''''
+
+===== D. Repeated Copyable Data (38% occurrence)
+
+*What:* Arrays of primitive types that can be copied efficiently
+*Example:* `+Vec+` can be memcpy’d between compatible systems
+
+*Most Common Scenarios:* 1. *Numeric arrays:* Coordinates, samples,
+measurements 2. *ID lists:* User IDs, product IDs 3. *Flags/bitmasks:*
+Boolean arrays as bit vectors
+
+*Transport Impact:* Concorde (zero-copy) or Business (bulk copy)
+
+*Evidence:* - *FlatBuffers:* `+[int]+` vectors with direct memory access
+- *Protobuf:* `+repeated int32+` with packed encoding - *Cap’n Proto:*
+List with pointer arithmetic
+
+'''''
+
+===== E. String Fields That Should Be Enums (35% occurrence)
+
+*What:* String fields with limited set of values *Example:*
+`+status: "active" | "inactive" | "pending"+` → enum
+
+*Most Common Scenarios:* 1. *Status fields:* 3-10 possible values 2.
+*Category/type fields:* Fixed taxonomy 3. *Environment:* "`dev`",
+"`staging`", "`prod`"
+
+*Transport Impact:* Business class (1-2 bytes vs 5-20 bytes)
+
+*Evidence from Runtime Analysis:* - *JSON APIs:* 58% of string fields
+have ≤10 unique values - *MessagePack:* String keys repeated millions of
+times - *Avro:* Union type with string variants (could be enum)
+
+*Blocker:* Dynamic typing (MessagePack, JSON) prevents compile-time
+enumeration
+
+'''''
+
+===== F. Unnecessary Nesting (28% occurrence)
+
+*What:* Deep object hierarchies that could be flattened *Example:*
+`+user.profile.contact.email+` → `+user.email+`
+
+*Most Common Scenarios:* 1. *Over-normalization:* Breaking apart simple
+structs 2. *Backward compatibility:* Adding wrappers around legacy
+fields 3. *OOP-style modeling:* Class hierarchies translated to schemas
+
+*Transport Impact:* Economy → Business (reduce indirection, allocation)
+
+*Evidence:* - *Avro:* Nested records with single field (20% of nested
+types) - *Thrift:* Struct wrappers around primitives - *Protobuf:*
+Message types with single field (organization artifact)
+
+'''''
+
+===== G. Deprecated Fields (52% occurrence in evolution-focused protocols)
+
+*What:* Fields kept for backward compatibility but unused *Example:*
+`+deprecated old_api_key: string+` (replaced by new_api_key)
+
+*Most Common Scenarios:* 1. *Renamed fields:* old_name → new_name
+transition 2. *Type changes:* Wrapped in new field to avoid breaking
+change 3. *Feature removal:* Field remains but no longer populated
+
+*Transport Impact:* Varies (saves bandwidth by omitting)
+
+*Evidence:* - *Avro schemas:* Average 3.2 deprecated fields per evolved
+schema - *Thrift services:* 18% of fields marked deprecated -
+*Protobuf:* Reserved field numbers indicate removal
+
+*Optimization:* Omit deprecated fields in transport, reconstruct on
+receiver if needed
+
+'''''
+
+===== H. Zero-Copy Candidates (15% occurrence)
+
+*What:* Data that can be passed by pointer without serialization
+*Example:* FlatBuffers struct, Rust `+&[u8]+` slice
+
+*Most Common Scenarios:* 1. *Fixed-size structs:* Vec3, Matrix, Color
+(FlatBuffers) 2. *Borrowed slices:* `+&str+`, `+&[T]+` in Rust 3.
+*Memory-mapped data:* File-backed buffers
+
+*Transport Impact:* Concorde (100% fidelity, 0% overhead)
+
+*Evidence:* - *FlatBuffers:* 34% of struct fields eligible for zero-copy
+- *Cap’n Proto:* 89% of primitive fields zero-copy accessible - *Rust
+serde:* 47% of fields borrowed (`+&T+`) in zero-copy contexts
+
+*Requirement:* Both sides must understand memory layout (same
+architecture, endianness)
+
+'''''
+
+=== 4. Transport Class Distribution Matrix
+
+==== Protocol Pair Compatibility
+
+Best achievable transport class when transferring between protocol
+pairs:
+
+[width="99%",cols="25%,9%,5%,7%,6%,8%,6%,8%,5%,5%,7%,9%",options="header",]
+|===
+| |Protobuf |Avro |Thrift |Bebop |FlatBuf |Cap’n |MsgPack |JSON |Rust
+|Python |ReScript
+|*Protobuf* |Concorde |Bus |Bus |Bus |Eco |Eco |Eco |Wheel |Bus |Eco
+|Eco
+
+|*Avro* |Bus |Conc |Bus |Bus |Eco |Eco |Bus |Wheel |Bus |Eco |Eco
+
+|*Thrift* |Bus |Bus |Conc |Bus |Eco |Eco |Eco |Wheel |Bus |Eco |Eco
+
+|*Bebop* |Bus |Bus |Bus |Conc |Eco |Eco |Eco |Wheel |Bus |Eco |Eco
+
+|*FlatBuffers* |Eco |Eco |Eco |Eco |Conc |Bus |Eco |Wheel |Eco |Eco |Eco
+
+|*Cap’n Proto* |Eco |Eco |Eco |Eco |Bus |Conc |Eco |Wheel |Eco |Eco |Eco
+
+|*MessagePack* |Eco |Bus |Eco |Eco |Eco |Eco |Conc |Bus |Eco |Bus |Bus
+
+|*JSON* |Wheel |Wheel |Wheel |Wheel |Wheel |Wheel |Bus |Conc |Wheel |Bus
+|Bus
+
+|*Rust* |Bus |Bus |Bus |Bus |Eco |Eco |Eco |Wheel |Conc |Wheel |Eco
+
+|*Python* |Eco |Eco |Eco |Eco |Eco |Eco |Bus |Bus |Wheel |Conc |Wheel
+
+|*ReScript* |Eco |Eco |Eco |Eco |Eco |Eco |Bus |Bus |Eco |Wheel |Conc
+|===
+
+*Legend:* - *Conc* = Concorde (zero-copy, same protocol) - *Bus* =
+Business (safe widening, schema mapping) - *Eco* = Economy (allocation,
+type conversion) - *Wheel* = Wheelbarrow (JSON serialization fallback)
+
+==== Key Insights from Matrix
+
+[arabic]
+. *Schema-based ↔ Schema-based:* Generally Business class (field
+mapping, safe widening)
+. *Zero-copy ↔ Others:* Economy class (layout incompatibility)
+. *Dynamic ↔ Static:* Economy or Wheelbarrow (type tag overhead)
+. *Language-native ↔ Cross-language:* Economy (type system mismatch)
+
+==== Most Compatible Protocol Pairs (Business Class)
+
+[arabic]
+. *Protobuf ↔ Avro:* Field number mapping, similar semantics
+. *Protobuf ↔ Thrift:* Nearly identical design, easy translation
+. *Avro ↔ MessagePack:* Both dynamic-friendly, union types map well
+. *Bebop ↔ Protobuf:* Modern vs classic, compatible type systems
+
+==== Most Incompatible Protocol Pairs (Wheelbarrow Class)
+
+[arabic]
+. *JSON ↔ Protobuf/Avro/Thrift:* String-based vs binary, heavy
+conversion
+. *Rust ↔ Python:* Ownership vs garbage collection, lifetime mismatch
+. *Cap’n Proto ↔ JSON:* Zero-copy vs heap-everything, total impedance
+mismatch
+
+'''''
+
+=== 5. Evidence-Based Recommendations
+
+==== A. Choosing Protocols by Use Case
+
+===== For Maximum Squishability (Find Optimizations)
+
+*Recommendation:* Avro or Thrift *Why:* Schema evolution creates
+optimization opportunities through: - Backward compatibility bloat
+(deprecated fields) - Union types for null handling - Optional fields
+that are actually required - Over-specified types (f64 → f32, int32 →
+int64 widening)
+
+*Use When:* - You want protocol-squisher to find improvements - Schema
+evolves frequently - Multiple teams/services with different schema
+versions - Data warehouse / analytics pipelines (historical data)
+
+'''''
+
+===== For Already-Optimized Performance
+
+*Recommendation:* FlatBuffers or Cap’n Proto *Why:* Zero-copy design,
+already at theoretical optimum - Direct memory access without
+deserialization - Fixed layouts enable pointer arithmetic - No parsing
+overhead
+
+*Use When:* - Microsecond-level latency requirements - Embedded systems
+or real-time applications - Game engines, audio/video processing -
+Trading systems, robotics control
+
+*Trade-off:* Minimal squishing opportunities (already optimal)
+
+'''''
+
+===== For Modern Balanced Approach
+
+*Recommendation:* Bebop or Protobuf *Why:* Good performance with
+reasonable flexibility - Schema-based with backward compatibility -
+Efficient binary encoding - Moderate zero-copy opportunities - Active
+tooling ecosystem
+
+*Use When:* - Microservices communication - Mobile apps (bandwidth
+optimization) - IoT devices (limited resources) - Standard backend
+services
+
+*Bebop vs Protobuf:* - Bebop: Cleaner syntax, fixed-width encoding,
+newer ecosystem - Protobuf: Mature tooling, variable-length encoding,
+Google ecosystem
+
+'''''
+
+===== For Dynamic/Exploratory Development
+
+*Recommendation:* MessagePack or JSON Schema *Why:* Flexibility over
+performance - No schema files to manage - Runtime flexibility -
+Human-readable (JSON) or compact (MessagePack)
+
+*Use When:* - Rapid prototyping - Schema unknown or frequently changing
+- Frontend ↔ backend communication (web APIs) - Configuration files
+
+*Trade-off:* Lower squishability due to dynamic typing
+
+'''''
+
+===== For Language-Specific Optimization
+
+*Recommendation:* Rust (serde) within Rust ecosystem *Why:* Zero-cost
+abstractions, borrow checker enables zero-copy - `+&str+` vs `+String+`,
+`+&[T]+` vs `+Vec+` - Trait-based serialization - Compile-time
+optimization
+
+*Use When:* - Rust ↔ Rust communication - Single-language microservice
+architecture - High-performance systems programming
+
+*Trade-off:* Limited cross-language compatibility
+
+'''''
+
+==== B. Design Patterns That Enable Better Transport
+
+===== 1. Prefer Enums Over Strings
+
+....
+❌ Bad (low squishability):
+ status: string // "active", "inactive", "pending"
+
+✅ Good (high squishability):
+ enum Status { ACTIVE, INACTIVE, PENDING }
+ status: Status
+....
+
+*Impact:* 1-2 bytes (enum) vs 5-20 bytes (string)
+
+'''''
+
+===== 2. Use Precise Numeric Types
+
+....
+❌ Bad:
+ percentage: f64 // 0.0-100.0
+
+✅ Good:
+ percentage: f32 // Sufficient precision
+....
+
+*Impact:* 8 bytes → 4 bytes, Business class
+
+'''''
+
+===== 3. Avoid Unnecessary Optionality
+
+....
+❌ Bad (Avro):
+ email: ["null", "string"] // Always present in practice
+
+✅ Good:
+ email: string // Required field
+....
+
+*Impact:* Business class → Concorde class (zero-copy eligible)
+
+'''''
+
+===== 4. Flatten Nested Structures
+
+....
+❌ Bad:
+ user: {
+ profile: {
+ contact: {
+ email: string
+ }
+ }
+ }
+
+✅ Good:
+ user_email: string
+....
+
+*Impact:* 1 allocation vs 4 allocations, Economy → Business
+
+'''''
+
+===== 5. Pack Repeated Primitives
+
+....
+❌ Bad:
+ points: [{x: f32, y: f32}] // Array of structs
+
+✅ Good:
+ x_coords: [f32]
+ y_coords: [f32]
+....
+
+*Impact:* Enables SIMD, zero-copy bulk transfer
+
+'''''
+
+===== 6. Remove Deprecated Fields
+
+....
+❌ Bad:
+ deprecated old_api_key: string
+ new_api_key: string
+
+✅ Good:
+ api_key: string // Remove old, rename new
+....
+
+*Impact:* Reduce schema bloat, save bandwidth
+
+'''''
+
+==== C. When to Use Schema-less vs Schema-based
+
+[width="100%",cols="14%,40%,46%",options="header",]
+|===
+|Criterion |Schema-less (JSON, MessagePack) |Schema-based (Protobuf,
+Avro, etc.)
+|*Development Speed* |Fast (no schema files) |Slower (define schemas)
+
+|*Type Safety* |Runtime only |Compile-time
+
+|*Performance* |Low (parsing overhead) |High (binary encoding)
+
+|*Bandwidth* |High (string keys, type tags) |Low (field numbers,
+compact)
+
+|*Squishability* |Low (0.3-0.5) |High (0.6-0.9)
+
+|*Evolution* |Unstructured |Structured compatibility rules
+
+|*Tooling* |Universal (every language) |Protocol-specific
+
+|*Debugging* |Easy (human-readable) |Harder (binary, needs tools)
+|===
+
+*Recommendation Matrix:*
+
+[width="100%",cols="30%,38%,32%",options="header",]
+|===
+|Scenario |Best Choice |Reasoning
+|Web API (public) |JSON Schema |Compatibility, human-readable
+|Microservices (internal) |Protobuf or Bebop |Performance, type safety
+|Long-term data storage |Avro |Schema evolution
+|Real-time systems |FlatBuffers or Cap’n Proto |Zero-copy performance
+|Rapid prototyping |MessagePack |Flexibility, good performance
+|Config files |JSON or TOML |Human-readable, widely supported
+|High-frequency trading |Cap’n Proto |Theoretical performance limit
+|===
+
+'''''
+
+==== D. Performance vs Flexibility Tradeoffs
+
+....
+Performance ◄─────────────────────────────────────► Flexibility
+ (unsquishable) (squishable)
+
+Cap'n Proto FlatBuffers Bebop Avro JSON
+ ●──────────────●──────────●────────────●──────────────●
+ │ │ │ │ │
+ │ │ │ │ └─ Baseline fallback
+ │ │ │ └─ Schema evolution opportunities
+ │ │ └─ Modern balanced approach
+ │ └─ Zero-copy structs, heap tables
+ └─ Theoretical performance limit
+
+Squishability Score:
+ 0.18 0.25 0.62 0.85 0.35
+ (lowest) (highest) (baseline)
+....
+
+*Key Insight:* The protocols with the MOST squishing opportunities are
+NOT the slowest (JSON) but rather the MIDDLE protocols that balance
+compatibility with performance (Avro, Thrift). Zero-copy protocols are
+already optimal and thus "`unsquishable.`"
+
+'''''
+
+=== 6. Hypothesis Testing Results
+
+==== Hypothesis 1: "`Schema evolution creates squishing opportunities`"
+
+*Result:* ✅ *STRONGLY SUPPORTED*
+
+*Evidence:* - Avro score: 0.85 (highest) - Thrift score: 0.82 (second
+highest) - Evolution protocols average: 0.835 - Non-evolution protocols
+average: 0.489 - Difference: +0.346 (41% improvement)
+
+*Confidence:* 0.92
+
+*Analysis:* Schema evolution protocols (Avro, Thrift) prioritize
+backward compatibility over optimization, creating multiple squishing
+opportunities:
+
+[arabic]
+. *Union types for null handling:* `+["null", "string"]+` adds type tag
+overhead (68% of nullable fields never null)
+. *Deprecated fields:* Average 3.2 per evolved schema (unused but
+transmitted)
+. *Over-specified types:* Widening for future compatibility (int32→int64
+common pattern)
+. *Optional everything:* Protobuf proto3 makes all fields optional (67%
+always present)
+
+*Specific Examples:*
+
+*Avro Example (Union Type Bloat):*
+
+[source,json]
+----
+{
+ "type": "record",
+ "name": "User",
+ "fields": [
+ {"name": "email", "type": ["null", "string"]} // Always present in 89% of cases
+ ]
+}
+----
+
+*Squishing Opportunity:* Remove union wrapper, use required `+string+` →
+Business class
+
+*Thrift Example (Deprecated Field):*
+
+[source,thrift]
+----
+struct User {
+ 1: required string username,
+ 2: deprecated string old_email, // Kept for v1 compatibility
+ 3: required string email
+}
+----
+
+*Squishing Opportunity:* Omit field 2 in transport, reconstruct if
+needed
+
+'''''
+
+==== Hypothesis 2: "`Zero-copy protocols are unsquishable (already optimal)`"
+
+*Result:* ✅ *STRONGLY SUPPORTED*
+
+*Evidence:* - Cap’n Proto score: 0.18 (lowest) - FlatBuffers score: 0.25
+(second lowest) - Zero-copy protocols average: 0.215 - Other protocols
+average: 0.584 - Difference: -0.369 (63% lower squishability)
+
+*Confidence:* 0.82
+
+*Analysis:* Zero-copy protocols are designed for theoretical performance
+limits, leaving minimal room for optimization:
+
+[arabic]
+. *Fixed memory layouts:* Struct fields at compile-time offsets (no
+parsing)
+. *Pointer arithmetic:* Direct access without deserialization
+. *No heap allocation:* Primitives stored inline (Concorde class by
+default)
+. *Manual optimization:* Developers already chose optimal types
+
+*Specific Examples:*
+
+*Cap’n Proto Example (Already Zero-Copy):*
+
+[source,capnp]
+----
+struct Vec3 {
+ x @0 :Float32;
+ y @1 :Float32;
+ z @2 :Float32;
+}
+----
+
+*Squishability:* *NONE* - Struct fields accessed via pointer arithmetic,
+already at theoretical optimum. Changing `+Float32+` to `+Float64+`
+would DECREASE performance (worse cache locality).
+
+*FlatBuffers Example (Mixed Zero-Copy):*
+
+[source,fbs]
+----
+table User {
+ id: int; // Zero-copy (Concorde)
+ name: string; // Heap-allocated (Economy)
+}
+----
+
+*Squishability:* *LOW* - Primitive fields (id) already zero-copy. String
+fields require heap allocation (inherent to design). Only optimization:
+switch table → struct if all fields fixed-size, but rare.
+
+*Why This Matters:* If your goal is to FIND optimizations, avoid
+zero-copy protocols. They’re already optimized. Use Avro/Thrift to
+discover backward compatibility bloat.
+
+'''''
+
+==== Hypothesis 3: "`Dynamic typing requires Wheelbarrow class`"
+
+*Result:* ⚠️ *PARTLY SUPPORTED*
+
+*Evidence:* - MessagePack score: 0.45 (not as low as predicted) - JSON
+Schema score: 0.35 (lowest among dynamic) - Python Pydantic score: 0.42
+(runtime validation helps) - Dynamic protocols average: 0.407 -
+Expected: 0.1-0.2 (mostly Wheelbarrow) - Actual: 0.4+ (significant
+Business/Economy class usage)
+
+*Confidence:* 0.58
+
+*Analysis:* While dynamic typing does hinder zero-copy (Concorde class),
+modern dynamic protocols use Business/Economy class more than expected:
+
+*Factors Enabling Better Transport:* 1. *Type tags:* MessagePack uses
+efficient binary type tags (1 byte overhead) 2. *Schema hints:* Pydantic
+provides runtime validation (type safety without compile-time schemas)
+3. *Common patterns:* JSON APIs often follow predictable structures
+(schema inference possible)
+
+*However:* - *JSON Schema still lowest:* String-based everything, no
+binary encoding - *Cross-language penalty:* Python ↔ Rust requires
+Wheelbarrow class (GC vs ownership)
+
+*Specific Examples:*
+
+*MessagePack (Better Than Expected):*
+
+....
+{"user_id": 12345, "score": 98.5}
+→ Binary: \x82\xa7user_id\xcd\x30\x39\xa5score\xcb@X\xcc\xcc\xcc\xcc\xcc\xcd
+....
+
+Type tags enable Business class in some scenarios (int widening, float
+precision reduction)
+
+*JSON Schema (As Expected):*
+
+....
+{"user_id": "12345", "score": "98.5"} // Everything is string
+....
+
+Requires parsing → Wheelbarrow class for most transfers
+
+*Revised Hypothesis:* "`Dynamic typing creates transport class barriers
+BUT modern binary formats (MessagePack) mitigate via efficient type
+tags`"
+
+'''''
+
+==== Hypothesis 4: "`Protobuf-like field numbers help compatibility`"
+
+*Result:* ✅ *SUPPORTED*
+
+*Evidence:* Protocol-pair compatibility matrix shows: - *Field number
+protocols* (Protobuf, Thrift, Bebop): Average Business class
+compatibility (0.78) - *Name-based protocols* (Avro): Lower
+cross-protocol compatibility (0.62) - *No schema* (MessagePack, JSON):
+Lowest compatibility (0.41)
+
+*Why Field Numbers Help:* 1. *Stable identifiers:* Names can change,
+numbers remain 2. *Efficient encoding:* 1 byte for fields 1-15 (Protobuf
+varint) 3. *Reordering tolerance:* Field order doesn’t matter 4. *Sparse
+schemas:* Can skip unused field numbers
+
+*Compatibility Examples:*
+
+*Protobuf ↔ Thrift (Business Class):*
+
+[source,protobuf]
+----
+message User {
+ int32 id = 1;
+ string name = 2;
+}
+----
+
+[source,thrift]
+----
+struct User {
+ 1: i32 id,
+ 2: string name
+}
+----
+
+*Compatibility:* Field numbers align perfectly, Business class
+achievable
+
+*Avro (Name-Based, Lower Compatibility):*
+
+[source,json]
+----
+{"name": "User", "fields": [
+ {"name": "user_id", "type": "int"}, // Name different from Protobuf's "id"
+ {"name": "name", "type": "string"}
+]}
+----
+
+*Compatibility:* Name mismatch requires schema mapping, Economy class
+
+*Conclusion:* Field numbers provide stable protocol-agnostic
+identifiers, enabling Business class between schema-based protocols.
+Name-based protocols (Avro) work within themselves but have lower
+cross-protocol compatibility.
+
+'''''
+
+=== 7. Conclusions and Future Directions
+
+==== Key Findings
+
+[arabic]
+. *Highest Squishability:* Avro (0.85) and Thrift (0.82) - Schema
+evolution creates optimization opportunities
+. *Lowest Squishability:* Cap’n Proto (0.18) and FlatBuffers (0.25) -
+Already at theoretical optimum
+. *Most Common Pattern:* Safe widening (72%) - int32→int64, f32→f64
+. *Best Cross-Protocol Compatibility:* Protobuf ↔ Thrift (field number
+alignment)
+. *Biggest Transport Barrier:* Dynamic typing (requires type tags,
+prevents zero-copy)
+
+==== Design Philosophy Spectrum
+
+....
+Flexibility Focus Balanced Performance Focus
+(Most Squishable) (Least Squishable)
+
+ JSON Avro/Thrift Bebop/Protobuf FlatBuffers Cap'n Proto
+ │ │ │ │ │
+ │ │ │ │ │
+ 0.35 0.85 0.65 0.25 0.18
+ (baseline) (highest) (moderate) (optimized) (theoretical
+ optimum)
+....
+
+*The Squishability Paradox:* The protocols with the MOST optimization
+opportunities are NOT the slowest (JSON) but rather the protocols that
+balance compatibility with performance (Avro, Thrift). These accumulate
+backward compatibility bloat over time, creating squishing
+opportunities.
+
+==== Practical Recommendations
+
+===== For Protocol-Squisher Users:
+
+[arabic]
+. *To Find Optimizations:* Use Avro or Thrift schemas
+* Schema evolution creates deprecated fields, unnecessary optionals,
+over-specified types
+* Expect 15-30% bandwidth reduction through squishing
+. *For Already-Optimized Systems:* Cap’n Proto or FlatBuffers
+* Protocol-squisher will report low squishability (expected)
+* Already at 95%+ of theoretical performance
+* Focus on algorithm optimization, not protocol changes
+. *For Microservices:* Protobuf or Bebop
+* Moderate squishability (0.6-0.7)
+* Balance between optimization opportunities and initial performance
+* Good tooling ecosystems
+
+===== For Protocol Designers:
+
+[arabic]
+. *Prioritize Type Precision:* Encourage developers to choose exact
+types (f32 vs f64, i32 vs i64)
+. *Discourage Optional by Default:* Make developers justify optional
+fields
+. *Provide Deprecation Tooling:* Help remove old fields, not just mark
+them deprecated
+. *Support Schema Linting:* Catch patterns like "`string that should be
+enum`"
+
+==== Future Analysis Directions
+
+[arabic]
+. *Real-World Schema Corpus:* Analyze 1000+ production schemas from
+GitHub
+. *ML-Driven Pattern Detection:* Train classifier to predict
+squishability score from schema
+. *Cross-Protocol Translation:* Build automatic Protobuf→Avro,
+Thrift→Bebop translators
+. *Performance Benchmarking:* Measure actual speedup from ephapax
+transport class recommendations
+. *Schema Evolution Timeseries:* Track squishability decay over schema
+versions
+
+==== Open Questions
+
+[arabic]
+. *Does squishability correlate with schema age?* (Hypothesis: Older
+schemas accumulate more bloat)
+. *Can we predict transport class from AST analysis alone?* (No runtime
+profiling)
+. *What percentage of squishing recommendations are actually applied in
+production?*
+. *How much bandwidth reduction translates to cost savings for cloud
+deployments?*
+
+'''''
+
+=== Appendix A: Example Schemas
+
+==== A.1 Protobuf - Moderate Squishability (0.68)
+
+[source,protobuf]
+----
+syntax = "proto3";
+
+message User {
+ int32 id = 1; // Could widen to int64 (Business class)
+ string username = 2; // Required but implicitly optional (proto3)
+ string email = 3; // Always present (Business: make required)
+ double account_balance = 4; // f64 when f32 sufficient (Business: precision)
+ repeated int32 friend_ids = 5; // Repeated copyable (Concorde/Business)
+}
+
+// Squishing Opportunities:
+// 1. Widen id to int64 (future-proof) - Business class
+// 2. Make email required (never null) - Business class
+// 3. Change account_balance to float - Business class (0.01 precision OK)
+// 4. friend_ids can use packed encoding - Concorde class (zero-copy array)
+----
+
+==== A.2 Avro - Highest Squishability (0.85)
+
+[source,json]
+----
+{
+ "type": "record",
+ "name": "User",
+ "fields": [
+ {"name": "id", "type": "int"}, // int32, could widen
+ {"name": "username", "type": "string"}, // Required
+ {"name": "email", "type": ["null", "string"]}, // 89% always present (union bloat)
+ {"name": "old_account_id", "type": ["null", "int"], // DEPRECATED field
+ "default": null, "doc": "deprecated in v2"},
+ {"name": "account_balance", "type": "double"}, // f64 when f32 sufficient
+ {"name": "friend_ids", "type": {"type": "array", // Repeated int32
+ "items": "int"}},
+ {"name": "status", "type": "string"} // Should be enum
+ ]
+}
+
+// Squishing Opportunities:
+// 1. Remove ["null", "string"] union on email - Business class
+// 2. Omit old_account_id entirely - save bandwidth
+// 3. Widen id to long (int64) - Business class
+// 4. Change account_balance to float - Business class
+// 5. Convert status to enum - Business class (1 byte vs 5-20 bytes)
+// 6. friend_ids bulk copy - Concorde class
+----
+
+==== A.3 FlatBuffers - Low Squishability (0.25)
+
+[source,fbs]
+----
+struct Vec3 {
+ x: float; // Fixed layout, zero-copy (Concorde)
+ y: float; // Already optimal
+ z: float; // No squishing opportunities
+}
+
+table User {
+ id: int; // Zero-copy (Concorde)
+ name: string; // Heap-allocated (Economy) - inherent to design
+ balance: double; // Could use float, but rare optimization
+ friends: [int]; // Vector (Economy) - heap required
+}
+
+// Squishing Opportunities:
+// 1. Vec3 struct: NONE (already zero-copy, theoretical optimum)
+// 2. User.balance: Change double→float (minor, uncommon)
+// 3. User.name: NONE (string requires heap allocation)
+// Overall: Very low squishability, already optimized
+----
+
+==== A.4 Cap’n Proto - Lowest Squishability (0.18)
+
+[source,capnp]
+----
+struct Vec3 {
+ x @0 :Float32; # Zero-copy via pointer arithmetic
+ y @1 :Float32; # Fixed offset: base + 0, base + 4, base + 8
+ z @2 :Float32; # ALREADY AT THEORETICAL OPTIMUM
+}
+
+struct User {
+ id @0 :Int32; # Zero-copy (Concorde)
+ name @1 :Text; # Far pointer (required by design)
+ balance @2 :Float64; # Could use Float32, but rare
+ friends @3 :List(Int32); # Pointer to packed array
+}
+
+# Squishing Opportunities:
+# 1. Vec3: NONE - Changing Float32→Float64 would DECREASE performance
+# 2. User.balance: Float64→Float32 (minor improvement, uncommon)
+# 3. OVERALL: 0.18 score, unsquishable by design
+----
+
+'''''
+
+=== Appendix B: Squishability Scoring Algorithm
+
+[source,rust]
+----
+/// Calculate squishability score for a schema (0.0-1.0)
+pub fn calculate_squishability(schema: &IrSchema) -> f64 {
+ let mut total_fields = 0;
+ let mut weighted_sum = 0.0;
+
+ for (_, type_def) in &schema.types {
+ if let TypeDef::Struct(s) = type_def {
+ for field in &s.fields {
+ total_fields += 1;
+
+ // Determine transport class for this field
+ let transport_class = determine_transport_class(field);
+
+ // Weight by transport class quality
+ let weight = match transport_class {
+ TransportClass::Concorde => 1.0, // Zero-copy, optimal
+ TransportClass::Business => 0.8, // Safe widening, good
+ TransportClass::Economy => 0.4, // Allocation, acceptable
+ TransportClass::Wheelbarrow => 0.1, // JSON fallback, poor
+ };
+
+ weighted_sum += weight;
+ }
+ }
+ }
+
+ if total_fields == 0 {
+ return 0.0;
+ }
+
+ weighted_sum / total_fields as f64
+}
+
+/// Determine transport class for a field based on type and metadata
+fn determine_transport_class(field: &Field) -> TransportClass {
+ match &field.ty {
+ // Primitives (fixed-size) → Concorde if non-optional
+ Type::I32 | Type::I64 | Type::F32 | Type::F64 | Type::Bool
+ if !field.optional => TransportClass::Concorde,
+
+ // Primitives (optional) → Business (avoid Option allocation)
+ Type::I32 | Type::I64 | Type::F32 | Type::F64 | Type::Bool
+ if field.optional => TransportClass::Business,
+
+ // Strings, vectors → Economy (heap allocation)
+ Type::String | Type::Vec(_) => TransportClass::Economy,
+
+ // Nested structs → Depends on fields
+ Type::Struct(_) => TransportClass::Economy, // Conservative
+
+ // Enums → Concorde (simple discriminant)
+ Type::Enum(_) => TransportClass::Concorde,
+
+ // Unknown/dynamic → Wheelbarrow
+ _ => TransportClass::Wheelbarrow,
+ }
+}
+----
+
+'''''
+
+=== Appendix C: Glossary
+
+*Squishability:* The degree to which a protocol schema can be optimized
+through transport class selection. Higher score = more optimization
+opportunities.
+
+*Transport Class:* Ephapax classification of data transfer methods: -
+*Concorde:* Zero-copy, pointer passing (100% fidelity, 0% overhead) -
+*Business:* Safe widening, type coercion (98% fidelity, 5% overhead) -
+*Economy:* Allocation, cloning (80% fidelity, 25% overhead) -
+*Wheelbarrow:* JSON serialization (50% fidelity, 80% overhead)
+
+*Safe Widening:* Expanding a numeric type without precision loss
+(int32→int64, float32→float64)
+
+*Schema Evolution:* The process of updating a schema over time while
+maintaining backward/forward compatibility
+
+*Zero-Copy:* Accessing data directly in memory without deserialization
+or allocation
+
+*Field Number:* Numeric identifier for a schema field (Protobuf,
+Thrift), enables stable references
+
+*Union Type:* Tagged union allowing multiple possible types (Avro
+`+["null", "string"]+`)
+
+*Deprecated Field:* Schema field kept for compatibility but no longer
+used
+
+'''''
+
+*End of Analysis*
+
+This comprehensive report analyzed 11 protocols across the design
+philosophy spectrum, from ultra-optimized zero-copy (Cap’n Proto) to
+schema-less dynamic (JSON). The key insight: schema evolution protocols
+(Avro, Thrift) create the MOST squishing opportunities due to backward
+compatibility bloat, while zero-copy protocols are already optimal and
+"`unsquishable.`"
+
+Future work should focus on real-world schema corpus analysis and
+ML-driven pattern detection to refine these findings.
diff --git a/provenance/DIVERSITY-ANALYSIS.md b/provenance/DIVERSITY-ANALYSIS.md
deleted file mode 100644
index ba7a39c..0000000
--- a/provenance/DIVERSITY-ANALYSIS.md
+++ /dev/null
@@ -1,1103 +0,0 @@
-
-# Protocol Squisher Diversity Spectrum Meta-Analysis
-
-**Generated:** 2026-02-04
-**Analyzers:** 11 protocols (Rust, Python, JSON Schema, Protobuf, Bebop, FlatBuffers, MessagePack, Avro, Cap'n Proto, Thrift, ReScript)
-
-## Executive Summary
-
-This report presents a comprehensive analysis of the design philosophy spectrum in protocol serialization formats and their impact on "squishability" - the ability to optimize data transfer through transport class selection. We analyze 11 distinct protocols ranging from ultra-optimized zero-copy formats to schema-less dynamic approaches.
-
-**Key Finding:** Schema evolution protocols (Avro, Thrift) create the MOST squishing opportunities due to backward compatibility bloat, while zero-copy protocols (FlatBuffers, Cap'n Proto) are already optimized and offer minimal squishing opportunities.
-
----
-
-## 1. Protocol Spectrum Classification
-
-### A. Ultra-Optimized Zero-Copy (Already Optimal)
-**Protocols:** FlatBuffers, Cap'n Proto
-
-**Design Philosophy:**
-- Direct memory access without deserialization
-- Fixed memory layouts with pointer arithmetic
-- Trade schema flexibility for maximum performance
-- Designed to be "unsquishable" (already at theoretical optimum)
-
-**Characteristics:**
-- Zero heap allocations for primitives
-- Pointer-based navigation
-- Fixed struct layouts (Concorde class by default)
-- Tables/dynamic types fall back to Economy class
-
-**Squishability Prediction:** **LOW (0.1-0.3)** - Already optimized, little room for improvement
-
----
-
-### B. Modern Performant (Balanced)
-**Protocols:** Bebop, Protobuf
-
-**Design Philosophy:**
-- Schema-based with field numbers
-- Efficient binary encoding
-- Some schema evolution support
-- Balance between performance and flexibility
-
-**Characteristics:**
-- Field numbers enable backward compatibility
-- Optional fields create optimization opportunities
-- Variable-length encoding (protobuf) vs fixed-width (bebop)
-- Moderate zero-copy opportunities
-
-**Bebop Specifics:**
-- Modern clean syntax
-- Fixed-width encoding (faster, more predictable)
-- Structs vs messages (stack vs heap)
-- Optional fields with `?` syntax
-
-**Protobuf Specifics:**
-- Variable-length encoding (varint, zigzag)
-- All fields implicitly optional (proto3)
-- Field numbers 1-15 use 1 byte tag
-
-**Squishability Prediction:** **MEDIUM-HIGH (0.5-0.7)** - Many optimization opportunities from optional fields and type choices
-
----
-
-### C. Schema Evolution Focus (Most Squishable)
-**Protocols:** Avro, Thrift
-
-**Design Philosophy:**
-- Strong backward/forward compatibility guarantees
-- Reader/writer schema separation
-- Name-based field resolution (Avro) or optional field numbers (Thrift)
-- Designed for long-term schema evolution
-
-**Characteristics:**
-- Heavy use of union types for optionality
-- Default values for backward compatibility
-- Deprecated fields remain in schema
-- Schema bloat accumulates over time
-
-**Avro Specifics:**
-- Schema travels with data
-- Union types for null handling: `["null", "type"]`
-- No field numbers - matched by name
-- Map keys always strings
-
-**Thrift Specifics:**
-- Multiple encoding formats (Binary, Compact, JSON)
-- Optional/required/default field modifiers
-- Field numbers like Protobuf
-- Service definitions (RPC focus)
-
-**Squishability Prediction:** **HIGHEST (0.7-0.9)** - Backward compatibility creates significant optimization opportunities
-
----
-
-### D. Dynamic/Schema-less (Limited Squishing)
-**Protocols:** MessagePack, JSON Schema
-
-**Design Philosophy:**
-- Flexibility over performance
-- Runtime type detection
-- Self-describing data
-- No compile-time schema validation
-
-**Characteristics:**
-- Type tags in serialized data
-- No field ordering guarantees
-- String keys (high overhead)
-- Heap allocation for all values
-
-**MessagePack Specifics:**
-- Binary JSON alternative
-- More compact than JSON but still dynamic
-- Type tags for every value
-- Popular in dynamic language ecosystems
-
-**JSON Schema Specifics:**
-- Human-readable
-- Ubiquitous but inefficient
-- String-based everything
-- No type safety
-
-**Squishability Prediction:** **LOW-MEDIUM (0.3-0.5)** - Dynamic typing requires Wheelbarrow class for most transfers
-
----
-
-### E. Language-Native (Variable)
-**Protocols:** Rust (serde), Python (Pydantic), ReScript
-
-**Design Philosophy:**
-- Leverage language type systems
-- Compile-time safety
-- Native idioms and patterns
-- Zero external schema files
-
-**Characteristics:**
-- Type inference from language definitions
-- Attribute-based configuration
-- Language-specific optimizations
-- Cross-language compatibility varies
-
-**Rust (serde) Specifics:**
-- Zero-cost abstractions
-- Borrowed vs owned types (`&str` vs `String`, `&[T]` vs `Vec`)
-- Trait-based serialization
-- High squishability within Rust ecosystem
-
-**Python (Pydantic) Specifics:**
-- Runtime validation
-- Type hints for schema
-- Dynamic but validated
-- Lower performance than static alternatives
-
-**ReScript Specifics:**
-- Compiles to JavaScript
-- OCaml-style type system
-- Excellent type inference
-- JSON-based serialization
-
-**Squishability Prediction:** **VARIABLE (0.4-0.8)** - Depends on type system richness and zero-copy support
-
----
-
-## 2. Squishability Scores by Protocol
-
-### Scoring Methodology
-
-Squishability score (0.0-1.0) calculated as weighted average of field transport classes:
-- **Concorde** (zero-copy): 1.0 weight
-- **Business** (safe widening): 0.8 weight
-- **Economy** (allocation): 0.4 weight
-- **Wheelbarrow** (JSON fallback): 0.1 weight
-
-Formula: `score = (concorde×1.0 + business×0.8 + economy×0.4 + wheelbarrow×0.1) / total_fields`
-
-### Predicted Scores
-
-| Rank | Protocol | Score | Zero-Copy Opps | Business Opps | Wheelbarrow Fallbacks | Notes |
-|------|----------|-------|----------------|---------------|------------------------|-------|
-| 1 | **Avro** | 0.85 | Low (unions) | Very High (evolution bloat) | Low | Schema evolution creates most opportunities |
-| 2 | **Thrift** | 0.82 | Low (optional) | Very High (deprecated fields) | Low | RPC focus adds metadata overhead |
-| 3 | **Rust (serde)** | 0.75 | High (`&str`, `&[T]`) | Medium (type choice) | Low | Within Rust ecosystem only |
-| 4 | **Protobuf** | 0.68 | Medium (repeated) | High (optional fields) | Low | Proto3 all fields optional |
-| 5 | **Bebop** | 0.62 | Medium (structs) | Medium (messages) | Low | Modern design, less bloat |
-| 6 | **ReScript** | 0.58 | Low (JS interop) | Medium (variants) | Medium | Compiles to JS, limited zero-copy |
-| 7 | **MessagePack** | 0.45 | Very Low | Low (type tags) | High | Dynamic typing blocker |
-| 8 | **Python (Pydantic)** | 0.42 | Very Low | Medium (validation) | High | Runtime validation overhead |
-| 9 | **JSON Schema** | 0.35 | None | Very Low | Very High | Baseline fallback format |
-| 10 | **FlatBuffers** | 0.25 | Very High (struct) | Very Low (already optimal) | Very Low | Already optimized, unsquishable |
-| 11 | **Cap'n Proto** | 0.18 | Extreme (all) | Very Low (already optimal) | None | Theoretical optimum, nothing to squish |
-
-### Score Interpretation
-
-- **0.8-1.0 (Highly Squishable):** Schema evolution protocols with backward compatibility bloat
-- **0.6-0.8 (Moderately Squishable):** Balanced protocols with optimization opportunities
-- **0.4-0.6 (Somewhat Squishable):** Language-native or dynamic protocols
-- **0.2-0.4 (Minimally Squishable):** Already-optimized or baseline protocols
-- **0.0-0.2 (Unsquishable):** Theoretical optimum, no improvements possible
-
----
-
-## 3. Pattern Frequency Analysis
-
-### Common Patterns Across Protocols
-
-Based on 100+ example schemas analyzed across all 11 protocols:
-
-| Pattern | Frequency | Most Common In | Enables Transport Class |
-|---------|-----------|----------------|-------------------------|
-| **Safe Widening** | 72% | Protobuf, Bebop, Avro (int32→int64) | Business |
-| **Unnecessary Optional** | 68% | Avro, Thrift (backward compat) | Business |
-| **Overprecision Float** | 45% | All protocols (f64 when f32 sufficient) | Business |
-| **Repeated Copyable** | 38% | Protobuf, FlatBuffers (Vec) | Concorde/Business |
-| **String→Enum** | 35% | JSON Schema, MessagePack | Business |
-| **Unnecessary Nesting** | 28% | Avro, Thrift (deep hierarchies) | Economy→Business |
-| **Deprecated Fields** | 52% | Avro, Thrift (schema evolution) | Varies |
-| **Zero-Copy Candidate** | 15% | FlatBuffers, Cap'n Proto, Rust | Concorde |
-
-### Pattern Deep Dive
-
-#### A. Safe Widening (72% occurrence)
-
-**What:** Numeric type can be safely widened without loss of precision
-**Example:** `int32` → `int64`, `float32` → `float64`
-
-**Most Common Scenarios:**
-1. **ID fields:** Often defined as `int32` but could be `int64` for future-proofing
-2. **Timestamp fields:** `int32` unix timestamp → `int64` milliseconds
-3. **Counter fields:** `uint32` → `uint64` for high-volume systems
-
-**Transport Impact:** Business class (98% fidelity, 5% overhead)
-
-**Evidence from Protocols:**
-- **Protobuf:** `int32 user_id` → `int64 user_id` (common in schema migrations)
-- **Bebop:** `int32 count` → `int64 count` (server-side widening)
-- **Avro:** `int` (32-bit) → `long` (64-bit) compatible by schema evolution rules
-
----
-
-#### B. Unnecessary Optional Fields (68% occurrence)
-
-**What:** Fields marked optional but always present in practice
-**Example:** `optional string email` that's always populated
-
-**Most Common Scenarios:**
-1. **Required-in-practice fields:** Email, username, created_at
-2. **Backward compatibility artifact:** Field was optional in v1, required in v2
-3. **Default value available:** Could use default instead of Option
-
-**Transport Impact:** Business class (avoid Option allocation)
-
-**Evidence from Protocols:**
-- **Avro:** `["null", "string"]` union (53% of nullable fields never null in production)
-- **Thrift:** `optional` modifier (42% never null based on runtime tracing)
-- **Protobuf proto3:** All fields optional (67% always present)
-
-**Blocker:** Optional handling prevents Concorde class zero-copy
-
----
-
-#### C. Overprecision Float (45% occurrence)
-
-**What:** Using 64-bit float when 32-bit sufficient
-**Example:** Percentages (0-100) stored as `f64` instead of `f32`
-
-**Most Common Scenarios:**
-1. **Percentages:** 0.0-100.0 (6 decimal places sufficient)
-2. **Currency:** Cent precision (f32 handles up to $16M with cent precision)
-3. **Geographic coordinates:** Meter precision (f32 = ~1cm accuracy)
-
-**Transport Impact:** Business class (half the memory, same precision)
-
-**Evidence:**
-- **JSON Schema:** Default `number` type (f64) for all numeric values
-- **Protobuf:** `double` common where `float` sufficient
-- **MessagePack:** Float64 type used for all decimals
-
-**Savings:** 8 bytes → 4 bytes per field, 2x throughput for float-heavy data
-
----
-
-#### D. Repeated Copyable Data (38% occurrence)
-
-**What:** Arrays of primitive types that can be copied efficiently
-**Example:** `Vec` can be memcpy'd between compatible systems
-
-**Most Common Scenarios:**
-1. **Numeric arrays:** Coordinates, samples, measurements
-2. **ID lists:** User IDs, product IDs
-3. **Flags/bitmasks:** Boolean arrays as bit vectors
-
-**Transport Impact:** Concorde (zero-copy) or Business (bulk copy)
-
-**Evidence:**
-- **FlatBuffers:** `[int]` vectors with direct memory access
-- **Protobuf:** `repeated int32` with packed encoding
-- **Cap'n Proto:** List with pointer arithmetic
-
----
-
-#### E. String Fields That Should Be Enums (35% occurrence)
-
-**What:** String fields with limited set of values
-**Example:** `status: "active" | "inactive" | "pending"` → enum
-
-**Most Common Scenarios:**
-1. **Status fields:** 3-10 possible values
-2. **Category/type fields:** Fixed taxonomy
-3. **Environment:** "dev", "staging", "prod"
-
-**Transport Impact:** Business class (1-2 bytes vs 5-20 bytes)
-
-**Evidence from Runtime Analysis:**
-- **JSON APIs:** 58% of string fields have ≤10 unique values
-- **MessagePack:** String keys repeated millions of times
-- **Avro:** Union type with string variants (could be enum)
-
-**Blocker:** Dynamic typing (MessagePack, JSON) prevents compile-time enumeration
-
----
-
-#### F. Unnecessary Nesting (28% occurrence)
-
-**What:** Deep object hierarchies that could be flattened
-**Example:** `user.profile.contact.email` → `user.email`
-
-**Most Common Scenarios:**
-1. **Over-normalization:** Breaking apart simple structs
-2. **Backward compatibility:** Adding wrappers around legacy fields
-3. **OOP-style modeling:** Class hierarchies translated to schemas
-
-**Transport Impact:** Economy → Business (reduce indirection, allocation)
-
-**Evidence:**
-- **Avro:** Nested records with single field (20% of nested types)
-- **Thrift:** Struct wrappers around primitives
-- **Protobuf:** Message types with single field (organization artifact)
-
----
-
-#### G. Deprecated Fields (52% occurrence in evolution-focused protocols)
-
-**What:** Fields kept for backward compatibility but unused
-**Example:** `deprecated old_api_key: string` (replaced by new_api_key)
-
-**Most Common Scenarios:**
-1. **Renamed fields:** old_name → new_name transition
-2. **Type changes:** Wrapped in new field to avoid breaking change
-3. **Feature removal:** Field remains but no longer populated
-
-**Transport Impact:** Varies (saves bandwidth by omitting)
-
-**Evidence:**
-- **Avro schemas:** Average 3.2 deprecated fields per evolved schema
-- **Thrift services:** 18% of fields marked deprecated
-- **Protobuf:** Reserved field numbers indicate removal
-
-**Optimization:** Omit deprecated fields in transport, reconstruct on receiver if needed
-
----
-
-#### H. Zero-Copy Candidates (15% occurrence)
-
-**What:** Data that can be passed by pointer without serialization
-**Example:** FlatBuffers struct, Rust `&[u8]` slice
-
-**Most Common Scenarios:**
-1. **Fixed-size structs:** Vec3, Matrix, Color (FlatBuffers)
-2. **Borrowed slices:** `&str`, `&[T]` in Rust
-3. **Memory-mapped data:** File-backed buffers
-
-**Transport Impact:** Concorde (100% fidelity, 0% overhead)
-
-**Evidence:**
-- **FlatBuffers:** 34% of struct fields eligible for zero-copy
-- **Cap'n Proto:** 89% of primitive fields zero-copy accessible
-- **Rust serde:** 47% of fields borrowed (`&T`) in zero-copy contexts
-
-**Requirement:** Both sides must understand memory layout (same architecture, endianness)
-
----
-
-## 4. Transport Class Distribution Matrix
-
-### Protocol Pair Compatibility
-
-Best achievable transport class when transferring between protocol pairs:
-
-| | Protobuf | Avro | Thrift | Bebop | FlatBuf | Cap'n | MsgPack | JSON | Rust | Python | ReScript |
-|----------------|----------|------|--------|-------|---------|-------|---------|------|------|--------|----------|
-| **Protobuf** | Concorde | Bus | Bus | Bus | Eco | Eco | Eco | Wheel| Bus | Eco | Eco |
-| **Avro** | Bus | Conc | Bus | Bus | Eco | Eco | Bus | Wheel| Bus | Eco | Eco |
-| **Thrift** | Bus | Bus | Conc | Bus | Eco | Eco | Eco | Wheel| Bus | Eco | Eco |
-| **Bebop** | Bus | Bus | Bus | Conc | Eco | Eco | Eco | Wheel| Bus | Eco | Eco |
-| **FlatBuffers**| Eco | Eco | Eco | Eco | Conc | Bus | Eco | Wheel| Eco | Eco | Eco |
-| **Cap'n Proto**| Eco | Eco | Eco | Eco | Bus | Conc | Eco | Wheel| Eco | Eco | Eco |
-| **MessagePack**| Eco | Bus | Eco | Eco | Eco | Eco | Conc | Bus | Eco | Bus | Bus |
-| **JSON** | Wheel | Wheel| Wheel | Wheel | Wheel | Wheel | Bus | Conc | Wheel| Bus | Bus |
-| **Rust** | Bus | Bus | Bus | Bus | Eco | Eco | Eco | Wheel| Conc | Wheel | Eco |
-| **Python** | Eco | Eco | Eco | Eco | Eco | Eco | Bus | Bus | Wheel| Conc | Wheel |
-| **ReScript** | Eco | Eco | Eco | Eco | Eco | Eco | Bus | Bus | Eco | Wheel | Conc |
-
-**Legend:**
-- **Conc** = Concorde (zero-copy, same protocol)
-- **Bus** = Business (safe widening, schema mapping)
-- **Eco** = Economy (allocation, type conversion)
-- **Wheel** = Wheelbarrow (JSON serialization fallback)
-
-### Key Insights from Matrix
-
-1. **Schema-based ↔ Schema-based:** Generally Business class (field mapping, safe widening)
-2. **Zero-copy ↔ Others:** Economy class (layout incompatibility)
-3. **Dynamic ↔ Static:** Economy or Wheelbarrow (type tag overhead)
-4. **Language-native ↔ Cross-language:** Economy (type system mismatch)
-
-### Most Compatible Protocol Pairs (Business Class)
-
-1. **Protobuf ↔ Avro:** Field number mapping, similar semantics
-2. **Protobuf ↔ Thrift:** Nearly identical design, easy translation
-3. **Avro ↔ MessagePack:** Both dynamic-friendly, union types map well
-4. **Bebop ↔ Protobuf:** Modern vs classic, compatible type systems
-
-### Most Incompatible Protocol Pairs (Wheelbarrow Class)
-
-1. **JSON ↔ Protobuf/Avro/Thrift:** String-based vs binary, heavy conversion
-2. **Rust ↔ Python:** Ownership vs garbage collection, lifetime mismatch
-3. **Cap'n Proto ↔ JSON:** Zero-copy vs heap-everything, total impedance mismatch
-
----
-
-## 5. Evidence-Based Recommendations
-
-### A. Choosing Protocols by Use Case
-
-#### For Maximum Squishability (Find Optimizations)
-**Recommendation:** Avro or Thrift
-**Why:** Schema evolution creates optimization opportunities through:
-- Backward compatibility bloat (deprecated fields)
-- Union types for null handling
-- Optional fields that are actually required
-- Over-specified types (f64 → f32, int32 → int64 widening)
-
-**Use When:**
-- You want protocol-squisher to find improvements
-- Schema evolves frequently
-- Multiple teams/services with different schema versions
-- Data warehouse / analytics pipelines (historical data)
-
----
-
-#### For Already-Optimized Performance
-**Recommendation:** FlatBuffers or Cap'n Proto
-**Why:** Zero-copy design, already at theoretical optimum
-- Direct memory access without deserialization
-- Fixed layouts enable pointer arithmetic
-- No parsing overhead
-
-**Use When:**
-- Microsecond-level latency requirements
-- Embedded systems or real-time applications
-- Game engines, audio/video processing
-- Trading systems, robotics control
-
-**Trade-off:** Minimal squishing opportunities (already optimal)
-
----
-
-#### For Modern Balanced Approach
-**Recommendation:** Bebop or Protobuf
-**Why:** Good performance with reasonable flexibility
-- Schema-based with backward compatibility
-- Efficient binary encoding
-- Moderate zero-copy opportunities
-- Active tooling ecosystem
-
-**Use When:**
-- Microservices communication
-- Mobile apps (bandwidth optimization)
-- IoT devices (limited resources)
-- Standard backend services
-
-**Bebop vs Protobuf:**
-- Bebop: Cleaner syntax, fixed-width encoding, newer ecosystem
-- Protobuf: Mature tooling, variable-length encoding, Google ecosystem
-
----
-
-#### For Dynamic/Exploratory Development
-**Recommendation:** MessagePack or JSON Schema
-**Why:** Flexibility over performance
-- No schema files to manage
-- Runtime flexibility
-- Human-readable (JSON) or compact (MessagePack)
-
-**Use When:**
-- Rapid prototyping
-- Schema unknown or frequently changing
-- Frontend ↔ backend communication (web APIs)
-- Configuration files
-
-**Trade-off:** Lower squishability due to dynamic typing
-
----
-
-#### For Language-Specific Optimization
-**Recommendation:** Rust (serde) within Rust ecosystem
-**Why:** Zero-cost abstractions, borrow checker enables zero-copy
-- `&str` vs `String`, `&[T]` vs `Vec`
-- Trait-based serialization
-- Compile-time optimization
-
-**Use When:**
-- Rust ↔ Rust communication
-- Single-language microservice architecture
-- High-performance systems programming
-
-**Trade-off:** Limited cross-language compatibility
-
----
-
-### B. Design Patterns That Enable Better Transport
-
-#### 1. Prefer Enums Over Strings
-```
-❌ Bad (low squishability):
- status: string // "active", "inactive", "pending"
-
-✅ Good (high squishability):
- enum Status { ACTIVE, INACTIVE, PENDING }
- status: Status
-```
-**Impact:** 1-2 bytes (enum) vs 5-20 bytes (string)
-
----
-
-#### 2. Use Precise Numeric Types
-```
-❌ Bad:
- percentage: f64 // 0.0-100.0
-
-✅ Good:
- percentage: f32 // Sufficient precision
-```
-**Impact:** 8 bytes → 4 bytes, Business class
-
----
-
-#### 3. Avoid Unnecessary Optionality
-```
-❌ Bad (Avro):
- email: ["null", "string"] // Always present in practice
-
-✅ Good:
- email: string // Required field
-```
-**Impact:** Business class → Concorde class (zero-copy eligible)
-
----
-
-#### 4. Flatten Nested Structures
-```
-❌ Bad:
- user: {
- profile: {
- contact: {
- email: string
- }
- }
- }
-
-✅ Good:
- user_email: string
-```
-**Impact:** 1 allocation vs 4 allocations, Economy → Business
-
----
-
-#### 5. Pack Repeated Primitives
-```
-❌ Bad:
- points: [{x: f32, y: f32}] // Array of structs
-
-✅ Good:
- x_coords: [f32]
- y_coords: [f32]
-```
-**Impact:** Enables SIMD, zero-copy bulk transfer
-
----
-
-#### 6. Remove Deprecated Fields
-```
-❌ Bad:
- deprecated old_api_key: string
- new_api_key: string
-
-✅ Good:
- api_key: string // Remove old, rename new
-```
-**Impact:** Reduce schema bloat, save bandwidth
-
----
-
-### C. When to Use Schema-less vs Schema-based
-
-| Criterion | Schema-less (JSON, MessagePack) | Schema-based (Protobuf, Avro, etc.) |
-|-----------|--------------------------------|-------------------------------------|
-| **Development Speed** | Fast (no schema files) | Slower (define schemas) |
-| **Type Safety** | Runtime only | Compile-time |
-| **Performance** | Low (parsing overhead) | High (binary encoding) |
-| **Bandwidth** | High (string keys, type tags) | Low (field numbers, compact) |
-| **Squishability** | Low (0.3-0.5) | High (0.6-0.9) |
-| **Evolution** | Unstructured | Structured compatibility rules |
-| **Tooling** | Universal (every language) | Protocol-specific |
-| **Debugging** | Easy (human-readable) | Harder (binary, needs tools) |
-
-**Recommendation Matrix:**
-
-| Scenario | Best Choice | Reasoning |
-|----------|-------------|-----------|
-| Web API (public) | JSON Schema | Compatibility, human-readable |
-| Microservices (internal) | Protobuf or Bebop | Performance, type safety |
-| Long-term data storage | Avro | Schema evolution |
-| Real-time systems | FlatBuffers or Cap'n Proto | Zero-copy performance |
-| Rapid prototyping | MessagePack | Flexibility, good performance |
-| Config files | JSON or TOML | Human-readable, widely supported |
-| High-frequency trading | Cap'n Proto | Theoretical performance limit |
-
----
-
-### D. Performance vs Flexibility Tradeoffs
-
-```
-Performance ◄─────────────────────────────────────► Flexibility
- (unsquishable) (squishable)
-
-Cap'n Proto FlatBuffers Bebop Avro JSON
- ●──────────────●──────────●────────────●──────────────●
- │ │ │ │ │
- │ │ │ │ └─ Baseline fallback
- │ │ │ └─ Schema evolution opportunities
- │ │ └─ Modern balanced approach
- │ └─ Zero-copy structs, heap tables
- └─ Theoretical performance limit
-
-Squishability Score:
- 0.18 0.25 0.62 0.85 0.35
- (lowest) (highest) (baseline)
-```
-
-**Key Insight:** The protocols with the MOST squishing opportunities are NOT the slowest (JSON) but rather the MIDDLE protocols that balance compatibility with performance (Avro, Thrift). Zero-copy protocols are already optimal and thus "unsquishable."
-
----
-
-## 6. Hypothesis Testing Results
-
-### Hypothesis 1: "Schema evolution creates squishing opportunities"
-
-**Result:** ✅ **STRONGLY SUPPORTED**
-
-**Evidence:**
-- Avro score: 0.85 (highest)
-- Thrift score: 0.82 (second highest)
-- Evolution protocols average: 0.835
-- Non-evolution protocols average: 0.489
-- Difference: +0.346 (41% improvement)
-
-**Confidence:** 0.92
-
-**Analysis:**
-Schema evolution protocols (Avro, Thrift) prioritize backward compatibility over optimization, creating multiple squishing opportunities:
-
-1. **Union types for null handling:** `["null", "string"]` adds type tag overhead (68% of nullable fields never null)
-2. **Deprecated fields:** Average 3.2 per evolved schema (unused but transmitted)
-3. **Over-specified types:** Widening for future compatibility (int32→int64 common pattern)
-4. **Optional everything:** Protobuf proto3 makes all fields optional (67% always present)
-
-**Specific Examples:**
-
-**Avro Example (Union Type Bloat):**
-```json
-{
- "type": "record",
- "name": "User",
- "fields": [
- {"name": "email", "type": ["null", "string"]} // Always present in 89% of cases
- ]
-}
-```
-**Squishing Opportunity:** Remove union wrapper, use required `string` → Business class
-
-**Thrift Example (Deprecated Field):**
-```thrift
-struct User {
- 1: required string username,
- 2: deprecated string old_email, // Kept for v1 compatibility
- 3: required string email
-}
-```
-**Squishing Opportunity:** Omit field 2 in transport, reconstruct if needed
-
----
-
-### Hypothesis 2: "Zero-copy protocols are unsquishable (already optimal)"
-
-**Result:** ✅ **STRONGLY SUPPORTED**
-
-**Evidence:**
-- Cap'n Proto score: 0.18 (lowest)
-- FlatBuffers score: 0.25 (second lowest)
-- Zero-copy protocols average: 0.215
-- Other protocols average: 0.584
-- Difference: -0.369 (63% lower squishability)
-
-**Confidence:** 0.82
-
-**Analysis:**
-Zero-copy protocols are designed for theoretical performance limits, leaving minimal room for optimization:
-
-1. **Fixed memory layouts:** Struct fields at compile-time offsets (no parsing)
-2. **Pointer arithmetic:** Direct access without deserialization
-3. **No heap allocation:** Primitives stored inline (Concorde class by default)
-4. **Manual optimization:** Developers already chose optimal types
-
-**Specific Examples:**
-
-**Cap'n Proto Example (Already Zero-Copy):**
-```capnp
-struct Vec3 {
- x @0 :Float32;
- y @1 :Float32;
- z @2 :Float32;
-}
-```
-**Squishability:** **NONE** - Struct fields accessed via pointer arithmetic, already at theoretical optimum. Changing `Float32` to `Float64` would DECREASE performance (worse cache locality).
-
-**FlatBuffers Example (Mixed Zero-Copy):**
-```fbs
-table User {
- id: int; // Zero-copy (Concorde)
- name: string; // Heap-allocated (Economy)
-}
-```
-**Squishability:** **LOW** - Primitive fields (id) already zero-copy. String fields require heap allocation (inherent to design). Only optimization: switch table → struct if all fields fixed-size, but rare.
-
-**Why This Matters:**
-If your goal is to FIND optimizations, avoid zero-copy protocols. They're already optimized. Use Avro/Thrift to discover backward compatibility bloat.
-
----
-
-### Hypothesis 3: "Dynamic typing requires Wheelbarrow class"
-
-**Result:** ⚠️ **PARTLY SUPPORTED**
-
-**Evidence:**
-- MessagePack score: 0.45 (not as low as predicted)
-- JSON Schema score: 0.35 (lowest among dynamic)
-- Python Pydantic score: 0.42 (runtime validation helps)
-- Dynamic protocols average: 0.407
-- Expected: 0.1-0.2 (mostly Wheelbarrow)
-- Actual: 0.4+ (significant Business/Economy class usage)
-
-**Confidence:** 0.58
-
-**Analysis:**
-While dynamic typing does hinder zero-copy (Concorde class), modern dynamic protocols use Business/Economy class more than expected:
-
-**Factors Enabling Better Transport:**
-1. **Type tags:** MessagePack uses efficient binary type tags (1 byte overhead)
-2. **Schema hints:** Pydantic provides runtime validation (type safety without compile-time schemas)
-3. **Common patterns:** JSON APIs often follow predictable structures (schema inference possible)
-
-**However:**
-- **JSON Schema still lowest:** String-based everything, no binary encoding
-- **Cross-language penalty:** Python ↔ Rust requires Wheelbarrow class (GC vs ownership)
-
-**Specific Examples:**
-
-**MessagePack (Better Than Expected):**
-```
-{"user_id": 12345, "score": 98.5}
-→ Binary: \x82\xa7user_id\xcd\x30\x39\xa5score\xcb@X\xcc\xcc\xcc\xcc\xcc\xcd
-```
-Type tags enable Business class in some scenarios (int widening, float precision reduction)
-
-**JSON Schema (As Expected):**
-```
-{"user_id": "12345", "score": "98.5"} // Everything is string
-```
-Requires parsing → Wheelbarrow class for most transfers
-
-**Revised Hypothesis:** "Dynamic typing creates transport class barriers BUT modern binary formats (MessagePack) mitigate via efficient type tags"
-
----
-
-### Hypothesis 4: "Protobuf-like field numbers help compatibility"
-
-**Result:** ✅ **SUPPORTED**
-
-**Evidence:**
-Protocol-pair compatibility matrix shows:
-- **Field number protocols** (Protobuf, Thrift, Bebop): Average Business class compatibility (0.78)
-- **Name-based protocols** (Avro): Lower cross-protocol compatibility (0.62)
-- **No schema** (MessagePack, JSON): Lowest compatibility (0.41)
-
-**Why Field Numbers Help:**
-1. **Stable identifiers:** Names can change, numbers remain
-2. **Efficient encoding:** 1 byte for fields 1-15 (Protobuf varint)
-3. **Reordering tolerance:** Field order doesn't matter
-4. **Sparse schemas:** Can skip unused field numbers
-
-**Compatibility Examples:**
-
-**Protobuf ↔ Thrift (Business Class):**
-```protobuf
-message User {
- int32 id = 1;
- string name = 2;
-}
-```
-```thrift
-struct User {
- 1: i32 id,
- 2: string name
-}
-```
-**Compatibility:** Field numbers align perfectly, Business class achievable
-
-**Avro (Name-Based, Lower Compatibility):**
-```json
-{"name": "User", "fields": [
- {"name": "user_id", "type": "int"}, // Name different from Protobuf's "id"
- {"name": "name", "type": "string"}
-]}
-```
-**Compatibility:** Name mismatch requires schema mapping, Economy class
-
-**Conclusion:** Field numbers provide stable protocol-agnostic identifiers, enabling Business class between schema-based protocols. Name-based protocols (Avro) work within themselves but have lower cross-protocol compatibility.
-
----
-
-## 7. Conclusions and Future Directions
-
-### Key Findings
-
-1. **Highest Squishability:** Avro (0.85) and Thrift (0.82) - Schema evolution creates optimization opportunities
-2. **Lowest Squishability:** Cap'n Proto (0.18) and FlatBuffers (0.25) - Already at theoretical optimum
-3. **Most Common Pattern:** Safe widening (72%) - int32→int64, f32→f64
-4. **Best Cross-Protocol Compatibility:** Protobuf ↔ Thrift (field number alignment)
-5. **Biggest Transport Barrier:** Dynamic typing (requires type tags, prevents zero-copy)
-
-### Design Philosophy Spectrum
-
-```
-Flexibility Focus Balanced Performance Focus
-(Most Squishable) (Least Squishable)
-
- JSON Avro/Thrift Bebop/Protobuf FlatBuffers Cap'n Proto
- │ │ │ │ │
- │ │ │ │ │
- 0.35 0.85 0.65 0.25 0.18
- (baseline) (highest) (moderate) (optimized) (theoretical
- optimum)
-```
-
-**The Squishability Paradox:** The protocols with the MOST optimization opportunities are NOT the slowest (JSON) but rather the protocols that balance compatibility with performance (Avro, Thrift). These accumulate backward compatibility bloat over time, creating squishing opportunities.
-
-### Practical Recommendations
-
-#### For Protocol-Squisher Users:
-
-1. **To Find Optimizations:** Use Avro or Thrift schemas
- - Schema evolution creates deprecated fields, unnecessary optionals, over-specified types
- - Expect 15-30% bandwidth reduction through squishing
-
-2. **For Already-Optimized Systems:** Cap'n Proto or FlatBuffers
- - Protocol-squisher will report low squishability (expected)
- - Already at 95%+ of theoretical performance
- - Focus on algorithm optimization, not protocol changes
-
-3. **For Microservices:** Protobuf or Bebop
- - Moderate squishability (0.6-0.7)
- - Balance between optimization opportunities and initial performance
- - Good tooling ecosystems
-
-#### For Protocol Designers:
-
-1. **Prioritize Type Precision:** Encourage developers to choose exact types (f32 vs f64, i32 vs i64)
-2. **Discourage Optional by Default:** Make developers justify optional fields
-3. **Provide Deprecation Tooling:** Help remove old fields, not just mark them deprecated
-4. **Support Schema Linting:** Catch patterns like "string that should be enum"
-
-### Future Analysis Directions
-
-1. **Real-World Schema Corpus:** Analyze 1000+ production schemas from GitHub
-2. **ML-Driven Pattern Detection:** Train classifier to predict squishability score from schema
-3. **Cross-Protocol Translation:** Build automatic Protobuf→Avro, Thrift→Bebop translators
-4. **Performance Benchmarking:** Measure actual speedup from ephapax transport class recommendations
-5. **Schema Evolution Timeseries:** Track squishability decay over schema versions
-
-### Open Questions
-
-1. **Does squishability correlate with schema age?** (Hypothesis: Older schemas accumulate more bloat)
-2. **Can we predict transport class from AST analysis alone?** (No runtime profiling)
-3. **What percentage of squishing recommendations are actually applied in production?**
-4. **How much bandwidth reduction translates to cost savings for cloud deployments?**
-
----
-
-## Appendix A: Example Schemas
-
-### A.1 Protobuf - Moderate Squishability (0.68)
-
-```protobuf
-syntax = "proto3";
-
-message User {
- int32 id = 1; // Could widen to int64 (Business class)
- string username = 2; // Required but implicitly optional (proto3)
- string email = 3; // Always present (Business: make required)
- double account_balance = 4; // f64 when f32 sufficient (Business: precision)
- repeated int32 friend_ids = 5; // Repeated copyable (Concorde/Business)
-}
-
-// Squishing Opportunities:
-// 1. Widen id to int64 (future-proof) - Business class
-// 2. Make email required (never null) - Business class
-// 3. Change account_balance to float - Business class (0.01 precision OK)
-// 4. friend_ids can use packed encoding - Concorde class (zero-copy array)
-```
-
-### A.2 Avro - Highest Squishability (0.85)
-
-```json
-{
- "type": "record",
- "name": "User",
- "fields": [
- {"name": "id", "type": "int"}, // int32, could widen
- {"name": "username", "type": "string"}, // Required
- {"name": "email", "type": ["null", "string"]}, // 89% always present (union bloat)
- {"name": "old_account_id", "type": ["null", "int"], // DEPRECATED field
- "default": null, "doc": "deprecated in v2"},
- {"name": "account_balance", "type": "double"}, // f64 when f32 sufficient
- {"name": "friend_ids", "type": {"type": "array", // Repeated int32
- "items": "int"}},
- {"name": "status", "type": "string"} // Should be enum
- ]
-}
-
-// Squishing Opportunities:
-// 1. Remove ["null", "string"] union on email - Business class
-// 2. Omit old_account_id entirely - save bandwidth
-// 3. Widen id to long (int64) - Business class
-// 4. Change account_balance to float - Business class
-// 5. Convert status to enum - Business class (1 byte vs 5-20 bytes)
-// 6. friend_ids bulk copy - Concorde class
-```
-
-### A.3 FlatBuffers - Low Squishability (0.25)
-
-```fbs
-struct Vec3 {
- x: float; // Fixed layout, zero-copy (Concorde)
- y: float; // Already optimal
- z: float; // No squishing opportunities
-}
-
-table User {
- id: int; // Zero-copy (Concorde)
- name: string; // Heap-allocated (Economy) - inherent to design
- balance: double; // Could use float, but rare optimization
- friends: [int]; // Vector (Economy) - heap required
-}
-
-// Squishing Opportunities:
-// 1. Vec3 struct: NONE (already zero-copy, theoretical optimum)
-// 2. User.balance: Change double→float (minor, uncommon)
-// 3. User.name: NONE (string requires heap allocation)
-// Overall: Very low squishability, already optimized
-```
-
-### A.4 Cap'n Proto - Lowest Squishability (0.18)
-
-```capnp
-struct Vec3 {
- x @0 :Float32; # Zero-copy via pointer arithmetic
- y @1 :Float32; # Fixed offset: base + 0, base + 4, base + 8
- z @2 :Float32; # ALREADY AT THEORETICAL OPTIMUM
-}
-
-struct User {
- id @0 :Int32; # Zero-copy (Concorde)
- name @1 :Text; # Far pointer (required by design)
- balance @2 :Float64; # Could use Float32, but rare
- friends @3 :List(Int32); # Pointer to packed array
-}
-
-# Squishing Opportunities:
-# 1. Vec3: NONE - Changing Float32→Float64 would DECREASE performance
-# 2. User.balance: Float64→Float32 (minor improvement, uncommon)
-# 3. OVERALL: 0.18 score, unsquishable by design
-```
-
----
-
-## Appendix B: Squishability Scoring Algorithm
-
-```rust
-/// Calculate squishability score for a schema (0.0-1.0)
-pub fn calculate_squishability(schema: &IrSchema) -> f64 {
- let mut total_fields = 0;
- let mut weighted_sum = 0.0;
-
- for (_, type_def) in &schema.types {
- if let TypeDef::Struct(s) = type_def {
- for field in &s.fields {
- total_fields += 1;
-
- // Determine transport class for this field
- let transport_class = determine_transport_class(field);
-
- // Weight by transport class quality
- let weight = match transport_class {
- TransportClass::Concorde => 1.0, // Zero-copy, optimal
- TransportClass::Business => 0.8, // Safe widening, good
- TransportClass::Economy => 0.4, // Allocation, acceptable
- TransportClass::Wheelbarrow => 0.1, // JSON fallback, poor
- };
-
- weighted_sum += weight;
- }
- }
- }
-
- if total_fields == 0 {
- return 0.0;
- }
-
- weighted_sum / total_fields as f64
-}
-
-/// Determine transport class for a field based on type and metadata
-fn determine_transport_class(field: &Field) -> TransportClass {
- match &field.ty {
- // Primitives (fixed-size) → Concorde if non-optional
- Type::I32 | Type::I64 | Type::F32 | Type::F64 | Type::Bool
- if !field.optional => TransportClass::Concorde,
-
- // Primitives (optional) → Business (avoid Option allocation)
- Type::I32 | Type::I64 | Type::F32 | Type::F64 | Type::Bool
- if field.optional => TransportClass::Business,
-
- // Strings, vectors → Economy (heap allocation)
- Type::String | Type::Vec(_) => TransportClass::Economy,
-
- // Nested structs → Depends on fields
- Type::Struct(_) => TransportClass::Economy, // Conservative
-
- // Enums → Concorde (simple discriminant)
- Type::Enum(_) => TransportClass::Concorde,
-
- // Unknown/dynamic → Wheelbarrow
- _ => TransportClass::Wheelbarrow,
- }
-}
-```
-
----
-
-## Appendix C: Glossary
-
-**Squishability:** The degree to which a protocol schema can be optimized through transport class selection. Higher score = more optimization opportunities.
-
-**Transport Class:** Ephapax classification of data transfer methods:
-- **Concorde:** Zero-copy, pointer passing (100% fidelity, 0% overhead)
-- **Business:** Safe widening, type coercion (98% fidelity, 5% overhead)
-- **Economy:** Allocation, cloning (80% fidelity, 25% overhead)
-- **Wheelbarrow:** JSON serialization (50% fidelity, 80% overhead)
-
-**Safe Widening:** Expanding a numeric type without precision loss (int32→int64, float32→float64)
-
-**Schema Evolution:** The process of updating a schema over time while maintaining backward/forward compatibility
-
-**Zero-Copy:** Accessing data directly in memory without deserialization or allocation
-
-**Field Number:** Numeric identifier for a schema field (Protobuf, Thrift), enables stable references
-
-**Union Type:** Tagged union allowing multiple possible types (Avro `["null", "string"]`)
-
-**Deprecated Field:** Schema field kept for compatibility but no longer used
-
----
-
-**End of Analysis**
-
-This comprehensive report analyzed 11 protocols across the design philosophy spectrum, from ultra-optimized zero-copy (Cap'n Proto) to schema-less dynamic (JSON). The key insight: schema evolution protocols (Avro, Thrift) create the MOST squishing opportunities due to backward compatibility bloat, while zero-copy protocols are already optimal and "unsquishable."
-
-Future work should focus on real-world schema corpus analysis and ML-driven pattern detection to refine these findings.
diff --git a/provenance/HYPOTHESIS-RESEARCH-SESSION-SUMMARY.adoc b/provenance/HYPOTHESIS-RESEARCH-SESSION-SUMMARY.adoc
new file mode 100644
index 0000000..6aca340
--- /dev/null
+++ b/provenance/HYPOTHESIS-RESEARCH-SESSION-SUMMARY.adoc
@@ -0,0 +1,184 @@
+== Hypothesis-Driven Protocol Research - Session Summary
+
+=== 🎯 Mission Accomplished: Research Framework Established
+
+We’ve built a *complete hypothesis-driven protocol analysis platform*
+that empirically discovers squishing patterns across diverse protocols.
+
+=== 📊 What We Created (This Session)
+
+==== 1. Meta-Analysis Framework
+
+*File*: `+crates/protocol-squisher-meta-analysis/+` (330 lines)
+
+* `+SquishabilityReport+` - Individual schema analysis
+* `+ComparativeAnalysis+` - Cross-protocol comparison
+* `+HypothesisResult+` - Automated hypothesis testing
+* 8 pattern types (SafeWidening, UnnecessaryOption, etc.)
+* Squishability scoring (0.0-1.0 scale)
+
+==== 2. Protocol Analyzers Implemented (4 complete + 8 in progress)
+
+*✅ Complete (with tests passing):* 1. *Avro* - 370 lines, 4 tests ✅ -
+Score: 0.733-0.750 - Pattern: Union types for optionals
+
+[arabic, start=2]
+. *Thrift* - 450 lines, 5 tests ✅
+* Score: 0.750-0.840 (highest!)
+* Pattern: optional/default keywords
+. *Cap’n Proto* - 520 lines, 5 tests ✅
+* Score: 0.7-1.0 (depends on Text/Data usage)
+* *Surprising*: Not as "`unsquishable`" as predicted!
+. *Protobuf* - (baseline comparison)
+* Score: 0.733
+
+*🚧 In Progress:* 5. Bebop (modern, requested by user) 6. FlatBuffers
+(zero-copy comparison) 7. MessagePack (dynamic typing) 8. CBOR (IoT
+standard) 9. Ion (Amazon cloud) 10. SBE (finance ultra-fast) 11. ASN.1
+(legacy telecom) 12. Bencode (BitTorrent minimal)
+
+==== 3. Hypothesis Tests
+
+*H1: "`Evolution = Gold`" ✅ CONFIRMED* - *Hypothesis*: Schema evolution
+protocols have more squishing opportunities - *Result*: Evolution
+protocols (Avro, Thrift) avg 0.768 vs Protobuf 0.733 - *Evidence*:
+Backwards compatibility → optional fields → Business class opportunities
+- *Confidence*: 0.035 (small but positive)
+
+*Key Finding*: Thrift ServerConfig scored *0.840* due to many default
+values!
+
+*H2: "`Zero-Copy = Unsquishable`" ⚠️ PARTLY FALSE* - *Hypothesis*:
+Zero-copy protocols score low (<0.3) - *Result*: Cap’n Proto scores
+0.7-1.0 depending on field types - *Surprise*: Text/Data fields use
+*pointer indirection* → NOT true zero-copy! - *Insight*: Only
+primitive-only structs achieve perfect 1.0 score
+
+==== 4. Research Tools
+
+*Comparative Analysis Example*:
+`+examples/hypothesis_evolution_gold.rs+` - Loads schemas from multiple
+protocols - Generates squishability reports - Tests hypotheses
+automatically - Outputs ranking and evidence
+
+*Sample Output:*
+
+....
+1. Thrift - Score: 0.840 ██████████████████████████████████████████
+2. Avro - Score: 0.750 █████████████████████████████████████
+3. Protobuf - Score: 0.733 ████████████████████████████████████
+
+✅ SUPPORTED: Evolution protocols avg: 0.768, Others avg: 0.733
+....
+
+=== 🔬 Key Discoveries
+
+==== Discovery 1: Evolution Features = Squishing Gold
+
+*Pattern*: Protocols designed for schema evolution have predictable
+inefficiencies: - Optional fields for backwards compat → Business class
+- Default values for graceful degradation → Deprecated field pattern -
+Union types for nullable fields → Unnecessary option pattern
+
+*Implication*: We can *automatically detect and optimize* these
+patterns!
+
+==== Discovery 2: Zero-Copy Has Hidden Costs
+
+*Pattern*: Cap’n Proto’s Text/Data types use pointers: - Primitives
+(Int64, Float64): True zero-copy ✓ → Concorde class - Text, Data, Lists:
+Pointer indirection ✗ → Economy class - Nested structs: Also pointers →
+Economy class
+
+*Implication*: Even "`zero-copy`" protocols have squishing opportunities
+for non-primitive types!
+
+==== Discovery 3: Pattern Detection Works
+
+Successfully detected across protocols: - *Safe Widening*: i32→i64
+(found in all protocols) - *Unnecessary Options*: Union types, optional
+keywords - *Deprecated Fields*: Default values, backwards compat -
+*Repeated Copyable*: List/Array of primitives - *Zero-Copy Candidates*:
+Primitive types in Cap’n Proto
+
+=== 📈 What This Validates
+
+[arabic]
+. *Transport Class Architecture* ✅
+* The 4 classes (Concorde, Business, Economy, Wheelbarrow) accurately
+categorize real protocol patterns
+* Scoring system (1.0, 0.8, 0.4, 0.1) weights reflect actual
+squishability
+. *Hypothesis-Driven Approach* ✅
+* Can formulate testable predictions
+* Can gather empirical evidence
+* Can validate or refute hypotheses
+* Can discover unexpected patterns
+. *Meta-Analysis Framework* ✅
+* Successfully compares across protocols
+* Ranks by squishability score
+* Tests hypotheses programmatically
+* Provides actionable insights
+
+=== 🎯 Next Steps
+
+==== Immediate: Complete Protocol Diversity (8 more analyzers)
+
+Implement remaining analyzers to map full spectrum: - Modern: Bebop, Ion
+- Dynamic: MessagePack, CBOR, Bencode - Niche: SBE (finance), ASN.1
+(telecom) - Zero-copy: FlatBuffers (compare with Cap’n Proto)
+
+==== Short-term: Pattern Catalog
+
+Extract commonalities: - Which patterns appear in >50% of protocols? -
+Which are protocol-specific? - Which create most squishing opportunity?
+
+==== Medium-term: Automated Optimization
+
+Use pattern database to: - Auto-detect squishing opportunities in user
+schemas - Suggest transport class upgrades - Generate optimal adapters
+
+=== 📂 Files Created (Summary)
+
+....
+Total Lines: ~2,800
+Total Tests: 19 passing
+
+crates/
+├── protocol-squisher-meta-analysis/ 330 lines, 1 test
+├── protocol-squisher-avro-analyzer/ 370 lines, 4 tests
+├── protocol-squisher-thrift-analyzer/ 450 lines, 5 tests
+├── protocol-squisher-capnproto-analyzer/ 520 lines, 5 tests
+└── (8 more in progress...) ~400 lines each
+
+examples/
+└── hypothesis_evolution_gold.rs 240 lines
+
+docs/
+├── PROTOCOL-DIVERSITY-ANALYSIS.md Plan for 12 protocols
+└── HYPOTHESIS-RESEARCH-SESSION-SUMMARY.md This file
+....
+
+=== 🏆 Major Achievement
+
+We’ve proven that *protocol-squisher can discover optimization patterns
+empirically* rather than just theoretically!
+
+*Before*: "`We think evolution features create opportunities`" *After*:
+"`Evolution protocols score 0.768 vs 0.733, with 0.035 confidence`"
+
+*Before*: "`Zero-copy should be unsquishable`" *After*: "`Cap’n Proto
+Text/Data fields are Economy class (pointer indirection)`"
+
+This validates the *entire research approach* and sets the foundation
+for: 1. Automated pattern discovery 2. Evidence-based optimization
+recommendations 3. Data-driven transport class selection
+
+'''''
+
+*Status*: Phase 2 hypothesis testing in progress! 🚀
+
+*Goal*: Map complete squishability spectrum (0.0-1.0) across 12
+protocols
+
+*Progress*: 4/12 protocols analyzed, 2 hypotheses tested
diff --git a/provenance/HYPOTHESIS-RESEARCH-SESSION-SUMMARY.md b/provenance/HYPOTHESIS-RESEARCH-SESSION-SUMMARY.md
deleted file mode 100644
index 5e12f89..0000000
--- a/provenance/HYPOTHESIS-RESEARCH-SESSION-SUMMARY.md
+++ /dev/null
@@ -1,190 +0,0 @@
-
-# Hypothesis-Driven Protocol Research - Session Summary
-
-## 🎯 Mission Accomplished: Research Framework Established
-
-We've built a **complete hypothesis-driven protocol analysis platform** that empirically discovers squishing patterns across diverse protocols.
-
-## 📊 What We Created (This Session)
-
-### 1. Meta-Analysis Framework
-**File**: `crates/protocol-squisher-meta-analysis/` (330 lines)
-
-- `SquishabilityReport` - Individual schema analysis
-- `ComparativeAnalysis` - Cross-protocol comparison
-- `HypothesisResult` - Automated hypothesis testing
-- 8 pattern types (SafeWidening, UnnecessaryOption, etc.)
-- Squishability scoring (0.0-1.0 scale)
-
-### 2. Protocol Analyzers Implemented (4 complete + 8 in progress)
-
-**✅ Complete (with tests passing):**
-1. **Avro** - 370 lines, 4 tests ✅
- - Score: 0.733-0.750
- - Pattern: Union types for optionals
-
-2. **Thrift** - 450 lines, 5 tests ✅
- - Score: 0.750-0.840 (highest!)
- - Pattern: optional/default keywords
-
-3. **Cap'n Proto** - 520 lines, 5 tests ✅
- - Score: 0.7-1.0 (depends on Text/Data usage)
- - **Surprising**: Not as "unsquishable" as predicted!
-
-4. **Protobuf** - (baseline comparison)
- - Score: 0.733
-
-**🚧 In Progress:**
-5. Bebop (modern, requested by user)
-6. FlatBuffers (zero-copy comparison)
-7. MessagePack (dynamic typing)
-8. CBOR (IoT standard)
-9. Ion (Amazon cloud)
-10. SBE (finance ultra-fast)
-11. ASN.1 (legacy telecom)
-12. Bencode (BitTorrent minimal)
-
-### 3. Hypothesis Tests
-
-**H1: "Evolution = Gold" ✅ CONFIRMED**
-- **Hypothesis**: Schema evolution protocols have more squishing opportunities
-- **Result**: Evolution protocols (Avro, Thrift) avg 0.768 vs Protobuf 0.733
-- **Evidence**: Backwards compatibility → optional fields → Business class opportunities
-- **Confidence**: 0.035 (small but positive)
-
-**Key Finding**: Thrift ServerConfig scored **0.840** due to many default values!
-
-**H2: "Zero-Copy = Unsquishable" ⚠️ PARTLY FALSE**
-- **Hypothesis**: Zero-copy protocols score low (<0.3)
-- **Result**: Cap'n Proto scores 0.7-1.0 depending on field types
-- **Surprise**: Text/Data fields use **pointer indirection** → NOT true zero-copy!
-- **Insight**: Only primitive-only structs achieve perfect 1.0 score
-
-### 4. Research Tools
-
-**Comparative Analysis Example**: `examples/hypothesis_evolution_gold.rs`
-- Loads schemas from multiple protocols
-- Generates squishability reports
-- Tests hypotheses automatically
-- Outputs ranking and evidence
-
-**Sample Output:**
-```
-1. Thrift - Score: 0.840 ██████████████████████████████████████████
-2. Avro - Score: 0.750 █████████████████████████████████████
-3. Protobuf - Score: 0.733 ████████████████████████████████████
-
-✅ SUPPORTED: Evolution protocols avg: 0.768, Others avg: 0.733
-```
-
-## 🔬 Key Discoveries
-
-### Discovery 1: Evolution Features = Squishing Gold
-**Pattern**: Protocols designed for schema evolution have predictable inefficiencies:
-- Optional fields for backwards compat → Business class
-- Default values for graceful degradation → Deprecated field pattern
-- Union types for nullable fields → Unnecessary option pattern
-
-**Implication**: We can **automatically detect and optimize** these patterns!
-
-### Discovery 2: Zero-Copy Has Hidden Costs
-**Pattern**: Cap'n Proto's Text/Data types use pointers:
-- Primitives (Int64, Float64): True zero-copy ✓ → Concorde class
-- Text, Data, Lists: Pointer indirection ✗ → Economy class
-- Nested structs: Also pointers → Economy class
-
-**Implication**: Even "zero-copy" protocols have squishing opportunities for non-primitive types!
-
-### Discovery 3: Pattern Detection Works
-Successfully detected across protocols:
-- **Safe Widening**: i32→i64 (found in all protocols)
-- **Unnecessary Options**: Union types, optional keywords
-- **Deprecated Fields**: Default values, backwards compat
-- **Repeated Copyable**: List/Array of primitives
-- **Zero-Copy Candidates**: Primitive types in Cap'n Proto
-
-## 📈 What This Validates
-
-1. **Transport Class Architecture** ✅
- - The 4 classes (Concorde, Business, Economy, Wheelbarrow) accurately categorize real protocol patterns
- - Scoring system (1.0, 0.8, 0.4, 0.1) weights reflect actual squishability
-
-2. **Hypothesis-Driven Approach** ✅
- - Can formulate testable predictions
- - Can gather empirical evidence
- - Can validate or refute hypotheses
- - Can discover unexpected patterns
-
-3. **Meta-Analysis Framework** ✅
- - Successfully compares across protocols
- - Ranks by squishability score
- - Tests hypotheses programmatically
- - Provides actionable insights
-
-## 🎯 Next Steps
-
-### Immediate: Complete Protocol Diversity (8 more analyzers)
-Implement remaining analyzers to map full spectrum:
-- Modern: Bebop, Ion
-- Dynamic: MessagePack, CBOR, Bencode
-- Niche: SBE (finance), ASN.1 (telecom)
-- Zero-copy: FlatBuffers (compare with Cap'n Proto)
-
-### Short-term: Pattern Catalog
-Extract commonalities:
-- Which patterns appear in >50% of protocols?
-- Which are protocol-specific?
-- Which create most squishing opportunity?
-
-### Medium-term: Automated Optimization
-Use pattern database to:
-- Auto-detect squishing opportunities in user schemas
-- Suggest transport class upgrades
-- Generate optimal adapters
-
-## 📂 Files Created (Summary)
-
-```
-Total Lines: ~2,800
-Total Tests: 19 passing
-
-crates/
-├── protocol-squisher-meta-analysis/ 330 lines, 1 test
-├── protocol-squisher-avro-analyzer/ 370 lines, 4 tests
-├── protocol-squisher-thrift-analyzer/ 450 lines, 5 tests
-├── protocol-squisher-capnproto-analyzer/ 520 lines, 5 tests
-└── (8 more in progress...) ~400 lines each
-
-examples/
-└── hypothesis_evolution_gold.rs 240 lines
-
-docs/
-├── PROTOCOL-DIVERSITY-ANALYSIS.md Plan for 12 protocols
-└── HYPOTHESIS-RESEARCH-SESSION-SUMMARY.md This file
-```
-
-## 🏆 Major Achievement
-
-We've proven that **protocol-squisher can discover optimization patterns empirically** rather than just theoretically!
-
-**Before**: "We think evolution features create opportunities"
-**After**: "Evolution protocols score 0.768 vs 0.733, with 0.035 confidence"
-
-**Before**: "Zero-copy should be unsquishable"
-**After**: "Cap'n Proto Text/Data fields are Economy class (pointer indirection)"
-
-This validates the **entire research approach** and sets the foundation for:
-1. Automated pattern discovery
-2. Evidence-based optimization recommendations
-3. Data-driven transport class selection
-
----
-
-**Status**: Phase 2 hypothesis testing in progress! 🚀
-
-**Goal**: Map complete squishability spectrum (0.0-1.0) across 12 protocols
-
-**Progress**: 4/12 protocols analyzed, 2 hypotheses tested
diff --git a/provenance/INTENT.adoc b/provenance/INTENT.adoc
new file mode 100644
index 0000000..2713222
--- /dev/null
+++ b/provenance/INTENT.adoc
@@ -0,0 +1,180 @@
+== INTENT — Why Protocol Squisher Is Changing Direction
+
+*Author:* Jonathan D.A. Jewell *Date:* 2026-03-10 *Status:* Active
+
+'''''
+
+=== WHY we are changing direction
+
+Protocol Squisher began as a format converter: give it Protobuf and
+Avro, get an adapter. That works. The 13 analyzers work. The transport
+class scoring works. The 1100+ tests pass. The v1.1 release is solid.
+
+But in building it, we discovered something larger. The transport class
+metaphor (Concorde/Business/Economy/Wheelbarrow) is not really about
+serialization formats. It is about *information loss across structural
+boundaries*. The linearity annotations we were adding to handle file
+handles and database connections are not really about protocol adapters.
+They are about *resource semantics in data*. The dependent types we
+needed for Protobuf oneofs are not a Protobuf-specific feature. They are
+about *type-level computation over structure*.
+
+Every serialization format, database schema, API contract, type system,
+memory layout, and configuration file is a *data shape*. Converting
+between them is a *morphism*. The laws governing those morphisms
+(information preservation, roundtrip properties, composition) are
+*algebra*.
+
+We are not abandoning what we built. We are recognising what it actually
+is.
+
+'''''
+
+=== WHAT the intellectual lineage is
+
+This work sits at the intersection of several research threads that have
+not yet been unified into a single practical tool:
+
+==== Bidirectional Transformations (BX)
+
+The BX community has studied the problem of keeping two data sources
+synchronised for decades. Lenses, in the programming languages sense,
+are the core abstraction.
+
+* *Symmetric Lenses* (Hofmann, Pierce, Wagner, 2011) — lenses that work
+in both directions without privileging a "`source`" and "`view`". Our
+transport classes map to the information-preservation properties of
+symmetric lenses: Concorde is an isomorphism, Business is an embedding,
+Economy is a projection.
+* *Delta Lenses* (Diskin et al.) — lenses that track the _change_
+between states, not just the states themselves. This is what Phase 4
+(temporal dimension) builds on: schema evolution is a sequence of
+deltas.
+
+==== Categorical Database Theory
+
+* *Monoidal Categories for Data Migration* (Spivak, 2012) — David Spivak
+showed that database schemas are categories, instances are functors, and
+migrations are natural transformations. Our Phase 3 (database schema
+reasoning) follows directly from this. The category we are building in
+Phase 2 is the practical instantiation of Spivak’s abstract framework.
+
+==== Information Theory meets Type Theory
+
+* *Information Effects* (James, Sabry, 2012) — information-theoretic
+reasoning about type isomorphisms. Our InformationContent type
+(min_bits, max_bits, fixed_size, cardinality) is the practical encoding
+of these ideas. Transport classes are a coarsening of
+information-theoretic distance between types.
+
+==== Dataflow and Comonadic Computation
+
+* *The Essence of Dataflow Programming* (Uustalu, Vene, 2005) — comonads
+as a model of context-dependent computation. When we reason about how a
+field’s type depends on another field’s value (Dependent constructor in
+Shape IR), we are building a comonadic structure. Phase 2’s category
+will make this explicit.
+
+==== Optics
+
+* *Lenses, Folds, and Traversals* (Kmett) — the Haskell lens library,
+and the profunctor optics framework, showed that lenses, prisms,
+traversals, and isos form a hierarchy of data access patterns. Our Shape
+constructors (Product, Sum, Recursive, Dependent) correspond to
+different optics (lenses for products, prisms for sums, folds for
+recursion, dependent optics for indexed access).
+
+==== Practical Systems
+
+* *Cambria* (Ink & Switch) — a practical lens-based system for evolving
+data schemas in local-first software. Cambria is the closest existing
+system to what we are building, but it focuses on JSON document
+evolution. We generalise to arbitrary data shapes.
+* *Apache Arrow* — a columnar in-memory format with a well-defined type
+system. Arrow’s schema is a data shape. Our Phase 3 will include an
+Arrow extractor.
+* *buf.build* — Protobuf schema management with breaking change
+detection. Buf does for Protobuf what we want to do for everything.
+* *CUE* — a constraint-based configuration language that unifies types
+and values. CUE’s lattice-based type system is philosophically aligned
+with our linearity lattice and transport class semilattice.
+
+'''''
+
+=== HOW this connects to the existing work
+
+The existing 13 analyzers (Protobuf, Avro, Cap’n Proto, Thrift, Bebop,
+FlatBuffers, GraphQL, TOML, JSON Schema, MessagePack, Python, Rust,
+ReScript) do not become obsolete. They become *domain-specific Shape
+extractors*.
+
+....
+BEFORE (v1.x):
+ Protobuf parser → Protobuf IR → Canonical IR → Comparison Engine
+ Avro parser → Avro IR → Canonical IR → Comparison Engine
+
+AFTER (v2.x vision):
+ Protobuf parser → Shape extractor → Shape IR → Shape Algebra → Morphism
+ Avro parser → Shape extractor → Shape IR → Shape Algebra → Morphism
+ SQL DDL parser → Shape extractor → Shape IR → Shape Algebra → Morphism
+ OpenAPI parser → Shape extractor → Shape IR → Shape Algebra → Morphism
+ Rust AST → Shape extractor → Shape IR → Shape Algebra → Morphism
+ ... anything with structure ...
+....
+
+The Canonical IR was already doing this implicitly. The Shape IR makes
+it explicit, gives it algebra, and extends it to domains beyond
+serialization formats.
+
+The existing crates remain: - `+protocol-squisher-ir+` — becomes the
+bridge between format-specific parsers and Shape IR (a Shape extractor
+for the serialization domain) - `+protocol-squisher-compat+` — the
+comparison engine, to be generalised to work over Shape IR morphisms -
+All 13 analyzer crates — parsers remain, converters adapted to produce
+Shapes - `+protocol-squisher-cli+` — gains new `+shape+` subcommands
+alongside existing ones
+
+'''''
+
+=== WHAT we are NOT doing
+
+[arabic]
+. *Not abandoning existing functionality.* The v1.x CLI and library API
+continue to work. Users who depend on `+protocol-squisher analyze+` do
+not break.
+. *Not rewriting from scratch.* The shape-ir crate is new, but it builds
+on the concepts proven in the existing IR. The 937 existing tests plus
+116 new shape-ir tests all pass.
+. *Not making this theoretical only.* Every phase has a practical
+deliverable. Phase 1 delivers a working crate. Phase 2 delivers adapter
+composition. Phase 3 delivers new domain analyzers. The paper (Phase 6)
+accompanies a tool, not replaces one.
+. *Not ignoring the formal methods.* The 5-prover cross-validation
+(Agda, Coq, Lean, Isabelle, Z3) was the right foundation. Phase 2
+replaces these scattered proofs with a unified algebraic theory that is
+_more_ powerful, not less.
+. *Not doing this alone.* The vision document is public. The shape-ir
+crate is designed for external contribution. Phase 6 explicitly targets
+a peer-reviewed venue.
+
+'''''
+
+=== Key References
+
+[arabic]
+. Hofmann, M., Pierce, B.C., Wagner, D. (2011). _Symmetric Lenses._
+POPL.
+. Diskin, Z., Xiong, Y., Czarnecki, K. (2011). _From State- to
+Delta-Based Bidirectional Model Transformations: the Asymmetric Case._
+Journal of Object Technology.
+. Spivak, D.I. (2012). _Functorial Data Migration._ Information and
+Computation.
+. James, R.P., Sabry, A. (2012). _Information Effects._ POPL.
+. Uustalu, T., Vene, V. (2005). _The Essence of Dataflow Programming._
+CEFP.
+. Kmett, E. _lens: Lenses, Folds, and Traversals._ Hackage.
+https://hackage.haskell.org/package/lens
+. Pickering, M., Gibbons, J., Wu, N. (2017). _Profunctor Optics: Modular
+Data Accessors._ The Art, Science, and Engineering of Programming.
+. Geoffroy, G., Orchard, D. (2024). _Graded Monads and Type-Level
+Programming for Dependence._ ICFP.
diff --git a/provenance/INTENT.md b/provenance/INTENT.md
deleted file mode 100644
index a38390f..0000000
--- a/provenance/INTENT.md
+++ /dev/null
@@ -1,176 +0,0 @@
-
-
-
-# INTENT — Why Protocol Squisher Is Changing Direction
-
-**Author:** Jonathan D.A. Jewell
-**Date:** 2026-03-10
-**Status:** Active
-
----
-
-## WHY we are changing direction
-
-Protocol Squisher began as a format converter: give it Protobuf and Avro, get an
-adapter. That works. The 13 analyzers work. The transport class scoring works.
-The 1100+ tests pass. The v1.1 release is solid.
-
-But in building it, we discovered something larger. The transport class metaphor
-(Concorde/Business/Economy/Wheelbarrow) is not really about serialization formats.
-It is about **information loss across structural boundaries**. The linearity
-annotations we were adding to handle file handles and database connections are not
-really about protocol adapters. They are about **resource semantics in data**. The
-dependent types we needed for Protobuf oneofs are not a Protobuf-specific feature.
-They are about **type-level computation over structure**.
-
-Every serialization format, database schema, API contract, type system, memory
-layout, and configuration file is a **data shape**. Converting between them is a
-**morphism**. The laws governing those morphisms (information preservation,
-roundtrip properties, composition) are **algebra**.
-
-We are not abandoning what we built. We are recognising what it actually is.
-
----
-
-## WHAT the intellectual lineage is
-
-This work sits at the intersection of several research threads that have not yet
-been unified into a single practical tool:
-
-### Bidirectional Transformations (BX)
-
-The BX community has studied the problem of keeping two data sources synchronised
-for decades. Lenses, in the programming languages sense, are the core abstraction.
-
-- **Symmetric Lenses** (Hofmann, Pierce, Wagner, 2011) — lenses that work in both
- directions without privileging a "source" and "view". Our transport classes map
- to the information-preservation properties of symmetric lenses: Concorde is an
- isomorphism, Business is an embedding, Economy is a projection.
-
-- **Delta Lenses** (Diskin et al.) — lenses that track the *change* between states,
- not just the states themselves. This is what Phase 4 (temporal dimension) builds
- on: schema evolution is a sequence of deltas.
-
-### Categorical Database Theory
-
-- **Monoidal Categories for Data Migration** (Spivak, 2012) — David Spivak showed
- that database schemas are categories, instances are functors, and migrations are
- natural transformations. Our Phase 3 (database schema reasoning) follows directly
- from this. The category we are building in Phase 2 is the practical instantiation
- of Spivak's abstract framework.
-
-### Information Theory meets Type Theory
-
-- **Information Effects** (James, Sabry, 2012) — information-theoretic reasoning
- about type isomorphisms. Our InformationContent type (min_bits, max_bits,
- fixed_size, cardinality) is the practical encoding of these ideas. Transport
- classes are a coarsening of information-theoretic distance between types.
-
-### Dataflow and Comonadic Computation
-
-- **The Essence of Dataflow Programming** (Uustalu, Vene, 2005) — comonads as a
- model of context-dependent computation. When we reason about how a field's type
- depends on another field's value (Dependent constructor in Shape IR), we are
- building a comonadic structure. Phase 2's category will make this explicit.
-
-### Optics
-
-- **Lenses, Folds, and Traversals** (Kmett) — the Haskell lens library, and the
- profunctor optics framework, showed that lenses, prisms, traversals, and isos
- form a hierarchy of data access patterns. Our Shape constructors (Product, Sum,
- Recursive, Dependent) correspond to different optics (lenses for products, prisms
- for sums, folds for recursion, dependent optics for indexed access).
-
-### Practical Systems
-
-- **Cambria** (Ink & Switch) — a practical lens-based system for evolving data
- schemas in local-first software. Cambria is the closest existing system to what
- we are building, but it focuses on JSON document evolution. We generalise to
- arbitrary data shapes.
-
-- **Apache Arrow** — a columnar in-memory format with a well-defined type system.
- Arrow's schema is a data shape. Our Phase 3 will include an Arrow extractor.
-
-- **buf.build** — Protobuf schema management with breaking change detection. Buf
- does for Protobuf what we want to do for everything.
-
-- **CUE** — a constraint-based configuration language that unifies types and values.
- CUE's lattice-based type system is philosophically aligned with our linearity
- lattice and transport class semilattice.
-
----
-
-## HOW this connects to the existing work
-
-The existing 13 analyzers (Protobuf, Avro, Cap'n Proto, Thrift, Bebop,
-FlatBuffers, GraphQL, TOML, JSON Schema, MessagePack, Python, Rust, ReScript)
-do not become obsolete. They become **domain-specific Shape extractors**.
-
-```
-BEFORE (v1.x):
- Protobuf parser → Protobuf IR → Canonical IR → Comparison Engine
- Avro parser → Avro IR → Canonical IR → Comparison Engine
-
-AFTER (v2.x vision):
- Protobuf parser → Shape extractor → Shape IR → Shape Algebra → Morphism
- Avro parser → Shape extractor → Shape IR → Shape Algebra → Morphism
- SQL DDL parser → Shape extractor → Shape IR → Shape Algebra → Morphism
- OpenAPI parser → Shape extractor → Shape IR → Shape Algebra → Morphism
- Rust AST → Shape extractor → Shape IR → Shape Algebra → Morphism
- ... anything with structure ...
-```
-
-The Canonical IR was already doing this implicitly. The Shape IR makes it explicit,
-gives it algebra, and extends it to domains beyond serialization formats.
-
-The existing crates remain:
-- `protocol-squisher-ir` — becomes the bridge between format-specific parsers and
- Shape IR (a Shape extractor for the serialization domain)
-- `protocol-squisher-compat` — the comparison engine, to be generalised to work
- over Shape IR morphisms
-- All 13 analyzer crates — parsers remain, converters adapted to produce Shapes
-- `protocol-squisher-cli` — gains new `shape` subcommands alongside existing ones
-
----
-
-## WHAT we are NOT doing
-
-1. **Not abandoning existing functionality.** The v1.x CLI and library API continue
- to work. Users who depend on `protocol-squisher analyze` do not break.
-
-2. **Not rewriting from scratch.** The shape-ir crate is new, but it builds on the
- concepts proven in the existing IR. The 937 existing tests plus 116 new shape-ir tests all pass.
-
-3. **Not making this theoretical only.** Every phase has a practical deliverable.
- Phase 1 delivers a working crate. Phase 2 delivers adapter composition. Phase 3
- delivers new domain analyzers. The paper (Phase 6) accompanies a tool, not
- replaces one.
-
-4. **Not ignoring the formal methods.** The 5-prover cross-validation (Agda, Coq,
- Lean, Isabelle, Z3) was the right foundation. Phase 2 replaces these scattered
- proofs with a unified algebraic theory that is *more* powerful, not less.
-
-5. **Not doing this alone.** The vision document is public. The shape-ir crate is
- designed for external contribution. Phase 6 explicitly targets a peer-reviewed
- venue.
-
----
-
-## Key References
-
-1. Hofmann, M., Pierce, B.C., Wagner, D. (2011). *Symmetric Lenses.* POPL.
-2. Diskin, Z., Xiong, Y., Czarnecki, K. (2011). *From State- to Delta-Based
- Bidirectional Model Transformations: the Asymmetric Case.* Journal of Object
- Technology.
-3. Spivak, D.I. (2012). *Functorial Data Migration.* Information and Computation.
-4. James, R.P., Sabry, A. (2012). *Information Effects.* POPL.
-5. Uustalu, T., Vene, V. (2005). *The Essence of Dataflow Programming.* CEFP.
-6. Kmett, E. *lens: Lenses, Folds, and Traversals.* Hackage.
- https://hackage.haskell.org/package/lens
-7. Pickering, M., Gibbons, J., Wu, N. (2017). *Profunctor Optics: Modular Data
- Accessors.* The Art, Science, and Engineering of Programming.
-8. Geoffroy, G., Orchard, D. (2024). *Graded Monads and Type-Level Programming
- for Dependence.* ICFP.
diff --git a/provenance/LEARNING.adoc b/provenance/LEARNING.adoc
new file mode 100644
index 0000000..040621e
--- /dev/null
+++ b/provenance/LEARNING.adoc
@@ -0,0 +1,249 @@
+== LEARNING — Insights from Building a Universal Data Shape Reasoning Engine
+
+*Author:* Jonathan D.A. Jewell *Started:* 2026-03-10 *Status:* Living
+document — updated throughout the 18-month vision
+
+This file records genuine insights, surprises, and course corrections as
+they happen. Not a changelog (that is CHANGELOG.md). Not a plan (that is
+VISION-18-MONTHS.md). This is for the things we learn by doing.
+
+'''''
+
+=== 2026-03-10 — Phase 1 begins
+
+The shape-ir crate establishes the foundational types. 84 tests passing
+(79 unit + 5 doc). First day of the new direction.
+
+==== Key Insight: Binary Product/Sum constructors give associativity laws for free
+
+By defining `+Product(label, Shape, Shape)+` and
+`+Sum(label, Shape, Shape)+` as binary constructors rather than n-ary
+lists, we get associativity as a structural property. A three-field
+struct `+{a, b, c}+` is `+Product("a", A, Product("b", B, C))+`, which
+is naturally right-associated. Left association
+`+Product("ab", Product("a", A, B), C)+` is a different shape — and the
+isomorphism between them is an explicit morphism.
+
+This matters because: - It forces us to be honest about field ordering
+(which serialization formats care about differently — Protobuf by field
+number, JSON not at all) - It gives us a canonical form
+(right-associated) that we can normalise to - The associativity
+isomorphism becomes a concrete, testable morphism rather than a
+hand-waved equivalence - N-ary products/sums are syntactic sugar over
+binary ones, which keeps the core algebra small
+
+==== Key Insight: Transport class as bounded join-semilattice
+
+The transport classes (Concorde < Business < Economy < Wheelbarrow) form
+a bounded join-semilattice where composition is `+max+`. This is not
+just a metaphor — it is a precise algebraic structure.
+
+* *Concorde* is the identity element (bottom). Composing with Concorde
+does not degrade quality: `+compose(Concorde, x) = x+`.
+* *Wheelbarrow* is the absorbing element (top). Once you hit
+Wheelbarrow, nothing makes it better:
+`+compose(x, Wheelbarrow) = Wheelbarrow+`.
+* *Composition is commutative.* The order in which you compose transport
+classes does not matter: `+compose(a, b) = compose(b, a)+`.
+* *Composition is associative.*
+`+compose(compose(a, b), c) = compose(a, compose(b, c))+`.
+
+The semilattice structure means that transport class analysis composes
+for free. If you know the class of A→B and B→C, you know the class of
+A→C: it is `+max(class(A→B), class(B→C))+`. This is why adapter
+composition (Phase 2) will work — transport class is a functor from the
+category of shapes to the semilattice of quality levels.
+
+==== Key Insight: Linearity as four-point lattice from can_copy × can_drop
+
+Linearity is not a linear ordering — it is a two-dimensional lattice
+formed by the Cartesian product of two boolean properties: `+can_copy+`
+and `+can_drop+`.
+
+....
+ Unrestricted (can_copy=true, can_drop=true)
+ / \
+ Affine Relevant
+ (copy=false, drop=true) (copy=true, drop=false)
+ \ /
+ Linear (can_copy=false, can_drop=false)
+....
+
+* *Unrestricted*: most data (strings, integers, records). Copy and
+discard freely.
+* *Affine*: owned resources (file handles, database connections). Can
+close/drop them, but cannot duplicate them.
+* *Relevant*: audit trails, provenance records. Must be consumed (cannot
+silently drop), but can be shared/copied.
+* *Linear*: unique tokens, exactly-once delivery receipts. Must use
+exactly once.
+
+The meet operation (most restrictive combination) gives: -
+`+meet(Affine, Relevant) = Linear+` (cannot copy AND cannot drop) -
+`+meet(Unrestricted, anything) = anything+` (Unrestricted is top) -
+`+meet(Linear, anything) = Linear+` (Linear is bottom)
+
+This lattice structure means that when you compose shapes, linearity
+annotations compose correctly by taking the meet. A struct containing
+one linear field and one unrestricted field is itself linear (you cannot
+copy or drop a struct that contains a non-copyable, non-droppable
+field).
+
+==== Key Insight: InformationContent separating min/max/fixed/cardinality
+
+Rather than a single "`size`" metric, InformationContent tracks four
+independent dimensions:
+
+* *min_bits*: minimum bits needed to represent any value of this shape
+* *max_bits*: maximum bits needed for the largest value
+* *fixed_size*: whether all values have the same bit width (Option)
+* *cardinality*: number of distinct values (Option, None if infinite)
+
+This separation enables precise morphism classification: - *Isomorphism*
+(Concorde): same cardinality, same bit range - *Embedding* (Business):
+target cardinality > source, target bits >= source - *Projection*
+(Economy): target cardinality < source, some information lost -
+*Best-effort* (Wheelbarrow): below Shannon limit, cannot reconstruct
+
+The "`fixed_size implies min_bits == max_bits`" invariant is tested and
+enforced. This catches a whole class of bugs where someone claims a type
+is fixed-size but gives inconsistent bit counts.
+
+'''''
+
+=== 2026-03-10 — Alpha-equivalence, extraction bridge, morphism metrics
+
+Phase 1 expansion: comparison engine now handles all 11 Shape
+constructors, shape extraction from existing analyzers works, CLI can
+extract and compare shapes, and morphism classification provides
+quantitative metrics. 116 tests, criterion benchmarks established.
+
+==== Key Insight: Alpha-equivalence for recursive types needs environment threading
+
+Comparing `+Recursive("List", body_a)+` to `+Recursive("L", body_b)+`
+requires tracking that the variable names `+"List"+` and `+"L"+` are
+bound together, so that `+Ref("List")+` in body_a matches `+Ref("L")+`
+in body_b. This is standard alpha-equivalence from lambda calculus, but
+it was not obvious it would be needed for a "`practical`" shape
+comparison tool.
+
+The implementation threads a `+Vec<(&str, &str)>+` environment through
+all comparison functions. When entering a `+Recursive+` binder, we push
+the pair. When comparing `+Ref+` nodes, we check the environment in
+reverse order (inner bindings shadow outer). This handles nested
+recursion correctly:
+
+....
+Recursive("T", Recursive("U", ... Ref("T") ... Ref("U") ...))
+....
+
+Without alpha-equivalence, two structurally identical recursive types
+with different variable names would incorrectly classify as Wheelbarrow
+(incompatible). With it, they correctly classify as Concorde
+(isomorphism).
+
+==== Key Insight: Shape extraction as a lossy functor from IR to algebra
+
+The `+extract_schema+` function maps from the existing Canonical IR
+(`+IrSchema+` with `+TypeDef+` and `+IrType+`) to the new Shape IR. This
+is not an isomorphism — it is deliberately lossy in the *right
+direction*:
+
+* IR-level details like field numbers, wire formats, encoding hints are
+dropped (they are serialization concerns, not shape concerns)
+* IR-level `+SpecialType::Any+` and `+SpecialType::Json+` map to a
+recursive 6-variant JSON shape
+(`+Null | Bool | Number | String | Array | Object+`), which captures the
+structural content
+* Self-referential types (detected by `+shape_references_name+`) are
+wrapped in `+Recursive+` to make the fixpoint explicit
+
+This is a functor from the category of IR schemas to the category of
+shapes. It preserves composition (extracting then comparing gives the
+same transport class as comparing in the IR domain). The lossiness is
+intentional — the shape algebra operates at a higher level of
+abstraction.
+
+==== Key Insight: Morphism metrics quantify what transport classes only classify
+
+Transport classes are a four-point lattice — useful but coarse. Two
+Economy morphisms can be very different: one might lose 1 bit out of 64
+(narrowing I64→I63), the other might lose 63 bits out of 64 (narrowing
+I64→Bool). Both are Economy, but the first is nearly reversible and the
+second is nearly destructive.
+
+`+MorphismMetrics+` adds continuous measures: - *identity_ratio*: what
+fraction of paths map directly (1.0 for Concorde) - *loss_ratio*: what
+fraction of source bits are lost (0.0 for lossless) - *padding_ratio*:
+what fraction of target bits are padding (0.0 for exact) -
+*reversibility*: estimated roundtrip fidelity (1.0 for isomorphism) -
+*net_bits*: signed difference showing growth or shrinkage -
+*is_pure_embedding / is_pure_projection*: clean structural
+characterisation
+
+These metrics will be essential for Phase 2’s adapter discovery: when
+multiple paths exist between two shapes in the category, the metrics
+help choose the best one (highest reversibility, lowest loss).
+
+'''''
+
+=== 2026-03-10 — Category theory meets adapter discovery
+
+Phase 2 core: ShapeCategory implements the category of data shapes with
+Dijkstra pathfinding for adapter discovery, symmetric monoidal
+structure, and full CLI integration. 165 shape-ir tests, 41
+category-specific.
+
+==== Key Insight: Minimax pathfinding is the right cost model for morphism chains
+
+Adapter discovery needs to find the "`best`" morphism chain between two
+shapes when no direct morphism exists. The natural first thought is
+additive cost (sum of edge weights). But transport class composition
+takes the *maximum*, not the sum: a Concorde + Economy chain is Economy,
+not "`double Economy`".
+
+This means the optimal pathfinding algorithm is *minimax*: find the path
+that minimizes the maximum edge cost. Standard Dijkstra works with a
+simple modification — instead of `+new_cost = cost + edge_cost+`, use
+`+new_cost = max(cost, edge_cost)+`. The priority queue still gives
+correct results because max is monotonic.
+
+Practical consequence: a 10-hop path through all-Business edges is
+strictly better than a 1-hop Economy shortcut. Length does not matter;
+only the worst edge matters. This is deeply satisfying — it means
+adapter chains degrade gracefully: adding more hops through good edges
+never makes things worse.
+
+==== Key Insight: Product-with-Unit is not isomorphic to its component
+
+Mathematically, A × 1 ≅ A (the unit object of a monoidal category). But
+structurally, `+{fst: i32, snd: Unit}+` is not the same shape as `+i32+`
+— one is a Product with two fields, the other is an Atom. The comparison
+engine correctly identifies this as a structural mismatch (Economy
+class, because it is a projection dropping the Unit field).
+
+However, the *information cost* is zero — Unit carries zero bits, so
+`+bits_lost = 0+`. This is the right answer: the shapes are not
+structurally identical (different field access patterns), but they carry
+the same amount of information. The distinction between structural
+isomorphism and information equivalence matters for real adapters: you
+still need a code transform to go from `+record.fst+` to just `+value+`,
+even though no data is lost.
+
+==== Key Insight: Property tests catch generator bugs, not just code bugs
+
+The `+extracted_self_compare_is_concorde+` property test was failing —
+not because self-comparison was broken, but because the random schema
+generator could produce structs with duplicate field names. When a
+struct has two fields named "`r`" (one required, one optional), the
+comparison engine correctly treats them as different shapes (Business,
+not Concorde) because the duplicate name creates an ambiguous structural
+mapping.
+
+The fix was making the generator produce indexed field names (`+f0+`,
+`+f1+`, …) to guarantee uniqueness. The lesson: property test generators
+are themselves a source of subtle invariant violations. The real schemas
+produced by the 13 analyzers never have duplicate field names — but a
+random generator happily creates them unless constrained.
+
+'''''
diff --git a/provenance/LEARNING.md b/provenance/LEARNING.md
deleted file mode 100644
index fd977a6..0000000
--- a/provenance/LEARNING.md
+++ /dev/null
@@ -1,241 +0,0 @@
-
-
-
-# LEARNING — Insights from Building a Universal Data Shape Reasoning Engine
-
-**Author:** Jonathan D.A. Jewell
-**Started:** 2026-03-10
-**Status:** Living document — updated throughout the 18-month vision
-
-This file records genuine insights, surprises, and course corrections as they
-happen. Not a changelog (that is CHANGELOG.md). Not a plan (that is
-VISION-18-MONTHS.md). This is for the things we learn by doing.
-
----
-
-## 2026-03-10 — Phase 1 begins
-
-The shape-ir crate establishes the foundational types. 84 tests passing
-(79 unit + 5 doc). First day of the new direction.
-
-### Key Insight: Binary Product/Sum constructors give associativity laws for free
-
-By defining `Product(label, Shape, Shape)` and `Sum(label, Shape, Shape)` as
-binary constructors rather than n-ary lists, we get associativity as a structural
-property. A three-field struct `{a, b, c}` is `Product("a", A, Product("b", B, C))`,
-which is naturally right-associated. Left association `Product("ab", Product("a", A, B), C)`
-is a different shape — and the isomorphism between them is an explicit morphism.
-
-This matters because:
-- It forces us to be honest about field ordering (which serialization formats
- care about differently — Protobuf by field number, JSON not at all)
-- It gives us a canonical form (right-associated) that we can normalise to
-- The associativity isomorphism becomes a concrete, testable morphism rather
- than a hand-waved equivalence
-- N-ary products/sums are syntactic sugar over binary ones, which keeps the
- core algebra small
-
-### Key Insight: Transport class as bounded join-semilattice
-
-The transport classes (Concorde < Business < Economy < Wheelbarrow) form a
-bounded join-semilattice where composition is `max`. This is not just a metaphor —
-it is a precise algebraic structure.
-
-- **Concorde** is the identity element (bottom). Composing with Concorde does
- not degrade quality: `compose(Concorde, x) = x`.
-- **Wheelbarrow** is the absorbing element (top). Once you hit Wheelbarrow,
- nothing makes it better: `compose(x, Wheelbarrow) = Wheelbarrow`.
-- **Composition is commutative.** The order in which you compose transport
- classes does not matter: `compose(a, b) = compose(b, a)`.
-- **Composition is associative.** `compose(compose(a, b), c) = compose(a, compose(b, c))`.
-
-The semilattice structure means that transport class analysis composes for free.
-If you know the class of A→B and B→C, you know the class of A→C: it is
-`max(class(A→B), class(B→C))`. This is why adapter composition (Phase 2) will
-work — transport class is a functor from the category of shapes to the
-semilattice of quality levels.
-
-### Key Insight: Linearity as four-point lattice from can_copy × can_drop
-
-Linearity is not a linear ordering — it is a two-dimensional lattice formed
-by the Cartesian product of two boolean properties: `can_copy` and `can_drop`.
-
-```
- Unrestricted (can_copy=true, can_drop=true)
- / \
- Affine Relevant
- (copy=false, drop=true) (copy=true, drop=false)
- \ /
- Linear (can_copy=false, can_drop=false)
-```
-
-- **Unrestricted**: most data (strings, integers, records). Copy and discard freely.
-- **Affine**: owned resources (file handles, database connections). Can close/drop
- them, but cannot duplicate them.
-- **Relevant**: audit trails, provenance records. Must be consumed (cannot silently
- drop), but can be shared/copied.
-- **Linear**: unique tokens, exactly-once delivery receipts. Must use exactly once.
-
-The meet operation (most restrictive combination) gives:
-- `meet(Affine, Relevant) = Linear` (cannot copy AND cannot drop)
-- `meet(Unrestricted, anything) = anything` (Unrestricted is top)
-- `meet(Linear, anything) = Linear` (Linear is bottom)
-
-This lattice structure means that when you compose shapes, linearity annotations
-compose correctly by taking the meet. A struct containing one linear field and
-one unrestricted field is itself linear (you cannot copy or drop a struct that
-contains a non-copyable, non-droppable field).
-
-### Key Insight: InformationContent separating min/max/fixed/cardinality
-
-Rather than a single "size" metric, InformationContent tracks four independent
-dimensions:
-
-- **min_bits**: minimum bits needed to represent any value of this shape
-- **max_bits**: maximum bits needed for the largest value
-- **fixed_size**: whether all values have the same bit width (Option)
-- **cardinality**: number of distinct values (Option, None if infinite)
-
-This separation enables precise morphism classification:
-- **Isomorphism** (Concorde): same cardinality, same bit range
-- **Embedding** (Business): target cardinality > source, target bits >= source
-- **Projection** (Economy): target cardinality < source, some information lost
-- **Best-effort** (Wheelbarrow): below Shannon limit, cannot reconstruct
-
-The "fixed_size implies min_bits == max_bits" invariant is tested and enforced.
-This catches a whole class of bugs where someone claims a type is fixed-size
-but gives inconsistent bit counts.
-
----
-
-## 2026-03-10 — Alpha-equivalence, extraction bridge, morphism metrics
-
-Phase 1 expansion: comparison engine now handles all 11 Shape constructors,
-shape extraction from existing analyzers works, CLI can extract and compare
-shapes, and morphism classification provides quantitative metrics. 116 tests,
-criterion benchmarks established.
-
-### Key Insight: Alpha-equivalence for recursive types needs environment threading
-
-Comparing `Recursive("List", body_a)` to `Recursive("L", body_b)` requires
-tracking that the variable names `"List"` and `"L"` are bound together, so that
-`Ref("List")` in body_a matches `Ref("L")` in body_b. This is standard
-alpha-equivalence from lambda calculus, but it was not obvious it would be needed
-for a "practical" shape comparison tool.
-
-The implementation threads a `Vec<(&str, &str)>` environment through all
-comparison functions. When entering a `Recursive` binder, we push the pair.
-When comparing `Ref` nodes, we check the environment in reverse order (inner
-bindings shadow outer). This handles nested recursion correctly:
-
-```
-Recursive("T", Recursive("U", ... Ref("T") ... Ref("U") ...))
-```
-
-Without alpha-equivalence, two structurally identical recursive types with
-different variable names would incorrectly classify as Wheelbarrow (incompatible).
-With it, they correctly classify as Concorde (isomorphism).
-
-### Key Insight: Shape extraction as a lossy functor from IR to algebra
-
-The `extract_schema` function maps from the existing Canonical IR (`IrSchema`
-with `TypeDef` and `IrType`) to the new Shape IR. This is not an isomorphism —
-it is deliberately lossy in the **right direction**:
-
-- IR-level details like field numbers, wire formats, encoding hints are dropped
- (they are serialization concerns, not shape concerns)
-- IR-level `SpecialType::Any` and `SpecialType::Json` map to a recursive
- 6-variant JSON shape (`Null | Bool | Number | String | Array | Object`),
- which captures the structural content
-- Self-referential types (detected by `shape_references_name`) are wrapped in
- `Recursive` to make the fixpoint explicit
-
-This is a functor from the category of IR schemas to the category of shapes.
-It preserves composition (extracting then comparing gives the same transport
-class as comparing in the IR domain). The lossiness is intentional — the shape
-algebra operates at a higher level of abstraction.
-
-### Key Insight: Morphism metrics quantify what transport classes only classify
-
-Transport classes are a four-point lattice — useful but coarse. Two Economy
-morphisms can be very different: one might lose 1 bit out of 64 (narrowing
-I64→I63), the other might lose 63 bits out of 64 (narrowing I64→Bool). Both
-are Economy, but the first is nearly reversible and the second is nearly
-destructive.
-
-`MorphismMetrics` adds continuous measures:
-- **identity_ratio**: what fraction of paths map directly (1.0 for Concorde)
-- **loss_ratio**: what fraction of source bits are lost (0.0 for lossless)
-- **padding_ratio**: what fraction of target bits are padding (0.0 for exact)
-- **reversibility**: estimated roundtrip fidelity (1.0 for isomorphism)
-- **net_bits**: signed difference showing growth or shrinkage
-- **is_pure_embedding / is_pure_projection**: clean structural characterisation
-
-These metrics will be essential for Phase 2's adapter discovery: when multiple
-paths exist between two shapes in the category, the metrics help choose the
-best one (highest reversibility, lowest loss).
-
----
-
-## 2026-03-10 — Category theory meets adapter discovery
-
-Phase 2 core: ShapeCategory implements the category of data shapes with
-Dijkstra pathfinding for adapter discovery, symmetric monoidal structure,
-and full CLI integration. 165 shape-ir tests, 41 category-specific.
-
-### Key Insight: Minimax pathfinding is the right cost model for morphism chains
-
-Adapter discovery needs to find the "best" morphism chain between two shapes
-when no direct morphism exists. The natural first thought is additive cost
-(sum of edge weights). But transport class composition takes the **maximum**,
-not the sum: a Concorde + Economy chain is Economy, not "double Economy".
-
-This means the optimal pathfinding algorithm is **minimax**: find the path
-that minimizes the maximum edge cost. Standard Dijkstra works with a simple
-modification — instead of `new_cost = cost + edge_cost`, use
-`new_cost = max(cost, edge_cost)`. The priority queue still gives correct
-results because max is monotonic.
-
-Practical consequence: a 10-hop path through all-Business edges is strictly
-better than a 1-hop Economy shortcut. Length does not matter; only the worst
-edge matters. This is deeply satisfying — it means adapter chains degrade
-gracefully: adding more hops through good edges never makes things worse.
-
-### Key Insight: Product-with-Unit is not isomorphic to its component
-
-Mathematically, A × 1 ≅ A (the unit object of a monoidal category). But
-structurally, `{fst: i32, snd: Unit}` is not the same shape as `i32` — one
-is a Product with two fields, the other is an Atom. The comparison engine
-correctly identifies this as a structural mismatch (Economy class, because
-it is a projection dropping the Unit field).
-
-However, the **information cost** is zero — Unit carries zero bits, so
-`bits_lost = 0`. This is the right answer: the shapes are not structurally
-identical (different field access patterns), but they carry the same amount
-of information. The distinction between structural isomorphism and information
-equivalence matters for real adapters: you still need a code transform to
-go from `record.fst` to just `value`, even though no data is lost.
-
-### Key Insight: Property tests catch generator bugs, not just code bugs
-
-The `extracted_self_compare_is_concorde` property test was failing — not
-because self-comparison was broken, but because the random schema generator
-could produce structs with duplicate field names. When a struct has two
-fields named "r" (one required, one optional), the comparison engine
-correctly treats them as different shapes (Business, not Concorde) because
-the duplicate name creates an ambiguous structural mapping.
-
-The fix was making the generator produce indexed field names (`f0`, `f1`, ...)
-to guarantee uniqueness. The lesson: property test generators are themselves
-a source of subtle invariant violations. The real schemas produced by the
-13 analyzers never have duplicate field names — but a random generator
-happily creates them unless constrained.
-
----
-
-
-
-
diff --git a/provenance/PROOF-NEEDS.adoc b/provenance/PROOF-NEEDS.adoc
new file mode 100644
index 0000000..606465c
--- /dev/null
+++ b/provenance/PROOF-NEEDS.adoc
@@ -0,0 +1,63 @@
+== PROOF-NEEDS.md — protocol-squisher
+
+=== Current State — 2026-04-11 (ALL PROOFS COMPLETE)
+
+* **src/abi/*.idr**: YES — `+Types.idr+`, `+Layout.idr+`,
+`+Foreign.idr+`
+* *Dangerous patterns*: 0 in all proof and ABI code
+* *LOC*: ~87,800 (Rust)
+* *Proofs*: 8/8 theorems verified across Agda + Lean + Coq + Isabelle +
+Z3 + Idris2
+* *ABI layer*: Complete Idris2 ABI; 0 `+unwrap()+` calls (audit complete
+2026-02-04)
+
+=== Completed Proofs (2026-04-11)
+
+[width="100%",cols="38%,36%,26%",options="header",]
+|===
+|Component |Proof File |Status
+|CarriesInvariant — all 13 analyzers
+|`+proofs/agda/CarriesInvariantExtended.agda+` |✓ Done
+
+|Adapter synthesis correctness |`+proofs/agda/AdapterSynthesis.agda+` |✓
+Done
+
+|Business class loss documentation
+|`+proofs/agda/BusinessClassLoss.agda+` |✓ Done
+
+|Unwrap-free audit — 29 crates |`+proofs/idris2/NoPanics.idr+` |✓ Done
+
+|Buffer overflow freedom |`+proofs/idris2/BufferSafety.idr+` |✓ Done
+
+|Tropical adapter path optimality
+|`+proofs/tropical/TropicalAdapterPath.lean+` |✓ Done
+|===
+
+=== Outstanding (future work, not blocking)
+
+[width="100%",cols="46%,25%,29%",options="header",]
+|===
+|Component |What |Notes
+|Isabelle — CarriesInvariant |Port base proof to Isabelle |Types.thy +
+WheelbarrowNecessity.thy exist; CarriesInvariant.thy pending
+
+|ECHIDNA orchestration |Connect proof runner to running ECHIDNA server
+|Optional; CI works without it
+
+|BufferSafety n=0 vacuity |Explicit Void elimination for empty buffer
+case |Documented in BufferSafety.idr; no runtime impact
+|===
+
+=== Recommended Prover
+
+*Agda* for optimization soundness (existing). *Coq* for container
+propagation (existing). *Idris2* for ABI extensions. The 758
+`+unwrap()+` calls are a major safety debt that formal error handling
+types would address.
+
+=== Priority
+
+*HIGH* — Protocol squisher handles serialization format translation.
+Incorrect translation silently produces wrong data. The existing proof
+infrastructure (Agda + Coq) demonstrates proof feasibility. The 758
+unwrap() calls are the largest safety debt in this scan.
diff --git a/provenance/PROOF-NEEDS.md b/provenance/PROOF-NEEDS.md
deleted file mode 100644
index 6392d93..0000000
--- a/provenance/PROOF-NEEDS.md
+++ /dev/null
@@ -1,40 +0,0 @@
-
-# PROOF-NEEDS.md — protocol-squisher
-
-## Current State — 2026-04-11 (ALL PROOFS COMPLETE)
-
-- **src/abi/*.idr**: YES — `Types.idr`, `Layout.idr`, `Foreign.idr`
-- **Dangerous patterns**: 0 in all proof and ABI code
-- **LOC**: ~87,800 (Rust)
-- **Proofs**: 8/8 theorems verified across Agda + Lean + Coq + Isabelle + Z3 + Idris2
-- **ABI layer**: Complete Idris2 ABI; 0 `unwrap()` calls (audit complete 2026-02-04)
-
-## Completed Proofs (2026-04-11)
-
-| Component | Proof File | Status |
-|-----------|-----------|--------|
-| CarriesInvariant — all 13 analyzers | `proofs/agda/CarriesInvariantExtended.agda` | ✓ Done |
-| Adapter synthesis correctness | `proofs/agda/AdapterSynthesis.agda` | ✓ Done |
-| Business class loss documentation | `proofs/agda/BusinessClassLoss.agda` | ✓ Done |
-| Unwrap-free audit — 29 crates | `proofs/idris2/NoPanics.idr` | ✓ Done |
-| Buffer overflow freedom | `proofs/idris2/BufferSafety.idr` | ✓ Done |
-| Tropical adapter path optimality | `proofs/tropical/TropicalAdapterPath.lean` | ✓ Done |
-
-## Outstanding (future work, not blocking)
-
-| Component | What | Notes |
-|-----------|------|-------|
-| Isabelle — CarriesInvariant | Port base proof to Isabelle | Types.thy + WheelbarrowNecessity.thy exist; CarriesInvariant.thy pending |
-| ECHIDNA orchestration | Connect proof runner to running ECHIDNA server | Optional; CI works without it |
-| BufferSafety n=0 vacuity | Explicit Void elimination for empty buffer case | Documented in BufferSafety.idr; no runtime impact |
-
-## Recommended Prover
-
-**Agda** for optimization soundness (existing). **Coq** for container propagation (existing). **Idris2** for ABI extensions. The 758 `unwrap()` calls are a major safety debt that formal error handling types would address.
-
-## Priority
-
-**HIGH** — Protocol squisher handles serialization format translation. Incorrect translation silently produces wrong data. The existing proof infrastructure (Agda + Coq) demonstrates proof feasibility. The 758 unwrap() calls are the largest safety debt in this scan.
diff --git a/provenance/PROTOCOL-SELECTION-GUIDE.adoc b/provenance/PROTOCOL-SELECTION-GUIDE.adoc
new file mode 100644
index 0000000..a9617fc
--- /dev/null
+++ b/provenance/PROTOCOL-SELECTION-GUIDE.adoc
@@ -0,0 +1,382 @@
+== Protocol Selection Guide
+
+*Quick decision tree for choosing the right serialization protocol.*
+
+=== Start Here: What’s Your Priority?
+
+....
+ YOUR PRIORITY
+ │
+ │
+ ┌─────────────────────┼─────────────────────┐
+ │ │ │
+ ▼ ▼ ▼
+ PERFORMANCE FLEXIBILITY OPTIMIZATION
+ (speed/latency) (rapid development) (find improvements)
+ │ │ │
+ │ │ │
+ ▼ ▼ ▼
+ See Flow 1 See Flow 2 See Flow 3
+....
+
+'''''
+
+=== Flow 1: Performance Priority
+
+*You need:* Microsecond latency, zero-copy access, maximum throughput
+
+....
+START: Performance is critical
+ │
+ ├─ Real-time system? (games, audio, trading)
+ │ YES → Cap'n Proto (0.18 squishability - theoretical optimum)
+ │
+ ├─ Embedded/IoT? (limited memory)
+ │ YES → FlatBuffers (0.25 squishability - zero-copy structs)
+ │
+ ├─ Rust-to-Rust only?
+ │ YES → Rust serde (0.75 squishability - borrow checker wins)
+ │
+ └─ Cross-language with good perf?
+ YES → Bebop (0.62) or Protobuf (0.68) - modern balanced
+....
+
+*Key Insight:* Zero-copy protocols (Cap’n Proto, FlatBuffers) have LOW
+squishability because they’re already optimal. This is a FEATURE.
+
+'''''
+
+=== Flow 2: Flexibility Priority
+
+*You need:* Rapid iteration, schema changes, no compile step
+
+....
+START: Flexibility is critical
+ │
+ ├─ Schema completely unknown?
+ │ YES → JSON Schema (0.35 squishability - universal baseline)
+ │
+ ├─ Need better performance than JSON?
+ │ YES → MessagePack (0.45 squishability - binary type tags)
+ │
+ ├─ Frontend ↔ Backend (web)?
+ │ YES → JSON Schema (human-readable, debugging)
+ │
+ ├─ Python ecosystem?
+ │ YES → Pydantic (0.42 squishability - runtime validation)
+ │
+ └─ JavaScript/TypeScript?
+ YES → ReScript (0.58 squishability - OCaml types, JS target)
+....
+
+*Key Insight:* Dynamic protocols sacrifice performance for flexibility.
+MessagePack is the sweet spot (binary + dynamic).
+
+'''''
+
+=== Flow 3: Optimization Priority
+
+*You need:* Protocol-squisher to find improvements, reduce bandwidth
+
+....
+START: Want to find optimizations
+ │
+ ├─ Long-lived data storage?
+ │ YES → Avro (0.85 squishability - HIGHEST, union types + evolution)
+ │
+ ├─ Multiple schema versions in production?
+ │ YES → Avro (0.85) or Thrift (0.82) - backward compat creates bloat
+ │
+ ├─ Legacy system with deprecated fields?
+ │ YES → Avro (0.85) or Thrift (0.82) - perfect for finding waste
+ │
+ ├─ Analytics/data warehouse?
+ │ YES → Avro (0.85) - schema evolution built-in
+ │
+ └─ RPC-focused microservices?
+ YES → Thrift (0.82 squishability - RPC metadata overhead)
+....
+
+*Key Insight:* Schema evolution protocols have HIGHEST squishability
+(0.8+) because backward compatibility creates optimization
+opportunities.
+
+'''''
+
+=== Decision Matrix
+
+[cols=",,,",options="header",]
+|===
+|Criterion |Top Choice |Runner-Up |Avoid
+|*Latency < 1ms* |Cap’n Proto |FlatBuffers |JSON
+|*Cross-language* |Protobuf |Bebop |Rust serde
+|*Schema evolution* |Avro |Thrift |Cap’n Proto
+|*Rapid prototyping* |JSON |MessagePack |Cap’n Proto
+|*Bandwidth optimization* |Avro/Thrift |Protobuf |JSON
+|*Zero build step* |JSON |MessagePack |Any schema-based
+|*Type safety* |Rust serde |Protobuf |JSON
+|*Debugging ease* |JSON |Protobuf (text format) |Cap’n Proto
+|===
+
+'''''
+
+=== Common Use Cases
+
+==== Web API (Public-Facing)
+
+*Recommendation:* JSON Schema (0.35) - Human-readable - Universal
+compatibility - Easy debugging - Accept lower performance for
+accessibility
+
+'''''
+
+==== Microservices (Internal)
+
+*Recommendation:* Protobuf (0.68) or Bebop (0.62) - Type safety - Good
+performance - Moderate squishability - Active tooling ecosystems
+
+*Why not Cap’n Proto?* Over-optimized for most microservices. Protobuf
+is "`good enough`" with better tooling.
+
+'''''
+
+==== Data Warehouse / Analytics
+
+*Recommendation:* Avro (0.85) - Schema evolution built-in -
+Reader/writer schema separation - Highest squishability (find bloat) -
+Hadoop/Spark ecosystem
+
+'''''
+
+==== Real-Time Systems (Trading, Robotics)
+
+*Recommendation:* Cap’n Proto (0.18) - Theoretical performance limit -
+Zero-copy everything - Predictable latency - Low squishability expected
+(already optimal)
+
+'''''
+
+==== Mobile Apps
+
+*Recommendation:* Protobuf (0.68) or Bebop (0.62) - Bandwidth efficiency
+(cellular) - Battery efficiency (less CPU) - Small binary size - Good
+cross-platform support
+
+'''''
+
+==== Game Engines
+
+*Recommendation:* FlatBuffers (0.25) - Zero-copy structs (Vec3, Matrix)
+- Mmap support (large assets) - Predictable memory layout - Low
+squishability (already optimized)
+
+'''''
+
+==== IoT / Embedded
+
+*Recommendation:* FlatBuffers (0.25) or Bebop (0.62) - Limited memory -
+No heap allocation (FlatBuffers structs) - Simple parsing (Bebop
+fixed-width) - Low power consumption
+
+'''''
+
+==== Configuration Files
+
+*Recommendation:* JSON Schema (0.35) or TOML - Human-readable - Version
+control friendly - No binary tooling needed - Not performance-critical
+
+'''''
+
+=== Squishability Interpretation
+
+==== High Squishability (0.7-0.9) - Avro, Thrift
+
+*Meaning:* Protocol-squisher will find MANY optimization opportunities
+
+*Why?* - Backward compatibility bloat (deprecated fields) - Union types
+for null handling - Over-specified types (int32 when int8 sufficient) -
+Optional fields that are always present
+
+*Use When:* - You WANT to find improvements - Schema evolves frequently
+- Multiple teams/versions - Long-term data storage
+
+'''''
+
+==== Medium Squishability (0.5-0.7) - Protobuf, Bebop, Rust serde
+
+*Meaning:* Some optimization opportunities, balanced design
+
+*Why?* - Modern design with less bloat - Some optional fields - Safe
+widening opportunities (int32→int64) - Type precision choices (f32 vs
+f64)
+
+*Use When:* - Standard backend services - Microservices communication -
+Mobile apps - Good performance with some optimization potential
+
+'''''
+
+==== Low Squishability (0.2-0.4) - Cap’n Proto, FlatBuffers, JSON
+
+*Meaning:* Few optimization opportunities
+
+*Why (Zero-Copy):* - Cap’n Proto: Already at theoretical optimum -
+FlatBuffers: Zero-copy structs, manual optimization - These are FEATURES
+(already fast)
+
+*Why (Baseline):* - JSON: String-based, no binary optimization - Low
+performance but that’s expected
+
+*Use When:* - Performance-critical (zero-copy protocols) - Universal
+compatibility (JSON) - Already optimized systems
+
+'''''
+
+=== Protocol Compatibility Guide
+
+==== Best Cross-Protocol Pairs (Business Class Transport)
+
+*Schema-Based ↔ Schema-Based:* - ✅ Protobuf ↔ Avro (field mapping) - ✅
+Protobuf ↔ Thrift (nearly identical) - ✅ Bebop ↔ Protobuf (compatible
+types)
+
+*Evolution ↔ Dynamic:* - ✅ Avro ↔ MessagePack (union types map well)
+
+*Within Ecosystem:* - ✅ Rust serde ↔ Rust serde (zero-copy) - ✅ Python
+↔ Python (native objects)
+
+'''''
+
+==== Problematic Cross-Protocol Pairs (Wheelbarrow Class)
+
+*Static ↔ Dynamic:* - ⚠️ Protobuf ↔ JSON (binary ↔ string conversion) -
+⚠️ Cap’n Proto ↔ JSON (zero-copy ↔ heap-everything)
+
+*Language Ownership Mismatch:* - ⚠️ Rust ↔ Python (ownership vs GC) - ⚠️
+Rust ↔ JavaScript (lifetimes vs dynamic)
+
+*Zero-Copy ↔ Others:* - ⚠️ Cap’n Proto ↔ Avro (layout mismatch) - ⚠️
+FlatBuffers ↔ Thrift (memory model incompatibility)
+
+'''''
+
+=== Anti-Patterns to Avoid
+
+==== ❌ Using Cap’n Proto for Microservices
+
+*Why Wrong:* Over-optimized. Protobuf is easier with good-enough
+performance. *Use Instead:* Protobuf (0.68) or Bebop (0.62)
+
+'''''
+
+==== ❌ Using JSON for High-Volume Logs
+
+*Why Wrong:* String-based, high bandwidth, slow parsing *Use Instead:*
+MessagePack (0.45) or Protobuf (0.68)
+
+'''''
+
+==== ❌ Using Avro for Real-Time Systems
+
+*Why Wrong:* Schema evolution overhead, union type tags *Use Instead:*
+Cap’n Proto (0.18) or FlatBuffers (0.25)
+
+'''''
+
+==== ❌ Using FlatBuffers for Frequently-Changing Schemas
+
+*Why Wrong:* Fixed layouts, hard to evolve *Use Instead:* Avro (0.85) or
+Thrift (0.82)
+
+'''''
+
+==== ❌ Using Protobuf for Configuration Files
+
+*Why Wrong:* Binary format, not human-readable, needs tooling *Use
+Instead:* JSON (0.35) or TOML
+
+'''''
+
+=== Quick Reference Chart
+
+....
+Performance ◄────────────────────────────────────► Flexibility
+ (low squishability) (high squishability)
+
+Cap'n Proto FlatBuffers Bebop Avro JSON
+ 0.18 0.25 0.62 0.85 0.35
+ │ │ │ │ │
+ │ │ │ │ └─ Baseline fallback
+ │ │ │ └─ Schema evolution (most squishable)
+ │ │ └─ Modern balanced
+ │ └─ Zero-copy structs
+ └─ Theoretical optimum (least squishable)
+....
+
+'''''
+
+=== When Protocol-Squisher Helps Most
+
+==== ✅ High Value (Use Protocol-Squisher)
+
+[arabic]
+. *Schema Evolution Analysis* (Avro, Thrift)
+* Find deprecated fields (52% of evolved schemas)
+* Identify unnecessary optionals (68% always present)
+* Detect type over-specification (int32→int64 widening)
+. *Legacy System Optimization* (Any protocol with history)
+* Backward compatibility bloat
+* Accumulated technical debt
+* Multiple schema versions in production
+. *Cross-Protocol Translation*
+* Protobuf ↔ Avro (Business class achievable)
+* Thrift ↔ Bebop (safe migration path)
+* Any ↔ JSON (universal fallback)
+
+'''''
+
+==== ⚠️ Limited Value (Already Optimal)
+
+[arabic]
+. *Zero-Copy Protocols* (Cap’n Proto, FlatBuffers)
+* Low squishability by design (0.18-0.25)
+* Already at theoretical optimum
+* Manual optimization already done
+. *Fresh Schemas* (New projects)
+* No backward compatibility bloat yet
+* Minimal optimization opportunities
+* Consider using for initial design validation
+. *Single-Protocol Systems* (No cross-protocol needs)
+* Cap’n Proto ↔ Cap’n Proto (Concorde class, no squishing)
+* Rust serde ↔ Rust serde (zero-copy, already optimal)
+
+'''''
+
+=== Summary Recommendations
+
+==== Starting a New Project?
+
+→ *Bebop (0.62)* or *Protobuf (0.68)* for balanced performance + tooling
+
+==== Inheriting Legacy System?
+
+→ *Run protocol-squisher on Avro/Thrift* to find optimization
+opportunities (0.8+ squishability)
+
+==== Need Maximum Performance?
+
+→ *Cap’n Proto (0.18)* for theoretical limit (don’t expect squishing
+opportunities)
+
+==== Need Maximum Flexibility?
+
+→ *JSON (0.35)* or *MessagePack (0.45)* for schema-less development
+
+==== Building for Long-Term?
+
+→ *Avro (0.85)* for schema evolution + protocol-squisher analysis
+
+'''''
+
+*See also:* - DIVERSITY-ANALYSIS.md - Complete 11-protocol analysis -
+DIVERSITY-SUMMARY.txt - Visual rankings and charts -
+PROTOCOL-COMPARISON.txt - Quick reference tables
diff --git a/provenance/PROTOCOL-SELECTION-GUIDE.md b/provenance/PROTOCOL-SELECTION-GUIDE.md
deleted file mode 100644
index 5520005..0000000
--- a/provenance/PROTOCOL-SELECTION-GUIDE.md
+++ /dev/null
@@ -1,397 +0,0 @@
-
-# Protocol Selection Guide
-
-**Quick decision tree for choosing the right serialization protocol.**
-
-## Start Here: What's Your Priority?
-
-```
- YOUR PRIORITY
- │
- │
- ┌─────────────────────┼─────────────────────┐
- │ │ │
- ▼ ▼ ▼
- PERFORMANCE FLEXIBILITY OPTIMIZATION
- (speed/latency) (rapid development) (find improvements)
- │ │ │
- │ │ │
- ▼ ▼ ▼
- See Flow 1 See Flow 2 See Flow 3
-```
-
----
-
-## Flow 1: Performance Priority
-
-**You need:** Microsecond latency, zero-copy access, maximum throughput
-
-```
-START: Performance is critical
- │
- ├─ Real-time system? (games, audio, trading)
- │ YES → Cap'n Proto (0.18 squishability - theoretical optimum)
- │
- ├─ Embedded/IoT? (limited memory)
- │ YES → FlatBuffers (0.25 squishability - zero-copy structs)
- │
- ├─ Rust-to-Rust only?
- │ YES → Rust serde (0.75 squishability - borrow checker wins)
- │
- └─ Cross-language with good perf?
- YES → Bebop (0.62) or Protobuf (0.68) - modern balanced
-```
-
-**Key Insight:** Zero-copy protocols (Cap'n Proto, FlatBuffers) have LOW squishability because they're already optimal. This is a FEATURE.
-
----
-
-## Flow 2: Flexibility Priority
-
-**You need:** Rapid iteration, schema changes, no compile step
-
-```
-START: Flexibility is critical
- │
- ├─ Schema completely unknown?
- │ YES → JSON Schema (0.35 squishability - universal baseline)
- │
- ├─ Need better performance than JSON?
- │ YES → MessagePack (0.45 squishability - binary type tags)
- │
- ├─ Frontend ↔ Backend (web)?
- │ YES → JSON Schema (human-readable, debugging)
- │
- ├─ Python ecosystem?
- │ YES → Pydantic (0.42 squishability - runtime validation)
- │
- └─ JavaScript/TypeScript?
- YES → ReScript (0.58 squishability - OCaml types, JS target)
-```
-
-**Key Insight:** Dynamic protocols sacrifice performance for flexibility. MessagePack is the sweet spot (binary + dynamic).
-
----
-
-## Flow 3: Optimization Priority
-
-**You need:** Protocol-squisher to find improvements, reduce bandwidth
-
-```
-START: Want to find optimizations
- │
- ├─ Long-lived data storage?
- │ YES → Avro (0.85 squishability - HIGHEST, union types + evolution)
- │
- ├─ Multiple schema versions in production?
- │ YES → Avro (0.85) or Thrift (0.82) - backward compat creates bloat
- │
- ├─ Legacy system with deprecated fields?
- │ YES → Avro (0.85) or Thrift (0.82) - perfect for finding waste
- │
- ├─ Analytics/data warehouse?
- │ YES → Avro (0.85) - schema evolution built-in
- │
- └─ RPC-focused microservices?
- YES → Thrift (0.82 squishability - RPC metadata overhead)
-```
-
-**Key Insight:** Schema evolution protocols have HIGHEST squishability (0.8+) because backward compatibility creates optimization opportunities.
-
----
-
-## Decision Matrix
-
-| Criterion | Top Choice | Runner-Up | Avoid |
-|-----------|------------|-----------|-------|
-| **Latency < 1ms** | Cap'n Proto | FlatBuffers | JSON |
-| **Cross-language** | Protobuf | Bebop | Rust serde |
-| **Schema evolution** | Avro | Thrift | Cap'n Proto |
-| **Rapid prototyping** | JSON | MessagePack | Cap'n Proto |
-| **Bandwidth optimization** | Avro/Thrift | Protobuf | JSON |
-| **Zero build step** | JSON | MessagePack | Any schema-based |
-| **Type safety** | Rust serde | Protobuf | JSON |
-| **Debugging ease** | JSON | Protobuf (text format) | Cap'n Proto |
-
----
-
-## Common Use Cases
-
-### Web API (Public-Facing)
-**Recommendation:** JSON Schema (0.35)
-- Human-readable
-- Universal compatibility
-- Easy debugging
-- Accept lower performance for accessibility
-
----
-
-### Microservices (Internal)
-**Recommendation:** Protobuf (0.68) or Bebop (0.62)
-- Type safety
-- Good performance
-- Moderate squishability
-- Active tooling ecosystems
-
-**Why not Cap'n Proto?** Over-optimized for most microservices. Protobuf is "good enough" with better tooling.
-
----
-
-### Data Warehouse / Analytics
-**Recommendation:** Avro (0.85)
-- Schema evolution built-in
-- Reader/writer schema separation
-- Highest squishability (find bloat)
-- Hadoop/Spark ecosystem
-
----
-
-### Real-Time Systems (Trading, Robotics)
-**Recommendation:** Cap'n Proto (0.18)
-- Theoretical performance limit
-- Zero-copy everything
-- Predictable latency
-- Low squishability expected (already optimal)
-
----
-
-### Mobile Apps
-**Recommendation:** Protobuf (0.68) or Bebop (0.62)
-- Bandwidth efficiency (cellular)
-- Battery efficiency (less CPU)
-- Small binary size
-- Good cross-platform support
-
----
-
-### Game Engines
-**Recommendation:** FlatBuffers (0.25)
-- Zero-copy structs (Vec3, Matrix)
-- Mmap support (large assets)
-- Predictable memory layout
-- Low squishability (already optimized)
-
----
-
-### IoT / Embedded
-**Recommendation:** FlatBuffers (0.25) or Bebop (0.62)
-- Limited memory
-- No heap allocation (FlatBuffers structs)
-- Simple parsing (Bebop fixed-width)
-- Low power consumption
-
----
-
-### Configuration Files
-**Recommendation:** JSON Schema (0.35) or TOML
-- Human-readable
-- Version control friendly
-- No binary tooling needed
-- Not performance-critical
-
----
-
-## Squishability Interpretation
-
-### High Squishability (0.7-0.9) - Avro, Thrift
-**Meaning:** Protocol-squisher will find MANY optimization opportunities
-
-**Why?**
-- Backward compatibility bloat (deprecated fields)
-- Union types for null handling
-- Over-specified types (int32 when int8 sufficient)
-- Optional fields that are always present
-
-**Use When:**
-- You WANT to find improvements
-- Schema evolves frequently
-- Multiple teams/versions
-- Long-term data storage
-
----
-
-### Medium Squishability (0.5-0.7) - Protobuf, Bebop, Rust serde
-**Meaning:** Some optimization opportunities, balanced design
-
-**Why?**
-- Modern design with less bloat
-- Some optional fields
-- Safe widening opportunities (int32→int64)
-- Type precision choices (f32 vs f64)
-
-**Use When:**
-- Standard backend services
-- Microservices communication
-- Mobile apps
-- Good performance with some optimization potential
-
----
-
-### Low Squishability (0.2-0.4) - Cap'n Proto, FlatBuffers, JSON
-**Meaning:** Few optimization opportunities
-
-**Why (Zero-Copy):**
-- Cap'n Proto: Already at theoretical optimum
-- FlatBuffers: Zero-copy structs, manual optimization
-- These are FEATURES (already fast)
-
-**Why (Baseline):**
-- JSON: String-based, no binary optimization
-- Low performance but that's expected
-
-**Use When:**
-- Performance-critical (zero-copy protocols)
-- Universal compatibility (JSON)
-- Already optimized systems
-
----
-
-## Protocol Compatibility Guide
-
-### Best Cross-Protocol Pairs (Business Class Transport)
-
-**Schema-Based ↔ Schema-Based:**
-- ✅ Protobuf ↔ Avro (field mapping)
-- ✅ Protobuf ↔ Thrift (nearly identical)
-- ✅ Bebop ↔ Protobuf (compatible types)
-
-**Evolution ↔ Dynamic:**
-- ✅ Avro ↔ MessagePack (union types map well)
-
-**Within Ecosystem:**
-- ✅ Rust serde ↔ Rust serde (zero-copy)
-- ✅ Python ↔ Python (native objects)
-
----
-
-### Problematic Cross-Protocol Pairs (Wheelbarrow Class)
-
-**Static ↔ Dynamic:**
-- ⚠️ Protobuf ↔ JSON (binary ↔ string conversion)
-- ⚠️ Cap'n Proto ↔ JSON (zero-copy ↔ heap-everything)
-
-**Language Ownership Mismatch:**
-- ⚠️ Rust ↔ Python (ownership vs GC)
-- ⚠️ Rust ↔ JavaScript (lifetimes vs dynamic)
-
-**Zero-Copy ↔ Others:**
-- ⚠️ Cap'n Proto ↔ Avro (layout mismatch)
-- ⚠️ FlatBuffers ↔ Thrift (memory model incompatibility)
-
----
-
-## Anti-Patterns to Avoid
-
-### ❌ Using Cap'n Proto for Microservices
-**Why Wrong:** Over-optimized. Protobuf is easier with good-enough performance.
-**Use Instead:** Protobuf (0.68) or Bebop (0.62)
-
----
-
-### ❌ Using JSON for High-Volume Logs
-**Why Wrong:** String-based, high bandwidth, slow parsing
-**Use Instead:** MessagePack (0.45) or Protobuf (0.68)
-
----
-
-### ❌ Using Avro for Real-Time Systems
-**Why Wrong:** Schema evolution overhead, union type tags
-**Use Instead:** Cap'n Proto (0.18) or FlatBuffers (0.25)
-
----
-
-### ❌ Using FlatBuffers for Frequently-Changing Schemas
-**Why Wrong:** Fixed layouts, hard to evolve
-**Use Instead:** Avro (0.85) or Thrift (0.82)
-
----
-
-### ❌ Using Protobuf for Configuration Files
-**Why Wrong:** Binary format, not human-readable, needs tooling
-**Use Instead:** JSON (0.35) or TOML
-
----
-
-## Quick Reference Chart
-
-```
-Performance ◄────────────────────────────────────► Flexibility
- (low squishability) (high squishability)
-
-Cap'n Proto FlatBuffers Bebop Avro JSON
- 0.18 0.25 0.62 0.85 0.35
- │ │ │ │ │
- │ │ │ │ └─ Baseline fallback
- │ │ │ └─ Schema evolution (most squishable)
- │ │ └─ Modern balanced
- │ └─ Zero-copy structs
- └─ Theoretical optimum (least squishable)
-```
-
----
-
-## When Protocol-Squisher Helps Most
-
-### ✅ High Value (Use Protocol-Squisher)
-
-1. **Schema Evolution Analysis** (Avro, Thrift)
- - Find deprecated fields (52% of evolved schemas)
- - Identify unnecessary optionals (68% always present)
- - Detect type over-specification (int32→int64 widening)
-
-2. **Legacy System Optimization** (Any protocol with history)
- - Backward compatibility bloat
- - Accumulated technical debt
- - Multiple schema versions in production
-
-3. **Cross-Protocol Translation**
- - Protobuf ↔ Avro (Business class achievable)
- - Thrift ↔ Bebop (safe migration path)
- - Any ↔ JSON (universal fallback)
-
----
-
-### ⚠️ Limited Value (Already Optimal)
-
-1. **Zero-Copy Protocols** (Cap'n Proto, FlatBuffers)
- - Low squishability by design (0.18-0.25)
- - Already at theoretical optimum
- - Manual optimization already done
-
-2. **Fresh Schemas** (New projects)
- - No backward compatibility bloat yet
- - Minimal optimization opportunities
- - Consider using for initial design validation
-
-3. **Single-Protocol Systems** (No cross-protocol needs)
- - Cap'n Proto ↔ Cap'n Proto (Concorde class, no squishing)
- - Rust serde ↔ Rust serde (zero-copy, already optimal)
-
----
-
-## Summary Recommendations
-
-### Starting a New Project?
-→ **Bebop (0.62)** or **Protobuf (0.68)** for balanced performance + tooling
-
-### Inheriting Legacy System?
-→ **Run protocol-squisher on Avro/Thrift** to find optimization opportunities (0.8+ squishability)
-
-### Need Maximum Performance?
-→ **Cap'n Proto (0.18)** for theoretical limit (don't expect squishing opportunities)
-
-### Need Maximum Flexibility?
-→ **JSON (0.35)** or **MessagePack (0.45)** for schema-less development
-
-### Building for Long-Term?
-→ **Avro (0.85)** for schema evolution + protocol-squisher analysis
-
----
-
-**See also:**
-- [DIVERSITY-ANALYSIS.md](DIVERSITY-ANALYSIS.md) - Complete 11-protocol analysis
-- [DIVERSITY-SUMMARY.txt](DIVERSITY-SUMMARY.txt) - Visual rankings and charts
-- [PROTOCOL-COMPARISON.txt](PROTOCOL-COMPARISON.txt) - Quick reference tables
diff --git a/provenance/SECURITY.adoc b/provenance/SECURITY.adoc
new file mode 100644
index 0000000..afc22e4
--- /dev/null
+++ b/provenance/SECURITY.adoc
@@ -0,0 +1,49 @@
+== Security Policy
+
+=== Supported Versions
+
+[cols=",",options="header",]
+|===
+|Version |Supported
+|0.1.x |:white_check_mark:
+|===
+
+=== Reporting a Vulnerability
+
+*DO NOT* create a public issue for security vulnerabilities.
+
+==== Report via Secure Channels
+
+* *Email*: security@hyperpolymath.dev
+* *GitHub Security Advisory*:
+https://github.com/hyperpolymath/protocol-squisher/security/advisories/new[Create
+advisory]
+
+==== Include
+
+* Description of the vulnerability
+* Steps to reproduce
+* Potential impact
+* Suggested fix (if available)
+
+==== Response Timeline
+
+* *Acknowledge* receipt within 48 hours
+* *Assess* severity within 7 days
+* *Release fix* within 30 days for critical issues
+
+=== Security Model
+
+Protocol Squisher is designed with security as a foundational principle:
+
+[arabic]
+. *Sandboxed Parsing*: Schema analyzers have recursion limits and
+timeouts
+. *No Arbitrary Code Execution*: Schemas cannot execute code
+. *Generated Code Safety*: All generated adapters are memory-safe (no
+`+unsafe+`)
+. *Type Safety*: Rust’s ownership model prevents memory vulnerabilities
+
+=== Security.txt
+
+See .well-known/security.txt for RFC 9116 compliance.
diff --git a/provenance/SECURITY.md b/provenance/SECURITY.md
deleted file mode 100644
index 69996cb..0000000
--- a/provenance/SECURITY.md
+++ /dev/null
@@ -1,46 +0,0 @@
-
-# Security Policy
-
-## Supported Versions
-
-| Version | Supported |
-| ------- | ------------------ |
-| 0.1.x | :white_check_mark: |
-
-## Reporting a Vulnerability
-
-**DO NOT** create a public issue for security vulnerabilities.
-
-### Report via Secure Channels
-
-- **Email**: security@hyperpolymath.dev
-- **GitHub Security Advisory**: [Create advisory](https://github.com/hyperpolymath/protocol-squisher/security/advisories/new)
-
-### Include
-
-- Description of the vulnerability
-- Steps to reproduce
-- Potential impact
-- Suggested fix (if available)
-
-### Response Timeline
-
-- **Acknowledge** receipt within 48 hours
-- **Assess** severity within 7 days
-- **Release fix** within 30 days for critical issues
-
-## Security Model
-
-Protocol Squisher is designed with security as a foundational principle:
-
-1. **Sandboxed Parsing**: Schema analyzers have recursion limits and timeouts
-2. **No Arbitrary Code Execution**: Schemas cannot execute code
-3. **Generated Code Safety**: All generated adapters are memory-safe (no `unsafe`)
-4. **Type Safety**: Rust's ownership model prevents memory vulnerabilities
-
-## Security.txt
-
-See [.well-known/security.txt](.well-known/security.txt) for RFC 9116 compliance.
diff --git a/provenance/SESSION-2026-02-04-VEC-STRUCT.adoc b/provenance/SESSION-2026-02-04-VEC-STRUCT.adoc
new file mode 100644
index 0000000..45c84a8
--- /dev/null
+++ b/provenance/SESSION-2026-02-04-VEC-STRUCT.adoc
@@ -0,0 +1,382 @@
+== Ephapax Development Session - Vec & Struct Implementation
+
+*Date:* 2026-02-04 *Duration:* Full session (continuation from previous
+work) *Status:* ✅ Complete - Both Phase 1 critical blockers resolved
+
+=== Session Overview
+
+This session implemented the two highest-priority critical blockers from
+ROADMAP-NEXT-PHASE.md Phase 1, enabling complete schema representation
+and data structure support in ephapax.
+
+=== Accomplishments
+
+==== Feature 1: Vec Support ✅
+
+*Commit:* 40da159 *Priority:* ⚠️ CRITICAL (highest priority blocker)
+*Estimate:* 2-3 days *Actual:* Completed in session
+
+*Implemented:* - `+Type::Vec(Box)+` for vector types -
+`+Expr::VecLit(Vec)+` for vector literals `+[e1, e2, ...]+` -
+`+Expr::Index { vec, index }+` for indexing `+vec[i]+` - Lexer tokens:
+`+Vec+`, `+[+`, `+]+` - Parser: Vec types, vec literals, postfix
+indexing - Type checker: element consistency, bounds validation -
+Interpreter: `+Value::Vec(Vec)+` with runtime bounds checking -
+WASM: Type mapping + placeholders (needs linear memory) - CLI: Nested
+vec output formatting
+
+*Features:* - Homogeneous vectors: `+[1, 2, 3, 4, 5]+` - Empty vectors:
+`+[]+` (default to `+Vec+`) - Mixed element types: `+Vec+`,
+`+Vec+`, `+Vec+` - Type-safe indexing - Linear type
+enforcement (Vec not Copy)
+
+*Tests:* - `+test-vec.eph+` - basic creation and indexing -
+`+test-vec-comprehensive.eph+` - advanced features - All tests pass ✓
+
+*Example:*
+
+[source,ephapax]
+----
+fn make_vec() -> Vec {
+ [10, 20, 30, 40, 50]
+}
+
+fn get_element(vec: Vec, index: i32) -> i32 {
+ vec[index] // Type-safe, bounds-checked
+}
+
+fn main() {
+ let numbers = make_vec();
+ get_element(numbers, 1) // Returns 20
+}
+----
+
+*Impact:* - Enables field lists for schemas - Supports repeated elements
+- Foundation for batch processing - Critical for protocol analysis
+
+'''''
+
+==== Feature 2: Struct Support ✅
+
+*Commit:* 620bef6 *Priority:* ⚠️ CRITICAL (second highest priority
+blocker) *Estimate:* 3-4 days *Actual:* Completed in session
+
+*Implemented:* - `+Type::Struct(String)+` for named struct types -
+`+StructDef { name, fields }+` for struct definitions -
+`+Expr::StructLit { name, fields }+` for struct literals -
+`+Expr::FieldAccess { expr, field }+` for field access - Lexer tokens:
+`+struct+`, `+.+` - Parser: struct definitions, struct literals, postfix
+field access - Type checker: field validation, all fields required, type
+matching - Interpreter: `+Value::Struct(String, HashMap)+` with field
+lookup - WASM: Type mapping + placeholders (needs linear memory) - CLI:
+Struct output formatting
+
+*Features:* - Custom types with named fields - Struct definitions:
+`+struct Name { field: Type, ... }+` - Struct literals:
+`+Name { field: value, ... }+` - Field access: `+struct.field+` (postfix
+operator) - Mixed field types: `+String+`, `+i32+`, `+bool+`,
+`+Vec+`, nested structs - Linear type enforcement (Struct not Copy) -
+Compile-time field validation
+
+*Tests:* - `+test-struct.eph+` - basic struct usage -
+`+test-struct-schema.eph+` - schema representation - All tests pass ✓
+
+*Example:*
+
+[source,ephapax]
+----
+struct Field {
+ name: String,
+ field_type: i32,
+ optional: bool,
+}
+
+struct Schema {
+ name: String,
+ version: i32,
+}
+
+fn make_field(name_val: String, type_val: i32, opt: bool) -> Field {
+ Field { name: name_val, field_type: type_val, optional: opt }
+}
+
+fn get_field_type(field: Field) -> i32 {
+ field.field_type // Type-safe field access
+}
+----
+
+*Impact:* - Enables schema representation as data - Custom data
+structures for protocols - Type-safe field access - Combined with Vec:
+`+struct Schema { fields: Vec }+`
+
+'''''
+
+=== Combined Impact
+
+*With both Vec and Struct:*
+
+We can now represent complete schemas:
+
+[source,ephapax]
+----
+struct Field {
+ name: String,
+ field_type: i32,
+ optional: bool,
+}
+
+struct Schema {
+ name: String,
+ fields: Vec, // ✅ Collection of fields
+}
+
+// This is now possible!
+fn analyze_schema(schema: Schema) -> i32 {
+ // Can access schema.name, schema.fields
+ // Once we add loops, can iterate over fields
+ 0 // Placeholder
+}
+----
+
+*This enables:* 1. *Protocol schema modeling* - the core use case 2.
+*Type-safe data structures* - custom types with validation 3.
+*Collection processing* - lists of elements 4. *Real-world analyzers* -
+foundation complete
+
+'''''
+
+=== Roadmap Progress
+
+==== Phase 1: Essential Language Features
+
+[width="100%",cols="25%,27%,27%,21%",options="header",]
+|===
+|Feature |Priority |Estimate |Status
+|*Arrays/Vectors* |*⚠️ CRITICAL* |*2-3 days* |*✅ COMPLETE*
+|*Structs/Records* |*⚠️ CRITICAL* |*3-4 days* |*✅ COMPLETE*
+|File I/O |⚠️ CRITICAL |2-3 days |🔜 Next
+|Result/Option |🔴 HIGH |2-3 days |Later
+|HashMap |🔴 HIGH |2-3 days |Later
+|===
+
+*Phase 1 Progress:* 2/5 complete (40%) *Critical Blockers Removed:* 2/2
+(100%) ✅
+
+==== Quick Wins (Remaining)
+
+[width="100%",cols="27%,27%,27%,19%",options="header",]
+|===
+|Feature |Priority |Estimate |Notes
+|*Loops (for/while)* |*🔴 HIGH* |*2-3 days* |*Next quick win*
+|Mutable Variables |🟡 MEDIUM |1-2 days |Later
+|Better Error Messages |🟡 MEDIUM |2-3 days |Later
+|Standard Library |🔴 HIGH |3-5 days |Later
+|===
+
+*Comments:* ✅ Already working (// comments in lexer)
+
+'''''
+
+=== Technical Summary
+
+==== Files Modified
+
+*Core Compiler (both features):* - `+ast.rs+` - Types, expressions,
+struct definitions (+150 lines) - `+tokens.rs+` - New tokens (+15 lines)
+- `+parser.rs+` - Parsing logic (+100 lines) - `+typeck.rs+` - Type
+checking (+150 lines) - `+interpreter.rs+` - Runtime evaluation (+80
+lines) - `+codegen.rs+` - WASM placeholders (+40 lines) - `+main.rs+` -
+Output formatting (+30 lines)
+
+*Tests:* - `+test-vec.eph+`, `+test-vec-comprehensive.eph+` -
+`+test-struct.eph+`, `+test-struct-schema.eph+`
+
+*Documentation:* - `+VEC-SUPPORT-COMPLETE.md+` (~400 lines) -
+`+STRUCT-SUPPORT-COMPLETE.md+` (~450 lines) -
+`+SESSION-2026-02-04-VEC-STRUCT.md+` (this file)
+
+*Total Changes:* ~1,400+ lines of code + documentation
+
+==== Compiler Statistics
+
+*Test Results:* - All existing tests passing: 23/23 ✓ - Vec tests: 2/2
+passing ✓ - Struct tests: 2/2 passing ✓ - *Total: 27/27 passing* ✓
+
+*Build:* - Clean compilation - No errors - 1 warning (unused `+peek+`
+method in parser)
+
+*Performance:* - Compile time: ~10ms per test - Runtime: < 1ms per
+analysis - Memory: < 1MB per test
+
+'''''
+
+=== Language Features Status
+
+==== Complete
+
+[cols=",,",options="header",]
+|===
+|Feature |Status |Notes
+|Basic Types |✅ |i32, i64, bool, String
+|*Vec* |✅ |*Arrays/vectors*
+|*Struct* |✅ |*Custom types*
+|Variables |✅ |let bindings (immutable)
+|Functions |✅ |Parameters, return types
+|Arithmetic |✅ |+, -, *, /, %
+|Comparison |✅ |==, !=, <, >, <=, >=
+|Logical |✅ |&&, \|\| (short-circuit)
+|Bitwise |✅ |&, \|, ^, <<, >>
+|Strings |✅ |Literals, concatenation
+|If/Else |✅ |Conditional expressions
+|Pattern Matching |✅ |match with exhaustiveness
+|Linear Types |✅ |Use exactly once
+|Copy Trait |✅ |Primitives auto-Copy
+|References |✅ |&T, borrow, deref (basic)
+|WASM Compilation |✅ |WAT generation
+|Protocol Analysis |✅ |All 7 analyzers
+|===
+
+==== Phase 1 Remaining Items
+
+[cols=",,",options="header",]
+|===
+|Feature |Priority |Needed For
+|*Loops* |*HIGH* |*Iterate Vec*
+|File I/O |CRITICAL |Read schema files
+|Result/Option |HIGH |Error handling
+|HashMap |HIGH |Name→Type mappings
+|===
+
+'''''
+
+=== Next Steps
+
+==== Immediate (Next Session)
+
+*Option A: Continue Phase 1 (File I/O)* - Implement file reading - Add
+Result type - Error handling for file operations - Estimate: 2-3
+days
+
+*Option B: Quick Win (Loops)* - Implement for/while loops - Iterator
+patterns - Enables Vec iteration - Estimate: 2-3 days - *Recommended:*
+High impact, enables real analysis
+
+*Option C: Hybrid Approach* - Implement basic for loops (1 day) -
+Implement File I/O (2 days) - Estimate: 3 days total
+
+==== Short-Term
+
+[arabic]
+. *Loops* - Iterate over collections
+. *File I/O* - Read schema files
+. *Result/Option* - Error handling
+. *HashMap* - Name lookups
+
+==== Long-Term
+
+[arabic]
+. *Mutable variables* - Build up results
+. *Standard library* - String/math utilities
+. *WASM memory management* - Production WASM
+. *Schema parsers* - Parse .bop, .fbs, .proto
+
+'''''
+
+=== Lessons Learned
+
+[arabic]
+. *Incremental Development Works*
+* Vec first, then Struct
+* Each feature builds on previous
+* Tests validate immediately
+. *Linear Types Practical*
+* Vec and Struct being non-Copy makes sense
+* Resource safety doesn’t impede use
+* Clear error messages help
+. *Type Checker Catches Issues*
+* Field validation at compile-time
+* Element type consistency
+* Missing fields detected early
+. *Parser Composition*
+* Postfix operators (indexing, field access) integrate cleanly
+* Struct literals vs function calls handled naturally
+. *WASM Needs Memory*
+* Type mappings work (→ i32 pointers)
+* Full implementation requires linear memory
+* Interpreter works perfectly without it
+
+'''''
+
+=== Success Metrics
+
+==== MVP Success Criteria
+
+From ROADMAP-NEXT-PHASE.md:
+
+[cols=",,",options="header",]
+|===
+|Criterion |Target |Status
+|Parse 1+ protocol schema format |✓ |⏳ Needs loops + file I/O
+|Analyze 10+ real schemas |✓ |⏳ Foundation ready
+|Match Rust analyzer accuracy |100% |⏳ Once complete
+|Within 2x Rust performance |✓ |⏳ TBD
+|Compile to WASM |✓ |✅ WAT generation works
+|Integrate with protocol-squisher CLI |✓ |⏳ Later
+|===
+
+*Current:* 1/6 complete (WASM compilation ready) *Blocker:* Loops + File
+I/O needed for schema parsing
+
+'''''
+
+=== Commits
+
+[cols=",,",options="header",]
+|===
+|Commit |Description |Lines
+|40da159 |Vec support |+631
+|620bef6 |Struct support |+778
+|*Total* |*Phase 1 critical features* |*~1,409*
+|===
+
+'''''
+
+=== Conclusion
+
+*Major Milestone Achieved: Both Critical Blockers Complete* 🎉
+
+ephapax now has the foundational data structures needed for protocol
+analysis: - ✅ *Vec* - Collections of elements - ✅ *Struct* - Custom
+types with named fields - ✅ *Combined* -
+`+struct Schema { fields: Vec }+`
+
+*What this enables:* - Schema representation as first-class data -
+Type-safe protocol analysis - Foundation for real-world analyzers - Path
+to production readiness
+
+*Remaining work for MVP:* - Loops (iterate collections) - File I/O (read
+schema files) - Result/Option (error handling) - Schema parsers (parse
+protocols)
+
+*Estimated timeline to MVP:* 15-20 days remaining - Phase 1: 10-15 days
+(loops, file I/O, Result/Option) - Phase 2 (WASM production): 10-15 days
+(parallel work) - Phase 3 (parsers): 25-35 days (after Phase 1)
+
+*Next session recommendation:* Implement *Loops* (quick win, high
+impact)
+
+'''''
+
+=== See Also
+
+* VEC-SUPPORT-COMPLETE.md - Vec documentation
+* STRUCT-SUPPORT-COMPLETE.md - Struct documentation
+* ROADMAP-NEXT-PHASE.md - Production roadmap
+* SESSION-COMPLETE-2026-02-04.md - Previous session (Tasks 1-9)
+* NEXT-STEPS.md - Development tasks (to be updated)
+
+'''''
+
+*Session Status:* ✅ Complete *Phase 1 Progress:* 2/5 features complete
+(40%) *Critical Blockers:* 0/2 remaining (100% resolved) ✅ *Next
+Recommended:* Loops (for/while) - HIGH impact quick win
diff --git a/provenance/SESSION-2026-02-04-VEC-STRUCT.md b/provenance/SESSION-2026-02-04-VEC-STRUCT.md
deleted file mode 100644
index c69e5e7..0000000
--- a/provenance/SESSION-2026-02-04-VEC-STRUCT.md
+++ /dev/null
@@ -1,414 +0,0 @@
-
-# Ephapax Development Session - Vec & Struct Implementation
-
-**Date:** 2026-02-04
-**Duration:** Full session (continuation from previous work)
-**Status:** ✅ Complete - Both Phase 1 critical blockers resolved
-
-## Session Overview
-
-This session implemented the two highest-priority critical blockers from ROADMAP-NEXT-PHASE.md Phase 1, enabling complete schema representation and data structure support in ephapax.
-
-## Accomplishments
-
-### Feature 1: Vec Support ✅
-
-**Commit:** 40da159
-**Priority:** ⚠️ CRITICAL (highest priority blocker)
-**Estimate:** 2-3 days
-**Actual:** Completed in session
-
-**Implemented:**
-- `Type::Vec(Box)` for vector types
-- `Expr::VecLit(Vec)` for vector literals `[e1, e2, ...]`
-- `Expr::Index { vec, index }` for indexing `vec[i]`
-- Lexer tokens: `Vec`, `[`, `]`
-- Parser: Vec types, vec literals, postfix indexing
-- Type checker: element consistency, bounds validation
-- Interpreter: `Value::Vec(Vec)` with runtime bounds checking
-- WASM: Type mapping + placeholders (needs linear memory)
-- CLI: Nested vec output formatting
-
-**Features:**
-- Homogeneous vectors: `[1, 2, 3, 4, 5]`
-- Empty vectors: `[]` (default to `Vec`)
-- Mixed element types: `Vec`, `Vec`, `Vec`
-- Type-safe indexing
-- Linear type enforcement (Vec not Copy)
-
-**Tests:**
-- `test-vec.eph` - basic creation and indexing
-- `test-vec-comprehensive.eph` - advanced features
-- All tests pass ✓
-
-**Example:**
-```ephapax
-fn make_vec() -> Vec {
- [10, 20, 30, 40, 50]
-}
-
-fn get_element(vec: Vec, index: i32) -> i32 {
- vec[index] // Type-safe, bounds-checked
-}
-
-fn main() {
- let numbers = make_vec();
- get_element(numbers, 1) // Returns 20
-}
-```
-
-**Impact:**
-- Enables field lists for schemas
-- Supports repeated elements
-- Foundation for batch processing
-- Critical for protocol analysis
-
----
-
-### Feature 2: Struct Support ✅
-
-**Commit:** 620bef6
-**Priority:** ⚠️ CRITICAL (second highest priority blocker)
-**Estimate:** 3-4 days
-**Actual:** Completed in session
-
-**Implemented:**
-- `Type::Struct(String)` for named struct types
-- `StructDef { name, fields }` for struct definitions
-- `Expr::StructLit { name, fields }` for struct literals
-- `Expr::FieldAccess { expr, field }` for field access
-- Lexer tokens: `struct`, `.`
-- Parser: struct definitions, struct literals, postfix field access
-- Type checker: field validation, all fields required, type matching
-- Interpreter: `Value::Struct(String, HashMap)` with field lookup
-- WASM: Type mapping + placeholders (needs linear memory)
-- CLI: Struct output formatting
-
-**Features:**
-- Custom types with named fields
-- Struct definitions: `struct Name { field: Type, ... }`
-- Struct literals: `Name { field: value, ... }`
-- Field access: `struct.field` (postfix operator)
-- Mixed field types: `String`, `i32`, `bool`, `Vec`, nested structs
-- Linear type enforcement (Struct not Copy)
-- Compile-time field validation
-
-**Tests:**
-- `test-struct.eph` - basic struct usage
-- `test-struct-schema.eph` - schema representation
-- All tests pass ✓
-
-**Example:**
-```ephapax
-struct Field {
- name: String,
- field_type: i32,
- optional: bool,
-}
-
-struct Schema {
- name: String,
- version: i32,
-}
-
-fn make_field(name_val: String, type_val: i32, opt: bool) -> Field {
- Field { name: name_val, field_type: type_val, optional: opt }
-}
-
-fn get_field_type(field: Field) -> i32 {
- field.field_type // Type-safe field access
-}
-```
-
-**Impact:**
-- Enables schema representation as data
-- Custom data structures for protocols
-- Type-safe field access
-- Combined with Vec: `struct Schema { fields: Vec }`
-
----
-
-## Combined Impact
-
-**With both Vec and Struct:**
-
-We can now represent complete schemas:
-
-```ephapax
-struct Field {
- name: String,
- field_type: i32,
- optional: bool,
-}
-
-struct Schema {
- name: String,
- fields: Vec, // ✅ Collection of fields
-}
-
-// This is now possible!
-fn analyze_schema(schema: Schema) -> i32 {
- // Can access schema.name, schema.fields
- // Once we add loops, can iterate over fields
- 0 // Placeholder
-}
-```
-
-**This enables:**
-1. **Protocol schema modeling** - the core use case
-2. **Type-safe data structures** - custom types with validation
-3. **Collection processing** - lists of elements
-4. **Real-world analyzers** - foundation complete
-
----
-
-## Roadmap Progress
-
-### Phase 1: Essential Language Features
-
-| Feature | Priority | Estimate | Status |
-|---------|----------|----------|--------|
-| **Arrays/Vectors** | **⚠️ CRITICAL** | **2-3 days** | **✅ COMPLETE** |
-| **Structs/Records** | **⚠️ CRITICAL** | **3-4 days** | **✅ COMPLETE** |
-| File I/O | ⚠️ CRITICAL | 2-3 days | 🔜 Next |
-| Result/Option | 🔴 HIGH | 2-3 days | Later |
-| HashMap | 🔴 HIGH | 2-3 days | Later |
-
-**Phase 1 Progress:** 2/5 complete (40%)
-**Critical Blockers Removed:** 2/2 (100%) ✅
-
-### Quick Wins (Remaining)
-
-| Feature | Priority | Estimate | Notes |
-|---------|----------|----------|-------|
-| **Loops (for/while)** | **🔴 HIGH** | **2-3 days** | **Next quick win** |
-| Mutable Variables | 🟡 MEDIUM | 1-2 days | Later |
-| Better Error Messages | 🟡 MEDIUM | 2-3 days | Later |
-| Standard Library | 🔴 HIGH | 3-5 days | Later |
-
-**Comments:** ✅ Already working (// comments in lexer)
-
----
-
-## Technical Summary
-
-### Files Modified
-
-**Core Compiler (both features):**
-- `ast.rs` - Types, expressions, struct definitions (+150 lines)
-- `tokens.rs` - New tokens (+15 lines)
-- `parser.rs` - Parsing logic (+100 lines)
-- `typeck.rs` - Type checking (+150 lines)
-- `interpreter.rs` - Runtime evaluation (+80 lines)
-- `codegen.rs` - WASM placeholders (+40 lines)
-- `main.rs` - Output formatting (+30 lines)
-
-**Tests:**
-- `test-vec.eph`, `test-vec-comprehensive.eph`
-- `test-struct.eph`, `test-struct-schema.eph`
-
-**Documentation:**
-- `VEC-SUPPORT-COMPLETE.md` (~400 lines)
-- `STRUCT-SUPPORT-COMPLETE.md` (~450 lines)
-- `SESSION-2026-02-04-VEC-STRUCT.md` (this file)
-
-**Total Changes:** ~1,400+ lines of code + documentation
-
-### Compiler Statistics
-
-**Test Results:**
-- All existing tests passing: 23/23 ✓
-- Vec tests: 2/2 passing ✓
-- Struct tests: 2/2 passing ✓
-- **Total: 27/27 passing** ✓
-
-**Build:**
-- Clean compilation
-- No errors
-- 1 warning (unused `peek` method in parser)
-
-**Performance:**
-- Compile time: ~10ms per test
-- Runtime: < 1ms per analysis
-- Memory: < 1MB per test
-
----
-
-## Language Features Status
-
-### Complete
-
-| Feature | Status | Notes |
-|---------|--------|-------|
-| Basic Types | ✅ | i32, i64, bool, String |
-| **Vec** | ✅ | **Arrays/vectors** |
-| **Struct** | ✅ | **Custom types** |
-| Variables | ✅ | let bindings (immutable) |
-| Functions | ✅ | Parameters, return types |
-| Arithmetic | ✅ | +, -, *, /, % |
-| Comparison | ✅ | ==, !=, <, >, <=, >= |
-| Logical | ✅ | &&, \|\| (short-circuit) |
-| Bitwise | ✅ | &, \|, ^, <<, >> |
-| Strings | ✅ | Literals, concatenation |
-| If/Else | ✅ | Conditional expressions |
-| Pattern Matching | ✅ | match with exhaustiveness |
-| Linear Types | ✅ | Use exactly once |
-| Copy Trait | ✅ | Primitives auto-Copy |
-| References | ✅ | &T, borrow, deref (basic) |
-| WASM Compilation | ✅ | WAT generation |
-| Protocol Analysis | ✅ | All 7 analyzers |
-
-### Phase 1 Remaining Items
-
-| Feature | Priority | Needed For |
-|---------|----------|------------|
-| **Loops** | **HIGH** | **Iterate Vec\** |
-| File I/O | CRITICAL | Read schema files |
-| Result/Option | HIGH | Error handling |
-| HashMap | HIGH | Name→Type mappings |
-
----
-
-## Next Steps
-
-### Immediate (Next Session)
-
-**Option A: Continue Phase 1 (File I/O)**
-- Implement file reading
-- Add Result type
-- Error handling for file operations
-- Estimate: 2-3 days
-
-**Option B: Quick Win (Loops)**
-- Implement for/while loops
-- Iterator patterns
-- Enables Vec iteration
-- Estimate: 2-3 days
-- **Recommended:** High impact, enables real analysis
-
-**Option C: Hybrid Approach**
-- Implement basic for loops (1 day)
-- Implement File I/O (2 days)
-- Estimate: 3 days total
-
-### Short-Term
-
-1. **Loops** - Iterate over collections
-2. **File I/O** - Read schema files
-3. **Result/Option** - Error handling
-4. **HashMap** - Name lookups
-
-### Long-Term
-
-1. **Mutable variables** - Build up results
-2. **Standard library** - String/math utilities
-3. **WASM memory management** - Production WASM
-4. **Schema parsers** - Parse .bop, .fbs, .proto
-
----
-
-## Lessons Learned
-
-1. **Incremental Development Works**
- - Vec first, then Struct
- - Each feature builds on previous
- - Tests validate immediately
-
-2. **Linear Types Practical**
- - Vec and Struct being non-Copy makes sense
- - Resource safety doesn't impede use
- - Clear error messages help
-
-3. **Type Checker Catches Issues**
- - Field validation at compile-time
- - Element type consistency
- - Missing fields detected early
-
-4. **Parser Composition**
- - Postfix operators (indexing, field access) integrate cleanly
- - Struct literals vs function calls handled naturally
-
-5. **WASM Needs Memory**
- - Type mappings work (→ i32 pointers)
- - Full implementation requires linear memory
- - Interpreter works perfectly without it
-
----
-
-## Success Metrics
-
-### MVP Success Criteria
-
-From ROADMAP-NEXT-PHASE.md:
-
-| Criterion | Target | Status |
-|-----------|--------|--------|
-| Parse 1+ protocol schema format | ✓ | ⏳ Needs loops + file I/O |
-| Analyze 10+ real schemas | ✓ | ⏳ Foundation ready |
-| Match Rust analyzer accuracy | 100% | ⏳ Once complete |
-| Within 2x Rust performance | ✓ | ⏳ TBD |
-| Compile to WASM | ✓ | ✅ WAT generation works |
-| Integrate with protocol-squisher CLI | ✓ | ⏳ Later |
-
-**Current:** 1/6 complete (WASM compilation ready)
-**Blocker:** Loops + File I/O needed for schema parsing
-
----
-
-## Commits
-
-| Commit | Description | Lines |
-|--------|-------------|-------|
-| 40da159 | Vec support | +631 |
-| 620bef6 | Struct support | +778 |
-| **Total** | **Phase 1 critical features** | **~1,409** |
-
----
-
-## Conclusion
-
-**Major Milestone Achieved: Both Critical Blockers Complete** 🎉
-
-ephapax now has the foundational data structures needed for protocol analysis:
-- ✅ **Vec** - Collections of elements
-- ✅ **Struct** - Custom types with named fields
-- ✅ **Combined** - `struct Schema { fields: Vec }`
-
-**What this enables:**
-- Schema representation as first-class data
-- Type-safe protocol analysis
-- Foundation for real-world analyzers
-- Path to production readiness
-
-**Remaining work for MVP:**
-- Loops (iterate collections)
-- File I/O (read schema files)
-- Result/Option (error handling)
-- Schema parsers (parse protocols)
-
-**Estimated timeline to MVP:** 15-20 days remaining
-- Phase 1: 10-15 days (loops, file I/O, Result/Option)
-- Phase 2 (WASM production): 10-15 days (parallel work)
-- Phase 3 (parsers): 25-35 days (after Phase 1)
-
-**Next session recommendation:** Implement **Loops** (quick win, high impact)
-
----
-
-## See Also
-
-- [VEC-SUPPORT-COMPLETE.md](VEC-SUPPORT-COMPLETE.md) - Vec documentation
-- [STRUCT-SUPPORT-COMPLETE.md](STRUCT-SUPPORT-COMPLETE.md) - Struct documentation
-- [ROADMAP-NEXT-PHASE.md](ROADMAP-NEXT-PHASE.md) - Production roadmap
-- [SESSION-COMPLETE-2026-02-04.md](SESSION-COMPLETE-2026-02-04.md) - Previous session (Tasks 1-9)
-- [NEXT-STEPS.md](NEXT-STEPS.md) - Development tasks (to be updated)
-
----
-
-**Session Status:** ✅ Complete
-**Phase 1 Progress:** 2/5 features complete (40%)
-**Critical Blockers:** 0/2 remaining (100% resolved) ✅
-**Next Recommended:** Loops (for/while) - HIGH impact quick win
diff --git a/provenance/TEST-COVERAGE.adoc b/provenance/TEST-COVERAGE.adoc
new file mode 100644
index 0000000..67aad15
--- /dev/null
+++ b/provenance/TEST-COVERAGE.adoc
@@ -0,0 +1,315 @@
+== Protocol Squisher Test Coverage
+
+*Total: 829 tests passing* (as of 2026-02-28)
+
+=== Test Breakdown by Component
+
+==== 1. ephapax IR (9 tests)
+
+*Coverage:* - ✓ FFI integration with Idris2 (9 tests) - ✓ Transport
+class analysis (Concorde/Business/Economy/Wheelbarrow) - ✓ Rust bindings
+for ephapax functions - ✓ Type conversion classification
+
+*What’s Tested:* - `+test_ephapax_context_creation+` -
+`+test_transport_class_from_u8+` - `+test_concorde_classification+`
+(i64→i64, perfect match) - `+test_business_classification+` (i32→i64,
+safe widening) - `+test_wheelbarrow_classification+` (i64→i32, unsafe
+narrowing) - FFI boundary safety - Memory management across language
+boundaries
+
+*Gaps:* - [ ] Property tests for transport class invariants - [ ]
+Fuzzing for FFI boundary
+
+'''''
+
+==== 2. Protocol Squisher IR (11 tests)
+
+*Coverage:* - ✓ Schema creation and validation - ✓ Type definitions
+(Struct, Enum, Alias, Newtype, Union) - ✓ Field definitions with
+constraints - ✓ Metadata handling
+
+*What’s Tested:* - Schema builder - Type system completeness - Field
+validation - Serialization to JSON
+
+*Gaps:* - [ ] Complex nested type hierarchies - [ ] Circular reference
+handling - [ ] Schema versioning/migration
+
+'''''
+
+==== 3. Compatibility Engine (31 tests)
+
+*Coverage:* - ✓ ephapax-powered schema analysis (4 tests) - ✓ Type
+comparison logic - ✓ Transport class propagation - ✓ Field-level
+compatibility tracking
+
+*What’s Tested:* - `+test_engine_creation+` -
+`+test_zero_copy_detection+` (i64→i64 = Concorde) -
+`+test_narrowing_detection+` (i64→i32 = Wheelbarrow) -
+`+test_conversion_summary+` (quality metrics) - Struct compatibility -
+Enum compatibility - Container type compatibility - Loss documentation
+
+*Gaps:* - [ ] Union type compatibility - [ ] Generic type compatibility
+- [ ] Lifetime/ownership analysis
+
+'''''
+
+==== 4. Rust Analyzer (24 tests)
+
+*Coverage:* - ✓ Serde struct extraction (syn parser) - ✓ ephapax bridge
+for transport class analysis (24 tests) - ✓ Field attribute parsing - ✓
+Type mapping to IR
+
+*What’s Tested:* - Basic struct parsing - Serde attribute handling -
+Generic type extraction - Nested structs - Enum variants - Zero-copy
+path detection - Unsafe conversion detection
+
+*Gaps:* - [ ] Procedural macro analysis - [ ] Complex trait bounds - [ ]
+Associated types
+
+'''''
+
+==== 5. Python Analyzer (23 tests, 1 ignored)
+
+*Coverage:* - ✓ Pydantic model introspection (23 tests) - ✓ ephapax
+bridge for Py↔Rust interop (23 tests) - ✓ Type annotation parsing - ✓
+Field validators
+
+*What’s Tested:* - Basic Pydantic class parsing - Type hints (typing
+module) - Optional fields - Default values - Zero-copy path detection -
+PyRust interop analysis
+
+*Ignored:* - `+test_full_pydantic_introspection+` - requires Python
+runtime
+
+*Gaps:* - [ ] Runtime Pydantic introspection (needs Python embedding) -
+[ ] Custom validators - [ ] Pydantic v2 features
+
+'''''
+
+==== 6. PyO3 Code Generation (33 tests)
+
+*Coverage:* - ✓ Transport-class-aware codegen (4 tests for
+optimized_gen) - ✓ Direct field bindings (Concorde) - ✓ JSON fallback
+bindings (Wheelbarrow) - ✓ Python stub generation
+
+*What’s Tested:* - `+test_generator_creation+` -
+`+test_zero_copy_generation+` (i64→i64 direct access) -
+`+test_narrowing_generation+` (i64→i32 JSON fallback with warnings) -
+`+test_python_stub_generation+` (.pyi stubs) -
+`+test_module_registration+` (PyO3 module) - Struct conversions - Enum
+conversions - Option handling - Quality comments in generated code
+
+*Gaps:* - [ ] Error propagation in generated code - [ ] Complex lifetime
+scenarios - [ ] Performance benchmarks for generated code
+
+'''''
+
+==== 7. JSON Fallback (20 tests)
+
+*Coverage:* - ✓ Selective JSON fallback (5 tests for ephapax_fallback) -
+✓ Mixed conversion strategies - ✓ Error types (4: Serialization,
+Deserialization, DataLoss, Validation) - ✓ Fallback statistics
+
+*What’s Tested:* - `+test_generator_creation+` -
+`+test_mixed_conversion+` (i64→i64 direct + i64→i32 JSON) -
+`+test_all_direct_conversion+` (zero JSON overhead) -
+`+test_error_type_generation+` (ConversionError enum) -
+`+test_warnings_toggle+` (WARNING comment control) - Only Wheelbarrow
+fields use JSON - Direct conversion for Concorde/Business
+
+*Gaps:* - [ ] Custom serialization formats - [ ] Streaming serialization
+- [ ] Partial deserialization recovery
+
+'''''
+
+==== 8. Optimizer (22 tests)
+
+*Coverage:* - ✓ ephapax-powered optimization suggestions (6 tests) - ✓
+Type widening recommendations - ✓ Optional field suggestions - ✓ Impact
+calculation - ✓ Production readiness threshold
+
+*What’s Tested:* - `+test_optimizer_suggests_widening+` (i32→i64,
+f32→f64) - `+test_potential_improvement_calculation+` (0% → 100%) -
+`+test_production_readiness_threshold+` (>90% safe) -
+`+test_suggestions_sorted_by_impact+` - `+test_get_wider_type+` -
+`+test_count_total_fields+` - Primitive type optimization - Container
+type optimization - Struct field optimization
+
+*Gaps:* - [ ] Nested type optimization - [ ] Cross-crate optimization -
+[ ] Performance impact estimation
+
+'''''
+
+==== 9. Integration Tests (7 tests)
+
+*Coverage:* - ✓ End-to-end pipeline validation - ✓ Transport class
+consistency - ✓ Quality metrics validation - ✓ Invariant: "`If it
+compiles, it carries`"
+
+*What’s Tested:* - `+test_e2e_zero_copy_conversion+` (100% Concorde) -
+`+test_e2e_mixed_conversion_strategy+` (Concorde + Wheelbarrow) -
+`+test_e2e_json_fallback_generation+` (Wheelbarrow-only) -
+`+test_e2e_full_pipeline+` (complete workflow) -
+`+test_e2e_quality_metrics+` (quality predicates) -
+`+test_e2e_code_generation_quality+` (generated code checks) -
+`+test_e2e_transport_class_consistency+` (cross-component agreement)
+
+*Gaps:* - [ ] Real Rust↔Python runtime integration - [ ] Performance
+benchmarks - [ ] Stress testing with large schemas
+
+'''''
+
+=== Missing Test Categories
+
+==== High Priority
+
+[arabic]
+. *Nested Types* (not yet implemented)
+* [ ] Vec
+* [ ] HashMap
+* [ ] Option
+* [ ] Recursive types
+
+==== Medium Priority
+
+[arabic, start=2]
+. *Error Path Tests* (basic coverage)
+* [ ] Malformed schemas
+* [ ] Conflicting types
+* [ ] Invalid configurations
+
+==== Low Priority
+
+[arabic, start=3]
+. *Documentation Tests* (minimal doc tests)
+* [ ] README examples
+* [ ] API documentation examples
+* [ ] Tutorial code snippets
+
+'''''
+
+=== Test Quality Metrics
+
+==== Coverage by Phase
+
+* *Foundation (ephapax IR, core IR, analyzers)*: 67 tests ✓
+* *Compatibility (engine, optimizer)*: 53 tests ✓
+* *Code Generation (PyO3, JSON fallback)*: 53 tests ✓
+* *Integration*: 7 tests ✓
+* *CLI*: 19 tests ✓
+* *Property tests*: 66 tests ✓
+* *Protocol analyzers (13 formats)*: 498+ tests ✓
+* *Phase 3 modules (security, enterprise, distributed, performance)*:
+66+ tests ✓
+
+==== Transport Class Testing
+
+* ✓ Concorde (zero-copy): Well tested
+* ✓ Business (safe widening): Well tested
+* ⚠️ Economy (documented losses): Limited testing
+* ✓ Wheelbarrow (JSON fallback): Well tested
+
+==== Invariant Testing
+
+* ✓ "`If it compiles, it carries`": Validated in integration tests
+* ✓ Transport class consistency: Validated across all components
+* ✓ Quality metrics accuracy: Validated (production ready, needs
+optimization)
+
+'''''
+
+=== Recommended Next Tests
+
+==== Immediate (this week)
+
+[arabic]
+. *CLI integration tests* (10-15 tests)
+* Command execution
+* Output validation
+* Error messages
+. *Nested type tests* (8-10 tests)
+* Vec
+* HashMap
+* Option (recursive)
+
+==== Short-term (this month)
+
+[arabic, start=3]
+. *Property tests* (5-10 tests)
+* Round-trip: Rust → IR → Python → IR → Rust
+* Transport class monotonicity
+* Schema normalization
+. *Performance benchmarks* (5 benchmarks)
+* Schema analysis (1k types)
+* Code generation (1k types)
+* Optimization suggestion (1k types)
+
+==== Long-term
+
+[arabic, start=5]
+. *Real runtime integration* (3-5 tests)
+* PyO3 compilation
+* Python import and usage
+* Actual data conversion
+. *Fuzzing* (continuous)
+* Schema fuzzing
+* Type fuzzing
+* FFI boundary fuzzing
+
+'''''
+
+=== How to Run Tests
+
+==== All tests
+
+[source,bash]
+----
+cargo test --workspace
+----
+
+==== Specific component
+
+[source,bash]
+----
+cargo test -p protocol-squisher-compat
+cargo test -p protocol-squisher-optimizer
+----
+
+==== Integration tests only
+
+[source,bash]
+----
+cargo test -p protocol-squisher-integration-tests
+----
+
+==== With coverage (requires cargo-llvm-cov)
+
+[source,bash]
+----
+cargo install cargo-llvm-cov
+cargo llvm-cov --workspace --html
+# Open target/llvm-cov/html/index.html
+----
+
+==== With detailed output
+
+[source,bash]
+----
+cargo test --workspace -- --nocapture --test-threads=1
+----
+
+'''''
+
+=== Test Philosophy
+
+[arabic]
+. *Unit tests*: Every public function has at least one test
+. *Integration tests*: Every component interaction tested end-to-end
+. *Property tests*: Invariants proven with randomized inputs
+. *Regression tests*: Every bug gets a test to prevent recurrence
+. *Performance tests*: Track performance over time
+
+Current adherence: - Unit tests: ✓ 90%+ coverage - Integration tests: ✓
+Core workflows covered - Property tests: ✓ 66 tests across invariants -
+Regression tests: ✓ Ad-hoc coverage - Performance tests: ✓ 4 benchmark
+suites (Criterion)
diff --git a/provenance/TEST-COVERAGE.md b/provenance/TEST-COVERAGE.md
deleted file mode 100644
index eacad6d..0000000
--- a/provenance/TEST-COVERAGE.md
+++ /dev/null
@@ -1,352 +0,0 @@
-
-# Protocol Squisher Test Coverage
-
-**Total: 829 tests passing** (as of 2026-02-28)
-
-## Test Breakdown by Component
-
-### 1. ephapax IR (9 tests)
-**Coverage:**
-- ✓ FFI integration with Idris2 (9 tests)
-- ✓ Transport class analysis (Concorde/Business/Economy/Wheelbarrow)
-- ✓ Rust bindings for ephapax functions
-- ✓ Type conversion classification
-
-**What's Tested:**
-- `test_ephapax_context_creation`
-- `test_transport_class_from_u8`
-- `test_concorde_classification` (i64→i64, perfect match)
-- `test_business_classification` (i32→i64, safe widening)
-- `test_wheelbarrow_classification` (i64→i32, unsafe narrowing)
-- FFI boundary safety
-- Memory management across language boundaries
-
-**Gaps:**
-- [ ] Property tests for transport class invariants
-- [ ] Fuzzing for FFI boundary
-
----
-
-### 2. Protocol Squisher IR (11 tests)
-**Coverage:**
-- ✓ Schema creation and validation
-- ✓ Type definitions (Struct, Enum, Alias, Newtype, Union)
-- ✓ Field definitions with constraints
-- ✓ Metadata handling
-
-**What's Tested:**
-- Schema builder
-- Type system completeness
-- Field validation
-- Serialization to JSON
-
-**Gaps:**
-- [ ] Complex nested type hierarchies
-- [ ] Circular reference handling
-- [ ] Schema versioning/migration
-
----
-
-### 3. Compatibility Engine (31 tests)
-**Coverage:**
-- ✓ ephapax-powered schema analysis (4 tests)
-- ✓ Type comparison logic
-- ✓ Transport class propagation
-- ✓ Field-level compatibility tracking
-
-**What's Tested:**
-- `test_engine_creation`
-- `test_zero_copy_detection` (i64→i64 = Concorde)
-- `test_narrowing_detection` (i64→i32 = Wheelbarrow)
-- `test_conversion_summary` (quality metrics)
-- Struct compatibility
-- Enum compatibility
-- Container type compatibility
-- Loss documentation
-
-**Gaps:**
-- [ ] Union type compatibility
-- [ ] Generic type compatibility
-- [ ] Lifetime/ownership analysis
-
----
-
-### 4. Rust Analyzer (24 tests)
-**Coverage:**
-- ✓ Serde struct extraction (syn parser)
-- ✓ ephapax bridge for transport class analysis (24 tests)
-- ✓ Field attribute parsing
-- ✓ Type mapping to IR
-
-**What's Tested:**
-- Basic struct parsing
-- Serde attribute handling
-- Generic type extraction
-- Nested structs
-- Enum variants
-- Zero-copy path detection
-- Unsafe conversion detection
-
-**Gaps:**
-- [ ] Procedural macro analysis
-- [ ] Complex trait bounds
-- [ ] Associated types
-
----
-
-### 5. Python Analyzer (23 tests, 1 ignored)
-**Coverage:**
-- ✓ Pydantic model introspection (23 tests)
-- ✓ ephapax bridge for Py↔Rust interop (23 tests)
-- ✓ Type annotation parsing
-- ✓ Field validators
-
-**What's Tested:**
-- Basic Pydantic class parsing
-- Type hints (typing module)
-- Optional fields
-- Default values
-- Zero-copy path detection
-- PyRust interop analysis
-
-**Ignored:**
-- `test_full_pydantic_introspection` - requires Python runtime
-
-**Gaps:**
-- [ ] Runtime Pydantic introspection (needs Python embedding)
-- [ ] Custom validators
-- [ ] Pydantic v2 features
-
----
-
-### 6. PyO3 Code Generation (33 tests)
-**Coverage:**
-- ✓ Transport-class-aware codegen (4 tests for optimized_gen)
-- ✓ Direct field bindings (Concorde)
-- ✓ JSON fallback bindings (Wheelbarrow)
-- ✓ Python stub generation
-
-**What's Tested:**
-- `test_generator_creation`
-- `test_zero_copy_generation` (i64→i64 direct access)
-- `test_narrowing_generation` (i64→i32 JSON fallback with warnings)
-- `test_python_stub_generation` (.pyi stubs)
-- `test_module_registration` (PyO3 module)
-- Struct conversions
-- Enum conversions
-- Option handling
-- Quality comments in generated code
-
-**Gaps:**
-- [ ] Error propagation in generated code
-- [ ] Complex lifetime scenarios
-- [ ] Performance benchmarks for generated code
-
----
-
-### 7. JSON Fallback (20 tests)
-**Coverage:**
-- ✓ Selective JSON fallback (5 tests for ephapax_fallback)
-- ✓ Mixed conversion strategies
-- ✓ Error types (4: Serialization, Deserialization, DataLoss, Validation)
-- ✓ Fallback statistics
-
-**What's Tested:**
-- `test_generator_creation`
-- `test_mixed_conversion` (i64→i64 direct + i64→i32 JSON)
-- `test_all_direct_conversion` (zero JSON overhead)
-- `test_error_type_generation` (ConversionError enum)
-- `test_warnings_toggle` (WARNING comment control)
-- Only Wheelbarrow fields use JSON
-- Direct conversion for Concorde/Business
-
-**Gaps:**
-- [ ] Custom serialization formats
-- [ ] Streaming serialization
-- [ ] Partial deserialization recovery
-
----
-
-### 8. Optimizer (22 tests)
-**Coverage:**
-- ✓ ephapax-powered optimization suggestions (6 tests)
-- ✓ Type widening recommendations
-- ✓ Optional field suggestions
-- ✓ Impact calculation
-- ✓ Production readiness threshold
-
-**What's Tested:**
-- `test_optimizer_suggests_widening` (i32→i64, f32→f64)
-- `test_potential_improvement_calculation` (0% → 100%)
-- `test_production_readiness_threshold` (>90% safe)
-- `test_suggestions_sorted_by_impact`
-- `test_get_wider_type`
-- `test_count_total_fields`
-- Primitive type optimization
-- Container type optimization
-- Struct field optimization
-
-**Gaps:**
-- [ ] Nested type optimization
-- [ ] Cross-crate optimization
-- [ ] Performance impact estimation
-
----
-
-### 9. Integration Tests (7 tests)
-**Coverage:**
-- ✓ End-to-end pipeline validation
-- ✓ Transport class consistency
-- ✓ Quality metrics validation
-- ✓ Invariant: "If it compiles, it carries"
-
-**What's Tested:**
-- `test_e2e_zero_copy_conversion` (100% Concorde)
-- `test_e2e_mixed_conversion_strategy` (Concorde + Wheelbarrow)
-- `test_e2e_json_fallback_generation` (Wheelbarrow-only)
-- `test_e2e_full_pipeline` (complete workflow)
-- `test_e2e_quality_metrics` (quality predicates)
-- `test_e2e_code_generation_quality` (generated code checks)
-- `test_e2e_transport_class_consistency` (cross-component agreement)
-
-**Gaps:**
-- [ ] Real Rust↔Python runtime integration
-- [ ] Performance benchmarks
-- [ ] Stress testing with large schemas
-
----
-
-## Missing Test Categories
-
-### High Priority
-1. **Nested Types** (not yet implemented)
- - [ ] Vec>
- - [ ] HashMap>
- - [ ] Option>
- - [ ] Recursive types
-
-### Medium Priority
-2. **Error Path Tests** (basic coverage)
- - [ ] Malformed schemas
- - [ ] Conflicting types
- - [ ] Invalid configurations
-
-### Low Priority
-3. **Documentation Tests** (minimal doc tests)
- - [ ] README examples
- - [ ] API documentation examples
- - [ ] Tutorial code snippets
-
----
-
-## Test Quality Metrics
-
-### Coverage by Phase
-- **Foundation (ephapax IR, core IR, analyzers)**: 67 tests ✓
-- **Compatibility (engine, optimizer)**: 53 tests ✓
-- **Code Generation (PyO3, JSON fallback)**: 53 tests ✓
-- **Integration**: 7 tests ✓
-- **CLI**: 19 tests ✓
-- **Property tests**: 66 tests ✓
-- **Protocol analyzers (13 formats)**: 498+ tests ✓
-- **Phase 3 modules (security, enterprise, distributed, performance)**: 66+ tests ✓
-
-### Transport Class Testing
-- ✓ Concorde (zero-copy): Well tested
-- ✓ Business (safe widening): Well tested
-- ⚠️ Economy (documented losses): Limited testing
-- ✓ Wheelbarrow (JSON fallback): Well tested
-
-### Invariant Testing
-- ✓ "If it compiles, it carries": Validated in integration tests
-- ✓ Transport class consistency: Validated across all components
-- ✓ Quality metrics accuracy: Validated (production ready, needs optimization)
-
----
-
-## Recommended Next Tests
-
-### Immediate (this week)
-1. **CLI integration tests** (10-15 tests)
- - Command execution
- - Output validation
- - Error messages
-
-2. **Nested type tests** (8-10 tests)
- - Vec>
- - HashMap>
- - Option> (recursive)
-
-### Short-term (this month)
-3. **Property tests** (5-10 tests)
- - Round-trip: Rust → IR → Python → IR → Rust
- - Transport class monotonicity
- - Schema normalization
-
-4. **Performance benchmarks** (5 benchmarks)
- - Schema analysis (1k types)
- - Code generation (1k types)
- - Optimization suggestion (1k types)
-
-### Long-term
-5. **Real runtime integration** (3-5 tests)
- - PyO3 compilation
- - Python import and usage
- - Actual data conversion
-
-6. **Fuzzing** (continuous)
- - Schema fuzzing
- - Type fuzzing
- - FFI boundary fuzzing
-
----
-
-## How to Run Tests
-
-### All tests
-```bash
-cargo test --workspace
-```
-
-### Specific component
-```bash
-cargo test -p protocol-squisher-compat
-cargo test -p protocol-squisher-optimizer
-```
-
-### Integration tests only
-```bash
-cargo test -p protocol-squisher-integration-tests
-```
-
-### With coverage (requires cargo-llvm-cov)
-```bash
-cargo install cargo-llvm-cov
-cargo llvm-cov --workspace --html
-# Open target/llvm-cov/html/index.html
-```
-
-### With detailed output
-```bash
-cargo test --workspace -- --nocapture --test-threads=1
-```
-
----
-
-## Test Philosophy
-
-1. **Unit tests**: Every public function has at least one test
-2. **Integration tests**: Every component interaction tested end-to-end
-3. **Property tests**: Invariants proven with randomized inputs
-4. **Regression tests**: Every bug gets a test to prevent recurrence
-5. **Performance tests**: Track performance over time
-
-Current adherence:
-- Unit tests: ✓ 90%+ coverage
-- Integration tests: ✓ Core workflows covered
-- Property tests: ✓ 66 tests across invariants
-- Regression tests: ✓ Ad-hoc coverage
-- Performance tests: ✓ 4 benchmark suites (Criterion)
diff --git a/provenance/TEST-NEEDS.adoc b/provenance/TEST-NEEDS.adoc
new file mode 100644
index 0000000..a4710ea
--- /dev/null
+++ b/provenance/TEST-NEEDS.adoc
@@ -0,0 +1,130 @@
+== TEST-NEEDS.md — protocol-squisher
+
+=== CRG Grade: C — ACHIEVED 2026-04-04
+
+____
+Updated 2026-04-04: CRG C grade ACHIEVED. Test suite is comprehensive
+across unit, property-based, integration, and benchmark categories.
+____
+
+=== Current State — CRG C ACHIEVED
+
+[width="100%",cols="48%,15%,22%,15%",options="header",]
+|===
+|Category |Count |Status |Notes
+|*Total Passing* |*1378* |✓ PASSING |`+cargo test --workspace+` verified
+2026-04-04
+
+|Unit tests |~850+ |✓ Complete |Inline `+#[test]+` across 50+ crates
+(compat, ir, shape-ir, analyzers, etc.)
+
+|Property-based |38+ |✓ Complete |Dedicated
+`+protocol-squisher-property-tests+` crate (proptest framework)
+
+|Integration/E2E |66+ |✓ Complete |Dedicated
+`+protocol-squisher-integration-tests+` crate — full pipeline
+(schema→IR→compare→report)
+
+|Security tests |40+ |✓ Complete |Dedicated
+`+protocol-squisher-security-bridge+` crate — TLS negotiation, cert
+validation, audit
+
+|Benchmarks |Real |✓ Complete |6 Criterion benchmark suites:
+container_operations, generated_vs_handwritten, optimizer, shape_ir,
+transport_classes, analysis_throughput
+
+|Doc tests |8+ |✓ Passing |shape-ir and
+protocol-squisher-thrift-analyzer documentation tests
+|===
+
+*Source modules:* ~183 Rust source files across main + crates + Elixir
+crawler + Zig FFI + Idris2 ABI.
+
+=== Test Categories (Verified 2026-04-04)
+
+==== Unit Tests (~850+)
+
+* *compat crate*: ephapax_engine, bidirectional, compare, schema,
+transport modules
+* *ir crate*: constraints, schema, extract, and library tests
+* *shape-ir crate*: 165+ tests (124 unit + 36 property + 5 doc)
+** All 11 shape constructors tested
+** Comparison engine (symmetry, transitivity)
+** Shape extractors (SQL, OpenAPI, Arrow IPC)
+** Category laws and Dijkstra pathfinding
+* *Analyzer crates* (17 total): OpenAPI, Protobuf, GraphQL, TOML, SQL
+DDL, etc.
+* *Codegen crates*: PyO3, JSON fallback, Zig FFI
+* *Elixir crawler*: 9 test files across multiple modules
+
+==== Property-Based Tests (38+)
+
+*Dedicated crate*: `+protocol-squisher-property-tests+` -
+*primitive_matrix*: All type combinations (i8→i128, u8→u128, f32↔f64,
+etc.) - *container_combinations*: Nested arrays, maps, options, results,
+tuples - *edge_cases*: Boundary conditions, empty schemas, circular
+references - *Transport class lattice*: join/meet operations,
+idempotence, associativity - *Bidirectional symmetry*: A compat B
+implications on B compat A
+
+==== Integration & E2E Tests (66+)
+
+*Dedicated crate*: `+protocol-squisher-integration-tests+` - Full
+pipeline: schema → IR → compare → compatibility report - Multi-format
+consistency: same protocol in OpenAPI, Protobuf, GraphQL - Concorde
+(zero-copy), Business (safe widening), Wheelbarrow (lossy) conversions -
+Code generation verification: PyO3 and JSON fallback integration -
+Nested structures and field-by-field analysis - Cross-crate module
+initialization
+
+==== Security Tests (40+)
+
+*Dedicated crate*: `+protocol-squisher-security-bridge+` - TLS profile
+validation (v1.0–v1.3) - Key exchange verification (RSA, DHE, ECDHE,
+PSK) - Certificate chain validation - Noise pattern mapping (NN, XX, IK,
+NK, KK) - Security property verification (forward secrecy, mutual auth,
+replay resistance) - Downgrade attack prevention - Runtime verification
+protocols
+
+==== Benchmarks (6 suites, all REAL)
+
+* *container_operations.rs*: Nested data structure conversion overhead
+* *generated_vs_handwritten.rs*: Auto-generated vs manual code
+performance
+* *optimizer_bench.rs*: Optimization algorithm efficiency
+* *shape_benchmarks.rs*: Shape IR transformation latency
+* *transport_classes.rs*: Transport class classification speed
+* *analysis_throughput.rs*: Full-pipeline schema analysis throughput
+
+==== Doc Tests (8+)
+
+* shape-ir module documentation tests
+* protocol-squisher-thrift-analyzer compile tests
+
+=== CRG Certification
+
+*Grade: C (ACHIEVED 2026-04-04)* - 1378 passing tests across all
+categories - Property-based testing framework in place (proptest) -
+Integration test crate with full E2E scenarios - Security-specific test
+suite - Real Criterion benchmarks (6 suites) - 100% test execution
+success rate - All dangerous patterns banned (no believe_me,
+assert_total, Admitted, sorry, unsafeCoerce, etc.)
+
+=== Future Enhancements (Out of Scope for CRG C)
+
+==== Optional Additions (Phase 2+)
+
+* [ ] Crawler throughput benchmarks (infrastructure-dependent)
+* [ ] Parallel schema analysis scaling tests (distributed workload
+testing)
+* [ ] Malicious schema injection tests (security hardening)
+* [ ] Crawler SSRF mitigation tests (network isolation testing)
+* [ ] Schema size DoS resistance tests (resource exhaustion scenarios)
+
+==== Why Not Blocking CRG C
+
+CRG C requires: passing build, comprehensive unit/property/integration
+tests, real benchmarks, and no dangerous patterns. All met as of
+2026-04-04. Phase 2+ enhancements add depth in specialized areas
+(distributed execution, malicious input hardening) that go beyond CRG C
+scope.
diff --git a/provenance/TEST-NEEDS.md b/provenance/TEST-NEEDS.md
deleted file mode 100644
index 0ffb63b..0000000
--- a/provenance/TEST-NEEDS.md
+++ /dev/null
@@ -1,99 +0,0 @@
-
-# TEST-NEEDS.md — protocol-squisher
-
-## CRG Grade: C — ACHIEVED 2026-04-04
-
-> Updated 2026-04-04: CRG C grade ACHIEVED. Test suite is comprehensive across unit, property-based, integration, and benchmark categories.
-
-## Current State — CRG C ACHIEVED
-
-| Category | Count | Status | Notes |
-|---------------------|-------|----------|-------|
-| **Total Passing** | **1378** | ✓ PASSING | `cargo test --workspace` verified 2026-04-04 |
-| Unit tests | ~850+ | ✓ Complete | Inline `#[test]` across 50+ crates (compat, ir, shape-ir, analyzers, etc.) |
-| Property-based | 38+ | ✓ Complete | Dedicated `protocol-squisher-property-tests` crate (proptest framework) |
-| Integration/E2E | 66+ | ✓ Complete | Dedicated `protocol-squisher-integration-tests` crate — full pipeline (schema→IR→compare→report) |
-| Security tests | 40+ | ✓ Complete | Dedicated `protocol-squisher-security-bridge` crate — TLS negotiation, cert validation, audit |
-| Benchmarks | Real | ✓ Complete | 6 Criterion benchmark suites: container_operations, generated_vs_handwritten, optimizer, shape_ir, transport_classes, analysis_throughput |
-| Doc tests | 8+ | ✓ Passing | shape-ir and protocol-squisher-thrift-analyzer documentation tests |
-
-**Source modules:** ~183 Rust source files across main + crates + Elixir crawler + Zig FFI + Idris2 ABI.
-
-## Test Categories (Verified 2026-04-04)
-
-### Unit Tests (~850+)
-- **compat crate**: ephapax_engine, bidirectional, compare, schema, transport modules
-- **ir crate**: constraints, schema, extract, and library tests
-- **shape-ir crate**: 165+ tests (124 unit + 36 property + 5 doc)
- - All 11 shape constructors tested
- - Comparison engine (symmetry, transitivity)
- - Shape extractors (SQL, OpenAPI, Arrow IPC)
- - Category laws and Dijkstra pathfinding
-- **Analyzer crates** (17 total): OpenAPI, Protobuf, GraphQL, TOML, SQL DDL, etc.
-- **Codegen crates**: PyO3, JSON fallback, Zig FFI
-- **Elixir crawler**: 9 test files across multiple modules
-
-### Property-Based Tests (38+)
-**Dedicated crate**: `protocol-squisher-property-tests`
-- **primitive_matrix**: All type combinations (i8→i128, u8→u128, f32↔f64, etc.)
-- **container_combinations**: Nested arrays, maps, options, results, tuples
-- **edge_cases**: Boundary conditions, empty schemas, circular references
-- **Transport class lattice**: join/meet operations, idempotence, associativity
-- **Bidirectional symmetry**: A compat B implications on B compat A
-
-### Integration & E2E Tests (66+)
-**Dedicated crate**: `protocol-squisher-integration-tests`
-- Full pipeline: schema → IR → compare → compatibility report
-- Multi-format consistency: same protocol in OpenAPI, Protobuf, GraphQL
-- Concorde (zero-copy), Business (safe widening), Wheelbarrow (lossy) conversions
-- Code generation verification: PyO3 and JSON fallback integration
-- Nested structures and field-by-field analysis
-- Cross-crate module initialization
-
-### Security Tests (40+)
-**Dedicated crate**: `protocol-squisher-security-bridge`
-- TLS profile validation (v1.0–v1.3)
-- Key exchange verification (RSA, DHE, ECDHE, PSK)
-- Certificate chain validation
-- Noise pattern mapping (NN, XX, IK, NK, KK)
-- Security property verification (forward secrecy, mutual auth, replay resistance)
-- Downgrade attack prevention
-- Runtime verification protocols
-
-### Benchmarks (6 suites, all REAL)
-- **container_operations.rs**: Nested data structure conversion overhead
-- **generated_vs_handwritten.rs**: Auto-generated vs manual code performance
-- **optimizer_bench.rs**: Optimization algorithm efficiency
-- **shape_benchmarks.rs**: Shape IR transformation latency
-- **transport_classes.rs**: Transport class classification speed
-- **analysis_throughput.rs**: Full-pipeline schema analysis throughput
-
-### Doc Tests (8+)
-- shape-ir module documentation tests
-- protocol-squisher-thrift-analyzer compile tests
-
-## CRG Certification
-
-**Grade: C (ACHIEVED 2026-04-04)**
-- 1378 passing tests across all categories
-- Property-based testing framework in place (proptest)
-- Integration test crate with full E2E scenarios
-- Security-specific test suite
-- Real Criterion benchmarks (6 suites)
-- 100% test execution success rate
-- All dangerous patterns banned (no believe_me, assert_total, Admitted, sorry, unsafeCoerce, etc.)
-
-## Future Enhancements (Out of Scope for CRG C)
-
-### Optional Additions (Phase 2+)
-- [ ] Crawler throughput benchmarks (infrastructure-dependent)
-- [ ] Parallel schema analysis scaling tests (distributed workload testing)
-- [ ] Malicious schema injection tests (security hardening)
-- [ ] Crawler SSRF mitigation tests (network isolation testing)
-- [ ] Schema size DoS resistance tests (resource exhaustion scenarios)
-
-### Why Not Blocking CRG C
-CRG C requires: passing build, comprehensive unit/property/integration tests, real benchmarks, and no dangerous patterns. All met as of 2026-04-04. Phase 2+ enhancements add depth in specialized areas (distributed execution, malicious input hardening) that go beyond CRG C scope.
diff --git a/provenance/TESTING-STRATEGY.md b/provenance/TESTING-STRATEGY.adoc
similarity index 58%
rename from provenance/TESTING-STRATEGY.md
rename to provenance/TESTING-STRATEGY.adoc
index d3f52da..99b5c54 100644
--- a/provenance/TESTING-STRATEGY.md
+++ b/provenance/TESTING-STRATEGY.adoc
@@ -1,29 +1,29 @@
-
-# Testing Strategy: Every Possible Possibility
+== Testing Strategy: Every Possible Possibility
-**Goal:** Achieve comprehensive coverage of all conversion scenarios, edge cases, and failure modes.
+*Goal:* Achieve comprehensive coverage of all conversion scenarios, edge
+cases, and failure modes.
-## Current Status: 180 tests ✓
+=== Current Status: 180 tests ✓
-See [TEST-COVERAGE.md](TEST-COVERAGE.md) for detailed breakdown.
+See TEST-COVERAGE.md for detailed breakdown.
-## Testing Every Possibility: The Matrix
+=== Testing Every Possibility: The Matrix
-To test "every possible possibility," we need to cover the **Cartesian product** of:
-- Source types × Target types × Transport classes × Edge cases
+To test "`every possible possibility,`" we need to cover the *Cartesian
+product* of: - Source types × Target types × Transport classes × Edge
+cases
-### 1. Type Combination Matrix (15 primitive × 15 primitive = 225 combinations)
+==== 1. Type Combination Matrix (15 primitive × 15 primitive = 225 combinations)
-#### Primitive Types
-- **Integers**: i8, i16, i32, i64, i128, u8, u16, u32, u64, u128
-- **Floats**: f32, f64
-- **Other**: bool, char, String
+===== Primitive Types
-#### Current Coverage:
-```
+* *Integers*: i8, i16, i32, i64, i128, u8, u16, u32, u64, u128
+* *Floats*: f32, f64
+* *Other*: bool, char, String
+
+===== Current Coverage:
+
+....
Source Target Transport Class Tested?
i64 i64 Concorde ✓
i64 i32 Wheelbarrow ✓
@@ -33,10 +33,12 @@ f64 f32 Wheelbarrow ✓
String String Concorde ✓
bool bool Concorde ✓
... ... ... ⚠️ (210 combinations untested)
-```
+....
+
+===== Needed Tests:
-#### Needed Tests:
-```rust
+[source,rust]
+----
// Auto-generate comprehensive primitive test matrix
#[cfg(test)]
mod primitive_matrix_tests {
@@ -56,30 +58,33 @@ mod primitive_matrix_tests {
}
}
}
-```
+----
+
+*Estimated tests needed:* 225 property tests (one per type pair)
+
+'''''
-**Estimated tests needed:** 225 property tests (one per type pair)
+==== 2. Container Type Matrix
----
+===== Container Types
-### 2. Container Type Matrix
+* `+Option+`
+* `+Vec+`
+* `+HashMap+`
+* `+HashSet+`
+* `+Tuple(T1, T2, ...)+`
-#### Container Types
-- `Option`
-- `Vec`
-- `HashMap`
-- `HashSet`
-- `Tuple(T1, T2, ...)`
+===== Nested Containers (exponential growth!)
-#### Nested Containers (exponential growth!)
-- `Option>`
-- `Vec>`
-- `HashMap>`
-- `Vec>`
-- ... (1000s of combinations)
+* `+Option>+`
+* `+Vec>+`
+* `+HashMap>+`
+* `+Vec>+`
+* … (1000s of combinations)
-#### Current Coverage:
-```
+===== Current Coverage:
+
+....
Container Type Tested?
Option ✓
Vec ✓
@@ -87,10 +92,12 @@ HashMap ✓
Option> ✗
Vec> ✗
HashMap> ✗
-```
+....
+
+===== Needed Tests:
-#### Needed Tests:
-```rust
+[source,rust]
+----
#[test]
fn test_nested_containers() {
// 2-level nesting
@@ -101,41 +108,46 @@ fn test_nested_containers() {
// 3-level nesting
test_conversion::>>>();
}
-```
+----
+
+*Estimated tests needed:* 50-100 container combination tests
+
+'''''
-**Estimated tests needed:** 50-100 container combination tests
+==== 3. Struct/Enum Combinations
----
+===== Struct Variations
-### 3. Struct/Enum Combinations
+* Empty struct
+* Single field
+* Multiple fields (2-10)
+* Generic structs
+* Recursive structs
+* Structs with lifetimes
-#### Struct Variations
-- Empty struct
-- Single field
-- Multiple fields (2-10)
-- Generic structs
-- Recursive structs
-- Structs with lifetimes
+===== Enum Variations
-#### Enum Variations
-- Unit variants
-- Tuple variants
-- Struct variants
-- Generic enums
-- Nested enums
+* Unit variants
+* Tuple variants
+* Struct variants
+* Generic enums
+* Nested enums
-#### Current Coverage:
-```
+===== Current Coverage:
+
+....
Type Pattern Tested?
struct Point { x: i64 } ✓
struct Person { ... } ✓
enum Status { ... } ✓
struct Node { ... } ✗
struct Tree<'a> { ... } ✗
-```
+....
+
+===== Needed Tests:
-#### Needed Tests:
-```rust
+[source,rust]
+----
#[test]
fn test_struct_variations() {
// Generic structs
@@ -146,16 +158,18 @@ fn test_struct_variations() {
struct Node { value: i64, next: Option> }
test_conversion::();
}
-```
+----
-**Estimated tests needed:** 30-40 structural variation tests
+*Estimated tests needed:* 30-40 structural variation tests
----
+'''''
-### 4. Edge Cases & Boundary Conditions
+==== 4. Edge Cases & Boundary Conditions
-#### Integer Boundaries
-```rust
+===== Integer Boundaries
+
+[source,rust]
+----
#[test]
fn test_integer_boundaries() {
// Test all boundary values
@@ -164,10 +178,12 @@ fn test_integer_boundaries() {
assert_converts(i32::MIN, i64::MIN); // Should succeed (widening)
// ... test all min/max combinations
}
-```
+----
+
+===== String Edge Cases
-#### String Edge Cases
-```rust
+[source,rust]
+----
#[test]
fn test_string_edge_cases() {
test_conversion(""); // Empty
@@ -176,26 +192,30 @@ fn test_string_edge_cases() {
test_conversion(&"a".repeat(1_000_000)); // Large string
test_conversion("\0"); // Null byte
}
-```
+----
-#### Container Edge Cases
-```rust
+===== Container Edge Cases
+
+[source,rust]
+----
#[test]
fn test_container_edge_cases() {
test_conversion(Vec::::new()); // Empty vec
test_conversion(vec![i64::MAX]); // Boundary value
test_conversion((0..1_000_000).collect::>()); // Large vec
}
-```
+----
+
+*Estimated tests needed:* 50-75 edge case tests
-**Estimated tests needed:** 50-75 edge case tests
+'''''
----
+==== 5. Error Paths & Failure Modes
-### 5. Error Paths & Failure Modes
+===== Schema Analysis Errors
-#### Schema Analysis Errors
-```rust
+[source,rust]
+----
#[test]
fn test_malformed_schemas() {
// Invalid Rust syntax
@@ -209,10 +229,12 @@ fn test_malformed_schemas() {
struct B { a: A }
assert_err(analyze_cycle());
}
-```
+----
-#### Conversion Errors
-```rust
+===== Conversion Errors
+
+[source,rust]
+----
#[test]
fn test_conversion_errors() {
// Narrowing overflow
@@ -224,16 +246,18 @@ fn test_conversion_errors() {
// Missing required field
assert_err(convert_partial_struct());
}
-```
+----
+
+*Estimated tests needed:* 25-30 error path tests
-**Estimated tests needed:** 25-30 error path tests
+'''''
----
+==== 6. Performance & Stress Tests
-### 6. Performance & Stress Tests
+===== Large Schema Tests
-#### Large Schema Tests
-```rust
+[source,rust]
+----
#[test]
fn test_large_schemas() {
// Schema with 1000 types
@@ -241,20 +265,24 @@ fn test_large_schemas() {
let analysis = analyze_schemas(&schema, &schema);
assert!(analysis.completed_in_ms < 5000); // 5 second budget
}
-```
+----
-#### Deep Nesting Tests
-```rust
+===== Deep Nesting Tests
+
+[source,rust]
+----
#[test]
fn test_deep_nesting() {
// Vec>>> (100 levels deep)
type DeepVec = Vec>>;
assert!(can_analyze::());
}
-```
+----
+
+===== Memory Tests
-#### Memory Tests
-```rust
+[source,rust]
+----
#[test]
fn test_memory_usage() {
// Analyze 10k schemas in sequence
@@ -265,16 +293,18 @@ fn test_memory_usage() {
// Assert no memory leak
assert!(current_memory() < initial_memory * 1.1);
}
-```
+----
+
+*Estimated tests needed:* 10-15 performance tests
-**Estimated tests needed:** 10-15 performance tests
+'''''
----
+==== 7. Property-Based Testing (QuickCheck/PropTest)
-### 7. Property-Based Testing (QuickCheck/PropTest)
+===== Round-Trip Properties
-#### Round-Trip Properties
-```rust
+[source,rust]
+----
proptest! {
#[test]
fn prop_round_trip_preserves_value(val: i64) {
@@ -295,10 +325,12 @@ proptest! {
assert!(class2 <= class1); // Better or same
}
}
-```
+----
-#### Invariant Properties
-```rust
+===== Invariant Properties
+
+[source,rust]
+----
proptest! {
#[test]
fn prop_concorde_means_zero_overhead(
@@ -310,16 +342,18 @@ proptest! {
}
}
}
-```
+----
+
+*Estimated tests needed:* 15-20 property tests
-**Estimated tests needed:** 15-20 property tests
+'''''
----
+==== 8. Integration & E2E Tests
-### 8. Integration & E2E Tests
+===== Real PyO3 Compilation
-#### Real PyO3 Compilation
-```rust
+[source,rust]
+----
#[test]
fn test_real_pyo3_compilation() {
// Generate bindings
@@ -335,10 +369,12 @@ fn test_real_pyo3_compilation() {
assert!(result.success());
}
-```
+----
-#### Python Runtime Tests
-```python
+===== Python Runtime Tests
+
+[source,python]
+----
# tests/runtime/test_real_conversion.py
def test_actual_python_import():
import protocol_squisher_bindings
@@ -352,64 +388,77 @@ def test_actual_python_import():
point.x = 15
addr2 = id(point.x)
# ... (complex but verifies actual zero-copy)
-```
+----
+
+*Estimated tests needed:* 5-10 real runtime tests
+
+'''''
+
+=== Complete Test Plan
-**Estimated tests needed:** 5-10 real runtime tests
+==== Test Count Summary
----
+[cols=",,,",options="header",]
+|===
+|Category |Current |Needed |Total Target
+|Primitive matrix |20 |205 |225
+|Container combinations |10 |90 |100
+|Struct/Enum variations |15 |25 |40
+|Edge cases |10 |65 |75
+|Error paths |5 |25 |30
+|Performance |0 |15 |15
+|Property tests |0 |20 |20
+|Integration/E2E |7 |8 |15
+|CLI tests |0 |20 |20
+|*TOTAL* |*180* |*360* |*540*
+|===
-## Complete Test Plan
+==== Priority Order
-### Test Count Summary
-| Category | Current | Needed | Total Target |
-|----------|---------|--------|--------------|
-| Primitive matrix | 20 | 205 | 225 |
-| Container combinations | 10 | 90 | 100 |
-| Struct/Enum variations | 15 | 25 | 40 |
-| Edge cases | 10 | 65 | 75 |
-| Error paths | 5 | 25 | 30 |
-| Performance | 0 | 15 | 15 |
-| Property tests | 0 | 20 | 20 |
-| Integration/E2E | 7 | 8 | 15 |
-| CLI tests | 0 | 20 | 20 |
-| **TOTAL** | **180** | **360** | **540** |
+===== Phase 1: Foundation (Now - Week 1)
-### Priority Order
+[arabic]
+. ✓ Primitive matrix (property tests) - 50 tests
+. ✓ Container combinations - 30 tests
+. ✓ Edge cases (boundaries) - 25 tests
-#### Phase 1: Foundation (Now - Week 1)
-1. ✓ Primitive matrix (property tests) - 50 tests
-2. ✓ Container combinations - 30 tests
-3. ✓ Edge cases (boundaries) - 25 tests
+*Target:* 285 tests (+105)
-**Target:** 285 tests (+105)
+===== Phase 2: Robustness (Week 2-3)
-#### Phase 2: Robustness (Week 2-3)
-4. ✓ Error path coverage - 30 tests
-5. ✓ Struct/Enum variations - 25 tests
-6. ✓ CLI integration tests - 20 tests
+[arabic, start=4]
+. ✓ Error path coverage - 30 tests
+. ✓ Struct/Enum variations - 25 tests
+. ✓ CLI integration tests - 20 tests
-**Target:** 360 tests (+75)
+*Target:* 360 tests (+75)
-#### Phase 3: Quality (Week 4)
-7. ✓ Property-based tests - 20 tests
-8. ✓ Performance benchmarks - 15 tests
-9. ✓ Real runtime integration - 8 tests
+===== Phase 3: Quality (Week 4)
-**Target:** 403 tests (+43)
+[arabic, start=7]
+. ✓ Property-based tests - 20 tests
+. ✓ Performance benchmarks - 15 tests
+. ✓ Real runtime integration - 8 tests
-#### Phase 4: Comprehensive (Ongoing)
-10. ✓ Fuzzing integration
-11. ✓ Mutation testing
-12. ✓ Coverage analysis (aim for 95%+)
+*Target:* 403 tests (+43)
-**Target:** 540+ tests
+===== Phase 4: Comprehensive (Ongoing)
----
+[arabic, start=10]
+. ✓ Fuzzing integration
+. ✓ Mutation testing
+. ✓ Coverage analysis (aim for 95%+)
-## Implementation Strategy
+*Target:* 540+ tests
-### 1. Auto-Generate Test Matrix
-```bash
+'''''
+
+=== Implementation Strategy
+
+==== 1. Auto-Generate Test Matrix
+
+[source,bash]
+----
# Create test generator
cargo install protocol-squisher-test-gen
@@ -418,17 +467,21 @@ protocol-squisher-test-gen primitives > tests/generated/primitives.rs
# Generate container combinations
protocol-squisher-test-gen containers > tests/generated/containers.rs
-```
+----
+
+==== 2. Property Test Framework
-### 2. Property Test Framework
-```toml
+[source,toml]
+----
[dev-dependencies]
proptest = "1.4"
quickcheck = "1.0"
-```
+----
-### 3. Fuzzing Setup
-```bash
+==== 3. Fuzzing Setup
+
+[source,bash]
+----
# Install cargo-fuzz
cargo install cargo-fuzz
@@ -440,10 +493,12 @@ cargo fuzz run parse_schema
# Fuzz transport class analysis
cargo fuzz run analyze_compatibility
-```
+----
+
+==== 4. Coverage Measurement
-### 4. Coverage Measurement
-```bash
+[source,bash]
+----
# Install coverage tool
cargo install cargo-llvm-cov
@@ -454,14 +509,16 @@ cargo llvm-cov --workspace --html
open target/llvm-cov/html/index.html
# Aim for 95%+ line coverage
-```
+----
----
+'''''
-## Test Automation
+=== Test Automation
-### CI/CD Pipeline
-```yaml
+==== CI/CD Pipeline
+
+[source,yaml]
+----
# .github/workflows/comprehensive-tests.yml
name: Comprehensive Test Suite
@@ -499,30 +556,30 @@ jobs:
echo "Coverage $COVERAGE% is below 95%"
exit 1
fi
-```
+----
+
+'''''
----
+=== Success Criteria
-## Success Criteria
+==== Definition of "`Every Possibility Tested`"
-### Definition of "Every Possibility Tested"
+✅ *Primitive Types*: All 225 type pair combinations tested ✅
+*Containers*: All common nesting patterns (2-3 levels deep) ✅
+*Structures*: All variation patterns (generic, recursive, etc.) ✅ *Edge
+Cases*: All boundary conditions and special values ✅ *Error Paths*: All
+failure modes have explicit tests ✅ *Properties*: Core invariants
+proven with randomized inputs ✅ *Performance*: No regressions, stays
+within budgets ✅ *Integration*: Real Rust↔Python conversion works ✅
+*Coverage*: >95% line coverage, >90% branch coverage ✅ *Fuzzing*: 24hr
+continuous fuzzing finds no crashes
-✅ **Primitive Types**: All 225 type pair combinations tested
-✅ **Containers**: All common nesting patterns (2-3 levels deep)
-✅ **Structures**: All variation patterns (generic, recursive, etc.)
-✅ **Edge Cases**: All boundary conditions and special values
-✅ **Error Paths**: All failure modes have explicit tests
-✅ **Properties**: Core invariants proven with randomized inputs
-✅ **Performance**: No regressions, stays within budgets
-✅ **Integration**: Real Rust↔Python conversion works
-✅ **Coverage**: >95% line coverage, >90% branch coverage
-✅ **Fuzzing**: 24hr continuous fuzzing finds no crashes
+==== Current Progress
-### Current Progress
-- [x] 180 tests passing ✓
-- [ ] 540 total tests (33% complete)
-- [ ] 95% coverage (current: ~75%)
-- [ ] Fuzzing setup
-- [ ] All invariants property-tested
+* [x] 180 tests passing ✓
+* [ ] 540 total tests (33% complete)
+* [ ] 95% coverage (current: ~75%)
+* [ ] Fuzzing setup
+* [ ] All invariants property-tested
-**Next milestone:** 285 tests (Phase 1 complete)
+*Next milestone:* 285 tests (Phase 1 complete)
diff --git a/provenance/TOPOLOGY.md b/provenance/TOPOLOGY.adoc
similarity index 94%
rename from provenance/TOPOLOGY.md
rename to provenance/TOPOLOGY.adoc
index 238adaa..dd55a7d 100644
--- a/provenance/TOPOLOGY.md
+++ b/provenance/TOPOLOGY.adoc
@@ -1,15 +1,8 @@
-
-
-
+== Protocol Squisher — Project Topology
-# Protocol Squisher — Project Topology
+=== System Architecture
-## System Architecture
-
-```
+....
┌─────────────────────────────────────────┐
│ POLYGLOT DEVELOPER │
│ (CLI, Adapter Generation) │
@@ -60,15 +53,16 @@ Copyright (c) Jonathan D.A. Jewell
│ Justfile Automation .machines_readable/ │
│ Formal Proofs (5 provers) AI.a2ml │
└─────────────────────────────────────────┘
-```
+....
-## Vision Architecture (18-Month Plan — Phase 1 In Progress)
+=== Vision Architecture (18-Month Plan — Phase 1 In Progress)
-The existing architecture above remains valid as the **foundation layer**. The
-vision adds a new **Shape IR layer** underneath it that generalises the Canonical
-IR to reason about all data shapes, not just serialization formats.
+The existing architecture above remains valid as the *foundation layer*.
+The vision adds a new *Shape IR layer* underneath it that generalises
+the Canonical IR to reason about all data shapes, not just serialization
+formats.
-```
+....
┌──────────────────────────────────────────────────────┐
│ UNIVERSAL DATA SHAPE LAYER │
│ (NEW — Phase 1+) │
@@ -125,11 +119,11 @@ IR to reason about all data shapes, not just serialization formats.
│ Visual & Interface Layer (Phase 5) │
│ TUI (ratatui) │ PanLL (L/N/W) │ Web │
└──────────────────────────────────────────────────────┘
-```
+....
-## Completion Dashboard
+=== Completion Dashboard
-```
+....
COMPONENT STATUS NOTES
───────────────────────────────── ────────────────── ─────────────────────────────────
CORE ENGINE
@@ -181,11 +175,11 @@ OVERALL (Original Phase 3): █████████░ 95% Harde
OVERALL (Original Phase 4): ██████████ 100% Library API + constraints + server complete
OVERALL (Vision Phase 1): ██████████ 100% COMPLETE — 124 tests, full engine
OVERALL (Vision Phase 2): ██████████ 100% Phases 1-5 SEALED — 1378 tests, render + panll + CLI visual layer
-```
+....
-## Key Dependencies
+=== Key Dependencies
-```
+....
Format Analyzers ──► Canonical IR ───► Synthesis Logic ──► Generated Adapter
│ │ │ │
▼ ▼ ▼ ▼
@@ -195,16 +189,17 @@ Vision (new):
Shape Extractors ──► shape-ir ──► Shape Algebra ──► Morphisms ──► Visual Layer
(17 analyzers (Phase 1 (Phase 2) (Phase 2) (Phase 5)
+ SQL + OpenAPI) SEALED) SEALED SEALED SEALED
-```
+....
-## Update Protocol
+=== Update Protocol
This file is maintained by both humans and AI agents. When updating:
-1. **After completing a component**: Change its bar and percentage
-2. **After adding a component**: Add a new row in the appropriate section
-3. **After architectural changes**: Update the ASCII diagram
-4. **Date**: Update the `Last updated` comment at the top of this file
+[arabic]
+. *After completing a component*: Change its bar and percentage
+. *After adding a component*: Add a new row in the appropriate section
+. *After architectural changes*: Update the ASCII diagram
+. *Date*: Update the `+Last updated+` comment at the top of this file
-Progress bars use: `█` (filled) and `░` (empty), 10 characters wide.
-Percentages: 0%, 10%, 20%, ... 100% (in 10% increments).
+Progress bars use: `+█+` (filled) and `+░+` (empty), 10 characters wide.
+Percentages: 0%, 10%, 20%, … 100% (in 10% increments).
diff --git a/provenance/UNWRAP-REMOVAL-PROGRESS.adoc b/provenance/UNWRAP-REMOVAL-PROGRESS.adoc
new file mode 100644
index 0000000..2d3ce03
--- /dev/null
+++ b/provenance/UNWRAP-REMOVAL-PROGRESS.adoc
@@ -0,0 +1,175 @@
+== Protocol-Squisher: unwrap() Removal Progress Tracker
+
+____
+*Started:* 2026-03-30 *Completed:* 2026-04-03 *Goal:* Replace all ~932
+`+.unwrap()+` calls with proper error handling *Strategy:* Production
+code -> `+?+` / `+map_err+` / custom errors. Tests ->
+`+expect("message")+`. *Traversal:* Depth-first by crate, highest-count
+production code first.
+____
+
+=== Error Handling Conventions
+
+* All analyzer crates already have `+AnalyzerError+` (thiserror-derived)
+* CLI uses `+anyhow+`
+* VeriSimDB has dedicated `+error.rs+` with `+VeriSimError+`
+* IR crate has `+SchemaError+` (manual Display, no thiserror)
+* Tests: `+.unwrap()+` -> `+.expect("descriptive message")+`
+* Production: `+.unwrap()+` -> `+?+` operator or `+.map_err(...)+` as
+needed
+
+=== Crate Status
+
+==== TIER 1 – High-count production crates (30+ unwrap)
+
+[width="99%",cols="10%,16%,16%,23%,19%,16%",options="header",]
+|===
+|# |Crate |Files |unwrap() |Status |Notes
+|1 |messagepack-analyzer |converter(22) parser(20) ephapax_bridge(10)
+lib(6) |58 |*DONE* |All test code->expect(). 2 in doc comments left
+(standard). Compiles clean.
+
+|2 |rescript-analyzer |tests/interop(33) ephapax_bridge(15)
+converter(14) examples(8) lib(6) parser(5) |81 |*DONE* |All test/example
+code->expect(). 0 production unwraps. Committed+pushed.
+
+|3 |shape-ir |tests(20) benches(1) |21 |*DONE* |All test+bench
+code->expect(). 0 production unwraps. Compiles clean.
+
+|4 |flatbuffers-analyzer |ephapax_bridge(15) converter(11) parser(8)
+lib(7) |41 |*DONE* |Committed+pushed.
+
+|5 |avro-analyzer |converter(18) ephapax_bridge(13) parser(5) lib(4) |40
+|*DONE* |Committed+pushed.
+
+|6 |protobuf-analyzer |lib(18) ephapax_bridge(13) parser(7) |38 |*DONE*
+|Committed+pushed.
+
+|7 |capnproto-analyzer |converter(11) parser(10) ephapax_bridge(10)
+lib(6) |37 |*DONE* |All test code->expect(). Committed+pushed.
+
+|8 |thrift-analyzer |converter(16) ephapax_bridge(13) lib(6) |35 |*DONE*
+|All test code->expect(). Committed+pushed.
+
+|9 |rust-analyzer |converter(12) ephapax_bridge(9) lib(6) parser(3)
+attr(1) |31 |*DONE* |All test code->expect(). Committed+pushed.
+|===
+
+==== TIER 2 – Medium-count crates (15-29 unwrap)
+
+[width="99%",cols="10%,16%,16%,23%,19%,16%",options="header",]
+|===
+|# |Crate |Files |unwrap() |Status |Notes
+|10 |json-schema-analyzer |converter(14) types(10) lib(3) parser(2) |29
+|*DONE* |All test code->expect().
+
+|11 |bebop-analyzer |ephapax_bridge(12) converter(11) lib(6) |29 |*DONE*
+|All test code->expect().
+
+|12 |graphql-analyzer |lib(14) parser(7) ephapax_bridge(4) |25 |*DONE*
+|7 production Regex::new->expect("`valid static regex`"). Rest test
+code.
+
+|13 |sql-analyzer |parser(10) lib(8) converter(4) ephapax_bridge(3) |25
+|*DONE* |All test code->expect().
+
+|14 |integration-tests |lib(24) |24 |*DONE* |All test code->expect().
+
+|15 |toml-analyzer |lib(17) parser(3) ephapax_bridge(3) |23 |*DONE* |All
+test code->expect().
+
+|16 |python-analyzer |ephapax_bridge(11) types(4) lib(4) converter(4)
+|23 |*DONE* |All test code->expect().
+
+|17 |constraints |lib(22) |22 |*DONE* |All test code->expect().
+
+|18 |server |lib(19) |19 |*DONE* |All test code->expect().
+
+|19 |openapi-analyzer |lib(12) ephapax_bridge(3) parser(2) converter(2)
+|19 |*DONE* |All test code->expect().
+
+|20 |arrow-analyzer |lib(11) ephapax_bridge(3) parser(2) converter(1)
+|17 |*DONE* |All test code->expect().
+
+|21 |verisim |store(13) models(4) |17 |*DONE* |All test code->expect().
+|===
+
+==== TIER 3 – Low-count crates (<15 unwrap)
+
+[width="99%",cols="10%,16%,16%,23%,19%,16%",options="header",]
+|===
+|# |Crate |Files |unwrap() |Status |Notes
+|22 |cli |formats(5) feedback(3) integration(2) shape(1) |11 |*DONE*
+|shape.rs expect()->ok_or_else(anyhow). Rest test code.
+
+|23 |benches |4 files |9 |*DONE* |Bench code->expect(). (shape-ir bench
+done separately)
+
+|24 |echidna-bridge |types(4) tactic(2) cache(1) |7 |*DONE* |All test
+code->expect().
+
+|25 |ir |types(2) lib(2) constraints(2) |6 |*DONE* |All test
+code->expect().
+
+|26 |examples |2 files |5 |*DONE* |Example code->expect().
+
+|27 |pyo3-codegen |optimized(2) module(1) |3 |*DONE* |Generated code
+unwrap()->map_err(PyValueError). 2 test->expect().
+
+|28 |security-bridge |runtime_verify(3) |3 |*DONE* |All test
+code->expect().
+
+|29 |distributed |resilience(1) |1 |*DONE* |retry_with_backoff
+restructured to eliminate expect().
+|===
+
+=== Progress Summary
+
+* *Total crates:* 29 (grouped from 35 workspace members)
+* *Completed:* 29/29
+* *unwrap() removed:* ~690 (399 prior + 21 shape-ir + 291 batch)
+* *unwrap() remaining:* 7 (all in doc comments, README.md, USAGE.md, or
+generated code strings – NOT actionable)
+* *Workspace compiles clean:* Yes (`+cargo check+` passes)
+
+=== Residual unwrap() (NOT bugs)
+
+These 6 instances are intentionally left: 1.
+`+protobuf-analyzer/README.md:75-76+` – documentation example 2.
+`+protobuf-analyzer/USAGE.md:161-162+` – documentation example 3.
+`+rescript-analyzer/README.md:25,35+` – documentation example
+
+=== Session Log
+
+==== Session 1 – 2026-03-30
+
+* Created progress tracker, assessed error handling landscape
+* *DONE: messagepack-analyzer* – 56 unwrap()->expect(). COMMITTED.
+* rescript-analyzer src/ done. Session ended (credit limit).
+
+==== Session 2 – 2026-03-30 (continued)
+
+* *DONE: rescript-analyzer* – finished interop_tests.rs(33) +
+basic_usage.rs(8). COMMITTED+PUSHED.
+* *DONE: capnproto-analyzer* – 37 test unwraps. Batch sed.
+COMMITTED+PUSHED.
+* *DONE: thrift-analyzer* – 35 test unwraps. Batch sed.
+COMMITTED+PUSHED.
+* *DONE: rust-analyzer* – 31 test unwraps. Batch sed. COMMITTED+PUSHED.
+* *AGENTS DISPATCHED:* shape-ir, flatbuffers, avro, protobuf
+(background)
+* Key finding: ALL analyzer crates have ZERO production unwrap()s.
+* Moving to Tier 2 next.
+
+==== Session 3 – 2026-04-03
+
+* *DONE: shape-ir* – 21 test/bench unwraps->expect(). Compiles clean.
+COMMITTED.
+* *DONE: ALL remaining 20 crates* – Batch Python script with contextual
+expect() messages.
+** 8 production unwraps fixed (7 graphql-analyzer Regex::new, 1 cli
+shape.rs)
+** 283 test unwraps replaced with contextual expect() messages
+** Full workspace `+cargo check+` passes clean. COMMITTED.
+* *PROJECT COMPLETE.* All 29 crates done. 7 residual unwraps in
+docs/codegen strings.
diff --git a/provenance/UNWRAP-REMOVAL-PROGRESS.md b/provenance/UNWRAP-REMOVAL-PROGRESS.md
deleted file mode 100644
index f2a13ba..0000000
--- a/provenance/UNWRAP-REMOVAL-PROGRESS.md
+++ /dev/null
@@ -1,105 +0,0 @@
-
-# Protocol-Squisher: unwrap() Removal Progress Tracker
-
-> **Started:** 2026-03-30
-> **Completed:** 2026-04-03
-> **Goal:** Replace all ~932 `.unwrap()` calls with proper error handling
-> **Strategy:** Production code -> `?` / `map_err` / custom errors. Tests -> `expect("message")`.
-> **Traversal:** Depth-first by crate, highest-count production code first.
-
-## Error Handling Conventions
-
-- All analyzer crates already have `AnalyzerError` (thiserror-derived)
-- CLI uses `anyhow`
-- VeriSimDB has dedicated `error.rs` with `VeriSimError`
-- IR crate has `SchemaError` (manual Display, no thiserror)
-- Tests: `.unwrap()` -> `.expect("descriptive message")`
-- Production: `.unwrap()` -> `?` operator or `.map_err(...)` as needed
-
-## Crate Status
-
-### TIER 1 -- High-count production crates (30+ unwrap)
-
-| # | Crate | Files | unwrap() | Status | Notes |
-|---|-------|-------|----------|--------|-------|
-| 1 | messagepack-analyzer | converter(22) parser(20) ephapax_bridge(10) lib(6) | 58 | **DONE** | All test code->expect(). 2 in doc comments left (standard). Compiles clean. |
-| 2 | rescript-analyzer | tests/interop(33) ephapax_bridge(15) converter(14) examples(8) lib(6) parser(5) | 81 | **DONE** | All test/example code->expect(). 0 production unwraps. Committed+pushed. |
-| 3 | shape-ir | tests(20) benches(1) | 21 | **DONE** | All test+bench code->expect(). 0 production unwraps. Compiles clean. |
-| 4 | flatbuffers-analyzer | ephapax_bridge(15) converter(11) parser(8) lib(7) | 41 | **DONE** | Committed+pushed. |
-| 5 | avro-analyzer | converter(18) ephapax_bridge(13) parser(5) lib(4) | 40 | **DONE** | Committed+pushed. |
-| 6 | protobuf-analyzer | lib(18) ephapax_bridge(13) parser(7) | 38 | **DONE** | Committed+pushed. |
-| 7 | capnproto-analyzer | converter(11) parser(10) ephapax_bridge(10) lib(6) | 37 | **DONE** | All test code->expect(). Committed+pushed. |
-| 8 | thrift-analyzer | converter(16) ephapax_bridge(13) lib(6) | 35 | **DONE** | All test code->expect(). Committed+pushed. |
-| 9 | rust-analyzer | converter(12) ephapax_bridge(9) lib(6) parser(3) attr(1) | 31 | **DONE** | All test code->expect(). Committed+pushed. |
-
-### TIER 2 -- Medium-count crates (15-29 unwrap)
-
-| # | Crate | Files | unwrap() | Status | Notes |
-|---|-------|-------|----------|--------|-------|
-| 10 | json-schema-analyzer | converter(14) types(10) lib(3) parser(2) | 29 | **DONE** | All test code->expect(). |
-| 11 | bebop-analyzer | ephapax_bridge(12) converter(11) lib(6) | 29 | **DONE** | All test code->expect(). |
-| 12 | graphql-analyzer | lib(14) parser(7) ephapax_bridge(4) | 25 | **DONE** | 7 production Regex::new->expect("valid static regex"). Rest test code. |
-| 13 | sql-analyzer | parser(10) lib(8) converter(4) ephapax_bridge(3) | 25 | **DONE** | All test code->expect(). |
-| 14 | integration-tests | lib(24) | 24 | **DONE** | All test code->expect(). |
-| 15 | toml-analyzer | lib(17) parser(3) ephapax_bridge(3) | 23 | **DONE** | All test code->expect(). |
-| 16 | python-analyzer | ephapax_bridge(11) types(4) lib(4) converter(4) | 23 | **DONE** | All test code->expect(). |
-| 17 | constraints | lib(22) | 22 | **DONE** | All test code->expect(). |
-| 18 | server | lib(19) | 19 | **DONE** | All test code->expect(). |
-| 19 | openapi-analyzer | lib(12) ephapax_bridge(3) parser(2) converter(2) | 19 | **DONE** | All test code->expect(). |
-| 20 | arrow-analyzer | lib(11) ephapax_bridge(3) parser(2) converter(1) | 17 | **DONE** | All test code->expect(). |
-| 21 | verisim | store(13) models(4) | 17 | **DONE** | All test code->expect(). |
-
-### TIER 3 -- Low-count crates (<15 unwrap)
-
-| # | Crate | Files | unwrap() | Status | Notes |
-|---|-------|-------|----------|--------|-------|
-| 22 | cli | formats(5) feedback(3) integration(2) shape(1) | 11 | **DONE** | shape.rs expect()->ok_or_else(anyhow). Rest test code. |
-| 23 | benches | 4 files | 9 | **DONE** | Bench code->expect(). (shape-ir bench done separately) |
-| 24 | echidna-bridge | types(4) tactic(2) cache(1) | 7 | **DONE** | All test code->expect(). |
-| 25 | ir | types(2) lib(2) constraints(2) | 6 | **DONE** | All test code->expect(). |
-| 26 | examples | 2 files | 5 | **DONE** | Example code->expect(). |
-| 27 | pyo3-codegen | optimized(2) module(1) | 3 | **DONE** | Generated code unwrap()->map_err(PyValueError). 2 test->expect(). |
-| 28 | security-bridge | runtime_verify(3) | 3 | **DONE** | All test code->expect(). |
-| 29 | distributed | resilience(1) | 1 | **DONE** | retry_with_backoff restructured to eliminate expect(). |
-
-## Progress Summary
-
-- **Total crates:** 29 (grouped from 35 workspace members)
-- **Completed:** 29/29
-- **unwrap() removed:** ~690 (399 prior + 21 shape-ir + 291 batch)
-- **unwrap() remaining:** 7 (all in doc comments, README.md, USAGE.md, or generated code strings -- NOT actionable)
-- **Workspace compiles clean:** Yes (`cargo check` passes)
-
-## Residual unwrap() (NOT bugs)
-
-These 6 instances are intentionally left:
-1. `protobuf-analyzer/README.md:75-76` -- documentation example
-2. `protobuf-analyzer/USAGE.md:161-162` -- documentation example
-3. `rescript-analyzer/README.md:25,35` -- documentation example
-
-## Session Log
-
-### Session 1 -- 2026-03-30
-- Created progress tracker, assessed error handling landscape
-- **DONE: messagepack-analyzer** -- 56 unwrap()->expect(). COMMITTED.
-- rescript-analyzer src/ done. Session ended (credit limit).
-
-### Session 2 -- 2026-03-30 (continued)
-- **DONE: rescript-analyzer** -- finished interop_tests.rs(33) + basic_usage.rs(8). COMMITTED+PUSHED.
-- **DONE: capnproto-analyzer** -- 37 test unwraps. Batch sed. COMMITTED+PUSHED.
-- **DONE: thrift-analyzer** -- 35 test unwraps. Batch sed. COMMITTED+PUSHED.
-- **DONE: rust-analyzer** -- 31 test unwraps. Batch sed. COMMITTED+PUSHED.
-- **AGENTS DISPATCHED:** shape-ir, flatbuffers, avro, protobuf (background)
-- Key finding: ALL analyzer crates have ZERO production unwrap()s.
-- Moving to Tier 2 next.
-
-### Session 3 -- 2026-04-03
-- **DONE: shape-ir** -- 21 test/bench unwraps->expect(). Compiles clean. COMMITTED.
-- **DONE: ALL remaining 20 crates** -- Batch Python script with contextual expect() messages.
- - 8 production unwraps fixed (7 graphql-analyzer Regex::new, 1 cli shape.rs)
- - 283 test unwraps replaced with contextual expect() messages
- - Full workspace `cargo check` passes clean. COMMITTED.
-- **PROJECT COMPLETE.** All 29 crates done. 7 residual unwraps in docs/codegen strings.
diff --git a/provenance/VISION-18-MONTHS.adoc b/provenance/VISION-18-MONTHS.adoc
new file mode 100644
index 0000000..eb0d7ac
--- /dev/null
+++ b/provenance/VISION-18-MONTHS.adoc
@@ -0,0 +1,358 @@
+== Protocol Squisher: The 18-Month Vision
+
+*"`From format converter to universal data shape reasoning engine`"*
+
+*Author:* Jonathan D.A. Jewell *Date:* 2026-03-10 *Status:* Active —
+Phase 1 in progress
+
+'''''
+
+=== The Core Insight
+
+Protocol Squisher isn’t really about serialization formats.
+Serialization formats are just the first place the idea bumps into the
+world. What we’ve actually built is the embryo of *a theory of data
+shape* — and the next 18 months grow that embryo into something that
+doesn’t have a name yet.
+
+A field in Protobuf, a column in a database, a key in a JSON document, a
+struct member in Rust, a cell in a spreadsheet, an attribute in an XML
+element, a column in a CSV — these are all the same thing viewed through
+different lenses. The tool we’re building is the thing underneath all of
+them.
+
+'''''
+
+=== Phase 1 — Months 1–3: Strip It Back to the Bone
+
+==== Goal
+
+Rewrite ephapax-ir from scratch. Not because it’s wrong — because we
+haven’t yet discovered what it _really_ is. The current IR models
+serialization schemas. The new IR models *data shape itself*,
+independent of any format.
+
+==== What We Keep
+
+* ephapax-ir (as starting point, to be rewritten)
+* The core comparison engine (concepts, not code)
+* The transport class metaphor (to be formalized)
+* All 13 analyzers (set aside, reconnected later)
+
+==== What We Build
+
+===== 1. Dependent Types in the IR
+
+A field’s type can depend on another field’s value. This is how we
+model: - Protobuf oneofs - Avro unions - JSON Schema conditionals -
+Database CHECK constraints - Tagged unions across any language
+
+All with a single construct.
+
+....
+Shape ::= Unit -- empty / void
+ | Atom(T) -- primitive (bool, int, float, string, bytes)
+ | Product(label, Shape, Shape) -- struct / record / row
+ | Sum(label, Shape, Shape) -- union / enum / oneof
+ | Dependent(x : Shape, Shape(x)) -- dependent pair (value determines type)
+ | Recursive(μ, Shape) -- fixpoint (trees, lists, graphs)
+ | Ref(name) -- named reference
+ | Annotated(Shape, Metadata) -- linearity, nullability, constraints
+....
+
+===== 2. Linearity as First-Class Property
+
+Some data can be copied (a string), some can’t (a file handle, a
+database connection, a unique token). Transport classes are already
+circling this idea — make it explicit.
+
+....
+Linearity ::= Unrestricted -- can copy, can drop (most data)
+ | Linear -- must use exactly once (handles, tokens)
+ | Affine -- can drop but not copy (owned resources)
+ | Relevant -- can copy but not drop (audit trails)
+....
+
+===== 3. Information Content as Measurable Quantity
+
+Every schema has an information-theoretic capacity. When you convert
+between formats, information is either preserved, lost, or padded.
+
+* *Concorde* = zero information loss (isomorphism)
+* *Business* = lossless but padded (embedding with extra fields)
+* *Economy* = lossy but recoverable (projection with known inverse)
+* *Wheelbarrow* = lossy, below Shannon limit (fallback, best-effort)
+
+Now we can _prove_ which class a conversion falls into, not just
+estimate.
+
+==== Deliverable
+
+A new IR that is the universal representation of data shape, with
+dependent types, linearity annotations, and information-theoretic
+metrics. Smaller than what we have now. More powerful than anything that
+exists.
+
+==== Implementation Language
+
+Idris2 for the core theory. Rust for the practical engine. Zig for the
+ABI boundary (per standard).
+
+'''''
+
+=== Phase 2 — Months 4–6: The Algebra
+
+==== Goal
+
+Discover and formalize the algebra of data shapes.
+
+==== The Category
+
+Data shapes compose. If you have a shape A and a shape B, you can form:
+
+[width="100%",cols="29%,25%,23%,23%",options="header",]
+|===
+|Operation |Notation |Meaning |Example
+|Product |A × B |Both together |Struct with fields from A and B
+|Sum |A + B |One or the other |Union / enum / oneof
+|Morphism |A → B |A conversion (adapter) |Protobuf → Avro adapter
+|Tensor |A ⊗ B |Both, but neither copyable |Linear pair (two handles)
+|Fixpoint |μA |Recursive data |Tree, linked list, graph
+|Universal |∀x.A(x) |Generic / parameterized |`+List+`, `+Option+`
+|===
+
+This is a *symmetric monoidal closed category with fixpoints*.
+
+==== What This Gives Us
+
+[arabic]
+. *Adapter composition.* A→B and B→C gives A→C for free. N formats need
+N adapters to the IR, not N² adapters between each other.
+. *Correctness proofs.* Roundtrip A→B→A should be identity (for Concorde
+class). This is a coherence condition. Checkable mechanically.
+. *Automatic adapter discovery.* Given a library of known morphisms,
+find the shortest (cheapest) path between any two schemas. Pathfinding
+in a category.
+. *Information loss quantification.* Every morphism has an
+information-theoretic cost. The cheapest path is the best adapter.
+
+==== Deliverable
+
+A formally verified algebra of data shape in Idris2, with composition,
+information metrics, and automatic adapter discovery. The 8 Agda
+theorems cross-validated in 5 proof systems get replaced by one unified
+theory that’s more powerful than all of them combined.
+
+'''''
+
+=== Phase 3 — Months 7–9: Eat the World
+
+==== Goal
+
+Apply the algebra to everything that has data shape. Not just
+serialization.
+
+==== Database Schemas
+
+A PostgreSQL table is a data shape. A MySQL table is a different data
+shape. Schema migration is a morphism.
+
+* Generate migration scripts with proven correctness
+* Detect breaking schema changes before they ship
+* *Prove that a migration preserves all existing queries* (killer
+feature)
+
+==== API Contracts
+
+An OpenAPI spec is a data shape. API versioning is a family of
+morphisms.
+
+* Generate backward-compatible API version layers automatically
+* Prove that v2 is a superset of v1 (or identify exactly where it isn’t)
+* Generate client SDKs that work across API versions
+
+==== Type Systems
+
+A Rust struct is a data shape. A ReScript record is a data shape. FFI is
+a morphism.
+
+* Generate type-safe FFI bindings between any two languages
+* Prove that a binding preserves semantics (not just types)
+* This is what ephapax was always trying to be
+
+==== Memory Layouts
+
+A C struct is a data shape with alignment and padding. A Zig packed
+struct is a different shape. ABI compatibility is a morphism.
+
+* Verify ABI compatibility across compiler versions
+* Generate zero-copy deserializers with proven safety
+* Connects directly to the Idris2 ABI / Zig FFI standard
+
+==== Configuration
+
+TOML, YAML, Nickel, environment variables — all data shapes. Migration
+between config formats is a morphism.
+
+==== Deliverable
+
+A tool that understands data shape across serialization formats,
+databases, APIs, type systems, memory layouts, and configuration.
+Generates adapters, migrations, bindings, and version layers. Proves
+they’re correct.
+
+This is no longer Protocol Squisher. This is a *universal data shape
+reasoning engine*.
+
+'''''
+
+=== Phase 4 — Months 10–12: The Temporal Dimension
+
+==== Goal
+
+Add time to the algebra. Schemas evolve. APIs evolve. Everything
+changes.
+
+==== A schema isn’t a point — it’s a trajectory.
+
+This gives us:
+
+* *Schema archaeology.* Given a database’s migration history,
+reconstruct the complete data shape at any point in time. Replay any
+query against any historical schema.
+* *Compatibility forecasting.* Given the trajectory of two evolving
+APIs, predict when they’ll become incompatible. Weather forecasting for
+distributed systems.
+* *Semantic versioning that means something.* A major version bump is a
+morphism that loses information. A minor bump only adds. A patch is an
+isomorphism. Version numbers become provable properties.
+* *Evolution strategies.* Given a target schema and a current schema,
+compute the minimum-cost evolution path. A* pathfinding through the
+space of possible schema changes.
+
+==== Deliverable
+
+The algebra plus time. Reason about data shape evolution, predict
+incompatibilities, generate optimal migration paths.
+
+'''''
+
+=== Phase 5 — Months 13–15: Make It Beautiful
+
+==== Goal
+
+Build the interface that makes all of this accessible.
+
+==== A Visual Language for Data Shape
+
+Not UML. Not ER diagrams. Something new that represents shape,
+morphisms, information flow, and evolution in a single notation. Think
+of how musical notation represents both pitch and time — this notation
+represents both structure and change.
+
+==== PanLL Integration
+
+The three-panel model is perfect:
+
+* *Panel-L:* The constraints. Algebraic laws. Conservation of
+information.
+* *Panel-N:* The reasoning engine. Given two shapes, find the best
+morphism. Given a history, predict the future.
+* *Panel-W:* The output. The generated adapter, migration, binding,
+version layer — rendered in whatever target language you need.
+
+==== Build Order
+
+[arabic]
+. TUI first (ratatui, three panels, live exploration)
+. Web version (visual notation, drag shapes, draw morphisms, live
+proofs)
+
+==== Deliverable
+
+A beautiful, interactive tool for exploring data shape. Both a research
+instrument and a practical tool.
+
+'''''
+
+=== Phase 6 — Months 16–18: The Paper and the Release
+
+==== Goal
+
+Write it up and ship it.
+
+==== The Paper
+
+Not a blog post — a paper. Genuine computer science: - The algebra of
+data shape - Dependent types, information theory, linearity, temporal
+evolution - The proofs - The implementation - The applications
+
+Target: POPL or ICFP.
+
+==== The Release
+
+Package the practical tool: - CLI (`+shape analyze+`, `+shape compare+`,
+`+shape migrate+`, `+shape evolve+`) - Server (axum HTTP/JSON API) -
+PanLL module - Library (Rust crate, published to crates.io)
+
+Release both on the same day. The paper gives credibility. The tool
+gives utility.
+
+'''''
+
+=== What We Come Out With
+
+Not a format converter. Not a code generator. A *new primitive* in the
+programmer’s toolkit — the ability to formally reason about data shape
+across every boundary in a system, with proofs, with
+information-theoretic guarantees, with temporal evolution, and with a
+beautiful visual language.
+
+'''''
+
+=== Progress Tracking
+
+==== Phase 1 (Months 1–3) — IN PROGRESS
+
+* [ ] Design new Shape IR with dependent types
+* [ ] Implement linearity annotations
+* [ ] Define information-theoretic metrics
+* [ ] Port existing analyzer knowledge to new IR
+* [ ] Prove basic properties (product/sum associativity, etc.)
+
+==== Phase 2 (Months 4–6) — NOT STARTED
+
+* [ ] Formalize the category structure
+* [ ] Implement adapter composition
+* [ ] Implement automatic adapter discovery (pathfinding)
+* [ ] Prove coherence conditions
+* [ ] Replace Agda/Coq/Lean/Isabelle/Z3 proofs with unified theory
+
+==== Phase 3 (Months 7–9) — NOT STARTED
+
+* [ ] Database schema analyzer
+* [ ] API contract analyzer (OpenAPI)
+* [ ] Type system analyzer (Rust, ReScript, etc.)
+* [ ] Memory layout analyzer (C, Zig structs)
+* [ ] Configuration format analyzer
+
+==== Phase 4 (Months 10–12) — NOT STARTED
+
+* [ ] Temporal algebra (schema evolution over time)
+* [ ] Compatibility forecasting
+* [ ] Formal semantic versioning
+* [ ] Evolution strategy pathfinder
+
+==== Phase 5 (Months 13–15) — NOT STARTED
+
+* [ ] Visual notation design
+* [ ] TUI explorer (ratatui)
+* [ ] PanLL Panel-L/N/W integration
+* [ ] Web interface
+
+==== Phase 6 (Months 16–18) — NOT STARTED
+
+* [ ] Paper (POPL/ICFP submission)
+* [ ] CLI packaging (`+shape+` command)
+* [ ] crates.io publication
+* [ ] Simultaneous paper + tool release
diff --git a/provenance/VISION-18-MONTHS.md b/provenance/VISION-18-MONTHS.md
deleted file mode 100644
index 3050ec9..0000000
--- a/provenance/VISION-18-MONTHS.md
+++ /dev/null
@@ -1,328 +0,0 @@
-
-
-
-# Protocol Squisher: The 18-Month Vision
-
-**"From format converter to universal data shape reasoning engine"**
-
-**Author:** Jonathan D.A. Jewell
-**Date:** 2026-03-10
-**Status:** Active — Phase 1 in progress
-
----
-
-## The Core Insight
-
-Protocol Squisher isn't really about serialization formats. Serialization formats
-are just the first place the idea bumps into the world. What we've actually built
-is the embryo of **a theory of data shape** — and the next 18 months grow that
-embryo into something that doesn't have a name yet.
-
-A field in Protobuf, a column in a database, a key in a JSON document, a struct
-member in Rust, a cell in a spreadsheet, an attribute in an XML element, a column
-in a CSV — these are all the same thing viewed through different lenses. The tool
-we're building is the thing underneath all of them.
-
----
-
-## Phase 1 — Months 1–3: Strip It Back to the Bone
-
-### Goal
-Rewrite ephapax-ir from scratch. Not because it's wrong — because we haven't yet
-discovered what it *really* is. The current IR models serialization schemas. The
-new IR models **data shape itself**, independent of any format.
-
-### What We Keep
-- ephapax-ir (as starting point, to be rewritten)
-- The core comparison engine (concepts, not code)
-- The transport class metaphor (to be formalized)
-- All 13 analyzers (set aside, reconnected later)
-
-### What We Build
-
-#### 1. Dependent Types in the IR
-A field's type can depend on another field's value. This is how we model:
-- Protobuf oneofs
-- Avro unions
-- JSON Schema conditionals
-- Database CHECK constraints
-- Tagged unions across any language
-
-All with a single construct.
-
-```
-Shape ::= Unit -- empty / void
- | Atom(T) -- primitive (bool, int, float, string, bytes)
- | Product(label, Shape, Shape) -- struct / record / row
- | Sum(label, Shape, Shape) -- union / enum / oneof
- | Dependent(x : Shape, Shape(x)) -- dependent pair (value determines type)
- | Recursive(μ, Shape) -- fixpoint (trees, lists, graphs)
- | Ref(name) -- named reference
- | Annotated(Shape, Metadata) -- linearity, nullability, constraints
-```
-
-#### 2. Linearity as First-Class Property
-Some data can be copied (a string), some can't (a file handle, a database
-connection, a unique token). Transport classes are already circling this idea —
-make it explicit.
-
-```
-Linearity ::= Unrestricted -- can copy, can drop (most data)
- | Linear -- must use exactly once (handles, tokens)
- | Affine -- can drop but not copy (owned resources)
- | Relevant -- can copy but not drop (audit trails)
-```
-
-#### 3. Information Content as Measurable Quantity
-Every schema has an information-theoretic capacity. When you convert between
-formats, information is either preserved, lost, or padded.
-
-- **Concorde** = zero information loss (isomorphism)
-- **Business** = lossless but padded (embedding with extra fields)
-- **Economy** = lossy but recoverable (projection with known inverse)
-- **Wheelbarrow** = lossy, below Shannon limit (fallback, best-effort)
-
-Now we can *prove* which class a conversion falls into, not just estimate.
-
-### Deliverable
-A new IR that is the universal representation of data shape, with dependent
-types, linearity annotations, and information-theoretic metrics. Smaller than
-what we have now. More powerful than anything that exists.
-
-### Implementation Language
-Idris2 for the core theory. Rust for the practical engine. Zig for the ABI
-boundary (per standard).
-
----
-
-## Phase 2 — Months 4–6: The Algebra
-
-### Goal
-Discover and formalize the algebra of data shapes.
-
-### The Category
-Data shapes compose. If you have a shape A and a shape B, you can form:
-
-| Operation | Notation | Meaning | Example |
-|-----------|----------|---------|---------|
-| Product | A × B | Both together | Struct with fields from A and B |
-| Sum | A + B | One or the other | Union / enum / oneof |
-| Morphism | A → B | A conversion (adapter) | Protobuf → Avro adapter |
-| Tensor | A ⊗ B | Both, but neither copyable | Linear pair (two handles) |
-| Fixpoint | μA | Recursive data | Tree, linked list, graph |
-| Universal | ∀x.A(x) | Generic / parameterized | `List`, `Option` |
-
-This is a **symmetric monoidal closed category with fixpoints**.
-
-### What This Gives Us
-
-1. **Adapter composition.** A→B and B→C gives A→C for free. N formats need N
- adapters to the IR, not N² adapters between each other.
-
-2. **Correctness proofs.** Roundtrip A→B→A should be identity (for Concorde
- class). This is a coherence condition. Checkable mechanically.
-
-3. **Automatic adapter discovery.** Given a library of known morphisms, find the
- shortest (cheapest) path between any two schemas. Pathfinding in a category.
-
-4. **Information loss quantification.** Every morphism has an
- information-theoretic cost. The cheapest path is the best adapter.
-
-### Deliverable
-A formally verified algebra of data shape in Idris2, with composition,
-information metrics, and automatic adapter discovery. The 8 Agda theorems
-cross-validated in 5 proof systems get replaced by one unified theory that's
-more powerful than all of them combined.
-
----
-
-## Phase 3 — Months 7–9: Eat the World
-
-### Goal
-Apply the algebra to everything that has data shape. Not just serialization.
-
-### Database Schemas
-A PostgreSQL table is a data shape. A MySQL table is a different data shape.
-Schema migration is a morphism.
-
-- Generate migration scripts with proven correctness
-- Detect breaking schema changes before they ship
-- **Prove that a migration preserves all existing queries** (killer feature)
-
-### API Contracts
-An OpenAPI spec is a data shape. API versioning is a family of morphisms.
-
-- Generate backward-compatible API version layers automatically
-- Prove that v2 is a superset of v1 (or identify exactly where it isn't)
-- Generate client SDKs that work across API versions
-
-### Type Systems
-A Rust struct is a data shape. A ReScript record is a data shape. FFI is a
-morphism.
-
-- Generate type-safe FFI bindings between any two languages
-- Prove that a binding preserves semantics (not just types)
-- This is what ephapax was always trying to be
-
-### Memory Layouts
-A C struct is a data shape with alignment and padding. A Zig packed struct is a
-different shape. ABI compatibility is a morphism.
-
-- Verify ABI compatibility across compiler versions
-- Generate zero-copy deserializers with proven safety
-- Connects directly to the Idris2 ABI / Zig FFI standard
-
-### Configuration
-TOML, YAML, Nickel, environment variables — all data shapes. Migration between
-config formats is a morphism.
-
-### Deliverable
-A tool that understands data shape across serialization formats, databases, APIs,
-type systems, memory layouts, and configuration. Generates adapters, migrations,
-bindings, and version layers. Proves they're correct.
-
-This is no longer Protocol Squisher. This is a **universal data shape reasoning
-engine**.
-
----
-
-## Phase 4 — Months 10–12: The Temporal Dimension
-
-### Goal
-Add time to the algebra. Schemas evolve. APIs evolve. Everything changes.
-
-### A schema isn't a point — it's a trajectory.
-
-This gives us:
-
-- **Schema archaeology.** Given a database's migration history, reconstruct the
- complete data shape at any point in time. Replay any query against any
- historical schema.
-
-- **Compatibility forecasting.** Given the trajectory of two evolving APIs,
- predict when they'll become incompatible. Weather forecasting for distributed
- systems.
-
-- **Semantic versioning that means something.** A major version bump is a
- morphism that loses information. A minor bump only adds. A patch is an
- isomorphism. Version numbers become provable properties.
-
-- **Evolution strategies.** Given a target schema and a current schema, compute
- the minimum-cost evolution path. A* pathfinding through the space of possible
- schema changes.
-
-### Deliverable
-The algebra plus time. Reason about data shape evolution, predict
-incompatibilities, generate optimal migration paths.
-
----
-
-## Phase 5 — Months 13–15: Make It Beautiful
-
-### Goal
-Build the interface that makes all of this accessible.
-
-### A Visual Language for Data Shape
-Not UML. Not ER diagrams. Something new that represents shape, morphisms,
-information flow, and evolution in a single notation. Think of how musical
-notation represents both pitch and time — this notation represents both
-structure and change.
-
-### PanLL Integration
-The three-panel model is perfect:
-
-- **Panel-L:** The constraints. Algebraic laws. Conservation of information.
-- **Panel-N:** The reasoning engine. Given two shapes, find the best morphism.
- Given a history, predict the future.
-- **Panel-W:** The output. The generated adapter, migration, binding, version
- layer — rendered in whatever target language you need.
-
-### Build Order
-1. TUI first (ratatui, three panels, live exploration)
-2. Web version (visual notation, drag shapes, draw morphisms, live proofs)
-
-### Deliverable
-A beautiful, interactive tool for exploring data shape. Both a research
-instrument and a practical tool.
-
----
-
-## Phase 6 — Months 16–18: The Paper and the Release
-
-### Goal
-Write it up and ship it.
-
-### The Paper
-Not a blog post — a paper. Genuine computer science:
-- The algebra of data shape
-- Dependent types, information theory, linearity, temporal evolution
-- The proofs
-- The implementation
-- The applications
-
-Target: POPL or ICFP.
-
-### The Release
-Package the practical tool:
-- CLI (`shape analyze`, `shape compare`, `shape migrate`, `shape evolve`)
-- Server (axum HTTP/JSON API)
-- PanLL module
-- Library (Rust crate, published to crates.io)
-
-Release both on the same day. The paper gives credibility. The tool gives
-utility.
-
----
-
-## What We Come Out With
-
-Not a format converter. Not a code generator. A **new primitive** in the
-programmer's toolkit — the ability to formally reason about data shape across
-every boundary in a system, with proofs, with information-theoretic guarantees,
-with temporal evolution, and with a beautiful visual language.
-
----
-
-## Progress Tracking
-
-### Phase 1 (Months 1–3) — IN PROGRESS
-- [ ] Design new Shape IR with dependent types
-- [ ] Implement linearity annotations
-- [ ] Define information-theoretic metrics
-- [ ] Port existing analyzer knowledge to new IR
-- [ ] Prove basic properties (product/sum associativity, etc.)
-
-### Phase 2 (Months 4–6) — NOT STARTED
-- [ ] Formalize the category structure
-- [ ] Implement adapter composition
-- [ ] Implement automatic adapter discovery (pathfinding)
-- [ ] Prove coherence conditions
-- [ ] Replace Agda/Coq/Lean/Isabelle/Z3 proofs with unified theory
-
-### Phase 3 (Months 7–9) — NOT STARTED
-- [ ] Database schema analyzer
-- [ ] API contract analyzer (OpenAPI)
-- [ ] Type system analyzer (Rust, ReScript, etc.)
-- [ ] Memory layout analyzer (C, Zig structs)
-- [ ] Configuration format analyzer
-
-### Phase 4 (Months 10–12) — NOT STARTED
-- [ ] Temporal algebra (schema evolution over time)
-- [ ] Compatibility forecasting
-- [ ] Formal semantic versioning
-- [ ] Evolution strategy pathfinder
-
-### Phase 5 (Months 13–15) — NOT STARTED
-- [ ] Visual notation design
-- [ ] TUI explorer (ratatui)
-- [ ] PanLL Panel-L/N/W integration
-- [ ] Web interface
-
-### Phase 6 (Months 16–18) — NOT STARTED
-- [ ] Paper (POPL/ICFP submission)
-- [ ] CLI packaging (`shape` command)
-- [ ] crates.io publication
-- [ ] Simultaneous paper + tool release
diff --git a/provenance/benches/README.adoc b/provenance/benches/README.adoc
new file mode 100644
index 0000000..fdc266b
--- /dev/null
+++ b/provenance/benches/README.adoc
@@ -0,0 +1,355 @@
+== Protocol Squisher Benchmarks
+
+Comprehensive performance benchmarking suite to validate transport class
+overhead claims and compare generated code against baselines.
+
+=== Benchmark Suites
+
+==== 1. Transport Classes (`+transport_classes.rs+`)
+
+Validates the performance claims for all four transport classes:
+
+* *Concorde* (1-2ns target): Zero-copy operations
+** i64 identity
+** String borrowing (no allocation)
+** f64 pass-through
+* *Business Class* (10-20ns target): Safe widening conversions
+** i32 → i64 (safe widening)
+** f32 → f64 (safe widening)
+** u32 → u64 (safe widening)
+** Struct field widening
+* *Economy* (50-100ns target): Moderate overhead with allocation
+** Vec → Vec conversion
+** Option unwrapping
+** String cloning
+** Flattening optional fields
+* *Wheelbarrow* (100-1000ns target): JSON serialization fallback
+** Manual lossy conversions
+** Full JSON roundtrip (serialize + deserialize)
+
+==== 2. Container Operations (`+container_operations.rs+`)
+
+Tests realistic container patterns across transport classes:
+
+*Vec Operations:* - Direct element access (Concorde baseline) - Element
+type widening at various sizes (10, 100, 1K, 10K) - Complex struct
+cloning - Nested Vec flattening
+
+*Option Operations:* - Map identity (should optimize to zero-cost) - Map
+with conversion - Unwrap with default - Option → Result conversion -
+Nested Option flattening
+
+*HashMap Operations:* - Direct lookups (present/absent) - Value type
+widening - HashMap → Vec conversion (ordering loss) - Complex value
+cloning
+
+*Nested Containers:* - Vec filtering - Option unwrapping -
+HashMap compaction - Vec> merging
+
+==== 3. Generated vs Handwritten (`+generated_vs_handwritten.rs+`)
+
+Compares three implementation approaches:
+
+* *Raw Rust*: Theoretical maximum (inline, no overhead)
+* *Handwritten FFI*: PyO3 baseline (manual FFI code)
+* *Generated Code*: What protocol-squisher produces
+
+*Test Cases:* - Point struct (create, field access) - User struct
+(create with validation, field access) - Vec operations (sum with
+different sizes) - Complex API response serialization
+
+This validates that generated code is competitive with hand-written FFI
+while adding safety checks.
+
+==== 4. Optimizer Bench (`+optimizer_bench.rs+`)
+
+Original benchmarks comparing optimized conversions vs JSON fallback
+(already present).
+
+=== Running Benchmarks
+
+==== Run All Benchmarks
+
+[source,bash]
+----
+cargo bench
+----
+
+This generates HTML reports in `+target/criterion/+`.
+
+==== Run Specific Suite
+
+[source,bash]
+----
+# Transport classes only
+cargo bench --bench transport_classes
+
+# Container operations only
+cargo bench --bench container_operations
+
+# Generated vs handwritten comparison
+cargo bench --bench generated_vs_handwritten
+
+# Original optimizer benchmarks
+cargo bench --bench optimizer_bench
+----
+
+==== Run Specific Test
+
+[source,bash]
+----
+# Run only Concorde benchmarks
+cargo bench --bench transport_classes Concorde
+
+# Run only Vec operations
+cargo bench --bench container_operations Vec
+
+# Run only Point operations
+cargo bench --bench generated_vs_handwritten Point
+----
+
+==== View HTML Reports
+
+After running benchmarks, open the HTML reports:
+
+[source,bash]
+----
+# Open the main criterion report index
+firefox target/criterion/report/index.html
+
+# Or specific benchmark group
+firefox target/criterion/Concorde/report/index.html
+----
+
+=== Performance Targets
+
+Based on theoretical overhead analysis:
+
+[cols=",,",options="header",]
+|===
+|Transport Class |Target Latency |Typical Use Case
+|*Concorde* |1-2ns |Identical types, zero-copy
+|*Business Class* |10-20ns |Safe widening (i32→i64, f32→f64)
+|*Economy* |50-100ns |Allocation required (Vec, String)
+|*Wheelbarrow* |100-1000ns |JSON serialization fallback
+|===
+
+*Note:* Actual performance depends on: - Data size (Vec/HashMap element
+count) - String lengths - Memory allocator efficiency - CPU cache
+effects
+
+=== Interpreting Results
+
+==== Criterion Output
+
+Criterion provides detailed statistics:
+
+....
+Concorde/i64_identity time: [1.2345 ns 1.2678 ns 1.3012 ns]
+ change: [-5.1234% -2.3456% +0.8901%] (p = 0.42 > 0.05)
+ No change in performance detected.
+....
+
+* *time*: [lower_bound mean upper_bound] in nanoseconds
+* *change*: Percentage change vs previous run
+* *p-value*: Statistical significance (< 0.05 = significant change)
+
+==== HTML Reports
+
+The HTML reports include: - *Violin plots*: Distribution of measurement
+samples - *Line charts*: Performance over time (if multiple runs) - *PDF
+estimates*: Probability density of the measurement - *Comparison*:
+Side-by-side comparison between runs
+
+==== Expected Results
+
+*Concorde* should show: - Sub-nanosecond for i64 identity (may be
+optimized away) - 1-2ns for str borrowing - Similar for f64 pass-through
+
+*Business Class* should show: - 5-10ns for scalar widening (i32→i64,
+f32→f64) - 10-20ns for struct field widening
+
+*Economy* should show: - 50-100ns for small Vec conversions (10
+elements) - 500-1000ns for larger Vec conversions (1000 elements) -
+20-50ns for String clone - 10-20ns for Option operations
+
+*Wheelbarrow* should show: - 500-1000ns for manual lossy conversions -
+1000-5000ns for JSON roundtrip (depends on data size)
+
+==== Performance Regression
+
+If benchmarks show significant regression:
+
+[arabic]
+. *Check for debug builds*: Benchmarks should run in release mode
+. *System load*: Close other applications
+. *CPU throttling*: Check `+cpufreq+` settings
+. *Outliers*: Criterion automatically detects and reports outliers
+
+=== CI Integration
+
+Benchmarks can be integrated into CI for regression detection:
+
+[source,yaml]
+----
+# .github/workflows/benchmarks.yml
+name: Benchmarks
+on:
+ push:
+ branches: [main]
+ pull_request:
+jobs:
+ benchmark:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - name: Run benchmarks
+ run: cargo bench --no-fail-fast
+ - name: Upload results
+ uses: actions/upload-artifact@v4
+ with:
+ name: benchmark-results
+ path: target/criterion/
+----
+
+=== Benchmark Development
+
+==== Adding New Benchmarks
+
+[arabic]
+. Create new `+.rs+` file in `+benches/+`
+. Add `+[[bench]]+` entry in `+Cargo.toml+`
+. Follow criterion patterns:
+
+[source,rust]
+----
+use criterion::{black_box, criterion_group, criterion_main, Criterion};
+
+fn my_benchmark(c: &mut Criterion) {
+ c.bench_function("my_test", |b| {
+ b.iter(|| {
+ let result = my_function(black_box(input));
+ black_box(result)
+ })
+ });
+}
+
+criterion_group!(benches, my_benchmark);
+criterion_main!(benches);
+----
+
+==== Using `+black_box+`
+
+Always wrap inputs and outputs with `+black_box()+` to prevent compiler
+optimizations:
+
+[source,rust]
+----
+// WRONG: Compiler may optimize away the entire computation
+b.iter(|| my_function(42));
+
+// CORRECT: Forces the computation to actually run
+b.iter(|| {
+ let result = my_function(black_box(42));
+ black_box(result)
+});
+----
+
+==== Parameterized Benchmarks
+
+Use `+BenchmarkId+` for size/parameter variations:
+
+[source,rust]
+----
+use criterion::BenchmarkId;
+
+let mut group = c.benchmark_group("vec_conversion");
+for size in [10, 100, 1000].iter() {
+ let vec: Vec = (0..*size).collect();
+ group.bench_with_input(
+ BenchmarkId::new("conversion", size),
+ &vec,
+ |b, vec| {
+ b.iter(|| convert(black_box(vec)))
+ },
+ );
+}
+group.finish();
+----
+
+=== Advanced Options
+
+==== Criterion Configuration
+
+Customize in `+Cargo.toml+`:
+
+[source,toml]
+----
+[dev-dependencies]
+criterion = {
+ version = "0.5",
+ features = [
+ "html_reports", # Enable HTML report generation
+ "csv_output", # Export to CSV
+ ]
+}
+----
+
+==== Sampling Configuration
+
+Control measurement precision:
+
+[source,rust]
+----
+use criterion::{Criterion, SamplingMode};
+
+fn my_benchmark(c: &mut Criterion) {
+ let mut group = c.benchmark_group("my_group");
+ group.sampling_mode(SamplingMode::Flat); // Linear sampling
+ group.sample_size(1000); // Number of samples
+ group.measurement_time(std::time::Duration::from_secs(10));
+ // ... benchmarks
+ group.finish();
+}
+----
+
+==== Throughput Measurement
+
+Measure operations per second:
+
+[source,rust]
+----
+use criterion::Throughput;
+
+group.throughput(Throughput::Elements(vec.len() as u64));
+----
+
+=== Troubleshooting
+
+==== "`Benchmark took too long`"
+
+Increase timeout:
+
+[source,rust]
+----
+group.measurement_time(std::time::Duration::from_secs(60));
+----
+
+==== High Variance
+
+Reduce system noise: - Close background applications - Disable CPU
+frequency scaling - Run multiple times and average
+
+==== Outliers
+
+Criterion automatically detects outliers. Check HTML reports for: -
+*Mild outliers*: May indicate background interference - *Severe
+outliers*: Check for bugs or system issues
+
+=== References
+
+* https://bheisler.github.io/criterion.rs/book/[Criterion.rs
+Documentation]
+* https://nnethercote.github.io/perf-book/[Rust Performance Book]
+* link:../docs/DESIGN.md[Protocol Squisher Design Doc]
diff --git a/provenance/benches/README.md b/provenance/benches/README.md
deleted file mode 100644
index 346a484..0000000
--- a/provenance/benches/README.md
+++ /dev/null
@@ -1,364 +0,0 @@
-
-# Protocol Squisher Benchmarks
-
-Comprehensive performance benchmarking suite to validate transport class overhead claims and compare generated code against baselines.
-
-## Benchmark Suites
-
-### 1. Transport Classes (`transport_classes.rs`)
-
-Validates the performance claims for all four transport classes:
-
-- **Concorde** (1-2ns target): Zero-copy operations
- - i64 identity
- - String borrowing (no allocation)
- - f64 pass-through
-
-- **Business Class** (10-20ns target): Safe widening conversions
- - i32 → i64 (safe widening)
- - f32 → f64 (safe widening)
- - u32 → u64 (safe widening)
- - Struct field widening
-
-- **Economy** (50-100ns target): Moderate overhead with allocation
- - Vec → Vec conversion
- - Option unwrapping
- - String cloning
- - Flattening optional fields
-
-- **Wheelbarrow** (100-1000ns target): JSON serialization fallback
- - Manual lossy conversions
- - Full JSON roundtrip (serialize + deserialize)
-
-### 2. Container Operations (`container_operations.rs`)
-
-Tests realistic container patterns across transport classes:
-
-**Vec Operations:**
-- Direct element access (Concorde baseline)
-- Element type widening at various sizes (10, 100, 1K, 10K)
-- Complex struct cloning
-- Nested Vec flattening
-
-**Option Operations:**
-- Map identity (should optimize to zero-cost)
-- Map with conversion
-- Unwrap with default
-- Option → Result conversion
-- Nested Option flattening
-
-**HashMap Operations:**
-- Direct lookups (present/absent)
-- Value type widening
-- HashMap → Vec conversion (ordering loss)
-- Complex value cloning
-
-**Nested Containers:**
-- Vec> filtering
-- Option> unwrapping
-- HashMap> compaction
-- Vec> merging
-
-### 3. Generated vs Handwritten (`generated_vs_handwritten.rs`)
-
-Compares three implementation approaches:
-
-- **Raw Rust**: Theoretical maximum (inline, no overhead)
-- **Handwritten FFI**: PyO3 baseline (manual FFI code)
-- **Generated Code**: What protocol-squisher produces
-
-**Test Cases:**
-- Point struct (create, field access)
-- User struct (create with validation, field access)
-- Vec operations (sum with different sizes)
-- Complex API response serialization
-
-This validates that generated code is competitive with hand-written FFI while adding safety checks.
-
-### 4. Optimizer Bench (`optimizer_bench.rs`)
-
-Original benchmarks comparing optimized conversions vs JSON fallback (already present).
-
-## Running Benchmarks
-
-### Run All Benchmarks
-
-```bash
-cargo bench
-```
-
-This generates HTML reports in `target/criterion/`.
-
-### Run Specific Suite
-
-```bash
-# Transport classes only
-cargo bench --bench transport_classes
-
-# Container operations only
-cargo bench --bench container_operations
-
-# Generated vs handwritten comparison
-cargo bench --bench generated_vs_handwritten
-
-# Original optimizer benchmarks
-cargo bench --bench optimizer_bench
-```
-
-### Run Specific Test
-
-```bash
-# Run only Concorde benchmarks
-cargo bench --bench transport_classes Concorde
-
-# Run only Vec operations
-cargo bench --bench container_operations Vec
-
-# Run only Point operations
-cargo bench --bench generated_vs_handwritten Point
-```
-
-### View HTML Reports
-
-After running benchmarks, open the HTML reports:
-
-```bash
-# Open the main criterion report index
-firefox target/criterion/report/index.html
-
-# Or specific benchmark group
-firefox target/criterion/Concorde/report/index.html
-```
-
-## Performance Targets
-
-Based on theoretical overhead analysis:
-
-| Transport Class | Target Latency | Typical Use Case |
-|-----------------|----------------|------------------|
-| **Concorde** | 1-2ns | Identical types, zero-copy |
-| **Business Class** | 10-20ns | Safe widening (i32→i64, f32→f64) |
-| **Economy** | 50-100ns | Allocation required (Vec, String) |
-| **Wheelbarrow** | 100-1000ns | JSON serialization fallback |
-
-**Note:** Actual performance depends on:
-- Data size (Vec/HashMap element count)
-- String lengths
-- Memory allocator efficiency
-- CPU cache effects
-
-## Interpreting Results
-
-### Criterion Output
-
-Criterion provides detailed statistics:
-
-```
-Concorde/i64_identity time: [1.2345 ns 1.2678 ns 1.3012 ns]
- change: [-5.1234% -2.3456% +0.8901%] (p = 0.42 > 0.05)
- No change in performance detected.
-```
-
-- **time**: [lower_bound mean upper_bound] in nanoseconds
-- **change**: Percentage change vs previous run
-- **p-value**: Statistical significance (< 0.05 = significant change)
-
-### HTML Reports
-
-The HTML reports include:
-- **Violin plots**: Distribution of measurement samples
-- **Line charts**: Performance over time (if multiple runs)
-- **PDF estimates**: Probability density of the measurement
-- **Comparison**: Side-by-side comparison between runs
-
-### Expected Results
-
-**Concorde** should show:
-- Sub-nanosecond for i64 identity (may be optimized away)
-- 1-2ns for str borrowing
-- Similar for f64 pass-through
-
-**Business Class** should show:
-- 5-10ns for scalar widening (i32→i64, f32→f64)
-- 10-20ns for struct field widening
-
-**Economy** should show:
-- 50-100ns for small Vec conversions (10 elements)
-- 500-1000ns for larger Vec conversions (1000 elements)
-- 20-50ns for String clone
-- 10-20ns for Option operations
-
-**Wheelbarrow** should show:
-- 500-1000ns for manual lossy conversions
-- 1000-5000ns for JSON roundtrip (depends on data size)
-
-### Performance Regression
-
-If benchmarks show significant regression:
-
-1. **Check for debug builds**: Benchmarks should run in release mode
-2. **System load**: Close other applications
-3. **CPU throttling**: Check `cpufreq` settings
-4. **Outliers**: Criterion automatically detects and reports outliers
-
-## CI Integration
-
-Benchmarks can be integrated into CI for regression detection:
-
-```yaml
-# .github/workflows/benchmarks.yml
-name: Benchmarks
-on:
- push:
- branches: [main]
- pull_request:
-jobs:
- benchmark:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: dtolnay/rust-toolchain@stable
- - name: Run benchmarks
- run: cargo bench --no-fail-fast
- - name: Upload results
- uses: actions/upload-artifact@v4
- with:
- name: benchmark-results
- path: target/criterion/
-```
-
-## Benchmark Development
-
-### Adding New Benchmarks
-
-1. Create new `.rs` file in `benches/`
-2. Add `[[bench]]` entry in `Cargo.toml`
-3. Follow criterion patterns:
-
-```rust
-use criterion::{black_box, criterion_group, criterion_main, Criterion};
-
-fn my_benchmark(c: &mut Criterion) {
- c.bench_function("my_test", |b| {
- b.iter(|| {
- let result = my_function(black_box(input));
- black_box(result)
- })
- });
-}
-
-criterion_group!(benches, my_benchmark);
-criterion_main!(benches);
-```
-
-### Using `black_box`
-
-Always wrap inputs and outputs with `black_box()` to prevent compiler optimizations:
-
-```rust
-// WRONG: Compiler may optimize away the entire computation
-b.iter(|| my_function(42));
-
-// CORRECT: Forces the computation to actually run
-b.iter(|| {
- let result = my_function(black_box(42));
- black_box(result)
-});
-```
-
-### Parameterized Benchmarks
-
-Use `BenchmarkId` for size/parameter variations:
-
-```rust
-use criterion::BenchmarkId;
-
-let mut group = c.benchmark_group("vec_conversion");
-for size in [10, 100, 1000].iter() {
- let vec: Vec = (0..*size).collect();
- group.bench_with_input(
- BenchmarkId::new("conversion", size),
- &vec,
- |b, vec| {
- b.iter(|| convert(black_box(vec)))
- },
- );
-}
-group.finish();
-```
-
-## Advanced Options
-
-### Criterion Configuration
-
-Customize in `Cargo.toml`:
-
-```toml
-[dev-dependencies]
-criterion = {
- version = "0.5",
- features = [
- "html_reports", # Enable HTML report generation
- "csv_output", # Export to CSV
- ]
-}
-```
-
-### Sampling Configuration
-
-Control measurement precision:
-
-```rust
-use criterion::{Criterion, SamplingMode};
-
-fn my_benchmark(c: &mut Criterion) {
- let mut group = c.benchmark_group("my_group");
- group.sampling_mode(SamplingMode::Flat); // Linear sampling
- group.sample_size(1000); // Number of samples
- group.measurement_time(std::time::Duration::from_secs(10));
- // ... benchmarks
- group.finish();
-}
-```
-
-### Throughput Measurement
-
-Measure operations per second:
-
-```rust
-use criterion::Throughput;
-
-group.throughput(Throughput::Elements(vec.len() as u64));
-```
-
-## Troubleshooting
-
-### "Benchmark took too long"
-
-Increase timeout:
-
-```rust
-group.measurement_time(std::time::Duration::from_secs(60));
-```
-
-### High Variance
-
-Reduce system noise:
-- Close background applications
-- Disable CPU frequency scaling
-- Run multiple times and average
-
-### Outliers
-
-Criterion automatically detects outliers. Check HTML reports for:
-- **Mild outliers**: May indicate background interference
-- **Severe outliers**: Check for bugs or system issues
-
-## References
-
-- [Criterion.rs Documentation](https://bheisler.github.io/criterion.rs/book/)
-- [Rust Performance Book](https://nnethercote.github.io/perf-book/)
-- [Protocol Squisher Design Doc](../docs/DESIGN.md)
diff --git a/provenance/crates/protocol-squisher-protobuf-analyzer/CHANGELOG.adoc b/provenance/crates/protocol-squisher-protobuf-analyzer/CHANGELOG.adoc
new file mode 100644
index 0000000..915c2b9
--- /dev/null
+++ b/provenance/crates/protocol-squisher-protobuf-analyzer/CHANGELOG.adoc
@@ -0,0 +1,112 @@
+== Changelog
+
+All notable changes to the protocol-squisher-protobuf-analyzer will be
+documented in this file.
+
+=== [0.1.0] - 2026-02-04
+
+==== Initial Implementation
+
+Complete Protobuf analyzer implementation with ephapax transport class
+analysis.
+
+===== Added
+
+*Core Features:* - ✅ Proto2 and proto3 syntax support - ✅ All protobuf
+scalar types (double, float, int32/64, uint32/64, sint32/64, fixed32/64,
+sfixed32/64, bool, string, bytes) - ✅ Message parsing (flat and nested)
+- ✅ Enum parsing (top-level and nested) - ✅ Repeated field support
+(converted to Vec) - ✅ Map field support (converted to Map) - ✅
+Oneof support (converted to enum with variant payloads) - ✅ Comment
+handling (single-line and multi-line) - ✅ Package declaration parsing
+
+*Parser (`+src/parser.rs+`):* - Regex-based parser with balanced brace
+extraction - Comment removal with string literal awareness - Syntax
+detection (proto2 vs proto3) - Recursive nested message parsing - Field
+label handling (optional, required, repeated) - Map and oneof special
+parsing
+
+*Converter (`+src/converter.rs+`):* - Protobuf → IR type mapping -
+Struct generation from messages - Enum generation from protobuf enums -
+Oneof → enum with payloads conversion - Nested type flattening with
+underscore naming - Field optionality logic (proto2 vs proto3 semantics)
+- Container type conversion (Vec, Map, Option)
+
+*Ephapax Bridge (`+src/ephapax_bridge.rs+`):* - IR type → ephapax
+primitive type conversion - Transport class analysis
+(Concorde/Business/Economy/Wheelbarrow) - Container compatibility
+analysis (recursive) - TransportAnalysis result type with convenience
+methods - Option, Vec, Map, Tuple support
+
+*Testing:* - 43 unit tests (all passing) - 2 doc tests (all passing) -
+Parser tests (11 tests) - Converter tests (3 tests) - Ephapax bridge
+tests (16 tests) - Integration tests (13 tests)
+
+*Examples:* - `+analyze_proto.rs+` - Basic schema analysis and
+introspection - `+transport_analysis.rs+` - Field-by-field transport
+compatibility - `+complex_schema.rs+` - Complex nested schema
+demonstration
+
+*Documentation:* - README.md - Overview and features - USAGE.md -
+Complete usage guide with examples - IMPLEMENTATION.md - Technical
+implementation details - Module-level rustdoc with examples - Inline
+documentation for all public APIs
+
+*Dependencies:* - protocol-squisher-ir - Canonical IR format -
+protocol-squisher-transport-primitives - Proven transport analysis -
+thiserror - Error handling - regex - Pattern matching -
+pretty_assertions (dev) - Better test output
+
+===== Known Limitations
+
+*Not Yet Supported:* - Services and RPC definitions - Custom options -
+Extension fields - Groups (deprecated protobuf feature) - Import
+resolution - Reserved field declarations
+
+These are documented as future enhancements and do not impact the core
+message/enum analysis functionality.
+
+===== Performance
+
+* Small schemas (< 10 types): < 1ms
+* Medium schemas (10-100 types): < 10ms
+* Large schemas (100-1000 types): < 100ms
+
+===== Breaking Changes
+
+None (initial release)
+
+===== Migration Guide
+
+N/A (initial release)
+
+'''''
+
+=== Future Roadmap
+
+==== Version 0.2.0 (Planned)
+
+*Features:* - Service and RPC extraction - Import resolution - Better
+error messages with line numbers - Proto validation (enforce proto3
+rules)
+
+==== Version 0.3.0 (Planned)
+
+*Features:* - Custom option preservation - Extension field support -
+Well-known types (google.protobuf.*) - Performance optimization for very
+large schemas
+
+==== Version 1.0.0 (Planned)
+
+*Features:* - Full protobuf spec compliance - Code generation hints -
+Schema validation - Backwards compatibility guarantees
+
+'''''
+
+=== Contributing
+
+See the main protocol-squisher repository for contribution guidelines.
+
+=== License
+
+MPL-2.0
diff --git a/provenance/crates/protocol-squisher-protobuf-analyzer/CHANGELOG.md b/provenance/crates/protocol-squisher-protobuf-analyzer/CHANGELOG.md
deleted file mode 100644
index dc86714..0000000
--- a/provenance/crates/protocol-squisher-protobuf-analyzer/CHANGELOG.md
+++ /dev/null
@@ -1,141 +0,0 @@
-
-# Changelog
-
-All notable changes to the protocol-squisher-protobuf-analyzer will be documented in this file.
-
-## [0.1.0] - 2026-02-04
-
-### Initial Implementation
-
-Complete Protobuf analyzer implementation with ephapax transport class analysis.
-
-#### Added
-
-**Core Features:**
-- ✅ Proto2 and proto3 syntax support
-- ✅ All protobuf scalar types (double, float, int32/64, uint32/64, sint32/64, fixed32/64, sfixed32/64, bool, string, bytes)
-- ✅ Message parsing (flat and nested)
-- ✅ Enum parsing (top-level and nested)
-- ✅ Repeated field support (converted to Vec)
-- ✅ Map field support (converted to Map)
-- ✅ Oneof support (converted to enum with variant payloads)
-- ✅ Comment handling (single-line and multi-line)
-- ✅ Package declaration parsing
-
-**Parser (`src/parser.rs`):**
-- Regex-based parser with balanced brace extraction
-- Comment removal with string literal awareness
-- Syntax detection (proto2 vs proto3)
-- Recursive nested message parsing
-- Field label handling (optional, required, repeated)
-- Map and oneof special parsing
-
-**Converter (`src/converter.rs`):**
-- Protobuf → IR type mapping
-- Struct generation from messages
-- Enum generation from protobuf enums
-- Oneof → enum with payloads conversion
-- Nested type flattening with underscore naming
-- Field optionality logic (proto2 vs proto3 semantics)
-- Container type conversion (Vec, Map, Option)
-
-**Ephapax Bridge (`src/ephapax_bridge.rs`):**
-- IR type → ephapax primitive type conversion
-- Transport class analysis (Concorde/Business/Economy/Wheelbarrow)
-- Container compatibility analysis (recursive)
-- TransportAnalysis result type with convenience methods
-- Option, Vec, Map, Tuple support
-
-**Testing:**
-- 43 unit tests (all passing)
-- 2 doc tests (all passing)
-- Parser tests (11 tests)
-- Converter tests (3 tests)
-- Ephapax bridge tests (16 tests)
-- Integration tests (13 tests)
-
-**Examples:**
-- `analyze_proto.rs` - Basic schema analysis and introspection
-- `transport_analysis.rs` - Field-by-field transport compatibility
-- `complex_schema.rs` - Complex nested schema demonstration
-
-**Documentation:**
-- README.md - Overview and features
-- USAGE.md - Complete usage guide with examples
-- IMPLEMENTATION.md - Technical implementation details
-- Module-level rustdoc with examples
-- Inline documentation for all public APIs
-
-**Dependencies:**
-- protocol-squisher-ir - Canonical IR format
-- protocol-squisher-transport-primitives - Proven transport analysis
-- thiserror - Error handling
-- regex - Pattern matching
-- pretty_assertions (dev) - Better test output
-
-#### Known Limitations
-
-**Not Yet Supported:**
-- Services and RPC definitions
-- Custom options
-- Extension fields
-- Groups (deprecated protobuf feature)
-- Import resolution
-- Reserved field declarations
-
-These are documented as future enhancements and do not impact the core message/enum analysis functionality.
-
-#### Performance
-
-- Small schemas (< 10 types): < 1ms
-- Medium schemas (10-100 types): < 10ms
-- Large schemas (100-1000 types): < 100ms
-
-#### Breaking Changes
-
-None (initial release)
-
-#### Migration Guide
-
-N/A (initial release)
-
----
-
-## Future Roadmap
-
-### Version 0.2.0 (Planned)
-
-**Features:**
-- Service and RPC extraction
-- Import resolution
-- Better error messages with line numbers
-- Proto validation (enforce proto3 rules)
-
-### Version 0.3.0 (Planned)
-
-**Features:**
-- Custom option preservation
-- Extension field support
-- Well-known types (google.protobuf.*)
-- Performance optimization for very large schemas
-
-### Version 1.0.0 (Planned)
-
-**Features:**
-- Full protobuf spec compliance
-- Code generation hints
-- Schema validation
-- Backwards compatibility guarantees
-
----
-
-## Contributing
-
-See the main protocol-squisher repository for contribution guidelines.
-
-## License
-
-MPL-2.0
diff --git a/provenance/crates/protocol-squisher-protobuf-analyzer/IMPLEMENTATION.adoc b/provenance/crates/protocol-squisher-protobuf-analyzer/IMPLEMENTATION.adoc
new file mode 100644
index 0000000..9a63d33
--- /dev/null
+++ b/provenance/crates/protocol-squisher-protobuf-analyzer/IMPLEMENTATION.adoc
@@ -0,0 +1,326 @@
+== Protobuf Analyzer Implementation Summary
+
+=== Overview
+
+Fully implemented Protobuf schema analyzer for protocol-squisher with
+ephapax transport class analysis.
+
+*Status*: ✅ Complete and tested (43/43 tests passing)
+
+=== Components Implemented
+
+==== 1. Parser (`+src/parser.rs+`)
+
+*Lines of Code*: ~620 lines
+
+*Features*: - ✅ Proto2 and proto3 syntax detection - ✅ Comment removal
+(single-line `+//+` and multi-line `+/* */+`) - ✅ Package declarations
+- ✅ Message parsing with balanced brace extraction - ✅ Nested message
+support (recursive parsing) - ✅ Field parsing with all labels
+(`+optional+`, `+required+`, `+repeated+`) - ✅ Map field parsing
+(`+map+`) - ✅ Oneof group parsing - ✅ Enum parsing (top-level
+and nested) - ✅ Enum value parsing with numeric assignments
+
+*Key Algorithms*: - Regex-based pattern matching for declarations -
+Balanced brace extraction for nested structures - Recursive descent for
+nested messages - Comment-aware parsing with string literal handling
+
+==== 2. Converter (`+src/converter.rs+`)
+
+*Lines of Code*: ~350 lines
+
+*Features*: - ✅ Type mapping: Protobuf → IR primitives - ✅ Container
+type conversion (Vec, Map, Option, Tuple) - ✅ Struct generation from
+messages - ✅ Enum generation from protobuf enums - ✅ Oneof to enum
+with variant payloads - ✅ Nested type flattening with underscore naming
+- ✅ Field optionality handling (proto2 vs proto3) - ✅ Map type
+conversion - ✅ Repeated field conversion
+
+*Type Mappings*:
+
+....
+double → F64
+float → F32
+int32/sint32/sfixed32 → I32
+int64/sint64/sfixed64 → I64
+uint32/fixed32 → U32
+uint64/fixed64 → U64
+bool → Bool
+string → String
+bytes → Bytes
+repeated T → Vec
+map → Map
+message → Struct
+enum → Enum
+oneof → Enum with payloads
+....
+
+==== 3. Ephapax Bridge (`+src/ephapax_bridge.rs+`)
+
+*Lines of Code*: ~350 lines
+
+*Features*: - ✅ IR type → ephapax primitive type conversion - ✅
+Transport class analysis for primitives - ✅ Recursive container
+compatibility analysis - ✅ Option, Vec, Map, Tuple support - ✅
+TransportAnalysis result type - ✅ Convenience methods (is_zero_copy,
+is_safe, requires_json_fallback)
+
+*Transport Classes*: - *Concorde*: Exact match, 100% fidelity, 0%
+overhead - *Business*: Safe widening (i32→i64), 98% fidelity, 5%
+overhead - *Economy*: Lossy conversion, 80% fidelity, moderate overhead
+- *Wheelbarrow*: Incompatible, 50% fidelity, 80% overhead (JSON
+fallback)
+
+==== 4. Main Library (`+src/lib.rs+`)
+
+*Lines of Code*: ~640 lines (including tests)
+
+*Features*: - ✅ ProtobufAnalyzer main interface - ✅ File and string
+analysis - ✅ Error type with thiserror - ✅ ProtoSyntax enum
+(Proto2/Proto3) - ✅ Comprehensive module documentation - ✅ 43 unit
+tests covering all features
+
+=== Test Coverage
+
+==== Unit Tests (43 tests, all passing)
+
+*Parser Tests* (11 tests): - Syntax detection (proto2, proto3) - Package
+parsing - Simple message parsing - Enum parsing - Repeated field parsing
+- Map field parsing - Oneof parsing - Comment removal
+
+*Converter Tests* (3 tests): - PascalCase conversion - Type name
+normalization - Proto type to IR type mapping
+
+*Ephapax Bridge Tests* (16 tests): - Primitive type conversion - Exact
+match analysis - Safe widening analysis - Incompatible type analysis -
+Option container analysis (identical/narrowing) - Vec container analysis
+(identical/narrowing) - Map analysis with narrowing - Tuple analysis
+with narrowing - Protobuf-specific type tests (double→f64, float→f32,
+int32→i32, bytes→Vec)
+
+*Integration Tests* (13 tests): - Simple message - Nested message - Enum
+- Repeated fields - Map fields - Oneof - Proto2 syntax - Optional field
+proto3 - Complex nested types - All protobuf types - Multiple messages -
+Nested enum - Complex maps - Multiple oneofs - With comments - Package
+declaration - Transport analysis integration
+
+*Doc Tests* (2 tests): - Module-level examples - Basic usage examples
+
+=== Examples
+
+==== 3 Complete Examples:
+
+[arabic]
+. *`+analyze_proto.rs+`* - Basic schema analysis
+* Parse and introspect protobuf schema
+* Print type hierarchy
+* Show field details
+. *`+transport_analysis.rs+`* - Field-by-field compatibility
+* Analyze source vs target schemas
+* Field-level transport class checking
+* Visual transport class indicators
+. *`+complex_schema.rs+`* - Complex nested schema
+* E-commerce order system example
+* Nested messages (3+ levels deep)
+* Oneofs, maps, repeated fields
+* Visual type hierarchy display
+
+=== Documentation
+
+==== Files Created:
+
+[arabic]
+. *`+README.md+`* - Overview, features, usage, implementation details
+. *`+USAGE.md+`* - Complete usage guide with code examples
+. *`+IMPLEMENTATION.md+`* - This file (technical summary)
+. *Module docs* - Comprehensive rustdoc in `+lib.rs+`
+
+=== Dependencies
+
+[source,toml]
+----
+[dependencies]
+protocol-squisher-ir = { path = "../protocol-squisher-ir" }
+protocol-squisher-transport-primitives = { path = "../../ephapax-ir" }
+thiserror = "1.0"
+regex = "1.10"
+
+[dev-dependencies]
+pretty_assertions = "1.4"
+----
+
+=== Code Statistics
+
+* *Total Rust files*: 7
+** `+lib.rs+`
+** `+parser.rs+`
+** `+converter.rs+`
+** `+ephapax_bridge.rs+`
+** 3 examples
+* *Lines of code*: ~1,960 (including tests)
+* *Test coverage*: 43 unit tests + 2 doc tests
+* *Examples*: 3 complete working examples
+
+=== Protobuf Features Support
+
+[width="100%",cols="36%,36%,28%",options="header",]
+|===
+|Feature |Support |Notes
+|proto2 syntax |✅ Full |Required/optional fields
+
+|proto3 syntax |✅ Full |Implicit optional, explicit optional
+
+|Scalar types |✅ All |double, float, int32/64, uint32/64, sint32/64,
+fixed32/64, sfixed32/64, bool, string, bytes
+
+|Messages |✅ Full |Flat and nested
+
+|Enums |✅ Full |Top-level and nested
+
+|Repeated fields |✅ Full |Converted to Vec
+
+|Map fields |✅ Full |All key/value types
+
+|Oneof |✅ Full |Converted to enum with payloads
+
+|Nested types |✅ Full |Flattened with underscore naming
+
+|Comments |✅ Full |Single-line and multi-line
+
+|Packages |✅ Parsed |Not used for namespacing
+
+|Services |❌ No |Future work
+
+|RPCs |❌ No |Future work
+
+|Options |❌ No |Ignored
+
+|Extensions |❌ No |Not parsed
+
+|Groups |❌ No |Deprecated feature
+
+|Imports |❌ No |Each file analyzed independently
+|===
+
+=== Architecture
+
+....
+ProtobufAnalyzer
+ ↓
+ProtoParser (regex-based)
+ ↓
+ParsedProto (AST)
+ ↓
+ProtoConverter
+ ↓
+IrSchema (canonical IR)
+ ↓
+EphapaxBridge
+ ↓
+TransportClass analysis
+....
+
+=== Performance
+
+* *Small schemas* (< 10 types): < 1ms
+* *Medium schemas* (10-100 types): < 10ms
+* *Large schemas* (100-1000 types): < 100ms
+
+Regex-based parsing with minimal allocations and careful handling of
+nested structures.
+
+=== Integration Points
+
+==== With protocol-squisher-ir:
+
+* Uses `+IrSchema+`, `+TypeDef+`, `+FieldDef+`
+* Generates `+StructDef+`, `+EnumDef+`, `+VariantDef+`
+* Maps to `+IrType+`, `+PrimitiveType+`, `+ContainerType+`
+
+==== With ephapax-ir:
+
+* Uses `+IRContext+` for proven transport analysis
+* Maps to `+PrimitiveType+` (ephapax)
+* Returns `+TransportClass+` with fidelity/overhead metrics
+
+==== Example Integration:
+
+[source,rust]
+----
+// Parse protobuf
+let analyzer = ProtobufAnalyzer::new();
+let schema = analyzer.analyze_file("api.proto")?;
+
+// Analyze transport compatibility
+let ctx = IRContext::new();
+let analysis = TransportAnalysis::new(&ctx, source_type, target_type)?;
+
+// Check if zero-copy is possible
+if analysis.is_zero_copy() {
+ // Use memcpy or pointer cast
+} else if analysis.is_safe() {
+ // Safe conversion (widening)
+} else {
+ // Fallback to JSON serialization
+}
+----
+
+=== Future Enhancements
+
+==== Priority 1 (High Impact):
+
+* Service and RPC extraction
+* Import resolution and dependency analysis
+* Better error messages with line numbers
+
+==== Priority 2 (Quality of Life):
+
+* Custom option preservation
+* Proto validation (enforce proto3 rules)
+* Performance optimization for very large schemas
+
+==== Priority 3 (Nice to Have):
+
+* Extension field support
+* Well-known types (google.protobuf.*)
+* Code generation hints
+
+=== Lessons Learned
+
+[arabic]
+. *Regex vs. Full Parser*: Regex-based parsing is sufficient for
+protobuf’s simple syntax and much faster to implement.
+. *Proto2 vs Proto3*: Key difference is implicit optional in proto3.
+Required careful handling in field label logic.
+. *Nested Type Naming*: Flattening with underscores (`+Outer_Inner+`)
+works well and avoids namespace complexity.
+. *Oneof Handling*: Converting to enums with variant payloads maps
+cleanly to Rust enum semantics.
+. *Transport Analysis*: Ephapax integration provides proven-correct
+analysis with minimal code.
+
+=== Testing Strategy
+
+* *Unit tests*: Each component tested in isolation
+* *Integration tests*: End-to-end analysis of realistic schemas
+* *Ephapax tests*: All container combinations tested
+* *Doc tests*: Examples in documentation verified
+* *Examples*: Real-world usage patterns demonstrated
+
+=== Compliance
+
+* *License*: MPL-2.0
+* *Author*: Jonathan D.A. Jewell j.d.a.jewell@open.ac.uk
+* *SPDX headers*: Present in all files
+* *Cargo.toml*: Complete metadata
+
+=== Conclusion
+
+The Protobuf analyzer is *complete and production-ready*:
+
+✅ All features implemented ✅ Comprehensive test coverage (43/43
+passing) ✅ Ephapax integration working ✅ Complete documentation ✅
+Working examples ✅ Clean, maintainable code
+
+Ready for integration with protocol-squisher and use in transport class
+analysis workflows.
diff --git a/provenance/crates/protocol-squisher-protobuf-analyzer/IMPLEMENTATION.md b/provenance/crates/protocol-squisher-protobuf-analyzer/IMPLEMENTATION.md
deleted file mode 100644
index 08eb36f..0000000
--- a/provenance/crates/protocol-squisher-protobuf-analyzer/IMPLEMENTATION.md
+++ /dev/null
@@ -1,345 +0,0 @@
-
-# Protobuf Analyzer Implementation Summary
-
-## Overview
-
-Fully implemented Protobuf schema analyzer for protocol-squisher with ephapax transport class analysis.
-
-**Status**: ✅ Complete and tested (43/43 tests passing)
-
-## Components Implemented
-
-### 1. Parser (`src/parser.rs`)
-
-**Lines of Code**: ~620 lines
-
-**Features**:
-- ✅ Proto2 and proto3 syntax detection
-- ✅ Comment removal (single-line `//` and multi-line `/* */`)
-- ✅ Package declarations
-- ✅ Message parsing with balanced brace extraction
-- ✅ Nested message support (recursive parsing)
-- ✅ Field parsing with all labels (`optional`, `required`, `repeated`)
-- ✅ Map field parsing (`map`)
-- ✅ Oneof group parsing
-- ✅ Enum parsing (top-level and nested)
-- ✅ Enum value parsing with numeric assignments
-
-**Key Algorithms**:
-- Regex-based pattern matching for declarations
-- Balanced brace extraction for nested structures
-- Recursive descent for nested messages
-- Comment-aware parsing with string literal handling
-
-### 2. Converter (`src/converter.rs`)
-
-**Lines of Code**: ~350 lines
-
-**Features**:
-- ✅ Type mapping: Protobuf → IR primitives
-- ✅ Container type conversion (Vec, Map, Option, Tuple)
-- ✅ Struct generation from messages
-- ✅ Enum generation from protobuf enums
-- ✅ Oneof to enum with variant payloads
-- ✅ Nested type flattening with underscore naming
-- ✅ Field optionality handling (proto2 vs proto3)
-- ✅ Map type conversion
-- ✅ Repeated field conversion
-
-**Type Mappings**:
-```
-double → F64
-float → F32
-int32/sint32/sfixed32 → I32
-int64/sint64/sfixed64 → I64
-uint32/fixed32 → U32
-uint64/fixed64 → U64
-bool → Bool
-string → String
-bytes → Bytes
-repeated T → Vec
-map → Map
-message → Struct
-enum → Enum
-oneof → Enum with payloads
-```
-
-### 3. Ephapax Bridge (`src/ephapax_bridge.rs`)
-
-**Lines of Code**: ~350 lines
-
-**Features**:
-- ✅ IR type → ephapax primitive type conversion
-- ✅ Transport class analysis for primitives
-- ✅ Recursive container compatibility analysis
-- ✅ Option, Vec, Map, Tuple support
-- ✅ TransportAnalysis result type
-- ✅ Convenience methods (is_zero_copy, is_safe, requires_json_fallback)
-
-**Transport Classes**:
-- **Concorde**: Exact match, 100% fidelity, 0% overhead
-- **Business**: Safe widening (i32→i64), 98% fidelity, 5% overhead
-- **Economy**: Lossy conversion, 80% fidelity, moderate overhead
-- **Wheelbarrow**: Incompatible, 50% fidelity, 80% overhead (JSON fallback)
-
-### 4. Main Library (`src/lib.rs`)
-
-**Lines of Code**: ~640 lines (including tests)
-
-**Features**:
-- ✅ ProtobufAnalyzer main interface
-- ✅ File and string analysis
-- ✅ Error type with thiserror
-- ✅ ProtoSyntax enum (Proto2/Proto3)
-- ✅ Comprehensive module documentation
-- ✅ 43 unit tests covering all features
-
-## Test Coverage
-
-### Unit Tests (43 tests, all passing)
-
-**Parser Tests** (11 tests):
-- Syntax detection (proto2, proto3)
-- Package parsing
-- Simple message parsing
-- Enum parsing
-- Repeated field parsing
-- Map field parsing
-- Oneof parsing
-- Comment removal
-
-**Converter Tests** (3 tests):
-- PascalCase conversion
-- Type name normalization
-- Proto type to IR type mapping
-
-**Ephapax Bridge Tests** (16 tests):
-- Primitive type conversion
-- Exact match analysis
-- Safe widening analysis
-- Incompatible type analysis
-- Option container analysis (identical/narrowing)
-- Vec container analysis (identical/narrowing)
-- Map analysis with narrowing
-- Tuple analysis with narrowing
-- Protobuf-specific type tests (double→f64, float→f32, int32→i32, bytes→Vec)
-
-**Integration Tests** (13 tests):
-- Simple message
-- Nested message
-- Enum
-- Repeated fields
-- Map fields
-- Oneof
-- Proto2 syntax
-- Optional field proto3
-- Complex nested types
-- All protobuf types
-- Multiple messages
-- Nested enum
-- Complex maps
-- Multiple oneofs
-- With comments
-- Package declaration
-- Transport analysis integration
-
-**Doc Tests** (2 tests):
-- Module-level examples
-- Basic usage examples
-
-## Examples
-
-### 3 Complete Examples:
-
-1. **`analyze_proto.rs`** - Basic schema analysis
- - Parse and introspect protobuf schema
- - Print type hierarchy
- - Show field details
-
-2. **`transport_analysis.rs`** - Field-by-field compatibility
- - Analyze source vs target schemas
- - Field-level transport class checking
- - Visual transport class indicators
-
-3. **`complex_schema.rs`** - Complex nested schema
- - E-commerce order system example
- - Nested messages (3+ levels deep)
- - Oneofs, maps, repeated fields
- - Visual type hierarchy display
-
-## Documentation
-
-### Files Created:
-
-1. **`README.md`** - Overview, features, usage, implementation details
-2. **`USAGE.md`** - Complete usage guide with code examples
-3. **`IMPLEMENTATION.md`** - This file (technical summary)
-4. **Module docs** - Comprehensive rustdoc in `lib.rs`
-
-## Dependencies
-
-```toml
-[dependencies]
-protocol-squisher-ir = { path = "../protocol-squisher-ir" }
-protocol-squisher-transport-primitives = { path = "../../ephapax-ir" }
-thiserror = "1.0"
-regex = "1.10"
-
-[dev-dependencies]
-pretty_assertions = "1.4"
-```
-
-## Code Statistics
-
-- **Total Rust files**: 7
- - `lib.rs`
- - `parser.rs`
- - `converter.rs`
- - `ephapax_bridge.rs`
- - 3 examples
-- **Lines of code**: ~1,960 (including tests)
-- **Test coverage**: 43 unit tests + 2 doc tests
-- **Examples**: 3 complete working examples
-
-## Protobuf Features Support
-
-| Feature | Support | Notes |
-|---------|---------|-------|
-| proto2 syntax | ✅ Full | Required/optional fields |
-| proto3 syntax | ✅ Full | Implicit optional, explicit optional |
-| Scalar types | ✅ All | double, float, int32/64, uint32/64, sint32/64, fixed32/64, sfixed32/64, bool, string, bytes |
-| Messages | ✅ Full | Flat and nested |
-| Enums | ✅ Full | Top-level and nested |
-| Repeated fields | ✅ Full | Converted to Vec |
-| Map fields | ✅ Full | All key/value types |
-| Oneof | ✅ Full | Converted to enum with payloads |
-| Nested types | ✅ Full | Flattened with underscore naming |
-| Comments | ✅ Full | Single-line and multi-line |
-| Packages | ✅ Parsed | Not used for namespacing |
-| Services | ❌ No | Future work |
-| RPCs | ❌ No | Future work |
-| Options | ❌ No | Ignored |
-| Extensions | ❌ No | Not parsed |
-| Groups | ❌ No | Deprecated feature |
-| Imports | ❌ No | Each file analyzed independently |
-
-## Architecture
-
-```
-ProtobufAnalyzer
- ↓
-ProtoParser (regex-based)
- ↓
-ParsedProto (AST)
- ↓
-ProtoConverter
- ↓
-IrSchema (canonical IR)
- ↓
-EphapaxBridge
- ↓
-TransportClass analysis
-```
-
-## Performance
-
-- **Small schemas** (< 10 types): < 1ms
-- **Medium schemas** (10-100 types): < 10ms
-- **Large schemas** (100-1000 types): < 100ms
-
-Regex-based parsing with minimal allocations and careful handling of nested structures.
-
-## Integration Points
-
-### With protocol-squisher-ir:
-
-- Uses `IrSchema`, `TypeDef`, `FieldDef`
-- Generates `StructDef`, `EnumDef`, `VariantDef`
-- Maps to `IrType`, `PrimitiveType`, `ContainerType`
-
-### With ephapax-ir:
-
-- Uses `IRContext` for proven transport analysis
-- Maps to `PrimitiveType` (ephapax)
-- Returns `TransportClass` with fidelity/overhead metrics
-
-### Example Integration:
-
-```rust
-// Parse protobuf
-let analyzer = ProtobufAnalyzer::new();
-let schema = analyzer.analyze_file("api.proto")?;
-
-// Analyze transport compatibility
-let ctx = IRContext::new();
-let analysis = TransportAnalysis::new(&ctx, source_type, target_type)?;
-
-// Check if zero-copy is possible
-if analysis.is_zero_copy() {
- // Use memcpy or pointer cast
-} else if analysis.is_safe() {
- // Safe conversion (widening)
-} else {
- // Fallback to JSON serialization
-}
-```
-
-## Future Enhancements
-
-### Priority 1 (High Impact):
-- Service and RPC extraction
-- Import resolution and dependency analysis
-- Better error messages with line numbers
-
-### Priority 2 (Quality of Life):
-- Custom option preservation
-- Proto validation (enforce proto3 rules)
-- Performance optimization for very large schemas
-
-### Priority 3 (Nice to Have):
-- Extension field support
-- Well-known types (google.protobuf.*)
-- Code generation hints
-
-## Lessons Learned
-
-1. **Regex vs. Full Parser**: Regex-based parsing is sufficient for protobuf's simple syntax and much faster to implement.
-
-2. **Proto2 vs Proto3**: Key difference is implicit optional in proto3. Required careful handling in field label logic.
-
-3. **Nested Type Naming**: Flattening with underscores (`Outer_Inner`) works well and avoids namespace complexity.
-
-4. **Oneof Handling**: Converting to enums with variant payloads maps cleanly to Rust enum semantics.
-
-5. **Transport Analysis**: Ephapax integration provides proven-correct analysis with minimal code.
-
-## Testing Strategy
-
-- **Unit tests**: Each component tested in isolation
-- **Integration tests**: End-to-end analysis of realistic schemas
-- **Ephapax tests**: All container combinations tested
-- **Doc tests**: Examples in documentation verified
-- **Examples**: Real-world usage patterns demonstrated
-
-## Compliance
-
-- **License**: MPL-2.0
-- **Author**: Jonathan D.A. Jewell
-- **SPDX headers**: Present in all files
-- **Cargo.toml**: Complete metadata
-
-## Conclusion
-
-The Protobuf analyzer is **complete and production-ready**:
-
-✅ All features implemented
-✅ Comprehensive test coverage (43/43 passing)
-✅ Ephapax integration working
-✅ Complete documentation
-✅ Working examples
-✅ Clean, maintainable code
-
-Ready for integration with protocol-squisher and use in transport class analysis workflows.
diff --git a/provenance/crates/protocol-squisher-protobuf-analyzer/README.adoc b/provenance/crates/protocol-squisher-protobuf-analyzer/README.adoc
new file mode 100644
index 0000000..0668f39
--- /dev/null
+++ b/provenance/crates/protocol-squisher-protobuf-analyzer/README.adoc
@@ -0,0 +1,227 @@
+== Protocol Squisher Protobuf Analyzer
+
+Analyzes Protocol Buffer (.proto) schema files and converts them to the
+protocol-squisher canonical IR format with ephapax transport class
+analysis.
+
+=== Features
+
+==== Supported Protobuf Features
+
+* *Both proto2 and proto3 syntax*
+* *Messages*: Flat and nested messages
+* *Fields*: All standard field types (scalar, message references, enums)
+* *Field Labels*: `+optional+`, `+required+` (proto2), `+repeated+`
+* *Enums*: Top-level and nested enums
+* *Oneofs*: Union types with multiple alternatives
+* *Maps*: Key-value map fields (`+map+`)
+* *Comments*: Single-line (`+//+`) and multi-line (`+/* */+`)
+* *Packages*: Package declarations
+
+==== Protobuf Type Mappings
+
+[cols=",,",options="header",]
+|===
+|Protobuf Type |IR Type |Ephapax Primitive
+|`+double+` |`+F64+` |`+F64+`
+|`+float+` |`+F32+` |`+F32+`
+|`+int32+`, `+sint32+`, `+sfixed32+` |`+I32+` |`+I32+`
+|`+int64+`, `+sint64+`, `+sfixed64+` |`+I64+` |`+I64+`
+|`+uint32+`, `+fixed32+` |`+U32+` |`+U32+`
+|`+uint64+`, `+fixed64+` |`+U64+` |`+U64+`
+|`+bool+` |`+Bool+` |`+Bool+`
+|`+string+` |`+String+` |`+String+`
+|`+bytes+` |`+Bytes+` |N/A (Vec)
+|`+repeated T+` |`+Vec+` |Container
+|`+map+` |`+Map+` |Container
+|`+oneof+` |Enum with variants |Complex
+|===
+
+=== Usage
+
+==== Basic Example
+
+[source,rust]
+----
+use protocol_squisher_protobuf_analyzer::ProtobufAnalyzer;
+use std::path::Path;
+
+let analyzer = ProtobufAnalyzer::new();
+
+// Analyze from file
+let schema = analyzer.analyze_file(Path::new("schema.proto"))?;
+
+// Analyze from string
+let proto = r#"
+ syntax = "proto3";
+
+ message User {
+ string name = 1;
+ int32 age = 2;
+ repeated string tags = 3;
+ }
+"#;
+
+let schema = analyzer.analyze_str(proto, "user")?;
+----
+
+==== Transport Class Analysis
+
+Use the ephapax bridge to analyze transport compatibility between
+protobuf types:
+
+[source,rust]
+----
+use protocol_squisher_protobuf_analyzer::{ProtobufAnalyzer, TransportAnalysis};
+use protocol_squisher_transport_primitives::IRContext;
+
+let analyzer = ProtobufAnalyzer::new();
+let schema = analyzer.analyze_str(proto_content, "schema")?;
+
+// Get types from the schema
+let source_type = &schema.types.get("SourceMessage").unwrap();
+let target_type = &schema.types.get("TargetMessage").unwrap();
+
+// Analyze transport compatibility
+let ctx = IRContext::new();
+let analysis = TransportAnalysis::new(&ctx, source_type, target_type)?;
+
+println!("Transport class: {:?}", analysis.class);
+println!("Fidelity: {}%", analysis.fidelity);
+println!("Overhead: {}%", analysis.overhead);
+
+if analysis.is_zero_copy() {
+ println!("Zero-copy transport available!");
+} else if analysis.requires_json_fallback() {
+ println!("JSON fallback required");
+}
+----
+
+=== Advanced Features
+
+==== Nested Messages
+
+Nested messages are flattened with underscore naming:
+
+[source,protobuf]
+----
+message Outer {
+ message Inner {
+ string value = 1;
+ }
+ Inner inner = 1;
+}
+----
+
+Becomes: - `+Outer+` struct - `+Outer_Inner+` struct
+
+==== Oneof Fields
+
+Oneof groups are converted to enum types:
+
+[source,protobuf]
+----
+message Payment {
+ oneof method {
+ string card_number = 1;
+ string bank_account = 2;
+ }
+}
+----
+
+Becomes: - `+Payment+` struct with optional `+Payment_Method+` field -
+`+Payment_Method+` enum with `+CardNumber(String)+` and
+`+BankAccount(String)+` variants
+
+==== Map Fields
+
+Maps are represented as `+Map+` container types:
+
+[source,protobuf]
+----
+message Config {
+ map settings = 1;
+}
+----
+
+Becomes: - `+Config+` struct with `+settings: Map+`
+field
+
+=== Implementation Details
+
+==== Parser Architecture
+
+The parser uses a regex-based approach with careful handling of: -
+*Balanced braces*: Correctly extracts nested message/enum bodies -
+*Comment removal*: Strips single-line and multi-line comments - *Syntax
+detection*: Determines proto2 vs proto3 - *Nested structures*:
+Recursively parses nested messages and enums
+
+==== Converter Logic
+
+[arabic]
+. *Type mapping*: Converts protobuf primitives to IR primitives
+. *Container handling*: Wraps repeated fields in `+Vec+`, maps in
+`+Map+`
+. *Optional fields*: Wraps in `+Option+` based on syntax and label
+. *Naming*: Flattens nested types with underscore prefixes
+. *Enums*: Converts both regular enums and oneofs
+
+==== Ephapax Integration
+
+The ephapax bridge provides: - *Primitive mapping*: IR types → ephapax
+primitive types - *Container analysis*: Recursive compatibility analysis
+for Vec, Map, Option, Tuple - *Transport classification*: Concorde
+(zero-copy), Business (safe widening), Economy (lossy), Wheelbarrow
+(incompatible)
+
+=== Testing
+
+Run the test suite:
+
+[source,bash]
+----
+cargo test -p protocol-squisher-protobuf-analyzer
+----
+
+The test suite includes: - 20+ unit tests covering all protobuf features
+- Parser tests (syntax detection, comment removal, field parsing) -
+Converter tests (type mapping, naming conventions) - Integration tests
+(end-to-end analysis) - Ephapax bridge tests (transport class analysis)
+
+=== Limitations
+
+==== Not Yet Supported
+
+* *Services and RPCs*: Only message/enum types are analyzed
+* *Options*: Custom options are ignored
+* *Extensions*: Extension fields are not parsed
+* *Groups*: Deprecated group syntax not supported
+* *Reserved fields*: Reserved declarations are skipped
+* *Imports*: Import statements are not resolved
+
+==== Future Work
+
+* *Service definitions*: Analyze RPC methods and extract
+request/response types
+* *Import resolution*: Follow import paths and analyze dependencies
+* *Custom options*: Extract and preserve custom field/message options
+* *Better error reporting*: More detailed parse error messages with line
+numbers
+* *Proto validation*: Enforce protobuf rules (e.g., enum must have 0
+value in proto3)
+
+=== License
+
+MPL-2.0
+
+=== See Also
+
+* link:../protocol-squisher-ir[protocol-squisher-ir] - Canonical IR
+format
+* link:../../ephapax-ir[protocol-squisher-transport-primitives] - Proven
+transport class analysis
+* link:../protocol-squisher-rust-analyzer[protocol-squisher-rust-analyzer]
+- Rust/serde analyzer
+* link:../protocol-squisher-python-analyzer[protocol-squisher-python-analyzer]
+- Python/Pydantic analyzer
diff --git a/provenance/crates/protocol-squisher-protobuf-analyzer/README.md b/provenance/crates/protocol-squisher-protobuf-analyzer/README.md
deleted file mode 100644
index 306a676..0000000
--- a/provenance/crates/protocol-squisher-protobuf-analyzer/README.md
+++ /dev/null
@@ -1,214 +0,0 @@
-
-# Protocol Squisher Protobuf Analyzer
-
-Analyzes Protocol Buffer (.proto) schema files and converts them to the protocol-squisher canonical IR format with ephapax transport class analysis.
-
-## Features
-
-### Supported Protobuf Features
-
-- **Both proto2 and proto3 syntax**
-- **Messages**: Flat and nested messages
-- **Fields**: All standard field types (scalar, message references, enums)
-- **Field Labels**: `optional`, `required` (proto2), `repeated`
-- **Enums**: Top-level and nested enums
-- **Oneofs**: Union types with multiple alternatives
-- **Maps**: Key-value map fields (`map`)
-- **Comments**: Single-line (`//`) and multi-line (`/* */`)
-- **Packages**: Package declarations
-
-### Protobuf Type Mappings
-
-| Protobuf Type | IR Type | Ephapax Primitive |
-|--------------|---------|-------------------|
-| `double` | `F64` | `F64` |
-| `float` | `F32` | `F32` |
-| `int32`, `sint32`, `sfixed32` | `I32` | `I32` |
-| `int64`, `sint64`, `sfixed64` | `I64` | `I64` |
-| `uint32`, `fixed32` | `U32` | `U32` |
-| `uint64`, `fixed64` | `U64` | `U64` |
-| `bool` | `Bool` | `Bool` |
-| `string` | `String` | `String` |
-| `bytes` | `Bytes` | N/A (Vec) |
-| `repeated T` | `Vec` | Container |
-| `map` | `Map` | Container |
-| `oneof` | Enum with variants | Complex |
-
-## Usage
-
-### Basic Example
-
-```rust
-use protocol_squisher_protobuf_analyzer::ProtobufAnalyzer;
-use std::path::Path;
-
-let analyzer = ProtobufAnalyzer::new();
-
-// Analyze from file
-let schema = analyzer.analyze_file(Path::new("schema.proto"))?;
-
-// Analyze from string
-let proto = r#"
- syntax = "proto3";
-
- message User {
- string name = 1;
- int32 age = 2;
- repeated string tags = 3;
- }
-"#;
-
-let schema = analyzer.analyze_str(proto, "user")?;
-```
-
-### Transport Class Analysis
-
-Use the ephapax bridge to analyze transport compatibility between protobuf types:
-
-```rust
-use protocol_squisher_protobuf_analyzer::{ProtobufAnalyzer, TransportAnalysis};
-use protocol_squisher_transport_primitives::IRContext;
-
-let analyzer = ProtobufAnalyzer::new();
-let schema = analyzer.analyze_str(proto_content, "schema")?;
-
-// Get types from the schema
-let source_type = &schema.types.get("SourceMessage").unwrap();
-let target_type = &schema.types.get("TargetMessage").unwrap();
-
-// Analyze transport compatibility
-let ctx = IRContext::new();
-let analysis = TransportAnalysis::new(&ctx, source_type, target_type)?;
-
-println!("Transport class: {:?}", analysis.class);
-println!("Fidelity: {}%", analysis.fidelity);
-println!("Overhead: {}%", analysis.overhead);
-
-if analysis.is_zero_copy() {
- println!("Zero-copy transport available!");
-} else if analysis.requires_json_fallback() {
- println!("JSON fallback required");
-}
-```
-
-## Advanced Features
-
-### Nested Messages
-
-Nested messages are flattened with underscore naming:
-
-```protobuf
-message Outer {
- message Inner {
- string value = 1;
- }
- Inner inner = 1;
-}
-```
-
-Becomes:
-- `Outer` struct
-- `Outer_Inner` struct
-
-### Oneof Fields
-
-Oneof groups are converted to enum types:
-
-```protobuf
-message Payment {
- oneof method {
- string card_number = 1;
- string bank_account = 2;
- }
-}
-```
-
-Becomes:
-- `Payment` struct with optional `Payment_Method` field
-- `Payment_Method` enum with `CardNumber(String)` and `BankAccount(String)` variants
-
-### Map Fields
-
-Maps are represented as `Map` container types:
-
-```protobuf
-message Config {
- map settings = 1;
-}
-```
-
-Becomes:
-- `Config` struct with `settings: Map` field
-
-## Implementation Details
-
-### Parser Architecture
-
-The parser uses a regex-based approach with careful handling of:
-- **Balanced braces**: Correctly extracts nested message/enum bodies
-- **Comment removal**: Strips single-line and multi-line comments
-- **Syntax detection**: Determines proto2 vs proto3
-- **Nested structures**: Recursively parses nested messages and enums
-
-### Converter Logic
-
-1. **Type mapping**: Converts protobuf primitives to IR primitives
-2. **Container handling**: Wraps repeated fields in `Vec`, maps in `Map`
-3. **Optional fields**: Wraps in `Option` based on syntax and label
-4. **Naming**: Flattens nested types with underscore prefixes
-5. **Enums**: Converts both regular enums and oneofs
-
-### Ephapax Integration
-
-The ephapax bridge provides:
-- **Primitive mapping**: IR types → ephapax primitive types
-- **Container analysis**: Recursive compatibility analysis for Vec, Map, Option, Tuple
-- **Transport classification**: Concorde (zero-copy), Business (safe widening), Economy (lossy), Wheelbarrow (incompatible)
-
-## Testing
-
-Run the test suite:
-
-```bash
-cargo test -p protocol-squisher-protobuf-analyzer
-```
-
-The test suite includes:
-- 20+ unit tests covering all protobuf features
-- Parser tests (syntax detection, comment removal, field parsing)
-- Converter tests (type mapping, naming conventions)
-- Integration tests (end-to-end analysis)
-- Ephapax bridge tests (transport class analysis)
-
-## Limitations
-
-### Not Yet Supported
-
-- **Services and RPCs**: Only message/enum types are analyzed
-- **Options**: Custom options are ignored
-- **Extensions**: Extension fields are not parsed
-- **Groups**: Deprecated group syntax not supported
-- **Reserved fields**: Reserved declarations are skipped
-- **Imports**: Import statements are not resolved
-
-### Future Work
-
-- **Service definitions**: Analyze RPC methods and extract request/response types
-- **Import resolution**: Follow import paths and analyze dependencies
-- **Custom options**: Extract and preserve custom field/message options
-- **Better error reporting**: More detailed parse error messages with line numbers
-- **Proto validation**: Enforce protobuf rules (e.g., enum must have 0 value in proto3)
-
-## License
-
-MPL-2.0
-
-## See Also
-
-- [protocol-squisher-ir](../protocol-squisher-ir) - Canonical IR format
-- [protocol-squisher-transport-primitives](../../ephapax-ir) - Proven transport class analysis
-- [protocol-squisher-rust-analyzer](../protocol-squisher-rust-analyzer) - Rust/serde analyzer
-- [protocol-squisher-python-analyzer](../protocol-squisher-python-analyzer) - Python/Pydantic analyzer
diff --git a/provenance/crates/protocol-squisher-protobuf-analyzer/USAGE.md b/provenance/crates/protocol-squisher-protobuf-analyzer/USAGE.adoc
similarity index 57%
rename from provenance/crates/protocol-squisher-protobuf-analyzer/USAGE.md
rename to provenance/crates/protocol-squisher-protobuf-analyzer/USAGE.adoc
index dffde4e..c5ca550 100644
--- a/provenance/crates/protocol-squisher-protobuf-analyzer/USAGE.md
+++ b/provenance/crates/protocol-squisher-protobuf-analyzer/USAGE.adoc
@@ -1,27 +1,25 @@
-
-# Protobuf Analyzer Usage Guide
+== Protobuf Analyzer Usage Guide
Complete guide to using the protocol-squisher Protobuf analyzer.
-## Installation
+=== Installation
-Add to your `Cargo.toml`:
+Add to your `+Cargo.toml+`:
-```toml
+[source,toml]
+----
[dependencies]
protocol-squisher-protobuf-analyzer = { path = "../protocol-squisher-protobuf-analyzer" }
protocol-squisher-ir = { path = "../protocol-squisher-ir" }
protocol-squisher-transport-primitives = { path = "../../ephapax-ir" }
-```
+----
-## Basic Usage
+=== Basic Usage
-### Analyze a .proto file
+==== Analyze a .proto file
-```rust
+[source,rust]
+----
use protocol_squisher_protobuf_analyzer::ProtobufAnalyzer;
use std::path::Path;
@@ -32,11 +30,12 @@ let schema = analyzer.analyze_file(Path::new("schema.proto"))?;
for (name, type_def) in &schema.types {
println!("Found type: {}", name);
}
-```
+----
-### Analyze from a string
+==== Analyze from a string
-```rust
+[source,rust]
+----
let proto = r#"
syntax = "proto3";
@@ -48,13 +47,14 @@ let proto = r#"
let analyzer = ProtobufAnalyzer::new();
let schema = analyzer.analyze_str(proto, "user")?;
-```
+----
-## Working with Types
+=== Working with Types
-### Structs (Messages)
+==== Structs (Messages)
-```rust
+[source,rust]
+----
use protocol_squisher_ir::TypeDef;
if let Some(TypeDef::Struct(user_struct)) = schema.types.get("User") {
@@ -68,11 +68,12 @@ if let Some(TypeDef::Struct(user_struct)) = schema.types.get("User") {
}
}
}
-```
+----
-### Enums
+==== Enums
-```rust
+[source,rust]
+----
if let Some(TypeDef::Enum(status_enum)) = schema.types.get("Status") {
println!("Enum: {}", status_enum.name);
@@ -84,13 +85,14 @@ if let Some(TypeDef::Enum(status_enum)) = schema.types.get("Status") {
}
}
}
-```
+----
-## Transport Class Analysis
+=== Transport Class Analysis
-### Check compatibility between types
+==== Check compatibility between types
-```rust
+[source,rust]
+----
use protocol_squisher_protobuf_analyzer::TransportAnalysis;
use protocol_squisher_transport_primitives::IRContext;
@@ -123,11 +125,12 @@ match analysis.class {
assert_eq!(analysis.overhead, 80);
}
}
-```
+----
-### Convenience methods
+==== Convenience methods
-```rust
+[source,rust]
+----
if analysis.is_zero_copy() {
// Can use memcpy
}
@@ -139,51 +142,53 @@ if analysis.is_safe() {
if analysis.requires_json_fallback() {
// Must serialize through JSON
}
-```
+----
-## Advanced Features
+=== Advanced Features
-### Handling Nested Types
+==== Handling Nested Types
Nested messages are automatically flattened with underscore naming:
-```protobuf
+[source,protobuf]
+----
message Outer {
message Inner {
string value = 1;
}
}
-```
+----
-Becomes:
-- `Outer` struct
-- `Outer_Inner` struct
+Becomes: - `+Outer+` struct - `+Outer_Inner+` struct
Access nested types:
-```rust
+[source,rust]
+----
let outer = schema.types.get("Outer").unwrap();
let inner = schema.types.get("Outer_Inner").unwrap();
-```
+----
-### Working with Oneofs
+==== Working with Oneofs
Oneofs are converted to enum types with variant payloads:
-```protobuf
+[source,protobuf]
+----
message Payment {
oneof method {
string card_number = 1;
string bank_account = 2;
}
}
-```
+----
-Becomes:
-- `Payment` struct with `method: Option` field
-- `Payment_Method` enum with `CardNumber(String)` and `BankAccount(String)` variants
+Becomes: - `+Payment+` struct with `+method: Option+`
+field - `+Payment_Method+` enum with `+CardNumber(String)+` and
+`+BankAccount(String)+` variants
-```rust
+[source,rust]
+----
if let Some(TypeDef::Enum(method_enum)) = schema.types.get("Payment_Method") {
for variant in &method_enum.variants {
if let Some(VariantPayload::Tuple(fields)) = &variant.payload {
@@ -191,19 +196,21 @@ if let Some(TypeDef::Enum(method_enum)) = schema.types.get("Payment_Method") {
}
}
}
-```
+----
-### Maps
+==== Maps
-Maps are represented as `Map` containers:
+Maps are represented as `+Map+` containers:
-```protobuf
+[source,protobuf]
+----
message Config {
map counters = 1;
}
-```
+----
-```rust
+[source,rust]
+----
use protocol_squisher_ir::{IrType, ContainerType};
if let Some(TypeDef::Struct(config)) = schema.types.get("Config") {
@@ -213,65 +220,74 @@ if let Some(TypeDef::Struct(config)) = schema.types.get("Config") {
println!("Map from {:?} to {:?}", key_type, value_type);
}
}
-```
+----
-### Repeated Fields
+==== Repeated Fields
-Repeated fields become `Vec`:
+Repeated fields become `+Vec+`:
-```protobuf
+[source,protobuf]
+----
message User {
repeated string tags = 1;
}
-```
+----
-```rust
+[source,rust]
+----
if let IrType::Container(ContainerType::Vec(element_type)) = &field.ty {
println!("Array of {:?}", element_type);
}
-```
-
-## Type Mappings Reference
-
-### Scalar Types
-
-| Protobuf | IR Type | Rust Equivalent |
-|----------|---------|-----------------|
-| `double` | `F64` | `f64` |
-| `float` | `F32` | `f32` |
-| `int32` | `I32` | `i32` |
-| `int64` | `I64` | `i64` |
-| `uint32` | `U32` | `u32` |
-| `uint64` | `U64` | `u64` |
-| `sint32` | `I32` | `i32` |
-| `sint64` | `I64` | `i64` |
-| `fixed32` | `U32` | `u32` |
-| `fixed64` | `U64` | `u64` |
-| `sfixed32` | `I32` | `i32` |
-| `sfixed64` | `I64` | `i64` |
-| `bool` | `Bool` | `bool` |
-| `string` | `String` | `String` |
-| `bytes` | `Bytes` | `Vec` |
-
-### Container Types
-
-| Protobuf | IR Type |
-|----------|---------|
-| `repeated T` | `Vec` |
-| `map` | `Map` |
-| `optional T` (proto3) | `Option` |
-
-### Complex Types
-
-| Protobuf | IR Type |
-|----------|---------|
-| `message` | `Struct` |
-| `enum` | `Enum` |
-| `oneof` | `Enum` with variant payloads |
-
-## Error Handling
-
-```rust
+----
+
+=== Type Mappings Reference
+
+==== Scalar Types
+
+[cols=",,",options="header",]
+|===
+|Protobuf |IR Type |Rust Equivalent
+|`+double+` |`+F64+` |`+f64+`
+|`+float+` |`+F32+` |`+f32+`
+|`+int32+` |`+I32+` |`+i32+`
+|`+int64+` |`+I64+` |`+i64+`
+|`+uint32+` |`+U32+` |`+u32+`
+|`+uint64+` |`+U64+` |`+u64+`
+|`+sint32+` |`+I32+` |`+i32+`
+|`+sint64+` |`+I64+` |`+i64+`
+|`+fixed32+` |`+U32+` |`+u32+`
+|`+fixed64+` |`+U64+` |`+u64+`
+|`+sfixed32+` |`+I32+` |`+i32+`
+|`+sfixed64+` |`+I64+` |`+i64+`
+|`+bool+` |`+Bool+` |`+bool+`
+|`+string+` |`+String+` |`+String+`
+|`+bytes+` |`+Bytes+` |`+Vec+`
+|===
+
+==== Container Types
+
+[cols=",",options="header",]
+|===
+|Protobuf |IR Type
+|`+repeated T+` |`+Vec+`
+|`+map+` |`+Map+`
+|`+optional T+` (proto3) |`+Option+`
+|===
+
+==== Complex Types
+
+[cols=",",options="header",]
+|===
+|Protobuf |IR Type
+|`+message+` |`+Struct+`
+|`+enum+` |`+Enum+`
+|`+oneof+` |`+Enum+` with variant payloads
+|===
+
+=== Error Handling
+
+[source,rust]
+----
use protocol_squisher_protobuf_analyzer::AnalyzerError;
match analyzer.analyze_file(path) {
@@ -289,77 +305,74 @@ match analyzer.analyze_file(path) {
eprintln!("IO error: {}", err);
}
}
-```
+----
-## Examples
+=== Examples
-See the `examples/` directory for complete working examples:
+See the `+examples/+` directory for complete working examples:
-- `analyze_proto.rs` - Basic schema analysis and introspection
-- `transport_analysis.rs` - Field-by-field transport compatibility
-- `complex_schema.rs` - Complex nested schema with oneofs and maps
+* `+analyze_proto.rs+` - Basic schema analysis and introspection
+* `+transport_analysis.rs+` - Field-by-field transport compatibility
+* `+complex_schema.rs+` - Complex nested schema with oneofs and maps
Run examples with:
-```bash
+[source,bash]
+----
cargo run --example analyze_proto
cargo run --example transport_analysis
cargo run --example complex_schema
-```
+----
-## Testing
+=== Testing
Run the comprehensive test suite:
-```bash
+[source,bash]
+----
cargo test -p protocol-squisher-protobuf-analyzer
-```
+----
-Test coverage includes:
-- Proto2 and proto3 syntax
-- All scalar types
-- Messages (flat and nested)
-- Enums (top-level and nested)
-- Repeated fields
-- Map fields
-- Oneof groups
-- Comments (single-line and multi-line)
-- Package declarations
-- Transport class analysis
+Test coverage includes: - Proto2 and proto3 syntax - All scalar types -
+Messages (flat and nested) - Enums (top-level and nested) - Repeated
+fields - Map fields - Oneof groups - Comments (single-line and
+multi-line) - Package declarations - Transport class analysis
-## Limitations
+=== Limitations
-### Currently Not Supported
+==== Currently Not Supported
-- **Services/RPCs**: Only message and enum types
-- **Custom options**: Ignored during parsing
-- **Extensions**: Not parsed
-- **Groups**: Deprecated syntax not supported
-- **Imports**: Not resolved (each file analyzed independently)
-- **Reserved fields**: Skipped during parsing
+* *Services/RPCs*: Only message and enum types
+* *Custom options*: Ignored during parsing
+* *Extensions*: Not parsed
+* *Groups*: Deprecated syntax not supported
+* *Imports*: Not resolved (each file analyzed independently)
+* *Reserved fields*: Skipped during parsing
-### Future Enhancements
+==== Future Enhancements
See README.md for planned features and roadmap.
-## Performance
+=== Performance
-The analyzer uses regex-based parsing optimized for:
-- **Speed**: Fast parsing of typical .proto files (< 1ms for small schemas)
-- **Memory**: Minimal allocations with string interning
-- **Correctness**: Careful handling of nested braces and comments
+The analyzer uses regex-based parsing optimized for: - *Speed*: Fast
+parsing of typical .proto files (< 1ms for small schemas) - *Memory*:
+Minimal allocations with string interning - *Correctness*: Careful
+handling of nested braces and comments
-For very large schemas (> 1000 types), consider analyzing incrementally by package.
+For very large schemas (> 1000 types), consider analyzing incrementally
+by package.
-## Contributing
+=== Contributing
Contributions welcome! Key areas:
-1. **Service definitions**: Extract RPC methods and types
-2. **Import resolution**: Follow and analyze dependencies
-3. **Better errors**: Line numbers and detailed messages
-4. **Validation**: Enforce protobuf rules (e.g., enum 0 value)
+[arabic]
+. *Service definitions*: Extract RPC methods and types
+. *Import resolution*: Follow and analyze dependencies
+. *Better errors*: Line numbers and detailed messages
+. *Validation*: Enforce protobuf rules (e.g., enum 0 value)
-## License
+=== License
MPL-2.0
diff --git a/provenance/crates/protocol-squisher-rescript-analyzer/IMPLEMENTATION.adoc b/provenance/crates/protocol-squisher-rescript-analyzer/IMPLEMENTATION.adoc
new file mode 100644
index 0000000..e6f706f
--- /dev/null
+++ b/provenance/crates/protocol-squisher-rescript-analyzer/IMPLEMENTATION.adoc
@@ -0,0 +1,397 @@
+== ReScript Analyzer Implementation Summary
+
+*Date*: 2026-02-04 *Status*: ✅ Complete and Tested *Test Coverage*: 61
+tests (47 unit + 13 interop + 1 doc test) *Build Status*: All tests
+passing
+
+=== Overview
+
+Complete implementation of the ReScript analyzer for protocol-squisher.
+This analyzer is *critical* for the hyperpolymath ecosystem as ReScript
+is the primary application language.
+
+=== Implementation Details
+
+==== Module Structure
+
+Following the standard 4-module architecture:
+
+....
+src/
+├── lib.rs # Public API, main analyzer (276 lines)
+├── parser.rs # Regex-based ReScript parser (427 lines)
+├── converter.rs # ReScript → IR conversion (464 lines)
+└── ephapax_bridge.rs # Transport analysis (394 lines)
+....
+
+==== Files Created
+
+[arabic]
+. *src/lib.rs* - Main analyzer with comprehensive tests
+. *src/parser.rs* - Full ReScript parser with comment handling
+. *src/converter.rs* - Type conversion with all ReScript features
+. *src/ephapax_bridge.rs* - Transport class analysis
+. *tests/interop_test.res* - Sample ReScript types for testing
+. *tests/interop_tests.rs* - 13 comprehensive interop tests
+. *README.md* - Complete documentation
+. *Cargo.toml* - Updated with `+regex+` and `+thiserror+` dependencies
+
+==== Supported Features
+
+===== ReScript Types
+
+✅ *Primitive Types* - `+int+` → `+I64+` - `+float+` → `+F64+` -
+`+string+` → `+String+` - `+bool+` → `+Bool+` - `+char+` → `+Char+` -
+`+unit+` → `+Unit+`
+
+✅ *Record Types*
+
+[source,rescript]
+----
+type user = {
+ id: int,
+ name: string,
+ email: option,
+}
+----
+
+✅ *Variant Types (Enums/ADTs)*
+
+[source,rescript]
+----
+type status = Active | Inactive | Suspended
+type result<'a, 'e> = Ok('a) | Error('e)
+----
+
+✅ *Container Types* - `+option+` → `+Option+` - `+array+` →
+`+Vec+` - `+(T1, T2, ...)+` → `+Tuple+` -
+`+Js.Dict.t+` → `+Map+`
+
+✅ *Type Aliases*
+
+[source,rescript]
+----
+type userId = int
+type timestamp = float
+----
+
+✅ *JS Interop*
+
+[source,rescript]
+----
+type apiUser = {
+ @as("user_id") id: int,
+ @as("user_name") name: string,
+}
+----
+
+✅ *Polymorphic Types*
+
+[source,rescript]
+----
+type response<'data> = {
+ status: int,
+ data: 'data,
+}
+----
+
+✅ *Nested Records*
+
+[source,rescript]
+----
+type person = {
+ name: string,
+ address: address,
+}
+----
+
+==== Transport Analysis
+
+Ephapax-powered transport class analysis:
+
+[cols=",,",options="header",]
+|===
+|Class |Description |Example
+|*Concorde* |Zero-copy, identical types |`+int+` → `+i64+`
+|*Business* |Safe widening |`+i32+` → `+i64+`
+|*Economy* |Discriminated unions |Variants → Enums
+|*Wheelbarrow* |JSON fallback |`+int+` → `+string+`
+|===
+
+==== Test Coverage
+
+*Unit Tests (47 tests)* - Parser tests: 8 tests - Converter tests: 12
+tests - Ephapax bridge tests: 16 tests - Integration tests: 11 tests
+
+*Interop Tests (13 tests)* - File parsing test - ReScript ↔ Rust interop
+(3 tests) - ReScript ↔ Julia interop (2 tests) - ReScript ↔ Gleam
+interop (1 test) - Option semantics - Variant conversion (2 tests) - JS
+interop attributes - Tuple interop - Js.Dict interop - Polymorphic types
+- Complex nested structures - Transport class summary
+
+*Doc Tests (1 test)* - Example code in lib.rs documentation
+
+==== Key Implementation Decisions
+
+===== 1. Regex-Based Parsing
+
+Uses regex instead of tree-sitter for: - Simplicity and maintainability
+- No external parser dependencies - Sufficient for ReScript’s clean
+syntax - Easy to extend for new patterns
+
+===== 2. Type Parameter Handling
+
+Type parameters (`+'a+`, `+'b+`) are represented as
+`+IrType::Reference+`: - Preserves generic nature through IR - Allows
+code generators to handle polymorphism - Compatible with other language
+analyzers
+
+===== 3. Variant Payload Representation
+
+ReScript variants map to `+VariantPayload::Tuple+`: - ReScript uses
+tuple-style payloads: `+Ok('a)+` - Not struct-style:
+`+Ok { value: 'a }+` - Single-element tuple for single payloads -
+Matches ReScript semantics
+
+===== 4. JS Interop Attributes
+
+`+@as+` attributes captured as field aliases: - Stored in
+`+FieldMetadata.aliases+` - Code generators can produce JS-compatible
+names - Preserves both ReScript name and JS name
+
+===== 5. Comment Handling
+
+Full comment removal in parser: - Single-line comments (`+//+`) -
+Multi-line comments (`+/* */+`) - String-aware (doesn’t remove `+//+` in
+strings) - Prevents false positives in type detection
+
+==== Interop Capabilities
+
+===== ReScript ↔ Rust
+
+*Zero-Copy Types (Concorde)*: - `+int+` → `+i64+` - `+string+` →
+`+String+` - `+bool+` → `+bool+` - `+array+` → `+Vec+` -
+`+option+` → `+Option+`
+
+*Example*:
+
+[source,rescript]
+----
+// ReScript
+type user = {
+ id: int,
+ name: string,
+ active: bool,
+}
+----
+
+[source,rust]
+----
+// Rust (auto-generated)
+struct User {
+ id: i64,
+ name: String,
+ active: bool,
+}
+// Transport: Concorde (zero-copy)
+----
+
+===== ReScript ↔ Julia
+
+*Zero-Copy Types*: - `+int+` → `+Int64+` - `+float+` → `+Float64+` -
+`+string+` → `+String+` - `+array+` → `+Vector{T}+`
+
+===== ReScript ↔ Gleam
+
+*Zero-Copy Types*: - `+option+` → `+Option(T)+` - Variants → Custom
+types - Records → Records
+
+*Example*:
+
+[source,rescript]
+----
+// ReScript
+type result<'a, 'e> =
+ | Ok('a)
+ | Error('e)
+----
+
+[source,gleam]
+----
+// Gleam
+type Result(a, e) {
+ Ok(a)
+ Error(e)
+}
+// Transport: Concorde (identical ADT structure)
+----
+
+==== Performance Characteristics
+
+* *Parse time*: O(n) where n = file size
+* *Conversion time*: O(t) where t = number of types
+* *Memory*: Minimal allocation, uses string refs
+* *Build time*: <2s for full crate
+
+==== Known Limitations
+
+Current implementation does not support: - External declarations
+(`+external+`) - Module-qualified types (`+Module.Type+`) - Inline
+records in variants - Advanced pattern matching - Recursive types
+(detected but not validated)
+
+These are not currently required for the ecosystem and can be added if
+needed.
+
+==== Dependencies
+
+[source,toml]
+----
+[dependencies]
+protocol-squisher-ir = { path = "../protocol-squisher-ir" }
+protocol-squisher-transport-primitives = { path = "../../ephapax-ir" }
+serde = { version = "1.0", features = ["derive"] }
+serde_json = "1.0"
+regex = "1.10"
+thiserror = "1.0"
+----
+
+=== Why This Matters
+
+ReScript is the *primary application language* for hyperpolymath:
+
+[arabic]
+. *Web Applications*: Type-safe browser apps
+. *Mobile Apps*: Via Deno runtime
+. *Server-side*: Via Deno runtime
+. *API Clients*: Type-safe HTTP clients
+. *Data Transformation*: Type-safe data pipelines
+
+This analyzer enables: - *Zero-copy interop* with Rust backends -
+*Type-safe APIs* across language boundaries - *Automatic code
+generation* from ReScript types - *Database schema sync* from ReScript
+models - *Protocol compatibility* with all analyzers
+
+=== Integration Points
+
+The ReScript analyzer integrates with:
+
+[arabic]
+. *Protocol Squisher Core*: Via `+IrSchema+`
+. *Ephapax*: Via transport class analysis
+. *Code Generators*: Via IR type definitions
+. *Other Analyzers*: Via shared IR format
+
+=== Testing Strategy
+
+==== Unit Tests
+
+Test individual components: - Parser: Type aliases, records, variants -
+Converter: Type mapping, field conversion - Ephapax: Transport class
+analysis
+
+==== Integration Tests
+
+Test full analyzer pipeline: - File parsing - Multiple type definitions
+- Complex nested structures
+
+==== Interop Tests
+
+Test cross-language compatibility: - ReScript ↔ Rust - ReScript ↔ Julia
+- ReScript ↔ Gleam - Transport class verification
+
+==== Example-Driven Tests
+
+Real-world ReScript patterns: - User authentication types - API response
+types - Database models - Configuration types
+
+=== Maintenance Notes
+
+==== Adding New ReScript Features
+
+To add support for a new ReScript feature:
+
+[arabic]
+. *Parser*: Add regex pattern in `+parser.rs+`
+. *AST*: Add struct in `+parser.rs+` (if needed)
+. *Converter*: Add conversion in `+converter.rs+`
+. *Tests*: Add unit test and interop test
+
+==== Updating Type Mappings
+
+To change how a ReScript type maps to IR:
+
+[arabic]
+. Update `+rescript_type_to_ir()+` in `+converter.rs+`
+. Add/update tests in `+converter::tests+`
+. Add interop test in `+tests/interop_tests.rs+`
+. Update README.md type mapping table
+
+==== Performance Optimization
+
+Current implementation prioritizes: 1. *Correctness*: All features work
+correctly 2. *Maintainability*: Clear, readable code 3. *Extensibility*:
+Easy to add new features
+
+If performance becomes an issue: - Consider tree-sitter parser - Add
+caching for repeated types - Optimize regex patterns
+
+=== Build Commands
+
+[source,bash]
+----
+# Build
+cargo build
+
+# Test (all)
+cargo test
+
+# Test (unit only)
+cargo test --lib
+
+# Test (interop only)
+cargo test --test interop_tests
+
+# Format
+cargo fmt
+
+# Lint
+cargo clippy
+
+# Documentation
+cargo doc --open
+----
+
+=== Verification
+
+All tests pass:
+
+....
+running 47 tests (unit)
+test result: ok. 47 passed
+
+running 13 tests (interop)
+test result: ok. 13 passed
+
+running 1 test (doc)
+test result: ok. 1 passed
+
+Total: 61 tests passed
+....
+
+=== Conclusion
+
+The ReScript analyzer is *complete, tested, and production-ready*. It
+provides comprehensive support for ReScript type definitions and enables
+zero-copy interop with other languages in the hyperpolymath ecosystem.
+
+The implementation follows the standard analyzer architecture, has
+excellent test coverage, and is well-documented. It is ready for
+integration into protocol-squisher’s analyzer suite.
+
+'''''
+
+*Implementation Time*: ~2 hours *Lines of Code*: ~1,561 (excluding
+tests) *Test Coverage*: 61 tests *Documentation*: Complete
+
+✅ *Ready for production use*
diff --git a/provenance/crates/protocol-squisher-rescript-analyzer/IMPLEMENTATION.md b/provenance/crates/protocol-squisher-rescript-analyzer/IMPLEMENTATION.md
deleted file mode 100644
index 394e025..0000000
--- a/provenance/crates/protocol-squisher-rescript-analyzer/IMPLEMENTATION.md
+++ /dev/null
@@ -1,417 +0,0 @@
-
-# ReScript Analyzer Implementation Summary
-
-**Date**: 2026-02-04
-**Status**: ✅ Complete and Tested
-**Test Coverage**: 61 tests (47 unit + 13 interop + 1 doc test)
-**Build Status**: All tests passing
-
-## Overview
-
-Complete implementation of the ReScript analyzer for protocol-squisher. This analyzer is **critical** for the hyperpolymath ecosystem as ReScript is the primary application language.
-
-## Implementation Details
-
-### Module Structure
-
-Following the standard 4-module architecture:
-
-```
-src/
-├── lib.rs # Public API, main analyzer (276 lines)
-├── parser.rs # Regex-based ReScript parser (427 lines)
-├── converter.rs # ReScript → IR conversion (464 lines)
-└── ephapax_bridge.rs # Transport analysis (394 lines)
-```
-
-### Files Created
-
-1. **src/lib.rs** - Main analyzer with comprehensive tests
-2. **src/parser.rs** - Full ReScript parser with comment handling
-3. **src/converter.rs** - Type conversion with all ReScript features
-4. **src/ephapax_bridge.rs** - Transport class analysis
-5. **tests/interop_test.res** - Sample ReScript types for testing
-6. **tests/interop_tests.rs** - 13 comprehensive interop tests
-7. **README.md** - Complete documentation
-8. **Cargo.toml** - Updated with `regex` and `thiserror` dependencies
-
-### Supported Features
-
-#### ReScript Types
-
-✅ **Primitive Types**
-- `int` → `I64`
-- `float` → `F64`
-- `string` → `String`
-- `bool` → `Bool`
-- `char` → `Char`
-- `unit` → `Unit`
-
-✅ **Record Types**
-```rescript
-type user = {
- id: int,
- name: string,
- email: option,
-}
-```
-
-✅ **Variant Types (Enums/ADTs)**
-```rescript
-type status = Active | Inactive | Suspended
-type result<'a, 'e> = Ok('a) | Error('e)
-```
-
-✅ **Container Types**
-- `option` → `Option`
-- `array` → `Vec`
-- `(T1, T2, ...)` → `Tuple`
-- `Js.Dict.t` → `Map`
-
-✅ **Type Aliases**
-```rescript
-type userId = int
-type timestamp = float
-```
-
-✅ **JS Interop**
-```rescript
-type apiUser = {
- @as("user_id") id: int,
- @as("user_name") name: string,
-}
-```
-
-✅ **Polymorphic Types**
-```rescript
-type response<'data> = {
- status: int,
- data: 'data,
-}
-```
-
-✅ **Nested Records**
-```rescript
-type person = {
- name: string,
- address: address,
-}
-```
-
-### Transport Analysis
-
-Ephapax-powered transport class analysis:
-
-| Class | Description | Example |
-|-------|-------------|---------|
-| **Concorde** | Zero-copy, identical types | `int` → `i64` |
-| **Business** | Safe widening | `i32` → `i64` |
-| **Economy** | Discriminated unions | Variants → Enums |
-| **Wheelbarrow** | JSON fallback | `int` → `string` |
-
-### Test Coverage
-
-**Unit Tests (47 tests)**
-- Parser tests: 8 tests
-- Converter tests: 12 tests
-- Ephapax bridge tests: 16 tests
-- Integration tests: 11 tests
-
-**Interop Tests (13 tests)**
-- File parsing test
-- ReScript ↔ Rust interop (3 tests)
-- ReScript ↔ Julia interop (2 tests)
-- ReScript ↔ Gleam interop (1 test)
-- Option semantics
-- Variant conversion (2 tests)
-- JS interop attributes
-- Tuple interop
-- Js.Dict interop
-- Polymorphic types
-- Complex nested structures
-- Transport class summary
-
-**Doc Tests (1 test)**
-- Example code in lib.rs documentation
-
-### Key Implementation Decisions
-
-#### 1. Regex-Based Parsing
-
-Uses regex instead of tree-sitter for:
-- Simplicity and maintainability
-- No external parser dependencies
-- Sufficient for ReScript's clean syntax
-- Easy to extend for new patterns
-
-#### 2. Type Parameter Handling
-
-Type parameters (`'a`, `'b`) are represented as `IrType::Reference`:
-- Preserves generic nature through IR
-- Allows code generators to handle polymorphism
-- Compatible with other language analyzers
-
-#### 3. Variant Payload Representation
-
-ReScript variants map to `VariantPayload::Tuple`:
-- ReScript uses tuple-style payloads: `Ok('a)`
-- Not struct-style: `Ok { value: 'a }`
-- Single-element tuple for single payloads
-- Matches ReScript semantics
-
-#### 4. JS Interop Attributes
-
-`@as` attributes captured as field aliases:
-- Stored in `FieldMetadata.aliases`
-- Code generators can produce JS-compatible names
-- Preserves both ReScript name and JS name
-
-#### 5. Comment Handling
-
-Full comment removal in parser:
-- Single-line comments (`//`)
-- Multi-line comments (`/* */`)
-- String-aware (doesn't remove `//` in strings)
-- Prevents false positives in type detection
-
-### Interop Capabilities
-
-#### ReScript ↔ Rust
-
-**Zero-Copy Types (Concorde)**:
-- `int` → `i64`
-- `string` → `String`
-- `bool` → `bool`
-- `array` → `Vec`
-- `option` → `Option`
-
-**Example**:
-```rescript
-// ReScript
-type user = {
- id: int,
- name: string,
- active: bool,
-}
-```
-
-```rust
-// Rust (auto-generated)
-struct User {
- id: i64,
- name: String,
- active: bool,
-}
-// Transport: Concorde (zero-copy)
-```
-
-#### ReScript ↔ Julia
-
-**Zero-Copy Types**:
-- `int` → `Int64`
-- `float` → `Float64`
-- `string` → `String`
-- `array` → `Vector{T}`
-
-#### ReScript ↔ Gleam
-
-**Zero-Copy Types**:
-- `option` → `Option(T)`
-- Variants → Custom types
-- Records → Records
-
-**Example**:
-```rescript
-// ReScript
-type result<'a, 'e> =
- | Ok('a)
- | Error('e)
-```
-
-```gleam
-// Gleam
-type Result(a, e) {
- Ok(a)
- Error(e)
-}
-// Transport: Concorde (identical ADT structure)
-```
-
-### Performance Characteristics
-
-- **Parse time**: O(n) where n = file size
-- **Conversion time**: O(t) where t = number of types
-- **Memory**: Minimal allocation, uses string refs
-- **Build time**: <2s for full crate
-
-### Known Limitations
-
-Current implementation does not support:
-- External declarations (`external`)
-- Module-qualified types (`Module.Type`)
-- Inline records in variants
-- Advanced pattern matching
-- Recursive types (detected but not validated)
-
-These are not currently required for the ecosystem and can be added if needed.
-
-### Dependencies
-
-```toml
-[dependencies]
-protocol-squisher-ir = { path = "../protocol-squisher-ir" }
-protocol-squisher-transport-primitives = { path = "../../ephapax-ir" }
-serde = { version = "1.0", features = ["derive"] }
-serde_json = "1.0"
-regex = "1.10"
-thiserror = "1.0"
-```
-
-## Why This Matters
-
-ReScript is the **primary application language** for hyperpolymath:
-
-1. **Web Applications**: Type-safe browser apps
-2. **Mobile Apps**: Via Deno runtime
-3. **Server-side**: Via Deno runtime
-4. **API Clients**: Type-safe HTTP clients
-5. **Data Transformation**: Type-safe data pipelines
-
-This analyzer enables:
-- **Zero-copy interop** with Rust backends
-- **Type-safe APIs** across language boundaries
-- **Automatic code generation** from ReScript types
-- **Database schema sync** from ReScript models
-- **Protocol compatibility** with all analyzers
-
-## Integration Points
-
-The ReScript analyzer integrates with:
-
-1. **Protocol Squisher Core**: Via `IrSchema`
-2. **Ephapax**: Via transport class analysis
-3. **Code Generators**: Via IR type definitions
-4. **Other Analyzers**: Via shared IR format
-
-## Testing Strategy
-
-### Unit Tests
-
-Test individual components:
-- Parser: Type aliases, records, variants
-- Converter: Type mapping, field conversion
-- Ephapax: Transport class analysis
-
-### Integration Tests
-
-Test full analyzer pipeline:
-- File parsing
-- Multiple type definitions
-- Complex nested structures
-
-### Interop Tests
-
-Test cross-language compatibility:
-- ReScript ↔ Rust
-- ReScript ↔ Julia
-- ReScript ↔ Gleam
-- Transport class verification
-
-### Example-Driven Tests
-
-Real-world ReScript patterns:
-- User authentication types
-- API response types
-- Database models
-- Configuration types
-
-## Maintenance Notes
-
-### Adding New ReScript Features
-
-To add support for a new ReScript feature:
-
-1. **Parser**: Add regex pattern in `parser.rs`
-2. **AST**: Add struct in `parser.rs` (if needed)
-3. **Converter**: Add conversion in `converter.rs`
-4. **Tests**: Add unit test and interop test
-
-### Updating Type Mappings
-
-To change how a ReScript type maps to IR:
-
-1. Update `rescript_type_to_ir()` in `converter.rs`
-2. Add/update tests in `converter::tests`
-3. Add interop test in `tests/interop_tests.rs`
-4. Update README.md type mapping table
-
-### Performance Optimization
-
-Current implementation prioritizes:
-1. **Correctness**: All features work correctly
-2. **Maintainability**: Clear, readable code
-3. **Extensibility**: Easy to add new features
-
-If performance becomes an issue:
-- Consider tree-sitter parser
-- Add caching for repeated types
-- Optimize regex patterns
-
-## Build Commands
-
-```bash
-# Build
-cargo build
-
-# Test (all)
-cargo test
-
-# Test (unit only)
-cargo test --lib
-
-# Test (interop only)
-cargo test --test interop_tests
-
-# Format
-cargo fmt
-
-# Lint
-cargo clippy
-
-# Documentation
-cargo doc --open
-```
-
-## Verification
-
-All tests pass:
-```
-running 47 tests (unit)
-test result: ok. 47 passed
-
-running 13 tests (interop)
-test result: ok. 13 passed
-
-running 1 test (doc)
-test result: ok. 1 passed
-
-Total: 61 tests passed
-```
-
-## Conclusion
-
-The ReScript analyzer is **complete, tested, and production-ready**. It provides comprehensive support for ReScript type definitions and enables zero-copy interop with other languages in the hyperpolymath ecosystem.
-
-The implementation follows the standard analyzer architecture, has excellent test coverage, and is well-documented. It is ready for integration into protocol-squisher's analyzer suite.
-
----
-
-**Implementation Time**: ~2 hours
-**Lines of Code**: ~1,561 (excluding tests)
-**Test Coverage**: 61 tests
-**Documentation**: Complete
-
-✅ **Ready for production use**
diff --git a/provenance/crates/protocol-squisher-rescript-analyzer/README.adoc b/provenance/crates/protocol-squisher-rescript-analyzer/README.adoc
new file mode 100644
index 0000000..223c608
--- /dev/null
+++ b/provenance/crates/protocol-squisher-rescript-analyzer/README.adoc
@@ -0,0 +1,301 @@
+== ReScript Analyzer for Protocol Squisher
+
+*Status*: ✅ Complete and tested (60 tests passing)
+
+ReScript schema analyzer for protocol-squisher. This analyzer is
+*critical* for the hyperpolymath ecosystem as ReScript is the primary
+application language.
+
+=== Features
+
+* *Full AST parsing*: Record types, variant types, option types, tuples,
+type aliases
+* *Module system support*: Type definitions across module boundaries
+* *JS interop*: `+@as+` attributes, `+@deriving+`, external
+declarations, `+Js.Dict.t+`
+* *Type inference*: Handles polymorphic types (`+'a+`, `+'b+`)
+* *Transport analysis*: Ephapax-powered compatibility checking
+* *Zero-copy detection*: Identifies when data can be transferred without
+serialization
+
+=== Quick Start
+
+[source,rust]
+----
+use protocol_squisher_rescript_analyzer::ReScriptAnalyzer;
+use std::path::Path;
+
+let analyzer = ReScriptAnalyzer::new();
+
+// Analyze from file
+let schema = analyzer.analyze_file(Path::new("Types.res")).unwrap();
+
+// Analyze from string
+let rescript = r#"
+ type user = {
+ id: int,
+ name: string,
+ email: option,
+ }
+"#;
+let schema = analyzer.analyze_str(rescript, "user").unwrap();
+----
+
+=== ReScript Type Mappings
+
+[width="100%",cols="27%,15%,29%,29%",options="header",]
+|===
+|ReScript Type |IR Type |Rust Equivalent |Transport Class
+|`+int+` |`+I64+` |`+i64+` |Concorde (zero-copy)
+
+|`+float+` |`+F64+` |`+f64+` |Concorde
+
+|`+string+` |`+String+` |`+String+` |Concorde
+
+|`+bool+` |`+Bool+` |`+bool+` |Concorde
+
+|`+char+` |`+Char+` |`+char+` |Concorde
+
+|`+unit+` |`+Unit+` |`+()+` |Concorde
+
+|`+option+` |`+Option+` |`+Option+` |Concorde (if T is)
+
+|`+array+` |`+Vec+` |`+Vec+` |Concorde (if T is)
+
+|`+(T1, T2, ...)+` |`+Tuple<...>+` |`+(T1, T2, ...)+` |Concorde (if all
+T are)
+
+|`+Js.Dict.t+` |`+Map+` |`+HashMap+` |Concorde
+(if V is)
+|===
+
+=== Supported ReScript Features
+
+==== Record Types
+
+[source,rescript]
+----
+type person = {
+ name: string,
+ age: int,
+ email: option,
+}
+----
+
+==== Variant Types (Enums/ADTs)
+
+[source,rescript]
+----
+type status =
+ | Active
+ | Inactive
+ | Suspended
+
+type result<'a, 'e> =
+ | Ok('a)
+ | Error('e)
+----
+
+==== JS Interop Attributes
+
+[source,rescript]
+----
+type apiUser = {
+ @as("user_id") id: int,
+ @as("user_name") name: string,
+}
+----
+
+The `+@as+` attribute is captured as an alias in the IR metadata.
+
+==== Polymorphic Types
+
+[source,rescript]
+----
+type response<'data> = {
+ status: int,
+ data: option<'data>,
+}
+----
+
+Type parameters are represented as `+IrType::Reference+` in the IR.
+
+==== Type Aliases
+
+[source,rescript]
+----
+type userId = int
+type timestamp = float
+----
+
+==== Nested Records
+
+[source,rescript]
+----
+type address = {
+ street: string,
+ city: string,
+}
+
+type person = {
+ name: string,
+ address: address,
+}
+----
+
+==== Tuples
+
+[source,rescript]
+----
+type coordinates = (float, float, float)
+----
+
+==== JS Dict (Map)
+
+[source,rescript]
+----
+type config = {
+ settings: Js.Dict.t,
+}
+----
+
+=== Transport Analysis
+
+The analyzer uses ephapax for proven-correct transport class analysis:
+
+==== Concorde (Zero-Copy)
+
+Identical types with no conversion overhead: - ReScript `+int+` → Rust
+`+i64+` - ReScript `+string+` → Rust `+String+` - ReScript `+array+`
+→ Rust `+Vec+` (if T is Concorde)
+
+==== Business (Safe Widening)
+
+Safe conversions with minor overhead: - ReScript `+int+` → Rust `+i128+`
+(widening) - Integer precision changes (safe direction only)
+
+==== Economy (Discriminated Unions)
+
+Requires tag checking but no serialization: - ReScript variants → Rust
+enums
+
+==== Wheelbarrow (JSON Fallback)
+
+Requires full serialization/deserialization: - Incompatible types (e.g.,
+`+int+` → `+string+`) - Narrowing conversions (e.g., `+i64+` → `+i32+`)
+
+=== Architecture
+
+The analyzer follows the standard 4-module structure:
+
+[arabic]
+. *lib.rs* - Public API and main analyzer
+. *parser.rs* - Regex-based ReScript parser
+. *converter.rs* - ReScript AST → IR conversion
+. *ephapax_bridge.rs* - Transport class analysis
+
+=== Interop Examples
+
+==== ReScript ↔ Rust
+
+[source,rust]
+----
+// ReScript: type user = { id: int, name: string }
+// Rust: struct User { id: i64, name: String }
+// Transport: Concorde (zero-copy)
+----
+
+==== ReScript ↔ Julia
+
+[source,julia]
+----
+# ReScript: type point = (float, float)
+# Julia: Point = Tuple{Float64, Float64}
+# Transport: Concorde
+----
+
+==== ReScript ↔ Gleam
+
+[source,gleam]
+----
+// ReScript: type result<'a, 'e> = | Ok('a) | Error('e)
+// Gleam: type Result(a, e) { Ok(a) Error(e) }
+// Transport: Concorde (identical ADT representation)
+----
+
+=== Testing
+
+The analyzer has comprehensive test coverage:
+
+* *Unit tests*: 47 tests for parser, converter, and ephapax bridge
+* *Interop tests*: 13 tests for cross-language compatibility
+* *Total*: 60 tests, all passing
+
+Run tests:
+
+[source,bash]
+----
+cargo test
+----
+
+Run interop tests only:
+
+[source,bash]
+----
+cargo test --test interop_tests
+----
+
+=== Why This Analyzer is Critical
+
+ReScript is the *primary application language* in the hyperpolymath
+ecosystem:
+
+[arabic]
+. *Type-safe JS*: Compiles to clean JavaScript with strong type
+guarantees
+. *Web apps*: Primary language for browser-based applications
+. *Cross-platform*: Works on web, mobile (via JS), and server (Deno)
+. *Ecosystem integration*: Bridge between JS ecosystem and typed
+languages
+
+This analyzer enables: - ReScript web apps ↔ Rust backends (zero-copy
+via ephapax) - ReScript types ↔ database schemas (via protocol-squisher)
+- ReScript APIs ↔ other typed languages (Gleam, Julia, etc.)
+
+=== Implementation Notes
+
+==== Parsing Strategy
+
+Uses regex-based parsing with: - Comment removal - Nested bracket
+handling (for generics) - Attribute extraction (`+@as+`, `+@deriving+`)
+- Polymorphic type parameter tracking
+
+==== Type Parameter Handling
+
+Type parameters (`+'a+`, `+'b+`) are represented as
+`+IrType::Reference+` to preserve their generic nature through the IR
+pipeline.
+
+==== JS Interop
+
+The `+@as+` attribute is captured as field aliases in `+FieldMetadata+`,
+allowing code generators to produce correct JS-compatible names.
+
+==== Variant Payloads
+
+ReScript variant payloads are converted to `+VariantPayload::Tuple+`
+since ReScript always uses tuple-style payloads (e.g., `+Ok('a)+` not
+`+Ok { value: 'a }+`).
+
+=== Future Enhancements
+
+Potential additions (not currently required): - External declarations
+(`+external fetch: string => promise+`) - Module-qualified
+types (`+Module.Type+`) - Inline records in variants - Advanced pattern
+matching analysis - Full tree-sitter integration (currently regex-based)
+
+=== License
+
+SPDX-License-Identifier: CC-BY-SA-4.0
+
+Copyright (c) 2026 Jonathan D.A. Jewell
diff --git a/provenance/crates/protocol-squisher-rescript-analyzer/README.md b/provenance/crates/protocol-squisher-rescript-analyzer/README.md
deleted file mode 100644
index 61f20d1..0000000
--- a/provenance/crates/protocol-squisher-rescript-analyzer/README.md
+++ /dev/null
@@ -1,271 +0,0 @@
-
-# ReScript Analyzer for Protocol Squisher
-
-**Status**: ✅ Complete and tested (60 tests passing)
-
-ReScript schema analyzer for protocol-squisher. This analyzer is **critical** for the hyperpolymath ecosystem as ReScript is the primary application language.
-
-## Features
-
-- **Full AST parsing**: Record types, variant types, option types, tuples, type aliases
-- **Module system support**: Type definitions across module boundaries
-- **JS interop**: `@as` attributes, `@deriving`, external declarations, `Js.Dict.t`
-- **Type inference**: Handles polymorphic types (`'a`, `'b`)
-- **Transport analysis**: Ephapax-powered compatibility checking
-- **Zero-copy detection**: Identifies when data can be transferred without serialization
-
-## Quick Start
-
-```rust
-use protocol_squisher_rescript_analyzer::ReScriptAnalyzer;
-use std::path::Path;
-
-let analyzer = ReScriptAnalyzer::new();
-
-// Analyze from file
-let schema = analyzer.analyze_file(Path::new("Types.res")).unwrap();
-
-// Analyze from string
-let rescript = r#"
- type user = {
- id: int,
- name: string,
- email: option,
- }
-"#;
-let schema = analyzer.analyze_str(rescript, "user").unwrap();
-```
-
-## ReScript Type Mappings
-
-| ReScript Type | IR Type | Rust Equivalent | Transport Class |
-|---------------|---------|-----------------|-----------------|
-| `int` | `I64` | `i64` | Concorde (zero-copy) |
-| `float` | `F64` | `f64` | Concorde |
-| `string` | `String` | `String` | Concorde |
-| `bool` | `Bool` | `bool` | Concorde |
-| `char` | `Char` | `char` | Concorde |
-| `unit` | `Unit` | `()` | Concorde |
-| `option` | `Option` | `Option` | Concorde (if T is) |
-| `array` | `Vec` | `Vec` | Concorde (if T is) |
-| `(T1, T2, ...)` | `Tuple<...>` | `(T1, T2, ...)` | Concorde (if all T are) |
-| `Js.Dict.t` | `Map` | `HashMap` | Concorde (if V is) |
-
-## Supported ReScript Features
-
-### Record Types
-
-```rescript
-type person = {
- name: string,
- age: int,
- email: option,
-}
-```
-
-### Variant Types (Enums/ADTs)
-
-```rescript
-type status =
- | Active
- | Inactive
- | Suspended
-
-type result<'a, 'e> =
- | Ok('a)
- | Error('e)
-```
-
-### JS Interop Attributes
-
-```rescript
-type apiUser = {
- @as("user_id") id: int,
- @as("user_name") name: string,
-}
-```
-
-The `@as` attribute is captured as an alias in the IR metadata.
-
-### Polymorphic Types
-
-```rescript
-type response<'data> = {
- status: int,
- data: option<'data>,
-}
-```
-
-Type parameters are represented as `IrType::Reference` in the IR.
-
-### Type Aliases
-
-```rescript
-type userId = int
-type timestamp = float
-```
-
-### Nested Records
-
-```rescript
-type address = {
- street: string,
- city: string,
-}
-
-type person = {
- name: string,
- address: address,
-}
-```
-
-### Tuples
-
-```rescript
-type coordinates = (float, float, float)
-```
-
-### JS Dict (Map)
-
-```rescript
-type config = {
- settings: Js.Dict.t,
-}
-```
-
-## Transport Analysis
-
-The analyzer uses ephapax for proven-correct transport class analysis:
-
-### Concorde (Zero-Copy)
-
-Identical types with no conversion overhead:
-- ReScript `int` → Rust `i64`
-- ReScript `string` → Rust `String`
-- ReScript `array` → Rust `Vec` (if T is Concorde)
-
-### Business (Safe Widening)
-
-Safe conversions with minor overhead:
-- ReScript `int` → Rust `i128` (widening)
-- Integer precision changes (safe direction only)
-
-### Economy (Discriminated Unions)
-
-Requires tag checking but no serialization:
-- ReScript variants → Rust enums
-
-### Wheelbarrow (JSON Fallback)
-
-Requires full serialization/deserialization:
-- Incompatible types (e.g., `int` → `string`)
-- Narrowing conversions (e.g., `i64` → `i32`)
-
-## Architecture
-
-The analyzer follows the standard 4-module structure:
-
-1. **lib.rs** - Public API and main analyzer
-2. **parser.rs** - Regex-based ReScript parser
-3. **converter.rs** - ReScript AST → IR conversion
-4. **ephapax_bridge.rs** - Transport class analysis
-
-## Interop Examples
-
-### ReScript ↔ Rust
-
-```rust
-// ReScript: type user = { id: int, name: string }
-// Rust: struct User { id: i64, name: String }
-// Transport: Concorde (zero-copy)
-```
-
-### ReScript ↔ Julia
-
-```julia
-# ReScript: type point = (float, float)
-# Julia: Point = Tuple{Float64, Float64}
-# Transport: Concorde
-```
-
-### ReScript ↔ Gleam
-
-```gleam
-// ReScript: type result<'a, 'e> = | Ok('a) | Error('e)
-// Gleam: type Result(a, e) { Ok(a) Error(e) }
-// Transport: Concorde (identical ADT representation)
-```
-
-## Testing
-
-The analyzer has comprehensive test coverage:
-
-- **Unit tests**: 47 tests for parser, converter, and ephapax bridge
-- **Interop tests**: 13 tests for cross-language compatibility
-- **Total**: 60 tests, all passing
-
-Run tests:
-
-```bash
-cargo test
-```
-
-Run interop tests only:
-
-```bash
-cargo test --test interop_tests
-```
-
-## Why This Analyzer is Critical
-
-ReScript is the **primary application language** in the hyperpolymath ecosystem:
-
-1. **Type-safe JS**: Compiles to clean JavaScript with strong type guarantees
-2. **Web apps**: Primary language for browser-based applications
-3. **Cross-platform**: Works on web, mobile (via JS), and server (Deno)
-4. **Ecosystem integration**: Bridge between JS ecosystem and typed languages
-
-This analyzer enables:
-- ReScript web apps ↔ Rust backends (zero-copy via ephapax)
-- ReScript types ↔ database schemas (via protocol-squisher)
-- ReScript APIs ↔ other typed languages (Gleam, Julia, etc.)
-
-## Implementation Notes
-
-### Parsing Strategy
-
-Uses regex-based parsing with:
-- Comment removal
-- Nested bracket handling (for generics)
-- Attribute extraction (`@as`, `@deriving`)
-- Polymorphic type parameter tracking
-
-### Type Parameter Handling
-
-Type parameters (`'a`, `'b`) are represented as `IrType::Reference` to preserve their generic nature through the IR pipeline.
-
-### JS Interop
-
-The `@as` attribute is captured as field aliases in `FieldMetadata`, allowing code generators to produce correct JS-compatible names.
-
-### Variant Payloads
-
-ReScript variant payloads are converted to `VariantPayload::Tuple` since ReScript always uses tuple-style payloads (e.g., `Ok('a)` not `Ok { value: 'a }`).
-
-## Future Enhancements
-
-Potential additions (not currently required):
-- External declarations (`external fetch: string => promise`)
-- Module-qualified types (`Module.Type`)
-- Inline records in variants
-- Advanced pattern matching analysis
-- Full tree-sitter integration (currently regex-based)
-
-## License
-
-SPDX-License-Identifier: CC-BY-SA-4.0
-
-Copyright (c) 2026 Jonathan D.A. Jewell
diff --git a/provenance/docs/BENCHMARK-QUICKSTART.md b/provenance/docs/BENCHMARK-QUICKSTART.adoc
similarity index 51%
rename from provenance/docs/BENCHMARK-QUICKSTART.md
rename to provenance/docs/BENCHMARK-QUICKSTART.adoc
index c827b11..09074c9 100644
--- a/provenance/docs/BENCHMARK-QUICKSTART.md
+++ b/provenance/docs/BENCHMARK-QUICKSTART.adoc
@@ -1,14 +1,11 @@
-
-# Benchmark Quick Start Guide
+== Benchmark Quick Start Guide
Get up and running with protocol-squisher benchmarks in 5 minutes.
-## TL;DR
+=== TL;DR
-```bash
+[source,bash]
+----
# Run all benchmarks
cargo bench
@@ -17,19 +14,20 @@ firefox target/criterion/report/index.html
# Or use the convenience script
./scripts/run-benchmarks.sh --all --view
-```
+----
-## First Time Setup
+=== First Time Setup
-### Prerequisites
+==== Prerequisites
-- Rust 1.83+ (for criterion 0.5 features)
-- 5-10 minutes for initial compilation
-- ~500MB disk space for benchmark artifacts
+* Rust 1.83+ (for criterion 0.5 features)
+* 5-10 minutes for initial compilation
+* ~500MB disk space for benchmark artifacts
-### Install & Build
+==== Install & Build
-```bash
+[source,bash]
+----
cd protocol-squisher
# Build benchmarks (release mode, ~3 minutes)
@@ -37,30 +35,33 @@ cargo bench --no-run
# Run a quick test
cargo bench --bench transport_classes Concorde/i64_identity
-```
+----
Expected output:
-```
+
+....
Concorde/i64_identity time: [1.2345 ns 1.2678 ns 1.3012 ns]
-```
+....
-## Running Benchmarks
+=== Running Benchmarks
-### Quick Development Check
+==== Quick Development Check
Run a single fast benchmark to verify changes:
-```bash
+[source,bash]
+----
# Just Concorde (fastest, ~30 seconds)
cargo bench --bench transport_classes Concorde
# Just point operations (fast, ~1 minute)
cargo bench --bench generated_vs_handwritten Point
-```
+----
-### Full Benchmark Suite
+==== Full Benchmark Suite
-```bash
+[source,bash]
+----
# All benchmarks (~10-15 minutes)
cargo bench
@@ -69,11 +70,12 @@ cargo bench
# Quick mode (faster but less precise)
./scripts/run-benchmarks.sh --all --quick
-```
+----
-### Individual Suites
+==== Individual Suites
-```bash
+[source,bash]
+----
# Transport classes only (~3 minutes)
cargo bench --bench transport_classes
@@ -85,154 +87,160 @@ cargo bench --bench generated_vs_handwritten
# Optimizer comparisons (~2 minutes)
cargo bench --bench optimizer_bench
-```
+----
-## Viewing Results
+=== Viewing Results
-### Terminal Output
+==== Terminal Output
Criterion prints results after each benchmark:
-```
+....
Concorde/i64_identity
time: [1.2345 ns 1.2678 ns 1.3012 ns]
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
-```
+....
-**Key info:**
-- **Mean time**: 1.2678 ns (middle value)
-- **Range**: 1.2345 to 1.3012 ns (95% confidence)
-- **Outliers**: 3% outliers (acceptable if <10%)
+*Key info:* - *Mean time*: 1.2678 ns (middle value) - *Range*: 1.2345 to
+1.3012 ns (95% confidence) - *Outliers*: 3% outliers (acceptable if
+<10%)
-### HTML Reports
+==== HTML Reports
Much better for analysis:
-```bash
+[source,bash]
+----
# Open main report
firefox target/criterion/report/index.html
# Or specific benchmark
firefox target/criterion/Concorde/report/index.html
-```
+----
-**HTML reports include:**
-- Interactive violin plots
-- Statistical analysis
-- Outlier detection
-- Historical comparison (if multiple runs)
+*HTML reports include:* - Interactive violin plots - Statistical
+analysis - Outlier detection - Historical comparison (if multiple runs)
-### Script Output
+==== Script Output
The convenience script provides a summary:
-```bash
+[source,bash]
+----
./scripts/run-benchmarks.sh --all --summary
# Creates: benchmark-reports/summary-TIMESTAMP.txt
-```
+----
-## Interpreting Results
+=== Interpreting Results
-### Are My Results Good?
+==== Are My Results Good?
Compare against these targets:
-| Benchmark Group | Target Time | Your Result | Status |
-|-----------------|-------------|-------------|--------|
-| Concorde | 1-2ns | ? | ✓/✗ |
-| Business Class | 10-20ns | ? | ✓/✗ |
-| Economy | 50-100ns | ? | ✓/✗ |
-| Wheelbarrow | 100-1000ns | ? | ✓/✗ |
+[cols=",,,",options="header",]
+|===
+|Benchmark Group |Target Time |Your Result |Status
+|Concorde |1-2ns |? |✓/✗
+|Business Class |10-20ns |? |✓/✗
+|Economy |50-100ns |? |✓/✗
+|Wheelbarrow |100-1000ns |? |✓/✗
+|===
+
+*Quick check:*
-**Quick check:**
-```bash
+[source,bash]
+----
# Grep for Concorde results
cargo bench --bench transport_classes Concorde 2>&1 | grep "time:"
# Compare against 2ns target
-```
+----
-### Common Results
+==== Common Results
-**Concorde** (zero-copy):
-```
+*Concorde* (zero-copy):
+
+....
i64_identity: 1.2 ns ✓ EXCELLENT
str_borrow: 1.5 ns ✓ EXCELLENT
f64_identity: 0.9 ns ✓ EXCELLENT (may be optimized away)
-```
+....
+
+*Business Class* (safe widening):
-**Business Class** (safe widening):
-```
+....
i32_to_i64: 8.7 ns ✓ EXCELLENT
f32_to_f64: 9.2 ns ✓ EXCELLENT
struct_widen: 15.3 ns ✓ GOOD
-```
+....
-**Economy** (allocation):
-```
+*Economy* (allocation):
+
+....
vec_i32_to_i64/10: 67 ns ✓ GOOD
string_clone: 42 ns ✓ GOOD
option_some: 7 ns ✓ EXCELLENT
-```
+....
+
+*Wheelbarrow* (JSON):
-**Wheelbarrow** (JSON):
-```
+....
manual_lossy: 234 ns ✓ GOOD
json_roundtrip: 1543 ns ✓ ACCEPTABLE
-```
+....
-### When Results Are Unexpected
+==== When Results Are Unexpected
-**If times are 10x higher:**
-1. Check for debug mode: `cargo bench` (not `cargo test`)
-2. Verify optimizer is running: `cat Cargo.toml | grep opt-level`
-3. Close background apps and rerun
+*If times are 10x higher:* 1. Check for debug mode: `+cargo bench+` (not
+`+cargo test+`) 2. Verify optimizer is running:
+`+cat Cargo.toml | grep opt-level+` 3. Close background apps and rerun
-**If times are inconsistent:**
-1. Check for high variance in output (>20%)
-2. Disable CPU frequency scaling: `sudo cpupower frequency-set -g performance`
-3. Run on idle system
+*If times are inconsistent:* 1. Check for high variance in output (>20%)
+2. Disable CPU frequency scaling:
+`+sudo cpupower frequency-set -g performance+` 3. Run on idle system
-**If comparisons show regression:**
-1. Look for "Performance has regressed" in output
-2. Check p-value (p < 0.05 = significant)
-3. Compare against baseline (see below)
+*If comparisons show regression:* 1. Look for "`Performance has
+regressed`" in output 2. Check p-value (p < 0.05 = significant) 3.
+Compare against baseline (see below)
-## Establishing Baselines
+=== Establishing Baselines
Track performance over time:
-```bash
+[source,bash]
+----
# Before making changes
./scripts/run-benchmarks.sh --all --baseline before
# After making changes
./scripts/run-benchmarks.sh --all --compare before
-```
+----
Criterion will show comparisons:
-```
+
+....
Concorde/i64_identity
time: [1.2345 ns 1.2678 ns 1.3012 ns]
change: [-5.12% -2.35% +0.89%] (p = 0.42 > 0.05)
No change in performance detected.
-```
+....
-**Change interpretation:**
-- `-5.12%` to `+0.89%`: Range of change (lower bound to upper bound)
-- `-2.35%`: Mean change (negative = improvement)
-- `p = 0.42`: Not statistically significant (would need p < 0.05)
+*Change interpretation:* - `+-5.12%+` to `++0.89%+`: Range of change
+(lower bound to upper bound) - `+-2.35%+`: Mean change (negative =
+improvement) - `+p = 0.42+`: Not statistically significant (would need p
+< 0.05)
-## Continuous Integration
+=== Continuous Integration
-### Basic CI Setup
+==== Basic CI Setup
-Add to `.github/workflows/benchmarks.yml`:
+Add to `+.github/workflows/benchmarks.yml+`:
-```yaml
+[source,yaml]
+----
name: Benchmarks
on: [push, pull_request]
jobs:
@@ -246,66 +254,83 @@ jobs:
with:
name: benchmark-results
path: target/criterion/
-```
+----
-### PR Comments
+==== PR Comments
-For automated PR feedback, use [criterion-compare-action](https://github.com/boa-dev/criterion-compare-action).
+For automated PR feedback, use
+https://github.com/boa-dev/criterion-compare-action[criterion-compare-action].
-## Troubleshooting
+=== Troubleshooting
-### "Benchmarks take too long"
+==== "`Benchmarks take too long`"
Use quick mode:
-```bash
+
+[source,bash]
+----
./scripts/run-benchmarks.sh --quick --transport
-```
+----
Or reduce sample size:
-```bash
+
+[source,bash]
+----
cargo bench -- --sample-size 10
-```
+----
-### "Cannot find firefox"
+==== "`Cannot find firefox`"
Manually open reports:
-```bash
+
+[source,bash]
+----
ls target/criterion/*/report/index.html
-```
+----
Or use your browser:
-```bash
+
+[source,bash]
+----
chromium target/criterion/report/index.html
-```
+----
-### "Results are noisy"
+==== "`Results are noisy`"
-1. Close background applications
-2. Disable CPU frequency scaling
-3. Increase sample size: `--sample-size 1000`
-4. Run multiple times and average
+[arabic]
+. Close background applications
+. Disable CPU frequency scaling
+. Increase sample size: `+--sample-size 1000+`
+. Run multiple times and average
-### "Build fails"
+==== "`Build fails`"
Check Rust version:
-```bash
+
+[source,bash]
+----
rustc --version # Should be 1.83+
-```
+----
Update if needed:
-```bash
+
+[source,bash]
+----
rustup update stable
-```
+----
-## Next Steps
+=== Next Steps
-- **Full guide**: See [benches/README.md](../benches/README.md)
-- **Interpretation**: See [BENCHMARK-RESULTS.md](./BENCHMARK-RESULTS.md)
-- **Adding benchmarks**: See [benches/README.md#benchmark-development](../benches/README.md#benchmark-development)
+* *Full guide*: See link:../benches/README.md[benches/README.md]
+* *Interpretation*: See
+link:./BENCHMARK-RESULTS.md[BENCHMARK-RESULTS.md]
+* *Adding benchmarks*: See
+link:../benches/README.md#benchmark-development[benches/README.md#benchmark-development]
-## Cheat Sheet
+=== Cheat Sheet
-```bash
+[source,bash]
+----
# Quick test (30 seconds)
cargo bench --bench transport_classes Concorde
@@ -321,28 +346,32 @@ firefox target/criterion/report/index.html
# Check specific result
cargo bench --bench transport_classes Concorde/i64_identity 2>&1 | grep time
-```
+----
+
+=== Common Issues
-## Common Issues
+[cols=",",options="header",]
+|===
+|Problem |Solution
+|"`Too slow`" |Use `+--quick+` flag
+|"`Build error`" |Update Rust: `+rustup update+`
+|"`Can’t find reports`" |Check `+target/criterion/report/+`
+|"`High variance`" |Close apps, disable freq scaling
+|"`Regression detected`" |Check p-value, rerun to confirm
+|===
-| Problem | Solution |
-|---------|----------|
-| "Too slow" | Use `--quick` flag |
-| "Build error" | Update Rust: `rustup update` |
-| "Can't find reports" | Check `target/criterion/report/` |
-| "High variance" | Close apps, disable freq scaling |
-| "Regression detected" | Check p-value, rerun to confirm |
+=== Support
-## Support
+For issues: 1. Check link:./BENCHMARK-RESULTS.md[BENCHMARK-RESULTS.md]
+for detailed interpretation 2. Review
+link:../benches/README.md[benches/README.md] for development guide 3.
+Open an issue with benchmark output
-For issues:
-1. Check [BENCHMARK-RESULTS.md](./BENCHMARK-RESULTS.md) for detailed interpretation
-2. Review [benches/README.md](../benches/README.md) for development guide
-3. Open an issue with benchmark output
+'''''
----
+*Ready to benchmark? Start with:*
-**Ready to benchmark? Start with:**
-```bash
+[source,bash]
+----
cargo bench --bench transport_classes Concorde
-```
+----
diff --git a/provenance/docs/BENCHMARK-RESULTS.adoc b/provenance/docs/BENCHMARK-RESULTS.adoc
new file mode 100644
index 0000000..5fe4b84
--- /dev/null
+++ b/provenance/docs/BENCHMARK-RESULTS.adoc
@@ -0,0 +1,393 @@
+== Benchmark Results Interpretation Guide
+
+This document explains how to interpret protocol-squisher benchmark
+results and validate performance claims.
+
+=== Quick Reference: Expected Performance
+
+[width="100%",cols="27%,21%,23%,29%",options="header",]
+|===
+|Transport Class |Target Range |What It Means |Example Operations
+|*Concorde* |1-2ns |Sub-pointer-dereference |i64 identity, str borrow
+|*Business Class* |10-20ns |Single arithmetic op |i32→i64 widening
+|*Economy* |50-100ns |Small allocation |String clone, Vec<10>
+|*Wheelbarrow* |100-1000ns |JSON serialization |Full roundtrip
+|===
+
+=== Understanding Criterion Output
+
+==== Terminal Output
+
+....
+Concorde/i64_identity
+ time: [1.2345 ns 1.2678 ns 1.3012 ns]
+ change: [-5.1234% -2.3456% +0.8901%] (p = 0.42 > 0.05)
+ No change in performance detected.
+....
+
+*Fields:* - *time*: `+[lower_bound mean upper_bound]+` - 95% confidence
+interval - *lower_bound*: Fastest observed performance - *mean*: Average
+across all samples - *upper_bound*: Slowest observed performance
+
+* *change*: Percentage difference vs previous baseline
+** Negative = improvement (faster)
+** Positive = regression (slower)
+* *p-value*: Statistical significance
+** `+p < 0.05+`: Change is statistically significant
+** `+p > 0.05+`: Change may be noise
+* *Status message*:
+** "`No change detected`": Within noise threshold
+** "`Performance has improved`": Statistically significant speedup
+** "`Performance has regressed`": Statistically significant slowdown
+
+==== HTML Reports
+
+Navigate to `+target/criterion/report/index.html+` for interactive
+visualizations:
+
+[arabic]
+. *Violin Plots*: Show distribution of measurements
+* Wide = high variance
+* Narrow = consistent performance
+. *Line Charts*: Performance over time (if multiple runs)
+* Upward trend = regression
+* Downward trend = improvement
+. *PDF Estimates*: Probability density function
+* Sharp peak = consistent
+* Flat/wide = variable
+. *Comparison Tables*: Side-by-side baseline comparison
+
+=== Validating Transport Class Claims
+
+==== Concorde (1-2ns target)
+
+*What to check:*
+
+[source,bash]
+----
+cargo bench --bench transport_classes Concorde
+----
+
+*Expected results:* - `+i64_identity+`: 0.5-2ns (may be optimized to
+near-zero) - `+str_borrow+`: 1-2ns (reference passing) -
+`+f64_identity+`: 0.5-2ns (register operation)
+
+*If higher than expected:* - Check for debug mode (should be release) -
+Ensure inlining is working (`+#[inline(always)]+`) - Verify
+`+black_box+` isn’t preventing optimization
+
+*Interpretation:* - Times <1ns are effectively zero-cost - Times 1-2ns
+are single CPU instructions - Concorde should be indistinguishable from
+raw Rust
+
+==== Business Class (10-20ns target)
+
+*What to check:*
+
+[source,bash]
+----
+cargo bench --bench transport_classes BusinessClass
+----
+
+*Expected results:* - `+i32_to_i64+`: 5-15ns (safe widening cast) -
+`+f32_to_f64+`: 5-15ns (safe widening cast) - `+struct_widen+`: 10-25ns
+(multiple field operations)
+
+*If higher than expected:* - Check if bounds checking is being inserted
+- Verify struct layout (padding affects copy speed) - Look for
+unnecessary clones
+
+*Interpretation:* - Business Class = few CPU cycles overhead - Safe
+conversions with zero data loss - Should be close to raw casts
+
+==== Economy (50-100ns target)
+
+*What to check:*
+
+[source,bash]
+----
+cargo bench --bench transport_classes Economy
+----
+
+*Expected results:* - `+vec_i32_to_i64/10+`: 50-100ns (small allocation)
+- `+vec_i32_to_i64/100+`: 200-500ns (larger allocation) -
+`+string_clone+`: 20-50ns (depends on string length) - `+option_some+`:
+5-10ns (no allocation) - `+option_none+`: 5-10ns (no allocation)
+
+*If higher than expected:* - Check allocator performance (`+jemalloc+`
+vs system) - Verify iterator is being optimized - Look for unnecessary
+intermediate allocations
+
+*Interpretation:* - Economy = dominated by allocation cost - Scales with
+data size - Option operations should be cheap (no alloc) - Vec
+operations scale linearly with size
+
+==== Wheelbarrow (100-1000ns target)
+
+*What to check:*
+
+[source,bash]
+----
+cargo bench --bench transport_classes Wheelbarrow
+----
+
+*Expected results:* - `+manual_lossy+`: 100-300ns (field-by-field
+conversion) - `+json_roundtrip+`: 500-2000ns (full serialization)
+
+*If higher than expected:* - This is expected for JSON fallback - Check
+if `+serde_json+` is in release mode - Verify data size isn’t excessive
+
+*Interpretation:* - Wheelbarrow = last resort fallback - JSON roundtrip
+is expensive but correct - Manual conversion is faster but lossy - Times
+<1µs are acceptable for fallback path
+
+=== Container Operation Patterns
+
+==== Vec Operations
+
+[source,bash]
+----
+cargo bench --bench container_operations Vec
+----
+
+*Scaling expectations:* - *10 elements*: ~50-100ns - *100 elements*:
+~200-500ns - *1000 elements*: ~2-5µs - *10000 elements*: ~20-50µs
+
+*Linear scaling*: Time should be proportional to element count.
+
+*Complexity:* - `+direct_access+`: O(1) - constant time -
+`+element_widen+`: O(n) - linear in size - `+complex_clone+`: O(n) -
+linear in size - `+nested_flatten+`: O(n*m) - quadratic
+
+==== Option Operations
+
+[source,bash]
+----
+cargo bench --bench container_operations Option
+----
+
+*All should be <10ns:* - `+map_identity_some+`: 0-5ns (should optimize
+to no-op) - `+map_identity_none+`: 0-5ns (branch prediction) -
+`+map_widen_some+`: 5-10ns (single cast) - `+unwrap_or_default+`: 5-20ns
+(depends on default cost)
+
+*If >20ns:* - Check if Option::map is being inlined - Verify branch
+prediction is working - Look for unnecessary clones
+
+==== HashMap Operations
+
+[source,bash]
+----
+cargo bench --bench container_operations HashMap
+----
+
+*Expected:* - `+lookup_present+`: 10-30ns (hash + probe) -
+`+lookup_absent+`: 10-30ns (hash + probe + not found) -
+`+value_widen_100+`: 1-3µs (rebuild entire map) - `+to_vec_100+`: 2-5µs
+(allocation + iteration)
+
+*Scaling:* - Lookups: O(1) average, O(n) worst case - Conversions: O(n)
+linear in map size
+
+==== Nested Containers
+
+[source,bash]
+----
+cargo bench --bench container_operations Nested
+----
+
+*Complexity multiplies:* - `+vec_option_filter_100+`: 200-500ns (filter
++ collect) - `+map_option_compact_100+`: 1-3µs (filter map + rebuild) -
+`+vec_map_merge_10x10+`: 2-5µs (nested iteration)
+
+*Interpretation:* - Each nesting level adds overhead - Filter operations
+scale with data size - Nested structures are Economy/Wheelbarrow
+
+=== Generated vs Handwritten Comparison
+
+[source,bash]
+----
+cargo bench --bench generated_vs_handwritten
+----
+
+==== Expected Ratios
+
+[cols=",,,,",options="header",]
+|===
+|Operation |Raw (baseline) |Handwritten |Generated |Target Ratio
+|Point create |1-2ns |3-5ns |5-10ns |<5x raw
+|Point get_x |0-1ns |1-2ns |2-5ns |<5x raw
+|User create |20-40ns |50-100ns |80-150ns |<4x raw
+|Vec sum (100) |50-100ns |60-120ns |80-150ns |<2x raw
+|JSON roundtrip |200-500ns |500-1000ns |1000-2000ns |<4x raw
+|===
+
+*Interpretation:* - *Raw*: Theoretical maximum (no safety) -
+*Handwritten*: Manual PyO3 FFI (baseline) - *Generated*: What
+protocol-squisher produces
+
+*Success criteria:* - Generated should be ≤2x handwritten - Generated
+adds validation overhead - JSON fallback is 2-4x slower than manual
+
+==== Validation Overhead
+
+Generated code includes: - Null pointer checks - Range validation -
+String validation (email format, etc.) - Default value handling
+
+*This overhead is intentional* - it provides correctness guarantees.
+
+*If >5x raw:* - Check if validation can be optimized - Verify assertions
+aren’t in hot loop - Look for unnecessary string allocations
+
+=== Performance Regression Detection
+
+==== Establishing Baselines
+
+[source,bash]
+----
+# Save current performance as baseline
+./scripts/run-benchmarks.sh --all --baseline main
+
+# After changes, compare
+./scripts/run-benchmarks.sh --all --compare main
+----
+
+==== Acceptable Variance
+
+Due to system noise, allow for: - *±5%*: Normal variance (ignore) -
+*±10%*: Investigate if consistent - *>20%*: Definite
+regression/improvement
+
+==== Investigating Regressions
+
+If benchmarks show >10% slowdown:
+
+[arabic]
+. *Verify release mode*: `+cargo bench+` uses release, but check
+`+Cargo.toml+`
+. *Check for debug symbols*: `+strip = true+` in profile
+. *System load*: Close background apps, rerun
+. *CPU throttling*: Check `+cpufreq+` settings
+. *Allocator*: Try `+jemalloc+` if using system allocator
+
+==== Statistical Significance
+
+Criterion uses Student’s t-test: - *p < 0.05*: Change is real (95%
+confidence) - *p > 0.05*: Change may be noise
+
+*Always check p-value* before investigating regressions.
+
+=== Real-World Context
+
+==== Nanosecond Scale
+
+[cols=",",options="header",]
+|===
+|Time |What Happens
+|1ns |Single CPU cycle (3GHz CPU)
+|10ns |L1 cache access
+|100ns |L2 cache access
+|1µs |L3 cache access / mutex lock
+|10µs |System call
+|100µs |Network round-trip (localhost)
+|===
+
+*Interpretation:* - <10ns = essentially free - 10-100ns = cache-level
+overhead - 100-1000ns = acceptable for conversion - >1µs = consider
+optimization
+
+==== Python Context
+
+Python function call overhead: ~100-300ns
+
+*Meaning:* - Concorde/Business: Faster than Python function call -
+Economy: Comparable to Python function call - Wheelbarrow: 3-10x Python
+function call
+
+*This is why generated code matters* - it avoids multiple
+Python→Rust→Python transitions.
+
+=== Troubleshooting
+
+==== "`Times are all near zero`"
+
+*Cause*: Optimizer eliminated the benchmark
+
+*Fix:* - Ensure `+black_box()+` wraps inputs and outputs - Check that
+function isn’t `+const+` - Verify work is actually being done
+
+==== "`High variance (>20%)`"
+
+*Cause*: System noise or cache effects
+
+*Fix:* - Close background applications - Disable CPU frequency scaling -
+Increase sample size: `+--sample-size 1000+` - Run multiple times and
+average
+
+==== "`Results differ from expectations`"
+
+*Check:* 1. Release mode enabled (`+cargo bench+`, not `+cargo test+`)
+2. CPU not throttled (`+cpufreq-info+`) 3. Allocator choice (jemalloc vs
+system) 4. Data size matches test case 5. Branch prediction (depends on
+workload)
+
+==== "`Outliers detected`"
+
+Criterion classifies outliers: - *Mild*: 1.5 IQR from median (expected,
+ignore) - *Severe*: 3.0 IQR from median (investigate)
+
+*Causes:* - Background processes - GC pauses (not Rust, but system) -
+CPU frequency changes - Cache effects
+
+*Action:* - Review HTML report for outlier distribution - If >10% severe
+outliers, rerun in isolated environment
+
+=== Continuous Monitoring
+
+==== Setting Up CI Benchmarks
+
+[source,yaml]
+----
+# .github/workflows/benchmarks.yml
+name: Performance
+on: [push, pull_request]
+jobs:
+ benchmark:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Run benchmarks
+ run: cargo bench
+ - name: Upload results
+ uses: actions/upload-artifact@v4
+ with:
+ name: benchmarks
+ path: target/criterion/
+----
+
+==== Tracking Trends
+
+Use criterion’s HTML reports to track performance over time: - Green =
+improvement - Red = regression - Gray = no significant change
+
+=== Summary Checklist
+
+Before releasing, verify:
+
+* [ ] Concorde: All <2ns
+* [ ] Business Class: All <20ns
+* [ ] Economy: <100ns for small data
+* [ ] Wheelbarrow: <1µs for typical cases
+* [ ] Generated code ≤2x handwritten
+* [ ] No >20% regressions vs baseline
+* [ ] p-values >0.05 for "`no change`" results
+* [ ] Outliers <10% of samples
+* [ ] HTML reports generated successfully
+
+=== Further Reading
+
+* https://bheisler.github.io/criterion.rs/book/[Criterion User Guide]
+* https://nnethercote.github.io/perf-book/[Rust Performance Book]
+* https://www.youtube.com/watch?v=6_Zvv0nZCZQ[Benchmarking Best
+Practices]
+* link:./DESIGN.md[Protocol Squisher Design]
diff --git a/provenance/docs/BENCHMARK-RESULTS.md b/provenance/docs/BENCHMARK-RESULTS.md
deleted file mode 100644
index 7422730..0000000
--- a/provenance/docs/BENCHMARK-RESULTS.md
+++ /dev/null
@@ -1,436 +0,0 @@
-
-# Benchmark Results Interpretation Guide
-
-This document explains how to interpret protocol-squisher benchmark results and validate performance claims.
-
-## Quick Reference: Expected Performance
-
-| Transport Class | Target Range | What It Means | Example Operations |
-|-----------------|--------------|---------------|-------------------|
-| **Concorde** | 1-2ns | Sub-pointer-dereference | i64 identity, str borrow |
-| **Business Class** | 10-20ns | Single arithmetic op | i32→i64 widening |
-| **Economy** | 50-100ns | Small allocation | String clone, Vec<10> |
-| **Wheelbarrow** | 100-1000ns | JSON serialization | Full roundtrip |
-
-## Understanding Criterion Output
-
-### Terminal Output
-
-```
-Concorde/i64_identity
- time: [1.2345 ns 1.2678 ns 1.3012 ns]
- change: [-5.1234% -2.3456% +0.8901%] (p = 0.42 > 0.05)
- No change in performance detected.
-```
-
-**Fields:**
-- **time**: `[lower_bound mean upper_bound]` - 95% confidence interval
- - **lower_bound**: Fastest observed performance
- - **mean**: Average across all samples
- - **upper_bound**: Slowest observed performance
-
-- **change**: Percentage difference vs previous baseline
- - Negative = improvement (faster)
- - Positive = regression (slower)
-
-- **p-value**: Statistical significance
- - `p < 0.05`: Change is statistically significant
- - `p > 0.05`: Change may be noise
-
-- **Status message**:
- - "No change detected": Within noise threshold
- - "Performance has improved": Statistically significant speedup
- - "Performance has regressed": Statistically significant slowdown
-
-### HTML Reports
-
-Navigate to `target/criterion/report/index.html` for interactive visualizations:
-
-1. **Violin Plots**: Show distribution of measurements
- - Wide = high variance
- - Narrow = consistent performance
-
-2. **Line Charts**: Performance over time (if multiple runs)
- - Upward trend = regression
- - Downward trend = improvement
-
-3. **PDF Estimates**: Probability density function
- - Sharp peak = consistent
- - Flat/wide = variable
-
-4. **Comparison Tables**: Side-by-side baseline comparison
-
-## Validating Transport Class Claims
-
-### Concorde (1-2ns target)
-
-**What to check:**
-
-```bash
-cargo bench --bench transport_classes Concorde
-```
-
-**Expected results:**
-- `i64_identity`: 0.5-2ns (may be optimized to near-zero)
-- `str_borrow`: 1-2ns (reference passing)
-- `f64_identity`: 0.5-2ns (register operation)
-
-**If higher than expected:**
-- Check for debug mode (should be release)
-- Ensure inlining is working (`#[inline(always)]`)
-- Verify `black_box` isn't preventing optimization
-
-**Interpretation:**
-- Times <1ns are effectively zero-cost
-- Times 1-2ns are single CPU instructions
-- Concorde should be indistinguishable from raw Rust
-
-### Business Class (10-20ns target)
-
-**What to check:**
-
-```bash
-cargo bench --bench transport_classes BusinessClass
-```
-
-**Expected results:**
-- `i32_to_i64`: 5-15ns (safe widening cast)
-- `f32_to_f64`: 5-15ns (safe widening cast)
-- `struct_widen`: 10-25ns (multiple field operations)
-
-**If higher than expected:**
-- Check if bounds checking is being inserted
-- Verify struct layout (padding affects copy speed)
-- Look for unnecessary clones
-
-**Interpretation:**
-- Business Class = few CPU cycles overhead
-- Safe conversions with zero data loss
-- Should be close to raw casts
-
-### Economy (50-100ns target)
-
-**What to check:**
-
-```bash
-cargo bench --bench transport_classes Economy
-```
-
-**Expected results:**
-- `vec_i32_to_i64/10`: 50-100ns (small allocation)
-- `vec_i32_to_i64/100`: 200-500ns (larger allocation)
-- `string_clone`: 20-50ns (depends on string length)
-- `option_some`: 5-10ns (no allocation)
-- `option_none`: 5-10ns (no allocation)
-
-**If higher than expected:**
-- Check allocator performance (`jemalloc` vs system)
-- Verify iterator is being optimized
-- Look for unnecessary intermediate allocations
-
-**Interpretation:**
-- Economy = dominated by allocation cost
-- Scales with data size
-- Option operations should be cheap (no alloc)
-- Vec operations scale linearly with size
-
-### Wheelbarrow (100-1000ns target)
-
-**What to check:**
-
-```bash
-cargo bench --bench transport_classes Wheelbarrow
-```
-
-**Expected results:**
-- `manual_lossy`: 100-300ns (field-by-field conversion)
-- `json_roundtrip`: 500-2000ns (full serialization)
-
-**If higher than expected:**
-- This is expected for JSON fallback
-- Check if `serde_json` is in release mode
-- Verify data size isn't excessive
-
-**Interpretation:**
-- Wheelbarrow = last resort fallback
-- JSON roundtrip is expensive but correct
-- Manual conversion is faster but lossy
-- Times <1µs are acceptable for fallback path
-
-## Container Operation Patterns
-
-### Vec Operations
-
-```bash
-cargo bench --bench container_operations Vec
-```
-
-**Scaling expectations:**
-- **10 elements**: ~50-100ns
-- **100 elements**: ~200-500ns
-- **1000 elements**: ~2-5µs
-- **10000 elements**: ~20-50µs
-
-**Linear scaling**: Time should be proportional to element count.
-
-**Complexity:**
-- `direct_access`: O(1) - constant time
-- `element_widen`: O(n) - linear in size
-- `complex_clone`: O(n) - linear in size
-- `nested_flatten`: O(n*m) - quadratic
-
-### Option Operations
-
-```bash
-cargo bench --bench container_operations Option
-```
-
-**All should be <10ns:**
-- `map_identity_some`: 0-5ns (should optimize to no-op)
-- `map_identity_none`: 0-5ns (branch prediction)
-- `map_widen_some`: 5-10ns (single cast)
-- `unwrap_or_default`: 5-20ns (depends on default cost)
-
-**If >20ns:**
-- Check if Option::map is being inlined
-- Verify branch prediction is working
-- Look for unnecessary clones
-
-### HashMap Operations
-
-```bash
-cargo bench --bench container_operations HashMap
-```
-
-**Expected:**
-- `lookup_present`: 10-30ns (hash + probe)
-- `lookup_absent`: 10-30ns (hash + probe + not found)
-- `value_widen_100`: 1-3µs (rebuild entire map)
-- `to_vec_100`: 2-5µs (allocation + iteration)
-
-**Scaling:**
-- Lookups: O(1) average, O(n) worst case
-- Conversions: O(n) linear in map size
-
-### Nested Containers
-
-```bash
-cargo bench --bench container_operations Nested
-```
-
-**Complexity multiplies:**
-- `vec_option_filter_100`: 200-500ns (filter + collect)
-- `map_option_compact_100`: 1-3µs (filter map + rebuild)
-- `vec_map_merge_10x10`: 2-5µs (nested iteration)
-
-**Interpretation:**
-- Each nesting level adds overhead
-- Filter operations scale with data size
-- Nested structures are Economy/Wheelbarrow
-
-## Generated vs Handwritten Comparison
-
-```bash
-cargo bench --bench generated_vs_handwritten
-```
-
-### Expected Ratios
-
-| Operation | Raw (baseline) | Handwritten | Generated | Target Ratio |
-|-----------|----------------|-------------|-----------|--------------|
-| Point create | 1-2ns | 3-5ns | 5-10ns | <5x raw |
-| Point get_x | 0-1ns | 1-2ns | 2-5ns | <5x raw |
-| User create | 20-40ns | 50-100ns | 80-150ns | <4x raw |
-| Vec sum (100) | 50-100ns | 60-120ns | 80-150ns | <2x raw |
-| JSON roundtrip | 200-500ns | 500-1000ns | 1000-2000ns | <4x raw |
-
-**Interpretation:**
-- **Raw**: Theoretical maximum (no safety)
-- **Handwritten**: Manual PyO3 FFI (baseline)
-- **Generated**: What protocol-squisher produces
-
-**Success criteria:**
-- Generated should be ≤2x handwritten
-- Generated adds validation overhead
-- JSON fallback is 2-4x slower than manual
-
-### Validation Overhead
-
-Generated code includes:
-- Null pointer checks
-- Range validation
-- String validation (email format, etc.)
-- Default value handling
-
-**This overhead is intentional** - it provides correctness guarantees.
-
-**If >5x raw:**
-- Check if validation can be optimized
-- Verify assertions aren't in hot loop
-- Look for unnecessary string allocations
-
-## Performance Regression Detection
-
-### Establishing Baselines
-
-```bash
-# Save current performance as baseline
-./scripts/run-benchmarks.sh --all --baseline main
-
-# After changes, compare
-./scripts/run-benchmarks.sh --all --compare main
-```
-
-### Acceptable Variance
-
-Due to system noise, allow for:
-- **±5%**: Normal variance (ignore)
-- **±10%**: Investigate if consistent
-- **>20%**: Definite regression/improvement
-
-### Investigating Regressions
-
-If benchmarks show >10% slowdown:
-
-1. **Verify release mode**: `cargo bench` uses release, but check `Cargo.toml`
-2. **Check for debug symbols**: `strip = true` in profile
-3. **System load**: Close background apps, rerun
-4. **CPU throttling**: Check `cpufreq` settings
-5. **Allocator**: Try `jemalloc` if using system allocator
-
-### Statistical Significance
-
-Criterion uses Student's t-test:
-- **p < 0.05**: Change is real (95% confidence)
-- **p > 0.05**: Change may be noise
-
-**Always check p-value** before investigating regressions.
-
-## Real-World Context
-
-### Nanosecond Scale
-
-| Time | What Happens |
-|------|--------------|
-| 1ns | Single CPU cycle (3GHz CPU) |
-| 10ns | L1 cache access |
-| 100ns | L2 cache access |
-| 1µs | L3 cache access / mutex lock |
-| 10µs | System call |
-| 100µs | Network round-trip (localhost) |
-
-**Interpretation:**
-- <10ns = essentially free
-- 10-100ns = cache-level overhead
-- 100-1000ns = acceptable for conversion
-- >1µs = consider optimization
-
-### Python Context
-
-Python function call overhead: ~100-300ns
-
-**Meaning:**
-- Concorde/Business: Faster than Python function call
-- Economy: Comparable to Python function call
-- Wheelbarrow: 3-10x Python function call
-
-**This is why generated code matters** - it avoids multiple Python→Rust→Python transitions.
-
-## Troubleshooting
-
-### "Times are all near zero"
-
-**Cause**: Optimizer eliminated the benchmark
-
-**Fix:**
-- Ensure `black_box()` wraps inputs and outputs
-- Check that function isn't `const`
-- Verify work is actually being done
-
-### "High variance (>20%)"
-
-**Cause**: System noise or cache effects
-
-**Fix:**
-- Close background applications
-- Disable CPU frequency scaling
-- Increase sample size: `--sample-size 1000`
-- Run multiple times and average
-
-### "Results differ from expectations"
-
-**Check:**
-1. Release mode enabled (`cargo bench`, not `cargo test`)
-2. CPU not throttled (`cpufreq-info`)
-3. Allocator choice (jemalloc vs system)
-4. Data size matches test case
-5. Branch prediction (depends on workload)
-
-### "Outliers detected"
-
-Criterion classifies outliers:
-- **Mild**: 1.5 IQR from median (expected, ignore)
-- **Severe**: 3.0 IQR from median (investigate)
-
-**Causes:**
-- Background processes
-- GC pauses (not Rust, but system)
-- CPU frequency changes
-- Cache effects
-
-**Action:**
-- Review HTML report for outlier distribution
-- If >10% severe outliers, rerun in isolated environment
-
-## Continuous Monitoring
-
-### Setting Up CI Benchmarks
-
-```yaml
-# .github/workflows/benchmarks.yml
-name: Performance
-on: [push, pull_request]
-jobs:
- benchmark:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Run benchmarks
- run: cargo bench
- - name: Upload results
- uses: actions/upload-artifact@v4
- with:
- name: benchmarks
- path: target/criterion/
-```
-
-### Tracking Trends
-
-Use criterion's HTML reports to track performance over time:
-- Green = improvement
-- Red = regression
-- Gray = no significant change
-
-## Summary Checklist
-
-Before releasing, verify:
-
-- [ ] Concorde: All <2ns
-- [ ] Business Class: All <20ns
-- [ ] Economy: <100ns for small data
-- [ ] Wheelbarrow: <1µs for typical cases
-- [ ] Generated code ≤2x handwritten
-- [ ] No >20% regressions vs baseline
-- [ ] p-values >0.05 for "no change" results
-- [ ] Outliers <10% of samples
-- [ ] HTML reports generated successfully
-
-## Further Reading
-
-- [Criterion User Guide](https://bheisler.github.io/criterion.rs/book/)
-- [Rust Performance Book](https://nnethercote.github.io/perf-book/)
-- [Benchmarking Best Practices](https://www.youtube.com/watch?v=6_Zvv0nZCZQ)
-- [Protocol Squisher Design](./DESIGN.md)
diff --git a/provenance/docs/CONTAINER-GUIDE.md b/provenance/docs/CONTAINER-GUIDE.adoc
similarity index 64%
rename from provenance/docs/CONTAINER-GUIDE.md
rename to provenance/docs/CONTAINER-GUIDE.adoc
index e27ff7d..40fcab9 100644
--- a/provenance/docs/CONTAINER-GUIDE.md
+++ b/provenance/docs/CONTAINER-GUIDE.adoc
@@ -1,30 +1,29 @@
-
-# Container Guide (Podman)
+== Container Guide (Podman)
-Protocol Squisher now includes a Podman-native developer container for reproducible builds, tests, and benchmark dry-runs.
+Protocol Squisher now includes a Podman-native developer container for
+reproducible builds, tests, and benchmark dry-runs.
-## Prerequisites
+=== Prerequisites
-- Podman
-- either `podman-compose` or `podman compose` plugin
+* Podman
+* either `+podman-compose+` or `+podman compose+` plugin
-## Quick Start
+=== Quick Start
-```bash
+[source,bash]
+----
# Build image and start service
./scripts/podman-dev.sh build
./scripts/podman-dev.sh up
# Open shell in container
./scripts/podman-dev.sh shell
-```
+----
-## Reproducible Workflows
+=== Reproducible Workflows
-```bash
+[source,bash]
+----
# Run full test suite
./scripts/podman-dev.sh test
@@ -41,74 +40,87 @@ Protocol Squisher now includes a Podman-native developer container for reproduci
# Backend mode checks
./scripts/podman-dev.sh backend-stub
./scripts/podman-dev.sh backend-verified-sim
-```
+----
-## Direct compose commands
+=== Direct compose commands
-```bash
+[source,bash]
+----
podman-compose -f podman-compose.yml run --rm dev cargo test --all --no-fail-fast
podman-compose -f podman-compose.yml run --rm dev cargo bench --no-run
# equivalent with podman compose:
podman compose -f podman-compose.yml run --rm dev cargo test --all --no-fail-fast
-```
+----
-## Verified Backend in Podman
+=== Verified Backend in Podman
-### Simulated verified mode (CI parity)
+==== Simulated verified mode (CI parity)
Use the bundled mock CLI to exercise the verified backend path:
-```bash
+[source,bash]
+----
./scripts/podman-dev.sh backend-verified-sim
./scripts/podman-dev.sh compile-smoke-verified-sim
-```
+----
-### Real verified mode
+==== Real verified mode
-1. Install pinned `ephapax-cli` into the repo:
+[arabic]
+. Install pinned `+ephapax-cli+` into the repo:
-```bash
+[source,bash]
+----
./scripts/podman-dev.sh install-ephapax-cli
-```
+----
-The installer is cached. Re-running the same pinned commit/toolchain is a no-op unless
-`EPHAPAX_INSTALL_FORCE=1` is set.
+The installer is cached. Re-running the same pinned commit/toolchain is
+a no-op unless `+EPHAPAX_INSTALL_FORCE=1+` is set.
-2. Run verified checks in container:
+[arabic, start=2]
+. Run verified checks in container:
-```bash
+[source,bash]
+----
./scripts/podman-dev.sh test-verified-real
./scripts/podman-dev.sh bench-verified-real
./scripts/podman-dev.sh backend-verified-real
./scripts/podman-dev.sh compile-smoke-verified-real
-```
+----
If your binary is in a different in-container location, set:
-```bash
+[source,bash]
+----
EPHAPAX_CLI_CONTAINER_PATH=/workspace/your/path/ephapax-cli ./scripts/podman-dev.sh backend-verified-real
-```
+----
To override installer source (advanced):
-```bash
+[source,bash]
+----
EPHAPAX_COMMIT= EPHAPAX_REPO_URL= ./scripts/podman-dev.sh install-ephapax-cli
-```
+----
To override installer build toolchain:
-```bash
+[source,bash]
+----
EPHAPAX_BUILD_TOOLCHAIN=1.89.0 ./scripts/podman-dev.sh install-ephapax-cli
-```
+----
To force reinstall even when cache metadata matches:
-```bash
+[source,bash]
+----
EPHAPAX_INSTALL_FORCE=1 ./scripts/podman-dev.sh install-ephapax-cli
-```
+----
-## Notes
+=== Notes
-- The image installs `python3` and `pydantic` so Python analyzer paths work consistently.
-- Stub mode remains the default until an `EPHAPAX_CLI` path is provided and functional.
-- Persistent volumes cache Rustup toolchains, Cargo registry/git, and `target/` to improve repeat run times.
+* The image installs `+python3+` and `+pydantic+` so Python analyzer
+paths work consistently.
+* Stub mode remains the default until an `+EPHAPAX_CLI+` path is
+provided and functional.
+* Persistent volumes cache Rustup toolchains, Cargo registry/git, and
+`+target/+` to improve repeat run times.
diff --git a/provenance/docs/FORMAT-SPEC-VERSIONS.adoc b/provenance/docs/FORMAT-SPEC-VERSIONS.adoc
new file mode 100644
index 0000000..ba9dab9
--- /dev/null
+++ b/provenance/docs/FORMAT-SPEC-VERSIONS.adoc
@@ -0,0 +1,93 @@
+== Format Specification Versions
+
+Tracks which specification version each protocol-squisher analyzer
+targets. Updated: 2026-03-10.
+
+=== Analyzer Spec Matrix
+
+[width="100%",cols="15%,26%,47%,12%",options="header",]
+|===
+|Format |Analyzer Crate |Spec Version(s) Supported |Notes
+|*Protobuf* |`+protocol-squisher-protobuf-analyzer+` |proto2, proto3
+(Language Guide rev 2024) |Regex-based parser; detects
+`+syntax = "proto2"+` / `+"proto3"+`. No Editions (2023+) support yet.
+
+|*Avro* |`+protocol-squisher-avro-analyzer+` |Apache Avro 1.11.x schema
+spec |JSON-based schema parsing; supports record, enum, fixed, union,
+array, map.
+
+|*Thrift* |`+protocol-squisher-thrift-analyzer+` |Apache Thrift IDL
+(v0.21.x compatible) |Regex-based parser; structs, enums, exceptions,
+typedefs. Field modifiers: required/optional/default.
+
+|*FlatBuffers* |`+protocol-squisher-flatbuffers-analyzer+` |FlatBuffers
+schema (flatc 24.x compatible) |Tables, structs (zero-copy), enums,
+unions. Supports `+root_type+` declaration.
+
+|*Cap’n Proto* |`+protocol-squisher-capnproto-analyzer+` |Cap’n Proto
+encoding spec (capnpc 1.x) |Structs with `+@N+` field numbering, enums,
+inline unions. Data types only (no RPC interfaces).
+
+|*MessagePack* |`+protocol-squisher-messagepack-analyzer+` |MessagePack
+spec (2013 revision, msgpack.org) |Schema-less format; accepts JSON
+Schema as proxy for type information. All types map to Wheelbarrow
+class.
+
+|*GraphQL* |`+protocol-squisher-graphql-analyzer+` |GraphQL SDL (October
+2021 spec) |Object types, inputs, interfaces, enums, unions, scalars.
+`+Int+` is 32-bit, `+Float+` is f64.
+
+|*TOML* |`+protocol-squisher-toml-analyzer+` |TOML v1.1.0 (via `+toml+`
+crate 1.0.6+spec-1.1.0) |Type inference from documents; tables, arrays,
+date-time, inline tables.
+
+|*JSON Schema* |`+protocol-squisher-json-schema-analyzer+` |draft-04,
+draft-06, draft-07, draft-2019-09, draft-2020-12 |Auto-detects version
+from `+$schema+` URI. Supports `+$ref+`, `+allOf+`/`+anyOf+`/`+oneOf+`,
+`+prefixItems+` (2020-12).
+
+|*Bebop* |`+protocol-squisher-bebop-analyzer+` |Bebop schema spec (bebop
+3.x compatible) |Structs (unversioned), messages (versioned with field
+numbers), enums. Maps and arrays supported.
+
+|*ReScript* |`+protocol-squisher-rescript-analyzer+` |ReScript type
+syntax (v11/v12 compatible) |Regex-based parser for ReScript type
+definitions and record types.
+|===
+
+=== Spec Upgrade Tracking
+
+==== Not Yet Supported
+
+[width="100%",cols="22%,53%,25%",options="header",]
+|===
+|Format |Missing Spec Feature |Priority
+|Protobuf |Editions (2023+) |Medium — new Google protobuf feature, not
+yet widely adopted
+
+|Avro |Schema fingerprints (CRC-64-AVRO) |Low
+
+|Cap’n Proto |Generic types `+Pair(K,V)+` |Low
+
+|Cap’n Proto |RPC interface definitions |Low — currently data-types-only
+
+|FlatBuffers |FlexBuffers (schema-less variant) |Low
+
+|JSON Schema |Vocabulary system (2019-09+) |Low
+
+|GraphQL |`+@specifiedBy+` directive (scalars) |Low
+|===
+
+==== Spec Version Sources
+
+* Protobuf: https://protobuf.dev/programming-guides/proto3/
+* Avro: https://avro.apache.org/docs/current/specification/
+* Thrift: https://thrift.apache.org/docs/idl
+* FlatBuffers:
+https://flatbuffers.dev/flatbuffers_guide_writing_schema.html
+* Cap’n Proto: https://capnproto.org/encoding.html
+* MessagePack: https://github.com/msgpack/msgpack/blob/master/spec.md
+* GraphQL: https://spec.graphql.org/October2021/
+* TOML: https://toml.io/en/v1.1.0
+* JSON Schema: https://json-schema.org/specification
+* Bebop: https://bebop.sh/reference/
diff --git a/provenance/docs/FORMAT-SPEC-VERSIONS.md b/provenance/docs/FORMAT-SPEC-VERSIONS.md
deleted file mode 100644
index c4c9986..0000000
--- a/provenance/docs/FORMAT-SPEC-VERSIONS.md
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-# Format Specification Versions
-
-Tracks which specification version each protocol-squisher analyzer targets.
-Updated: 2026-03-10.
-
-## Analyzer Spec Matrix
-
-| Format | Analyzer Crate | Spec Version(s) Supported | Notes |
-|--------|---------------|---------------------------|-------|
-| **Protobuf** | `protocol-squisher-protobuf-analyzer` | proto2, proto3 (Language Guide rev 2024) | Regex-based parser; detects `syntax = "proto2"` / `"proto3"`. No Editions (2023+) support yet. |
-| **Avro** | `protocol-squisher-avro-analyzer` | Apache Avro 1.11.x schema spec | JSON-based schema parsing; supports record, enum, fixed, union, array, map. |
-| **Thrift** | `protocol-squisher-thrift-analyzer` | Apache Thrift IDL (v0.21.x compatible) | Regex-based parser; structs, enums, exceptions, typedefs. Field modifiers: required/optional/default. |
-| **FlatBuffers** | `protocol-squisher-flatbuffers-analyzer` | FlatBuffers schema (flatc 24.x compatible) | Tables, structs (zero-copy), enums, unions. Supports `root_type` declaration. |
-| **Cap'n Proto** | `protocol-squisher-capnproto-analyzer` | Cap'n Proto encoding spec (capnpc 1.x) | Structs with `@N` field numbering, enums, inline unions. Data types only (no RPC interfaces). |
-| **MessagePack** | `protocol-squisher-messagepack-analyzer` | MessagePack spec (2013 revision, msgpack.org) | Schema-less format; accepts JSON Schema as proxy for type information. All types map to Wheelbarrow class. |
-| **GraphQL** | `protocol-squisher-graphql-analyzer` | GraphQL SDL (October 2021 spec) | Object types, inputs, interfaces, enums, unions, scalars. `Int` is 32-bit, `Float` is f64. |
-| **TOML** | `protocol-squisher-toml-analyzer` | TOML v1.1.0 (via `toml` crate 1.0.6+spec-1.1.0) | Type inference from documents; tables, arrays, date-time, inline tables. |
-| **JSON Schema** | `protocol-squisher-json-schema-analyzer` | draft-04, draft-06, draft-07, draft-2019-09, draft-2020-12 | Auto-detects version from `$schema` URI. Supports `$ref`, `allOf`/`anyOf`/`oneOf`, `prefixItems` (2020-12). |
-| **Bebop** | `protocol-squisher-bebop-analyzer` | Bebop schema spec (bebop 3.x compatible) | Structs (unversioned), messages (versioned with field numbers), enums. Maps and arrays supported. |
-| **ReScript** | `protocol-squisher-rescript-analyzer` | ReScript type syntax (v11/v12 compatible) | Regex-based parser for ReScript type definitions and record types. |
-
-## Spec Upgrade Tracking
-
-### Not Yet Supported
-
-| Format | Missing Spec Feature | Priority |
-|--------|---------------------|----------|
-| Protobuf | Editions (2023+) | Medium — new Google protobuf feature, not yet widely adopted |
-| Avro | Schema fingerprints (CRC-64-AVRO) | Low |
-| Cap'n Proto | Generic types `Pair(K,V)` | Low |
-| Cap'n Proto | RPC interface definitions | Low — currently data-types-only |
-| FlatBuffers | FlexBuffers (schema-less variant) | Low |
-| JSON Schema | Vocabulary system (2019-09+) | Low |
-| GraphQL | `@specifiedBy` directive (scalars) | Low |
-
-### Spec Version Sources
-
-- Protobuf: https://protobuf.dev/programming-guides/proto3/
-- Avro: https://avro.apache.org/docs/current/specification/
-- Thrift: https://thrift.apache.org/docs/idl
-- FlatBuffers: https://flatbuffers.dev/flatbuffers_guide_writing_schema.html
-- Cap'n Proto: https://capnproto.org/encoding.html
-- MessagePack: https://github.com/msgpack/msgpack/blob/master/spec.md
-- GraphQL: https://spec.graphql.org/October2021/
-- TOML: https://toml.io/en/v1.1.0
-- JSON Schema: https://json-schema.org/specification
-- Bebop: https://bebop.sh/reference/
diff --git a/provenance/docs/PROTOCOL-DIVERSITY-ANALYSIS.adoc b/provenance/docs/PROTOCOL-DIVERSITY-ANALYSIS.adoc
new file mode 100644
index 0000000..4b003d6
--- /dev/null
+++ b/provenance/docs/PROTOCOL-DIVERSITY-ANALYSIS.adoc
@@ -0,0 +1,176 @@
+== Protocol Diversity Analysis Plan
+
+=== Goal: Map the Full Logical Range of Squishability
+
+Analyze *12 diverse protocols* spanning different design philosophies to
+understand the complete spectrum of squishing opportunities.
+
+=== Protocol Selection Strategy
+
+==== Dimension 1: Performance Philosophy
+
+* *Zero-Copy Native*: Cap’n Proto ✅, FlatBuffers
+* *Speed Optimized*: Bebop, SBE (Simple Binary Encoding)
+* *Compact Size*: MessagePack, CBOR
+* *Balanced*: Protobuf ✅, Avro ✅, Thrift ✅
+
+==== Dimension 2: Schema Approach
+
+* *Static Schema*: Protobuf, Avro, Thrift, Cap’n Proto (all ✅)
+* *Schema Optional*: MessagePack, CBOR, Bencode
+* *Schema Required*: ASN.1, Ion
+
+==== Dimension 3: Domain/Niche
+
+* *General Purpose*: Protobuf, Avro, Thrift, MessagePack
+* *Zero-Copy Focus*: Cap’n Proto, FlatBuffers
+* *Finance/Trading*: SBE (Simple Binary Encoding)
+* *IoT/Embedded*: CBOR, MessagePack
+* *Legacy/Telecom*: ASN.1
+* *P2P/Distributed*: Bencode (BitTorrent)
+* *Cloud/Data*: Ion (Amazon)
+
+==== Dimension 4: Age/Maturity
+
+* *Ancient (1980s-1990s)*: ASN.1
+* *Classic (2000s)*: Protobuf, Thrift, Avro
+* *Modern (2010s)*: Cap’n Proto, FlatBuffers, CBOR, MessagePack
+* *Contemporary (2020s)*: Bebop, Ion
+
+=== The 12 Protocols
+
+[width="100%",cols="6%,15%,17%,12%,25%,25%",options="header",]
+|===
+|# |Protocol |Philosophy |Domain |Expected Score |Why Interesting
+|1 |✅ *Protobuf* |Balanced |General |0.73 |Baseline reference
+|2 |✅ *Avro* |Evolution |Data |0.75 |Schema evolution gold
+|3 |✅ *Thrift* |Evolution |RPC |0.84 |Multi-protocol
+|4 |✅ *Cap’n Proto* |Zero-copy |RPC |0.7-1.0 |Zero-copy test
+|5 |*FlatBuffers* |Zero-copy |Games |0.6-0.8 |Google’s alternative
+|6 |*Bebop* |Modern speed |General |0.7-0.9 |Contemporary design
+|7 |*MessagePack* |JSON-like |IoT |0.3-0.5 |Dynamic typing
+|8 |*CBOR* |IETF standard |IoT |0.3-0.5 |Semantic tags
+|9 |*Ion* |JSON superset |Cloud |0.5-0.7 |Amazon’s format
+|10 |*SBE* |Ultra-low latency |Finance |0.8-1.0 |Finance optimized
+|11 |*ASN.1* |Legacy telecom |Crypto |0.4-0.6 |Ancient standard
+|12 |*Bencode* |Minimal |P2P |0.2-0.4 |BitTorrent simple
+|===
+
+=== Hypothesis Tests
+
+==== H1: Zero-Copy = Unsquishable
+
+*Protocols*: Cap’n Proto ✅, FlatBuffers *Prediction*: Score <0.5
+(already optimized) *Status*: Cap’n Proto = 0.7-1.0 → *PARTLY FALSE*
+(Text/Data pointers have overhead!)
+
+==== H2: Dynamic Typing = Low Squishability
+
+*Protocols*: MessagePack, CBOR, Bencode *Prediction*: Score <0.3 (no
+schema, hard to optimize) *Status*: Pending
+
+==== H3: Finance Protocols = High Squishability
+
+*Protocols*: SBE *Prediction*: Score >0.8 (extreme optimization already,
+minimal squishing) *Status*: Pending
+
+==== H4: Modern Protocols = Better Design
+
+*Protocols*: Bebop, Ion vs Protobuf, Avro *Prediction*: Modern protocols
+score lower (less legacy baggage) *Status*: Pending
+
+==== H5: Schema Evolution = Squishing Gold
+
+*Protocols*: Avro ✅, Thrift ✅ vs Cap’n Proto ✅, MessagePack
+*Prediction*: Evolution protocols score >0.7 *Status*: *CONFIRMED* ✅
+(Avro 0.75, Thrift 0.84)
+
+=== Implementation Priority
+
+*Phase 1: Complete Standard Set* (Next 3) 1. FlatBuffers - Compare with
+Cap’n Proto (zero-copy) 2. Bebop - Modern design baseline 3. MessagePack
+- Dynamic typing baseline
+
+*Phase 2: Niche Protocols* (Next 3) 4. SBE - Finance extreme 5. CBOR -
+IoT standard 6. Ion - Cloud data
+
+*Phase 3: Unusual Cases* (Final 3) 7. ASN.1 - Legacy complexity 8.
+Bencode - Minimal extreme 9. (Bonus) - User suggestion or surprising
+protocol
+
+=== Expected Insights
+
+==== Pattern Discovery
+
+* Which design patterns create squishing opportunities?
+* Is there a "`sweet spot`" of moderate optimization?
+* Do niche domains have unique patterns?
+
+==== Ranking Predictions
+
+[arabic]
+. *Highest Squishability* (>0.8): Thrift, SBE, Avro
+. *Moderate* (0.5-0.8): Protobuf, Cap’n Proto, Bebop, Ion, FlatBuffers
+. *Lowest* (<0.5): MessagePack, CBOR, Bencode, ASN.1
+
+==== Design Lessons
+
+* Evolution features → High squishability
+* Zero-copy → Mixed (primitives great, pointers problematic)
+* Dynamic typing → Low squishability
+* Domain optimization → Depends on domain
+
+=== Deliverables
+
+[arabic]
+. *12 Analyzer Implementations* (~400 lines each)
+. *Comprehensive Comparative Report* (all 12 ranked)
+. *Pattern Frequency Analysis* (which patterns most common)
+. *Design Philosophy Insights* (which approaches create opportunities)
+. *Squishability Spectrum Visualization* (0.0-1.0 mapped)
+
+=== Success Criteria
+
+* [ ] All 12 protocols analyzed
+* [ ] Each protocol has 3+ test cases
+* [ ] Comparative analysis runs successfully
+* [ ] At least 3 hypotheses tested
+* [ ] Pattern database populated
+* [ ] Design insights documented
+* [ ] Spectrum visualization created
+
+=== Timeline
+
+* *Phase 1*: 2 hours (FlatBuffers, Bebop, MessagePack)
+* *Phase 2*: 2 hours (SBE, CBOR, Ion)
+* *Phase 3*: 2 hours (ASN.1, Bencode, bonus)
+* *Analysis*: 1 hour (comparative analysis, visualization)
+* *Total*: ~7 hours for complete protocol spectrum
+
+=== Files Created
+
+....
+crates/
+├── protocol-squisher-flatbuffers-analyzer/
+├── protocol-squisher-bebop-analyzer/
+├── protocol-squisher-messagepack-analyzer/
+├── protocol-squisher-sbe-analyzer/
+├── protocol-squisher-cbor-analyzer/
+├── protocol-squisher-ion-analyzer/
+├── protocol-squisher-asn1-analyzer/
+└── protocol-squisher-bencode-analyzer/
+
+examples/
+├── hypothesis_evolution_gold.rs (✅ complete)
+├── hypothesis_zero_copy.rs (Cap'n Proto + FlatBuffers)
+├── hypothesis_dynamic_typing.rs (MessagePack, CBOR, Bencode)
+└── comprehensive_protocol_analysis.rs (All 12 protocols)
+
+docs/
+├── PROTOCOL-SPECTRUM-REPORT.md (Final findings)
+└── SQUISHABILITY-PATTERNS.md (Pattern catalog)
+....
+
+'''''
+
+*Let’s discover the full logical range of squishability!* 🚀
diff --git a/provenance/docs/PROTOCOL-DIVERSITY-ANALYSIS.md b/provenance/docs/PROTOCOL-DIVERSITY-ANALYSIS.md
deleted file mode 100644
index 858d675..0000000
--- a/provenance/docs/PROTOCOL-DIVERSITY-ANALYSIS.md
+++ /dev/null
@@ -1,170 +0,0 @@
-
-# Protocol Diversity Analysis Plan
-
-## Goal: Map the Full Logical Range of Squishability
-
-Analyze **12 diverse protocols** spanning different design philosophies to understand the complete spectrum of squishing opportunities.
-
-## Protocol Selection Strategy
-
-### Dimension 1: Performance Philosophy
-- **Zero-Copy Native**: Cap'n Proto ✅, FlatBuffers
-- **Speed Optimized**: Bebop, SBE (Simple Binary Encoding)
-- **Compact Size**: MessagePack, CBOR
-- **Balanced**: Protobuf ✅, Avro ✅, Thrift ✅
-
-### Dimension 2: Schema Approach
-- **Static Schema**: Protobuf, Avro, Thrift, Cap'n Proto (all ✅)
-- **Schema Optional**: MessagePack, CBOR, Bencode
-- **Schema Required**: ASN.1, Ion
-
-### Dimension 3: Domain/Niche
-- **General Purpose**: Protobuf, Avro, Thrift, MessagePack
-- **Zero-Copy Focus**: Cap'n Proto, FlatBuffers
-- **Finance/Trading**: SBE (Simple Binary Encoding)
-- **IoT/Embedded**: CBOR, MessagePack
-- **Legacy/Telecom**: ASN.1
-- **P2P/Distributed**: Bencode (BitTorrent)
-- **Cloud/Data**: Ion (Amazon)
-
-### Dimension 4: Age/Maturity
-- **Ancient (1980s-1990s)**: ASN.1
-- **Classic (2000s)**: Protobuf, Thrift, Avro
-- **Modern (2010s)**: Cap'n Proto, FlatBuffers, CBOR, MessagePack
-- **Contemporary (2020s)**: Bebop, Ion
-
-## The 12 Protocols
-
-| # | Protocol | Philosophy | Domain | Expected Score | Why Interesting |
-|---|----------|-----------|--------|----------------|----------------|
-| 1 | ✅ **Protobuf** | Balanced | General | 0.73 | Baseline reference |
-| 2 | ✅ **Avro** | Evolution | Data | 0.75 | Schema evolution gold |
-| 3 | ✅ **Thrift** | Evolution | RPC | 0.84 | Multi-protocol |
-| 4 | ✅ **Cap'n Proto** | Zero-copy | RPC | 0.7-1.0 | Zero-copy test |
-| 5 | **FlatBuffers** | Zero-copy | Games | 0.6-0.8 | Google's alternative |
-| 6 | **Bebop** | Modern speed | General | 0.7-0.9 | Contemporary design |
-| 7 | **MessagePack** | JSON-like | IoT | 0.3-0.5 | Dynamic typing |
-| 8 | **CBOR** | IETF standard | IoT | 0.3-0.5 | Semantic tags |
-| 9 | **Ion** | JSON superset | Cloud | 0.5-0.7 | Amazon's format |
-| 10 | **SBE** | Ultra-low latency | Finance | 0.8-1.0 | Finance optimized |
-| 11 | **ASN.1** | Legacy telecom | Crypto | 0.4-0.6 | Ancient standard |
-| 12 | **Bencode** | Minimal | P2P | 0.2-0.4 | BitTorrent simple |
-
-## Hypothesis Tests
-
-### H1: Zero-Copy = Unsquishable
-**Protocols**: Cap'n Proto ✅, FlatBuffers
-**Prediction**: Score <0.5 (already optimized)
-**Status**: Cap'n Proto = 0.7-1.0 → **PARTLY FALSE** (Text/Data pointers have overhead!)
-
-### H2: Dynamic Typing = Low Squishability
-**Protocols**: MessagePack, CBOR, Bencode
-**Prediction**: Score <0.3 (no schema, hard to optimize)
-**Status**: Pending
-
-### H3: Finance Protocols = High Squishability
-**Protocols**: SBE
-**Prediction**: Score >0.8 (extreme optimization already, minimal squishing)
-**Status**: Pending
-
-### H4: Modern Protocols = Better Design
-**Protocols**: Bebop, Ion vs Protobuf, Avro
-**Prediction**: Modern protocols score lower (less legacy baggage)
-**Status**: Pending
-
-### H5: Schema Evolution = Squishing Gold
-**Protocols**: Avro ✅, Thrift ✅ vs Cap'n Proto ✅, MessagePack
-**Prediction**: Evolution protocols score >0.7
-**Status**: **CONFIRMED** ✅ (Avro 0.75, Thrift 0.84)
-
-## Implementation Priority
-
-**Phase 1: Complete Standard Set** (Next 3)
-1. FlatBuffers - Compare with Cap'n Proto (zero-copy)
-2. Bebop - Modern design baseline
-3. MessagePack - Dynamic typing baseline
-
-**Phase 2: Niche Protocols** (Next 3)
-4. SBE - Finance extreme
-5. CBOR - IoT standard
-6. Ion - Cloud data
-
-**Phase 3: Unusual Cases** (Final 3)
-7. ASN.1 - Legacy complexity
-8. Bencode - Minimal extreme
-9. (Bonus) - User suggestion or surprising protocol
-
-## Expected Insights
-
-### Pattern Discovery
-- Which design patterns create squishing opportunities?
-- Is there a "sweet spot" of moderate optimization?
-- Do niche domains have unique patterns?
-
-### Ranking Predictions
-1. **Highest Squishability** (>0.8): Thrift, SBE, Avro
-2. **Moderate** (0.5-0.8): Protobuf, Cap'n Proto, Bebop, Ion, FlatBuffers
-3. **Lowest** (<0.5): MessagePack, CBOR, Bencode, ASN.1
-
-### Design Lessons
-- Evolution features → High squishability
-- Zero-copy → Mixed (primitives great, pointers problematic)
-- Dynamic typing → Low squishability
-- Domain optimization → Depends on domain
-
-## Deliverables
-
-1. **12 Analyzer Implementations** (~400 lines each)
-2. **Comprehensive Comparative Report** (all 12 ranked)
-3. **Pattern Frequency Analysis** (which patterns most common)
-4. **Design Philosophy Insights** (which approaches create opportunities)
-5. **Squishability Spectrum Visualization** (0.0-1.0 mapped)
-
-## Success Criteria
-
-- [ ] All 12 protocols analyzed
-- [ ] Each protocol has 3+ test cases
-- [ ] Comparative analysis runs successfully
-- [ ] At least 3 hypotheses tested
-- [ ] Pattern database populated
-- [ ] Design insights documented
-- [ ] Spectrum visualization created
-
-## Timeline
-
-- **Phase 1**: 2 hours (FlatBuffers, Bebop, MessagePack)
-- **Phase 2**: 2 hours (SBE, CBOR, Ion)
-- **Phase 3**: 2 hours (ASN.1, Bencode, bonus)
-- **Analysis**: 1 hour (comparative analysis, visualization)
-- **Total**: ~7 hours for complete protocol spectrum
-
-## Files Created
-
-```
-crates/
-├── protocol-squisher-flatbuffers-analyzer/
-├── protocol-squisher-bebop-analyzer/
-├── protocol-squisher-messagepack-analyzer/
-├── protocol-squisher-sbe-analyzer/
-├── protocol-squisher-cbor-analyzer/
-├── protocol-squisher-ion-analyzer/
-├── protocol-squisher-asn1-analyzer/
-└── protocol-squisher-bencode-analyzer/
-
-examples/
-├── hypothesis_evolution_gold.rs (✅ complete)
-├── hypothesis_zero_copy.rs (Cap'n Proto + FlatBuffers)
-├── hypothesis_dynamic_typing.rs (MessagePack, CBOR, Bencode)
-└── comprehensive_protocol_analysis.rs (All 12 protocols)
-
-docs/
-├── PROTOCOL-SPECTRUM-REPORT.md (Final findings)
-└── SQUISHABILITY-PATTERNS.md (Pattern catalog)
-```
-
----
-
-**Let's discover the full logical range of squishability!** 🚀
diff --git a/provenance/docs/launch/BLOG-POST.adoc b/provenance/docs/launch/BLOG-POST.adoc
new file mode 100644
index 0000000..dc7fb32
--- /dev/null
+++ b/provenance/docs/launch/BLOG-POST.adoc
@@ -0,0 +1,628 @@
+== Protocol Squisher: Universal Protocol Interoperability with Formal Guarantees
+
+_Or: How I Stopped Worrying and Learned to Love the FFI_
+
+'''''
+
+=== The Problem Space
+
+Picture this: You’re building a microservices architecture. Service A is
+Rust (using serde for serialization). Service B is Python (using
+Pydantic). Service C is Go (using Protocol Buffers). They all need to
+talk.
+
+In an ideal world, you’d have universal adapters that "`just work.`" In
+reality, you have:
+
+* *Manual FFI code* - Hundreds of lines of PyO3 boilerplate, `+unsafe+`
+blocks, lifetime annotations, error handling
+* *JSON as lingua franca* - Serialization overhead everywhere, no type
+safety, runtime errors
+* *Organizational friction* - "`Why don’t you just rewrite your service
+in $MY_LANGUAGE?`"
+* *Maintenance burden* - Schemas drift, adapters break, nobody wants to
+fix them
+
+With N serialization formats, you need O(N²) pairwise adapters. Each one
+is: - Time-consuming to write - Error-prone to maintain - Undocumented
+in losses/costs - Lacking correctness guarantees
+
+This is the serialization Tower of Babel.
+
+=== Enter Protocol Squisher
+
+Protocol Squisher treats format interoperability as a *compiler
+problem*, not a manual coding problem.
+
+*Core idea:* Given two schemas (in possibly incompatible formats),
+synthesize the minimum viable adapter that guarantees transport.
+
+*The invariant:*
+
+____
+*"`If it compiles, it carries.`"*
+
+For any valid input in format A, there exists a valid output in format
+B.
+____
+
+Even if slow. Even if lossy. But it _will_ transport.
+
+=== Architecture
+
+==== 1. The ephapax Intermediate Representation
+
+Every format gets analyzed and converted to a canonical IR:
+
+....
+Source Schema (Rust serde)
+ ↓
+ Analyzer
+ ↓
+ephapax IR (format-agnostic)
+ ↓
+ Compatibility Analysis
+ ↓
+Target Schema (Python Pydantic)
+....
+
+The IR captures: - Primitive types (integers, floats, strings, bools) -
+Complex types (structs, enums, containers) - Metadata (nullable,
+optional, default values) - Constraints (ranges, patterns, uniqueness)
+
+*Key insight:* If two formats can both map to the IR, they can talk to
+each other through the IR.
+
+==== 2. Transport Classes
+
+Not all conversions are equal. Protocol Squisher classifies every schema
+pair into *transport classes*:
+
+[cols=",,,",options="header",]
+|===
+|Class |Fidelity |Overhead |Description
+|*Concorde* |100% |0% |Zero-copy, perfect type match
+|*Business* |98% |5% |Safe conversions (widening)
+|*Economy* |80% |25% |Minor documented losses
+|*Wheelbarrow* |50% |80% |Significant losses, JSON fallback
+|===
+
+===== Concorde Class: Zero-Copy Transport
+
+*Example:* Rust `+i64+` ↔ Python `+int+`
+
+Both are 64-bit signed integers. No conversion needed. You get direct
+memory access:
+
+[source,rust]
+----
+// Rust side
+#[derive(Serialize, Deserialize)]
+struct User {
+ user_id: i64,
+ balance: f64,
+}
+----
+
+[source,python]
+----
+# Python side
+class User(BaseModel):
+ user_id: int # 64-bit signed
+ balance: float # IEEE 754 double
+----
+
+*Generated code:* PyO3 bindings with direct struct field access. ~1ns
+per field.
+
+===== Business Class: Safe Conversions
+
+*Example:* Rust `+i32+` → Python `+int+` (which is `+i64+`)
+
+Safe widening. No data loss. Minor overhead for sign extension:
+
+[source,rust]
+----
+struct Legacy {
+ count: i32, // 32-bit
+}
+----
+
+[source,python]
+----
+class Modern(BaseModel):
+ count: int # 64-bit (safe)
+----
+
+*Performance:* ~2-5ns per field. Acceptable.
+
+===== Economy Class: Documented Losses
+
+*Example:* Rust `+f64+` → JSON number (may lose precision)
+
+JSON numbers don’t guarantee IEEE 754 precision. We document this:
+
+....
+WARNING: Field 'precise_value' (f64 → JSON)
+ - Precision may be lost in JSON serialization
+ - Max safe integer: 2^53
+ - Recommend: Use string encoding for high-precision values
+....
+
+===== Wheelbarrow Class: It Works, But Slowly
+
+*Example:* Rust `+i64+` → Python `+i32+` (narrowing)
+
+Data loss is possible. We can’t prove the conversion is always safe, so
+we fall back to JSON:
+
+[source,rust]
+----
+struct WideRange {
+ big_id: i64, // Can be > i32::MAX
+}
+----
+
+[source,python]
+----
+class NarrowRange(BaseModel):
+ big_id: int # Python int, but schema expects 32-bit
+----
+
+*Analysis output:*
+
+....
+Transport Class: Wheelbarrow
+Field: big_id (i64 → i32)
+ - Values > 2^31-1 will cause runtime errors
+ - Requires JSON serialization (100-1000x slower)
+ - RECOMMEND: Change Python type to accept full i64
+....
+
+*Key point:* We tell you this _before_ generating code.
+
+==== 3. The CLI Workflow
+
+===== Step 1: Analyze
+
+[source,bash]
+----
+$ protocol-squisher analyze --rust lib.rs --python models.py
+
+Schema Analysis: lib.rs
+ ✓ User struct found
+ - user_id: i64
+ - balance: f64
+ - name: String
+ - active: bool
+
+Schema Analysis: models.py
+ ✓ User class found
+ - user_id: int (64-bit)
+ - balance: float (64-bit)
+ - name: str (UTF-8)
+ - active: bool
+
+Compatibility: CONCORDE CLASS
+ All fields: perfect type match
+ Zero-copy possible
+----
+
+===== Step 2: Check Compatibility
+
+[source,bash]
+----
+$ protocol-squisher check --rust lib.rs --python models.py
+
+Field-by-Field Analysis:
+ ✓ user_id: i64 ↔ int (Concorde)
+ ✓ balance: f64 ↔ float (Concorde)
+ ✓ name: String ↔ str (Concorde)
+ ✓ active: bool ↔ bool (Concorde)
+
+Overall Transport Class: Concorde
+Estimated Performance: ~1ns per field
+Zero-copy: YES
+
+TRANSPORT VIABLE: ✓
+----
+
+===== Step 3: Optimize (if needed)
+
+[source,bash]
+----
+$ protocol-squisher optimize --rust lib.rs --python models.py
+
+Optimization Suggestions:
+ - All fields already optimal (Concorde class)
+ - No changes recommended
+----
+
+For Wheelbarrow cases:
+
+[source,bash]
+----
+$ protocol-squisher optimize --rust legacy.rs --python modern.py
+
+Optimization Suggestions:
+ ⚠ Field 'big_id' (i64 → i32): Wheelbarrow class
+
+ Option 1: Change Python type (RECOMMENDED)
+ class Modern(BaseModel):
+ big_id: int # Remove 32-bit constraint
+
+ Option 2: Accept performance cost
+ - JSON fallback: ~1000ns per field
+ - Runtime errors if value > 2^31-1
+
+ Transport Class After Fix: Concorde
+----
+
+===== Step 4: Generate
+
+[source,bash]
+----
+$ protocol-squisher generate \
+ --rust lib.rs \
+ --python models.py \
+ --output generated/ \
+ --stubs
+
+Generated:
+ ✓ generated/lib.rs (657 lines)
+ - PyO3 #[pyclass] for User
+ - #[pymethods] with getters/setters
+ - Error handling
+ - Lifetime management
+
+ ✓ generated/user.pyi (type stubs)
+ - Full type hints
+ - Mypy compatible
+
+ ✓ generated/test_user.py (property tests)
+ - Hypothesis-based testing
+ - Round-trip validation
+ - Edge case coverage
+----
+
+=== Formal Verification
+
+The `+/proofs+` directory contains formal proofs in multiple theorem
+provers (Agda, Lean, Coq). We prove:
+
+==== Theorem 1: Concorde Safety
+
+*Statement:* If source and target types are identical, conversion is
+lossless and bijective.
+
+[source,agda]
+----
+concorde-safe : ∀ {T : Type} →
+ (conv : T → T) →
+ (∀ x → conv x ≡ x) →
+ Lossless conv ∧ Bijective conv
+----
+
+*Proof:* By construction. Identity function is trivially lossless and
+bijective. QED.
+
+==== Theorem 2: Wheelbarrow Necessity
+
+*Statement:* Narrowing conversions cannot be direct (require fallback).
+
+[source,lean]
+----
+theorem wheelbarrow_required :
+ ∀ (S T : Type),
+ (sizeof S > sizeof T) →
+ ¬∃ (conv : S → T), lossless conv
+----
+
+*Proof:* Pigeonhole principle. Cannot map 2^64 values into 2^32 slots
+without collision. QED.
+
+==== Theorem 3: Container Propagation
+
+*Statement:* Container transport class is the worst of its element
+classes.
+
+[source,coq]
+----
+Theorem container_worst_class :
+ ∀ (C : Container) (T₁ T₂ : Type),
+ let elem_class := transport_class T₁ T₂ in
+ let container_class := transport_class (C T₁) (C T₂) in
+ container_class = max elem_class BusinessClass.
+----
+
+*Intuition:* A `+Vec+` → `+List[i32]+` is Wheelbarrow because of
+the element conversion, even though the container types are compatible.
+
+==== Theorem 4: The Invariant
+
+*Statement:* For any two schemas, an adapter exists.
+
+[source,isabelle]
+----
+theorem protocol_squisher_invariant:
+ fixes schema_a schema_b :: Schema
+ shows "∃adapter. ∀x ∈ schema_a. ∃y ∈ schema_b. adapter x = Some y"
+----
+
+*Proof sketch:* By JSON fallback. In the worst case, serialize to JSON
+and deserialize to target. May be lossy, may be slow, but always exists.
+QED.
+
+=== Real-World Example
+
+==== The Manual Way (Before)
+
+[source,rust]
+----
+// lib.rs - 200+ lines
+use pyo3::prelude::*;
+
+#[pyclass]
+#[derive(Clone)]
+struct User {
+ #[pyo3(get, set)]
+ user_id: i64,
+ #[pyo3(get, set)]
+ balance: f64,
+ #[pyo3(get, set)]
+ name: String,
+ #[pyo3(get, set)]
+ active: bool,
+}
+
+#[pymethods]
+impl User {
+ #[new]
+ fn new(user_id: i64, balance: f64, name: String, active: bool) -> Self {
+ User { user_id, balance, name, active }
+ }
+
+ fn __repr__(&self) -> String {
+ format!("User(user_id={}, balance={}, name='{}', active={})",
+ self.user_id, self.balance, self.name, self.active)
+ }
+
+ // ... 50 more lines of boilerplate
+}
+
+#[pymodule]
+fn mylib(_py: Python, m: &PyModule) -> PyResult<()> {
+ m.add_class::()?;
+ Ok(())
+}
+----
+
+*Problems:* - Manual `+#[pyo3(get, set)]+` annotations - Manual
+`+#[new]+` constructor - Manual `+__repr__+` implementation - No type
+stubs (Python IDE has no autocomplete) - No tests - Lifetime management
+left to you - Error handling left to you
+
+==== The Protocol Squisher Way (After)
+
+[source,rust]
+----
+// lib.rs - 5 lines
+use serde::{Serialize, Deserialize};
+
+#[derive(Serialize, Deserialize)]
+struct User {
+ user_id: i64,
+ balance: f64,
+ name: String,
+ active: bool,
+}
+----
+
+[source,bash]
+----
+$ protocol-squisher generate --rust lib.rs --python models.py --output ./
+----
+
+*Result:* - All PyO3 boilerplate auto-generated - Type stubs for Python
+IDE - Property-based tests - Error handling included - Lifetime
+management automatic - ~1ns field access (Concorde class)
+
+=== Performance
+
+Benchmarks from `+examples/zero-copy-demo+`:
+
+[cols=",,,,",options="header",]
+|===
+|Operation |Concorde |Business |Economy |Wheelbarrow
+|*Field access* |~1ns |~2-5ns |~10-50ns |~100-1000ns
+|*Struct copy* |~5ns |~10-20ns |~50-200ns |~1-10μs
+|*Vec access* |~2ns |~5-10ns |~50-100ns |~10-100μs
+|===
+
+*Concorde is competitive with hand-written FFI.* The optimizer analyzes
+your schemas and suggests fixes to achieve Concorde where possible.
+
+=== Current Status
+
+*MVP Complete (100%):*
+
+* ✅ *678 tests passing* - Comprehensive test coverage (IR, analyzers,
+codegen, optimizer, properties)
+* ✅ *Rust ↔ Python working* - All 4 transport classes implemented
+* ✅ *CLI with 4 commands* - `+analyze+`, `+check+`, `+optimize+`,
+`+generate+`
+* ✅ *Formal proofs* - 4 theorems in Agda, cross-validated in Lean
+* ✅ *Zero-copy benchmarks* - Concorde achieves ~1ns per field
+* ✅ *Comprehensive docs* - CLI guide, examples, optimization guide,
+transport classes reference
+
+*Supported Formats:* - Rust (serde) - Python (Pydantic) - Protobuf -
+Thrift - Avro - MessagePack - FlatBuffers - Cap’n Proto - Bebop -
+ReScript - JSON Schema
+
+*Current Focus (Next):* - Larger empirical schema corpus - Adapter
+synthesis quality improvements - Advanced FFI hardening and performance
+tuning
+
+See
+https://github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc[ROADMAP.adoc]
+for full expansion plan.
+
+=== Try It
+
+==== Install
+
+[source,bash]
+----
+git clone https://github.com/hyperpolymath/protocol-squisher
+cd protocol-squisher
+cargo install --path crates/protocol-squisher-cli
+----
+
+==== Run Examples
+
+[source,bash]
+----
+# Zero-copy Concorde demo
+cd examples/zero-copy-demo
+./build.sh
+python test.py
+
+# See the magic: ~1ns field access
+----
+
+==== Use on Your Project
+
+[source,bash]
+----
+# Analyze your schemas
+protocol-squisher analyze --rust src/lib.rs --python models.py
+
+# Check compatibility
+protocol-squisher check --rust src/lib.rs --python models.py
+
+# Get optimization suggestions
+protocol-squisher optimize --rust src/lib.rs --python models.py
+
+# Generate PyO3 bindings
+protocol-squisher generate \
+ --rust src/lib.rs \
+ --python models.py \
+ --output generated/ \
+ --stubs
+----
+
+=== Limitations (We’re Honest)
+
+[arabic]
+. *Wheelbarrow class is slow* - Narrowing conversions need JSON
+(100-1000x overhead). Avoid if possible.
+. *Schema analysis only* - No runtime schema inference. You need
+explicit type definitions.
+. *Optimization quality is uneven across format pairs* - Some routes
+still default to Wheelbarrow until synthesis tuning improves.
+. *No circular references yet* - Graph structures with cycles require
+special handling (planned for Economy class).
+. *Enum compatibility is tricky* - Rust enums with data don’t map
+cleanly to Python `+Enum+`. We document losses.
+
+We believe in honest documentation. The tool tells you the costs
+upfront.
+
+=== Design Philosophy
+
+==== 1. Prefer Correctness Over Performance
+
+We use formal verification to prove invariants. Better to be slow and
+correct than fast and broken.
+
+(Though Concorde class is both fast _and_ correct.)
+
+==== 2. Document Losses Upfront
+
+Never surprise the user. If a conversion is lossy, we document exactly
+what’s lost *before* generating code.
+
+==== 3. Pessimistic Analysis
+
+If we can’t prove a conversion is safe, we assume it’s not. False
+positives (marking safe conversions as unsafe) are acceptable. False
+negatives (missing unsafe conversions) are not.
+
+==== 4. JSON as Universal Fallback
+
+When all else fails, serialize to JSON. It’s slow, but it’s universal.
+This guarantees the invariant holds.
+
+==== 5. Make It A Compiler Problem
+
+Schema compatibility should be checked at build time, not discovered at
+runtime. Protocol Squisher brings compile-time guarantees to FFI.
+
+=== Future Work
+
+*Phase 2: More Formats* - Cap’n Proto, Protobuf, Thrift, Avro,
+MessagePack
+
+*Phase 3: Advanced Features* - Circular reference handling (Arena
+graphs) - Custom conversion rules (user-defined adapters) - Streaming
+adapters (for large data) - Versioned schema migrations
+
+*Phase 4: Ecosystem Integration* - Cargo plugin (`+cargo squish+`) - IDE
+plugins (VS Code, IntelliJ) - CI/CD integration (fail builds on
+Wheelbarrow class)
+
+See
+https://github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc[ROADMAP.adoc]
+for details.
+
+=== Contributing
+
+We welcome contributions! Especially:
+
+* *New format analyzers* - Add support for your favorite serialization
+library
+* *Real-world schemas* - Edge cases that break our analysis
+* *Performance optimizations* - Make Concorde even faster
+* *Formal proofs* - Extend our theorem library
+
+See
+https://github.com/hyperpolymath/protocol-squisher/blob/main/CONTRIBUTING.adoc[CONTRIBUTING.adoc].
+
+=== Acknowledgments
+
+Inspired by: - Every developer who has ever cursed at FFI boilerplate -
+The Rust community’s commitment to zero-cost abstractions - The Python
+community’s pragmatism - Dependent type theory for making invariants
+provable
+
+Built with: - Rust (for the implementation) - Agda & Lean (for the
+proofs) - PyO3 (for Rust↔Python FFI) - serde & Pydantic (for
+serialization) - Hypothesis (for property-based testing)
+
+=== License
+
+MPL-2.0 (Palimpsest License)
+
+'''''
+
+*Links:*
+
+* GitHub: https://github.com/hyperpolymath/protocol-squisher
+* Examples:
+https://github.com/hyperpolymath/protocol-squisher/tree/main/examples
+* CLI Guide:
+https://github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
+* Formal Proofs:
+https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
+* Roadmap:
+https://github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc
+
+*Author:* https://github.com/hyperpolymath[@hyperpolymath]
+
+*Feedback?* Open an issue or PR. Found an edge case? We want to hear
+about it.
+
+'''''
+
+_"`If it compiles, it carries.`"_
diff --git a/provenance/docs/launch/BLOG-POST.md b/provenance/docs/launch/BLOG-POST.md
deleted file mode 100644
index f8e1a79..0000000
--- a/provenance/docs/launch/BLOG-POST.md
+++ /dev/null
@@ -1,585 +0,0 @@
-
-# Protocol Squisher: Universal Protocol Interoperability with Formal Guarantees
-
-*Or: How I Stopped Worrying and Learned to Love the FFI*
-
----
-
-## The Problem Space
-
-Picture this: You're building a microservices architecture. Service A is Rust (using serde for serialization). Service B is Python (using Pydantic). Service C is Go (using Protocol Buffers). They all need to talk.
-
-In an ideal world, you'd have universal adapters that "just work." In reality, you have:
-
-- **Manual FFI code** - Hundreds of lines of PyO3 boilerplate, `unsafe` blocks, lifetime annotations, error handling
-- **JSON as lingua franca** - Serialization overhead everywhere, no type safety, runtime errors
-- **Organizational friction** - "Why don't you just rewrite your service in $MY_LANGUAGE?"
-- **Maintenance burden** - Schemas drift, adapters break, nobody wants to fix them
-
-With N serialization formats, you need O(N²) pairwise adapters. Each one is:
-- Time-consuming to write
-- Error-prone to maintain
-- Undocumented in losses/costs
-- Lacking correctness guarantees
-
-This is the serialization Tower of Babel.
-
-## Enter Protocol Squisher
-
-Protocol Squisher treats format interoperability as a **compiler problem**, not a manual coding problem.
-
-**Core idea:** Given two schemas (in possibly incompatible formats), synthesize the minimum viable adapter that guarantees transport.
-
-**The invariant:**
-
-> **"If it compiles, it carries."**
->
-> For any valid input in format A, there exists a valid output in format B.
-
-Even if slow. Even if lossy. But it *will* transport.
-
-## Architecture
-
-### 1. The ephapax Intermediate Representation
-
-Every format gets analyzed and converted to a canonical IR:
-
-```
-Source Schema (Rust serde)
- ↓
- Analyzer
- ↓
-ephapax IR (format-agnostic)
- ↓
- Compatibility Analysis
- ↓
-Target Schema (Python Pydantic)
-```
-
-The IR captures:
-- Primitive types (integers, floats, strings, bools)
-- Complex types (structs, enums, containers)
-- Metadata (nullable, optional, default values)
-- Constraints (ranges, patterns, uniqueness)
-
-**Key insight:** If two formats can both map to the IR, they can talk to each other through the IR.
-
-### 2. Transport Classes
-
-Not all conversions are equal. Protocol Squisher classifies every schema pair into **transport classes**:
-
-| Class | Fidelity | Overhead | Description |
-|-------|----------|----------|-------------|
-| **Concorde** | 100% | 0% | Zero-copy, perfect type match |
-| **Business** | 98% | 5% | Safe conversions (widening) |
-| **Economy** | 80% | 25% | Minor documented losses |
-| **Wheelbarrow** | 50% | 80% | Significant losses, JSON fallback |
-
-#### Concorde Class: Zero-Copy Transport
-
-**Example:** Rust `i64` ↔ Python `int`
-
-Both are 64-bit signed integers. No conversion needed. You get direct memory access:
-
-```rust
-// Rust side
-#[derive(Serialize, Deserialize)]
-struct User {
- user_id: i64,
- balance: f64,
-}
-```
-
-```python
-# Python side
-class User(BaseModel):
- user_id: int # 64-bit signed
- balance: float # IEEE 754 double
-```
-
-**Generated code:** PyO3 bindings with direct struct field access. ~1ns per field.
-
-#### Business Class: Safe Conversions
-
-**Example:** Rust `i32` → Python `int` (which is `i64`)
-
-Safe widening. No data loss. Minor overhead for sign extension:
-
-```rust
-struct Legacy {
- count: i32, // 32-bit
-}
-```
-
-```python
-class Modern(BaseModel):
- count: int # 64-bit (safe)
-```
-
-**Performance:** ~2-5ns per field. Acceptable.
-
-#### Economy Class: Documented Losses
-
-**Example:** Rust `f64` → JSON number (may lose precision)
-
-JSON numbers don't guarantee IEEE 754 precision. We document this:
-
-```
-WARNING: Field 'precise_value' (f64 → JSON)
- - Precision may be lost in JSON serialization
- - Max safe integer: 2^53
- - Recommend: Use string encoding for high-precision values
-```
-
-#### Wheelbarrow Class: It Works, But Slowly
-
-**Example:** Rust `i64` → Python `i32` (narrowing)
-
-Data loss is possible. We can't prove the conversion is always safe, so we fall back to JSON:
-
-```rust
-struct WideRange {
- big_id: i64, // Can be > i32::MAX
-}
-```
-
-```python
-class NarrowRange(BaseModel):
- big_id: int # Python int, but schema expects 32-bit
-```
-
-**Analysis output:**
-```
-Transport Class: Wheelbarrow
-Field: big_id (i64 → i32)
- - Values > 2^31-1 will cause runtime errors
- - Requires JSON serialization (100-1000x slower)
- - RECOMMEND: Change Python type to accept full i64
-```
-
-**Key point:** We tell you this *before* generating code.
-
-### 3. The CLI Workflow
-
-#### Step 1: Analyze
-
-```bash
-$ protocol-squisher analyze --rust lib.rs --python models.py
-
-Schema Analysis: lib.rs
- ✓ User struct found
- - user_id: i64
- - balance: f64
- - name: String
- - active: bool
-
-Schema Analysis: models.py
- ✓ User class found
- - user_id: int (64-bit)
- - balance: float (64-bit)
- - name: str (UTF-8)
- - active: bool
-
-Compatibility: CONCORDE CLASS
- All fields: perfect type match
- Zero-copy possible
-```
-
-#### Step 2: Check Compatibility
-
-```bash
-$ protocol-squisher check --rust lib.rs --python models.py
-
-Field-by-Field Analysis:
- ✓ user_id: i64 ↔ int (Concorde)
- ✓ balance: f64 ↔ float (Concorde)
- ✓ name: String ↔ str (Concorde)
- ✓ active: bool ↔ bool (Concorde)
-
-Overall Transport Class: Concorde
-Estimated Performance: ~1ns per field
-Zero-copy: YES
-
-TRANSPORT VIABLE: ✓
-```
-
-#### Step 3: Optimize (if needed)
-
-```bash
-$ protocol-squisher optimize --rust lib.rs --python models.py
-
-Optimization Suggestions:
- - All fields already optimal (Concorde class)
- - No changes recommended
-```
-
-For Wheelbarrow cases:
-
-```bash
-$ protocol-squisher optimize --rust legacy.rs --python modern.py
-
-Optimization Suggestions:
- ⚠ Field 'big_id' (i64 → i32): Wheelbarrow class
-
- Option 1: Change Python type (RECOMMENDED)
- class Modern(BaseModel):
- big_id: int # Remove 32-bit constraint
-
- Option 2: Accept performance cost
- - JSON fallback: ~1000ns per field
- - Runtime errors if value > 2^31-1
-
- Transport Class After Fix: Concorde
-```
-
-#### Step 4: Generate
-
-```bash
-$ protocol-squisher generate \
- --rust lib.rs \
- --python models.py \
- --output generated/ \
- --stubs
-
-Generated:
- ✓ generated/lib.rs (657 lines)
- - PyO3 #[pyclass] for User
- - #[pymethods] with getters/setters
- - Error handling
- - Lifetime management
-
- ✓ generated/user.pyi (type stubs)
- - Full type hints
- - Mypy compatible
-
- ✓ generated/test_user.py (property tests)
- - Hypothesis-based testing
- - Round-trip validation
- - Edge case coverage
-```
-
-## Formal Verification
-
-The `/proofs` directory contains formal proofs in multiple theorem provers (Agda, Lean, Coq). We prove:
-
-### Theorem 1: Concorde Safety
-
-**Statement:** If source and target types are identical, conversion is lossless and bijective.
-
-```agda
-concorde-safe : ∀ {T : Type} →
- (conv : T → T) →
- (∀ x → conv x ≡ x) →
- Lossless conv ∧ Bijective conv
-```
-
-**Proof:** By construction. Identity function is trivially lossless and bijective. QED.
-
-### Theorem 2: Wheelbarrow Necessity
-
-**Statement:** Narrowing conversions cannot be direct (require fallback).
-
-```lean
-theorem wheelbarrow_required :
- ∀ (S T : Type),
- (sizeof S > sizeof T) →
- ¬∃ (conv : S → T), lossless conv
-```
-
-**Proof:** Pigeonhole principle. Cannot map 2^64 values into 2^32 slots without collision. QED.
-
-### Theorem 3: Container Propagation
-
-**Statement:** Container transport class is the worst of its element classes.
-
-```coq
-Theorem container_worst_class :
- ∀ (C : Container) (T₁ T₂ : Type),
- let elem_class := transport_class T₁ T₂ in
- let container_class := transport_class (C T₁) (C T₂) in
- container_class = max elem_class BusinessClass.
-```
-
-**Intuition:** A `Vec` → `List[i32]` is Wheelbarrow because of the element conversion, even though the container types are compatible.
-
-### Theorem 4: The Invariant
-
-**Statement:** For any two schemas, an adapter exists.
-
-```isabelle
-theorem protocol_squisher_invariant:
- fixes schema_a schema_b :: Schema
- shows "∃adapter. ∀x ∈ schema_a. ∃y ∈ schema_b. adapter x = Some y"
-```
-
-**Proof sketch:** By JSON fallback. In the worst case, serialize to JSON and deserialize to target. May be lossy, may be slow, but always exists. QED.
-
-## Real-World Example
-
-### The Manual Way (Before)
-
-```rust
-// lib.rs - 200+ lines
-use pyo3::prelude::*;
-
-#[pyclass]
-#[derive(Clone)]
-struct User {
- #[pyo3(get, set)]
- user_id: i64,
- #[pyo3(get, set)]
- balance: f64,
- #[pyo3(get, set)]
- name: String,
- #[pyo3(get, set)]
- active: bool,
-}
-
-#[pymethods]
-impl User {
- #[new]
- fn new(user_id: i64, balance: f64, name: String, active: bool) -> Self {
- User { user_id, balance, name, active }
- }
-
- fn __repr__(&self) -> String {
- format!("User(user_id={}, balance={}, name='{}', active={})",
- self.user_id, self.balance, self.name, self.active)
- }
-
- // ... 50 more lines of boilerplate
-}
-
-#[pymodule]
-fn mylib(_py: Python, m: &PyModule) -> PyResult<()> {
- m.add_class::()?;
- Ok(())
-}
-```
-
-**Problems:**
-- Manual `#[pyo3(get, set)]` annotations
-- Manual `#[new]` constructor
-- Manual `__repr__` implementation
-- No type stubs (Python IDE has no autocomplete)
-- No tests
-- Lifetime management left to you
-- Error handling left to you
-
-### The Protocol Squisher Way (After)
-
-```rust
-// lib.rs - 5 lines
-use serde::{Serialize, Deserialize};
-
-#[derive(Serialize, Deserialize)]
-struct User {
- user_id: i64,
- balance: f64,
- name: String,
- active: bool,
-}
-```
-
-```bash
-$ protocol-squisher generate --rust lib.rs --python models.py --output ./
-```
-
-**Result:**
-- All PyO3 boilerplate auto-generated
-- Type stubs for Python IDE
-- Property-based tests
-- Error handling included
-- Lifetime management automatic
-- ~1ns field access (Concorde class)
-
-## Performance
-
-Benchmarks from `examples/zero-copy-demo`:
-
-| Operation | Concorde | Business | Economy | Wheelbarrow |
-|-----------|----------|----------|---------|-------------|
-| **Field access** | ~1ns | ~2-5ns | ~10-50ns | ~100-1000ns |
-| **Struct copy** | ~5ns | ~10-20ns | ~50-200ns | ~1-10μs |
-| **Vec access** | ~2ns | ~5-10ns | ~50-100ns | ~10-100μs |
-
-**Concorde is competitive with hand-written FFI.** The optimizer analyzes your schemas and suggests fixes to achieve Concorde where possible.
-
-## Current Status
-
-**MVP Complete (100%):**
-
-- ✅ **678 tests passing** - Comprehensive test coverage (IR, analyzers, codegen, optimizer, properties)
-- ✅ **Rust ↔ Python working** - All 4 transport classes implemented
-- ✅ **CLI with 4 commands** - `analyze`, `check`, `optimize`, `generate`
-- ✅ **Formal proofs** - 4 theorems in Agda, cross-validated in Lean
-- ✅ **Zero-copy benchmarks** - Concorde achieves ~1ns per field
-- ✅ **Comprehensive docs** - CLI guide, examples, optimization guide, transport classes reference
-
-**Supported Formats:**
-- Rust (serde)
-- Python (Pydantic)
-- Protobuf
-- Thrift
-- Avro
-- MessagePack
-- FlatBuffers
-- Cap'n Proto
-- Bebop
-- ReScript
-- JSON Schema
-
-**Current Focus (Next):**
-- Larger empirical schema corpus
-- Adapter synthesis quality improvements
-- Advanced FFI hardening and performance tuning
-
-See [ROADMAP.adoc](https://github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc) for full expansion plan.
-
-## Try It
-
-### Install
-
-```bash
-git clone https://github.com/hyperpolymath/protocol-squisher
-cd protocol-squisher
-cargo install --path crates/protocol-squisher-cli
-```
-
-### Run Examples
-
-```bash
-# Zero-copy Concorde demo
-cd examples/zero-copy-demo
-./build.sh
-python test.py
-
-# See the magic: ~1ns field access
-```
-
-### Use on Your Project
-
-```bash
-# Analyze your schemas
-protocol-squisher analyze --rust src/lib.rs --python models.py
-
-# Check compatibility
-protocol-squisher check --rust src/lib.rs --python models.py
-
-# Get optimization suggestions
-protocol-squisher optimize --rust src/lib.rs --python models.py
-
-# Generate PyO3 bindings
-protocol-squisher generate \
- --rust src/lib.rs \
- --python models.py \
- --output generated/ \
- --stubs
-```
-
-## Limitations (We're Honest)
-
-1. **Wheelbarrow class is slow** - Narrowing conversions need JSON (100-1000x overhead). Avoid if possible.
-
-2. **Schema analysis only** - No runtime schema inference. You need explicit type definitions.
-
-3. **Optimization quality is uneven across format pairs** - Some routes still default to Wheelbarrow until synthesis tuning improves.
-
-4. **No circular references yet** - Graph structures with cycles require special handling (planned for Economy class).
-
-5. **Enum compatibility is tricky** - Rust enums with data don't map cleanly to Python `Enum`. We document losses.
-
-We believe in honest documentation. The tool tells you the costs upfront.
-
-## Design Philosophy
-
-### 1. Prefer Correctness Over Performance
-
-We use formal verification to prove invariants. Better to be slow and correct than fast and broken.
-
-(Though Concorde class is both fast *and* correct.)
-
-### 2. Document Losses Upfront
-
-Never surprise the user. If a conversion is lossy, we document exactly what's lost **before** generating code.
-
-### 3. Pessimistic Analysis
-
-If we can't prove a conversion is safe, we assume it's not. False positives (marking safe conversions as unsafe) are acceptable. False negatives (missing unsafe conversions) are not.
-
-### 4. JSON as Universal Fallback
-
-When all else fails, serialize to JSON. It's slow, but it's universal. This guarantees the invariant holds.
-
-### 5. Make It A Compiler Problem
-
-Schema compatibility should be checked at build time, not discovered at runtime. Protocol Squisher brings compile-time guarantees to FFI.
-
-## Future Work
-
-**Phase 2: More Formats**
-- Cap'n Proto, Protobuf, Thrift, Avro, MessagePack
-
-**Phase 3: Advanced Features**
-- Circular reference handling (Arena graphs)
-- Custom conversion rules (user-defined adapters)
-- Streaming adapters (for large data)
-- Versioned schema migrations
-
-**Phase 4: Ecosystem Integration**
-- Cargo plugin (`cargo squish`)
-- IDE plugins (VS Code, IntelliJ)
-- CI/CD integration (fail builds on Wheelbarrow class)
-
-See [ROADMAP.adoc](https://github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc) for details.
-
-## Contributing
-
-We welcome contributions! Especially:
-
-- **New format analyzers** - Add support for your favorite serialization library
-- **Real-world schemas** - Edge cases that break our analysis
-- **Performance optimizations** - Make Concorde even faster
-- **Formal proofs** - Extend our theorem library
-
-See [CONTRIBUTING.adoc](https://github.com/hyperpolymath/protocol-squisher/blob/main/CONTRIBUTING.adoc).
-
-## Acknowledgments
-
-Inspired by:
-- Every developer who has ever cursed at FFI boilerplate
-- The Rust community's commitment to zero-cost abstractions
-- The Python community's pragmatism
-- Dependent type theory for making invariants provable
-
-Built with:
-- Rust (for the implementation)
-- Agda & Lean (for the proofs)
-- PyO3 (for Rust↔Python FFI)
-- serde & Pydantic (for serialization)
-- Hypothesis (for property-based testing)
-
-## License
-
-MPL-2.0 (Palimpsest License)
-
----
-
-**Links:**
-
-- GitHub: https://github.com/hyperpolymath/protocol-squisher
-- Examples: https://github.com/hyperpolymath/protocol-squisher/tree/main/examples
-- CLI Guide: https://github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
-- Formal Proofs: https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
-- Roadmap: https://github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc
-
-**Author:** [@hyperpolymath](https://github.com/hyperpolymath)
-
-**Feedback?** Open an issue or PR. Found an edge case? We want to hear about it.
-
----
-
-*"If it compiles, it carries."*
diff --git a/provenance/docs/launch/HN-ANNOUNCEMENT.adoc b/provenance/docs/launch/HN-ANNOUNCEMENT.adoc
new file mode 100644
index 0000000..3d80da4
--- /dev/null
+++ b/provenance/docs/launch/HN-ANNOUNCEMENT.adoc
@@ -0,0 +1,206 @@
+== Show HN: Protocol Squisher – Universal Protocol Interoperability with Formal Guarantees
+
+*TL;DR:* Automatic adapter synthesis between any two serialization
+formats. If it compiles, it carries. 937 tests, formal proofs in Agda (5
+theorems) + Lean/Coq/Isabelle/Z3, 13 format analyzers, v1.1.0 released.
+
+'''''
+
+=== The Problem
+
+You have a Rust service using serde. Your colleague’s Python service
+uses Pydantic. You need them to talk.
+
+Current options: 1. Write manual FFI glue (hours/days, error-prone) 2.
+JSON as lingua franca (slow, manual conversions) 3. Rewrite one side
+(expensive, political) 4. Give up
+
+*The real problem:* Every serialization format pair needs custom bridge
+code. With N formats, that’s O(N²) adapters to maintain.
+
+=== The Solution
+
+Protocol Squisher analyzes schema pairs and synthesizes the minimum
+viable adapter with provable correctness guarantees.
+
+[source,bash]
+----
+$ protocol-squisher check --rust lib.rs --python models.py
+
+Analysis Results:
+ Transport Class: Concorde (100% fidelity, 0% overhead)
+
+Field Compatibility:
+ ✓ user_id: i64 ↔ int (native mapping)
+ ✓ balance: f64 ↔ float (IEEE 754 compatible)
+ ✓ name: String ↔ str (UTF-8)
+ ✓ active: bool ↔ bool (identical)
+
+TRANSPORT VIABLE: Zero-copy possible
+
+$ protocol-squisher generate --rust lib.rs --python models.py --output ./
+
+Generated PyO3 bindings:
+ ✓ lib.rs (657 lines)
+ ✓ models.pyi (type stubs)
+ ✓ tests.py (property-based tests)
+----
+
+*Result:* Direct memory access between Rust and Python. ~1ns per field.
+No serialization overhead.
+
+=== Transport Classes
+
+Every schema pair gets classified:
+
+[cols=",,,",options="header",]
+|===
+|Class |Fidelity |Overhead |Example
+|*Concorde* |100% |0% |i64↔int, f64↔float
+|*Business* |98% |5% |i32→i64 (safe widening)
+|*Economy* |80% |25% |Documented minor losses
+|*Wheelbarrow* |50% |80% |i64→i32 (needs JSON fallback)
+|===
+
+The CLI tells you which class you get _before_ generating code.
+
+=== The Invariant
+
+....
+For any valid input x in format A,
+there exists a valid output y in format B
+such that squish(x) = y.
+....
+
+*"`If it compiles, it carries.`"*
+
+Even if slow. Even if lossy. But it _will_ transport.
+
+We achieve this through: 1. *Canonical IR* - Every format maps to
+ephapax intermediate representation 2. *Compatibility analysis* - We
+prove transport is possible before generating 3. *JSON fallback* - When
+all else fails, JSON becomes the wheelbarrow 4. *Property-based testing*
+- Generated adapters include exhaustive test suites
+
+=== Formal Verification
+
+Core theorems proven in Agda (Concorde Safety cross-validated in Lean):
+
+[arabic]
+. *Concorde Safety* (fully verified): Identical types → lossless
+bijection
+. *Container Propagation* (fully verified): Container class = worst
+element class
+. *Wheelbarrow Necessity* (partial): Narrowing conversions require
+fallback
+. *Carries Invariant* (partial): Every schema pair has an adapter
+
+Proofs:
+https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
+
+=== Real-World Example
+
+*Before (manual FFI):*
+
+[source,rust]
+----
+#[pyclass]
+struct User {
+ #[pyo3(get, set)]
+ user_id: i64,
+ #[pyo3(get, set)]
+ balance: f64,
+ // ... 50 lines of boilerplate
+}
+
+#[pymethods]
+impl User {
+ #[new]
+ fn new(user_id: i64, balance: f64) -> Self { /* ... */ }
+ // ... 30 more lines
+}
+----
+
+*After (protocol-squisher):*
+
+[source,rust]
+----
+#[derive(Serialize, Deserialize)]
+struct User {
+ user_id: i64,
+ balance: f64,
+}
+----
+
+Generated code handles all FFI, type conversions, and includes property
+tests.
+
+=== Current Status
+
+*v1.1.0 Released* - ✅ 937 tests passing - ✅ 13 format analyzers: Rust,
+Python, Protobuf, Thrift, Avro, MessagePack, FlatBuffers, Cap’n Proto,
+Bebop, ReScript, JSON Schema, GraphQL, TOML - ✅ CLI with analysis,
+optimization suggestions, code generation - ✅ Formal proofs in Agda (5
+theorems); additional proofs in Lean, Coq, Isabelle, and Z3 - ✅
+Zero-copy benchmarks (~1ns Concorde, ~100-1000ns Wheelbarrow)
+
+=== Try It
+
+[source,bash]
+----
+git clone https://github.com/hyperpolymath/protocol-squisher
+cd protocol-squisher/examples/zero-copy-demo
+./build.sh
+python test.py # See ~1ns field access
+
+# Or install CLI
+cargo install --path crates/protocol-squisher-cli
+protocol-squisher --help
+----
+
+*Documentation:* - CLI Guide:
+https://github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
+- Examples:
+https://github.com/hyperpolymath/protocol-squisher/tree/main/examples -
+Formal Proofs:
+https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
+
+=== Why This Matters
+
+Polyglot systems are the norm. Every microservice boundary is a
+potential serialization mismatch. Manual adapters are: - Time-consuming
+- Error-prone - Unmaintained (bit rot)
+
+Protocol Squisher makes format interop a build step, not a maintenance
+burden.
+
+=== Limitations (We’re Honest)
+
+[arabic]
+. *Wheelbarrow class is slow* - Narrowing conversions need JSON
+(100-1000x overhead)
+. *Analysis requires schemas* - No runtime schema inference yet
+. *Optimization coverage varies by format pair* - Some pairs remain
+Wheelbarrow-class until optimizer/synthesis tuning improves
+
+We document losses upfront. No surprises.
+
+=== Contributing
+
+We need: - Real-world schema examples that break our analysis - Edge
+cases in formal proofs (help us finish the partial proofs!) -
+Performance optimizations - New format analyzers (gRPC, Excel, etc.)
+
+Issues: https://github.com/hyperpolymath/protocol-squisher/issues
+
+=== License
+
+MPL-2.0 (Palimpsest License)
+
+'''''
+
+Built by https://github.com/hyperpolymath[@hyperpolymath]. Inspired by
+every polyglot developer who’s cursed at FFI boilerplate.
+
+Questions? Comments? Found an edge case that breaks the invariant? Let’s
+hear it.
diff --git a/provenance/docs/launch/HN-ANNOUNCEMENT.md b/provenance/docs/launch/HN-ANNOUNCEMENT.md
deleted file mode 100644
index 4209559..0000000
--- a/provenance/docs/launch/HN-ANNOUNCEMENT.md
+++ /dev/null
@@ -1,187 +0,0 @@
-
-# Show HN: Protocol Squisher – Universal Protocol Interoperability with Formal Guarantees
-
-**TL;DR:** Automatic adapter synthesis between any two serialization formats. If it compiles, it carries. 937 tests, formal proofs in Agda (5 theorems) + Lean/Coq/Isabelle/Z3, 13 format analyzers, v1.1.0 released.
-
----
-
-## The Problem
-
-You have a Rust service using serde. Your colleague's Python service uses Pydantic. You need them to talk.
-
-Current options:
-1. Write manual FFI glue (hours/days, error-prone)
-2. JSON as lingua franca (slow, manual conversions)
-3. Rewrite one side (expensive, political)
-4. Give up
-
-**The real problem:** Every serialization format pair needs custom bridge code. With N formats, that's O(N²) adapters to maintain.
-
-## The Solution
-
-Protocol Squisher analyzes schema pairs and synthesizes the minimum viable adapter with provable correctness guarantees.
-
-```bash
-$ protocol-squisher check --rust lib.rs --python models.py
-
-Analysis Results:
- Transport Class: Concorde (100% fidelity, 0% overhead)
-
-Field Compatibility:
- ✓ user_id: i64 ↔ int (native mapping)
- ✓ balance: f64 ↔ float (IEEE 754 compatible)
- ✓ name: String ↔ str (UTF-8)
- ✓ active: bool ↔ bool (identical)
-
-TRANSPORT VIABLE: Zero-copy possible
-
-$ protocol-squisher generate --rust lib.rs --python models.py --output ./
-
-Generated PyO3 bindings:
- ✓ lib.rs (657 lines)
- ✓ models.pyi (type stubs)
- ✓ tests.py (property-based tests)
-```
-
-**Result:** Direct memory access between Rust and Python. ~1ns per field. No serialization overhead.
-
-## Transport Classes
-
-Every schema pair gets classified:
-
-| Class | Fidelity | Overhead | Example |
-|-------|----------|----------|---------|
-| **Concorde** | 100% | 0% | i64↔int, f64↔float |
-| **Business** | 98% | 5% | i32→i64 (safe widening) |
-| **Economy** | 80% | 25% | Documented minor losses |
-| **Wheelbarrow** | 50% | 80% | i64→i32 (needs JSON fallback) |
-
-The CLI tells you which class you get *before* generating code.
-
-## The Invariant
-
-```
-For any valid input x in format A,
-there exists a valid output y in format B
-such that squish(x) = y.
-```
-
-**"If it compiles, it carries."**
-
-Even if slow. Even if lossy. But it *will* transport.
-
-We achieve this through:
-1. **Canonical IR** - Every format maps to ephapax intermediate representation
-2. **Compatibility analysis** - We prove transport is possible before generating
-3. **JSON fallback** - When all else fails, JSON becomes the wheelbarrow
-4. **Property-based testing** - Generated adapters include exhaustive test suites
-
-## Formal Verification
-
-Core theorems proven in Agda (Concorde Safety cross-validated in Lean):
-
-1. **Concorde Safety** (fully verified): Identical types → lossless bijection
-2. **Container Propagation** (fully verified): Container class = worst element class
-3. **Wheelbarrow Necessity** (partial): Narrowing conversions require fallback
-4. **Carries Invariant** (partial): Every schema pair has an adapter
-
-Proofs: https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
-
-## Real-World Example
-
-**Before (manual FFI):**
-```rust
-#[pyclass]
-struct User {
- #[pyo3(get, set)]
- user_id: i64,
- #[pyo3(get, set)]
- balance: f64,
- // ... 50 lines of boilerplate
-}
-
-#[pymethods]
-impl User {
- #[new]
- fn new(user_id: i64, balance: f64) -> Self { /* ... */ }
- // ... 30 more lines
-}
-```
-
-**After (protocol-squisher):**
-```rust
-#[derive(Serialize, Deserialize)]
-struct User {
- user_id: i64,
- balance: f64,
-}
-```
-
-Generated code handles all FFI, type conversions, and includes property tests.
-
-## Current Status
-
-**v1.1.0 Released**
-- ✅ 937 tests passing
-- ✅ 13 format analyzers: Rust, Python, Protobuf, Thrift, Avro, MessagePack, FlatBuffers, Cap'n Proto, Bebop, ReScript, JSON Schema, GraphQL, TOML
-- ✅ CLI with analysis, optimization suggestions, code generation
-- ✅ Formal proofs in Agda (5 theorems); additional proofs in Lean, Coq, Isabelle, and Z3
-- ✅ Zero-copy benchmarks (~1ns Concorde, ~100-1000ns Wheelbarrow)
-
-## Try It
-
-```bash
-git clone https://github.com/hyperpolymath/protocol-squisher
-cd protocol-squisher/examples/zero-copy-demo
-./build.sh
-python test.py # See ~1ns field access
-
-# Or install CLI
-cargo install --path crates/protocol-squisher-cli
-protocol-squisher --help
-```
-
-**Documentation:**
-- CLI Guide: https://github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
-- Examples: https://github.com/hyperpolymath/protocol-squisher/tree/main/examples
-- Formal Proofs: https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
-
-## Why This Matters
-
-Polyglot systems are the norm. Every microservice boundary is a potential serialization mismatch. Manual adapters are:
-- Time-consuming
-- Error-prone
-- Unmaintained (bit rot)
-
-Protocol Squisher makes format interop a build step, not a maintenance burden.
-
-## Limitations (We're Honest)
-
-1. **Wheelbarrow class is slow** - Narrowing conversions need JSON (100-1000x overhead)
-2. **Analysis requires schemas** - No runtime schema inference yet
-3. **Optimization coverage varies by format pair** - Some pairs remain Wheelbarrow-class until optimizer/synthesis tuning improves
-
-We document losses upfront. No surprises.
-
-## Contributing
-
-We need:
-- Real-world schema examples that break our analysis
-- Edge cases in formal proofs (help us finish the partial proofs!)
-- Performance optimizations
-- New format analyzers (gRPC, Excel, etc.)
-
-Issues: https://github.com/hyperpolymath/protocol-squisher/issues
-
-## License
-
-MPL-2.0 (Palimpsest License)
-
----
-
-Built by [@hyperpolymath](https://github.com/hyperpolymath). Inspired by every polyglot developer who's cursed at FFI boilerplate.
-
-Questions? Comments? Found an edge case that breaks the invariant? Let's hear it.
diff --git a/provenance/docs/launch/LAUNCH-CHECKLIST.adoc b/provenance/docs/launch/LAUNCH-CHECKLIST.adoc
new file mode 100644
index 0000000..617de1a
--- /dev/null
+++ b/provenance/docs/launch/LAUNCH-CHECKLIST.adoc
@@ -0,0 +1,304 @@
+== Protocol Squisher Launch Checklist
+
+*Use this checklist on launch day to ensure everything is ready.*
+
+'''''
+
+=== Pre-Launch Verification (Do This First)
+
+==== Technical Verification
+
+* [ ] Refresh launch metrics snapshot:
+`+./scripts/ci/refresh-launch-metrics.sh+`
+* [ ] Run full test suite: `+cargo test --all+` (record current pass
+count in announcements; as of 2026-02-24: 678 passed, 7 ignored, 0
+failed)
+* [ ] Run examples:
+`+cd examples/zero-copy-demo && ./build.sh && python test.py+`
+* [ ] Verify CLI builds:
+`+cargo build --release -p protocol-squisher-cli+`
+* [ ] Check CI status: All workflows green on GitHub
+* [ ] Verify docs build: No broken links in documentation
+* [ ] Run benchmarks: Confirm performance numbers match announcements
+
+==== Content Verification
+
+* [ ] GitHub links correct in all announcements
+* [ ] Social handles updated (replace `+@hyperpolymath+` if needed)
+* [ ] Performance numbers match latest benchmarks
+* [ ] Test count accurate (as of 2026-02-24: 678 passed, 7 ignored)
+* [ ] Examples referenced in announcements still exist
+* [ ] License information correct (MPL-2.0)
+
+==== Repository Readiness
+
+* [ ] README.adoc up to date
+* [ ] CHANGELOG.md current
+* [ ] LICENSE file present
+* [ ] SECURITY.md present
+* [ ] CONTRIBUTING.adoc present
+* [ ] All example READMEs current
+* [ ] Proofs verified (if mentioning in announcements)
+
+'''''
+
+=== Launch Sequence (In Order)
+
+==== Phase 1: Hacker News (Day 1, Monday 8-10am EST)
+
+*Timing:* Post during US East Coast morning hours for maximum
+visibility.
+
+*Steps:* 1. [ ] Copy content from `+HN-ANNOUNCEMENT.md+` 2. [ ] Submit
+to Hacker News: https://news.ycombinator.com/submit 3. [ ] Use title:
+"`Protocol Squisher: Universal Protocol Interoperability with Formal
+Guarantees`" 4. [ ] Add URL:
+`+https://github.com/hyperpolymath/protocol-squisher+` 5. [ ] Set up
+notifications for HN comments 6. [ ] Monitor thread for first 4 hours
+(respond quickly)
+
+*Expected Response Time:* - First hour: Respond within 15 minutes -
+First day: Respond within 2 hours - Rest of week: Respond within 24
+hours
+
+*Common Questions to Prepare For:* - "`Why not just use JSON?`" (See
+response templates in README.md) - "`How is this different from X?`" (X
+= Protobuf, gRPC, etc.) - "`What about performance?`" (Point to
+benchmarks) - "`Can I trust the formal proofs?`" (Link to `+/proofs+`
+directory)
+
+'''''
+
+==== Phase 2: Reddit (Day 2-3, Tuesday-Wednesday)
+
+*Target Subreddits:* 1. r/rust (most relevant) 2. r/programming (broader
+audience) 3. r/Python (Python FFI users)
+
+*Steps for Each Subreddit:*
+
+===== r/rust (Tuesday)
+
+[arabic]
+. ☐ Check r/rust rules (no spam, check if self-promotion allowed)
+. ☐ Copy content from `+REDDIT-ANNOUNCEMENT.md+`
+. ☐ Post with title: "`I built a tool that auto-generates adapters
+between any two serialization formats (Rust↔Python working, 678 tests,
+formally verified)`"
+. ☐ Add flair if required
+. ☐ Monitor comments
+
+===== r/programming (Wednesday)
+
+[arabic]
+. ☐ Check r/programming rules
+. ☐ Post same content (or slightly modified)
+. ☐ Engage with community
+
+===== r/Python (Wednesday afternoon)
+
+[arabic]
+. ☐ Check r/Python rules
+. ☐ Emphasize Python FFI pain points
+. ☐ Show PyO3 boilerplate reduction
+
+*Reddit Engagement Tips:* - Be humble ("`This is an MVP, looking for
+feedback`") - Acknowledge limitations upfront - Thank people for
+suggestions - Don’t be defensive about criticism - Upvote constructive
+comments
+
+'''''
+
+==== Phase 3: Twitter (Day 4, Thursday)
+
+*Steps:* 1. [ ] Copy thread from `+TWEET-THREAD.md+` 2. [ ] Post first
+tweet as standalone 3. [ ] Reply to first tweet with thread 4. [ ] Use
+hashtags: #RustLang #Python #FFI #FormalVerification 5. [ ] Pin thread
+to profile 6. [ ] Retweet with quote tweet later in day (different
+timezone)
+
+*Thread Posting Tips:* - Post entire thread at once (don’t post tweets
+over hours) - Number tweets (1/20, 2/20, etc.) for clarity - Use thread
+reader if available - Engage with replies throughout the day
+
+*Best Times to Post (EST):* - 8-10am (US East Coast morning) - 12-2pm
+(US lunch time) - 5-7pm (US evening, EU night)
+
+'''''
+
+==== Phase 4: Blog (Day 4-5, Thursday-Friday)
+
+*Steps:* 1. [ ] Copy content from `+BLOG-POST.md+` 2. [ ] Add
+screenshots/diagrams if available 3. [ ] Publish to
+blog.hyperpolymath.io (or equivalent) 4. [ ] Share link on HN thread
+(comment: "`I wrote a longer explanation here…`") 5. [ ] Share link on
+Reddit threads 6. [ ] Share on Twitter as new tweet 7. [ ] Post to
+LinkedIn (professional audience) 8. [ ] Submit to aggregators: - [ ]
+dev.to - [ ] Medium (cross-post) - [ ] Hashnode
+
+'''''
+
+==== Phase 5: LinkedIn (Day 5, Friday)
+
+*Steps:* 1. [ ] Create shorter post (~500 words) 2. [ ] Link to full
+blog post 3. [ ] Emphasize business value: - Reduced maintenance burden
+- Faster development - Formal correctness guarantees 4. [ ] Tag relevant
+connections 5. [ ] Share in relevant groups
+
+'''''
+
+=== Monitoring & Engagement (Ongoing)
+
+==== Daily (Week 1)
+
+* [ ] Check HN thread (2x per day minimum)
+* [ ] Check Reddit threads (2x per day)
+* [ ] Check Twitter mentions (3x per day)
+* [ ] Check GitHub issues (3x per day)
+* [ ] Respond to all comments within 24h
+
+==== GitHub Engagement
+
+* [ ] Star notifications enabled
+* [ ] Issue notifications enabled
+* [ ] PR notifications enabled
+* [ ] Triage issues daily
+* [ ] Label issues: `+bug+`, `+enhancement+`, `+question+`,
+`+help wanted+`
+* [ ] Pin important issues (FAQ, known limitations)
+
+==== Response Time Targets
+
+* *GitHub issues:* <24 hours
+* *HN comments:* <4 hours (day 1), <24 hours (after)
+* *Reddit comments:* <12 hours
+* *Twitter mentions:* <6 hours
+* *Email:* <48 hours
+
+'''''
+
+=== Metrics Tracking
+
+==== Daily Metrics (Week 1)
+
+* [ ] GitHub stars (target: 100+ by end of week)
+* [ ] GitHub issues opened
+* [ ] HN points and comments
+* [ ] Reddit upvotes and comments
+* [ ] Twitter impressions and engagement
+* [ ] CLI downloads (crates.io)
+
+==== Weekly Metrics (Month 1)
+
+* [ ] Active GitHub contributors
+* [ ] Example forks
+* [ ] Real-world usage mentions
+* [ ] Blog post views
+* [ ] Documentation page views
+
+==== Success Criteria (Week 1)
+
+* ✅ 100+ GitHub stars
+* ✅ 50+ HN points
+* ✅ 10+ substantial GitHub issues
+* ✅ 5+ community comments on design
+* ✅ 1+ contributor PR
+
+'''''
+
+=== Common Issues & Solutions
+
+==== Issue: Low HN Engagement
+
+*Solutions:* - Post earlier in day (8am EST) - Engage in comments early
+(first 30 mins critical) - Ask a question in comments to spark
+discussion - Don’t edit/delete post (HN penalizes this)
+
+==== Issue: Negative Feedback
+
+*Solutions:* - Don’t be defensive - Thank them for feedback - Ask
+clarifying questions - Update roadmap if valid criticism - Be
+transparent about limitations
+
+==== Issue: Too Many GitHub Issues
+
+*Solutions:* - Triage immediately (label everything) - Create FAQ issue
+and pin it - Close duplicates (link to original) - Use issue templates -
+Set expectations on response time
+
+==== Issue: Questions You Can’t Answer
+
+*Solutions:* - Be honest: "`I don’t know, let me investigate`" - Create
+tracking issue - Update documentation with answer later - Thank them for
+exposing edge case
+
+'''''
+
+=== Post-Launch Action Items (Day 7+)
+
+==== Week 2
+
+* [ ] Write follow-up blog post addressing common questions
+* [ ] Create GitHub Project board for roadmap
+* [ ] Set up Discussions for non-issue questions
+* [ ] Update README with community feedback
+* [ ] Add contributors to CONTRIBUTORS.md
+* [ ] Create CHANGELOG entry for feedback
+
+==== Month 2
+
+* [ ] Implement high-priority feature requests
+* [ ] Write case study if real-world adoption
+* [ ] Present at local Rust meetup
+* [ ] Submit talk proposal to conference
+* [ ] Start Phase 3 hardening work (real-world validation, synthesis,
+advanced features)
+
+==== Month 3
+
+* [ ] Publish academic paper on formal verification
+* [ ] Create video tutorial series
+* [ ] Write advanced blog posts (optimization, internals)
+* [ ] Reach out to potential corporate users
+* [ ] Plan v1.0 release
+
+'''''
+
+=== Emergency Contacts
+
+*If you need help during launch:* - GitHub Issues:
+https://github.com/hyperpolymath/protocol-squisher/issues - Email: (add
+your email) - Twitter: @hyperpolymath - Discord: (add if you have
+community server)
+
+'''''
+
+=== Launch Day Mental Checklist
+
+* [ ] *Don’t panic* - Not everyone will love it, that’s OK
+* [ ] *Be humble* - It’s an MVP, acknowledge limitations
+* [ ] *Be responsive* - Quick responses show you care
+* [ ] *Be grateful* - Thank everyone for engagement
+* [ ] *Be honest* - Don’t overpromise or hide issues
+* [ ] *Be patient* - Adoption takes time
+* [ ] *Have fun* - You built something cool, enjoy the launch!
+
+'''''
+
+=== Final Pre-Launch Check
+
+*Right before hitting "`submit`":* - [ ] Deep breath - [ ] Examples
+working? (run `+examples/zero-copy-demo/test.py+`) - [ ] Tests passing?
+(`+cargo test --all+`) - [ ] CI green? - [ ] Announcement spell-checked?
+- [ ] Links working? - [ ] Ready to engage for next 24 hours?
+
+*If yes to all above:* Launch! 🚀
+
+'''''
+
+*Good luck! You’ve built something valuable. Time to share it with the
+world.*
+
+'''''
+
+_Bookmark this page and check off items as you go. Update metrics daily
+for first week._
diff --git a/provenance/docs/launch/LAUNCH-CHECKLIST.md b/provenance/docs/launch/LAUNCH-CHECKLIST.md
deleted file mode 100644
index ef3b532..0000000
--- a/provenance/docs/launch/LAUNCH-CHECKLIST.md
+++ /dev/null
@@ -1,310 +0,0 @@
-
-# Protocol Squisher Launch Checklist
-
-**Use this checklist on launch day to ensure everything is ready.**
-
----
-
-## Pre-Launch Verification (Do This First)
-
-### Technical Verification
-- [ ] Refresh launch metrics snapshot: `./scripts/ci/refresh-launch-metrics.sh`
-- [ ] Run full test suite: `cargo test --all` (record current pass count in announcements; as of 2026-02-24: 678 passed, 7 ignored, 0 failed)
-- [ ] Run examples: `cd examples/zero-copy-demo && ./build.sh && python test.py`
-- [ ] Verify CLI builds: `cargo build --release -p protocol-squisher-cli`
-- [ ] Check CI status: All workflows green on GitHub
-- [ ] Verify docs build: No broken links in documentation
-- [ ] Run benchmarks: Confirm performance numbers match announcements
-
-### Content Verification
-- [ ] GitHub links correct in all announcements
-- [ ] Social handles updated (replace `@hyperpolymath` if needed)
-- [ ] Performance numbers match latest benchmarks
-- [ ] Test count accurate (as of 2026-02-24: 678 passed, 7 ignored)
-- [ ] Examples referenced in announcements still exist
-- [ ] License information correct (MPL-2.0)
-
-### Repository Readiness
-- [ ] README.adoc up to date
-- [ ] CHANGELOG.md current
-- [ ] LICENSE file present
-- [ ] SECURITY.md present
-- [ ] CONTRIBUTING.adoc present
-- [ ] All example READMEs current
-- [ ] Proofs verified (if mentioning in announcements)
-
----
-
-## Launch Sequence (In Order)
-
-### Phase 1: Hacker News (Day 1, Monday 8-10am EST)
-
-**Timing:** Post during US East Coast morning hours for maximum visibility.
-
-**Steps:**
-1. [ ] Copy content from `HN-ANNOUNCEMENT.md`
-2. [ ] Submit to Hacker News: https://news.ycombinator.com/submit
-3. [ ] Use title: "Protocol Squisher: Universal Protocol Interoperability with Formal Guarantees"
-4. [ ] Add URL: `https://github.com/hyperpolymath/protocol-squisher`
-5. [ ] Set up notifications for HN comments
-6. [ ] Monitor thread for first 4 hours (respond quickly)
-
-**Expected Response Time:**
-- First hour: Respond within 15 minutes
-- First day: Respond within 2 hours
-- Rest of week: Respond within 24 hours
-
-**Common Questions to Prepare For:**
-- "Why not just use JSON?" (See response templates in README.md)
-- "How is this different from X?" (X = Protobuf, gRPC, etc.)
-- "What about performance?" (Point to benchmarks)
-- "Can I trust the formal proofs?" (Link to `/proofs` directory)
-
----
-
-### Phase 2: Reddit (Day 2-3, Tuesday-Wednesday)
-
-**Target Subreddits:**
-1. r/rust (most relevant)
-2. r/programming (broader audience)
-3. r/Python (Python FFI users)
-
-**Steps for Each Subreddit:**
-
-#### r/rust (Tuesday)
-1. [ ] Check r/rust rules (no spam, check if self-promotion allowed)
-2. [ ] Copy content from `REDDIT-ANNOUNCEMENT.md`
-3. [ ] Post with title: "I built a tool that auto-generates adapters between any two serialization formats (Rust↔Python working, 678 tests, formally verified)"
-4. [ ] Add flair if required
-5. [ ] Monitor comments
-
-#### r/programming (Wednesday)
-1. [ ] Check r/programming rules
-2. [ ] Post same content (or slightly modified)
-3. [ ] Engage with community
-
-#### r/Python (Wednesday afternoon)
-1. [ ] Check r/Python rules
-2. [ ] Emphasize Python FFI pain points
-3. [ ] Show PyO3 boilerplate reduction
-
-**Reddit Engagement Tips:**
-- Be humble ("This is an MVP, looking for feedback")
-- Acknowledge limitations upfront
-- Thank people for suggestions
-- Don't be defensive about criticism
-- Upvote constructive comments
-
----
-
-### Phase 3: Twitter (Day 4, Thursday)
-
-**Steps:**
-1. [ ] Copy thread from `TWEET-THREAD.md`
-2. [ ] Post first tweet as standalone
-3. [ ] Reply to first tweet with thread
-4. [ ] Use hashtags: #RustLang #Python #FFI #FormalVerification
-5. [ ] Pin thread to profile
-6. [ ] Retweet with quote tweet later in day (different timezone)
-
-**Thread Posting Tips:**
-- Post entire thread at once (don't post tweets over hours)
-- Number tweets (1/20, 2/20, etc.) for clarity
-- Use thread reader if available
-- Engage with replies throughout the day
-
-**Best Times to Post (EST):**
-- 8-10am (US East Coast morning)
-- 12-2pm (US lunch time)
-- 5-7pm (US evening, EU night)
-
----
-
-### Phase 4: Blog (Day 4-5, Thursday-Friday)
-
-**Steps:**
-1. [ ] Copy content from `BLOG-POST.md`
-2. [ ] Add screenshots/diagrams if available
-3. [ ] Publish to blog.hyperpolymath.io (or equivalent)
-4. [ ] Share link on HN thread (comment: "I wrote a longer explanation here...")
-5. [ ] Share link on Reddit threads
-6. [ ] Share on Twitter as new tweet
-7. [ ] Post to LinkedIn (professional audience)
-8. [ ] Submit to aggregators:
- - [ ] dev.to
- - [ ] Medium (cross-post)
- - [ ] Hashnode
-
----
-
-### Phase 5: LinkedIn (Day 5, Friday)
-
-**Steps:**
-1. [ ] Create shorter post (~500 words)
-2. [ ] Link to full blog post
-3. [ ] Emphasize business value:
- - Reduced maintenance burden
- - Faster development
- - Formal correctness guarantees
-4. [ ] Tag relevant connections
-5. [ ] Share in relevant groups
-
----
-
-## Monitoring & Engagement (Ongoing)
-
-### Daily (Week 1)
-- [ ] Check HN thread (2x per day minimum)
-- [ ] Check Reddit threads (2x per day)
-- [ ] Check Twitter mentions (3x per day)
-- [ ] Check GitHub issues (3x per day)
-- [ ] Respond to all comments within 24h
-
-### GitHub Engagement
-- [ ] Star notifications enabled
-- [ ] Issue notifications enabled
-- [ ] PR notifications enabled
-- [ ] Triage issues daily
-- [ ] Label issues: `bug`, `enhancement`, `question`, `help wanted`
-- [ ] Pin important issues (FAQ, known limitations)
-
-### Response Time Targets
-- **GitHub issues:** <24 hours
-- **HN comments:** <4 hours (day 1), <24 hours (after)
-- **Reddit comments:** <12 hours
-- **Twitter mentions:** <6 hours
-- **Email:** <48 hours
-
----
-
-## Metrics Tracking
-
-### Daily Metrics (Week 1)
-- [ ] GitHub stars (target: 100+ by end of week)
-- [ ] GitHub issues opened
-- [ ] HN points and comments
-- [ ] Reddit upvotes and comments
-- [ ] Twitter impressions and engagement
-- [ ] CLI downloads (crates.io)
-
-### Weekly Metrics (Month 1)
-- [ ] Active GitHub contributors
-- [ ] Example forks
-- [ ] Real-world usage mentions
-- [ ] Blog post views
-- [ ] Documentation page views
-
-### Success Criteria (Week 1)
-- ✅ 100+ GitHub stars
-- ✅ 50+ HN points
-- ✅ 10+ substantial GitHub issues
-- ✅ 5+ community comments on design
-- ✅ 1+ contributor PR
-
----
-
-## Common Issues & Solutions
-
-### Issue: Low HN Engagement
-**Solutions:**
-- Post earlier in day (8am EST)
-- Engage in comments early (first 30 mins critical)
-- Ask a question in comments to spark discussion
-- Don't edit/delete post (HN penalizes this)
-
-### Issue: Negative Feedback
-**Solutions:**
-- Don't be defensive
-- Thank them for feedback
-- Ask clarifying questions
-- Update roadmap if valid criticism
-- Be transparent about limitations
-
-### Issue: Too Many GitHub Issues
-**Solutions:**
-- Triage immediately (label everything)
-- Create FAQ issue and pin it
-- Close duplicates (link to original)
-- Use issue templates
-- Set expectations on response time
-
-### Issue: Questions You Can't Answer
-**Solutions:**
-- Be honest: "I don't know, let me investigate"
-- Create tracking issue
-- Update documentation with answer later
-- Thank them for exposing edge case
-
----
-
-## Post-Launch Action Items (Day 7+)
-
-### Week 2
-- [ ] Write follow-up blog post addressing common questions
-- [ ] Create GitHub Project board for roadmap
-- [ ] Set up Discussions for non-issue questions
-- [ ] Update README with community feedback
-- [ ] Add contributors to CONTRIBUTORS.md
-- [ ] Create CHANGELOG entry for feedback
-
-### Month 2
-- [ ] Implement high-priority feature requests
-- [ ] Write case study if real-world adoption
-- [ ] Present at local Rust meetup
-- [ ] Submit talk proposal to conference
-- [ ] Start Phase 3 hardening work (real-world validation, synthesis, advanced features)
-
-### Month 3
-- [ ] Publish academic paper on formal verification
-- [ ] Create video tutorial series
-- [ ] Write advanced blog posts (optimization, internals)
-- [ ] Reach out to potential corporate users
-- [ ] Plan v1.0 release
-
----
-
-## Emergency Contacts
-
-**If you need help during launch:**
-- GitHub Issues: https://github.com/hyperpolymath/protocol-squisher/issues
-- Email: (add your email)
-- Twitter: @hyperpolymath
-- Discord: (add if you have community server)
-
----
-
-## Launch Day Mental Checklist
-
-- [ ] **Don't panic** - Not everyone will love it, that's OK
-- [ ] **Be humble** - It's an MVP, acknowledge limitations
-- [ ] **Be responsive** - Quick responses show you care
-- [ ] **Be grateful** - Thank everyone for engagement
-- [ ] **Be honest** - Don't overpromise or hide issues
-- [ ] **Be patient** - Adoption takes time
-- [ ] **Have fun** - You built something cool, enjoy the launch!
-
----
-
-## Final Pre-Launch Check
-
-**Right before hitting "submit":**
-- [ ] Deep breath
-- [ ] Examples working? (run `examples/zero-copy-demo/test.py`)
-- [ ] Tests passing? (`cargo test --all`)
-- [ ] CI green?
-- [ ] Announcement spell-checked?
-- [ ] Links working?
-- [ ] Ready to engage for next 24 hours?
-
-**If yes to all above:** Launch! 🚀
-
----
-
-**Good luck! You've built something valuable. Time to share it with the world.**
-
----
-
-*Bookmark this page and check off items as you go. Update metrics daily for first week.*
diff --git a/provenance/docs/launch/METRICS.adoc b/provenance/docs/launch/METRICS.adoc
new file mode 100644
index 0000000..7e14658
--- /dev/null
+++ b/provenance/docs/launch/METRICS.adoc
@@ -0,0 +1,13 @@
+== Launch Metrics
+
+* Generated at (UTC): 2026-02-28
+* Git tag: `+v1.1.0+`
+* Command: `+cargo test --workspace+`
+* Result: 937 passed, 0 ignored, 0 failed
+
+=== Notes
+
+* Regenerate before posting announcements:
+`+./scripts/ci/refresh-launch-metrics.sh+`
+* This file is intended as the single source of truth for launch copy
+metrics.
diff --git a/provenance/docs/launch/METRICS.md b/provenance/docs/launch/METRICS.md
deleted file mode 100644
index 6e13738..0000000
--- a/provenance/docs/launch/METRICS.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-# Launch Metrics
-
-- Generated at (UTC): 2026-02-28
-- Git tag: `v1.1.0`
-- Command: `cargo test --workspace`
-- Result: 937 passed, 0 ignored, 0 failed
-
-## Notes
-
-- Regenerate before posting announcements:
- `./scripts/ci/refresh-launch-metrics.sh`
-- This file is intended as the single source of truth for launch copy metrics.
diff --git a/provenance/docs/launch/README.adoc b/provenance/docs/launch/README.adoc
new file mode 100644
index 0000000..931cb2e
--- /dev/null
+++ b/provenance/docs/launch/README.adoc
@@ -0,0 +1,314 @@
+== Protocol Squisher Launch Announcements
+
+This directory contains ready-to-post launch announcements for Protocol
+Squisher.
+
+=== Status
+
+*Project Status:* Phase 2 Format Expansion Complete - 678 tests passing,
+7 ignored (as of 2026-02-24) - Rust ↔ Python fully working - 4 transport
+classes implemented - Formal verification (Agda + Lean) - Comprehensive
+documentation
+
+*Launch Readiness:* HN copy finalized and launch assets ready; posting
+still pending.
+
+=== Files
+
+==== 1. HN-ANNOUNCEMENT.md
+
+*Platform:* Hacker News *Audience:* Technical developers, systems
+programmers *Tone:* Technical, concise, show-don’t-tell *Length:* ~1200
+words
+
+*Key Points:* - Leads with the problem (manual FFI pain) - Shows CLI
+workflow with code examples - Explains transport classes technically -
+Emphasizes formal verification - Includes real performance numbers -
+Honest about limitations
+
+*When to Post:* Prime time for HN is 8-10am EST on weekdays.
+
+*Suggested Title:* > Protocol Squisher: Universal Protocol
+Interoperability with Formal Guarantees
+
+'''''
+
+==== 2. REDDIT-ANNOUNCEMENT.md
+
+*Platform:* Reddit (r/rust, r/programming, r/Python) *Audience:*
+Programming community, FFI users *Tone:* Conversational, relatable,
+problem-focused *Length:* ~1000 words
+
+*Key Points:* - Emphasizes the pain point (we’ve all been there) - Shows
+before/after comparison - Real performance benchmarks - More casual than
+HN version - Explicit call for feedback - Acknowledges it’s an MVP
+
+*When to Post:* Varies by subreddit. Check r/rust rules first.
+
+*Suggested Title:* > I built a tool that auto-generates adapters between
+any two serialization formats (Rust↔Python working, 678 tests, formally
+verified)
+
+'''''
+
+==== 3. BLOG-POST.md
+
+*Platform:* blog.hyperpolymath.io or personal blog *Audience:* Deep
+technical dive, architecture enthusiasts *Tone:* Educational, thorough,
+narrative *Length:* ~3500 words
+
+*Key Points:* - Full problem → solution → architecture narrative -
+Detailed explanation of transport classes - Complete CLI workflow
+walkthrough - Formal verification deep dive (theorem statements +
+proofs) - Design philosophy - Future roadmap - Multiple code examples
+
+*Use Case:* Long-form content for blog, link from shorter announcements.
+
+'''''
+
+==== 4. TWEET-THREAD.md
+
+*Platform:* Twitter/X *Audience:* Tech Twitter, quick-scrollers *Tone:*
+Punchy, visual, bite-sized *Length:* 20 tweets (main thread) + 6 reply
+tweets (technical deep dive)
+
+*Structure:* 1. Hook (tweet 1) 2. Problem (tweets 2-3) 3. Solution
+(tweets 4-9) 4. Proof/performance (tweets 10-11) 5. Demo (tweets 12-13)
+6. Context (tweets 14-16) 7. Philosophy (tweet 17) 8. Future (tweet 18)
+9. Links (tweet 19) 10. CTA (tweet 20)
+
+*Reply Thread:* Technical deep dive for those who want more detail.
+
+*Timing:* Post during US work hours for maximum engagement.
+
+'''''
+
+==== 5. METRICS.md
+
+*Platform:* Internal source-of-truth for launch copy numbers *Audience:*
+Maintainers preparing announcements *Tone:* Factual, machine-verifiable
+*Length:* Short
+
+*Purpose:* - Single metric source for announcement stats - Generated by
+`+./scripts/ci/refresh-launch-metrics.sh+` - Captures commit + test
+command + pass/fail/ignored counts
+
+'''''
+
+=== Customization Before Posting
+
+==== Required Changes
+
+[arabic]
+. *Update GitHub links* if repo is not at
+`+github.com/hyperpolymath/protocol-squisher+`
+. *Add social handles* (replace `+@hyperpolymath+` with actual
+Twitter/GitHub handle)
+. *Verify examples* - Ensure all code examples still work with latest
+version
+. *Check performance numbers* - Re-run benchmarks if code has changed
+
+==== Optional Additions
+
+[arabic]
+. *Screenshots* - Add CLI output screenshots to blog post
+. *Diagrams* - Architecture diagrams for blog post
+. *GIFs* - Demo GIFs for Twitter/Reddit
+. *Video demo* - Record terminal session for YouTube
+
+'''''
+
+=== Launch Strategy
+
+==== Phase 1: Soft Launch (Week 1)
+
+*Day 1:* - [ ] Post to Hacker News (HN-ANNOUNCEMENT.md) - [ ] Monitor
+comments, engage with questions - [ ] Address any critical feedback
+
+*Day 2-3:* - [ ] Post to Reddit (r/rust, r/programming, r/Python) - [ ]
+Cross-post to relevant subreddits - [ ] Engage with community feedback
+
+*Day 4-5:* - [ ] Publish blog post - [ ] Share on Twitter
+(TWEET-THREAD.md) - [ ] Post to LinkedIn (link to blog)
+
+==== Phase 2: Community Engagement (Week 2-4)
+
+* [ ] Respond to all GitHub issues
+* [ ] Incorporate feedback into roadmap
+* [ ] Write follow-up posts addressing common questions
+* [ ] Engage with early adopters
+
+==== Phase 3: Iteration (Month 2+)
+
+* [ ] Implement high-priority feature requests
+* [ ] Expand format support (Phase 2)
+* [ ] Write case studies from real users
+* [ ] Present at meetups/conferences
+
+'''''
+
+=== Key Messages (Consistent Across All Platforms)
+
+==== The Invariant
+
+____
+*"`If it compiles, it carries.`"*
+
+For any valid input in format A, there exists a valid output in format
+B.
+____
+
+This is THE core message. Every announcement includes it.
+
+==== Transport Classes
+
+Always explain the 4 classes: - *Concorde*: 100% fidelity, 0% overhead
+(~1ns) - *Business*: 98% fidelity, 5% overhead (~5ns) - *Economy*: 80%
+fidelity, 25% overhead (~50ns) - *Wheelbarrow*: 50% fidelity, 80%
+overhead (~1000ns)
+
+==== Formal Verification
+
+Emphasize that this isn’t just tested, it’s *proven*: - 4 theorems -
+Agda + Lean - Cross-validated - Available in `+/proofs+`
+
+==== Honesty About Limitations
+
+Never hide the costs: - Wheelbarrow is slow (by design) - Optimization
+quality varies by format pair - No runtime inference - Enum
+compatibility is tricky
+
+'''''
+
+=== Response Templates
+
+==== "`Why not just use JSON everywhere?`"
+
+____
+JSON works, but it’s slow and loses type information. Protocol Squisher
+gives you zero-copy when possible (Concorde class, ~1ns) and falls back
+to JSON only when necessary (Wheelbarrow class). Plus, we tell you the
+cost upfront.
+____
+
+==== "`How is this different from Protobuf/gRPC?`"
+
+____
+Protobuf requires everyone use the same format. Protocol Squisher
+bridges _existing_ formats. Use it when you have a Rust serde service
+talking to a Python Pydantic service and you don’t want to rewrite
+either.
+____
+
+==== "`What about runtime overhead?`"
+
+____
+Concorde class has ~1ns overhead (direct memory access). Business class
+is ~5ns (safe conversions). Economy is ~50ns. Wheelbarrow is ~1000ns
+(JSON fallback). The tool tells you which class you get before
+generating code.
+____
+
+==== "`Can I trust the formal proofs?`"
+
+____
+We’ve proven 4 core theorems in Agda and cross-validated in Lean. The
+proofs are in the `+/proofs+` directory. You can verify them yourself
+with `+agda+` or `+lean+`. We’re happy to discuss the proof strategy.
+____
+
+==== "`Why should I use this instead of writing FFI myself?`"
+
+____
+[arabic]
+. Time savings (5 lines vs 200+ lines)
+. Correctness (formally proven vs manual)
+. Maintenance (auto-regenerate vs manual updates)
+. Type safety (compile-time checks vs runtime errors)
+. Performance analysis (transport class warnings)
+____
+
+'''''
+
+=== Metrics to Track
+
+==== Engagement
+
+* [ ] GitHub stars
+* [ ] GitHub issues opened
+* [ ] HN points + comments
+* [ ] Reddit upvotes + comments
+* [ ] Twitter impressions + engagement
+
+==== Adoption
+
+* [ ] CLI downloads (crates.io)
+* [ ] Example usage (forks, PRs)
+* [ ] Real-world adoption (mentions, case studies)
+
+==== Feedback
+
+* [ ] Feature requests
+* [ ] Bug reports
+* [ ] Edge cases discovered
+* [ ] Format requests
+
+'''''
+
+=== Post-Launch Action Items
+
+==== Immediate (Week 1)
+
+* [ ] Monitor all announcement threads
+* [ ] Respond to questions within 24h
+* [ ] Triage GitHub issues
+* [ ] Update README with any critical feedback
+
+==== Short-term (Month 1)
+
+* [ ] Write follow-up blog post addressing common questions
+* [ ] Create video demo
+* [ ] Add frequently requested features
+* [ ] Improve documentation based on user confusion
+
+==== Medium-term (Quarter 1)
+
+* [ ] Drive Phase 3 hardening (real-world validation, synthesis,
+advanced features)
+* [ ] Present at Rust meetup
+* [ ] Write academic paper on formal verification
+* [ ] Reach 1000 GitHub stars
+
+'''''
+
+=== Contact Info for Announcements
+
+*GitHub:* https://github.com/hyperpolymath/protocol-squisher *Issues:*
+https://github.com/hyperpolymath/protocol-squisher/issues *Author:*
+https://github.com/hyperpolymath[@hyperpolymath] *License:* MPL-2.0
+
+'''''
+
+=== Final Checklist Before Launch
+
+* [ ] Refresh launch metrics
+(`+./scripts/ci/refresh-launch-metrics.sh+`)
+* [ ] All tests passing (`+cargo test --all+`: 678 passed, 7 ignored, 0
+failed)
+* [ ] Documentation complete
+* [ ] Examples working
+* [ ] Formal proofs verified
+* [ ] README up to date
+* [ ] CHANGELOG current
+* [ ] LICENSE file present
+* [ ] SECURITY.md present
+* [ ] CONTRIBUTING.md present
+* [ ] CI/CD green
+* [ ] Performance benchmarks run
+* [ ] Announcement drafts reviewed
+* [ ] Social media accounts ready
+* [ ] Response templates prepared
+
+'''''
+
+*Last Updated:* 2026-02-24 *Status:* Ready for launch 🚀
diff --git a/provenance/docs/launch/README.md b/provenance/docs/launch/README.md
deleted file mode 100644
index 69a5248..0000000
--- a/provenance/docs/launch/README.md
+++ /dev/null
@@ -1,311 +0,0 @@
-
-# Protocol Squisher Launch Announcements
-
-This directory contains ready-to-post launch announcements for Protocol Squisher.
-
-## Status
-
-**Project Status:** Phase 2 Format Expansion Complete
-- 678 tests passing, 7 ignored (as of 2026-02-24)
-- Rust ↔ Python fully working
-- 4 transport classes implemented
-- Formal verification (Agda + Lean)
-- Comprehensive documentation
-
-**Launch Readiness:** HN copy finalized and launch assets ready; posting still pending.
-
-## Files
-
-### 1. HN-ANNOUNCEMENT.md
-**Platform:** Hacker News
-**Audience:** Technical developers, systems programmers
-**Tone:** Technical, concise, show-don't-tell
-**Length:** ~1200 words
-
-**Key Points:**
-- Leads with the problem (manual FFI pain)
-- Shows CLI workflow with code examples
-- Explains transport classes technically
-- Emphasizes formal verification
-- Includes real performance numbers
-- Honest about limitations
-
-**When to Post:** Prime time for HN is 8-10am EST on weekdays.
-
-**Suggested Title:**
-> Protocol Squisher: Universal Protocol Interoperability with Formal Guarantees
-
----
-
-### 2. REDDIT-ANNOUNCEMENT.md
-**Platform:** Reddit (r/rust, r/programming, r/Python)
-**Audience:** Programming community, FFI users
-**Tone:** Conversational, relatable, problem-focused
-**Length:** ~1000 words
-
-**Key Points:**
-- Emphasizes the pain point (we've all been there)
-- Shows before/after comparison
-- Real performance benchmarks
-- More casual than HN version
-- Explicit call for feedback
-- Acknowledges it's an MVP
-
-**When to Post:** Varies by subreddit. Check r/rust rules first.
-
-**Suggested Title:**
-> I built a tool that auto-generates adapters between any two serialization formats (Rust↔Python working, 678 tests, formally verified)
-
----
-
-### 3. BLOG-POST.md
-**Platform:** blog.hyperpolymath.io or personal blog
-**Audience:** Deep technical dive, architecture enthusiasts
-**Tone:** Educational, thorough, narrative
-**Length:** ~3500 words
-
-**Key Points:**
-- Full problem → solution → architecture narrative
-- Detailed explanation of transport classes
-- Complete CLI workflow walkthrough
-- Formal verification deep dive (theorem statements + proofs)
-- Design philosophy
-- Future roadmap
-- Multiple code examples
-
-**Use Case:** Long-form content for blog, link from shorter announcements.
-
----
-
-### 4. TWEET-THREAD.md
-**Platform:** Twitter/X
-**Audience:** Tech Twitter, quick-scrollers
-**Tone:** Punchy, visual, bite-sized
-**Length:** 20 tweets (main thread) + 6 reply tweets (technical deep dive)
-
-**Structure:**
-1. Hook (tweet 1)
-2. Problem (tweets 2-3)
-3. Solution (tweets 4-9)
-4. Proof/performance (tweets 10-11)
-5. Demo (tweets 12-13)
-6. Context (tweets 14-16)
-7. Philosophy (tweet 17)
-8. Future (tweet 18)
-9. Links (tweet 19)
-10. CTA (tweet 20)
-
-**Reply Thread:** Technical deep dive for those who want more detail.
-
-**Timing:** Post during US work hours for maximum engagement.
-
----
-
-### 5. METRICS.md
-**Platform:** Internal source-of-truth for launch copy numbers
-**Audience:** Maintainers preparing announcements
-**Tone:** Factual, machine-verifiable
-**Length:** Short
-
-**Purpose:**
-- Single metric source for announcement stats
-- Generated by `./scripts/ci/refresh-launch-metrics.sh`
-- Captures commit + test command + pass/fail/ignored counts
-
----
-
-## Customization Before Posting
-
-### Required Changes
-
-1. **Update GitHub links** if repo is not at `github.com/hyperpolymath/protocol-squisher`
-2. **Add social handles** (replace `@hyperpolymath` with actual Twitter/GitHub handle)
-3. **Verify examples** - Ensure all code examples still work with latest version
-4. **Check performance numbers** - Re-run benchmarks if code has changed
-
-### Optional Additions
-
-1. **Screenshots** - Add CLI output screenshots to blog post
-2. **Diagrams** - Architecture diagrams for blog post
-3. **GIFs** - Demo GIFs for Twitter/Reddit
-4. **Video demo** - Record terminal session for YouTube
-
----
-
-## Launch Strategy
-
-### Phase 1: Soft Launch (Week 1)
-
-**Day 1:**
-- [ ] Post to Hacker News (HN-ANNOUNCEMENT.md)
-- [ ] Monitor comments, engage with questions
-- [ ] Address any critical feedback
-
-**Day 2-3:**
-- [ ] Post to Reddit (r/rust, r/programming, r/Python)
-- [ ] Cross-post to relevant subreddits
-- [ ] Engage with community feedback
-
-**Day 4-5:**
-- [ ] Publish blog post
-- [ ] Share on Twitter (TWEET-THREAD.md)
-- [ ] Post to LinkedIn (link to blog)
-
-### Phase 2: Community Engagement (Week 2-4)
-
-- [ ] Respond to all GitHub issues
-- [ ] Incorporate feedback into roadmap
-- [ ] Write follow-up posts addressing common questions
-- [ ] Engage with early adopters
-
-### Phase 3: Iteration (Month 2+)
-
-- [ ] Implement high-priority feature requests
-- [ ] Expand format support (Phase 2)
-- [ ] Write case studies from real users
-- [ ] Present at meetups/conferences
-
----
-
-## Key Messages (Consistent Across All Platforms)
-
-### The Invariant
-
-> **"If it compiles, it carries."**
->
-> For any valid input in format A, there exists a valid output in format B.
-
-This is THE core message. Every announcement includes it.
-
-### Transport Classes
-
-Always explain the 4 classes:
-- **Concorde**: 100% fidelity, 0% overhead (~1ns)
-- **Business**: 98% fidelity, 5% overhead (~5ns)
-- **Economy**: 80% fidelity, 25% overhead (~50ns)
-- **Wheelbarrow**: 50% fidelity, 80% overhead (~1000ns)
-
-### Formal Verification
-
-Emphasize that this isn't just tested, it's **proven**:
-- 4 theorems
-- Agda + Lean
-- Cross-validated
-- Available in `/proofs`
-
-### Honesty About Limitations
-
-Never hide the costs:
-- Wheelbarrow is slow (by design)
-- Optimization quality varies by format pair
-- No runtime inference
-- Enum compatibility is tricky
-
----
-
-## Response Templates
-
-### "Why not just use JSON everywhere?"
-
-> JSON works, but it's slow and loses type information. Protocol Squisher gives you zero-copy when possible (Concorde class, ~1ns) and falls back to JSON only when necessary (Wheelbarrow class). Plus, we tell you the cost upfront.
-
-### "How is this different from Protobuf/gRPC?"
-
-> Protobuf requires everyone use the same format. Protocol Squisher bridges *existing* formats. Use it when you have a Rust serde service talking to a Python Pydantic service and you don't want to rewrite either.
-
-### "What about runtime overhead?"
-
-> Concorde class has ~1ns overhead (direct memory access). Business class is ~5ns (safe conversions). Economy is ~50ns. Wheelbarrow is ~1000ns (JSON fallback). The tool tells you which class you get before generating code.
-
-### "Can I trust the formal proofs?"
-
-> We've proven 4 core theorems in Agda and cross-validated in Lean. The proofs are in the `/proofs` directory. You can verify them yourself with `agda` or `lean`. We're happy to discuss the proof strategy.
-
-### "Why should I use this instead of writing FFI myself?"
-
-> 1. Time savings (5 lines vs 200+ lines)
-> 2. Correctness (formally proven vs manual)
-> 3. Maintenance (auto-regenerate vs manual updates)
-> 4. Type safety (compile-time checks vs runtime errors)
-> 5. Performance analysis (transport class warnings)
-
----
-
-## Metrics to Track
-
-### Engagement
-- [ ] GitHub stars
-- [ ] GitHub issues opened
-- [ ] HN points + comments
-- [ ] Reddit upvotes + comments
-- [ ] Twitter impressions + engagement
-
-### Adoption
-- [ ] CLI downloads (crates.io)
-- [ ] Example usage (forks, PRs)
-- [ ] Real-world adoption (mentions, case studies)
-
-### Feedback
-- [ ] Feature requests
-- [ ] Bug reports
-- [ ] Edge cases discovered
-- [ ] Format requests
-
----
-
-## Post-Launch Action Items
-
-### Immediate (Week 1)
-- [ ] Monitor all announcement threads
-- [ ] Respond to questions within 24h
-- [ ] Triage GitHub issues
-- [ ] Update README with any critical feedback
-
-### Short-term (Month 1)
-- [ ] Write follow-up blog post addressing common questions
-- [ ] Create video demo
-- [ ] Add frequently requested features
-- [ ] Improve documentation based on user confusion
-
-### Medium-term (Quarter 1)
-- [ ] Drive Phase 3 hardening (real-world validation, synthesis, advanced features)
-- [ ] Present at Rust meetup
-- [ ] Write academic paper on formal verification
-- [ ] Reach 1000 GitHub stars
-
----
-
-## Contact Info for Announcements
-
-**GitHub:** https://github.com/hyperpolymath/protocol-squisher
-**Issues:** https://github.com/hyperpolymath/protocol-squisher/issues
-**Author:** [@hyperpolymath](https://github.com/hyperpolymath)
-**License:** MPL-2.0
-
----
-
-## Final Checklist Before Launch
-
-- [ ] Refresh launch metrics (`./scripts/ci/refresh-launch-metrics.sh`)
-- [ ] All tests passing (`cargo test --all`: 678 passed, 7 ignored, 0 failed)
-- [ ] Documentation complete
-- [ ] Examples working
-- [ ] Formal proofs verified
-- [ ] README up to date
-- [ ] CHANGELOG current
-- [ ] LICENSE file present
-- [ ] SECURITY.md present
-- [ ] CONTRIBUTING.md present
-- [ ] CI/CD green
-- [ ] Performance benchmarks run
-- [ ] Announcement drafts reviewed
-- [ ] Social media accounts ready
-- [ ] Response templates prepared
-
----
-
-**Last Updated:** 2026-02-24
-**Status:** Ready for launch 🚀
diff --git a/provenance/docs/launch/REDDIT-ANNOUNCEMENT.adoc b/provenance/docs/launch/REDDIT-ANNOUNCEMENT.adoc
new file mode 100644
index 0000000..1728e02
--- /dev/null
+++ b/provenance/docs/launch/REDDIT-ANNOUNCEMENT.adoc
@@ -0,0 +1,249 @@
+== I built a tool that auto-generates adapters between any two serialization formats (Rust↔Python working, 678 tests, formally verified)
+
+Hey everyone,
+
+I’ve been working on solving a problem that’s bugged me for years: the
+tedious, error-prone work of writing adapters between different
+serialization formats.
+
+=== The Pain Point
+
+You know the drill. You have a Rust service using serde, your coworker
+has a Python service with Pydantic models, and you need them to talk. So
+you:
+
+[arabic]
+. Write 200+ lines of PyO3 boilerplate
+. Debug segfaults for a day
+. Maintain it forever as schemas drift
+. Repeat for every service boundary
+
+I got tired of this and built *Protocol Squisher*.
+
+=== What It Does
+
+Give it two schemas (say, Rust types and Python Pydantic models), and
+it:
+
+[arabic]
+. *Analyzes compatibility* - Tells you upfront if transport is possible
+and at what cost
+. *Generates adapters* - Creates PyO3 bindings, type stubs, tests
+automatically
+. *Optimizes for zero-copy* - When types match perfectly, you get direct
+memory access
+. *Proves correctness* - Formal verification in Agda/Lean that the
+adapter is safe
+
+=== Show Me Code
+
+*Before (manual):*
+
+[source,python]
+----
+# 50+ lines of PyO3 boilerplate per struct
+# Manual type conversions
+# No safety guarantees
+# Segfaults waiting to happen
+----
+
+*After:*
+
+[source,bash]
+----
+$ protocol-squisher check --rust lib.rs --python models.py
+
+Transport Class: Concorde (100% fidelity, 0% overhead)
+ ✓ user_id: i64 ↔ int (native)
+ ✓ balance: f64 ↔ float (IEEE 754)
+ ✓ name: String ↔ str (UTF-8)
+
+$ protocol-squisher generate --rust lib.rs --python models.py
+
+Generated:
+ ✓ PyO3 bindings (657 lines)
+ ✓ Type stubs (.pyi)
+ ✓ Property-based tests
+----
+
+*Result:* ~1 nanosecond per field access. Zero-copy between Rust and
+Python.
+
+=== Real Performance Numbers
+
+I benchmarked the `+zero-copy-demo+` example:
+
+[cols=",,",options="header",]
+|===
+|Transport Class |Field Access |Notes
+|*Concorde* |~1ns |Direct memory, no conversion
+|*Business* |~2-5ns |Safe widening (i32→i64)
+|*Economy* |~10-50ns |Minor conversions
+|*Wheelbarrow* |~100-1000ns |JSON fallback for narrowing
+|===
+
+=== The "`If It Compiles, It Carries`" Invariant
+
+The core guarantee:
+
+____
+For any valid input in format A, there exists a valid output in format
+B.
+____
+
+Even if slow. Even if lossy. But it *will* transport.
+
+This is backed by formal proofs in Agda and Lean (yes, actual theorem
+prover proofs). See the `+/proofs+` directory.
+
+=== Transport Classes Explained
+
+Every schema pair gets classified:
+
+* *Concorde*: Perfect match (i64↔int). Zero-copy. ~1ns.
+* *Business*: Safe conversions (i32→i64). Minor overhead. ~5ns.
+* *Economy*: Documented losses. Moderate overhead. ~50ns.
+* *Wheelbarrow*: Significant losses (i64→i32). JSON fallback. ~1000ns.
+
+The tool tells you which class you get *before* generating code, so no
+surprises.
+
+=== Example: Rust ↔ Python
+
+*Rust side:*
+
+[source,rust]
+----
+#[derive(Serialize, Deserialize)]
+struct User {
+ user_id: i64,
+ balance: f64,
+ name: String,
+ active: bool,
+}
+----
+
+*Python side:*
+
+[source,python]
+----
+from pydantic import BaseModel
+
+class User(BaseModel):
+ user_id: int
+ balance: float
+ name: str
+ active: bool
+----
+
+*Analysis:*
+
+....
+Transport Class: Concorde
+All fields: direct memory mapping
+Zero serialization overhead
+....
+
+*Generated code handles:* - PyO3 `+#[pyclass]+` annotations - Lifetime
+management - Error handling - Type conversions - Property-based tests
+
+=== Current Status
+
+*MVP Complete:* - ✅ 678 tests passing - ✅ Rust ↔ Python fully working
+- ✅ All 4 transport classes implemented - ✅ 4 theorems proven (Agda +
+Lean) - ✅ CLI with analyze/check/optimize/generate - ✅ Comprehensive
+docs
+
+*Supported formats:* - Rust (serde), Python (Pydantic), Protobuf,
+Thrift, Avro, MessagePack, FlatBuffers, Cap’n Proto, Bebop, ReScript,
+JSON Schema
+
+*Current focus (next):* - Larger real-world schema corpus - Synthesis
+quality improvements - Advanced FFI hardening + performance tuning
+
+=== Try It Yourself
+
+[source,bash]
+----
+git clone https://github.com/hyperpolymath/protocol-squisher
+cd protocol-squisher/examples/zero-copy-demo
+./build.sh
+python test.py # See the magic
+----
+
+Or install the CLI:
+
+[source,bash]
+----
+cargo install --path crates/protocol-squisher-cli
+protocol-squisher --help
+----
+
+=== Why I Built This
+
+I’ve wasted *weeks* writing manual FFI adapters across projects. Every
+time: - Boilerplate city - Subtle bugs from manual conversions - Schemas
+drift, adapters break - No way to know if transport is even possible
+
+Protocol Squisher makes this a build-time analysis instead of a runtime
+surprise.
+
+=== Limitations (Being Real)
+
+[arabic]
+. *Wheelbarrow class is slow* - Narrowing conversions (i64→i32) need
+JSON serialization (100-1000x overhead)
+. *Analysis needs schemas* - No runtime inference yet
+. *Optimization quality differs by pair* - Some conversions still land
+in Wheelbarrow class until synthesis improves
+
+We don’t hide the costs. The tool tells you upfront: "`This conversion
+is Wheelbarrow class, expect 100-1000x overhead.`"
+
+=== Formal Verification
+
+The `+/proofs+` directory has formal proofs in multiple theorem provers:
+
+* *Agda*: Dependent types, constructive proofs
+* *Lean*: Modern prover with great tooling
+* *Coq*: Classic, well-established
+
+*Proven theorems:* 1. Concorde class is lossless and bijective 2.
+Narrowing conversions require fallback 3. Container transport class =
+worst element class 4. Optimization suggestions preserve semantics
+
+This isn’t just "`tests pass.`" These are mathematical proofs.
+
+=== What I’m Looking For
+
+*Feedback:* - Does this solve a real pain point for you? - What formats
+would you want next? - Edge cases that break the analysis?
+
+*Contributions:* - New format analyzers - Real-world schemas that break
+things - Performance optimizations - More formal proofs
+
+=== Links
+
+* *GitHub*: https://github.com/hyperpolymath/protocol-squisher
+* *Examples*:
+https://github.com/hyperpolymath/protocol-squisher/tree/main/examples
+* *CLI Docs*:
+https://github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
+* *Formal Proofs*:
+https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
+
+=== License
+
+MPL-2.0 (Palimpsest License)
+
+'''''
+
+Happy to answer questions, discuss the approach, or hear about edge
+cases I haven’t considered. This is an MVP, and I’m actively looking for
+ways to break it.
+
+If you’ve ever spent a day debugging PyO3 boilerplate or cursed at FFI,
+this might save you some pain.
+
+*Edit:* Added performance numbers, clarified Wheelbarrow class overhead,
+fixed links.
diff --git a/provenance/docs/launch/REDDIT-ANNOUNCEMENT.md b/provenance/docs/launch/REDDIT-ANNOUNCEMENT.md
deleted file mode 100644
index 3c7023d..0000000
--- a/provenance/docs/launch/REDDIT-ANNOUNCEMENT.md
+++ /dev/null
@@ -1,227 +0,0 @@
-
-# I built a tool that auto-generates adapters between any two serialization formats (Rust↔Python working, 678 tests, formally verified)
-
-Hey everyone,
-
-I've been working on solving a problem that's bugged me for years: the tedious, error-prone work of writing adapters between different serialization formats.
-
-## The Pain Point
-
-You know the drill. You have a Rust service using serde, your coworker has a Python service with Pydantic models, and you need them to talk. So you:
-
-1. Write 200+ lines of PyO3 boilerplate
-2. Debug segfaults for a day
-3. Maintain it forever as schemas drift
-4. Repeat for every service boundary
-
-I got tired of this and built **Protocol Squisher**.
-
-## What It Does
-
-Give it two schemas (say, Rust types and Python Pydantic models), and it:
-
-1. **Analyzes compatibility** - Tells you upfront if transport is possible and at what cost
-2. **Generates adapters** - Creates PyO3 bindings, type stubs, tests automatically
-3. **Optimizes for zero-copy** - When types match perfectly, you get direct memory access
-4. **Proves correctness** - Formal verification in Agda/Lean that the adapter is safe
-
-## Show Me Code
-
-**Before (manual):**
-```python
-# 50+ lines of PyO3 boilerplate per struct
-# Manual type conversions
-# No safety guarantees
-# Segfaults waiting to happen
-```
-
-**After:**
-```bash
-$ protocol-squisher check --rust lib.rs --python models.py
-
-Transport Class: Concorde (100% fidelity, 0% overhead)
- ✓ user_id: i64 ↔ int (native)
- ✓ balance: f64 ↔ float (IEEE 754)
- ✓ name: String ↔ str (UTF-8)
-
-$ protocol-squisher generate --rust lib.rs --python models.py
-
-Generated:
- ✓ PyO3 bindings (657 lines)
- ✓ Type stubs (.pyi)
- ✓ Property-based tests
-```
-
-**Result:** ~1 nanosecond per field access. Zero-copy between Rust and Python.
-
-## Real Performance Numbers
-
-I benchmarked the `zero-copy-demo` example:
-
-| Transport Class | Field Access | Notes |
-|-----------------|--------------|-------|
-| **Concorde** | ~1ns | Direct memory, no conversion |
-| **Business** | ~2-5ns | Safe widening (i32→i64) |
-| **Economy** | ~10-50ns | Minor conversions |
-| **Wheelbarrow** | ~100-1000ns | JSON fallback for narrowing |
-
-## The "If It Compiles, It Carries" Invariant
-
-The core guarantee:
-
-> For any valid input in format A, there exists a valid output in format B.
-
-Even if slow. Even if lossy. But it **will** transport.
-
-This is backed by formal proofs in Agda and Lean (yes, actual theorem prover proofs). See the `/proofs` directory.
-
-## Transport Classes Explained
-
-Every schema pair gets classified:
-
-- **Concorde**: Perfect match (i64↔int). Zero-copy. ~1ns.
-- **Business**: Safe conversions (i32→i64). Minor overhead. ~5ns.
-- **Economy**: Documented losses. Moderate overhead. ~50ns.
-- **Wheelbarrow**: Significant losses (i64→i32). JSON fallback. ~1000ns.
-
-The tool tells you which class you get **before** generating code, so no surprises.
-
-## Example: Rust ↔ Python
-
-**Rust side:**
-```rust
-#[derive(Serialize, Deserialize)]
-struct User {
- user_id: i64,
- balance: f64,
- name: String,
- active: bool,
-}
-```
-
-**Python side:**
-```python
-from pydantic import BaseModel
-
-class User(BaseModel):
- user_id: int
- balance: float
- name: str
- active: bool
-```
-
-**Analysis:**
-```
-Transport Class: Concorde
-All fields: direct memory mapping
-Zero serialization overhead
-```
-
-**Generated code handles:**
-- PyO3 `#[pyclass]` annotations
-- Lifetime management
-- Error handling
-- Type conversions
-- Property-based tests
-
-## Current Status
-
-**MVP Complete:**
-- ✅ 678 tests passing
-- ✅ Rust ↔ Python fully working
-- ✅ All 4 transport classes implemented
-- ✅ 4 theorems proven (Agda + Lean)
-- ✅ CLI with analyze/check/optimize/generate
-- ✅ Comprehensive docs
-
-**Supported formats:**
-- Rust (serde), Python (Pydantic), Protobuf, Thrift, Avro, MessagePack, FlatBuffers, Cap'n Proto, Bebop, ReScript, JSON Schema
-
-**Current focus (next):**
-- Larger real-world schema corpus
-- Synthesis quality improvements
-- Advanced FFI hardening + performance tuning
-
-## Try It Yourself
-
-```bash
-git clone https://github.com/hyperpolymath/protocol-squisher
-cd protocol-squisher/examples/zero-copy-demo
-./build.sh
-python test.py # See the magic
-```
-
-Or install the CLI:
-```bash
-cargo install --path crates/protocol-squisher-cli
-protocol-squisher --help
-```
-
-## Why I Built This
-
-I've wasted **weeks** writing manual FFI adapters across projects. Every time:
-- Boilerplate city
-- Subtle bugs from manual conversions
-- Schemas drift, adapters break
-- No way to know if transport is even possible
-
-Protocol Squisher makes this a build-time analysis instead of a runtime surprise.
-
-## Limitations (Being Real)
-
-1. **Wheelbarrow class is slow** - Narrowing conversions (i64→i32) need JSON serialization (100-1000x overhead)
-2. **Analysis needs schemas** - No runtime inference yet
-3. **Optimization quality differs by pair** - Some conversions still land in Wheelbarrow class until synthesis improves
-
-We don't hide the costs. The tool tells you upfront: "This conversion is Wheelbarrow class, expect 100-1000x overhead."
-
-## Formal Verification
-
-The `/proofs` directory has formal proofs in multiple theorem provers:
-
-- **Agda**: Dependent types, constructive proofs
-- **Lean**: Modern prover with great tooling
-- **Coq**: Classic, well-established
-
-**Proven theorems:**
-1. Concorde class is lossless and bijective
-2. Narrowing conversions require fallback
-3. Container transport class = worst element class
-4. Optimization suggestions preserve semantics
-
-This isn't just "tests pass." These are mathematical proofs.
-
-## What I'm Looking For
-
-**Feedback:**
-- Does this solve a real pain point for you?
-- What formats would you want next?
-- Edge cases that break the analysis?
-
-**Contributions:**
-- New format analyzers
-- Real-world schemas that break things
-- Performance optimizations
-- More formal proofs
-
-## Links
-
-- **GitHub**: https://github.com/hyperpolymath/protocol-squisher
-- **Examples**: https://github.com/hyperpolymath/protocol-squisher/tree/main/examples
-- **CLI Docs**: https://github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
-- **Formal Proofs**: https://github.com/hyperpolymath/protocol-squisher/tree/main/proofs
-
-## License
-
-MPL-2.0 (Palimpsest License)
-
----
-
-Happy to answer questions, discuss the approach, or hear about edge cases I haven't considered. This is an MVP, and I'm actively looking for ways to break it.
-
-If you've ever spent a day debugging PyO3 boilerplate or cursed at FFI, this might save you some pain.
-
-**Edit:** Added performance numbers, clarified Wheelbarrow class overhead, fixed links.
diff --git a/provenance/docs/launch/SUMMARY.adoc b/provenance/docs/launch/SUMMARY.adoc
new file mode 100644
index 0000000..7eab35c
--- /dev/null
+++ b/provenance/docs/launch/SUMMARY.adoc
@@ -0,0 +1,248 @@
+== Protocol Squisher Launch Announcement Summary
+
+*Created:* 2026-02-04 *Updated:* 2026-02-24 *Status:* Ready for review
+and posting
+
+'''''
+
+=== Files Created
+
+✅ *6 files* in `+/docs/launch/+`:
+
+[arabic]
+. *HN-ANNOUNCEMENT.md* (5.5 KB)
+* Hacker News format
+* Technical, concise
+* ~1200 words
+* Code examples + proofs emphasis
+. *REDDIT-ANNOUNCEMENT.md* (6.3 KB)
+* r/rust, r/programming, r/Python
+* Conversational, relatable
+* ~1000 words
+* Before/after comparison
+. *BLOG-POST.md* (16 KB)
+* Long-form educational content
+* Complete technical deep dive
+* ~3500 words
+* Full architecture + theorem explanations
+. *TWEET-THREAD.md* (8.3 KB)
+* Twitter/X thread
+* 20 main tweets + 6 reply tweets
+* Punchy, bite-sized
+* Technical deep dive in replies
+. *README.md* (8.2 KB)
+* Launch strategy guide
+* Customization checklist
+* Response templates
+* Metrics tracking
+. *METRICS.md* (generated)
+* Launch copy source-of-truth metrics
+* Captures latest test totals and commit
+* Generated by `+scripts/ci/refresh-launch-metrics.sh+`
+
+'''''
+
+=== Key Features of Announcements
+
+==== Universal Messages (All Platforms)
+
+[arabic]
+. *The Invariant*: "`If it compiles, it carries`"
+. *Transport Classes*: Concorde/Business/Economy/Wheelbarrow
+. *Formal Verification*: 4 theorems in Agda + Lean
+. *Honesty*: Upfront about Wheelbarrow overhead and limitations
+. *Real Performance*: ~1ns (Concorde) to ~1000ns (Wheelbarrow)
+
+==== Technical Highlights
+
+* 678 tests passing (as of 2026-02-24)
+* Rust ↔ Python fully working
+* Zero-copy optimization
+* CLI with analyze/check/optimize/generate
+* Property-based testing included
+* Comprehensive documentation
+
+==== Call-to-Action
+
+* Try the examples (`+examples/zero-copy-demo+`)
+* Install CLI (`+cargo install --path crates/protocol-squisher-cli+`)
+* Report edge cases (GitHub issues)
+* Contribute format analyzers
+* Star the repo
+
+'''''
+
+=== Next Steps (Before Launch)
+
+==== Required Checks
+
+* [ ] *Verify all examples work*: Run
+`+cd examples/zero-copy-demo && ./build.sh && python test.py+`
+* [ ] *Check performance numbers*: Re-run benchmarks if code changed
+* [ ] *Update GitHub links*: If repo URL differs from
+`+github.com/hyperpolymath/protocol-squisher+`
+* [ ] *Add social handles*: Replace `+@hyperpolymath+` with actual
+handle
+* [ ] *Review tone*: Ensure announcements match your voice
+
+==== Optional Enhancements
+
+* [ ] *Add screenshots*: CLI output for blog post
+* [ ] *Create GIF demos*: For Twitter/Reddit
+* [ ] *Record video*: Terminal session demo
+* [ ] *Add diagrams*: Architecture visualization
+
+'''''
+
+=== Launch Timeline Suggestion
+
+==== Week 1: Soft Launch
+
+*Day 1 (Monday AM):* - Post to Hacker News (8-10am EST) - Monitor
+comments throughout day - Engage with technical questions
+
+*Day 2-3 (Tuesday-Wednesday):* - Post to r/rust (different subreddit
+rules apply) - Cross-post to r/programming - Post to r/Python - Respond
+to comments within 24h
+
+*Day 4-5 (Thursday-Friday):* - Publish blog post - Share Twitter thread
+- Link to blog from all previous posts - Post to LinkedIn (professional
+audience)
+
+==== Week 2-4: Engagement
+
+* Respond to GitHub issues daily
+* Incorporate feedback into roadmap
+* Write follow-up addressing common questions
+* Engage with early adopters on social
+
+'''''
+
+=== Response Template Quick Reference
+
+*"`Why not JSON everywhere?`"* > JSON works but loses performance and
+type info. We give you zero-copy when possible (Concorde, ~1ns), fall
+back to JSON only when necessary (Wheelbarrow), and tell you the cost
+upfront.
+
+*"`How is this different from Protobuf?`"* > Protobuf requires everyone
+use the same format. We bridge _existing_ formats you can’t easily
+change.
+
+*"`Can I trust the proofs?`"* > Yes. 4 theorems proven in Agda,
+cross-validated in Lean. Proofs in `+/proofs+`, verify yourself with
+`+agda+` or `+lean+`.
+
+*"`Why not hand-write FFI?`"* > Time (5 lines vs 200+), correctness
+(proven vs manual), maintenance (auto-regen vs manual), performance
+analysis (transport class warnings).
+
+'''''
+
+=== Success Metrics
+
+==== Engagement (Week 1)
+
+* *Target:* 100+ GitHub stars
+* *Target:* 50+ HN points
+* *Target:* 10+ substantial GitHub issues
+
+==== Adoption (Month 1)
+
+* *Target:* 500+ CLI downloads
+* *Target:* 5+ real-world usage examples
+* *Target:* 10+ contributors
+
+==== Quality (Ongoing)
+
+* *Track:* Edge cases discovered
+* *Track:* Format requests
+* *Track:* Feature requests vs bug reports ratio
+
+'''''
+
+=== Files Overview
+
+[cols=",,,",options="header",]
+|===
+|File |Words |Purpose |Audience
+|HN-ANNOUNCEMENT.md |1200 |Technical launch |HN readers
+|REDDIT-ANNOUNCEMENT.md |1000 |Community launch |Reddit devs
+|BLOG-POST.md |3500 |Deep dive |Blog readers
+|TWEET-THREAD.md |2000 |Social launch |Twitter
+|README.md |1500 |Launch guide |Internal
+|===
+
+'''''
+
+=== Technical Accuracy Checklist
+
+All announcements verified against: - ✅ README.adoc (main project
+README) - ✅ examples/README.md (examples documentation) - ✅
+proofs/README.adoc (formal verification docs) - ✅
+docs/launch/METRICS.md (current launch metrics snapshot) - ✅ Transport
+class definitions - ✅ Performance benchmarks - ✅ Test count (678
+tests) - ✅ Supported formats (Rust, Python, Protobuf, Thrift, Avro,
+MessagePack, FlatBuffers, Cap’n Proto, Bebop, ReScript, JSON Schema)
+
+'''''
+
+=== What Makes These Announcements Good
+
+[arabic]
+. *Honesty First*: We don’t hide Wheelbarrow overhead or limitations
+. *Show, Don’t Tell*: Code examples in every announcement
+. *Proof-Backed*: Emphasize formal verification (uncommon in tooling)
+. *Performance Numbers*: Real benchmarks, not vague claims
+. *Problem-Focused*: Start with the pain point developers feel
+. *Call-to-Action*: Clear next steps (try examples, report issues,
+contribute)
+. *Accessible*: Technical depth but approachable writing
+
+'''''
+
+=== Post-Launch Action Items
+
+==== Immediate (Day 1-7)
+
+* Monitor announcement threads
+* Respond to questions <24h
+* Triage GitHub issues
+* Update docs based on confusion
+
+==== Short-term (Week 2-8)
+
+* Follow-up blog post (common questions)
+* Video demo
+* High-priority features
+* Documentation improvements
+
+==== Medium-term (Month 2-6)
+
+* Phase 3 hardening (real-world validation, synthesis, advanced
+features)
+* Rust meetup presentation
+* Academic paper on verification
+* 1000 GitHub stars milestone
+
+'''''
+
+=== Launch Day Checklist
+
+*Pre-Launch:* - [ ] All tests passing (`+cargo test --all+` currently:
+678 passed, 7 ignored, 0 failed as of 2026-02-24) - [ ] Examples working
+- [ ] Docs current - [ ] CI green - [ ] Announcements reviewed
+
+*Launch:* - [ ] Post HN (8-10am EST weekday) - [ ] Share on Twitter - [
+] Post to Reddit - [ ] Publish blog - [ ] Announce on LinkedIn
+
+*Post-Launch:* - [ ] Monitor comments (set alerts) - [ ] Respond within
+24h - [ ] Track metrics - [ ] Update roadmap with feedback
+
+'''''
+
+*Status:* All announcements ready. Review, customize, and launch when
+ready.
+
+*Questions?* See `+README.md+` in this directory for full launch
+strategy.
diff --git a/provenance/docs/launch/SUMMARY.md b/provenance/docs/launch/SUMMARY.md
deleted file mode 100644
index 893ec21..0000000
--- a/provenance/docs/launch/SUMMARY.md
+++ /dev/null
@@ -1,253 +0,0 @@
-
-# Protocol Squisher Launch Announcement Summary
-
-**Created:** 2026-02-04
-**Updated:** 2026-02-24
-**Status:** Ready for review and posting
-
----
-
-## Files Created
-
-✅ **6 files** in `/docs/launch/`:
-
-1. **HN-ANNOUNCEMENT.md** (5.5 KB)
- - Hacker News format
- - Technical, concise
- - ~1200 words
- - Code examples + proofs emphasis
-
-2. **REDDIT-ANNOUNCEMENT.md** (6.3 KB)
- - r/rust, r/programming, r/Python
- - Conversational, relatable
- - ~1000 words
- - Before/after comparison
-
-3. **BLOG-POST.md** (16 KB)
- - Long-form educational content
- - Complete technical deep dive
- - ~3500 words
- - Full architecture + theorem explanations
-
-4. **TWEET-THREAD.md** (8.3 KB)
- - Twitter/X thread
- - 20 main tweets + 6 reply tweets
- - Punchy, bite-sized
- - Technical deep dive in replies
-
-5. **README.md** (8.2 KB)
- - Launch strategy guide
- - Customization checklist
- - Response templates
- - Metrics tracking
-
-6. **METRICS.md** (generated)
- - Launch copy source-of-truth metrics
- - Captures latest test totals and commit
- - Generated by `scripts/ci/refresh-launch-metrics.sh`
-
----
-
-## Key Features of Announcements
-
-### Universal Messages (All Platforms)
-
-1. **The Invariant**: "If it compiles, it carries"
-2. **Transport Classes**: Concorde/Business/Economy/Wheelbarrow
-3. **Formal Verification**: 4 theorems in Agda + Lean
-4. **Honesty**: Upfront about Wheelbarrow overhead and limitations
-5. **Real Performance**: ~1ns (Concorde) to ~1000ns (Wheelbarrow)
-
-### Technical Highlights
-
-- 678 tests passing (as of 2026-02-24)
-- Rust ↔ Python fully working
-- Zero-copy optimization
-- CLI with analyze/check/optimize/generate
-- Property-based testing included
-- Comprehensive documentation
-
-### Call-to-Action
-
-- Try the examples (`examples/zero-copy-demo`)
-- Install CLI (`cargo install --path crates/protocol-squisher-cli`)
-- Report edge cases (GitHub issues)
-- Contribute format analyzers
-- Star the repo
-
----
-
-## Next Steps (Before Launch)
-
-### Required Checks
-
-- [ ] **Verify all examples work**: Run `cd examples/zero-copy-demo && ./build.sh && python test.py`
-- [ ] **Check performance numbers**: Re-run benchmarks if code changed
-- [ ] **Update GitHub links**: If repo URL differs from `github.com/hyperpolymath/protocol-squisher`
-- [ ] **Add social handles**: Replace `@hyperpolymath` with actual handle
-- [ ] **Review tone**: Ensure announcements match your voice
-
-### Optional Enhancements
-
-- [ ] **Add screenshots**: CLI output for blog post
-- [ ] **Create GIF demos**: For Twitter/Reddit
-- [ ] **Record video**: Terminal session demo
-- [ ] **Add diagrams**: Architecture visualization
-
----
-
-## Launch Timeline Suggestion
-
-### Week 1: Soft Launch
-
-**Day 1 (Monday AM):**
-- Post to Hacker News (8-10am EST)
-- Monitor comments throughout day
-- Engage with technical questions
-
-**Day 2-3 (Tuesday-Wednesday):**
-- Post to r/rust (different subreddit rules apply)
-- Cross-post to r/programming
-- Post to r/Python
-- Respond to comments within 24h
-
-**Day 4-5 (Thursday-Friday):**
-- Publish blog post
-- Share Twitter thread
-- Link to blog from all previous posts
-- Post to LinkedIn (professional audience)
-
-### Week 2-4: Engagement
-
-- Respond to GitHub issues daily
-- Incorporate feedback into roadmap
-- Write follow-up addressing common questions
-- Engage with early adopters on social
-
----
-
-## Response Template Quick Reference
-
-**"Why not JSON everywhere?"**
-> JSON works but loses performance and type info. We give you zero-copy when possible (Concorde, ~1ns), fall back to JSON only when necessary (Wheelbarrow), and tell you the cost upfront.
-
-**"How is this different from Protobuf?"**
-> Protobuf requires everyone use the same format. We bridge *existing* formats you can't easily change.
-
-**"Can I trust the proofs?"**
-> Yes. 4 theorems proven in Agda, cross-validated in Lean. Proofs in `/proofs`, verify yourself with `agda` or `lean`.
-
-**"Why not hand-write FFI?"**
-> Time (5 lines vs 200+), correctness (proven vs manual), maintenance (auto-regen vs manual), performance analysis (transport class warnings).
-
----
-
-## Success Metrics
-
-### Engagement (Week 1)
-- **Target:** 100+ GitHub stars
-- **Target:** 50+ HN points
-- **Target:** 10+ substantial GitHub issues
-
-### Adoption (Month 1)
-- **Target:** 500+ CLI downloads
-- **Target:** 5+ real-world usage examples
-- **Target:** 10+ contributors
-
-### Quality (Ongoing)
-- **Track:** Edge cases discovered
-- **Track:** Format requests
-- **Track:** Feature requests vs bug reports ratio
-
----
-
-## Files Overview
-
-| File | Words | Purpose | Audience |
-|------|-------|---------|----------|
-| HN-ANNOUNCEMENT.md | 1200 | Technical launch | HN readers |
-| REDDIT-ANNOUNCEMENT.md | 1000 | Community launch | Reddit devs |
-| BLOG-POST.md | 3500 | Deep dive | Blog readers |
-| TWEET-THREAD.md | 2000 | Social launch | Twitter |
-| README.md | 1500 | Launch guide | Internal |
-
----
-
-## Technical Accuracy Checklist
-
-All announcements verified against:
-- ✅ README.adoc (main project README)
-- ✅ examples/README.md (examples documentation)
-- ✅ proofs/README.adoc (formal verification docs)
-- ✅ docs/launch/METRICS.md (current launch metrics snapshot)
-- ✅ Transport class definitions
-- ✅ Performance benchmarks
-- ✅ Test count (678 tests)
-- ✅ Supported formats (Rust, Python, Protobuf, Thrift, Avro, MessagePack, FlatBuffers, Cap'n Proto, Bebop, ReScript, JSON Schema)
-
----
-
-## What Makes These Announcements Good
-
-1. **Honesty First**: We don't hide Wheelbarrow overhead or limitations
-2. **Show, Don't Tell**: Code examples in every announcement
-3. **Proof-Backed**: Emphasize formal verification (uncommon in tooling)
-4. **Performance Numbers**: Real benchmarks, not vague claims
-5. **Problem-Focused**: Start with the pain point developers feel
-6. **Call-to-Action**: Clear next steps (try examples, report issues, contribute)
-7. **Accessible**: Technical depth but approachable writing
-
----
-
-## Post-Launch Action Items
-
-### Immediate (Day 1-7)
-- Monitor announcement threads
-- Respond to questions <24h
-- Triage GitHub issues
-- Update docs based on confusion
-
-### Short-term (Week 2-8)
-- Follow-up blog post (common questions)
-- Video demo
-- High-priority features
-- Documentation improvements
-
-### Medium-term (Month 2-6)
-- Phase 3 hardening (real-world validation, synthesis, advanced features)
-- Rust meetup presentation
-- Academic paper on verification
-- 1000 GitHub stars milestone
-
----
-
-## Launch Day Checklist
-
-**Pre-Launch:**
-- [ ] All tests passing (`cargo test --all` currently: 678 passed, 7 ignored, 0 failed as of 2026-02-24)
-- [ ] Examples working
-- [ ] Docs current
-- [ ] CI green
-- [ ] Announcements reviewed
-
-**Launch:**
-- [ ] Post HN (8-10am EST weekday)
-- [ ] Share on Twitter
-- [ ] Post to Reddit
-- [ ] Publish blog
-- [ ] Announce on LinkedIn
-
-**Post-Launch:**
-- [ ] Monitor comments (set alerts)
-- [ ] Respond within 24h
-- [ ] Track metrics
-- [ ] Update roadmap with feedback
-
----
-
-**Status:** All announcements ready. Review, customize, and launch when ready.
-
-**Questions?** See `README.md` in this directory for full launch strategy.
diff --git a/provenance/docs/launch/TWEET-THREAD.adoc b/provenance/docs/launch/TWEET-THREAD.adoc
new file mode 100644
index 0000000..5c53ca5
--- /dev/null
+++ b/provenance/docs/launch/TWEET-THREAD.adoc
@@ -0,0 +1,449 @@
+== Protocol Squisher Launch - Twitter/X Thread
+
+'''''
+
+*Tweet 1 (Hook)*
+
+Stop writing FFI code manually. 🛑
+
+I built a tool that auto-generates adapters between ANY two
+serialization formats.
+
+Rust ↔ Python? ✅ Cap’n Proto ↔ JSON? ✅ Thrift ↔ Avro? ✅
+
+If it compiles, it carries.
+
+Thread 🧵👇
+
+'''''
+
+*Tweet 2 (The Problem)*
+
+You know the pain:
+
+• Rust service (serde) • Python service (Pydantic) • They need to talk
+
+So you write 200+ lines of PyO3 boilerplate, debug segfaults, and
+maintain it forever as schemas drift.
+
+There’s a better way.
+
+'''''
+
+*Tweet 3 (The Solution - Part 1)*
+
+Protocol Squisher analyzes schema pairs and synthesizes the minimum
+viable adapter.
+
+[source,bash]
+----
+$ protocol-squisher check \
+ --rust lib.rs \
+ --python models.py
+
+Transport Class: Concorde
+Fidelity: 100%
+Overhead: 0%
+
+Zero-copy possible ✓
+----
+
+It tells you the cost BEFORE generating code.
+
+'''''
+
+*Tweet 4 (Transport Classes)*
+
+Every schema pair gets classified:
+
+🛩️ *Concorde*: 100% fidelity, 0% overhead (~1ns) 💺 *Business*: 98%
+fidelity, 5% overhead (~5ns) 🎫 *Economy*: 80% fidelity, 25% overhead
+(~50ns) 🛒 *Wheelbarrow*: 50% fidelity, 80% overhead (~1000ns)
+
+You get to decide if the cost is acceptable.
+
+'''''
+
+*Tweet 5 (Concorde Example)*
+
+Concorde = zero-copy transport.
+
+Rust:
+
+[source,rust]
+----
+struct User {
+ id: i64, // 64-bit signed
+ balance: f64, // IEEE 754
+}
+----
+
+Python:
+
+[source,python]
+----
+class User(BaseModel):
+ id: int # 64-bit signed
+ balance: float # IEEE 754
+----
+
+Perfect match → direct memory access → ~1ns per field
+
+'''''
+
+*Tweet 6 (Wheelbarrow Example)*
+
+Wheelbarrow = it works, but slowly.
+
+Rust `+i64+` → Python `+i32+` (narrowing)
+
+Can’t prove it’s safe, so we fall back to JSON.
+
+Result: 100-1000x slower
+
+The tool warns you:
+
+....
+⚠ Field 'big_id': Wheelbarrow class
+ Requires JSON fallback
+ RECOMMEND: Use i64 on Python side
+....
+
+'''''
+
+*Tweet 7 (The Invariant)*
+
+Core guarantee:
+
+____
+"`If it compiles, it carries.`"
+
+For any valid input in format A, there exists a valid output in format
+B.
+____
+
+Even if slow. Even if lossy. But it WILL transport.
+
+This is backed by formal proofs in Agda and Lean.
+
+'''''
+
+*Tweet 8 (Formal Verification)*
+
+We don’t just test. We *prove* correctness.
+
+4 theorems verified in multiple theorem provers:
+
+[arabic]
+. Concorde is lossless + bijective
+. Narrowing needs fallback
+. Container class = worst element
+. The invariant holds
+
+See: github.com/hyperpolymath/protocol-squisher/tree/main/proofs
+
+'''''
+
+*Tweet 9 (CLI Workflow)*
+
+[source,bash]
+----
+# 1. Analyze compatibility
+protocol-squisher check \
+ --rust lib.rs --python models.py
+
+# 2. Get optimization tips
+protocol-squisher optimize \
+ --rust lib.rs --python models.py
+
+# 3. Generate adapter
+protocol-squisher generate \
+ --rust lib.rs --python models.py \
+ --output ./generated
+----
+
+Done. No boilerplate.
+
+'''''
+
+*Tweet 10 (Performance Numbers)*
+
+Real benchmarks from examples/:
+
+[cols=",",options="header",]
+|===
+|Class |Field Access
+|Concorde |~1ns
+|Business |~5ns
+|Economy |~50ns
+|Wheelbarrow |~1000ns
+|===
+
+Concorde is competitive with hand-written FFI.
+
+Business is acceptable overhead for safety.
+
+'''''
+
+*Tweet 11 (Before/After)*
+
+*Before* (manual): - 200+ lines PyO3 boilerplate - Manual error handling
+- No type stubs - No tests - Maintenance burden
+
+*After* (protocol-squisher): - 5 lines: `+#[derive(Serialize)]+` - Run
+`+protocol-squisher generate+` - Get bindings + stubs + tests - ~1ns
+field access
+
+'''''
+
+*Tweet 12 (What’s Working)*
+
+MVP Complete (100%):
+
+✅ 678 tests passing ✅ Rust ↔ Python working ✅ All 4 transport classes
+✅ Formal proofs (Agda + Lean) ✅ CLI (analyze/check/optimize/generate)
+✅ Zero-copy benchmarks
+
+Supported: Rust, Python, Protobuf, Thrift, Avro, MessagePack,
+FlatBuffers, Cap’n Proto, Bebop, ReScript, JSON Schema
+
+'''''
+
+*Tweet 13 (Try It)*
+
+Want to try it?
+
+[source,bash]
+----
+git clone \
+ github.com/hyperpolymath/protocol-squisher
+
+cd protocol-squisher/examples/zero-copy-demo
+./build.sh
+python test.py # See ~1ns magic
+----
+
+Or install CLI:
+
+[source,bash]
+----
+cargo install \
+ --path crates/protocol-squisher-cli
+----
+
+'''''
+
+*Tweet 14 (Why This Matters)*
+
+Polyglot systems are the norm.
+
+Every microservice boundary = potential serialization mismatch.
+
+Manual adapters are: • Time-consuming • Error-prone • Unmaintained (bit
+rot)
+
+Protocol Squisher makes interop a build step, not a maintenance burden.
+
+'''''
+
+*Tweet 15 (Call to Action)*
+
+What I’m looking for:
+
+🐛 Edge cases that break the analysis 🎯 Real-world schemas to test 🚀
+New format analyzers 📊 Performance optimizations 🔬 More formal proofs
+
+Repo: github.com/hyperpolymath/protocol-squisher
+
+Open an issue. Send a PR. Let’s make FFI suck less.
+
+'''''
+
+*Tweet 16 (Honest Limitations)*
+
+Being real about limitations:
+
+❌ Wheelbarrow is slow (by design) ❌ No runtime schema inference ❌
+Optimization quality varies by format pair ❌ No circular refs yet ❌
+Enum compatibility is tricky
+
+We document losses upfront. No surprises.
+
+But the invariant ALWAYS holds.
+
+'''''
+
+*Tweet 17 (The Philosophy)*
+
+Design principles:
+
+[arabic]
+. Correctness > Performance
+. Document losses upfront
+. Pessimistic analysis (false positives OK, false negatives NOT)
+. JSON as universal fallback
+. Make it a compiler problem
+
+If we can’t prove it’s safe, we assume it’s not.
+
+'''''
+
+*Tweet 18 (Future Plans)*
+
+*Phase 2* (next): Protobuf, Thrift, Avro, Cap’n Proto, MessagePack
+
+*Phase 3*: Circular refs, custom rules, streaming adapters
+
+*Phase 4*: Cargo plugin, IDE integration, CI/CD checks
+
+See roadmap:
+github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc
+
+'''''
+
+*Tweet 19 (Links)*
+
+All the resources:
+
+📖 Docs:
+github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
+
+💡 Examples:
+github.com/hyperpolymath/protocol-squisher/tree/main/examples
+
+🔬 Proofs: github.com/hyperpolymath/protocol-squisher/tree/main/proofs
+
+🗺️ Roadmap:
+github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc
+
+'''''
+
+*Tweet 20 (Final CTA)*
+
+If you’ve ever:
+
+• Spent a day debugging PyO3 boilerplate • Cursed at FFI lifetime errors
+• Maintained format adapters • Wanted universal serialization interop
+
+This might save you some pain.
+
+⭐ Star: github.com/hyperpolymath/protocol-squisher
+
+Let’s ship it. 🚀
+
+'''''
+
+*Optional Reply Thread (Technical Deep Dive)*
+
+'''''
+
+*Reply 1 (How Transport Classes Work)*
+
+Q: How do you determine transport class?
+
+A: We analyze type compatibility at the field level:
+
+....
+i64 ↔ int (64-bit) = Concorde (identical)
+i32 → i64 = Business (safe widening)
+i64 → i32 = Wheelbarrow (narrowing, needs JSON)
+f64 → JSON = Economy (precision loss)
+....
+
+Container class = worst element.
+
+'''''
+
+*Reply 2 (Formal Proofs Detail)*
+
+Q: What does the Agda proof look like?
+
+A: Here’s Concorde safety:
+
+[source,agda]
+----
+concorde-safe : ∀ {T : Type} →
+ (conv : T → T) →
+ (∀ x → conv x ≡ x) →
+ Lossless conv ∧ Bijective conv
+
+concorde-safe conv id-proof =
+ ⟨ lossless-proof , bijective-proof ⟩
+ where
+ lossless-proof = id-proof
+ bijective-proof = id-is-bijective
+----
+
+Proven, not tested.
+
+'''''
+
+*Reply 3 (JSON Fallback Detail)*
+
+Q: Why JSON for Wheelbarrow?
+
+A: JSON is the universal interchange format.
+
+Every language can serialize/deserialize JSON. It’s slow, but it’s a
+guaranteed fallback.
+
+This is what makes "`if it compiles, it carries`" possible.
+
+Without JSON: some conversions are impossible.
+
+'''''
+
+*Reply 4 (Performance Why)*
+
+Q: Why is Concorde so fast?
+
+A: Zero-copy. When types match perfectly, we use PyO3’s direct struct
+access:
+
+[source,rust]
+----
+#[pyclass]
+struct User {
+ #[pyo3(get)]
+ id: i64, // Direct memory access from Python
+}
+----
+
+No serialization. No allocation. Just pointer arithmetic.
+
+~1ns = cost of a memory load.
+
+'''''
+
+*Reply 5 (Comparison to Alternatives)*
+
+Q: How is this different from X?
+
+*vs gRPC/Protobuf:* - They require everyone use same format - We bridge
+_existing_ formats
+
+*vs JSON everywhere:* - We’re faster (zero-copy when possible) -
+Type-safe (compile-time checks)
+
+*vs manual FFI:* - Auto-generated - Formally verified - Maintained
+
+'''''
+
+*Reply 6 (Contributing)*
+
+Q: How can I contribute?
+
+A: We need:
+
+*Format analyzers:* - Parse your favorite serialization format - Map to
+ephapax IR - Add tests
+
+*Edge cases:* - Schemas that break analysis - Real-world data that fails
+
+*Proofs:* - Extend theorem library - Cross-validate in new provers
+
+Issues: github.com/hyperpolymath/protocol-squisher/issues
+
+'''''
+
+*End of Thread*
diff --git a/provenance/docs/launch/TWEET-THREAD.md b/provenance/docs/launch/TWEET-THREAD.md
deleted file mode 100644
index b586bc7..0000000
--- a/provenance/docs/launch/TWEET-THREAD.md
+++ /dev/null
@@ -1,459 +0,0 @@
-
-# Protocol Squisher Launch - Twitter/X Thread
-
----
-
-**Tweet 1 (Hook)**
-
-Stop writing FFI code manually. 🛑
-
-I built a tool that auto-generates adapters between ANY two serialization formats.
-
-Rust ↔ Python? ✅
-Cap'n Proto ↔ JSON? ✅
-Thrift ↔ Avro? ✅
-
-If it compiles, it carries.
-
-Thread 🧵👇
-
----
-
-**Tweet 2 (The Problem)**
-
-You know the pain:
-
-• Rust service (serde)
-• Python service (Pydantic)
-• They need to talk
-
-So you write 200+ lines of PyO3 boilerplate, debug segfaults, and maintain it forever as schemas drift.
-
-There's a better way.
-
----
-
-**Tweet 3 (The Solution - Part 1)**
-
-Protocol Squisher analyzes schema pairs and synthesizes the minimum viable adapter.
-
-```bash
-$ protocol-squisher check \
- --rust lib.rs \
- --python models.py
-
-Transport Class: Concorde
-Fidelity: 100%
-Overhead: 0%
-
-Zero-copy possible ✓
-```
-
-It tells you the cost BEFORE generating code.
-
----
-
-**Tweet 4 (Transport Classes)**
-
-Every schema pair gets classified:
-
-🛩️ **Concorde**: 100% fidelity, 0% overhead (~1ns)
-💺 **Business**: 98% fidelity, 5% overhead (~5ns)
-🎫 **Economy**: 80% fidelity, 25% overhead (~50ns)
-🛒 **Wheelbarrow**: 50% fidelity, 80% overhead (~1000ns)
-
-You get to decide if the cost is acceptable.
-
----
-
-**Tweet 5 (Concorde Example)**
-
-Concorde = zero-copy transport.
-
-Rust:
-```rust
-struct User {
- id: i64, // 64-bit signed
- balance: f64, // IEEE 754
-}
-```
-
-Python:
-```python
-class User(BaseModel):
- id: int # 64-bit signed
- balance: float # IEEE 754
-```
-
-Perfect match → direct memory access → ~1ns per field
-
----
-
-**Tweet 6 (Wheelbarrow Example)**
-
-Wheelbarrow = it works, but slowly.
-
-Rust `i64` → Python `i32` (narrowing)
-
-Can't prove it's safe, so we fall back to JSON.
-
-Result: 100-1000x slower
-
-The tool warns you:
-```
-⚠ Field 'big_id': Wheelbarrow class
- Requires JSON fallback
- RECOMMEND: Use i64 on Python side
-```
-
----
-
-**Tweet 7 (The Invariant)**
-
-Core guarantee:
-
-> "If it compiles, it carries."
->
-> For any valid input in format A, there exists a valid output in format B.
-
-Even if slow. Even if lossy. But it WILL transport.
-
-This is backed by formal proofs in Agda and Lean.
-
----
-
-**Tweet 8 (Formal Verification)**
-
-We don't just test. We **prove** correctness.
-
-4 theorems verified in multiple theorem provers:
-
-1. Concorde is lossless + bijective
-2. Narrowing needs fallback
-3. Container class = worst element
-4. The invariant holds
-
-See: github.com/hyperpolymath/protocol-squisher/tree/main/proofs
-
----
-
-**Tweet 9 (CLI Workflow)**
-
-```bash
-# 1. Analyze compatibility
-protocol-squisher check \
- --rust lib.rs --python models.py
-
-# 2. Get optimization tips
-protocol-squisher optimize \
- --rust lib.rs --python models.py
-
-# 3. Generate adapter
-protocol-squisher generate \
- --rust lib.rs --python models.py \
- --output ./generated
-```
-
-Done. No boilerplate.
-
----
-
-**Tweet 10 (Performance Numbers)**
-
-Real benchmarks from examples/:
-
-| Class | Field Access |
-|-------|--------------|
-| Concorde | ~1ns |
-| Business | ~5ns |
-| Economy | ~50ns |
-| Wheelbarrow | ~1000ns |
-
-Concorde is competitive with hand-written FFI.
-
-Business is acceptable overhead for safety.
-
----
-
-**Tweet 11 (Before/After)**
-
-**Before** (manual):
-- 200+ lines PyO3 boilerplate
-- Manual error handling
-- No type stubs
-- No tests
-- Maintenance burden
-
-**After** (protocol-squisher):
-- 5 lines: `#[derive(Serialize)]`
-- Run `protocol-squisher generate`
-- Get bindings + stubs + tests
-- ~1ns field access
-
----
-
-**Tweet 12 (What's Working)**
-
-MVP Complete (100%):
-
-✅ 678 tests passing
-✅ Rust ↔ Python working
-✅ All 4 transport classes
-✅ Formal proofs (Agda + Lean)
-✅ CLI (analyze/check/optimize/generate)
-✅ Zero-copy benchmarks
-
-Supported: Rust, Python, Protobuf, Thrift, Avro, MessagePack,
-FlatBuffers, Cap'n Proto, Bebop, ReScript, JSON Schema
-
----
-
-**Tweet 13 (Try It)**
-
-Want to try it?
-
-```bash
-git clone \
- github.com/hyperpolymath/protocol-squisher
-
-cd protocol-squisher/examples/zero-copy-demo
-./build.sh
-python test.py # See ~1ns magic
-```
-
-Or install CLI:
-```bash
-cargo install \
- --path crates/protocol-squisher-cli
-```
-
----
-
-**Tweet 14 (Why This Matters)**
-
-Polyglot systems are the norm.
-
-Every microservice boundary = potential serialization mismatch.
-
-Manual adapters are:
-• Time-consuming
-• Error-prone
-• Unmaintained (bit rot)
-
-Protocol Squisher makes interop a build step, not a maintenance burden.
-
----
-
-**Tweet 15 (Call to Action)**
-
-What I'm looking for:
-
-🐛 Edge cases that break the analysis
-🎯 Real-world schemas to test
-🚀 New format analyzers
-📊 Performance optimizations
-🔬 More formal proofs
-
-Repo: github.com/hyperpolymath/protocol-squisher
-
-Open an issue. Send a PR. Let's make FFI suck less.
-
----
-
-**Tweet 16 (Honest Limitations)**
-
-Being real about limitations:
-
-❌ Wheelbarrow is slow (by design)
-❌ No runtime schema inference
-❌ Optimization quality varies by format pair
-❌ No circular refs yet
-❌ Enum compatibility is tricky
-
-We document losses upfront. No surprises.
-
-But the invariant ALWAYS holds.
-
----
-
-**Tweet 17 (The Philosophy)**
-
-Design principles:
-
-1. Correctness > Performance
-2. Document losses upfront
-3. Pessimistic analysis (false positives OK, false negatives NOT)
-4. JSON as universal fallback
-5. Make it a compiler problem
-
-If we can't prove it's safe, we assume it's not.
-
----
-
-**Tweet 18 (Future Plans)**
-
-**Phase 2** (next): Protobuf, Thrift, Avro, Cap'n Proto, MessagePack
-
-**Phase 3**: Circular refs, custom rules, streaming adapters
-
-**Phase 4**: Cargo plugin, IDE integration, CI/CD checks
-
-See roadmap: github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc
-
----
-
-**Tweet 19 (Links)**
-
-All the resources:
-
-📖 Docs: github.com/hyperpolymath/protocol-squisher/blob/main/docs/CLI-GUIDE.adoc
-
-💡 Examples: github.com/hyperpolymath/protocol-squisher/tree/main/examples
-
-🔬 Proofs: github.com/hyperpolymath/protocol-squisher/tree/main/proofs
-
-🗺️ Roadmap: github.com/hyperpolymath/protocol-squisher/blob/main/ROADMAP.adoc
-
----
-
-**Tweet 20 (Final CTA)**
-
-If you've ever:
-
-• Spent a day debugging PyO3 boilerplate
-• Cursed at FFI lifetime errors
-• Maintained format adapters
-• Wanted universal serialization interop
-
-This might save you some pain.
-
-⭐ Star: github.com/hyperpolymath/protocol-squisher
-
-Let's ship it. 🚀
-
----
-
-**Optional Reply Thread (Technical Deep Dive)**
-
----
-
-**Reply 1 (How Transport Classes Work)**
-
-Q: How do you determine transport class?
-
-A: We analyze type compatibility at the field level:
-
-```
-i64 ↔ int (64-bit) = Concorde (identical)
-i32 → i64 = Business (safe widening)
-i64 → i32 = Wheelbarrow (narrowing, needs JSON)
-f64 → JSON = Economy (precision loss)
-```
-
-Container class = worst element.
-
----
-
-**Reply 2 (Formal Proofs Detail)**
-
-Q: What does the Agda proof look like?
-
-A: Here's Concorde safety:
-
-```agda
-concorde-safe : ∀ {T : Type} →
- (conv : T → T) →
- (∀ x → conv x ≡ x) →
- Lossless conv ∧ Bijective conv
-
-concorde-safe conv id-proof =
- ⟨ lossless-proof , bijective-proof ⟩
- where
- lossless-proof = id-proof
- bijective-proof = id-is-bijective
-```
-
-Proven, not tested.
-
----
-
-**Reply 3 (JSON Fallback Detail)**
-
-Q: Why JSON for Wheelbarrow?
-
-A: JSON is the universal interchange format.
-
-Every language can serialize/deserialize JSON. It's slow, but it's a guaranteed fallback.
-
-This is what makes "if it compiles, it carries" possible.
-
-Without JSON: some conversions are impossible.
-
----
-
-**Reply 4 (Performance Why)**
-
-Q: Why is Concorde so fast?
-
-A: Zero-copy. When types match perfectly, we use PyO3's direct struct access:
-
-```rust
-#[pyclass]
-struct User {
- #[pyo3(get)]
- id: i64, // Direct memory access from Python
-}
-```
-
-No serialization. No allocation. Just pointer arithmetic.
-
-~1ns = cost of a memory load.
-
----
-
-**Reply 5 (Comparison to Alternatives)**
-
-Q: How is this different from X?
-
-**vs gRPC/Protobuf:**
-- They require everyone use same format
-- We bridge *existing* formats
-
-**vs JSON everywhere:**
-- We're faster (zero-copy when possible)
-- Type-safe (compile-time checks)
-
-**vs manual FFI:**
-- Auto-generated
-- Formally verified
-- Maintained
-
----
-
-**Reply 6 (Contributing)**
-
-Q: How can I contribute?
-
-A: We need:
-
-**Format analyzers:**
-- Parse your favorite serialization format
-- Map to ephapax IR
-- Add tests
-
-**Edge cases:**
-- Schemas that break analysis
-- Real-world data that fails
-
-**Proofs:**
-- Extend theorem library
-- Cross-validate in new provers
-
-Issues: github.com/hyperpolymath/protocol-squisher/issues
-
----
-
-**End of Thread**
diff --git a/provenance/docs/tech-debt-2026-05-26.adoc b/provenance/docs/tech-debt-2026-05-26.adoc
new file mode 100644
index 0000000..a45c98e
--- /dev/null
+++ b/provenance/docs/tech-debt-2026-05-26.adoc
@@ -0,0 +1,84 @@
+== Tech-Debt Audit — protocol-squisher — 2026-05-26
+
+*Source:* estate-wide automated scan 2026-05-26. *Companion:*
+https://github.com/hyperpolymath/standards/tree/main/docs/audits[`+hyperpolymath/standards+`
+2026-05-26-estate-*-debt audits]. *Combined severity:* `+LOW+`.
+
+This file records the _raw findings_ — it does not by itself fix the
+debt. Each section ends with a '`Recommended next move`' line; closing
+the debt is follow-up work.
+
+=== 1. Proof debt
+
+Scanner counted the following markers in proof-bearing files of this
+repo:
+
+....
+files= 32 | Coq-Axm/Adm= 0 | Lean-srry/ax= 2 | Agda-pst= 0 | Idr-blv= 1 | Idr-prtl= 0 | Fstr-asm= 0 | TODO= 0 | Unsafe= 0
+....
+
+*Total markers:* 3. *Severity:* `+>03+`.
+
+*Marker types* (any non-zero counts above): - Coq `+Axiom+`/`+Admitted+`
+— unconditional proof escapes. - Lean `+sorry+`/`+axiom+` — Lean’s
+equivalent. - Agda `+postulate+` — accepted axiomatically. - Idris2
+`+believe_me+`/`+assert_total+` — runtime-safe coercion / totality
+assumption. - Idris2 top-level `+partial+` — totality-check waived. - F*
+`+assume val+`/`+admit_p+` — F* admit. - `+TODO PROOF+` / `+OWED:+` —
+self-documented debt markers. - `+unsafePerformIO+`/`+unsafeCoerce+` —
+soundness-relevant escape hatches in Haskell/Rust source.
+
+*Recommended next move:* triage each finding into one of: (a) discharge
+by proof, (b) cover with property-tests + a documented refutation
+budget, or (c) annotate as a known/necessary axiom (e.g. `+funExt+`) in
+`+docs/proof-debt.md+`.
+
+=== 2. Licence debt
+
+[cols=",",options="header",]
+|===
+|Field |Value
+|LICENSE file |`+LICENSE+`
+|SPDX header |`+MPL-2.0+`
+|Manifest licence |`+MPL-2.0+`
+|Body classifier |`+Palimp-MPL-2.0+`
+|Severity |`+ok+`
+|===
+
+*Recommended next move:* none for licence.
+
+=== 3. Documentation debt
+
+[cols=",",options="header",]
+|===
+|Field |Value
+|README lines |242
+|`+docs/+` files |17
+|`+docs/+` LoC |6886
+|CHANGELOG.md |Y
+|CONTRIBUTING.md |Y
+|CODE_OF_CONDUCT.md |Y
+|SECURITY.md |Y
+|Severity |`+LOW+`
+|===
+
+*Recommended next move:* `+docs/+` has only 17 file(s). Aim for ≥10
+organised docs (architecture, usage, contributing-guide,
+troubleshooting, design-decisions). The user’s bar for a
+"`heavily-developed and well-organised wiki`" is ≥10 files with topical
+organisation.
+
+=== Cross-references
+
+* Estate proof-debt audit:
+`+hyperpolymath/standards/docs/audits/2026-05-26-estate-proof-debt.md+`
+* Estate licence-debt audit:
+`+hyperpolymath/standards/docs/audits/2026-05-26-estate-licence-debt.md+`
+* Estate documentation-debt audit:
+`+hyperpolymath/standards/docs/audits/2026-05-26-estate-documentation-debt.md+`
+
+'''''
+
+🤖 Generated by Claude Code estate-wide tech-debt scan (2026-05-26).
+This file is informational — closing the debt is follow-up work owned by
+the maintainer.
diff --git a/provenance/docs/tech-debt-2026-05-26.md b/provenance/docs/tech-debt-2026-05-26.md
deleted file mode 100644
index ba7b12d..0000000
--- a/provenance/docs/tech-debt-2026-05-26.md
+++ /dev/null
@@ -1,70 +0,0 @@
-
-# Tech-Debt Audit — protocol-squisher — 2026-05-26
-
-**Source:** estate-wide automated scan 2026-05-26.
-**Companion:** [`hyperpolymath/standards` 2026-05-26-estate-*-debt audits](https://github.com/hyperpolymath/standards/tree/main/docs/audits).
-**Combined severity:** `LOW`.
-
-This file records the *raw findings* — it does not by itself fix the debt. Each section ends with a 'Recommended next move' line; closing the debt is follow-up work.
-
-## 1. Proof debt
-
-Scanner counted the following markers in proof-bearing files of this repo:
-
-```
-files= 32 | Coq-Axm/Adm= 0 | Lean-srry/ax= 2 | Agda-pst= 0 | Idr-blv= 1 | Idr-prtl= 0 | Fstr-asm= 0 | TODO= 0 | Unsafe= 0
-```
-
-**Total markers:** 3. **Severity:** `>03`.
-
-**Marker types** (any non-zero counts above):
-- Coq `Axiom`/`Admitted` — unconditional proof escapes.
-- Lean `sorry`/`axiom` — Lean's equivalent.
-- Agda `postulate` — accepted axiomatically.
-- Idris2 `believe_me`/`assert_total` — runtime-safe coercion / totality assumption.
-- Idris2 top-level `partial` — totality-check waived.
-- F\* `assume val`/`admit_p` — F\* admit.
-- `TODO PROOF` / `OWED:` — self-documented debt markers.
-- `unsafePerformIO`/`unsafeCoerce` — soundness-relevant escape hatches in Haskell/Rust source.
-
-**Recommended next move:** triage each finding into one of: (a) discharge by proof, (b) cover with property-tests + a documented refutation budget, or (c) annotate as a known/necessary axiom (e.g. `funExt`) in `docs/proof-debt.md`.
-
-## 2. Licence debt
-
-| Field | Value |
-|---|---|
-| LICENSE file | `LICENSE` |
-| SPDX header | `MPL-2.0` |
-| Manifest licence | `MPL-2.0` |
-| Body classifier | `Palimp-MPL-2.0` |
-| Severity | `ok` |
-
-**Recommended next move:** none for licence.
-
-## 3. Documentation debt
-
-| Field | Value |
-|---|---|
-| README lines | 242 |
-| `docs/` files | 17 |
-| `docs/` LoC | 6886 |
-| CHANGELOG.md | Y |
-| CONTRIBUTING.md | Y |
-| CODE_OF_CONDUCT.md | Y |
-| SECURITY.md | Y |
-| Severity | `LOW` |
-
-**Recommended next move:** `docs/` has only 17 file(s). Aim for ≥10 organised docs (architecture, usage, contributing-guide, troubleshooting, design-decisions). The user's bar for a "heavily-developed and well-organised wiki" is ≥10 files with topical organisation.
-
-## Cross-references
-
-- Estate proof-debt audit: `hyperpolymath/standards/docs/audits/2026-05-26-estate-proof-debt.md`
-- Estate licence-debt audit: `hyperpolymath/standards/docs/audits/2026-05-26-estate-licence-debt.md`
-- Estate documentation-debt audit: `hyperpolymath/standards/docs/audits/2026-05-26-estate-documentation-debt.md`
-
----
-
-🤖 Generated by Claude Code estate-wide tech-debt scan (2026-05-26). This file is informational — closing the debt is follow-up work owned by the maintainer.
diff --git a/provenance/ephapax-ir/README.adoc b/provenance/ephapax-ir/README.adoc
new file mode 100644
index 0000000..d1e294b
--- /dev/null
+++ b/provenance/ephapax-ir/README.adoc
@@ -0,0 +1,72 @@
+== protocol-squisher-transport-primitives
+
+Primitive type transport class analysis for protocol-squisher.
+
+=== Purpose
+
+This crate classifies conversions between primitive types into transport
+classes, providing the foundation for protocol-squisher’s compatibility
+analysis. The classification is based on ephapax’s linear type theory
+and will eventually be backed by Idris2 dependent type proofs via FFI.
+
+=== Transport Classes
+
+[cols=",,,",options="header",]
+|===
+|Class |Overhead |Fidelity |Use Case
+|Concorde |0% |100% |Exact type match, zero-copy
+|Business |~5% |98% |Safe widening (i32->i64)
+|Economy |~25% |80% |Container conversion
+|Wheelbarrow |~80% |50% |JSON fallback
+|===
+
+=== Key Types
+
+* `+PrimitiveType+` - All primitive IR types (I8-U128, F32, F64, Bool,
+Char, String, Unit)
+* `+ContainerType+` - Container shapes (Array, Vec, Map, Set, Optional)
+* `+CompositeType+` - Composite shapes (Struct, Enum, Tuple)
+* `+TransportClass+` - The four-tier classification
+* `+IRContext+` - Entry point for compatibility analysis
+
+=== Usage
+
+[source,rust]
+----
+use protocol_squisher_transport_primitives::{IRContext, PrimitiveType, TransportClass};
+
+let ctx = IRContext::new();
+let class = ctx.analyze_compatibility(PrimitiveType::I32, PrimitiveType::I64);
+assert_eq!(class, TransportClass::Business);
+assert_eq!(class.fidelity(), 98);
+assert_eq!(class.overhead(), 5);
+----
+
+=== The Invariant
+
+*"`If it compiles, it carries AND cannot crash`"*
+
+Proven by: 1. Idris2’s totality checker (all cases handled) 2. Dependent
+types (types encode proofs) 3. Linear types (resource safety)
+
+=== Idris2 Backend
+
+The `+idris2/+` directory contains the Idris2 implementation with
+dependent type proofs. Currently the Rust crate uses pure Rust stubs
+matching the Idris2 semantics. The C ABI surface is exported from Idris2
+and bridged via `+ffi/zig/+`; `+src/ffi.rs+` stays as the Rust-side
+semantic fallback in stub mode.
+
+=== Relationship to ephapax
+
+The ephapax language and compiler live in their own repository. This
+crate consumes ephapax’s type-theoretic guarantees for protocol
+conversion safety. The ephapax compiler is *not* embedded here — it is
+an external dependency.
+
+=== See Also
+
+* https://github.com/hyperpolymath/ephapax[ephapax repo] - The ephapax
+language
+* link:../EPHAPAX-INTEGRATION.adoc[EPHAPAX-INTEGRATION.adoc] -
+Integration architecture
diff --git a/provenance/ephapax-ir/README.md b/provenance/ephapax-ir/README.md
deleted file mode 100644
index a6a83f8..0000000
--- a/provenance/ephapax-ir/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-
-# protocol-squisher-transport-primitives
-
-Primitive type transport class analysis for protocol-squisher.
-
-## Purpose
-
-This crate classifies conversions between primitive types into transport classes,
-providing the foundation for protocol-squisher's compatibility analysis. The
-classification is based on ephapax's linear type theory and will eventually be
-backed by Idris2 dependent type proofs via FFI.
-
-## Transport Classes
-
-| Class | Overhead | Fidelity | Use Case |
-|-------|----------|----------|----------|
-| Concorde | 0% | 100% | Exact type match, zero-copy |
-| Business | ~5% | 98% | Safe widening (i32->i64) |
-| Economy | ~25% | 80% | Container conversion |
-| Wheelbarrow | ~80% | 50% | JSON fallback |
-
-## Key Types
-
-- `PrimitiveType` - All primitive IR types (I8-U128, F32, F64, Bool, Char, String, Unit)
-- `ContainerType` - Container shapes (Array, Vec, Map, Set, Optional)
-- `CompositeType` - Composite shapes (Struct, Enum, Tuple)
-- `TransportClass` - The four-tier classification
-- `IRContext` - Entry point for compatibility analysis
-
-## Usage
-
-```rust
-use protocol_squisher_transport_primitives::{IRContext, PrimitiveType, TransportClass};
-
-let ctx = IRContext::new();
-let class = ctx.analyze_compatibility(PrimitiveType::I32, PrimitiveType::I64);
-assert_eq!(class, TransportClass::Business);
-assert_eq!(class.fidelity(), 98);
-assert_eq!(class.overhead(), 5);
-```
-
-## The Invariant
-
-**"If it compiles, it carries AND cannot crash"**
-
-Proven by:
-1. Idris2's totality checker (all cases handled)
-2. Dependent types (types encode proofs)
-3. Linear types (resource safety)
-
-## Idris2 Backend
-
-The `idris2/` directory contains the Idris2 implementation with dependent type
-proofs. Currently the Rust crate uses pure Rust stubs matching the Idris2
-semantics. The C ABI surface is exported from Idris2 and bridged via
-`ffi/zig/`; `src/ffi.rs` stays as the Rust-side semantic fallback in stub mode.
-
-## Relationship to ephapax
-
-The ephapax language and compiler live in their own repository. This crate
-consumes ephapax's type-theoretic guarantees for protocol conversion safety.
-The ephapax compiler is **not** embedded here — it is an external dependency.
-
-## See Also
-
-- [ephapax repo](https://github.com/hyperpolymath/ephapax) - The ephapax language
-- [EPHAPAX-INTEGRATION.adoc](../EPHAPAX-INTEGRATION.adoc) - Integration architecture
diff --git a/provenance/examples/README.adoc b/provenance/examples/README.adoc
new file mode 100644
index 0000000..d5589dc
--- /dev/null
+++ b/provenance/examples/README.adoc
@@ -0,0 +1,185 @@
+== Protocol Squisher Examples
+
+This directory contains example projects demonstrating
+protocol-squisher’s capabilities for zero-copy Rust↔Python
+interoperability.
+
+=== Examples Overview
+
+==== 1. zero-copy-demo/ ⭐ Start Here
+
+*Concorde-class transport (100% fidelity, 0% overhead)*
+
+Demonstrates perfect type compatibility between Rust and Python: - i64 ↔
+int (both 64-bit signed integers) - f64 ↔ float (both IEEE 754 double
+precision) - String ↔ str (both UTF-8 strings) - bool ↔ bool (both
+boolean values)
+
+*Key takeaway:* When types match perfectly, you get direct memory access
+with ~1ns per field access.
+
+[source,bash]
+----
+cd zero-copy-demo
+./build.sh
+python test.py
+----
+
+==== 2. mixed-transport/
+
+*Business and Wheelbarrow classes*
+
+Shows what happens when types don’t perfectly match: - *Business class:*
+Safe widening (i32→i64, f32→f64) with minor overhead - *Wheelbarrow
+class:* Narrowing (i64→i32) requires JSON fallback (100-1000x slower)
+
+*Key takeaway:* Avoid narrowing conversions. Safe widening is
+acceptable.
+
+[source,bash]
+----
+cd mixed-transport
+# See README.md for analysis examples
+----
+
+==== 3. rust_python_interop.rs
+
+Basic example showing schema extraction and analysis.
+
+==== 4. schema_format_comparison.rs
+
+Demonstrates analyzing different schema formats (Rust, Python, JSON
+Schema, Protobuf).
+
+=== Quick Start
+
+==== Analyze a Schema
+
+[source,bash]
+----
+# Analyze Rust types
+cargo run -p protocol-squisher-cli -- analyze --rust examples/zero-copy-demo/src/lib.rs
+
+# Analyze with detailed output
+cargo run -p protocol-squisher-cli -- analyze --rust examples/zero-copy-demo/src/lib.rs --detailed
+----
+
+==== Check Compatibility
+
+[source,bash]
+----
+cargo run -p protocol-squisher-cli -- check \
+ --rust examples/zero-copy-demo/src/lib.rs \
+ --python examples/zero-copy-demo/models.py
+----
+
+==== Get Optimization Suggestions
+
+[source,bash]
+----
+cargo run -p protocol-squisher-cli -- optimize \
+ --rust examples/mixed-transport/src/lib.rs \
+ --python examples/mixed-transport/models.py
+----
+
+==== Generate PyO3 Bindings
+
+[source,bash]
+----
+cargo run -p protocol-squisher-cli -- generate \
+ --rust examples/zero-copy-demo/src/lib.rs \
+ --python examples/zero-copy-demo/models.py \
+ --output generated/ \
+ --stubs
+----
+
+=== Transport Class Quick Reference
+
+[cols=",,,,",options="header",]
+|===
+|Class |Fidelity |Overhead |Examples |Performance
+|*Concorde* |100% |0% |i64↔int, f64↔float, String↔str |~1ns
+|*Business* |98% |5% |i32→int, f32→float |~2-5ns
+|*Economy* |80% |25% |Documented minor losses |~10-50ns
+|*Wheelbarrow* |50% |80% |i64→i32, needs JSON |~100-1000ns
+|===
+
+=== Best Practices
+
+==== ✅ DO
+
+[arabic]
+. *Match types from the start*
+* Rust i64 ↔ Python int
+* Rust f64 ↔ Python float
+* Rust String ↔ Python str
+* Rust bool ↔ Python bool
+. *Use protocol-squisher analyze early*
+* Run analysis during schema design
+* Fix issues before implementing
+. *Accept Business class when necessary*
+* Safe widening (i32→i64) is OK
+* Minor overhead is acceptable for safety
+
+==== ❌ DON’T
+
+[arabic]
+. *Avoid narrowing conversions*
+* i64 → i32 (Wheelbarrow class)
+* f64 → f32 (Wheelbarrow class)
+* Requires JSON fallback (100-1000x slower)
+. *Don’t ignore warnings*
+* Generated code includes WARNING comments
+* Wheelbarrow fields have high overhead
+. *Don’t assume all conversions are free*
+* Run `+protocol-squisher analyze+` to verify
+* Check transport classes for all fields
+
+=== Building Examples
+
+Most examples are standalone Rust projects with PyO3:
+
+[source,bash]
+----
+cd examples/NAME
+cargo build --release
+python test.py # If available
+----
+
+For PyO3 examples with maturin:
+
+[source,bash]
+----
+cd examples/NAME
+./build.sh # Runs maturin develop
+python test.py
+----
+
+=== Example Project Structure
+
+....
+examples/NAME/
+├── Cargo.toml # Rust project configuration
+├── pyproject.toml # Python/maturin configuration (if PyO3)
+├── README.md # Example-specific documentation
+├── build.sh # Build script (if needed)
+├── src/
+│ └── lib.rs # Rust implementation
+├── models.py # Python type definitions (if applicable)
+└── test.py # Python test/demo script (if applicable)
+....
+
+=== Next Steps
+
+[arabic]
+. *Start with zero-copy-demo/* to understand Concorde-class transport
+. *Read mixed-transport/* to learn about Business and Wheelbarrow
+classes
+. *Try the CLI commands* on your own schemas
+. *Run optimization analysis* to improve transport classes
+
+=== See Also
+
+* link:../crates/protocol-squisher-cli/README.md[CLI Documentation]
+* link:../docs/transport-classes.md[Transport Classes Explained]
+* link:../docs/optimization.md[Optimization Guide]
diff --git a/provenance/examples/README.md b/provenance/examples/README.md
deleted file mode 100644
index 898c4a3..0000000
--- a/provenance/examples/README.md
+++ /dev/null
@@ -1,171 +0,0 @@
-
-# Protocol Squisher Examples
-
-This directory contains example projects demonstrating protocol-squisher's capabilities for zero-copy Rust↔Python interoperability.
-
-## Examples Overview
-
-### 1. zero-copy-demo/ ⭐ Start Here
-**Concorde-class transport (100% fidelity, 0% overhead)**
-
-Demonstrates perfect type compatibility between Rust and Python:
-- i64 ↔ int (both 64-bit signed integers)
-- f64 ↔ float (both IEEE 754 double precision)
-- String ↔ str (both UTF-8 strings)
-- bool ↔ bool (both boolean values)
-
-**Key takeaway:** When types match perfectly, you get direct memory access with ~1ns per field access.
-
-```bash
-cd zero-copy-demo
-./build.sh
-python test.py
-```
-
-### 2. mixed-transport/
-**Business and Wheelbarrow classes**
-
-Shows what happens when types don't perfectly match:
-- **Business class:** Safe widening (i32→i64, f32→f64) with minor overhead
-- **Wheelbarrow class:** Narrowing (i64→i32) requires JSON fallback (100-1000x slower)
-
-**Key takeaway:** Avoid narrowing conversions. Safe widening is acceptable.
-
-```bash
-cd mixed-transport
-# See README.md for analysis examples
-```
-
-### 3. rust_python_interop.rs
-Basic example showing schema extraction and analysis.
-
-### 4. schema_format_comparison.rs
-Demonstrates analyzing different schema formats (Rust, Python, JSON Schema, Protobuf).
-
-## Quick Start
-
-### Analyze a Schema
-
-```bash
-# Analyze Rust types
-cargo run -p protocol-squisher-cli -- analyze --rust examples/zero-copy-demo/src/lib.rs
-
-# Analyze with detailed output
-cargo run -p protocol-squisher-cli -- analyze --rust examples/zero-copy-demo/src/lib.rs --detailed
-```
-
-### Check Compatibility
-
-```bash
-cargo run -p protocol-squisher-cli -- check \
- --rust examples/zero-copy-demo/src/lib.rs \
- --python examples/zero-copy-demo/models.py
-```
-
-### Get Optimization Suggestions
-
-```bash
-cargo run -p protocol-squisher-cli -- optimize \
- --rust examples/mixed-transport/src/lib.rs \
- --python examples/mixed-transport/models.py
-```
-
-### Generate PyO3 Bindings
-
-```bash
-cargo run -p protocol-squisher-cli -- generate \
- --rust examples/zero-copy-demo/src/lib.rs \
- --python examples/zero-copy-demo/models.py \
- --output generated/ \
- --stubs
-```
-
-## Transport Class Quick Reference
-
-| Class | Fidelity | Overhead | Examples | Performance |
-|-------|----------|----------|----------|-------------|
-| **Concorde** | 100% | 0% | i64↔int, f64↔float, String↔str | ~1ns |
-| **Business** | 98% | 5% | i32→int, f32→float | ~2-5ns |
-| **Economy** | 80% | 25% | Documented minor losses | ~10-50ns |
-| **Wheelbarrow** | 50% | 80% | i64→i32, needs JSON | ~100-1000ns |
-
-## Best Practices
-
-### ✅ DO
-
-1. **Match types from the start**
- - Rust i64 ↔ Python int
- - Rust f64 ↔ Python float
- - Rust String ↔ Python str
- - Rust bool ↔ Python bool
-
-2. **Use protocol-squisher analyze early**
- - Run analysis during schema design
- - Fix issues before implementing
-
-3. **Accept Business class when necessary**
- - Safe widening (i32→i64) is OK
- - Minor overhead is acceptable for safety
-
-### ❌ DON'T
-
-1. **Avoid narrowing conversions**
- - i64 → i32 (Wheelbarrow class)
- - f64 → f32 (Wheelbarrow class)
- - Requires JSON fallback (100-1000x slower)
-
-2. **Don't ignore warnings**
- - Generated code includes WARNING comments
- - Wheelbarrow fields have high overhead
-
-3. **Don't assume all conversions are free**
- - Run `protocol-squisher analyze` to verify
- - Check transport classes for all fields
-
-## Building Examples
-
-Most examples are standalone Rust projects with PyO3:
-
-```bash
-cd examples/NAME
-cargo build --release
-python test.py # If available
-```
-
-For PyO3 examples with maturin:
-
-```bash
-cd examples/NAME
-./build.sh # Runs maturin develop
-python test.py
-```
-
-## Example Project Structure
-
-```
-examples/NAME/
-├── Cargo.toml # Rust project configuration
-├── pyproject.toml # Python/maturin configuration (if PyO3)
-├── README.md # Example-specific documentation
-├── build.sh # Build script (if needed)
-├── src/
-│ └── lib.rs # Rust implementation
-├── models.py # Python type definitions (if applicable)
-└── test.py # Python test/demo script (if applicable)
-```
-
-## Next Steps
-
-1. **Start with zero-copy-demo/** to understand Concorde-class transport
-2. **Read mixed-transport/** to learn about Business and Wheelbarrow classes
-3. **Try the CLI commands** on your own schemas
-4. **Run optimization analysis** to improve transport classes
-
-## See Also
-
-- [CLI Documentation](../crates/protocol-squisher-cli/README.md)
-- [Transport Classes Explained](../docs/transport-classes.md)
-- [Optimization Guide](../docs/optimization.md)
diff --git a/provenance/examples/mixed-transport/README.md b/provenance/examples/mixed-transport/README.adoc
similarity index 65%
rename from provenance/examples/mixed-transport/README.md
rename to provenance/examples/mixed-transport/README.adoc
index d0f26cb..8d4502c 100644
--- a/provenance/examples/mixed-transport/README.md
+++ b/provenance/examples/mixed-transport/README.adoc
@@ -1,25 +1,26 @@
-
-# Mixed Transport Example
+== Mixed Transport Example
-This example demonstrates **mixed transport classes** - when some fields are zero-copy (Concorde) but others require conversion (Business) or JSON fallback (Wheelbarrow).
+This example demonstrates *mixed transport classes* - when some fields
+are zero-copy (Concorde) but others require conversion (Business) or
+JSON fallback (Wheelbarrow).
-## Transport Classes Overview
+=== Transport Classes Overview
-| Class | Fidelity | Overhead | Use Case |
-|-------|----------|----------|----------|
-| **Concorde** | 100% | 0% | Identical types (i64↔int) |
-| **Business** | 98% | 5% | Safe widening (i32→i64) |
-| **Economy** | 80% | 25% | Documented minor losses |
-| **Wheelbarrow** | 50% | 80% | Narrowing (i64→i32), JSON fallback |
+[cols=",,,",options="header",]
+|===
+|Class |Fidelity |Overhead |Use Case
+|*Concorde* |100% |0% |Identical types (i64↔int)
+|*Business* |98% |5% |Safe widening (i32→i64)
+|*Economy* |80% |25% |Documented minor losses
+|*Wheelbarrow* |50% |80% |Narrowing (i64→i32), JSON fallback
+|===
-## This Example
+=== This Example
-### Struct with Mixed Transport Classes
+==== Struct with Mixed Transport Classes
-```rust
+[source,rust]
+----
#[derive(Serialize, Deserialize)]
pub struct MixedRecord {
pub id: i64, // Concorde: i64 ↔ int ✓
@@ -27,20 +28,23 @@ pub struct MixedRecord {
pub timestamp: i64, // Concorde: i64 ↔ int ✓
pub score: f32, // Business: f32 ↔ float (widening)
}
-```
+----
-**Python side (if we were narrowing):**
-```python
+*Python side (if we were narrowing):*
+
+[source,python]
+----
class ProblematicRecord(BaseModel):
id: int # i64 → int ✓ Concorde
value: int32 # i64 → int32 ✗ Wheelbarrow (if value was i64 in Rust)
timestamp: int # i64 → int ✓ Concorde
score: float32 # f64 → float32 ✗ Wheelbarrow (if score was f64 in Rust)
-```
+----
-## Analysis Output
+=== Analysis Output
-```bash
+[source,bash]
+----
$ protocol-squisher analyze --rust src/lib.rs --python models.py
Schema Compatibility Analysis:
@@ -59,33 +63,38 @@ Quality Metrics:
Safe conversions: 4/4 (100%)
JSON fallback: 0/4 (0%)
Production readiness: ✓ Yes
-```
+----
-## Business Class: Safe Widening
+=== Business Class: Safe Widening
-Business-class transport occurs when widening numeric types (no data loss):
+Business-class transport occurs when widening numeric types (no data
+loss):
-```rust
+[source,rust]
+----
// Rust source
pub struct SourceData {
pub count: i32, // 32-bit signed
pub ratio: f32, // 32-bit float
}
-```
+----
-```python
+[source,python]
+----
# Python target
class TargetData(BaseModel):
count: int # Python int is i64 internally (widening!)
ratio: float # Python float is f64 internally (widening!)
-```
+----
+
+*Result:* - `+count+`: i32 → i64 = *Business* (safe widening, minor
+overhead) - `+ratio+`: f32 → f64 = *Business* (safe widening, minor
+overhead)
-**Result:**
-- `count`: i32 → i64 = **Business** (safe widening, minor overhead)
-- `ratio`: f32 → f64 = **Business** (safe widening, minor overhead)
+*Generated Code:*
-**Generated Code:**
-```rust
+[source,rust]
+----
#[pyclass]
pub struct TargetData {
#[pyo3(get)]
@@ -98,33 +107,35 @@ pub struct TargetData {
Ok(())
}
}
-```
+----
-## Wheelbarrow Class: Narrowing (Avoid!)
+=== Wheelbarrow Class: Narrowing (Avoid!)
Wheelbarrow-class requires JSON fallback due to potential data loss:
-```rust
+[source,rust]
+----
// Rust source (BAD DESIGN)
pub struct BigData {
pub large_number: i64, // Can hold values > 2^31
}
-```
+----
-```python
+[source,python]
+----
# Python target (INCOMPATIBLE)
class SmallData(BaseModel):
large_number: int32 # Can only hold values up to 2^31 - 1
-```
+----
+
+*Result:* - `+large_number+`: i64 → i32 = *Wheelbarrow* ✗ - Requires
+JSON serialization/deserialization - 100-1000x slower than zero-copy -
+Risk of runtime errors if value too large
-**Result:**
-- `large_number`: i64 → i32 = **Wheelbarrow** ✗
-- Requires JSON serialization/deserialization
-- 100-1000x slower than zero-copy
-- Risk of runtime errors if value too large
+*Generated Code (with WARNING):*
-**Generated Code (with WARNING):**
-```rust
+[source,rust]
+----
// ⚠ WARNING: This field uses JSON fallback (Wheelbarrow class)
// Reason: Narrowing conversion i64 → i32 may lose data
impl TargetData {
@@ -136,11 +147,12 @@ impl TargetData {
Ok(Self { large_number })
}
}
-```
+----
-## Optimization Suggestions
+=== Optimization Suggestions
-```bash
+[source,bash]
+----
$ protocol-squisher optimize --rust src/lib.rs --python models.py
Optimization Opportunities:
@@ -156,19 +168,22 @@ MEDIUM IMPACT:
Fields without values could avoid serialization entirely
Estimated Improvement: 25% fewer JSON conversions
-```
+----
-## Key Takeaways
+=== Key Takeaways
-✅ **Business class is OK** - Safe widening (i32→i64, f32→f64) has minimal overhead
+✅ *Business class is OK* - Safe widening (i32→i64, f32→f64) has minimal
+overhead
-⚠️ **Avoid Wheelbarrow class** - Narrowing (i64→i32, f64→f32) requires JSON fallback
+⚠️ *Avoid Wheelbarrow class* - Narrowing (i64→i32, f64→f32) requires
+JSON fallback
-🎯 **Best Practice:** Design schemas with matching types from the start
+🎯 *Best Practice:* Design schemas with matching types from the start
-## Running This Example
+=== Running This Example
-```bash
+[source,bash]
+----
# Analyze transport classes
cargo run -p protocol-squisher-cli -- analyze --rust examples/mixed-transport/src/lib.rs
@@ -179,9 +194,9 @@ cargo run -p protocol-squisher-cli -- optimize --rust examples/mixed-transport/s
cd examples/mixed-transport
./build.sh
python test.py
-```
+----
-## See Also
+=== See Also
-- `examples/zero-copy-demo/` - Concorde-class only (best performance)
-- `examples/optimization/` - Before/after optimization examples
+* `+examples/zero-copy-demo/+` - Concorde-class only (best performance)
+* `+examples/optimization/+` - Before/after optimization examples
diff --git a/provenance/examples/zero-copy-demo/README.adoc b/provenance/examples/zero-copy-demo/README.adoc
new file mode 100644
index 0000000..3717da7
--- /dev/null
+++ b/provenance/examples/zero-copy-demo/README.adoc
@@ -0,0 +1,164 @@
+== Zero-Copy Interop Example
+
+This example demonstrates *Concorde-class* (zero-copy, 100% fidelity)
+conversions between Rust and Python.
+
+=== What is Zero-Copy?
+
+Zero-copy means data can be accessed directly without
+serialization/deserialization overhead. Protocol Squisher identifies
+when types are compatible enough to share memory representations.
+
+=== Transport Classes
+
+* *Concorde* (100% fidelity, 0% overhead): Zero-copy, perfect match
+* *Business* (98% fidelity, 5% overhead): Safe widening (i32→i64)
+* *Economy* (80% fidelity, 25% overhead): Minor documented losses
+* *Wheelbarrow* (50% fidelity, 80% overhead): JSON fallback
+
+=== This Example
+
+==== Rust Schema (`+src/lib.rs+`)
+
+[source,rust]
+----
+#[derive(Serialize, Deserialize)]
+pub struct Point {
+ pub x: i64, // Concorde: i64 → i64
+ pub y: i64, // Concorde: i64 → i64
+}
+
+#[derive(Serialize, Deserialize)]
+pub struct Person {
+ pub name: String, // Concorde: String → str
+ pub age: i64, // Concorde: i64 → int
+ pub active: bool, // Concorde: bool → bool
+}
+----
+
+==== Python Schema (`+models.py+`)
+
+[source,python]
+----
+from pydantic import BaseModel
+
+class Point(BaseModel):
+ x: int # Python int (i64 internally)
+ y: int # Perfect match with Rust i64
+
+class Person(BaseModel):
+ name: str # Perfect match
+ age: int # Perfect match
+ active: bool # Perfect match
+----
+
+=== Analysis
+
+Run protocol-squisher analyze:
+
+[source,bash]
+----
+protocol-squisher analyze --rust src/lib.rs --detailed
+----
+
+*Output:*
+
+....
+Schema Information:
+ Transport Class: Concorde ✓
+
+Field-Level Analysis:
+ Point:
+ x: Concorde (100% fidelity, 0% overhead)
+ y: Concorde (100% fidelity, 0% overhead)
+
+ Person:
+ name: Concorde (100% fidelity, 0% overhead)
+ age: Concorde (100% fidelity, 0% overhead)
+ active: Concorde (100% fidelity, 0% overhead)
+....
+
+=== Generated PyO3 Bindings
+
+[source,bash]
+----
+protocol-squisher generate --rust src/lib.rs --python models.py --stubs
+----
+
+*Generated Rust (`+bindings.rs+`):*
+
+[source,rust]
+----
+#[pyclass]
+pub struct Point {
+ #[pyo3(get, set)] // Direct access - zero overhead!
+ pub x: i64,
+
+ #[pyo3(get, set)] // No serialization needed
+ pub y: i64,
+}
+
+// Quality: 100% zero-copy, production ready ✓
+----
+
+*Performance:* - *Concorde*: Direct memory access, ~1ns per field access
+- *Wheelbarrow* (JSON): Serialize/deserialize, ~100-1000ns overhead
+
+=== Why This Works
+
+[arabic]
+. *Type Compatibility*: Rust `+i64+` ↔ Python `+int+` are ABI-compatible
+. *Memory Layout*: Both use 64-bit signed integers
+. *No Conversion Needed*: Direct pointer access via PyO3
+
+=== Counter-Example: Narrowing (Wheelbarrow)
+
+==== What NOT to do:
+
+[source,rust]
+----
+// Rust
+pub struct BadPoint {
+ pub x: i64, // Source: 64-bit
+}
+----
+
+[source,python]
+----
+# Python
+class BadPoint(BaseModel):
+ x: int32 # Target: 32-bit (if we used numpy.int32)
+----
+
+*Result:* Wheelbarrow class - needs JSON fallback due to potential data
+loss!
+
+=== Running the Example
+
+[source,bash]
+----
+# Analyze
+cargo run -p protocol-squisher-cli -- analyze --rust examples/zero-copy-demo/src/lib.rs
+
+# Optimize (should show "No optimization needed")
+cargo run -p protocol-squisher-cli -- optimize --rust examples/zero-copy-demo/src/lib.rs --python examples/zero-copy-demo/models.py
+
+# Generate bindings
+cargo run -p protocol-squisher-cli -- generate --rust examples/zero-copy-demo/src/lib.rs --python examples/zero-copy-demo/models.py --output generated/
+----
+
+=== Key Takeaways
+
+✅ *DO* use matching types (i64↔int, String↔str, bool↔bool) ✅ *DO*
+prefer zero-copy when possible (100x+ faster) ✅ *DO* run
+`+protocol-squisher optimize+` to find opportunities
+
+❌ *DON’T* narrow types (i64→i32) unless necessary ❌ *DON’T* assume all
+conversions are zero-copy ❌ *DON’T* ignore Wheelbarrow warnings in
+generated code
+
+=== Next Steps
+
+* See `+examples/mixed-conversion/+` for Business/Wheelbarrow examples
+* See `+examples/optimization/+` for improving transport classes
+* Run `+protocol-squisher --help+` for all commands
diff --git a/provenance/examples/zero-copy-demo/README.md b/provenance/examples/zero-copy-demo/README.md
deleted file mode 100644
index bc11f44..0000000
--- a/provenance/examples/zero-copy-demo/README.md
+++ /dev/null
@@ -1,151 +0,0 @@
-
-# Zero-Copy Interop Example
-
-This example demonstrates **Concorde-class** (zero-copy, 100% fidelity) conversions between Rust and Python.
-
-## What is Zero-Copy?
-
-Zero-copy means data can be accessed directly without serialization/deserialization overhead. Protocol Squisher identifies when types are compatible enough to share memory representations.
-
-## Transport Classes
-
-- **Concorde** (100% fidelity, 0% overhead): Zero-copy, perfect match
-- **Business** (98% fidelity, 5% overhead): Safe widening (i32→i64)
-- **Economy** (80% fidelity, 25% overhead): Minor documented losses
-- **Wheelbarrow** (50% fidelity, 80% overhead): JSON fallback
-
-## This Example
-
-### Rust Schema (`src/lib.rs`)
-```rust
-#[derive(Serialize, Deserialize)]
-pub struct Point {
- pub x: i64, // Concorde: i64 → i64
- pub y: i64, // Concorde: i64 → i64
-}
-
-#[derive(Serialize, Deserialize)]
-pub struct Person {
- pub name: String, // Concorde: String → str
- pub age: i64, // Concorde: i64 → int
- pub active: bool, // Concorde: bool → bool
-}
-```
-
-### Python Schema (`models.py`)
-```python
-from pydantic import BaseModel
-
-class Point(BaseModel):
- x: int # Python int (i64 internally)
- y: int # Perfect match with Rust i64
-
-class Person(BaseModel):
- name: str # Perfect match
- age: int # Perfect match
- active: bool # Perfect match
-```
-
-## Analysis
-
-Run protocol-squisher analyze:
-
-```bash
-protocol-squisher analyze --rust src/lib.rs --detailed
-```
-
-**Output:**
-```
-Schema Information:
- Transport Class: Concorde ✓
-
-Field-Level Analysis:
- Point:
- x: Concorde (100% fidelity, 0% overhead)
- y: Concorde (100% fidelity, 0% overhead)
-
- Person:
- name: Concorde (100% fidelity, 0% overhead)
- age: Concorde (100% fidelity, 0% overhead)
- active: Concorde (100% fidelity, 0% overhead)
-```
-
-## Generated PyO3 Bindings
-
-```bash
-protocol-squisher generate --rust src/lib.rs --python models.py --stubs
-```
-
-**Generated Rust (`bindings.rs`):**
-```rust
-#[pyclass]
-pub struct Point {
- #[pyo3(get, set)] // Direct access - zero overhead!
- pub x: i64,
-
- #[pyo3(get, set)] // No serialization needed
- pub y: i64,
-}
-
-// Quality: 100% zero-copy, production ready ✓
-```
-
-**Performance:**
-- **Concorde**: Direct memory access, ~1ns per field access
-- **Wheelbarrow** (JSON): Serialize/deserialize, ~100-1000ns overhead
-
-## Why This Works
-
-1. **Type Compatibility**: Rust `i64` ↔ Python `int` are ABI-compatible
-2. **Memory Layout**: Both use 64-bit signed integers
-3. **No Conversion Needed**: Direct pointer access via PyO3
-
-## Counter-Example: Narrowing (Wheelbarrow)
-
-### What NOT to do:
-```rust
-// Rust
-pub struct BadPoint {
- pub x: i64, // Source: 64-bit
-}
-```
-
-```python
-# Python
-class BadPoint(BaseModel):
- x: int32 # Target: 32-bit (if we used numpy.int32)
-```
-
-**Result:** Wheelbarrow class - needs JSON fallback due to potential data loss!
-
-## Running the Example
-
-```bash
-# Analyze
-cargo run -p protocol-squisher-cli -- analyze --rust examples/zero-copy-demo/src/lib.rs
-
-# Optimize (should show "No optimization needed")
-cargo run -p protocol-squisher-cli -- optimize --rust examples/zero-copy-demo/src/lib.rs --python examples/zero-copy-demo/models.py
-
-# Generate bindings
-cargo run -p protocol-squisher-cli -- generate --rust examples/zero-copy-demo/src/lib.rs --python examples/zero-copy-demo/models.py --output generated/
-```
-
-## Key Takeaways
-
-✅ **DO** use matching types (i64↔int, String↔str, bool↔bool)
-✅ **DO** prefer zero-copy when possible (100x+ faster)
-✅ **DO** run `protocol-squisher optimize` to find opportunities
-
-❌ **DON'T** narrow types (i64→i32) unless necessary
-❌ **DON'T** assume all conversions are zero-copy
-❌ **DON'T** ignore Wheelbarrow warnings in generated code
-
-## Next Steps
-
-- See `examples/mixed-conversion/` for Business/Wheelbarrow examples
-- See `examples/optimization/` for improving transport classes
-- Run `protocol-squisher --help` for all commands
diff --git a/provenance/explorer/README.adoc b/provenance/explorer/README.adoc
new file mode 100644
index 0000000..5da9580
--- /dev/null
+++ b/provenance/explorer/README.adoc
@@ -0,0 +1,27 @@
+== Explorer Subsystem
+
+Continuous-learning subsystem for Protocol Squisher.
+
+=== Layout
+
+* `+crawler/+`: Elixir OTP GitHub schema crawler (`+mix crawler.run+`)
+* `+parser/+`: Parallel schema parsing stage and parser-related docs
+* `+database/+`: Empirical database artifacts + synthesis hints for
+optimizer
+
+=== Quick Start
+
+[source,bash]
+----
+cd explorer/crawler
+mix test
+mix crawler.run --max-pages 1
+mix crawler.pattern.extract --database-path ../../target/explorer/database
+----
+
+For corpus integration, pass:
+
+[source,bash]
+----
+mix crawler.run --with-corpus --corpus-cli ../../target/debug/protocol-squisher
+----
diff --git a/provenance/explorer/README.md b/provenance/explorer/README.md
deleted file mode 100644
index cf25543..0000000
--- a/provenance/explorer/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-
-# Explorer Subsystem
-
-Continuous-learning subsystem for Protocol Squisher.
-
-## Layout
-
-- `crawler/`: Elixir OTP GitHub schema crawler (`mix crawler.run`)
-- `parser/`: Parallel schema parsing stage and parser-related docs
-- `database/`: Empirical database artifacts + synthesis hints for optimizer
-
-## Quick Start
-
-```bash
-cd explorer/crawler
-mix test
-mix crawler.run --max-pages 1
-mix crawler.pattern.extract --database-path ../../target/explorer/database
-```
-
-For corpus integration, pass:
-
-```bash
-mix crawler.run --with-corpus --corpus-cli ../../target/debug/protocol-squisher
-```
diff --git a/provenance/explorer/crawler/README.adoc b/provenance/explorer/crawler/README.adoc
new file mode 100644
index 0000000..25c7ab0
--- /dev/null
+++ b/provenance/explorer/crawler/README.adoc
@@ -0,0 +1,71 @@
+== Protocol Squisher Explorer Crawler
+
+Elixir OTP crawler for discovering schema files on GitHub and producing
+normalized NDJSON records for the continuous-learning pipeline.
+
+=== What It Does
+
+* Queries GitHub Code Search for schema-like files.
+* Fetches file content through the GitHub API.
+* Detects Protocol Squisher format identifiers from file extensions.
+* Parses fetched schemas in parallel (heuristic parser stage).
+* Emits one NDJSON record per crawled schema.
+* Optionally invokes `+protocol-squisher corpus-analyze+` for each file.
+* Persists an empirical compatibility database summary.
+* Extracts synthesis hints consumable by the optimizer.
+
+=== Run
+
+[source,bash]
+----
+cd explorer/crawler
+mix crawler.run --max-pages 1
+----
+
+With corpus analysis enabled:
+
+[source,bash]
+----
+mix crawler.run \
+ --with-corpus \
+ --with-patterns \
+ --corpus-cli ../../target/debug/protocol-squisher \
+ --parser-concurrency 16 \
+ --max-pages 1
+----
+
+=== Output
+
+Default output path:
+
+[source,text]
+----
+../../target/explorer/schemas.ndjson
+----
+
+Each line is JSON and contains metadata, detected format, fetched
+content, `+parse_summary+` metadata, and optional `+corpus_analysis+`
+payload.
+
+Empirical DB output directory (default):
+
+[source,text]
+----
+../../target/explorer/database/
+----
+
+Generated files: - `+compatibility-observations.ndjson+` -
+`+summary.json+` - `+synthesis-hints.json+` (when extracted)
+
+=== Notes
+
+* Provide `+GITHUB_TOKEN+` to improve API limits.
+* Tune parser parallelism with `+--parser-concurrency+`.
+* Print database report with:
+`+mix crawler.db.report --database-path ../../target/explorer/database+`
+* Extract synthesis hints with:
+`+mix crawler.pattern.extract --database-path ../../target/explorer/database+`
+* Feed hints into optimizer CLI:
+`+protocol-squisher optimize --rust source.rs --python target.py --synthesis-hints ../../target/explorer/database/synthesis-hints.json+`
+* Supported extension mapping currently includes:
+`+rs, py, proto, thrift, avsc, avdl, capnp, fbs, bop, msgpack, res, resi, json+`.
diff --git a/provenance/explorer/crawler/README.md b/provenance/explorer/crawler/README.md
deleted file mode 100644
index 4a75c84..0000000
--- a/provenance/explorer/crawler/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-# Protocol Squisher Explorer Crawler
-
-Elixir OTP crawler for discovering schema files on GitHub and producing
-normalized NDJSON records for the continuous-learning pipeline.
-
-## What It Does
-
-- Queries GitHub Code Search for schema-like files.
-- Fetches file content through the GitHub API.
-- Detects Protocol Squisher format identifiers from file extensions.
-- Parses fetched schemas in parallel (heuristic parser stage).
-- Emits one NDJSON record per crawled schema.
-- Optionally invokes `protocol-squisher corpus-analyze` for each file.
-- Persists an empirical compatibility database summary.
-- Extracts synthesis hints consumable by the optimizer.
-
-## Run
-
-```bash
-cd explorer/crawler
-mix crawler.run --max-pages 1
-```
-
-With corpus analysis enabled:
-
-```bash
-mix crawler.run \
- --with-corpus \
- --with-patterns \
- --corpus-cli ../../target/debug/protocol-squisher \
- --parser-concurrency 16 \
- --max-pages 1
-```
-
-## Output
-
-Default output path:
-
-```text
-../../target/explorer/schemas.ndjson
-```
-
-Each line is JSON and contains metadata, detected format, fetched content,
-`parse_summary` metadata, and optional `corpus_analysis` payload.
-
-Empirical DB output directory (default):
-
-```text
-../../target/explorer/database/
-```
-
-Generated files:
-- `compatibility-observations.ndjson`
-- `summary.json`
-- `synthesis-hints.json` (when extracted)
-
-## Notes
-
-- Provide `GITHUB_TOKEN` to improve API limits.
-- Tune parser parallelism with `--parser-concurrency`.
-- Print database report with:
- `mix crawler.db.report --database-path ../../target/explorer/database`
-- Extract synthesis hints with:
- `mix crawler.pattern.extract --database-path ../../target/explorer/database`
-- Feed hints into optimizer CLI:
- `protocol-squisher optimize --rust source.rs --python target.py --synthesis-hints ../../target/explorer/database/synthesis-hints.json`
-- Supported extension mapping currently includes:
- `rs, py, proto, thrift, avsc, avdl, capnp, fbs, bop, msgpack, res, resi, json`.
diff --git a/provenance/explorer/database/README.adoc b/provenance/explorer/database/README.adoc
new file mode 100644
index 0000000..a8f8e6d
--- /dev/null
+++ b/provenance/explorer/database/README.adoc
@@ -0,0 +1,53 @@
+== Explorer Database
+
+Empirical compatibility database artifacts generated by the explorer
+crawler.
+
+=== Generated Files
+
+* `+compatibility-observations.ndjson+`
+** One normalized observation per crawled schema record.
+** Includes format, repository, parse/corpus error state, entity count,
+and observed transport classes.
+* `+summary.json+`
+** Aggregate counts for formats, transport classes, repositories, and
+error rates.
+* `+synthesis-hints.json+`
+** Extracted pattern weights for synthesis suggestions (`+WidenType+`,
+`+MakeOptional+`, etc.).
+** Intended as input to
+`+protocol-squisher optimize --synthesis-hints ...+`.
+
+=== How to Generate
+
+Run crawler:
+
+[source,bash]
+----
+cd explorer/crawler
+mix crawler.run --max-pages 1
+----
+
+Print summary report:
+
+[source,bash]
+----
+mix crawler.db.report --database-path ../../target/explorer/database
+----
+
+Extract synthesis hints:
+
+[source,bash]
+----
+mix crawler.pattern.extract --database-path ../../target/explorer/database
+----
+
+Apply hints during optimization CLI:
+
+[source,bash]
+----
+protocol-squisher optimize \
+ --rust path/to/source.rs \
+ --python path/to/target.py \
+ --synthesis-hints ../../target/explorer/database/synthesis-hints.json
+----
diff --git a/provenance/explorer/database/README.md b/provenance/explorer/database/README.md
deleted file mode 100644
index ef89509..0000000
--- a/provenance/explorer/database/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-
-# Explorer Database
-
-Empirical compatibility database artifacts generated by the explorer crawler.
-
-## Generated Files
-
-- `compatibility-observations.ndjson`
- - One normalized observation per crawled schema record.
- - Includes format, repository, parse/corpus error state, entity count, and
- observed transport classes.
-- `summary.json`
- - Aggregate counts for formats, transport classes, repositories, and error
- rates.
-- `synthesis-hints.json`
- - Extracted pattern weights for synthesis suggestions (`WidenType`,
- `MakeOptional`, etc.).
- - Intended as input to `protocol-squisher optimize --synthesis-hints ...`.
-
-## How to Generate
-
-Run crawler:
-
-```bash
-cd explorer/crawler
-mix crawler.run --max-pages 1
-```
-
-Print summary report:
-
-```bash
-mix crawler.db.report --database-path ../../target/explorer/database
-```
-
-Extract synthesis hints:
-
-```bash
-mix crawler.pattern.extract --database-path ../../target/explorer/database
-```
-
-Apply hints during optimization CLI:
-
-```bash
-protocol-squisher optimize \
- --rust path/to/source.rs \
- --python path/to/target.py \
- --synthesis-hints ../../target/explorer/database/synthesis-hints.json
-```
diff --git a/provenance/explorer/parser/README.adoc b/provenance/explorer/parser/README.adoc
new file mode 100644
index 0000000..f7a49d4
--- /dev/null
+++ b/provenance/explorer/parser/README.adoc
@@ -0,0 +1,7 @@
+== Explorer Parser
+
+Reserved for parallel schema parsing and normalization stages in the
+continuous-learning pipeline.
+
+Planned responsibilities: - format-specific schema parsing orchestration
+- validation and canonicalization hooks - parser quality metrics
diff --git a/provenance/explorer/parser/README.md b/provenance/explorer/parser/README.md
deleted file mode 100644
index bc5c936..0000000
--- a/provenance/explorer/parser/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-# Explorer Parser
-
-Reserved for parallel schema parsing and normalization stages in the
-continuous-learning pipeline.
-
-Planned responsibilities:
-- format-specific schema parsing orchestration
-- validation and canonicalization hooks
-- parser quality metrics
diff --git a/provenance/llm-warmup-dev.adoc b/provenance/llm-warmup-dev.adoc
new file mode 100644
index 0000000..5257d2c
--- /dev/null
+++ b/provenance/llm-warmup-dev.adoc
@@ -0,0 +1,19 @@
+== LLM Warmup — protocol-squisher (Developer)
+
+=== What is protocol-squisher?
+
+See README.adoc for overview.
+
+=== Key Commands
+
+* `+just setup+` — set up development environment
+* `+just build+` — build the project
+* `+just test+` — run tests
+* `+just doctor+` — diagnose issues
+* `+just heal+` — attempt auto-repair
+
+=== Quick Context
+
+* License: MPL-2.0
+* Part of hyperpolymath ecosystem
+* See EXPLAINME.adoc for architecture
diff --git a/provenance/llm-warmup-dev.md b/provenance/llm-warmup-dev.md
deleted file mode 100644
index 3dc5018..0000000
--- a/provenance/llm-warmup-dev.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# LLM Warmup — protocol-squisher (Developer)
-
-## What is protocol-squisher?
-See README.adoc for overview.
-
-## Key Commands
-- `just setup` — set up development environment
-- `just build` — build the project
-- `just test` — run tests
-- `just doctor` — diagnose issues
-- `just heal` — attempt auto-repair
-
-## Quick Context
-- License: MPL-2.0
-- Part of hyperpolymath ecosystem
-- See EXPLAINME.adoc for architecture
diff --git a/provenance/llm-warmup-user.adoc b/provenance/llm-warmup-user.adoc
new file mode 100644
index 0000000..359bdf0
--- /dev/null
+++ b/provenance/llm-warmup-user.adoc
@@ -0,0 +1,19 @@
+== LLM Warmup — protocol-squisher (User)
+
+=== What is protocol-squisher?
+
+See README.adoc for overview.
+
+=== Key Commands
+
+* `+just setup+` — set up development environment
+* `+just build+` — build the project
+* `+just test+` — run tests
+* `+just doctor+` — diagnose issues
+* `+just heal+` — attempt auto-repair
+
+=== Quick Context
+
+* License: MPL-2.0
+* Part of hyperpolymath ecosystem
+* See EXPLAINME.adoc for architecture
diff --git a/provenance/llm-warmup-user.md b/provenance/llm-warmup-user.md
deleted file mode 100644
index e2054aa..0000000
--- a/provenance/llm-warmup-user.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# LLM Warmup — protocol-squisher (User)
-
-## What is protocol-squisher?
-See README.adoc for overview.
-
-## Key Commands
-- `just setup` — set up development environment
-- `just build` — build the project
-- `just test` — run tests
-- `just doctor` — diagnose issues
-- `just heal` — attempt auto-repair
-
-## Quick Context
-- License: MPL-2.0
-- Part of hyperpolymath ecosystem
-- See EXPLAINME.adoc for architecture
diff --git a/provenance/proofs/z3/README.adoc b/provenance/proofs/z3/README.adoc
new file mode 100644
index 0000000..a3cf515
--- /dev/null
+++ b/provenance/proofs/z3/README.adoc
@@ -0,0 +1,56 @@
+== Z3/SMT Proofs for Protocol Squisher
+
+SPDX-License-Identifier: CC-BY-SA-4.0
+
+=== Overview
+
+Automated verification of transport class properties using the Z3 SMT
+solver. These proofs complement the constructive proofs in Agda, Coq,
+and Isabelle with fully automated checking.
+
+=== Files
+
+[width="100%",cols="19%,28%,53%",options="header",]
+|===
+|File |Purpose |Expected Result
+|`+types.smt2+` |Shared type definitions (PrimitiveType, TransportClass,
+sizeof, safe_widening) |N/A (library)
+
+|`+transport_exhaustive.smt2+` |Verify every type pair maps to exactly
+one transport class |`+unsat+`
+
+|`+concorde_constraints.smt2+` |Verify Concorde/widening/size
+constraints (4 checks) |`+unsat+` (all)
+|===
+
+=== Running
+
+Requires Z3 (version 4.8+):
+
+[source,bash]
+----
+# Exhaustiveness check
+z3 transport_exhaustive.smt2
+# Expected output: unsat
+
+# Concorde constraint checks (4 independent checks)
+z3 concorde_constraints.smt2
+# Expected output: unsat (repeated 4 times)
+----
+
+=== What "`unsat`" Means
+
+Each `+.smt2+` file asserts the *negation* of the property we want to
+prove. If Z3 returns `+unsat+`, it means the negation is unsatisfiable —
+the property holds universally.
+
+* `+transport_exhaustive.smt2+`: "`There exists a type pair with no
+transport class`" → unsat (no gaps)
+* `+concorde_constraints.smt2+` check 1: "`Concorde assigned to
+non-identical types`" → unsat (only identical)
+* `+concorde_constraints.smt2+` check 2: "`Widening to smaller type`" →
+unsat (always larger)
+* `+concorde_constraints.smt2+` check 3: "`Type widens to itself`" →
+unsat (irreflexive)
+* `+concorde_constraints.smt2+` check 4: "`Widening pair not Business
+class`" → unsat (all Business)
diff --git a/provenance/proofs/z3/README.md b/provenance/proofs/z3/README.md
deleted file mode 100644
index 6a395e2..0000000
--- a/provenance/proofs/z3/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-
-# Z3/SMT Proofs for Protocol Squisher
-
-SPDX-License-Identifier: CC-BY-SA-4.0
-
-## Overview
-
-Automated verification of transport class properties using the Z3 SMT solver.
-These proofs complement the constructive proofs in Agda, Coq, and Isabelle
-with fully automated checking.
-
-## Files
-
-| File | Purpose | Expected Result |
-|------|---------|-----------------|
-| `types.smt2` | Shared type definitions (PrimitiveType, TransportClass, sizeof, safe_widening) | N/A (library) |
-| `transport_exhaustive.smt2` | Verify every type pair maps to exactly one transport class | `unsat` |
-| `concorde_constraints.smt2` | Verify Concorde/widening/size constraints (4 checks) | `unsat` (all) |
-
-## Running
-
-Requires Z3 (version 4.8+):
-
-```bash
-# Exhaustiveness check
-z3 transport_exhaustive.smt2
-# Expected output: unsat
-
-# Concorde constraint checks (4 independent checks)
-z3 concorde_constraints.smt2
-# Expected output: unsat (repeated 4 times)
-```
-
-## What "unsat" Means
-
-Each `.smt2` file asserts the **negation** of the property we want to prove.
-If Z3 returns `unsat`, it means the negation is unsatisfiable — the property
-holds universally.
-
-- `transport_exhaustive.smt2`: "There exists a type pair with no transport class" → unsat (no gaps)
-- `concorde_constraints.smt2` check 1: "Concorde assigned to non-identical types" → unsat (only identical)
-- `concorde_constraints.smt2` check 2: "Widening to smaller type" → unsat (always larger)
-- `concorde_constraints.smt2` check 3: "Type widens to itself" → unsat (irreflexive)
-- `concorde_constraints.smt2` check 4: "Widening pair not Business class" → unsat (all Business)
diff --git a/provenance/site/content/governance.adoc b/provenance/site/content/governance.adoc
new file mode 100644
index 0000000..fd43767
--- /dev/null
+++ b/provenance/site/content/governance.adoc
@@ -0,0 +1,146 @@
+== Information Governance & Help
+
+=== License
+
+protocol-squisher is released under the *Palimpsest License (MPL-2.0)*,
+a free and open-source software license. You may use, modify, and
+redistribute the software under the terms of this license.
+
+* Full license text: `+LICENSE+` in the repository root
+* SPDX identifier: `+MPL-2.0+`
+
+Third-party dependencies retain their original licenses (MIT,
+Apache-2.0, BSD, etc.). protocol-squisher does not relicense any
+third-party code.
+
+=== Security
+
+==== Reporting Vulnerabilities
+
+If you discover a security vulnerability in protocol-squisher, please
+report it responsibly:
+
+* *Email:* j.d.a.jewell@open.ac.uk
+* *Subject line:* `+[SECURITY] protocol-squisher: +`
+
+Please do not open a public issue for security vulnerabilities. We aim
+to acknowledge reports within 48 hours and provide a fix or mitigation
+within 7 days for critical issues.
+
+==== Security Practices
+
+protocol-squisher follows these security practices:
+
+* *cargo audit* runs in CI — 0 known vulnerabilities across 275
+dependencies
+* *No MD5 or SHA1* for any security purpose (SHA-256 minimum)
+* *HTTPS only* — no HTTP URLs anywhere in the codebase
+* *No hardcoded secrets* — all credentials are environment-based
+* *SHA-pinned dependencies* in CI workflows
+* *Hypatia neurosymbolic scanning* for automated security analysis
+* *TruffleHog secret scanning* in CI
+* *OpenSSF Scorecard* for supply chain security
+
+==== panic-attack Security Suite
+
+protocol-squisher is regularly tested with the panic-attack security
+suite, which includes:
+
+* *assail* — Static analysis for security weak points
+* *amuck* — Mutation testing to verify test coverage catches regressions
+* *abduct* — Dependency isolation testing
+* *adjudicate* — Verdict engine aggregating all results
+
+The most recent run achieved a *PASS* verdict with zero crashes, zero
+critical weak points, and zero failed attacks.
+
+=== Data Handling
+
+protocol-squisher processes schema files locally. It does not:
+
+* Send schema data to any external service
+* Collect telemetry or usage statistics
+* Phone home or check for updates
+* Require network access for core functionality
+
+ECHIDNA cross-prover integration and VeriSimDB storage are optional
+features that can operate entirely offline via local fallback modes.
+
+=== Accessibility
+
+This website is built with ddraig-ssg, a static site generator written
+in Idris 2. The site is designed with accessibility in mind:
+
+* Semantic HTML5 structure
+* High-contrast text (WCAG AA compliant)
+* Keyboard-navigable tab interface
+* System font stack (no web font downloads)
+* Responsive layout for mobile and desktop
+* Print-friendly stylesheet
+* No JavaScript required
+
+=== Mirrors
+
+protocol-squisher source code is available from three independent
+forges:
+
+* *GitHub:* github.com/hyperpolymath/protocol-squisher (primary)
+* *GitLab:* gitlab.com/hyperpolymath/protocol-squisher (mirror)
+* *Bitbucket:* bitbucket.org/hyperpolymath/protocol-squisher (mirror)
+
+Mirrors are synchronised automatically via CI.
+
+=== Formal Proofs
+
+All formal proofs are machine-checked and reproducible:
+
+* *Agda proofs* require Agda 2.6.4+ with standard library
+* *Coq proofs* require Coq 8.18+
+* *Lean 4 proofs* require Lean 4 toolchain (leanprover/lean4)
+* *Isabelle proofs* require Isabelle 2024+
+* *Z3 proofs* require Z3 4.12+
+
+Proof source files are in `+proofs/+` and can be independently verified
+without building protocol-squisher itself.
+
+=== Getting Help
+
+==== Common Questions
+
+*Q: Which protocol format should I use for a new project?* Run
+`+protocol-squisher squishability+` on candidate schemas. The
+squishability report ranks formats by interoperability potential and
+highlights trade-offs.
+
+*Q: Can protocol-squisher translate between any two formats?* It can
+analyse and compare any pair of the 13 supported formats. Whether a
+useful translation exists depends on the specific schemas involved. The
+transport class system tells you exactly how much fidelity to expect.
+
+*Q: Do I need the formal proofs?* No. The proofs verify the correctness
+of the core algorithms. You benefit from their guarantees whether or not
+you inspect them. They are included for transparency and for researchers
+who wish to build on the work.
+
+*Q: How do I add support for a new protocol format?* Implement the
+`+SchemaAnalyzer+` trait from `+protocol-squisher-ir+`. The trait
+requires four methods: `+analyzer_name+`, `+supported_extensions+`,
+`+analyze_file+`, and `+analyze_str+`. See any of the 13 existing
+analysers for reference.
+
+==== Support Channels
+
+* *Documentation:* In-repository docs (`+README.adoc+`, `+docs/+`)
+* *Issues:* github.com/hyperpolymath/protocol-squisher/issues
+* *Discussions:* github.com/hyperpolymath/protocol-squisher/discussions
+* *Email:* j.d.a.jewell@open.ac.uk
+
+=== Acknowledgements
+
+protocol-squisher builds on the work of many open-source projects and
+research communities. The formal verification approach was inspired by
+decades of work in type theory, and the practical implementation
+benefits from the Rust ecosystem’s focus on safety and correctness.
+
+This site was generated by *ddraig-ssg*, a dependently typed static site
+generator written in Idris 2 by the same author.
diff --git a/provenance/site/content/governance.md b/provenance/site/content/governance.md
deleted file mode 100644
index 170df79..0000000
--- a/provenance/site/content/governance.md
+++ /dev/null
@@ -1,131 +0,0 @@
-
----
-title: Governance & Help
-slug: governance
-order: 5
-date: 2026-02-28
-tags: [governance, help, license, security, privacy]
----
-
-# Information Governance & Help
-
-## License
-
-protocol-squisher is released under the **Palimpsest License (MPL-2.0)**, a free and open-source software license. You may use, modify, and redistribute the software under the terms of this license.
-
-- Full license text: `LICENSE` in the repository root
-- SPDX identifier: `MPL-2.0`
-
-Third-party dependencies retain their original licenses (MIT, Apache-2.0, BSD, etc.). protocol-squisher does not relicense any third-party code.
-
-## Security
-
-### Reporting Vulnerabilities
-
-If you discover a security vulnerability in protocol-squisher, please report it responsibly:
-
-- **Email:** j.d.a.jewell@open.ac.uk
-- **Subject line:** `[SECURITY] protocol-squisher: `
-
-Please do not open a public issue for security vulnerabilities. We aim to acknowledge reports within 48 hours and provide a fix or mitigation within 7 days for critical issues.
-
-### Security Practices
-
-protocol-squisher follows these security practices:
-
-- **cargo audit** runs in CI — 0 known vulnerabilities across 275 dependencies
-- **No MD5 or SHA1** for any security purpose (SHA-256 minimum)
-- **HTTPS only** — no HTTP URLs anywhere in the codebase
-- **No hardcoded secrets** — all credentials are environment-based
-- **SHA-pinned dependencies** in CI workflows
-- **Hypatia neurosymbolic scanning** for automated security analysis
-- **TruffleHog secret scanning** in CI
-- **OpenSSF Scorecard** for supply chain security
-
-### panic-attack Security Suite
-
-protocol-squisher is regularly tested with the panic-attack security suite, which includes:
-
-- **assail** — Static analysis for security weak points
-- **amuck** — Mutation testing to verify test coverage catches regressions
-- **abduct** — Dependency isolation testing
-- **adjudicate** — Verdict engine aggregating all results
-
-The most recent run achieved a **PASS** verdict with zero crashes, zero critical weak points, and zero failed attacks.
-
-## Data Handling
-
-protocol-squisher processes schema files locally. It does not:
-
-- Send schema data to any external service
-- Collect telemetry or usage statistics
-- Phone home or check for updates
-- Require network access for core functionality
-
-ECHIDNA cross-prover integration and VeriSimDB storage are optional features that can operate entirely offline via local fallback modes.
-
-## Accessibility
-
-This website is built with ddraig-ssg, a static site generator written in Idris 2. The site is designed with accessibility in mind:
-
-- Semantic HTML5 structure
-- High-contrast text (WCAG AA compliant)
-- Keyboard-navigable tab interface
-- System font stack (no web font downloads)
-- Responsive layout for mobile and desktop
-- Print-friendly stylesheet
-- No JavaScript required
-
-## Mirrors
-
-protocol-squisher source code is available from three independent forges:
-
-- **GitHub:** github.com/hyperpolymath/protocol-squisher (primary)
-- **GitLab:** gitlab.com/hyperpolymath/protocol-squisher (mirror)
-- **Bitbucket:** bitbucket.org/hyperpolymath/protocol-squisher (mirror)
-
-Mirrors are synchronised automatically via CI.
-
-## Formal Proofs
-
-All formal proofs are machine-checked and reproducible:
-
-- **Agda proofs** require Agda 2.6.4+ with standard library
-- **Coq proofs** require Coq 8.18+
-- **Lean 4 proofs** require Lean 4 toolchain (leanprover/lean4)
-- **Isabelle proofs** require Isabelle 2024+
-- **Z3 proofs** require Z3 4.12+
-
-Proof source files are in `proofs/` and can be independently verified without building protocol-squisher itself.
-
-## Getting Help
-
-### Common Questions
-
-**Q: Which protocol format should I use for a new project?**
-Run `protocol-squisher squishability` on candidate schemas. The squishability report ranks formats by interoperability potential and highlights trade-offs.
-
-**Q: Can protocol-squisher translate between any two formats?**
-It can analyse and compare any pair of the 13 supported formats. Whether a useful translation exists depends on the specific schemas involved. The transport class system tells you exactly how much fidelity to expect.
-
-**Q: Do I need the formal proofs?**
-No. The proofs verify the correctness of the core algorithms. You benefit from their guarantees whether or not you inspect them. They are included for transparency and for researchers who wish to build on the work.
-
-**Q: How do I add support for a new protocol format?**
-Implement the `SchemaAnalyzer` trait from `protocol-squisher-ir`. The trait requires four methods: `analyzer_name`, `supported_extensions`, `analyze_file`, and `analyze_str`. See any of the 13 existing analysers for reference.
-
-### Support Channels
-
-- **Documentation:** In-repository docs (`README.adoc`, `docs/`)
-- **Issues:** github.com/hyperpolymath/protocol-squisher/issues
-- **Discussions:** github.com/hyperpolymath/protocol-squisher/discussions
-- **Email:** j.d.a.jewell@open.ac.uk
-
-## Acknowledgements
-
-protocol-squisher builds on the work of many open-source projects and research communities. The formal verification approach was inspired by decades of work in type theory, and the practical implementation benefits from the Rust ecosystem's focus on safety and correctness.
-
-This site was generated by **ddraig-ssg**, a dependently typed static site generator written in Idris 2 by the same author.
diff --git a/provenance/site/content/index.adoc b/provenance/site/content/index.adoc
new file mode 100644
index 0000000..4c41573
--- /dev/null
+++ b/provenance/site/content/index.adoc
@@ -0,0 +1,51 @@
+== About protocol-squisher
+
+*protocol-squisher* is a universal protocol analysis substrate created
+by *Jonathan D.A. Jewell*, an independent researcher and software
+engineer working under the name *hyperpolymath*.
+
+This project exists because data does not live in one format. Every day,
+systems exchange information through dozens of serialisation protocols:
+Protocol Buffers for microservices, Avro for data pipelines, JSON Schema
+for web APIs, FlatBuffers for games, Cap’n Proto for embedded systems,
+and many more. Each protocol makes different trade-offs between size,
+speed, safety, and evolvability. When two systems need to talk, someone
+has to write the glue code that translates between them — and get it
+right.
+
+protocol-squisher asks a different question: *what if the computer could
+figure out the translation automatically, and prove it correct?*
+
+=== The idea in brief
+
+Give protocol-squisher two schemas in any supported format. It analyses
+both, computes a formal compatibility assessment, identifies what can be
+translated losslessly and what cannot, and generates the adapter code to
+make it happen. The entire pipeline is backed by formal proofs: if it
+compiles, it carries.
+
+=== Who this is for
+
+* *Backend engineers* integrating services that speak different
+protocols
+* *Data engineers* migrating pipelines between serialisation formats
+* *Platform teams* evaluating protocol choices for new infrastructure
+* *Researchers* studying type theory applied to real-world serialisation
+* *Anyone* who has written a Protobuf-to-JSON adapter by hand and wished
+they hadn’t
+
+=== The broader context
+
+protocol-squisher is one of five pillars in a larger effort to build a
+complete, formally verified developer tool suite. The pillars are:
+
+* *Languages* — PanLL, a neurosymbolic IDE for polyglot development
+* *Databases* — VeriSimDB, QuandleDB, and LithoGlyph for verified data
+storage
+* *Protocols* — protocol-squisher (you are here)
+* *Containers* — stapeln for container stack analysis
+* *Quality* — panic-attacker, hypatia, and echidna for testing and
+verification
+
+All five pillars are free and open-source software under the Palimpsest
+License.
diff --git a/provenance/site/content/index.md b/provenance/site/content/index.md
deleted file mode 100644
index eae87f6..0000000
--- a/provenance/site/content/index.md
+++ /dev/null
@@ -1,43 +0,0 @@
-
----
-title: About
-slug: index
-order: 1
-date: 2026-02-28
-tags: [about, hyperpolymath]
----
-
-# About protocol-squisher
-
-**protocol-squisher** is a universal protocol analysis substrate created by **Jonathan D.A. Jewell**, an independent researcher and software engineer working under the name **hyperpolymath**.
-
-This project exists because data does not live in one format. Every day, systems exchange information through dozens of serialisation protocols: Protocol Buffers for microservices, Avro for data pipelines, JSON Schema for web APIs, FlatBuffers for games, Cap'n Proto for embedded systems, and many more. Each protocol makes different trade-offs between size, speed, safety, and evolvability. When two systems need to talk, someone has to write the glue code that translates between them — and get it right.
-
-protocol-squisher asks a different question: **what if the computer could figure out the translation automatically, and prove it correct?**
-
-## The idea in brief
-
-Give protocol-squisher two schemas in any supported format. It analyses both, computes a formal compatibility assessment, identifies what can be translated losslessly and what cannot, and generates the adapter code to make it happen. The entire pipeline is backed by formal proofs: if it compiles, it carries.
-
-## Who this is for
-
-- **Backend engineers** integrating services that speak different protocols
-- **Data engineers** migrating pipelines between serialisation formats
-- **Platform teams** evaluating protocol choices for new infrastructure
-- **Researchers** studying type theory applied to real-world serialisation
-- **Anyone** who has written a Protobuf-to-JSON adapter by hand and wished they hadn't
-
-## The broader context
-
-protocol-squisher is one of five pillars in a larger effort to build a complete, formally verified developer tool suite. The pillars are:
-
-- **Languages** — PanLL, a neurosymbolic IDE for polyglot development
-- **Databases** — VeriSimDB, QuandleDB, and LithoGlyph for verified data storage
-- **Protocols** — protocol-squisher (you are here)
-- **Containers** — stapeln for container stack analysis
-- **Quality** — panic-attacker, hypatia, and echidna for testing and verification
-
-All five pillars are free and open-source software under the Palimpsest License.
diff --git a/provenance/site/content/progress.adoc b/provenance/site/content/progress.adoc
new file mode 100644
index 0000000..f5bd730
--- /dev/null
+++ b/provenance/site/content/progress.adoc
@@ -0,0 +1,100 @@
+== Progress & Contact
+
+=== Current Status
+
+protocol-squisher is at *version 1.2.0* with Phases 0 through 4b
+complete.
+
+==== Completed
+
+* *Phase 0: Foundation* — Core IR, constraint system, type mappings
+* *Phase 1: MVP* — Rust and Python analysers, transport class system,
+Agda proofs, CLI
+* *Phase 2: Format Expansion* — All 13 analysers implemented and tested,
+diversity analysis, squishability ranking, hypothesis testing,
+compatibility matrix
+* *Phase 3: Hardening* — Security bridge (negotiation, audit, downgrade
+risk detection), distributed squishing (job queue, progress, retry),
+performance primitives (SIMD, chunked streaming, hardware detection,
+lazy schemas), enterprise features (audit queries, governance, migration
+validation), cross-validation in Coq, Lean 4, Isabelle, and Z3
+* *Phase 4a: SchemaAnalyzer Trait* — Universal trait defined and
+implemented across all 13 analysers
+* *Phase 4b: Public Library API* — Full Rust library API exposed with
+analyser registry
+
+==== In Progress
+
+* *Phase 4c: Constraint Evaluation API* — Making constraints evaluable
+at runtime, not just declarative
+* *Phase 4d: Bidirectional API* — First-class bidirectional comparison
+* *Phase 4e: HTTP Server* — `+protocol-squisher-server+` crate with
+axum-based REST API
+
+==== Planned
+
+* *Phase 5: PanLL Integration* — protocol-squisher as a module in PanLL
+(neurosymbolic IDE), three-pane protocol analysis
+* *Phase 6: Developer Suite Convergence* — Cross-pillar analysis
+connecting protocols, databases, containers, and quality tools
+
+=== Numbers
+
+* *937* automated tests
+* *13* protocol format analysers
+* *5* formal proof systems (Agda, Coq, Lean 4, Isabelle, Z3)
+* *50+* constraint types in the IR
+* *4* transport classes (Concorde, Business, Economy, Wheelbarrow)
+* *275* cargo dependencies, *0* known vulnerabilities
+* *0* clippy warnings
+
+=== Timeline
+
+[cols=",",options="header",]
+|===
+|Date |Milestone
+|2025 Q3 |Project inception, ephapax IR design
+|2025 Q4 |Phase 1 MVP: Rust/Python, Agda proofs, CLI
+|2026 Jan |Phase 2: 13 analysers, meta-analysis
+|2026 Feb |Phase 3: Hardening, cross-proofs, security
+|2026 Feb 28 |Phase 4a/b: SchemaAnalyzer trait, public API
+|===
+
+=== Get in Touch
+
+==== For Media and Press
+
+Jonathan D.A. Jewell is available for interviews, conference talks, and
+technical discussions about protocol interoperability, formal
+verification in practice, and the future of developer tooling.
+
+* *Email:* j.d.a.jewell@open.ac.uk
+* *GitHub:* github.com/hyperpolymath
+
+==== For Users and Contributors
+
+* *Issue tracker:* github.com/hyperpolymath/protocol-squisher/issues
+* *Discussions:* github.com/hyperpolymath/protocol-squisher/discussions
+* *Source code:* github.com/hyperpolymath/protocol-squisher
+
+==== For Researchers
+
+If you are working on type theory, serialisation, or formal methods and
+would like to collaborate, please reach out. The formal proofs in this
+project are designed to be independently verifiable and we welcome peer
+review.
+
+=== Contributing
+
+protocol-squisher welcomes contributions of all kinds:
+
+* *Bug reports* with reproduction steps
+* *New analyser implementations* for additional protocols
+* *Proof contributions* in any of the five supported proof systems
+* *Documentation improvements* and tutorial writing
+* *Performance benchmarks* and optimisation work
+
+See `+CONTRIBUTING.md+` in the repository for detailed guidelines.
+
+All contributions are released under the Palimpsest License (MPL-2.0)
+unless otherwise specified.
diff --git a/provenance/site/content/progress.md b/provenance/site/content/progress.md
deleted file mode 100644
index d2e51d6..0000000
--- a/provenance/site/content/progress.md
+++ /dev/null
@@ -1,90 +0,0 @@
-
----
-title: Progress & Contact
-slug: progress
-order: 4
-date: 2026-02-28
-tags: [progress, contact, roadmap]
----
-
-# Progress & Contact
-
-## Current Status
-
-protocol-squisher is at **version 1.2.0** with Phases 0 through 4b complete.
-
-### Completed
-
-- **Phase 0: Foundation** — Core IR, constraint system, type mappings
-- **Phase 1: MVP** — Rust and Python analysers, transport class system, Agda proofs, CLI
-- **Phase 2: Format Expansion** — All 13 analysers implemented and tested, diversity analysis, squishability ranking, hypothesis testing, compatibility matrix
-- **Phase 3: Hardening** — Security bridge (negotiation, audit, downgrade risk detection), distributed squishing (job queue, progress, retry), performance primitives (SIMD, chunked streaming, hardware detection, lazy schemas), enterprise features (audit queries, governance, migration validation), cross-validation in Coq, Lean 4, Isabelle, and Z3
-- **Phase 4a: SchemaAnalyzer Trait** — Universal trait defined and implemented across all 13 analysers
-- **Phase 4b: Public Library API** — Full Rust library API exposed with analyser registry
-
-### In Progress
-
-- **Phase 4c: Constraint Evaluation API** — Making constraints evaluable at runtime, not just declarative
-- **Phase 4d: Bidirectional API** — First-class bidirectional comparison
-- **Phase 4e: HTTP Server** — `protocol-squisher-server` crate with axum-based REST API
-
-### Planned
-
-- **Phase 5: PanLL Integration** — protocol-squisher as a module in PanLL (neurosymbolic IDE), three-pane protocol analysis
-- **Phase 6: Developer Suite Convergence** — Cross-pillar analysis connecting protocols, databases, containers, and quality tools
-
-## Numbers
-
-- **937** automated tests
-- **13** protocol format analysers
-- **5** formal proof systems (Agda, Coq, Lean 4, Isabelle, Z3)
-- **50+** constraint types in the IR
-- **4** transport classes (Concorde, Business, Economy, Wheelbarrow)
-- **275** cargo dependencies, **0** known vulnerabilities
-- **0** clippy warnings
-
-## Timeline
-
-| Date | Milestone |
-|------|-----------|
-| 2025 Q3 | Project inception, ephapax IR design |
-| 2025 Q4 | Phase 1 MVP: Rust/Python, Agda proofs, CLI |
-| 2026 Jan | Phase 2: 13 analysers, meta-analysis |
-| 2026 Feb | Phase 3: Hardening, cross-proofs, security |
-| 2026 Feb 28 | Phase 4a/b: SchemaAnalyzer trait, public API |
-
-## Get in Touch
-
-### For Media and Press
-
-Jonathan D.A. Jewell is available for interviews, conference talks, and technical discussions about protocol interoperability, formal verification in practice, and the future of developer tooling.
-
-- **Email:** j.d.a.jewell@open.ac.uk
-- **GitHub:** github.com/hyperpolymath
-
-### For Users and Contributors
-
-- **Issue tracker:** github.com/hyperpolymath/protocol-squisher/issues
-- **Discussions:** github.com/hyperpolymath/protocol-squisher/discussions
-- **Source code:** github.com/hyperpolymath/protocol-squisher
-
-### For Researchers
-
-If you are working on type theory, serialisation, or formal methods and would like to collaborate, please reach out. The formal proofs in this project are designed to be independently verifiable and we welcome peer review.
-
-## Contributing
-
-protocol-squisher welcomes contributions of all kinds:
-
-- **Bug reports** with reproduction steps
-- **New analyser implementations** for additional protocols
-- **Proof contributions** in any of the five supported proof systems
-- **Documentation improvements** and tutorial writing
-- **Performance benchmarks** and optimisation work
-
-See `CONTRIBUTING.md` in the repository for detailed guidelines.
-
-All contributions are released under the Palimpsest License (MPL-2.0) unless otherwise specified.
diff --git a/provenance/site/content/project.adoc b/provenance/site/content/project.adoc
new file mode 100644
index 0000000..47c424d
--- /dev/null
+++ b/provenance/site/content/project.adoc
@@ -0,0 +1,130 @@
+== The Project
+
+protocol-squisher is a Rust library and command-line tool that analyses,
+compares, and bridges serialisation protocols. It works with 13 protocol
+formats, runs 937 automated tests, and backs its results with formal
+proofs verified in five independent proof systems.
+
+=== What it does
+
+*Analyse* any supported schema to produce a format-independent
+intermediate representation (IR). The IR captures every field,
+constraint, nesting relationship, and type mapping in a normalised form
+that can be compared across protocols.
+
+*Compare* two schemas to produce a detailed compatibility report. The
+report classifies every field mapping into one of four transport
+classes:
+
+* *Concorde* — Lossless, bidirectional translation. Both sides carry the
+same information.
+* *Business* — Lossless in one direction; minor precision differences in
+the reverse.
+* *Economy* — Translation is possible but some information is lost
+(e.g., widening a uint16 to uint32).
+* *Wheelbarrow* — Manual intervention required. The schemas are too
+different for automatic bridging.
+
+*Generate* adapter code that performs the translation. The generated
+code respects the transport class: Concorde mappings are zero-overhead,
+Economy mappings carry explicit loss annotations, and Wheelbarrow fields
+are flagged for human review.
+
+=== The 13 analysers
+
+[width="100%",cols="19%,35%,46%",options="header",]
+|===
+|Format |Protocol Family |Key Characteristics
+|Rust |Language-native |Ownership, lifetimes, trait bounds
+
+|Python |Language-native |Dynamic typing, duck typing conventions
+
+|JSON Schema |Web/API |Validation-centric, format keywords
+
+|Protocol Buffers |Google RPC |Field numbers, wire types, proto3
+defaults
+
+|Avro |Data pipeline |Schema evolution, union types
+
+|FlatBuffers |Zero-copy |In-place access, no parsing
+
+|Cap’n Proto |Zero-copy |Pointer-based, canonical encoding
+
+|MessagePack |Binary JSON |Compact, schemaless
+
+|Thrift |Apache RPC |IDL-driven, multiple transports
+
+|ReScript |Typed JS |Variant types, pattern matching
+
+|GraphQL |API query |Selection sets, nullable-by-default
+
+|TOML |Configuration |Section nesting, typed values
+
+|Bebop |Game dev |Fixed layouts, performant serialisation
+|===
+
+Each analyser implements the `+SchemaAnalyzer+` trait, providing a
+consistent `+analyze_file+` and `+analyze_str+` interface. The trait is
+defined in the `+protocol-squisher-ir+` crate and enables programmatic
+access to all 13 analysers through a single registry.
+
+=== Architecture
+
+protocol-squisher is structured as a Cargo workspace with modular
+crates:
+
+* *protocol-squisher* — Root crate, public API, analyser registry
+* *protocol-squisher-ir* — Intermediate representation,
+`+SchemaAnalyzer+` trait, constraint system (50+ constraint types)
+* *protocol-squisher-compat* — Compatibility analysis, transport class
+assignment, bidirectional comparison
+* *protocol-squisher-meta-analysis* — Cross-format diversity analysis,
+squishability ranking, hypothesis testing
+* *13 analyser crates* — One per supported format, each self-contained
+* *protocol-squisher-optimizer* — Adapter code optimisation
+* *protocol-squisher-codegen* — Code generation for Rust and Python
+adapters
+
+=== The formal guarantee
+
+The core invariant — _if it compiles, it carries_ — is not marketing. It
+is a mathematical theorem proven in five independent formal verification
+systems:
+
+* *Agda* — 8 theorems covering preservation, composition, and transport
+class ordering
+* *Coq* — ConcordeSafety and CarriesInvariant proofs
+* *Lean 4* — Machine-checked verification of the invariant
+* *Isabelle/HOL* — WheelbarrowNecessity proof (lower bound on the
+classification)
+* *Z3/SMT* — Exhaustiveness check across all constraint combinations
+
+The proofs live in the repository under `+proofs/+` and are checked in
+CI.
+
+=== Using it
+
+As a CLI tool:
+
+....
+protocol-squisher analyze schema.proto
+protocol-squisher compare schema.proto schema.avsc
+protocol-squisher squishability schema.json
+....
+
+As a Rust library:
+
+....
+use protocol_squisher::prelude::*;
+use protocol_squisher::all_analyzers;
+
+let analyzers = all_analyzers();
+for a in &analyzers {
+ println!("{}: {:?}", a.analyzer_name(), a.supported_extensions());
+}
+....
+
+=== License
+
+protocol-squisher is released under the Palimpsest License (MPL-2.0), a
+free and open-source license with no corporate governance requirements.
diff --git a/provenance/site/content/project.md b/provenance/site/content/project.md
deleted file mode 100644
index 40a4caf..0000000
--- a/provenance/site/content/project.md
+++ /dev/null
@@ -1,98 +0,0 @@
-
----
-title: The Project
-slug: project
-order: 2
-date: 2026-02-28
-tags: [project, overview, architecture]
----
-
-# The Project
-
-protocol-squisher is a Rust library and command-line tool that analyses, compares, and bridges serialisation protocols. It works with 13 protocol formats, runs 937 automated tests, and backs its results with formal proofs verified in five independent proof systems.
-
-## What it does
-
-**Analyse** any supported schema to produce a format-independent intermediate representation (IR). The IR captures every field, constraint, nesting relationship, and type mapping in a normalised form that can be compared across protocols.
-
-**Compare** two schemas to produce a detailed compatibility report. The report classifies every field mapping into one of four transport classes:
-
-- **Concorde** — Lossless, bidirectional translation. Both sides carry the same information.
-- **Business** — Lossless in one direction; minor precision differences in the reverse.
-- **Economy** — Translation is possible but some information is lost (e.g., widening a uint16 to uint32).
-- **Wheelbarrow** — Manual intervention required. The schemas are too different for automatic bridging.
-
-**Generate** adapter code that performs the translation. The generated code respects the transport class: Concorde mappings are zero-overhead, Economy mappings carry explicit loss annotations, and Wheelbarrow fields are flagged for human review.
-
-## The 13 analysers
-
-| Format | Protocol Family | Key Characteristics |
-|--------|----------------|---------------------|
-| Rust | Language-native | Ownership, lifetimes, trait bounds |
-| Python | Language-native | Dynamic typing, duck typing conventions |
-| JSON Schema | Web/API | Validation-centric, format keywords |
-| Protocol Buffers | Google RPC | Field numbers, wire types, proto3 defaults |
-| Avro | Data pipeline | Schema evolution, union types |
-| FlatBuffers | Zero-copy | In-place access, no parsing |
-| Cap'n Proto | Zero-copy | Pointer-based, canonical encoding |
-| MessagePack | Binary JSON | Compact, schemaless |
-| Thrift | Apache RPC | IDL-driven, multiple transports |
-| ReScript | Typed JS | Variant types, pattern matching |
-| GraphQL | API query | Selection sets, nullable-by-default |
-| TOML | Configuration | Section nesting, typed values |
-| Bebop | Game dev | Fixed layouts, performant serialisation |
-
-Each analyser implements the `SchemaAnalyzer` trait, providing a consistent `analyze_file` and `analyze_str` interface. The trait is defined in the `protocol-squisher-ir` crate and enables programmatic access to all 13 analysers through a single registry.
-
-## Architecture
-
-protocol-squisher is structured as a Cargo workspace with modular crates:
-
-- **protocol-squisher** — Root crate, public API, analyser registry
-- **protocol-squisher-ir** — Intermediate representation, `SchemaAnalyzer` trait, constraint system (50+ constraint types)
-- **protocol-squisher-compat** — Compatibility analysis, transport class assignment, bidirectional comparison
-- **protocol-squisher-meta-analysis** — Cross-format diversity analysis, squishability ranking, hypothesis testing
-- **13 analyser crates** — One per supported format, each self-contained
-- **protocol-squisher-optimizer** — Adapter code optimisation
-- **protocol-squisher-codegen** — Code generation for Rust and Python adapters
-
-## The formal guarantee
-
-The core invariant — *if it compiles, it carries* — is not marketing. It is a mathematical theorem proven in five independent formal verification systems:
-
-- **Agda** — 8 theorems covering preservation, composition, and transport class ordering
-- **Coq** — ConcordeSafety and CarriesInvariant proofs
-- **Lean 4** — Machine-checked verification of the invariant
-- **Isabelle/HOL** — WheelbarrowNecessity proof (lower bound on the classification)
-- **Z3/SMT** — Exhaustiveness check across all constraint combinations
-
-The proofs live in the repository under `proofs/` and are checked in CI.
-
-## Using it
-
-As a CLI tool:
-
-```
-protocol-squisher analyze schema.proto
-protocol-squisher compare schema.proto schema.avsc
-protocol-squisher squishability schema.json
-```
-
-As a Rust library:
-
-```
-use protocol_squisher::prelude::*;
-use protocol_squisher::all_analyzers;
-
-let analyzers = all_analyzers();
-for a in &analyzers {
- println!("{}: {:?}", a.analyzer_name(), a.supported_extensions());
-}
-```
-
-## License
-
-protocol-squisher is released under the Palimpsest License (MPL-2.0), a free and open-source license with no corporate governance requirements.
diff --git a/provenance/site/content/technology.adoc b/provenance/site/content/technology.adoc
new file mode 100644
index 0000000..23d8a29
--- /dev/null
+++ b/provenance/site/content/technology.adoc
@@ -0,0 +1,141 @@
+== Technology
+
+protocol-squisher is built on a layered architecture that separates
+concerns cleanly: analysis at the bottom, comparison in the middle, and
+synthesis at the top. Every layer is implemented in Rust and backed by
+formal proofs.
+
+=== The Intermediate Representation (IR)
+
+At the core of protocol-squisher is the *ephapax IR* — a
+format-independent schema representation that captures the full
+semantics of any serialisation protocol. When an analyser processes a
+schema file, it produces an `+IrSchema+` value containing:
+
+* *Fields* with names, types, optionality, and default values
+* *Nested structures* preserving the full hierarchy
+* *Constraints* — over 50 constraint types covering numeric ranges,
+string patterns, enum membership, precision bounds, and structural
+invariants
+* *Type mappings* connecting protocol-specific types to normalised IR
+types
+* *Metadata* including field ordering, deprecation status, and
+documentation
+
+The IR is the universal language that all 13 analysers speak. It is
+defined in the `+protocol-squisher-ir+` crate and is the foundation for
+every subsequent operation.
+
+=== The Constraint System
+
+Constraints are the heart of compatibility analysis. Each field in a
+schema carries zero or more constraints that describe what values are
+valid. When comparing two schemas, protocol-squisher evaluates how
+constraints relate to each other:
+
+* *Equivalent* constraints produce Concorde (lossless) transport
+* *Subset* constraints produce Business (safe widening) transport
+* *Overlapping* constraints produce Economy (lossy but functional)
+transport
+* *Disjoint* constraints produce Wheelbarrow (manual intervention)
+transport
+
+The constraint system supports range checks, pattern matching, enum
+membership, nullability, precision bounds, and recursive structural
+constraints. It is designed to be extensible — new constraint types can
+be added without breaking existing analyses.
+
+=== Transport Classes
+
+Transport classes are protocol-squisher’s answer to the question: _how
+much can we trust this translation?_
+
+*Concorde* is the gold standard. Both schemas represent the same
+information with the same precision. Translation is a no-op in the best
+case or a trivial type rename in the worst. Round-tripping is always
+lossless.
+
+*Business* means the translation is safe in one direction but not
+perfectly symmetric. For example, widening an `+int32+` to an `+int64+`
+is always safe, but narrowing back might lose data. protocol-squisher
+generates the forward adapter automatically and warns about the reverse.
+
+*Economy* means information loss is expected but the translation is
+still useful. A `+float64+` to `+float32+` conversion loses precision; a
+nullable field mapped to a required field loses the null case.
+protocol-squisher generates the adapter with explicit annotations
+marking every loss point.
+
+*Wheelbarrow* means the schemas are too different for automatic
+bridging. A `+string+` field mapped to a `+boolean+` field, or an
+entirely missing required field, cannot be resolved without human
+decisions. protocol-squisher identifies these cases and generates a stub
+with TODO markers.
+
+=== Meta-Analysis
+
+Beyond individual comparisons, protocol-squisher can analyse the entire
+landscape of supported protocols through its meta-analysis engine:
+
+* *Diversity analysis* measures how different two protocols are in their
+design philosophy (schema evolution vs. zero-copy vs. dynamic
+vs. validation-centric)
+* *Squishability ranking* scores each protocol on how amenable it is to
+translation
+* *Hypothesis testing* validates claims like "`schema evolution
+protocols are more interoperable`" with actual data across all pairwise
+comparisons
+
+The meta-analysis confirmed that Avro and Thrift (schema evolution
+protocols) achieve the highest squishability scores, while Cap’n Proto
+and FlatBuffers (zero-copy protocols) are already so optimised that
+translation rarely improves them.
+
+=== Performance
+
+protocol-squisher is designed for production use:
+
+* *SIMD byte search* for fast schema scanning on x86_64 and aarch64
+* *Chunked streaming* for processing schemas that exceed available
+memory
+* *Hardware detection* at startup to select optimal code paths
+* *Lazy schema loading* to avoid parsing unused sections
+* *Zero-copy where possible* — the IR reuses schema data without
+allocation when safe
+
+=== ECHIDNA Integration
+
+ECHIDNA is a cross-prover theorem verification bridge that connects 30
+proof backends. protocol-squisher uses ECHIDNA to:
+
+* Verify formal proofs across Agda, Coq, Lean 4, Isabelle, and Z3
+* Provide offline fallback when cloud provers are unavailable
+* Generate proof obligations from compatibility analyses
+
+The integration is available through the CLI and can be used to certify
+that a specific translation meets formal requirements.
+
+=== VeriSimDB Integration
+
+Analysis results can be persisted to VeriSimDB (a verified similarity
+database) for historical tracking. This enables:
+
+* Trend analysis of compatibility over time as schemas evolve
+* Registry of known-good translations for reuse
+* Audit trails for compliance-sensitive environments
+
+When VeriSimDB is not available, protocol-squisher falls back to an
+in-memory store transparently.
+
+=== The Rust Ecosystem
+
+protocol-squisher is a pure Rust project with:
+
+* *937 tests* covering unit, integration, property-based, and formal
+verification tests
+* *0 vulnerabilities* in 275 dependencies (verified by cargo audit)
+* *clippy clean* with no warnings
+* *All stable Rust* — no nightly features required
+
+The codebase compiles on Linux, macOS, and Windows without
+platform-specific code.
diff --git a/provenance/site/content/technology.md b/provenance/site/content/technology.md
deleted file mode 100644
index 21bbda5..0000000
--- a/provenance/site/content/technology.md
+++ /dev/null
@@ -1,101 +0,0 @@
-
----
-title: Technology
-slug: technology
-order: 3
-date: 2026-02-28
-tags: [technology, rust, formal-verification, ir]
----
-
-# Technology
-
-protocol-squisher is built on a layered architecture that separates concerns cleanly: analysis at the bottom, comparison in the middle, and synthesis at the top. Every layer is implemented in Rust and backed by formal proofs.
-
-## The Intermediate Representation (IR)
-
-At the core of protocol-squisher is the **ephapax IR** — a format-independent schema representation that captures the full semantics of any serialisation protocol. When an analyser processes a schema file, it produces an `IrSchema` value containing:
-
-- **Fields** with names, types, optionality, and default values
-- **Nested structures** preserving the full hierarchy
-- **Constraints** — over 50 constraint types covering numeric ranges, string patterns, enum membership, precision bounds, and structural invariants
-- **Type mappings** connecting protocol-specific types to normalised IR types
-- **Metadata** including field ordering, deprecation status, and documentation
-
-The IR is the universal language that all 13 analysers speak. It is defined in the `protocol-squisher-ir` crate and is the foundation for every subsequent operation.
-
-## The Constraint System
-
-Constraints are the heart of compatibility analysis. Each field in a schema carries zero or more constraints that describe what values are valid. When comparing two schemas, protocol-squisher evaluates how constraints relate to each other:
-
-- **Equivalent** constraints produce Concorde (lossless) transport
-- **Subset** constraints produce Business (safe widening) transport
-- **Overlapping** constraints produce Economy (lossy but functional) transport
-- **Disjoint** constraints produce Wheelbarrow (manual intervention) transport
-
-The constraint system supports range checks, pattern matching, enum membership, nullability, precision bounds, and recursive structural constraints. It is designed to be extensible — new constraint types can be added without breaking existing analyses.
-
-## Transport Classes
-
-Transport classes are protocol-squisher's answer to the question: *how much can we trust this translation?*
-
-**Concorde** is the gold standard. Both schemas represent the same information with the same precision. Translation is a no-op in the best case or a trivial type rename in the worst. Round-tripping is always lossless.
-
-**Business** means the translation is safe in one direction but not perfectly symmetric. For example, widening an `int32` to an `int64` is always safe, but narrowing back might lose data. protocol-squisher generates the forward adapter automatically and warns about the reverse.
-
-**Economy** means information loss is expected but the translation is still useful. A `float64` to `float32` conversion loses precision; a nullable field mapped to a required field loses the null case. protocol-squisher generates the adapter with explicit annotations marking every loss point.
-
-**Wheelbarrow** means the schemas are too different for automatic bridging. A `string` field mapped to a `boolean` field, or an entirely missing required field, cannot be resolved without human decisions. protocol-squisher identifies these cases and generates a stub with TODO markers.
-
-## Meta-Analysis
-
-Beyond individual comparisons, protocol-squisher can analyse the entire landscape of supported protocols through its meta-analysis engine:
-
-- **Diversity analysis** measures how different two protocols are in their design philosophy (schema evolution vs. zero-copy vs. dynamic vs. validation-centric)
-- **Squishability ranking** scores each protocol on how amenable it is to translation
-- **Hypothesis testing** validates claims like "schema evolution protocols are more interoperable" with actual data across all pairwise comparisons
-
-The meta-analysis confirmed that Avro and Thrift (schema evolution protocols) achieve the highest squishability scores, while Cap'n Proto and FlatBuffers (zero-copy protocols) are already so optimised that translation rarely improves them.
-
-## Performance
-
-protocol-squisher is designed for production use:
-
-- **SIMD byte search** for fast schema scanning on x86_64 and aarch64
-- **Chunked streaming** for processing schemas that exceed available memory
-- **Hardware detection** at startup to select optimal code paths
-- **Lazy schema loading** to avoid parsing unused sections
-- **Zero-copy where possible** — the IR reuses schema data without allocation when safe
-
-## ECHIDNA Integration
-
-ECHIDNA is a cross-prover theorem verification bridge that connects 30 proof backends. protocol-squisher uses ECHIDNA to:
-
-- Verify formal proofs across Agda, Coq, Lean 4, Isabelle, and Z3
-- Provide offline fallback when cloud provers are unavailable
-- Generate proof obligations from compatibility analyses
-
-The integration is available through the CLI and can be used to certify that a specific translation meets formal requirements.
-
-## VeriSimDB Integration
-
-Analysis results can be persisted to VeriSimDB (a verified similarity database) for historical tracking. This enables:
-
-- Trend analysis of compatibility over time as schemas evolve
-- Registry of known-good translations for reuse
-- Audit trails for compliance-sensitive environments
-
-When VeriSimDB is not available, protocol-squisher falls back to an in-memory store transparently.
-
-## The Rust Ecosystem
-
-protocol-squisher is a pure Rust project with:
-
-- **937 tests** covering unit, integration, property-based, and formal verification tests
-- **0 vulnerabilities** in 275 dependencies (verified by cargo audit)
-- **clippy clean** with no warnings
-- **All stable Rust** — no nightly features required
-
-The codebase compiles on Linux, macOS, and Windows without platform-specific code.