Interactive Playground¶
Experiment with Branchline directly in your browser—no installs required. Pick an example, edit the program and input, enable tracing, and run. The catalog can be filtered by example category and AI subset compatibility so docs, tests, and AI-authoring examples stay discoverable from the same descriptor metadata.
Curated examples (all preserved)¶
Use the category and AI subset filters in the embedded playground to narrow this list. Examples marked AI compatible are intended for inspect-first authoring loops; examples marked incompatible are still runnable language examples, but Inspect will explain why they are outside the AI canonical subset.
- collection-transforms — MAP/FILTER/REDUCE style array work
- contract-deep-composition — deep nested output inferred from stdlib-first composition
- contract-literal-brackets-static — literal bracket keys inferred as static paths
- contract-empty-array-append — stable array element typing via
FOR EACH ... WHEREand[] + APPEND - customer-profile — concise profile shaping with FORMAT/GET and CASE fallback
- explain-derived-total — enable tracing to see EXPLAIN output
- junit-badge-summary — XML normalization via FILTER/MAP/SUM pipelines
- order-shipment — shipping snapshot with GET/FORMAT and CASE classification
- pipeline-health-gating — CASE-driven health gating with ASSERT/CHECKPOINT + trace
- error-handling-try-catch — TRY/CATCH with ASSERT fallbacks
- shared-memory-basics — SHARED declarations and writes
- Standard library coverage: stdlib-case-basic, stdlib-core-keys-values, stdlib-core-put-delete, stdlib-core-append-prepend, stdlib-core-walk, stdlib-arrays-overview, stdlib-agg-overview, stdlib-strings-casts, stdlib-strings-text, stdlib-numeric-precision, stdlib-hof-overview, stdlib-debug-explain, stdlib-time-now
Troubleshooting¶
- If the embed does not appear, open the new-tab link above.
- XML inputs are parsed into objects; attributes use the
@attrconvention and text nodes use#text. - The playground runs entirely in your browser using the Kotlin/JS interpreter; no data leaves your machine.
Contract JSON in Playground¶
- Enable Contracts to inspect inferred input/output contracts.
- Keep debug off for clean JSON intended for docs/tooling.
- Enable Contract debug when you need
originand available span metadata.
Inspect workbench¶
- Run an example and use Inspect → Normalized source to copy the canonical form for docs, agents, and repair loops.
- Use Diagnostics for parser, contract, and runtime-facing messages before executing a changed program repeatedly.
- Use Subset blockers when an example is runnable Branchline but not AI-canonical; blockers are driven by the same inspect compatibility result used by CLI automation.