Contribute to KOSTRAL — Engine Contracts
CONTRIBUTE TO KOSTRAL

Build your engine independently. Integrate through a shared contract.

KOSTRAL is designed for independently developed engines that can participate in a common execution system. Contributions should preserve clear responsibilities, explicit capabilities, and predictable interaction with the rest of the workflow.

The contribution idea

Engine independence is not enough. Integration must be predictable.

A contributor should not need to reproduce a different protocol for every workflow. The shared contract defines how an engine declares its behavior and participates; the workflow decides when it runs.

Independent author→Engine implementation→KOSTRAL contract→Workflow composition→Common report
Choose the responsibility

Classify by what the engine does—not just the fields it inspects.

Optimizer

Changes or improves deployment state. In the current model, it may mutate IR when its metadata declares that capability, and the observable changes must be reported.

Validator

Detects configuration problems and reports findings. It remains read-only in the current architecture.

Security

Detects security or policy risks and reports findings. It remains read-only in the current architecture.

A CPU request can be inspected by both an Optimizer and a Validator. The distinction is the responsibility: change the state, or detect and report a problem.
Current contract checks

Declare capabilities. Let KOSTRAL verify observable behavior.

The current implementation establishes a small, concrete contract foundation.

Mutation permission

Engine metadata declares mutates. ServiceBus captures observable state before and after processing and rejects a manifest change from an engine declared read-only.

Mutation reporting

If an engine changes manifests, the current verifier requires a new optimization finding to accompany the change.

Remote descriptor

A remote engine declares its name, version, contract version, mutation capability, and accepted Kubernetes input kinds.

Compatibility pins

A registry entry can pin the remote engine version and accepted input kinds. The client verifies the descriptor before sending supported input.

Important boundary: IR snapshot verification is not a sandbox. It does not by itself control filesystem, network, process, or external-system side effects. Remote execution remains experimental.
Contributor use cases

What the contract is intended to make easier.

Own a specialized engine

Maintain a focused validator, optimizer, or security engine without taking ownership of the entire KOSTRAL workflow.

Integrate an existing tool

Build an adapter around a tool's existing intelligence rather than reimplementing its scanning or validation logic. External integrations must be evaluated and implemented individually.

Compose local and remote work

Use the current remote adapter as an experimental path for invoking separate engine processes while preserving declared engine responsibilities.

Before opening a pull request

Keep contributions aligned with the current implementation and its guarantees.

  1. Define the engine's single primary responsibility.
  2. Declare whether it may mutate IR; do not grant mutation capability to read-only checks.
  3. Keep rules isolated, deterministic, and independently testable.
  4. Report findings and any permitted mutations using the established reporting model.
  5. Add tests for expected behavior and contract violations.
  6. Document any new input kinds, external dependencies, or execution assumptions.
The longer-term ecosystem

Compatibility first. Publishing and approval later.

KOSTRAL may eventually distinguish engines that are contract-compatible, tested, approved, or experimental. Those labels need explicit criteria and a real review process. A registry is not automatically a trust system, and a contract-compliant engine is not automatically safe.

Not currently available: public engine uploads, dynamic discovery, automatic registration, marketplace distribution, and a formal engine approval service. The current focus is establishing and demonstrating the contract foundations.