RabbinatixDocs
Sign inGet started

Build behaviour (Flow-Driven Development)

Code generation

See the code for a logic as you build it, take it away as files, and check it returns what the test cases returned.

Open Logic in the app

How it works

Rabbinatix turns any logic without errors into code. It first translates the logic into a neutral form, the FDD IR: plain if, switch, loops and calls, with every statement tagged with the key of the step it came from. A language adapter then prints that as code.

Because every line keeps its step's key, the code and the canvas stay linked, and the code can be checked against the runs you already made.

LanguageNotes
TypeScriptThe reference. Typed, formatted with Prettier
PythonPrinted from the same IR
C#Printed from the same IR
JavaPrinted from the same IR. Java 17, no libraries
GoPrinted from the same IR. Go 1.22, no libraries; one package per system, laid out as gofmt does. Regular expressions are Go's, without lookarounds or backreferences
KotlinPrinted from the same IR. Kotlin 1.9 on the JVM, no libraries; one package per system, data classes for the contract
SwiftPrinted from the same IR. Swift 5.9, Foundation only; one module per system, Codable structs for the contract. A Parallel step runs its branches as tasks at the same time
DartPrinted from the same IR. Dart 3, core libraries only (Flutter too); one folder of libraries per system, classes with fromJson and toJson for the contract
PHPPrinted from the same IR. PHP 8.1 with mbstring; one namespace per system, readonly classes for the contract. A Parallel step runs its branches one after the other
RubyPrinted from the same IR. Ruby 3.1, standard library only; one module per system, classes with from_value and to_value for the contract. A Parallel step runs its branches on threads of their own
RustPrinted from the same IR. Rust 1.70, standard library only; one module per system, structs with from_value and to_value for the contract, failures as Result. A Parallel step runs its branches on threads of their own

The generated code is read-only. To change it, change the logic.

The code panel

  1. Open a logic in the logic editor.
  2. Press Code in the toolbar (Ctrl+Shift+C). The code opens next to the canvas.
  3. Pick the Language.
  4. Switch between the file tabs: the handler, its types, its dependencies and the shared runtime.

The panel updates as you edit, before you save. If the logic has errors, it lists them instead, each with Show on canvas.

Linked both ways. Hover a line to outline the step it came from. Select a step on the canvas to highlight its lines. Lines show the step's key on hover.

Options (the ⋯ menu): FDD comments names each block's step key in the code, Format runs Prettier (TypeScript only), and One file puts everything in a single file.

The panel's Versions tab lists what was exported and when, and can compare two exports.

Take the code away

  • Copy copies the open file.
  • Download file downloads the open file.
  • Download all downloads a zip of the logic's files, the runtime and a map file that links lines to steps.
  • After a download, Link to repository path records where the file lives in your repository, so the logic links to its implementation.
  • On a system's Logic tab, Export code downloads TypeScript for every logic of the system as one zip, with a README.
  • On a Web frontend's or Mobile app's Screens tab, Export HTML downloads its screens as plain HTML pages. See Export HTML.

Calls to other systems become a dependencies interface that you implement, so the generated handler stays free of HTTP clients and database drivers.

From a terminal or CI, rabbinatix generate writes the same files, formatted and stamped the same way:

npx -y rabbinatix generate --logic LOGIC-AUTH-LOGIN-001 --language python
npx -y rabbinatix generate --system auth-service --check   # in CI: fails when the repo's files are older than the logic

--record lists the generation on the code panel's Exported tab, as a download does. Every option: The rabbinatix CLI.

TipAI prompts… → Write its code in the editor’s … menu has your AI assistant write the code in your project, in your style. See Your AI assistant.

Verify against test cases

Generated code is only useful if it does what the logic does. Verification checks that.

  1. Run the flow's test cases first. See Test cases and runs.
  2. In the code panel, press Verify against test cases.
  3. Rabbinatix takes the latest run of every test case that went through this logic and runs the generated code with the same inputs and the same answers from other systems.
  4. Each result shows ✓ when the code returned the same result and took the same path, or ✗ with the reason, such as which branch differed at which step.

On a failure, Show node opens the step and Create bug files a bug ticket with the details. A result is skipped when the logic changed after the run; Re-run test case runs it again.

To check a whole flow, pick Check the generated code in the flow's … menu, or right-click the canvas. A chip then shows how many steps' code matched.

NoteVerification here runs the TypeScript build, in your browser. To verify the Python, C#, Java, Go, Kotlin, Swift, Dart, PHP, Ruby or Rust build, run npx -y rabbinatix verify --logic <key> --language python (or csharp, java, go, kotlin, swift, dart, php, ruby, rust) on a computer with that language installed: it replays the same test runs through that build and shows the same results.

When the code and the logic disagree

  • If you changed the logic, run the test cases again, then verify.
  • If you changed your copy of the code, Is my code in step? tells you whether it still matches the current version. See Text steps.
  • The code panel reference explains each button.