For build tools and editor configuration, start with development setup. This page covers how to approach the implementation once that environment is ready.

When adding an operation, start with its caller. An image consumer may need the result's dimensions and a way to read pixels without needing access to the provider's allocator. Identify those requirements before deciding whether the change belongs in the provider, the adapter or a shared contract.

Finding the owner

The project is split across a few layers and repositories. The distinction is mostly about which questions each one has enough information to answer:

OwnerResponsibility
PerimortemNative containers, memory, codecs and system services
PhotophoreWindowing, input and Vulkan rendering
ToolchainCompiler and SDK acquisition, Bazel rules, packaging and the shared validation frontend
TTX DataConcrete descriptions, canonical compilation and access protocols
TTX SemanticContract negotiation and established data access
TTX GraphAbstract routes, policies, capabilities and substitution
Tetrodotoxin SourceSource observations, provenance and portable invocation boundaries
Type and Execution modelsSemantic type/storage capabilities and execution structure
DialectsInterpretation of an authored command stream
Terminals and adaptersRealization for a consumer such as native code or Godot

A pair of similar implementations can suggest a shared abstraction, but it helps to ask what agreement their consumers actually share. Otherwise a lower layer can end up owning a policy simply because it was a convenient place to put common code.

Perimortem, TTX and Tetrodotoxin have separate repositories. Godot contains the engine adapter and demonstration, while Compute supplies shared contracts with CPU and CUDA execution providers. Each repository owns its build and tests.

Using the explanation as part of the review

The comments beside an interface should explain why it exists, what its caller can rely on and which tradeoff gave it that shape. The compiler specification is a substantial example: a reader can follow the normalization rules before examining how the implementation performs them.

That explanation is useful while the design is changing. A reviewer can question whether a lifetime belongs to the provider, or whether a piece of state is really part of a persistent object, without first rewriting the implementation. If the comment and code disagree, we have a model question to settle rather than a prose problem to smooth over.

The website explains how the parts fit together. Local contract comments supply the facts needed to implement or call a particular interface.

Testing another participant's view

A native caller can accidentally hide a broken boundary by sharing private types, allocation machinery or assumptions with its provider. C/C++ fixtures and the Godot/script examples help expose that coupling because the consumer has to use the published interface.

For performance work, decide what the request should have to do before interpreting its duration. The Godot overlay checks count the upload they need and the background work they should avoid, then validate the resulting pixels independently. Timing an operation that accidentally recomputes its input can make the kernel look slow when the dependency policy is the real problem.

Some of the most useful checks have come from asking what survives a change:

  • An incompatible callable description should fail before invocation.
  • A refusing or unsettled policy should keep its answer through the adapter.
  • An emitted result should remain usable after the discovery graph is released.
  • Provider state should be destroyed while the code needed to release it is still loaded.
  • Repeated calls should use an established interface where its lifetime permits that reuse.
  • A wider or differently shaped input should reveal hidden scans and allocation assumptions.

The native integrations can share the TTX runtime without requiring foreign implementations to adopt Perimortem. That deployment choice matters when private allocator finalizers would otherwise keep a provider library loaded after its explicit results are gone.

Run the foundation suite from the TTX repository:

bazel run :tests

Report which checks ran and what they exercised. A successful build doesn't establish that a provider can be replaced or that its result survives release; those claims need tests that perform the relevant operation.