Skip to Content

Writing a rig

A rig is what PitaFix needs to capture one project, beyond what the core for its stack already knows.

A rig is what PitaFix needs to capture one project, beyond what the core for its stack already knows: which services the app calls and where each one is, how a test person signs in, the states a tap alone doesn't reach, the journeys to walk and the screens the rig claims to reach. It is one file, pitafix-rig.toml, in the same form for every core. PitaFix reads it with nothing run, so you can check it, show it and install it before any of its code has had a chance to do anything.

This guide is for a person or a coding agent writing one for a Next.js, MyGo or other project. You don't need to read Go. The cores that capture real stacks are in pitafix-rigs; their own guides say what each of them reads from a rig.

Rig and core

Two words, two owners. A core is the stack's: the program that builds and drives a Next.js app or a MyGo app, written once for every project of that stack (docs/writing-a-core.md). A rig is the project's: what this one app calls, who signs in to it and what to walk. A rig names its core with core = "nextjs", and a core that captures by a rig says so with rig = true under [capabilities] in its own manifest.

A rig holds data, with code in one place only: the handler files a fixture service names. Nothing else in it runs on its own. A core reads the rig's data and does the running.

On this page