Thesis
Frameworks are many writings of the same meaning. The Rosetta rule recovers that meaning
without a lossy “regex lift” as the semantic spine. CWL → WebIR via ingest;
WebIR → CWL via emit-from-hub tooling. WebIR is the only IR between languages
— emit must not bypass it (HUB-TRANSLATION-PATHS.md).
Honesty law: unsupported behavior → hole reason;.
Guessing is a forged gene. Silent stubs are cancer.
Package surface
| Export | Role |
|---|---|
Module / NodeBase | IR graph root and node base |
Effect / ModuleBuilder | Effects + construction helpers |
| visit / merge / snapshot | Traversal and provenance helpers |
./dialects/web-request | HTTP request/response dialect |
./dialects/effect | Effect dialect |
./dialects/data | Page/data dialect |
Convert: pnpm run link:webir-from-cwl; prove
hub:webir-resolve-smoke, hub:cwl-language-pillar-smoke.
Pillar: npm run build:webir / link:webir.
Reverse authoring: cwl fmt --webir, cwl emit-check.
Surface stack
Authoring (CWL surfaces)
┌─────────────────────────────────────────┐
│ CWL API @route → JSON handlers │
│ CWL Pages @page → HTML / layouts │
│ CWL Data load → page data sidecar │
│ CWL UI @component / islands │
│ CWL Effects use / effects metadata │
│ Control if / foreach (RFC-0021) │
└──────────────────┬──────────────────────┘
│ 1:1 (cwl-ingest / emit)
▼
WebIR (semantic IR)
│
┌───────────┼───────────┐
▼ ▼ ▼
emit-hono runtime-cwl chimera
emit-fastify (migration)
│
▼
oracle / verify replay
Ingest / emit / verify lanes
Convert Hub translation paths (WebIR always in the middle):
| Lane | Modules (examples) |
|---|---|
| Ingest | chrysalis-ingest, hub-ast-lift, hub-pattern-lift, hub-file-lift, *-ast-ingest.mjs, framework peels |
| Emit | chrysalis-emit, hub-webir-typescript, hub-native-*, emit-*-from-hub.mjs, emit-cwl-from-hub.mjs |
| Verify | legacy-oracle-php, hub-structural-gold, hub-trace-replay (@chrysalis/verify), wptp-contract, none |
Dispatcher: hub-lift-dispatch.mjs → specialized peels before generic
lift-to-webir.mjs. Fat CWL control lowering stays Convert-side
(cwl-control-lower.mjs; language grammar stays CWL pillar.
Core vs peel (D6551)
| Layer | What lives here |
|---|---|
| Core | WebIR types; CWL grammar/AST/parse/print/diagnose; hole contracts; verify dispose semantics; provenance |
| Peel | Origin dialect peels, Hub smokes/proves, COBOL adapters, emit backends, oracle sidecars, CLI orchestration |
Peels map into the genome or leave holes. They do not expand the grammar. Promotion to core only when IR/CWL/hole/verify semantics change — not when a prove script grows.
DNA seed from CWL surface
Implemented in cwl-dna-seed.mjs. Draft document:
schema: app-dna-v1, mode: draft, bridge.kind: cwl-surface-seed,
identity `${host} ${METHOD} ${path_template}`.
| Fingerprint | Computation |
|---|---|
| response keys | Sorted JSON key paths depth ≤ 2; null for non-JSON / SSE |
| request keys | Union of body + multipart field + file names |
| query keys | Sorted query binding names (values ignored) |
| content_class | html | json | other from return/surface/stream |
| status_classes | Hundreds bucket if status present |
Envelope annotations (cwl_effects, cwl_surface, stream/multipart)
never become certified DNA route fields. CWL holes ≠ DNA holes[].
Golds: 24-dna-bridge, 34-dna-bridge-surfaces.
Deploy profiles (RFC-0023)
External artifact cwl-deploy-profile-v1: app_id, host,
hosts{}, path_shape_equality, content_class_from_cwl.
Not embedded in CWL grammar. Static asset globs (/**/*.js) are DNA-only collapse.
Hub grades
| Path | Signal |
|---|---|
| cwl → hono / fastify / typescript | Gold when harness + corpus hold |
| cwl → cwl | Gold (round-trip) |
| any → cwl | Silver (holes preserved) |
verify lane none | Silver/open — no trace parity claim |
Hub matrix / path knowledge APIs are the source of truth — not marketing greens.
WPTP boundary
WPTP is a public platform orbit: @wptp/ir,
OpenAPI/HAR adapters, bronze emitters, compatibility matrix.
Hub verify lane wptp-contract can use that orbit.
WPTP does not redefine CWL grammar. Prefer platforms/wptp-*
over inventing a second DNA in Convert.