Method
Lift · describe · emit · prove · roll traffic
Every stack enters the same graph. Chrysalis Web Language (CWL) is how humans read and write what’s in that graph.
What CWL is — in plain terms
A small language for web apps: routes, handlers, side effects, and honest gaps. Not a replacement for TypeScript or Python.
Say it in CWL
.cwl files declare @route GET "/health", named handlers, effects: (db, session, mail), and return values — or a hole when you must delegate to legacy code.
One graph underneath
Every path goes source → WebIR → target. PHP, JavaScript, Python, Java, Go, and others lift in; Hono, Fastify, Next.js, or CWL itself can lift out. No direct transpiler forks.
Traffic decides
Record what production actually did. Replay against the new stack. Promote routes only when scores clear your bar — then shift traffic shadow → canary → cutover.
Five stages
The loop Chrysalis runs today.
On legacy PHP this is fully wired end-to-end. Other stacks follow the same spine through the Translation Hub — with grades that stay honest about depth.
-
01 · Observe
Record real behavior
Capture HTTP requests, SQL, sessions, and side effects into a trace corpus — the contract your new code must satisfy, not a design doc.
-
02 · Ingest
Lift into WebIR
PHP (deepest), JavaScript, Python, Java, Go, and more enter the shared graph. You can also author greenfield routes in CWL with zero-loss ingest — no guessy regex lift.
-
03 · Emit
Generate the target stack
Emit TypeScript (Hono, Fastify), project back to CWL for review, or other hub targets as maturity allows. Incomplete work stays visible as holes.
-
04 · Verify
Replay and score
Run the corpus against the emitted app. Per-route correctness reports for CI. Divergence points back to the node in the graph that got it wrong.
-
05 · Deploy
Dual-stack cutover
Legacy and modern behind one router: mirror traffic in shadow, send a slice in canary, cut over route by route — rollback when diffs alarm.