Skip to Content

Writing a core

A core builds and captures projects for one stack, runs as a separate process and returns trace records.

A core builds and captures projects for one stack. It runs as a separate process and returns pitafix.trace/1 records, so you can write it in any language. Start with the script example below, then add commands or streaming when you need them.

Pick a level

All three levels produce the same trace. They differ only in how the core is started and how the records travel.

LevelWhat it isGood for
0Any program that leaves .pitafix/traces/<run>/trace.ndjson behindA first core, a spike, an exporter from a tool you already have
1A manifest table that maps verbs such as doctor and capture to commandsScripts and existing CLI tools; no protocol to speak
2One process per project, speaking JSON-RPC 2.0 on stdio, streaming each record as it happensReal cores: live progress, cancel that works mid-step, devices, mirror sessions

Start at level 0. Everything you learn there — the manifest, the trace, the artifacts — is the same at every level, and a level 0 core is already installable and testable.

On this page