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 appHow 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.
The generated code is read-only. To change it, change the logic.
The code panel
- Open a logic in the logic editor.
- Press Code in the toolbar (
Ctrl+Shift+C). The code opens next to the canvas. - Pick the Language.
- 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.
Verify against test cases
Generated code is only useful if it does what the logic does. Verification checks that.
- Run the flow's test cases first. See Test cases and runs.
- In the code panel, press Verify against test cases.
- 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.
- 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.
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.
Related
- LogicBuild what a system does by connecting nodes on a canvas: endpoint logic for an API, event logic for a user action, and functions you reuse.
- Test cases and runsWrite test cases as acceptance tests, run the flow and watch it move through your systems, step back in time, and compare runs and versions.
- Text stepsRead any logic or flow as text steps, copy or download them, and take it to your AI assistant and back.
- ScreensDesign the pages of a website or app from widgets, like a design file: click them through, put them on whiteboards, and export them as plain HTML and CSS.
- Logic editor referenceEvery panel and tab of the logic editor, and a guide to every node.
