One source → All platforms
A formally-verified, platform-agnostic extension format that compiles to:
- Browser extensions (Firefox, Chrome, Safari, Edge)
- IDE plugins (VSCode, Obsidian, Zed)
- CMS plugins (WordPress, Drupal)
- Scholarly tools (Zotero, JabRef)
- Desktop apps (Electron, Tauri)
Existing tools (Plasmo, WXT, Extension.js) only solve browser cross-compilation.
UXF goes further:
- Platform-agnostic abstractions (not just browser APIs)
- Formal verification (Idris2 proofs of correctness)
- Attestation (A2ML provenance tracking)
- Self-validation (K9-SVC contracts)
universal-extension-format/
├── spec/
│ ├── UXF-SPEC.adoc # Format specification
│ ├── ABSTRACT-CAPABILITIES.adoc # Platform-agnostic APIs
│ └── PLATFORM-ADAPTERS.adoc # Target mappings
│
├── compiler/
│ ├── src/
│ │ ├── parser/ # A2ML/K9 parser
│ │ ├── validator/ # Nickel contracts
│ │ ├── adapters/ # Platform-specific generators
│ │ │ ├── firefox.ncl
│ │ │ ├── chrome.ncl
│ │ │ ├── wordpress.php.ncl
│ │ │ ├── vscode.ts.ncl
│ │ │ └── zotero.ncl
│ │ └── codegen/ # Code generation
│ └── tests/
│ └── fixtures/ # Test extensions
│
├── stdlib/
│ ├── capabilities/ # Abstract capability definitions
│ │ ├── storage.uxf
│ │ ├── ui.uxf
│ │ ├── permissions.uxf
│ │ └── lifecycle.uxf
│ └── adapters/ # Runtime adapters
│ ├── browser-polyfill.js
│ ├── wordpress-bridge.php
│ └── vscode-shim.ts
│
├── examples/
│ ├── hello-world/
│ │ ├── extension.uxf # Source
│ │ └── dist/ # Generated outputs
│ │ ├── firefox/
│ │ ├── chrome/
│ │ ├── wordpress/
│ │ └── vscode/
│ ├── fireflag/ # Port of FireFlag
│ └── academic-tools/ # Zotero example
│
├── proofs/
│ ├── Correctness.idr # Manifest generation correctness
│ ├── SafetyLevels.idr # Safety property preservation
│ └── PlatformCompat.idr # Platform compatibility proofs
│
├── cli/
│ ├── src/uxf.ml # OCaml CLI tool
│ └── bin/uxf # Binary
│
├── docs/
│ ├── QUICKSTART.adoc
│ ├── PLATFORM-SUPPORT.adoc
│ ├── MIGRATION-GUIDE.adoc
│ └── API-REFERENCE.adoc
│
└── .machine_readable/
├── STATE.scm
├── ECOSYSTEM.scm
└── META.scm
# extension.uxf
# SPDX-License-Identifier: CC-BY-SA-4.0
@metadata:
name: MyExtension
version: 1.0.0
author: You <you@example.com>
license: MPL-2.0
@end
@capabilities:
## What the extension does (abstract)
storage:
- type: local
- schema:
settings: {
enabled: boolean,
theme: string,
}
ui:
- popup:
title: "Quick Settings"
components: [toggle, dropdown]
- sidebar:
title: "Detailed View"
components: [list, chart]
- options:
title: "Configuration"
components: [form]
permissions:
- storage: local
- ui: popup, sidebar, options
@end
@lifecycle:
## Platform-agnostic lifecycle events
on_install:
- initialize_storage
- show_welcome_message
on_update:
- migrate_data
- show_changelog
on_uninstall:
- cleanup_storage
@end
@targets:
## Platform-specific configuration
firefox:
min_version: 142.0
manifest_version: 3
chrome:
min_version: 114.0
manifest_version: 3
wordpress:
php_version: 8.1
wp_version: 6.0
vscode:
engine_version: 1.75.0
@end
# Compile to single target
uxf compile extension.uxf --target firefox
# Compile to all targets
uxf compile extension.uxf --all
# Validate without compiling
uxf validate extension.uxf
# Show platform support matrix
uxf targets extension.uxf
# Generate from template
uxf init my-extension --template basic- Format: A2ML (attested markup) + K9-SVC (self-validating)
- Validation: Nickel (contracts) + Idris2 (proofs)
- Generation: ReScript (compiler) + Deno (runtime)
- CLI: OCaml or Rust
- Parser: A2ML → AST
- Validator: Nickel contracts + Idris2 proofs
- Adapter: AST → Platform-specific IR
- Codegen: IR → Target code
- Package: Code → Distributable (XPI, CRX, ZIP, VSIX)
| Platform | Status | Notes |
|---|---|---|
| Firefox | ✅ Tier 1 | Full WebExtensions API |
| Chrome | ✅ Tier 1 | Full WebExtensions API |
| Safari | Limited API coverage | |
| Edge | ✅ Tier 1 | Chromium-based |
| Zotero | Firefox-based + custom APIs | |
| WordPress | PHP paradigm shift | |
| VSCode | TypeScript + different API model | |
| Obsidian | 🔄 Tier 3 | Planned |
| Electron | 🔄 Tier 3 | Standalone app generation |
- UXF spec v0.1
- Firefox + Chrome adapters
- Manifest V2/V3 generation
- CLI tool (compile, validate)
- 3 example extensions
- VSCode adapter
- Obsidian adapter
- TypeScript code generation
- 2 example plugins
- WordPress adapter
- PHP code generation
- Hooks/filters mapping
- 1 example plugin
- Zotero adapter
- RDF/citation handling
- 1 example translator
- Idris2 proofs of correctness
- Safety property preservation
- Platform compatibility proofs
- Adoption: 10+ real-world extensions using UXF
- Platform coverage: 5+ platforms supported
- Code reduction: 80% less platform-specific code
- Maintenance: 1 source update → all platforms
- Verification: 100% formally verified core
| Feature | UXF | Plasmo | WXT | Extension.js |
|---|---|---|---|---|
| Browser extensions | ✅ | ✅ | ✅ | ✅ |
| IDE plugins | ✅ | ❌ | ❌ | ❌ |
| CMS plugins | ✅ | ❌ | ❌ | ❌ |
| Formal verification | ✅ | ❌ | ❌ | ❌ |
| Attestation | ✅ | ❌ | ❌ | ❌ |
| Self-validation | ✅ | ❌ | ❌ | ❌ |
fireflag/
├── firefox/manifest.json # Manual
├── chrome/manifest.json # Manual (copy-paste)
└── zotero/install.rdf # Manual (different format)
fireflag/
├── extension.uxf # Single source
└── dist/ # Generated
├── firefox/
├── chrome/
├── safari/
├── zotero/
├── wordpress/
└── vscode/
Problem: Platforms change APIs frequently
Mitigation:
- Abstract capabilities, not APIs
- Version adapters separately
- Automated platform API tracking
Problem: PHP vs JavaScript vs TypeScript
Mitigation:
- Focus on shared abstractions (storage, UI, lifecycle)
- Platform-specific escape hatches
- Gradual adoption (browsers first, then expand)
Problem: Developers already invested in platform-specific code
Mitigation:
- Migration tools (Firefox → UXF, Chrome → UXF)
- Incremental adoption (start with manifest, expand to code)
- Strong ROI demonstration (one source → 5+ platforms)
- A2ML: Format for UXF source files
- K9-SVC: Self-validation contracts
- Nickel: Type-safe configuration
- Idris2: Formal proofs
- ReScript: Compiler implementation
- Deno: Runtime for tooling
This could be a landmark project for hyperpolymath:
- Novel solution (no existing competitor at this scale)
- Demonstrates formal methods in practice
- Solves real-world pain (multi-platform development)
- Showcase for A2ML + K9-SVC + Nickel + Idris2 integration
Want me to:
- Create the RSR template repo for
universal-extension-format? - Prototype Phase 1 (Firefox + Chrome from one source)?
- Write the UXF spec (formal grammar + examples)?
- Build proof-of-concept (FireFlag as first UXF project)?